testsuite: tcl exec& -> 'kill -9 $pid' is racy (attach-many-short-lived-thread.exp...
[deliverable/binutils-gdb.git] / gdb / gdbserver / ChangeLog
1 2015-07-30 Yao Qi <yao.qi@linaro.org>
2
3 * linux-arm-low.c (arm_hwcap): Remove it.
4 (arm_read_description): New local variable arm_hwcap. Don't
5 set arm_hwcap to zero.
6
7 2015-07-30 Yao Qi <yao.qi@linaro.org>
8
9 * linux-arm-low.c (arm_fill_wmmxregset): Don't use arm_hwcap.
10 Use regcache->tdesc instead.
11 (arm_store_wmmxregset): Likewise.
12 (arm_fill_vfpregset): Likewise.
13 (arm_store_vfpregset): Likewise.
14
15 2015-07-30 Yao Qi <yao.qi@linaro.org>
16
17 * linux-arm-low.c: Include arch/arm.h.
18 (arm_fill_gregset): Don't use arm_num_regs and arm_regmap.
19 (arm_store_gregset): Likewise.
20
21 2015-07-29 Simon Marchi <simon.marchi@ericsson.com>
22
23 * linux-mips-low.c (mips_linux_prepare_to_resume): Add NULL as
24 ptrace's 4th parameter.
25
26 2015-07-27 Yao Qi <yao.qi@linaro.org>
27
28 * configure.srv (case aarch64*-*-linux*): Don't set
29 srv_linux_usrregs.
30
31 2015-07-24 Pedro Alves <palves@redhat.c: Likewise.om>
32
33 * linux-aarch64-low.c: Include nat/gdb_ptrace.h instead of
34 sys/ptrace.h.
35 * linux-arm-low.c: Likewise.
36 * linux-cris-low.c: Likewise.
37 * linux-crisv32-low.c: Likewise.
38 * linux-low.c: Likewise.
39 * linux-m68k-low.c: Likewise.
40 * linux-mips-low.c: Likewise.
41 * linux-nios2-low.c: Likewise.
42 * linux-s390-low.c: Likewise.
43 * linux-sparc-low.c: Likewise.
44 * linux-tic6x-low.c: Likewise.
45 * linux-tile-low.c: Likewise.
46 * linux-x86-low.c: Likewise.
47
48 2015-07-24 Pedro Alves <palves@redhat.com>
49
50 * config.in: Regenerate.
51 * configure: Regenerate.
52
53 2015-07-24 Pedro Alves <palves@redhat.com>
54
55 * acinclude.m4: Include ../ptrace.m4.
56 * configure.ac: Call GDB_AC_PTRACE.
57 * config.in, configure: Regenerate.
58
59 2015-07-24 Yao Qi <yao.qi@linaro.org>
60
61 * linux-low.c (linux_create_inferior): Remove setting to
62 proc->priv->new_inferior.
63 (linux_attach): Likewise.
64 (linux_low_filter_event): Likewise.
65 * linux-low.h (struct process_info_private) <new_inferior>: Remove.
66
67 2015-07-24 Yao Qi <yao.qi@linaro.org>
68
69 * linux-low.c (linux_arch_setup): New function.
70 (linux_low_filter_event): If proc->tdesc is NULL and
71 proc->attached is true, call the_low_target.arch_setup.
72 Otherwise, keep status pending, and return.
73 (linux_resume_one_lwp_throw): Don't call get_pc if
74 thread->while_stepping isn't NULL. Don't call
75 get_thread_regcache if proc->tdesc is NULL.
76 (need_step_over_p): Return 0 if proc->tdesc is NULL.
77 (linux_target_ops): Install arch_setup.
78 * server.c (start_inferior): Call the_target->arch_setup.
79 * target.h (struct target_ops) <arch_setup>: New field.
80 (target_arch_setup): New marco.
81 * lynx-low.c (lynx_target_ops): Update.
82 * nto-low.c (nto_target_ops): Update.
83 * spu-low.c (spu_target_ops): Update.
84 * win32-low.c (win32_target_ops): Update.
85
86 2015-07-24 Yao Qi <yao.qi@linaro.org>
87
88 * linux-low.c (linux_add_process): Don't set
89 proc->priv->new_inferior.
90 (linux_create_inferior): Set proc->priv->new_inferior to 1.
91 (linux_attach): Likewise.
92
93 2015-07-24 Yao Qi <yao.qi@linaro.org>
94
95 * server.c (start_inferior): Code refactor.
96
97 2015-07-24 Yao Qi <yao.qi@linaro.org>
98
99 * server.c (process_serial_event): Set general_thread.
100
101 2015-07-21 Yao Qi <yao.qi@linaro.org>
102
103 * linux-aarch64-low.c (aarch64_arch_setup): Remove code and call
104 aarch64_linux_get_debug_reg_capacity.
105
106 2015-07-17 Yao Qi <yao.qi@linaro.org>
107
108 * Makefile.in (aarch64-linux-hw-point.o): New rule.
109 * configure.srv (srv_tgtobj): Append aarch64-linux-hw-point.o.
110 * linux-aarch64-low.c: Include nat/aarch64-linux-hw-point.h.
111 (AARCH64_HBP_MAX_NUM): Move to nat/aarch64-linux-hw-point.h.
112 (AARCH64_HWP_MAX_NUM, AARCH64_HBP_ALIGNMENT): Likewise.
113 (AARCH64_HWP_ALIGNMENT): Likewise.
114 (AARCH64_HWP_MAX_LEN_PER_REG): Likewise.
115 (AARCH64_DEBUG_NUM_SLOTS, AARCH64_DEBUG_ARCH): Likewise.
116 (aarch64_num_bp_regs, aarch64_num_wp_regs): Likewise.
117 (AARCH64_DEBUG_ARCH_V8, DR_MARK_ALL_CHANGED): Likewise.
118 (DR_MARK_N_CHANGED, DR_CLEAR_CHANGED): Likewise.
119 (DR_HAS_CHANGED, DR_N_HAS_CHANGE): Likewise.
120 (struct aarch64_debug_reg_state): Likewise.
121 (struct arch_lwp_info): Likewise.
122 (aarch64_align_watchpoint): Likewise.
123 (DR_CONTROL_ENABLED, DR_CONTROL_LENGTH): Likewise.
124 (aarch64_watchpoint_length): Likewise.
125 (aarch64_point_encode_ctrl_reg): Likewise
126 (aarch64_point_is_aligned): Likewise.
127 (aarch64_align_watchpoint): Likewise.
128 (aarch64_linux_set_debug_regs):
129 (aarch64_dr_state_insert_one_point): Likewise.
130 (aarch64_dr_state_remove_one_point): Likewise.
131 (aarch64_handle_breakpoint): Likewise.
132 (aarch64_handle_aligned_watchpoint): Likewise.
133 (aarch64_handle_unaligned_watchpoint): Likewise.
134 (aarch64_handle_watchpoint): Likewise.
135
136 2015-07-17 Yao Qi <yao.qi@linaro.org>
137
138 * linux-aarch64-low.c (aarch64_handle_breakpoint): Add argument state
139 and don't aarch64_get_debug_reg_state. All callers update.
140 (aarch64_handle_aligned_watchpoint): Likewise.
141 (aarch64_handle_unaligned_watchpoint): Likewise.
142 (aarch64_handle_watchpoint): Likewise.
143 (aarch64_insert_point): Call aarch64_get_debug_reg_state earlier.
144 (aarch64_remove_point): Likewise.
145
146 2015-07-17 Yao Qi <yao.qi@linaro.org>
147
148 * linux-aarch64-low.c (aarch64_show_debug_reg_state): Use
149 debug_printf.
150 (aarch64_handle_unaligned_watchpoint): Likewise.
151
152 2015-07-15 Jan Kratochvil <jan.kratochvil@redhat.com>
153
154 Revert the previous 3 commits:
155 Move gdb_regex* to common/
156 Move linux_find_memory_regions_full & co.
157 gdbserver build-id attribute generator
158
159 2015-07-15 Aleksandar Ristovski <aristovski@qnx.com
160 Jan Kratochvil <jan.kratochvil@redhat.com>
161
162 gdbserver build-id attribute generator.
163 * linux-low.c (nat/linux-maps.h, search.h, rsp-low.h): Include.
164 (ElfXX_Ehdr, ElfXX_Phdr, ElfXX_Nhdr): New.
165 (ELFXX_FLD, ELFXX_SIZEOF, ELFXX_ROUNDUP, BUILD_ID_INVALID): New.
166 (find_phdr): New.
167 (get_dynamic): Use find_pdhr to traverse program headers.
168 (struct mapping_entry, mapping_entry_s, free_mapping_entry_vec)
169 (compare_mapping_entry_range, struct find_memory_region_callback_data)
170 (read_build_id, find_memory_region_callback, lrfind_mapping_entry)
171 (get_hex_build_id): New.
172 (linux_qxfer_libraries_svr4): Add optional build-id attribute
173 to reply XML document.
174
175 2015-07-15 Aleksandar Ristovski <aristovski@qnx.com
176 Jan Kratochvil <jan.kratochvil@redhat.com>
177
178 * target.c: Include target/target-utils.h and fcntl.h.
179 (target_fileio_read_stralloc_1_pread, target_fileio_read_stralloc_1)
180 (target_fileio_read_stralloc): New functions.
181
182 2015-07-15 Jan Kratochvil <jan.kratochvil@redhat.com>
183
184 * Makefile.in (OBS): Add gdb_regex.o.
185 (gdb_regex.o): New.
186 * config.in: Rebuilt.
187 * configure: Rebuilt.
188
189 2015-07-15 Aleksandar Ristovski <aristovski@qnx.com
190 Jan Kratochvil <jan.kratochvil@redhat.com>
191
192 Create empty nat/linux-maps.[ch] and common/target-utils.[ch].
193 * Makefile.in (OBS): Add target-utils.o.
194 (linux-maps.o, target-utils.o): New.
195 * configure.srv (srv_linux_obj): Add linux-maps.o.
196
197 2015-07-15 Pierre Langlois <pierre.langlois@arm.com>
198
199 * linux-aarch64-low.c (aarch64_supports_range_stepping): New
200 function, return 1.
201 (the_low_target): Install it.
202
203 2015-07-14 Pedro Alves <palves@redhat.com>
204
205 * linux-low.c (kill_wait_lwp): Don't assert if waitpid fails.
206 Instead, ignore ECHILD, and throw an error for other errnos.
207
208 2015-07-10 Pedro Alves <palves@redhat.com>
209
210 * event-loop.c (struct callback_event) <data>: Change type to
211 gdb_client_data instance instead of gdb_client_data pointer.
212 (append_callback_event): Adjust.
213
214 2015-07-10 Pierre Langlois <pierre.langlois@arm.com>
215
216 * linux-aarch64-low.c: Add comments for each linux_target_ops
217 method. Remove comments already covered in target_ops and
218 linux_target_ops definitions.
219 (the_low_target): Add comments for each unimplemented method.
220
221 2015-07-09 Yao Qi <yao.qi@linaro.org>
222
223 * linux-aarch64-low.c (aarch64_regmap): Remove.
224 (aarch64_usrregs_info): Remove.
225 (regs_info): Set field usrregs to NULL.
226
227 2015-07-02 Markus Metzger <markus.t.metzger@intel.com>
228
229 * linux-low.c: Include "rsp-low.h"
230 (linux_low_encode_pt_config, linux_low_encode_raw): New.
231 (linux_low_read_btrace): Support BTRACE_FORMAT_PT.
232 (linux_low_btrace_conf): Support BTRACE_FORMAT_PT.
233 (handle_btrace_enable_pt): New.
234 (handle_btrace_general_set): Support "pt".
235 (handle_btrace_conf_general_set): Support "pt:size".
236
237 2015-06-29 Pierre Langlois <pierre.langlois@arm.com>
238
239 * linux-aarch64-low.c (aarch64_supports_z_point_type): Enable for
240 Z_PACKET_SW_BP.
241
242 2015-06-29 Pierre Langlois <pierre.langlois@arm.com>
243
244 * linux-aarch64-low.c: Remove comment about endianness.
245 (aarch64_breakpoint): Change type to gdb_byte[]. Set to "brk #0".
246 (aarch64_breakpoint_at): Change type of insn to gdb_byte[]. Use
247 memcmp.
248
249 2015-06-24 Gary Benson <gbenson@redhat.com>
250
251 * linux-i386-ipa.c (stdint.h): Do not include.
252 * lynx-i386-low.c (stdint.h): Likewise.
253 * lynx-ppc-low.c (stdint.h): Likewise.
254 * mem-break.c (stdint.h): Likewise.
255 * thread-db.c (stdint.h): Likewise.
256 * tracepoint.c (stdint.h): Likewise.
257 * win32-low.c (stdint.h): Likewise.
258
259 2015-06-18 Simon Marchi <simon.marchi@ericsson.com>
260
261 * server.c (write_qxfer_response): Update call to
262 remote_escape_output.
263
264 2015-06-15 Aleksandar Ristovski <aristovski@qnx.com
265 Jan Kratochvil <jan.kratochvil@redhat.com>
266
267 Merge multiple hex conversions.
268 * gdbreplay.c (tohex): Rename to 'fromhex'.
269 (logchar): Use fromhex.
270
271 2015-06-10 Jan Kratochvil <jan.kratochvil@redhat.com>
272
273 * server.c (handle_qxfer_libraries): Set `version' attribute for
274 <library-list>.
275
276 2015-06-10 Gary Benson <gbenson@redhat.com>
277
278 * target.h (struct target_ops) <multifs_open>: New field.
279 <multifs_unlink>: Likewise.
280 <multifs_readlink>: Likewise.
281 * linux-low.c (nat/linux-namespaces.h): New include.
282 (linux_target_ops): Initialize the_target->multifs_open,
283 the_target->multifs_unlink and the_target->multifs_readlink.
284 * hostio.h (hostio_handle_new_gdb_connection): New declaration.
285 * hostio.c (hostio_fs_pid): New static variable.
286 (hostio_handle_new_gdb_connection): New function.
287 (handle_setfs): Likewise.
288 (handle_open): Use the_target->multifs_open as appropriate.
289 (handle_unlink): Use the_target->multifs_unlink as appropriate.
290 (handle_readlink): Use the_target->multifs_readlink as
291 appropriate.
292 (handle_vFile): Handle vFile:setfs packets.
293 * server.c (handle_query): Call hostio_handle_new_gdb_connection
294 after target_handle_new_gdb_connection.
295
296 2015-06-10 Gary Benson <gbenson@redhat.com>
297
298 * configure.ac (AC_CHECK_FUNCS): Add setns.
299 * config.in: Regenerate.
300 * configure: Likewise.
301 * Makefile.in (SFILES): Add nat/linux-namespaces.c.
302 (linux-namespaces.o): New rule.
303 * configure.srv (srv_linux_obj): Add linux-namespaces.o.
304
305 2015-06-09 Gary Benson <gbenson@redhat.com>
306
307 * hostio.c (handle_open): Process mode argument with
308 fileio_to_host_mode.
309
310 2015-06-01 Yao Qi <yao.qi@linaro.org>
311
312 * linux-s390-low.c (PTRACE_GETREGSET, PTRACE_SETREGSET): Remove.
313 * linux-x86-low.c: Likewise.
314
315 2015-05-28 Don Breazeal <donb@codesourcery.com>
316
317 * linux-low.c (handle_extended_wait): Initialize
318 thread_info.last_resume_kind for new fork children.
319
320 2015-05-15 Pedro Alves <palves@redhat.com>
321
322 * target.h (target_handle_new_gdb_connection): Rewrite using if
323 wrapped in do/while.
324
325 2015-05-14 Joel Brobecker <brobecker@adacore.com>
326
327 * configure.ac: Add prfpregset_t BFD_HAVE_SYS_PROCFS_TYPE check.
328 * configure, config.in: Regenerate.
329 * gdb_proc_service.h [HAVE_PRFPREGSET_T] (prfpregset_t):
330 Declare typedef.
331
332 2015-05-12 Don Breazeal <donb@codesourcery.com>
333
334 * linux-low.c (handle_extended_wait): Handle PTRACE_EVENT_FORK and
335 PTRACE_EVENT_VFORK_DONE.
336 (linux_low_ptrace_options, extended_event_reported): Add vfork
337 events.
338 * remote-utils.c (prepare_resume_reply): New stop reasons "vfork"
339 and "vforkdone" for RSP 'T' Stop Reply Packet.
340 * server.h (report_vfork_events): Declare
341 global variable.
342
343 2015-05-12 Don Breazeal <donb@codesourcery.com>
344
345 * linux-aarch64-low.c (aarch64_linux_new_fork): New function.
346 (the_low_target) <new_fork>: Initialize new member.
347 * linux-arm-low.c (arm_new_fork): New function.
348 (the_low_target) <new_fork>: Initialize new member.
349 * linux-low.c (handle_extended_wait): Call new target function
350 new_fork.
351 * linux-low.h (struct linux_target_ops) <new_fork>: New member.
352 * linux-mips-low.c (mips_add_watchpoint): New function
353 extracted from mips_insert_point.
354 (the_low_target) <new_fork>: Initialize new member.
355 (mips_linux_new_fork): New function.
356 (mips_insert_point): Call mips_add_watchpoint.
357 * linux-x86-low.c (x86_linux_new_fork): New function.
358 (the_low_target) <new_fork>: Initialize new member.
359
360 2015-05-12 Don Breazeal <donb@codesourcery.com>
361
362 * linux-low.c (handle_extended_wait): Implement return value,
363 rename argument 'event_child' to 'event_lwp', handle
364 PTRACE_EVENT_FORK, call internal_error for unrecognized event.
365 (linux_low_ptrace_options): New function.
366 (linux_low_filter_event): Call linux_low_ptrace_options,
367 use different argument fo linux_enable_event_reporting,
368 use return value from handle_extended_wait.
369 (extended_event_reported): New function.
370 (linux_wait_1): Call extended_event_reported and set
371 status to report fork events.
372 (linux_write_memory): Add pid to debug message.
373 (reset_lwp_ptrace_options_callback): New function.
374 (linux_handle_new_gdb_connection): New function.
375 (linux_target_ops): Initialize new structure member.
376 * linux-low.h (struct lwp_info) <waitstatus>: New member.
377 * lynx-low.c: Initialize new structure member.
378 * remote-utils.c (prepare_resume_reply): Implement stop reason
379 "fork" for "T" stop message.
380 * server.c (handle_query): Call handle_new_gdb_connection.
381 * server.h (report_fork_events): Declare global flag.
382 * target.h (struct target_ops) <handle_new_gdb_connection>:
383 New member.
384 (target_handle_new_gdb_connection): New macro.
385 * win32-low.c: Initialize new structure member.
386
387 2015-05-12 Don Breazeal <donb@codesourcery.com>
388
389 * mem-break.c (APPEND_TO_LIST): Define macro.
390 (clone_agent_expr): New function.
391 (clone_one_breakpoint): New function.
392 (clone_all_breakpoints): New function.
393 * mem-break.h: Declare new functions.
394
395 2015-05-12 Don Breazeal <donb@codesourcery.com>
396
397 * linux-low.c (linux_supports_fork_events): New function.
398 (linux_supports_vfork_events): New function.
399 (linux_target_ops): Initialize new structure members.
400 (initialize_low): Call linux_check_ptrace_features.
401 * lynx-low.c (lynx_target_ops): Initialize new structure
402 members.
403 * server.c (report_fork_events, report_vfork_events):
404 New global flags.
405 (handle_query): Add new features to qSupported packet and
406 response.
407 (captured_main): Initialize new global variables.
408 * target.h (struct target_ops) <supports_fork_events>:
409 New member.
410 <supports_vfork_events>: New member.
411 (target_supports_fork_events): New macro.
412 (target_supports_vfork_events): New macro.
413 * win32-low.c (win32_target_ops): Initialize new structure
414 members.
415
416 2015-05-12 Gary Benson <gbenson@redhat.com>
417
418 * server.c (handle_qxfer_exec_file): Use current process
419 if annex is empty.
420
421 2015-05-08 Sandra Loosemore <sandra@codesourcery.com>
422
423 * linux-nios2-low.c: Include elf/common.h. Adjust comments.
424 Remove HAVE_PTRACE_GETREGS conditionals.
425 (nios2_regsets): Use PTRACE_GETREGSET and PTRACE_SETREGSET
426 instead of PTRACE_GETREGS and PTRACE_SETREGS.
427
428 2015-05-08 Yao Qi <yao.qi@linaro.org>
429
430 * linux-low.c (linux_supports_conditional_breakpoints): New
431 function.
432 (linux_target_ops): Install new target method.
433 * lynx-low.c (lynx_target_ops): Install NULL hook for
434 supports_conditional_breakpoints.
435 * nto-low.c (nto_target_ops): Likewise.
436 * spu-low.c (spu_target_ops): Likewise.
437 * win32-low.c (win32_target_ops): Likewise.
438 * server.c (handle_query): Check
439 target_supports_conditional_breakpoints.
440 * target.h (struct target_ops) <supports_conditional_breakpoints>:
441 New field.
442 (target_supports_conditional_breakpoints): New macro.
443
444 2015-05-06 Pedro Alves <palves@redhat.com>
445
446 PR server/18081
447 * server.c (start_inferior): If the process exits, mourn it.
448
449 2015-04-21 Gary Benson <gbenson@redhat.com>
450
451 * hostio.c (fileio_open_flags_to_host): Factored out to
452 fileio_to_host_openflags in common/fileio.c. Single use
453 updated.
454
455 2015-04-17 Max Filippov <jcmvbkbc@gmail.com>
456
457 * linux-xtensa-low.c (xtensa_fill_gregset)
458 (xtensa_store_gregset): Check XCHAL_HAVE_LOOPS instead of
459 XCHAL_HAVE_LOOP.
460
461 2015-04-17 Max Filippov <jcmvbkbc@gmail.com>
462
463 * linux-xtensa-low.c (xtensa_usrregs_info): Remove.
464 (regs_info): Replace usrregs pointer with NULL.
465
466 2015-04-17 Gary Benson <gbenson@redhat.com>
467
468 * target.h (struct target_ops) <pid_to_exec_file>: New field.
469 * linux-low.c (linux_target_ops): Initialize pid_to_exec_file.
470 * server.c (handle_qxfer_exec_file): New function.
471 (qxfer_packets): Add exec-file entry.
472 (handle_query): Report qXfer:exec-file:read as supported packet.
473
474 2015-04-14 Romain Naour <romain.naour@openwide.fr> (tiny change)
475
476 * linux-low.c (linux_read_offsets): Remove get_thread_lwp.
477
478 2015-04-09 Gary Benson <gbenson@redhat.com>
479
480 * hostio-errno.c (errno_to_fileio_error): Remove function.
481 Update caller to use remote_fileio_to_fio_error.
482
483 2015-04-09 Yao Qi <yao.qi@linaro.org>
484
485 * linux-low.c (linux_insert_point): Call
486 insert_memory_breakpoint if TYPE is raw_bkpt_type_sw.
487 (linux_remove_point): Call remove_memory_breakpoint if type is
488 raw_bkpt_type_sw.
489 * linux-x86-low.c (x86_insert_point): Don't call
490 insert_memory_breakpoint.
491 (x86_remove_point): Don't call remove_memory_breakpoint.
492
493 2015-04-01 Pedro Alves <palves@redhat.com>
494 Cleber Rosa <crosa@redhat.com>
495
496 * server.c (gdbserver_usage): Reorganize and extend the usage
497 message.
498
499 2015-03-24 Pedro Alves <palves@redhat.com>
500
501 * linux-low.c (check_stopped_by_breakpoint): Tweak debug log
502 output. Also dump TRAP_TRACE.
503 (linux_low_filter_event): In debug output, distinguish a
504 resume_stop SIGSTOP from a delayed SIGSTOP.
505
506 2015-03-24 Gary Benson <gbenson@redhat.com>
507
508 * linux-x86-low.c (x86_linux_new_thread): Moved to
509 nat/x86-linux.c.
510 (x86_linux_prepare_to_resume): Likewise.
511
512 2015-03-24 Gary Benson <gbenson@redhat.com>
513
514 * Makefile.in (x86-linux-dregs.o): New rule.
515 * configure.srv: Add x86-linux-dregs.o to relevant targets.
516 * linux-x86-low.c: Include nat/x86-linux-dregs.h.
517 (u_debugreg_offset): Moved to nat/x86-linux-dregs.c.
518 (x86_linux_dr_get): Likewise.
519 (x86_linux_dr_set): Likewise.
520 (update_debug_registers_callback): Likewise.
521 (x86_linux_dr_set_addr): Likewise.
522 (x86_linux_dr_get_addr): Likewise.
523 (x86_linux_dr_set_control): Likewise.
524 (x86_linux_dr_get_control): Likewise.
525 (x86_linux_dr_get_status): Likewise.
526 (x86_linux_update_debug_registers): Likewise.
527
528 2015-03-24 Gary Benson <gbenson@redhat.com>
529
530 * linux-x86-low.c (x86_linux_update_debug_registers):
531 New function, factored out from...
532 (x86_linux_prepare_to_resume): ...this.
533
534 2015-03-24 Gary Benson <gbenson@redhat.com>
535
536 * linux-x86-low.c (x86_linux_dr_get): Update comments.
537 (x86_linux_dr_set): Likewise.
538 (update_debug_registers_callback): Likewise.
539 (x86_linux_dr_set_addr): Likewise.
540 (x86_linux_dr_get_addr): Likewise.
541 (x86_linux_dr_set_control): Likewise.
542 (x86_linux_dr_get_control): Likewise.
543 (x86_linux_dr_get_status): Likewise.
544 (x86_linux_prepare_to_resume): Likewise.
545
546 2015-03-24 Gary Benson <gbenson@redhat.com>
547
548 * linux-x86-low.c (x86_linux_dr_get): Add assertion.
549 Use perror_with_name. Pass string through gettext.
550 (x86_linux_dr_set): Likewise.
551
552 2015-03-24 Gary Benson <gbenson@redhat.com>
553
554 * linux-x86-low.c (x86_dr_low_set_addr): Rename to...
555 (x86_linux_dr_set_addr): ...this.
556 (x86_dr_low_get_addr): Rename to...
557 (x86_linux_dr_get_addr): ...this.
558 (x86_dr_low_set_control): Rename to...
559 (x86_linux_dr_set_control): ...this.
560 (x86_dr_low_get_control): Rename to...
561 (x86_linux_dr_get_control): ...this.
562 (x86_dr_low_get_status): Rename to...
563 (x86_linux_dr_get_status): ...this.
564 (x86_dr_low): Update with new function names.
565
566 2015-03-24 Gary Benson <gbenson@redhat.com>
567
568 * Makefile.in (x86-linux.o): New rule.
569 * configure.srv: Add x86-linux.o to relevant targets.
570 * linux-low.c (lwp_set_arch_private_info): New function.
571 (lwp_arch_private_info): Likewise.
572 * linux-x86-low.c: Include nat/x86-linux.h.
573 (arch_lwp_info): Removed structure.
574 (update_debug_registers_callback):
575 Use lwp_set_debug_registers_changed.
576 (x86_linux_prepare_to_resume): Use lwp_debug_registers_changed
577 and lwp_set_debug_registers_changed.
578 (x86_linux_new_thread): Use lwp_set_debug_registers_changed.
579
580 2015-03-24 Gary Benson <gbenson@redhat.com>
581
582 * linux-low.h (linux_target_ops) <new_thread>: Changed signature.
583 * linux-arm-low.c (arm_new_thread): Likewise.
584 * linux-aarch64-low.c (aarch64_linux_new_thread): Likewise.
585 * linux-mips-low.c (mips_linux_new_thread): Likewise.
586 * linux-x86-low.c (x86_linux_new_thread): Likewise.
587 * linux-low.c (add_lwp): Update the_low_target.new_thread call.
588
589 2015-03-24 Gary Benson <gbenson@redhat.com>
590
591 * linux-low.c (ptid_of_lwp): New function.
592 (lwp_is_stopped): Likewise.
593 (lwp_stop_reason): Likewise.
594 * linux-x86-low.c (update_debug_registers_callback):
595 Use lwp_is_stopped.
596 (x86_linux_prepare_to_resume): Use ptid_of_lwp and
597 lwp_stop_reason.
598
599 2015-03-24 Gary Benson <gbenson@redhat.com>
600
601 * linux-low.h (linux_stop_lwp): Remove declaration.
602
603 2015-03-24 Gary Benson <gbenson@redhat.com>
604
605 * linux-low.h: Include nat/linux-nat.h.
606 * linux-low.c (iterate_over_lwps_args): New structure.
607 (iterate_over_lwps_filter): New function.
608 (iterate_over_lwps): Likewise.
609 * linux-x86-low.c (update_debug_registers_callback):
610 Update signature to what iterate_over_lwps expects.
611 Remove PID check that iterate_over_lwps now performs.
612 (x86_dr_low_set_addr): Use iterate_over_lwps.
613 (x86_dr_low_set_control): Likewise.
614
615 2015-03-24 Gary Benson <gbenson@redhat.com>
616
617 * linux-x86-low.c (x86_debug_reg_state): New function.
618 (x86_linux_prepare_to_resume): Use the above.
619
620 2015-03-24 Gary Benson <gbenson@redhat.com>
621
622 * linux-low.c (current_lwp_ptid): New function.
623 * linux-x86-low.c: Include nat/linux-nat.h.
624 (x86_dr_low_get_addr): Use current_lwp_ptid.
625 (x86_dr_low_get_control): Likewise.
626 (x86_dr_low_get_status): Likewise.
627
628 2015-03-20 Pedro Alves <palves@redhat.com>
629
630 * tracepoint.c (cmd_qtstatus): Make "str" const.
631
632 2015-03-20 Pedro Alves <palves@redhat.com>
633
634 * server.c (handle_general_set): Make "req_str" const.
635
636 2015-03-19 Pedro Alves <palves@redhat.com>
637
638 * linux-low.c (linux_resume_one_lwp): Rename to ...
639 (linux_resume_one_lwp_throw): ... this. Don't handle ESRCH here,
640 instead call perror_with_name.
641 (check_ptrace_stopped_lwp_gone): New function.
642 (linux_resume_one_lwp): Reimplement as wrapper around
643 linux_resume_one_lwp_throw that swallows errors if the LWP is
644 gone.
645
646 2015-03-19 Pedro Alves <palves@redhat.com>
647
648 * linux-low.c (count_events_callback, select_event_lwp_callback):
649 No longer check whether the thread has resume_stop as last resume
650 kind.
651
652 2015-03-19 Pedro Alves <palves@redhat.com>
653
654 * linux-low.c (count_events_callback, select_event_lwp_callback):
655 Use the lwp's status_pending_p field, not the thread's.
656
657 2015-03-19 Pedro Alves <palves@redhat.com>
658
659 * linux-low.c (select_event_lwp_callback): Update comments to
660 no longer mention SIGTRAP.
661
662 2015-03-18 Gary Benson <gbenson@redhat.com>
663
664 * server.c (handle_query): Do not report vFile:fstat as supported.
665
666 2015-03-11 Gary Benson <gbenson@redhat.com>
667
668 * hostio.c (sys/types.h): New include.
669 (sys/stat.h): Likewise.
670 (common-remote-fileio.h): Likewise.
671 (handle_fstat): New function.
672 (handle_vFile): Handle vFile:fstat packets.
673
674 2015-03-11 Gary Benson <gbenson@redhat.com>
675
676 * configure.ac (AC_CHECK_MEMBERS): Add checks for
677 struct stat.st_blocks and struct stat.st_blksize.
678 * configure: Regenerate.
679 * config.in: Likewise.
680 * Makefile.in (SFILES): Add common/common-remote-fileio.c.
681 (OBS): Add common-remote-fileio.o.
682 (common-remote-fileio.o): New rule.
683
684 2015-03-09 Pedro Alves <palves@redhat.com>
685
686 * tracepoint.c (gdb_agent_helper_thread): Cast '&sockaddr' to
687 'struct sockaddr' pointer in 'accept' call.
688
689 2015-03-09 Pedro Alves <palves@redhat.com>
690
691 Revert:
692 2015-03-07 Pedro Alves <palves@redhat.com>
693 * gdbreplay.c: No longer include <netinet/in.h>, <sys/socket.h>,
694 or <winsock2.h> here. Instead include "gdb_socket.h".
695 (remote_open): Use union gdb_sockaddr_u.
696 * remote-utils.c: No longer include <netinet/in.h>, <sys/socket.h>
697 or <winsock2.h> here. Instead include "gdb_socket.h".
698 (handle_accept_event, remote_prepare): Use union gdb_sockaddr_u.
699 * tracepoint.c: Include "gdb_socket.h" instead of <sys/socket.h>
700 or <sys/un.h>.
701 (init_named_socket, gdb_agent_helper_thread): Use union
702 gdb_sockaddr_u.
703
704 2015-03-07 Pedro Alves <palves@redhat.com>
705
706 * configure.ac (build_warnings): Move
707 -Wdeclaration-after-statement to the C-specific set.
708 * configure: Regenerate.
709
710 2015-03-07 Pedro Alves <palves@redhat.com>
711
712 * gdbreplay.c: No longer include <netinet/in.h>, <sys/socket.h>,
713 or <winsock2.h> here. Instead include "gdb_socket.h".
714 (remote_open): Use union gdb_sockaddr_u.
715 * remote-utils.c: No longer include <netinet/in.h>, <sys/socket.h>
716 or <winsock2.h> here. Instead include "gdb_socket.h".
717 (handle_accept_event, remote_prepare): Use union gdb_sockaddr_u.
718 * tracepoint.c: Include "gdb_socket.h" instead of <sys/socket.h>
719 or <sys/un.h>.
720 (init_named_socket, gdb_agent_helper_thread): Use union
721 gdb_sockaddr_u.
722
723 2015-03-07 Pedro Alves <palves@redhat.com>
724
725 Adjust all callers of TRY_CATCH to use TRY/CATCH/END_CATCH
726 instead.
727
728 2015-03-06 Yao Qi <yao.qi@linaro.org>
729
730 * linux-aarch64-low.c (aarch64_insert_point): Use
731 show_debug_regs as a boolean.
732 (aarch64_remove_point): Likewise.
733
734 2015-03-05 Pedro Alves <palves@redhat.com>
735
736 * lynx-low.c (lynx_target_ops): Install NULL hooks for
737 stopped_by_sw_breakpoint, supports_stopped_by_sw_breakpoint,
738 stopped_by_hw_breakpoint, supports_stopped_by_hw_breakpoint.
739 * nto-low.c (nto_target_ops): Likewise.
740 * spu-low.c (spu_target_ops): Likewise.
741 * win32-low.c (win32_target_ops): Likewise.
742
743 2015-03-04 Pedro Alves <palves@redhat.com>
744
745 * linux-low.c (check_stopped_by_breakpoint) [USE_SIGTRAP_SIGINFO]:
746 Decide whether a breakpoint triggered based on the SIGTRAP's
747 siginfo.si_code.
748 (thread_still_has_status_pending_p) [USE_SIGTRAP_SIGINFO]: Don't check whether a
749 breakpoint is inserted if relying on SIGTRAP's siginfo.si_code.
750 (linux_low_filter_event): Check for breakpoints before checking
751 watchpoints.
752 (linux_wait_1): Don't re-increment the PC if relying on SIGTRAP's
753 siginfo.si_code.
754 (linux_stopped_by_sw_breakpoint)
755 (linux_supports_stopped_by_sw_breakpoint)
756 (linux_stopped_by_hw_breakpoint)
757 (linux_supports_stopped_by_hw_breakpoint): New functions.
758 (linux_target_ops): Install new target methods.
759
760 2015-03-04 Pedro Alves <palves@redhat.com>
761
762 * remote-utils.c (prepare_resume_reply): Report swbreak/hbreak.
763 * server.c (swbreak_feature, hwbreak_feature): New globals.
764 (handle_query) <qSupported>: Handle "swbreak+" and "hwbreak+".
765 (captured_main): Clear swbreak_feature and hwbreak_feature.
766 * server.h (swbreak_feature, hwbreak_feature): Declare.
767 * target.h (struct target_ops) <stopped_by_sw_breakpoint,
768 supports_stopped_by_sw_breakpoint, stopped_by_hw_breakpoint,
769 supports_stopped_by_hw_breakpoint>: New fields.
770 (target_supports_stopped_by_sw_breakpoint)
771 (target_stopped_by_sw_breakpoint)
772 (target_supports_stopped_by_hw_breakpoint)
773 (target_stopped_by_hw_breakpoint): Declare.
774
775 2015-03-04 Pedro Alves <palves@redhat.com>
776
777 enum lwp_stop_reason -> enum target_stop_reason
778 * linux-low.c (check_stopped_by_breakpoint): Adjust.
779 (thread_still_has_status_pending_p, check_stopped_by_watchpoint)
780 (linux_wait_1, stuck_in_jump_pad_callback)
781 (move_out_of_jump_pad_callback, linux_resume_one_lwp)
782 (linux_stopped_by_watchpoint):
783 * linux-low.h (enum lwp_stop_reason): Delete.
784 (struct lwp_info) <stop_reason>: Now an enum target_stop_reason.
785 * linux-x86-low.c (x86_linux_prepare_to_resume): Adjust.
786
787 2015-03-04 Yao Qi <yao.qi@linaro.org>
788
789 * Makefile.in (SFILES): Add linux-aarch64-low.c.
790
791 2015-03-03 Gary Benson <gbenson@redhat.com>
792
793 * hostio.c (handle_vFile): Fix prefix lengths.
794
795 2015-03-03 Markus Metzger <markus.t.metzger@intel.com>
796
797 * linux-low.c (linux_low_enable_btrace): Do not overwrite non-zero
798 ptr_bits.
799
800 2015-03-02 Andreas Arnez <arnez@linux.vnet.ibm.com>
801
802 * Makefile.in (s390-vx-linux64.c, s390-tevx-linux64.c)
803 (s390x-vx-linux64.c, s390x-tevx-linux64.c): New rules.
804 (clean): Add "rm -f" for above C files.
805 * configure.srv (srv_regobj): Add s390-vx-linux64.o,
806 s390-tevx-linux64.o, s390x-vx-linux64.o, and s390x-tevx-linux64.o.
807 (srv_xmlfiles): Add s390-vx-linux64.xml, s390-tevx-linux64.xml,
808 s390x-vx-linux64.xml, s390x-tevx-linux64.xml, and s390-vx.xml.
809 * linux-s390-low.c (HWCAP_S390_VX): New macro.
810 (init_registers_s390_vx_linux64, init_registers_s390_tevx_linux64)
811 (init_registers_s390x_vx_linux64)
812 (init_registers_s390x_tevx_linux64)
813 (tdesc_s390_vx_linux64, tdesc_s390_tevx_linux64)
814 (tdesc_s390x_vx_linux64, tdesc_s390x_tevx_linux64): New extern
815 declarations.
816 (s390_fill_vxrs_low, s390_store_vxrs_low, s390_fill_vxrs_high)
817 (s390_store_vxrs_high): New functions.
818 (s390_regsets): Add entries for NT_S390_VXRS_LOW and
819 NT_S390_VXRS_HIGH.
820 (s390_arch_setup): Add logic for selecting one of the new target
821 descriptions. Activate the new vector regsets if applicable.
822 (initialize_low_arch): Also invoke init_registers_s390_vx_linux64,
823 init_registers_s390_tevx_linux64, init_registers_s390x_vx_linux64,
824 and init_registers_s390x_tevx_linux64.
825
826 2015-03-01 Pedro Alves <palves@redhat.com>
827
828 * linux-i386-ipa.c (gdb_agent_get_raw_reg): Constify 'raw_regs'
829 parameter.
830
831 2015-02-27 Pedro Alves <palves@redhat.com>
832
833 * linux-x86-low.c (u_debugreg_offset): New function.
834 (x86_linux_dr_get, x86_linux_dr_set): Use it.
835
836 2015-02-27 Pedro Alves <palves@redhat.com>
837
838 * gdb_proc_service.h: Wrap with EXTERN_C_PUSH/EXTERN_C_POP.
839 [!HAVE_PROC_SERVICE_H] (struct ps_prochandle): Forward declare.
840 [!HAVE_PROC_SERVICE_H] (ps_pdread, ps_pdwrite, ps_ptread)
841 ps_ptwrite, ps_lgetregs, ps_lsetregs, ps_lgetfpregs)
842 (ps_lsetfpregs, ps_getpid)
843 (ps_get_thread_area, ps_pglobal_lookup, ps_pstop, ps_pcontinue)
844 (ps_lstop, ps_lcontinue, ps_lgetxregsize, ps_lgetxregs)
845 (ps_lsetxregs, ps_plog): Declare.
846
847 2015-02-27 Pedro Alves <palves@redhat.com>
848
849 * linux-amd64-ipa.c (gdb_agent_get_raw_reg): Use
850 IP_AGENT_EXPORT_FUNC.
851 * linux-i386-ipa.c (gdb_agent_get_raw_reg): Use
852 IP_AGENT_EXPORT_FUNC.
853 * tracepoint.c (ATTR_USED, ATTR_NOINLINE, ATTR_CONSTRUCTOR)
854 (IP_AGENT_EXPORT): Delete.
855 (gdb_tp_heap_buffer, gdb_jump_pad_buffer, gdb_jump_pad_buffer_end)
856 (gdb_trampoline_buffer, gdb_trampoline_buffer_end)
857 (gdb_trampoline_buffer_error, collecting, gdb_collect)
858 (stop_tracing, flush_trace_buffer, about_to_request_buffer_space)
859 (trace_buffer_is_full, stopping_tracepoint, expr_eval_result)
860 (error_tracepoint, tracepoints, tracing, trace_buffer_ctrl)
861 (trace_buffer_ctrl_curr, trace_buffer_lo, trace_buffer_hi)
862 (traceframe_read_count, traceframe_write_count)
863 (traceframes_created, trace_state_variables, get_raw_reg)
864 (get_trace_state_variable_value, set_trace_state_variable_value)
865 (ust_loaded, helper_thread_id, cmd_buf): Use
866 IPA_SYM_EXPORTED_NAME.
867 (stop_tracing, flush_trace_buffer): Use IP_AGENT_EXPORT_FUNC.
868 (tracepoints) Use IP_AGENT_EXPORT_VAR.
869 (stopping_tracepoint, trace_buffer_is_full, expr_eval_result): Use
870 IP_AGENT_EXPORT_VAR and wrap in EXTERN_C_PUSH/EXTERN_C_POP.
871 (last_tracepoint): Move into !IN_PROCESS_AGENT block.
872 (error_tracepoint): Use IP_AGENT_EXPORT_VAR and wrap in
873 EXTERN_C_PUSH/EXTERN_C_POP.
874 (trace_state_variables): Use IP_AGENT_EXPORT_VAR.
875 (trace_buffer_lo, trace_buffer_hi): Use IP_AGENT_EXPORT_VAR and
876 wrap in EXTERN_C_PUSH/EXTERN_C_POP.
877 (trace_buffer_ctrl, trace_buffer_ctrl_curr)
878 (traceframe_write_count, traceframe_read_count)
879 (traceframes_created, tracing): Use IP_AGENT_EXPORT_VAR.
880 (about_to_request_buffer_space, get_trace_state_variable_value)
881 (set_trace_state_variable_value): Use IP_AGENT_EXPORT_FUNC.
882 (collecting): Use IP_AGENT_EXPORT_VAR and wrap in
883 EXTERN_C_PUSH/EXTERN_C_POP.
884 (gdb_collect): Use IP_AGENT_EXPORT_FUNC.
885 (ust_loaded, cmd_buf): Use IP_AGENT_EXPORT_VAR.
886 (helper_thread_id, gdb_agent_capability): Use IP_AGENT_EXPORT_VAR
887 and wrap in EXTERN_C_PUSH/EXTERN_C_POP.
888 (gdb_tp_heap_buffer, gdb_jump_pad_buffer, gdb_jump_pad_buffer_end)
889 (gdb_trampoline_buffer, gdb_trampoline_buffer_end)
890 (gdb_trampoline_buffer_error): Use IP_AGENT_EXPORT_VAR.
891 * tracepoint.h (ATTR_USED, ATTR_NOINLINE, EXPORTED_SYMBOL):
892 Define.
893 (IP_AGENT_EXPORT_FUNC, IP_AGENT_EXPORT_VAR)
894 (IP_AGENT_EXPORT_VAR_DECL): Define.
895 (tracing): Declare.
896 (gdb_agent_get_raw_reg): Declare.
897
898 2015-02-27 Tom Tromey <tromey@redhat.com>
899 Pedro Alves <palves@redhat.com>
900
901 Rename symbols whose names are reserved C++ keywords throughout.
902
903 2015-02-27 Pedro Alves <palves@redhat.com>
904
905 * Makefile.in (COMPILER): New, get it from autoconf.
906 (CXX): Get from autoconf instead.
907 (COMPILE.pre): Use COMPILER.
908 (CC-LD): Rename to ...
909 (CC_LD): ... this. Use COMPILER.
910 (gdbserver$(EXEEXT), gdbreplay$(EXEEXT), $(IPA_LIB)): Adjust.
911 (CXX_FOR_TARGET): Default to g++ instead of gcc.
912 * acinclude.m4: Include build-with-cxx.m4.
913 * configure.ac: Call AC_PROG_CXX and GDB_AC_BUILD_WITH_CXX.
914 Disable -Werror by default if building in C++ mode.
915 (build_warnings): Add -Wno-sign-compare, -Wno-write-strings and
916 -Wno-narrowing in C++ mode. Run supported-warning-flags tests with
917 the C++ compiler. Save/restore CXXFLAGS too.
918 * configure: Regenerate.
919
920 2015-02-27 Pedro Alves <palves@redhat.com>
921
922 * acinclude.m4: Include libiberty.m4.
923 * configure.ac: Call libiberty_INIT.
924 * config.in, configure: Regenerate.
925
926 2015-02-26 Pedro Alves <palves@redhat.com>
927
928 * linux-low.c (linux_wait_1): When incrementing the PC past a
929 program breakpoint always use the_low_target.breakpoint_len as
930 increment, rather than the maximum between that and
931 the_low_target.decr_pc_after_break.
932
933 2015-02-23 Pedro Alves <palves@redhat.com>
934
935 * linux-low.c (check_stopped_by_breakpoint): Don't check if the
936 thread was doing a step-over; always adjust the PC if
937 we stepped over a permanent breakpoint.
938 (linux_wait_1): If we stepped over breakpoint that was on top of a
939 permanent breakpoint, manually advance the PC past it.
940
941 2015-02-23 Pedro Alves <palves@redhat.com>
942
943 * linux-x86-low.c (REGSIZE): Define in both 32-bit and 64-bit
944 modes.
945 (x86_fill_gregset, x86_store_gregset): Use it when handling
946 $orig_eax.
947
948 2015-02-20 Pedro Alves <palves@redhat.com>
949
950 * thread-db.c: Include "nat/linux-procfs.h".
951 (thread_db_init): Skip listing new threads if the kernel supports
952 PTRACE_EVENT_CLONE and /proc/PID/task/ is accessible.
953
954 2015-02-20 Pedro Alves <palves@redhat.com>
955
956 * linux-low.c (status_pending_p_callback): Use ptid_match.
957
958 2015-02-19 Antoine Tremblay <antoine.tremblay@ericsson.com>
959
960 PR breakpoints/16812
961 * linux-low.c (wstatus_maybe_breakpoint): Remove.
962 (linux_low_filter_event): Update wstatus_maybe_breakpoint name.
963 (linux_wait_1): Report SIGTRAP,SIGILL,SIGSEGV.
964
965 2015-02-10 Antoine Tremblay <antoine.tremblay@ericsson.com>
966
967 PR breakpoints/15956
968 * tracepoint.c (cmd_qtinit): Add check for current_thread.
969
970 2015-02-09 Markus Metzger <markus.t.metzger@intel.com>
971
972 * linux-low.c (linux_low_btrace_conf): Print size.
973 * server.c (handle_btrace_conf_general_set): New.
974 (hanle_general_set): Call handle_btrace_conf_general_set.
975 (handle_query): Report Qbtrace-conf:bts:size as supported.
976
977 2015-02-09 Markus Metzger <markus.t.metzger@intel.com>
978
979 * linux-low.c (linux_low_enable_btrace): Update parameters.
980 (linux_low_btrace_conf): New.
981 (linux_target_ops)<to_btrace_conf>: Initialize.
982 * server.c (current_btrace_conf): New.
983 (handle_btrace_enable): Rename to ...
984 (handle_btrace_enable_bts): ... this. Pass &current_btrace_conf
985 to target_enable_btrace. Update comment. Update users.
986 (handle_qxfer_btrace_conf): New.
987 (qxfer_packets): Add btrace-conf entry.
988 (handle_query): Report qXfer:btrace-conf:read as supported packet.
989 * target.h (target_ops)<enable_btrace>: Update parameters and comment.
990 (target_ops)<read_btrace_conf>: New.
991 (target_enable_btrace): Update parameters.
992 (target_read_btrace_conf): New.
993
994 2015-02-09 Markus Metzger <markus.t.metzger@intel.com>
995
996 * server.c (handle_btrace_general_set): Remove call to
997 target_supports_btrace.
998 (supported_btrace_packets): New.
999 (handle_query): Call supported_btrace_packets.
1000 * target.h: include btrace-common.h.
1001 (btrace_target_info): Removed.
1002 (supports_btrace, target_supports_btrace): Update parameters.
1003
1004 2015-02-09 Markus Metzger <markus.t.metzger@intel.com>
1005
1006 * Makefile.in (SFILES): Add common/btrace-common.c.
1007 (OBS): Add common/btrace-common.o.
1008 (btrace-common.o): Add build rules.
1009 * linux-low: Include btrace-common.h.
1010 (linux_low_read_btrace): Use struct btrace_data. Call
1011 btrace_data_init and btrace_data_fini.
1012
1013 2015-02-06 Pedro Alves <palves@redhat.com>
1014
1015 * thread-db.c (find_new_threads_callback): Add debug output.
1016
1017 2015-02-04 Pedro Alves <palves@redhat.com>
1018
1019 * linux-low.c (handle_extended_wait): Don't resume LWPs here.
1020 (resume_stopped_resumed_lwps): New function.
1021 (linux_wait_for_event_filtered): Use it.
1022
1023 2015-01-15 Sergio Durigan Junior <sergiodj@redhat.com>
1024
1025 * Makefile.in (SFILES): Add linux-personality.c.
1026 (linux-personality.o): New rule.
1027 * configure.srv (srv_linux_obj): Add linux-personality.o to the
1028 list of objects to be built.
1029 * linux-low.c: Include nat/linux-personality.h.
1030 (linux_create_inferior): Remove code to disable address space
1031 randomization (moved to ../nat/linux-personality.c). Create
1032 cleanup to disable address space randomization.
1033
1034 2015-01-15 Sergio Durigan Junior <sergiodj@redhat.com>
1035
1036 * Makefile.in (posix-strerror.o): New rule.
1037 (mingw-strerror.o): Likewise.
1038 * configure: Regenerated.
1039 * configure.ac: Source file ../common/common.host. Initialize new
1040 variable srv_host_obs. Add srv_host_obs to GDBSERVER_DEPFILES.
1041
1042 2015-01-14 Yao Qi <yao@codesourcery.com>
1043
1044 * Makefile.in (SFILES): Add nat/ppc-linux.c.
1045 (ppc-linux.o): New rule.
1046 * configure.srv (powerpc*-*-linux*): Add ppc-linux.o.
1047 * configure.ac: AC_CHECK_FUNCS(getauxval).
1048 * config.in: Re-generated.
1049 * configure: Re-generated.
1050 * linux-ppc-low.c (ppc_arch_setup) [__powerpc64__]: Call
1051 ppc64_64bit_inferior_p
1052
1053 2015-01-14 Yao Qi <yao@codesourcery.com>
1054
1055 * linux-ppc-low.c: Include "nat/ppc-linux.h".
1056 (PPC_FEATURE_HAS_VSX): Move to nat/ppc-linux.h.
1057 (PPC_FEATURE_HAS_ALTIVEC, PPC_FEATURE_HAS_SPE): Likewise.
1058 (PT_ORIG_R3, PT_TRAP): Likewise.
1059 (PTRACE_GETVSXREGS, PTRACE_SETVSXREGS): Likewise.
1060 (PTRACE_GETVRREGS, PTRACE_SETVRREGS): Likewise.
1061 (PTRACE_GETEVRREGS, PTRACE_SETEVRREGS): Likewise.
1062
1063 2015-01-10 Joel Brobecker <brobecker@adacore.com>
1064
1065 * i387-fp.c (i387_cache_to_xsave): In look over
1066 num_avx512_zmmh_high_registers, replace use of struct i387_xsave
1067 zmmh_low_space field by use of zmmh_high_space.
1068
1069 2015-01-09 Pedro Alves <palves@redhat.com>
1070
1071 * linux-low.c (step_over_bkpt): Move higher up in the file.
1072 (handle_extended_wait): Don't store the stop_pc here.
1073 (get_stop_pc): Adjust comments and rename to ...
1074 (check_stopped_by_breakpoint): ... this. Record whether the LWP
1075 stopped for a software breakpoint or hardware breakpoint.
1076 (thread_still_has_status_pending_p): New function.
1077 (status_pending_p_callback): Use
1078 thread_still_has_status_pending_p. If the event is no longer
1079 interesting, resume the LWP.
1080 (handle_tracepoints): Add assert.
1081 (maybe_move_out_of_jump_pad): Remove cancel_breakpoints call.
1082 (wstatus_maybe_breakpoint): New function.
1083 (cancel_breakpoint): Delete function.
1084 (check_stopped_by_watchpoint): New function, factored out from
1085 linux_low_filter_event.
1086 (lp_status_maybe_breakpoint): Delete function.
1087 (linux_low_filter_event): Remove filter_ptid argument.
1088 Leave thread group exits pending here. Store the LWP's stop PC.
1089 Always leave events pending.
1090 (linux_wait_for_event_filtered): Pull all events out of the
1091 kernel, and leave them all pending.
1092 (count_events_callback, select_event_lwp_callback): Consider all
1093 events.
1094 (cancel_breakpoints_callback, linux_cancel_breakpoints): Delete.
1095 (select_event_lwp): Only give preference to the stepping LWP in
1096 all-stop mode. Adjust comments.
1097 (ignore_event): New function.
1098 (linux_wait_1): Delete 'retry' label. Use ignore_event. Remove
1099 references to cancel_breakpoints. Adjust to renames. Also give
1100 equal priority to all LWPs that have had events in non-stop mode.
1101 If reporting a software breakpoint event, unadjust the LWP's PC.
1102 (linux_wait): If linux_wait_1 returned an ignored event, retry.
1103 (stuck_in_jump_pad_callback, move_out_of_jump_pad_callback):
1104 Adjust.
1105 (linux_resume_one_lwp): Store the LWP's PC. Adjust.
1106 (resume_status_pending_p): Use thread_still_has_status_pending_p.
1107 (linux_stopped_by_watchpoint): Adjust.
1108 (linux_target_ops): Remove reference to linux_cancel_breakpoints.
1109 * linux-low.h (enum lwp_stop_reason): New.
1110 (struct lwp_info) <stop_pc>: Adjust comment.
1111 <stopped_by_watchpoint>: Delete field.
1112 <stop_reason>: New field.
1113 * linux-x86-low.c (x86_linux_prepare_to_resume): Adjust.
1114 * mem-break.c (software_breakpoint_inserted_here)
1115 (hardware_breakpoint_inserted_here): New function.
1116 * mem-break.h (software_breakpoint_inserted_here)
1117 (hardware_breakpoint_inserted_here): Declare.
1118 * target.h (struct target_ops) <cancel_breakpoints>: Remove field.
1119 (cancel_breakpoints): Delete.
1120 * tracepoint.c (clear_installed_tracepoints, stop_tracing)
1121 (upload_fast_traceframes): Remove references to
1122 cancel_breakpoints.
1123
1124 2015-01-09 Pedro Alves <palves@redhat.com>
1125
1126 * thread-db.c (find_new_threads_callback): Ignore thread if the
1127 kernel thread ID is -1.
1128
1129 2015-01-09 Pedro Alves <palves@redhat.com>
1130
1131 * linux-low.c (linux_attach_fail_reason_string): Move to
1132 nat/linux-ptrace.c, and rename.
1133 (linux_attach_lwp): Update comment.
1134 (attach_proc_task_lwp_callback): New function.
1135 (linux_attach): Adjust to rename and use
1136 linux_proc_attach_tgid_threads.
1137 (linux_attach_fail_reason_string): Delete declaration.
1138
1139 2015-01-01 Joel Brobecker <brobecker@adacore.com>
1140
1141 * gdbreplay.c (gdbreplay_version): Update copyright year to 2015.
1142 * server.c (gdbserver_version): Likewise.
1143
1144 2014-12-29 Sergio Durigan Junior <sergiodj@redhat.com>
1145
1146 * remote-utils.c: Include ctype.h.
1147 (input_interrupt): Explicitly handle the case when the char
1148 received is the NUL byte. Improve the printing of non-ASCII
1149 characters.
1150
1151 2014-12-16 Joel Brobecker <brobecker@adacore.com>
1152
1153 * linux-low.c (linux_low_filter_event): Update call to
1154 linux_enable_event_reporting following the addition of
1155 a new parameter to that function.
1156
1157 2014-12-16 Catalin Udma <catalin.udma@freescale.com>
1158
1159 PR server/17457
1160 * linux-aarch64-low.c (AARCH64_FPSR_REGNO): New define.
1161 (AARCH64_FPCR_REGNO): Likewise.
1162 (AARCH64_NUM_REGS): Update to include fpsr/fpcr registers.
1163 (aarch64_fill_fpregset): Add missing fpsr/fpcr registers.
1164 (aarch64_store_fpregset): Likewise.
1165
1166 2014-12-15 Joel Brobecker <brobecker@adacore.com>
1167
1168 * lynx-low.c (lynx_resume): Use PTRACE_SINGLESTEP_ONE if N == 1.
1169 Remove FIXME comment about assumption about N.
1170
1171 2014-12-13 Joel Brobecker <brobecker@adacore.com>
1172
1173 * configure.ac: If large-file support is disabled in GDBserver,
1174 pass --disable-largefile to ACX_CONFIGURE_DIR call for "gnulib".
1175 * configure: Regenerate.
1176
1177 2014-12-12 Andreas Arnez <arnez@linux.vnet.ibm.com>
1178
1179 * linux-low.c (regsets_fetch_inferior_registers): Suppress the
1180 warning upon ENODATA from ptrace.
1181 * linux-s390-low.c (s390_store_tdb): New.
1182 (s390_regsets): Add regset for NT_S390_TDB.
1183
1184 2014-12-12 Andreas Arnez <arnez@linux.vnet.ibm.com>
1185
1186 * linux-low.c (regsets_store_inferior_registers): Skip regsets
1187 without a fill_function.
1188 * linux-s390-low.c (s390_fill_last_break): Remove.
1189 (s390_regsets): Set fill_function to NULL for NT_S390_LAST_BREAK.
1190 (s390_arch_setup): Use regset's size instead of fill_function for
1191 loop end condition.
1192
1193 2014-12-12 Andreas Arnez <arnez@linux.vnet.ibm.com>
1194
1195 * linux-low.c (regsets_fetch_inferior_registers): Do not invoke
1196 the regset's store function when ptrace returned an error.
1197 * regcache.c (get_thread_regcache): Invalidate register cache
1198 before fetching inferior's registers.
1199
1200 2014-12-12 Andreas Arnez <arnez@linux.vnet.ibm.com>
1201
1202 * linux-low.c (regsets_fetch_inferior_registers): Rephrase
1203 while-loop as for-loop.
1204 (regsets_store_inferior_registers): Likewise.
1205
1206 2014-11-28 Yao Qi <yao@codesourcery.com>
1207
1208 * configure.ac(AC_CHECK_FUNCS): Remove readlink.
1209 * config.in, configure: Re-generate.
1210 * hostio.c (handle_unlink): Remove code checking HAVE_READLINK
1211 is defined.
1212
1213 2014-11-21 Yao Qi <yao@codesourcery.com>
1214
1215 * configure.ac: Don't invoke AC_FUNC_ALLOCA.
1216 (AC_CHECK_HEADERS): Remove malloc.h.
1217 * configure: Re-generated.
1218 * config.in: Re-generated.
1219 * server.h: Don't include alloca.h and malloc.h.
1220 * gdbreplay.c: Don't check HAVE_ALLOCA_H is defined.
1221 Don't include malloc.h.
1222
1223 2014-11-17 Joel Brobecker <brobecker@adacore.com>
1224
1225 * lynx-low.c (lynx_write_memory): Put lynx_read_memory and
1226 corresponding ERRNO check in same block.
1227
1228 2014-11-12 Pedro Alves <palves@redhat.com>
1229
1230 * server.c (cont_thread): Update comment.
1231 (start_inferior, attach_inferior): No longer clear cont_thread.
1232 (handle_v_cont): No longer set cont_thread.
1233 (captured_main): Clear cont_thread each time a GDB connects.
1234
1235 2014-11-12 Pedro Alves <palves@redhat.com>
1236
1237 * linux-low.c (linux_wait_1): Don't force a wait for the Hc
1238 thread, and don't resume all threads if the Hc thread has exited.
1239
1240 2014-11-12 Pedro Alves <palves@redhat.com>
1241
1242 * linux-low.c (linux_request_interrupt): Always send a SIGINT to
1243 the process group instead of to a specific LWP.
1244
1245 2014-10-15 Pedro Alves <palves@redhat.com>
1246
1247 PR server/17487
1248 * win32-arm-low.c (arm_set_thread_context): Remove current_event
1249 parameter.
1250 (arm_set_thread_context): Delete.
1251 (the_low_target): Adjust.
1252 * win32-i386-low.c (debug_registers_changed)
1253 (debug_registers_used): Delete.
1254 (update_debug_registers_callback): New function.
1255 (x86_dr_low_set_addr, x86_dr_low_set_control): Mark all threads as
1256 needing to update their debug registers.
1257 (win32_get_current_dr): New function.
1258 (x86_dr_low_get_addr, x86_dr_low_get_control)
1259 (x86_dr_low_get_status): Fetch the debug register from the thread
1260 record's context.
1261 (i386_initial_stuff): Adjust.
1262 (i386_get_thread_context): Remove current_event parameter. Don't
1263 clear debug_registers_changed nor copy DR values to
1264 debug_reg_state.
1265 (i386_set_thread_context): Delete.
1266 (i386_prepare_to_resume): New function.
1267 (i386_thread_added): Mark the thread as needing to update irs
1268 debug registers.
1269 (the_low_target): Remove i386_set_thread_context and install
1270 i386_prepare_to_resume.
1271 * win32-low.c (win32_get_thread_context): Adjust.
1272 (win32_set_thread_context): Use SetThreadContext
1273 directly.
1274 (win32_prepare_to_resume): New function.
1275 (win32_require_context): New function, factored out from ...
1276 (thread_rec): ... this.
1277 (continue_one_thread): Call win32_prepare_to_resume on each thread
1278 we're about to continue.
1279 (win32_resume): Call win32_prepare_to_resume on the event thread.
1280 * win32-low.h (struct win32_thread_info)
1281 <debug_registers_changed>: New field.
1282 (struct win32_target_ops): Change prototype of set_thread_context,
1283 delete set_thread_context and add prepare_to_resume.
1284 (win32_require_context): New declaration.
1285
1286 2014-10-08 Gary Benson <gbenson@redhat.com>
1287
1288 * server.h: Do not include common-exceptions.h.
1289
1290 2014-10-08 Gary Benson <gbenson@redhat.com>
1291
1292 * server.h: Do not include cleanups.h.
1293
1294 2014-09-30 James Hogan <james.hogan@imgtec.com>
1295
1296 * Makefile.in (clean): Add rm -f commands for mips-dsp-linux.c and
1297 mips64-dsp-linux.c.
1298
1299 2014-09-23 Yao Qi <yao@codesourcery.com>
1300
1301 * linux-low.c (lp_status_maybe_breakpoint): New function.
1302 (linux_low_filter_event): Call lp_status_maybe_breakpoint.
1303 (count_events_callback): Likewise.
1304 (select_event_lwp_callback): Likewise.
1305 (cancel_breakpoints_callback): Likewise.
1306
1307 2014-09-19 Don Breazeal <donb@codesourcery.com>
1308
1309 * linux-low.c (handle_extended_wait): Call
1310 linux_ptrace_get_extended_event.
1311 (get_stop_pc, get_detach_signal, linux_low_filter_event): Call
1312 linux_is_extended_waitstatus.
1313
1314 2014-09-16 Joel Brobecker <brobecker@adacore.com>
1315
1316 * Makefile.in (CPPFLAGS): Define.
1317 (INTERNAL_CFLAGS_BASE): Add ${CPPFLAGS}.
1318 (IPAGENT_CFLAGS): Remove ${CPPFLAGS}.
1319
1320 2014-09-16 Gary Benson <gbenson@redhat.com>
1321
1322 * inferiors.h (current_inferior): Renamed as...
1323 (current_thread): New variable. All uses updated.
1324 * linux-low.c (get_pc): Renamed saved_inferior as saved_thread.
1325 (maybe_move_out_of_jump_pad): Likewise.
1326 (cancel_breakpoint): Likewise.
1327 (linux_low_filter_event): Likewise.
1328 (wait_for_sigstop): Likewise.
1329 (linux_resume_one_lwp): Likewise.
1330 (need_step_over_p): Likewise.
1331 (start_step_over): Likewise.
1332 (linux_stabilize_threads): Renamed save_inferior as saved_thread.
1333 * linux-x86-low.c (x86_linux_update_xmltarget): Likewise.
1334 * proc-service.c (ps_lgetregs): Renamed reg_inferior as reg_thread
1335 and save_inferior as saved_thread.
1336 * regcache.c (get_thread_regcache): Renamed saved_inferior as
1337 saved_thread.
1338 (regcache_invalidate_thread): Likewise.
1339 * remote-utils.c (prepare_resume_reply): Likewise.
1340 * thread-db.c (thread_db_get_tls_address): Likewise.
1341 (disable_thread_event_reporting): Likewise.
1342 (remove_thread_event_breakpoints): Likewise.
1343 * tracepoint.c (gdb_agent_about_to_close): Renamed save_inferior
1344 as saved_thread.
1345 * target.h (set_desired_inferior): Renamed as...
1346 (set_desired_thread): New declaration. All uses updated.
1347 * server.c (myresume): Updated comment to reference thread instead
1348 of inferior.
1349 (handle_serial_event): Likewise.
1350 (handle_target_event): Likewise.
1351
1352 2014-09-12 Tom Tromey <tromey@redhat.com>
1353 Gary Benson <gbenson@redhat.com>
1354
1355 * regcache.h: Include common-regcache.h.
1356 (regcache_read_pc): Don't declare.
1357 * regcache.c (get_thread_regcache_for_ptid): New function.
1358
1359 2014-09-11 Tom Tromey <tromey@redhat.com>
1360 Gary Benson <gbenson@redhat.com>
1361
1362 * symbol.c: New file.
1363 * Makefile.in (SFILES): Add symbol.c.
1364 (OBS): Add symbol.o.
1365
1366 2014-09-11 Gary Benson <gbenson@redhat.com>
1367
1368 * target.c (target_stop_ptid, target_continue_ptid): New
1369 functions.
1370
1371 2014-09-11 Tom Tromey <tromey@redhat.com>
1372 Gary Benson <gbenson@redhat.com>
1373
1374 * target.h: Include target/target.h.
1375 * target.c (target_read_memory, target_read_uint32)
1376 (target_write_memory): New functions.
1377
1378 2014-09-11 Gary Benson <gbenson@redhat.com>
1379
1380 * server.h (debug_hw_points): Don't declare.
1381 * server.c (debug_hw_points): Don't define. Replace all uses
1382 with show_debug_regs.
1383 * linux-aarch64-low.c (debug_hw_points): Don't define. Replace
1384 all uses with show_debug_regs.
1385
1386 2014-09-08 Edjunior Barbosa Machado <emachado@linux.vnet.ibm.com>
1387
1388 * linux-ppc-low.c (ppc_collect_ptrace_register): Adjust routine to take
1389 endianness into account.
1390 (ppc_supply_ptrace_register): Likewise.
1391
1392 2014-09-03 James Hogan <james.hogan@imgtec.com>
1393
1394 * linux-mips-low.c (mips_read_description): Reset errno to 0 prior
1395 to reading DSP_CONTROL with PTRACE_PEEKUSER ptrace call.
1396
1397 2014-09-03 Gary Benson <gbenson@redhat.com>
1398
1399 * linux-x86-low.c (x86_linux_prepare_to_resume): Use
1400 ALL_DEBUG_ADDRESS_REGISTERS.
1401
1402 2014-09-02 Gary Benson <gbenson@redhat.com>
1403
1404 * i386-low.h: Renamed as...
1405 * x86-low.h: New file. All type, function and variable name
1406 prefixes changed from "i386_" to "x86_". All references updated.
1407 * i386-low.c: Renamed as...
1408 * x86-low.c: New file. All type, function and variable name
1409 prefixes changed from "i386_" to "x86_". All references updated.
1410
1411 2014-09-02 Gary Benson <gbenson@redhat.com>
1412
1413 * linux-x86-low.c (x86_linux_new_process): Use XCNEW.
1414 (x86_linux_new_thread): Likewise.
1415
1416 2014-08-29 Gary Benson <gbenson@redhat.com>
1417
1418 * server.h (setjmp.h): Do not include.
1419 (toplevel): Do not declare.
1420 (common-exceptions.h): Include.
1421 (cleanups.h): Likewise.
1422 * server.c (toplevel): Do not define.
1423 (exit_code): New static global.
1424 (detach_or_kill_for_exit_cleanup): New function.
1425 (main): New function. Original main renamed to...
1426 (captured_main): New function.
1427 * utils.c (verror) [!IN_PROCESS_AGENT]: Use throw_verror.
1428
1429 2014-08-29 Gary Benson <gbenson@redhat.com>
1430
1431 * Makefile.in (SFILES): Add common/common-exceptions.c.
1432 (OBS): Add common-exceptions.o.
1433 (common-exceptions.o): New rule.
1434 * utils.c (prepare_to_throw_exception): New function.
1435
1436 2014-08-29 Gary Benson <gbenson@redhat.com>
1437
1438 * config.in: Regenerate.
1439 * configure: Likewise.
1440
1441 2014-08-29 Gary Benson <gbenson@redhat.com>
1442
1443 * Makefile.in (SFILES): Add common/cleanups.c.
1444 (OBS): cleanups.o.
1445 (cleanups.o): New rule.
1446
1447 2014-08-29 Gary Benson <gbenson@redhat.com>
1448
1449 * utils.c (internal_vwarning): New function.
1450
1451 2014-08-28 Gary Benson <gbenson@redhat.com>
1452
1453 * utils.h (fatal): Remove declaration.
1454 * utils.c (fatal): Remove function.
1455
1456 2014-08-28 Gary Benson <gbenson@redhat.com>
1457
1458 * tracepoint.c (gdb_agent_init): Replace fatal with
1459 perror_with_name.
1460 (initialize_tracepoint): Likewise.
1461
1462 2014-08-28 Gary Benson <gbenson@redhat.com>
1463
1464 * remote-utils.c (remote_prepare): Replace fatal with error.
1465
1466 2014-08-28 Gary Benson <gbenson@redhat.com>
1467
1468 * linux-low.c (linux_async): Replace fatal with warning.
1469 Tidy up and return.
1470 (linux_start_non_stop): Return -1 if linux_async failed.
1471
1472 2014-08-28 Gary Benson <gbenson@redhat.com>
1473
1474 * linux-x86-low.c (i386_dr_low_set_addr): Replace check with
1475 gdb_assert.
1476 (i386_dr_low_get_addr): Remove vague comment.
1477 * win32-i386-low.c (i386_dr_low_set_addr): Replace check with
1478 gdb_assert.
1479
1480 2014-08-28 Gary Benson <gbenson@redhat.com>
1481
1482 * inferiors.c (get_thread_process): Replace check with gdb_assert.
1483 * linux-low.c (linux_wait_for_event_filtered): Replace fatal with
1484 internal_error.
1485 (linux_resume_one_lwp): Likewise.
1486 * linux-x86-low.c (x86_siginfo_fixup): Replace checks with
1487 gdb_assert.
1488 * mem-break.c (raw_bkpt_type_to_target_hw_bp_type): Replace fatal
1489 with internal_error.
1490 * regcache.c (get_thread_regcache): Replace check with gdb_assert.
1491 (init_register_cache): Replace fatal with gdb_assert_not_reached.
1492 (find_register_by_name): Replace fatal with internal_error.
1493 (find_regno): Likewise.
1494 * tdesc.c (init_target_desc): Replace check with gdb_assert.
1495 * thread-db.c (thread_db_create_event): Likewise.
1496 (thread_db_load_search): Likewise.
1497 (try_thread_db_load_1): Likewise.
1498 * tracepoint.c (get_jump_space_head): Replace fatal with
1499 internal_error.
1500 (claim_trampoline_space): Likewise.
1501 (have_fast_tracepoint_trampoline_buffer): Likewise.
1502 (cmd_qtstart): Likewise.
1503 (stop_tracing): Likewise.
1504 (fast_tracepoint_collecting): Likewise.
1505 (target_malloc): Likewise.
1506 (download_tracepoint): Likewise.
1507 (download_trace_state_variables): Replace check with gdb_assert.
1508 (upload_fast_traceframes): Replace fatal with internal_error.
1509
1510 2014-08-19 Tom Tromey <tromey@redhat.com>
1511 Gary Benson <gbenson@redhat.com>
1512
1513 * Makefile.in (SFILES): Add common/common-debug.c.
1514 (OBS): Add common-debug.o.
1515 (common-debug.o): New rule.
1516 * debug.h (debug_printf): Don't declare.
1517 * debug.c (debug_printf): Renamed and rewritten as...
1518 (debug_vprintf): New function.
1519
1520 2014-08-19 Gary Benson <gbenson@redhat.com>
1521
1522 * utils.h: Do not include print-utils.h.
1523
1524 2014-08-19 Tom Tromey <tromey@redhat.com>
1525 Gary Benson <gbenson@redhat.com>
1526
1527 * server.h: Add static assertion.
1528 (gdb_byte, CORE_ADDR, LONGEST, ULONGEST): Remove.
1529
1530 2014-08-19 Tom Tromey <tromey@redhat.com>
1531 Gary Benson <gbenson@redhat.com>
1532
1533 * Makefile.in (SFILES): Add common/errors.c.
1534 (OBS): Add errors.o.
1535 (IPA_OBS): Add errors-ipa.o.
1536 (errors.o): New rule.
1537 (errors-ipa.o): Likewise.
1538 * utils.h (perror_with_name, error, warning): Don't declare.
1539 * utils.c (warning): Renamed and rewritten as...
1540 (vwarning): New function.
1541 (error): Renamed and rewritten as...
1542 (verror): New function.
1543 (internal_error): Renamed and rewritten as...
1544 (internal_verror): New function.
1545
1546 2014-08-07 Gary Benson <gbenson@redhat.com>
1547
1548 * configure.ac (AC_CHECK_HEADERS): Remove errno.h.
1549 * configure: Regenerate.
1550 * config.in: Likewise.
1551 * server.h: Do not include errno.h.
1552 * event-loop.c: Likewise.
1553 * hostio-errno.c: Likewise.
1554 * linux-low.c: Likewise.
1555 * remote-utils.c: Likewise.
1556 * spu-low.c: Likewise.
1557 * utils.c: Likewise.
1558 * gdbreplay.c: Unconditionally include errno.h.
1559
1560 2014-08-07 Gary Benson <gbenson@redhat.com>
1561
1562 * server.h: Do not include string.h.
1563 * event-loop.c: Likewise.
1564 * linux-low.c: Likewise.
1565 * regcache.c: Likewise.
1566 * remote-utils.c: Likewise.
1567 * spu-low.c: Likewise.
1568 * utils.c: Likewise.
1569
1570 2014-08-07 Gary Benson <gbenson@redhat.com>
1571
1572 * server.h: Do not include gdb_assert.h.
1573
1574 2014-08-07 Gary Benson <gbenson@redhat.com>
1575
1576 * server.h: Do not include common-utils.h.
1577
1578 2014-08-07 Gary Benson <gbenson@redhat.com>
1579
1580 * server.h: Do not include ptid.h.
1581 * notif.h: Likewise.
1582
1583 2014-08-07 Gary Benson <gbenson@redhat.com>
1584
1585 * server.h: Do not include gdb_locale.h.
1586
1587 2014-08-07 Gary Benson <gbenson@redhat.com>
1588
1589 * server.h: Do not include gdb/signals.h.
1590 * win32-low.c: Likewise.
1591
1592 2014-08-07 Gary Benson <gbenson@redhat.com>
1593
1594 * server.h: Do not include pathmax.h.
1595
1596 2014-08-07 Gary Benson <gbenson@redhat.com>
1597
1598 * server.h: Do not include libiberty.h.
1599 * linux-bfin-low.c: Likewise.
1600
1601 2014-08-07 Gary Benson <gbenson@redhat.com>
1602
1603 * server.h: Do not include ansidecl.h.
1604
1605 2014-08-07 Gary Benson <gbenson@redhat.com>
1606
1607 * linux-x86-low.c: Do not include stddef.h.
1608 * lynx-ppc-low.c: Likewise.
1609 * tracepoint.c: Likewise.
1610
1611 2014-08-07 Gary Benson <gbenson@redhat.com>
1612
1613 * server.h: Do not include stdarg.h.
1614 * nto-low.c: Likewise.
1615
1616 2014-08-07 Gary Benson <gbenson@redhat.com>
1617
1618 * server.h: Do not include stdlib.h.
1619 * inferiors.c: Likewise.
1620 * linux-low.c: Likewise.
1621 * regcache.c: Likewise.
1622 * spu-low.c: Likewise.
1623 * tracepoint.c: Likewise.
1624 * utils.c: Likewise.
1625
1626 2014-08-07 Gary Benson <gbenson@redhat.com>
1627
1628 * server.h: Do not include stdio.h.
1629 * linux-low.c: Likewise.
1630 * remote-utils.c: Likewise.
1631 * spu-low.c: Likewise.
1632 * utils.c: Likewise.
1633 * wincecompat.c: Likewise.
1634
1635 2014-08-06 Gary Benson <gbenson@redhat.com>
1636
1637 * regcache.c (init_register_cache): Move conditionals inside if.
1638
1639 2014-08-06 Gary Benson <gbenson@redhat.com>
1640
1641 * linux-low.c (linux_supports_non_stop): Use target_is_async_p.
1642
1643 2014-07-31 Gary Benson <gbenson@redhat.com>
1644
1645 * ax.h: Do not include server.h.
1646 * gdbthread.h: Likewise.
1647 * lynx-low.h: Likewise.
1648 * notif.h: Likewise.
1649
1650 2014-07-30 Gary Benson <gbenson@redhat.com>
1651
1652 * server.h: Include common-defs.h.
1653 Do not include config.h or build-gnulib-gdbserver/config.h.
1654
1655 2014-07-30 Gary Benson <gbenson@redhat.com>
1656
1657 * hostio-errno.c: Move server.h to top of includes list.
1658 * inferiors.c: Likewise.
1659 * linux-x86-low.c: Likewise.
1660 * notif.c: Include server.h.
1661
1662 2014-07-24 Tom Tromey <tromey@redhat.com>
1663 Gary Benson <gbenson@redhat.com>
1664
1665 * server.h (CORE_ADDR): Now unsigned.
1666
1667 2014-07-16 Pedro Alves <palves@redhat.com>
1668
1669 * linux-low.c (linux_kill_one_lwp): Use kill_lwp, not kill.
1670
1671 2014-07-15 Pedro Alves <palves@redhat.com>
1672
1673 * linux-low.c (linux_kill_one_lwp): Save errno and work with saved
1674 copy.
1675
1676 2014-07-11 Pedro Alves <palves@redhat.com>
1677
1678 * linux-low.c (kill_wait_lwp): New function, based on
1679 kill_one_lwp_callback, but use my_waitpid directly.
1680 (kill_one_lwp_callback, linux_kill): Use it.
1681
1682 2014-06-23 Pedro Alves <palves@redhat.com>
1683
1684 * linux-x86-low.c (x86_linux_prepare_to_resume): Clear DR_CONTROL
1685 before setting DR0..DR3.
1686
1687 2014-06-20 Gary Benson <gbenson@redhat.com>
1688
1689 * configure.ac (AC_REPLACE_FUNCS) <vasprintf, vsnprintf>: Removed.
1690 * configure: Regenerated.
1691 * config.in: Likewise.
1692
1693 2014-06-20 Gary Benson <gbenson@redhat.com>
1694
1695 * Makefile.in (SFILES): Update locations for files moved
1696 from common to nat.
1697 (object file files): Reordered.
1698
1699 2014-06-20 Gary Benson <gbenson@redhat.com>
1700
1701 * i386-low.h (i386_dr_low_can_set_addr): Removed.
1702 (i386_dr_low_set_addr): Likewise.
1703 (i386_dr_low_get_addr): Likewise.
1704 (i386_dr_low_can_set_control): Likewise.
1705 (i386_dr_low_set_control): Likewise.
1706 (i386_dr_low_get_control): Likewise.
1707 (i386_dr_low_get_status): Likewise.
1708 (i386_get_debug_register_length): Likewise.
1709 * linux-x86-low.c (i386_dr_low_set_addr):
1710 Changed signature. Made static.
1711 (i386_dr_low_get_addr): Likewise.
1712 (i386_dr_low_set_control): Likewise.
1713 (i386_dr_low_get_control): Likewise.
1714 (i386_dr_low_get_status): Likewise.
1715 (i386_dr_low): New global variable.
1716 * win32-i386-low.c (i386_dr_low_set_addr):
1717 Changed signature. Made static.
1718 (i386_dr_low_get_addr): Likewise.
1719 (i386_dr_low_set_control): Likewise.
1720 (i386_dr_low_get_control): Likewise.
1721 (i386_dr_low_get_status): Likewise.
1722 (i386_dr_low): New global variable.
1723
1724 2014-06-20 Marcus Shawcroft <marcus.shawcroft@arm.com>
1725
1726 * configure.ac: Invoke. AC_CHECK_TOOL(AR, ar).
1727 * Makefile.in (AR, AR_FLAGS): Define.
1728 * configure: Regenerate.
1729
1730 2014-06-19 Gary Benson <gbenson@redhat.com>
1731
1732 * Makefile.in (i386-dregs.o): New rule.
1733 * configure.srv: Add i386-dregs.o to all targets using i386-low.o.
1734 * i386-low.c (target.h): Remove include.
1735 (TARGET_HAS_DR_LEN_8): Now in i386-dregs.c.
1736 (DR_CONTROL_SHIFT): Likewise.
1737 (DR_CONTROL_SIZE): Likewise.
1738 (DR_RW_EXECUTE): Likewise.
1739 (DR_RW_WRITE): Likewise.
1740 (DR_RW_READ): Likewise.
1741 (DR_RW_IORW): Likewise.
1742 (DR_LEN_1): Likewise.
1743 (DR_LEN_2): Likewise.
1744 (DR_LEN_4): Likewise.
1745 (DR_LEN_8): Likewise.
1746 (DR_LOCAL_ENABLE_SHIFT): Likewise.
1747 (DR_GLOBAL_ENABLE_SHIFT): Likewise.
1748 (DR_ENABLE_SIZE): Likewise.
1749 (DR_LOCAL_SLOWDOWN): Likewise.
1750 (DR_GLOBAL_SLOWDOWN): Likewise.
1751 (DR_CONTROL_RESERVED): Likewise.
1752 (I386_DR_CONTROL_MASK): Likewise.
1753 (I386_DR_VACANT): Likewise.
1754 (I386_DR_LOCAL_ENABLE): Likewise.
1755 (I386_DR_GLOBAL_ENABLE): Likewise.
1756 (I386_DR_DISABLE): Likewise.
1757 (I386_DR_SET_RW_LEN): Likewise.
1758 (I386_DR_GET_RW_LEN): Likewise.
1759 (I386_DR_WATCH_HIT): Likewise.
1760 (i386_wp_op_t): Likewise.
1761 (i386_show_dr): Likewise.
1762 (i386_length_and_rw_bits): Likewise.
1763 (i386_insert_aligned_watchpoint): Likewise.
1764 (i386_remove_aligned_watchpoint): Likewise.
1765 (i386_handle_nonaligned_watchpoint): Likewise.
1766 i386_update_inferior_debug_regs(): Likewise.
1767 (i386_dr_insert_watchpoint): Likewise.
1768 (i386_dr_remove_watchpoint): Likewise.
1769 (i386_dr_region_ok_for_watchpoint): Likewise.
1770 (i386_dr_stopped_data_address): Likewise.
1771 (i386_dr_stopped_by_watchpoint): Likewise.
1772
1773 2014-06-19 Gary Benson <gbenson@redhat.com>
1774
1775 * i386-low.c (i386_dr_show): Renamed to
1776 i386_show_dr and made static. All uses updated.
1777 (i386_dr_length_and_rw_bits): Renamed to
1778 i386_length_and_rw_bits and made static.
1779 All uses updated.
1780 (i386_dr_insert_aligned_watchpoint): Renamed to
1781 i386_insert_aligned_watchpoint and made static.
1782 All uses updated.
1783 (i386_dr_remove_aligned_watchpoint): Renamed to
1784 i386_remove_aligned_watchpoint and made static.
1785 All uses updated.
1786 (i386_dr_update_inferior_debug_regs): Renamed to
1787 i386_update_inferior_debug_regs and made static.
1788 All uses updated.
1789
1790 2014-06-18 Gary Benson <gbenson@redhat.com>
1791
1792 * i386-low.h (i386_dr_low_can_set_addr): New macro.
1793 (i386_dr_low_can_set_control): Likewise.
1794 (i386_get_debug_register_length): Likewise.
1795 * i386-low.c (i386_dr_low_can_set_addr): Now in i386-low.h.
1796 (i386_dr_low_can_set_control): Likewise.
1797 (i386_get_debug_register_length): Likewise.
1798
1799 2014-06-17 Gary Benson <gbenson@redhat.com>
1800
1801 * i386-low.h (i386-dregs.h): New include.
1802 (DR_FIRSTADDR): Now in i386-dregs.h.
1803 (DR_LASTADDR): Likewise.
1804 (DR_NADDR): Likewise.
1805 (DR_STATUS): Likewise.
1806 (DR_CONTROL): Likewise.
1807 (i386_debug_reg_state): Likewise.
1808 (i386_dr_insert_watchpoint): Likewise.
1809 (i386_dr_remove_watchpoint): Likewise.
1810 (i386_dr_region_ok_for_watchpoint): Likewise.
1811 (i386_dr_stopped_data_address): Likewise.
1812 (i386_dr_stopped_by_watchpoint): Likewise.
1813 * i386-low.c (ALL_DEBUG_REGISTERS): Likewise.
1814
1815 2014-06-18 Gary Benson <gbenson@redhat.com>
1816
1817 * i386-low.h (i386_low_insert_watchpoint): Renamed to
1818 i386_dr_insert_watchpoint.
1819 (i386_low_remove_watchpoint): Renamed to
1820 i386_dr_remove_watchpoint.
1821 (i386_low_region_ok_for_watchpoint): Renamed to
1822 i386_dr_region_ok_for_watchpoint.
1823 (i386_low_stopped_data_address): Renamed to
1824 i386_dr_stopped_data_address.
1825 (i386_low_stopped_by_watchpoint): Renamed to
1826 i386_dr_stopped_by_watchpoint.
1827 * i386-low.c (i386_show_dr): Renamed to
1828 i386_dr_show and made nonstatic. All uses updated.
1829 (i386_length_and_rw_bits): Renamed to
1830 i386_dr_length_and_rw_bits and made nonstatic.
1831 All uses updated.
1832 (i386_insert_aligned_watchpoint): Renamed to
1833 i386_dr_insert_aligned_watchpoint and made nonstatic.
1834 All uses updated.
1835 (i386_remove_aligned_watchpoint): Renamed to
1836 i386_dr_remove_aligned_watchpoint and made nonstatic.
1837 All uses updated.
1838 (i386_update_inferior_debug_regs): Renamed to
1839 i386_dr_update_inferior_debug_regs and made nonstatic.
1840 All uses updated.
1841 (i386_low_insert_watchpoint): Renamed to
1842 i386_dr_insert_watchpoint. All uses updated.
1843 (i386_low_remove_watchpoint): Renamed to
1844 i386_dr_remove_watchpoint. All uses updated.
1845 (i386_low_region_ok_for_watchpoint): Renamed to
1846 i386_dr_region_ok_for_watchpoint. All uses updated.
1847 (i386_low_stopped_data_address): Renamed to
1848 i386_dr_stopped_data_address. All uses updated.
1849 (i386_low_stopped_by_watchpoint): Renamed to
1850 i386_dr_stopped_by_watchpoint. All uses updated.
1851
1852 2014-06-18 Gary Benson <gbenson@redhat.com>
1853
1854 * i386-low.c (i386_dr_low_can_set_addr): New macro.
1855 (i386_dr_low_can_set_control): Likewise.
1856 (i386_insert_aligned_watchpoint): New check.
1857
1858 2014-06-18 Gary Benson <gbenson@redhat.com>
1859
1860 * i386-low.c (i386_update_inferior_debug_regs) <inf_state>:
1861 Renamed to state.
1862
1863 2014-06-18 Gary Benson <gbenson@redhat.com>
1864
1865 * i386-low.c (i386_length_and_rw_bits): Use internal_error
1866 instead of fatal and error.
1867 (i386_handle_nonaligned_watchpoint): Likewise.
1868
1869 2014-06-18 Gary Benson <gbenson@redhat.com>
1870
1871 * i386-low.c (i386_get_debug_register_length): New macro.
1872 (TARGET_HAS_DR_LEN_8): Remove conditional. Use above macro.
1873 (i386_show_dr): Use debug_printf instead of fprintf. Use
1874 phex to format values.
1875
1876 2014-06-18 Gary Benson <gbenson@redhat.com>
1877
1878 * i386-low.h: Comment changes.
1879 * i386-low.c: Likewise.
1880
1881 2014-06-18 Gary Benson <gbenson@redhat.com>
1882
1883 * i386-low.c: Whitespace changes.
1884
1885 2014-06-12 Tom Tromey <tromey@redhat.com>
1886
1887 * utils.c (freeargv): Remove.
1888
1889 2014-06-12 Tom Tromey <tromey@redhat.com>
1890
1891 * debug.c (debug_printf): Remove HAVE_GETTIMEOFDAY checks.
1892 * server.c (monitor_show_help): Remove HAVE_GETTIMEOFDAY check.
1893 (parse_debug_format_options): Likewise.
1894 (gdbserver_usage): Likewise.
1895 * Makefile.in (LIBIBERTY_BUILDDIR, LIBIBERTY): New variables.
1896 (SUBDIRS, REQUIRED_SUBDIRS): Add libiberty.
1897 (gdbserver$(EXEEXT), gdbreplay$(EXEEXT)): Depend on and link
1898 against libiberty.
1899 ($(LIBGNU)): Depend on libiberty.
1900 (all-lib): Recurse into all subdirs.
1901 (install-only): Invoke "install" target in subdirs.
1902 (vasprintf.o, vsnprintf.o, safe-ctype.o, lbasename.o): Remove
1903 targets.
1904 * configure: Rebuild.
1905 * configure.ac: Add ACX_CONFIGURE_DIR for libiberty. Don't check
1906 for vasprintf, vsnprintf, or gettimeofday.
1907 * configure.srv: Don't add safe-ctype.o or lbasename.o to
1908 srv_tgtobj.
1909
1910 2014-06-05 Joel Brobecker <brobecker@adacore.com>
1911
1912 * development.sh: Delete.
1913 * Makefile.in (config.status): Adjust dependency on development.sh.
1914 * configure.ac: Adjust development.sh source call.
1915 * configure: Regenerate.
1916
1917 2014-06-02 Pedro Alves <palves@redhat.com>
1918
1919 * ax.c (gdb_free_agent_expr): New function.
1920 * ax.h (gdb_free_agent_expr): New declaration.
1921 * mem-break.c (delete_gdb_breakpoint_1): Also clear the commands
1922 list.
1923 (clear_breakpoint_conditions, clear_breakpoint_commands): Make
1924 static.
1925 (clear_breakpoint_conditions_and_commands): New function.
1926 * mem-break.h (clear_breakpoint_conditions): Delete declaration.
1927 (clear_breakpoint_conditions_and_commands): New declaration.
1928
1929 2014-05-23 Ramana Radhakrishnan <ramana.radhakrishnan@arm.com>
1930
1931 * linux-aarch64-low.c (asm/ptrace.h): Include.
1932
1933 2014-05-21 Jan Kratochvil <jan.kratochvil@redhat.com>
1934
1935 Fix TLS access for -static -pthread.
1936 * gdbserver/thread-db.c (struct thread_db): Add td_thr_tlsbase_p.
1937 (thread_db_get_tls_address): Call it if LOAD_MODULE is zero.
1938 (thread_db_load_search, try_thread_db_load_1): Initialize it.
1939
1940 2014-05-20 Pedro Alves <palves@redhat.com>
1941
1942 * linux-aarch64-low.c (aarch64_insert_point)
1943 (aarch64_remove_point): No longer check whether the type is
1944 supported here. Adjust to new interface.
1945 (the_low_target): Install aarch64_supports_z_point_type as
1946 supports_z_point_type method.
1947 * linux-arm-low.c (raw_bkpt_type_to_arm_hwbp_type): New function.
1948 (arm_linux_hw_point_initialize): Take an enum raw_bkpt_type
1949 instead of a Z packet char. Adjust.
1950 (arm_supports_z_point_type): New function.
1951 (arm_insert_point, arm_remove_point): Adjust to new interface.
1952 (the_low_target): Install arm_supports_z_point_type.
1953 * linux-crisv32-low.c (cris_supports_z_point_type): New function.
1954 (cris_insert_point, cris_remove_point): Adjust to new interface.
1955 Don't check whether the type is supported here.
1956 (the_low_target): Install cris_supports_z_point_type.
1957 * linux-low.c (linux_supports_z_point_type): New function.
1958 (linux_insert_point, linux_remove_point): Adjust to new interface.
1959 * linux-low.h (struct linux_target_ops) <insert_point,
1960 remove_point>: Take an enum raw_bkpt_type instead of a char. Add
1961 raw_breakpoint pointer parameter.
1962 <supports_z_point_type>: New method.
1963 * linux-mips-low.c (mips_supports_z_point_type): New function.
1964 (mips_insert_point, mips_remove_point): Adjust to new interface.
1965 Use mips_supports_z_point_type.
1966 (the_low_target): Install mips_supports_z_point_type.
1967 * linux-ppc-low.c (the_low_target): Install NULL as
1968 supports_z_point_type method.
1969 * linux-s390-low.c (the_low_target): Install NULL as
1970 supports_z_point_type method.
1971 * linux-sparc-low.c (the_low_target): Install NULL as
1972 supports_z_point_type method.
1973 * linux-x86-low.c (x86_supports_z_point_type): New function.
1974 (x86_insert_point): Adjust to new insert_point interface. Use
1975 insert_memory_breakpoint. Adjust to new
1976 i386_low_insert_watchpoint interface.
1977 (x86_remove_point): Adjust to remove_point interface. Use
1978 remove_memory_breakpoint. Adjust to new
1979 i386_low_remove_watchpoint interface.
1980 (the_low_target): Install x86_supports_z_point_type.
1981 * lynx-low.c (lynx_target_ops): Install NULL as
1982 supports_z_point_type callback.
1983 * nto-low.c (nto_supports_z_point_type): New.
1984 (nto_insert_point, nto_remove_point): Adjust to new interface.
1985 (nto_target_ops): Install nto_supports_z_point_type.
1986 * mem-break.c: Adjust intro comment.
1987 (struct raw_breakpoint) <raw_type, size>: New fields.
1988 <inserted>: Update comment.
1989 <shlib_disabled>: Delete field.
1990 (enum bkpt_type) <gdb_breakpoint>: Delete value.
1991 <gdb_breakpoint_Z0, gdb_breakpoint_Z1, gdb_breakpoint_Z2,
1992 gdb_breakpoint_Z3, gdb_breakpoint_Z4>: New values.
1993 (raw_bkpt_type_to_target_hw_bp_type): New function.
1994 (find_enabled_raw_code_breakpoint_at): New function.
1995 (find_raw_breakpoint_at): New type and size parameters. Use them.
1996 (insert_memory_breakpoint): New function, based off
1997 set_raw_breakpoint_at.
1998 (remove_memory_breakpoint): New function.
1999 (set_raw_breakpoint_at): Reimplement.
2000 (set_breakpoint): New, based on set_breakpoint_at.
2001 (set_breakpoint_at): Reimplement.
2002 (delete_raw_breakpoint): Go through the_target->remove_point
2003 instead of assuming memory breakpoints.
2004 (find_gdb_breakpoint_at): Delete.
2005 (Z_packet_to_bkpt_type, Z_packet_to_raw_bkpt_type): New functions.
2006 (find_gdb_breakpoint): New function.
2007 (set_gdb_breakpoint_at): Delete.
2008 (z_type_supported): New function.
2009 (set_gdb_breakpoint_1): New function, loosely based off
2010 set_gdb_breakpoint_at.
2011 (check_gdb_bp_preconditions, set_gdb_breakpoint): New functions.
2012 (delete_gdb_breakpoint_at): Delete.
2013 (delete_gdb_breakpoint_1): New function, loosely based off
2014 delete_gdb_breakpoint_at.
2015 (delete_gdb_breakpoint): New function.
2016 (clear_gdb_breakpoint_conditions): Rename to ...
2017 (clear_breakpoint_conditions): ... this. Don't handle a NULL
2018 breakpoint.
2019 (add_condition_to_breakpoint): Make static.
2020 (add_breakpoint_condition): Take a struct breakpoint pointer
2021 instead of an address. Adjust.
2022 (gdb_condition_true_at_breakpoint): Rename to ...
2023 (gdb_condition_true_at_breakpoint_z_type): ... this, and add
2024 z_type parameter.
2025 (gdb_condition_true_at_breakpoint): Reimplement.
2026 (add_breakpoint_commands): Take a struct breakpoint pointer
2027 instead of an address. Adjust.
2028 (gdb_no_commands_at_breakpoint): Rename to ...
2029 (gdb_no_commands_at_breakpoint_z_type): ... this. Add z_type
2030 parameter. Return true if no breakpoint was found. Change debug
2031 output.
2032 (gdb_no_commands_at_breakpoint): Reimplement.
2033 (run_breakpoint_commands): Rename to ...
2034 (run_breakpoint_commands_z_type): ... this. Add z_type parameter,
2035 and change return type to boolean.
2036 (run_breakpoint_commands): New function.
2037 (gdb_breakpoint_here): Also check for Z1 breakpoints.
2038 (uninsert_raw_breakpoint): Don't try to reinsert a disabled
2039 breakpoint. Go through the_target->remove_point instead of
2040 assuming memory breakpoint.
2041 (uninsert_breakpoints_at, uninsert_all_breakpoints): Uninsert
2042 software and hardware breakpoints.
2043 (reinsert_raw_breakpoint): Go through the_target->insert_point
2044 instead of assuming memory breakpoint.
2045 (reinsert_breakpoints_at, reinsert_all_breakpoints): Reinsert
2046 software and hardware breakpoints.
2047 (check_breakpoints, breakpoint_here, breakpoint_inserted_here):
2048 Check both software and hardware breakpoints.
2049 (validate_inserted_breakpoint): Assert the breakpoint is a
2050 software breakpoint. Set the inserted flag to -1 instead of
2051 setting shlib_disabled.
2052 (delete_disabled_breakpoints): Adjust.
2053 (validate_breakpoints): Only validate software breakpoints.
2054 Adjust to inserted flag change.
2055 (check_mem_read, check_mem_write): Skip breakpoint types other
2056 than software breakpoints. Adjust to inserted flag change.
2057 * mem-break.h (enum raw_bkpt_type): New enum.
2058 (raw_breakpoint, struct process_info): Forward declare.
2059 (Z_packet_to_target_hw_bp_type): Delete declaration.
2060 (raw_bkpt_type_to_target_hw_bp_type, Z_packet_to_raw_bkpt_type)
2061 (set_gdb_breakpoint, delete_gdb_breakpoint)
2062 (clear_breakpoint_conditions): New declarations.
2063 (set_gdb_breakpoint_at, clear_gdb_breakpoint_conditions): Delete.
2064 (breakpoint_inserted_here): Update comment.
2065 (add_breakpoint_condition, add_breakpoint_commands): Replace
2066 address parameter with a breakpoint pointer parameter.
2067 (gdb_breakpoint_here): Update comment.
2068 (delete_gdb_breakpoint_at): Delete.
2069 (insert_memory_breakpoint, remove_memory_breakpoint): Declare.
2070 * server.c (process_point_options): Take a struct breakpoint
2071 pointer instead of an address. Adjust.
2072 (process_serial_event) <Z/z packets>: Use set_gdb_breakpoint and
2073 delete_gdb_breakpoint.
2074 * spu-low.c (spu_target_ops): Install NULL as
2075 supports_z_point_type method.
2076 * target.h: Include mem-break.h.
2077 (struct target_ops) <prepare_to_access_memory>: Update comment.
2078 <supports_z_point_type>: New field.
2079 <insert_point, remove_point>: Take an enum raw_bkpt_type argument
2080 instead of a char. Also take a raw breakpoint pointer.
2081 * win32-arm-low.c (the_low_target): Install NULL as
2082 supports_z_point_type.
2083 * win32-i386-low.c (i386_supports_z_point_type): New function.
2084 (i386_insert_point, i386_remove_point): Adjust to new interface.
2085 (the_low_target): Install i386_supports_z_point_type.
2086 * win32-low.c (win32_supports_z_point_type): New function.
2087 (win32_insert_point, win32_remove_point): Adjust to new interface.
2088 (win32_target_ops): Install win32_supports_z_point_type.
2089 * win32-low.h (struct win32_target_ops):
2090 <supports_z_point_type>: New method.
2091 <insert_point, remove_point>: Take an enum raw_bkpt_type argument
2092 instead of a char. Also take a raw breakpoint pointer.
2093
2094 2014-05-20 Pedro Alves <palves@redhat.com>
2095
2096 * mem-break.h: Include break-common.h.
2097 (Z_PACKET_SW_BP, Z_PACKET_HW_BP, Z_PACKET_WRITE_WP)
2098 (Z_PACKET_READ_WP, Z_PACKET_ACCESS_WP): New defines.
2099 (Z_packet_to_target_hw_bp_type): New declaration.
2100 * mem-break.c (Z_packet_to_target_hw_bp_type): New function.
2101 * i386-low.c (Z_PACKET_HW_BP, Z_PACKET_WRITE_WP, Z_PACKET_READ_WP)
2102 (Z_PACKET_ACCESS_WP): Delete macros.
2103 (Z_packet_to_hw_type): Delete function.
2104 * i386-low.h: Don't include break-common.h here.
2105 (Z_packet_to_hw_type): Delete declaration.
2106 * linux-x86-low.c (x86_insert_point, x86_insert_point): Call
2107 Z_packet_to_target_hw_bp_type instead of Z_packet_to_hw_type.
2108 * win32-i386-low.c (i386_insert_point, i386_remove_point): Call
2109 Z_packet_to_target_hw_bp_type instead of Z_packet_to_hw_type.
2110 * linux-aarch64-low.c: Don't include break-common.h here.
2111 (Z_PACKET_SW_BP, Z_PACKET_HW_BP, Z_PACKET_WRITE_WP)
2112 (Z_PACKET_READ_WP, Z_PACKET_ACCESS_WP): Delete macros.
2113 (Z_packet_to_target_hw_bp_type): Delete function.
2114 * linux-mips-low.c (rsp_bp_type_to_target_hw_bp_type): Delete
2115 function.
2116 (mips_insert_point, mips_remove_point): Use
2117 Z_packet_to_target_hw_bp_type.
2118
2119 2014-05-20 Pedro Alves <palves@redhat.com>
2120
2121 * linux-aarch64-low.c: Include break-common.h.
2122 (enum target_point_type): Delete.
2123 (Z_packet_to_point_type): Rename to ...
2124 (Z_packet_to_target_hw_bp_type): ... this, and return a
2125 target_hw_bp_type instead.
2126 (aarch64_show_debug_reg_state): Take an enum target_hw_bp_type
2127 instead of an enum target_point_type.
2128 (aarch64_point_encode_ctrl_reg): Likewise. Compute type mask from
2129 breakpoint type.
2130 (aarch64_dr_state_insert_one_point)
2131 (aarch64_dr_state_remove_one_point, aarch64_handle_breakpoint)
2132 (aarch64_handle_aligned_watchpoint)
2133 (aarch64_handle_unaligned_watchpoint, aarch64_handle_watchpoint):
2134 Take an enum target_hw_bp_type instead of an enum
2135 target_point_type.
2136 (aarch64_supports_z_point_type): New function.
2137 (aarch64_insert_point, aarch64_remove_point): Use it. Adjust to
2138 use Z_packet_to_target_hw_bp_type.
2139
2140 2014-05-20 Joel Brobecker <brobecker@adacore.com>
2141
2142 * configure.ac: Only use -Werror by default when DEVELOPMENT
2143 is true.
2144 * configure: Regenerate.
2145
2146 2014-05-19 Jan Kratochvil <jan.kratochvil@redhat.com>
2147
2148 Fix gdbserver qGetTLSAddr for x86_64 -m32.
2149 * linux-x86-low.c (X86_64_USER_REGS): New.
2150 (x86_fill_gregset): Call memset for BUF first in x86_64 -m32 case.
2151
2152 2014-04-28 Yao Qi <yao@codesourcery.com>
2153
2154 * Makefile.in (i386-avx512.c): Fix the typo of generated file
2155 name.
2156
2157 2014-04-25 Pedro Alves <palves@redhat.com>
2158
2159 PR server/16255
2160 * linux-low.c (linux_attach_fail_reason_string): New function.
2161 (linux_attach_lwp): Delete.
2162 (linux_attach_lwp_1): Rename to ...
2163 (linux_attach_lwp): ... this. Take a ptid instead of a pid as
2164 argument. Remove "initial" parameter. Return int instead of
2165 void. Don't error or warn here.
2166 (linux_attach): Adjust to call linux_attach_lwp. Call error on
2167 failure to attach to the tgid. Call warning when failing to
2168 attach to an lwp.
2169 * linux-low.h (linux_attach_lwp): Take a ptid instead of a pid as
2170 argument. Remove "initial" parameter. Return int instead of
2171 void. Don't error or warn here.
2172 (linux_attach_fail_reason_string): New declaration.
2173 * thread-db.c (attach_thread): Adjust to linux_attach_lwp's
2174 interface change. Use linux_attach_fail_reason_string.
2175
2176 2014-04-24 Michael Sturm <michael.sturm@mintel.com>
2177 Walfred Tedeschi <walfred.tedeschi@intel.com>
2178
2179 * Makefile.in: Added rules to handle new files
2180 i386-avx512.c i386-avx512-linux.c amd64-avx512.c
2181 amd64-avx512-linux.c x32-avx512.c x32-avx512-linux.c.
2182 * configure.srv (srv_i386_regobj): Add i386-avx512.o.
2183 (srv_i386_linux_regobj): Add i386-avx512-linux.o.
2184 (srv_amd64_regobj): Add amd64-avx512.o and x32-avx512.o.
2185 (srv_amd64_linux_regobj): Add amd64-avx512-linux.o and
2186 x32-avx512-linux.o.
2187 (srv_i386_32bit_xmlfiles): Add i386/32bit-avx512.xml.
2188 (srv_i386_64bit_xmlfiles): Add i386/64bit-avx512.xml.
2189 (srv_amd64_xmlfiles): Add i386/amd64-avx512.xml and
2190 i386/x32-avx512.xml.
2191 (srv_i386_linux_xmlfiles): Add i386/i386-avx512-linux.xml.
2192 (srv_amd64_linux_xmlfiles): Add i386/amd64-avx512-linux.xml and
2193 i386/x32-avx512-linux.xml.
2194 * i387-fp.c (num_avx512_k_registers): New constant for number
2195 of K registers.
2196 (num_avx512_zmmh_low_registers): New constant for number of
2197 lower ZMM registers (0-15).
2198 (num_avx512_zmmh_high_registers): New constant for number of
2199 higher ZMM registers (16-31).
2200 (num_avx512_ymmh_registers): New contant for number of higher
2201 YMM registers (ymm16-31 added by avx521 on x86_64).
2202 (num_avx512_xmm_registers): New constant for number of higher
2203 XMM registers (xmm16-31 added by AVX512 on x86_64).
2204 (struct i387_xsave): Add space for AVX512 registers.
2205 (i387_cache_to_xsave): Change raw buffer size to 64 characters.
2206 Add code to handle AVX512 registers.
2207 (i387_xsave_to_cache): Add code to handle AVX512 registers.
2208 * linux-x86-low.c (init_registers_amd64_avx512_linux): New
2209 prototypei from generated file.
2210 (tdesc_amd64_avx512_linux): Likewise.
2211 (init_registers_x32_avx512_linux): Likewise.
2212 (tdesc_x32_avx512_linux): Likewise.
2213 (init_registers_i386_avx512_linux): Likewise.
2214 (tdesc_i386_avx512_linux): Likewise.
2215 (x86_64_regmap): Add AVX512 registers.
2216 (x86_linux_read_description): Add code to handle AVX512 XSTATE
2217 mask.
2218 (initialize_low_arch): Add code to initialize AVX512 registers.
2219
2220 2014-04-23 Pedro Alves <palves@redhat.com>
2221
2222 * mem-break.c (find_gdb_breakpoint_at): Make static.
2223 * mem-break.h (find_gdb_breakpoint_at): Delete declaration.
2224
2225 2014-04-23 Pedro Alves <palves@redhat.com>
2226
2227 * i386-low.c: Don't include break-common.h here.
2228 (i386_low_insert_watchpoint, i386_low_remove_watchpoint): Change
2229 prototype to take target_hw_bp_type as argument instead of a Z
2230 packet char.
2231 * i386-low.h: Include break-common.h here.
2232 (Z_packet_to_hw_type): Declare.
2233 (i386_low_insert_watchpoint, i386_low_remove_watchpoint): Change
2234 prototypes.
2235 * linux-x86-low.c (x86_insert_point): Convert the packet number to
2236 a target_hw_bp_type before calling i386_low_insert_watchpoint.
2237 (x86_remove_point): Convert the packet number to a
2238 target_hw_bp_type before calling i386_low_remove_watchpoint.
2239 * win32-i386-low.c (i386_insert_point): Convert the packet number
2240 to a target_hw_bp_type before calling i386_low_insert_watchpoint.
2241 (i386_remove_point): Convert the packet number to a
2242 target_hw_bp_type before calling i386_low_remove_watchpoint.
2243
2244 2014-04-23 Pedro Alves <palves@redhat.com>
2245
2246 * utils.h (perror_with_name): Add ATTRIBUTE_NORETURN.
2247
2248 2014-04-10 Pedro Alves <palves@redhat.com>
2249
2250 * mem-break.c (add_breakpoint_condition, add_breakpoint_commands):
2251 Check if the condition or command is NULL before checking if the
2252 breakpoint is known. On success, return true.
2253 * mem-break.h (add_breakpoint_condition): Document return.
2254 (add_breakpoint_commands): Add describing comment.
2255 * server.c (skip_to_semicolon): New function.
2256 (process_point_options): Use it.
2257
2258 2014-04-09 Pedro Alves <palves@redhat.com>
2259
2260 * linux-low.c (linux_read_loadmap): Pass current_inferior directly
2261 to lwpid_of.
2262
2263 2014-02-27 Pedro Alves <palves@redhat.com>
2264
2265 PR 12702
2266 * inferiors.h (A_I_NEXT, ALL_INFERIORS_TYPE, ALL_PROCESSES): New
2267 macros.
2268 * linux-low.c (delete_lwp, handle_extended_wait): Add debug
2269 output.
2270 (last_thread_of_process_p): Take a PID argument instead of a
2271 thread pointer.
2272 (linux_wait_for_lwp): Delete.
2273 (num_lwps, check_zombie_leaders, not_stopped_callback): New
2274 functions.
2275 (linux_low_filter_event): New function, party factored out from
2276 linux_wait_for_event.
2277 (linux_wait_for_event): Rename to ...
2278 (linux_wait_for_event_filtered): ... this. Add new filter ptid
2279 argument. Partly rewrite. Always use waitpid(-1, WNOHANG) and
2280 sigsuspend. Check for zombie leaders.
2281 (linux_wait_for_event): Reimplement as wrapper around
2282 linux_wait_for_event_filtered.
2283 (linux_wait_1): Handle TARGET_WAITKIND_NO_RESUMED. Assume that if
2284 a normal or signal exit is seen, it's the whole process exiting.
2285 (wait_for_sigstop): No longer a for_each_inferior callback.
2286 Rewrite on top of linux_wait_for_event_filtered.
2287 (stop_all_lwps): Call wait_for_sigstop directly.
2288 * server.c (resume, handle_target_event): Handle
2289 TARGET_WAITKIND_NO_RESUMED.
2290
2291 2014-02-26 Joel Brobecker <brobecker@adacore.com>
2292
2293 * win32-low.c (psapi_get_dll_name,
2294 * win32_CreateToolhelp32Snapshot): Delete.
2295 (win32_CreateToolhelp32Snapshot, win32_Module32First)
2296 (win32_Module32Next, load_toolhelp, toolhelp_get_dll_name):
2297 Delete.
2298 (handle_load_dll): Add function description.
2299 Remove code using psapi_get_dll_name and toolhelp_get_dll_name.
2300
2301 2014-02-26 Joel Brobecker <brobecker@adacore.com>
2302
2303 * win32-low.c (win32_add_one_solib): Add 0x1000 to load_addr.
2304 Add comment.
2305 (win32_add_all_dlls): Remove 0x1000 offset applied to DLL
2306 base address when calling win32_add_one_solib.
2307 (handle_load_dll): Delete local variable load_addr.
2308 Remove 0x1000 offset applied to DLL base address when calling
2309 win32_add_one_solib.
2310 (handle_unload_dll): Add comment.
2311
2312 2014-02-26 Joel Brobecker <brobecker@adacore.com>
2313
2314 * win32-low.c (win32_add_all_dlls): Renames
2315 win32_ensure_ntdll_loaded. Rewrite function documentation.
2316 Adjust implementation to always load all DLLs.
2317 Add 0x1000 offset to DLL base address when calling
2318 win32_add_one_solib.
2319 (child_initialization_done): New static global.
2320 (do_initial_child_stuff): Set child_initialization_done to
2321 zero during child initialization, and 1 after. Replace call
2322 to win32_ensure_ntdll_loaded by call to win32_add_all_dlls.
2323 Add comment.
2324 (match_dll_by_basename, dll_is_loaded_by_basename): Delete.
2325 (handle_unload_dll): Add function documentation.
2326 (get_child_debug_event): Ignore load and unload DLL events
2327 during child initialization.
2328
2329 2014-02-20 Doug Evans <dje@google.com>
2330
2331 Remove global all_lwps.
2332 * inferiors.h (ptid_of): Move here from linux-low.h.
2333 (pid_of, lwpid_of): Ditto.
2334 * linux-aarch64-low.c (debug_reg_change_callback): Update, "entry"
2335 parameter is a struct thread_info * now.
2336 (aarch64_notify_debug_reg_change): Fetch pid from current_inferior
2337 directly. Pass &all_threads to find_inferior instead of &all_lwps.
2338 (aarch64_stopped_data_address): Fetch lwpid from current_inferior
2339 directly.
2340 (aarch64_linux_prepare_to_resume): Fetch ptid from thread.
2341 (aarch64_arch_setup): Fetch lwpid from current_inferior directly.
2342 * linux-arm-low.c (update_registers_callback): Update, "entry"
2343 parameter is a struct thread_info * now.
2344 Fetch lwpid from current_inferior directly.
2345 (arm_insert_point): Pass &all_threads to find_inferior instead of
2346 &all_lwps.
2347 (arm_remove_point): Ditto.
2348 (arm_stopped_by_watchpoint): Fetch lwp from current_inferior.
2349 (arm_prepare_to_resume): Fetch pid from thread.
2350 (arm_read_description): Fetch lwpid from current_inferior directly.
2351 * linux-low.c (all_lwps): Delete.
2352 (delete_lwp): Delete call to remove_inferior.
2353 (handle_extended_wait): Fetch lwpid from thread.
2354 (add_lwp): Don't set lwp->entry.id. Remove call to
2355 add_inferior_to_list.
2356 (linux_attach_lwp_1): Fetch pid from current_inferior directly.
2357 (linux_kill_one_lwp): Fetch ptid,lwpid from thread.
2358 (kill_one_lwp_callback): Ditto.
2359 (linux_kill): Don't dereference NULL pointer.
2360 Fetch ptid,lwpid from thread.
2361 (get_detach_signal): Fetch ptid from thread.
2362 (linux_detach_one_lwp): Fetch ptid,lwpid from thread.
2363 Simplify call to regcache_invalidate_thread.
2364 (delete_lwp_callback): Update, "entry" parameter is a
2365 struct thread_info * now. Fetch pid from thread.
2366 (linux_mourn): Pass &all_threads to find_inferior instead of &all_lwps.
2367 (status_pending_p_callback): Update, "entry" parameter is a
2368 struct thread_info * now. Fetch ptid from thread.
2369 (find_lwp_pid): Update, "entry" parameter is a
2370 struct thread_info * now.
2371 (linux_wait_for_lwp): Fetch pid from thread.
2372 (linux_fast_tracepoint_collecting): Fetch lwpid from thread.
2373 (maybe_move_out_of_jump_pad): Fetch lwpid from current_inferior.
2374 (enqueue_one_deferred_signal): Fetch lwpid from thread.
2375 (dequeue_one_deferred_signal): Ditto.
2376 (cancel_breakpoint): Fetch ptid from current_inferior.
2377 (linux_wait_for_event): Pass &all_threads to find_inferior,
2378 not &all_lwps. Fetch ptid, lwpid from thread.
2379 (count_events_callback): Update, "entry" parameter is a
2380 struct thread_info * now.
2381 (select_singlestep_lwp_callback): Ditto.
2382 (select_event_lwp_callback): Ditto.
2383 (cancel_breakpoints_callback): Ditto.
2384 (linux_cancel_breakpoints): Pass &all_threads to find_inferior,
2385 not &all_lwps.
2386 (select_event_lwp): Ditto. Fetch ptid from event_thread.
2387 (unsuspend_one_lwp): Update, "entry" parameter is a
2388 struct thread_info * now.
2389 (unsuspend_all_lwps): Pass &all_threads to find_inferior,
2390 not &all_lwps.
2391 (linux_stabilize_threads): Ditto. And for for_each_inferior.
2392 Fetch lwpid from thread, not lwp.
2393 (linux_wait_1): Fetch ptid, lwpid from current_inferior.
2394 Pass &all_threads to find_inferior, not &all_lwps.
2395 (send_sigstop): Fetch lwpid from thread, not lwp.
2396 (send_sigstop_callback): Update, "entry" parameter is a
2397 struct thread_info * now.
2398 (suspend_and_send_sigstop_callback): Ditto.
2399 (wait_for_sigstop): Ditto. Fetch ptid, lwpid from thread, lwp.
2400 (stuck_in_jump_pad_callback): Update, "entry" parameter is a
2401 struct thread_info * now.
2402 (move_out_of_jump_pad_callback): Ditto. Fetch ptid, lwpid
2403 from thread, lwp.
2404 (lwp_running): Update, "entry" parameter is a
2405 struct thread_info * now.
2406 (stop_all_lwps): Fetch ptid from thread.
2407 Pass &all_threads to find_inferior, for_each_inferior, not &all_lwps.
2408 (linux_resume_one_lwp): Fetch lwpid from thread.
2409 (linux_set_resume_request): Update, "entry" parameter is a
2410 struct thread_info * now. Fetch pid, lwpid from thread.
2411 (resume_status_pending_p): Update, "entry" parameter is a
2412 struct thread_info * now.
2413 (need_step_over_p): Ditto. Fetch lwpid from thread.
2414 (start_step_over): Fetch lwpid from thread.
2415 (linux_resume_one_thread): Update, "entry" parameter is a
2416 struct thread_info * now. Fetch lwpid from thread.
2417 (linux_resume): Pass &all_threads to find_inferior, not &all_lwps.
2418 (proceed_one_lwp): Update, "entry" parameter is a
2419 struct thread_info * now. Fetch lwpid from thread.
2420 (unsuspend_and_proceed_one_lwp): Update, "entry" parameter is a
2421 struct thread_info * now.
2422 (proceed_all_lwps): Pass &all_threads to find_inferior, not &all_lwps.
2423 (unstop_all_lwps): Ditto. Fetch lwpid from thread.
2424 (regsets_fetch_inferior_registers): Fetch lwpid from current_inferior
2425 directly.
2426 (regsets_store_inferior_registers): Ditto.
2427 (fetch_register, store_register): Ditto.
2428 (linux_read_memory, linux_write_memory): Ditto.
2429 (linux_request_interrupt): Ditto.
2430 (linux_read_auxv): Ditto.
2431 (linux_xfer_siginfo): Ditto.
2432 (linux_qxfer_spu): Ditto.
2433 (linux_qxfer_libraries_svr4): Ditto.
2434 * linux-low.h (ptid_of, pid_of, lwpid_of): Delete,
2435 moved to inferiors.h.
2436 (get_lwp): Delete.
2437 (get_thread_lwp): Update.
2438 (struct lwp_info): Delete member "entry". Simplify comment for
2439 member "thread".
2440 (all_lwps): Delete.
2441 * linux-mips-low.c (mips_read_description): Fetch lwpid from
2442 current_inferior directly.
2443 (update_watch_registers_callback): Update, "entry" parameter is a
2444 struct thread_info * now. Fetch pid from thread.
2445 (mips_linux_prepare_to_resume): Fetch ptid from thread.
2446 (mips_insert_point): Fetch lwpid from current_inferior.
2447 Pass &all_threads to find_inferior, not &all_lwps.
2448 (mips_remove_point): Pass &all_threads to find_inferior, not &all_lwps.
2449 (mips_stopped_by_watchpoint): Fetch lwpid from current_inferior
2450 directly.
2451 (mips_stopped_data_address): Ditto.
2452 * linux-s390-low.c (s390_arch_setup): Fetch pid from current_inferior
2453 directly.
2454 * linux-tile-low.c (tile_arch_setup): Ditto.
2455 * linux-x86-low.c (x86_get_thread_area): Fetch lwpid from thread.
2456 (update_debug_registers_callback): Update, "entry" parameter is a
2457 struct thread_info * now. Fetch pid from thread.
2458 (i386_dr_low_set_addr): Fetch pid from current_inferior directly.
2459 Pass &all_threads to find_inferior, not &all_lwps.
2460 (i386_dr_low_get_addr): Fetch ptid from current_inferior directly.
2461 (i386_dr_low_set_control): Fetch pid from current_inferior directly.
2462 Pass &all_threads to find_inferior, not &all_lwps.
2463 (i386_dr_low_get_control): Fetch ptid from current_inferior directly.
2464 (i386_dr_low_get_status): Ditto.
2465 (x86_linux_prepare_to_resume): Fetch ptid from thread.
2466 (x86_siginfo_fixup): Fetch lwpid from current_inferior directly.
2467 (x86_linux_read_description): Ditto.
2468 * proc-service.c (ps_getpid): Fetch pid from current_inferior directly.
2469
2470 2014-02-20 Doug Evans <dje@google.com>
2471
2472 * inferiors.c (get_first_inferior): Fix buglet.
2473
2474 2014-02-19 Doug Evans <dje@google.com>
2475
2476 * gdbthread.h (add_thread): Change result type to struct thread_info *.
2477 * inferiors.c (add_thread): Change result type to struct thread_info *.
2478 All callers updated.
2479 (add_lwp): Call add_thread here instead of in callers.
2480 All callers updated.
2481 * linux-low.h (get_lwp_thread): Rewrite.
2482 (struct lwp_info): New member "thread".
2483
2484 2014-02-19 Doug Evans <dje@google.com>
2485
2486 * linux-low.c (add_lwp): Change result to struct lwp_info *.
2487 All callers updated.
2488
2489 2014-02-19 Doug Evans <dje@google.com>
2490
2491 * inferiors.c (add_thread): Fix whitespace.
2492
2493 2014-02-19 Doug Evans <dje@google.com>
2494
2495 * dll.c (clear_dlls): Replace accessing list implemention details
2496 with API function.
2497 * gdbthread.h (get_first_thread): Declare.
2498 * inferiors.c (for_each_inferior_with_data): New function.
2499 (get_first_thread): New function.
2500 (find_thread_ptid): Simplify.
2501 (get_first_inferior): New function.
2502 (clear_list): Delete.
2503 (one_inferior_p): New function.
2504 (clear_inferior_list): New function.
2505 (clear_inferiors): Update.
2506 * inferiors.h (for_each_inferior_with_data): Declare.
2507 (clear_inferior_list): Declare.
2508 (one_inferior_p): Declare.
2509 (get_first_inferior): Declare.
2510 * linux-low.c (linux_wait_for_event): Replace accessing list
2511 implemention details with API function.
2512 * server.c (target_running): Ditto.
2513 (accumulate_file_name_length): New function.
2514 (emit_dll_description): New function.
2515 (handle_qxfer_libraries): Replace accessing list implemention
2516 details with API function.
2517 (handle_qxfer_threads_worker): New function.
2518 (handle_qxfer_threads_proper): Replace accessing list implemention
2519 details with API function.
2520 (handle_query): Ditto.
2521 (visit_actioned_threads_callback_ftype): New typedef.
2522 (visit_actioned_threads_data): New struct.
2523 (visit_actioned_threads): Rewrite to be find_inferior callback.
2524 (resume): Call find_inferior.
2525 (handle_status): Replace accessing list implemention
2526 details with API function.
2527 (process_serial_event): Replace accessing list implemention details
2528 with API function.
2529 * target.c (set_desired_inferior): Replace accessing list implemention
2530 details with API function.
2531 * tracepoint.c (same_process_p): New function.
2532 (gdb_agent_about_to_close): Replace accessing list implemention
2533 details with API function.
2534 * win32-low.c (child_delete_thread): Replace accessing list
2535 implemention details with API function.
2536 (match_dll_by_basename): New function.
2537 (dll_is_loaded_by_basename): New function.
2538 (win32_ensure_ntdll_loaded): Replace accessing list implemention
2539 details call to dll_is_loaded_by_basename.
2540
2541 2014-02-19 Doug Evans <dje@google.com>
2542
2543 * dll.h (struct dll_info): Add comment.
2544 * gdbthread.h (struct thread_info): Add comment.
2545 (current_ptid): Simplify.
2546 * inferiors.c (add_process): Update.
2547 (remove_process): Update.
2548 * inferiors.h (struct process_info): Rename member "head" to "entry".
2549 * linux-low.c (delete_lwp): Update.
2550 (add_lwp): Update.
2551 (last_thread_of_process_p): Update.
2552 (kill_one_lwp_callback, linux_kill): Update.
2553 (status_pending_p_callback): Update.
2554 (wait_for_sigstop): Update. Simplify read of ptid.
2555 (start_step_over): Update.
2556 * linux-low.h (ptid_of, pid_of, lwpid_of): Update.
2557 (get_lwp_thread): Update.
2558 (struct lwp_info): Rename member "head" to "entry".
2559 * regcache.h (inferior_list_entry): Delete.
2560 * server.c (kill_inferior_callback): Update.
2561 (detach_or_kill_inferior_callback): Update.
2562 (print_started_pid): Update.
2563 (print_attached_pid): Update.
2564 (process_serial_event): Simplify read of ptid.
2565 * thread-db.c (thread_db_create_event): Update.
2566 (thread_db_get_tls_address): Update.
2567 * win32-low.c (current_inferior_ptid): Simplify.
2568
2569 2014-02-19 Tom Tromey <tromey@redhat.com>
2570
2571 * target.h (struct target_ops) <supports_btrace>: Add target_ops
2572 argument.
2573 (target_supports_btrace): Update.
2574
2575 2014-02-14 Yao Qi <yao@codesourcery.com>
2576
2577 * Makefile.in (IPA_OBJS): Append rsp-low-ipa.o.
2578 (rsp-low-ipa.o): New target.
2579
2580 2014-02-12 Tom Tromey <tromey@redhat.com>
2581
2582 * ax.c (gdb_parse_agent_expr): Use hex2bin, not
2583 convert_ascii_to_int.
2584 * regcache.c (registers_to_string): Likewise.
2585 * remote-utils.c (decode_M_packet): Likewise.
2586 * server.c (process_serial_event): Likewise.
2587
2588 2014-02-12 Tom Tromey <tromey@redhat.com>
2589
2590 * server.c (handle_query, handle_v_run): Use hex2bin, not
2591 unhexify.
2592 * tracepoint.c (cmd_qtdpsrc, cmd_qtdv, cmd_qtnotes): Likewise.
2593
2594 2014-02-12 Tom Tromey <tromey@redhat.com>
2595
2596 * ax.c (gdb_unparse_agent_expr): Use bin2hex, not
2597 convert_int_to_ascii.
2598 * regcache.c (registers_to_string, collect_register_as_string):
2599 Likewise.
2600 * remote-utils.c (look_up_one_symbol, relocate_instruction):
2601 Likewise.
2602 * server.c (process_serial_event): Likewise.
2603 * tracepoint.c (cmd_qtstatus, response_source, response_tsv)
2604 (cmd_qtbuffer, cstr_to_hexstr): Likewise.
2605
2606 2014-02-12 Tom Tromey <tromey@redhat.com>
2607
2608 * remote-utils.c (look_up_one_symbol, monitor_output): Use
2609 bin2hex, not hexify.
2610 * tracepoint.c (cmd_qtstatus): Likewise.
2611
2612 2014-02-12 Tom Tromey <tromey@redhat.com>
2613
2614 * remote-utils.c (monitor_output): Pass explicit length to
2615 hexify.
2616
2617 2014-02-12 Tom Tromey <tromey@redhat.com>
2618
2619 * tracepoint.c: Include rsp-low.h.
2620 * server.c: Include rsp-low.h.
2621 * remote-utils.h (convert_ascii_to_int, convert_int_to_ascii)
2622 (unhexify, hexify, remote_escape_output, unpack_varlen_hex): Don't
2623 declare.
2624 * remote-utils.c: Include rsp-low.h.
2625 (fromhex, hexchars, ishex, unhexify, tohex, hexify)
2626 (remote_escape_output, remote_unescape_input, unpack_varlen_hex)
2627 (convert_int_to_ascii, convert_ascii_to_int): Move to
2628 common/rsp-low.c.
2629 * regcache.c: Include rsp-low.h.
2630 * ax.c: Include rsp-low.h.
2631 * Makefile.in (SFILES): Add common/rsp-low.c.
2632 (OBS): Add rsp-low.o.
2633 (rsp-low.o): New target.
2634
2635 2014-02-12 Tom Tromey <tromey@redhat.com>
2636
2637 * utils.h (pulongest, plongest, phex_nz): Don't declare.
2638 Include print-utils.h.
2639 * utils.c (NUMCELLS, CELLSIZE, get_cell, decimal2str, pulongest)
2640 (plongest, thirty_two, phex_nz): Remove.
2641 * Makefile.in (SFILES): Add common/print-utils.c.
2642 (OBS): Add print-utils.o.
2643 (print-utils-ipa.o): New target.
2644 (print-utils.o): New target.
2645 (IPA_OBJS): Add print-utils-ipa.o.
2646
2647 2014-02-06 Tom Tromey <tromey@redhat.com>
2648
2649 * Makefile.in (SFILES): Fix indentation.
2650
2651 2014-02-05 Doug Evans <dje@google.com>
2652
2653 * linux-low.c (linux_wait_for_event): Improve comment.
2654 (linux_wait_1): Keep current_inferior in sync with event_child.
2655
2656 2014-01-22 Doug Evans <dje@google.com>
2657
2658 * gdbthread.h (gdb_id_to_thread): Delete, unused.
2659
2660 2014-01-22 Doug Evans <dje@google.com>
2661
2662 * configure.ac (AC_CHECK_FUNCS): Add test for gettimeofday.
2663 * configure: Regenerate.
2664 * config.in: Regenerate.
2665 * Makefile.in (SFILES): Add debug.c.
2666 (OBS): Add debug.o.
2667 * debug.c: New file.
2668 * debug.h: New file.
2669 * linux-aarch64-low.c (*): Update all debugging printfs to use
2670 debug_printf instead of fprintf.
2671 * linux-arm-low.c (*): Ditto.
2672 * linux-cris-low.c (*): Ditto.
2673 * linux-crisv32-low.c (*): Ditto.
2674 * linux-m32r-low.c (*): Ditto.
2675 * linux-sparc-low.c (*): Ditto.
2676 * linux-x86.c (*): Ditto.
2677 * linux-low.c (*): Ditto.
2678 (linux_wait_1): Add calls to debug_enter, debug_exit.
2679 (linux_wait): Remove redundant debugging printf.
2680 (stop_all_lwps): Add calls to debug_enter, debug_exit.
2681 (linux_resume, unstop_all_lwps): Ditto.
2682 * mem-break.c (*): Update all debugging printfs to use
2683 debug_printf instead of fprintf.
2684 * remote-utils.c (*): Ditto.
2685 * thread-db.c (*): Ditto.
2686 * server.c #include <ctype.h>, "gdb_vecs.h".
2687 (debug_threads): Moved to debug.c.
2688 (*): Update all debugging printfs to use debug_printf instead of
2689 fprintf.
2690 (start_inferior): Replace call to fflush with call to debug_flush.
2691 (monitor_show_help): Mention set debug-format.
2692 (parse_debug_format_options): New function.
2693 (handle_monitor_command): Handle "monitor set debug-format".
2694 (gdbserver_usage): Mention --debug-format.
2695 (main): Parse --debug-format.
2696 * server.h (debug_threads): Declaration moved to debug.h.
2697 #include "debug.h".
2698 * tracepoint.c (trace_debug_1) [!IN_PROCESS_AGENT]: Add version of
2699 trace_debug_1 that uses debug_printf.
2700 (tracepoint_look_up_symbols): Update all debugging printfs to use
2701 debug_printf instead of fprintf.
2702
2703 2014-01-20 Baruch Siach <baruch@tkos.co.il>
2704
2705 * linux-xtensa-low.c: Include asm/ptrace.h instead of
2706 sys/ptrace.h.
2707
2708 2014-01-17 Pedro Alves <palves@redhat.com>
2709
2710 PR build/16445
2711 * linux-x86-low.c: Don't include elf/common.h if ELFMAG0 is
2712 defined after including gdb_proc_service.h.
2713
2714 2014-01-16 Doug Evans <dje@google.com>
2715
2716 * dll.c (UNSPECIFIED_CORE_ADDR): New macro.
2717 (match_dll): Use it.
2718
2719 2014-01-16 Markus Metzger <markus.t.metzger@intel.com>
2720
2721 * target.h (target_ops) <read_btrace>: Change parameters and
2722 return type to allow error reporting.
2723 * server.c (handle_qxfer_btrace): Support delta reads. Pass
2724 trace reading errors on.
2725 * linux-low.c (linux_low_read_btrace): Pass trace reading
2726 errors on.
2727 (linux_low_disable_btrace): New.
2728
2729 2014-01-15 Doug Evans <dje@google.com>
2730
2731 * inferiors.c (thread_id_to_gdb_id): Delete.
2732 * inferiors.h (thread_id_to_gdb_id): Delete.
2733
2734 2014-01-13 Eli Zaretskii <eliz@gnu.org>
2735
2736 * Makefile.in (INCLUDE_CFLAGS): Remove trailing slash from
2737 "-I$(srcdir)/../". Fixes MinGW compilation errors with old GCC
2738 versions.
2739
2740 2014-01-08 Pedro Alves <palves@redhat.com>
2741
2742 * server.c (handle_status): Don't discard previous queued stop
2743 replies or thread's pending status here.
2744 (main) <disconnection>: Do it here instead.
2745
2746 2014-01-08 Pedro Alves <palves@redhat.com>
2747
2748 * gdbthread.h (struct thread_info) <status_pending_p>: New field.
2749 * server.c (visit_actioned_threads, handle_pending_status): New
2750 function.
2751 (handle_v_cont): Factor out parts to ...
2752 (resume): ... this new function. If in all-stop, and a thread
2753 being resumed has a pending status, report it without actually
2754 resuming.
2755 (myresume): Adjust to use the new 'resume' function.
2756 (clear_pending_status_callback, set_pending_status_callback)
2757 (find_status_pending_thread_callback): New functions.
2758 (handle_status): Handle the case of multiple threads having
2759 interesting statuses to report. Report threads' real last signal
2760 instead of always reporting GDB_SIGNAL_TRAP. Look for a thread
2761 with an interesting thread to report the status for, instead of
2762 always reporting the status of the first thread.
2763
2764 2014-01-01 Joel Brobecker <brobecker@adacore.com>
2765
2766 * gdbserver.c (gdbserver_version): Set copyright year to 2014.
2767 * gdbreplay.c (gdbreplay_version): Likewise.
2768
2769 2013-12-18 Yufeng Zhang <yufeng.zhang@arm.com>
2770
2771 * linux-aarch64-low.c (aarch64_linux_set_debug_regs): Set
2772 iov.iov_len with the real length in use.
2773
2774 2013-12-13 Joel Brobecker <brobecker@adacore.com>
2775
2776 * Makefile.in (safe-ctype.o, lbasename.o): New rules.
2777 * configure.srv: Add safe-ctype.o and lbasename.o to srv_tgtobj
2778 for all targets that use win32-low.c.
2779 * win32-low.c (win32_ensure_ntdll_loaded): New function.
2780 (do_initial_child_stuff): Add call to win32_ensure_ntdll_loaded.
2781
2782 2013-12-13 Pedro Alves <palves@redhat.com>
2783
2784 * target.c (mywait): Set OURSTATUS->KIND to TARGET_WAITKIND_STOPPED
2785 if equal to TARGET_WAITKIND_LOADED.
2786 * win32-low.c (cached_status): New static global.
2787 (win32_wait): Add declaration.
2788 (do_initial_child_stuff): Flush all initial pending debug events
2789 up to the initial breakpoint.
2790 (win32_wait): If CACHED_STATUS was set, return that instead
2791 of doing a real wait. Remove the code resuming the execution
2792 of the inferior after receiving a TARGET_WAITKIND_LOADED event
2793 during the initial phase. Also remove the code changing
2794 OURSTATUS->KIND from TARGET_WAITKIND_LOADED to
2795 TARGET_WAITKIND_STOPPED.
2796
2797 2013-12-11 Yao Qi <yao@codesourcery.com>
2798
2799 * notif.c (handle_notif_ack): Return 0 if no notification
2800 matches.
2801
2802 2013-11-20 Doug Evans <dje@google.com>
2803
2804 * linux-low.c (linux_set_resume_request): Fix comment.
2805
2806 2013-11-20 Doug Evans <dje@google.com>
2807
2808 * linux-low.c (resume_status_pending_p): Tweak comment.
2809
2810 2013-11-20 Walfred Tedeschi <walfred.tedeschi@intel.com>
2811
2812 * Makefile.in: Add i386-mpx.c, i386-mpx-linux.c, amd64-mpx.c,
2813 amd64-mpx-linux.c, x32-mpx.c and x32-mpx-linux.c generation.
2814 * configure.srv (srv_i386_regobj): Add i386-mpx.o.
2815 (srv_i386_linux_regobj): Add i386-mpx-linux.o.
2816 (srv_amd64_regobj): Add amd64-mpx.o.
2817 (srv_amd64_linux_regobj): Add amd64-mpx-linux.o.
2818 (srv_i386_32bit_xmlfiles): Add i386/32bit-mpx.xml.
2819 (srv_i386_64bit_xmlfiles): Add i386/64bit-mpx.xml.
2820 * i387-fp.c (num_pl_bnd_register) Added constant.
2821 (num_pl_bnd_cfg_registers) Added constant.
2822 (struct i387_xsave) Added reserved area and MPX fields.
2823 (i387_cache_to_xsave, i387_xsave_to_cache) Add MPX.
2824 * linux-x86-low.c (init_registers_i386_mpx_linux): Declare new
2825 function.
2826 (tdesc_i386_mpx_linux): Add MPX amd64 target.
2827 (init_registers_amd64_mpx_linux): Declare new function.
2828 (tdesc_amd64_mpx_linux): Add MPX amd64 target.
2829 (x86_64_regmap): Add MPX registers.
2830 (x86_linux_read_description): Add MPX case.
2831 (initialize_low_arch): Initialize MPX targets.
2832
2833 2013-11-18 Tom Tromey <tromey@redhat.com>
2834
2835 * configure: Rebuild.
2836 * configure.ac: Don't check for stdlib.h.
2837 * gdbreplay.c: Unconditionally include stdlib.h.
2838
2839 2013-11-18 Tom Tromey <tromey@redhat.com>
2840
2841 * config.in: Rebuild.
2842 * configure: Rebuild.
2843 * configure.ac: Don't use AC_HEADER_DIRENT.
2844
2845 2013-11-18 Tom Tromey <tromey@redhat.com>
2846
2847 * server.h: Don't check HAVE_STRING_H.
2848 * gdbreplay.c: Don't check HAVE_STRING_H.
2849 * configure: Rebuild.
2850
2851 2013-11-18 Tom Tromey <tromey@redhat.com>
2852
2853 * Makefile.in (gdbreplay$(EXEEXT)): Depend on and link against
2854 LIBGNU.
2855
2856 2013-11-08 Tom Tromey <tromey@redhat.com>
2857
2858 * configure, config.in: Rebuild.
2859 * configure.ac: Remove unused configury.
2860
2861 2013-11-08 Tom Tromey <tromey@redhat.com>
2862
2863 * acinclude.m4: Include common.m4, codeset.m4.
2864 * configure, config.in: Rebuild.
2865 * configure.ac: Use GDB_AC_COMMON.
2866
2867 2013-11-06 Andreas Arnez <arnez@linux.vnet.ibm.com>
2868
2869 * linux-s390-low.c (HWCAP_S390_TE): New define.
2870 (s390_arch_setup): Consider the TE field in the HWCAP for
2871 determining 'have_regset_tdb'.
2872
2873 2013-10-16 Sergio Durigan Junior <sergiodj@redhat.com>
2874
2875 PR gdb/16014
2876 * tracepoint.c (download_tracepoint_1): Remove unnecessary double
2877 call to sizeof.
2878
2879 2013-10-02 Pedro Alves <palves@redhat.com>
2880
2881 * server.c (process_serial_event): Don't output "GDBserver
2882 exiting" if GDB is connected through stdio.
2883 * target.c (mywait): Likewise, be silent if GDB is connected
2884 through stdio.
2885
2886 2013-10-01 Joel Brobecker <brobecker@adacore.com>
2887
2888 * lynx-low.c (lynx_add_threads_after_attach): New function.
2889 (lynx_attach): Remove call to add_thread. Add call to
2890 lynx_add_threads_after_attach instead.
2891
2892 2013-09-28 Mike Frysinger <vapier@gentoo.org>
2893
2894 * configure.ac (AC_CHECK_HEADERS): Add sys/syscall.h
2895 * config.in, configure: Regenerated.
2896
2897 2013-09-18 Yao Qi <yao@codesourcery.com>
2898
2899 PR server/15959
2900 * server.c (start_inferior): Clear 'resume_info'.
2901
2902 2013-09-16 Jiong Wang <jiwang@tilera.com>
2903
2904 * linux-tile-low.c (tile_regsets): Modify the size field to 64-bit
2905 for each register.
2906
2907 2013-09-16 Jiong Wang <jiwang@tilera.com>
2908
2909 * configure.srv <tilegx*-*-linux*>: Remove linux-osdata.o from and add
2910 linux-tile-low.o to srv_tgtobj.
2911
2912 2013-09-16 Will Newton <will.newton@linaro.org>
2913
2914 * linux-aarch64-low.c (aarch64_linux_set_debug_regs): Zero
2915 out regs.
2916
2917 2013-09-06 Pedro Alves <palves@redhat.com>
2918
2919 * Makefile.in (gdb_proc_service_h, regdef_h, regcache_h)
2920 (signals_def, signals_h, ptid_h, ax_h, agent_h, linux_btrace_h)
2921 (linux_osdata_h, vec_h, gdb_vecs_h, host_defs_h, libiberty_h)
2922 (server_h, gdbthread_h, linux_low_h, linux_ptrace_h)
2923 (gdb_thread_db_h, linux_procfs_h, lynx_low_h, nto_low_h)
2924 (mips_linux_watch_h, i386_low_h, win32_low_h): Delete.
2925
2926 2013-09-06 Pedro Alves <palves@redhat.com>
2927
2928 * Makefile.in (linux-btrace.o, mips-linux-watch.o): Remove
2929 explicit header dependencies and use $COMPILE/$POSTCOMPILE.
2930
2931 2013-09-06 Pedro Alves <palves@redhat.com>
2932
2933 * linux-amd64-ipa.c: Include tracepoint.h.
2934 * linux-i386-ipa.c: Include tracepoint.h.
2935
2936 2013-09-06 Ricard Wanderlof <ricardw@axis.com>
2937
2938 * linux-crisv32-low.c (PTRACE_GET_THREAD_AREA): New macro.
2939 (ps_get_thread_area): New function.
2940
2941 2013-09-06 Ricard Wanderlof <ricardw@axis.com>
2942
2943 * linux-crisv32-low.c (elf_gregset_t): Delete typedef.
2944 (initialize_low_arch): Call init_registers_crisv32 rather than
2945 init_register_crisv32.
2946
2947 2013-09-05 Pedro Alves <palves@redhat.com>
2948
2949 * server.h (handle_vFile, hostio_last_error_from_errno): Move
2950 to ...
2951 * hostio.h: ... this new file.
2952 * hostio.c, server.c, linux-low.c, nto-low.c, spu-low,
2953 win32-low.c: Include hostio.h.
2954
2955 2013-09-05 Pedro Alves <palves@redhat.com>
2956
2957 * server.h (gdb_client_data, handler_func, callback_handler_func)
2958 (delete_file_handler, add_file_handler, append_callback_event)
2959 (delete_callback_event, start_event_loop, initialize_event_loop):
2960 Move to event-loop.h and include it.
2961 * event-loop.h: New file.
2962
2963 2013-09-05 Pedro Alves <palves@redhat.com>
2964
2965 * dll.c, inferiors.c, remote-utils.c, server.c: Include "dll.h".
2966 * server.h (struct dll_info, all_dlls, dlls_changed, clear_dlls)
2967 (loaded_dll, unloaded_dll): Move to ...
2968 * dll.h: ... this new file.
2969 * inferiors.c, remote-utils.c, win32-low.c: Include "dll.h".
2970
2971 2013-09-05 Pedro Alves <palves@redhat.com>
2972
2973 * server.h (current_process, get_thread_process, all_processes)
2974 (add_inferior_to_list, for_each_inferior, current_inferior)
2975 (remove_inferior, add_process, remove_process, find_process_pid)
2976 (have_started_inferiors_p, have_attached_inferiors_p)
2977 (thread_id_to_gdb_id, thread_to_gdb_id, gdb_id_to_thread_id)
2978 (clear_inferiors, find_inferior, find_inferior_id)
2979 (inferior_target_data, set_inferior_target_data)
2980 (inferior_regcache_data, set_inferior_regcache_data): Move to
2981 inferiors.h, and include it.
2982 * inferiors.h: New file.
2983
2984 2013-09-05 Pedro Alves <palves@redhat.com>
2985
2986 * server.h (struct emit_ops, current_insn_ptr, emit_error):
2987 Move ...
2988 * ax.h: ... here.
2989
2990 2013-09-05 Pedro Alves <palves@redhat.com>
2991
2992 * ax.c, linux-low.c, linux-x86-low.c, server.c: Include
2993 tracepoint.h.
2994 * server.h (IPA_BUFSIZ, initialize_tracepoint, tracing)
2995 (disconnected_tracing, tracepoint_look_up_symbols, stop_tracing
2996 (handle_tracepoint_general_set, handle_tracepoint_query)
2997 (tracepoint_finished_step, tracepoint_was_hit)
2998 (release_while_stepping_state_list, current_traceframe)
2999 (in_readonly_region, traceframe_read_mem)
3000 (fetch_traceframe_registers, traceframe_read_sdata)
3001 (traceframe_read_info, struct fast_tpoint_collect_status)
3002 (fast_tracepoint_collecting, force_unlock_trace_buffer)
3003 (handle_tracepoit_bkpts, initialize_low_tracepoint)
3004 (supply_fast_tracepoint_registers)
3005 (supply_static_tracepoint_registers, set_trampoline_buffer_space)
3006 (ipa_tdesc, claim_trampoline_space)
3007 (have_fast_tracepoint_trampoline_buffer, gdb_agent_about_to_close)
3008 (agent_mem_read, agent_get_trace_state_variable_value)
3009 (agent_set_trace_state_variable_value, agent_tsv_read)
3010 (agent_mem_read_string, get_raw_reg_func_addr)
3011 (get_get_tsv_func_addr, get_set_tsv_func_addr): Move to ...
3012 * tracepoint.h: ... this new file.
3013
3014 2013-09-05 Pedro Alves <palves@redhat.com>
3015
3016 * server.h (perror_with_name, error, fatal, warning, paddress)
3017 (pulongest, plongest, phex_nz, pfildes): Move to utils.h, and
3018 include it.
3019 * utils.h: New file.
3020
3021 2013-09-05 Pedro Alves <palves@redhat.com>
3022
3023 * server.h (remote_debug, noack_mode, transport_is_reliable)
3024 (gdb_connected, STDIO_CONNECTION_NAME, remote_connection_is_stdio)
3025 (read_ptid, write_ptid, putpkt, putpkt_binary, putpkt_notif)
3026 (getpkt, remote_prepare, remote_open, remote_close, write_ok)
3027 (write_enn, initialize_async_io, enable_async_io)
3028 (disable_async_io, check_remote_input_interrupt_request)
3029 (convert_ascii_to_int, convert_int_to_ascii, new_thread_notify)
3030 (dead_thread_notify, prepare_resume_reply)
3031 (decode_address_to_semicolon, decode_address, decode_m_packet)
3032 (decode_M_packet, decode_X_packet, decode_xfer_write)
3033 (decode_search_memory_packet, unhexify, hexify)
3034 (remote_escape_output, unpack_varlen_hex, clear_symbol_cache)
3035 (look_up_one_symbol, relocate_instruction)
3036 (monitor_output): Move to remote-utils.h, and include it.
3037 * remote-utils.h: New file.
3038
3039 2013-09-05 Pedro Alves <palves@redhat.com>
3040
3041 * server.h (_): Delete.
3042
3043 2013-09-02 Pedro Alves <palves@redhat.com>
3044
3045 * tracepoint.c (TRACEFRAME_EOB_MARKER_SIZE): New macro.
3046 (init_trace_buffer): Ensure at least TRACEFRAME_EOB_MARKER_SIZE is
3047 allocated.
3048 (trace_buffer_alloc): Use TRACEFRAME_EOB_MARKER_SIZE.
3049
3050 2013-09-02 Pierre Muller <muller@sourceware.org>
3051
3052 * win32-low.c (child_xfer_memory): Check if ReadProcessMemory
3053 or WriteProcessMemory complete successfully and handle
3054 ERROR_PARTIAL_COPY error.
3055
3056 2013-09-02 Pedro Alves <palves@redhat.com>
3057
3058 * server.c (gdb_read_memory): Return -1 on traceframe memory read
3059 error instead of EIO.
3060
3061 2013-08-28 Jan Kratochvil <jan.kratochvil@redhat.com>
3062
3063 PR server/15604
3064 * linux-low.c: Include filestuff.h.
3065 (linux_create_inferior) <pid == 0>: Call close_most_fds.
3066 * lynx-low.c: Include filestuff.h.
3067 (lynx_create_inferior) <pid == 0>: Call close_most_fds.
3068 * server.c: Include filestuff.h.
3069 (main): Call notice_open_fds.
3070 * spu-low.c: Include filestuff.h.
3071 (spu_create_inferior) <pid == 0>: Call close_most_fds.
3072
3073 2013-08-22 Luis Machado <lgustavo@codesourcery.com>
3074
3075 * Makefile.in: Explain why ../target and ../nat are not
3076 listed as include file search paths.
3077 (linux-waitpid.o): New object file rule.
3078 * configure.srv (srv_native_linux_obj): New variable.
3079 Replace all occurrences of linux native object files with
3080 $srv_native_linux_obj.
3081 * linux-low.c: Include nat/linux-nat.h and nat/linux-waitpid.h.
3082 (HAS_NOMMU): Move defining logic to common/linux-ptrace.c.
3083 (linux_enable_event_reporting): Remove declaration.
3084 (my_waitpid): Moved to common/linux-waitpid.c.
3085 (linux_wait_for_event): Pass ptid when calling
3086 linux_enable_event_reporting.
3087 (linux_supports_tracefork_flag): Remove.
3088 (linux_enable_event_reporting): Likewise.
3089 (linux_tracefork_grandchild): Remove.
3090 (STACK_SIZE): Moved to common/linux-ptrace.c.
3091 (linux_tracefork_child): Remove.
3092 (linux_test_for_tracefork): Remove.
3093 (linux_look_up_symbols): Call linux_supports_traceclone.
3094 (initialize_low): Remove call to linux_test_for_tracefork.
3095 * linux-low.h (PTRACE_TYPE_ARG3): Move to
3096 common/linux-ptrace.h.
3097 (PTRACE_TYPE_ARG4): Likewise.
3098 Include linux-ptrace.h.
3099
3100 2013-08-21 Pedro Alves <palves@redhat.com>
3101
3102 * config.in: Renegerate.
3103
3104 2013-08-19 Luis Machado <lgustavo@codesourcery.com>
3105
3106 * Makefile.in (INCLUDE_CFLAGS): Include -I$(srcdir)/../.
3107 (SFILES): Remove $(srcdir)/common/target-common.c and
3108 add $(srcdir)/target/waitstatus.c.
3109 (OBS): Remove target-common.o and add waitstatus.o.
3110 (server_h): Remove $(srcdir)/../common/target-common.h and
3111 add $(srcdir)/../target/resume.h, $(srcdir)/../target/wait.h
3112 and $(srcdir)/../target/waitstatus.h.
3113 (target-common.o): Remove.
3114 (waitstatus.o): New target object file.
3115 * target.h: Do not include target-common.h and
3116 include target/resume.h, target/wait.h and
3117 target/waitstatus.h.
3118
3119 2013-08-13 Luis Machado <lgustavo@codesourcery.com>
3120
3121 * linux-arm-low.c: Rename all occurrences of PTRACE_ARG3_TYPE
3122 to PTRACE_TYPE_ARG3.
3123 * linux-low.c: Rename all occurrences of PTRACE_ARG3_TYPE
3124 to PTRACE_TYPE_ARG3 and PTRACE_ARG4_TYPE to
3125 PTRACE_TYPE_ARG4.
3126 * linux-low.h (PTRACE_ARG3_TYPE): Rename to PTRACE_TYPE_ARG3.
3127 (PTRACE_ARG4_TYPE): Rename to PTRACE_TYPE_ARG4.
3128
3129 2013-07-27 Jie Zhang <jie@codesourcery.com>
3130 Daniel Jacobowitz <dan@codesourcery.com>
3131 Yao Qi <yao@codesourcery.com>
3132
3133 * Makefile.in (SFILES): Add common/mips-linux-watch.c.
3134 (mips-linux-watch.o): New rule.
3135 (mips_linux_watch_h): New variable.
3136 * configure.srv <mips*-*-linux*>: Add mips-linux-watch.o to
3137 srv_tgtobj.
3138 * linux-mips-low.c: Include mips-linux-watch.h.
3139 (struct arch_process_info, struct arch_lwp_info): New.
3140 (update_watch_registers_callback): New function.
3141 (mips_linux_new_process, mips_linux_new_thread) New functions.
3142 (mips_linux_prepare_to_resume, mips_insert_point): New
3143 functions.
3144 (mips_remove_point, mips_stopped_by_watchpoint): New
3145 functions.
3146 (rsp_bp_type_to_target_hw_bp_type): New function.
3147 (mips_stopped_data_address): New function.
3148 (the_low_target): Add watchpoint support functions.
3149
3150 2013-07-27 Yao Qi <yao@codesourcery.com>
3151
3152 * i386-low.c: Include break-common.h.
3153 (enum target_hw_bp_type): Remove.
3154
3155 2013-07-24 Luis Machado <lgustavo@codesourcery.com>
3156
3157 * Makefile.in (SFILES): /common/target-common.c.
3158 (OBS): Add target-common.o.
3159 (server_h): Add $(srcdir)/../common/target-common.h.
3160 (target-common.o): New target.
3161 * server.c (queue_stop_reply_callback): Free
3162 status string after use.
3163 * target.c (target_waitstatus_to_string): Remove.
3164 * target.h: Include target-common.h.
3165 (resume_kind): Likewise.
3166 (target_waitkind): Likewise.
3167 (target_waitstatus): Likewise.
3168 (TARGET_WNOHANG): Likewise.
3169
3170 2013-07-04 Yao Qi <yao@codesourcery.com>
3171
3172 * Makefile.in (host_alias): Use @host_noncanonical@.
3173 (target_alias): Use @target_noncanonical@.
3174 * configure.ac: Use ACX_NONCANONICAL_TARGET and
3175 ACX_NONCANONICAL_HOST.
3176 * configure: Regenerated.
3177
3178 Revert:
3179 2013-06-28 Mircea Gherzan <mircea.gherzan@intel.com>
3180
3181 * configure.ac (version_host, version_target): Set and AC_SUBST them.
3182 * configure: Rebuild.
3183 * Makefile.in (version_host, version_target): Get from configure.
3184 (version.c): Use $(version_host) and $(version_target).
3185
3186 2013-07-03 Pedro Alves <palves@redhat.com>
3187
3188 * Makefile.in (config.status): Depend on development.sh.
3189 * acinclude.m4: Include libmcheck.m4.
3190 * configure: Regenerate.
3191
3192 2013-07-02 Mircea Gherzan <mircea.gherzan@intel.com>
3193
3194 * win32-low.c (winapi_DebugActiveProcessStop): Move the WINAPI
3195 attribute inside the parentheses.
3196 (winapi_DebugSetProcessKillOnExit): Ditto.
3197 (winapi_DebugBreakProcess): Ditto.
3198 (winapi_GenerateConsoleCtrlEvent): Ditto.
3199
3200 2013-07-02 Mircea Gherzan <mircea.gherzan@intel.com>
3201
3202 * notif.h (notif_event): Add a dummy member to avoid compiler
3203 errors.
3204
3205 2013-07-01 Pedro Alves <palves@redhat.com>
3206
3207 * hostio.c (HOSTIO_PATH_MAX): Define.
3208 (require_filename, handle_open, handle_unlink, handle_readlink):
3209 Use it.
3210
3211 2013-07-01 Pedro Alves <palves@redhat.com>
3212
3213 * server.h: Include "pathmax.h".
3214 * linux-low.c: Don't include sys/param.h.
3215 (linux_pid_exe_is_elf_64_file): Use PATH_MAX instead of
3216 MAXPATHLEN.
3217 * win32-low.c: Don't include sys/param.h.
3218 (win32_create_inferior): Use PATH_MAX instead of MAXPATHLEN.
3219
3220 2013-07-01 Pedro Alves <palves@redhat.com>
3221
3222 * event-loop.c: Don't check HAVE_UNISTD_H before including
3223 <unistd.h>.
3224 * gdbreplay.c: Likewise.
3225 * remote-utils.c: Likewise.
3226 * server.c: Likewise.
3227 * configure.ac: Don't check for unistd.h.
3228 * configure: Regenerate.
3229
3230 2013-06-28 Tom Tromey <tromey@redhat.com>
3231
3232 * Makefile.in (version.c): Use version.in, not
3233 common/version.in.
3234
3235 2013-06-28 Mircea Gherzan <mircea.gherzan@intel.com>
3236
3237 * configure.ac (version_host, version_target): Set and AC_SUBST them.
3238 * configure: Rebuild.
3239 * Makefile.in (version_host, version_target): Get from configure.
3240 (version.c): Use $(version_host) and $(version_target).
3241
3242 2013-06-10 Dmitry Kozlov <ddk@codesourcery.com>
3243
3244 Fix trace-status to output user name without trailing colon.
3245 * tracepoint.c (cmd_qtstatus): Remove unnecessary colon from user name.
3246
3247 2013-06-10 Dmitry Kozlov <ddk@codesourcery.com>
3248
3249 Fix trace-status to output proper start-time and stop-time.
3250 * tracepoint.c (cmd_qtstatus): Modify trace-status output to
3251 output start time and stop time in hex as gdb expects.
3252
3253 2013-06-26 Pedro Alves <pedro@codesourcery.com>
3254
3255 * tracepoint.c (build_traceframe_info_xml): Output trace state
3256 variables present in the trace buffer.
3257
3258 2013-06-24 Tom Tromey <tromey@redhat.com>
3259
3260 * Makefile.in (version.c): Use bfd/version.h, common/version.in,
3261 create-version.sh.
3262 (version.o): Remove.
3263 * gdbreplay.c: Include version.h.
3264 (version, host_name): Don't declare.
3265 * server.h: Include version.h.
3266 (version, host_name): Don't declare.
3267
3268 2013-06-12 Pedro Alves <palves@redhat.com>
3269
3270 * linux-x86-low.c (linux_is_elf64): Delete global.
3271 (x86_siginfo_fixup): Replace reference to `linux_is_elf64' global
3272 with local linux_pid_exe_is_elf_64_file use.
3273
3274 2013-06-11 Pedro Alves <palves@redhat.com>
3275
3276 * linux-low.c (regset_disabled, disable_regset): New functions.
3277 (regsets_fetch_inferior_registers)
3278 (regsets_store_inferior_registers): Use them.
3279 (initialize_regsets_info); Don't allocate the disabled_regsets
3280 array here.
3281 * linux-low.h (struct regsets_info) <disabled_regsets>: Extend
3282 comment.
3283
3284 2013-06-11 Pedro Alves <palves@redhat.com>
3285
3286 * linux-low.c (initialize_regsets_info): Use xcalloc instead of
3287 xmalloc.
3288
3289 2013-06-11 Pedro Alves <palves@redhat.com>
3290
3291 * linux-x86-low.c (initialize_low_arch): Call
3292 init_registers_x32_avx_linux.
3293
3294 2013-06-09 Jan Kratochvil <jan.kratochvil@redhat.com>
3295
3296 Fix compatibility with Android Bionic.
3297 * linux-low.c (linux_qxfer_libraries_svr4): Ignore first entry even if
3298 it is not empty.
3299
3300 2013-06-07 Pedro Alves <palves@redhat.com>
3301
3302 PR server/14823
3303 * Makefile.in (OBS): Add tdesc.o.
3304 (IPA_OBJS): Add tdesc-ipa.o.
3305 (tdesc-ipa.o): New rule.
3306 * ax.c (gdb_eval_agent_expr): Adjust register_size call to new
3307 interface.
3308 * linux-low.c (new_inferior): Delete.
3309 (disabled_regsets, num_regsets): Delete.
3310 (linux_add_process): Adjust to set the new per-process
3311 new_inferior flag.
3312 (linux_detach_one_lwp): Adjust to call regcache_invalidate_thread.
3313 (linux_wait_for_lwp): Adjust. Only call arch_setup if the event
3314 was a stop. When calling arch_setup, switch the current inferior
3315 to the thread that got an event.
3316 (linux_resume_one_lwp): Adjust to call regcache_invalidate_thread.
3317 (regsets_fetch_inferior_registers)
3318 (regsets_store_inferior_registers): New regsets_info parameter.
3319 Adjust to use it.
3320 (linux_register_in_regsets): New regs_info parameter. Adjust to
3321 use it.
3322 (register_addr, fetch_register, store_register): New usrregs_info
3323 parameter. Adjust to use it.
3324 (usr_fetch_inferior_registers, usr_store_inferior_registers): New
3325 parameter regs_info. Adjust to use it.
3326 (linux_fetch_registers): Get the current inferior's regs_info, and
3327 adjust to use it.
3328 (linux_store_registers): Ditto.
3329 [HAVE_LINUX_REGSETS] (initialize_regsets_info): New.
3330 (initialize_low): Don't initialize the target_regsets here. Call
3331 initialize_low_arch.
3332 * linux-low.h (target_regsets): Delete declaration.
3333 (struct regsets_info): New.
3334 (struct usrregs_info): New.
3335 (struct regs_info): New.
3336 (struct process_info_private) <new_inferior>: New field.
3337 (struct linux_target_ops): Delete the num_regs, regmap, and
3338 regset_bitmap fields. New field regs_info.
3339 [HAVE_LINUX_REGSETS] (initialize_regsets_info): Declare.
3340 * i387-fp.c (num_xmm_registers): Delete.
3341 (i387_cache_to_fsave, i387_fsave_to_cache): Adjust find_regno
3342 calls to new interface.
3343 (i387_cache_to_fxsave, i387_cache_to_xsave, i387_fxsave_to_cache)
3344 (i387_xsave_to_cache): Adjust find_regno calls to new interface.
3345 Infer the number of xmm registers from the regcache's target
3346 description.
3347 * i387-fp.h (num_xmm_registers): Delete.
3348 * inferiors.c (add_thread): Don't install the thread's regcache
3349 here.
3350 * proc-service.c (gregset_info): Fetch the current inferior's
3351 regs_info. Adjust to use it.
3352 * regcache.c: Include tdesc.h.
3353 (register_bytes, reg_defs, num_registers)
3354 (gdbserver_expedite_regs): Delete.
3355 (get_thread_regcache): If the thread doesn't have a regcache yet,
3356 create one, instead of aborting gdbserver.
3357 (regcache_invalidate_one): Rename to ...
3358 (regcache_invalidate_thread): ... this.
3359 (regcache_invalidate_one): New.
3360 (regcache_invalidate): Only invalidate registers of the current
3361 process.
3362 (init_register_cache): Add target_desc parameter, and use it.
3363 (new_register_cache): Ditto. Assert the target description has a
3364 non zero registers_size.
3365 (regcache_cpy): Add assertions. Adjust.
3366 (realloc_register_cache, set_register_cache): Delete.
3367 (registers_to_string, registers_from_string): Adjust.
3368 (find_register_by_name, find_regno, find_register_by_number)
3369 (register_cache_size): Add target_desc parameter, and use it.
3370 (free_register_cache_thread, free_register_cache_thread_one)
3371 (regcache_release, register_cache_size): New.
3372 (register_size): Add target_desc parameter, and use it.
3373 (register_data, supply_register, supply_register_zeroed)
3374 (supply_regblock, supply_register_by_name, collect_register)
3375 (collect_register_as_string, collect_register_by_name): Adjust.
3376 * regcache.h (struct target_desc): Forward declare.
3377 (struct regcache) <tdesc>: New field.
3378 (init_register_cache, new_register_cache): Add target_desc
3379 parameter.
3380 (regcache_invalidate_thread): Declare.
3381 (regcache_invalidate_one): Delete declaration.
3382 (regcache_release): Declare.
3383 (find_register_by_number, register_cache_size, register_size)
3384 (find_regno): Add target_desc parameter.
3385 (gdbserver_expedite_regs, gdbserver_xmltarget): Delete
3386 declarations.
3387 * remote-utils.c: Include tdesc.h.
3388 (outreg, prepare_resume_reply): Adjust.
3389 * server.c: Include tdesc.h.
3390 (gdbserver_xmltarget): Delete declaration.
3391 (get_features_xml, process_serial_event): Adjust.
3392 * server.h [IN_PROCESS_AGENT] (struct target_desc): Forward
3393 declare.
3394 (struct process_info) <tdesc>: New field.
3395 (ipa_tdesc): Declare.
3396 * tdesc.c: New file.
3397 * tdesc.h: New file.
3398 * tracepoint.c: Include tdesc.h.
3399 [IN_PROCESS_AGENT] (ipa_tdesc): Define.
3400 (get_context_regcache): Adjust to pass ipa_tdesc down.
3401 (do_action_at_tracepoint): Adjust to get the register cache size
3402 from the context regcache's description.
3403 (traceframe_walk_blocks): Adjust to get the register cache size
3404 from the current trace frame's description.
3405 (traceframe_get_pc): Adjust to get current trace frame's
3406 description and pass it down.
3407 (gdb_collect): Adjust to get the register cache size from the
3408 IPA's description.
3409 * linux-amd64-ipa.c (tdesc_amd64_linux): Declare.
3410 (gdbserver_xmltarget): Delete.
3411 (initialize_low_tracepoint): Set the ipa's target description.
3412 * linux-i386-ipa.c (tdesc_i386_linux): Declare.
3413 (initialize_low_tracepoint): Set the ipa's target description.
3414 * linux-x86-low.c: Include tdesc.h.
3415 [__x86_64__] (is_64bit_tdesc): New.
3416 (ps_get_thread_area, x86_get_thread_area): Use it.
3417 (i386_cannot_store_register): Rename to ...
3418 (x86_cannot_store_register): ... this. Use is_64bit_tdesc.
3419 (i386_cannot_fetch_register): Rename to ...
3420 (x86_cannot_fetch_register): ... this. Use is_64bit_tdesc.
3421 (x86_fill_gregset, x86_store_gregset): Adjust register_size calls
3422 to new interface.
3423 (target_regsets): Rename to ...
3424 (x86_regsets): ... this.
3425 (x86_get_pc, x86_set_pc): Adjust register_size calls to new
3426 interface.
3427 (x86_siginfo_fixup): Use is_64bit_tdesc.
3428 [__x86_64__] (tdesc_amd64_linux, tdesc_amd64_avx_linux)
3429 (tdesc_x32_avx_linux, tdesc_x32_linux)
3430 (tdesc_i386_linux, tdesc_i386_mmx_linux, tdesc_i386_avx_linux):
3431 Declare.
3432 (x86_linux_update_xmltarget): Delete.
3433 (I386_LINUX_XSAVE_XCR0_OFFSET): Define.
3434 (have_ptrace_getfpxregs, have_ptrace_getregset): New.
3435 (AMD64_LINUX_USER64_CS): New.
3436 (x86_linux_read_description): New, based on
3437 x86_linux_update_xmltarget.
3438 (same_process_callback): New.
3439 (x86_arch_setup_process_callback): New.
3440 (x86_linux_update_xmltarget): New.
3441 (x86_regsets_info): New.
3442 (amd64_linux_regs_info): New.
3443 (i386_linux_usrregs_info): New.
3444 (i386_linux_regs_info): New.
3445 (x86_linux_regs_info): New.
3446 (x86_arch_setup): Reimplement.
3447 (x86_install_fast_tracepoint_jump_pad): Use is_64bit_tdesc.
3448 (x86_emit_ops): Ditto.
3449 (the_low_target): Adjust. Install x86_linux_regs_info,
3450 x86_cannot_fetch_register, and x86_cannot_store_register.
3451 (initialize_low_arch): New.
3452 * linux-ia64-low.c (tdesc_ia64): Declare.
3453 (ia64_fetch_register): Adjust.
3454 (ia64_usrregs_info, regs_info): New globals.
3455 (ia64_regs_info): New function.
3456 (the_low_target): Adjust.
3457 (initialize_low_arch): New function.
3458 * linux-sparc-low.c (tdesc_sparc64): Declare.
3459 (sparc_fill_gregset_to_stack, sparc_store_gregset_from_stack):
3460 Adjust.
3461 (sparc_arch_setup): New function.
3462 (sparc_regsets_info, sparc_usrregs_info, regs_info): New globals.
3463 (the_low_target): Adjust.
3464 (initialize_low_arch): New function.
3465 * linux-ppc-low.c (tdesc_powerpc_32l, tdesc_powerpc_altivec32l)
3466 (tdesc_powerpc_cell32l, tdesc_powerpc_vsx32l)
3467 (tdesc_powerpc_isa205_32l, tdesc_powerpc_isa205_altivec32l)
3468 (tdesc_powerpc_isa205_vsx32l, tdesc_powerpc_e500l)
3469 (tdesc_powerpc_64l, tdesc_powerpc_altivec64l)
3470 (tdesc_powerpc_cell64l, tdesc_powerpc_vsx64l)
3471 (tdesc_powerpc_isa205_64l, tdesc_powerpc_isa205_altivec64l)
3472 (tdesc_powerpc_isa205_vsx64l): Declare.
3473 (ppc_cannot_store_register, ppc_collect_ptrace_register)
3474 (ppc_supply_ptrace_register, parse_spufs_run, ppc_get_pc)
3475 (ppc_set_pc, ppc_get_hwcap): Adjust.
3476 (ppc_usrregs_info): Forward declare.
3477 (!__powerpc64__) ppc_regmap_adjusted: New global.
3478 (ppc_arch_setup): Adjust to the current process'es target
3479 description.
3480 (ppc_fill_vsxregset, ppc_store_vsxregset, ppc_fill_vrregset)
3481 (ppc_store_vrregset, ppc_fill_evrregset, ppc_store_evrregse)
3482 (ppc_store_evrregset): Adjust.
3483 (target_regsets): Rename to ...
3484 (ppc_regsets): ... this, and make static.
3485 (ppc_usrregs_info, ppc_regsets_info, regs_info): New globals.
3486 (ppc_regs_info): New function.
3487 (the_low_target): Adjust.
3488 (initialize_low_arch): New function.
3489 * linux-s390-low.c (tdesc_s390_linux32, tdesc_s390_linux32v1)
3490 (tdesc_s390_linux32v2, tdesc_s390_linux64, tdesc_s390_linux64v1)
3491 (tdesc_s390_linux64v2, tdesc_s390x_linux64, tdesc_s390x_linux64v1)
3492 (tdesc_s390x_linux64v2): Declare.
3493 (s390_collect_ptrace_register, s390_supply_ptrace_register)
3494 (s390_fill_gregset, s390_store_last_break): Adjust.
3495 (target_regsets): Rename to ...
3496 (s390_regsets): ... this, and make static.
3497 (s390_get_pc, s390_set_pc): Adjust.
3498 (s390_get_hwcap): New target_desc parameter, and use it.
3499 [__s390x__] (have_hwcap_s390_high_gprs): New global.
3500 (s390_arch_setup): Adjust to set the current process'es target
3501 description. Don't adjust the regmap.
3502 (s390_usrregs_info, s390_regsets_info, regs_info): New globals.
3503 [__s390x__] (s390_usrregs_info_3264, s390_regsets_info_3264)
3504 (regs_info_3264): New globals.
3505 (s390_regs_info): New function.
3506 (the_low_target): Adjust.
3507 (initialize_low_arch): New function.
3508 * linux-mips-low.c (tdesc_mips_linux, tdesc_mips_dsp_linux)
3509 (tdesc_mips64_linux, tdesc_mips64_dsp_linux): Declare.
3510 [__mips64] (init_registers_mips_linux)
3511 (init_registers_mips_dsp_linux): Delete defines.
3512 [__mips64] (tdesc_mips_linux, tdesc_mips_dsp_linux): New defines.
3513 (have_dsp): New global.
3514 (mips_read_description): New, based on mips_arch_setup.
3515 (mips_arch_setup): Reimplement.
3516 (get_usrregs_info): New function.
3517 (mips_cannot_fetch_register, mips_cannot_store_register)
3518 (mips_get_pc, mips_set_pc, mips_fill_gregset, mips_store_gregset)
3519 (mips_fill_fpregset, mips_store_fpregset): Adjust.
3520 (target_regsets): Rename to ...
3521 (mips_regsets): ... this, and make static.
3522 (mips_regsets_info, mips_dsp_usrregs_info, mips_usrregs_info)
3523 (dsp_regs_info, regs_info): New globals.
3524 (mips_regs_info): New function.
3525 (the_low_target): Adjust.
3526 (initialize_low_arch): New function.
3527 * linux-arm-low.c (tdesc_arm, tdesc_arm_with_iwmmxt)
3528 (tdesc_arm_with_vfpv2, tdesc_arm_with_vfpv3, tdesc_arm_with_neon):
3529 Declare.
3530 (arm_fill_vfpregset, arm_store_vfpregset): Adjust.
3531 (arm_read_description): New, with bits factored from
3532 arm_arch_setup.
3533 (arm_arch_setup): Reimplement.
3534 (target_regsets): Rename to ...
3535 (arm_regsets): ... this, and make static.
3536 (arm_regsets_info, arm_usrregs_info, regs_info): New globals.
3537 (arm_regs_info): New function.
3538 (the_low_target): Adjust.
3539 (initialize_low_arch): New function.
3540 * linux-m68k-low.c (tdesc_m68k): Declare.
3541 (target_regsets): Rename to ...
3542 (m68k_regsets): ... this, and make static.
3543 (m68k_regsets_info, m68k_usrregs_info, regs_info): New globals.
3544 (m68k_regs_info): New function.
3545 (m68k_arch_setup): New function.
3546 (the_low_target): Adjust.
3547 (initialize_low_arch): New function.
3548 * linux-sh-low.c (tdesc_sharch): Declare.
3549 (target_regsets): Rename to ...
3550 (sh_regsets): ... this, and make static.
3551 (sh_regsets_info, sh_usrregs_info, regs_info): New globals.
3552 (sh_regs_info, sh_arch_setup): New functions.
3553 (the_low_target): Adjust.
3554 (initialize_low_arch): New function.
3555 * linux-bfin-low.c (tdesc_bfin): Declare.
3556 (bfin_arch_setup): New function.
3557 (bfin_usrregs_info, regs_info): New globals.
3558 (bfin_regs_info): New function.
3559 (the_low_target): Adjust.
3560 (initialize_low_arch): New function.
3561 * linux-cris-low.c (tdesc_cris): Declare.
3562 (cris_arch_setup): New function.
3563 (cris_usrregs_info, regs_info): New globals.
3564 (cris_regs_info): New function.
3565 (the_low_target): Adjust.
3566 (initialize_low_arch): New function.
3567 * linux-cris-low.c (tdesc_crisv32): Declare.
3568 (cris_arch_setup): New function.
3569 (cris_regsets_info, cris_usrregs_info, regs_info): New globals.
3570 (cris_regs_info): New function.
3571 (the_low_target): Adjust.
3572 (initialize_low_arch): New function.
3573 * linux-m32r-low.c (tdesc_m32r): Declare.
3574 (m32r_arch_setup): New function.
3575 (m32r_usrregs_info, regs_info): New globals.
3576 (m32r_regs_info): Adjust.
3577 (initialize_low_arch): New function.
3578 * linux-tic6x-low.c (tdesc_tic6x_c64xp_linux)
3579 (tdesc_tic6x_c64x_linux, tdesc_tic6x_c62x_linux): Declare.
3580 (tic6x_usrregs_info): Forward declare.
3581 (tic6x_read_description): New function, based on ...
3582 (tic6x_arch_setup): ... this. Reimplement.
3583 (target_regsets): Rename to ...
3584 (tic6x_regsets): ... this, and make static.
3585 (tic6x_regsets_info, tic6x_usrregs_info, regs_info): New globals.
3586 (tic6x_regs_info): New function.
3587 (the_low_target): Adjust.
3588 (initialize_low_arch): New function.
3589 * linux-xtensa-low.c (tdesc_xtensa): Declare.
3590 (xtensa_fill_gregset, xtensa_store_gregset): Adjust.
3591 (target_regsets): Rename to ...
3592 (xtensa_regsets): ... this, and make static.
3593 (xtensa_regsets_info, xtensa_usrregs_info, regs_info): New
3594 globals.
3595 (xtensa_arch_setup, xtensa_regs_info): New functions.
3596 (the_low_target): Adjust.
3597 (initialize_low_arch): New function.
3598 * linux-nios2-low.c (tdesc_nios2_linux): Declare.
3599 (nios2_arch_setup): Set the current process'es tdesc.
3600 (target_regsets): Rename to ...
3601 (nios2_regsets): ... this.
3602 (nios2_regsets_info, nios2_usrregs_info, regs_info): New globals.
3603 (nios2_regs_info): New function.
3604 (the_low_target): Adjust.
3605 (initialize_low_arch): New function.
3606 * linux-aarch64-low.c (tdesc_aarch64): Declare.
3607 (aarch64_arch_setup): Set the current process'es tdesc.
3608 (target_regsets): Rename to ...
3609 (aarch64_regsets): ... this.
3610 (aarch64_regsets_info, aarch64_usrregs_info, regs_info): New globals.
3611 (aarch64_regs_info): New function.
3612 (the_low_target): Adjust.
3613 (initialize_low_arch): New function.
3614 * linux-tile-low.c (tdesc_tilegx, tdesc_tilegx32): Declare
3615 globals.
3616 (target_regsets): Rename to ...
3617 (tile_regsets): ... this.
3618 (tile_regsets_info, tile_usrregs_info, regs_info): New globals.
3619 (tile_regs_info): New function.
3620 (tile_arch_setup): Set the current process'es tdesc.
3621 (the_low_target): Adjust.
3622 (initialize_low_arch): New function.
3623 * spu-low.c (tdesc_spu): Declare.
3624 (spu_create_inferior, spu_attach): Set the new process'es tdesc.
3625 * win32-arm-low.c (tdesc_arm): Declare.
3626 (arm_arch_setup): New function.
3627 (the_low_target): Install arm_arch_setup instead of
3628 init_registers_arm.
3629 * win32-i386-low.c (tdesc_i386, tdesc_amd64): Declare.
3630 (init_windows_x86): Rename to ...
3631 (i386_arch_setup): ... this. Set `win32_tdesc'.
3632 (the_low_target): Adjust.
3633 * win32-low.c (win32_tdesc): New global.
3634 (child_add_thread): Don't create the thread cache here.
3635 (do_initial_child_stuff): Set the new process'es tdesc.
3636 * win32-low.h (struct target_desc): Forward declare.
3637 (win32_tdesc): Declare.
3638 * lynx-i386-low.c (tdesc_i386): Declare global.
3639 (lynx_i386_arch_setup): Set `lynx_tdesc'.
3640 * lynx-low.c (lynx_tdesc): New global.
3641 (lynx_add_process): Set the new process'es tdesc.
3642 * lynx-low.h (struct target_desc): Forward declare.
3643 (lynx_tdesc): Declare global.
3644 * lynx-ppc-low.c (tdesc_powerpc_32): Declare global.
3645 (lynx_ppc_arch_setup): Set `lynx_tdesc'.
3646 * nto-low.c (nto_tdesc): New global.
3647 (do_attach): Set the new process'es tdesc.
3648 * nto-low.h (struct target_desc): Forward declare.
3649 (nto_tdesc): Declare.
3650 * nto-x86-low.c (tdesc_i386): Declare.
3651 (nto_x86_arch_setup): Set `nto_tdesc'.
3652
3653 2013-06-04 Gary Benson <gbenson@redhat.com>
3654
3655 * server.c (handle_query): Add "augmented-libraries-svr4-read+"
3656 to qSupported response when appropriate.
3657 (handle_qxfer_libraries_svr4): Allow qXfer:libraries-svr4:read
3658 with nonzero-length annex.
3659 * linux-low.c (linux_qxfer_libraries_svr4): Parse and handle
3660 arguments supplied in annex.
3661
3662 2013-05-31 Doug Evans <dje@google.com>
3663
3664 PR server/15594
3665 * linux-x86-low.c (ps_get_thread_area): Properly extend address to
3666 64 bits in 64-cross-32 environment.
3667
3668 2013-05-28 Pedro Alves <palves@redhat.com>
3669
3670 * Makefile.in (clean): Remove reference to aarch64-without-fpu.c.
3671 (aarch64-without-fpu.c): Delete rule.
3672 * configure.srv (aarch64*-*-linux*): Remove references to
3673 aarch64-without-fpu.o and aarch64-without-fpu.xml.
3674 * linux-aarch64-low.c (init_registers_aarch64_without_fpu): Remove
3675 declaration.
3676
3677 2013-05-24 Pedro Alves <palves@redhat.com>
3678
3679 * server.c (handle_v_cont) <vCont;r>: Use unpack_varlen_hex
3680 instead of strchr/decode_address. Error if the range isn't split
3681 with a ','. Don't assume there's be a ':' in the action.
3682
3683 2013-05-23 Yao Qi <yao@codesourcery.com>
3684 Pedro Alves <palves@redhat.com>
3685
3686 * linux-low.c (lwp_in_step_range): New function.
3687 (linux_wait_1): If the thread was range stepping and stopped
3688 outside the stepping range, report the stop to GDB. Otherwise,
3689 continue stepping. Add range stepping debug output.
3690 (linux_set_resume_request): Copy the step range from the resume
3691 request to the lwp.
3692 (linux_supports_range_stepping): New.
3693 (linux_target_ops) <supports_range_stepping>: Set to
3694 linux_supports_range_stepping.
3695 * linux-low.h (struct linux_target_ops)
3696 <supports_range_stepping>: New field.
3697 (struct lwp_info) <step_range_start, step_range_end>: New fields.
3698 * linux-x86-low.c (x86_supports_range_stepping): New.
3699 (the_low_target) <supports_range_stepping>: Set to
3700 x86_supports_range_stepping.
3701 * server.c (handle_v_cont): Handle 'r' action.
3702 (handle_v_requests): Append ";r" if the target supports range
3703 stepping.
3704 * target.h (struct thread_resume) <step_range_start,
3705 step_range_end>: New fields.
3706 (struct target_ops) <supports_range_stepping>:
3707 New field.
3708 (target_supports_range_stepping): New macro.
3709
3710 2013-05-17 Joel Brobecker <brobecker@adacore.com>
3711
3712 * lynx-low.c (lynx_resume): Fix null_ptid/minus_one_ptid
3713 confusion in comment.
3714
3715 2013-05-17 Joel Brobecker <brobecker@adacore.com>
3716
3717 * lynx-low.c (struct process_info_private): New type.
3718 (lynx_add_process): New function.
3719 (lynx_create_inferior, lynx_attach): Replace calls to
3720 add_process by calls to lynx_add_process.
3721 (lynx_resume): If PTID is null, then try using
3722 current_process()->private->last_wait_event_ptid.
3723 Add comments.
3724 (lynx_clear_inferiors): Delete. The contents of that function
3725 has been inlined in lynx_mourn;
3726 (lynx_wait_1): Save the ptid in the process's private data.
3727 (lynx_mourn): Free the process' private data. Replace call
3728 to lynx_clear_inferiors by call to clear_inferiors.
3729
3730 2013-05-17 Yao Qi <yao@codesourcery.com>
3731
3732 * i386-low.c (i386_length_and_rw_bits): Move the comment to
3733 the right place.
3734
3735 2013-05-16 Luis Machado <lgustavo@codesourcery.com>
3736
3737 * linux-low.c: Move definition checks upwards for PT_TEXT_ADDR,
3738 PT_DATA_ADDR and PT_TEXT_END_ADDR. Update comments.
3739 (linux_read_offsets): Remove PT_TEXT_ADDR, PT_DATA_ADDR and
3740 PT_TEXT_END_ADDR guards. Update comments.
3741 (linux_target_op) <read_offsets>: Conditionally define to
3742 linux_read_offsets if the target is UCLIBC and if it defines
3743 PT_TEXT_ADDR, PT_DATA_ADDR and PT_TEXT_END_ADDR.
3744
3745 2013-05-06 Sandra Loosemore <sandra@codesourcery.com>
3746 Andrew Jenner <andrew@codesourcery.com>
3747
3748 * Makefile.in (SFILES): Add linux-nios2-low.c.
3749 (clean): Add action to delete nios2-linux.c.
3750 (nios2-linux.c): New rule.
3751 * configure.srv: Add nios2*-*-linux*.
3752 * linux-nios2-low.c: New.
3753
3754 2013-05-03 Hafiz Abid Qadeer <abidh@codesourcery.com>
3755
3756 * tracepoint.c (cmd_qtinit): Call 'stop_tracing'.
3757
3758 2013-04-25 Hui Zhu <hui@codesourcery.com>
3759
3760 PR gdb/15186
3761 * ax.c (ax_printf): Add fflush.
3762
3763 2013-04-22 Tom Tromey <tromey@redhat.com>
3764
3765 * Makefile.in (SFILES): Add filestuff.c.
3766 (OBS): Add filestuff.o.
3767 (filestuff.o): New target.
3768 * config.in, configure: Rebuild.
3769 * configure.ac: Check for fdwalk, pipe2.
3770
3771 2013-04-17 Pedro Alves <palves@redhat.com>
3772
3773 * configure.ac (USE_THREAD_DB): Delete variable.
3774 (if test "$srv_linux_thread_db" = "yes"): AC_DEFINE USE_THREAD_DB.
3775 Don't AC_SUBST USE_THREAD_DB.
3776 * Makefile.in (INTERNAL_CFLAGS): Remove @USE_THREAD_DB@.
3777 * config.in, configure: Regenerate.
3778
3779 2013-04-16 Pedro Alves <palves@redhat.com>
3780
3781 * linux-low.h (struct lwp_info) <thread_known>: Move under
3782 the USE_THREAD_DB #ifdef.
3783
3784 2013-04-16 Pedro Alves <palves@redhat.com>
3785
3786 * Makefile.in (INTERNAL_CFLAGS): Add @USE_THREAD_DB@.
3787 (linux-low.o): Delete rule.
3788 * linux-low.h: Always include "gdb_thread_db.h" instead of
3789 conditionally including thread_db.h.
3790 (struct lwp_info) <th>: Guard with #ifdef USE_THREAD_DB instead of
3791 HAVE_THREAD_DB_H.
3792
3793 2013-04-07 Jan Kratochvil <jan.kratochvil@redhat.com>
3794
3795 * Makefile.in (install-only): Fix make install regression.
3796
3797 2013-04-05 Jan Kratochvil <jan.kratochvil@redhat.com>
3798
3799 Convert man pages to texinfo, new gdbinit.5 texinfo page.
3800 * Makefile.in (install-only): Remove $(man1dir) and gdbserver.1
3801 installation.
3802 * gdbserver.1: Remove.
3803
3804 2013-03-22 Pedro Alves <palves@redhat.com>
3805
3806 * linux-low.c (handle_extended_wait): Don't call
3807 linux_enable_event_reporting.
3808
3809 2013-03-15 Tony Theodore <tonyt@logyst.com>
3810
3811 PR build/9098:
3812 * Makefile.in (SHELL): Use @SHELL@.
3813
3814 2013-03-14 Sergio Durigan Junior <sergiodj@redhat.com>
3815
3816 * tracepoint.c (cmd_qtv): Initialize `val' with zero, silencing
3817 compiler warning.
3818
3819 2013-03-13 Joel Brobecker <brobecker@adacore.com>
3820
3821 * linux-low.c (linux_target_ops) [!HAVE_LINUX_BTRACE]:
3822 Remove extraneous NULL element.
3823
3824 2013-03-13 Yao Qi <yao@codesourcery.com>
3825
3826 * tracepoint.c (traceframe_read_tsv): Look for the last matched
3827 'V' block in trace frame.
3828
3829 2013-03-11 Markus Metzger <markus.t.metzger@intel.com>
3830
3831 * target.h (struct target_ops): Add btrace ops.
3832 (target_supports_btrace): New macro.
3833 (target_enable_btrace): New macro.
3834 (target_disable_btrace): New macro.
3835 (target_read_btrace): New macro.
3836 * gdbthread.h (struct thread_info): Add btrace field.
3837 * server.c: Include btrace-common.h.
3838 (handle_btrace_general_set): New function.
3839 (handle_btrace_enable): New function.
3840 (handle_btrace_disable): New function.
3841 (handle_general_set): Call handle_btrace_general_set.
3842 (handle_qxfer_btrace): New function.
3843 (struct qxfer qxfer_packets[]): Add btrace entry.
3844 * inferiors.c (remove_thread): Disable btrace.
3845 * linux-low: Include linux-btrace.h.
3846 (linux_low_enable_btrace): New function.
3847 (linux_low_read_btrace): New function.
3848 (linux_target_ops): Add btrace ops.
3849 * configure.srv (i[34567]86-*-linux*): Add linux-btrace.o.
3850 Add srv_linux_btrace=yes.
3851 (x86_64-*-linux*): Add linux-btrace.o.
3852 Add srv_linux_btrace=yes.
3853 * configure.ac: Define HAVE_LINUX_BTRACE.
3854 * config.in: Regenerated.
3855 * configure: Regenerated.
3856
3857 2013-03-11 Markus Metzger <markus.t.metzger@intel.com>
3858
3859 * server.c (handle_qxfer): Preserve error message if -3 is
3860 returned.
3861 (qxfer): Document the -3 return value.
3862
3863 2013-03-11 Markus Metzger <markus.t.metzger@intel.com>
3864
3865 * Makefile.in (SFILES): Add $(srcdir)/common/linux-btrace.c.
3866 (linux_btrace_h): New variable.
3867 (linux-btrace.o): New rule.
3868
3869 2013-03-08 Stan Shebs <stan@codesourcery.com>
3870 Hafiz Abid Qadeer <abidh@codesourcery.com>
3871
3872 * tracepoint.c (trace_buffer_size): New global.
3873 (DEFAULT_TRACE_BUFFER_SIZE): New define.
3874 (init_trace_buffer): Change to one-argument function. Allocate
3875 trace buffer memory.
3876 (handle_tracepoint_general_set): Call cmd_bigqtbuffer_size to
3877 handle QTBuffer:size packet.
3878 (cmd_bigqtbuffer_size): New function.
3879 (initialize_tracepoint): Call init_trace_buffer with
3880 DEFAULT_TRACE_BUFFER_SIZE.
3881 * server.c (handle_query): Add QTBuffer:size in the
3882 supported packets.
3883
3884 2013-03-07 Yao Qi <yao@codesourcery.com>
3885
3886 * tracepoint.c (cur_action, cur_step_action): Make them unsigned.
3887 (cmd_qtfp): Initialize cur_action and cur_step_action 0 instead
3888 of -1.
3889 (cmd_qtsp): Adjust condition. Do post increment.
3890 Set cur_action and cur_step_action back to 0.
3891
3892 2013-03-07 Jeremy Bennett <jeremy.bennett@embecosm.com>
3893
3894 PR server/15236
3895 * linux-low.c (linux_write_memory): Return early success if LEN is
3896 zero.
3897
3898 2013-03-05 Corinna Vinschen <vinschen@redhat.de>
3899
3900 * configure.srv: Add x86_64-*-cygwin* as target.
3901
3902 2013-02-28 Tom Tromey <tromey@redhat.com>
3903
3904 * configure.ac: Invoke AC_SYS_LARGEFILE.
3905 * configure, config.in: Rebuild.
3906
3907 2013-02-28 Corinna Vinschen <vinschen@redhat.com>
3908
3909 * win32-low.c: Throughout, fix format strings and casts of
3910 printf-like functions to avoid type related warnings on all
3911 platforms.
3912 (get_child_debug_event): Print dwDebugEventCode as hex since
3913 that's how it's usually documented.
3914
3915 2013-02-28 Yao Qi <yao@codesourcery.com>
3916
3917 * tracepoint.c (cmd_qtbuffer): Call phex_nz instead of
3918 pulongest.
3919
3920 2013-02-27 Jiong Wang <jiwang@tilera.com>
3921
3922 * Makefile.in (clean): Remove reg-tilegx.c, reg-tilegx32.c.
3923 (reg-tilegx32.c): New rule.
3924 * configure.srv (tilegx-*-linux*): Add reg-tilegx32.o to srv_regobj.
3925 * linux-tile-low.c (tile_arch_setup): New function. Invoke
3926 different register info initializer according to elf class.
3927 (init_registers_tilgx32): New function. The tilegx32 register info
3928 initializer.
3929 (tile_fill_gregset): Use "uint_reg_t" to represent register size.
3930 (tile_store_gregset): Likewise.
3931
3932 2013-02-27 Yao Qi <yao@codesourcery.com>
3933
3934 * server.c (process_point_options): Print debug message when
3935 debug_threads is true.
3936
3937 2013-02-26 Yao Qi <yao@codesourcery.com>
3938
3939 * tracepoint.c (cmd_qtbuffer): Don't set '\0' in OWN_BUF.
3940
3941 2013-02-19 Pedro Alves <palves@redhat.com>
3942 Kai Tietz <ktietz@redhat.com>
3943
3944 PR gdb/15161
3945
3946 * server.c (handle_query) <CRC check>: Use unpack_varlen_hex
3947 instead of strtoul to extract address from packet.
3948 (process_serial_event) <'z'>: Likewise.
3949
3950 2013-02-18 Yao Qi <yao@codesourcery.com>
3951
3952 * linux-bfin-low.c (the_low_target): Use NULL instead of 0.
3953
3954 2013-02-14 Pedro Alves <palves@redhat.com>
3955
3956 Plug memory leak.
3957
3958 * tracepoint.c (cmd_qtnotes): Free TRACING_USER_NAME,
3959 TRACING_NOTES and TRACING_STOP_NOTE before clobbering.
3960
3961 2013-02-14 Pedro Alves <palves@redhat.com>
3962
3963 * tracepoint.c (cmd_qtdpsrc): Use savestring.
3964
3965 2013-02-14 Pedro Alves <palves@redhat.com>
3966
3967 * tracepoint.c (save_string): Delete.
3968 (add_tracepoint_action): Use savestring instead of save_string.
3969
3970 2013-02-12 Pedro Alves <palves@redhat.com>
3971
3972 * linux-xtensa-low.c: Ditto.
3973 * xtensa-xtregs.c: Ditto.
3974
3975 2013-02-12 Sanimir Agovic <sanimir.agovic@intel.com>
3976
3977 * thread-db.c (thread_db_get_tls_address): NULL pointer check
3978 thread_db.
3979
3980 2013-02-07 Marcus Shawcroft <marcus.shawcroft@arm.com>
3981
3982 * linux-aarch64-low.c (aarch64_arch_setup): Clamp
3983 aarch64_num_wp_regs and aarch64_num_bp_regs to
3984 AARCH64_HWP_MAX_NUM and AARCH64_HBP_MAX_NUM respectively.
3985
3986 2013-02-07 Marcus Shawcroft <marcus.shawcroft@arm.com>
3987
3988 * linux-aarch64-low.c (ps_get_thread_area): Replace
3989 PTRACE_GET_THREAD_AREA with PTRACE_GETREGSET.
3990
3991 2013-02-04 Jim MacArthur <jim.macarthur@arm.com>
3992 Marcus Shawcroft <marcus.shawcroft@arm.com>
3993 Nigel Stephens <nigel.stephens@arm.com>
3994 Yufeng Zhang <yufeng.zhang@arm.com>
3995
3996 * Makefile.in (clean): Remove aarch64.c and aarch64-without-fpu.c.
3997 (aarch64.c, aarch64-without-fpu.c): New targets.
3998 * configure.srv (aarch64*-*-linux*): New.
3999 * linux-aarch64-low.c: New file.
4000
4001 2013-02-04 Marcus Shawcroft <marcus.shawcroft@arm.com>
4002
4003 * linux-low.c (handle_extended_wait, linux_create_inferior)
4004 (linux_attach_lwp_1, linux_kill_one_lwp, linux_attach_one_lwp)
4005 (dequeue_one_deferred_signal, linux_resume_one_thread)
4006 (fetch_register, linux_write_memory, linux_enable_event_reporting)
4007 (linux_tracefork_grandchild, linux_test_for_tracefork)
4008 (linux_read_offsets, linux_xfer_siginfo, linux_xfer_siginfo): Add
4009 PTRACE_ARG3_TYPE and PTRACE_ARG4_TYPE cast to ptrace arguments
4010 where the argument is 0.
4011
4012 2013-01-25 Yao Qi <yao@codesourcery.com>
4013
4014 * event-loop.c: Include "queue.h".
4015 (gdb_event_p): New typedef.
4016 (struct gdb_event) <next_event>: Remove.
4017 (event_queue): Change to QUEUE(gdb_event_p).
4018 (async_queue_event): Remove.
4019 (gdb_event_xfree): New.
4020 (initialize_event_loop): New.
4021 (process_event): Use API from QUEUE.
4022 (wait_for_event): Likewise.
4023 * server.c (main): Call initialize_event_loop.
4024 * server.h (initialize_event_loop): Declare.
4025
4026 2013-01-18 Yao Qi <yao@codesourcery.com>
4027
4028 * ax.h (struct eval_agent_expr_context): New.
4029 (gdb_eval_agent_expr): Update declaration.
4030 * ax.c (gdb_eval_agent_expr): Remove argument REGCACHE and
4031 TFRAME. Add new argument CTX.
4032 * server.h (struct eval_agent_expr_context): Declare.
4033 (agent_mem_read, agent_tsv_read): Update declaration.
4034 (agent_mem_read_string): Likewise.
4035 * tracepoint.c (eval_tracepoint_agent_expr): Remove.
4036 (add_traceframe_block): Add new argument TPOINT.
4037 Increase TPOINT->traceframe_usage.
4038 (do_action_at_tracepoint): Call gdb_eval_agent_expr instead of
4039 eval_tracepoint_agent_expr.
4040 (condition_true_at_tracepoint): Likewise.
4041 (agent_mem_read): Remove argument TFRAME. Add argument CTX.
4042 (agent_mem_read_string, agent_tsv_read): Likewise.
4043
4044 2013-01-16 Yao Qi <yao@codesourcery.com>
4045
4046 * linux-low.c (linux_resume_one_lwp): Don't check
4047 'lwp->bp_reinsert != 0'.
4048
4049 2013-01-07 Joel Brobecker <brobecker@adacore.com>
4050 Pedro Alves <palves@redhat.com>
4051
4052 * lynx-low.c (ptrace_request_to_str): Define a temporary
4053 macro and use it to simplify this function's implementation.
4054
4055 2013-01-07 Joel Brobecker <brobecker@adacore.com>
4056
4057 * lynx-low.c (lynx_resume): Call perror_with_name if lynx_ptrace
4058 sets errno.
4059
4060 2013-01-07 Joel Brobecker <brobecker@adacore.com>
4061
4062 * configure.srv (i[34567]86-*-lynxos*): Set srv_xmlfiles.
4063
4064 2013-01-07 Joel Brobecker <brobecker@adacore.com>
4065
4066 * configure.srv (powerpc-*-lynxos*): Set srv_xmlfiles.
4067
4068 2013-01-07 Joel Brobecker <brobecker@adacore.com>
4069
4070 * lynx-low.c (lynx_resume): Use the resume_info parameter
4071 to determine the ptid for the lynx_ptrace call, unless
4072 it is equal to minus_one_ptid, in which case we use the
4073 ptid of the current_inferior.
4074 (lynx_wait_1): After having received a thread create/exit
4075 event, resume the inferior's execution using the signaling
4076 thread's ptid, rather than the old ptid.
4077
4078 2013-01-07 Joel Brobecker <brobecker@adacore.com>
4079
4080 * lynx-low.c (lynx_resume): Delete variable ret.
4081
4082 2013-01-01 Joel Brobecker <brobecker@adacore.com>
4083
4084 * gdbreplay.c (gdbreplay_version): Update copyright year.
4085 * server.c (gdbserver_version): Likewise.
4086
4087 2012-12-17 Joel Brobecker <brobecker@adacore.com>
4088
4089 * lynx-low.c (lynx_wait_1): Add debug trace before adding
4090 new thread.
4091
4092 2012-12-17 Joel Brobecker <brobecker@adacore.com>
4093
4094 * lynx-low.c (ptrace_request_to_str): Add handling for
4095 PTRACE_GETTRACESIG.
4096
4097 2012-12-17 Joel Brobecker <brobecker@adacore.com>
4098
4099 * lynx-low.c (lynx_attach): Delete variable new_process.
4100
4101 2012-12-17 Joel Brobecker <brobecker@adacore.com>
4102
4103 * lynx-low.c (lynx_create_inferior): Delete variable
4104 new_process.
4105
4106 2012-12-17 Joel Brobecker <brobecker@adacore.com>
4107
4108 * lynx-low.c (ptrace_request_to_str): Do not handle
4109 PTRACE_GETTHREADLIST if this macro does not exist.
4110
4111 2012-12-15 Yao Qi <yao@codesourcery.com>
4112
4113 * Makefile.in (OBS): Add notif.o.
4114 * notif.c, notif.h: New.
4115 * server.c: Include "notif.h".
4116 (struct vstop_notif) <next>: Remove.
4117 <base>: New field.
4118 (queue_stop_reply): Update.
4119 (push_event, send_next_stop_reply): Remove.
4120 (discard_queued_stop_replies): Update.
4121 (notif_stop): New variable.
4122 (handle_v_stopped): Remove.
4123 (handle_v_requests): Don't call handle_v_stopped. Call
4124 handle_ack_notif instead.
4125 (queue_stop_reply_callback): Call notif_event_enque instead
4126 of queue_stop_reply.
4127 (handle_status): Don't call send_next_stop_reply, call
4128 notif_write_event instead.
4129 (kill_inferior_callback): Likewise.
4130 (detach_or_kill_inferior_callback): Likewise.
4131 (main): Call initialize_notif.
4132 (process_serial_event): Call QUEUE_is_empty.
4133 (handle_target_event): Call notif_push instead of push event.
4134 * server.h (push_event): Remove declaration.
4135
4136 2012-12-10 Tom Tromey <tromey@redhat.com>
4137
4138 * Makefile.in (DEPMODE, DEPDIR, depcomp, COMPILE.pre)
4139 (COMPILE.post, COMPILE, POSTCOMPILE, IPAGENT_COMPILE): New
4140 macros.
4141 (.c.o): Rewrite.
4142 (ax-ipa.o, tracepoint-ipa.o, utils-ipa.o, format-ipa.o)
4143 (common-utils-ipa.o, remote-utils-ipa.o, regcache-ipa.o)
4144 (i386-linux-ipa.o, linux-i386-ipa.o, linux-amd64-ipa.o)
4145 (amd64-linux-ipa.o, ax.o): Rewrite.
4146 (event-loop.o, hostio.o, hostio-errno.o, inferiors.o, mem-break.o)
4147 (proc-service.o, regcache.o, remote-utils.o, server.o, target.o)
4148 (thread-db.o, tracepoint.o, utils.o, gdbreplay.o, dll.o): Remove.
4149 (signals.o, linux-procfs.o, linux-ptrace.o, common-utils.o, vec.o)
4150 (gdb_vecs.o, xml-utils.o, linux-osdata.o, ptid.o, buffer.o)
4151 (format.o, agent.o, vasprintf.o, vsnprintf.o): Rewrite.
4152 (i386-low.o, i387-fp.o, linux-low.o, linux-arm-low.o)
4153 (linux-bfin-low.o, linux-cris-low.o, linux-crisv32-low.o)
4154 (linux-ia64-low.o, linux-m32r-low.o, linux-mips-low.o)
4155 (linux-ppc-low.o, linux-s390-low.o, linux-sh-low.o)
4156 (linux-tic6x-low.o, linux-x86-low.o, linux-xtensa-low.o)
4157 (linux-tile-low.o, lynx-low.o, lynx-ppc-low.o, nto-low.o)
4158 (nto-x86-low.o, linux-low.o, win32-low.o, win32-arm-low.o)
4159 (win32-i386-low.o, spu-low.o, reg-arm.o, arm-with-iwmmxt.o)
4160 (arm-with-vfpv2.o, arm-with-vfpv3.o, arm-with-neon.o, reg-bfin.o)
4161 (reg-cris.o, reg-crisv32.o, i386.o, i386-linux.o, i386-avx.o)
4162 (i386-avx-linux.o, i386-mmx.o, i386-mmx-linux.o, reg-ia64.o)
4163 (reg-m32r.o, reg-m68k.o, reg-cf.o, mips-linux.o, mips-dsp-linux.o)
4164 (mips64-linux.o, mips64-dsp-linux.o, powerpc-32.o, powerpc-32l.o)
4165 (powerpc-altivec32l.o, powerpc-cell32l.o, powerpc-vsx32l.o)
4166 (powerpc-isa205-32l.o, powerpc-isa205-altivec32l.o)
4167 (powerpc-isa205-vsx32l.o, powerpc-e500l.o, powerpc-64l.o)
4168 (powerpc-altivec64l.o, powerpc-cell64l.o, powerpc-vsx64l.o)
4169 (powerpc-isa205-64l.o, powerpc-isa205-altivec64l.o)
4170 (powerpc-isa205-vsx64l.o, s390-linux32.o, s390-linux32v1.o)
4171 (s390-linux32v2.o, s390-linux64.o, s390-linux64v1.o)
4172 (s390-linux64v2.o, s390x-linux64.o, s390x-linux64v1.o)
4173 (s390x-linux64v2.o, tic6x-c64xp-linux.o, tic6x-c64x-linux.o)
4174 (tic6x-c62x-linux.o, reg-sh.o, reg-sparc64.o, reg-spu.o, amd64.o)
4175 (amd64-linux.o, amd64-avx.o, amd64-avx-linux.o, x32.o)
4176 (x32-linux.o, x32-avx.o, x32-avx-linux.o, reg-xtensa.o)
4177 (reg-tilegx.o): Remove.
4178 (all_object_files): New macro.
4179 Include .deps files.
4180 * aclocal.m4, configure: Rebuild.
4181 * acinclude.m4: Include depstand.m4, lead-dot.m4.
4182 * configure.ac: Invoke ZW_CREATE_DEPDIR,
4183 ZW_PROG_COMPILER_DEPENDENCIES. Compute GMAKE condition.
4184
4185 2012-12-05 Tom Tromey <tromey@redhat.com>
4186
4187 PR gdb/14917:
4188 * server.h (current_insn_ptr, emit_error): Declare 'extern'.
4189
4190 2012-11-28 Markus Metzger <markus.t.metzger@intel.com>
4191
4192 * configure.ac: Check for linux/perf_event.h.
4193 * config.in: Regenerated.
4194 * configure: Regenerated.
4195
4196 2012-11-26 Maxime Villard <rustyBSD@gmx.fr>
4197
4198 * hostio.c (handle_readlink): Decrease buffer size
4199 parameter passed to readlink by one byte.
4200
4201 2012-11-26 Yao Qi <yao@codesourcery.com>
4202
4203 * configure.ac (build_warnings): Append '-Wempty-body'.
4204 * configure: Regenerated.
4205 * linux-low.c (linux_create_inferior): Use braces for empty 'if'
4206 body.
4207
4208 2012-11-15 Pierre Muller <muller@sourceware.org>
4209
4210 * configure.ac (AC_CHECK_HEADERS): Add wait.h header.
4211 * config.in: Regenerate.
4212 * configure: Regenerate.
4213 * linux-low.c: Use "gdb_stat.h" header instead of <sys/stat.h> header.
4214 Use "gdb_wait.h" header instead of <sys/wait.h> header.
4215 * lynx-low.c: Use "gdb_wait.h" header instead of <sys/wait.h> header.
4216 * remote-utils.c: Use "gdb_stat.h" header instead of <sys/stat.h>
4217 header.
4218 * server.c: Remove HAVE_WAIT_H conditional. Use "gdb_wait.h" header
4219 instead of <sys/wait.h> header.
4220 * spu-low.c: Use "gdb_wait.h" header instead of <sys/wait.h> header.
4221
4222 2012-11-13 Markus Metzger <markus.t.metzger@intel.com>
4223
4224 * Makefile.in: (INTERNAL_CFLAGS): Add -DGDBSERVER
4225 (various make rules): Remove -DGDBSERVER
4226
4227 2012-11-09 Yao Qi <yao@codesourcery.com>
4228
4229 * spu-low.c (current_ptid): Move it to ..
4230 * gdbthread.h: ... here. New.
4231 * remote-utils.c (read_ptid): Use macro 'current_ptid'.
4232 * server.c (myresume, process_serial_event): Likewise.
4233 * thread-db.c (thread_db_find_new_threads): Likewise.
4234 * tracepoint.c (run_inferior_command): Likewise.
4235
4236 2012-10-01 Andrew Burgess <aburgess@broadcom.com>
4237
4238 * server.c (handle_search_memory_1): Include access length in
4239 warning message.
4240
4241 2012-09-05 Michael Brandt <michael.brandt@axis.com>
4242
4243 * linux-crisv32-low.c: Fix compile errors.
4244
4245 2012-09-04 Yao Qi <yao@codesourcery.com>
4246
4247 * tracepoint.c (cmd_qtsv): Adjust debug message.
4248 Don't check CUR_TPOINT.
4249
4250 2012-08-28 Yao Qi <yao@codesourcery.com>
4251
4252 * ax.c, tracepoint.c: Replace ATTR_FORMAT with ATTRIBUTE_PRINTF.
4253 * server.h: Include 'libiberty.h' and 'ansidecl.h'.
4254 (ATTR_NORETURN, ATTR_FORMAT, ATTR_MALLOC): Remove.
4255 Remove declarations of xmalloc, xreallloc, xstrdup and
4256 freeargv.
4257 * Makefile.in (libiberty_h): New.
4258 (server_h): Append dependencies 'libiberty.h' and 'ansidecl.h'.
4259 (linux-bfin-low.o): Append dependency 'libiberty.h'.
4260
4261 2012-08-23 Yao Qi <yao@codesourcery.com>
4262
4263 * server.h: Remove declaration of 'xsnprintf'.
4264
4265 2012-08-22 Keith Seitz <keiths@redhat.com>
4266
4267 * server.h: Include build-gnulib-gbserver/config.h.
4268 * gdbreplay.c: Likewise.
4269
4270 2012-08-08 Doug Evans <dje@google.com>
4271
4272 * Makefile.in (SFILES): Add gdb_vecs.c.
4273 (OBS): Add gdb_vecs.o.
4274 (gdb_vecs_h, host_defs_h): New variables.
4275 (thread-db.o): Add $(gdb_vecs_h) dependency.
4276 (gdb_vecs.o): New rule.
4277 * thread-db.c: #include "gdb_vecs.h".
4278 (thread_db_load_search): Use a vector to iterate over path elements.
4279 Handle text appearing after "$pdir".
4280
4281 * configure.ac: Add check for strstr.
4282 * config.in: Regenerate.
4283 * configure: Regenerate.
4284
4285 2012-08-02 Ulrich Weigand <ulrich.weigand@linaro.org>
4286
4287 * hostio.c (handle_pread): If pread fails, fall back to attempting
4288 lseek/read.
4289 (handle_pwrite): Likewise for pwrite.
4290
4291 2012-08-01 Ulrich Weigand <ulrich.weigand@linaro.org>
4292
4293 * linux-arm-low.c (arm_linux_hw_point_initialize): Distinguish
4294 between unsupported TYPE and unimplementable ADDR/LEN combination.
4295 (arm_insert_point): Act on new return value.
4296
4297 2012-07-31 Pedro Alves <palves@redhat.com>
4298
4299 * server.c (process_point_options): Only skip tokens if we find
4300 one that is unrecognized. Don't treat 'X' specially while
4301 skipping unrecognized tokens.
4302
4303 2012-07-30 Ulrich Weigand <ulrich.weigand@linaro.org>
4304
4305 * linux-arm-low.c (arm_linux_hw_point_initialize): Do not attempt
4306 to 4-byte-align HW breakpoint addresses for Thumb.
4307
4308 2012-07-27 Yao Qi <yao@codesourcery.com>
4309
4310 PR remote/14161.
4311
4312 * server.h: Declare gdb_agent_about_to_close.
4313 * target.c (kill_inferior): Include "agent.h".
4314 New. Send command 'kill'.
4315 * target.h (kill_inferior): Removed macro.
4316 * tracepoint.c (gdb_agent_about_to_close): New.
4317 (gdb_agent_helper_thread): Handle command 'close'.
4318 Wait endlessly until the inferior stops.
4319 Install gdb_agent_remove_socket to atexit hook.
4320 (agent_socket_name): New static variable.
4321 (gdb_agent_socket_init): Replace local variable 'name' with
4322 'agent_socket_name'.
4323 (gdb_agent_remove_socket): New.
4324
4325 2012-07-27 Yao Qi <yao@codesourcery.com>
4326
4327 * server.c (process_point_options): Stop at 'X' when parsing.
4328
4329 2012-07-19 Michael Eager <eager@eagercon.com>
4330
4331 * i386-low.c (Z_packet_to_hw_type): Add Z_PACKET_HW_BP, translate
4332 to hw_execute.
4333 * linux-x86-low.c (x86_insert_point, x86_remove_point):
4334 Call i386_low_insert_watchpoint, i386_low_remove_watchpoint to add/del
4335 hardware breakpoint.
4336
4337 2012-07-07 Jan Kratochvil <jan.kratochvil@redhat.com>
4338
4339 * gdbserver/linux-low.c (initialize_low): Call
4340 linux_ptrace_init_warnings.
4341
4342 2012-07-02 Doug Evans <dje@google.com>
4343
4344 * mem-break.c (gdb_no_commands_at_breakpoint): Fix cast from
4345 pointer to int.
4346
4347 2012-07-02 Stan Shebs <stan@codesourcery.com>
4348
4349 * Makefile.in (WARN_CFLAGS_NO_FORMAT): Define.
4350 (ax.o): Add it to build rule.
4351 (ax-ipa.o): Ditto.
4352 (OBS): Add format.o.
4353 (IPA_OBS): Add format.o.
4354 * server.c (handle_query): Claim support for breakpoint commands.
4355 (process_point_options): Add command case.
4356 (process_serial_event): Leave running if there are printfs in
4357 effect.
4358 * mem-break.h (any_persistent_commands): Declare.
4359 (add_breakpoint_commands): Declare.
4360 (gdb_no_commands_at_breakpoint): Declare.
4361 (run_breakpoint_commands): Declare.
4362 * mem-break.c (struct point_command_list): New struct.
4363 (struct breakpoint): New field command_list.
4364 (any_persistent_commands): New function.
4365 (add_commands_to_breakpoint): New function.
4366 (add_breakpoint_commands): New function.
4367 (gdb_no_commands_at_breakpoint): New function.
4368 (run_breakpoint_commands): New function.
4369 * linux-low.c (linux_wait_1): Test for and run breakpoint commands
4370 locally.
4371 * ax.c: Include format.h.
4372 (ax_printf): New function.
4373 (gdb_eval_agent_expr): Add printf opcode.
4374
4375 2012-06-13 Yao Qi <yao@codesourcery.com>
4376
4377 * server.c (start_inferior): Remove duplicated writes to fields
4378 'last_resume_kind' and 'last_status' of 'current_inferior'.
4379
4380 2012-06-12 Yao Qi <yao@codesourcery.com>
4381 Pedro Alves <palves@redhat.com>
4382
4383 * linux-low.c (linux_set_resume_request): Simplify predicate. Add
4384 comment.
4385 * server.c (handle_v_cont): Extend comment.
4386
4387 2012-06-11 Yao Qi <yao@codesourcery.com>
4388
4389 * linux-low.c (linux_attach): Add 'static'.
4390
4391 2012-06-06 Yao Qi <yao@codesourcery.com>
4392
4393 * ax.c (gdb_eval_agent_expr): Print `top' in hex.
4394
4395 2012-06-01 Jan Kratochvil <jan.kratochvil@redhat.com>
4396
4397 Fix gcc -flto compilation warning.
4398 * server.c (main): Make variable multi_mode and attach volatile.
4399
4400 2012-05-30 Thiago Jung Bauermann <thiago.bauermann@linaro.org>
4401
4402 * linux-low.c (get_r_debug): Disable code using DT_MIPS_RLD_MAP
4403 if the platform doesn't know about it.
4404
4405 2012-05-30 Jeff Kenton <jkenton@tilera.com>
4406
4407 * Makefile.in (SFILES): Add linux-tile-low.c.
4408 (linux-tile-low.o, reg-tilegx.o, reg-tilegx.c): New rules.
4409 * configure.srv: Handle tilegx-*-linux*.
4410 * linux-tile-low.c: New file.
4411
4412 2012-05-28 Jan Kratochvil <jan.kratochvil@redhat.com>
4413
4414 * linux-low.c (linux_qxfer_libraries_svr4): Return -1 if R_DEBUG is -1.
4415
4416 2012-05-24 Pedro Alves <palves@redhat.com>
4417
4418 PR gdb/7205
4419
4420 Replace TARGET_SIGNAL_ with GDB_SIGNAL_ throughout.
4421
4422 2012-05-24 Pedro Alves <palves@redhat.com>
4423
4424 PR gdb/7205
4425
4426 Replace target_signal with gdb_signal throughout.
4427
4428 2012-05-22 Maciej W. Rozycki <macro@codesourcery.com>
4429
4430 * linux-low.c (linux_store_registers): Avoid the copying sequence
4431 when no data has been retrieved by ptrace.
4432
4433 2012-05-22 Will Deacon <will.deacon@arm.com>
4434
4435 * linux-low (__UCLIBC__ && !(__UCLIBC_HAS_MMU__ || __ARCH_HAS_MMU__)):
4436 Include asm/ptrace.h.
4437 (PT_TEXT_ADDR, PT_DATA_ADDR, PT_TEXT_END_ADDR): Define only if not
4438 already defined.
4439
4440 2012-05-21 Maciej W. Rozycki <macro@codesourcery.com>
4441
4442 * linux-low.c (linux_store_registers): Don't re-retrieve data
4443 with ptrace that has already been obtained from /proc. Always
4444 copy any data retrieved with ptrace to the buffer supplied.
4445
4446 2012-05-11 Yao Qi <yao@codesourcery.com>
4447 Pedro Alves <palves@redhat.com>
4448
4449 * linux-low.c (enum stopping_threads_kind): New.
4450 (stopping_threads): Change type to `enum stopping_threads_kind'.
4451 (handle_extended_wait): If stopping and suspending threads, leave
4452 the new_lwp suspended too.
4453 (linux_wait_for_event): Adjust.
4454 (stop_all_lwps): Set `stopping_threads' to
4455 STOPPING_AND_SUSPENDING_THREADS or STOPPING_THREADS depending on
4456 whether we're suspending threads or just stopping them. Assert no
4457 recursion happens.
4458
4459 2012-04-29 Yao Qi <yao@codesourcery.com>
4460
4461 * server.h: Move some code to ...
4462 * gdbthread.h: ... here. New.
4463 * Makefile.in (inferiors.o, regcache.o): Depends on gdbthread.h
4464 (remote-utils.o, server.o, target.o tracepoint.o): Likewise.
4465 (nto-low.o, win32-low.o): Likewise.
4466 * inferiors.c, linux-low.h, nto-low.c: Include gdbthread.h.
4467 * regcache.c, remote-utils.c, server.c: Likewise.
4468 * target.c, tracepoint.c, win32-low.c: Likewise.
4469
4470 2012-04-24 Thiago Jung Bauermann <thiago.bauermann@linaro.org>
4471
4472 * linux-low.h (PTRACE_ARG3_TYPE): Move macro from linux-low.c.
4473 (PTRACE_ARG4_TYPE): Likewise.
4474 (PTRACE_XFER_TYPE): Likewise.
4475 * linux-arm-low.c (arm_prepare_to_resume): Cast third argument of
4476 ptrace to PTRACE_ARG3_TYPE.
4477 * linux-low.c (PTRACE_ARG3_TYPE): Move macro to linux-low.h.
4478 (PTRACE_ARG4_TYPE): Likewise.
4479 (PTRACE_XFER_TYPE): Likewise.
4480 (linux_detach_one_lwp): Cast fourth argument of
4481 ptrace to long then PTRACE_ARG4_TYPE.
4482 (regsets_fetch_inferior_registers): Cast third argument of
4483 ptrace to long then PTRACE_ARG3_TYPE.
4484 (regsets_store_inferior_registers): Likewise.
4485
4486 2012-04-20 Pedro Alves <palves@redhat.com>
4487
4488 * configure: Regenerate.
4489
4490 2012-04-19 Pedro Alves <palves@redhat.com>
4491
4492 * Makefile.in (GNULIB_BUILDDIR): New.
4493 (LIBGNU, INCGNU, GNULIB_H): Adjust.
4494 (SUBDIRS, CLEANDIRS, REQUIRED_SUBDIRS): New.
4495 (all, install-only, uninstall, clean-info, all-lib, clean): No
4496 longer pass GNULIB_FLAGS_TO_PASS. Use subdir_do.
4497 (maintainer-clean realclean distclean): Use subdir_do.
4498 (subdir_do): New.
4499 (gnulib/import/Makefile): Adjust. Replace gnulib/import with
4500 $(GNULIB_BUILDDIR). Don't pass argument to config.status.
4501 * acinclude.m4: Include acx_configure_dir.m4.
4502 * configure.ac: Remove gl_EARLY, gl_INIT, and AM_INIT_AUTOMAKE
4503 calls. Call AC_PROG_RANLIB. Configure gnulib using
4504 ACX_CONFIGURE_DIR.
4505 (GNULIB): New.
4506 (GNULIB_STDINT_H): Adjust.
4507 (AC_OUTPUT): Don't output gnulib/Makefile anymore.
4508 * gdbreplay.c: Include build-gnulib/config.h.
4509 * server.h: Likewise.
4510 * aclocal.m4: Regenerate.
4511 * config.in: Regenerate.
4512 * configure: Regenerate.
4513
4514 2012-04-19 Pedro Alves <palves@redhat.com>
4515
4516 * Makefile.in (LIBGNU, INCGNU): Adjust.
4517 (GNULIB_FLAGS_TO_PASS, GNULIB_H): Adjust.
4518 (all, install-only, uninstall, clean-info, all-lib, clean)
4519 (maintainer-clean, Makefile, gnulib/Makefile): Adjust.
4520 * configure.ac: Adjust AC_OUTPUT output.
4521 * aclocal.m4: Regenerate.
4522 * configure: Regenerate.
4523
4524 2012-04-19 Pedro Alves <palves@redhat.com>
4525
4526 * Makefile.in (generated_files): New.
4527 (server_h): Remove the explicit dependency on config.h, and depend
4528 on $generated_files.
4529
4530 2012-04-19 Pedro Alves <palves@redhat.com>
4531
4532 * Makefile.in (INCGNU): Add -Ignulib.
4533
4534 2012-04-19 Pedro Alves <palves@redhat.com>
4535
4536 * Makefile.in (GNULIB_INCLUDE_DIR): Rename to ...
4537 (INCGNU): ... this, and spell out -I here.
4538 (GNULIB_LIB): Rename to ...
4539 (LIBGNU): ... this.
4540 (INCLUDE_CFLAGS, gdbserver$(EXEEXT), $(GNULIB_LIB) rule): Adjust.
4541
4542 2012-04-19 Pedro Alves <palves@redhat.com>
4543
4544 * config.in: Regenerate.
4545
4546 2012-04-19 Pedro Alves <palves@redhat.com>
4547
4548 * configure.ac: Remove AC_CHECK_DECLS check for memmem.
4549 * server.h (memmem): Remove declaration.
4550 * config.in: Regenerate.
4551 * configure: Regenerate.
4552
4553 2012-04-19 Yao Qi <yao@codesourcery.com>
4554
4555 * Makefile.in (SFILES): Add common/vec.c.
4556 (OBS): Add vec.o.
4557 (vec.o): New rule.
4558
4559 2012-04-19 Yao Qi <yao@codesourcery.com>
4560
4561 * remote-utils.c (prepare_resume_reply): Replace with macro
4562 target_core_of_thread.
4563 * server.c (handle_qxfer_threads_proper): Likewise.
4564 * target.h (traget_core_of_thread): New macro.
4565
4566 2012-04-18 Pedro Alves <palves@redhat.com>
4567
4568 * aclocal.m4: Regenerate.
4569 * configure: Regenerate.
4570
4571 2012-04-16 Yao Qi <yao@codesourcery.com>
4572
4573 * tracepoint.c (cmd_qtstart): Download tracepoints even when they are
4574 duplicated on address.
4575
4576 2012-04-16 Yao Qi <yao@codesourcery.com>
4577
4578 * tracepoint.c (COPY_FIELD_TO_BUF): New macro.
4579 (struct tracepoint_action_ops) <send>: New field.
4580 (m_tracepoint_action_send, r_tracepoint_action_send): New.
4581 (agent_expr_send, x_tracepoint_action_send): New.
4582 (l_tracepoint_action_send): New.
4583 (cmd_qtdp): Download and install tracepoint
4584 according to `use_agent'.
4585 (run_inferior_command): Add one more parameter `len'.
4586 Update callers.
4587 (tracepoint_send_agent): New.
4588 (cmd_qtdp, cmd_qtstart): Call tracepoint_send_agent.
4589
4590 2012-04-16 Yao Qi <yao@codesourcery.com>
4591
4592 * tracepoint.c (download_tracepoints): Moved to ...
4593 (cmd_qtstart): ... here.
4594
4595 2012-04-14 Yao Qi <yao@codesourcery.com>
4596
4597 * tracepoint.c: Include inttypes.h.
4598 (struct collect_memory_action): Use sized types.
4599 (struct tracepoint): Likewise.
4600 (cmd_qtdp, stop_tracing): Update print specifiers.
4601 (cmd_qtp, response_tracepoint): Likewise.
4602 (collect_data_at_tracepoint): Likewise.
4603 (collect_data_at_step): Likewise.
4604
4605 2012-04-14 Yao Qi <yao@codesourcery.com>
4606
4607 Import gnulib module inttypes.
4608 * aclocal.m4, config.in, configure: Regenerated.
4609
4610 2012-04-14 Yao Qi <yao@codesourcery.com>
4611
4612 * Makefile.in (maintainer-clean, realclean, distclean): Remove
4613 Makefile and config.status at last.
4614
4615 2012-04-13 Yao Qi <yao@codesourcery.com>
4616
4617 * tracepoint.c: Include stdint.h unconditionally.
4618
4619 2012-04-13 Thiago Jung Bauermann <thiago.bauermann@linaro.org>
4620
4621 * acinclude.m4 (GDBSERVER_HAVE_THREAD_DB_TYPE): New macro based
4622 on BFD_HAVE_SYS_PROCFS_TYPE.
4623 * configure.ac: Look for lwpid_t and psaddr_t in libthread_db.h.
4624 * configure: Regenerate.
4625 * config.in: Likewise.
4626
4627 2012-04-13 H.J. Lu <hongjiu.lu@intel.com>
4628
4629 * Makefile.in (clean): Also remove x32.c x32-linux.c
4630 x32-avx.c x32-avx-linux.c.
4631 (x32.o): New target.
4632 (x32.c): Likewise.
4633 (x32-linux.o): Likewise.
4634 (x32-linux.c): Likewise.
4635 (x32-avx.o): Likewise.
4636 (x32-avx.c): Likewise.
4637 (x32-avx-linux.o): Likewise.
4638 (x32-avx-linux.c): Likewise.
4639
4640 * configure.srv (srv_amd64_regobj): Add x32.o x32-avx.o.
4641 (srv_amd64_linux_regobj): Add x32-linux.o x32-avx-linux.o.
4642 (srv_i386_64bit_xmlfiles): Add i386/x32-core.xml.
4643 (srv_amd64_xmlfiles): Add i386/x32.xml i386/x32-avx.xml.
4644 (srv_amd64_linux_xmlfiles): Add i386/x32-linux.xml
4645 i386/x32-avx-linux.xml.
4646
4647 * linux-x86-low.c (init_registers_x32_linux): New prototype.
4648 (init_registers_x32_avx_linux): Likwise.
4649 (x86_linux_update_xmltarget): Call init_registers_x32_linux
4650 or init_registers_x32_avx_linux if linux_is_elf64 is false.
4651
4652 2012-04-13 Pedro Alves <palves@redhat.com>
4653
4654 * Makefile.in (GNULIB_FLAGS_TO_PASS): New.
4655 (FLAGS_TO_PASS): Don't change or set $top_srcdir, $srcdir and VPATH.
4656 (all, uninstall, clean-info, all-lib, clean, maintainer-clean)
4657 (realclean, distclean): Explicitly pass $GNULIB_FLAGS_TO_PASS to
4658 the sub-make.
4659
4660 2012-04-12 H.J. Lu <hongjiu.lu@intel.com>
4661
4662 * linux-x86-low.c (compat_x32_clock_t): New.
4663 (compat_x32_siginfo_t): Likewise.
4664 (compat_x32_siginfo_from_siginfo): Likewise.
4665 (siginfo_from_compat_x32_siginfo): Likewise.
4666 (linux_is_elf64): Likewise.
4667 (x86_siginfo_fixup): Call compat_x32_siginfo_from_siginfo
4668 and siginfo_from_compat_x32_siginfo for x32.
4669 (x86_arch_setup): Set linux_is_elf64.
4670
4671 2012-04-12 H.J. Lu <hongjiu.lu@intel.com>
4672
4673 PR gdb/13969
4674 * linux-low.c (linux_pid_exe_is_elf_64_file): Also return the
4675 e_machine field.
4676 (linux_qxfer_libraries_svr4): Update call to elf_64_file_p.
4677 * linux-low.h (linux_pid_exe_is_elf_64_file): Updated.
4678 * linux-x86-low.c (x86_arch_setup): Check if GDBserver is
4679 compatible with process.
4680
4681 2012-04-12 Yao Qi <yao@codesourcery.com>
4682
4683 * Makefile.in: Define abs_top_srcdir and abs_srcdir.
4684 (INCLUDE_CFLAGS): Append GNULIB_INCLUDE_DIR.
4685 (install-only, install-info, clean): Handle sub dir gnulib.
4686 (all-lib, am--refresh): New targets.
4687 (memmem.o): Remove target.
4688 * configure.ac: Remove AC_CONFIG_LIBOBJ_DIR.
4689 Invoke gl_EARLY. Invoke AC_CHECK_PROGS for make.
4690 (AC_REPLACE_FUNCS): Remove memmem.
4691 Invoke gl_INIT and AM_INIT_AUTOMAKE.
4692 (AC_OUTPUT): Generate Makefile in gnulib/.
4693 * aclocal.m4, config.in, configure: Regenerated.
4694
4695 2012-04-10 Maciej W. Rozycki <macro@codesourcery.com>
4696
4697 * linux-low.c (get_r_debug): Handle DT_MIPS_RLD_MAP.
4698
4699 2012-04-05 Pedro Alves <palves@redhat.com>
4700
4701 -Werror=strict-aliasing
4702
4703 * spu-low.c (parse_spufs_run): Avoid dereferencing type-punned
4704 pointer.
4705
4706 2012-04-04 Pedro Alves <palves@redhat.com>
4707
4708 * linux-sparc-low.c (sparc_fill_gregset_to_stack)
4709 (sparc_store_gregset_from_stack, sparc_store_gregset)
4710 (sparc_breakpoint_at): Fix formatting.
4711
4712 2012-03-30 Thiago Jung Bauermann <thiago.bauermann@linaro.org>
4713
4714 * configure.ac: Check whether Elf32_auxv_t and Elf64_auxv_t
4715 are available.
4716 * linux-low.c [HAVE_ELF32_AUXV_T] (Elf32_auxv_t): Add typedef.
4717 [HAVE_ELF64_AUXV_T] (Elf64_auxv_t): Likewise.
4718 * config.in: Regenerate.
4719 * configure: Likewise.
4720
4721 2012-03-29 Pedro Alves <palves@redhat.com>
4722
4723 * linux-low.c (regsets_store_inferior_registers) [__sparc__]:
4724 Correct ptrace arguments.
4725
4726 2012-03-28 Pedro Alves <palves@redhat.com>
4727
4728 * linux-ia64-low.c (ia64_regmap): Map IA64_EC_REGNUM to PT_AR_EC.
4729 (IA64_GR0_REGNUM, IA64_FR0_REGNUM)
4730 (IA64_FR1_REGNUM): New defines.
4731 (ia64_fetch_register): New.
4732 (the_low_target): Install it.
4733 * linux-low.h (struct linux_target_ops) <fetch_register>: New
4734 field.
4735 * linux-low.c (linux_fetch_registers): Try the
4736 the_low_target.fetch_register hook first.
4737
4738 * linux-arm-low.c (the_low_target): Adjust.
4739 * linux-bfin-low.c (the_low_target): Adjust.
4740 * linux-cris-low.c (the_low_target): Adjust.
4741 * linux-crisv32-low.c (the_low_target): Adjust.
4742 * linux-m32r-low.c (the_low_target): Adjust.
4743 * linux-m68k-low.c (the_low_target): Adjust.
4744 * linux-mips-low.c (the_low_target): Adjust.
4745 * linux-ppc-low.c (the_low_target): Adjust.
4746 * linux-s390-low.c (the_low_target): Adjust.
4747 * linux-sh-low.c (the_low_target): Adjust.
4748 * linux-sparc-low.c (the_low_target): Adjust.
4749 * linux-tic6x-low.c (the_low_target): Adjust.
4750 * linux-x86-low.c (the_low_target): Adjust.
4751 * linux-xtensa-low.c (the_low_target): Adjust.
4752
4753 2012-03-26 Pedro Alves <palves@redhat.com>
4754
4755 * server.c (handle_qxfer_libraries): Don't bail early if
4756 the_target->qxfer_libraries_svr4 is not NULL.
4757
4758 2012-03-26 Pedro Alves <palves@redhat.com>
4759
4760 * linux-low.c (linux_qxfer_libraries_svr4): Fix pasto in comment.
4761
4762 2012-03-23 Pedro Alves <palves@redhat.com>
4763
4764 * linux-low.c (linux_qxfer_libraries_svr4): Terminate the
4765 "library-list-svr4" element's start tag when the the DSO list is
4766 empty.
4767
4768 2012-03-23 Pedro Alves <palves@redhat.com>
4769
4770 * linux-low.c (read_one_ptr): Read the inferior's pointer through
4771 a variable whose type size is the same as the inferior's pointer
4772 size.
4773
4774 2012-03-21 Thomas Schwinge <thomas@codesourcery.com>
4775
4776 * linux-arm-low.c (arm_stopped_by_watchpoint): Use siginfo_t instead of
4777 struct siginfo.
4778 * linux-low.c (siginfo_fixup, linux_xfer_siginfo): Likewise.
4779 * linux-x86-low.c (x86_siginfo_fixup): Likewise.
4780 * linux-low.h: Include <signal.h>.
4781 (struct siginfo): Remove forward declaration.
4782 (struct linux_target_ops) <siginfo_fixup>: Use siginfo_t instead of
4783 struct siginfo.
4784
4785 2012-03-21 Mike Frysinger <vapier@gentoo.org>
4786
4787 * .gitignore: Ignore more files.
4788
4789 2012-03-19 Pedro Alves <palves@redhat.com>
4790 Jan Kratochvil <jan.kratochvil@redhat.com>
4791
4792 * server.c (cont_thread, general_thread): Add describing comments.
4793 (start_inferior): Clear `cont_thread'.
4794 (handle_v_cont): Don't set `cont_thread' if resuming all threads
4795 of a process.
4796
4797 2012-03-15 Yao Qi <yao@codesourcery.com>
4798
4799 * tracepoint.c (install_tracepoint): Move duplicated tracepoint
4800 handling to ...
4801 (cmd_qtdp): ... here.
4802
4803 2012-03-15 Yao Qi <yao@codesourcery.com>
4804
4805 * tracepoint.c (struct tracepoint_action_ops): New.
4806 (struct tracepoint_action) [!IN_PROCESS_AGENT] <ops>: New field.
4807 (m_tracepoint_action_download): New.
4808 (r_tracepoint_action_download): New.
4809 (x_tracepoint_action_download): New.
4810 (l_tracepoint_action_download): New.
4811 (add_tracepoint_action): Install `action->ops' according type.
4812 (download_tracepoint_1): Move code `download' function pointer
4813 of various tracepoint_action_ops.
4814
4815 2012-03-13 Jan Kratochvil <jan.kratochvil@redhat.com>
4816
4817 * linux-low.c (linux_attach_lwp_1): New variable buffer. Call
4818 linux_ptrace_attach_warnings.
4819
4820 2012-03-13 Jan Kratochvil <jan.kratochvil@redhat.com>
4821
4822 * Makefile.in (linux-ptrace.o): New.
4823 * configure.srv (arm*-*-linux*, bfin-*-*linux*, crisv32-*-linux*)
4824 (cris-*-linux*, i[34567]86-*-linux*, ia64-*-linux*, m32r*-*-linux*)
4825 (m68*-*-linux*, m68*-*-uclinux*, mips*-*-linux*, powerpc*-*-linux*)
4826 (s390*-*-linux*, sh*-*-linux*, sparc*-*-linux*, tic6x-*-uclinux)
4827 (x86_64-*-linux*, xtensa*-*-linux*): Add linux-ptrace.o to SRV_TGTOBJ
4828 of these targets.
4829 * linux-low.c (linux_attach_lwp_1): Remove redundent else clause.
4830
4831 2012-03-08 Yao Qi <yao@codesourcery.com>
4832 Pedro Alves <palves@redhat.com>
4833
4834 Fix PR server/13392.
4835 * linux-x86-low.c (amd64_install_fast_tracepoint_jump_pad): Check
4836 offset of JMP insn.
4837 * tracepoint.c (remove_tracepoint): New.
4838 (cmd_qtdp): Call remove_tracepoint when failed to install.
4839
4840 2012-03-07 Pedro Alves <palves@redhat.com>
4841
4842 * linux-low.c (get_detach_signal): New.
4843 (linux_detach_one_lwp): Get rid of a pending SIGSTOP with SIGCONT.
4844 Pass on pending signals to PTRACE_DETACH. Check the result of the
4845 ptrace call.
4846 * server.c (program_signals, program_signals_p): New.
4847 (handle_general_set): Handle QProgramSignals.
4848 * server.h (program_signals, program_signals_p): Declare.
4849
4850 2012-03-05 Pedro Alves <palves@redhat.com>
4851 Jan Kratochvil <jan.kratochvil@redhat.com>
4852
4853 * linux-low.c (get_dynamic): Don't warn when PT_PHDR isn't found.
4854 New comment why.
4855
4856 2012-03-03 Yao Qi <yao@codesourcery.com>
4857
4858 * tracepoint.c (tracepoint_look_up_symbols): Update call to
4859 agent_look_up_symbols.
4860
4861 2012-03-03 Yao Qi <yao@codesourcery.com>
4862
4863 * Makefile.in (linux-low.o): Keep dependence on agent.h.
4864 (linux-x86-low.o): Likewise.
4865 * server.h: Remove in_process_agent_loaded.
4866 * tracepoint.c (in_process_agent_loaded): Removed. Moved it
4867 common/agent.c.
4868 Update callers.
4869
4870 2012-03-03 Yao Qi <yao@codesourcery.com>
4871
4872 * tracepoint.c (gdb_agent_capability): New global.
4873 (in_process_agent_loaded_ust): Renamed to
4874 `in_process_agent_supports_ust'.
4875 Update callers.
4876 (in_process_agent_supports_ust): Call agent_capability_check.
4877 (clear_installed_tracepoints): Assert that agent supports
4878 agent.
4879
4880 2012-03-03 Yao Qi <yao@codesourcery.com>
4881
4882 * linux-low.c (linux_supports_agent): New.
4883 (linux_target_ops): Initialize field `supports_agent' with
4884 linux_supports_agent.
4885 * target.h (struct target_ops) <supports_agent>: New.
4886 (target_supports_agent): New macro.
4887 * server.c (handle_general_set): Handle packet 'QAgent'.
4888 (handle_query): Send `QAgent+'.
4889 * Makefile.in (server.o): Depends on agent.h.
4890
4891 2012-03-03 Yao Qi <yao@codesourcery.com>
4892
4893 * Makefile.in (OBS): Add agent.o.
4894 Add new rule for agent.o.
4895 Track dependence of tracepoint.c on agent.h.
4896 * tracepoint.c (run_inferior_command_1):
4897 (run_inferior_command): Call agent_run_command.
4898 (gdb_ust_connect_sync_socket): Deleted. Move it to
4899 common/agent.c.
4900 (resume_thread, stop_thread): Likewise.
4901 (gdb_ust_socket_init): Renamed to ...
4902 (gdb_agent_socket_init): ... New.
4903 (gdb_ust_thread): Renamed to ...
4904 (gdb_agent_helper_thread): ... New.
4905 (gdb_ust_init): Move some code to ...
4906 (gdb_agent_init): ... here. New.
4907 [HAVE_UST]: Call gdb_ust_init.
4908 (initialize_tracepoint_ftlib): Call gdb_agent_init.
4909 * configure.ac: Add `sys/un.h' to AC_CHECK_HEADERS.
4910 * config.in, configure: Regenerated.
4911
4912 2012-03-02 Pedro Alves <palves@redhat.com>
4913
4914 * inferiors.c (add_pid_to_list, pull_pid_from_list): Delete.
4915 * linux-low.c (struct simple_pid_list): New.
4916 (stopped_pids): New a struct simple_pid_list pointer.
4917 (add_to_pid_list, pull_pid_from_list): New.
4918 (handle_extended_wait): Don't assume the first signal new children
4919 report is SIGSTOP. Adjust call to pull_pid_from_list.
4920 (linux_wait_for_lwp): Adjust.
4921
4922 2012-03-02 Yao Qi <yao@codesourcery.com>
4923
4924 * tracepoint.c (do_action_at_tracepoint): Write `stop_pc' in
4925 debug log.
4926
4927 2012-03-02 Yao Qi <yao@codesourcery.com>
4928
4929 * tracepoint.c (collect_ust_data_at_tracepoint): Remove parameters
4930 `stop_pc' and `tpoint'. Update caller.
4931
4932 2012-03-01 Maciej W. Rozycki <macro@codesourcery.com>
4933
4934 * linux-low.h (linux_target_ops): Add regset_bitmap member.
4935 * linux-low.c (use_linux_regsets): New macro.
4936 [!HAVE_LINUX_REGSETS] (regsets_fetch_inferior_registers): Likewise.
4937 [!HAVE_LINUX_REGSETS] (regsets_store_inferior_registers): Likewise.
4938 (linux_register_in_regsets): New function.
4939 (usr_fetch_inferior_registers): Skip registers covered by
4940 regsets.
4941 (usr_store_inferior_registers): Likewise.
4942 (usr_fetch_inferior_registers): New macro.
4943 (usr_store_inferior_registers): Likewise.
4944 (linux_fetch_registers): Handle mixed regset/non-regset targets.
4945 (linux_store_registers): Likewise.
4946 * linux-mips-low.c (init_registers_mips_dsp_linux): New
4947 prototype.
4948 (init_registers_mips64_dsp_linux): Likewise.
4949 (init_registers_mips_linux): New macro.
4950 (init_registers_mips_dsp_linux): Likewise.
4951 (mips_dsp_num_regs): Likewise.
4952 (DSP_BASE, DSP_CONTROL): New fallback macros.
4953 (mips_base_regs): New macro.
4954 (mips_regmap): Use it. Fix the size.
4955 (mips_dsp_regmap): New variable.
4956 (mips_dsp_regset_bitmap): Likewise.
4957 (mips_arch_setup): New function.
4958 (mips_cannot_fetch_register): Use the_low_target.regmap rather
4959 than mips_regmap.
4960 (mips_cannot_store_register): Likewise.
4961 (the_low_target): Update .arch_setup, .num_regs and .regmap
4962 initializers. Add .regset_bitmap initializer.
4963 * linux-arm-low.c (the_low_target): Add .regset_bitmap
4964 initializer.
4965 * linux-bfin-low.c (the_low_target): Likewise.
4966 * linux-cris-low.c (the_low_target): Likewise.
4967 * linux-crisv32-low.c (the_low_target): Likewise.
4968 * linux-ia64-low.c (the_low_target): Likewise.
4969 * linux-m32r-low.c (the_low_target): Likewise.
4970 * linux-m68k-low.c (the_low_target): Likewise.
4971 * linux-ppc-low.c (the_low_target): Likewise.
4972 * linux-s390-low.c (the_low_target): Likewise.
4973 * linux-sh-low.c (the_low_target): Likewise.
4974 * linux-sparc-low.c (the_low_target): Likewise.
4975 * linux-tic6x-low.c (the_low_target): Likewise.
4976 * linux-x86-low.c (the_low_target): Likewise.
4977 * linux-xtensa-low.c (the_low_target): Likewise.
4978 * configure.srv <mips*-*-linux*>: Add mips-dsp-linux.o and
4979 mips64-dsp-linux.o to srv_regobj. Add mips-dsp-linux.xml,
4980 mips64-dsp-linux.xml, mips-dsp.xml and mips64-dsp.xml to
4981 srv_xmlfiles.
4982 * Makefile.in (mips-dsp-linux.o, mips-dsp-linux.c): New targets.
4983 (mips64-dsp-linux.o, mips64-dsp-linux.c): Likewise.
4984
4985 2012-02-29 Yao Qi <yao@codesourcery.com>
4986 Pedro Alves <palves@redhat.com>
4987
4988 * linux-low.c: (linux_wait_1): Call unsuspend_all_lwps when
4989 `step_over_finished' is true.
4990
4991 2012-02-27 Pedro Alves <palves@redhat.com>
4992
4993 * linux-low.c (pid_is_stopped): Delete, moved to common/.
4994 (linux_attach_lwp_1): Adjust to use linux_proc_pid_is_stopped.
4995
4996 2012-02-27 Pedro Alves <palves@redhat.com>
4997
4998 PR server/9684
4999 * linux-low.c (pid_is_stopped): New.
5000 (linux_attach_lwp_1): Handle attaching to 'T (stopped)' processes.
5001
5002 2012-02-25 Luis Machado <lgustavo@codesourcery.com>
5003
5004 * mem-break.c (clear_gdb_breakpoint_conditions): Fix de-allocation
5005 of conditions.
5006
5007 2012-02-24 Maciej W. Rozycki <macro@codesourcery.com>
5008
5009 * linux-mips-low.c (mips_regmap): Correct the index of $f9.
5010
5011 2012-02-24 Luis Machado <lgustavo@codesourcery>
5012
5013 * server.c (handle_query): Advertise support for target-side
5014 breakpoint condition evaluation.
5015 (process_point_options): New function.
5016 (process_serial_event): When inserting a breakpoint, check for
5017 a target-side condition that should be evaluated.
5018
5019 * mem-break.c: Include regcache.h and ax.h.
5020 (point_cond_list_t): New data structure.
5021 (breakpoint) <cond_list>: New field.
5022 (find_gdb_breakpoint_at): Make non-static.
5023 (delete_gdb_breakpoint_at): Clear any target-side
5024 conditions.
5025 (clear_gdb_breakpoint_conditions): New function.
5026 (add_condition_to_breakpoint): Likewise.
5027 (add_breakpoint_condition): Likewise.
5028 (gdb_condition_true_at_breakpoint): Likewise.
5029 (gdb_breakpoint_here): Return result directly instead
5030 of going through a local variable.
5031
5032 * mem-break.h (find_gdb_breakpoint_at): New prototype.
5033 (clear_gdb_breakpoint_conditions): Likewise.
5034 (add_breakpoint_condition): Likewise.
5035 (gdb_condition_true_at_breakpoint): Likewise.
5036
5037 * linux-low.c (linux_wait_1): Evaluate target-side breakpoint condition.
5038 (need_step_over_p): Take target-side breakpoint condition into
5039 consideration.
5040
5041 2012-02-24 Luis Machado <lgustavo@codesourcery>
5042
5043 * server.h: Include tracepoint.h.
5044 (agent_mem_read, agent_get_trace_state_variable_value,
5045 agent_set_trace_state_variable_value,
5046 agent_tsv_read, agent_mem_read_string, get_get_tsv_func_addr,
5047 get_set_tsv_func_addr): New prototypes.
5048
5049 * ax.h: New include file.
5050 * ax.c: New source file.
5051
5052 * tracepoint.c: Include ax.h.
5053 (gdb_agent_op, gdb_agent_op_names, gdb_agent_op_sizes,
5054 agent_expr, eval_result_type): Move to ax.h.
5055 (parse_agent_expr): Rename to ...
5056 (gdb_parse_agent_expr): ... this, make it non-static and move
5057 to ax.h.
5058 (unparse_agent_expr) Rename to ...
5059 (gdb_unparse_agent_expr): ... this, make it non-static and move
5060 to ax.h.
5061 (eval_agent_expr): Rename to ...
5062 (eval_tracepoint_agent_expr): ... this.
5063 (agent_mem_read, agent_mem_read_string, agent_tsv_read): Remove
5064 forward declarations.
5065 (add_tracepoint_action): Call gdb_parse_agent_expr (...).
5066 (agent_get_trace_state_variable_value): New function.
5067 (agent_set_trace_state_variable_value): New function.
5068 (cmd_qtdp): Call gdb_parse_agent_expr (...).
5069 (response_tracepoint): Call gdb_unparse_agent_expr (...).
5070 (do_action_at_tracepoint): Call eval_tracepoint_agent_expr (...).
5071 (condition_true_at_tracepoint): Likewise.
5072 (parse_agent_expr): Rename to ...
5073 (gdb_parse_agent_expr): ... this and move to ax.c.
5074 (unparse_agent_expr): Rename to ...
5075 (gdb_unparse_agent_expr): ... this and move to ax.c.
5076 (gdb_agent_op_name): Move to ax.c.
5077 (eval_agent_expr): Rename to ...
5078 (gdb_eval_agent_expr): ... this, use regcache passed as parameter
5079 and move to ax.c.
5080 (eval_tracepoint_agent_expr): New function.
5081 (agent_mem_read, agent_mem_read_string, agent_tsv_read): Make
5082 non-static.
5083 (current_insn_ptr, emit_error, struct bytecode_address): Move to
5084 ax.c.
5085 (emit_prologue, emit_epilogue, emit_add, emit_sub, emit_mul, emit_lsh,
5086 emit_rsh_signed, emit_rsh_unsigned, emit_ext, emit_log_not,
5087 emit_bit_and, emit_bit_or, emit_bit_xor, emit_bit_not, emit_equal,
5088 emit_less_signed, emit_less_unsigned, emit_ref, emit_if_goto,
5089 emit_goto, write_goto_address, emit_const, emit_reg, emit_pop,
5090 emit_stack, emit_zero_ext, emit_swap, emit_stack_adjust,
5091 emit_int_call_1, emit_void_call_2, emit_eq_goto, emit_ne_goto,
5092 emit_lt_goto, emit_ge_goto, emit_gt_goto, emit_le_goto): Move to ax.c.
5093 (get_get_tsv_func_addr, get_set_tsv_func_addr): New functions.
5094 (compile_bytecodes): Remove forward declaration.
5095 (is_goto_target): Move to ax.c.
5096 (compile_bytecodes): Move to ax.c and call
5097 agent_get_trace_state_variable_value (...) and
5098 agent_set_trace_state_variable_value (...).
5099
5100 * Makefile.in: Update ax.c and IPA dependencies.
5101
5102 2012-02-24 Pedro Alves <palves@redhat.com>
5103
5104 * tracepoint.c (cmd_bigqtbuffer): Rename as ...
5105 (cmd_bigqtbuffer_circular): ... this. Only handle
5106 'QTBuffer:circular:'.
5107 (handle_tracepoint_general_set): Adjust.
5108
5109 2012-02-16 Yao Qi <yao@codesourcery.com>
5110
5111 * inferiors.c: Move code to ...
5112 * dll.c: .... here. New.
5113 * server.h: Declare clear_dlls.
5114 * Makefile.in (SFILES): Add dll.c.
5115 (OBS): Add dll.o
5116 (dll.o): New rule.
5117
5118 2012-02-11 Yao Qi <yao@codesourcery.com>
5119
5120 * server.c: (handle_monitor_command): Add a new parameter
5121 `own_buf'.
5122 (handle_query): Update caller.
5123
5124 2012-02-09 Joel Brobecker <brobecker@adacore.com>
5125
5126 * configure.ac: Add readlink to AC_CHECK_FUNCS list.
5127 * configure, config.in: Regenerate.
5128 * hostio.c: Provide an alternate implementation if HAVE_READLINK
5129 is not defined.
5130
5131 2012-02-02 Pedro Alves <palves@redhat.com>
5132
5133 Try SIGKILL first, then PTRACE_KILL.
5134 * linux-low.c (linux_kill_one_lwp): New.
5135 (linux_kill_one_lwp): Rename to ...
5136 (kill_one_lwp_callback): ... this. Use the new
5137 linux_kill_one_lwp.
5138
5139 2012-02-02 Pedro Alves <palves@redhat.com>
5140
5141 * tracepoint.c (cmd_qtminftpilen): Return 0 if there's no current
5142 inferior.
5143
5144 2012-01-27 Pedro Alves <palves@redhat.com>
5145
5146 * linux-low.c (linux_child_pid_to_exec_file): Delete.
5147 (elf_64_file_p): Make static.
5148 (linux_pid_exe_is_elf_64_file): New.
5149 * linux-low.h (linux_child_pid_to_exec_file, elf_64_file_p):
5150 Delete declarations.
5151 (linux_pid_exe_is_elf_64_file): Declare.
5152 * linux-x86-low.c (x86_arch_setup): Use
5153 linux_pid_exe_is_elf_64_file.
5154
5155 2012-01-25 Jan Kratochvil <jan.kratochvil@redhat.com>
5156
5157 * linux-low.c (linux_wait_for_event_1): Rename to ...
5158 (linux_wait_for_event): ... here and merge it with former
5159 linux_wait_for_event - new variable wait_ptid, use it.
5160 (linux_wait_for_event): Remove - merge it to linux_wait_for_event_1.
5161
5162 2012-01-23 Pedro Alves <palves@redhat.com>
5163
5164 * server.c (main): Avoid yet another case of infinite loop while
5165 detaching/killing after a longjmp.
5166
5167 2012-01-20 Jan Kratochvil <jan.kratochvil@redhat.com>
5168
5169 Code cleanup.
5170 * linux-low.c (linux_wait_for_event_1): Use ptid_is_pid.
5171
5172 2012-01-20 Ulrich Weigand <ulrich.weigand@linaro.org>
5173
5174 * hostio.c (handle_readlink): New function.
5175 (handle_vFile): Call it to handle "vFile:readlink" packets.
5176
5177 2012-01-20 Pedro Alves <palves@redhat.com>
5178 Ulrich Weigand <ulrich.weigand@linaro.org>
5179
5180 * server.c (handle_v_requests): Only support vAttach and vRun to
5181 start multiple processes when in extended protocol mode.
5182
5183 2012-01-17 Pedro Alves <palves@redhat.com>
5184
5185 * tracepoint.c (initialize_tracepoint): Use mmap instead of
5186 memalign plus mprotect to allocate the scratch buffer.
5187
5188 2012-01-13 Pedro Alves <palves@redhat.com>
5189
5190 * server.c (attach_inferior): Clear `cont_thread'.
5191
5192 2012-01-13 Pedro Alves <palves@redhat.com>
5193
5194 * server.c (main): Avoid infinite loop while detaching/killing
5195 after a longjmp.
5196
5197 2012-01-09 Doug Evans <dje@google.com>
5198
5199 * server.c (start_inferior): Set last_ptid in --wrapper case.
5200
5201 2012-01-06 Yao Qi <yao@codesourcery.com>
5202
5203 * tracepoint.c [IN_PROCESS_AGENT] (debug_threads): Macro
5204 defined.
5205 [IN_PROCESS_AGENT] (debug_agent): New global variable.
5206
5207 2012-01-04 Yao Qi <yao@codesourcery.com>
5208
5209 * tracepoint.c (cmd_qtdp): Print debug message
5210 for static tracepoint.
5211
5212 2012-01-04 Yao Qi <yao@codesourcery.com>
5213
5214 * tracepoint.c (trace_vdebug): Differentiate debug message
5215 between gdbserver and IPA.
5216
5217 2012-01-03 Yao Qi <yao@codesourcery.com>
5218
5219 * tracepoint.c (tracepoint_was_hit): Don't collect for
5220 static tracepoint.
5221
5222 2012-01-02 Joel Brobecker <brobecker@adacore.com>
5223
5224 * terminal.h: Reformat copyright header.
5225
5226 2012-01-02 Joel Brobecker <brobecker@adacore.com>
5227
5228 * server.c (gdbserver_version): Update copyright year.
5229 * gdbreplay.c (gdbreplay_version): Likewise.
5230
5231 2011-12-18 Jan Kratochvil <jan.kratochvil@redhat.com>
5232
5233 * linux-low.c (linux_create_inferior): Put empty if clause for write.
5234
5235 Revert:
5236 2011-12-18 Hui Zhu <teawater@gmail.com>
5237 * linux-low.c (linux_create_inferior): Save return value to ret.
5238
5239 2011-12-18 Hui Zhu <teawater@gmail.com>
5240
5241 * linux-low.c (linux_create_inferior): Save return value to ret.
5242
5243 2011-12-16 Doug Evans <dje@google.com>
5244
5245 * linux-low.c (linux_create_inferior): If stdio connection,
5246 redirect stdin from /dev/null, stdout to stderr.
5247 * remote-utils.c (remote_is_stdio): New static global.
5248 (remote_connection_is_stdio): New function.
5249 (remote_prepare): Handle stdio connection.
5250 (remote_open): Ditto.
5251 (remote_close): Don't close stdin for stdio connections.
5252 (read_prim,write_prim): New functions. Replace all calls to
5253 read/write to these.
5254 * server.c (main): Watch for "-" argument. Move call to
5255 remote_prepare before start_inferior.
5256 * server.h (STDIO_CONNECTION_NAME): New macro.
5257 (remote_connection_is_stdio): Declare.
5258
5259 * remote-utils.c (prepare_resume_reply): Remove extraneous \n
5260 in debugging output.
5261
5262 2011-12-15 Yao Qi <yao@codesourcery.com>
5263
5264 * tracepoint.c: Include sys/syscall.h.
5265 (gdb_ust_thread): Remove preprocessor conditional.
5266
5267 2011-12-14 Pedro Alves <pedro@codesourcery.com>
5268
5269 * linux-low.c (linux_detach_one_lwp): Call
5270 the_low_target.prepare_to_resume before detaching.
5271
5272 2011-12-14 Yao Qi <yao@codesourcery.com>
5273
5274 * tracepoint.c (gdb_ust_thread): Don't ignore return value
5275 of write.
5276
5277 2011-12-14 Yao Qi <yao@codesourcery.com>
5278
5279 * i386-low.c (i386_low_stopped_data_address): Initialize local
5280 variable `control'.
5281
5282 2011-12-13 Pedro Alves <pedro@codesourcery.com>
5283
5284 PR remote/13492
5285
5286 * i386-low.c (i386_low_stopped_data_address): Avoid fetching
5287 DR_CONTROL unless necessary. Extend comments.
5288 * linux-x86-low.c (x86_linux_prepare_to_resume): Don't write to
5289 DR0-3 if not used. If any watchpoint was set, clear DR_STATUS.
5290
5291 2011-12-13 Yao Qi <yao@codesourcery.com>
5292
5293 * tracepoint.c (trace_buffer_alloc): Replace magic numbers with
5294 macros.
5295 (upload_fast_traceframes, upload_fast_traceframes): Likewise.
5296
5297 2011-12-08 Jan Kratochvil <jan.kratochvil@redhat.com>
5298
5299 * linux-low.c (linux_kill): Skip PTRACE_KILL if LWP does not exist.
5300 Print new debug message for such case.
5301
5302 2011-12-06 Jan Kratochvil <jan.kratochvil@redhat.com>
5303
5304 Fix overlapping memcpy.
5305 * mem-break.c (set_raw_breakpoint_at): New variable buf. Use it for
5306 the read_inferior_memory transfer.
5307 (delete_fast_tracepoint_jump): New variable buf. Use it for the
5308 write_inferior_memory transfer.
5309 (set_fast_tracepoint_jump): New variable buf. Use it for the
5310 read_inferior_memory and write_inferior_memory transfers.
5311 (uninsert_fast_tracepoint_jumps_at, reinsert_fast_tracepoint_jumps_at)
5312 (delete_raw_breakpoint, uninsert_raw_breakpoint): New variable buf.
5313 Use it for the write_inferior_memory transfer.
5314 (check_mem_read, check_mem_write): New gdb_asserts for overlapping
5315 buffers.
5316
5317 2011-12-06 Maciej W. Rozycki <macro@codesourcery.com>
5318
5319 * linux-low.c (fetch_register, store_register): Make code
5320 consistent, fix formatting.
5321
5322 2011-12-06 Maciej W. Rozycki <macro@codesourcery.com>
5323
5324 * linux-low.c (usr_store_inferior_registers): Factor out code
5325 to handle individual registers into...
5326 (store_register): ... this new function.
5327
5328 2011-12-06 Ulrich Weigand <uweigand@de.ibm.com>
5329
5330 * Makefile.in (s390-linux32v1.o, s390-linux32v1.c): New rules.
5331 (s390-linux32v2.o, s390-linux32v2.c): Likewise.
5332 (s390-linux64v1.o, s390-linux64v1.c): Likewise.
5333 (s390-linux64v2.o, s390-linux64v2.c): Likewise.
5334 (s390x-linux64v1.o, s390x-linux64v1.c): Likewise.
5335 (s390x-linux64v2.o, s390x-linux64v2.c): Likewise.
5336 * configure.srv [s390*-*-linux*] (srv_regobj): Add new objects.
5337 (srv_xmlfiles): Add new XML files.
5338
5339 * linux-s390-low.c: Include "elf/common.h", <sys/ptrace.h>,
5340 and <sys/uio.h>.
5341 (PTRACE_GETREGSET, PTRACE_SETREGSET): Define if undefined.
5342 (init_registers_s390_linux32v1): Add prototype.
5343 (init_registers_s390_linux32v2): Likewise.
5344 (init_registers_s390_linux64v1): Likewise.
5345 (init_registers_s390_linux64v2): Likewise.
5346 (init_registers_s390x_linux64v1): Likewise.
5347 (init_registers_s390x_linux64v2): Likewise.
5348 (s390_num_regs): Increment to 52.
5349 (s390_regmap): Add orig_r2 register.
5350 (s390_num_regs_3264): Increment to 68.
5351 (s390_regmap_3264): Add orig_r2 register.
5352 (s390_collect_ptrace_register): Handle orig_r2 register.
5353 (s390_supply_ptrace_register): Likewise.
5354 (s390_fill_last_break): New function.
5355 (s390_store_last_break): Likewise.
5356 (s390_fill_system_call): New function.
5357 (s390_store_system_call): Likewise.
5358 (target_regsets): Handle NT_S390_LAST_BREAK and NT_S390_SYSTEM_CALL
5359 register sets.
5360 (s390_check_regset): New function.
5361 (s390_arch_setup): Check for presence of NT_S390_LAST_BREAK and
5362 NT_S390_SYSTEM_CALL regsets and use appropriate description.
5363 Update target_regsets for available register sets.
5364
5365 2011-12-02 Paul Pluzhnikov <ppluzhnikov@google.com>
5366 Jan Kratochvil <jan.kratochvil@redhat.com>
5367
5368 * linux-low.c (get_phdr_phnum_from_proc_auxv, get_dynamic, get_r_debug)
5369 (read_one_ptr, struct link_map_offsets, linux_qxfer_libraries_svr4):
5370 New.
5371 (struct linux_target_ops): Install linux_qxfer_libraries_svr4.
5372 * linux-low.h (struct process_info_private): New member r_debug.
5373 * server.c (handle_qxfer_libraries): Call
5374 the_target->qxfer_libraries_svr4.
5375 (handle_qxfer_libraries_svr4): New function.
5376 (qxfer_packets): New entry "libraries-svr4".
5377 (handle_query): Check QXFER_LIBRARIES_SVR4 and report libraries-svr4.
5378 * target.h (struct target_ops): New member qxfer_libraries_svr4.
5379 * remote.c (remote_xfer_partial): Call add_packet_config_cmd for
5380 PACKET_qXfer_libraries_svr4.
5381
5382 2011-11-30 Ulrich Weigand <uweigand@de.ibm.com>
5383
5384 * linux-s390-low.c (s390_collect_ptrace_register): Fully convert
5385 PSW address/mask between 8-byte and 16-byte formats.
5386 (s390_supply_ptrace_register): Likewise.
5387 (s390_get_pc, s390_set_pc): 4-byte PSW address always includes
5388 basic addressing mode bit.
5389
5390 2011-11-24 Stan Shebs <stan@codesourcery.com>
5391
5392 * tracepoint.c (cmd_qtstatus): Use plongest instead of %llx.
5393
5394 2011-11-17 Stan Shebs <stan@codesourcery.com>
5395
5396 * tracepoint.c (struct tracepoint): New field traceframe_usage.
5397 (tracing_start_time): New global.
5398 (tracing_stop_time): New global.
5399 (tracing_user_name): New global.
5400 (tracing_notes): New global.
5401 (tracing_stop_note): New global.
5402 (cmd_qtstart): Set traceframe_usage, start_time.
5403 (stop_tracing): Set stop_time.
5404 (cmd_qtstatus): Report additional status.
5405 (cmd_qtp): New function.
5406 (handle_tracepoint_query): Call it.
5407 (cmd_qtnotes): New function.
5408 (handle_tracepoint_general_set): Call it.
5409 (get_timestamp): Rename from tsv_get_timestamp.
5410
5411 2011-11-14 Stan Shebs <stan@codesourcery.com>
5412 Kwok Cheung Yeung <kcy@codesourcery.com>
5413
5414 * linux-x86-low.c (small_jump_insn): New.
5415 (i386_install_fast_tracepoint_jump_pad): Add arguments for
5416 trampoline and error message, build a trampoline and issue a small
5417 jump instruction to it.
5418 (x86_install_fast_tracepoint_jump_pad): Add arguments for
5419 trampoline and error message.
5420 (x86_get_min_fast_tracepoint_insn_len): New.
5421 (the_low_target): Add call to x86_get_min_fast_tracepoint_insn_len.
5422 * linux-low.h (struct linux_target_ops): Add arguments to
5423 install_fast_tracepoint_jump_pad operation, add new operation.
5424 * linux-low.c (linux_install_fast_tracepoint_jump_pad): Add
5425 arguments.
5426 (linux_get_min_fast_tracepoint_insn_len): New function.
5427 (linux_target_op): Add new operation.
5428 * tracepoint.c (gdb_trampoline_buffer): New IPA variable.
5429 (gdb_trampoline_buffer_end): Ditto.
5430 (gdb_trampoline_buffer_error): Ditto.
5431 (struct ipa_sym_addresses): Add fields for new IPA variables.
5432 (symbol_list): Add entries for new IPA variables.
5433 (struct tracepoint): Add fields to hold the address range of the
5434 trampoline used by the tracepoint.
5435 (trampoline_buffer_head): New static variable.
5436 (trampoline_buffer_tail): Ditto.
5437 (claim_trampoline_space): New function.
5438 (have_fast_tracepoint_trampoline_buffer): New function.
5439 (clone_fast_tracepoint): Fill in trampoline fields of tracepoint
5440 structure.
5441 (install_fast_tracepoint): Ditto, also add error buffer argument.
5442 (cmd_qtminftpilen): New function.
5443 (handle_tracepoint_query): Add response to qTMinFTPILen packet.
5444 (fast_tracepoint_from_trampoline_address): New function.
5445 (fast_tracepoint_collecting): Handle trampoline as part of jump
5446 pad space.
5447 (set_trampoline_buffer_space): New function.
5448 (initialize_tracepoint): Initialize new IPA variables.
5449 * target.h (struct target_ops): Add arguments to
5450 install_fast_tracepoint_jump_pad operation, add new
5451 get_min_fast_tracepoint_insn_len operation.
5452 (target_get_min_fast_tracepoint_insn_len): New.
5453 (install_fast_tracepoint_jump_pad): Add arguments.
5454 * server.h (IPA_BUFSIZ): Define.
5455 * linux-i386-ipa.c: Include extra header files.
5456 (initialize_fast_tracepoint_trampoline_buffer): New function.
5457 (initialize_low_tracepoint): Call it.
5458 * server.h (set_trampoline_buffer_space): Declare.
5459 (claim_trampoline_space): Ditto.
5460 (have_fast_tracepoint_trampoline_buffer): Ditto.
5461
5462 2011-11-14 Yao Qi <yao@codesourcery.com>
5463
5464 * server.c (handle_query): Handle InstallInTrace for qSupported.
5465 * tracepoint.c (add_tracepoint): Sort list.
5466 (install_tracepoint, download_tracepoint): New.
5467 (cmd_qtdp): Call them to install and download tracepoints.
5468 (sort_tracepoints): Removed.
5469 (cmd_qtstart): Update.
5470
5471 2011-11-14 Yao Qi <yao@codesourcery.com>
5472
5473 * mem-break.c (inc_ref_fast_tracepoint_jump): New.
5474 * mem-break.h: Declare.
5475 * tracepoint.c (cmd_qtstart): Move some code to ...
5476 (clone_fast_tracepoint, install_fast_tracepoint): ... here.
5477 New.
5478 (download_tracepoints): Move some code to ...
5479 (download_tracepoint_1): ... here. New.
5480
5481 2011-11-08 Yao Qi <yao@codesourcery.com>
5482
5483 * remote-utils.c (relocate_instruction): A comment fix.
5484
5485 2011-11-07 Joel Brobecker <brobecker@adacore.com>
5486
5487 * win32-i386-low.c (dr_status_mirror, dr_control_mirror): Delete.
5488 (i386_dr_low_get_control, i386_dr_low_get_status): Use
5489 dr_status_mirror and dr_control_mirror from debug_reg_state.
5490 (i386_dr_low_get_status): Use debug_reg_state.dr_status_mirror
5491 (i386_initial_stuff): Remove use of deleted globals.
5492 (i386_get_thread_context, i386_set_thread_context,
5493 i386_thread_added): Use dr_status_mirror and dr_control_mirror
5494 from debug_reg_state.
5495
5496 2011-11-05 Yao Qi <yao@codesourcery.com>
5497
5498 * tracepoint.c (gdb_collect): Loop over tracepoints of same
5499 address as TPOINT's.
5500
5501 2011-11-02 Stan Shebs <stan@codesourcery.com>
5502
5503 * tracepoint.c (agent_mem_read_string): New function.
5504 (eval_agent_expr): Call it for tracenz.
5505 * server.c (handle_query): Report support for tracenz.
5506
5507 2011-11-02 Yao Qi <yao@codesourcery.com>
5508
5509 * tracepoint.c (cmd_qtstart): Remove unused local variables.
5510
5511 2011-11-02 Yao Qi <yao@codesourcery.com>
5512
5513 * target.h: Fix a typo in comment.
5514
5515 2011-10-31 Pedro Alves <pedro@codesourcery.com>
5516
5517 * mem-break.c (check_mem_write): Add `myaddr' parameter. Don't
5518 clobber the breakpoints' shadows with fast tracepoint jumps.
5519 * mem-break.h (check_mem_write): Add `myaddr' parameter.
5520 * target.c (write_inferior_memory): Also pass MYADDR down to
5521 check_mem_write.
5522
5523 2011-10-07 Ulrich Weigand <ulrich.weigand@linaro.org>
5524
5525 * configure.ac: Check support for personality routine.
5526 * configure: Regenerate.
5527 * config.in: Likewise.
5528 * linux-low.c: Include <sys/personality.h>.
5529 Define ADDR_NO_RANDOMIZE if necessary.
5530 (linux_create_inferior): Disable address space randomization when
5531 forking inferior, if requested.
5532 (linux_supports_disable_randomization): New function.
5533 (linux_target_ops): Install it.
5534 * server.h (disable_randomization): Declare.
5535 * server.c (disable_randomization): New global variable.
5536 (handle_general_set): Handle QDisableRandomization.
5537 (handle_query): Likewise for qSupported.
5538 (main): Support --disable-randomization and --no-disable-randomization
5539 command line arguments.
5540 * target.h (struct target_ops): Add supports_disable_randomization.
5541 (target_supports_disable_randomization): New macro.
5542
5543 2011-09-29 Mike Frysinger <vapier@gentoo.org>
5544
5545 * linux-low.c (target_loadseg): Add defined PTRACE_GETFDPIC to the
5546 ifdef check.
5547 [PT_GETDSBT] (target_loadmap): Wrap in a defined PT_GETDSBT check.
5548 [!PT_GETDSBT] (target_loadmap): New definition.
5549 (LINUX_LOADMAP, LINUX_LOADMAP_EXEC, LINUX_LOADMAP_INTERP): Define.
5550 (linux_read_loadmap): Change PTRACE_GETDSBT_EXEC to
5551 LINUX_LOADMAP_EXEC, PTRACE_GETDSBT_INTERP to LINUX_LOADMAP_INTERP,
5552 and PT_GETDSBT to LINUX_LOADMAP.
5553 [!PT_GETDSBT] (linux_read_loadmap): Define to NULL.
5554 (linux_target_ops): Delete unnecessary ifdef PT_GETDSBT check.
5555
5556 2011-09-21 Ulrich Weigand <ulrich.weigand@linaro.org>
5557
5558 * linux-arm-low.c (struct arm_linux_hwbp_cap): Remove.
5559 (arm_linux_hwbp_cap): New static variable.
5560 (arm_linux_get_hwbp_cap): Replace by ...
5561 (arm_linux_init_hwbp_cap): ... this new function.
5562 (arm_linux_get_hw_breakpoint_count): Use arm_linux_hwbp_cap.
5563 (arm_linux_get_hw_watchpoint_count): Likewise.
5564 (arm_linux_get_hw_watchpoint_max_length): Likewise.
5565 (arm_arch_setup): Call arm_linux_init_hwbp_cap.
5566 (arm_prepare_to_resume): Use perror_with_name instead of error.
5567
5568 2011-09-21 Ulrich Weigand <ulrich.weigand@linaro.org>
5569
5570 * linux-arm-low.c: Include <signal.h>.
5571 (PTRACE_GETHBPREGS, PTRACE_SETHBPREGS): Define if necessary.
5572 (struct arm_linux_hwbp_cap): New data type.
5573 (arm_hwbp_type, arm_hwbp_control_t): New typedefs.
5574 (struct arm_linux_hw_breakpoint): New data type.
5575 (MAX_BPTS, MAX_WPTS): Define.
5576 (struct arch_process_info, struct arch_lwp_info): New data types.
5577 (arm_linux_get_hwbp_cap): New function.
5578 (arm_linux_get_hw_breakpoint_count): Likewise.
5579 (arm_linux_get_hw_watchpoint_count): Likewise.
5580 (arm_linux_get_hw_watchpoint_max_length): Likewise.
5581 (arm_hwbp_control_initialize): Likewise.
5582 (arm_hwbp_control_is_enabled): Likewise.
5583 (arm_hwbp_control_is_initialized): Likewise.
5584 (arm_hwbp_control_disable): Likewise.
5585 (arm_linux_hw_breakpoint_equal): Likewise.
5586 (arm_linux_hw_point_initialize): Likewise.
5587 (struct update_registers_data): New data structure.
5588 (update_registers_callback: New function.
5589 (arm_insert_point): Likewise.
5590 (arm_remove_point): Likewise.
5591 (arm_stopped_by_watchpoint): Likewise.
5592 (arm_stopped_data_address): Likewise.
5593 (arm_new_process): Likewise.
5594 (arm_new_thread): Likewise.
5595 (arm_prepare_to_resume): Likewise.
5596 (the_low_target): Register arm_insert_point, arm_remove_point,
5597 arm_stopped_by_watchpoint, arm_stopped_data_address, arm_new_process,
5598 arm_new_thread, and arm_prepare_to_resume.
5599
5600 2011-09-15 Stan Shebs <stan@codesourcery.com>
5601
5602 * server.h (struct emit_ops): Add compare-goto fields.
5603 * tracepoint.c (gdb_agent_op_sizes): New table.
5604 (emit_eq_goto): New function.
5605 (emit_ne_goto): New function.
5606 (emit_lt_goto): New function.
5607 (emit_le_goto): New function.
5608 (emit_gt_goto): New function.
5609 (emit_ge_goto): New function.
5610 (is_goto_target): New function.
5611 (compile_bytecodes): Recognize special cases of compare-goto
5612 combinations and call specialized emitters for them.
5613 * linux-x86-low.c (amd64_emit_eq_goto): New function.
5614 (amd64_emit_ne_goto): New function.
5615 (amd64_emit_lt_goto): New function.
5616 (amd64_emit_le_goto): New function.
5617 (amd64_emit_gt_goto): New function.
5618 (amd64_emit_ge_goto): New function.
5619 (amd64_emit_ops): Add the new functions.
5620 (i386_emit_eq_goto): New function.
5621 (i386_emit_ne_goto): New function.
5622 (i386_emit_lt_goto): New function.
5623 (i386_emit_le_goto): New function.
5624 (i386_emit_gt_goto): New function.
5625 (i386_emit_ge_goto): New function.
5626 (i386_emit_ops): Add the new functions.
5627
5628 2011-09-08 Stan Shebs <stan@codesourcery.com>
5629
5630 * linux-x86-low.c (i386_emit_prologue): Save %ebx.
5631 (i386_emit_epilogue): Restore %ebx.
5632
5633 2011-08-31 Jie Zhang <jzhang918@gmail.com>
5634
5635 * server.c (step_thread): Remove definition.
5636 (process_serial_event): Don't handle Hs.
5637 * server.h (step_thread): Remove declaration.
5638 * target.c (set_desired_inferior): Remove use of step_thread.
5639
5640 2011-08-24 Luis Machado <lgustavo@codesourcery.com>
5641
5642 * linux-low.c: Include linux-procfs.h.
5643 (linux_attach_lwp_1): Update comments.
5644 (linux_attach): Scan for existing threads when attaching to a
5645 process that is the tgid.
5646 * Makefile.in: Update dependencies.
5647
5648 2011-08-24 Luis Machado <lgustavo@codesourcery.com>
5649
5650 * configure.srv: Add linux-procfs.o dependencies.
5651
5652 2011-08-14 Yao Qi <yao@codesourcery.com>
5653
5654 * target.h (struct target_ops): Fix indent.
5655 * win32-low.c (win32_target_ops): Fix comment.
5656
5657 2011-08-14 Andrew Jenner <andrew@codesourcery.com>
5658 Yao Qi <yao@codesourcery.com>
5659
5660 * Makefile.in (clean): Remove tic6x-*.c files.
5661 (linux-tic6x-low.o, tic6x-c62x-linux.o, tic6x-c64x-linux.o): New rules.
5662 (tic6x-c64xp-linux.o, tic6x-c62x-linux.c, tic6x-c64x-linux.c): Likewise.
5663 (tic6x-c64xp-linux.c): Likewise.
5664 * configure.srv: Add support for tic6x-*-uclinux.
5665 * linux-tic6x-low.c: New.
5666 * linux-low.c (PT_TEXT_ADDR, PT_DATA_ADDR, PT_TEXT_END_ADDR): Define.
5667
5668 2011-08-14 Andrew Stubbs <ams@codesourcery.com>
5669 Yao Qi <yao@codesourcery.com>
5670
5671 * target.h (struct target_ops): Add read_loadmap.
5672 * linux-low.c (struct target_loadseg): New type.
5673 (struct target_loadmap): New type.
5674 (linux_read_loadmap): New function.
5675 (linux_target_ops): Add linux_read_loadmap.
5676 * server.c (handle_query): Support qXfer:fdpic:read packet.
5677 * win32-low.c (win32_target_ops): Initialize field `read_loadmap'
5678 to NULL.
5679
5680 2011-08-05 Eli Zaretskii <eliz@gnu.org>
5681
5682 * win32-low.c: Include <stdint.h>.
5683
5684 2011-07-22 Pedro Alves <pedro@codesourcery.com>
5685
5686 * i386-low.c (i386_insert_aligned_watchpoint): Don't pass the info
5687 to the inferior here.
5688 (i386_remove_aligned_watchpoint): Ditto.
5689 (i386_handle_nonaligned_watchpoint): Return immediate on fail to
5690 fit part of the watchpoint in the debug registers.
5691 (i386_update_inferior_debug_regs): New.
5692 (i386_low_insert_watchpoint): Work on a local mirror of the debug
5693 registers, and only update the inferior on success.
5694 (i386_low_remove_watchpoint): Ditto.
5695
5696 2011-07-22 Kwok Cheung Yeung <kcy@codesourcery.com>
5697
5698 * linux-low.c (compare_ints, unique, list_threads, show_process,
5699 linux_core_of_thread): Delete.
5700 (linux_target_ops): Change linux_core_of_thread to
5701 linux_common_core_of_thread.
5702 (linux_qxfer_osdata): Defer to linux_common_xfer_osdata.
5703 * utils.c (malloc_failure): Change type of argument.
5704 (xmalloc, xrealloc, xcalloc, xsnprintf): Delete.
5705 * Makefile.in (SFILES): Add common/common-utils.c, common/xml-utils.c,
5706 common/linux-osdata.c, common/ptid.c and common/buffer.c.
5707 (OBS): Add xml-utils.o, common-utils.o, ptid.o and buffer.o.
5708 (IPA_OBJS): Add common-utils-ipa.o.
5709 (ptid_h, linux_osdata_h): New macros.
5710 (server_h): Add common/common-utils.h, common/xml-utils.h,
5711 common/buffer.h, common/gdb_assert.h, common/gdb_locale.h and
5712 common/ptid.h.
5713 (common-utils-ipa.o, common-utils.o, xml-utils.o, linux-osdata.o,
5714 ptid.o, buffer.o): New rules.
5715 (linux-low.o): Add common/linux-osdata.h as a dependency.
5716 * configure.srv (srv_tgtobj): Add linux-osdata.o to Linux targets.
5717 * configure.ac: Add AC_HEADER_DIRENT check.
5718 * config.in: Regenerate.
5719 * configure: Regenerate.
5720 * remote-utils.c (xml_escape_text): Delete.
5721 (buffer_grow, buffer_free, buffer_init, buffer_finish,
5722 buffer_xml_printf): Move to common/buffer.c.
5723 * server.c (main): Remove call to initialize_inferiors.
5724 * server.h (struct ptid, ptid_t, minus_one_ptid, null_ptid,
5725 ptid_build, pid_to_ptid, ptid_get_pid, ptid_get_lwp, ptid_get_tid,
5726 ptid_equal, ptid_is_pid, initialize_inferiors, xml_escape_text,
5727 internal_error, gdb_assert, gdb_assert_fail): Delete.
5728 (struct buffer, buffer_grow, buffer_free, buffer_init, buffer_finish,
5729 buffer_xml_printf, buffer_grow_str, buffer_grow_str0): Move to
5730 common/buffer.h.
5731 * inferiors.c (null_ptid, minus_one_ptid, ptid_build, pid_to_ptid,
5732 ptid_get_pid, ptid_get_lwp, ptid_get_tid, ptid_equal, ptid_is_pid,
5733 initialize_inferiors): Delete.
5734
5735 2011-07-20 Pedro Alves <pedro@codesourcery.com>
5736
5737 * tracepoint.c (tracepoint_look_up_symbols): Return upon the first
5738 symbol error.
5739
5740 2011-05-31 Pedro Alves <pedro@codesourcery.com>
5741
5742 * linux-x86-low.c (i386_dr_low_get_addr): Fix off by one in
5743 assertion.
5744 * win32-i386-low.c (i386_dr_low_get_addr): Ditto.
5745
5746 2011-05-26 Yao Qi <yao@codesourcery.com>
5747
5748 * Makefile.in (thread-db.o): Track dependence to
5749 common/gdb_thread_db.h.
5750 * thread-db.c: include gdb_thread_db.h from right place.
5751
5752 2011-05-16 Adrian Cornish <gnu@bluedreamer.com>
5753
5754 * linux-i386-ipa.c (supply_static_tracepoint_registers): Pass
5755 __FILE__ and __LINE__ to internal_error.
5756
5757 2011-05-13 Doug Evans <dje@google.com>
5758
5759 * thread-db.c (try_thread_db_load_from_sdir): New function.
5760 (try_thread_db_load_from_dir): New function.
5761 (thread_db_load_search): Handle $sdir, ignore $pdir.
5762 Remove trying of system directories if search of
5763 libthread-db-search-path fails, that is now done via $sdir.
5764
5765 2011-05-12 Kwok Cheung Yeung <kcy@codesourcery.com>
5766
5767 * server.c (handle_query): Add EnableDisableTracepoints to the list
5768 of supported features.
5769 * tracepoint.c (clear_installed_tracepoints): Uninstall disabled
5770 tracepoints.
5771 (cmd_qtenable_disable): New.
5772 (cmd_qtstart): Install tracepoints even if disabled.
5773 (handle_tracepoint_general_set): Add call to cmd_qtenable_disable on
5774 receiving a QTEnable or QTDisable packet.
5775 (gdb_collect): Skip data collection if fast tracepoint is disabled.
5776 (ust_marker_to_static_tracepoint): Do not ignore disabled static
5777 tracepoints.
5778 (gdb_probe): Skip data collection if static tracepoint is disabled.
5779
5780 2011-05-10 Doug Evans <dje@google.com>
5781
5782 * thread-db.c (thread_db_handle_monitor_command): Handle elided path.
5783
5784 2011-05-04 Doug Evans <dje@google.com>
5785
5786 * linux-low.c (linux_join): Skip process lookup.
5787 * spu-low.c (spu_join): Ditto.
5788 * server.c (join_inferiors_callback): Delete.
5789 (process_serial_event): For 'D' packet (detach) call join_inferior
5790 directly.
5791
5792 2011-05-04 Joseph Myers <joseph@codesourcery.com>
5793
5794 * README: Don't mention xscale*-*-linux*.
5795 * configure.srv (xscale*-*-linux*): Don't handle target.
5796
5797 2011-04-27 Nathan Froyd <froydnj@codesourcery.com>
5798
5799 * linux-x86-low.c (amd64_emit_const): Call memcpy instead of
5800 casting pointers.
5801 (amd64_emit_reg, amd64_emit_int_call_1, amd64_emit_void_call_2):
5802 (i386_emit_const, i386_emit_reg, i386_emit_int_call_1):
5803 (i386_emit_void_call_2): Likewise.
5804
5805 2011-04-26 Yao Qi <yao@codesourcery.com>
5806
5807 * linux-low.c: Move common macros to linux-ptrace.h.
5808 Include linux-ptrace.h.
5809 * Makefile.in (linux_ptrace_h): New.
5810 (linux-low.o): Depends on linux-ptrace.h.
5811
5812 2011-04-24 Jan Kratochvil <jan.kratochvil@redhat.com>
5813
5814 * remote-utils.c (handle_accept_event): Close LISTEN_DESC only if
5815 RUN_ONCE. Comment for the LISTEN_DESC delete_file_handler call.
5816 (remote_prepare): New function with most of the TCP code from ...
5817 (remote_open): ... here. Detect PORT here unconditionally. Move also
5818 setting transport_is_reliable.
5819 * server.c (run_once): New variable.
5820 (gdbserver_usage): Document it.
5821 (main): Set run_once for `--once'. Call remote_prepare. Exit after
5822 the first run if RUN_ONCE.
5823 * server.h (run_once, remote_prepare): New declarations.
5824
5825 2011-04-19 Tom Tromey <tromey@redhat.com>
5826
5827 * win32-low.c (handle_load_dll): Remove duplicate "the".
5828
5829 2011-04-07 Pierre Muller <muller@ics.u-strasbg.fr>
5830
5831 Remove support for old Cygwin 1.5 versions.
5832 * win32-low.c (win32_create_inferior): Use new cygwin_path_list
5833 function to avoid warning.
5834 (win32_add_one_solib): Use cygwin_conv_path function to avoid
5835 warning.
5836
5837 2011-03-18 Pierre Muller <muller@ics.u-strasbg.fr>
5838
5839 * gdbserver/server.h (Macro _): Define it if not available.
5840
5841 2011-03-14 Michael Snyder <msnyder@vmware.com>
5842
5843 * hostio.c (handle_close): Remove unnecessary null test.
5844
5845 2011-03-10 Joel Brobecker <brobecker@adacore.com>
5846
5847 * Makefile.in (maintainer-clean realclean distclean): Remove
5848 "make ... subdir_do" command.
5849
5850 2011-03-10 Michael Snyder <msnyder@vmware.com>
5851
5852 * tracepoint.c (tracepoint_finish_step): Fix loop variable.
5853
5854 * server.c (handle_v_run): Free alloced buffer on early return.
5855
5856 2011-03-09 Yao Qi <yao@codesourcery.com>
5857
5858 Revert:
5859 2011-03-04 Yao Qi <yao@codesourcery.com>
5860
5861 * Makefile.in: Remove GNU make feature --directory.
5862
5863 2011-03-05 Yao Qi <yao@codesourcery.com>
5864
5865 * Makefile.in (CLEANDIRS, REQUIRED_SUBDIRS): New variable.
5866 (subdir_do): New make target. Copied from gdb/Makefile.
5867 (maintainer-clean, realclean, distclean, clean): Call corresponding
5868 make targets in common/Makefile.
5869
5870 2011-02-11 Yao Qi <yao@codesourcery.com>
5871
5872 * configure.ac: Call AC_PROG_RANLIB.
5873 * Makefile.in: Remove signals.o from OBS. Link libcommon.a.
5874 * configure: Regenerate.
5875
5876 2011-03-07 Jan Kratochvil <jan.kratochvil@redhat.com>
5877
5878 * remote-utils.c (putpkt_binary_1): Calculate BUF2 size dynamically.
5879
5880 2011-03-06 Yao Qi <yao@codesourcery.com>
5881
5882 * Makefile.in (REQUIRED_SUBDIRS): Remove $(LIBCOMMON_DIR).
5883
5884 2011-03-05 Yao Qi <yao@codesourcery.com>
5885
5886 * Makefile.in (CLEANDIRS, REQUIRED_SUBDIRS): New variable.
5887 (subdir_do): New make target. Copied from gdb/Makefile.
5888 (maintainer-clean, realclean, distclean, clean): Call corresponding
5889 make targets in common/Makefile.
5890
5891 2011-03-04 Yao Qi <yao@codesourcery.com>
5892
5893 * Makefile.in: Remove GNU make feature --directory.
5894
5895 2011-03-04 Michael Snyder <msnyder@vmware.com>
5896
5897 * server.c (queue_stop_reply): Call xmalloc not malloc.
5898
5899 2011-03-02 Michael Snyder <msnyder@vmware.com>
5900
5901 * linux-arm-low.c (arm_arch_setup): Replace malloc with xmalloc.
5902
5903 2011-02-28 Michael Snyder <msnyder@vmware.com>
5904
5905 * tracepoint.c (cmd_qtv): Discard unused value 'packet'.
5906 (cmd_qtframe): Ditto.
5907 (cmd_qtbuffer): Ditto.
5908 (cmd_bigqtbuffer): Ditto.
5909
5910 * utils.c (decimal2str): Initialize 'width' to nine, then
5911 don't mess with it.
5912
5913 2011-02-28 Ulrich Weigand <uweigand@de.ibm.com>
5914
5915 * hostio.c (require_data): Free *data, not data.
5916
5917 2011-02-28 Jan Kratochvil <jan.kratochvil@redhat.com>
5918
5919 * hostio.c (require_data): Use free, not xfree.
5920
5921 2011-02-27 Michael Snyder <msnyder@vmware.com>
5922
5923 * server.c (handle_query): Discard unused value.
5924
5925 * hostio.c (require_data): Free malloc memory before returning
5926 error.
5927
5928 2011-02-26 Michael Snyder <msnyder@vmware.com>
5929
5930 * linux-low.c (list_threads): Call closedir for dirent.
5931
5932 2011-02-27 Michael Snyder <msnyder@vmware.com>
5933
5934 * i386-low.c (i386-length_and_rw_bits): Comment the fact that
5935 a case statement falls through.
5936
5937 * linux-low.c (linux_xfer_siginfo): Fix fencepost error.
5938
5939 * linux-amd64-ipa.c (gdb_agent_get_raw_reg): Fix fencepost error
5940 in comparison.
5941
5942 2011-02-26 Michael Snyder <msnyder@vmware.com>
5943
5944 * utils.c (decimal2str): Eliminate dead code and dead param.
5945 (pulongest): Drop dead param from call to decimal2str.
5946 (plongest): Ditto.
5947
5948 2011-02-24 Joel Brobecker <brobecker@adacore.com>
5949
5950 Revert the following patch (not approved yet):
5951 2011-02-21 Hui Zhu <teawater@gmail.com>
5952 * tracepoint.c (tp_printf): New function.
5953 (eval_agent_expr): Handle gdb_agent_op_printf.
5954
5955 2011-02-21 Hui Zhu <teawater@gmail.com>
5956
5957 * tracepoint.c (tp_printf): New function.
5958 (eval_agent_expr): Handle gdb_agent_op_printf.
5959
5960 2011-02-18 Tom Tromey <tromey@redhat.com>
5961
5962 * Makefile.in (tracepoint-ipa.o): Depend on ax.def.
5963 (tracepoint.o): Likewise.
5964 * tracepoint.c (enum gdb_agent_op): Use ax.def.
5965 (gdb_agent_op_names): Likewise.
5966
5967 2011-02-18 Tom Tromey <tromey@redhat.com>
5968
5969 * tracepoint.c (enum gdb_agent_op) <gdb_agent_op_pick,
5970 gdb_agent_op_rot>: New constants.
5971 (gdb_agent_op_names): Add pick and roll.
5972 (eval_agent_expr) <gdb_agent_op_pick, gdb_agent_op_rot>: New
5973 cases.
5974
5975 2011-02-15 Jan Kratochvil <jan.kratochvil@redhat.com>
5976
5977 * aclocal.m4: Regenerated with aclocal-1.11.1.
5978
5979 2011-02-14 Pedro Alves <pedro@codesourcery.com>
5980
5981 * server.c (handle_qxfer_traceframe_info): New.
5982 (qxfer_packets): Register "traceframe-info".
5983 (handle_query): Report support for qXfer:traceframe-info:read+.
5984 * tracepoint.c (match_blocktype): New.
5985 (traceframe_find_block_type): Rename to ...
5986 (traceframe_walk_blocks): ... this. Add callback filter argument,
5987 and use it.
5988 (traceframe_find_block_type): New, reimplemented on top of
5989 traceframe_walk_blocks.
5990 (build_traceframe_info_xml): New.
5991 (traceframe_read_info): New.
5992 * server.h (traceframe_read_info): Declare.
5993
5994 2011-02-11 Yao Qi <yao@codesourcery.com>
5995
5996 * configure.ac: Call AC_PROG_RANLIB.
5997 * Makefile.in: Remove signals.o from OBS. Link libcommon.a.
5998 * configure: Regenerate.
5999
6000 2011-02-07 Pedro Alves <pedro@codesourcery.com>
6001
6002 * server.c (gdb_read_memory): Change return semantics to allow
6003 partial transfers.
6004 (handle_search_memory_1): Adjust.
6005 (process_serial_event) <'m' packet>: Handle partial transfers.
6006 * tracepoint.c (traceframe_read_mem): Handle partial transfers.
6007
6008 2011-01-28 Pedro Alves <pedro@codesourcery.com>
6009
6010 * regcache.c (init_register_cache): Initialize
6011 regcache->register_status.
6012 (free_register_cache): Release regcache->register_status.
6013 (regcache_cpy): Copy register_status.
6014 (registers_to_string): Print 'x's for unavailable registers.
6015 (supply_register): Mark the register's status valid or
6016 unavailable, depending on whether a buffer was passed in or not.
6017 (supply_register_zeroed): New.
6018 (supply_regblock): Mark the registers' status valid or
6019 unavailable, depending on whether a buffer was passed in or not.
6020 * regcache.h (REG_UNAVAILABLE, REG_VALID): New defines.
6021 (struct regcache): New `register_status' field.
6022 (supply_register_zeroed): Declare.
6023 * i387-fp.c (i387_xsave_to_cache): Zero out registers using
6024 supply_register_zeroed, rather than passing a NULL buffer to
6025 supply_register.
6026 * tracepoint.c (fetch_traceframe_registers): Update comment.
6027
6028 2011-01-28 Pedro Alves <pedro@codesourcery.com>
6029
6030 * i387-fp.c (i387_xsave_to_cache): Make passing NULL as register
6031 buffer explicit.
6032
6033 2011-01-25 Pedro Alves <pedro@codesourcery.com>
6034
6035 * server.h (decode_xfer_write): Change prototype.
6036 * remote-utils.c (decode_xfer_write): Remove `annex' parameter,
6037 and don't extract the annex here.
6038 * server.c (decode_xfer_read): Remove `annex' parameter,
6039 and don't extract the annex here.
6040 (decode_xfer): New.
6041 (struct qxfer): New.
6042 (handle_qxfer_auxv, handle_qxfer_features, handle_qxfer_libraries)
6043 (handle_qxfer_osdata, handle_qxfer_siginfo, handle_qxfer_spu)
6044 (handle_qxfer_statictrace): New functions, abstracted out from
6045 handle_query, and made to use the struct qxfer interface.
6046 (handle_threads_qxfer_proper): Rename to ...
6047 (handle_qxfer_threads_proper): ... this.
6048 (handle_threads_qxfer): Rename to ...
6049 (handle_qxfer_threads): ... this. Adjust.
6050 (qxfer_packets): New array.
6051 (handle_qxfer): New function.
6052 (handle_query): Use handle_qxfer.
6053
6054 2011-01-05 Michael Snyder <msnyder@msnyder-server.eng.vmware.com>
6055
6056 * gdbreplay.c: Shorten lines of >= 80 columns.
6057 * linux-low.c: Ditto.
6058 * linux-ppc-low.c: Ditto.
6059 * linux-s390-low.c: Ditto.
6060 * linux-sparc-low.c: Ditto.
6061 * linux-x86-low.c: Ditto.
6062 * linux-xtensa-low.c: Ditto.
6063 * mem-break.c: Ditto.
6064 * nto-low.c: Ditto.
6065 * regcache.h: Ditto.
6066 * remote-utils.c: Ditto.
6067 * server.c: Ditto.
6068 * server.h: Ditto.
6069 * thread-db.c: Ditto.
6070 * tracepoint.c: Ditto.
6071 * utils.c: Ditto.
6072 * win32-low.h: Ditto.
6073
6074 2011-01-05 Joel Brobecker <brobecker@adacore.com>
6075
6076 * gdbserver/configure.ac, gdbserver/gdbserver.1: Copyright year
6077 update.
6078
6079 2011-01-01 Joel Brobecker <brobecker@adacore.com>
6080
6081 * server.c (gdbserver_version): Update copyright year in version
6082 output.
6083 * gdbreplay.c (gdbreplay_version): Ditto.
6084
6085 2010-12-29 Jie Zhang <jie.zhang@analog.com>
6086
6087 * configure.srv (bfin-*-*linux*): Handle Blackfin/Linux targets.
6088 * linux-bfin-low.c: New file.
6089 * linux-low.c: Define PT_TEXT_ADDR, PT_TEXT_END_ADDR, and
6090 PT_DATA_ADDR for BFIN targets.
6091 * Makefile.in (SFILES): Add linux-bfin-low.c.
6092 (clean): Remove reg-bfin.c.
6093 (linux-bfin-low.o, reg-bfin.o, reg-bfin.c): New targets.
6094 * README: Mention supported Blackfin targets.
6095
6096 2010-12-23 Mike Frysinger <vapier@gentoo.org>
6097
6098 * .gitignore: New file.
6099
6100 2010-11-16 Mike Frysinger <vapier@gentoo.org>
6101
6102 * linux-low.c (linux_tracefork_child): Add char* cast to arg.
6103
6104 2010-10-22 Jie Zhang <jie@codesourcery.com>
6105
6106 * Makefile.in: Add FLAGS_TO_PASS variable.
6107 (install): Remove dependency of install-only and recursively
6108 invoke make for install-only.
6109
6110 2010-10-04 Doug Evans <dje@google.com>
6111
6112 * Makefile.in (uninstall): Use $(DESTDIR).
6113
6114 2010-09-24 Pedro Alves <pedro@codesourcery.com>
6115
6116 PR gdb/11842
6117
6118 * linux-x86-low.c (compat_siginfo_from_siginfo)
6119 (siginfo_from_compat_siginfo): Also copy si_pid and si_uid when
6120 si_code is < 0. Check for si_code == SI_TIMER before checking for
6121 si_code < 0.
6122
6123 2010-09-13 Joel Brobecker <brobecker@adacore.com>
6124
6125 * lynx-i386-low.c: New file.
6126 * configure.srv: Add handling of i[34567]86-*-lynxos* targets.
6127
6128 2010-09-13 Joel Brobecker <brobecker@adacore.com>
6129
6130 * lynx-low.c (ptrace_request_to_str): Remove handling for
6131 request values that have been removed in LynxOS 5.x.
6132
6133 2010-09-13 Joel Brobecker <brobecker@adacore.com>
6134
6135 * lynx-low.c, lynx-ppc-loc.c: Include <sys/ptrace.h> instead of
6136 <ptrace.h>
6137
6138 2010-09-09 Nathan Sidwell <nathan@codesourcery.com>
6139
6140 * configure.ac: Add --enable-inprocess-agent option.
6141 * configure: Rebuilt.
6142
6143 2010-09-06 Yao Qi <yao@codesourcery.com>
6144
6145 * linux-low.c (linux_kill): Remove unused variable.
6146 (linux_stabilize_threads): Likewise.
6147 * server.c (start_inferior): Likewise.
6148 (queue_stop_reply_callback): Likewise.
6149 * tracepoint.c (do_action_at_tracepoint): Likewise.
6150
6151 2010-09-06 Yao Qi <yao@codesourcery.com>
6152
6153 * linux-low.c (maybe_move_out_of_jump_pad): Restore current_inferior
6154 on return.
6155
6156 2010-09-06 Jan Kratochvil <jan.kratochvil@redhat.com>
6157
6158 * target.c (mywait) <TARGET_WAITKIND_EXITED>: Fix to use INTEGER.
6159
6160 2010-09-06 Pedro Alves <pedro@codesourcery.com>
6161
6162 * Makefile.in (install-only): Replace $IPA_DEPFILES with
6163 "$(IPA_DEPFILES)".
6164
6165 2010-09-01 Joel Brobecker <brobecker@adacore.com>
6166
6167 * gdbserver/lynx-low.c, gdbserver/lynx-low.h,
6168 gdbserver/lynx-ppc-low.c: New files.
6169 * Makefile.in (lynx_low_h): New variable.
6170 (lynx-low.o, lynx-ppc-low.o): New rules.
6171 * configure.ac: On LynxOS, link with -lnetinet.
6172 * configure.srv: Add handling of powerpc-*-lynxos* targets.
6173 * configure: regenerate.
6174
6175 2010-09-01 Joel Brobecker <brobecker@adacore.com>
6176
6177 * Makefile.in (vasprintf.o, vsnprintf.o): New rules.
6178 * configure.ac: Add check for vasprintf and vsnprintf.
6179 * configure, config.in: Regenerate.
6180 * server.h (vasprintf, vsnprintf): Add conditional declarations.
6181
6182 2010-09-01 Joel Brobecker <brobecker@adacore.com>
6183
6184 * gdbreplay.c: Move include of alloca.h up, next to include of
6185 malloc.h.
6186 * server.h: Add include of malloc.h.
6187 * mem-break.c: Remove include of malloc.h.
6188 * server.c, tracepoint.c, utils.c, win32-low.c: Likewise.
6189
6190 2010-09-01 Joel Brobecker <brobecker@adacore.com>
6191
6192 * Makefile.in (memmem.o): Build with -Wno-error.
6193
6194 2010-09-01 Joel Brobecker <brobecker@adacore.com>
6195
6196 * utils.c (xsnprintf): Make non-static.
6197 * server.h: Add xsnprintf declaration.
6198 * linux-low.c, nto-low.c, target.c, thread-db.c, tracepoint.c:
6199 replace calls to snprintf by calls to xsnprintf throughout.
6200
6201 2010-09-01 Joel Brobecker <brobecker@adacore.com>
6202
6203 * configure.ac: Add configure check for alloca.
6204 * configure, config.in: Regenerate.
6205 * server.h: Include alloca.h if it exists.
6206 * gdbreplay.c: Include alloca.h if it exists.
6207
6208 2010-08-28 Pedro Alves <pedro@codesourcery.com>
6209
6210 * linux-low.c (__SIGRTMIN): Define if not already defined.
6211 (linux_create_inferior): Check for __ANDROID__ rather than
6212 __SIGRTMIN.
6213 (enqueue_one_deferred_signal): Don't requeue non-RT signals that
6214 are already deferred.
6215 (linux_wait_1): Check for __ANDROID__ rather than __SIGRTMIN.
6216 (linux_resume_one_thread): Don't queue a SIGSTOP if the lwp is
6217 stopped and already has a pending signal to report.
6218 (proceed_one_lwp): : Don't queue a SIGSTOP if the lwp already has
6219 a pending signal to report or is moving out of a jump pad.
6220 (linux_init_signals): Check for __ANDROID__ rather than
6221 __SIGRTMIN.
6222
6223 2010-08-28 Pedro Alves <pedro@codesourcery.com>
6224
6225 * linux-low.c (linux_stabilize_threads): Wrap debug output in a
6226 debug_threads check. Avoid a linear search when not doing debug
6227 output.
6228
6229 2010-08-27 Pedro Alves <pedro@codesourcery.com>
6230
6231 * event-loop.c (event_handle_func): Adjust to use gdb_fildes_t.
6232 (struct gdb_event) <fd>: Change type to gdb_fildes_t.
6233 (struct file_handler) <fd>: Change type to gdb_fildes_t.
6234 (process_event): Change local fd's type to gdb_fildes_t.
6235 (create_file_handler): Adjust prototype.
6236 (delete_file_handler): Adjust prototype.
6237 (handle_file_event): Adjust prototype. Use pfildes.
6238 (create_file_event): Adjsut prototype.
6239 * remote-utils.c (remote_desc, listen_desc): Change type to
6240 gdb_fildes_t.
6241 * server.h: New gdb_fildes_t typedef.
6242 [USE_WIN32API]: Include winsock2.h.
6243 (delete_file_handler, add_file_handler): Adjust prototypes.
6244 (pfildes): Declare.
6245 * utils.c (pfildes): New.
6246
6247 2010-08-27 Pedro Alves <pedro@codesourcery.com>
6248
6249 * configure.ac (build_warnings): Add -Wno-char-subscripts.
6250 * configure: Regenerate.
6251
6252 2010-08-27 Pedro Alves <pedro@codesourcery.com>
6253
6254 * linux-low.c (linux_unprepare_to_access_memory): Rename to ...
6255 (linux_done_accessing_memory): ... this.
6256 (linux_target_ops): Adjust.
6257 * linux-x86-low.c (x86_insert_point, x86_remove_point): Adjust.
6258 * nto-low.c (nto_target_ops): Adjust comment.
6259 * server.c (gdb_read_memory, gdb_write_memory): Adjust.
6260 * spu-low.c (spu_target_ops): Adjust comment.
6261 * target.h (target_ops): Rename unprepare_to_access_memory field
6262 to done_accessing_memory.
6263 (unprepare_to_access_memory): Rename to ...
6264 (done_accessing_memory): ... this.
6265
6266 2010-08-26 Pedro Alves <pedro@codesourcery.com>
6267
6268 * linux-low.c (linux_prepare_to_access_memory): New.
6269 (linux_unprepare_to_access_memory): New.
6270 (linux_target_ops): Install them.
6271 * server.c (read_memory): Rename to ...
6272 (gdb_read_memory): ... this. Use
6273 prepare_to_access_memory/prepare_to_access_memory.
6274 (write_memory): Rename to ...
6275 (gdb_write_memory): ... this. Use
6276 prepare_to_access_memory/prepare_to_access_memory.
6277 (handle_search_memory_1): Adjust.
6278 (process_serial_event): Adjust.
6279 * target.h (struct target_ops): New fields
6280 prepare_to_access_memory and unprepare_to_access_memory.
6281 (prepare_to_access_memory, unprepare_to_access_memory): New.
6282 * linux-x86-low.c (x86_insert_point, x86_remove_point): Use
6283 prepare_to_access_memory/prepare_to_access_memory.
6284 * nto-low.c (nto_target_ops): Adjust.
6285 * spu-low.c (spu_target_ops): Adjust.
6286 * win32-low.c (win32_target_ops): Adjust.
6287
6288 2010-08-26 Pedro Alves <pedro@codesourcery.com>
6289
6290 * Makefile.in (WARN_CFLAGS): Get it from configure.
6291 (WERROR_CFLAGS): New.
6292 (INTERNAL_CFLAGS): Add WERROR_CFLAGS.
6293 * configure.ac: Introduce --enable-werror, which adds -Werror to
6294 the compiler command line. Enabled by default. Disable with
6295 --disable-werror. Add -Wdeclaration-after-statement
6296 Wpointer-arith and -Wformat-nonliteral to warning flags.
6297 * configure: Regenerate.
6298
6299 2010-08-26 Pedro Alves <pedro@codesourcery.com>
6300
6301 * mem-break.c [HAVE_MALLOC_H]: Include malloc.h.
6302
6303 2010-08-26 Pedro Alves <pedro@codesourcery.com>
6304
6305 * gdbreplay.c (remote_error): New.
6306 (gdbchar): New.
6307 (expect): Use gdbchar. Check for error reading from GDB.
6308 Clarify sync error output.
6309 (play): Check for errors writing to GDB.
6310 * linux-low.c (sigchld_handler): Really ignore `write' errors.
6311 * remote-utils.c (getpkt): Check for errors writing to the remote
6312 descriptor.
6313
6314 2010-08-25 Pedro Alves <pedro@codesourcery.com>
6315
6316 * linux-low.c (linux_wait_1): Move non-debugging code out of
6317 `debug_threads' control.
6318
6319 2010-08-25 Pedro Alves <pedro@codesourcery.com>
6320
6321 * linux-low.c (linux_wait_1): Don't set last_status here.
6322 * server.c (push_event, queue_stop_reply_callback): Assert we're
6323 not pushing a TARGET_WAITKIND_IGNORE event.
6324 (start_inferior, start_inferior, attach_inferior, handle_v_cont)
6325 (myresume, handle_target_event): Set the thread's last_resume_kind
6326 and last_status from the target returned status.
6327
6328 2010-08-25 Pedro Alves <pedro@codesourcery.com>
6329
6330 PR threads/10729
6331
6332 * linux-x86-low.c (update_debug_registers_callback): New.
6333 (i386_dr_low_set_addr): Use it.
6334 (i386_dr_low_get_addr): New.
6335 (i386_dr_low_set_control): Use update_debug_registers_callback.
6336 (i386_dr_low_get_control): New.
6337 (i386_dr_low_get_status): Adjust.
6338 * linux-low.c (linux_stop_lwp): New.
6339 * linux-low.h (linux_stop_lwp): Declare.
6340
6341 * i386-low.c (I386_DR_GET_RW_LEN): Take the dr7 contents as
6342 argument instead of a i386_debug_reg_state.
6343 (I386_DR_WATCH_HIT): Take the dr6 contents as argument instead of
6344 a i386_debug_reg_state.
6345 (i386_insert_aligned_watchpoint): Adjust.
6346 (i386_remove_aligned_watchpoint): Adjust.
6347 (i386_low_stopped_data_address): Read the debug registers from the
6348 inferior instead of from the mirrors.
6349 * i386-low.h (struct i386_debug_reg_state): Extend comment.
6350 (i386_dr_low_get_addr): Declare.
6351 (i386_dr_low_get_control): Declare.
6352 (i386_dr_low_get_status): Change prototype.
6353
6354 * win32-i386-low.c (dr_status_mirror, dr_control_mirror): New globals.
6355 (i386_dr_low_get_addr): New.
6356 (i386_dr_low_get_control): New.
6357 (i386_dr_low_get_status): Adjust prototype. Return
6358 dr_status_mirror.
6359 (i386_initial_stuff): Clear dr_status_mirror and
6360 dr_control_mirror.
6361 (i386_get_thread_context): Adjust.
6362 (i386_set_thread_context): Adjust.
6363 (i386_thread_added): Adjust.
6364
6365 2010-08-24 Pedro Alves <pedro@codesourcery.com>
6366
6367 * linux-low.h (linux_thread_area): Delete declaration.
6368
6369 2010-08-11 Thomas Schwinge <thomas@codesourcery.com>
6370
6371 * linux-low.c (linux_wait_1): Correctly return the ptid of the child
6372 after its termination.
6373
6374 2010-08-09 Pedro Alves <pedro@codesourcery.com>
6375
6376 * linux-low.c (gdb_wants_lwp_stopped): Delete.
6377 (gdb_wants_all_stopped): Delete.
6378 (linux_wait_1): Don't call them.
6379 * server.c (handle_v_cont): Tag all threads as want-stopped.
6380 (gdb_wants_thread_stopped): Fix comments. Tag the thread that
6381 stopped as "client-wants-stopped".
6382
6383 2010-07-31 Pedro Alves <pedro@codesourcery.com>
6384
6385 * Makefile.in (signals_h): New.
6386 (server_h): Depend on it.
6387 (server.o): Don't depend on $(signals_def).
6388 (signals.o): Depend on $(signals_def).
6389
6390 2010-07-31 Jan Kratochvil <jan.kratochvil@redhat.com>
6391
6392 * Makefile.in (signals_def): New.
6393 (server_h): Append include/gdb/signals.h and signals_def.
6394 (server.o): Append signals_def.
6395
6396 2010-07-25 Jan Kratochvil <jan.kratochvil@redhat.com>
6397
6398 * server.c (handle_target_event): Use target_signal_to_host for
6399 resume_info.sig initialization.
6400 * target.h (struct thread_resume) <sig>: New comment.
6401
6402 2010-07-20 Ozkan Sezer <sezeroz@gmail.com>
6403
6404 * server.c (handle_query): strcpy() the returned string from paddress()
6405 instead of sprintf().
6406 * utils.c (paddress): Return phex_nz().
6407
6408 2010-07-07 Joel Brobecker <brobecker@adacore.com>
6409
6410 * server.c (handle_v_cont): Call mourn_inferior if process
6411 just exited.
6412 (myresume): Likewise.
6413
6414 2010-07-01 Pedro Alves <pedro@codesourcery.com>
6415
6416 Static tracepoints, and integration with UST.
6417
6418 * configure.ac: Handle --with-ust. substitute ustlibs and ustinc.
6419 * mem-break.c (uninsert_all_breakpoints)
6420 (reinsert_all_breakpoints): New.
6421 * mem-break.h (reinsert_all_breakpoints, uninsert_all_breakpoints):
6422 * tracepoint.c (ust_loaded, helper_thread_id, cmd_buf): New.
6423 (gdb_agent_ust_loaded, helper_thread_id)
6424 (gdb_agent_helper_thread_id): New macros.
6425 (struct ipa_sym_addresses): Add addr_ust_loaded,
6426 addr_helper_thread_id, addr_cmd_buf.
6427 (symbol_list): Add ust_loaded, helper_thread_id, cmd_buf.
6428 (in_process_agent_loaded_ust): New.
6429 (write_e_ust_not_loaded): New.
6430 (maybe_write_ipa_ust_not_loaded): New.
6431 (struct collect_static_trace_data_action): New.
6432 (enum tracepoint_type) <static_tracepoint>: New.
6433 (struct tracepoint) <handle>: Mention static tracepoints.
6434 (struct static_tracepoint_ctx): New.
6435 (CMD_BUF_SIZE): New.
6436 (add_tracepoint_action): Handle static tracepoint actions.
6437 (unprobe_marker_at): New.
6438 (clear_installed_tracepoints): Handle static tracepoints.
6439 (cmd_qtdp): Handle static tracepoints.
6440 (probe_marker_at): New.
6441 (cmd_qtstart): Handle static tracepoints.
6442 (response_tracepoint): Handle static tracepoints.
6443 (cmd_qtfstm, cmd_qtsstm, cmd_qtstmat): New.
6444 (handle_tracepoint_query): Handle qTfSTM, qTsSTM and qTSTMat.
6445 (get_context_regcache): Handle static tracepoints.
6446 (do_action_at_tracepoint): Handle static tracepoint actions.
6447 (traceframe_find_block_type): Handle static trace data blocks.
6448 (traceframe_read_sdata): New.
6449 (download_tracepoints): Download static tracepoint actions.
6450 [HAVE_UST] Include ust/ust.h, dlfcn.h, sys/socket.h, and sys/un.h.
6451 (GDB_PROBE_NAME): New.
6452 (ust_ops): New.
6453 (GET_UST_SYM): New.
6454 (USTF): New.
6455 (dlsym_ust): New.
6456 (ust_marker_to_static_tracepoint): New.
6457 (gdb_probe): New.
6458 (collect_ust_data_at_tracepoint): New.
6459 (gdb_ust_probe): New.
6460 (UNIX_PATH_MAX, SOCK_DIR): New.
6461 (gdb_ust_connect_sync_socket): New.
6462 (resume_thread, stop_thread): New.
6463 (run_inferior_command): New.
6464 (init_named_socket): New.
6465 (gdb_ust_socket_init): New.
6466 (cstr_to_hexstr): New.
6467 (next_st): New.
6468 (first_marker, next_marker): New.
6469 (response_ust_marker): New.
6470 (cmd_qtfstm, cmd_qtsstm): New.
6471 (unprobe_marker_at, probe_marker_at): New.
6472 (cmd_qtstmat, gdb_ust_thread): New.
6473 (gdb_ust_init): New.
6474 (initialize_tracepoint_ftlib): Call gdb_ust_init.
6475 * linux-amd64-ipa.c [HAVE_UST]: Include ust/processor.h
6476 (ST_REGENTRY): New.
6477 (x86_64_st_collect_regmap): New.
6478 (X86_64_NUM_ST_COLLECT_GREGS): New.
6479 (AMD64_RIP_REGNUM): New.
6480 (supply_static_tracepoint_registers): New.
6481 * linux-i386-ipa.c [HAVE_UST]: Include ust/processor.h
6482 (ST_REGENTRY): New.
6483 (i386_st_collect_regmap): New.
6484 (i386_NUM_ST_COLLECT_GREGS): New.
6485 (supply_static_tracepoint_registers): New.
6486 * server.c (handle_query): Handle qXfer:statictrace:read.
6487 <qSupported>: Report support for StaticTracepoints, and
6488 qXfer:statictrace:read features.
6489 * server.h (traceframe_read_sdata)
6490 (supply_static_tracepoint_registers): Declare.
6491 * remote-utils.c (convert_int_to_ascii, hexchars, ishex, tohex)
6492 (unpack_varlen_hex): Include in IPA build.
6493 * Makefile.in (ustlibs, ustinc): New.
6494 (IPA_OBJS): Add remote-utils-ipa.o.
6495 ($(IPA_LIB)): Link -ldl and -lpthread.
6496 (UST_CFLAGS): New.
6497 (IPAGENT_CFLAGS): Add UST_CFLAGS.
6498 * config.in, configure: Regenerate.
6499
6500 2010-06-20 Ian Lance Taylor <iant@google.com>
6501 Pedro Alves <pedro@codesourcery.com>
6502
6503 * linux-x86-low.c (always_true): Delete.
6504 (EMIT_ASM, EMIT_ASM32): Use an uncondition asm jmp instead of
6505 trying to fool the compiler with always_true.
6506
6507 2010-06-20 Pedro Alves <pedro@codesourcery.com>
6508
6509 * tracepoint.c (condition_true_at_tracepoint): Don't run compiled
6510 conditions in gdbserver.
6511
6512 2010-06-19 Ulrich Weigand <uweigand@de.ibm.com>
6513
6514 * spu-low.c (spu_read_memory): Wrap around local store limit.
6515 (spu_write_memory): Likewise.
6516
6517 2010-06-15 Pedro Alves <pedro@codesourcery.com>
6518
6519 * linux-x86-low.c (amd64_emit_const, amd64_emit_void_call_2)
6520 (i386_emit_const, i386_emit_void_call_2): Replace int64_t uses with
6521 LONGEST uses.
6522 * server.h (struct emit_ops): Replace int64_t uses with LONGEST
6523 uses.
6524 * tracepoint.c (emit_const, emit_void_call_2): Replace int64_t
6525 uses with LONGEST uses.
6526
6527 2010-06-14 Stan Shebs <stan@codesourcery.com>
6528 Pedro Alves <pedro@codesourcery.com>
6529
6530 Bytecode compiler.
6531
6532 * linux-x86-low.c: Include limits.h.
6533 (add_insns): New.
6534 (always_true): New.
6535 (EMIT_ASM): New.
6536 (EMIT_ASM32): New.
6537 (amd64_emit_prologue, amd64_emit_epilogue, amd64_emit_add)
6538 (amd64_emit_sub, amd64_emit_mul, amd64_emit_lsh)
6539 (amd64_emit_rsh_signed, amd64_emit_rsh_unsigned, amd64_emit_ext,
6540 (amd64_emit_log_not, amd64_emit_bit_and, amd64_emit_bit_or)
6541 (amd64_emit_bit_xor, amd64_emit_bit_not, amd64_emit_equal,
6542 (amd64_emit_less_signed, amd64_emit_less_unsigned, amd64_emit_ref,
6543 (amd64_emit_if_goto, amd64_emit_goto, amd64_write_goto_address)
6544 (amd64_emit_const, amd64_emit_call, amd64_emit_reg)
6545 (amd64_emit_pop, amd64_emit_stack_flush, amd64_emit_zero_ext)
6546 (amd64_emit_swap, amd64_emit_stack_adjust, amd64_emit_int_call_1)
6547 (amd64_emit_void_call_2): New.
6548 (amd64_emit_ops): New.
6549 (i386_emit_prologue, i386_emit_epilogue, i386_emit_add)
6550 (i386_emit_sub,i386_emit_mul, i386_emit_lsh, i386_emit_rsh_signed)
6551 (i386_emit_rsh_unsigned, i386_emit_ext, i386_emit_log_not)
6552 (i386_emit_bit_and, i386_emit_bit_or, i386_emit_bit_xor)
6553 (i386_emit_bit_not, i386_emit_equal, i386_emit_less_signed)
6554 (i386_emit_less_unsigned, i386_emit_ref, i386_emit_if_goto)
6555 (i386_emit_goto, i386_write_goto_address, i386_emit_const)
6556 (i386_emit_call, i386_emit_reg, i386_emit_pop)
6557 (i386_emit_stack_flush, i386_emit_zero_ext, i386_emit_swap)
6558 (i386_emit_stack_adjust, i386_emit_int_call_1)
6559 (i386_emit_void_call_2): New.
6560 (i386_emit_ops): New.
6561 (x86_emit_ops): New.
6562 (the_low_target): Install x86_emit_ops.
6563 * server.h (struct emit_ops): New.
6564 (get_raw_reg_func_addr): Declare.
6565 (current_insn_ptr, emit_error): Declare.
6566 * tracepoint.c (get_raw_reg, get_trace_state_variable_value)
6567 (set_trace_state_variable_value): New defines.
6568 (struct ipa_sym_addresses): New fields addr_get_raw_reg,
6569 addr_get_trace_state_variable_value and
6570 addr_set_trace_state_variable_value.
6571 (symbol_list): New fields for get_raw_reg,
6572 get_trace_state_variable_value and set_trace_state_variable_value.
6573 (condfn): New typedef.
6574 (struct tracepoint): New field `compiled_cond'.
6575 (do_action_at_tracepoint): Clear compiled_cond.
6576 (get_trace_state_variable_value, set_trace_state_variable_value):
6577 Export in the IPA.
6578 (condition_true_at_tracepoint): If there's a compiled condition,
6579 run that.
6580 (current_insn_ptr, emit_error): New globals.
6581 (struct bytecode_address): New.
6582 (get_raw_reg_func_addr): New.
6583 (emit_prologue, emit_epilogue, emit_add, emit_sub, emit_mul)
6584 (emit_lsh, emit_rsh_signed, emit_rsh_unsigned, emit_ext)
6585 (emit_log_not, emit_bit_and, emit_bit_or, emit_bit_xor)
6586 (emit_bit_not, emit_equal, emit_less_signed, emit_less_unsigned)
6587 (emit_ref, emit_if_goto, emit_goto, write_goto_address, emit_const)
6588 (emit_reg, emit_pop, emit_stack_flush, emit_zero_ext, emit_swap)
6589 (emit_stack_adjust, emit_int_call_1, emit_void_call_2): New.
6590 (compile_tracepoint_condition, compile_bytecodes): New.
6591 * target.h (emit_ops): Forward declare.
6592 (struct target_ops): New field emit_ops.
6593 (target_emit_ops): New.
6594 * linux-amd64-ipa.c (gdb_agent_get_raw_reg): New.
6595 * linux-i386-ipa.c (gdb_agent_get_raw_reg): New.
6596 * linux-low.c (linux_emit_ops): New.
6597 (linux_target_ops): Install it.
6598 * linux-low.h (struct linux_target_ops): New field emit_ops.
6599
6600 2010-06-14 Ulrich Weigand <uweigand@de.ibm.com>
6601
6602 * linux-ppc-low.c (ppc_arch_setup): Use private regcache to test MSR.
6603 * linux-s390-low.c (ppc_arch_setup): Use private regcache to test PSW.
6604
6605 2010-06-01 Pedro Alves <pedro@codesourcery.com>
6606 Stan Shebs <stan@codesourcery.com>
6607
6608 * Makefile.in (IPA_DEPFILES, extra_libraries): New.
6609 (all): Depend on $(extra_libraries).
6610 (install-only): Install the IPA.
6611 (IPA_OBJS, IPA_LIB): New.
6612 (clean): Remove the IPA lib.
6613 (IPAGENT_CFLAGS): New.
6614 (tracepoint-ipa.o, utils-ipa.o, remote-utils-ipa.o)
6615 (regcache-ipa.o, i386-linux-ipa.o, linux-i386-ipa.o)
6616 (linux-amd64-ipa.o, amd64-linux-ipa.o): New rules.
6617 * linux-amd64-ipa.c, linux-i386-ipa.c: New files.
6618 * configure.ac: Check for atomic builtins support in the compiler.
6619 (IPA_DEPFILES, extra_libraries): Define.
6620 * configure.srv (ipa_obj): Add description.
6621 (ipa_i386_linux_regobj, ipa_amd64_linux_regobj): Define.
6622 (i[34567]86-*-linux*): Set ipa_obj.
6623 (x86_64-*-linux*): Set ipa_obj.
6624 * linux-low.c (stabilizing_threads): New.
6625 (supports_fast_tracepoints): New.
6626 (linux_detach): Stabilize threads before detaching.
6627 (handle_tracepoints): Handle internal tracing breakpoints. Assert
6628 the lwp is either not stabilizing, or is moving out of a jump pad.
6629 (linux_fast_tracepoint_collecting): New.
6630 (maybe_move_out_of_jump_pad): New.
6631 (enqueue_one_deferred_signal): New.
6632 (dequeue_one_deferred_signal): New.
6633 (linux_wait_for_event_1): If moving out of a jump pad, defer
6634 pending signals to later.
6635 (linux_stabilize_threads): New.
6636 (linux_wait_1): Check if threads need moving out of jump pads, and
6637 do it if so.
6638 (stuck_in_jump_pad_callback): New.
6639 (move_out_of_jump_pad_callback): New.
6640 (lwp_running): New.
6641 (linux_resume_one_lwp): Handle moving out of jump pads.
6642 (linux_set_resume_request): Dequeue deferred signals.
6643 (need_step_over_p): Also step over fast tracepoint jumps.
6644 (start_step_over): Also uninsert fast tracepoint jumps.
6645 (finish_step_over): Also reinsert fast tracepoint jumps.
6646 (linux_install_fast_tracepoint_jump): New.
6647 (linux_target_ops): Install linux_stabilize_threads and
6648 linux_install_fast_tracepoint_jump_pad.
6649 * linux-low.h (linux_target_ops) <get_thread_area,
6650 install_fast_tracepoint_jump_pad>: New fields.
6651 (struct lwp_info) <collecting_fast_tracepoint,
6652 pending_signals_to_report, exit_jump_pad_bkpt>: New fields.
6653 (linux_get_thread_area): Declare.
6654 * linux-x86-low.c (jump_insn): New.
6655 (x86_get_thread_area): New.
6656 (append_insns): New.
6657 (push_opcode): New.
6658 (amd64_install_fast_tracepoint_jump_pad): New.
6659 (i386_install_fast_tracepoint_jump_pad): New.
6660 (x86_install_fast_tracepoint_jump_pad): New.
6661 (the_low_target): Install x86_get_thread_area and
6662 x86_install_fast_tracepoint_jump_pad.
6663 * mem-break.c (set_raw_breakpoint_at): Use read_inferior_memory.
6664 (struct fast_tracepoint_jump): New.
6665 (fast_tracepoint_jump_insn): New.
6666 (fast_tracepoint_jump_shadow): New.
6667 (find_fast_tracepoint_jump_at): New.
6668 (fast_tracepoint_jump_here): New.
6669 (delete_fast_tracepoint_jump): New.
6670 (set_fast_tracepoint_jump): New.
6671 (uninsert_fast_tracepoint_jumps_at): New.
6672 (reinsert_fast_tracepoint_jumps_at): New.
6673 (set_breakpoint_at): Use write_inferior_memory.
6674 (uninsert_raw_breakpoint): Use write_inferior_memory.
6675 (check_mem_read): Mask out fast tracepoint jumps.
6676 (check_mem_write): Mask out fast tracepoint jumps.
6677 * mem-break.h (struct fast_tracepoint_jump): Forward declare.
6678 (set_fast_tracepoint_jump): Declare.
6679 (delete_fast_tracepoint_jump)
6680 (fast_tracepoint_jump_here, uninsert_fast_tracepoint_jumps_at)
6681 (reinsert_fast_tracepoint_jumps_at): Declare.
6682 * regcache.c: Don't compile many functions when building the
6683 in-process agent library.
6684 (init_register_cache) [IN_PROCESS_AGENT]: Don't allow allocating
6685 the register buffer in the heap.
6686 (free_register_cache): If the register buffer isn't owned by the
6687 regcache, don't free it.
6688 (set_register_cache) [IN_PROCESS_AGENT]: Don't re-alocate
6689 pre-existing register caches.
6690 * remote-utils.c (convert_int_to_ascii): Constify `from' parameter
6691 type.
6692 (convert_ascii_to_int): : Constify `from' parameter type.
6693 (decode_M_packet, decode_X_packet): Replace the `to' parameter by
6694 a `to_p' pointer to pointer parameter. If TO_P is NULL, malloc
6695 the needed buffer in-place.
6696 (relocate_instruction): New.
6697 * server.c (handle_query) <qSymbols>: If the target supports
6698 tracepoints, give it a chance of looking up symbols. Report
6699 support for fast tracepoints.
6700 (handle_status): Stabilize threads.
6701 (process_serial_event): Adjust.
6702 * server.h (struct fast_tracepoint_jump): Forward declare.
6703 (struct process_info) <fast_tracepoint_jumps>: New field.
6704 (convert_ascii_to_int, convert_int_to_ascii): Adjust.
6705 (decode_X_packet, decode_M_packet): Adjust.
6706 (relocate_instruction): Declare.
6707 (in_process_agent_loaded): Declare.
6708 (tracepoint_look_up_symbols): Declare.
6709 (struct fast_tpoint_collect_status): Declare.
6710 (fast_tracepoint_collecting): Declare.
6711 (force_unlock_trace_buffer): Declare.
6712 (handle_tracepoint_bkpts): Declare.
6713 (initialize_low_tracepoint)
6714 (supply_fast_tracepoint_registers) [IN_PROCESS_AGENT]: Declare.
6715 * target.h (struct target_ops) <stabilize_threads,
6716 install_fast_tracepoint_jump_pad>: New fields.
6717 (stabilize_threads, install_fast_tracepoint_jump_pad): New.
6718 * tracepoint.c [HAVE_MALLOC_H]: Include malloc.h.
6719 [HAVE_STDINT_H]: Include stdint.h.
6720 (trace_debug_1): Rename to ...
6721 (trace_vdebug): ... this.
6722 (trace_debug): Rename to ...
6723 (trace_debug_1): ... this. Add `level' parameter.
6724 (trace_debug): New.
6725 (ATTR_USED, ATTR_NOINLINE): New.
6726 (IP_AGENT_EXPORT): New.
6727 (gdb_tp_heap_buffer, gdb_jump_pad_buffer, gdb_jump_pad_buffer_end)
6728 (collecting, gdb_collect, stop_tracing, flush_trace_buffer)
6729 (about_to_request_buffer_space, trace_buffer_is_full)
6730 (stopping_tracepoint, expr_eval_result, error_tracepoint)
6731 (tracepoints, tracing, trace_buffer_ctrl, trace_buffer_ctrl_curr)
6732 (trace_buffer_lo, trace_buffer_hi, traceframe_read_count)
6733 (traceframe_write_count, traceframes_created)
6734 (trace_state_variables)
6735 New renaming defines.
6736 (struct ipa_sym_addresses): New.
6737 (STRINGIZE_1, STRINGIZE, IPA_SYM): New.
6738 (symbol_list): New.
6739 (ipa_sym_addrs): New.
6740 (all_tracepoint_symbols_looked_up): New.
6741 (in_process_agent_loaded): New.
6742 (write_e_ipa_not_loaded): New.
6743 (maybe_write_ipa_not_loaded): New.
6744 (tracepoint_look_up_symbols): New.
6745 (debug_threads) [IN_PROCESS_AGENT]: New.
6746 (read_inferior_memory) [IN_PROCESS_AGENT]: New.
6747 (UNKNOWN_SIDE_EFFECTS): New.
6748 (stop_tracing): New.
6749 (flush_trace_buffer): New.
6750 (stop_tracing_bkpt): New.
6751 (flush_trace_buffer_bkpt): New.
6752 (read_inferior_integer): New.
6753 (read_inferior_uinteger): New.
6754 (read_inferior_data_pointer): New.
6755 (write_inferior_data_pointer): New.
6756 (write_inferior_integer): New.
6757 (write_inferior_uinteger): New.
6758 (struct collect_static_trace_data_action): Delete.
6759 (enum tracepoint_type): New.
6760 (struct tracepoint) <type>: New field `type'.
6761 <actions_str, step_actions, step_actions_str>: Only include in
6762 GDBserver.
6763 <orig_size, obj_addr_on_target, adjusted_insn_addr>
6764 <adjusted_insn_addr_end, jump_pad, jump_pad_end>: New fields.
6765 (tracepoints): Use IP_AGENT_EXPORT.
6766 (last_tracepoint): Don't include in the IPA.
6767 (stopping_tracepoint): Use IP_AGENT_EXPORT.
6768 (trace_buffer_is_full): Use IP_AGENT_EXPORT.
6769 (alloced_trace_state_variables): New.
6770 (trace_state_variables): Use IP_AGENT_EXPORT.
6771 (traceframe_t): Delete unused variable.
6772 (circular_trace_buffer): Don't include in the IPA.
6773 (trace_buffer_start): Delete.
6774 (struct trace_buffer_control): New.
6775 (trace_buffer_free): Delete.
6776 (struct ipa_trace_buffer_control): New.
6777 (GDBSERVER_FLUSH_COUNT_MASK, GDBSERVER_FLUSH_COUNT_MASK_PREV)
6778 (GDBSERVER_FLUSH_COUNT_MASK_CURR, GDBSERVER_UPDATED_FLUSH_COUNT_BIT):
6779 New.
6780 (trace_buffer_ctrl): New.
6781 (TRACE_BUFFER_CTRL_CURR): New.
6782 (trace_buffer_start, trace_buffer_free, trace_buffer_end_free):
6783 Reimplement as macros.
6784 (trace_buffer_wrap): Delete.
6785 (traceframe_write_count, traceframe_read_count)
6786 (traceframes_created, tracing): Use IP_AGENT_EXPORT.
6787 (struct tracepoint_hit_ctx) <type>: New field.
6788 (struct fast_tracepoint_ctx): New.
6789 (memory_barrier): New.
6790 (cmpxchg): New.
6791 (record_tracepoint_error): Update atomically in the IPA.
6792 (clear_inferior_trace_buffer): New.
6793 (about_to_request_buffer_space): New.
6794 (trace_buffer_alloc): Handle GDBserver and inferior simulatenous
6795 updating the same buffer.
6796 (add_tracepoint): Default the tracepoint's type to trap
6797 tracepoint, and orig_size to -1.
6798 (get_trace_state_variable) [IN_PROCESS_AGENT]: Handle allocated
6799 internal variables.
6800 (create_trace_state_variable): New parameter `gdb'. Handle it.
6801 (clear_installed_tracepoints): Clear fast tracepoint jumps.
6802 (cmd_qtdp): Handle fast tracepoints.
6803 (cmd_qtdv): Adjust.
6804 (max_jump_pad_size): New.
6805 (gdb_jump_pad_head): New.
6806 (get_jump_space_head): New.
6807 (claim_jump_space): New.
6808 (sort_tracepoints): New.
6809 (MAX_JUMP_SIZE): New.
6810 (cmd_qtstart): Handle fast tracepoints. Sync tracepoints with the
6811 IPA.
6812 (stop_tracing) [IN_PROCESS_AGENT]: Don't include the tdisconnected
6813 support. Upload fast traceframes, and delete internal IPA
6814 breakpoints.
6815 (stop_tracing_handler): New.
6816 (flush_trace_buffer_handler): New.
6817 (cmd_qtstop): Upload fast tracepoints.
6818 (response_tracepoint): Handle fast tracepoints.
6819 (tracepoint_finished_step): Upload fast traceframes. Set the
6820 tracepoint hit context's tracepoint type.
6821 (handle_tracepoint_bkpts): New.
6822 (tracepoint_was_hit): Set the tracepoint hit context's tracepoint
6823 type. Add comment about fast tracepoints.
6824 (collect_data_at_tracepoint) [IN_PROCESS_AGENT]: Don't access the
6825 non-existing action_str field.
6826 (get_context_regcache): Handle fast tracepoints.
6827 (do_action_at_tracepoint) [!IN_PROCESS_AGENT]: Don't write the PC
6828 to the regcache.
6829 (fast_tracepoint_from_jump_pad_address): New.
6830 (fast_tracepoint_from_ipa_tpoint_address): New.
6831 (collecting_t): New.
6832 (force_unlock_trace_buffer): New.
6833 (fast_tracepoint_collecting): New.
6834 (collecting): New.
6835 (gdb_collect): New.
6836 (write_inferior_data_ptr): New.
6837 (target_tp_heap): New.
6838 (target_malloc): New.
6839 (download_agent_expr): New.
6840 (UALIGN): New.
6841 (download_tracepoints): New.
6842 (download_trace_state_variables): New.
6843 (upload_fast_traceframes): New.
6844 (IPA_FIRST_TRACEFRAME): New.
6845 (IPA_NEXT_TRACEFRAME_1): New.
6846 (IPA_NEXT_TRACEFRAME): New.
6847 [IN_PROCESS_AGENT]: Include sys/mman.h and fcntl.h.
6848 [IN_PROCESS_AGENT] (gdb_tp_heap_buffer, gdb_jump_pad_buffer)
6849 (gdb_jump_pad_buffer_end): New.
6850 [IN_PROCESS_AGENT] (initialize_tracepoint_ftlib): New.
6851 (initialize_tracepoint): Adjust.
6852 [IN_PROCESS_AGENT]: Allocate the IPA heap, and jump pad scratch
6853 buffer. Initialize the low module.
6854 * utils.c (PREFIX, TOOLNAME): New.
6855 (malloc_failure): Use PREFIX.
6856 (error): In the IPA, an error causes an exit.
6857 (fatal, warning): Use PREFIX.
6858 (internal_error): Use TOOLNAME.
6859 (NUMCELLS): Increase to 10.
6860 * configure, config.in: Regenerate.
6861
6862 2010-06-01 Pedro Alves <pedro@codesourcery.com>
6863
6864 * server.c (handle_query) <qSupported>: Do two passes over the
6865 qSupported string to avoid nesting strtok.
6866
6867 2010-05-28 Jan Kratochvil <jan.kratochvil@redhat.com>
6868
6869 * Makefile.in (SFILES): Add $(srcdir)/proc-service.list.
6870 (CDEPS): New.
6871 * configure.ac (RDYNAMIC): New AC_MSG_CHECKING wrapping. Test also
6872 -Wl,--dynamic-list.
6873 * configure: Regenerate.
6874 * proc-service.list: New.
6875
6876 2010-05-28 Jan Kratochvil <jan.kratochvil@redhat.com>
6877
6878 * linux-low.c (linux_core_of_thread): Fix crash on invalid CONTENT.
6879 New comment.
6880
6881 2010-05-26 Ozkan Sezer <sezeroz@gmail.com>
6882
6883 * gdbreplay.c (remote_open): Check error return from socket() call by
6884 its equality to -1 not by it being negative.
6885 * remote-utils.c (remote_open): Likewise.
6886
6887 2010-05-23 Pedro Alves <pedro@codesourcery.com>
6888
6889 * config.h: Regenerate.
6890
6891 2010-05-19 Maxim Kuvyrkov <maxim@codesourcery.com>
6892
6893 * linux-m68k-low.c (ps_get_thread_area): Don't define if kernel
6894 doesn't provide PTRACE_GET_THREAD_AREA.
6895
6896 2010-05-19 Maxim Kuvyrkov <maxim@codesourcery.com>
6897
6898 * linux-m68k-low.c: Include <asm/ptrace.h>
6899 (ps_get_thread_area): Implement.
6900
6901 2010-05-03 Doug Evans <dje@google.com>
6902
6903 * event-loop.c (struct callback_event): New struct.
6904 (callback_list): New global.
6905 (append_callback_event, delete_callback_event): New functions.
6906 (process_callback): New function.
6907 (start_event_loop): Call it.
6908 * remote-utils.c (NOT_SCHEDULED): Define.
6909 (readchar_buf, readchar_bufcnt, readchar_bufp): New static globals,
6910 moved out of readchar.
6911 (readchar): Rewrite. Call reschedule before returning.
6912 (reset_readchar): New function.
6913 (remote_close): Call it.
6914 (process_remaining, reschedule): New functions.
6915 * server.h (callback_handler_func): New typedef.
6916 (append_callback_event, delete_callback_event): Declare.
6917
6918 2010-05-03 Pedro Alves <pedro@codesourcery.com>
6919
6920 * proc-service.c (ps_pglobal_lookup): Use
6921 thread_db_look_up_one_symbol.
6922 * remote-utils.c (look_up_one_symbol): Add new `may_ask_gdb'
6923 parameter. Use it instead of all_symbols_looked_up.
6924 * server.h (struct process_info) <all_symbols_looked_up>: Delete
6925 field.
6926 (all_symbols_looked_up): Don't declare.
6927 (look_up_one_symbol): Add new `may_ask_gdb' parameter.
6928 * thread-db.c (struct thread_db) <all_symbols_looked_up>: New
6929 field.
6930 (thread_db_look_up_symbols): Adjust call to look_up_one_symbol.
6931 Set all_symbols_looked_up here.
6932 (thread_db_look_up_one_symbol): New.
6933 (thread_db_get_tls_address): Adjust.
6934 (thread_db_load_search, try_thread_db_load_1): Always allocate the
6935 thread_db object on the heap, and tentatively set it in the
6936 process structure.
6937 (thread_db_init): Don't set all_symbols_looked_up here.
6938 * linux-low.h (thread_db_look_up_one_symbol): Declare.
6939
6940 2010-05-03 Pedro Alves <pedro@codesourcery.com>
6941
6942 * linux-low.c (linux_kill, linux_detach): Adjust.
6943 (status_pending_p_callback): Remove redundant statement. Check
6944 for !TARGET_WAITIKIND_IGNORE, instead of
6945 TARGET_WAITKIND_STOPPED.
6946 (handle_tracepoints): Make sure LWP is locked. Adjust.
6947 (linux_wait_for_event_1): Adjust.
6948 (linux_cancel_breakpoints): New.
6949 (unsuspend_one_lwp): New.
6950 (unsuspend_all_lwps): New.
6951 (linux_wait_1): If finishing a step-over, unsuspend all lwps.
6952 (send_sigstop_callback): Change return type to int, add new
6953 `except' parameter and handle it.
6954 (suspend_and_send_sigstop_callback): New.
6955 (stop_all_lwps): Add new `suspend' and `expect' parameters, and
6956 pass them down. If SUSPEND, also increment the lwp's suspend
6957 count.
6958 (linux_resume_one_lwp): Add notice about resuming a suspended LWP.
6959 (need_step_over_p): Don't consider suspended LWPs.
6960 (start_step_over): Adjust.
6961 (proceed_one_lwp): Change return type to int, add new `except'
6962 parameter and handle it.
6963 (unsuspend_and_proceed_one_lwp): New.
6964 (proceed_all_lwps): Use find_inferior instead of
6965 for_each_inferior.
6966 (unstop_all_lwps): Add `unsuspend' parameter. If UNSUSPEND, them
6967 also decrement the suspend count of LWPs. Pass `except' down,
6968 instead of hacking its suspend count.
6969 (linux_pause_all): Add `freeze' parameter. Adjust.
6970 (linux_unpause_all): New.
6971 (linux_target_ops): Install linux_unpause_all.
6972 * server.c (handle_status): Adjust.
6973 * target.h (struct target_ops): New fields `unpause_all' and
6974 `cancel_breakpoints'. Add new parameter to `pause_all'.
6975 (pause_all): Add new `freeze' parameter.
6976 (unpause_all): New.
6977 (cancel_breakpoints): New.
6978 * tracepoint.c (clear_installed_tracepoints): Pause threads, and
6979 cancel breakpoints.
6980 (cmd_qtstart): Pause threads.
6981 (stop_tracing): Pause threads, and cancel breakpoints.
6982 * win32-low.c (win32_target_ops): Adjust.
6983
6984 2010-05-03 Pedro Alves <pedro@codesourcery.com>
6985
6986 * linux-low.c (linux_wait_for_event_1): Move passing the signal to
6987 the inferior right away from here...
6988 (linux_wait_1): ... to here, and adjust to check the thread's
6989 last_resume_kind instead of the lwp's step or stop_expected flags.
6990
6991 2010-05-02 Pedro Alves <pedro@codesourcery.com>
6992
6993 * README: Use consistent `GDB' and `GDBserver' spellings.
6994
6995 2010-05-02 Pedro Alves <pedro@codesourcery.com>
6996
6997 * linux-low.c (linux_kill_one_lwp): Assume the lwp is stopped.
6998 (linux_kill): Stop all lwps here. Don't delete the main lwp here.
6999 (linux_detach_one_lwp): Assume the lwp is stopped.
7000 (any_thread_of): Delete.
7001 (linux_detach): Stop all lwps here. Don't blindly delete all
7002 breakpoints.
7003 (delete_lwp_callback): New.
7004 (linux_mourn): Delete all lwps of the process that is gone.
7005 (linux_wait_1): Don't delete the last lwp of the process here.
7006 * mem-break.h (mark_breakpoints_out): Declare.
7007 * mem-break.c (mark_breakpoints_out): New.
7008 (free_all_breakpoints): Use it.
7009 * server.c (handle_target_event): If the process is gone, mark
7010 breakpoints out.
7011 * thread-db.c (struct thread_db) <create_bp>: New field.
7012 (thread_db_enable_reporting): Fix prototype. Store a thread event
7013 breakpoint reference in the thread_db struct.
7014 (thread_db_load_search): Clear the thread_db object.
7015 (try_thread_db_load_1): Ditto.
7016 (switch_to_process): New.
7017 (disable_thread_event_reporting): Use it.
7018 (remove_thread_event_breakpoints): New.
7019 (thread_db_detach, thread_db_mourn): Use it.
7020
7021 2010-05-01 Pedro Alves <pedro@codesourcery.com>
7022
7023 * linux-low.c (linux_enable_event_reporting): New.
7024 (linux_wait_for_event_1, handle_extended_wait): Use it.
7025
7026 2010-04-30 Pedro Alves <pedro@codesourcery.com>
7027
7028 * linux-low.c (linux_kill_one_lwp, linux_kill)
7029 (linux_detach_one_lwp): Adjust to send_sigstop interface change.
7030 (send_sigstop): Take an lwp_info as parameter instead. Queue a
7031 SIGSTOP even if the LWP is stopped.
7032 (send_sigstop_callback): New.
7033 (stop_all_lwps): Use send_sigstop_callback instead.
7034 (linux_resume_one_thread): Adjust.
7035 (proceed_one_lwp): Still proceed an LWP that the client has
7036 requested to stop, if we haven't reported it as stopped yet. Make
7037 sure that LWPs the client want stopped, have a pending SIGSTOP.
7038
7039 2010-04-26 Doug Evans <dje@google.com>
7040
7041 * server.c (handle_general_set): Make static.
7042
7043 * remote-utils.c (putpkt_binary_1): Call readchar instead of read.
7044 Print received char after testing for error/eof instead of before.
7045 (input_interrupt): Tweak comment.
7046
7047 2010-04-23 Doug Evans <dje@google.com>
7048
7049 * server.c (start_inferior): Print inferior argv if --debug.
7050
7051 2010-04-21 Aleksandar Ristovski <aristovski@qnx.com>
7052
7053 * Makefile.in (nto_low_h nto-low.o nto-x86-low.o): New dependency lists.
7054 * nto-x86-low.c: Include server.h
7055
7056 2010-04-20 Pierre Muller <muller@ics.u-strasbg.fr>
7057
7058 * win32-i386-low.c: Use __x86_64__ macro instead of __x86_64 to
7059 be consistent with other sources of this directory.
7060 (init_registers_amd64): Correct name of source file of this function
7061 in the comment.
7062
7063 2010-04-19 Pierre Muller <muller@ics.u-strasbg.fr>
7064
7065 * configure.srv (x86_64-*-mingw*): New configuration for Windows
7066 64-bit executables.
7067
7068 2010-04-19 Pierre Muller <muller@ics.u-strasbg.fr>
7069
7070 * win32-i386-low.c: Add 64-bit support.
7071 (CONTEXT_EXTENDED_REGISTERS): Set macro to zero if not exisiting.
7072 (init_registers_amd64): Declare.
7073 (mappings): Add 64-bit version of array.
7074 (init_windows_x86): New function.
7075 (the_low_target): Change init_arch field to init_windows_x86.
7076
7077 2010-04-19 Pierre Muller <muller@ics.u-strasbg.fr>
7078
7079 * win32-low.c: Adapt to support also 64-bit architecture.
7080 (child_xfer_memory): Use uintptr_t type for local variable `addr'.
7081 (get_image_name): Use SIZE_T type for local variable `done'.
7082 (psapi_get_dll_name): Use LPVOID type for parameter `BaseAddress'.
7083 (toolhelp_get_dll_name): Idem.
7084 (handle_load_dll): Use CORE_ADDR type for local variable `load_addr'.
7085 Use uintptr_t typecast to avoid warning.
7086 (handle_unload_dll): Use uintptr_t typecast to avoid warning.
7087 (handle_exception): Use phex_nz to avoid warning.
7088 (win32_wait): Remove unused local variable `process'.
7089
7090 2010-04-19 Pierre Muller <muller@ics.u-strasbg.fr>
7091
7092 * configure.srv (srv_amd64_regobj): Replace `x86-64-avx.o' by
7093 `amd64-avx.o'.
7094
7095 2010-04-17 Pierre Muller <muller@ics.u-strasbg.fr>
7096
7097 * configure.ac: Use `ws2_32' library for srv_mingw.
7098 * configure: Regenerate.
7099 * gdbreplay.c: Include winsock2.h instead of winsock.h.
7100 * remote-utils.c: Likewise.
7101
7102 2010-04-17 H.J. Lu <hongjiu.lu@intel.com>
7103
7104 * linux-x86-low.c (xmltarget_amd64_linux_no_xml): Define only
7105 if __x86_64__ is defined.
7106
7107 2010-04-16 Pierre Muller <muller@ics.u-strasbg.fr>
7108
7109 * configure: Regenerate.
7110
7111 2010-04-16 Pierre Muller <muller@ics.u-strasbg.fr>
7112
7113 * server.c (handle_query): Handle 'qGetTIBAddr' query.
7114 * target.h (target_ops): New get_tib_address field.
7115 * win32-low.h (win32_thread_info): Add thread_local_base field.
7116 * win32-low.c (child_add_thread): Add tlb argument.
7117 Set thread_local_base field to TLB.
7118 (get_child_debug_event): Adapt to child_add_thread change.
7119 (win32_get_tib_address): New function.
7120 (win32_target_ops): Set get_tib_address field to
7121 win32_get_tib_address.
7122 * linux-low.c (linux_target_ops): Set get_tib_address field to NULL.
7123
7124 2010-04-12 Pedro Alves <pedro@codesourcery.com>
7125
7126 * linux-low.c (linux_mourn): Also remove the process.
7127 * server.c (handle_target_event): Don't remove the process here.
7128 * nto-low.c (nto_mourn): New.
7129 (nto_target_ops): Install it.
7130 * spu-low.c (spu_mourn): New.
7131 (spu_target_ops): Install it.
7132 * win32-low.c (win32_mourn): New.
7133 (win32_target_ops): Install it.
7134
7135 2010-04-12 Pedro Alves <pedro@codesourcery.com>
7136
7137 * server.h (buffer_xml_printf): Remove redundant `;'.
7138
7139 2010-04-12 Pedro Alves <pedro@codesourcery.com>
7140
7141 * regcache.c (set_register_cache): Invalidate regcaches before
7142 changing the register cache layout.
7143 (regcache_invalidate_one): Allow a NULL regcache.
7144 * linux-x86-low.c (x86_linux_update_xmltarget): Invalidate
7145 regcaches before changing the register cache layout or the target
7146 regsets.
7147
7148 2010-04-12 H.J. Lu <hongjiu.lu@intel.com>
7149
7150 * linux-x86-low.c (x86_linux_update_xmltarget): Avoid unused
7151 variable warning on Linux/x86-64.
7152
7153 2010-04-11 Pedro Alves <pedro@codesourcery.com>
7154
7155 GDBserver disconnected tracing support.
7156
7157 * linux-low.c (linux_remove_process): Delete.
7158 (add_lwp): Don't set last_resume_kind here.
7159 (linux_kill): Use `mourn'.
7160 (linux_detach): Use `thread_db_detach', and `mourn'.
7161 (linux_mourn): New.
7162 (linux_attach_lwp_1): Adjust comment.
7163 (linux_attach): last_resume_kind moved the thread_info; adjust.
7164 (status_pending_p_callback): Adjust.
7165 (linux_wait_for_event_1): Adjust.
7166 (count_events_callback, select_singlestep_lwp_callback)
7167 (select_event_lwp_callback, cancel_breakpoints_callback)
7168 (db_wants_lwp_stopped, linux_wait_1, need_step_over_p)
7169 (proceed_one_lwp): Adjust.
7170 (linux_async): Add debug output.
7171 (linux_thread_stopped): New.
7172 (linux_pause_all): New.
7173 (linux_target_ops): Install linux_mourn, linux_thread_stopped and
7174 linux_pause_all.
7175 * linux-low.h (struct lwp_info): Delete last_resume_kind field.
7176 (thread_db_free): Delete declaration.
7177 (thread_db_detach, thread_db_mourn): Declare.
7178 * thread-db.c (thread_db_init): Use thread_db_mourn.
7179 (thread_db_free): Delete, split in two.
7180 (disable_thread_event_reporting): New.
7181 (thread_db_detach): New.
7182 (thread_db_mourn): New.
7183
7184 * server.h (struct thread_info) <last_resume_kind>: New field.
7185 <attached>: Add comment.
7186 <gdb_detached>: New field.
7187 (handler_func): Change return type to int.
7188 (handle_serial_event, handle_target_event): Ditto.
7189 (gdb_connected): Declare.
7190 (tracing): Delete.
7191 (disconnected_tracing): Declare.
7192 (stop_tracing): Declare.
7193
7194 * server.c (handle_query) <qSupported>: Report support for
7195 disconnected tracing.
7196 (queue_stop_reply_callback): Account for running threads.
7197 (gdb_wants_thread_stopped): New.
7198 (gdb_wants_all_threads_stopped): New.
7199 (gdb_reattached_process): New.
7200 (handle_status): Clear the `gdb_detached' flag of all processes.
7201 In all-stop, stop all threads.
7202 (main): Be sure to leave tfind mode. Handle disconnected tracing.
7203 (process_serial_event): If the remote connection breaks, or if an
7204 exit was forced with "monitor exit", force an event loop exit.
7205 Handle disconnected tracing on detach.
7206 (handle_serial_event): Adjust.
7207 (handle_target_event): If GDB isn't connected, forward events back
7208 to the inferior, unless the last process exited, in which case,
7209 exit gdbserver. Adjust interface.
7210
7211 * remote-utils.c (remote_open): Don't block in accept. Instead
7212 register an event loop source on the listen socket file
7213 descriptor. Refactor bits into ...
7214 (listen_desc): ... this new global.
7215 (gdb_connected): ... this new function.
7216 (enable_async_notification): ... this new function.
7217 (handle_accept_event): ... this new function.
7218 (remote_close): Clear remote_desc.
7219
7220 * inferiors.c (add_thread): Set the new thread's last_resume_kind.
7221
7222 * target.h (struct target_ops) <mourn, thread_stopped, pause_all>:
7223 New fields.
7224 (mourn_inferior): Define.
7225 (target_process_qsupported): Avoid the dangling else problem.
7226 (thread_stopped): Define.
7227 (pause_all): Define.
7228 (target_waitstatus_to_string): Declare.
7229 * target.c (target_waitstatus_to_string): New.
7230
7231 * tracepoint.c (tracing): Make extern.
7232 (disconnected_tracing): New.
7233 (stop_tracing): Make extern. Handle tracing stops due to GDB
7234 disconnecting.
7235 (cmd_qtdisconnected): New.
7236 (cmd_qtstatus): Report disconnected tracing status in trace reply.
7237 (handle_tracepoint_general_set): Handle QTDisconnected.
7238
7239 * event-loop.c (event_handler_func): Change return type to int.
7240 (process_event): Bail out if the event handler wants the event
7241 loop to stop.
7242 (handle_file_event): Ditto.
7243 (start_event_loop): Bail out if the event handler wants the event
7244 loop to stop.
7245
7246 * nto-low.c (nto_target_ops): Adjust.
7247 * spu-low.c (spu_wait): Don't remove the process here.
7248 (spu_target_ops): Adjust.
7249 * win32-low.c (win32_wait): Don't remove the process here.
7250 (win32_target_ops): Adjust.
7251
7252 2010-04-11 Pedro Alves <pedro@codesourcery.com>
7253
7254 * regcache.c (realloc_register_cache): Invalidate inferior's
7255 regcache before recreating it.
7256
7257 2010-04-09 Pedro Alves <pedro@codesourcery.com>
7258
7259 * tracepoint.c (cmd_qtstatus): Report trace buffer circularity.
7260
7261 2010-04-09 Stan Shebs <stan@codesourcery.com>
7262 Pedro Alves <pedro@codesourcery.com>
7263
7264 * server.h (LONGEST): New.
7265 (struct thread_info) <while_stepping>: New field.
7266 (unpack_varlen_hex, xrealloc, pulongest, plongest, phex_nz):
7267 Declare.
7268 (initialize_tracepoint, handle_tracepoint_general_set)
7269 (handle_tracepoint_query, tracepoint_finished_step)
7270 (tracepoint_was_hit, release_while_stepping_state_list):
7271 (current_traceframe): Declare.
7272 * server.c (handle_general_set): Handle tracepoint packets.
7273 (read_memory): New.
7274 (write_memory): New.
7275 (handle_search_memory_1): Use read_memory.
7276 (handle_query): Report support for conditional tracepoints, trace
7277 state variables, and tracepoint sources. Handle tracepoint
7278 queries.
7279 (main): Initialize the tracepoints module.
7280 (process_serial_event): Handle traceframe reads/writes.
7281
7282 * linux-low.c (handle_tracepoints): New.
7283 (linux_wait_1): Call it.
7284 (linux_resume_one_lwp): Handle while-stepping.
7285 (linux_supports_tracepoints, linux_read_pc, linux_write_pc): New.
7286 (linux_target_ops): Install them.
7287 * linux-low.h (struct linux_target_ops) <supports_tracepoints>:
7288 New field.
7289 * linux-x86-low.c (x86_supports_tracepoints): New.
7290 (the_low_target). Install it.
7291
7292 * mem-break.h (delete_breakpoint): Declare.
7293 * mem-break.c (delete_breakpoint): Make external.
7294
7295 * target.h (struct target_ops): Add `supports_tracepoints',
7296 `read_pc', and `write_pc' fields.
7297 (target_supports_tracepoints): Define.
7298 * utils.c (xrealloc, decimal2str, pulongest, plongest, thirty_two)
7299 (phex_nz): New.
7300
7301 * regcache.h (struct regcache) <registers_owned>: New field.
7302 (init_register_cache, regcache_cpy): Declare.
7303 (regcache_read_pc, regcache_write_pc): Declare.
7304 (register_cache_size): Declare.
7305 (supply_regblock): Declare.
7306 * regcache.c (init_register_cache): New.
7307 (new_register_cache): Use it.
7308 (regcache_cpy): New.
7309 (register_cache_size): New.
7310 (supply_regblock): New.
7311 (regcache_read_pc, regcache_write_pc): New.
7312
7313 * tracepoint.c: New.
7314
7315 * Makefile.in (OBS): Add tracepoint.o.
7316 (tracepoint.o): New rule.
7317
7318 2010-04-08 H.J. Lu <hongjiu.lu@intel.com>
7319
7320 * Makefile.in (clean): Also remove i386-mmx.c i386-mmx-linux.c.
7321 (i386-mmx.o): New.
7322 (i386-mmx.c): Likewise.
7323 (i386-mmx-linux.o): Likewise.
7324 (i386-mmx-linux.c): Likewise.
7325
7326 * configure.srv (srv_i386_regobj): Add i386-mmx.o.
7327 (srv_i386_linux_regobj): Add i386-mmx-linux.o.
7328 (srv_i386_xmlfiles): Add i386/i386-mmx.xml.
7329 (srv_i386_linux_xmlfiles): Add i386/i386-mmx-linux.xml.
7330
7331 * linux-x86-low.c (init_registers_i386_mmx_linux): New.
7332 (x86_linux_update_xmltarget): Call init_registers_i386_mmx_linux
7333 and return if ptrace PTRACE_GETFPXREGS failed in 32bit.
7334
7335 2010-04-07 H.J. Lu <hongjiu.lu@intel.com>
7336
7337 * Makefile.in (clean): Updated.
7338 (i386-avx.o): New.
7339 (i386-avx.c): Likewise.
7340 (i386-avx-linux.o): Likewise.
7341 (i386-avx-linux.c): Likewise.
7342 (amd64-avx.o): Likewise.
7343 (amd64-avx.c): Likewise.
7344 (amd64-avx-linux.o): Likewise.
7345 (amd64-avx-linux.c): Likewise.
7346
7347 * configure.srv (srv_i386_regobj): Add i386-avx.o.
7348 (srv_i386_linux_regobj): Add i386-avx-linux.o.
7349 (srv_amd64_regobj): Add amd64-avx.o.
7350 (srv_amd64_linux_regobj): Add amd64-avx-linux.o.
7351 (srv_i386_32bit_xmlfiles): Add i386/32bit-avx.xml.
7352 (srv_i386_64bit_xmlfiles): Add i386/64bit-avx.xml.
7353 (srv_i386_xmlfiles): Add i386/i386-avx.xml.
7354 (srv_amd64_xmlfiles): Add i386/amd64-avx.xml.
7355 (srv_i386_linux_xmlfiles): Add i386/i386-avx-linux.xml.
7356 (srv_amd64_linux_xmlfiles): Add i386/amd64-avx-linux.xml.
7357
7358 * i387-fp.c: Include "i386-xstate.h".
7359 (i387_xsave): New.
7360 (i387_cache_to_xsave): Likewise.
7361 (i387_xsave_to_cache): Likewise.
7362 (x86_xcr0): Likewise.
7363
7364 * i387-fp.h (i387_cache_to_xsave): Likewise.
7365 (i387_xsave_to_cache): Likewise.
7366 (x86_xcr0): Likewise.
7367
7368 * linux-arm-low.c (target_regsets): Initialize nt_type to 0.
7369 * linux-crisv32-low.c (target_regsets): Likewise.
7370 * linux-m68k-low.c (target_regsets): Likewise.
7371 * linux-mips-low.c (target_regsets): Likewise.
7372 * linux-ppc-low.c (target_regsets): Likewise.
7373 * linux-s390-low.c (target_regsets): Likewise.
7374 * linux-sh-low.c (target_regsets): Likewise.
7375 * linux-sparc-low.c (target_regsets): Likewise.
7376 * linux-xtensa-low.c (target_regsets): Likewise.
7377
7378 * linux-low.c: Include <sys/uio.h>.
7379 (regsets_fetch_inferior_registers): Support nt_type.
7380 (regsets_store_inferior_registers): Likewise.
7381 (linux_process_qsupported): New.
7382 (linux_target_ops): Add linux_process_qsupported.
7383
7384 * linux-low.h (regset_info): Add nt_type.
7385 (linux_target_ops): Add process_qsupported.
7386
7387 * linux-x86-low.c: Include "i386-xstate.h", "elf/common.h"
7388 and <sys/uio.h>.
7389 (init_registers_i386_avx_linux): New.
7390 (init_registers_amd64_avx_linux): Likewise.
7391 (xmltarget_i386_linux_no_xml): Likewise.
7392 (xmltarget_amd64_linux_no_xml): Likewise.
7393 (PTRACE_GETREGSET): Likewise.
7394 (PTRACE_SETREGSET): Likewise.
7395 (x86_fill_xstateregset): Likewise.
7396 (x86_store_xstateregset): Likewise.
7397 (use_xml): Likewise.
7398 (x86_linux_update_xmltarget): Likewise.
7399 (x86_linux_process_qsupported): Likewise.
7400 (target_regsets): Add NT_X86_XSTATE entry and Initialize nt_type.
7401 (x86_arch_setup): Don't call init_registers_amd64_linux nor
7402 init_registers_i386_linux here. Call
7403 x86_linux_update_xmltarget.
7404 (the_low_target): Add x86_linux_process_qsupported.
7405
7406 * server.c (handle_query): Call target_process_qsupported.
7407
7408 * target.h (target_ops): Add process_qsupported.
7409 (target_process_qsupported): New.
7410
7411 2010-04-03 Pedro Alves <pedro@codesourcery.com>
7412
7413 * inferiors.c (add_thread): Set last_status kind to
7414 TARGET_WAITKIND_IGNORE.
7415 * linux-low.c (cancel_breakpoint): Remove unnecessary regcache
7416 fetch. Use ptid_of. Avoid unnecessary get_lwp_thread calls.
7417 (linux_wait_1): Move `thread' local definition to block that uses
7418 it. Don't NULL initialize `event_child'.
7419 (linux_resume_one_thread): Avoid unnecessary get_lwp_thread calls.
7420 Alway set the thread's last_status to TARGET_WAITKIND_IGNORE.
7421 * linux-x86-low.c (x86_breakpoint_at): Read raw memory.
7422
7423 2010-04-01 Pedro Alves <pedro@codesourcery.com>
7424
7425 * linux-low.c (get_stop_pc): Don't adjust the PC if stopped with
7426 an extended waitstatus, or by a watchpoint.
7427 (cancel_breakpoints_callback): Don't cancel a breakpoint if the
7428 thread was stepping or has been stopped by a watchpoint.
7429
7430 2010-04-01 Pedro Alves <pedro@codesourcery.com>
7431
7432 * mem-break.c (struct raw_breakpoint): New field shlib_disabled.
7433 (set_gdb_breakpoint_at): If GDB is inserting a breakpoint on top
7434 of another, then delete the previous, and validate all
7435 breakpoints.
7436 (validate_inserted_breakpoint): New.
7437 (delete_disabled_breakpoints): New.
7438 (validate_breakpoints): New.
7439 (check_mem_read): Validate breakpoints before trusting their
7440 shadow. Delete disabled breakpoints.
7441 (check_mem_write): Validate breakpoints before trusting they
7442 should be inserted. Delete disabled breakpoints.
7443 * mem-break.h (validate_breakpoints):
7444 * server.c (handle_query): Validate breakpoints when we see a
7445 qSymbol query.
7446
7447 2010-04-01 Pedro Alves <pedro@codesourcery.com>
7448
7449 * linux-low.c (linux_wait_1): Avoid setting need_step_over is
7450 there's a GDB breakpoint at stop_pc. Always report a trap to GDB
7451 if we could tell there's a GDB breakpoint at stop_pc.
7452 (need_step_over_p): Don't do a step over if we find a GDB
7453 breakpoint at the resume PC.
7454
7455 * mem-break.c (struct raw_breakpoint): New.
7456 (enum bkpt_type): New type `gdb_breakpoint'.
7457 (struct breakpoint): Delete the `PC', `old_data' and `inserted'
7458 fields. New field `raw'.
7459 (find_raw_breakpoint_at): New.
7460 (set_raw_breakpoint_at): Handle refcounting. Create a raw
7461 breakpoint instead.
7462 (set_breakpoint_at): Adjust.
7463 (delete_raw_breakpoint): New.
7464 (release_breakpoint): New.
7465 (delete_breakpoint): Rename to...
7466 (delete_breakpoint_1): ... this. Add proc parameter. Use
7467 release_breakpoint. Return ENOENT.
7468 (delete_breakpoint): Reimplement.
7469 (find_breakpoint_at): Delete.
7470 (find_gdb_breakpoint_at): New.
7471 (delete_breakpoint_at): Delete.
7472 (set_gdb_breakpoint_at): New.
7473 (delete_gdb_breakpoint_at): New.
7474 (gdb_breakpoint_here): New.
7475 (set_reinsert_breakpoint): Use release_breakpoint.
7476 (uninsert_breakpoint): Rename to ...
7477 (uninsert_raw_breakpoint): ... this.
7478 (uninsert_breakpoints_at): Adjust to handle raw breakpoints.
7479 (reinsert_raw_breakpoint): Change parameter type to
7480 raw_breakpoint.
7481 (reinsert_breakpoints_at): Adjust to handle raw breakpoints
7482 instead.
7483 (check_breakpoints): Adjust. Use release_breakpoint.
7484 (breakpoint_here): Rewrite using find_raw_breakpoint_at.
7485 (breakpoint_inserted_here): Ditto.
7486 (check_mem_read): Adjust to iterate over raw breakpoints instead.
7487 Don't trust the breakpoint's shadow if it is not inserted.
7488 (check_mem_write): Adjust to iterate over raw breakpoints instead.
7489 (delete_all_breakpoints): Adjust.
7490 (free_all_breakpoints): Mark all breakpoints as uninserted, and
7491 use delete_breakpoint_1.
7492
7493 * mem-break.h (breakpoints_supported): Delete declaration.
7494 (set_gdb_breakpoint_at): Declare.
7495 (gdb_breakpoint_here): Declare.
7496 (delete_breakpoint_at): Delete.
7497 (delete_gdb_breakpoint_at): Declare.
7498
7499 * server.h (struct raw_breakpoint): Forward declare.
7500 (struct process_info): New field `raw_breakpoints'.
7501
7502 * linux-x86-low.c (x86_insert_point, x86_remote_point): Handle Z0
7503 breakpoints.
7504
7505 2010-03-24 Pedro Alves <pedro@codesourcery.com>
7506
7507 * linux-low.c (status_pending_p_callback): Fix comment.
7508 (linux_wait_for_event_1): Move most of the internal breakpoint
7509 handling from here...
7510 (linux_wait_1): ... to here.
7511 (count_events_callback): New.
7512 (select_singlestep_lwp_callback): New.
7513 (select_event_lwp_callback): New.
7514 (cancel_breakpoints_callback): New.
7515 (select_event_lwp): New.
7516 (linux_wait_1): Simplify internal breakpoint handling. Give equal
7517 priority to all LWPs that have had events that should be reported
7518 to the client. Cancel breakpoints when about to reporting the
7519 event to the client, not while stopping lwps. No longer cancel
7520 finished single-steps here.
7521 (cancel_finished_single_step): Delete.
7522 (cancel_finished_single_steps): Delete.
7523
7524 2010-03-24 Pedro Alves <pedro@codesourcery.com>
7525
7526 * mem-break.c (enum bkpt_type): New.
7527 (struct breakpoint): New field `type'.
7528 (set_breakpoint_at): Change return type to struct breakpoint
7529 pointer. Set type to `other_breakpoint' by default.
7530 (delete_breakpoint): Rewrite, supporting more than one breakpoint
7531 in the breakpoint list.
7532 (delete_reinsert_breakpoints): Only delete reinsert breakpoints.
7533 (reinsert_breakpoint): Rename to ...
7534 (reinsert_raw_breakpoint): ... this.
7535 (reinsert_breakpoints_at): Adjust.
7536 * mem-break.h (struct breakpoint): Declare.
7537 (set_breakpoint_at): Change return type to struct breakpoint
7538 pointer.
7539
7540 2010-03-24 Pedro Alves <pedro@codesourcery.com>
7541
7542 * server.c (handle_query): Assign, not compare.
7543
7544 2010-03-24 Pedro Alves <pedro@codesourcery.com>
7545
7546 Teach linux gdbserver to step-over-breakpoints.
7547
7548 * linux-low.c (can_hardware_single_step): New.
7549 (supports_breakpoints): New.
7550 (handle_extended_wait): If stopping threads, read the stop pc of
7551 the new cloned LWP.
7552 (get_pc): New.
7553 (get_stop_pc): Add `lwp' parameter. Handle it. Bail out if the
7554 low target doesn't support retrieving the PC.
7555 (add_lwp): Set last_resume_kind to resume_continue.
7556 (linux_attach_lwp_1): Adjust comments. Always set stop_expected.
7557 (linux_attach): Don't clear stop_expected. Set the lwp's
7558 last_resume_kind to resume_stop.
7559 (linux_detach_one_lwp): Don't check for removed breakpoints.
7560 (check_removed_breakpoint): Delete.
7561 (status_pending_p): Rename to ...
7562 (status_pending_p_callback): ... this. Don't check for removed
7563 breakpoints. Don't consider threads that are stopped from GDB's
7564 perspective.
7565 (linux_wait_for_lwp): Always read the stop_pc here.
7566 (cancel_breakpoint): New.
7567 (step_over_bkpt): New global.
7568 (linux_wait_for_event_1): Implement stepping over breakpoints.
7569 (gdb_wants_lwp_stopped): New.
7570 (gdb_wants_all_stopped): New.
7571 (linux_wait_1): Tag threads as gdb-wants-stopped. Cancel finished
7572 single-step traps here. Store the thread's last reported target
7573 wait status.
7574 (send_sigstop): Don't clear stop_expected. Always set it,
7575 instead.
7576 (mark_lwp_dead): Remove reference to pending_is_breakpoint.
7577 (cancel_finished_single_step): New.
7578 (cancel_finished_single_steps): New.
7579 (wait_for_sigstop): Don't cancel finished single-step traps here.
7580 (linux_resume_one_lwp): Don't check for removed breakpoints.
7581 Don't set `step' on non-hardware step archs.
7582 (linux_set_resume_request): Ignore resume_stop requests if already
7583 stopping or stopped. Set the lwp's last_resume_kind.
7584 (resume_status_pending_p): Don't check for removed breakpoints.
7585 (need_step_over_p): New.
7586 (start_step_over): New.
7587 (finish_step_over): New.
7588 (linux_resume_one_thread): Always queue a sigstop for resume_stop
7589 requests. Clear the thread's last reported target waitstatus.
7590 Don't use the `suspended' flag. Don't consider pending breakpoints.
7591 (linux_resume): Start a step-over if necessary.
7592 (proceed_one_lwp): New.
7593 (proceed_all_lwps): New.
7594 (unstop_all_lwps): New.
7595 * linux-low.h (struct lwp_info): Rewrite comment for the
7596 `suspended' flag. Add the `stop_pc' field. Delete the
7597 `pending_stop_pc' field. Tweak the `stepping' flag's comment.
7598 Add `'last_resume_kind' and `need_step_over' fields.
7599 * inferiors.c (struct thread_info): Delete, moved elsewhere.
7600 * mem-break.c (struct breakpoint): Delete `reinserting' flag.
7601 Delete `breakpoint_to_reinsert' field. New flag `inserted'.
7602 (set_raw_breakpoint_at): New.
7603 (set_breakpoint_at): Rewrite to use it.
7604 (reinsert_breakpoint_handler): Delete.
7605 (set_reinsert_breakpoint): New.
7606 (reinsert_breakpoint_by_bp): Delete.
7607 (delete_reinsert_breakpoints): New.
7608 (uninsert_breakpoint): Rewrite.
7609 (uninsert_breakpoints_at): New.
7610 (reinsert_breakpoint): Rewrite.
7611 (reinsert_breakpoints_at): New.
7612 (check_breakpoints): Rewrite.
7613 (breakpoint_here): New.
7614 (breakpoint_inserted_here): New.
7615 (check_mem_read): Adjust.
7616 * mem-break.h (breakpoints_supported, breakpoint_here)
7617 (breakpoint_inserted_here, set_reinsert_breakpoint): Declare.
7618 (reinsert_breakpoint_by_bp): Delete declaration.
7619 (delete_reinsert_breakpoints): Declare.
7620 (reinsert_breakpoint): Delete declaration.
7621 (reinsert_breakpoints_at): Declare.
7622 (uninsert_breakpoint): Delete declaration.
7623 (uninsert_breakpoints_at): Declare.
7624 (check_breakpoints): Adjust prototype.
7625 * server.h: Adjust include order.
7626 (struct thread_info): Declare here. Add a `last_status' field.
7627
7628 2010-03-23 Michael Snyder <msnyder@vmware.com>
7629
7630 * server.c (crc32): New function.
7631 (handle_query): Add handling for 'qCRC:' request.
7632
7633 2010-03-23 Pedro Alves <pedro@codesourcery.com>
7634
7635 * linux-x86-low.c (x86_linux_prepare_to_resume): Clear DR6 if the
7636 lwp had been stopped by a watchpoint.
7637
7638 2010-03-16 Pedro Alves <pedro@codesourcery.com>
7639
7640 * server.h (internal_error): Declare.
7641 (gdb_assert, ASSERT_FUNCTION, gdb_assert_fail): Define.
7642 * utils.c (internal_error): New function.
7643
7644 2010-03-15 Andreas Schwab <schwab@redhat.com>
7645
7646 * configure.srv: Fix typo setting srv_regobj.
7647
7648 2010-03-15 Pedro Alves <pedro@codesourcery.com>
7649
7650 * linux-low.c (fetch_register): Avoid passing a non string literal
7651 format to `error'.
7652 (usr_store_inferior_registers): Ditto.
7653
7654 2010-03-14 Pedro Alves <pedro@codesourcery.com>
7655
7656 * linux-low.c (linux_write_memory): Bail out early if peeking
7657 memory failed.
7658
7659 2010-03-14 Pedro Alves <pedro@codesourcery.com>
7660
7661 * linux-low.h (struct lwp_info): New fields
7662 `stopped_by_watchpoint' and `stopped_data_address'.
7663 * linux-low.c (linux_wait_for_lwp): Check for watchpoint triggers
7664 here, and cache them in the lwp object.
7665 (wait_for_sigstop): Check stopped_by_watchpoint lwp field
7666 directly.
7667 (linux_resume_one_lwp): Clear the lwp's stopped_by_watchpoint
7668 field.
7669 (linux_stopped_by_watchpoint): Rewrite.
7670 (linux_stopped_data_address): Rewrite.
7671
7672 2010-03-06 Simo Melenius <simo.melenius@iki.fi>
7673
7674 * linux-low.c (linux_wait_for_lwp): Fetch the regcache after
7675 switching the current inferior, not before.
7676
7677 2010-03-01 H.J. Lu <hongjiu.lu@intel.com>
7678
7679 * Makefile.in (clean): Replace reg-i386.c, reg-x86-64.c,
7680 reg-i386-linux.c and reg-x86-64-linux.c with i386.c, amd64.c,
7681 i386-linux.c and amd64-linux.c.
7682 (reg-i386.o): Removed.
7683 (reg-i386.c): Likewise.
7684 (reg-i386-linux.o): Likewise.
7685 (reg-i386-linux.c): Likewise.
7686 (reg-x86-64.o): Likewise.
7687 (reg-x86-64.c): Likewise.
7688 (reg-x86-64-linux.o): Likewise.
7689 (reg-x86-64-linux.c): Likewise.
7690 (i386.o): New.
7691 (i386.c): Likewise.
7692 (i386-linux.o): Likewise.
7693 (i386-linux.c): Likewise.
7694 (amd64.o): Likewise.
7695 (amd64.c): Likewise.
7696 (amd64-linux.o): Likewise.
7697 (amd64-linux.c): Likewise.
7698
7699 * configure.srv (srv_i386_regobj): New.
7700 (srv_i386_linux_regobj): Likewise.
7701 (srv_amd64_regobj): Likewise.
7702 (srv_amd64_linux_regobj): Likewise.
7703 (srv_i386_32bit_xmlfiles): Likewise.
7704 (srv_i386_64bit_xmlfiles): Likewise.
7705 (srv_i386_xmlfiles): Likewise.
7706 (srv_amd64_xmlfiles): Likewise.
7707 (srv_i386_linux_xmlfiles): Likewise.
7708 (srv_amd64_linux_xmlfiles): Likewise.
7709 (i[34567]86-*-cygwin*): Set srv_regobj to $srv_i386_regobj. Set
7710 srv_xmlfiles to $srv_i386_xmlfiles.
7711 (i[34567]86-*-mingw32ce*): Likewise.
7712 (i[34567]86-*-mingw*): Likewise.
7713 (i[34567]86-*-nto*): Likewise.
7714 (i[34567]86-*-linux*): Set srv_regobj to $srv_i386_linux_regobj
7715 and $srv_amd64_linux_regobj. Set srv_xmlfiles to
7716 $srv_i386_linux_xmlfiles and $srv_amd64_linux_xmlfiles.
7717 (x86_64-*-linux*): Likewise.
7718
7719 * linux-x86-low.c (init_registers_x86_64_linux): Removed.
7720 (init_registers_amd64_linux): New.
7721 (x86_arch_setup): Replace init_registers_x86_64_linux with
7722 init_registers_amd64_linux.
7723
7724 2010-02-23 Maxim Kuvyrkov <maxim@codesourcery.com>
7725
7726 * configure.ac: Check for libdl. If it is not available link against
7727 static libthread_db.
7728 * configure: Regenerate.
7729
7730 2010-02-22 Pedro Alves <pedro@codesourcery.com>
7731
7732 PR9605
7733
7734 * i386-low.c (i386_length_and_rw_bits): Throw a fatal error if
7735 handing a read watchpoint.
7736 (i386_low_insert_watchpoint): Read watchpoints aren't supported.
7737
7738 2010-02-12 Doug Evans <dje@google.com>
7739
7740 * linux-low.c (linux_supports_tracefork_flag): Document.
7741 (linux_look_up_symbols): Add comment.
7742
7743 2010-02-03 H.J. Lu <hongjiu.lu@intel.com>
7744
7745 * regcache.c (supply_register): Clear regcache if buf is NULL.
7746
7747 2010-02-02 Nicolas Roche <roche@sourceware.org>
7748 Joel Brobecker <brobecker@adacore.com>
7749
7750 * inferiors.c (find_inferior): Add function documentation.
7751 (unloaded_dll): Handle the case where the unloaded dll has not
7752 been previously registered in the dll list.
7753
7754 2010-02-01 Daniel Jacobowitz <dan@codesourcery.com>
7755
7756 * linux-arm-low.c (thumb_breakpoint_len): Delete.
7757 (thumb2_breakpoint): New.
7758 (arm_breakpoint_at): Check for Thumb-2 breakpoints.
7759
7760 2010-01-29 Daniel Jacobowitz <dan@codesourcery.com>
7761
7762 * linux-low.c (get_stop_pc): Check for SIGTRAP.
7763 (linux_wait_for_event_1): Handle SIGILL and SIGSEGV as possible
7764 breakpoints.
7765
7766 2010-01-21 Pedro Alves <pedro@codesourcery.com>
7767
7768 * linux-ppc-low.c (ppc_arch_setup): Adjust to regcache changes.
7769
7770 2010-01-21 Jan Kratochvil <jan.kratochvil@redhat.com>
7771
7772 * linux-s390-low.c (s390_collect_ptrace_register)
7773 (s390_supply_ptrace_register): Adjust it for the new regcache parameter.
7774
7775 2010-01-21 Doug Evans <dje@google.com>
7776
7777 * linux-low.c (PTRACE_ARG3_TYPE): Change from long to void*.
7778 (PTRACE_ARG4_TYPE): New macro.
7779 (handle_extended_wait): Cast ptrace arg4 to PTRACE_ARG4_TYPE.
7780 (linux_wait_for_event_1, linux_resume_one_lwp): Ditto.
7781 (fetch_register): Cast to uintptr_t before casting to PTRACE_ARG3_TYPE.
7782 (usr_store_inferior_registers): Ditto.
7783 (linux_read_memory, linux_write_memory): Ditto.
7784 (linux_test_for_tracefork): Ditto.
7785
7786 * linux-arm-low.c: Remove redundant include of gdb_proc_service.h.
7787 Only include elf.h if gdb_proc_service.h didn't include linux/elf.h.
7788
7789 2010-01-21 Pedro Alves <pedro@codesourcery.com>
7790
7791 * proc-service.c (ps_lgetregs): Don't refetch registers from the
7792 target.
7793
7794 2010-01-21 Pedro Alves <pedro@codesourcery.com>
7795
7796 * spu-low.c (spu_fetch_registers, spu_store_registers): Change
7797 prototype to take a regcache. Adjust.
7798
7799 2010-01-20 Pedro Alves <pedro@codesourcery.com>
7800
7801 * regcache.h (struct thread_info): Forward declare.
7802 (struct regcache): New.
7803 (new_register_cache): Adjust prototype.
7804 (get_thread_regcache): Declare.
7805 (free_register_cache): Adjust prototype.
7806 (registers_to_string, registers_from_string): Ditto.
7807 (supply_register, supply_register_by_name, collect_register)
7808 (collect_register_as_string, collect_register_by_name): Ditto.
7809 * regcache.c (struct inferior_regcache_data): Delete.
7810 (get_regcache): Rename to ...
7811 (get_thread_regcache): ... this. Adjust. Switch inferior before
7812 fetching registers.
7813 (regcache_invalidate_one): Adjust.
7814 (regcache_invalidate): Fix prototype.
7815 (new_register_cache): Return the new register cache.
7816 (free_register_cache): Change prototype.
7817 (realloc_register_cache): Adjust.
7818 (registers_to_string): Change prototype to take a regcache. Adjust.
7819 (registers_from_string): Ditto.
7820 (register_data): Ditto.
7821 (supply_register): Ditto.
7822 (supply_register_by_name): Ditto.
7823 (collect_register): Ditto.
7824 (collect_register_as_string): Ditto.
7825 (collect_register_by_name): Ditto.
7826 * server.c (process_serial_event): Adjust.
7827 * linux-low.h (regset_fill_func, regset_store_func): Change
7828 prototype.
7829 (get_pc, set_pc, collect_ptrace_register, supply_ptrace_register):
7830 Change prototype.
7831 * linux-low.c (get_stop_pc): Adjust.
7832 (check_removed_breakpoint): Adjust.
7833 (linux_wait_for_event): Adjust.
7834 (linux_resume_one_lwp): Adjust.
7835 (fetch_register): Add regcache parameter. Adjust.
7836 (usr_store_inferior_registers): Ditto.
7837 (regsets_fetch_inferior_registers): Ditto.
7838 (regsets_store_inferior_registers): Ditto.
7839 (linux_fetch_registers, linux_store_registers): Ditto.
7840 * i387-fp.c (i387_cache_to_fsave): Change prototype to take a
7841 regcache. Adjust.
7842 (i387_fsave_to_cache, i387_cache_to_fxsave, i387_fxsave_to_cache):
7843 Ditto.
7844 * i387-fp.h (i387_cache_to_fsave, i387_fsave_to_cache): Change
7845 prototype to take a regcache.
7846 (i387_cache_to_fxsave, i387_fxsave_to_cache): Ditto.
7847 * remote-utils.c (convert_ascii_to_int, outreg)
7848 (prepare_resume_reply): Change prototype to take a regcache.
7849 Adjust.
7850 * target.h (struct target_ops) <fetch_registers, store_registers>:
7851 Change prototype to take a regcache.
7852 (fetch_inferior_registers, store_inferior_registers): Change
7853 prototype to take a regcache. Adjust.
7854 * proc-service.c (ps_lgetregs): Adjust.
7855 * linux-x86-low.c (x86_fill_gregset, x86_store_gregset)
7856 (x86_fill_fpregset, x86_store_fpregset, x86_fill_fpxregset)
7857 (x86_store_fpxregset, x86_get_pc, x86_set_pc): Change prototype to
7858 take a regcache. Adjust.
7859 * linux-arm-low.c (arm_fill_gregset, arm_store_gregset)
7860 (arm_fill_wmmxregset, arm_store_wmmxregset, arm_fill_vfpregset)
7861 (arm_store_vfpregset, arm_get_pc, arm_set_pc):
7862 (arm_breakpoint_at): Change prototype to take a regcache. Adjust.
7863 * linux-cris-low.c (cris_get_pc, cris_set_pc)
7864 (cris_cannot_fetch_register):
7865 (cris_breakpoint_at): Change prototype to take a regcache.
7866 Adjust.
7867 * linux-crisv32-low.c (cris_get_pc, cris_set_pc,
7868 cris_reinsert_addr, cris_write_data_breakpoint): Change prototype
7869 to take a regcache. Adjust.
7870 (cris_breakpoint_at, cris_insert_point, cris_remove_point):
7871 Adjust.
7872 * linux-m32r-low.c (m32r_get_pc, m32r_set_pc): Change prototype to
7873 take a regcache. Adjust.
7874 * linux-m68k-low.c (m68k_fill_gregset, m68k_store_gregset)
7875 (m68k_fill_fpregset, m68k_store_fpregset, m68k_get_pc,
7876 (m68k_set_pc): Change prototype to take a regcache. Adjust.
7877 * linux-mips-low.c (mips_get_pc):
7878 (mips_set_pc): Change prototype to take a regcache. Adjust.
7879 (mips_reinsert_addr): Adjust.
7880 (mips_collect_register): Change prototype to take a regcache.
7881 Adjust.
7882 (mips_supply_register):
7883 (mips_collect_register_32bit, mips_supply_register_32bit)
7884 (mips_fill_gregset, mips_store_gregset, mips_fill_fpregset)
7885 (mips_store_fpregset): Ditto.
7886 * linux-ppc-low.c (ppc_supply_ptrace_register)
7887 (ppc_supply_ptrace_register): Ditto.
7888 (parse_spufs_run): Adjust.
7889 (ppc_get_pc, ppc_set_pc, ppc_fill_gregset, ppc_fill_vsxregset)
7890 (ppc_store_vsxregset, ppc_fill_vrregset, ppc_store_vrregset)
7891 (ppc_fill_evrregset, ppc_store_evrregset): Change prototype to
7892 take a regcache. Adjust.
7893 * linux-s390-low.c (s390_collect_ptrace_register)
7894 (s390_supply_ptrace_register, s390_fill_gregset, s390_get_pc)
7895 (s390_set_pc): Change prototype to take a regcache. Adjust.
7896 (s390_arch_setup): Adjust.
7897 * linux-sh-low.c (sh_get_pc, sh_breakpoint_at)
7898 (sh_fill_gregset): Change prototype to take a regcache. Adjust.
7899 * linux-sparc-low.c (sparc_fill_gregset_to_stack)
7900 (sparc_fill_gregset, sparc_store_gregset_from_stack)
7901 (sparc_store_gregset, sparc_get_pc): Change prototype to take a
7902 regcache. Adjust.
7903 (sparc_breakpoint_at): Adjust.
7904 * linux-xtensa-low.c (xtensa_fill_gregset):
7905 (xtensa_store_gregset):
7906 (xtensa_fill_xtregset, xtensa_store_xtregset, xtensa_get_pc)
7907 (xtensa_set_pc): Change prototype to take a regcache. Adjust.
7908 * nto-low.c (nto_fetch_registers, nto_store_registers): Change
7909 prototype to take a regcache. Adjust.
7910 * win32-arm-low.c (arm_fetch_inferior_register)
7911 (arm_store_inferior_register): Change prototype to take a
7912 regcache. Adjust.
7913 * win32-i386-low.c (i386_fetch_inferior_register)
7914 (i386_store_inferior_register): Change prototype to take a
7915 regcache. Adjust.
7916 * win32-low.c (child_fetch_inferior_registers)
7917 (child_store_inferior_registers): Change prototype to take a
7918 regcache. Adjust.
7919 (win32_wait): Adjust.
7920 (win32_fetch_inferior_registers): Change prototype to take a
7921 regcache. Adjust.
7922 (win32_store_inferior_registers): Adjust.
7923 * win32-low.h (struct win32_target_ops) <fetch_inferior_register,
7924 store_inferior_register>: Change prototype to take a regcache.
7925
7926 2010-01-20 Doug Evans <dje@google.com>
7927
7928 * linux-low.c (linux_create_inferior): Wrap use of __SIGRTMIN in
7929 #ifdef.
7930 (linux_wait_for_event1, linux_init_signals): Ditto.
7931 (W_STOPCODE): Provide definition if missing.
7932
7933 2010-01-13 Vladimir Prus <vladimir@codesourcery.com>
7934
7935 * linux-low.c (linux_core_of_thread): New.
7936 (compare_ints, show_process, list_threads): New.
7937 (linux_qxfer_osdata): Report threads and cores.
7938 (linux_target_op): Register linux_core_of_thread.
7939 * remote-utils.c (prepare_resume_reply): Report the core.
7940 (buffer_xml_printf): Support %d specifier.
7941 * server.c (handle_threads_qxfer_proper, handle_threads_qxfer):
7942 New.
7943 (handle_query): Handle qXfer:threads. Announce availability
7944 thereof.
7945 * target.h (struct target_ops): New field core_of_thread.
7946
7947 2010-01-04 Ulrich Weigand <uweigand@de.ibm.com>
7948
7949 * Makefile.in (clean): Remove new generated files.
7950 (reg-s390.o, reg-s390.c): Remove rules.
7951 (reg-s390x.o, reg-s390x.c): Likewise.
7952 (s390-linux32.o, s390-linux32.c): Add rules.
7953 (s390-linux64.o, s390-linux64.c): Likewise.
7954 (s390x-linux64.o, s390x-linux64.c): Likewise.
7955 * configure.srv (s390*-*-linux*): Update srv_regobj and srv_xmlfiles.
7956 * linux-s390-low.c: Include <elf.h>.
7957 (HWCAP_S390_HIGH_GPRS): Define if undefined.
7958 (init_registers_s390): Remove prototype.
7959 (init_registers_s390x): Likewise.
7960 (init_registers_s390_linux32): Add prototype.
7961 (init_registers_s390_linux64): Likewise.
7962 (init_registers_s390x_linux64): Likewise.
7963 (s390_num_regs_3264): New define.
7964 (s390_regmap_3264): New global variable.
7965 (s390_cannot_fetch_register): Remove obsolete check.
7966 (s390_cannot_store_register): Likewise.
7967 (s390_collect_ptrace_register): Handle upper/lower register halves.
7968 (s390_supply_ptrace_register): Likewise.
7969 (s390_fill_gregset): Update to register number changes.
7970 (s390_get_hwcap): New routine.
7971 (s390_arch_setup): Detect 32-bit process running on 64-bit system.
7972 Install appropriate regmap and register set.
7973
7974 2010-01-01 Joel Brobecker <brobecker@adacore.com>
7975
7976 * server.c (gdbserver_version): Update copyright year to 2010.
7977 * gdbreplay.c (gdbreplay_version): Likewise.
7978
7979 2009-12-28 Doug Evans <dje@google.com>
7980
7981 * linux-low.c: Delete inclusion of ansidecl.h, elf/common.h,
7982 elf/external.h. Include <elf.h> instead but only if necessary.
7983
7984 2009-12-28 Pedro Alves <pedro@codesourcery.com>
7985
7986 * linux-low.c (linux_remove_process): Remove `detaching'
7987 parameter. Don't release/detach from thread_db here.
7988 (linux_kill): Release/detach from thread_db here, ...
7989 (linux_detach): ... and here, before actually detaching.
7990 (linux_wait_1): ... and here, when a process exits.
7991 * thread-db.c (any_thread_of): New.
7992 (thread_db_free): Switch the current inferior to a thread of the
7993 passed in process.
7994
7995 2009-12-21 Doug Evans <dje@google.com>
7996
7997 * linux-x86-low.c: Delete outdated comment about Elf32_Phdr.
7998
7999 * linux-low.c (kill_lwp): Use __NR_tkill instead of SYS_tkill.
8000 Move definition of tkill_failed to ifdef __NR_tkill to avoid gcc
8001 warning ifndef __NR_tkill. Move setting of errno there too.
8002 Delete unnecessary resetting of errno after syscall.
8003 Minor comment changes to match gdb/linux-nat.c:kill_lwp.
8004
8005 * configure.ac: Check for dladdr.
8006 * config.in: Regenerate.
8007 * configure: Regenerate.
8008 * thread-db.c (dladdr_to_soname): Only define ifdef HAVE_DLADDR.
8009 (try_thread_db_load): Update.
8010
8011 * linux-low.c (my_waitpid): Delete unnecessary prototype.
8012
8013 2009-12-18 Doug Evans <dje@google.com>
8014
8015 * event-loop.c: Include unistd.h if it exists.
8016
8017 * linux-low.c (my_waitpid): Move definition away from being in
8018 between linux_tracefork_child/linux_test_for_tracefork.
8019
8020 * gdb_proc_service.h (psaddr_t): Fix type.
8021 * thread-db.c (thread_db_info.td_thr_tls_get_addr_p): Fix
8022 signature to match glibc.
8023
8024 2009-12-16 Doug Evans <dje@google.com>
8025
8026 * linux-low.c (linux_read_memory): Fix argument to read.
8027
8028 2009-11-26 Pedro Alves <pedro@codesourcery.com>
8029
8030 * win32-low.c (get_child_debug_event): On EXIT_THREAD_DEBUG_EVENT
8031 events, don't leave current_inferior pointing at null.
8032
8033 2009-11-26 Pedro Alves <pedro@codesourcery.com>
8034
8035 * win32-low.c (LOG): Delete.
8036 (OUTMSG): Output to stderr.
8037 (OUTMSG2): Conditionalize on `debug_threads' variable, instead of
8038 on compile time LOG macro.
8039 (win32_wait): Fix debug output.
8040
8041 2009-11-26 Pedro Alves <pedro@codesourcery.com>
8042
8043 * win32-low.c (win32_add_one_solib): If the dll name is
8044 "ntdll.dll", prepend the system directory to the dll path.
8045
8046 2009-11-17 Daniel Jacobowitz <dan@codesourcery.com>
8047
8048 * m68k-tdep.c (m68k_gdbarch_init): Reuse previous initialization.
8049
8050 2009-11-17 Nathan Sidwell <nathan@codesourcery.com>
8051 Vladimir Prus <vladimir@codesourcery.com>
8052
8053 * Makefile.in (reg-cf.o, reg-cf.c): New targets.
8054 * configure.ac: Check for __mcoldfire__ and set
8055 gdb_cv_m68k_is_coldfire.
8056 * configure.srv: Use gdb_cv_m68k_is_coldfire to select between
8057 reg-cf.o and reg-m68k.o.
8058 * configure: Regenerated.
8059
8060 2009-11-16 Pedro Alves <pedro@codesourcery.com>
8061
8062 * linux-low.c (linux_remove_process): Add `detaching' parameter.
8063 Pass it to thread_db_free.
8064 (linux_kill, linux_detach, linux_wait_1): Adjust to pass the
8065 proper `detaching' argument to linux_remove_process.
8066 * linux-low.h (thread_db_free): Add `detaching' parameter.
8067 * thread-db.c (thread_db_init): Pass false as `detaching' argument
8068 to thread_db_free.
8069 (thread_db_free): Add `detaching' parameter. Only
8070 call td_ta_clear_event if detaching from process.
8071
8072 2009-11-12 Maxim Kuvyrkov <maxim@codesourcery.com>
8073
8074 * thread-db.c (thread_db_free): Fix typo.
8075
8076 2009-11-11 Paul Pluzhnikov <ppluzhnikov@google.com>
8077
8078 PR gdb/10838
8079 * thread-db.c (thread_db_free): Call td_ta_clear_event.
8080
8081 2009-11-03 Nathan Sidwell <nathan@codesourcery.com>
8082
8083 * configure.ac (i[34567]86-*): Check if we're targetting x86-64
8084 with an i686 compiler.
8085 * configure.srv (i[34567]86-*-linux*): Pull in x86-64 handling if
8086 needed.
8087 * configure: Rebuilt.
8088
8089 2009-10-29 Sandra Loosemore <sandra@codesourcery.com>
8090
8091 PR gdb/10783
8092
8093 * server.c (handle_search_memory_1): Correct read_addr initialization
8094 in loop for searching subsequent chunks.
8095
8096 2009-10-29 Paul Pluzhnikov <ppluzhnikov@google.com>
8097
8098 * configure.ac: New --with-libthread-db option.
8099 * thread-db.c: Allow direct dependence on libthread_db.
8100 (thread_db_free): Adjust.
8101 * config.in: Regenerate.
8102 * configure: Likewise.
8103
8104 2009-10-28 Paul Pluzhnikov <ppluzhnikov@google.com>
8105
8106 PR gdb/10757
8107 * thread-db.c (attach_thread): New function.
8108 (maybe_attach_thread): Return success/failure.
8109 (find_new_threads_callback): Adjust.
8110 (thread_db_find_new_threads): Loop until no new threads.
8111
8112 2009-10-13 Pedro Alves <pedro@codesourcery.com>
8113
8114 * proc-service.c (ps_lgetregs): Formatting.
8115
8116 2009-10-08 Paul Pluzhnikov <ppluzhnikov@google.com>
8117
8118 * acinclude.m4: (SRV_CHECK_THREAD_DB, SRV_CHECK_TLS_GET_ADDR): Remove.
8119 * configure.ac: Adjust.
8120 * linux-low.h (struct process_info_private): Move members to struct
8121 thread_db.
8122 (thread_db_free, thread_db_handle_monitor_command): New prototype.
8123 * linux-low.c (linux_remove_process): Adjust.
8124 (linux_wait_for_event_1, linux_look_up_symbols): Likewise.
8125 * server.c (handle_query): Move code ...
8126 (handle_monitor_command): ... here. New function.
8127 * target.h (struct target_ops): New member.
8128 * thread-db.c (struct thread_db): New.
8129 (libthread_db_search_path): New variable.
8130 (thread_db_create_event, thread_db_enable_reporting)
8131 (find_one_thread, maybe_attach_thread, find_new_threads_callback)
8132 (thread_db_find_new_threads, (thread_db_get_tls_address): Adjust.
8133 (try_thread_db_load_1, dladdr_to_soname): New functions.
8134 (try_thread_db_load, thread_db_load_search): New functions.
8135 (thread_db_init): Search for libthread_db.
8136 (thread_db_free): New function.
8137 (thread_db_handle_monitor_command): Likewise.
8138 * config.in: Regenerate.
8139 * configure: Regenerate.
8140
8141 2009-09-27 Ulrich Weigand <uweigand@de.ibm.com>
8142
8143 * spu-low.c (spu_kill): Wait for inferior to terminate.
8144 Call clear_inferiors.
8145 (spu_detach): Call clear_inferiors.
8146
8147 2009-08-22 Ralf Wildenhues <Ralf.Wildenhues@gmx.de>
8148
8149 * aclocal.m4: Regenerate.
8150 * config.in: Likewise.
8151 * configure: Likewise.
8152
8153 2009-07-31 Ulrich Weigand <uweigand@de.ibm.com>
8154
8155 * linux-ppc-low.c (INSTR_SC, NR_spu_run): Define.
8156 (parse_spufs_run): New function.
8157 (ppc_get_pc, ppc_set_pc): Detect and handle SPU PC.
8158 (ppc_breakpoint_at): Handle SPU breakpoints.
8159
8160 2009-07-31 Ulrich Weigand <uweigand@de.ibm.com>
8161
8162 * linux-low.c: Include <sys/stat.h> and <sys/vfs.h>.
8163 (SPUFS_MAGIC): Define.
8164 (spu_enumerate_spu_ids): New function.
8165 (linux_qxfer_spu): New function.
8166 (linux_target_ops): Install linux_qxfer_spu.
8167
8168 2009-07-31 Ulrich Weigand <uweigand@de.ibm.com>
8169
8170 * configure.srv (powerpc*-*-linux*): Add powerpc-cell32l.o
8171 and powerpc-cell64l.o to srv_regobj. Add rs6000/powerpc-cell32l.xml
8172 and rs6000/powerpc-cell64l.xml to srv_xmlfiles.
8173 * Makefile.in (powerpc-cell32l.o, powerpc-cell32l.c): New rules.
8174 (powerpc-cell64l.o, powerpc-cell64l.c): Likewise.
8175 (clean): Handle powerpc-cell32l.c and powerpc-cell64l.c.
8176 * linux-ppc-low.c (PPC_FEATURE_CELL): Define.
8177 (init_registers_powerpc_cell32l): Add prototype.
8178 (init_registers_powerpc_cell64l): Likewise.
8179 (ppc_arch_setup): Detect Cell/B.E. architecture.
8180
8181 2009-07-30 Ralf Wildenhues <Ralf.Wildenhues@gmx.de>
8182
8183 * Makefile.in (datarootdir): New variable.
8184
8185 2009-07-28 Daniel Jacobowitz <dan@codesourcery.com>
8186
8187 * linux-low.c (linux_write_memory): Update debugging output.
8188 * Makefile.in (clean): Add new descriptions.
8189 (arm-with-vfpv2.o, arm-with-vfpv2.c, arm-with-vfpv3.o)
8190 (arm-with-vfpv3.c, arm-with-neon.o, arm-with-neon.c): New rules.
8191 * configure.srv: Add new files for arm*-*-linux*.
8192 * linux-arm-low.c: Add new declarations.
8193 (PTRACE_GETVFPREGS, PTRACE_SETVFPREGS): Define if undefined.
8194 (arm_hwcap, HWCAP_VFP, HWCAP_IWMMXT, HWCAP_NEON, HWCAP_VFPv3)
8195 (HWCAP_VFPv3D16): New.
8196 (arm_fill_wmmxregset, arm_store_wmmxregset): Check HWCAP_IWMMXT
8197 instead of __IWMMXT__.
8198 (arm_fill_vfpregset, arm_store_vfpregset, arm_get_hwcap)
8199 (arm_arch_setup): New.
8200 (target_regsets): Remove #ifdef. Add VFP regset.
8201 (the_low_target): Use arm_arch_setup.
8202
8203 2009-07-28 Daniel Jacobowitz <dan@codesourcery.com>
8204
8205 * linux-low.c (linux_kill_one_lwp): Adjust kernel workaround to skip
8206 the main thread again.
8207
8208 2009-07-06 Aleksandar Ristovski <aristovski@qnx.com>
8209
8210 Adding Neutrino gdbserver.
8211 * configure: Regenerated.
8212 * configure.ac: Add case for srv_qnx and set LIBS accordingly.
8213 * configure.srv (i[34567]86-*-nto*): New target.
8214 * nto-low.c, nto-low.h, nto-x86-low.c: New files.
8215 * remote-utils.c [__QNX__]: Include sys/iomgr.h
8216 (nto_comctrl) [__QNX__]: New function.
8217 (enable_async_io, disable_async_io) [__QNX__]: Call nto_comctrl.
8218
8219 2009-07-05 Danny Backx <dannybackx@users.sourceforge.net>
8220
8221 * configure.srv (i[34567]86-*-mingw32ce*): Add i386-low.o to
8222 srv_tgtobj.
8223
8224 2009-07-04 Danny Backx <dannybackx@users.sourceforge.net>
8225 Pedro Alves <pedro@codesourcery.com>
8226
8227 * win32-i386-low.c (i386_get_thread_context): Handle systems that
8228 don't support CONTEXT_EXTENDED_REGISTERS.
8229 (i386_win32_breakpoint, i386_win32_breakpoint_len): New.
8230 (the_low_target): Install them.
8231 * win32-low.c (get_child_debug_event): Handle WaitForDebugEvent
8232 failing with ERROR_PIPE_NOT_CONNECTED.
8233
8234 2009-06-30 Doug Evans <dje@google.com>
8235 Pierre Muller <muller@ics.u-strasbg.fr>
8236
8237 Add h/w watchpoint support to x86-linux, win32-i386.
8238 * Makefile.in (SFILES): Add i386-low.c
8239 (i386_low_h): Define.
8240 (i386-low.o): Add dependencies.
8241 (linux-x86-low.o): Add i386-low.h dependency.
8242 (win32-i386-low.o): Ditto.
8243 * i386-low.c: New file.
8244 * i386-low.h: New file.
8245 * configure.srv (i[34567]86-*-cygwin*): Add i386-low.o to srv_tgtobj.
8246 (i[34567]86-*-linux*, i[34567]86-*-mingw*, x86_64-*-linux*): Ditto.
8247 * linux-low.c (linux_add_process): Initialize arch_private.
8248 (linux_remove_process): Free arch_private.
8249 (add_lwp): Initialize arch_private.
8250 (delete_lwp): Free arch_private.
8251 (linux_resume_one_lwp): Call the_low_target.prepare_to_resume if
8252 provided.
8253 * linux-low.h (process_info_private): New member arch_private.
8254 (lwp_info): New member arch_private.
8255 (linux_target_ops): New members new_process, new_thread,
8256 prepare_to_resume.
8257 (ptid_of): New macro.
8258 * linux-x86-low.c: Include stddef.h, i386-low.h.
8259 (arch_process_info): New struct.
8260 (arch_lwp_info): New struct.
8261 (x86_linux_dr_get, x86_linux_dr_set): New functions.
8262 (i386_dr_low_set_addr, i386_dr_low_set_control): New functions.
8263 (i386_dr_low_get_status): New function.
8264 (x86_insert_point, x86_remove_point): New functions.
8265 (x86_stopped_by_watchpoint): New function.
8266 (x86_stopped_data_address): New function.
8267 (x86_linux_new_process, x86_linux_new_thread): New functions.
8268 (x86_linux_prepare_to_resume): New function.
8269 (the_low_target): Add entries for insert_point, remove_point,
8270 stopped_by_watchpoint, stopped_data_address, new_process, new_thread,
8271 prepare_to_resume.
8272 * server.c (debug_hw_points): New global.
8273 (monitor_show_help): Document set debug-hw-points.
8274 (handle_query): Process "set debug-hw-points".
8275 * server.h (debug_hw_points): Declare.
8276 (paddress): Declare.
8277 * utils.c (NUMCELLS, CELLSIZE): New macros.
8278 (get_sell, xsnprintf, paddress): New functions.
8279 * win32-arm-low.c (the_low_target): Add entries for insert_point,
8280 remove_point, stopped_by_watchpoint, stopped_data_address.
8281 * win32-i386-low.c: Include i386-low.h.
8282 (debug_reg_state): Replaces dr.
8283 (i386_dr_low_set_addr, i386_dr_low_set_control): New functions.
8284 (i386_dr_low_get_status): New function.
8285 (i386_insert_point, i386_remove_point): New functions.
8286 (i386_stopped_by_watchpoint): New function.
8287 (i386_stopped_data_address): New function.
8288 (i386_initial_stuff): Update.
8289 (get_thread_context,set_thread_context,i386_thread_added): Update.
8290 (the_low_target): Add entries for insert_point,
8291 remove_point, stopped_by_watchpoint, stopped_data_address.
8292 * win32-low.c (win32_insert_watchpoint): New function.
8293 (win32_remove_watchpoint): New function.
8294 (win32_stopped_by_watchpoint): New function.
8295 (win32_stopped_data_address): New function.
8296 (win32_target_ops): Add entries for insert_watchpoint,
8297 remove_watchpoint, stopped_by_watchpoint, stopped_data_address.
8298 * win32-low.h (win32_target_ops): New members insert_point,
8299 remove_point, stopped_by_watchpoint, stopped_data_address.
8300
8301 2009-06-25 Pedro Alves <pedro@codesourcery.com>
8302
8303 * server.c (process_serial_event): Re-return unsupported, not
8304 error, if the type isn't recognized. Re-allow supporting only
8305 insert or remove packets. Also call require_running for
8306 breakpoints. Add missing break statement to default case. Tidy.
8307 * target.h (struct target_ops): Rename insert_watchpoint to
8308 insert_point, and remove_watchpoint to remove_point.
8309
8310 * linux-low.h (struct linux_target_ops): Likewise.
8311 * linux-low.c (linux_insert_watchpoint): Rename to ...
8312 (linux_insert_point): ... this. Adjust.
8313 (linux_remove_watchpoint): Rename to ...
8314 (linux_remove_point): ... this. Adjust.
8315 (linux_target_ops): Adjust.
8316 * linux-crisv32-low.c (cris_insert_watchpoint): Rename to ...
8317 (cris_insert_point): ... this.
8318 (cris_remove_watchpoint): Rename to ...
8319 (cris_remove_point): ... this.
8320 (the_low_target): Adjust.
8321
8322 2009-06-24 Pierre Muller <muller@ics.u-strasbg.fr>
8323
8324 * server.c (handle_v_kill): Pass signal_pid to
8325 kill_inferior if multi_process is zero.
8326
8327 2009-06-23 Aleksandar Ristovski <aristovski@qnx.com>
8328
8329 * server.c (process_serial_event): Add support for Z0 and Z1 packet.
8330 * target.h (target_ops): Comment for *_watchpoint to make it clear
8331 the functions can get types '0' and '1'.
8332
8333 2009-06-22 Aleksandar Ristovski <aristovski@qnx.com>
8334
8335 * linux-low.c (usr_fetch_inferior_registers): Remove check for regno 0.
8336 * proc-service.c (ps_lgetregs): Pass -1 to fetch all registers.
8337 * regcache.c (get_regcache): Likewise.
8338 * spu-low.c (spu_fetch_registers): Remove 0 to -1 conversion.
8339 * win32-low.c (child_fetch_inferior_registers): Remove check for
8340 regno 0.
8341
8342 2009-06-19 Aleksandar Ristovski <aristovski@qnx.com>
8343 Pedro Alves <pedro@codesourcery.com>
8344
8345 * target.h (struct target_ops) <supports_multi_process>: New
8346 callback.
8347 (target_supports_multi_process): New.
8348 * server.c (handle_query): Even if GDB reports support, only
8349 enable multi-process if the target also supports it. Report
8350 multi-process support only if the target backend supports it.
8351 * linux-low.c (linux_supports_multi_process): New function.
8352 (linux_target_ops): Install it as target_supports_multi_process
8353 callback.
8354
8355 2009-05-24 Doug Evans <dje@google.com>
8356
8357 Global renaming of find_thread_pid to find_thread_ptid.
8358 * server.h (find_thread_ptid): Renamed from find_thread_pid.
8359 * inferiors.c (find_thread_ptid): Renamed from find_thread_pid.
8360 All callers updated.
8361
8362 * linux-low.c (handle_extended_wait): Use linux_resume_one_lwp
8363 to resume the newly created thread, don't call ptrace (PTRACE_CONT)
8364 directly.
8365
8366 * linux-low.c (get_stop_pc): Print pc if debug_threads.
8367 (check_removed_breakpoint, linux_wait_for_lwp): Ditto.
8368 (linux_resume_one_lwp): Ditto.
8369
8370 2009-05-23 Doug Evans <dje@google.com>
8371
8372 * linux-low.c (linux_resume_one_lwp): Change type of first arg
8373 from struct inferior_list_entry * to struct lwp_info *.
8374 All callers updated.
8375
8376 2009-05-13 Doug Evans <dje@google.com>
8377
8378 * linux-x86-low.c: Don't include assert.h.
8379 (x86_siginfo_fixup): Use fatal, not assert.
8380 (x86_arch_setup): Fix comment.
8381
8382 2009-05-12 Doug Evans <dje@google.com>
8383
8384 Biarch support for i386/amd64 gdbserver.
8385 * Makefile.in (SFILES): Remove linux-i386-low.c, linux-x86-64-low.c.
8386 Add linux-x86-low.c.
8387 (linux-i386-low.o, linux-x86-64-low.o): Delete.
8388 (linux-x86-low.o): Add.
8389 * linux-x86-64-low.c: Delete.
8390 * linux-i386-low.c: Delete.
8391 * linux-x86-low.c: New file.
8392 * configure.srv (i?86-linux srv_tgtobj): Replace linux-i386-low.o with
8393 linux-x86-low.o.
8394 (x86_64-linux srv_tgtobj): Replace linux-x86-64-low.o with
8395 linux-x86-low.o.
8396 (x86_64-linux srv_regobj): Add reg-i386-linux.o.
8397 * linux-low.c: Include ansidecl.h, elf/common.h, elf/external.h.
8398 (linux_child_pid_to_exec_file): New function.
8399 (elf_64_header_p, elf_64_file_p): New functions.
8400 (siginfo_fixup): New function.
8401 (linux_xfer_siginfo): New local inf_siginfo. Call siginfo_fixup to
8402 give target a chance to convert layout.
8403 * linux-low.h (linux_target_ops): New member siginfo_fixup.
8404 (linux_child_pid_to_exec_file, elf_64_file_p): Declare.
8405
8406 2009-05-07 Doug Evans <dje@google.com>
8407
8408 * linux-low.c (regsets_fetch_inferior_registers): Fix memory leak.
8409 (regsets_store_inferior_registers): Ditto.
8410
8411 2009-05-06 Pedro Alves <pedro@codesourcery.com>
8412
8413 PR server/10048
8414
8415 * linux-low.c (must_set_ptrace_flags): Delete.
8416 (linux_create_inferior): Set `lwp->must_set_ptrace_flags' instead
8417 of the global.
8418 (linux_attach_lwp_1): Don't set PTRACE_SETOPTIONS here. Set
8419 `lwp->must_set_ptrace_flags' instead.
8420 (linux_wait_for_event_1): Set ptrace options here.
8421 (linux_wait_1): ... not here.
8422
8423 2009-04-30 Doug Evans <dje@google.com>
8424
8425 * inferiors.c (started_inferior_callback): New function.
8426 (attached_inferior_callback): New function.
8427 (have_started_inferiors_p, have_attached_inferiors_p): New functions.
8428 * server.c (print_started_pid, print_attached_pid): New functions.
8429 (detach_or_kill_for_exit): New function.
8430 (main): Call it instead of for_each_inferior (kill_inferior_callback).
8431 * server.h (have_started_inferiors_p): Declare.
8432 (have_attached_inferiors_p): Declare.
8433
8434 * inferiors.c (remove_process): Fix memory leak, free process.
8435 * linux-low.c (linux_remove_process): New function.
8436 (linux_kill): Call it instead of remove_process.
8437 (linux_detach, linux_wait_1): Ditto.
8438
8439 2009-04-19 Danny Backx <dannybackx@users.sourceforge.net>
8440
8441 * configure.srv: Add x86 Windows CE target.
8442
8443 2009-04-03 Ulrich Weigand <uweigand@de.ibm.com>
8444
8445 * inferiors.c (get_thread_process): Make global.
8446 * server.h (get_thread_process): Add prototype.
8447 * thread-db.c (find_one_thread): Use get_thread_process
8448 instead of current_process.
8449 (thread_db_get_tls_address): Do not crash if called when
8450 thread layer is not yet initialized.
8451
8452 2009-04-03 Ulrich Weigand <uweigand@de.ibm.com>
8453
8454 * remote-utils.c (prepare_resume_reply): Null-terminate packet.
8455 * spu-low.c (current_tid): Rename to ...
8456 (current_ptid): ... this.
8457 (fetch_ppc_register, fetch_ppc_memory, store_ppc_memory,
8458 spu_proc_xfer_spu, spu_resume, spu_request_interrupt): Use
8459 ptid_get_lwp (current_ptid) instead of current_tid.
8460 (spu_kill, spu_detach, spu_join, spu_wait): Use pid argument
8461 instead of current_tid. Use find_process_pid to verify pid
8462 argument is valid. Pass proper argument to remove_process.
8463 (spu_thread_alive): Compare current_ptid instead of current_tid.
8464 (spu_resume): Likewise.
8465
8466 2009-04-02 Pedro Alves <pedro@codesourcery.com>
8467
8468 * linux-low.c (usr_store_inferior_registers): Declare local `pid'
8469 variable.
8470
8471 2009-04-01 Pedro Alves <pedro@codesourcery.com>
8472
8473 Implement the multiprocess extensions, and add linux multiprocess
8474 support.
8475
8476 * server.h (ULONGEST): Declare.
8477 (struct ptid, ptid_t): New.
8478 (minus_one_ptid, null_ptid): Declare.
8479 (ptid_build, pid_to_ptid, ptid_get_pid, ptid_get_lwp)
8480 (ptid_get_tid, ptid_equal, ptid_is_pid): Declare.
8481 (struct inferior_list_entry): Change `id' type from unsigned from
8482 to ptid_t.
8483 (struct sym_cache, struct breakpoint, struct
8484 process_info_private): Forward declare.
8485 (struct process_info): Declare.
8486 (current_process): Declare.
8487 (all_processes): Declare.
8488 (initialize_inferiors): Declare.
8489 (add_thread): Adjust to use ptid_t.
8490 (thread_id_to_gdb_id, thread_to_gdb_id, gdb_id_to_thread_id): Ditto.
8491 (add_process, remove_process, find_thread_pid): Declare.
8492 (find_inferior_id): Adjust to use ptid_t.
8493 (cont_thread, general_thread, step_thread): Change type to ptid_t.
8494 (multi_process): Declare.
8495 (push_event): Adjust to use ptid_t.
8496 (read_ptid, write_ptid): Declare.
8497 (prepare_resume_reply): Adjust to use ptid_t.
8498 (clear_symbol_cache): Declare.
8499 * inferiors.c (all_processes): New.
8500 (null_ptid, minus_one_ptid): New.
8501 (ptid_build, pid_to_ptid, ptid_get_pid, ptid_get_lwp)
8502 (ptid_get_tid, ptid_equal, ptid_is_pid): New.
8503 (add_thread): Change unsigned long to ptid. Remove gdb_id
8504 parameter. Adjust.
8505 (thread_id_to_gdb_id, thread_to_gdb_id): Change unsigned long to ptid.
8506 (gdb_id_to_thread): Rename to ...
8507 (find_thread_pid): ... this. Change unsigned long to ptid.
8508 (gdb_id_to_thread_id, find_inferior_id): Change unsigned long to ptid.
8509 (loaded_dll, pull_pid_from_list): Adjust.
8510 (add_process, remove_process, find_process_pid)
8511 (get_thread_process, current_process, initialize_inferiors): New.
8512 * target.h (struct thread_resume) <thread>: Change type to ptid_t.
8513 (struct target_waitstatus) <related_pid>: Ditto.
8514 (struct target_ops) <kill, detach>: Add `pid' argument. Change
8515 return type to int.
8516 (struct target_ops) <join>: Add `pid' argument.
8517 (struct target_ops) <thread_alive>: Change pid's type to ptid_t.
8518 (struct target_ops) <wait>: Add `ptid' field. Change return type
8519 to ptid.
8520 (kill_inferior, detach_inferior, join_inferior): Add `pid' argument.
8521 (mywait): Add `ptid' argument. Change return type to ptid_t.
8522 (target_pid_to_str): Declare.
8523 * target.c (set_desired_inferior): Adjust to use ptids.
8524 (mywait): Add new `ptid' argument. Adjust.
8525 (target_pid_to_str): New.
8526 * mem-break.h (free_all_breakpoints): Declare.
8527 * mem-break.c (breakpoints): Delelete.
8528 (set_breakpoint_at, delete_breakpoint, find_breakpoint_at)
8529 (check_mem_read, check_mem_write, delete_all_breakpoints): Adjust
8530 to use per-process breakpoint list.
8531 (free_all_breakpoints): New.
8532 * remote-utils.c (struct sym_cache) <name>: Drop `const'.
8533 (symbol_cache, all_symbols_looked_up): Delete.
8534 (hexchars): New.
8535 (ishex, unpack_varlen_hex, write_ptid, hex_or_minus_one,
8536 read_ptid): New.
8537 (prepare_resume_reply): Change ptid argument's type from unsigned
8538 long to ptid_t. Adjust. Implement W;process and X;process.
8539 (free_sym_cache, clear_symbol_cache): New.
8540 (look_up_one_symbol): Adjust to per-process symbol cache. *
8541 * server.c (cont_thread, general_thread, step_thread): Change type
8542 to ptid_t.
8543 (attached): Delete.
8544 (multi_process): New.
8545 (last_ptid): Change type to ptid_t.
8546 (struct vstop_notif) <ptid>: Change type to ptid_t.
8547 (queue_stop_reply, push_event): Change `ptid' argument's type to
8548 ptid_t.
8549 (discard_queued_stop_replies): Add `pid' argument.
8550 (start_inferior): Adjust to use ptids. Adjust to mywait interface
8551 changes. Don't reference the `attached' global.
8552 (attach_inferior): Adjust to mywait interface changes.
8553 (handle_query): Adjust to use ptids. Parse GDB's qSupported
8554 features. Handle and report "multiprocess+". Handle
8555 "qAttached:PID".
8556 (handle_v_cont): Adjust to use ptids. Adjust to mywait interface
8557 changes.
8558 (handle_v_kill): New.
8559 (handle_v_stopped): Adjust to use target_pid_to_str.
8560 (handle_v_requests): Allow multiple attaches and runs when
8561 multiprocess extensions are in effect. Handle "vKill".
8562 (myresume): Adjust to use ptids.
8563 (queue_stop_reply_callback): Add `arg' parameter. Handle it.
8564 (handle_status): Adjust to discard_queued_stop_replies interface
8565 change.
8566 (first_thread_of, kill_inferior_callback)
8567 (detach_or_kill_inferior_callback, join_inferiors_callback): New.
8568 (main): Call initialize_inferiors. Adjust to use ptids, killing
8569 and detaching from all inferiors. Handle multiprocess packet
8570 variants.
8571 * linux-low.h: Include gdb_proc_service.h.
8572 (struct process_info_private): New.
8573 (struct linux_target_ops) <pid_of>: Use ptid_get_pid.
8574 <lwpid_of>: Use ptid_get_lwp.
8575 (get_lwp_thread): Adjust.
8576 (struct lwp_info): Add `dead' member.
8577 (find_lwp_pid): Declare.
8578 * linux-low.c (thread_db_active): Delete.
8579 (new_inferior): Adjust comment.
8580 (inferior_pid): Delete.
8581 (linux_add_process): New.
8582 (handle_extended_wait): Adjust.
8583 (add_lwp): Change unsigned long to ptid.
8584 (linux_create_inferior): Add process to processes table. Adjust
8585 to use ptids. Don't set new_inferior here.
8586 (linux_attach_lwp): Rename to ...
8587 (linux_attach_lwp_1): ... this. Add `initial' argument. Handle
8588 it. Adjust to use ptids.
8589 (linux_attach_lwp): New.
8590 (linux_attach): Add process to processes table. Don't set
8591 new_inferior here.
8592 (struct counter): New.
8593 (second_thread_of_pid_p, last_thread_of_process_p): New.
8594 (linux_kill_one_lwp): Add `args' parameter. Handle it. Adjust to
8595 multiple processes.
8596 (linux_kill): Add `pid' argument. Handle it. Adjust to multiple
8597 processes. Remove process from process table.
8598 (linux_detach_one_lwp): Add `args' parameter. Handle it. Adjust
8599 to multiple processes.
8600 (any_thread_of): New.
8601 (linux_detach): Add `pid' argument, and handle it. Remove process
8602 from processes table.
8603 (linux_join): Add `pid' argument. Handle it.
8604 (linux_thread_alive): Change unsighed long argument to ptid_t.
8605 Consider dead lwps as not being alive.
8606 (status_pending_p): Rename `dummy' argument to `arg'. Filter out
8607 threads we're not interested in.
8608 (same_lwp, find_lwp_pid): New.
8609 (linux_wait_for_lwp): Change `pid' argument's type from int to
8610 ptid_t. Adjust.
8611 (linux_wait_for_event): Rename to ...
8612 (linux_wait_for_event_1): ... this. Change `pid' argument's type
8613 from int to ptid_t. Adjust.
8614 (linux_wait_for_event): New.
8615 (linux_wait_1): Add `ptid' argument. Change return type to
8616 ptid_t. Adjust. Use last_thread_of_process_p. Remove processes
8617 that exit from the process table.
8618 (linux_wait): Add `ptid' argument. Change return type to ptid_t.
8619 Adjust.
8620 (mark_lwp_dead): New.
8621 (wait_for_sigstop): Adjust to use ptids. If a process exits while
8622 stopping all threads, mark its main lwp as dead.
8623 (linux_set_resume_request, linux_resume_one_thread): Adjust to use
8624 ptids.
8625 (fetch_register, usr_store_inferior_registers)
8626 (regsets_fetch_inferior_registers)
8627 (regsets_store_inferior_registers, linux_read_memory)
8628 (linux_write_memory): Inline `inferior_pid'.
8629 (linux_look_up_symbols): Adjust to use per-process
8630 `thread_db_active'.
8631 (linux_request_interrupt): Adjust to use ptids.
8632 (linux_read_auxv): Inline `inferior_pid'.
8633 (initialize_low): Don't reference thread_db_active.
8634 * gdb_proc_service.h (struct ps_prochandle) <pid>: Remove.
8635 * proc-service.c (ps_lgetregs): Use find_lwp_pid.
8636 (ps_getpid): Return the pid of the current inferior.
8637 * thread-db.c (proc_handle, thread_agent): Delete.
8638 (thread_db_create_event, thread_db_enable_reporting): Adjust to
8639 per-process data.
8640 (find_one_thread): Change argument type to ptid_t. Adjust to
8641 per-process data.
8642 (maybe_attach_thread): Adjust to per-process data and ptids.
8643 (thread_db_find_new_threads): Ditto.
8644 (thread_db_init): Ditto.
8645 * spu-low.c (spu_create_inferior, spu_attach): Add process to
8646 processes table. Adjust to use ptids.
8647 (spu_kill, spu_detach): Adjust interface. Remove process from
8648 processes table.
8649 (spu_join, spu_thread_alive): Adjust interface.
8650 (spu_wait): Adjust interface. Remove process from processes
8651 table. Adjust to use ptids.
8652 * win32-low.c (current_inferior_tid): Delete.
8653 (current_inferior_ptid): New.
8654 (debug_event_ptid): New.
8655 (thread_rec): Take a ptid. Adjust.
8656 (child_add_thread): Add `pid' argument. Adjust to use ptids.
8657 (child_delete_thread): Ditto.
8658 (do_initial_child_stuff): Add `attached' argument. Add process to
8659 processes table.
8660 (child_fetch_inferior_registers, child_store_inferior_registers):
8661 Adjust.
8662 (win32_create_inferior): Pass 0 to do_initial_child_stuff.
8663 (win32_attach): Pass 1 to do_initial_child_stuff.
8664 (win32_kill): Adjust interface. Remove process from processes
8665 table.
8666 (win32_detach): Ditto.
8667 (win32_join): Adjust interface.
8668 (win32_thread_alive): Take a ptid.
8669 (win32_resume): Adjust to use ptids.
8670 (get_child_debug_event): Ditto.
8671 (win32_wait): Adjust interface. Remove exiting process from
8672 processes table.
8673
8674 2009-04-01 Pedro Alves <pedro@codesourcery.com>
8675
8676 Non-stop mode support.
8677
8678 * server.h (non_stop): Declare.
8679 (gdb_client_data, handler_func): Declare.
8680 (delete_file_handler, add_file_handler, start_event_loop):
8681 Declare.
8682 (handle_serial_event, handle_target_event, push_event)
8683 (putpkt_notif): Declare.
8684 * target.h (enum resume_kind): New.
8685 (struct thread_resume): Replace `step' field by `kind' field.
8686 (TARGET_WNOHANG): Define.
8687 (struct target_ops) <wait>: Add `options' argument.
8688 <supports_non_stop, async, start_non_stop>: New fields.
8689 (target_supports_non_stop, target_async): New.
8690 (start_non_stop): Declare.
8691 (mywait): Add `options' argument.
8692 * target.c (mywait): Add `options' argument. Print child exit
8693 notifications here.
8694 (start_non_stop): New.
8695 * server.c (non_stop, own_buf, mem_buf): New globals.
8696 (struct vstop_notif): New.
8697 (notif_queue): New global.
8698 (queue_stop_reply, push_event, discard_queued_stop_replies)
8699 (send_next_stop_reply): New.
8700 (start_inferior): Adjust to use resume_kind. Adjust to mywait
8701 interface changes.
8702 (attach_inferior): In non-stop mode, don't wait for the target
8703 here.
8704 (handle_general_set): Handle QNonStop.
8705 (handle_query): When handling qC, return the current general
8706 thread, instead of the first thread of the list.
8707 (handle_query): If the backend supports non-stop mode, include
8708 QNonStop+ in the qSupported query response.
8709 (handle_v_cont): Adjust to use resume_kind. Handle resume_stop
8710 and non-stop mode.
8711 (handle_v_attach, handle_v_run): Handle non-stop mode.
8712 (handle_v_stopped): New.
8713 (handle_v_requests): Report support for vCont;t. Handle vStopped.
8714 (myresume): Adjust to use resume_kind. Handle non-stop.
8715 (queue_stop_reply_callback): New.
8716 (handle_status): Handle non-stop mode.
8717 (main): Clear non_stop flag on reconnection. Use the event-loop.
8718 Refactor serial protocol handling from here ...
8719 (process_serial_event): ... to this new function. When GDB
8720 selects any thread, select one here. In non-stop mode, wait until
8721 GDB acks all pending events before exiting.
8722 (handle_serial_event, handle_target_event): New.
8723 * remote-utils.c (remote_open): Install remote_desc in the event
8724 loop.
8725 (remote_close): Remove remote_desc from the event loop.
8726 (putpkt_binary): Rename to...
8727 (putpkt_binary_1): ... this. Add `is_notic' argument. Handle it.
8728 (putpkt_binary): New as wrapper around putpkt_binary_1.
8729 (putpkt_notif): New.
8730 (prepare_resume_reply): In non-stop mode, don't change the
8731 general_thread.
8732 * event-loop.c: New.
8733 * Makefile.in (OBJ): Add event-loop.o.
8734 (event-loop.o): New rule.
8735
8736 * linux-low.h (pid_of): Moved here.
8737 (lwpid_of): New.
8738 (get_lwp_thread): Use lwpid_of.
8739 (struct lwp_info): Delete `lwpid' field. Add `suspended' field.
8740 * linux-low.c (pid_of): Delete.
8741 (inferior_pid): Use lwpid_of.
8742 (linux_event_pipe): New.
8743 (target_is_async_p): New.
8744 (delete_lwp): New.
8745 (handle_extended_wait): Use lwpid_of.
8746 (add_lwp): Don't set lwpid field.
8747 (linux_attach_lwp): Adjust debug output. Use lwpid_of.
8748 (linux_kill_one_lwp): If killing a running lwp, stop it first.
8749 Use lwpid_of. Adjust to linux_wait_for_event interface changes.
8750 (linux_detach_one_lwp): If detaching from a running lwp, stop it
8751 first. Adjust to linux_wait_for_event interface changes. Use
8752 lwpid_of.
8753 (linux_detach): Don't delete the main lwp here.
8754 (linux_join): Use my_waitpid. Avoid signal_pid. Use lwpid_of.
8755 (status_pending_p): Don't consider explicitly suspended lwps.
8756 (linux_wait_for_lwp): Take an integer pid instead of a lwp_info
8757 pointer. Add OPTIONS argument. Change return type to int. Use
8758 my_waitpid instead of sleeping. Handle WNOHANG. Use lwpid_of.
8759 (linux_wait_for_event): Take an integer pid instead of a lwp_info
8760 pointer. Add status pointer argument. Return a pid instead of a
8761 status. Use lwpid_of. Adjust to linux_wait_for_lwp interface
8762 changes. In non-stop mode, don't switch to a random thread.
8763 (linux_wait): Rename to...
8764 (linux_wait_1): ... this. Add target_options argument, and handle
8765 it. Adjust to use resume_kind. Use lwpid_of. In non-stop mode,
8766 don't handle the continue thread. Handle TARGET_WNOHANG. Merge
8767 clean exit and signal exit code. Don't stop all threads in
8768 non-stop mode. In all-stop mode, only stop all threads when
8769 reporting a stop to GDB. Handle explicit thread stop requests.
8770 (async_file_flush, async_file_mark): New.
8771 (linux_wait): New.
8772 (send_sigstop): Use lwpid_of.
8773 (wait_for_sigstop): Use lwpid_of. Adjust to linux_wait_for_event
8774 interface changes. In non-stop mode, don't switch to a random
8775 thread.
8776 (linux_resume_one_lwp): Use lwpid_of.
8777 (linux_continue_one_thread, linux_queue_one_thread): Merge into ...
8778 (linux_resume_one_thread): ... this. Handle resume_stop. In
8779 non-stop mode, don't look for pending flag in all threads.
8780 (resume_status_pending_p): Don't consider explicitly suspended
8781 threads.
8782 (my_waitpid): Reimplement. Emulate __WALL.
8783 (linux_request_interrupt, linux_read_offsets, linux_xfer_siginfo):
8784 Use lwpid_of.
8785 (sigchld_handler, linux_supports_non_stop, linux_async)
8786 (linux_start_non_stop): New.
8787 (linux_target_ops): Register linux_supports_non_stop, linux_async
8788 and linux_start_non_stop.
8789 (initialize_low): Install SIGCHLD handler.
8790 * thread-db.c (thread_db_create_event, find_one_thread)
8791 (thread_db_get_tls_address): Use lwpid_of.
8792 * win32-low.c (win32_detach): Adjust to use resume_kind.
8793 (win32_wait): Add `options' argument.
8794 * spu-low.c (spu_resume): Adjust to use resume_kind.
8795 (spu_wait): Add `options' argument.
8796
8797 2009-04-01 Pedro Alves <pedro@codesourcery.com>
8798
8799 Decouple target code from remote protocol.
8800
8801 * target.h (enum target_waitkind): New.
8802 (struct target_waitstatus): New.
8803 (struct target_ops) <wait>: Return an unsigned long. Take a
8804 target_waitstatus pointer instead of a char pointer.
8805 (mywait): Likewise.
8806 * target.c (mywait): Change prototype to return an unsigned long.
8807 Take a target_waitstatus pointer instead of a char pointer. Adjust.
8808 * server.h (thread_from_wait, old_thread_from_wait): Delete
8809 declarations.
8810 (prepare_resume_reply): Change prototype to take a
8811 target_waitstatus.
8812 * server.c (thread_from_wait, old_thread_from_wait): Delete.
8813 (last_status, last_ptid): New.
8814 (start_inferior): Remove "statusptr" argument. Adjust. Return a
8815 pid instead of a signal.
8816 (attach_inferior): Remove "status" and "signal" parameters.
8817 Adjust.
8818 (handle_query): For qGetTLSAddr, parse the thread id with strtol,
8819 not as an address.
8820 (handle_v_cont, handle_v_attach, handle_v_run, handle_v_kill)
8821 (handle_v_requests, myresume): Remove "status" and "signal"
8822 parameters. Adjust.
8823 (handle_status): New.
8824 (main): Delete local `status'. Adjust.
8825 * remote-utils.c: Include target.h.
8826 (prepare_resume_reply): Change prototype to take a
8827 target_waitstatus. Adjust.
8828
8829 * linux-low.c (linux_wait): Adjust to new target_ops->wait
8830 interface.
8831 * spu-low.c (spu_wait): Adjust.
8832 * win32-low.c (enum target_waitkind, struct target_waitstatus):
8833 Delete.
8834 (win32_wait): Adjust.
8835
8836 2009-04-01 Pedro Alves <pedro@codesourcery.com>
8837
8838 * target.h (struct thread_resume): Delete leave_stopped member.
8839 (struct target_ops): Add a `n' argument to the `resume' callback.
8840 * server.c (start_inferior): Adjust.
8841 (handle_v_cont, myresume): Adjust.
8842 * linux-low.c (check_removed_breakpoint): Adjust to resume
8843 interface change, and to removed leave_stopped field.
8844 (resume_ptr): Delete.
8845 (struct thread_resume_array): New.
8846 (linux_set_resume_request): Add new `arg' parameter. Adjust to
8847 resume interface change.
8848 (linux_continue_one_thread, linux_queue_one_thread)
8849 (resume_status_pending_p): Check if the resume field is NULL
8850 instead of checking the leave_stopped member.
8851 (linux_resume): Adjust to the target resume interface change.
8852 * spu-low.c (spu_resume): Adjust to the target resume interface
8853 change.
8854 * win32-low.c (win32_detach, win32_resume): Ditto.
8855
8856 2009-04-01 Pedro Alves <pedro@codesourcery.com>
8857
8858 * linux-low.c (linux_wait_for_event): Don't clear the `stepping'
8859 flag.
8860 (wait_for_sigstop): Don't leave a finished single-step SIGTRAP
8861 pending.
8862 (linux_continue_one_thread): Only preserve the stepping flag if
8863 there's a pending breakpoint.
8864
8865 2009-03-31 Pedro Alves <pedro@codesourcery.com>
8866
8867 * server.c (main): After the inferior having exited, call
8868 remote_close before exiting gdbserver.
8869
8870 2009-03-25 Thiago Jung Bauermann <bauerman@br.ibm.com>
8871
8872 Fix size of FPSCR in Power 7 processors.
8873 * linux-ppc-low.c (PPC_FEATURE_ARCH_2_05): Remove #define.
8874 (PPC_FEATURE_HAS_DFP): New #define.
8875 (ppc_arch_setup): Check for DFP feature instead of ISA 2.05 to decide on
8876 size of the FPSCR.
8877
8878 2009-03-23 Pedro Alves <pedro@codesourcery.com>
8879
8880 * server.c (handle_query) Whitespace and formatting.
8881
8882 2009-03-22 Pedro Alves <pedro@codesourcery.com>
8883
8884 * i387-fp.c, linux-arm-low.c, linux-cris-low.c,
8885 linux-crisv32-low.c, linux-i386-low.c, linux-low.c,
8886 linux-mips-low.c, linux-s390-low.c, linux-sparc-low.c,
8887 linux-x86-64-low.c, linux-xtensa-low.c, proc-service.c,
8888 regcache.c, remote-utils.c, server.c, spu-low.c, target.h,
8889 thread-db.c, win32-low.c, xtensa-xtregs.c, gdbreplay.c,
8890 Makefile.in, configure.ac: Fix whitespace throughout.
8891 * configure: Regenerate.
8892
8893 2009-03-22 Pedro Alves <pedro@codesourcery.com>
8894
8895 * inferiors.c (find_inferior): Make it safe for the callback
8896 function to delete the currently iterated inferior.
8897
8898 2009-03-22 Pedro Alves <pedro@codesourcery.com>
8899
8900 * Makefile.in (linuw_low_h): Move higher.
8901 (thread-db.o): Depend on $(linux_low_h).
8902
8903 2009-03-17 Pedro Alves <pedro@codesourcery.com>
8904
8905 Rename "process" to "lwp" throughout.
8906
8907 * linux-low.c (all_processes): Rename to...
8908 (all_lwps): ... this.
8909 (inferior_pid, handle_extended_wait, get_stop_pc): Adjust.
8910 (add_process): Rename to ...
8911 (add_lwp): ... this. Adjust.
8912 (linux_create_inferior): Adjust.
8913 (linux_attach_lwp): Adjust.
8914 (linux_attach): Adjust.
8915 (linux_kill_one_process): Rename to ...
8916 (linux_kill_one_lwp): ... this. Adjust.
8917 (linux_kill): Adjust.
8918 (linux_detach_one_process): Rename to ...
8919 (linux_detach_one_lwp): ... this. Adjust.
8920 (linux_detach): Adjust.
8921 (check_removed_breakpoint): Adjust.
8922 (status_pending_p): Adjust.
8923 (linux_wait_for_process): Rename to ...
8924 (linux_wait_for_lwp): ... this. Adjust.
8925 (linux_wait_for_event): Adjust.
8926 (send_sigstop): Adjust.
8927 (wait_for_sigstop): Adjust.
8928 (stop_all_processes): Rename to ...
8929 (stop_all_lwps): ... this.
8930 (linux_resume_one_process): Rename to ...
8931 (linux_resume_one_lwp): ... this. Adjust.
8932 (linux_set_resume_request, linux_continue_one_thread)
8933 (linux_queue_one_thread, resume_status_pending_p)
8934 (usr_store_inferior_registers, regsets_store_inferior_registers)
8935 (linux_request_interrupt, linux_read_offsets, linux_xfer_siginfo):
8936 Adjust.
8937 * linux-low.h (get_process): Rename to ...
8938 (get_lwp): ... this. Adjust.
8939 (get_thread_process): Rename to ...
8940 (get_thread_lwp): ... this. Adjust.
8941 (get_process_thread): Rename to ...
8942 (get_lwp_thread): ... this. Adjust.
8943 (struct process_info): Rename to ...
8944 (struct lwp_info): ... this.
8945 (all_processes): Rename to ...
8946 (all_lwps): ... this.
8947 * proc-service.c (ps_lgetregs): Adjust.
8948 * thread-db.c (thread_db_create_event, find_one_thread)
8949 (maybe_attach_thread, thread_db_get_tls_address): Adjust.
8950
8951 2009-03-14 Pedro Alves <pedro@codesourcery.com>
8952
8953 * server.c (handle_query): Handle "qAttached".
8954
8955 2009-03-13 Nathan Sidwell <nathan@codesourcery.com>
8956
8957 * Makefile.in, hostio-errno.c, errno.c, xtensa-xtregs.c: Change to
8958 GPLv3, update license URL.
8959
8960 2009-03-01 Doug Evans <dje@google.com>
8961
8962 * Makefile.in (INCLUDE_CFLAGS): Add -I$(srcdir)/../common.
8963 (server_h): Add gdb_signals.h.
8964 (signals.o): Update.
8965 * server.h (target_signal_from_host,target_signal_to_host_p)
8966 (target_signal_to_host,target_signal_to_name): Moved to gdb_signals.h.
8967
8968 2009-02-14 Pierre Muller <muller@ics.u-strasbg.fr>
8969
8970 * remote-utils.c (getpkt): Also generate remote-debug
8971 information if noack_mode is set.
8972
8973 2009-02-06 Pedro Alves <pedro@codesourcery.com>
8974
8975 * server.c (handle_query): Report qXfer:siginfo:read and
8976 qXfer:siginfo:write as supported and handle them.
8977 * target.h (struct target_ops) <qxfer_siginfo>: New field.
8978 * linux-low.c (linux_xfer_siginfo): New.
8979 (linux_target_ops): Set it.
8980
8981 2009-01-26 Pedro Alves <pedro@codesourcery.com>
8982
8983 * server.c (gdbserver_usage): Mention --remote-debug.
8984 (main): Accept '--remote-debug' switch.
8985
8986 2009-01-18 Doug Evans <dje@google.com>
8987
8988 * regcache.c (new_register_cache): No need to check result of xcalloc.
8989 * server.c (handle_search_memory): Back out calls to xmalloc,
8990 result is checked and error is returned to user upon failure.
8991 (handle_query): Ditto. Add more checks for result of malloc.
8992 (handle_v_cont): Check result of malloc, report error back to
8993 user upon failure.
8994 (handle_v_run): Ditto. Call freeargv.
8995 * server.h (freeargv): Declare.
8996 * utils.c (freeargv): New fn.
8997
8998 2009-01-15 Doug Evans <dje@google.com>
8999
9000 * gdbreplay.c (perror_with_name): Make arg const char *.
9001 * server.h (target_signal_to_name): Make return type const char *.
9002 * thread-db.c (thread_db_err_str): Make return type const char *.
9003 * utils.c (perror_with_name): Make arg const char *.
9004
9005 2009-01-14 Pedro Alves <pedro@codesourcery.com>
9006
9007 * win32-low.c (get_child_debug_event): Issue a final DBG_CONTINUE
9008 when handling a EXIT_PROCESS_DEBUG_EVENT.
9009
9010 2009-01-06 Joel Brobecker <brobecker@adacore.com>
9011
9012 * gdbreplay.c (gdbreplay_version): Update copyright year.
9013 * server.c (gdbserver_version): Likewise.
9014
9015 2009-01-05 Doug Evans <dje@google.com>
9016
9017 * linux-low.c (linux_attach_lwp): Add some comments/fixmes.
9018 (handle_extended_wait): Improve comment.
9019
9020 2008-12-13 Doug Evans <dje@google.com>
9021
9022 * utils.c (xmalloc,xcalloc,xstrdup): New fns.
9023 * server.h (ATTR_MALLOC): New macro.
9024 (xmalloc,xcalloc,xstrdup): Declare.
9025 * hostio.c: Replace malloc,calloc,strdup with xmalloc,xcalloc,xstrdup.
9026 * inferiors.c: Ditto.
9027 * linux-low.c: Ditto.
9028 * mem-break.c: Ditto.
9029 * regcache.c: Ditto.
9030 * remote-utils.c: Ditto.
9031 * server.c: Ditto.
9032 * target.c: Ditto.
9033 * win32-low.c: Ditto.
9034
9035 2008-12-12 Doug Evans <dje@google.com>
9036
9037 * linux-low.c (linux_wait_for_process): Don't clobber current_inferior
9038 in debugging printf.
9039
9040 * linux-low.c (handle_extended_wait): Simplify, use my_waitpid.
9041
9042 2008-12-09 Doug Evans <dje@google.com>
9043
9044 * linux-low.h (struct process_info): Delete member tid, unused.
9045 * thread-db.c (find_one_thread): Update.
9046 (maybe_attach_thread): Update.
9047
9048 2008-12-02 Pedro Alves <pedro@codesourcery.com>
9049
9050 * target.h (struct target_ops): Add qxfer_osdata member.
9051 * linux-low.c: Include ctype.h and pwd.h and sys/types.h
9052 and dirent.h.
9053 (linux_qxfer_osdata): New functions.
9054 (linux_target_ops): Register linux_qxfer_osdata as qxfer_osdata
9055 callback.
9056 * server.c (handle_query): Handle "qXfer:osdata:read:".
9057 * remote-utils.c (buffer_grow, buffer_free, buffer_init, buffer_finish)
9058 (buffer_xml_printf): New functions.
9059 * server.h (struct buffer): New.
9060 (buffer_grow_str, buffer_grow_str0): New macros.
9061 (buffer_grow, buffer_free, buffer_init, buffer_finish)
9062 (buffer_xml_printf): Declare.
9063
9064 2008-11-24 Doug Evans <dje@google.com>
9065
9066 * Makefile.in (VERSION,DIST,LINT,LINTFLAGS): Delete, unused.
9067
9068 2008-11-24 Daniel Jacobowitz <dan@codesourcery.com>
9069
9070 * server.c (handle_v_run): Always use the supplied argument list.
9071
9072 2008-11-19 Bob Wilson <bob.wilson@acm.org>
9073
9074 * xtensa-xtregs.c (XTENSA_ELF_XTREG_SIZE): Change to 4.
9075 (xtensa_regmap_table): Add entry for scompare1.
9076
9077 2008-11-18 Thiago Jung Bauermann <bauerman@br.ibm.com>
9078
9079 * Makefile.in (powerpc-isa205-32l.o, powerpc-isa205-32l.c,
9080 powerpc-isa205-altivec32l.o, powerpc-isa205-altivec32l.c,
9081 powerpc-isa205-vsx32l.o, powerpc-isa205-vsx32l.c,
9082 powerpc-isa205-64l.o, powerpc-isa205-64l.c,
9083 powerpc-isa205-altivec64l.o, powerpc-isa205-altivec64l.c,
9084 powerpc-isa205-vsx64l.o, powerpc-isa205-vsx64l.c): New targets.
9085 * configure.srv (powerpc*-*-linux*): Add ISA 2.05 object files and
9086 XML target descriptions.
9087 * linux-ppc-low.c (ppc_arch_setup): Init registers with 64-bit FPSCR
9088 when inferior is running on an ISA 2.05 or later processor. Add
9089 special case to return offset for full 64-bit slot of FPSCR when
9090 in 32-bits.
9091
9092 2008-11-14 Daniel Gutson <dgutson@codesourcery.com>
9093
9094 * Makefile.in (SFILES, clean): Added sparc64 files.
9095 (reg-sparc64.o, reg-sparc64.c): New.
9096 * configure.srv (sparc*-*-linux*): New configuration.
9097 * linux-low.c (regsets_fetch_inferior_registers): Swap ptrace
9098 syscall arguments for SPARC.
9099 (regsets_store_inferior_registers): Likewise.
9100 * linux-sparc-low.c: New file.
9101
9102 2008-10-21 Doug Evans <dje@google.com>
9103
9104 * Makefile.in (BFD_DIR,BFD,BFD_SRC,BFD_CFLAGS): Delete.
9105 (READLINE_DIR,READLINE_DEP): Delete.
9106 (INTERNAL_CFLAGS): Update.
9107 (LINTFLAGS): Update.
9108
9109 2008-10-10 Pedro Alves <pedro@codesourcery.com>
9110
9111 * server.c (handle_v_run): If GDB didn't specify an argv, use the
9112 whole argv from the last run, not just argv[0].
9113
9114 2008-09-08 Pedro Alves <pedro@codesourcery.com>
9115
9116 * regcache.c (new_register_cache): Return NULL if the register
9117 cache size isn't known yet.
9118 (free_register_cache): Avoid dereferencing a NULL regcache.
9119
9120 2008-09-04 Daniel Jacobowitz <dan@codesourcery.com>
9121
9122 * configure.srv: Merge MIPS and MIPS64.
9123
9124 2008-08-24 Maciej W. Rozycki <macro@linux-mips.org>
9125
9126 * Makefile.in (uninstall): Apply $(EXEEXT) too.
9127
9128 2008-08-18 Luis Machado <luisgpm@br.ibm.com>
9129
9130 * Makefile.in: Add required vsx dependencies.
9131
9132 * linux-ppc-low: Define PPC_FEATURE_HAS_VSX.
9133 Declare init_registers_powerpc_vsx32l.
9134 Declare init_registers_powerpc_vsx64l.
9135 Define PTRACE_GETVSXREGS and PTRACE_SETVSXREGS.
9136 (ppc_arch_setup): Check for VSX in hwcap.
9137 (ppc_fill_vsxregset): New function.
9138 (ppc_store_vsxregset): New function.
9139 Add new VSX entry in regset_info target_regsets.
9140
9141 * configure.srv: Add new VSX dependencies.
9142
9143 2008-08-12 Pedro Alves <pedro@codesourcery.com>
9144
9145 * remote-utils.c (noack_mode, transport_is_reliable): New globals.
9146 (remote_open): Set or clear transport_is_reliable.
9147 (putpkt_binary): Don't expect acks in noack mode.
9148 (getpkt): Don't send ack/nac in noack mode.
9149 * server.c (handle_general_set): Handle QStartNoAckMode.
9150 (handle_query): If connected by tcp pass QStartNoAckMode+ in
9151 qSupported.
9152 (main): Reset noack_mode on every connection.
9153 * server.h (noack_mode): Declare.
9154
9155 2008-08-07 Ralf Wildenhues <Ralf.Wildenhues@gmx.de>
9156
9157 * Makefile.in (GDBREPLAY_OBS): New variable.
9158 (gdbreplay$(EXEEXT)): Use it to avoid unportable $^.
9159
9160 2008-08-05 Ulrich Weigand <uweigand@de.ibm.com>
9161 Daniel Jacobowitz <dan@codesourcery.com>
9162
9163 * linux-low.c (linux_resume_one_process): Ignore ESRCH.
9164 (usr_store_inferior_registers): Likewise.
9165 (regsets_store_inferior_registers): Likewise.
9166
9167 2008-07-31 Rolf Jansen <rj@surtec.com>
9168 Pedro Alves <pedro@codesourcery.com>
9169
9170 * configure.ac: Check for memmem declaration.
9171 * server.c [HAVE_MALLOC_H]: Include malloc.h.
9172 (disable_packet_vCont, disable_packet_Tthread, disable_packet_qC)
9173 (disable_packet_qfThreadInfo): Unconditionally compile.
9174 * server.h [!HAVE_DECL_MEMMEM]: Declare memmem.
9175 * configure, config.in: Regenerate.
9176
9177 2008-07-28 Doug Kwan <dougkwan@google.com>
9178
9179 * linux-low.c (sys/dir.h, sys/user.h): Remove includes.
9180 (linux_write_memory): Remove declaration of errno.
9181
9182 2008-07-12 Ulrich Weigand <uweigand@de.ibm.com>
9183
9184 * linux-low.c (handle_extended_wait): Do not use "status"
9185 variable uninitialized.
9186
9187 2008-07-07 Pedro Alves <pedro@codesourcery.com>
9188
9189 * server.c (handle_v_attach): Inhibit reporting dll changes.
9190
9191 2008-06-27 Pedro Alves <pedro@codesourcery.com>
9192
9193 * remote-utils.c (prepare_resume_reply): If requested, don't
9194 output "thread:TID" in the T stop reply.
9195
9196 * server.c (disable_packet_vCont, disable_packet_Tthread)
9197 (disable_packet_qC, disable_packet_qfThreadInfo): New globals.
9198 (handle_query): If requested, disable support for qC, qfThreadInfo
9199 and qsThreadInfo.
9200 (handle_v_requests): If requested, disable support for vCont.
9201 (gdbserver_show_disableable): New.
9202 (main): Handle --disable-packet and --disable-packet=LIST.
9203
9204 * server.h (disable_packet_vCont, disable_packet_Tthread)
9205 (disable_packet_qC, disable_packet_qfThreadInfo): Declare.
9206
9207 2008-06-20 Carlos O'Donell <carlos@codesourcery.com>
9208
9209 * server.c (gdbserver_usage): Mention --version.
9210
9211 2008-06-06 Daniel Jacobowitz <dan@codesourcery.com>
9212
9213 * Makefile.in (gdbreplay.o): New rule.
9214
9215 2008-06-06 Joseph Myers <joseph@codesourcery.com>
9216
9217 * gdbreplay.c (gdbreplay_version): Say gdbreplay in version
9218 message, not gdbserver.
9219
9220 2008-06-05 Vladimir Prus <vladimir@codesourcery.com>
9221 Nathan Sidwell <nathan@codesourcery.com>
9222 Joseph Myers <joseph@codesourcery.com>
9223
9224 * acinclude.m4: Include ../../config/acx.m4.
9225 * configure.ac: Use ACX_PKGVERSION and ACX_BUGURL.
9226 * configure, config.in: Regenerate.
9227 * Makefile.in (gdbreplay$(EXEEXT)): Add version.o.
9228 * server.c (gdbserver_version): Print PKGVERSION.
9229 (gdbsrever_usage): Add stream parameter. Print REPORT_BUGS_TO.
9230 (main): Adjust gdbserver_usage calls.
9231 * gdbreplay.c (version, host_name): Add declarations.
9232 (gdbreplay_version, gdbreplay_usage): New.
9233 (main): Accept --version and --help options.
9234
9235 2008-06-04 Daniel Jacobowitz <dan@codesourcery.com>
9236
9237 * linux-arm-low.c (thumb_breakpoint, thumb_breakpoint_len): New.
9238 (arm_breakpoint_at): Handle Thumb.
9239 (the_low_target): Add comment.
9240
9241 2008-05-29 Ulrich Weigand <uweigand@de.ibm.com>
9242
9243 * linux-ppc-low.c (ppc_collect_ptrace_register): Clear buffer.
9244
9245 2008-05-09 Doug Evans <dje@google.com>
9246
9247 * server.h (decode_search_memory_packet): Declare.
9248 * remote-utils.c (decode_search_memory_packet): New fn.
9249 * server.c (handle_search_memory_1): New fn.
9250 (handle_search_memory): New fn.
9251 (handle_query): Process qSearch:memory packets.
9252
9253 2008-05-08 Ulrich Weigand <uweigand@de.ibm.com>
9254
9255 * regcache.c (registers_length): Remove.
9256 (set_register_cache): Verify that PBUFSIZ is large enough to hold a
9257 full register packet.
9258 * regcache.h (registers_length): Remove prototype.
9259 * server.h (PBUFSIZ): Define to 16384.
9260
9261 2008-05-03 Ulrich Weigand <uweigand@de.ibm.com>
9262
9263 * configure.srv (powerpc*-*-linux*): Set srv_regobj to
9264 powerpc-32l.o, powerpc-altivec32l.o, powerpc-e500l.o,
9265 powerpc-64l.o, and powerpc-altivec64l.o.
9266 Remove rs6000/powerpc-32.xml, rs6000/powerpc-64.xml, and
9267 rs6000/powerpc-e500.xml; add rs6000/powerpc-32l.xml,
9268 rs6000/powerpc-altivec32l.xml, rs6000/powerpc-e500l.xml,
9269 rs6000/powerpc-64l.xml, rs6000/powerpc-altivec64l.xml,
9270 rs6000/power-linux.xml, and rs6000/power64-linux.xml
9271 to srv_xmlfiles.
9272
9273 * Makefile.in (reg-ppc.o, reg-ppc.c): Remove, replace by ...
9274 (powerpc-32l.o, powerpc-32l.c): ... these new rules.
9275 (powerpc-32.o, powerpc-32.c): Remove, replace by ...
9276 (powerpc-altivec32l.o, powerpc-altivec32l.c): ... these new rules.
9277 (powerpc-e500.o, powerpc-e500.c): Remove, replace by ...
9278 (powerpc-e500l.o, powerpc-e500l.c): ... these new rules.
9279 (reg-ppc64.o, reg-ppc64.c): Remove, replace by ...
9280 (powerpc-64l.o, powerpc-64l.c): ... these new rules.
9281 (powerpc-64.o, powerpc-64.c): Remove, replace by ...
9282 (powerpc-altivec64l.o, powerpc-altivec64l.c): ... these new rules.
9283 (clean): Update.
9284
9285 * linux-ppc-low.c (init_registers_ppc): Remove, replace by ...
9286 (init_registers_powerpc_32l): ... this new prototype.
9287 (init_registers_powerpc_32): Remove, replace by ...
9288 (init_registers_powerpc_altivec32l): ... this new prototype.
9289 (init_registers_powerpc_e500): Remove, replace by ...
9290 (init_registers_powerpc_e500l): ... this new prototype.
9291 (init_registers_ppc64): Remove, replace by ...
9292 (init_registers_powerpc_64l): ... this new prototype.
9293 (init_registers_powerpc_64): Remove, replace by ...
9294 (init_registers_powerpc_altivec64l): ... this new prototype.
9295 (ppc_num_regs): Set to 73.
9296 (PT_ORIG_R3, PT_TRAP): Define if necessary.
9297 (ppc_regmap, ppc_regmap_e500): Add values for orig_r3 and trap.
9298 (ppc_cannot_store_register): Handle orig_r3 and trap.
9299 (ppc_arch_setup): Update init_registers_... calls.
9300 (ppc_fill_gregset): Handle orig_r3 and trap.
9301
9302 * inferiors.c (clear_inferiors): Reset current_inferior.
9303
9304 2008-04-23 Paolo Bonzini <bonzini@gnu.org>
9305
9306 * acinclude.m4: Add override.m4.
9307 * configure: Regenerate.
9308
9309 2008-04-21 Ulrich Weigand <uweigand@de.ibm.com>
9310
9311 * linux-ppc-low.c (ppc_arch_setup): Reset ppc_hwcap after the
9312 initial call to init_register_ppc64.
9313
9314 2008-04-21 Ulrich Weigand <uweigand@de.ibm.com>
9315
9316 * configure.srv (powerpc64-*-linux*, powerpc-*-linux*): Merge into
9317 single powerpc*-*-linux* case.
9318 (s390-*-linux*, s390x-*-linux*): Merge into single s390*-*-linux* case.
9319
9320 2008-04-17 Ulrich Weigand <uweigand@de.ibm.com>
9321
9322 * configure.srv [powerpc64-*-linux*]: Remove powerpc-e500.o from
9323 srv_regobj. Remove rs6000/powerpc-e500.xml and rs6000/power-spe.xml
9324 from reg_xmlfiles.
9325 * linux-ppc-low.c: Include <elf.h>.
9326 (PPC_FEATURE_HAS_ALTIVEC, PPC_FEATURE_HAS_SPE): Define.
9327 (ppc_hwcap): New global variable.
9328 (ppc_regmap): Remove __SPE__ #ifdef sections.
9329 (ppc_regmap_e500): New global variable.
9330 (ppc_cannot_store_register): Update __SPE__ special case.
9331 (ppc_get_hwcap): New function.
9332 (ppc_arch_setup): Use it to determine whether inferior supports
9333 AltiVec or SPE registers. Set the_low_target.regmap if appropriate.
9334 (ppc_fill_vrregset, ppc_store_vrregset): Define unconditionally.
9335 Do not access registers if target does not support AltiVec.
9336 (ppc_fill_evrregset, ppc_store_evrregset): Define unconditionally.
9337 Do not access registers if target does not support SPE.
9338 (target_regsets): Unconditionally include AltiVec and SPE regsets.
9339
9340 2008-04-17 Daniel Jacobowitz <dan@codesourcery.com>
9341
9342 * linux-low.c (disabled_regsets, num_regsets): New.
9343 (use_regsets_p): Delete.
9344 (linux_wait_for_process): Clear disabled_regsets.
9345 (regsets_fetch_inferior_registers): Check and set it.
9346 (regsets_store_inferior_registers): Likewise.
9347 (linux_fetch_registers, linux_store_registers): Do not use
9348 use_regsets_p.
9349 (initialize_low): Allocate disabled_regsets.
9350
9351 2008-04-14 Daniel Jacobowitz <dan@codesourcery.com>
9352
9353 * Makefile.in (LIBOBJS): New.
9354 (OBS): Use LIBOBJS.
9355 (memmem.o): New rule.
9356 * configure.ac: Use AC_CONFIG_LIBOBJ_DIR and check for memmem.
9357 * configure: Regenerated.
9358
9359 2008-04-04 Ulrich Weigand <uweigand@de.ibm.com>
9360
9361 * server.c (handle_query): Never return "unsupported" for
9362 qXfer:features:read queries.
9363
9364 2008-03-27 Ulrich Weigand <uweigand@de.ibm.com>
9365
9366 * server.c (get_features_xml): Fix inverted condition.
9367 (handle_query): Always support qXfer:feature:read.
9368
9369 2008-03-10 Daniel Jacobowitz <dan@codesourcery.com>
9370
9371 * server.c (wrapper_argv): New.
9372 (start_inferior): Handle wrapper_argv. If set, expect an extra
9373 trap.
9374 (gdbserver_usage): Document --wrapper.
9375 (main): Parse --wrapper.
9376
9377 2008-02-28 Ulrich Weigand <uweigand@de.ibm.com>
9378
9379 * configure.srv [powerpc64-*-linux*]: Add all files mentioned for
9380 powerpc-*-linux* to srv_regobj and reg_xmlfiles.
9381 * linux-ppc-low.c (ppc_get_pc): Support bi-arch operation.
9382 (ppc_set_pc): Likewise.
9383 (ppc_arch_setup): New function.
9384 (ppc_fill_gregset): Call ppc_collect_ptrace_register instead
9385 of collect_register.
9386 (the_low_target): Use ppc_arch_setup as arch_setup initializer.
9387
9388 2008-02-28 Ulrich Weigand <uweigand@de.ibm.com>
9389
9390 * configure.srv [powerpc64-*-linux*]: Use linux-ppc-low.o
9391 instead of linux-ppc64-low.o.
9392 * linux-ppc64-low.c: Remove file.
9393 * Makefile.in (SFILES): Remove linux-ppc64-low.c.
9394 (linux-ppc64-low.o): Remove rule.
9395
9396 * linux-ppc-low.c (init_registers_ppc64): Add prototype.
9397 (init_registers_powerpc_64): Likewise.
9398 (ppc_regmap): Conditionally define depending on __powerpc64__.
9399 (ppc_cannot_store_register): Do not special-case "fpscr" when
9400 compiled on __powerpc64__.
9401 (ppc_collect_ptrace_register): New function.
9402 (ppc_supply_ptrace_register): New function.
9403 (ppc_breakpoint): Change type to "unsigned int".
9404 (ppc_breakpoint_at): Change type of "insn" to "unsigned int".
9405 (the_low_target): Conditionally provide initializers for the
9406 arch_setup member depending on __powerpc64__. Install
9407 collect_ptrace_register and supply_ptrace_register members.
9408
9409 2008-02-28 Ulrich Weigand <uweigand@de.ibm.com>
9410
9411 * regcache.h (gdbserver_xmltarget): Add extern declaration.
9412 * server.c (gdbserver_xmltarget): Define.
9413 (get_features_xml): Use it to replace "target.xml" and arch_string.
9414
9415 * configure.srv: Remove srv_xmltarget. Add XML files that were
9416 mentioned there to srv_xmlfiles instead. Remove conditional tests
9417 on gdb_cv_arm_iwmmxt, gdb_cv_ppc_altivec, gdb_cv_ppc_spe; set
9418 srv_xmlfiles and srv_regobj to include all possible choices.
9419 * configure.ac (srv_xmltarget): Remove.
9420 (srv_xmlfiles): Do not add "target.xml".
9421 (gdb_cv_arm_iwmmxt, gdb_cv_ppc_altivec, gdb_cv_ppc_spe): Remove
9422 checks for supplementary target information.
9423 * configure: Regenerate.
9424 * Makefile.in (XML_TARGET): Remove.
9425 (target.xml): Remove rule.
9426 (clean): Do not clean up target.xml.
9427 (.PRECIOUS): Do not mention target.xml.
9428
9429 * target.h (struct target_ops): Remove arch_string member.
9430 * linux-low.c (linux_arch_string): Remove.
9431 (linux_target_ops): Remove arch_string initializer.
9432 * linux-low.h (struct linux_target_ops): Remove arch_string member.
9433 * linux-i386-low.c (the_low_target): Remove arch_string initializer.
9434 * linux-x86-64-low.c (the_low_target): Remove arch_string initializer.
9435 * spu-low.c (spu_arch_string): Remove.
9436 (spu_target_ops): Remove arch_string initializer.
9437 * win32-low.c (win32_arch_string): Remove.
9438 (win32_target_ops): Remove arch_string initializer.
9439 * win32-low.h (struct win32_target_ops): Remove arch_string member.
9440 * win32-arm-low.c (the_low_target): Remove arch_string initializer.
9441 * win32-i368-low.c (the_low_target): Remove arch_string initializer.
9442
9443 2008-02-27 Ulrich Weigand <uweigand@de.ibm.com>
9444
9445 * linux-low.h (struct linux_target_ops): Replace left_pad_xfer field
9446 by collect_ptrace_register and supply_ptrace_register hooks.
9447 * linux-low.c (fetch_register): Use supply_ptrace_register callback
9448 instead of checking for the_low_target.left_pad_xfer.
9449 (usr_store_inferior_registers): Use collect_ptrace_register callback
9450 instead of checking for the_low_target.left_pad_xfer.
9451
9452 * linux-s390-low.c (s390_collect_ptrace_register): New function.
9453 (s390_supply_ptrace_register): Likewise.
9454 (s390_fill_gregset): Call s390_collect_ptrace_register.
9455 (the_low_target): Update.
9456
9457 * linux-ppc64-low.c (ppc_collect_ptrace_register): New function.
9458 (ppc_supply_ptrace_register): Likewise.
9459 (the_low_target): Update.
9460
9461 * linux-i386-low.c (the_low_target): Update.
9462 * linux-x86-64-low.c (the_low_target): Update.
9463
9464 2008-02-27 Ulrich Weigand <uweigand@de.ibm.com>
9465
9466 * configure.srv [s390x-*-linux*]: Set srv_regobj to include both
9467 reg-s390.o and reg-s390x.o.
9468
9469 * linux-low.c (new_inferior): New global variable.
9470 (linux_create_inferior, linux_attach): Set it.
9471 (linux_wait_for_process): Call the_low_target.arch_setup after the
9472 target has stopped for the first time.
9473 (initialize_low): Do not call the_low_target.arch_setup.
9474
9475 * linux-s390-low.c (s390_get_pc): Support bi-arch operation.
9476 (s390_set_pc): Likewise.
9477 (s390_arch_setup): New function.
9478 (the_low_target): Use s390_arch_setup as arch_setup routine.
9479
9480 * regcache.c (realloc_register_cache): New function.
9481 (set_register_cache): Call it for each existing regcache.
9482
9483 2008-02-27 Ulrich Weigand <uweigand@de.ibm.com>
9484
9485 * server.h (init_registers): Remove prototype.
9486
9487 * linux-low.h (struct linux_target_ops): Add arch_setup field.
9488 * linux-low.c (initialize_low): Call the_low_target.arch_setup ()
9489 instead of init_registers ().
9490 * linux-arm-low.c (init_registers_arm): Add prototype.
9491 (init_registers_arm_with_iwmmxt): Likewise.
9492 (the_low_target): Add initializer for arch_setup field.
9493 * linux-cris-low.c (init_registers_cris): Add prototype.
9494 (the_low_target): Add initializer for arch_setup field.
9495 * linux-crisv32-low.c (init_registers_crisv32): Add prototype.
9496 (the_low_target): Add initializer for arch_setup field.
9497 * linux-i386-low.c (init_registers_i386_linux): Add prototype.
9498 (the_low_target): Add initializer for arch_setup field.
9499 * linux-ia64-low.c (init_registers_ia64): Add prototype.
9500 (the_low_target): Add initializer for arch_setup field.
9501 * linux-m32r-low.c (init_registers_m32r): Add prototype.
9502 (the_low_target): Add initializer for arch_setup field.
9503 * linux-m68k-low.c (init_registers_m68k): Add prototype.
9504 (the_low_target): Add initializer for arch_setup field.
9505 * linux-mips-low.c (init_registers_mips_linux): Add prototype.
9506 (init_registers_mips64_linux): Likewise.
9507 (the_low_target): Add initializer for arch_setup field.
9508 * linux-ppc-low.c (init_registers_ppc): Add prototype.
9509 (init_registers_powerpc_32, init_registers_powerpc_e500): Likewise.
9510 (the_low_target): Add initializer for arch_setup field.
9511 * linux-ppc64-low.c (init_registers_ppc64): Add prototype.
9512 (init_registers_powerpc_64): Likewise.
9513 (the_low_target): Add initializer for arch_setup field.
9514 * linux-s390-low.c (init_registers_s390): Add prototype.
9515 (init_registers_s390x): Likewise.
9516 (the_low_target): Add initializer for arch_setup field.
9517 * linux-sh-low.c (init_registers_sh): Add prototype.
9518 (the_low_target): Add initializer for arch_setup field.
9519 * linux-x86-64-low.c (init_registers_x86_64_linux): Add prototype.
9520 (the_low_target): Add initializer for arch_setup field.
9521 * linux-xtensa-low.c (init_registers_xtensa): Add prototype.
9522 (the_low_target): Add initializer for arch_setup field.
9523
9524 * win32-low.h (struct win32_target_ops): Add arch_setup field.
9525 * win32-low.c (initialize_low): Call the_low_target.arch_setup ()
9526 instead of init_registers ().
9527 * win32-arm-low.c (init_registers_arm): Add prototype.
9528 (the_low_target): Add initializer for arch_setup field.
9529 * win32-i386-low.c (init_registers_i386): Add prototype.
9530 (the_low_target): Add initializer for arch_setup field.
9531
9532 * spu-low.c (init_registers_spu): Add prototype.
9533 (initialize_low): Call initialie_registers_spu () instead of
9534 initialize_registers ().
9535
9536 2008-02-19 Pedro Alves <pedro@codesourcery.com>
9537
9538 * server.c (handle_v_requests): When handling the vRun and vAttach
9539 packets, if already debugging a process, don't kill it. Return an
9540 error instead.
9541
9542 2008-02-17 Daniel Jacobowitz <dan@codesourcery.com>
9543
9544 * server.c (handle_query): Correct length check.
9545
9546 2008-02-14 Pedro Alves <pedro_alves@portugalmail.pt>
9547
9548 * win32-low.c (do_initial_child_stuff): Add process handle
9549 parameter. Set current_process_handle and current_process_id from the
9550 parameters. Clear globals.
9551 (win32_create_inferior): Don't set current_process_handle and
9552 current_process_id here. Instead pass them on the call to
9553 do_initial_child_stuff.
9554 (win32_attach): Likewise.
9555 (win32_clear_inferiors): New.
9556 (win32_kill): Don't close the current process handle or the
9557 current thread handle here. Instead call win32_clear_inferiors.
9558 (win32_detach): Don't open a new handle to the process. Call
9559 win32_clear_inferiors.
9560 (win32_join): Don't rely on current_process_handle; open a new
9561 handle using the process id.
9562 (win32_wait): Call win32_clear_inferiors when the inferior process
9563 has exited.
9564
9565 2008-02-14 Daniel Jacobowitz <dan@codesourcery.com>
9566
9567 * server.c (monitor_show_help): Add "exit".
9568
9569 2008-02-11 Maxim Grigoriev <maxim2405@gmail.com>
9570
9571 * Makefile.in (SFILES): Add linux-xtensa-low.c.
9572 (clean): Add reg-xtensa.c.
9573 (linux-xtensa-low.o, reg-xtensa.o, reg-xtensa.c): New dependencies.
9574 * configure.srv (xtensa*-*-linux*) New target.
9575 * linux-xtensa-low.c: New.
9576 * xtensa-xtregs.c: New.
9577
9578 2008-02-01 Pedro Alves <pedro_alves@portugalmail.pt>
9579
9580 * hostio.c: Don't include errno.h.
9581 (errno_to_fileio_errno): Move to hostio-errno.
9582 * hostio.c: (hostio_error): Remove the error parameter. Defer the
9583 error number outputting to the target->hostio_last_error callback.
9584 (hostio_packet_error): Use FILEIO_EINVAL directly.
9585 (handle_open, handle_pread, hostio_error, handle_unlink): Update
9586 calls to hostio_error.
9587 * hostio-errno.c: New.
9588 * server.h (hostio_last_error_from_errno): Declare.
9589 * target.h (target_ops): Add hostio_last_error member.
9590 * linux-low.c (linux_target_op): Register hostio_last_error_from_errno
9591 as hostio_last_error handler.
9592 * spu-low.c (spu_target_ops): Likewise.
9593 * win32-low.c [_WIN32_WCE] (win32_error_to_fileio_error)
9594 (wince_hostio_last_error): New functions.
9595 (win32_target_ops) [_WIN32_WCE]: Register wince_hostio_last_error
9596 as hostio_last_error handler.
9597 (win32_target_ops) [!_WIN32_WCE]: Register
9598 hostio_last_error_from_errno as hostio_last_error handler.
9599 * Makefile.in (SFILES): Add hostio.c and hostio-errno.c.
9600 (hostio-errno.o): New rule.
9601 * configure.ac (GDBSERVER_DEPFILES): Add $srv_hostio_err_objs.
9602 * configure.srv (srv_hostio_err_objs): New variable. Default to
9603 hostio-errno.o.
9604 (arm*-*-mingw32ce*): Set srv_hostio_err_objs to "".
9605 * configure: Regenerate.
9606
9607 2008-01-29 Daniel Jacobowitz <dan@codesourcery.com>
9608
9609 * linux-low.c (linux_attach_lwp): Do not _exit after errors.
9610 (linux_kill, linux_detach): Clean up the process list.
9611 * remote-utils.c (remote_open): Improve port number parsing.
9612 (putpkt_binary, input_interrupt): Only send interrupts if the target
9613 is running.
9614 * server.c (extended_protocol): Make static.
9615 (attached): Define earlier.
9616 (exit_requested, response_needed, program_argv): New variables.
9617 (target_running): New.
9618 (start_inferior): Clear attached here.
9619 (attach_inferior): Set attached here.
9620 (require_running): Define.
9621 (handle_query): Use require_running and target_running. Implement
9622 "monitor exit".
9623 (handle_v_attach, handle_v_run): New.
9624 (handle_v_requests): Use require_running. Handle vAttach and vRun.
9625 (gdbserver_usage): Update.
9626 (main): Redo argument parsing. Handle --debug and --multi. Handle
9627 --attach along with other options or after the port. Save
9628 program_argv. Support no initial program. Resynchronize
9629 communication with GDB after an error. Handle "monitor exit".
9630 Use require_running and target_running. Always allow the extended
9631 protocol. Do not error out for Hc0 or Hc-1. Do not automatically
9632 restart in extended mode.
9633 * README: Refer to the GDB manual. Update --attach usage.
9634
9635 2007-12-20 Andreas Schwab <schwab@suse.de>
9636
9637 * linux-low.c (STACK_SIZE): Define.
9638 (linux_tracefork_child): Use it. Use __clone2 on ia64.
9639 (linux_test_for_tracefork): Likewise.
9640
9641 2007-12-18 Daniel Jacobowitz <dan@codesourcery.com>
9642
9643 * linux-low.c (linux_wait_for_event): Update messages. Do not
9644 reinsert auto-delete breakpoints.
9645 * mem-break.c (struct breakpoint): Change return type of handler to
9646 int.
9647 (set_breakpoint_at): Update handler type.
9648 (reinsert_breakpoint_handler): Return 1 instead of calling
9649 delete_breakpoint.
9650 (reinsert_breakpoint_by_bp): Check for the original breakpoint before
9651 setting a new one.
9652 (check_breakpoints): Delete auto-delete breakpoints and return 2.
9653 * mem-break.h (set_breakpoint_at): Update handler type.
9654 * thread-db.c (thread_db_create_event, thread_db_create_event): Update.
9655 * win32-low.c (auto_delete_breakpoint): New.
9656 (get_child_debug_event): Use it.
9657
9658 2007-12-16 Daniel Jacobowitz <dan@codesourcery.com>
9659
9660 * configure.ac: Check for pread and pwrite.
9661 * hostio.c (handle_pread): Fall back to lseek and read.
9662 (handle_pwrite): Fall back to lseek and write.
9663 * config.in, configure: Regenerated.
9664
9665 2007-12-07 Daniel Jacobowitz <dan@codesourcery.com>
9666
9667 * server.c (myresume): Add own_buf argument.
9668 (main): Update calls.
9669
9670 2007-12-06 Daniel Jacobowitz <dan@codesourcery.com>
9671
9672 * linux-low.c (linux_wait, linux_resume): Do not handle async I/O.
9673 * remote-utils.c (remote_open): Do not call disable_async_io.
9674 (block_async_io): Delete.
9675 (unblock_async_io): Make static.
9676 (initialize_async_io): New.
9677 * server.c (handle_v_cont): Handle async I/O here.
9678 (myresume): Likewise. Move other common resume tasks here...
9679 (main): ... from here. Call initialize_async_io. Disable async
9680 I/O before the main loop.
9681 * server.h (initialize_async_io): Declare.
9682 (block_async_io, unblock_async_io): Delete prototypes.
9683 * spu-low.c (spu_resume, spu_wait): Do not handle async I/O here.
9684
9685 2007-12-06 Mick Davis <mickd@goanna.iinet.net.au>
9686
9687 * remote-utils.c (readchar): Allow binary data in received messages.
9688
9689 2007-12-03 Pedro Alves <pedro_alves@portugalmail.pt>
9690
9691 * win32-low.c (attaching): New global.
9692 (win32_create_inferior): Clear the `attaching' global.
9693 (win32_attach): Set the `attaching' global.
9694 (get_child_debug_event) [_WIN32_WCE]: Stop the inferior when
9695 attaching. Only set a breakpoint at the entry point if not
9696 attaching.
9697
9698 2007-12-03 Pedro Alves <pedro_alves@portugalmail.pt>
9699
9700 * server.c (main): Don't report dll events on the initial
9701 connection on attaches.
9702
9703 2007-12-03 Pedro Alves <pedro_alves@portugalmail.pt>
9704
9705 * server.c (main): Relax numerical bases supported for the pid of
9706 the --attach command line argument.
9707
9708 2007-12-03 Pedro Alves <pedro_alves@portugalmail.pt>
9709
9710 * win32-low.c (win32_attach): Call OpenProcess before
9711 DebugActiveProcess, not after. Add last error output to error
9712 call.
9713
9714 2007-12-03 Pedro Alves <pedro_alves@portugalmail.pt>
9715
9716 * win32-low.c (win32_get_thread_context)
9717 (win32_set_thread_context): New functions.
9718 (thread_rec): Use win32_get_thread_context.
9719 (continue_one_thread, win32_resume): Use win32_set_thread_context.
9720 * win32-low.h (win32_thread_info) [_WIN32_WCE]: Add `base_context'
9721 field.
9722
9723 2007-12-03 Leo Zayas
9724 Pedro Alves <pedro_alves@portugalmail.pt>
9725
9726 * win32-low.c (soft_interrupt_requested, faked_breakpoint): New
9727 global variables.
9728 (child_add_thread): Minor cleanup.
9729 (child_continue): Resume artificially suspended threads before
9730 calling ContinueDebugEvent.
9731 (suspend_one_thread): New.
9732 (fake_breakpoint_event): New.
9733 (get_child_debug_event): Change return type to int. Check here if
9734 gdb sent an interrupt request. If a soft interrupt was requested,
9735 fake a breakpoint event. Return 0 if there is no event to handle,
9736 and 1 otherwise.
9737 (win32_wait): Don't check here if gdb sent an interrupt request.
9738 Ensure there is a valid event to handle.
9739 (win32_request_interrupt): Add soft interruption method as last
9740 resort.
9741
9742 2007-12-03 Leo Zayas
9743 Pedro Alves <pedro_alves@portugalmail.pt>
9744
9745 * win32-low.h (win32_thread_info): Add descriptions to the
9746 structure members. Replace `suspend_count' counter by a
9747 `suspended' flag.
9748 * win32-low.c (thread_rec): Update condition of when to get the
9749 context from the inferior. Rely on ContextFlags being set if it
9750 has already been retrieved. Only suspend the inferior thread if
9751 we haven't already. Warn if that fails.
9752 (continue_one_thread): s/suspend_count/suspended/. Only call
9753 ResumeThread once. Warn if that fails.
9754
9755 2007-12-02 Pedro Alves <pedro_alves@portugalmail.pt>
9756
9757 * win32-low.c (win32_wait): Don't read from the inferior when it
9758 has already exited.
9759
9760 2007-12-02 Pedro Alves <pedro_alves@portugalmail.pt>
9761
9762 * Makefile.in (win32_low_h): New variable.
9763 (win32-low.o): Add dependency on $(win32_low_h).
9764 (win32-arm-low.o, win32-i386-low.o): New rules.
9765
9766 2007-11-30 Daniel Jacobowitz <dan@codesourcery.com>
9767
9768 * hostio.c: Correct copyright year.
9769
9770 2007-11-30 Daniel Jacobowitz <dan@codesourcery.com>
9771
9772 * Makefile.in (OBS): Add hostio.o.
9773 (hostio.o): New rule.
9774 * server.h (handle_vFile): Declare.
9775 * hostio.c: New file.
9776 * server.c (handle_v_requests): Take packet_len and new_packet_len
9777 for binary packets. Call handle_vFile.
9778 (main): Update call to handle_v_requests.
9779
9780 2007-11-05 Daniel Jacobowitz <dan@codesourcery.com>
9781
9782 * linux-low.c: Include <sched.h>.
9783
9784 2007-11-01 Daniel Jacobowitz <dan@codesourcery.com>
9785
9786 * linux-low.c (linux_tracefork_grandchild): New.
9787 (linux_tracefork_child): Use clone.
9788 (linux_test_for_tracefork): Use clone; allocate and free a stack.
9789
9790 2007-10-31 Joel Brobecker <brobecker@adacore.com>
9791
9792 * Makefile.in: Use $(SHELL) instead of "sh" to call regdat.sh.
9793
9794 2007-10-24 Daniel Jacobowitz <dan@codesourcery.com>
9795
9796 * linux-low.c (handle_extended_wait): Handle unexpected signals.
9797
9798 2007-10-23 Daniel Jacobowitz <dan@codesourcery.com>
9799
9800 * inferiors.c (change_inferior_id): Delete.
9801 (add_pid_to_list, pull_pid_from_list): New.
9802 * linux-low.c (PTRACE_SETOPTIONS, PTRACE_GETEVENTMSG)
9803 (PTRACE_O_TRACESYSGOOD, PTRACE_O_TRACEFORK, PTRACE_O_TRACEVFORK)
9804 (PTRACE_O_TRACECLONE, PTRACE_O_TRACEEXEC, PTRACE_O_TRACEVFORKDONE)
9805 (PTRACE_O_TRACEEXIT, PTRACE_EVENT_FORK, PTRACE_EVENT_VFORK)
9806 (PTRACE_EVENT_CLONE, PTRACE_EVENT_EXEC, PTRACE_EVENT_VFORK_DONE)
9807 (PTRACE_EVENT_EXIT, __WALL): Provide default definitions.
9808 (stopped_pids, thread_db_active, must_set_ptrace_flags): New variables.
9809 (using_threads): Always set to 1.
9810 (handle_extended_wait): New.
9811 (add_process): Do not set TID.
9812 (linux_create_inferior): Set must_set_ptrace_flags.
9813 (linux_attach_lwp): Remove TID argument. Do not check using_threads.
9814 Use PTRACE_SETOPTIONS. Call new_thread_notify. Update all callers.
9815 (linux_thread_alive): Rename TID argument to LWPID.
9816 (linux_wait_for_process): Handle unknown processes. Do not use TID.
9817 (linux_wait_for_event): Do not use TID or check using_threads. Update
9818 call to dead_thread_notify. Call handle_extended_wait.
9819 (linux_create_inferior): Use PTRACE_SETOPTIONS.
9820 (send_sigstop): Delete sigstop_sent.
9821 (wait_for_sigstop): Avoid TID.
9822 (linux_supports_tracefork_flag, linux_tracefork_child, my_waitpid)
9823 (linux_test_for_tracefork): New.
9824 (linux_lookup_signals): Use thread_db_active and
9825 linux_supports_tracefork_flag.
9826 (initialize_low): Use thread_db_active and linux_test_for_tracefork.
9827 * linux-low.h (get_process_thread): Avoid TID.
9828 (struct process_ifo): Move thread_known and tid to the end. Remove
9829 sigstop_sent.
9830 (linux_attach_lwp, thread_db_init): Update prototypes.
9831 * server.h (change_inferior_id): Delete prototype.
9832 (add_pid_to_list, pull_pid_from_list): New prototypes.
9833 * thread-db.c (thread_db_use_events): New.
9834 (find_first_thread): Rename to...
9835 (find_one_thread): ...this. Update callers and messages. Do not
9836 call fatal. Check thread_db_use_events. Do not call
9837 change_inferior_id or new_thread_notify.
9838 (maybe_attach_thread): Update. Do not call new_thread_notify.
9839 (thread_db_init): Set thread_db_use_events. Check use_events.
9840 * utils.c (fatal, warning): Correct message prefix.
9841
9842 2007-10-15 Daniel Jacobowitz <dan@codesourcery.com>
9843
9844 * Makefile.in (clean): Remove new files.
9845 (powerpc-32.o, powerpc-32.c, powerpc-e500.o, powerpc-e500.c)
9846 (powerpc-64.o, powerpc-64.c): New rules.
9847 * configure.srv: Use alternate register sets for powerpc64-*-linux*
9848 with AltiVec, powerpc-*-linux* with AltiVec, and powerpc-*-linux*
9849 with SPE.
9850 * linux-ppc-low.c (ppc_regmap): Do not fetch the FP registers for
9851 SPE targets.
9852 (ppc_cannot_store_register): Do not check for FPSCR for SPE targets.
9853 (PTRACE_GETVRREGS, PTRACE_SETVRREGS, SIZEOF_VRREGS, ppc_fill_vrregset)
9854 (ppc_store_vrregset, PTRACE_GETEVRREGS, PTRACE_SETEVRREGS)
9855 (struct gdb_evrregset_t, ppc_fill_evrregset, ppc_store_evrregset): New.
9856 (target_regsets): Add AltiVec and SPE register sets.
9857 * configure.ac: Check for AltiVec and SPE.
9858 * linux-ppc64-low.c (PTRACE_GETVRREGS, PTRACE_SETVRREGS, SIZEOF_VRREGS)
9859 (ppc_fill_vrregset, ppc_store_vrregset): New.
9860 (target_regsets): Add AltiVec register set.
9861 * configure: Regenerated.
9862
9863 2007-09-19 Daniel Jacobowitz <dan@codesourcery.com>
9864
9865 * linux-low.c (O_LARGEFILE): Define.
9866 (linux_read_memory): Use /proc/PID/mem.
9867 * configure.ac: Use AC_GNU_SOURCE. Check for pread64.
9868 * configure, config.in: Regenerated.
9869
9870 2007-09-04 Daniel Jacobowitz <dan@codesourcery.com>
9871
9872 * linux-low.c (linux_wait_for_event): Do not pass signals while
9873 single-stepping.
9874
9875 2007-09-03 Pedro Alves <pedro_alves@portugalmail.pt>
9876
9877 * win32-low.c (create_process): New.
9878 (win32_create_inferior): Use create_process instead of
9879 CreateProcess. If create_process failed retry appending an ".exe"
9880 suffix. Store the GetLastError result immediatelly after
9881 create_process calls and use it on the call to error.
9882
9883 2007-09-03 Pedro Alves <pedro_alves@portugalmail.pt>
9884
9885 * win32-low.c (handle_load_dll): Don't use toolhelp when waiting.
9886
9887 2007-08-23 Joel Brobecker <brobecker@adacore.com>
9888
9889 * configure.ac: Switch license to GPLv3.
9890
9891 2007-08-01 Michael Snyder <msnyder@access-company.com>
9892
9893 * remote-utils.c (putpkt_binary): Memory leak, free buf2.
9894
9895 2007-07-31 Pedro Alves <pedro_alves@portugalmail.pt>
9896
9897 * win32-low.c (winapi_CloseToolhelp32Snapshot) [_WIN32_WCE]: New
9898 typedef.
9899 (win32_CloseToolhelp32Snapshot) [_WIN32_WCE]: New global var.
9900 (load_toolhelp) [_WIN32_WCE]: Load TOOLHELP.DLL. Get
9901 CloseToolhelp32Snapshot.
9902 (toolhelp_get_dll_name) [_WIN32_WCE]: Close the snapshot with
9903 CloseToolhelp32Snapshot.
9904
9905 2007-07-27 Michael Snyder <michael.snyder@access-company.com>
9906
9907 * server.c (main): Check for inferior exit before main loop.
9908
9909 2007-07-18 Pedro Alves <pedro_alves@portugalmail.pt>
9910
9911 * remote-utils.c (remote_open): Set SO_KEEPALIVE on remote_desc
9912 instead of on tmp_desc.
9913
9914 2007-07-17 Pedro Alves <pedro_alves@portugalmail.pt>
9915 Daniel Jacobowitz <dan@codesourcery.com>
9916
9917 * inferiors.c (all_dlls, dlls_changed, get_dll): New.
9918 (add_thread): Minor cleanups.
9919 (clear_inferiors): Move lower in the file. Clear the DLL
9920 list.
9921 (free_one_dll, match_dll, loaded_dll, unloaded_dll, clear_list): New.
9922 * remote-utils.c (prepare_resume_reply): Check dlls_changed.
9923 (xml_escape_text): New.
9924 * server.c (handle_query): Handle qXfer:libraries:read. Report it
9925 for qSupported.
9926 (handle_v_cont): Report errors.
9927 (gdbserver_version): Update.
9928 (main): Correct size of own_buf. Do not report initial DLL events.
9929 * server.h (struct dll_info, all_dlls, dlls_changed, loaded_dll)
9930 (unloaded_dll, xml_escape_text): New.
9931 * win32-low.c (enum target_waitkind): Update comments.
9932 (win32_add_one_solib, get_image_name, winapi_EnumProcessModules)
9933 (winapi_GetModuleInformation, winapi_GetModuleFileNameExA)
9934 (win32_EnumProcessModules, win32_GetModuleInformation)
9935 (win32_GetModuleFileNameExA, load_psapi, psapi_get_dll_name)
9936 (winapi_CreateToolhelp32Snapshot, winapi_Module32First)
9937 (winapi_Module32Next, win32_CreateToolhelp32Snapshot)
9938 (win32_Module32First, win32_Module32Next, load_toolhelp)
9939 (toolhelp_get_dll_name, handle_load_dll, handle_unload_dll): New.
9940 (get_child_debug_event): Handle DLL events.
9941 (win32_wait): Likewise.
9942
9943 2007-07-12 Daniel Jacobowitz <dan@codesourcery.com>
9944
9945 * configure.srv: Set srv_linux_regsets for sh*-*-linux*.
9946 * linux-sh-low.c (sh_fill_gregset, target_regsets): New.
9947
9948 2007-07-08 Pedro Alves <pedro_alves@portugalmail.pt>
9949
9950 * win32-low.c (handle_output_debug_string): Ignore event if not
9951 waiting.
9952
9953 2007-07-08 Pedro Alves <pedro_alves@portugalmail.pt>
9954
9955 * win32-arm-low.c (arm_wince_breakpoint): Fix typo.
9956
9957 2007-07-03 Daniel Jacobowitz <dan@codesourcery.com>
9958
9959 * remote-utils.c (look_up_one_symbol): Handle 'm' packets.
9960
9961 2007-07-02 Daniel Jacobowitz <dan@codesourcery.com>
9962
9963 * inferiors.c (change_inferior_id): Add comment.
9964 * linux-low.c (check_removed_breakpoint): Add an early
9965 prototype. Improve debug output.
9966 (linux_attach): Doc update.
9967 (linux_detach_one_process, linux_detach): Clean up before releasing
9968 each process.
9969 (send_sigstop, wait_for_sigstop): Improve comments and debug output.
9970 * linux-low.h (struct process_info): Doc improvement.
9971 * mem-break.c (delete_all_breakpoints): New.
9972 * mem-break.h (delete_all_breakpoints): New prototype.
9973 * thread-db.c (find_first_thread): New.
9974 (thread_db_create_event): Call it instead of
9975 thread_db_find_new_threads. Clean up unused variables.
9976 (maybe_attach_thread): Remove first thread handling.
9977 (thread_db_find_new_threads): Use find_first_thread.
9978 (thread_db_get_tls_address): Likewise.
9979
9980 2007-06-27 Daniel Jacobowitz <dan@codesourcery.com>
9981
9982 * thread-db.c (thread_db_find_new_threads): Add prototype.
9983 (thread_db_create_event): Check for the main thread before adding
9984 a new thread.
9985 (maybe_attach_thread): Only enable event reporting if TID == 0.
9986 (thread_db_get_tls_address): Check for new threads.
9987
9988 2007-06-20 Daniel Jacobowitz <dan@codesourcery.com>
9989
9990 * linux-low.c (linux_create_inferior): Try execv before execvp.
9991 * spu-low.c (spu_create_inferior): Likewise.
9992
9993 2007-06-13 Mike Frysinger <vapier@gentoo.org>
9994
9995 * linux-low.c (linux_create_inferior): Change execv to execvp.
9996 * spu-low.c (spu_create_inferior): Likewies.
9997
9998 2007-06-13 Daniel Jacobowitz <dan@codesourcery.com>
9999
10000 * Makefile.in (clean): Clean new files instead of deleted ones.
10001 (reg-mips.o, reg-mips.c, reg-mips64.o, reg-mips64.c): Delete.
10002 (mips-linux.o, mips-linux.c, mips64-linux.o, mips64-linux.c): New
10003 rules.
10004 * configure.srv: Specify XML files and new regformats for MIPS and
10005 MIPS64 GNU/Linux.
10006 * linux-mips-low.c (mips_num_regs): Set to only used registers.
10007 (mips_regmap): Do not fetch $0. Remove unused registers. Add
10008 an entry for the restart register.
10009 (mips_cannot_fetch_register, mips_cannot_store_register)
10010 (mips_reinsert_addr, mips_fill_fpregset, mips_store_fpregset): Update
10011 register names to match the XML descriptions.
10012 (mips_fill_gregset, mips_store_gregset): Likewise. Handle the
10013 restart register instead of $0.
10014
10015 2007-06-12 Ulrich Weigand <uweigand@de.ibm.com>
10016 Markus Deuling <deuling@de.ibm.com>
10017
10018 * remote-utils.c (decode_xfer_write): New function.
10019 * server.h (decode_xfer_write): Add prototype.
10020 * server.c (handle_query): Add PACKET_LEN argument. Support
10021 qXfer:spu:read and qXfer:spu:write packets.
10022 (main): Pass packet_len to handle_query.
10023 * spu-low.c (spu_target_ops): Add spu_proc_xfer_spu.
10024 * target.h (target_ops): Add qxfer_spu.
10025
10026 2007-06-12 Ulrich Weigand <uweigand@de.ibm.com>
10027
10028 * spu-low.c (spu_proc_xfer_spu): Do not return failure when
10029 accessing non-seekable spufs files.
10030
10031 2007-05-16 Markus Deuling <deuling@de.ibm.com>
10032
10033 * server.c (handle_query): Add reply for qC packet.
10034
10035 2007-05-10 Pedro Alves <pedro_alves@portugalmail.pt>
10036 Leo Zayas <lerele@champenstudios@com>
10037
10038 * server.h (check_remote_input_interrupt_request): New function.
10039 * remote_utils.c (INVALID_DESCRIPTOR): New define.
10040 (remote_desc): Initialize with INVALID_DESCRIPTOR.
10041 (input_interrupt): Expose on USE_WIN32API too. Fix whitespace.
10042 (check_remote_input_interrupt_request): New function.
10043 * server.h (check_remote_input_interrupt_request): Declare.
10044 * win32-low.c (winapi_DebugBreakProcess,
10045 winapi_GenerateConsoleCtrlEvent): New typedefs.
10046 (get_child_debug_event): Lower Win32 debug event polling from 1 sec
10047 to 250 ms.
10048 (win32_wait): Check for remote interrupt request
10049 with check_remote_input_interrupt_request.
10050 (win32_request_interrupt): New function.
10051 (win32_target_op): Set request_interrupt to win32_request_interrupt.
10052
10053 2007-05-10 Pedro Alves <pedro_alves@portugalmail.pt>
10054
10055 * win32-low.c (debug_registers_changed,
10056 debug_registers_used, CONTEXT_EXTENDED_REGISTERS,
10057 CONTEXT_FLOATING_POINT, CONTEXT_DEBUG_REGISTERS,
10058 CONTEXT_DEBUGGER, CONTEXT_DEBUGGER_DR): Delete.
10059 (thread_rec): Get context using the low target.
10060 (child_add_thread): Call thread_added on the low target,
10061 which does the same thing.
10062 (regptr): Delete.
10063 (do_initial_child_stuff): Remove debug registers references.
10064 Set context using the low target. Resume threads after
10065 setting the contexts.
10066 (child_continue): Remove dead variable. Remove debug
10067 registers references.
10068 (child_fetch_inferior_registers): Go through the low target.
10069 (do_child_store_inferior_registers): Remove.
10070 (child_store_inferior_registers): Go through the low target.
10071 (win32_resume): Remove debug registers references.
10072 Set context using the low target.
10073 (handle_exception): Change return type to void. Don't record
10074 context here. Set status to TARGET_WAITKIND_SPURIOUS on a
10075 first chance exception.
10076 (get_child_debug_event): Change return type to void. Remove
10077 goto loop. Always return after waiting for debug event.
10078 (win32_wait): Convert to switch statement. Handle spurious
10079 events.
10080
10081 * win32-i386-low.c (debug_registers_changed,
10082 debug_registers_used): New.
10083 (initial_stuff): Rename to ...
10084 (i386_initial_stuff): ... this. Clear debug registers
10085 state variables.
10086 (store_debug_registers): Delete.
10087 (i386_get_thread_context): New.
10088 (load_debug_registers): Delete.
10089 (i386_set_thread_context): New.
10090 (i386_thread_added): New.
10091 (single_step): Rename to ...
10092 (i386_single_step): ... this.
10093 (do_fetch_inferior_registers): Rename to ...
10094 (i386_fetch_inferior_register): ... this.
10095 (i386_store_inferior_register): New.
10096 (the_low_target): Adapt to new interface.
10097
10098 * win32-arm-low.c (CONTEXT_FLOATING_POINT): Define.
10099 (arm_get_thread_context): New.
10100 (arm_set_thread_context): New.
10101 (regptr): New.
10102 (do_fetch_inferior_registers): Rename to ...
10103 (arm_fetch_inferior_register): ... this.
10104 (arm_store_inferior_register): New.
10105 (arm_wince_breakpoint): Reimplement as unsigned long.
10106 (arm_wince_breakpoint_len): Define.
10107 (the_low_target): Adapt to new interface.
10108
10109 * win32-low.h (target_ops): Remove regmap, store_debug_registers and
10110 load_debug_registers. Add get_thread_context, set_thread_context,
10111 thread_added and store_inferior_register. Rename
10112 fetch_inferior_registers to fetch_inferior_register.
10113 (regptr): Remove declaration.
10114
10115 2007-05-10 Pedro Alves <pedro_alves@portugalmail.pt>
10116
10117 * linux-low.c (linux_detach): Change return type to int. Return 0.
10118 * spu-low.c (spu_detach): Likewise.
10119
10120 2007-05-10 Pedro Alves <pedro_alves@portugalmail.pt>
10121
10122 * target.h (target_ops): Change return type of detach to int.
10123 Add join.
10124 (join_inferior): New.
10125 * server.c (main): Don't skip detach support on mingw32.
10126 If the inferior doesn't support detaching return error.
10127 Call join_inferior instead of using waitpid.
10128 * linux-low.c (linux_join): New.
10129 (linux_target_op): Add linux_join.
10130 * spu-low.c (spu_join): New.
10131 (spu_target_ops): Add spu_join.
10132 * win32-low.c (win32_detach): Adapt to new interface.
10133 Reopen current_process_handle before detaching. Issue a child
10134 resume before detaching.
10135 (win32_join): New.
10136 (win32_target_op): Add win32_join.
10137
10138 2007-05-10 Pedro Alves <pedro_alves@portugalmail.pt>
10139
10140 * win32-low.c (win32-attach): Fix return value.
10141 * target.h (target_ops): Describe ATTACH return values.
10142
10143 2007-05-10 Pedro Alves <pedro_alves@portugalmail.pt>
10144
10145 * win32-low.c (GETPROCADDRESS): Define.
10146 (winapi_DebugActiveProcessStop): Add WINAPI. typedef as pointer.
10147 (winapi_DebugSetProcessKillOnExit): Likewise.
10148 (win32_create_inferior): Force usage of ansi CreateProcessA.
10149 (win32_attach): Use GETPROCADDRESS.
10150 (win32_detach): Likewise.
10151
10152 2007-05-10 Pedro Alves <pedro_alves@portugalmail.pt>
10153
10154 * win32-low.c (win32_wait): Don't use WSTOPSIG.
10155
10156 2007-03-30 Pedro Alves <pedro_alves@portugalmail.pt>
10157
10158 * win32-low.c: Commit leftover changes from 2007-03-29.
10159
10160 2007-03-30 Daniel Jacobowitz <dan@codesourcery.com>
10161
10162 * i387-fp.c (struct i387_fsave, struct i387_fxsave): Make 16-bit
10163 fields short instead of int. Add explicit padding.
10164 (i387_cache_to_fsave): Remove unnecessary casts.
10165 (i387_fsave_to_cache): Doc fix.
10166 (i387_cache_to_fxsave): Remove unnecessary casts and masking.
10167
10168 2007-03-30 Daniel Jacobowitz <dan@codesourcery.com>
10169
10170 * i387-fp.c (i387_cache_to_fxsave): Reinitialize val2 before use.
10171 (i387_fxsave_to_cache): Check fp->ftag while building ftag value.
10172
10173 2007-03-29 Pedro Alves <pedro_alves@portugalmail.pt>
10174
10175 * configure.srv (arm*-*-mingw32ce*): Move near the other
10176 arm targets.
10177
10178 2007-03-29 Pedro Alves <pedro_alves@portugalmail.pt>
10179
10180 * configure.ac: Add errno checking.
10181 (AC_CHECK_HEADERS): Add errno.h, fcntl.h, signal.h,
10182 sys/file.h and malloc.h.
10183 (AC_CHECK_DECLS): Add perror.
10184 (srv_mingwce): Handle.
10185 * configure.srv (i[34567]86-*-cygwin*): Add
10186 win32-i386-low.o to srv_tgtobj.
10187 (i[34567]86-*-mingw*): Likewise.
10188 (arm*-*-mingw32ce*): Add case.
10189 * gdbreplay.c [HAVE_SYS_FILE_H, HAVE_SIGNAL_H,
10190 HAVE_FCNTL_H, HAVE_ERRNO_H, HAVE_MALLOC_H]: Check.
10191 [__MINGW32CE__] (strerror): New function.
10192 [__MINGW32CE__] (errno): Define to GetLastError.
10193 [__MINGW32CE__] (COUNTOF): New macro.
10194 (remote_open): Remove extra close call.
10195 * mem-break.c (delete_breakpoint_at): New function.
10196 * mem-break.h (delete_breakpoint_at): Declare.
10197 * remote-utils.c [HAVE_SYS_FILE_H, HAVE_SIGNAL_H,
10198 HAVE_FCNTL_H, HAVE_UNISTD_H, HAVE_ERRNO_H]: Check.
10199 [USE_WIN32API] (read, write): Add char* casts.
10200 * server.c [HAVE_UNISTD_H, HAVE_SIGNAL_H]: Check.
10201 * server.h: Include wincecompat.h on Windows CE.
10202 [HAVE_ERRNO_H]: Check.
10203 (perror): Declare if not declared.
10204 * utils.c: Add stdlib.h, errno.h and malloc.h includes.
10205 (perror_with_name): Remove errno declaration.
10206 * wincecompat.h: New.
10207 * wincecompat.c: New.
10208 * win32-low.h: New.
10209 * win32-arm-low.c: New.
10210 * win32-i386-low.c: New.
10211 (win32-low.c): Include mem-break.h and win32-low.h, and winnt.h.
10212 (OUTMSG2): Make it safe.
10213 (_T): New macro.
10214 (COUNTOF): New macro.
10215 (NUM_REGS): Get it from the low target.
10216 (CONTEXT_EXTENDED_REGISTERS, CONTEXT_FLOATING_POINT,
10217 CONTEXT_DEBUG_REGISTERS): Add fallbacks to 0.
10218 (thread_rec): Let low target handle debug registers.
10219 (child_add_thread): Likewise.
10220 (child_init_thread_list): Likewise.
10221 (continue_one_thread): Likewise.
10222 (regptr): New.
10223 (do_child_fetch_inferior_registers): Move to ...
10224 * win32-i386-low.c: ... here, and rename to ...
10225 (do_fetch_inferior_registers): ... this.
10226 * win32-low.c (child_fetch_inferior_registers):
10227 Go through the low target.
10228 (do_child_store_inferior_registers): Use regptr.
10229 (strwinerror): New function.
10230 (win32_create_inferior): Handle Windows CE.
10231 Use strwinerror instead of strerror on Windows error
10232 codes. Add program to the error output.
10233 Don't close the main thread handle on Windows CE.
10234 (win32_attach): Use coredll.dll on Windows CE.
10235 (win32_kill): Close current process and current
10236 thread handles.
10237 (win32_detach): Use coredll.dll on Windows CE.
10238 (win32_resume): Let low target handle debug registers, and
10239 step request.
10240 (handle_exception): Add/Remove initial breakpoint. Avoid
10241 non-existant WSTOPSIG on Windows CE.
10242 (win32_read_inferior_memory): Cast to remove warning.
10243 (win32_arch_string): Go through the low target.
10244 (initialize_low): Call set_breakpoint_data with the low
10245 target's breakpoint.
10246 * win32-low.c (dr, FLAG_TRACE_BIT, FCS_REGNUM,
10247 FOP_REGNUM, mappings): Move to ...
10248 * win32-i386-low.c: ... here.
10249 * win32-low.c (win32_thread_info): Move to ...
10250 * win32-low.h: ... here.
10251 * Makefile.in (SFILES): Add win32-low.c, win32-i386-low.c,
10252 win32-arm-low.c and wincecompat.c.
10253 (all:): Add $EXEEXT.
10254 (install-only:): Likewise.
10255 (gdbserver:): Likewise.
10256 (gdbreplay:): Likewise.
10257 * config.in: Regenerate.
10258 * configure: Regenerate.
10259
10260 2007-03-28 Pedro Alves <pedro_alves@portugalmail.pt>
10261
10262 * win32-low.c: Rename typedef thread_info to
10263 win32_thread_info throughout.
10264
10265 2007-03-28 Pedro Alves <pedro_alves@portugalmail.pt>
10266
10267 * win32-i386-low.c: Rename to ...
10268 * win32-low.c: ... this.
10269 * configure.srv: Replace win32-i386-low.o with win32-low.o.
10270 * Makefile.in: Likewise.
10271
10272 2007-03-27 Pedro Alves <pedro_alves@portugalmail.pt>
10273
10274 * remote-utils.c (monitor_output): Constify msg parameter.
10275 * server.h (monitor_output): Likewise.
10276 * win32-i386-low.c (handle_output_debug_string): New.
10277 (win32_kill): Handle OUTPUT_DEBUG_STRING_EVENT events using
10278 handle_output_debug_string.
10279 (get_child_debug_event): Likewise.
10280
10281 2007-03-27 Mat Hostetter <mat@lcs.mit.edu>
10282
10283 * server.c (main): Correct strtoul check.
10284
10285 2007-03-27 Jon Ringle <jon@ringle.org>
10286
10287 * linux-low.c: Check __ARCH_HAS_MMU__ also.
10288
10289 2007-03-27 Brooks Moses <brooks.moses@codesourcery.com>
10290
10291 * Makefile.in: Add dummy "pdf" and "install-pdf" targets.
10292
10293 2007-02-27 Daniel Jacobowitz <dan@codesourcery.com>
10294
10295 * terminal.h: Check HAVE_SGTTY_H.
10296
10297 2007-02-27 Mat Hostetter <mat@lcs.mit.edu>
10298
10299 * remote-utils.c (remote_open): Print out the assigned port number.
10300
10301 2007-02-26 Daniel Jacobowitz <dan@codesourcery.com>
10302
10303 * remote-utils.c (monitor_output): New function.
10304 * server.c (debug_threads): Define here.
10305 (monitor_show_help): New function.
10306 (handle_query): Handle qRcmd.
10307 (main): Do not handle 'd' packet.
10308 * server.h (debug_threads, remote_debug, monitor_output): Declare.
10309 * linux-low.c, spu-low.c, win32-i386-low.c: Remove definitions
10310 of debug_threads.
10311
10312 2007-02-25 Pedro Alves <pedro_alves@portugalmail.pt>
10313
10314 * Makefile.in (EXEEXT): New.
10315 (clean): Use $(EXEEXT).
10316
10317 2007-02-25 Pedro Alves <pedro_alves@portugalmail.pt>
10318
10319 * target.h (target_ops): Rename send_signal to request_interrupt,
10320 and remove enum target_signal parameter.
10321 * linux-low.c (linux_request_interrupt): Rename from
10322 linux_send_signal, and always send SIGINT.
10323 * spu-low.c (spu_request_interrupt): Rename from spu_send_signal,
10324 and always send SIGINT.
10325 * remote-utils.c (putpkt_binary): Call request_interrupt, instead
10326 of send_signal.
10327 (input_interrupt): Likewise.
10328
10329 2007-02-25 Pedro Alves <pedro_alves@portugalmail.pt>
10330
10331 * server.c (get_features_xml): Check if target implemented
10332 arch_string.
10333 * win32-i386-low.c (win32_arch_string): New.
10334 (win32_target_ops): Add win32_arch_string as arch_string member.
10335
10336 2007-02-22 Markus Deuling <deuling@de.ibm.com>
10337
10338 * spu-low.c (spu_arch_string): New.
10339 (spu_target_ops): Add spu_arch_string.
10340
10341 2007-02-16 Daniel Jacobowitz <dan@codesourcery.com>
10342
10343 * remote-utils.c: Remove HAVE_TERMINAL_H check.
10344 * configure.ac: Do not check for terminal.h.
10345 * configure, config.in: Regenerated.
10346
10347 2007-02-08 Daniel Jacobowitz <dan@codesourcery.com>
10348
10349 * Makefile.in (OBS): Add $(XML_BUILTIN).
10350 (XML_DIR, XML_TARGET, XML_FILES, XML_BUILTIN): New.
10351 (clean): Update.
10352 (target.xml, xml-builtin.c, stamp-xml, arm-with-iwmmxt.o)
10353 (arm-with-iwmmxt.c): New.
10354 * config.in, configure: Regenerate.
10355 * configure.ac: Check for iWMMXt. Handle srv_xmltarget,
10356 srv_xmlbuiltin, and srv_xmlfiles. Define USE_XML.
10357 * configure.srv: Mention srv_xmltarget and srv_xmlfiles.
10358 (arm*-*-linux*): Add iWMMXt and regset support.
10359 * linux-arm-low.c (PTRACE_GETWMMXREGS, PTRACE_SETWMMXREGS): Define.
10360 (arm_fill_gregset, arm_store_gregset, arm_fill_wmmxregset)
10361 (arm_store_wmmxregset, target_regsets): New.
10362 * server.c (get_features_xml): Take annex argument. Check builtin
10363 XML documents.
10364 (handle_query): Handle multiple annexes.
10365
10366 2007-01-29 Daniel Jacobowitz <dan@codesourcery.com>
10367
10368 * remote-utils.c [USE_WIN32API] (read, write): Define.
10369 (putpkt_binary, input_interrupt, readchar, getpkt): Use read and
10370 write.
10371
10372 2007-01-09 Daniel Jacobowitz <dan@codesourcery.com>
10373
10374 * linux-i386-low.c (the_low_target): Set arch_string.
10375 * linux-x86-64-low.c (the_low_target): Likewise.
10376 * linux-low.c (linux_arch_string): New.
10377 (linux_target_ops): Add it.
10378 * linux-low.h (struct linux_target_ops): Add arch_string.
10379 * server.c (write_qxfer_response): Use const void * for DATA.
10380 (get_features_xml): New.
10381 (handle_query): Handle qXfer:features:read. Report it for qSupported.
10382 * target.h (struct target_ops): Add arch_string method.
10383
10384 2007-01-03 Denis Pilat <denis.pilat@st.com>
10385 Daniel Jacobowitz <dan@codesourcery.com>
10386
10387 * linux-low.c (linux_kill): Handle being called with no threads.
10388 * win32-i386-low.c (win32_kill): Likewise.
10389 (get_child_debug_event): Clear current_process_handle.
10390
10391 2006-12-30 Denis PILAT <denis.pilat@st.com>
10392 Daniel Jacobowitz <dan@codesourcery.com>
10393
10394 * remote-utils.c (remote_open): Check the type of specified
10395 serial port devices before opening them.
10396 * server.c (main): Kill the inferior if an error occurs during
10397 the first remote_open.
10398
10399 2006-12-05 Markus Deuling <deuling@de.ibm.com>
10400
10401 * README: Update supported targets.
10402
10403 2006-11-28 Daniel Jacobowitz <dan@codesourcery.com>
10404
10405 * Makefile.in (clean): Remove reg-mips64.c.
10406 (reg-mips64.c, reg-mips64.o): New rules.
10407 * configure.srv: Handle mips64. Include regset support for mips.
10408 * linux-mips-low.c (union mips_register): New.
10409 (mips_get_pc, mips_set_pc, mips_reinsert_addr): Use it.
10410 (mips_breakpoint, mips_breakpoint_at): Use int.
10411 (mips_collect_register, mips_supply_register)
10412 (mips_collect_register_32bit, mips_supply_register_32bit)
10413 (mips_fill_gregset, mips_store_gregset, mips_fill_fpregset)
10414 (mips_store_fpregset, target_regsets): New.
10415 * thread-db.c (thread_db_get_tls_address): Use uintptr_t.
10416
10417 2006-11-22 Ulrich Weigand <uweigand@de.ibm.com>
10418
10419 * configure.srv: Add target "spu*-*-*".
10420 * Makefile.in (clean): Remove reg-spu.c.
10421 (reg-spu.c, reg-spu.o, spu-low.o): Add dependencies.
10422 * spu-low.c: New file.
10423
10424 2006-11-16 Daniel Jacobowitz <dan@codesourcery.com>
10425
10426 * configure.ac: Correct td_thr_tls_get_addr test.
10427 * configure: Regenerated.
10428
10429 2006-11-16 Daniel Jacobowitz <dan@codesourcery.com>
10430
10431 * linux-low.c (linux_wait_for_event): Reformat. Use the
10432 pass_signals array.
10433 * remote-utils.c (decode_address_to_semicolon): New.
10434 * server.c (pass_signals, handle_general_set): New.
10435 (handle_query): Mention QPassSignals for qSupported.
10436 (main): Call handle_general_set.
10437 * server.h (pass_signals, decode_address_to_semicolon): New.
10438
10439 2006-11-06 Daniel Jacobowitz <dan@codesourcery.com>
10440
10441 * server.c (handle_query): Correct error handling for read_auxv.
10442
10443 2005-10-19 Ulrich Weigand <uweigand@de.ibm.com>
10444
10445 * configure.srv [s390-*-linux*, s390x-*-linux*]: Set srv_linux_regsets
10446 and srv_linux_thread_db to yes.
10447 * linux-s390-low.c (s390_fill_gregset): New function.
10448 (target_regsets): Define data structure.
10449
10450 2006-10-17 Daniel Jacobowitz <dan@codesourcery.com>
10451
10452 * acinclude.m4 (SRV_CHECK_TLS_GET_ADDR): New.
10453 * configure.ac: Use it. Define HAVE_TD_THR_TLS_GET_ADDR.
10454 * config.in, configure: Regenerated.
10455 * inferiors.c (gdb_id_to_thread): New function.
10456 (gdb_id_to_thread_id): Use it.
10457 * linux-low.c (linux_target_ops): Use thread_db_get_tls_address.
10458 * linux-low.h (struct process_info): Add th member.
10459 (thread_db_get_tls_address): New prototype.
10460 * remote-utils.c (decode_address): Make non-static.
10461 * server.c (handle_query): Handle qGetTLSAddr.
10462 * server.h (gdb_id_to_thread, decode_address): New prototypes.
10463 * target.h (struct target_ops): Add get_tls_address.
10464 * thread-db.c (maybe_attach_thread): Save the thread handle.
10465 (thread_db_get_tls_address): New.
10466
10467 2006-09-28 Daniel Jacobowitz <dan@codesourcery.com>
10468
10469 * linux-low.c (PTRACE_GETSIGINFO, PTRACE_SETSIGINFO): Define.
10470 (linux_resume_one_process): Take a siginfo_t *. Update all
10471 callers. Queue it if necessary. Use PTRACE_SETSIGINFO.
10472 (struct pending_signals): Add a siginfo_t.
10473 (linux_wait_for_process): Always set last_status.
10474 (linux_wait_for_event): Use PTRACE_GETSIGINFO.
10475 (linux_queue_one_thread): Use PTRACE_GETSIGINFO.
10476 * linux-low.h (struct process_info): Add last_status.
10477
10478 2006-09-21 Daniel Jacobowitz <dan@codesourcery.com>
10479
10480 * remote-utils.c (try_rle): New function.
10481 (putpkt_binary): Use it.
10482
10483 2006-08-19 Daniel Jacobowitz <dan@codesourcery.com>
10484
10485 * Makefile.in (clean): Clean reg-x86-64-linux.c.
10486 (reg-x86-64-linux.o, reg-x86-64-linux.c): New.
10487 * configure.srv (x86_64-*-linux*): Use reg-x86-64-linux.o.
10488 * linux-x86-64-low.c (x86_64_regmap): Include ORIG_RAX.
10489 (x86_64_fill_gregset, x86_64_store_gregset): Skip floating
10490 point registers.
10491
10492 2006-08-08 Richard Sandiford <richard@codesourcery.com>
10493
10494 * server.c (terminal_fd): New variable.
10495 (old_foreground_pgrp): Likewise.
10496 (restore_old_foreground_pgrp): New function.
10497 (start_inferior): Record the terminal file descriptor in terminal_fd
10498 and its original foreground group in old_foreground_pgrp. Register
10499 restore_old_foreground_pgrp with atexit().
10500
10501 2006-07-26 Daniel Jacobowitz <dan@codesourcery.com>
10502
10503 * server.c (handle_query): Correct qPart to qXfer.
10504
10505 2006-07-22 Daniel Jacobowitz <dan@codesourcery.com>
10506
10507 * configure.ac: Check for more headers which are missing on
10508 Windows. Automatically supply -lwsock32 and USE_WIN32API.
10509 * configure.srv: Add Cygwin and mingw32.
10510 * remote-utils.c: Don't include headers unconditionally which
10511 are missing on mingw32. Include <winsock.h> for mingw32.
10512 (remote_open): Adjust for mingw32 support. Flush
10513 standard error after writing to it.
10514 (remote_close, putpkt_binary, input_interrupt, block_async_io)
10515 (unblock_async_io, enable_async_io, disable_async_io)
10516 (readchar, getpkt): Update for Winsock support.
10517 (prepare_resume_reply): Expect a protocol signal number.
10518 * server.c: Disable <sys/wait.h> on mingw32.
10519 (start_inferior): Adjust for mingw32 support. Flush
10520 standard error after writing to it.
10521 (attach_inferior): Likewise. Use protocol signal
10522 numbers.
10523 (main): Skip 'D' packet on mingw32. Use protocol signal numbers
10524 and names.
10525 * win32-i386-low.c: New file.
10526 * Makefile.in (XM_CLIBS): Set.
10527 (gdbserver, gdbreplay): Use $(INTERNAL_CFLAGS).
10528 (win32-i386-low.o): New dependency rule.
10529 * linux-low.c (linux_wait): Use target signal numbers.
10530 * target.h (struct target_ops): Doc fix.
10531 * server.h (target_signal_to_name): New prototype.
10532 * gdbreplay.c: Don't include headers unconditionally which
10533 are missing on mingw32. Include <winsock.h> for mingw32.
10534 (remote_close, remote_open): Adjust for Winsock support.
10535 * configure, config.in: Regenerated.
10536
10537 2006-07-12 Daniel Jacobowitz <dan@codesourcery.com>
10538
10539 * server.c (decode_xfer_read, write_qxfer_response): New.
10540 (handle_query): Take a packet length argument. Handle
10541 qXfer:auxv:read instead of qPart:auxv:read. Mention it in
10542 the qSupported response.
10543 (main): Update call to handle_query.
10544
10545 2006-06-22 Daniel Jacobowitz <dan@codesourcery.com>
10546
10547 * remote-utils.c (remote_escape_output, remote_unescape_input): New.
10548 (putpkt_binary): Renamed from putpkt and adjusted for binary
10549 data.
10550 (putpkt): New wrapper for putpkt_binary.
10551 (readchar): Don't mask off the high bit.
10552 (decode_X_packet): New function.
10553 * server.c (main): Call putpkt_binary if a handler sets the packet
10554 length. Save the length of the incoming packet. Handle 'X'.
10555 * server.h (gdb_byte, remote_escape_output, decode_X_packet): New.
10556
10557 2006-06-21 Daniel Jacobowitz <dan@codesourcery.com>
10558
10559 * server.c (handle_query): Handle qSupported.
10560
10561 2006-05-30 Daniel Jacobowitz <dan@codesourcery.com>
10562
10563 * remote-utils.c (all_symbols_looked_up): New variable.
10564 (look_up_one_symbol): Check it.
10565 * server.h (look_up_one_symbol): New declaration.
10566 * thread-db.c (thread_db_init): Set all_symbols_looked_up.
10567
10568 2006-05-30 Daniel Jacobowitz <dan@codesourcery.com>
10569
10570 * Makefile.in (linux-arm-low.o): Update dependencies.
10571 * linux-arm-low.c: Include "gdb_proc_service.h".
10572 (PTRACE_GET_THREAD_AREA): Define.
10573 (ps_get_thread_area): New function.
10574
10575 2006-05-09 Nathan Sidwell <nathan@codesourcery.com>
10576
10577 * configure.srv (m68k*-*-uclinux*): New target.
10578 * linux-low.c (linux_create_inferior): Use vfork on mmuless systems.
10579 (linux_resume_one_process): Remove extraneous cast.
10580 (linux_read_offsets): New.
10581 (linux_target_op): Add linux_read_offsets on mmuless systems.
10582 * server.c (handle_query): Add qOffsets logic.
10583 * target.h (struct target_ops): Add read_offsets.
10584
10585 2006-03-15 Daniel Jacobowitz <dan@codesourcery.com>
10586
10587 * linux-mips-low.c: Include <sys/ptrace.h> and "gdb_proc_service.h".
10588 (PTRACE_GET_THREAD_AREA): Define.
10589 (ps_get_thread_area): New function.
10590 * Makefile.in (linux-i386-low.o, linux-mips-low.o)
10591 (linux-x86-64-low.o): Update.
10592
10593 2006-03-15 Daniel Jacobowitz <dan@codesourcery.com>
10594
10595 * configure.ac: Remove checks for prfpregset_t.
10596 * gdb_proc_service.h: New file.
10597 * linux-i386-low.c, linux-x86-64-low.c, thread-db.c: Use the
10598 new "gdb_proc_service.h".
10599 * proc-service.c: Likewise.
10600 (ps_pglobal_lookup, ps_pdread, ps_pdwrite): Use psaddr_t.
10601 (ps_lgetfpregs, ps_lsetfpregs): Use a void* argument.
10602 * Makefile.in (gdb_proc_service_h): Updated.
10603 * configure, config.in: Regenerated.
10604
10605 2006-03-03 Daniel Jacobowitz <dan@codesourcery.com>
10606
10607 * remote-utils.c (prepare_resume_reply): Move declaration
10608 of gdb_id_from_wait to the top of the block.
10609
10610 2006-02-15 Daniel Jacobowitz <dan@codesourcery.com>
10611
10612 * linux-low.c (regsets_store_inferior_registers): Read the regset
10613 from the target before filling it.
10614
10615 2006-02-08 Daniel Jacobowitz <dan@codesourcery.com>
10616
10617 * server.c (attach_inferior): Return SIGTRAP for a successful
10618 attach.
10619
10620 2006-02-01 Daniel Jacobowitz <dan@codesourcery.com>
10621
10622 * Makefile.in (OBS): Add version.o.
10623 (STAGESTUFF): Delete.
10624 (version.o): Add dependencies.
10625 (version.c): Replace rule.
10626 (clean): Remove version.c.
10627 * server.c (gdbserver_version): New.
10628 (gdbserver_usage): Use printf.
10629 (main): Handle --version and --help.
10630 * server.h (version, host_name): Add declarations.
10631
10632 2005-12-23 Eli Zaretskii <eliz@gnu.org>
10633
10634 * linux-arm-low.c:
10635 * linux-arm-low.c:
10636 * inferiors.c:
10637 * i387-fp.h:
10638 * i387-fp.c:
10639 * gdbreplay.c:
10640 * regcache.c:
10641 * proc-service.c:
10642 * mem-break.h:
10643 * mem-break.c:
10644 * linux-x86-64-low.c:
10645 * linux-sh-low.c:
10646 * linux-s390-low.c:
10647 * linux-ppc64-low.c:
10648 * linux-ppc-low.c:
10649 * linux-mips-low.c:
10650 * linux-m68k-low.c:
10651 * linux-m32r-low.c:
10652 * linux-low.h:
10653 * linux-low.c:
10654 * linux-ia64-low.c:
10655 * linux-i386-low.c:
10656 * linux-crisv32-low.c:
10657 * thread-db.c:
10658 * terminal.h:
10659 * target.h:
10660 * target.c:
10661 * server.h:
10662 * server.c:
10663 * remote-utils.c:
10664 * regcache.h:
10665 * utils.c:
10666 * Makefile.in:
10667 * configure.ac:
10668 * gdbserver.1: Add (C) after Copyright. Update the FSF
10669 address.
10670
10671 2005-11-13 Daniel Jacobowitz <dan@codesourcery.com>
10672
10673 * linux-arm-low.c (arm_eabi_breakpoint): New variable.
10674 (arm_breakpoint_at): Recognize both breakpoints.
10675 (the_low_target): Use the correct breakpoint instruction.
10676
10677 2005-11-02 Daniel Jacobowitz <dan@codesourcery.com>
10678
10679 * configure.srv (x86_64-*-linux*): Turn on thread_db support.
10680 * linux-x86-64-low.c (x86_64_breakpoint, x86_64_breakpoint_len)
10681 (x86_64_get_pc, x86_64_set_pc, x86_64_breakpoint_at): New.
10682 (the_low_target): Update.
10683
10684 2005-10-25 Andreas Schwab <schwab@suse.de>
10685
10686 * server.c (main): Allocate mem_buf with PBUFSIZ bytes.
10687
10688 * linux-ia64-low.c (ia64_regmap): Remove NAT registers.
10689 (ia64_num_regs): Reduce to 462.
10690
10691 2005-09-17 Daniel Jacobowitz <dan@codesourcery.com>
10692
10693 * acinclude.m4: Correct quoting.
10694 * aclocal.m4: Regenerated.
10695
10696 Suggested by SZOKOVACS Robert <szo@ies.hu>:
10697 * thread-db.c (thread_db_err_str): Handle TD_VERSION.
10698 (thread_db_init): Call thread_db_err_str.
10699 * configure.ac: Check for TD_VERSION.
10700 * config.in, configure: Regenerated.
10701
10702 2005-07-31 Kaveh R. Ghazi <ghazi@caip.rutgers.edu>
10703
10704 * server.h (error, fatal, warning): Add ATTR_FORMAT.
10705
10706 2005-07-13 Daniel Jacobowitz <dan@codesourcery.com>
10707
10708 * configure.ac: Define HAVE_LINUX_REGSETS even if PTRACE_GETREGS
10709 is not available. Define HAVE_PTRACE_GETREGS if it is.
10710 * config.in, configure: Regenerated.
10711 * configure.srv: Set srv_linux_regsets for PowerPC and PowerPC64.
10712 * linux-i386-low.c, linux-m68k-low.c: Update to use
10713 HAVE_PTRACE_GETREGS.
10714 * linux-low.c (regsets_fetch_inferior_registers)
10715 (regsets_store_inferior_registers): Only return 0 if we processed
10716 GENERAL_REGS.
10717 * linux-ppc-low.c (ppc_fill_gregset, target_regsets): New.
10718 * linux-ppc64-low.c (ppc_fill_gregset, target_regsets): New.
10719
10720 2005-07-13 Daniel Jacobowitz <dan@codesourcery.com>
10721
10722 * inferiors.c (struct thread_info): Add gdb_id.
10723 (add_thread): Add gdb_id argument.
10724 (thread_id_to_gdb_id, thread_to_gdb_id, gdb_id_to_thread_id): New.
10725 * linux-low.c (linux_create_inferior, linux_attach_lwp): Update
10726 calls to add_thread.
10727 * remote-utils.c (prepare_resume_reply: Use thread_to_gdb_id.
10728 * server.c (handle_query): Use thread_to_gdb_id.
10729 (handle_v_cont, main): Use gdb_id_to_thread_id.
10730 * server.h (add_thread): Update prototype.
10731 (thread_id_to_gdb_id, thread_to_gdb_id, gdb_id_to_thread_id): New
10732 prototypes.
10733
10734 2005-07-13 Daniel Jacobowitz <dan@codesourcery.com>
10735
10736 * linux-low.c (fetch_register, usr_store_inferior_registers): Handle
10737 left-padded registers.
10738 * linux-low.h (struct linux_target_ops): Add left_pad_xfer.
10739 * linux-ppc64-low.c (the_low_target): Set left_pad_xfer.
10740
10741 2005-07-01 Steve Ellcey <sje@cup.hp.com>
10742
10743 * configure.ac (BFD_NEED_DECLARATION): Replace with AC_CHECK_DECLS.
10744 * configure: Regenerate.
10745 * config.in: Regenerate.
10746 * server.h (NEED_DECLARATION_STRERROR):
10747 Replace with !HAVE_DECL_STRERROR.
10748
10749 2005-06-16 Daniel Jacobowitz <dan@codesourcery.com>
10750
10751 * linux-low.c (linux_wait, linux_send_signal): Don't test
10752 an unsigned long variable for > 0 if it could be MAX_ULONG.
10753 * server.c (myresume): Likewise.
10754 * target.c (set_desired_inferior): Likewise.
10755
10756 2005-06-13 Mark Kettenis <kettenis@gnu.org>
10757
10758 * configure.ac: Simplify and improve check for socklen_t.
10759 * configure, config.in: Regenerate.
10760
10761 2005-06-12 Daniel Jacobowitz <dan@codesourcery.com>
10762
10763 * acconfig.h: Remove.
10764 * configure.ac: Add a test for socklen_t. Use three-argument
10765 AC_DEFINE throughout.
10766 * config.in: Regenerated using autoheader 2.59.
10767 * configure: Regenerated.
10768
10769 * gdbreplay.c (socklen_t): Provide a default.
10770 (remote_open): Use socklen_t.
10771 * remote-utils.c (socklen_t): Provide a default.
10772 (remote_open): Use socklen_t.
10773 (convert_int_to_ascii, convert_ascii_to_int, decode_M_packet): Use
10774 unsigned char.
10775
10776 * i387-fp.c (struct i387_fsave, struct i387_fxsave): Use unsigned
10777 char for buffers.
10778 * linux-low.c (linux_read_memory, linux_write_memory)
10779 (linux_read_auxv): Likewise.
10780 * mem-break.c (breakpoint_data, set_breakpoint_data, check_mem_read)
10781 (check_mem_write): Likewise.
10782 * mem-break.h (set_breakpoint_data, check_mem_read, check_mem_write):
10783 Likewise.
10784 * regcache.c (struct inferior_rgcache_data, registers_to_string)
10785 (registers_from_string, register_data): Likewise.
10786 * server.c (handle_query, main): Likewise.
10787 * server.h (convert_ascii_to_int, convert_int_to_ascii)
10788 (decode_M_packet): Likewise.
10789 * target.c (read_inferior_memory, write_inferior_memory): Likewise.
10790 * target.h (struct target_ops): Update read_memory, write_memory,
10791 and read_auxv.
10792 (read_inferior_memory, write_inferior_memory): Update.
10793 * linux-low.h (struct linux_target_ops): Change type of breakpoint
10794 to unsigned char *.
10795 * linux-arm-low.c, linux-cris-low.c, linux-crisv32-low.c,
10796 linux-i386-low.c, linux-m32r-low.c, linux-m68k-low.c,
10797 linux-mips-low.c, linux-ppc-low.c, linux-ppc64-low.c,
10798 linux-s390-low.c, linux-sh-low.c: Update for changes in
10799 read_inferior_memory and the_low_target->breakpoint.
10800
10801 2005-05-28 Daniel Jacobowitz <dan@codesourcery.com>
10802
10803 * Makefile.in (SFILES): Add linux-ppc64-low.c.
10804 (linux-ppc64-low.o, reg-ppc64.c, reg-ppc64.o): New targets.
10805 * configure.srv: Add powerpc64-*-linux*.
10806 * linux-ppc64-low.c: New file.
10807
10808 2005-05-23 Orjan Friberg <orjanf@axis.com>
10809
10810 * linux-cris-low.c: New file with support for CRIS.
10811 * linux-crisv32-low.c: Ditto for CRISv32.
10812 * Makefile.in (SFILES): Add linux-cris-low.c, linux-crisv32-low.c.
10813 (clean): Add reg-cris.c and reg-crisv32.c.
10814 Add linux-cris-low.o, linux-crisv32-low.o, reg-cris.o, reg-cris.c,
10815 reg-crisv32.o, and reg-crisv32.c to make rules.
10816 * configure.srv: Add cris-*-linux* and crisv32-*-linux* to list of
10817 recognized targets.
10818
10819 2005-05-16 Ulrich Weigand <uweigand@de.ibm.com>
10820
10821 * linux-low.c (fetch_register): Ensure buffer size is a multiple
10822 of sizeof (PTRACE_XFER_TYPE).
10823 (usr_store_inferior_registers): Likewise. Zero out excess bytes.
10824
10825 2005-05-12 Orjan Friberg <orjanf@axis.com>
10826
10827 * target.h (struct target_ops): Add insert_watchpoint,
10828 remove_watchpoint, stopped_by_watchpoint, stopped_data_address function
10829 pointers for hardware watchpoint support.
10830 * linux-low.h (struct linux_target_ops): Ditto.
10831 * linux-low.c (linux_insert_watchpoint, linux_remove_watchpoint)
10832 (linux_stopped_by_watchpoint, linux_stopped_data_address): New. Add
10833 to linux_target_ops.
10834 * remote-utils.c (prepare_resume_reply): Add watchpoint information to
10835 reply packet.
10836 * server.c (main): Recognize 'Z' and 'z' packets.
10837
10838 2005-05-10 Ulrich Weigand <uweigand@de.ibm.com>
10839
10840 * linux-s390-low.c (s390_breakpoint, s390_breakpoint_len): Define.
10841 (s390_get_pc, s390_set_pc, s390_breakpoint_at): New functions.
10842 (the_low_target): Add new members.
10843
10844 2005-05-04 Daniel Jacobowitz <dan@codesourcery.com>
10845
10846 * proc-service.c (ps_lgetregs): Search all_processes instead of
10847 all_threads.
10848
10849 2005-05-04 Daniel Jacobowitz <dan@codesourcery.com>
10850
10851 * server.c (start_inferior): Change return type to int.
10852 (attach_inferior): Change sigptr to int *.
10853 (handle_v_cont, handle_v_requests): Change signal to int *.
10854 (main): Change signal to int.
10855
10856 2005-04-15 Kei Sakamoto <sakamoto.kei@renesas.com>
10857
10858 * Makefile.in: Add linux-m32r-low.o, reg-m32r.c and reg-m32r.o.
10859 * configure.srv: Add m32r*-*-linux*.
10860 * linux-m32r-low.c: New file.
10861
10862 2005-03-04 Daniel Jacobowitz <dan@codesourcery.com>
10863
10864 * Makefile.in (stamp-h): Set CONFIG_HEADERS explicitly.
10865
10866 2005-03-03 Daniel Jacobowitz <dan@codesourcery.com>
10867
10868 * inferiors.c (change_inferior_id, add_thread, find_inferior_id):
10869 Take unsigned long arguments for PIDs.
10870 * linux-low.c (add_process, linux_attach_lwp, linux_attach)
10871 (linux_thread_alive, linux_wait_for_event, kill_lwp, send_sigstop)
10872 (wait_for_sigstop, linux_resume_one_process)
10873 (regsets_fetch_inferior_registers, linux_send_signal)
10874 (linux_read_auxv): Likewise. Update the types of variables holding
10875 PIDs. Update format string specifiers.
10876 * linux-low.h (struct process_info, linux_attach_lwp): Likewise.
10877 * remote-utils.c (prepare_resume_reply): Likewise.
10878 * server.c (cont_thread, general_thread, step_thread)
10879 (thread_from_wait, old_thread_from_wait, signal_pid): Change type to
10880 unsigned long.
10881 (handle_query): Update format specifiers.
10882 (handle_v_cont, main): Use strtoul for thread IDs.
10883 * server.h (struct inferior_list_entry): Use unsigned long for ID.
10884 (add_thread, find_inferior_id, change_inferior_id, cont_thread)
10885 (general_thread, step_thread, thread_from_wait)
10886 (old_thread_from_wait): Update.
10887 * target.h (struct thread_resume): Use unsigned long for THREAD.
10888 (struct target_ops): Use unsigned long for arguments to attach and
10889 thread_alive.
10890
10891 2005-02-24 Daniel Jacobowitz <dan@codesourcery.com>
10892
10893 * acinclude.m4: Include bfd/bfd.m4 directly.
10894 * configure.ac: Use AC_ARG_PROGRAM. Suggested by Aron Griffis
10895 <agriffis@toolchain.org>.
10896 * aclocal.m4, configure: Regenerated.
10897
10898 2005-01-07 Andrew Cagney <cagney@gnu.org>
10899
10900 * configure.ac: Rename configure.in, require autoconf 2.59.
10901 * configure: Re-generate.
10902
10903 2004-12-08 Daniel Jacobowitz <dan@debian.org>
10904
10905 * acinclude.m4 (SRV_CHECK_THREAD_DB): Add ps_get_thread_area. Reset
10906 LIBS when finished.
10907 * aclocal.m4: Regenerated.
10908 * configure: Regenerated.
10909
10910 2004-11-21 Andreas Schwab <schwab@suse.de>
10911
10912 * linux-m68k-low.c (m68k_num_gregs): Define.
10913 (m68k_fill_gregset, m68k_store_gregset, m68k_fill_fpregset)
10914 (m68k_store_fpregset, target_regsets) [HAVE_LINUX_REGSETS]: New.
10915 (m68k_breakpoint, m68k_breakpoint_len, m68k_get_pc, m68k_set_pc)
10916 (m68k_breakpoint_at): New. Add to the_low_target.
10917
10918 * configure.srv (m68*-*-linux*): Set srv_linux_regsets and
10919 srv_linux_thread_db to yes.
10920
10921 2004-10-20 Joel Brobecker <brobecker@gnat.com>
10922
10923 * linux-x86-64-low.c (ARCH_SET_GS): Add definition if missing.
10924 (ARCH_SET_FS): Likewise.
10925 (ARCH_GET_FS): Likewise.
10926 (ARCH_GET_GS): Likewise.
10927
10928 2004-10-16 Daniel Jacobowitz <dan@debian.org>
10929
10930 * linux-i386-low.c (ps_get_thread_area): New.
10931 * linux-x86-64-low.c (ps_get_thread_area): New.
10932 * linux-low.c: Include <sys/syscall.h>.
10933 (linux_kill_one_process): Don't kill the first thread here.
10934 (linux_kill): Kill the first thread here.
10935 (kill_lwp): New function.
10936 (send_sigstop, linux_send_signal): Use it.
10937 * proc-service.c: Clean up #ifdefs.
10938 (fpregset_info): Delete.
10939 (ps_lgetregs): Update and enable implementation.
10940 (ps_lsetregs, ps_lgetfpregs, ps_lsetfpregs): Remove disabled
10941 implementations.
10942 * remote-utils.c (struct sym_cache, symbol_cache): New.
10943 (input_interrupt): Print a clearer message.
10944 (async_io_enabled): New variable.
10945 (enable_async_io, disable_async_io): Use it. Update comments.
10946 (look_up_one_symbol): Use the symbol cache.
10947 * thread-db.c (thread_db_look_up_symbols): New function.
10948 (thread_db_init): Update comments. Call thread_db_look_up_symbols.
10949
10950 2004-10-16 Daniel Jacobowitz <dan@debian.org>
10951
10952 * configure.in: Test for -rdynamic.
10953 * configure: Regenerated.
10954 * Makefile (INTERNAL_LDFLAGS): New.
10955 (gdbserver, gdbreplay): Use it.
10956
10957 2004-09-02 Andrew Cagney <cagney@gnu.org>
10958
10959 * Makefile.in (TAGS): Replace TM_FILE with DEPRECATED_TM_FILE.
10960
10961 2004-03-23 Daniel Jacobowitz <drow@mvista.com>
10962
10963 * linux-low.c (linux_wait): Clear all_processes list also.
10964
10965 2004-03-12 Daniel Jacobowitz <drow@mvista.com>
10966
10967 * linux-low.c: Include <errno.h>. Remove extern declaration of
10968 errno.
10969
10970 2004-03-12 Daniel Jacobowitz <drow@mvista.com>
10971
10972 * gdbreplay.c, server.h, utils.c: Update copyright years.
10973
10974 2004-03-04 Nathan J. Williams <nathanw@wasabisystems.com>
10975
10976 * server.c (main): Print child status or termination signal from
10977 variable 'signal', not 'sig'.
10978
10979 2004-03-04 Nathan J. Williams <nathanw@wasabisystems.com>
10980
10981 * linux-low.c (linux_read_memory): Change return type to
10982 int. Check for and return error from ptrace().
10983 * target.c (read_inferior_memory): Change return type to int. Pass
10984 back return status from the_target->read_memory().
10985 * target.h (struct target_ops): Adapt *read_memory() prototype.
10986 Update comment.
10987 (read_inferior_memory): Adapt prototype.
10988 * server.c (main): Return an error packet if
10989 read_inferior_memory() returns an error.
10990
10991 2004-03-04 Daniel Jacobowitz <drow@mvista.com>
10992
10993 * Makefile.in (distclean): Remove config.h, stamp-h, and config.log.
10994 Unify with other clean targets.
10995
10996 2004-02-29 Daniel Jacobowitz <drow@mvista.com>
10997
10998 * server.c (handle_v_cont): Call set_desired_inferior.
10999
11000 2004-02-29 Daniel Jacobowitz <drow@mvista.com>
11001
11002 * remote-utils.c (prepare_resume_reply): Always supply "thread:".
11003
11004 2004-02-29 Daniel Jacobowitz <drow@mvista.com>
11005
11006 * linux-low.c (linux_wait): Unblock async I/O.
11007 (linux_resume): Block and enable async I/O.
11008 * remote-utils.c (block_async_io, unblock_async_io): New functions.
11009 * server.h (block_async_io, unblock_async_io): Add prototypes.
11010
11011 2004-02-29 Daniel Jacobowitz <drow@mvista.com>
11012
11013 * remote-utils.c (remote_open): Print a status notice after
11014 opening a TCP port.
11015 * server.c (attach_inferior): Print a status notice after
11016 attaching.
11017
11018 2004-02-29 Daniel Jacobowitz <drow@mvista.com>
11019
11020 * linux-arm-low.c (arm_get_pc): Print out stop PC in debug mode.
11021
11022 2004-02-26 Daniel Jacobowitz <drow@mvista.com>
11023
11024 * remote-utils.c (write_enn): Use "E01" instead of "ENN" for the
11025 error packet.
11026 * server.c, target.h: Update copyright years.
11027
11028 2004-02-25 Roland McGrath <roland@redhat.com>
11029
11030 * target.h (struct target_ops): New member `read_auxv'.
11031 * server.c (handle_query): Handle qPart:auxv:read: query using that.
11032 * linux-low.c (linux_read_auxv): New function.
11033 (linux_target_ops): Initialize `read_auxv' member to that.
11034
11035 2004-02-17 Ulrich Weigand <Ulrich.Weigand@de.ibm.com>
11036
11037 Committed by Jim Blandy <jimb@redhat.com>.
11038
11039 * linux-s390-low.c (s390_num_regs): Update.
11040 (s390_regmap): Remove control registers. Use __s390x__ predefine
11041 instead of GPR_SIZE to distiguish s390 and s390x targets.
11042
11043 2004-01-31 Daniel Jacobowitz <drow@mvista.com>
11044
11045 * linux-low.c: Update copyright year.
11046 (check_removed_breakpoint): Clear pending_is_breakpoint.
11047 (linux_set_resume_request, linux_queue_one_thread)
11048 (resume_status_pending_p): New functions.
11049 (linux_continue_one_thread): Use process->resume.
11050 (linux_resume): Only resume threads if there are no pending events.
11051 * linux-low.h (struct process_info): Add resume request
11052 pointer.
11053
11054 2004-01-30 Daniel Jacobowitz <drow@mvista.com>
11055
11056 * regcache.c (new_register_cache): Clear the allocated register
11057 buffer. Suggested by Atsushi Nemoto <anemo@mba.ocn.ne.jp>.
11058
11059 2003-10-13 Daniel Jacobowitz <drow@mvista.com>
11060
11061 * linux-low.c (linux_resume): Take a struct thread_resume *
11062 argument.
11063 (linux_wait): Update call.
11064 (resume_ptr): New static variable.
11065 (linux_continue_one_thread): Renamed from
11066 linux_continue_one_process. Use resume_ptr.
11067 (linux_resume): Use linux_continue_one_thread.
11068 * server.c (handle_v_cont, handle_v_requests): New functions.
11069 (myresume): New function.
11070 (main): Handle 'v' case.
11071 * target.h (struct thread_resume): New type.
11072 (struct target_ops): Change argument of "resume" to struct
11073 thread_resume *.
11074 (myresume): Delete macro.
11075
11076 2003-08-08 H.J. Lu <hongjiu.lu@intel.com>
11077
11078 * Makefile.in (install-only): Create dest dir. Support DESTDIR.
11079 (uninstall): Support DESTDIR.
11080
11081 Mon Jul 21 20:09:34 UTC 2003 Brendan Conoboy <blc@redhat.com>
11082
11083 * configure.srv: Add xscale*linux copy of arm*linux entry.
11084
11085 2003-07-24 Daniel Jacobowitz <drow@mvista.com>
11086
11087 * linux-arm-low.c (arm_reinsert_addr): New function.
11088 (the_low_target): Add arm_reinsert_addr.
11089
11090 2003-07-08 Mark Kettenis <kettenis@gnu.org>
11091
11092 * mem-break.c: Remove whitespace at end of file.
11093
11094 2003-06-28 Daniel Jacobowitz <drow@mvista.com>
11095
11096 * configure.in: Check whether we need to prototype strerror.
11097 * server.h: Optionally prototype strerror.
11098 * gdbreplay.c (perror_with_name): Use strerror.
11099 * linux-low.c (linux_attach_lwp): Use strerror.
11100 * utils.c (perror_with_name): Use strerror.
11101 * config.in, configure: Regenerated.
11102
11103 2003-06-28 Daniel Jacobowitz <drow@mvista.com>
11104
11105 * linux-sh-low.c (sh_regmap): Fix FP register offsets, reported by
11106 SUGIOKA Toshinobu <sugioka@itonet.co.jp>.
11107
11108 2003-06-20 Daniel Jacobowitz <drow@mvista.com>
11109
11110 * Makefile.in (SFILES): Update.
11111 * low-hppabsd.c, low-lynx.c, low-nbsd.c, low-sim.c, low-sparc.c,
11112 low-sun3.c: Remove files.
11113
11114 2003-06-17 Daniel Jacobowitz <drow@mvista.com>
11115
11116 * linux-low.c: Move comment to linux_thread_alive where it belonged.
11117 (linux_detach_one_process, linux_detach): New functions.
11118 (linux_target_ops): Add linux_detach.
11119 * server.c (main): Handle 'D' packet.
11120 * target.h (struct target_ops): Add "detach" member.
11121 (detach_inferior): Define.
11122
11123 2003-06-13 Mark Kettenis <kettenis@gnu.org>
11124
11125 From Kelley Cook <kelleycook@wideopenwest.com>:
11126 * configure.srv: Accept i[34567]86 variants.
11127
11128 2003-06-05 Daniel Jacobowitz <drow@mvista.com>
11129
11130 * linux-low.c (linux_wait_for_event): Correct comment typos.
11131 (linux_resume_one_process): Call check_removed_breakpoint.
11132 (linux_send_signal): New function.
11133 (linux_target_ops): Add linux_send_signal.
11134 * remote-utils.c (putpkt, input_interrupt): Use send_signal instead
11135 of kill.
11136 * target.h (struct target_ops): Add send_signal.
11137
11138 2003-05-29 Jim Blandy <jimb@redhat.com>
11139
11140 * linux-low.c (usr_store_inferior_registers): Transfer buf in
11141 PTRACE_XFER_TYPE-sized chunks, not int-sized chunks. Otherwise,
11142 if 'int' is smaller than PTRACE_XFER_TYPE, you end up throwing
11143 away part of the register's value.
11144
11145 2003-03-26 Daniel Jacobowitz <drow@mvista.com>
11146
11147 * linux-low.c (linux_create_inferior): Use __SIGRTMIN.
11148 (linux_wait_for_event, linux_init_signals): Likewise.
11149
11150 2003-03-17 Daniel Jacobowitz <drow@mvista.com>
11151
11152 * configure.in: Check for stdlib.h.
11153 * configure: Regenerated.
11154 * config.in: Regenerated.
11155
11156 2003-01-04 Andreas Schwab <schwab@suse.de>
11157
11158 * linux-m68k-low.c (m68k_num_regs): Define to 29 instead of 31.
11159
11160 2003-01-02 Andrew Cagney <ac131313@redhat.com>
11161
11162 * Makefile.in: Remove obsolete code.
11163
11164 2002-11-20 Daniel Jacobowitz <drow@mvista.com>
11165
11166 * linux-s390-low.c (s390_regmap): Check GPR_SIZE instead of
11167 defined(PT_FPR0_HI).
11168
11169 2002-11-17 Stuart Hughes <seh@zee2.com>
11170
11171 * linux-arm-low.c (arm_num_regs): Increase.
11172 (arm_regmap): Include status register.
11173
11174 2002-11-17 Daniel Jacobowitz <drow@mvista.com>
11175
11176 * linux-low.c (register_addr): Remove incorrect -1 check.
11177
11178 2002-08-29 Daniel Jacobowitz <drow@mvista.com>
11179
11180 * linux-low.c (linux_create_inferior): Call setpgid. Return
11181 the new PID.
11182 (unstopped_p, linux_signal_pid): Remove.
11183 (linux_target_ops): Remove linux_signal_pid.
11184 * remote-utils.c (putpkt, input_interrupt): Use signal_pid
11185 global instead of target method.
11186 * target.h (struct target_ops): Remove signal_pid. Update comment
11187 for create_inferior.
11188 * server.c (signal_pid): New variable.
11189 (create_inferior): Set signal_pid. Block SIGTTOU and SIGTTIN in
11190 gdbserver. Set the child to be the foreground process group.
11191 (attach_inferior): Set signal_pid.
11192
11193 2002-08-23 Daniel Jacobowitz <drow@mvista.com>
11194
11195 * ChangeLog: New file, with entries from gdb/ChangeLog after GDB 5.2.
11196
11197 2002-08-20 Jim Blandy <jimb@redhat.com>
11198
11199 * Makefile.in (LDFLAGS): Allow the configure script to establish a
11200 default for this.
11201
11202 2002-08-01 Andrew Cagney <cagney@redhat.com>
11203
11204 * Makefile.in: Make chill references obsolete.
11205
11206 2002-07-24 Kevin Buettner <kevinb@redhat.com>
11207
11208 * configure.in (unistd.h): Add to AC_CHECK_HEADERS list.
11209 * configure: Regenerate.
11210 * config.in: Regenerate.
11211
11212 2002-07-09 David O'Brien <obrien@FreeBSD.org>
11213
11214 * gdbreplay.c (stdlib.h, unistd.h): Conditionaly include.
11215 (perror_with_name, remote_close, remote_open, expect, play): Static.
11216
11217 2002-07-04 Michal Ludvig <mludvig@suse.cz>
11218
11219 * linux-x86-64-low.c (x86_64_regmap): Make it an array of
11220 byte offsets instead of an array of indexes.
11221 (x86_64_store_gregset, x86_64_store_fpregset): Parameter made const.
11222
11223 2002-06-13 Daniel Jacobowitz <drow@mvista.com>
11224
11225 * regcache.c: Add comment.
11226
11227 2002-06-11 Daniel Jacobowitz <drow@mvista.com>
11228
11229 * thread-db.c: New file.
11230 * proc-service.c: New file.
11231 * acinclude.m4: New file.
11232 * Makefile.in: Add GDBSERVER_LIBS, gdb_proc_service_h,
11233 proc-service.o, and thread-db.o.
11234 (linux-low.o): Add USE_THREAD_DB.
11235 * acconfig.h: Add HAVE_PRGREGSET_T, HAVE_PRFPREGSET_T,
11236 HAVE_LWPID_T, HAVE_PSADDR_T, and PRFPREGSET_T_BROKEN.
11237 * aclocal.m4: Regenerated.
11238 * config.in: Regenerated.
11239 * configure: Regenerated.
11240 * configure.in: Check for proc_service.h, sys/procfs.h,
11241 thread_db.h, and linux/elf.h headrs.
11242 Check for lwpid_t, psaddr_t, prgregset_t, prfpregset_t, and
11243 PRFPREGSET_T_BROKEN. Introduce srv_thread_depfiles and USE_THREAD_DB.
11244 Check for -lthread_db and thread support.
11245 * configure.srv: Enable thread_db support for ARM, i386, MIPS,
11246 PowerPC, and SuperH.
11247 * i387-fp.c: Constify arguments.
11248 * i387-fp.h: Likewise.
11249 * inferiors.c: (struct thread_info): Renamed from
11250 `struct inferior_info'. Remove PID member. Use generic inferior
11251 list header. All uses updated.
11252 (inferiors, signal_pid): Removed.
11253 (all_threads): New variable.
11254 (get_thread): Define.
11255 (add_inferior_to_list): New function.
11256 (for_each_inferior): New function.
11257 (change_inferior_id): New function.
11258 (add_inferior): Removed.
11259 (remove_inferior): New function.
11260 (add_thread): New function.
11261 (free_one_thread): New function.
11262 (remove_thread): New function.
11263 (clear_inferiors): Use for_each_inferior and free_one_thread.
11264 (find_inferior): New function.
11265 (find_inferior_id): New function.
11266 (inferior_target_data): Update argument type.
11267 (set_inferior_target_data): Likewise.
11268 (inferior_regcache_data): Likewise.
11269 (set_inferior_regcache_data): Likewise.
11270 * linux-low.c (linux_bp_reinsert): Remove.
11271 (all_processes, stopping_threads, using_thrads)
11272 (struct pending_signals, debug_threads, pid_of): New.
11273 (inferior_pid): Replace with macro.
11274 (struct inferior_linux_data): Remove.
11275 (get_stop_pc, add_process): New functions.
11276 (linux_create_inferior): Restore SIGRTMIN+1 before calling exec.
11277 Use add_process and add_thread.
11278 (linux_attach_lwp): New function, based on old linux_attach. Use
11279 add_process and add_thread. Set stop_expected for new threads.
11280 (linux_attach): New function.
11281 (linux_kill_one_process): New function.
11282 (linux_kill): Kill all LWPs.
11283 (linux_thread_alive): Use find_inferior_id.
11284 (check_removed_breakpoints, status_pending_p): New functions.
11285 (linux_wait_for_process): Renamed from linux_wait_for_one_inferior.
11286 Update. Use WNOHANG. Wait for cloned processes also. Update process
11287 struct for the found process.
11288 (linux_wait_for_event): New function.
11289 (linux_wait): Use it. Support LWPs.
11290 (send_sigstop, wait_for_sigstop, stop_all_processes)
11291 (linux_resume_one_process, linux_continue_one_process): New functions.
11292 (linux_resume): Support LWPs.
11293 (REGISTER_RAW_SIZE): Remove.
11294 (fetch_register): Use register_size instead. Call supply_register.
11295 (usr_store_inferior_registers): Likewise. Call collect_register.
11296 Fix recursive case.
11297 (regsets_fetch_inferior_registers): Improve error message.
11298 (regsets_store_inferior_registers): Add debugging.
11299 (linux_look_up_symbols): Call thread_db_init if USE_THREAD_DB.
11300 (unstopped_p, linux_signal_pid): New functions.
11301 (linux_target_ops): Add linux_signal_pid.
11302 (linux_init_signals): New function.
11303 (initialize_low): Call it. Initialize using_threads.
11304 * regcache.c (inferior_regcache_data): Add valid
11305 flag.
11306 (get_regcache): Fetch registers lazily. Add fetch argument
11307 and update all callers.
11308 (regcache_invalidate_one, regcache_invalidate): New
11309 functions.
11310 (new_register_cache): Renamed from create_register_cache.
11311 Return the new regcache.
11312 (free_register_cache): Change argument to a void *.
11313 (registers_to_string, registers_from_string): Call get_regcache
11314 with fetch flag set.
11315 (register_data): Make static. Pass fetch flag to get_regcache.
11316 (supply_register): Call get_regcache with fetch flag clear.
11317 (collect_register): Call get_regcache with fetch flag set.
11318 (collect_register_as_string): New function.
11319 * regcache.h: Update.
11320 * remote-utils.c (putpkt): Flush after debug output and use
11321 stderr.
11322 Handle input interrupts while waiting for an ACK.
11323 (input_interrupt): Use signal_pid method.
11324 (getpkt): Flush after debug output and use stderr.
11325 (outreg): Use collect_register_as_string.
11326 (new_thread_notify, dead_thread_notify): New functions.
11327 (prepare_resume_reply): Check using_threads. Set thread_from_wait
11328 and general_thread.
11329 (look_up_one_symbol): Flush after debug output.
11330 * server.c (step_thread, server_waiting): New variables.
11331 (start_inferior): Don't use signal_pid. Update call to mywait.
11332 (attach_inferior): Update call to mywait.
11333 (handle_query): Handle qfThreadInfo and qsThreadInfo.
11334 (main): Don't fetch/store registers explicitly. Use
11335 set_desired_inferior. Support proposed ``Hs'' packet. Update
11336 calls to mywait.
11337 * server.h: Update.
11338 (struct inferior_list, struct_inferior_list_entry): New.
11339 * target.c (set_desired_inferior): New.
11340 (write_inferior_memory): Constify.
11341 (mywait): New function.
11342 * target.h: Update.
11343 (struct target_ops): New signal_pid method.
11344 (mywait): Removed macro, added prototype.
11345
11346 * linux-low.h (regset_func): Removed.
11347 (regset_fill_func, regset_store_func): New.
11348 (enum regset_type): New.
11349 (struct regset_info): Add type field. Use new operation types.
11350 (struct linux_target_ops): stop_pc renamed to get_pc.
11351 Add decr_pc_after_break and breakpoint_at.
11352 (get_process, get_thread_proess, get_process_thread)
11353 (strut process_info, all_processes, linux_attach_lwp)
11354 (thread_db_init): New.
11355
11356 * linux-arm-low.c (arm_get_pc, arm_set_pc,
11357 arm_breakpoint, arm_breakpoint_len, arm_breakpoint_at): New.
11358 (the_low_target): Add new members.
11359 * linux-i386-low.c (i386_store_gregset, i386_store_fpregset)
11360 (i386_store_fpxregset): Constify.
11361 (target_regsets): Add new kind identifier.
11362 (i386_get_pc): Renamed from i386_stop_pc. Simplify.
11363 (i386_set_pc): Add debugging.
11364 (i386_breakpoint_at): New function.
11365 (the_low_target): Add new members.
11366 * linux-mips-low.c (mips_get_pc, mips_set_pc)
11367 (mips_breakpoint, mips_breakpoint_len, mips_reinsert_addr)
11368 (mips_breakpoint_at): New.
11369 (the_low_target): Add new members.
11370 * linux-ppc-low.c (ppc_get_pc, ppc_set_pc)
11371 (ppc_breakpoint, ppc_breakpoint_len, ppc_breakpoint_at): New.
11372 (the_low_target): Add new members.
11373 * linux-sh-low.c (sh_get_pc, sh_set_pc)
11374 (sh_breakpoint, sh_breakpoint_len, sh_breakpoint_at): New.
11375 (the_low_target): Add new members.
11376 * linux-x86-64-low.c (target_regsets): Add new kind
11377 identifier.
11378
11379 2002-05-15 Daniel Jacobowitz <drow@mvista.com>
11380
11381 From Martin Pool <mbp@samba.org>:
11382 * server.c (gdbserver_usage): New function.
11383 (main): Call it.
11384
11385 2002-05-14 Daniel Jacobowitz <drow@mvista.com>
11386
11387 * mem-break.c (reinsert_breakpoint_by_bp): Correct typo
11388 stop_at -> stop_pc.
11389
11390 2002-05-04 Andrew Cagney <ac131313@redhat.com>
11391
11392 * Makefile.in: Remove obsolete code.
11393
11394 2002-04-24 Michal Ludvig <mludvig@suse.cz>
11395
11396 * linux-low.c (regsets_fetch_inferior_registers),
11397 (regsets_store_inferior_registers): Removed cast to int from
11398 ptrace() calls.
11399 * regcache.h: Added declaration of struct inferior_info.
11400
11401 2002-04-20 Daniel Jacobowitz <drow@mvista.com>
11402
11403 * inferiors.c (struct inferior_info): Add regcache_data.
11404 (add_inferior): Call create_register_cache.
11405 (clear_inferiors): Call free_register_cache.
11406 (inferior_regcache_data, set_inferior_regcache_data): New functions.
11407 * regcache.c (struct inferior_regcache_data): New.
11408 (registers): Remove.
11409 (get_regcache): New function.
11410 (create_register_cache, free_register_cache): New functions.
11411 (set_register_cache): Don't initialize the register cache here.
11412 (registers_to_string, registers_from_string, register_data): Call
11413 get_regcache.
11414 * regcache.h: Add prototypes.
11415 * server.h: Likewise.
11416
11417 2002-04-20 Daniel Jacobowitz <drow@mvista.com>
11418
11419 * mem-break.c: New file.
11420 * mem-break.h: New file.
11421 * Makefile.in: Add mem-break.o rule; update server.h
11422 dependencies.
11423 * inferiors.c (struct inferior_info): Add target_data
11424 member.
11425 (clear_inferiors): Free target_data member if set.
11426 (inferior_target_data, set_inferior_target_data): New functions.
11427 * linux-i386-low.c (i386_breakpoint, i386_breakpoint_len)
11428 (i386_stop_pc, i386_set_pc): New. Add to the_low_target.
11429 * linux-low.c (linux_bp_reinsert): New variable.
11430 (struct inferior_linux_data): New.
11431 (linux_create_inferior): Use set_inferior_target_data.
11432 (linux_attach): Likewise. Call add_inferior.
11433 (linux_wait_for_one_inferior): New function.
11434 (linux_wait): Call it.
11435 (linux_write_memory): Add const.
11436 (initialize_low): Call set_breakpoint_data.
11437 * linux-low.h (struct linux_target_ops): Add breakpoint
11438 handling members.
11439 * server.c (attach_inferior): Remove extra add_inferior
11440 call.
11441 * server.h: Include mem-break.h. Update inferior.c
11442 prototypes.
11443 * target.c (read_inferior_memory)
11444 (write_inferior_memory): New functions.
11445 * target.h (read_inferior_memory)
11446 (write_inferior_memory): Change macros to prototypes.
11447 (struct target_ops): Update comments. Add const to write_memory
11448 definition.
11449
11450 2002-04-11 Daniel Jacobowitz <drow@mvista.com>
11451
11452 * linux-low.c (usr_store_inferior_registers): Support
11453 registers which are allowed to fail to store.
11454 * linux-low.h (linux_target_ops): Likewise.
11455 * linux-ppc-low.c (ppc_regmap): Support FPSCR.
11456 (ppc_cannot_store_register): FPSCR may not be storable.
11457
11458 2002-04-09 Daniel Jacobowitz <drow@mvista.com>
11459
11460 * server.h: Include <string.h> if HAVE_STRING_H.
11461 * ChangeLog: Correct paths in last ChangeLog entry.
11462
11463 2002-04-09 Daniel Jacobowitz <drow@mvista.com>
11464
11465 * linux-low.h: Remove obsolete prototypes.
11466 (struct linux_target_ops): New.
11467 (extern the_low_target): New.
11468 * linux-low.c (num_regs, regmap): Remove declarations.
11469 (register_addr): Use the_low_target explicitly.
11470 (fetch_register): Likewise.
11471 (usr_fetch_inferior_registers): Likewise.
11472 (usr_store_inferior_registers): Likewise.
11473 * linux-arm-low.c (num_regs): Remove.
11474 (arm_num_regs): Define.
11475 (arm_regmap): Renamed from regmap, made static.
11476 (arm_cannot_fetch_register): Renamed from cannot_fetch_register,
11477 made static.
11478 (arm_cannot_store_register): Renamed from cannot_store_register,
11479 made static.
11480 (the_low_target): New.
11481 * linux-i386-low.c (num_regs): Remove.
11482 (i386_num_regs): Define.
11483 (i386_regmap): Renamed from regmap, made static.
11484 (i386_cannot_fetch_register): Renamed from cannot_fetch_register,
11485 made static.
11486 (i386_cannot_store_register): Renamed from cannot_store_register,
11487 made static.
11488 (the_low_target): New.
11489 * linux-ia64-low.c (num_regs): Remove.
11490 (ia64_num_regs): Define.
11491 (ia64_regmap): Renamed from regmap, made static.
11492 (ia64_cannot_fetch_register): Renamed from cannot_fetch_register,
11493 made static.
11494 (ia64_cannot_store_register): Renamed from cannot_store_register,
11495 made static.
11496 (the_low_target): New.
11497 * linux-m68k-low.c (num_regs): Remove.
11498 (m68k_num_regs): Define.
11499 (m68k_regmap): Renamed from regmap, made static.
11500 (m68k_cannot_fetch_register): Renamed from cannot_fetch_register,
11501 made static.
11502 (m68k_cannot_store_register): Renamed from cannot_store_register,
11503 made static.
11504 (the_low_target): New.
11505 * linux-mips-low.c (num_regs): Remove.
11506 (mips_num_regs): Define.
11507 (mips_regmap): Renamed from regmap, made static.
11508 (mips_cannot_fetch_register): Renamed from cannot_fetch_register,
11509 made static.
11510 (mips_cannot_store_register): Renamed from cannot_store_register,
11511 made static.
11512 (the_low_target): New.
11513 * linux-ppc-low.c (num_regs): Remove.
11514 (ppc_num_regs): Define.
11515 (ppc_regmap): Renamed from regmap, made static.
11516 (ppc_cannot_fetch_register): Renamed from cannot_fetch_register,
11517 made static.
11518 (ppc_cannot_store_register): Renamed from cannot_store_register,
11519 made static.
11520 (the_low_target): New.
11521 * linux-s390-low.c (num_regs): Remove.
11522 (s390_num_regs): Define.
11523 (s390_regmap): Renamed from regmap, made static.
11524 (s390_cannot_fetch_register): Renamed from cannot_fetch_register,
11525 made static.
11526 (s390_cannot_store_register): Renamed from cannot_store_register,
11527 made static.
11528 (the_low_target): New.
11529 * linux-sh-low.c (num_regs): Remove.
11530 (sh_num_regs): Define.
11531 (sh_regmap): Renamed from regmap, made static.
11532 (sh_cannot_fetch_register): Renamed from cannot_fetch_register,
11533 made static.
11534 (sh_cannot_store_register): Renamed from cannot_store_register,
11535 made static.
11536 (the_low_target): New.
11537 * linux-x86-64-low.c (x86_64_regmap): Renamed from regmap.
11538 (the_low_target): New.
11539
11540 2002-04-09 Daniel Jacobowitz <drow@mvista.com>
11541
11542 * Makefile.in: Add stamp-h target.
11543 * configure.in: Create stamp-h.
11544 * configure: Regenerated.
11545
11546 2002-04-09 Daniel Jacobowitz <drow@mvista.com>
11547
11548 * inferiors.c: New file.
11549 * target.c: New file.
11550 * target.h: New file.
11551 * Makefile.in: Add target.o and inferiors.o. Update
11552 dependencies.
11553 * linux-low.c (inferior_pid): New static variable,
11554 moved from server.c.
11555 (linux_create_inferior): Renamed from create_inferior.
11556 Call add_inferior. Return 0 on success instead of a PID.
11557 (linux_attach): Renamed from myattach.
11558 (linux_kill): Renamed from kill_inferior. Call clear_inferiors ().
11559 (linux_thread_alive): Renamed from mythread_alive.
11560 (linux_wait): Renamed from mywait. Call clear_inferiors () if the
11561 child dies.
11562 (linux_resume): Renamed from myresume. Add missing ``return 0''.
11563 (regsets_store_inferior_registers): Correct error message.
11564 Add missing ``return 0''.
11565 (linux_fetch_registers): Renamed from fetch_inferior_registers.
11566 (linux_store_registers): Renamed from store_inferior_registers.
11567 (linux_read_memory): Renamed from read_inferior_memory.
11568 (linux_write_memory): Renamed from write_inferior_memory.
11569 (linux_target_ops): New structure.
11570 (initialize_low): Call set_target_ops ().
11571 * remote-utils.c (unhexify): New function.
11572 (hexify): New function.
11573 (input_interrupt): Send signals to ``signal_pid''.
11574 * server.c (inferior_pid): Remove.
11575 (start_inferior): Update create_inferior call.
11576 (attach_inferior): Call add_inferior.
11577 (handle_query): New function.
11578 (main): Call handle_query for `q' packets.
11579 * server.h: Include "target.h". Remove obsolete prototypes.
11580 Add prototypes for "inferiors.c", "target.c", hexify, and unhexify.
11581
11582 2002-04-09 Daniel Jacobowitz <drow@mvista.com>
11583
11584 * Makefile.in: Add WARN_CFLAGS. Update configury
11585 dependencies.
11586 * configure.in: Check for <string.h>
11587 * configure: Regenerate.
11588 * config.in: Regenerate.
11589 * gdbreplay.c: Include needed system headers.
11590 (remote_open): Remove strchr prototype.
11591 * linux-low.h: Correct #ifdef to HAVE_LINUX_USRREGS.
11592 * regcache.c (supply_register): Change buf argument to const void *.
11593 (supply_register_by_name): Likewise.
11594 (collect_register): Change buf argument to void *.
11595 (collect_register_by_name): Likewise.
11596 * regcache.h: Add missing prototypes.
11597 * remote-utils.c: Include <arpa/inet.h> for inet_ntoa.
11598 * server.c (handle_query): New function.
11599 (attached): New static variable, moved out of main.
11600 (main): Quiet longjmp clobber warnings.
11601 * server.h: Add ATTR_NORETURN and ATTR_FORMAT. Update prototypes.
11602 * utils.c (error): Remove NORETURN.
11603 (fatal): Likewise.
This page took 0.273309 seconds and 4 git commands to generate.