Test --wrapper when restarting process.
[deliverable/binutils-gdb.git] / gdb / gdbserver / ChangeLog
CommitLineData
51aee833
YQ
12015-07-24 Yao Qi <yao.qi@linaro.org>
2
3 * server.c (process_serial_event): Set general_thread.
4
af1b22f3
YQ
52015-07-21 Yao Qi <yao.qi@linaro.org>
6
7 * linux-aarch64-low.c (aarch64_arch_setup): Remove code and call
8 aarch64_linux_get_debug_reg_capacity.
9
554717a3
YQ
102015-07-17 Yao Qi <yao.qi@linaro.org>
11
12 * Makefile.in (aarch64-linux-hw-point.o): New rule.
13 * configure.srv (srv_tgtobj): Append aarch64-linux-hw-point.o.
14 * linux-aarch64-low.c: Include nat/aarch64-linux-hw-point.h.
15 (AARCH64_HBP_MAX_NUM): Move to nat/aarch64-linux-hw-point.h.
16 (AARCH64_HWP_MAX_NUM, AARCH64_HBP_ALIGNMENT): Likewise.
17 (AARCH64_HWP_ALIGNMENT): Likewise.
18 (AARCH64_HWP_MAX_LEN_PER_REG): Likewise.
19 (AARCH64_DEBUG_NUM_SLOTS, AARCH64_DEBUG_ARCH): Likewise.
20 (aarch64_num_bp_regs, aarch64_num_wp_regs): Likewise.
21 (AARCH64_DEBUG_ARCH_V8, DR_MARK_ALL_CHANGED): Likewise.
22 (DR_MARK_N_CHANGED, DR_CLEAR_CHANGED): Likewise.
23 (DR_HAS_CHANGED, DR_N_HAS_CHANGE): Likewise.
24 (struct aarch64_debug_reg_state): Likewise.
25 (struct arch_lwp_info): Likewise.
26 (aarch64_align_watchpoint): Likewise.
27 (DR_CONTROL_ENABLED, DR_CONTROL_LENGTH): Likewise.
28 (aarch64_watchpoint_length): Likewise.
29 (aarch64_point_encode_ctrl_reg): Likewise
30 (aarch64_point_is_aligned): Likewise.
31 (aarch64_align_watchpoint): Likewise.
32 (aarch64_linux_set_debug_regs):
33 (aarch64_dr_state_insert_one_point): Likewise.
34 (aarch64_dr_state_remove_one_point): Likewise.
35 (aarch64_handle_breakpoint): Likewise.
36 (aarch64_handle_aligned_watchpoint): Likewise.
37 (aarch64_handle_unaligned_watchpoint): Likewise.
38 (aarch64_handle_watchpoint): Likewise.
39
c67ca4de
YQ
402015-07-17 Yao Qi <yao.qi@linaro.org>
41
42 * linux-aarch64-low.c (aarch64_handle_breakpoint): Add argument state
43 and don't aarch64_get_debug_reg_state. All callers update.
44 (aarch64_handle_aligned_watchpoint): Likewise.
45 (aarch64_handle_unaligned_watchpoint): Likewise.
46 (aarch64_handle_watchpoint): Likewise.
47 (aarch64_insert_point): Call aarch64_get_debug_reg_state earlier.
48 (aarch64_remove_point): Likewise.
49
25abf979
YQ
502015-07-17 Yao Qi <yao.qi@linaro.org>
51
52 * linux-aarch64-low.c (aarch64_show_debug_reg_state): Use
53 debug_printf.
54 (aarch64_handle_unaligned_watchpoint): Likewise.
55
db1ff28b
JK
562015-07-15 Jan Kratochvil <jan.kratochvil@redhat.com>
57
58 Revert the previous 3 commits:
59 Move gdb_regex* to common/
60 Move linux_find_memory_regions_full & co.
61 gdbserver build-id attribute generator
62
700ca40f
JK
632015-07-15 Aleksandar Ristovski <aristovski@qnx.com
64 Jan Kratochvil <jan.kratochvil@redhat.com>
65
66 gdbserver build-id attribute generator.
67 * linux-low.c (nat/linux-maps.h, search.h, rsp-low.h): Include.
68 (ElfXX_Ehdr, ElfXX_Phdr, ElfXX_Nhdr): New.
69 (ELFXX_FLD, ELFXX_SIZEOF, ELFXX_ROUNDUP, BUILD_ID_INVALID): New.
70 (find_phdr): New.
71 (get_dynamic): Use find_pdhr to traverse program headers.
72 (struct mapping_entry, mapping_entry_s, free_mapping_entry_vec)
73 (compare_mapping_entry_range, struct find_memory_region_callback_data)
74 (read_build_id, find_memory_region_callback, lrfind_mapping_entry)
75 (get_hex_build_id): New.
76 (linux_qxfer_libraries_svr4): Add optional build-id attribute
77 to reply XML document.
78
9904185c
JK
792015-07-15 Aleksandar Ristovski <aristovski@qnx.com
80 Jan Kratochvil <jan.kratochvil@redhat.com>
81
82 * target.c: Include target/target-utils.h and fcntl.h.
83 (target_fileio_read_stralloc_1_pread, target_fileio_read_stralloc_1)
84 (target_fileio_read_stralloc): New functions.
85
6e5b4429
JK
862015-07-15 Jan Kratochvil <jan.kratochvil@redhat.com>
87
88 * Makefile.in (OBS): Add gdb_regex.o.
89 (gdb_regex.o): New.
90 * config.in: Rebuilt.
91 * configure: Rebuilt.
92
ddc98fbf
JK
932015-07-15 Aleksandar Ristovski <aristovski@qnx.com
94 Jan Kratochvil <jan.kratochvil@redhat.com>
95
96 Create empty nat/linux-maps.[ch] and common/target-utils.[ch].
97 * Makefile.in (OBS): Add target-utils.o.
98 (linux-maps.o, target-utils.o): New.
99 * configure.srv (srv_linux_obj): Add linux-maps.o.
100
e57bb7a0
PL
1012015-07-15 Pierre Langlois <pierre.langlois@arm.com>
102
103 * linux-aarch64-low.c (aarch64_supports_range_stepping): New
104 function, return 1.
105 (the_low_target): Install it.
106
586b02a9
PA
1072015-07-14 Pedro Alves <palves@redhat.com>
108
109 * linux-low.c (kill_wait_lwp): Don't assert if waitpid fails.
110 Instead, ignore ECHILD, and throw an error for other errnos.
111
58c1b36c
PA
1122015-07-10 Pedro Alves <palves@redhat.com>
113
114 * event-loop.c (struct callback_event) <data>: Change type to
115 gdb_client_data instance instead of gdb_client_data pointer.
116 (append_callback_event): Adjust.
117
421530db
PL
1182015-07-10 Pierre Langlois <pierre.langlois@arm.com>
119
120 * linux-aarch64-low.c: Add comments for each linux_target_ops
121 method. Remove comments already covered in target_ops and
122 linux_target_ops definitions.
123 (the_low_target): Add comments for each unimplemented method.
124
c2d65f38
YQ
1252015-07-09 Yao Qi <yao.qi@linaro.org>
126
127 * linux-aarch64-low.c (aarch64_regmap): Remove.
128 (aarch64_usrregs_info): Remove.
129 (regs_info): Set field usrregs to NULL.
130
b20a6524
MM
1312015-07-02 Markus Metzger <markus.t.metzger@intel.com>
132
133 * linux-low.c: Include "rsp-low.h"
134 (linux_low_encode_pt_config, linux_low_encode_raw): New.
135 (linux_low_read_btrace): Support BTRACE_FORMAT_PT.
136 (linux_low_btrace_conf): Support BTRACE_FORMAT_PT.
137 (handle_btrace_enable_pt): New.
138 (handle_btrace_general_set): Support "pt".
139 (handle_btrace_conf_general_set): Support "pt:size".
140
96c97461
PL
1412015-06-29 Pierre Langlois <pierre.langlois@arm.com>
142
143 * linux-aarch64-low.c (aarch64_supports_z_point_type): Enable for
144 Z_PACKET_SW_BP.
145
37d66942
PL
1462015-06-29 Pierre Langlois <pierre.langlois@arm.com>
147
148 * linux-aarch64-low.c: Remove comment about endianness.
149 (aarch64_breakpoint): Change type to gdb_byte[]. Set to "brk #0".
150 (aarch64_breakpoint_at): Change type of insn to gdb_byte[]. Use
151 memcmp.
152
dc06243f
GB
1532015-06-24 Gary Benson <gbenson@redhat.com>
154
155 * linux-i386-ipa.c (stdint.h): Do not include.
156 * lynx-i386-low.c (stdint.h): Likewise.
157 * lynx-ppc-low.c (stdint.h): Likewise.
158 * mem-break.c (stdint.h): Likewise.
159 * thread-db.c (stdint.h): Likewise.
160 * tracepoint.c (stdint.h): Likewise.
161 * win32-low.c (stdint.h): Likewise.
162
124e13d9
SM
1632015-06-18 Simon Marchi <simon.marchi@ericsson.com>
164
165 * server.c (write_qxfer_response): Update call to
166 remote_escape_output.
167
909c2cda
JK
1682015-06-15 Aleksandar Ristovski <aristovski@qnx.com
169 Jan Kratochvil <jan.kratochvil@redhat.com>
170
171 Merge multiple hex conversions.
172 * gdbreplay.c (tohex): Rename to 'fromhex'.
173 (logchar): Use fromhex.
174
24c05f46
JK
1752015-06-10 Jan Kratochvil <jan.kratochvil@redhat.com>
176
177 * server.c (handle_qxfer_libraries): Set `version' attribute for
178 <library-list>.
179
14d2069a
GB
1802015-06-10 Gary Benson <gbenson@redhat.com>
181
182 * target.h (struct target_ops) <multifs_open>: New field.
183 <multifs_unlink>: Likewise.
184 <multifs_readlink>: Likewise.
185 * linux-low.c (nat/linux-namespaces.h): New include.
186 (linux_target_ops): Initialize the_target->multifs_open,
187 the_target->multifs_unlink and the_target->multifs_readlink.
188 * hostio.h (hostio_handle_new_gdb_connection): New declaration.
189 * hostio.c (hostio_fs_pid): New static variable.
190 (hostio_handle_new_gdb_connection): New function.
191 (handle_setfs): Likewise.
192 (handle_open): Use the_target->multifs_open as appropriate.
193 (handle_unlink): Use the_target->multifs_unlink as appropriate.
194 (handle_readlink): Use the_target->multifs_readlink as
195 appropriate.
196 (handle_vFile): Handle vFile:setfs packets.
197 * server.c (handle_query): Call hostio_handle_new_gdb_connection
198 after target_handle_new_gdb_connection.
199
4b8b5e72
GB
2002015-06-10 Gary Benson <gbenson@redhat.com>
201
202 * configure.ac (AC_CHECK_FUNCS): Add setns.
203 * config.in: Regenerate.
204 * configure: Likewise.
205 * Makefile.in (SFILES): Add nat/linux-namespaces.c.
206 (linux-namespaces.o): New rule.
207 * configure.srv (srv_linux_obj): Add linux-namespaces.o.
208
3ac2e371
GB
2092015-06-09 Gary Benson <gbenson@redhat.com>
210
211 * hostio.c (handle_open): Process mode argument with
212 fileio_to_host_mode.
213
ca9b78ce
YQ
2142015-06-01 Yao Qi <yao.qi@linaro.org>
215
216 * linux-s390-low.c (PTRACE_GETREGSET, PTRACE_SETREGSET): Remove.
217 * linux-x86-low.c: Likewise.
218
bfacd19d
DB
2192015-05-28 Don Breazeal <donb@codesourcery.com>
220
221 * linux-low.c (handle_extended_wait): Initialize
222 thread_info.last_resume_kind for new fork children.
223
452003ef
PA
2242015-05-15 Pedro Alves <palves@redhat.com>
225
226 * target.h (target_handle_new_gdb_connection): Rewrite using if
227 wrapped in do/while.
228
1041a03c
JB
2292015-05-14 Joel Brobecker <brobecker@adacore.com>
230
231 * configure.ac: Add prfpregset_t BFD_HAVE_SYS_PROCFS_TYPE check.
232 * configure, config.in: Regenerate.
233 * gdb_proc_service.h [HAVE_PRFPREGSET_T] (prfpregset_t):
234 Declare typedef.
235
c269dbdb
DB
2362015-05-12 Don Breazeal <donb@codesourcery.com>
237
238 * linux-low.c (handle_extended_wait): Handle PTRACE_EVENT_FORK and
239 PTRACE_EVENT_VFORK_DONE.
240 (linux_low_ptrace_options, extended_event_reported): Add vfork
241 events.
242 * remote-utils.c (prepare_resume_reply): New stop reasons "vfork"
243 and "vforkdone" for RSP 'T' Stop Reply Packet.
244 * server.h (report_vfork_events): Declare
245 global variable.
246
3a8a0396
DB
2472015-05-12 Don Breazeal <donb@codesourcery.com>
248
249 * linux-aarch64-low.c (aarch64_linux_new_fork): New function.
250 (the_low_target) <new_fork>: Initialize new member.
251 * linux-arm-low.c (arm_new_fork): New function.
252 (the_low_target) <new_fork>: Initialize new member.
253 * linux-low.c (handle_extended_wait): Call new target function
254 new_fork.
255 * linux-low.h (struct linux_target_ops) <new_fork>: New member.
256 * linux-mips-low.c (mips_add_watchpoint): New function
257 extracted from mips_insert_point.
258 (the_low_target) <new_fork>: Initialize new member.
259 (mips_linux_new_fork): New function.
260 (mips_insert_point): Call mips_add_watchpoint.
261 * linux-x86-low.c (x86_linux_new_fork): New function.
262 (the_low_target) <new_fork>: Initialize new member.
263
de0d863e
DB
2642015-05-12 Don Breazeal <donb@codesourcery.com>
265
266 * linux-low.c (handle_extended_wait): Implement return value,
267 rename argument 'event_child' to 'event_lwp', handle
268 PTRACE_EVENT_FORK, call internal_error for unrecognized event.
269 (linux_low_ptrace_options): New function.
270 (linux_low_filter_event): Call linux_low_ptrace_options,
271 use different argument fo linux_enable_event_reporting,
272 use return value from handle_extended_wait.
273 (extended_event_reported): New function.
274 (linux_wait_1): Call extended_event_reported and set
275 status to report fork events.
276 (linux_write_memory): Add pid to debug message.
277 (reset_lwp_ptrace_options_callback): New function.
278 (linux_handle_new_gdb_connection): New function.
279 (linux_target_ops): Initialize new structure member.
280 * linux-low.h (struct lwp_info) <waitstatus>: New member.
281 * lynx-low.c: Initialize new structure member.
282 * remote-utils.c (prepare_resume_reply): Implement stop reason
283 "fork" for "T" stop message.
284 * server.c (handle_query): Call handle_new_gdb_connection.
285 * server.h (report_fork_events): Declare global flag.
286 * target.h (struct target_ops) <handle_new_gdb_connection>:
287 New member.
288 (target_handle_new_gdb_connection): New macro.
289 * win32-low.c: Initialize new structure member.
290
ddcbc397
DB
2912015-05-12 Don Breazeal <donb@codesourcery.com>
292
293 * mem-break.c (APPEND_TO_LIST): Define macro.
294 (clone_agent_expr): New function.
295 (clone_one_breakpoint): New function.
296 (clone_all_breakpoints): New function.
297 * mem-break.h: Declare new functions.
298
89245bc0
DB
2992015-05-12 Don Breazeal <donb@codesourcery.com>
300
301 * linux-low.c (linux_supports_fork_events): New function.
302 (linux_supports_vfork_events): New function.
303 (linux_target_ops): Initialize new structure members.
304 (initialize_low): Call linux_check_ptrace_features.
305 * lynx-low.c (lynx_target_ops): Initialize new structure
306 members.
307 * server.c (report_fork_events, report_vfork_events):
308 New global flags.
309 (handle_query): Add new features to qSupported packet and
310 response.
311 (captured_main): Initialize new global variables.
312 * target.h (struct target_ops) <supports_fork_events>:
313 New member.
314 <supports_vfork_events>: New member.
315 (target_supports_fork_events): New macro.
316 (target_supports_vfork_events): New macro.
317 * win32-low.c (win32_target_ops): Initialize new structure
318 members.
319
835205d0
GB
3202015-05-12 Gary Benson <gbenson@redhat.com>
321
322 * server.c (handle_qxfer_exec_file): Use current process
323 if annex is empty.
324
21e94bd9
SL
3252015-05-08 Sandra Loosemore <sandra@codesourcery.com>
326
327 * linux-nios2-low.c: Include elf/common.h. Adjust comments.
328 Remove HAVE_PTRACE_GETREGS conditionals.
329 (nios2_regsets): Use PTRACE_GETREGSET and PTRACE_SETREGSET
330 instead of PTRACE_GETREGS and PTRACE_SETREGS.
331
45614f15
YQ
3322015-05-08 Yao Qi <yao.qi@linaro.org>
333
334 * linux-low.c (linux_supports_conditional_breakpoints): New
335 function.
336 (linux_target_ops): Install new target method.
337 * lynx-low.c (lynx_target_ops): Install NULL hook for
338 supports_conditional_breakpoints.
339 * nto-low.c (nto_target_ops): Likewise.
340 * spu-low.c (spu_target_ops): Likewise.
341 * win32-low.c (win32_target_ops): Likewise.
342 * server.c (handle_query): Check
343 target_supports_conditional_breakpoints.
344 * target.h (struct target_ops) <supports_conditional_breakpoints>:
345 New field.
346 (target_supports_conditional_breakpoints): New macro.
347
80ad801e
PA
3482015-05-06 Pedro Alves <palves@redhat.com>
349
350 PR server/18081
351 * server.c (start_inferior): If the process exits, mourn it.
352
819843c7
GB
3532015-04-21 Gary Benson <gbenson@redhat.com>
354
355 * hostio.c (fileio_open_flags_to_host): Factored out to
356 fileio_to_host_openflags in common/fileio.c. Single use
357 updated.
358
a2d5a9d7
MF
3592015-04-17 Max Filippov <jcmvbkbc@gmail.com>
360
361 * linux-xtensa-low.c (xtensa_fill_gregset)
362 (xtensa_store_gregset): Check XCHAL_HAVE_LOOPS instead of
363 XCHAL_HAVE_LOOP.
364
deb44829
MF
3652015-04-17 Max Filippov <jcmvbkbc@gmail.com>
366
367 * linux-xtensa-low.c (xtensa_usrregs_info): Remove.
368 (regs_info): Replace usrregs pointer with NULL.
369
e57f1de3
GB
3702015-04-17 Gary Benson <gbenson@redhat.com>
371
372 * target.h (struct target_ops) <pid_to_exec_file>: New field.
373 * linux-low.c (linux_target_ops): Initialize pid_to_exec_file.
374 * server.c (handle_qxfer_exec_file): New function.
375 (qxfer_packets): Add exec-file entry.
376 (handle_query): Report qXfer:exec-file:read as supported packet.
377
62828379
RN
3782015-04-14 Romain Naour <romain.naour@openwide.fr> (tiny change)
379
380 * linux-low.c (linux_read_offsets): Remove get_thread_lwp.
381
b88bb450
GB
3822015-04-09 Gary Benson <gbenson@redhat.com>
383
384 * hostio-errno.c (errno_to_fileio_error): Remove function.
385 Update caller to use remote_fileio_to_fio_error.
386
c8f4bfdd
YQ
3872015-04-09 Yao Qi <yao.qi@linaro.org>
388
389 * linux-low.c (linux_insert_point): Call
390 insert_memory_breakpoint if TYPE is raw_bkpt_type_sw.
391 (linux_remove_point): Call remove_memory_breakpoint if type is
392 raw_bkpt_type_sw.
393 * linux-x86-low.c (x86_insert_point): Don't call
394 insert_memory_breakpoint.
395 (x86_remove_point): Don't call remove_memory_breakpoint.
396
41f98f02
PA
3972015-04-01 Pedro Alves <palves@redhat.com>
398 Cleber Rosa <crosa@redhat.com>
399
400 * server.c (gdbserver_usage): Reorganize and extend the usage
401 message.
402
2bf6fb9d
PA
4032015-03-24 Pedro Alves <palves@redhat.com>
404
405 * linux-low.c (check_stopped_by_breakpoint): Tweak debug log
406 output. Also dump TRAP_TRACE.
407 (linux_low_filter_event): In debug output, distinguish a
408 resume_stop SIGSTOP from a delayed SIGSTOP.
409
369f6daa
GB
4102015-03-24 Gary Benson <gbenson@redhat.com>
411
412 * linux-x86-low.c (x86_linux_new_thread): Moved to
413 nat/x86-linux.c.
414 (x86_linux_prepare_to_resume): Likewise.
415
8e5d4070
GB
4162015-03-24 Gary Benson <gbenson@redhat.com>
417
418 * Makefile.in (x86-linux-dregs.o): New rule.
419 * configure.srv: Add x86-linux-dregs.o to relevant targets.
420 * linux-x86-low.c: Include nat/x86-linux-dregs.h.
421 (u_debugreg_offset): Moved to nat/x86-linux-dregs.c.
422 (x86_linux_dr_get): Likewise.
423 (x86_linux_dr_set): Likewise.
424 (update_debug_registers_callback): Likewise.
425 (x86_linux_dr_set_addr): Likewise.
426 (x86_linux_dr_get_addr): Likewise.
427 (x86_linux_dr_set_control): Likewise.
428 (x86_linux_dr_get_control): Likewise.
429 (x86_linux_dr_get_status): Likewise.
430 (x86_linux_update_debug_registers): Likewise.
431
2b95d440
GB
4322015-03-24 Gary Benson <gbenson@redhat.com>
433
434 * linux-x86-low.c (x86_linux_update_debug_registers):
435 New function, factored out from...
436 (x86_linux_prepare_to_resume): ...this.
437
14b0bc68
GB
4382015-03-24 Gary Benson <gbenson@redhat.com>
439
440 * linux-x86-low.c (x86_linux_dr_get): Update comments.
441 (x86_linux_dr_set): Likewise.
442 (update_debug_registers_callback): Likewise.
443 (x86_linux_dr_set_addr): Likewise.
444 (x86_linux_dr_get_addr): Likewise.
445 (x86_linux_dr_set_control): Likewise.
446 (x86_linux_dr_get_control): Likewise.
447 (x86_linux_dr_get_status): Likewise.
448 (x86_linux_prepare_to_resume): Likewise.
449
5dfe6ca8
GB
4502015-03-24 Gary Benson <gbenson@redhat.com>
451
452 * linux-x86-low.c (x86_linux_dr_get): Add assertion.
453 Use perror_with_name. Pass string through gettext.
454 (x86_linux_dr_set): Likewise.
455
d33472ad
GB
4562015-03-24 Gary Benson <gbenson@redhat.com>
457
458 * linux-x86-low.c (x86_dr_low_set_addr): Rename to...
459 (x86_linux_dr_set_addr): ...this.
460 (x86_dr_low_get_addr): Rename to...
461 (x86_linux_dr_get_addr): ...this.
462 (x86_dr_low_set_control): Rename to...
463 (x86_linux_dr_set_control): ...this.
464 (x86_dr_low_get_control): Rename to...
465 (x86_linux_dr_get_control): ...this.
466 (x86_dr_low_get_status): Rename to...
467 (x86_linux_dr_get_status): ...this.
468 (x86_dr_low): Update with new function names.
469
4b134ca1
GB
4702015-03-24 Gary Benson <gbenson@redhat.com>
471
472 * Makefile.in (x86-linux.o): New rule.
473 * configure.srv: Add x86-linux.o to relevant targets.
474 * linux-low.c (lwp_set_arch_private_info): New function.
475 (lwp_arch_private_info): Likewise.
476 * linux-x86-low.c: Include nat/x86-linux.h.
477 (arch_lwp_info): Removed structure.
478 (update_debug_registers_callback):
479 Use lwp_set_debug_registers_changed.
480 (x86_linux_prepare_to_resume): Use lwp_debug_registers_changed
481 and lwp_set_debug_registers_changed.
482 (x86_linux_new_thread): Use lwp_set_debug_registers_changed.
483
34c703da
GB
4842015-03-24 Gary Benson <gbenson@redhat.com>
485
486 * linux-low.h (linux_target_ops) <new_thread>: Changed signature.
487 * linux-arm-low.c (arm_new_thread): Likewise.
488 * linux-aarch64-low.c (aarch64_linux_new_thread): Likewise.
489 * linux-mips-low.c (mips_linux_new_thread): Likewise.
490 * linux-x86-low.c (x86_linux_new_thread): Likewise.
491 * linux-low.c (add_lwp): Update the_low_target.new_thread call.
492
cff068da
GB
4932015-03-24 Gary Benson <gbenson@redhat.com>
494
495 * linux-low.c (ptid_of_lwp): New function.
496 (lwp_is_stopped): Likewise.
497 (lwp_stop_reason): Likewise.
498 * linux-x86-low.c (update_debug_registers_callback):
499 Use lwp_is_stopped.
500 (x86_linux_prepare_to_resume): Use ptid_of_lwp and
501 lwp_stop_reason.
502
b2f7c7e8
GB
5032015-03-24 Gary Benson <gbenson@redhat.com>
504
505 * linux-low.h (linux_stop_lwp): Remove declaration.
506
6d4ee8c6
GB
5072015-03-24 Gary Benson <gbenson@redhat.com>
508
509 * linux-low.h: Include nat/linux-nat.h.
510 * linux-low.c (iterate_over_lwps_args): New structure.
511 (iterate_over_lwps_filter): New function.
512 (iterate_over_lwps): Likewise.
513 * linux-x86-low.c (update_debug_registers_callback):
514 Update signature to what iterate_over_lwps expects.
515 Remove PID check that iterate_over_lwps now performs.
516 (x86_dr_low_set_addr): Use iterate_over_lwps.
517 (x86_dr_low_set_control): Likewise.
518
70a0bb6b
GB
5192015-03-24 Gary Benson <gbenson@redhat.com>
520
521 * linux-x86-low.c (x86_debug_reg_state): New function.
522 (x86_linux_prepare_to_resume): Use the above.
523
7b669087
GB
5242015-03-24 Gary Benson <gbenson@redhat.com>
525
526 * linux-low.c (current_lwp_ptid): New function.
527 * linux-x86-low.c: Include nat/linux-nat.h.
528 (x86_dr_low_get_addr): Use current_lwp_ptid.
529 (x86_dr_low_get_control): Likewise.
530 (x86_dr_low_get_status): Likewise.
531
eef49a3d
PA
5322015-03-20 Pedro Alves <palves@redhat.com>
533
534 * tracepoint.c (cmd_qtstatus): Make "str" const.
535
b2333d22
PA
5362015-03-20 Pedro Alves <palves@redhat.com>
537
538 * server.c (handle_general_set): Make "req_str" const.
539
23f238d3
PA
5402015-03-19 Pedro Alves <palves@redhat.com>
541
542 * linux-low.c (linux_resume_one_lwp): Rename to ...
543 (linux_resume_one_lwp_throw): ... this. Don't handle ESRCH here,
544 instead call perror_with_name.
545 (check_ptrace_stopped_lwp_gone): New function.
546 (linux_resume_one_lwp): Reimplement as wrapper around
547 linux_resume_one_lwp_throw that swallows errors if the LWP is
548 gone.
549
91baf43f
PA
5502015-03-19 Pedro Alves <palves@redhat.com>
551
552 * linux-low.c (count_events_callback, select_event_lwp_callback):
553 No longer check whether the thread has resume_stop as last resume
554 kind.
555
8bf3b159
PA
5562015-03-19 Pedro Alves <palves@redhat.com>
557
558 * linux-low.c (count_events_callback, select_event_lwp_callback):
559 Use the lwp's status_pending_p field, not the thread's.
560
b90fc188
PA
5612015-03-19 Pedro Alves <palves@redhat.com>
562
563 * linux-low.c (select_event_lwp_callback): Update comments to
564 no longer mention SIGTRAP.
565
464b0089
GB
5662015-03-18 Gary Benson <gbenson@redhat.com>
567
568 * server.c (handle_query): Do not report vFile:fstat as supported.
569
aa9e327f
GB
5702015-03-11 Gary Benson <gbenson@redhat.com>
571
572 * hostio.c (sys/types.h): New include.
573 (sys/stat.h): Likewise.
574 (common-remote-fileio.h): Likewise.
575 (handle_fstat): New function.
576 (handle_vFile): Handle vFile:fstat packets.
aa9e327f 577
791c0056
GB
5782015-03-11 Gary Benson <gbenson@redhat.com>
579
580 * configure.ac (AC_CHECK_MEMBERS): Add checks for
581 struct stat.st_blocks and struct stat.st_blksize.
582 * configure: Regenerate.
583 * config.in: Likewise.
584 * Makefile.in (SFILES): Add common/common-remote-fileio.c.
585 (OBS): Add common-remote-fileio.o.
586 (common-remote-fileio.o): New rule.
587
9a9df970
PA
5882015-03-09 Pedro Alves <palves@redhat.com>
589
590 * tracepoint.c (gdb_agent_helper_thread): Cast '&sockaddr' to
591 'struct sockaddr' pointer in 'accept' call.
592
9eb1356e
PA
5932015-03-09 Pedro Alves <palves@redhat.com>
594
595 Revert:
596 2015-03-07 Pedro Alves <palves@redhat.com>
597 * gdbreplay.c: No longer include <netinet/in.h>, <sys/socket.h>,
598 or <winsock2.h> here. Instead include "gdb_socket.h".
599 (remote_open): Use union gdb_sockaddr_u.
600 * remote-utils.c: No longer include <netinet/in.h>, <sys/socket.h>
601 or <winsock2.h> here. Instead include "gdb_socket.h".
602 (handle_accept_event, remote_prepare): Use union gdb_sockaddr_u.
603 * tracepoint.c: Include "gdb_socket.h" instead of <sys/socket.h>
604 or <sys/un.h>.
605 (init_named_socket, gdb_agent_helper_thread): Use union
606 gdb_sockaddr_u.
607
aac331e4
PA
6082015-03-07 Pedro Alves <palves@redhat.com>
609
610 * configure.ac (build_warnings): Move
611 -Wdeclaration-after-statement to the C-specific set.
612 * configure: Regenerate.
613
366c75fc
PA
6142015-03-07 Pedro Alves <palves@redhat.com>
615
616 * gdbreplay.c: No longer include <netinet/in.h>, <sys/socket.h>,
617 or <winsock2.h> here. Instead include "gdb_socket.h".
618 (remote_open): Use union gdb_sockaddr_u.
619 * remote-utils.c: No longer include <netinet/in.h>, <sys/socket.h>
620 or <winsock2.h> here. Instead include "gdb_socket.h".
621 (handle_accept_event, remote_prepare): Use union gdb_sockaddr_u.
622 * tracepoint.c: Include "gdb_socket.h" instead of <sys/socket.h>
623 or <sys/un.h>.
624 (init_named_socket, gdb_agent_helper_thread): Use union
625 gdb_sockaddr_u.
626
492d29ea
PA
6272015-03-07 Pedro Alves <palves@redhat.com>
628
629 Adjust all callers of TRY_CATCH to use TRY/CATCH/END_CATCH
630 instead.
631
60a191ed
YQ
6322015-03-06 Yao Qi <yao.qi@linaro.org>
633
634 * linux-aarch64-low.c (aarch64_insert_point): Use
635 show_debug_regs as a boolean.
636 (aarch64_remove_point): Likewise.
637
f5771b1d
PA
6382015-03-05 Pedro Alves <palves@redhat.com>
639
640 * lynx-low.c (lynx_target_ops): Install NULL hooks for
641 stopped_by_sw_breakpoint, supports_stopped_by_sw_breakpoint,
642 stopped_by_hw_breakpoint, supports_stopped_by_hw_breakpoint.
643 * nto-low.c (nto_target_ops): Likewise.
644 * spu-low.c (spu_target_ops): Likewise.
645 * win32-low.c (win32_target_ops): Likewise.
646
3e572f71
PA
6472015-03-04 Pedro Alves <palves@redhat.com>
648
72f4393d 649 * linux-low.c (check_stopped_by_breakpoint) [USE_SIGTRAP_SIGINFO]:
3e572f71
PA
650 Decide whether a breakpoint triggered based on the SIGTRAP's
651 siginfo.si_code.
72f4393d
L
652 (thread_still_has_status_pending_p) [USE_SIGTRAP_SIGINFO]: Don't check whether a
653 breakpoint is inserted if relying on SIGTRAP's siginfo.si_code.
3e572f71
PA
654 (linux_low_filter_event): Check for breakpoints before checking
655 watchpoints.
656 (linux_wait_1): Don't re-increment the PC if relying on SIGTRAP's
657 siginfo.si_code.
72f4393d
L
658 (linux_stopped_by_sw_breakpoint)
659 (linux_supports_stopped_by_sw_breakpoint)
660 (linux_stopped_by_hw_breakpoint)
661 (linux_supports_stopped_by_hw_breakpoint): New functions.
662 (linux_target_ops): Install new target methods.
3e572f71 663
1ec68e26
PA
6642015-03-04 Pedro Alves <palves@redhat.com>
665
666 * remote-utils.c (prepare_resume_reply): Report swbreak/hbreak.
667 * server.c (swbreak_feature, hwbreak_feature): New globals.
668 (handle_query) <qSupported>: Handle "swbreak+" and "hwbreak+".
669 (captured_main): Clear swbreak_feature and hwbreak_feature.
670 * server.h (swbreak_feature, hwbreak_feature): Declare.
671 * target.h (struct target_ops) <stopped_by_sw_breakpoint,
672 supports_stopped_by_sw_breakpoint, stopped_by_hw_breakpoint,
673 supports_stopped_by_hw_breakpoint>: New fields.
674 (target_supports_stopped_by_sw_breakpoint)
675 (target_stopped_by_sw_breakpoint)
676 (target_supports_stopped_by_hw_breakpoint)
677 (target_stopped_by_hw_breakpoint): Declare.
678
15c66dd6
PA
6792015-03-04 Pedro Alves <palves@redhat.com>
680
681 enum lwp_stop_reason -> enum target_stop_reason
682 * linux-low.c (check_stopped_by_breakpoint): Adjust.
683 (thread_still_has_status_pending_p, check_stopped_by_watchpoint)
684 (linux_wait_1, stuck_in_jump_pad_callback)
685 (move_out_of_jump_pad_callback, linux_resume_one_lwp)
686 (linux_stopped_by_watchpoint):
687 * linux-low.h (enum lwp_stop_reason): Delete.
688 (struct lwp_info) <stop_reason>: Now an enum target_stop_reason.
689 * linux-x86-low.c (x86_linux_prepare_to_resume): Adjust.
690
98fc70d6
YQ
6912015-03-04 Yao Qi <yao.qi@linaro.org>
692
693 * Makefile.in (SFILES): Add linux-aarch64-low.c.
694
dd2ac174
GB
6952015-03-03 Gary Benson <gbenson@redhat.com>
696
697 * hostio.c (handle_vFile): Fix prefix lengths.
698
d68e53f4
MM
6992015-03-03 Markus Metzger <markus.t.metzger@intel.com>
700
701 * linux-low.c (linux_low_enable_btrace): Do not overwrite non-zero
702 ptr_bits.
703
bf2d68ab
AA
7042015-03-02 Andreas Arnez <arnez@linux.vnet.ibm.com>
705
706 * Makefile.in (s390-vx-linux64.c, s390-tevx-linux64.c)
707 (s390x-vx-linux64.c, s390x-tevx-linux64.c): New rules.
708 (clean): Add "rm -f" for above C files.
709 * configure.srv (srv_regobj): Add s390-vx-linux64.o,
710 s390-tevx-linux64.o, s390x-vx-linux64.o, and s390x-tevx-linux64.o.
711 (srv_xmlfiles): Add s390-vx-linux64.xml, s390-tevx-linux64.xml,
712 s390x-vx-linux64.xml, s390x-tevx-linux64.xml, and s390-vx.xml.
713 * linux-s390-low.c (HWCAP_S390_VX): New macro.
714 (init_registers_s390_vx_linux64, init_registers_s390_tevx_linux64)
715 (init_registers_s390x_vx_linux64)
716 (init_registers_s390x_tevx_linux64)
717 (tdesc_s390_vx_linux64, tdesc_s390_tevx_linux64)
718 (tdesc_s390x_vx_linux64, tdesc_s390x_tevx_linux64): New extern
719 declarations.
720 (s390_fill_vxrs_low, s390_store_vxrs_low, s390_fill_vxrs_high)
721 (s390_store_vxrs_high): New functions.
722 (s390_regsets): Add entries for NT_S390_VXRS_LOW and
723 NT_S390_VXRS_HIGH.
724 (s390_arch_setup): Add logic for selecting one of the new target
725 descriptions. Activate the new vector regsets if applicable.
726 (initialize_low_arch): Also invoke init_registers_s390_vx_linux64,
727 init_registers_s390_tevx_linux64, init_registers_s390x_vx_linux64,
728 and init_registers_s390x_tevx_linux64.
729
c966a859
PA
7302015-03-01 Pedro Alves <palves@redhat.com>
731
732 * linux-i386-ipa.c (gdb_agent_get_raw_reg): Constify 'raw_regs'
733 parameter.
734
4180215b
PA
7352015-02-27 Pedro Alves <palves@redhat.com>
736
737 * linux-x86-low.c (u_debugreg_offset): New function.
738 (x86_linux_dr_get, x86_linux_dr_set): Use it.
739
749bab01
PA
7402015-02-27 Pedro Alves <palves@redhat.com>
741
742 * gdb_proc_service.h: Wrap with EXTERN_C_PUSH/EXTERN_C_POP.
743 [!HAVE_PROC_SERVICE_H] (struct ps_prochandle): Forward declare.
744 [!HAVE_PROC_SERVICE_H] (ps_pdread, ps_pdwrite, ps_ptread)
745 ps_ptwrite, ps_lgetregs, ps_lsetregs, ps_lgetfpregs)
746 (ps_lsetfpregs, ps_getpid)
747 (ps_get_thread_area, ps_pglobal_lookup, ps_pstop, ps_pcontinue)
748 (ps_lstop, ps_lcontinue, ps_lgetxregsize, ps_lgetxregs)
749 (ps_lsetxregs, ps_plog): Declare.
750
3c14e5a3
PA
7512015-02-27 Pedro Alves <palves@redhat.com>
752
753 * linux-amd64-ipa.c (gdb_agent_get_raw_reg): Use
754 IP_AGENT_EXPORT_FUNC.
755 * linux-i386-ipa.c (gdb_agent_get_raw_reg): Use
756 IP_AGENT_EXPORT_FUNC.
757 * tracepoint.c (ATTR_USED, ATTR_NOINLINE, ATTR_CONSTRUCTOR)
758 (IP_AGENT_EXPORT): Delete.
759 (gdb_tp_heap_buffer, gdb_jump_pad_buffer, gdb_jump_pad_buffer_end)
760 (gdb_trampoline_buffer, gdb_trampoline_buffer_end)
761 (gdb_trampoline_buffer_error, collecting, gdb_collect)
762 (stop_tracing, flush_trace_buffer, about_to_request_buffer_space)
763 (trace_buffer_is_full, stopping_tracepoint, expr_eval_result)
764 (error_tracepoint, tracepoints, tracing, trace_buffer_ctrl)
765 (trace_buffer_ctrl_curr, trace_buffer_lo, trace_buffer_hi)
766 (traceframe_read_count, traceframe_write_count)
767 (traceframes_created, trace_state_variables, get_raw_reg)
768 (get_trace_state_variable_value, set_trace_state_variable_value)
769 (ust_loaded, helper_thread_id, cmd_buf): Use
770 IPA_SYM_EXPORTED_NAME.
771 (stop_tracing, flush_trace_buffer): Use IP_AGENT_EXPORT_FUNC.
772 (tracepoints) Use IP_AGENT_EXPORT_VAR.
773 (stopping_tracepoint, trace_buffer_is_full, expr_eval_result): Use
774 IP_AGENT_EXPORT_VAR and wrap in EXTERN_C_PUSH/EXTERN_C_POP.
775 (last_tracepoint): Move into !IN_PROCESS_AGENT block.
776 (error_tracepoint): Use IP_AGENT_EXPORT_VAR and wrap in
777 EXTERN_C_PUSH/EXTERN_C_POP.
778 (trace_state_variables): Use IP_AGENT_EXPORT_VAR.
779 (trace_buffer_lo, trace_buffer_hi): Use IP_AGENT_EXPORT_VAR and
780 wrap in EXTERN_C_PUSH/EXTERN_C_POP.
781 (trace_buffer_ctrl, trace_buffer_ctrl_curr)
782 (traceframe_write_count, traceframe_read_count)
783 (traceframes_created, tracing): Use IP_AGENT_EXPORT_VAR.
784 (about_to_request_buffer_space, get_trace_state_variable_value)
785 (set_trace_state_variable_value): Use IP_AGENT_EXPORT_FUNC.
786 (collecting): Use IP_AGENT_EXPORT_VAR and wrap in
787 EXTERN_C_PUSH/EXTERN_C_POP.
788 (gdb_collect): Use IP_AGENT_EXPORT_FUNC.
789 (ust_loaded, cmd_buf): Use IP_AGENT_EXPORT_VAR.
790 (helper_thread_id, gdb_agent_capability): Use IP_AGENT_EXPORT_VAR
791 and wrap in EXTERN_C_PUSH/EXTERN_C_POP.
792 (gdb_tp_heap_buffer, gdb_jump_pad_buffer, gdb_jump_pad_buffer_end)
793 (gdb_trampoline_buffer, gdb_trampoline_buffer_end)
794 (gdb_trampoline_buffer_error): Use IP_AGENT_EXPORT_VAR.
795 * tracepoint.h (ATTR_USED, ATTR_NOINLINE, EXPORTED_SYMBOL):
796 Define.
797 (IP_AGENT_EXPORT_FUNC, IP_AGENT_EXPORT_VAR)
798 (IP_AGENT_EXPORT_VAR_DECL): Define.
799 (tracing): Declare.
800 (gdb_agent_get_raw_reg): Declare.
801
fe978cb0
PA
8022015-02-27 Tom Tromey <tromey@redhat.com>
803 Pedro Alves <palves@redhat.com>
804
805 Rename symbols whose names are reserved C++ keywords throughout.
806
3bc3d82a
PA
8072015-02-27 Pedro Alves <palves@redhat.com>
808
809 * Makefile.in (COMPILER): New, get it from autoconf.
810 (CXX): Get from autoconf instead.
811 (COMPILE.pre): Use COMPILER.
812 (CC-LD): Rename to ...
813 (CC_LD): ... this. Use COMPILER.
814 (gdbserver$(EXEEXT), gdbreplay$(EXEEXT), $(IPA_LIB)): Adjust.
815 (CXX_FOR_TARGET): Default to g++ instead of gcc.
816 * acinclude.m4: Include build-with-cxx.m4.
817 * configure.ac: Call AC_PROG_CXX and GDB_AC_BUILD_WITH_CXX.
818 Disable -Werror by default if building in C++ mode.
819 (build_warnings): Add -Wno-sign-compare, -Wno-write-strings and
820 -Wno-narrowing in C++ mode. Run supported-warning-flags tests with
821 the C++ compiler. Save/restore CXXFLAGS too.
822 * configure: Regenerate.
823
07697489
PA
8242015-02-27 Pedro Alves <palves@redhat.com>
825
826 * acinclude.m4: Include libiberty.m4.
827 * configure.ac: Call libiberty_INIT.
828 * config.in, configure: Regenerate.
829
9beb7c4e
PA
8302015-02-26 Pedro Alves <palves@redhat.com>
831
832 * linux-low.c (linux_wait_1): When incrementing the PC past a
833 program breakpoint always use the_low_target.breakpoint_len as
834 increment, rather than the maximum between that and
835 the_low_target.decr_pc_after_break.
836
8090aef2
PA
8372015-02-23 Pedro Alves <palves@redhat.com>
838
839 * linux-low.c (check_stopped_by_breakpoint): Don't check if the
840 thread was doing a step-over; always adjust the PC if
841 we stepped over a permanent breakpoint.
842 (linux_wait_1): If we stepped over breakpoint that was on top of a
843 permanent breakpoint, manually advance the PC past it.
844
bc9540e8
PA
8452015-02-23 Pedro Alves <palves@redhat.com>
846
847 * linux-x86-low.c (REGSIZE): Define in both 32-bit and 64-bit
848 modes.
849 (x86_fill_gregset, x86_store_gregset): Use it when handling
850 $orig_eax.
851
2db9a427
PA
8522015-02-20 Pedro Alves <palves@redhat.com>
853
854 * thread-db.c: Include "nat/linux-procfs.h".
855 (thread_db_init): Skip listing new threads if the kernel supports
856 PTRACE_EVENT_CLONE and /proc/PID/task/ is accessible.
857
afa8d396
PA
8582015-02-20 Pedro Alves <palves@redhat.com>
859
860 * linux-low.c (status_pending_p_callback): Use ptid_match.
861
c9587f88
AT
8622015-02-19 Antoine Tremblay <antoine.tremblay@ericsson.com>
863
864 PR breakpoints/16812
865 * linux-low.c (wstatus_maybe_breakpoint): Remove.
866 (linux_low_filter_event): Update wstatus_maybe_breakpoint name.
867 (linux_wait_1): Report SIGTRAP,SIGILL,SIGSEGV.
868
b05ec7a5
AT
8692015-02-10 Antoine Tremblay <antoine.tremblay@ericsson.com>
870
871 PR breakpoints/15956
872 * tracepoint.c (cmd_qtinit): Add check for current_thread.
873
d33501a5
MM
8742015-02-09 Markus Metzger <markus.t.metzger@intel.com>
875
876 * linux-low.c (linux_low_btrace_conf): Print size.
877 * server.c (handle_btrace_conf_general_set): New.
878 (hanle_general_set): Call handle_btrace_conf_general_set.
879 (handle_query): Report Qbtrace-conf:bts:size as supported.
880
f4abbc16
MM
8812015-02-09 Markus Metzger <markus.t.metzger@intel.com>
882
883 * linux-low.c (linux_low_enable_btrace): Update parameters.
884 (linux_low_btrace_conf): New.
885 (linux_target_ops)<to_btrace_conf>: Initialize.
886 * server.c (current_btrace_conf): New.
887 (handle_btrace_enable): Rename to ...
888 (handle_btrace_enable_bts): ... this. Pass &current_btrace_conf
889 to target_enable_btrace. Update comment. Update users.
890 (handle_qxfer_btrace_conf): New.
891 (qxfer_packets): Add btrace-conf entry.
892 (handle_query): Report qXfer:btrace-conf:read as supported packet.
893 * target.h (target_ops)<enable_btrace>: Update parameters and comment.
894 (target_ops)<read_btrace_conf>: New.
895 (target_enable_btrace): Update parameters.
896 (target_read_btrace_conf): New.
897
043c3577
MM
8982015-02-09 Markus Metzger <markus.t.metzger@intel.com>
899
900 * server.c (handle_btrace_general_set): Remove call to
901 target_supports_btrace.
902 (supported_btrace_packets): New.
903 (handle_query): Call supported_btrace_packets.
904 * target.h: include btrace-common.h.
905 (btrace_target_info): Removed.
906 (supports_btrace, target_supports_btrace): Update parameters.
907
734b0e4b
MM
9082015-02-09 Markus Metzger <markus.t.metzger@intel.com>
909
910 * Makefile.in (SFILES): Add common/btrace-common.c.
911 (OBS): Add common/btrace-common.o.
912 (btrace-common.o): Add build rules.
913 * linux-low: Include btrace-common.h.
914 (linux_low_read_btrace): Use struct btrace_data. Call
915 btrace_data_init and btrace_data_fini.
916
d6c146e9
PA
9172015-02-06 Pedro Alves <palves@redhat.com>
918
919 * thread-db.c (find_new_threads_callback): Add debug output.
920
20ba1ce6
PA
9212015-02-04 Pedro Alves <palves@redhat.com>
922
923 * linux-low.c (handle_extended_wait): Don't resume LWPs here.
924 (resume_stopped_resumed_lwps): New function.
925 (linux_wait_for_event_filtered): Use it.
926
8cc73a39
SDJ
9272015-01-15 Sergio Durigan Junior <sergiodj@redhat.com>
928
929 * Makefile.in (SFILES): Add linux-personality.c.
930 (linux-personality.o): New rule.
931 * configure.srv (srv_linux_obj): Add linux-personality.o to the
932 list of objects to be built.
933 * linux-low.c: Include nat/linux-personality.h.
934 (linux_create_inferior): Remove code to disable address space
935 randomization (moved to ../nat/linux-personality.c). Create
936 cleanup to disable address space randomization.
937
fb23d554
SDJ
9382015-01-15 Sergio Durigan Junior <sergiodj@redhat.com>
939
940 * Makefile.in (posix-strerror.o): New rule.
941 (mingw-strerror.o): Likewise.
942 * configure: Regenerated.
943 * configure.ac: Source file ../common/common.host. Initialize new
944 variable srv_host_obs. Add srv_host_obs to GDBSERVER_DEPFILES.
945
cdf43629
YQ
9462015-01-14 Yao Qi <yao@codesourcery.com>
947
948 * Makefile.in (SFILES): Add nat/ppc-linux.c.
949 (ppc-linux.o): New rule.
950 * configure.srv (powerpc*-*-linux*): Add ppc-linux.o.
951 * configure.ac: AC_CHECK_FUNCS(getauxval).
952 * config.in: Re-generated.
953 * configure: Re-generated.
954 * linux-ppc-low.c (ppc_arch_setup) [__powerpc64__]: Call
955 ppc64_64bit_inferior_p
956
514c5338
YQ
9572015-01-14 Yao Qi <yao@codesourcery.com>
958
959 * linux-ppc-low.c: Include "nat/ppc-linux.h".
960 (PPC_FEATURE_HAS_VSX): Move to nat/ppc-linux.h.
961 (PPC_FEATURE_HAS_ALTIVEC, PPC_FEATURE_HAS_SPE): Likewise.
962 (PT_ORIG_R3, PT_TRAP): Likewise.
963 (PTRACE_GETVSXREGS, PTRACE_SETVSXREGS): Likewise.
964 (PTRACE_GETVRREGS, PTRACE_SETVRREGS): Likewise.
965 (PTRACE_GETEVRREGS, PTRACE_SETEVRREGS): Likewise.
966
3368c1e5
JB
9672015-01-10 Joel Brobecker <brobecker@adacore.com>
968
969 * i387-fp.c (i387_cache_to_xsave): In look over
970 num_avx512_zmmh_high_registers, replace use of struct i387_xsave
971 zmmh_low_space field by use of zmmh_high_space.
972
582511be
PA
9732015-01-09 Pedro Alves <palves@redhat.com>
974
975 * linux-low.c (step_over_bkpt): Move higher up in the file.
976 (handle_extended_wait): Don't store the stop_pc here.
977 (get_stop_pc): Adjust comments and rename to ...
978 (check_stopped_by_breakpoint): ... this. Record whether the LWP
979 stopped for a software breakpoint or hardware breakpoint.
980 (thread_still_has_status_pending_p): New function.
981 (status_pending_p_callback): Use
982 thread_still_has_status_pending_p. If the event is no longer
983 interesting, resume the LWP.
984 (handle_tracepoints): Add assert.
985 (maybe_move_out_of_jump_pad): Remove cancel_breakpoints call.
986 (wstatus_maybe_breakpoint): New function.
987 (cancel_breakpoint): Delete function.
988 (check_stopped_by_watchpoint): New function, factored out from
989 linux_low_filter_event.
990 (lp_status_maybe_breakpoint): Delete function.
991 (linux_low_filter_event): Remove filter_ptid argument.
992 Leave thread group exits pending here. Store the LWP's stop PC.
993 Always leave events pending.
994 (linux_wait_for_event_filtered): Pull all events out of the
995 kernel, and leave them all pending.
996 (count_events_callback, select_event_lwp_callback): Consider all
997 events.
998 (cancel_breakpoints_callback, linux_cancel_breakpoints): Delete.
999 (select_event_lwp): Only give preference to the stepping LWP in
1000 all-stop mode. Adjust comments.
1001 (ignore_event): New function.
1002 (linux_wait_1): Delete 'retry' label. Use ignore_event. Remove
1003 references to cancel_breakpoints. Adjust to renames. Also give
1004 equal priority to all LWPs that have had events in non-stop mode.
1005 If reporting a software breakpoint event, unadjust the LWP's PC.
1006 (linux_wait): If linux_wait_1 returned an ignored event, retry.
1007 (stuck_in_jump_pad_callback, move_out_of_jump_pad_callback):
1008 Adjust.
1009 (linux_resume_one_lwp): Store the LWP's PC. Adjust.
1010 (resume_status_pending_p): Use thread_still_has_status_pending_p.
1011 (linux_stopped_by_watchpoint): Adjust.
1012 (linux_target_ops): Remove reference to linux_cancel_breakpoints.
1013 * linux-low.h (enum lwp_stop_reason): New.
1014 (struct lwp_info) <stop_pc>: Adjust comment.
1015 <stopped_by_watchpoint>: Delete field.
1016 <stop_reason>: New field.
1017 * linux-x86-low.c (x86_linux_prepare_to_resume): Adjust.
1018 * mem-break.c (software_breakpoint_inserted_here)
1019 (hardware_breakpoint_inserted_here): New function.
1020 * mem-break.h (software_breakpoint_inserted_here)
1021 (hardware_breakpoint_inserted_here): Declare.
1022 * target.h (struct target_ops) <cancel_breakpoints>: Remove field.
1023 (cancel_breakpoints): Delete.
1024 * tracepoint.c (clear_installed_tracepoints, stop_tracing)
1025 (upload_fast_traceframes): Remove references to
1026 cancel_breakpoints.
1027
a33e3959
PA
10282015-01-09 Pedro Alves <palves@redhat.com>
1029
1030 * thread-db.c (find_new_threads_callback): Ignore thread if the
1031 kernel thread ID is -1.
1032
8784d563
PA
10332015-01-09 Pedro Alves <palves@redhat.com>
1034
1035 * linux-low.c (linux_attach_fail_reason_string): Move to
1036 nat/linux-ptrace.c, and rename.
1037 (linux_attach_lwp): Update comment.
1038 (attach_proc_task_lwp_callback): New function.
1039 (linux_attach): Adjust to rename and use
1040 linux_proc_attach_tgid_threads.
1041 (linux_attach_fail_reason_string): Delete declaration.
1042
76f2b779
JB
10432015-01-01 Joel Brobecker <brobecker@adacore.com>
1044
1045 * gdbreplay.c (gdbreplay_version): Update copyright year to 2015.
1046 * server.c (gdbserver_version): Likewise.
1047
fafcc06a
SDJ
10482014-12-29 Sergio Durigan Junior <sergiodj@redhat.com>
1049
1050 * remote-utils.c: Include ctype.h.
1051 (input_interrupt): Explicitly handle the case when the char
1052 received is the NUL byte. Improve the printing of non-ASCII
1053 characters.
1054
beed38b8
JB
10552014-12-16 Joel Brobecker <brobecker@adacore.com>
1056
1057 * linux-low.c (linux_low_filter_event): Update call to
1058 linux_enable_event_reporting following the addition of
1059 a new parameter to that function.
1060
bf330350
CU
10612014-12-16 Catalin Udma <catalin.udma@freescale.com>
1062
1063 PR server/17457
1064 * linux-aarch64-low.c (AARCH64_FPSR_REGNO): New define.
1065 (AARCH64_FPCR_REGNO): Likewise.
1066 (AARCH64_NUM_REGS): Update to include fpsr/fpcr registers.
1067 (aarch64_fill_fpregset): Add missing fpsr/fpcr registers.
1068 (aarch64_store_fpregset): Likewise.
1069
5227d625
JB
10702014-12-15 Joel Brobecker <brobecker@adacore.com>
1071
1072 * lynx-low.c (lynx_resume): Use PTRACE_SINGLESTEP_ONE if N == 1.
1073 Remove FIXME comment about assumption about N.
1074
f93b65a0
JB
10752014-12-13 Joel Brobecker <brobecker@adacore.com>
1076
1077 * configure.ac: If large-file support is disabled in GDBserver,
1078 pass --disable-largefile to ACX_CONFIGURE_DIR call for "gnulib".
1079 * configure: Regenerate.
1080
e5a9158d
AA
10812014-12-12 Andreas Arnez <arnez@linux.vnet.ibm.com>
1082
1083 * linux-low.c (regsets_fetch_inferior_registers): Suppress the
1084 warning upon ENODATA from ptrace.
1085 * linux-s390-low.c (s390_store_tdb): New.
1086 (s390_regsets): Add regset for NT_S390_TDB.
1087
feea5f36
AA
10882014-12-12 Andreas Arnez <arnez@linux.vnet.ibm.com>
1089
1090 * linux-low.c (regsets_store_inferior_registers): Skip regsets
1091 without a fill_function.
1092 * linux-s390-low.c (s390_fill_last_break): Remove.
1093 (s390_regsets): Set fill_function to NULL for NT_S390_LAST_BREAK.
1094 (s390_arch_setup): Use regset's size instead of fill_function for
1095 loop end condition.
1096
098dbe61
AA
10972014-12-12 Andreas Arnez <arnez@linux.vnet.ibm.com>
1098
1099 * linux-low.c (regsets_fetch_inferior_registers): Do not invoke
1100 the regset's store function when ptrace returned an error.
1101 * regcache.c (get_thread_regcache): Invalidate register cache
1102 before fetching inferior's registers.
1103
28eef672
AA
11042014-12-12 Andreas Arnez <arnez@linux.vnet.ibm.com>
1105
1106 * linux-low.c (regsets_fetch_inferior_registers): Rephrase
1107 while-loop as for-loop.
1108 (regsets_store_inferior_registers): Likewise.
1109
bdca27a2
YQ
11102014-11-28 Yao Qi <yao@codesourcery.com>
1111
1112 * configure.ac(AC_CHECK_FUNCS): Remove readlink.
1113 * config.in, configure: Re-generate.
1114 * hostio.c (handle_unlink): Remove code checking HAVE_READLINK
1115 is defined.
1116
9c232dda
YQ
11172014-11-21 Yao Qi <yao@codesourcery.com>
1118
1119 * configure.ac: Don't invoke AC_FUNC_ALLOCA.
1120 (AC_CHECK_HEADERS): Remove malloc.h.
1121 * configure: Re-generated.
1122 * config.in: Re-generated.
1123 * server.h: Don't include alloca.h and malloc.h.
1124 * gdbreplay.c: Don't check HAVE_ALLOCA_H is defined.
1125 Don't include malloc.h.
1126
43968415
JB
11272014-11-17 Joel Brobecker <brobecker@adacore.com>
1128
1129 * lynx-low.c (lynx_write_memory): Put lynx_read_memory and
1130 corresponding ERRNO check in same block.
1131
40e91bc7
PA
11322014-11-12 Pedro Alves <palves@redhat.com>
1133
1134 * server.c (cont_thread): Update comment.
1135 (start_inferior, attach_inferior): No longer clear cont_thread.
1136 (handle_v_cont): No longer set cont_thread.
1137 (captured_main): Clear cont_thread each time a GDB connects.
1138
c2c118cf
PA
11392014-11-12 Pedro Alves <palves@redhat.com>
1140
1141 * linux-low.c (linux_wait_1): Don't force a wait for the Hc
1142 thread, and don't resume all threads if the Hc thread has exited.
1143
78708b7c
PA
11442014-11-12 Pedro Alves <palves@redhat.com>
1145
1146 * linux-low.c (linux_request_interrupt): Always send a SIGINT to
1147 the process group instead of to a specific LWP.
1148
a2abc7de
PA
11492014-10-15 Pedro Alves <palves@redhat.com>
1150
1151 PR server/17487
1152 * win32-arm-low.c (arm_set_thread_context): Remove current_event
1153 parameter.
1154 (arm_set_thread_context): Delete.
1155 (the_low_target): Adjust.
1156 * win32-i386-low.c (debug_registers_changed)
1157 (debug_registers_used): Delete.
1158 (update_debug_registers_callback): New function.
1159 (x86_dr_low_set_addr, x86_dr_low_set_control): Mark all threads as
1160 needing to update their debug registers.
1161 (win32_get_current_dr): New function.
1162 (x86_dr_low_get_addr, x86_dr_low_get_control)
1163 (x86_dr_low_get_status): Fetch the debug register from the thread
1164 record's context.
1165 (i386_initial_stuff): Adjust.
1166 (i386_get_thread_context): Remove current_event parameter. Don't
1167 clear debug_registers_changed nor copy DR values to
1168 debug_reg_state.
1169 (i386_set_thread_context): Delete.
1170 (i386_prepare_to_resume): New function.
1171 (i386_thread_added): Mark the thread as needing to update irs
1172 debug registers.
1173 (the_low_target): Remove i386_set_thread_context and install
1174 i386_prepare_to_resume.
1175 * win32-low.c (win32_get_thread_context): Adjust.
1176 (win32_set_thread_context): Use SetThreadContext
1177 directly.
1178 (win32_prepare_to_resume): New function.
1179 (win32_require_context): New function, factored out from ...
1180 (thread_rec): ... this.
1181 (continue_one_thread): Call win32_prepare_to_resume on each thread
1182 we're about to continue.
1183 (win32_resume): Call win32_prepare_to_resume on the event thread.
1184 * win32-low.h (struct win32_thread_info)
1185 <debug_registers_changed>: New field.
1186 (struct win32_target_ops): Change prototype of set_thread_context,
1187 delete set_thread_context and add prepare_to_resume.
1188 (win32_require_context): New declaration.
1189
a442d071
GB
11902014-10-08 Gary Benson <gbenson@redhat.com>
1191
1192 * server.h: Do not include common-exceptions.h.
1193
6f1947e8
GB
11942014-10-08 Gary Benson <gbenson@redhat.com>
1195
1196 * server.h: Do not include cleanups.h.
1197
63b434a4
JH
11982014-09-30 James Hogan <james.hogan@imgtec.com>
1199
1200 * Makefile.in (clean): Add rm -f commands for mips-dsp-linux.c and
1201 mips64-dsp-linux.c.
1202
c4d9ceb6
YQ
12032014-09-23 Yao Qi <yao@codesourcery.com>
1204
1205 * linux-low.c (lp_status_maybe_breakpoint): New function.
1206 (linux_low_filter_event): Call lp_status_maybe_breakpoint.
1207 (count_events_callback): Likewise.
1208 (select_event_lwp_callback): Likewise.
1209 (cancel_breakpoints_callback): Likewise.
1210
89a5711c
DB
12112014-09-19 Don Breazeal <donb@codesourcery.com>
1212
1213 * linux-low.c (handle_extended_wait): Call
1214 linux_ptrace_get_extended_event.
1215 (get_stop_pc, get_detach_signal, linux_low_filter_event): Call
1216 linux_is_extended_waitstatus.
1217
bffc0964
JB
12182014-09-16 Joel Brobecker <brobecker@adacore.com>
1219
1220 * Makefile.in (CPPFLAGS): Define.
1221 (INTERNAL_CFLAGS_BASE): Add ${CPPFLAGS}.
1222 (IPAGENT_CFLAGS): Remove ${CPPFLAGS}.
1223
0bfdf32f
GB
12242014-09-16 Gary Benson <gbenson@redhat.com>
1225
1226 * inferiors.h (current_inferior): Renamed as...
1227 (current_thread): New variable. All uses updated.
1228 * linux-low.c (get_pc): Renamed saved_inferior as saved_thread.
1229 (maybe_move_out_of_jump_pad): Likewise.
1230 (cancel_breakpoint): Likewise.
1231 (linux_low_filter_event): Likewise.
1232 (wait_for_sigstop): Likewise.
1233 (linux_resume_one_lwp): Likewise.
1234 (need_step_over_p): Likewise.
1235 (start_step_over): Likewise.
1236 (linux_stabilize_threads): Renamed save_inferior as saved_thread.
1237 * linux-x86-low.c (x86_linux_update_xmltarget): Likewise.
1238 * proc-service.c (ps_lgetregs): Renamed reg_inferior as reg_thread
1239 and save_inferior as saved_thread.
1240 * regcache.c (get_thread_regcache): Renamed saved_inferior as
1241 saved_thread.
1242 (regcache_invalidate_thread): Likewise.
1243 * remote-utils.c (prepare_resume_reply): Likewise.
1244 * thread-db.c (thread_db_get_tls_address): Likewise.
1245 (disable_thread_event_reporting): Likewise.
1246 (remove_thread_event_breakpoints): Likewise.
1247 * tracepoint.c (gdb_agent_about_to_close): Renamed save_inferior
1248 as saved_thread.
1249 * target.h (set_desired_inferior): Renamed as...
1250 (set_desired_thread): New declaration. All uses updated.
1251 * server.c (myresume): Updated comment to reference thread instead
1252 of inferior.
1253 (handle_serial_event): Likewise.
1254 (handle_target_event): Likewise.
1255
361c8ade
GB
12562014-09-12 Tom Tromey <tromey@redhat.com>
1257 Gary Benson <gbenson@redhat.com>
1258
1259 * regcache.h: Include common-regcache.h.
1260 (regcache_read_pc): Don't declare.
1261 * regcache.c (get_thread_regcache_for_ptid): New function.
1262
bd9269f7
GB
12632014-09-11 Tom Tromey <tromey@redhat.com>
1264 Gary Benson <gbenson@redhat.com>
1265
1266 * symbol.c: New file.
1267 * Makefile.in (SFILES): Add symbol.c.
1268 (OBS): Add symbol.o.
1269
f8c1d06b
GB
12702014-09-11 Gary Benson <gbenson@redhat.com>
1271
1272 * target.c (target_stop_ptid, target_continue_ptid): New
1273 functions.
1274
721ec300
GB
12752014-09-11 Tom Tromey <tromey@redhat.com>
1276 Gary Benson <gbenson@redhat.com>
1277
1278 * target.h: Include target/target.h.
1279 * target.c (target_read_memory, target_read_uint32)
1280 (target_write_memory): New functions.
1281
c5e92cca
GB
12822014-09-11 Gary Benson <gbenson@redhat.com>
1283
1284 * server.h (debug_hw_points): Don't declare.
1285 * server.c (debug_hw_points): Don't define. Replace all uses
1286 with show_debug_regs.
1287 * linux-aarch64-low.c (debug_hw_points): Don't define. Replace
1288 all uses with show_debug_regs.
1289
2e4bb98a
EBM
12902014-09-08 Edjunior Barbosa Machado <emachado@linux.vnet.ibm.com>
1291
1292 * linux-ppc-low.c (ppc_collect_ptrace_register): Adjust routine to take
1293 endianness into account.
1294 (ppc_supply_ptrace_register): Likewise.
1295
ac740bc7
JH
12962014-09-03 James Hogan <james.hogan@imgtec.com>
1297
1298 * linux-mips-low.c (mips_read_description): Reset errno to 0 prior
1299 to reading DSP_CONTROL with PTRACE_PEEKUSER ptrace call.
1300
97ea6506
GB
13012014-09-03 Gary Benson <gbenson@redhat.com>
1302
1303 * linux-x86-low.c (x86_linux_prepare_to_resume): Use
1304 ALL_DEBUG_ADDRESS_REGISTERS.
1305
df7e5265
GB
13062014-09-02 Gary Benson <gbenson@redhat.com>
1307
1308 * i386-low.h: Renamed as...
1309 * x86-low.h: New file. All type, function and variable name
1310 prefixes changed from "i386_" to "x86_". All references updated.
1311 * i386-low.c: Renamed as...
1312 * x86-low.c: New file. All type, function and variable name
1313 prefixes changed from "i386_" to "x86_". All references updated.
1314
ed859da7
GB
13152014-09-02 Gary Benson <gbenson@redhat.com>
1316
1317 * linux-x86-low.c (x86_linux_new_process): Use XCNEW.
1318 (x86_linux_new_thread): Likewise.
1319
860789c7
GB
13202014-08-29 Gary Benson <gbenson@redhat.com>
1321
1322 * server.h (setjmp.h): Do not include.
1323 (toplevel): Do not declare.
1324 (common-exceptions.h): Include.
1325 (cleanups.h): Likewise.
1326 * server.c (toplevel): Do not define.
1327 (exit_code): New static global.
1328 (detach_or_kill_for_exit_cleanup): New function.
1329 (main): New function. Original main renamed to...
1330 (captured_main): New function.
1331 * utils.c (verror) [!IN_PROCESS_AGENT]: Use throw_verror.
1332
ff55e1b5
GB
13332014-08-29 Gary Benson <gbenson@redhat.com>
1334
1335 * Makefile.in (SFILES): Add common/common-exceptions.c.
1336 (OBS): Add common-exceptions.o.
1337 (common-exceptions.o): New rule.
1338 * utils.c (prepare_to_throw_exception): New function.
1339
e9bcb658
GB
13402014-08-29 Gary Benson <gbenson@redhat.com>
1341
1342 * config.in: Regenerate.
1343 * configure: Likewise.
1344
e3180625
GB
13452014-08-29 Gary Benson <gbenson@redhat.com>
1346
1347 * Makefile.in (SFILES): Add common/cleanups.c.
1348 (OBS): cleanups.o.
1349 (cleanups.o): New rule.
1350
e3d6ba5d
GB
13512014-08-29 Gary Benson <gbenson@redhat.com>
1352
1353 * utils.c (internal_vwarning): New function.
1354
7096e886
GB
13552014-08-28 Gary Benson <gbenson@redhat.com>
1356
1357 * utils.h (fatal): Remove declaration.
1358 * utils.c (fatal): Remove function.
1359
14ce3192
GB
13602014-08-28 Gary Benson <gbenson@redhat.com>
1361
1362 * tracepoint.c (gdb_agent_init): Replace fatal with
1363 perror_with_name.
1364 (initialize_tracepoint): Likewise.
1365
50278d59
GB
13662014-08-28 Gary Benson <gbenson@redhat.com>
1367
1368 * remote-utils.c (remote_prepare): Replace fatal with error.
1369
aa96c426
GB
13702014-08-28 Gary Benson <gbenson@redhat.com>
1371
1372 * linux-low.c (linux_async): Replace fatal with warning.
1373 Tidy up and return.
1374 (linux_start_non_stop): Return -1 if linux_async failed.
1375
f7160e97
GB
13762014-08-28 Gary Benson <gbenson@redhat.com>
1377
1378 * linux-x86-low.c (i386_dr_low_set_addr): Replace check with
1379 gdb_assert.
1380 (i386_dr_low_get_addr): Remove vague comment.
1381 * win32-i386-low.c (i386_dr_low_set_addr): Replace check with
1382 gdb_assert.
1383
38e08fca
GB
13842014-08-28 Gary Benson <gbenson@redhat.com>
1385
1386 * inferiors.c (get_thread_process): Replace check with gdb_assert.
1387 * linux-low.c (linux_wait_for_event_filtered): Replace fatal with
1388 internal_error.
1389 (linux_resume_one_lwp): Likewise.
1390 * linux-x86-low.c (x86_siginfo_fixup): Replace checks with
1391 gdb_assert.
1392 * mem-break.c (raw_bkpt_type_to_target_hw_bp_type): Replace fatal
1393 with internal_error.
1394 * regcache.c (get_thread_regcache): Replace check with gdb_assert.
1395 (init_register_cache): Replace fatal with gdb_assert_not_reached.
1396 (find_register_by_name): Replace fatal with internal_error.
1397 (find_regno): Likewise.
1398 * tdesc.c (init_target_desc): Replace check with gdb_assert.
1399 * thread-db.c (thread_db_create_event): Likewise.
1400 (thread_db_load_search): Likewise.
1401 (try_thread_db_load_1): Likewise.
1402 * tracepoint.c (get_jump_space_head): Replace fatal with
1403 internal_error.
1404 (claim_trampoline_space): Likewise.
1405 (have_fast_tracepoint_trampoline_buffer): Likewise.
1406 (cmd_qtstart): Likewise.
1407 (stop_tracing): Likewise.
1408 (fast_tracepoint_collecting): Likewise.
1409 (target_malloc): Likewise.
1410 (download_tracepoint): Likewise.
1411 (download_trace_state_variables): Replace check with gdb_assert.
1412 (upload_fast_traceframes): Replace fatal with internal_error.
1413
34abf635
GB
14142014-08-19 Tom Tromey <tromey@redhat.com>
1415 Gary Benson <gbenson@redhat.com>
1416
1417 * Makefile.in (SFILES): Add common/common-debug.c.
1418 (OBS): Add common-debug.o.
1419 (common-debug.o): New rule.
1420 * debug.h (debug_printf): Don't declare.
1421 * debug.c (debug_printf): Renamed and rewritten as...
1422 (debug_vprintf): New function.
1423
f6e94d78
GB
14242014-08-19 Gary Benson <gbenson@redhat.com>
1425
1426 * utils.h: Do not include print-utils.h.
1427
9239eeab
GB
14282014-08-19 Tom Tromey <tromey@redhat.com>
1429 Gary Benson <gbenson@redhat.com>
1430
1431 * server.h: Add static assertion.
1432 (gdb_byte, CORE_ADDR, LONGEST, ULONGEST): Remove.
1433
ef87c8bb
GB
14342014-08-19 Tom Tromey <tromey@redhat.com>
1435 Gary Benson <gbenson@redhat.com>
1436
1437 * Makefile.in (SFILES): Add common/errors.c.
1438 (OBS): Add errors.o.
1439 (IPA_OBS): Add errors-ipa.o.
1440 (errors.o): New rule.
1441 (errors-ipa.o): Likewise.
1442 * utils.h (perror_with_name, error, warning): Don't declare.
1443 * utils.c (warning): Renamed and rewritten as...
1444 (vwarning): New function.
1445 (error): Renamed and rewritten as...
1446 (verror): New function.
1447 (internal_error): Renamed and rewritten as...
1448 (internal_verror): New function.
1449
bb974a24
GB
14502014-08-07 Gary Benson <gbenson@redhat.com>
1451
1452 * configure.ac (AC_CHECK_HEADERS): Remove errno.h.
1453 * configure: Regenerate.
1454 * config.in: Likewise.
1455 * server.h: Do not include errno.h.
1456 * event-loop.c: Likewise.
1457 * hostio-errno.c: Likewise.
1458 * linux-low.c: Likewise.
1459 * remote-utils.c: Likewise.
1460 * spu-low.c: Likewise.
1461 * utils.c: Likewise.
1462 * gdbreplay.c: Unconditionally include errno.h.
1463
6d3d12eb
GB
14642014-08-07 Gary Benson <gbenson@redhat.com>
1465
1466 * server.h: Do not include string.h.
1467 * event-loop.c: Likewise.
1468 * linux-low.c: Likewise.
1469 * regcache.c: Likewise.
1470 * remote-utils.c: Likewise.
1471 * spu-low.c: Likewise.
1472 * utils.c: Likewise.
1473
dccbb609
GB
14742014-08-07 Gary Benson <gbenson@redhat.com>
1475
1476 * server.h: Do not include gdb_assert.h.
1477
e76df0d0
GB
14782014-08-07 Gary Benson <gbenson@redhat.com>
1479
1480 * server.h: Do not include common-utils.h.
1481
4cb9c816
GB
14822014-08-07 Gary Benson <gbenson@redhat.com>
1483
1484 * server.h: Do not include ptid.h.
1485 * notif.h: Likewise.
1486
3995eeee
GB
14872014-08-07 Gary Benson <gbenson@redhat.com>
1488
1489 * server.h: Do not include gdb_locale.h.
1490
cb9f1a9b
GB
14912014-08-07 Gary Benson <gbenson@redhat.com>
1492
1493 * server.h: Do not include gdb/signals.h.
1494 * win32-low.c: Likewise.
1495
a5fceff8
GB
14962014-08-07 Gary Benson <gbenson@redhat.com>
1497
1498 * server.h: Do not include pathmax.h.
1499
b9391142
GB
15002014-08-07 Gary Benson <gbenson@redhat.com>
1501
1502 * server.h: Do not include libiberty.h.
1503 * linux-bfin-low.c: Likewise.
1504
0e443c87
GB
15052014-08-07 Gary Benson <gbenson@redhat.com>
1506
1507 * server.h: Do not include ansidecl.h.
1508
8ebb3f56
GB
15092014-08-07 Gary Benson <gbenson@redhat.com>
1510
1511 * linux-x86-low.c: Do not include stddef.h.
1512 * lynx-ppc-low.c: Likewise.
1513 * tracepoint.c: Likewise.
1514
8980bdf6
GB
15152014-08-07 Gary Benson <gbenson@redhat.com>
1516
1517 * server.h: Do not include stdarg.h.
1518 * nto-low.c: Likewise.
1519
d7096f71
GB
15202014-08-07 Gary Benson <gbenson@redhat.com>
1521
1522 * server.h: Do not include stdlib.h.
1523 * inferiors.c: Likewise.
1524 * linux-low.c: Likewise.
1525 * regcache.c: Likewise.
1526 * spu-low.c: Likewise.
1527 * tracepoint.c: Likewise.
1528 * utils.c: Likewise.
1529
d02f550d
GB
15302014-08-07 Gary Benson <gbenson@redhat.com>
1531
1532 * server.h: Do not include stdio.h.
1533 * linux-low.c: Likewise.
1534 * remote-utils.c: Likewise.
1535 * spu-low.c: Likewise.
1536 * utils.c: Likewise.
1537 * wincecompat.c: Likewise.
1538
87f6c4e3
GB
15392014-08-06 Gary Benson <gbenson@redhat.com>
1540
1541 * regcache.c (init_register_cache): Move conditionals inside if.
1542
7089dca4
GB
15432014-08-06 Gary Benson <gbenson@redhat.com>
1544
1545 * linux-low.c (linux_supports_non_stop): Use target_is_async_p.
1546
462f517e
GB
15472014-07-31 Gary Benson <gbenson@redhat.com>
1548
1549 * ax.h: Do not include server.h.
1550 * gdbthread.h: Likewise.
1551 * lynx-low.h: Likewise.
1552 * notif.h: Likewise.
1553
976411d6
GB
15542014-07-30 Gary Benson <gbenson@redhat.com>
1555
1556 * server.h: Include common-defs.h.
1557 Do not include config.h or build-gnulib-gdbserver/config.h.
1558
d41f6d8e
GB
15592014-07-30 Gary Benson <gbenson@redhat.com>
1560
1561 * hostio-errno.c: Move server.h to top of includes list.
1562 * inferiors.c: Likewise.
1563 * linux-x86-low.c: Likewise.
1564 * notif.c: Include server.h.
1565
314c6a35
TT
15662014-07-24 Tom Tromey <tromey@redhat.com>
1567 Gary Benson <gbenson@redhat.com>
1568
1569 * server.h (CORE_ADDR): Now unsigned.
1570
69ff6be5
PA
15712014-07-16 Pedro Alves <palves@redhat.com>
1572
1573 * linux-low.c (linux_kill_one_lwp): Use kill_lwp, not kill.
1574
ce9e3fe7
PA
15752014-07-15 Pedro Alves <palves@redhat.com>
1576
1577 * linux-low.c (linux_kill_one_lwp): Save errno and work with saved
1578 copy.
1579
e76126e8
PA
15802014-07-11 Pedro Alves <palves@redhat.com>
1581
1582 * linux-low.c (kill_wait_lwp): New function, based on
1583 kill_one_lwp_callback, but use my_waitpid directly.
1584 (kill_one_lwp_callback, linux_kill): Use it.
1585
8e9db26e
PA
15862014-06-23 Pedro Alves <palves@redhat.com>
1587
1588 * linux-x86-low.c (x86_linux_prepare_to_resume): Clear DR_CONTROL
1589 before setting DR0..DR3.
1590
698b3e08
GB
15912014-06-20 Gary Benson <gbenson@redhat.com>
1592
1593 * configure.ac (AC_REPLACE_FUNCS) <vasprintf, vsnprintf>: Removed.
1594 * configure: Regenerated.
1595 * config.in: Likewise.
1596
125f8a3d
GB
15972014-06-20 Gary Benson <gbenson@redhat.com>
1598
1599 * Makefile.in (SFILES): Update locations for files moved
1600 from common to nat.
1601 (object file files): Reordered.
1602
42995dbd
GB
16032014-06-20 Gary Benson <gbenson@redhat.com>
1604
1605 * i386-low.h (i386_dr_low_can_set_addr): Removed.
1606 (i386_dr_low_set_addr): Likewise.
1607 (i386_dr_low_get_addr): Likewise.
1608 (i386_dr_low_can_set_control): Likewise.
1609 (i386_dr_low_set_control): Likewise.
1610 (i386_dr_low_get_control): Likewise.
1611 (i386_dr_low_get_status): Likewise.
1612 (i386_get_debug_register_length): Likewise.
1613 * linux-x86-low.c (i386_dr_low_set_addr):
1614 Changed signature. Made static.
1615 (i386_dr_low_get_addr): Likewise.
1616 (i386_dr_low_set_control): Likewise.
1617 (i386_dr_low_get_control): Likewise.
1618 (i386_dr_low_get_status): Likewise.
1619 (i386_dr_low): New global variable.
1620 * win32-i386-low.c (i386_dr_low_set_addr):
1621 Changed signature. Made static.
1622 (i386_dr_low_get_addr): Likewise.
1623 (i386_dr_low_set_control): Likewise.
1624 (i386_dr_low_get_control): Likewise.
1625 (i386_dr_low_get_status): Likewise.
1626 (i386_dr_low): New global variable.
1627
e1d2394b
MS
16282014-06-20 Marcus Shawcroft <marcus.shawcroft@arm.com>
1629
1630 * configure.ac: Invoke. AC_CHECK_TOOL(AR, ar).
1631 * Makefile.in (AR, AR_FLAGS): Define.
1632 * configure: Regenerate.
1633
3a8ee006
GB
16342014-06-19 Gary Benson <gbenson@redhat.com>
1635
1636 * Makefile.in (i386-dregs.o): New rule.
1637 * configure.srv: Add i386-dregs.o to all targets using i386-low.o.
1638 * i386-low.c (target.h): Remove include.
1639 (TARGET_HAS_DR_LEN_8): Now in i386-dregs.c.
1640 (DR_CONTROL_SHIFT): Likewise.
1641 (DR_CONTROL_SIZE): Likewise.
1642 (DR_RW_EXECUTE): Likewise.
1643 (DR_RW_WRITE): Likewise.
1644 (DR_RW_READ): Likewise.
1645 (DR_RW_IORW): Likewise.
1646 (DR_LEN_1): Likewise.
1647 (DR_LEN_2): Likewise.
1648 (DR_LEN_4): Likewise.
1649 (DR_LEN_8): Likewise.
1650 (DR_LOCAL_ENABLE_SHIFT): Likewise.
1651 (DR_GLOBAL_ENABLE_SHIFT): Likewise.
1652 (DR_ENABLE_SIZE): Likewise.
1653 (DR_LOCAL_SLOWDOWN): Likewise.
1654 (DR_GLOBAL_SLOWDOWN): Likewise.
1655 (DR_CONTROL_RESERVED): Likewise.
1656 (I386_DR_CONTROL_MASK): Likewise.
1657 (I386_DR_VACANT): Likewise.
1658 (I386_DR_LOCAL_ENABLE): Likewise.
1659 (I386_DR_GLOBAL_ENABLE): Likewise.
1660 (I386_DR_DISABLE): Likewise.
1661 (I386_DR_SET_RW_LEN): Likewise.
1662 (I386_DR_GET_RW_LEN): Likewise.
1663 (I386_DR_WATCH_HIT): Likewise.
1664 (i386_wp_op_t): Likewise.
1665 (i386_show_dr): Likewise.
1666 (i386_length_and_rw_bits): Likewise.
1667 (i386_insert_aligned_watchpoint): Likewise.
1668 (i386_remove_aligned_watchpoint): Likewise.
1669 (i386_handle_nonaligned_watchpoint): Likewise.
1670 i386_update_inferior_debug_regs(): Likewise.
1671 (i386_dr_insert_watchpoint): Likewise.
1672 (i386_dr_remove_watchpoint): Likewise.
1673 (i386_dr_region_ok_for_watchpoint): Likewise.
1674 (i386_dr_stopped_data_address): Likewise.
1675 (i386_dr_stopped_by_watchpoint): Likewise.
1676
8f26655c
GB
16772014-06-19 Gary Benson <gbenson@redhat.com>
1678
1679 * i386-low.c (i386_dr_show): Renamed to
1680 i386_show_dr and made static. All uses updated.
1681 (i386_dr_length_and_rw_bits): Renamed to
1682 i386_length_and_rw_bits and made static.
1683 All uses updated.
1684 (i386_dr_insert_aligned_watchpoint): Renamed to
1685 i386_insert_aligned_watchpoint and made static.
1686 All uses updated.
1687 (i386_dr_remove_aligned_watchpoint): Renamed to
1688 i386_remove_aligned_watchpoint and made static.
1689 All uses updated.
1690 (i386_dr_update_inferior_debug_regs): Renamed to
1691 i386_update_inferior_debug_regs and made static.
1692 All uses updated.
1693
b9228891
GB
16942014-06-18 Gary Benson <gbenson@redhat.com>
1695
5171def3
GB
1696 * i386-low.h (i386_dr_low_can_set_addr): New macro.
1697 (i386_dr_low_can_set_control): Likewise.
1698 (i386_get_debug_register_length): Likewise.
1699 * i386-low.c (i386_dr_low_can_set_addr): Now in i386-low.h.
1700 (i386_dr_low_can_set_control): Likewise.
1701 (i386_get_debug_register_length): Likewise.
1702
17032014-06-17 Gary Benson <gbenson@redhat.com>
1704
b9228891
GB
1705 * i386-low.h (i386-dregs.h): New include.
1706 (DR_FIRSTADDR): Now in i386-dregs.h.
1707 (DR_LASTADDR): Likewise.
1708 (DR_NADDR): Likewise.
1709 (DR_STATUS): Likewise.
1710 (DR_CONTROL): Likewise.
1711 (i386_debug_reg_state): Likewise.
1712 (i386_dr_insert_watchpoint): Likewise.
1713 (i386_dr_remove_watchpoint): Likewise.
1714 (i386_dr_region_ok_for_watchpoint): Likewise.
1715 (i386_dr_stopped_data_address): Likewise.
1716 (i386_dr_stopped_by_watchpoint): Likewise.
1717 * i386-low.c (ALL_DEBUG_REGISTERS): Likewise.
1718
4be83cc2
GB
17192014-06-18 Gary Benson <gbenson@redhat.com>
1720
1721 * i386-low.h (i386_low_insert_watchpoint): Renamed to
1722 i386_dr_insert_watchpoint.
1723 (i386_low_remove_watchpoint): Renamed to
1724 i386_dr_remove_watchpoint.
1725 (i386_low_region_ok_for_watchpoint): Renamed to
1726 i386_dr_region_ok_for_watchpoint.
1727 (i386_low_stopped_data_address): Renamed to
1728 i386_dr_stopped_data_address.
1729 (i386_low_stopped_by_watchpoint): Renamed to
1730 i386_dr_stopped_by_watchpoint.
1731 * i386-low.c (i386_show_dr): Renamed to
1732 i386_dr_show and made nonstatic. All uses updated.
1733 (i386_length_and_rw_bits): Renamed to
1734 i386_dr_length_and_rw_bits and made nonstatic.
1735 All uses updated.
1736 (i386_insert_aligned_watchpoint): Renamed to
1737 i386_dr_insert_aligned_watchpoint and made nonstatic.
1738 All uses updated.
1739 (i386_remove_aligned_watchpoint): Renamed to
1740 i386_dr_remove_aligned_watchpoint and made nonstatic.
1741 All uses updated.
1742 (i386_update_inferior_debug_regs): Renamed to
1743 i386_dr_update_inferior_debug_regs and made nonstatic.
1744 All uses updated.
1745 (i386_low_insert_watchpoint): Renamed to
1746 i386_dr_insert_watchpoint. All uses updated.
1747 (i386_low_remove_watchpoint): Renamed to
1748 i386_dr_remove_watchpoint. All uses updated.
1749 (i386_low_region_ok_for_watchpoint): Renamed to
1750 i386_dr_region_ok_for_watchpoint. All uses updated.
1751 (i386_low_stopped_data_address): Renamed to
1752 i386_dr_stopped_data_address. All uses updated.
1753 (i386_low_stopped_by_watchpoint): Renamed to
1754 i386_dr_stopped_by_watchpoint. All uses updated.
1755
131aa0d4
GB
17562014-06-18 Gary Benson <gbenson@redhat.com>
1757
1758 * i386-low.c (i386_dr_low_can_set_addr): New macro.
1759 (i386_dr_low_can_set_control): Likewise.
1760 (i386_insert_aligned_watchpoint): New check.
1761
d9305f7f
GB
17622014-06-18 Gary Benson <gbenson@redhat.com>
1763
1764 * i386-low.c (i386_update_inferior_debug_regs) <inf_state>:
1765 Renamed to state.
1766
e927c9fc
GB
17672014-06-18 Gary Benson <gbenson@redhat.com>
1768
1769 * i386-low.c (i386_length_and_rw_bits): Use internal_error
1770 instead of fatal and error.
1771 (i386_handle_nonaligned_watchpoint): Likewise.
1772
1b6d4134
GB
17732014-06-18 Gary Benson <gbenson@redhat.com>
1774
1775 * i386-low.c (i386_get_debug_register_length): New macro.
1776 (TARGET_HAS_DR_LEN_8): Remove conditional. Use above macro.
1777 (i386_show_dr): Use debug_printf instead of fprintf. Use
1778 phex to format values.
1779
6e62758f
GB
17802014-06-18 Gary Benson <gbenson@redhat.com>
1781
1782 * i386-low.h: Comment changes.
1783 * i386-low.c: Likewise.
1784
fc6e2f03
GB
17852014-06-18 Gary Benson <gbenson@redhat.com>
1786
1787 * i386-low.c: Whitespace changes.
1788
f9d1eeed
TT
17892014-06-12 Tom Tromey <tromey@redhat.com>
1790
1791 * utils.c (freeargv): Remove.
1792
0b04e523
TT
17932014-06-12 Tom Tromey <tromey@redhat.com>
1794
1795 * debug.c (debug_printf): Remove HAVE_GETTIMEOFDAY checks.
1796 * server.c (monitor_show_help): Remove HAVE_GETTIMEOFDAY check.
1797 (parse_debug_format_options): Likewise.
1798 (gdbserver_usage): Likewise.
1799 * Makefile.in (LIBIBERTY_BUILDDIR, LIBIBERTY): New variables.
1800 (SUBDIRS, REQUIRED_SUBDIRS): Add libiberty.
1801 (gdbserver$(EXEEXT), gdbreplay$(EXEEXT)): Depend on and link
1802 against libiberty.
1803 ($(LIBGNU)): Depend on libiberty.
1804 (all-lib): Recurse into all subdirs.
1805 (install-only): Invoke "install" target in subdirs.
1806 (vasprintf.o, vsnprintf.o, safe-ctype.o, lbasename.o): Remove
1807 targets.
1808 * configure: Rebuild.
1809 * configure.ac: Add ACX_CONFIGURE_DIR for libiberty. Don't check
1810 for vasprintf, vsnprintf, or gettimeofday.
1811 * configure.srv: Don't add safe-ctype.o or lbasename.o to
1812 srv_tgtobj.
1813
270c9937
JB
18142014-06-05 Joel Brobecker <brobecker@adacore.com>
1815
1816 * development.sh: Delete.
1817 * Makefile.in (config.status): Adjust dependency on development.sh.
1818 * configure.ac: Adjust development.sh source call.
1819 * configure: Regenerate.
1820
0a261ed8
PA
18212014-06-02 Pedro Alves <palves@redhat.com>
1822
1823 * ax.c (gdb_free_agent_expr): New function.
1824 * ax.h (gdb_free_agent_expr): New declaration.
1825 * mem-break.c (delete_gdb_breakpoint_1): Also clear the commands
1826 list.
1827 (clear_breakpoint_conditions, clear_breakpoint_commands): Make
1828 static.
1829 (clear_breakpoint_conditions_and_commands): New function.
1830 * mem-break.h (clear_breakpoint_conditions): Delete declaration.
1831 (clear_breakpoint_conditions_and_commands): New declaration.
1832
e9dae05e
RR
18332014-05-23 Ramana Radhakrishnan <ramana.radhakrishnan@arm.com>
1834
1835 * linux-aarch64-low.c (asm/ptrace.h): Include.
1836
5876f503
JK
18372014-05-21 Jan Kratochvil <jan.kratochvil@redhat.com>
1838
1839 Fix TLS access for -static -pthread.
1840 * gdbserver/thread-db.c (struct thread_db): Add td_thr_tlsbase_p.
1841 (thread_db_get_tls_address): Call it if LOAD_MODULE is zero.
1842 (thread_db_load_search, try_thread_db_load_1): Initialize it.
1843
802e8e6d
PA
18442014-05-20 Pedro Alves <palves@redhat.com>
1845
1846 * linux-aarch64-low.c (aarch64_insert_point)
1847 (aarch64_remove_point): No longer check whether the type is
1848 supported here. Adjust to new interface.
1849 (the_low_target): Install aarch64_supports_z_point_type as
1850 supports_z_point_type method.
1851 * linux-arm-low.c (raw_bkpt_type_to_arm_hwbp_type): New function.
1852 (arm_linux_hw_point_initialize): Take an enum raw_bkpt_type
1853 instead of a Z packet char. Adjust.
1854 (arm_supports_z_point_type): New function.
1855 (arm_insert_point, arm_remove_point): Adjust to new interface.
1856 (the_low_target): Install arm_supports_z_point_type.
1857 * linux-crisv32-low.c (cris_supports_z_point_type): New function.
1858 (cris_insert_point, cris_remove_point): Adjust to new interface.
1859 Don't check whether the type is supported here.
1860 (the_low_target): Install cris_supports_z_point_type.
1861 * linux-low.c (linux_supports_z_point_type): New function.
1862 (linux_insert_point, linux_remove_point): Adjust to new interface.
1863 * linux-low.h (struct linux_target_ops) <insert_point,
1864 remove_point>: Take an enum raw_bkpt_type instead of a char. Add
1865 raw_breakpoint pointer parameter.
1866 <supports_z_point_type>: New method.
1867 * linux-mips-low.c (mips_supports_z_point_type): New function.
1868 (mips_insert_point, mips_remove_point): Adjust to new interface.
1869 Use mips_supports_z_point_type.
1870 (the_low_target): Install mips_supports_z_point_type.
1871 * linux-ppc-low.c (the_low_target): Install NULL as
1872 supports_z_point_type method.
1873 * linux-s390-low.c (the_low_target): Install NULL as
1874 supports_z_point_type method.
1875 * linux-sparc-low.c (the_low_target): Install NULL as
1876 supports_z_point_type method.
1877 * linux-x86-low.c (x86_supports_z_point_type): New function.
1878 (x86_insert_point): Adjust to new insert_point interface. Use
1879 insert_memory_breakpoint. Adjust to new
1880 i386_low_insert_watchpoint interface.
1881 (x86_remove_point): Adjust to remove_point interface. Use
1882 remove_memory_breakpoint. Adjust to new
1883 i386_low_remove_watchpoint interface.
1884 (the_low_target): Install x86_supports_z_point_type.
1885 * lynx-low.c (lynx_target_ops): Install NULL as
1886 supports_z_point_type callback.
1887 * nto-low.c (nto_supports_z_point_type): New.
1888 (nto_insert_point, nto_remove_point): Adjust to new interface.
1889 (nto_target_ops): Install nto_supports_z_point_type.
1890 * mem-break.c: Adjust intro comment.
1891 (struct raw_breakpoint) <raw_type, size>: New fields.
1892 <inserted>: Update comment.
1893 <shlib_disabled>: Delete field.
1894 (enum bkpt_type) <gdb_breakpoint>: Delete value.
1895 <gdb_breakpoint_Z0, gdb_breakpoint_Z1, gdb_breakpoint_Z2,
1896 gdb_breakpoint_Z3, gdb_breakpoint_Z4>: New values.
1897 (raw_bkpt_type_to_target_hw_bp_type): New function.
1898 (find_enabled_raw_code_breakpoint_at): New function.
1899 (find_raw_breakpoint_at): New type and size parameters. Use them.
1900 (insert_memory_breakpoint): New function, based off
1901 set_raw_breakpoint_at.
1902 (remove_memory_breakpoint): New function.
1903 (set_raw_breakpoint_at): Reimplement.
1904 (set_breakpoint): New, based on set_breakpoint_at.
1905 (set_breakpoint_at): Reimplement.
1906 (delete_raw_breakpoint): Go through the_target->remove_point
1907 instead of assuming memory breakpoints.
1908 (find_gdb_breakpoint_at): Delete.
1909 (Z_packet_to_bkpt_type, Z_packet_to_raw_bkpt_type): New functions.
1910 (find_gdb_breakpoint): New function.
1911 (set_gdb_breakpoint_at): Delete.
1912 (z_type_supported): New function.
1913 (set_gdb_breakpoint_1): New function, loosely based off
1914 set_gdb_breakpoint_at.
1915 (check_gdb_bp_preconditions, set_gdb_breakpoint): New functions.
1916 (delete_gdb_breakpoint_at): Delete.
1917 (delete_gdb_breakpoint_1): New function, loosely based off
1918 delete_gdb_breakpoint_at.
1919 (delete_gdb_breakpoint): New function.
1920 (clear_gdb_breakpoint_conditions): Rename to ...
1921 (clear_breakpoint_conditions): ... this. Don't handle a NULL
1922 breakpoint.
1923 (add_condition_to_breakpoint): Make static.
1924 (add_breakpoint_condition): Take a struct breakpoint pointer
1925 instead of an address. Adjust.
1926 (gdb_condition_true_at_breakpoint): Rename to ...
1927 (gdb_condition_true_at_breakpoint_z_type): ... this, and add
1928 z_type parameter.
1929 (gdb_condition_true_at_breakpoint): Reimplement.
1930 (add_breakpoint_commands): Take a struct breakpoint pointer
1931 instead of an address. Adjust.
1932 (gdb_no_commands_at_breakpoint): Rename to ...
1933 (gdb_no_commands_at_breakpoint_z_type): ... this. Add z_type
1934 parameter. Return true if no breakpoint was found. Change debug
1935 output.
1936 (gdb_no_commands_at_breakpoint): Reimplement.
1937 (run_breakpoint_commands): Rename to ...
1938 (run_breakpoint_commands_z_type): ... this. Add z_type parameter,
1939 and change return type to boolean.
1940 (run_breakpoint_commands): New function.
1941 (gdb_breakpoint_here): Also check for Z1 breakpoints.
1942 (uninsert_raw_breakpoint): Don't try to reinsert a disabled
1943 breakpoint. Go through the_target->remove_point instead of
1944 assuming memory breakpoint.
1945 (uninsert_breakpoints_at, uninsert_all_breakpoints): Uninsert
1946 software and hardware breakpoints.
1947 (reinsert_raw_breakpoint): Go through the_target->insert_point
1948 instead of assuming memory breakpoint.
1949 (reinsert_breakpoints_at, reinsert_all_breakpoints): Reinsert
1950 software and hardware breakpoints.
1951 (check_breakpoints, breakpoint_here, breakpoint_inserted_here):
1952 Check both software and hardware breakpoints.
1953 (validate_inserted_breakpoint): Assert the breakpoint is a
1954 software breakpoint. Set the inserted flag to -1 instead of
1955 setting shlib_disabled.
1956 (delete_disabled_breakpoints): Adjust.
1957 (validate_breakpoints): Only validate software breakpoints.
1958 Adjust to inserted flag change.
1959 (check_mem_read, check_mem_write): Skip breakpoint types other
1960 than software breakpoints. Adjust to inserted flag change.
1961 * mem-break.h (enum raw_bkpt_type): New enum.
1962 (raw_breakpoint, struct process_info): Forward declare.
1963 (Z_packet_to_target_hw_bp_type): Delete declaration.
1964 (raw_bkpt_type_to_target_hw_bp_type, Z_packet_to_raw_bkpt_type)
1965 (set_gdb_breakpoint, delete_gdb_breakpoint)
1966 (clear_breakpoint_conditions): New declarations.
1967 (set_gdb_breakpoint_at, clear_gdb_breakpoint_conditions): Delete.
1968 (breakpoint_inserted_here): Update comment.
1969 (add_breakpoint_condition, add_breakpoint_commands): Replace
1970 address parameter with a breakpoint pointer parameter.
1971 (gdb_breakpoint_here): Update comment.
1972 (delete_gdb_breakpoint_at): Delete.
1973 (insert_memory_breakpoint, remove_memory_breakpoint): Declare.
1974 * server.c (process_point_options): Take a struct breakpoint
1975 pointer instead of an address. Adjust.
1976 (process_serial_event) <Z/z packets>: Use set_gdb_breakpoint and
1977 delete_gdb_breakpoint.
1978 * spu-low.c (spu_target_ops): Install NULL as
1979 supports_z_point_type method.
1980 * target.h: Include mem-break.h.
1981 (struct target_ops) <prepare_to_access_memory>: Update comment.
1982 <supports_z_point_type>: New field.
1983 <insert_point, remove_point>: Take an enum raw_bkpt_type argument
1984 instead of a char. Also take a raw breakpoint pointer.
1985 * win32-arm-low.c (the_low_target): Install NULL as
1986 supports_z_point_type.
1987 * win32-i386-low.c (i386_supports_z_point_type): New function.
1988 (i386_insert_point, i386_remove_point): Adjust to new interface.
1989 (the_low_target): Install i386_supports_z_point_type.
1990 * win32-low.c (win32_supports_z_point_type): New function.
1991 (win32_insert_point, win32_remove_point): Adjust to new interface.
1992 (win32_target_ops): Install win32_supports_z_point_type.
1993 * win32-low.h (struct win32_target_ops):
1994 <supports_z_point_type>: New method.
1995 <insert_point, remove_point>: Take an enum raw_bkpt_type argument
1996 instead of a char. Also take a raw breakpoint pointer.
1997
932539e3
PA
19982014-05-20 Pedro Alves <palves@redhat.com>
1999
2000 * mem-break.h: Include break-common.h.
2001 (Z_PACKET_SW_BP, Z_PACKET_HW_BP, Z_PACKET_WRITE_WP)
2002 (Z_PACKET_READ_WP, Z_PACKET_ACCESS_WP): New defines.
2003 (Z_packet_to_target_hw_bp_type): New declaration.
2004 * mem-break.c (Z_packet_to_target_hw_bp_type): New function.
2005 * i386-low.c (Z_PACKET_HW_BP, Z_PACKET_WRITE_WP, Z_PACKET_READ_WP)
2006 (Z_PACKET_ACCESS_WP): Delete macros.
2007 (Z_packet_to_hw_type): Delete function.
2008 * i386-low.h: Don't include break-common.h here.
2009 (Z_packet_to_hw_type): Delete declaration.
2010 * linux-x86-low.c (x86_insert_point, x86_insert_point): Call
2011 Z_packet_to_target_hw_bp_type instead of Z_packet_to_hw_type.
2012 * win32-i386-low.c (i386_insert_point, i386_remove_point): Call
2013 Z_packet_to_target_hw_bp_type instead of Z_packet_to_hw_type.
2014 * linux-aarch64-low.c: Don't include break-common.h here.
2015 (Z_PACKET_SW_BP, Z_PACKET_HW_BP, Z_PACKET_WRITE_WP)
2016 (Z_PACKET_READ_WP, Z_PACKET_ACCESS_WP): Delete macros.
2017 (Z_packet_to_target_hw_bp_type): Delete function.
2018 * linux-mips-low.c (rsp_bp_type_to_target_hw_bp_type): Delete
2019 function.
2020 (mips_insert_point, mips_remove_point): Use
2021 Z_packet_to_target_hw_bp_type.
2022
4ff0d3d8
PA
20232014-05-20 Pedro Alves <palves@redhat.com>
2024
2025 * linux-aarch64-low.c: Include break-common.h.
2026 (enum target_point_type): Delete.
2027 (Z_packet_to_point_type): Rename to ...
2028 (Z_packet_to_target_hw_bp_type): ... this, and return a
2029 target_hw_bp_type instead.
2030 (aarch64_show_debug_reg_state): Take an enum target_hw_bp_type
2031 instead of an enum target_point_type.
2032 (aarch64_point_encode_ctrl_reg): Likewise. Compute type mask from
2033 breakpoint type.
2034 (aarch64_dr_state_insert_one_point)
2035 (aarch64_dr_state_remove_one_point, aarch64_handle_breakpoint)
2036 (aarch64_handle_aligned_watchpoint)
2037 (aarch64_handle_unaligned_watchpoint, aarch64_handle_watchpoint):
2038 Take an enum target_hw_bp_type instead of an enum
2039 target_point_type.
2040 (aarch64_supports_z_point_type): New function.
2041 (aarch64_insert_point, aarch64_remove_point): Use it. Adjust to
2042 use Z_packet_to_target_hw_bp_type.
2043
786dc519
JB
20442014-05-20 Joel Brobecker <brobecker@adacore.com>
2045
2046 * configure.ac: Only use -Werror by default when DEVELOPMENT
2047 is true.
2048 * configure: Regenerate.
2049
9e0aa64f
JK
20502014-05-19 Jan Kratochvil <jan.kratochvil@redhat.com>
2051
2052 Fix gdbserver qGetTLSAddr for x86_64 -m32.
2053 * linux-x86-low.c (X86_64_USER_REGS): New.
2054 (x86_fill_gregset): Call memset for BUF first in x86_64 -m32 case.
2055
2b577b92
YQ
20562014-04-28 Yao Qi <yao@codesourcery.com>
2057
2058 * Makefile.in (i386-avx512.c): Fix the typo of generated file
2059 name.
2060
94611da2
PA
20612014-04-25 Pedro Alves <palves@redhat.com>
2062
2063 PR server/16255
2064 * linux-low.c (linux_attach_fail_reason_string): New function.
2065 (linux_attach_lwp): Delete.
2066 (linux_attach_lwp_1): Rename to ...
2067 (linux_attach_lwp): ... this. Take a ptid instead of a pid as
2068 argument. Remove "initial" parameter. Return int instead of
2069 void. Don't error or warn here.
2070 (linux_attach): Adjust to call linux_attach_lwp. Call error on
2071 failure to attach to the tgid. Call warning when failing to
2072 attach to an lwp.
2073 * linux-low.h (linux_attach_lwp): Take a ptid instead of a pid as
2074 argument. Remove "initial" parameter. Return int instead of
2075 void. Don't error or warn here.
2076 (linux_attach_fail_reason_string): New declaration.
2077 * thread-db.c (attach_thread): Adjust to linux_attach_lwp's
2078 interface change. Use linux_attach_fail_reason_string.
2079
01f9f808
MS
20802014-04-24 Michael Sturm <michael.sturm@mintel.com>
2081 Walfred Tedeschi <walfred.tedeschi@intel.com>
2082
2083 * Makefile.in: Added rules to handle new files
2084 i386-avx512.c i386-avx512-linux.c amd64-avx512.c
2085 amd64-avx512-linux.c x32-avx512.c x32-avx512-linux.c.
2086 * configure.srv (srv_i386_regobj): Add i386-avx512.o.
2087 (srv_i386_linux_regobj): Add i386-avx512-linux.o.
2088 (srv_amd64_regobj): Add amd64-avx512.o and x32-avx512.o.
2089 (srv_amd64_linux_regobj): Add amd64-avx512-linux.o and
2090 x32-avx512-linux.o.
2091 (srv_i386_32bit_xmlfiles): Add i386/32bit-avx512.xml.
2092 (srv_i386_64bit_xmlfiles): Add i386/64bit-avx512.xml.
2093 (srv_amd64_xmlfiles): Add i386/amd64-avx512.xml and
2094 i386/x32-avx512.xml.
2095 (srv_i386_linux_xmlfiles): Add i386/i386-avx512-linux.xml.
2096 (srv_amd64_linux_xmlfiles): Add i386/amd64-avx512-linux.xml and
2097 i386/x32-avx512-linux.xml.
2098 * i387-fp.c (num_avx512_k_registers): New constant for number
2099 of K registers.
2100 (num_avx512_zmmh_low_registers): New constant for number of
2101 lower ZMM registers (0-15).
2102 (num_avx512_zmmh_high_registers): New constant for number of
2103 higher ZMM registers (16-31).
2104 (num_avx512_ymmh_registers): New contant for number of higher
2105 YMM registers (ymm16-31 added by avx521 on x86_64).
2106 (num_avx512_xmm_registers): New constant for number of higher
2107 XMM registers (xmm16-31 added by AVX512 on x86_64).
2108 (struct i387_xsave): Add space for AVX512 registers.
2109 (i387_cache_to_xsave): Change raw buffer size to 64 characters.
2110 Add code to handle AVX512 registers.
2111 (i387_xsave_to_cache): Add code to handle AVX512 registers.
2112 * linux-x86-low.c (init_registers_amd64_avx512_linux): New
2113 prototypei from generated file.
2114 (tdesc_amd64_avx512_linux): Likewise.
2115 (init_registers_x32_avx512_linux): Likewise.
2116 (tdesc_x32_avx512_linux): Likewise.
2117 (init_registers_i386_avx512_linux): Likewise.
2118 (tdesc_i386_avx512_linux): Likewise.
2119 (x86_64_regmap): Add AVX512 registers.
2120 (x86_linux_read_description): Add code to handle AVX512 XSTATE
2121 mask.
2122 (initialize_low_arch): Add code to initialize AVX512 registers.
2123
51aa91f9
PA
21242014-04-23 Pedro Alves <palves@redhat.com>
2125
2126 * mem-break.c (find_gdb_breakpoint_at): Make static.
2127 * mem-break.h (find_gdb_breakpoint_at): Delete declaration.
2128
a4165e94
PA
21292014-04-23 Pedro Alves <palves@redhat.com>
2130
2131 * i386-low.c: Don't include break-common.h here.
2132 (i386_low_insert_watchpoint, i386_low_remove_watchpoint): Change
2133 prototype to take target_hw_bp_type as argument instead of a Z
2134 packet char.
2135 * i386-low.h: Include break-common.h here.
2136 (Z_packet_to_hw_type): Declare.
2137 (i386_low_insert_watchpoint, i386_low_remove_watchpoint): Change
2138 prototypes.
2139 * linux-x86-low.c (x86_insert_point): Convert the packet number to
2140 a target_hw_bp_type before calling i386_low_insert_watchpoint.
2141 (x86_remove_point): Convert the packet number to a
2142 target_hw_bp_type before calling i386_low_remove_watchpoint.
2143 * win32-i386-low.c (i386_insert_point): Convert the packet number
2144 to a target_hw_bp_type before calling i386_low_insert_watchpoint.
2145 (i386_remove_point): Convert the packet number to a
2146 target_hw_bp_type before calling i386_low_remove_watchpoint.
2147
b8acf843
PA
21482014-04-23 Pedro Alves <palves@redhat.com>
2149
2150 * utils.h (perror_with_name): Add ATTRIBUTE_NORETURN.
2151
d708bcd1
PA
21522014-04-10 Pedro Alves <palves@redhat.com>
2153
2154 * mem-break.c (add_breakpoint_condition, add_breakpoint_commands):
2155 Check if the condition or command is NULL before checking if the
2156 breakpoint is known. On success, return true.
2157 * mem-break.h (add_breakpoint_condition): Document return.
2158 (add_breakpoint_commands): Add describing comment.
2159 * server.c (skip_to_semicolon): New function.
2160 (process_point_options): Use it.
2161
2eec7d5b
PA
21622014-04-09 Pedro Alves <palves@redhat.com>
2163
2164 * linux-low.c (linux_read_loadmap): Pass current_inferior directly
2165 to lwpid_of.
2166
fa96cb38
PA
21672014-02-27 Pedro Alves <palves@redhat.com>
2168
2169 PR 12702
2170 * inferiors.h (A_I_NEXT, ALL_INFERIORS_TYPE, ALL_PROCESSES): New
2171 macros.
2172 * linux-low.c (delete_lwp, handle_extended_wait): Add debug
2173 output.
2174 (last_thread_of_process_p): Take a PID argument instead of a
2175 thread pointer.
2176 (linux_wait_for_lwp): Delete.
2177 (num_lwps, check_zombie_leaders, not_stopped_callback): New
2178 functions.
2179 (linux_low_filter_event): New function, party factored out from
2180 linux_wait_for_event.
2181 (linux_wait_for_event): Rename to ...
2182 (linux_wait_for_event_filtered): ... this. Add new filter ptid
2183 argument. Partly rewrite. Always use waitpid(-1, WNOHANG) and
2184 sigsuspend. Check for zombie leaders.
2185 (linux_wait_for_event): Reimplement as wrapper around
2186 linux_wait_for_event_filtered.
2187 (linux_wait_1): Handle TARGET_WAITKIND_NO_RESUMED. Assume that if
2188 a normal or signal exit is seen, it's the whole process exiting.
2189 (wait_for_sigstop): No longer a for_each_inferior callback.
2190 Rewrite on top of linux_wait_for_event_filtered.
2191 (stop_all_lwps): Call wait_for_sigstop directly.
2192 * server.c (resume, handle_target_event): Handle
2193 TARGET_WAITKIND_NO_RESUMED.
2194
d763de10
JB
21952014-02-26 Joel Brobecker <brobecker@adacore.com>
2196
2197 * win32-low.c (psapi_get_dll_name,
2198 * win32_CreateToolhelp32Snapshot): Delete.
2199 (win32_CreateToolhelp32Snapshot, win32_Module32First)
2200 (win32_Module32Next, load_toolhelp, toolhelp_get_dll_name):
2201 Delete.
2202 (handle_load_dll): Add function description.
2203 Remove code using psapi_get_dll_name and toolhelp_get_dll_name.
2204
850a0f76
JB
22052014-02-26 Joel Brobecker <brobecker@adacore.com>
2206
2207 * win32-low.c (win32_add_one_solib): Add 0x1000 to load_addr.
2208 Add comment.
2209 (win32_add_all_dlls): Remove 0x1000 offset applied to DLL
2210 base address when calling win32_add_one_solib.
2211 (handle_load_dll): Delete local variable load_addr.
2212 Remove 0x1000 offset applied to DLL base address when calling
2213 win32_add_one_solib.
2214 (handle_unload_dll): Add comment.
2215
f25b3fc3
JB
22162014-02-26 Joel Brobecker <brobecker@adacore.com>
2217
2218 * win32-low.c (win32_add_all_dlls): Renames
2219 win32_ensure_ntdll_loaded. Rewrite function documentation.
2220 Adjust implementation to always load all DLLs.
2221 Add 0x1000 offset to DLL base address when calling
2222 win32_add_one_solib.
2223 (child_initialization_done): New static global.
2224 (do_initial_child_stuff): Set child_initialization_done to
2225 zero during child initialization, and 1 after. Replace call
2226 to win32_ensure_ntdll_loaded by call to win32_add_all_dlls.
2227 Add comment.
2228 (match_dll_by_basename, dll_is_loaded_by_basename): Delete.
2229 (handle_unload_dll): Add function documentation.
2230 (get_child_debug_event): Ignore load and unload DLL events
2231 during child initialization.
2232
d86d4aaf
DE
22332014-02-20 Doug Evans <dje@google.com>
2234
3bc32da3 2235 Remove global all_lwps.
d86d4aaf
DE
2236 * inferiors.h (ptid_of): Move here from linux-low.h.
2237 (pid_of, lwpid_of): Ditto.
2238 * linux-aarch64-low.c (debug_reg_change_callback): Update, "entry"
2239 parameter is a struct thread_info * now.
2240 (aarch64_notify_debug_reg_change): Fetch pid from current_inferior
2241 directly. Pass &all_threads to find_inferior instead of &all_lwps.
2242 (aarch64_stopped_data_address): Fetch lwpid from current_inferior
2243 directly.
2244 (aarch64_linux_prepare_to_resume): Fetch ptid from thread.
2245 (aarch64_arch_setup): Fetch lwpid from current_inferior directly.
2246 * linux-arm-low.c (update_registers_callback): Update, "entry"
2247 parameter is a struct thread_info * now.
2248 Fetch lwpid from current_inferior directly.
2249 (arm_insert_point): Pass &all_threads to find_inferior instead of
2250 &all_lwps.
2251 (arm_remove_point): Ditto.
2252 (arm_stopped_by_watchpoint): Fetch lwp from current_inferior.
2253 (arm_prepare_to_resume): Fetch pid from thread.
2254 (arm_read_description): Fetch lwpid from current_inferior directly.
2255 * linux-low.c (all_lwps): Delete.
2256 (delete_lwp): Delete call to remove_inferior.
2257 (handle_extended_wait): Fetch lwpid from thread.
2258 (add_lwp): Don't set lwp->entry.id. Remove call to
2259 add_inferior_to_list.
2260 (linux_attach_lwp_1): Fetch pid from current_inferior directly.
2261 (linux_kill_one_lwp): Fetch ptid,lwpid from thread.
2262 (kill_one_lwp_callback): Ditto.
2263 (linux_kill): Don't dereference NULL pointer.
2264 Fetch ptid,lwpid from thread.
2265 (get_detach_signal): Fetch ptid from thread.
2266 (linux_detach_one_lwp): Fetch ptid,lwpid from thread.
2267 Simplify call to regcache_invalidate_thread.
2268 (delete_lwp_callback): Update, "entry" parameter is a
2269 struct thread_info * now. Fetch pid from thread.
2270 (linux_mourn): Pass &all_threads to find_inferior instead of &all_lwps.
2271 (status_pending_p_callback): Update, "entry" parameter is a
2272 struct thread_info * now. Fetch ptid from thread.
2273 (find_lwp_pid): Update, "entry" parameter is a
2274 struct thread_info * now.
2275 (linux_wait_for_lwp): Fetch pid from thread.
2276 (linux_fast_tracepoint_collecting): Fetch lwpid from thread.
2277 (maybe_move_out_of_jump_pad): Fetch lwpid from current_inferior.
2278 (enqueue_one_deferred_signal): Fetch lwpid from thread.
2279 (dequeue_one_deferred_signal): Ditto.
2280 (cancel_breakpoint): Fetch ptid from current_inferior.
2281 (linux_wait_for_event): Pass &all_threads to find_inferior,
2282 not &all_lwps. Fetch ptid, lwpid from thread.
2283 (count_events_callback): Update, "entry" parameter is a
2284 struct thread_info * now.
2285 (select_singlestep_lwp_callback): Ditto.
2286 (select_event_lwp_callback): Ditto.
2287 (cancel_breakpoints_callback): Ditto.
2288 (linux_cancel_breakpoints): Pass &all_threads to find_inferior,
2289 not &all_lwps.
2290 (select_event_lwp): Ditto. Fetch ptid from event_thread.
2291 (unsuspend_one_lwp): Update, "entry" parameter is a
2292 struct thread_info * now.
2293 (unsuspend_all_lwps): Pass &all_threads to find_inferior,
2294 not &all_lwps.
2295 (linux_stabilize_threads): Ditto. And for for_each_inferior.
2296 Fetch lwpid from thread, not lwp.
2297 (linux_wait_1): Fetch ptid, lwpid from current_inferior.
2298 Pass &all_threads to find_inferior, not &all_lwps.
2299 (send_sigstop): Fetch lwpid from thread, not lwp.
2300 (send_sigstop_callback): Update, "entry" parameter is a
2301 struct thread_info * now.
2302 (suspend_and_send_sigstop_callback): Ditto.
2303 (wait_for_sigstop): Ditto. Fetch ptid, lwpid from thread, lwp.
2304 (stuck_in_jump_pad_callback): Update, "entry" parameter is a
2305 struct thread_info * now.
2306 (move_out_of_jump_pad_callback): Ditto. Fetch ptid, lwpid
2307 from thread, lwp.
2308 (lwp_running): Update, "entry" parameter is a
2309 struct thread_info * now.
2310 (stop_all_lwps): Fetch ptid from thread.
2311 Pass &all_threads to find_inferior, for_each_inferior, not &all_lwps.
2312 (linux_resume_one_lwp): Fetch lwpid from thread.
2313 (linux_set_resume_request): Update, "entry" parameter is a
2314 struct thread_info * now. Fetch pid, lwpid from thread.
2315 (resume_status_pending_p): Update, "entry" parameter is a
2316 struct thread_info * now.
2317 (need_step_over_p): Ditto. Fetch lwpid from thread.
2318 (start_step_over): Fetch lwpid from thread.
2319 (linux_resume_one_thread): Update, "entry" parameter is a
2320 struct thread_info * now. Fetch lwpid from thread.
2321 (linux_resume): Pass &all_threads to find_inferior, not &all_lwps.
2322 (proceed_one_lwp): Update, "entry" parameter is a
2323 struct thread_info * now. Fetch lwpid from thread.
2324 (unsuspend_and_proceed_one_lwp): Update, "entry" parameter is a
2325 struct thread_info * now.
2326 (proceed_all_lwps): Pass &all_threads to find_inferior, not &all_lwps.
2327 (unstop_all_lwps): Ditto. Fetch lwpid from thread.
2328 (regsets_fetch_inferior_registers): Fetch lwpid from current_inferior
2329 directly.
2330 (regsets_store_inferior_registers): Ditto.
2331 (fetch_register, store_register): Ditto.
2332 (linux_read_memory, linux_write_memory): Ditto.
2333 (linux_request_interrupt): Ditto.
2334 (linux_read_auxv): Ditto.
2335 (linux_xfer_siginfo): Ditto.
2336 (linux_qxfer_spu): Ditto.
2337 (linux_qxfer_libraries_svr4): Ditto.
2338 * linux-low.h (ptid_of, pid_of, lwpid_of): Delete,
2339 moved to inferiors.h.
2340 (get_lwp): Delete.
2341 (get_thread_lwp): Update.
2342 (struct lwp_info): Delete member "entry". Simplify comment for
2343 member "thread".
2344 (all_lwps): Delete.
2345 * linux-mips-low.c (mips_read_description): Fetch lwpid from
2346 current_inferior directly.
2347 (update_watch_registers_callback): Update, "entry" parameter is a
2348 struct thread_info * now. Fetch pid from thread.
2349 (mips_linux_prepare_to_resume): Fetch ptid from thread.
2350 (mips_insert_point): Fetch lwpid from current_inferior.
2351 Pass &all_threads to find_inferior, not &all_lwps.
2352 (mips_remove_point): Pass &all_threads to find_inferior, not &all_lwps.
2353 (mips_stopped_by_watchpoint): Fetch lwpid from current_inferior
2354 directly.
2355 (mips_stopped_data_address): Ditto.
2356 * linux-s390-low.c (s390_arch_setup): Fetch pid from current_inferior
2357 directly.
2358 * linux-tile-low.c (tile_arch_setup): Ditto.
2359 * linux-x86-low.c (x86_get_thread_area): Fetch lwpid from thread.
2360 (update_debug_registers_callback): Update, "entry" parameter is a
2361 struct thread_info * now. Fetch pid from thread.
2362 (i386_dr_low_set_addr): Fetch pid from current_inferior directly.
2363 Pass &all_threads to find_inferior, not &all_lwps.
2364 (i386_dr_low_get_addr): Fetch ptid from current_inferior directly.
2365 (i386_dr_low_set_control): Fetch pid from current_inferior directly.
2366 Pass &all_threads to find_inferior, not &all_lwps.
2367 (i386_dr_low_get_control): Fetch ptid from current_inferior directly.
2368 (i386_dr_low_get_status): Ditto.
2369 (x86_linux_prepare_to_resume): Fetch ptid from thread.
2370 (x86_siginfo_fixup): Fetch lwpid from current_inferior directly.
2371 (x86_linux_read_description): Ditto.
2372 * proc-service.c (ps_getpid): Fetch pid from current_inferior directly.
2373
3b8361aa
DE
23742014-02-20 Doug Evans <dje@google.com>
2375
2376 * inferiors.c (get_first_inferior): Fix buglet.
2377
f7667f0d
DE
23782014-02-19 Doug Evans <dje@google.com>
2379
2380 * gdbthread.h (add_thread): Change result type to struct thread_info *.
2381 * inferiors.c (add_thread): Change result type to struct thread_info *.
2382 All callers updated.
2383 (add_lwp): Call add_thread here instead of in callers.
2384 All callers updated.
2385 * linux-low.h (get_lwp_thread): Rewrite.
2386 (struct lwp_info): New member "thread".
2387
b3312d80
DE
23882014-02-19 Doug Evans <dje@google.com>
2389
2390 * linux-low.c (add_lwp): Change result to struct lwp_info *.
2391 All callers updated.
2392
ecc6f45c
DE
23932014-02-19 Doug Evans <dje@google.com>
2394
2395 * inferiors.c (add_thread): Fix whitespace.
2396
649ebbca
DE
23972014-02-19 Doug Evans <dje@google.com>
2398
2399 * dll.c (clear_dlls): Replace accessing list implemention details
2400 with API function.
2401 * gdbthread.h (get_first_thread): Declare.
2402 * inferiors.c (for_each_inferior_with_data): New function.
2403 (get_first_thread): New function.
2404 (find_thread_ptid): Simplify.
2405 (get_first_inferior): New function.
2406 (clear_list): Delete.
2407 (one_inferior_p): New function.
2408 (clear_inferior_list): New function.
2409 (clear_inferiors): Update.
2410 * inferiors.h (for_each_inferior_with_data): Declare.
2411 (clear_inferior_list): Declare.
2412 (one_inferior_p): Declare.
2413 (get_first_inferior): Declare.
2414 * linux-low.c (linux_wait_for_event): Replace accessing list
2415 implemention details with API function.
2416 * server.c (target_running): Ditto.
2417 (accumulate_file_name_length): New function.
2418 (emit_dll_description): New function.
2419 (handle_qxfer_libraries): Replace accessing list implemention
2420 details with API function.
2421 (handle_qxfer_threads_worker): New function.
2422 (handle_qxfer_threads_proper): Replace accessing list implemention
2423 details with API function.
2424 (handle_query): Ditto.
2425 (visit_actioned_threads_callback_ftype): New typedef.
2426 (visit_actioned_threads_data): New struct.
2427 (visit_actioned_threads): Rewrite to be find_inferior callback.
2428 (resume): Call find_inferior.
2429 (handle_status): Replace accessing list implemention
2430 details with API function.
2431 (process_serial_event): Replace accessing list implemention details
2432 with API function.
2433 * target.c (set_desired_inferior): Replace accessing list implemention
2434 details with API function.
2435 * tracepoint.c (same_process_p): New function.
2436 (gdb_agent_about_to_close): Replace accessing list implemention
2437 details with API function.
2438 * win32-low.c (child_delete_thread): Replace accessing list
2439 implemention details with API function.
2440 (match_dll_by_basename): New function.
2441 (dll_is_loaded_by_basename): New function.
2442 (win32_ensure_ntdll_loaded): Replace accessing list implemention
2443 details call to dll_is_loaded_by_basename.
2444
80894984
DE
24452014-02-19 Doug Evans <dje@google.com>
2446
2447 * dll.h (struct dll_info): Add comment.
2448 * gdbthread.h (struct thread_info): Add comment.
2449 (current_ptid): Simplify.
2450 * inferiors.c (add_process): Update.
2451 (remove_process): Update.
2452 * inferiors.h (struct process_info): Rename member "head" to "entry".
2453 * linux-low.c (delete_lwp): Update.
2454 (add_lwp): Update.
2455 (last_thread_of_process_p): Update.
2456 (kill_one_lwp_callback, linux_kill): Update.
2457 (status_pending_p_callback): Update.
2458 (wait_for_sigstop): Update. Simplify read of ptid.
2459 (start_step_over): Update.
2460 * linux-low.h (ptid_of, pid_of, lwpid_of): Update.
2461 (get_lwp_thread): Update.
2462 (struct lwp_info): Rename member "head" to "entry".
2463 * regcache.h (inferior_list_entry): Delete.
2464 * server.c (kill_inferior_callback): Update.
2465 (detach_or_kill_inferior_callback): Update.
2466 (print_started_pid): Update.
2467 (print_attached_pid): Update.
2468 (process_serial_event): Simplify read of ptid.
2469 * thread-db.c (thread_db_create_event): Update.
2470 (thread_db_get_tls_address): Update.
2471 * win32-low.c (current_inferior_ptid): Simplify.
2472
46917d26
TT
24732014-02-19 Tom Tromey <tromey@redhat.com>
2474
2475 * target.h (struct target_ops) <supports_btrace>: Add target_ops
2476 argument.
2477 (target_supports_btrace): Update.
2478
0759a81e
YQ
24792014-02-14 Yao Qi <yao@codesourcery.com>
2480
2481 * Makefile.in (IPA_OBJS): Append rsp-low-ipa.o.
2482 (rsp-low-ipa.o): New target.
2483
a7191e8b
TT
24842014-02-12 Tom Tromey <tromey@redhat.com>
2485
2486 * ax.c (gdb_parse_agent_expr): Use hex2bin, not
2487 convert_ascii_to_int.
2488 * regcache.c (registers_to_string): Likewise.
2489 * remote-utils.c (decode_M_packet): Likewise.
2490 * server.c (process_serial_event): Likewise.
2491
ff0e980e
TT
24922014-02-12 Tom Tromey <tromey@redhat.com>
2493
2494 * server.c (handle_query, handle_v_run): Use hex2bin, not
2495 unhexify.
2496 * tracepoint.c (cmd_qtdpsrc, cmd_qtdv, cmd_qtnotes): Likewise.
2497
e9371aff
TT
24982014-02-12 Tom Tromey <tromey@redhat.com>
2499
2500 * ax.c (gdb_unparse_agent_expr): Use bin2hex, not
2501 convert_int_to_ascii.
2502 * regcache.c (registers_to_string, collect_register_as_string):
2503 Likewise.
2504 * remote-utils.c (look_up_one_symbol, relocate_instruction):
2505 Likewise.
2506 * server.c (process_serial_event): Likewise.
2507 * tracepoint.c (cmd_qtstatus, response_source, response_tsv)
2508 (cmd_qtbuffer, cstr_to_hexstr): Likewise.
2509
971dc0b8
TT
25102014-02-12 Tom Tromey <tromey@redhat.com>
2511
2512 * remote-utils.c (look_up_one_symbol, monitor_output): Use
2513 bin2hex, not hexify.
2514 * tracepoint.c (cmd_qtstatus): Likewise.
2515
0a822afb
TT
25162014-02-12 Tom Tromey <tromey@redhat.com>
2517
2518 * remote-utils.c (monitor_output): Pass explicit length to
2519 hexify.
2520
9c3d6531
TT
25212014-02-12 Tom Tromey <tromey@redhat.com>
2522
2523 * tracepoint.c: Include rsp-low.h.
2524 * server.c: Include rsp-low.h.
2525 * remote-utils.h (convert_ascii_to_int, convert_int_to_ascii)
2526 (unhexify, hexify, remote_escape_output, unpack_varlen_hex): Don't
2527 declare.
2528 * remote-utils.c: Include rsp-low.h.
2529 (fromhex, hexchars, ishex, unhexify, tohex, hexify)
2530 (remote_escape_output, remote_unescape_input, unpack_varlen_hex)
2531 (convert_int_to_ascii, convert_ascii_to_int): Move to
2532 common/rsp-low.c.
2533 * regcache.c: Include rsp-low.h.
2534 * ax.c: Include rsp-low.h.
2535 * Makefile.in (SFILES): Add common/rsp-low.c.
2536 (OBS): Add rsp-low.o.
2537 (rsp-low.o): New target.
2538
01fd3ea5
TT
25392014-02-12 Tom Tromey <tromey@redhat.com>
2540
2541 * utils.h (pulongest, plongest, phex_nz): Don't declare.
2542 Include print-utils.h.
2543 * utils.c (NUMCELLS, CELLSIZE, get_cell, decimal2str, pulongest)
2544 (plongest, thirty_two, phex_nz): Remove.
2545 * Makefile.in (SFILES): Add common/print-utils.c.
2546 (OBS): Add print-utils.o.
2547 (print-utils-ipa.o): New target.
2548 (print-utils.o): New target.
2549 (IPA_OBJS): Add print-utils-ipa.o.
2550
e99dc820
TT
25512014-02-06 Tom Tromey <tromey@redhat.com>
2552
2553 * Makefile.in (SFILES): Fix indentation.
2554
ee1e2d4f
DE
25552014-02-05 Doug Evans <dje@google.com>
2556
2557 * linux-low.c (linux_wait_for_event): Improve comment.
2558 (linux_wait_1): Keep current_inferior in sync with event_child.
2559
f5a02773
DE
25602014-01-22 Doug Evans <dje@google.com>
2561
2562 * gdbthread.h (gdb_id_to_thread): Delete, unused.
2563
87ce2a04
DE
25642014-01-22 Doug Evans <dje@google.com>
2565
2566 * configure.ac (AC_CHECK_FUNCS): Add test for gettimeofday.
2567 * configure: Regenerate.
2568 * config.in: Regenerate.
2569 * Makefile.in (SFILES): Add debug.c.
2570 (OBS): Add debug.o.
2571 * debug.c: New file.
2572 * debug.h: New file.
2573 * linux-aarch64-low.c (*): Update all debugging printfs to use
2574 debug_printf instead of fprintf.
2575 * linux-arm-low.c (*): Ditto.
2576 * linux-cris-low.c (*): Ditto.
2577 * linux-crisv32-low.c (*): Ditto.
2578 * linux-m32r-low.c (*): Ditto.
2579 * linux-sparc-low.c (*): Ditto.
2580 * linux-x86.c (*): Ditto.
2581 * linux-low.c (*): Ditto.
2582 (linux_wait_1): Add calls to debug_enter, debug_exit.
2583 (linux_wait): Remove redundant debugging printf.
2584 (stop_all_lwps): Add calls to debug_enter, debug_exit.
2585 (linux_resume, unstop_all_lwps): Ditto.
2586 * mem-break.c (*): Update all debugging printfs to use
2587 debug_printf instead of fprintf.
2588 * remote-utils.c (*): Ditto.
2589 * thread-db.c (*): Ditto.
2590 * server.c #include <ctype.h>, "gdb_vecs.h".
2591 (debug_threads): Moved to debug.c.
2592 (*): Update all debugging printfs to use debug_printf instead of
2593 fprintf.
2594 (start_inferior): Replace call to fflush with call to debug_flush.
2595 (monitor_show_help): Mention set debug-format.
2596 (parse_debug_format_options): New function.
2597 (handle_monitor_command): Handle "monitor set debug-format".
2598 (gdbserver_usage): Mention --debug-format.
2599 (main): Parse --debug-format.
2600 * server.h (debug_threads): Declaration moved to debug.h.
2601 #include "debug.h".
2602 * tracepoint.c (trace_debug_1) [!IN_PROCESS_AGENT]: Add version of
2603 trace_debug_1 that uses debug_printf.
2604 (tracepoint_look_up_symbols): Update all debugging printfs to use
2605 debug_printf instead of fprintf.
2606
e671835b
BS
26072014-01-20 Baruch Siach <baruch@tkos.co.il>
2608
2609 * linux-xtensa-low.c: Include asm/ptrace.h instead of
2610 sys/ptrace.h.
2611
b5737fa9
PA
26122014-01-17 Pedro Alves <palves@redhat.com>
2613
ea38d2a9 2614 PR build/16445
c7faa97a
PA
2615 * linux-x86-low.c: Don't include elf/common.h if ELFMAG0 is
2616 defined after including gdb_proc_service.h.
b5737fa9 2617
40ed484e
DE
26182014-01-16 Doug Evans <dje@google.com>
2619
2620 * dll.c (UNSPECIFIED_CORE_ADDR): New macro.
2621 (match_dll): Use it.
2622
969c39fb
MM
26232014-01-16 Markus Metzger <markus.t.metzger@intel.com>
2624
2625 * target.h (target_ops) <read_btrace>: Change parameters and
2626 return type to allow error reporting.
2627 * server.c (handle_qxfer_btrace): Support delta reads. Pass
2628 trace reading errors on.
2629 * linux-low.c (linux_low_read_btrace): Pass trace reading
2630 errors on.
2631 (linux_low_disable_btrace): New.
2632
ab7f45ba
DE
26332014-01-15 Doug Evans <dje@google.com>
2634
2635 * inferiors.c (thread_id_to_gdb_id): Delete.
2636 * inferiors.h (thread_id_to_gdb_id): Delete.
2637
66af0f44
EZ
26382014-01-13 Eli Zaretskii <eliz@gnu.org>
2639
2640 * Makefile.in (INCLUDE_CFLAGS): Remove trailing slash from
2641 "-I$(srcdir)/../". Fixes MinGW compilation errors with old GCC
2642 versions.
2643
9939e131
PA
26442014-01-08 Pedro Alves <palves@redhat.com>
2645
2646 * server.c (handle_status): Don't discard previous queued stop
2647 replies or thread's pending status here.
2648 (main) <disconnection>: Do it here instead.
2649
b7ea362b
PA
26502014-01-08 Pedro Alves <palves@redhat.com>
2651
2652 * gdbthread.h (struct thread_info) <status_pending_p>: New field.
2653 * server.c (visit_actioned_threads, handle_pending_status): New
2654 function.
2655 (handle_v_cont): Factor out parts to ...
2656 (resume): ... this new function. If in all-stop, and a thread
2657 being resumed has a pending status, report it without actually
2658 resuming.
2659 (myresume): Adjust to use the new 'resume' function.
2660 (clear_pending_status_callback, set_pending_status_callback)
2661 (find_status_pending_thread_callback): New functions.
2662 (handle_status): Handle the case of multiple threads having
2663 interesting statuses to report. Report threads' real last signal
2664 instead of always reporting GDB_SIGNAL_TRAP. Look for a thread
2665 with an interesting thread to report the status for, instead of
2666 always reporting the status of the first thread.
2667
28498c42
JB
26682014-01-01 Joel Brobecker <brobecker@adacore.com>
2669
2670 * gdbserver.c (gdbserver_version): Set copyright year to 2014.
2671 * gdbreplay.c (gdbreplay_version): Likewise.
2672
f45c82da
YZ
26732013-12-18 Yufeng Zhang <yufeng.zhang@arm.com>
2674
2675 * linux-aarch64-low.c (aarch64_linux_set_debug_regs): Set
2676 iov.iov_len with the real length in use.
2677
379a5e2d
JB
26782013-12-13 Joel Brobecker <brobecker@adacore.com>
2679
2680 * Makefile.in (safe-ctype.o, lbasename.o): New rules.
2681 * configure.srv: Add safe-ctype.o and lbasename.o to srv_tgtobj
2682 for all targets that use win32-low.c.
2683 * win32-low.c (win32_ensure_ntdll_loaded): New function.
2684 (do_initial_child_stuff): Add call to win32_ensure_ntdll_loaded.
2685
4210d83e
PA
26862013-12-13 Pedro Alves <palves@redhat.com>
2687
2688 * target.c (mywait): Set OURSTATUS->KIND to TARGET_WAITKIND_STOPPED
2689 if equal to TARGET_WAITKIND_LOADED.
2690 * win32-low.c (cached_status): New static global.
2691 (win32_wait): Add declaration.
2692 (do_initial_child_stuff): Flush all initial pending debug events
2693 up to the initial breakpoint.
2694 (win32_wait): If CACHED_STATUS was set, return that instead
2695 of doing a real wait. Remove the code resuming the execution
2696 of the inferior after receiving a TARGET_WAITKIND_LOADED event
2697 during the initial phase. Also remove the code changing
2698 OURSTATUS->KIND from TARGET_WAITKIND_LOADED to
2699 TARGET_WAITKIND_STOPPED.
2700
e7f0d979
YQ
27012013-12-11 Yao Qi <yao@codesourcery.com>
2702
2703 * notif.c (handle_notif_ack): Return 0 if no notification
2704 matches.
2705
ebcf782c
DE
27062013-11-20 Doug Evans <dje@google.com>
2707
2708 * linux-low.c (linux_set_resume_request): Fix comment.
2709
20ad9378
DE
27102013-11-20 Doug Evans <dje@google.com>
2711
2712 * linux-low.c (resume_status_pending_p): Tweak comment.
2713
a196ebeb
WT
27142013-11-20 Walfred Tedeschi <walfred.tedeschi@intel.com>
2715
2716 * Makefile.in: Add i386-mpx.c, i386-mpx-linux.c, amd64-mpx.c,
2717 amd64-mpx-linux.c, x32-mpx.c and x32-mpx-linux.c generation.
2718 * configure.srv (srv_i386_regobj): Add i386-mpx.o.
2719 (srv_i386_linux_regobj): Add i386-mpx-linux.o.
2720 (srv_amd64_regobj): Add amd64-mpx.o.
2721 (srv_amd64_linux_regobj): Add amd64-mpx-linux.o.
2722 (srv_i386_32bit_xmlfiles): Add i386/32bit-mpx.xml.
2723 (srv_i386_64bit_xmlfiles): Add i386/64bit-mpx.xml.
2724 * i387-fp.c (num_pl_bnd_register) Added constant.
2725 (num_pl_bnd_cfg_registers) Added constant.
2726 (struct i387_xsave) Added reserved area and MPX fields.
2727 (i387_cache_to_xsave, i387_xsave_to_cache) Add MPX.
2728 * linux-x86-low.c (init_registers_i386_mpx_linux): Declare new
2729 function.
2730 (tdesc_i386_mpx_linux): Add MPX amd64 target.
2731 (init_registers_amd64_mpx_linux): Declare new function.
2732 (tdesc_amd64_mpx_linux): Add MPX amd64 target.
2733 (x86_64_regmap): Add MPX registers.
2734 (x86_linux_read_description): Add MPX case.
2735 (initialize_low_arch): Initialize MPX targets.
2736
0080a2f6
TT
27372013-11-18 Tom Tromey <tromey@redhat.com>
2738
2739 * configure: Rebuild.
2740 * configure.ac: Don't check for stdlib.h.
2741 * gdbreplay.c: Unconditionally include stdlib.h.
2742
2978b111
TT
27432013-11-18 Tom Tromey <tromey@redhat.com>
2744
2745 * config.in: Rebuild.
2746 * configure: Rebuild.
2747 * configure.ac: Don't use AC_HEADER_DIRENT.
2748
a3d08894
TT
27492013-11-18 Tom Tromey <tromey@redhat.com>
2750
2751 * server.h: Don't check HAVE_STRING_H.
2752 * gdbreplay.c: Don't check HAVE_STRING_H.
2753 * configure: Rebuild.
2754
0a5dd17d
TT
27552013-11-18 Tom Tromey <tromey@redhat.com>
2756
2757 * Makefile.in (gdbreplay$(EXEEXT)): Depend on and link against
2758 LIBGNU.
2759
1bd2f0ba
TT
27602013-11-08 Tom Tromey <tromey@redhat.com>
2761
2762 * configure, config.in: Rebuild.
2763 * configure.ac: Remove unused configury.
2764
3266f10b
TT
27652013-11-08 Tom Tromey <tromey@redhat.com>
2766
2767 * acinclude.m4: Include common.m4, codeset.m4.
2768 * configure, config.in: Rebuild.
2769 * configure.ac: Use GDB_AC_COMMON.
2770
6682d959
AA
27712013-11-06 Andreas Arnez <arnez@linux.vnet.ibm.com>
2772
2773 * linux-s390-low.c (HWCAP_S390_TE): New define.
2774 (s390_arch_setup): Consider the TE field in the HWCAP for
2775 determining 'have_regset_tdb'.
2776
fd0a4d76
SDJ
27772013-10-16 Sergio Durigan Junior <sergiodj@redhat.com>
2778
2779 PR gdb/16014
2780 * tracepoint.c (download_tracepoint_1): Remove unnecessary double
2781 call to sizeof.
2782
1a3d890b
PA
27832013-10-02 Pedro Alves <palves@redhat.com>
2784
2785 * server.c (process_serial_event): Don't output "GDBserver
2786 exiting" if GDB is connected through stdio.
2787 * target.c (mywait): Likewise, be silent if GDB is connected
2788 through stdio.
2789
97ad4581
JB
27902013-10-01 Joel Brobecker <brobecker@adacore.com>
2791
2792 * lynx-low.c (lynx_add_threads_after_attach): New function.
2793 (lynx_attach): Remove call to add_thread. Add call to
2794 lynx_add_threads_after_attach instead.
2795
5b4e221c
MF
27962013-09-28 Mike Frysinger <vapier@gentoo.org>
2797
2798 * configure.ac (AC_CHECK_HEADERS): Add sys/syscall.h
2799 * config.in, configure: Regenerated.
2800
ee47b2f8
YQ
28012013-09-18 Yao Qi <yao@codesourcery.com>
2802
2803 PR server/15959
2804 * server.c (start_inferior): Clear 'resume_info'.
2805
d6707650 28062013-09-16 Jiong Wang <jiwang@tilera.com>
0f63d4db 2807
d6707650
JW
2808 * linux-tile-low.c (tile_regsets): Modify the size field to 64-bit
2809 for each register.
2810
9243dd0e 28112013-09-16 Jiong Wang <jiwang@tilera.com>
0f63d4db 2812
9243dd0e
JW
2813 * configure.srv <tilegx*-*-linux*>: Remove linux-osdata.o from and add
2814 linux-tile-low.o to srv_tgtobj.
2815
c623a6ef
WN
28162013-09-16 Will Newton <will.newton@linaro.org>
2817
2818 * linux-aarch64-low.c (aarch64_linux_set_debug_regs): Zero
2819 out regs.
2820
fb71d39e
PA
28212013-09-06 Pedro Alves <palves@redhat.com>
2822
2823 * Makefile.in (gdb_proc_service_h, regdef_h, regcache_h)
2824 (signals_def, signals_h, ptid_h, ax_h, agent_h, linux_btrace_h)
2825 (linux_osdata_h, vec_h, gdb_vecs_h, host_defs_h, libiberty_h)
2826 (server_h, gdbthread_h, linux_low_h, linux_ptrace_h)
2827 (gdb_thread_db_h, linux_procfs_h, lynx_low_h, nto_low_h)
2828 (mips_linux_watch_h, i386_low_h, win32_low_h): Delete.
2829
8e7e9910
PA
28302013-09-06 Pedro Alves <palves@redhat.com>
2831
2832 * Makefile.in (linux-btrace.o, mips-linux-watch.o): Remove
2833 explicit header dependencies and use $COMPILE/$POSTCOMPILE.
2834
7c3a12ca
PA
28352013-09-06 Pedro Alves <palves@redhat.com>
2836
2837 * linux-amd64-ipa.c: Include tracepoint.h.
2838 * linux-i386-ipa.c: Include tracepoint.h.
2839
8eb3d7b6
RW
28402013-09-06 Ricard Wanderlof <ricardw@axis.com>
2841
2842 * linux-crisv32-low.c (PTRACE_GET_THREAD_AREA): New macro.
2843 (ps_get_thread_area): New function.
2844
eddddb9d
RW
28452013-09-06 Ricard Wanderlof <ricardw@axis.com>
2846
2847 * linux-crisv32-low.c (elf_gregset_t): Delete typedef.
2848 (initialize_low_arch): Call init_registers_crisv32 rather than
2849 init_register_crisv32.
2850
533b0600
PA
28512013-09-05 Pedro Alves <palves@redhat.com>
2852
2853 * server.h (handle_vFile, hostio_last_error_from_errno): Move
2854 to ...
2855 * hostio.h: ... this new file.
2856 * hostio.c, server.c, linux-low.c, nto-low.c, spu-low,
2857 win32-low.c: Include hostio.h.
2858
0ce3d3b5
PA
28592013-09-05 Pedro Alves <palves@redhat.com>
2860
2861 * server.h (gdb_client_data, handler_func, callback_handler_func)
2862 (delete_file_handler, add_file_handler, append_callback_event)
2863 (delete_callback_event, start_event_loop, initialize_event_loop):
2864 Move to event-loop.h and include it.
2865 * event-loop.h: New file.
2866
799cdc37
PA
28672013-09-05 Pedro Alves <palves@redhat.com>
2868
2869 * dll.c, inferiors.c, remote-utils.c, server.c: Include "dll.h".
2870 * server.h (struct dll_info, all_dlls, dlls_changed, clear_dlls)
2871 (loaded_dll, unloaded_dll): Move to ...
2872 * dll.h: ... this new file.
2873 * inferiors.c, remote-utils.c, win32-low.c: Include "dll.h".
2874
6a6bbd9d
PA
28752013-09-05 Pedro Alves <palves@redhat.com>
2876
2877 * server.h (current_process, get_thread_process, all_processes)
2878 (add_inferior_to_list, for_each_inferior, current_inferior)
2879 (remove_inferior, add_process, remove_process, find_process_pid)
2880 (have_started_inferiors_p, have_attached_inferiors_p)
2881 (thread_id_to_gdb_id, thread_to_gdb_id, gdb_id_to_thread_id)
2882 (clear_inferiors, find_inferior, find_inferior_id)
2883 (inferior_target_data, set_inferior_target_data)
2884 (inferior_regcache_data, set_inferior_regcache_data): Move to
2885 inferiors.h, and include it.
2886 * inferiors.h: New file.
2887
f699aaba
PA
28882013-09-05 Pedro Alves <palves@redhat.com>
2889
2890 * server.h (struct emit_ops, current_insn_ptr, emit_error):
2891 Move ...
72f4393d 2892 * ax.h: ... here.
f699aaba 2893
c144c7a0
PA
28942013-09-05 Pedro Alves <palves@redhat.com>
2895
2896 * ax.c, linux-low.c, linux-x86-low.c, server.c: Include
2897 tracepoint.h.
2898 * server.h (IPA_BUFSIZ, initialize_tracepoint, tracing)
2899 (disconnected_tracing, tracepoint_look_up_symbols, stop_tracing
2900 (handle_tracepoint_general_set, handle_tracepoint_query)
2901 (tracepoint_finished_step, tracepoint_was_hit)
2902 (release_while_stepping_state_list, current_traceframe)
2903 (in_readonly_region, traceframe_read_mem)
2904 (fetch_traceframe_registers, traceframe_read_sdata)
2905 (traceframe_read_info, struct fast_tpoint_collect_status)
2906 (fast_tracepoint_collecting, force_unlock_trace_buffer)
2907 (handle_tracepoit_bkpts, initialize_low_tracepoint)
2908 (supply_fast_tracepoint_registers)
2909 (supply_static_tracepoint_registers, set_trampoline_buffer_space)
2910 (ipa_tdesc, claim_trampoline_space)
2911 (have_fast_tracepoint_trampoline_buffer, gdb_agent_about_to_close)
2912 (agent_mem_read, agent_get_trace_state_variable_value)
2913 (agent_set_trace_state_variable_value, agent_tsv_read)
2914 (agent_mem_read_string, get_raw_reg_func_addr)
2915 (get_get_tsv_func_addr, get_set_tsv_func_addr): Move to ...
2916 * tracepoint.h: ... this new file.
2917
ff42e6ab
PA
29182013-09-05 Pedro Alves <palves@redhat.com>
2919
2920 * server.h (perror_with_name, error, fatal, warning, paddress)
2921 (pulongest, plongest, phex_nz, pfildes): Move to utils.h, and
2922 include it.
2923 * utils.h: New file.
2924
541af0f4
PA
29252013-09-05 Pedro Alves <palves@redhat.com>
2926
2927 * server.h (remote_debug, noack_mode, transport_is_reliable)
2928 (gdb_connected, STDIO_CONNECTION_NAME, remote_connection_is_stdio)
2929 (read_ptid, write_ptid, putpkt, putpkt_binary, putpkt_notif)
2930 (getpkt, remote_prepare, remote_open, remote_close, write_ok)
2931 (write_enn, initialize_async_io, enable_async_io)
2932 (disable_async_io, check_remote_input_interrupt_request)
2933 (convert_ascii_to_int, convert_int_to_ascii, new_thread_notify)
2934 (dead_thread_notify, prepare_resume_reply)
2935 (decode_address_to_semicolon, decode_address, decode_m_packet)
2936 (decode_M_packet, decode_X_packet, decode_xfer_write)
2937 (decode_search_memory_packet, unhexify, hexify)
2938 (remote_escape_output, unpack_varlen_hex, clear_symbol_cache)
2939 (look_up_one_symbol, relocate_instruction)
2940 (monitor_output): Move to remote-utils.h, and include it.
2941 * remote-utils.h: New file.
2942
eebdf26b
PA
29432013-09-05 Pedro Alves <palves@redhat.com>
2944
2945 * server.h (_): Delete.
2946
3aafd2ff
PA
29472013-09-02 Pedro Alves <palves@redhat.com>
2948
2949 * tracepoint.c (TRACEFRAME_EOB_MARKER_SIZE): New macro.
2950 (init_trace_buffer): Ensure at least TRACEFRAME_EOB_MARKER_SIZE is
2951 allocated.
2952 (trace_buffer_alloc): Use TRACEFRAME_EOB_MARKER_SIZE.
2953
cee83bcb
PM
29542013-09-02 Pierre Muller <muller@sourceware.org>
2955
2956 * win32-low.c (child_xfer_memory): Check if ReadProcessMemory
2957 or WriteProcessMemory complete successfully and handle
2958 ERROR_PARTIAL_COPY error.
2959
9a13b2fa
PA
29602013-09-02 Pedro Alves <palves@redhat.com>
2961
2962 * server.c (gdb_read_memory): Return -1 on traceframe memory read
2963 error instead of EIO.
2964
602e3198
JK
29652013-08-28 Jan Kratochvil <jan.kratochvil@redhat.com>
2966
2967 PR server/15604
2968 * linux-low.c: Include filestuff.h.
2969 (linux_create_inferior) <pid == 0>: Call close_most_fds.
2970 * lynx-low.c: Include filestuff.h.
2971 (lynx_create_inferior) <pid == 0>: Call close_most_fds.
2972 * server.c: Include filestuff.h.
2973 (main): Call notice_open_fds.
2974 * spu-low.c: Include filestuff.h.
2975 (spu_create_inferior) <pid == 0>: Call close_most_fds.
2976
96d7229d
LM
29772013-08-22 Luis Machado <lgustavo@codesourcery.com>
2978
2979 * Makefile.in: Explain why ../target and ../nat are not
2980 listed as include file search paths.
2981 (linux-waitpid.o): New object file rule.
2982 * configure.srv (srv_native_linux_obj): New variable.
2983 Replace all occurrences of linux native object files with
2984 $srv_native_linux_obj.
2985 * linux-low.c: Include nat/linux-nat.h and nat/linux-waitpid.h.
2986 (HAS_NOMMU): Move defining logic to common/linux-ptrace.c.
2987 (linux_enable_event_reporting): Remove declaration.
2988 (my_waitpid): Moved to common/linux-waitpid.c.
2989 (linux_wait_for_event): Pass ptid when calling
2990 linux_enable_event_reporting.
2991 (linux_supports_tracefork_flag): Remove.
2992 (linux_enable_event_reporting): Likewise.
2993 (linux_tracefork_grandchild): Remove.
2994 (STACK_SIZE): Moved to common/linux-ptrace.c.
2995 (linux_tracefork_child): Remove.
2996 (linux_test_for_tracefork): Remove.
2997 (linux_look_up_symbols): Call linux_supports_traceclone.
2998 (initialize_low): Remove call to linux_test_for_tracefork.
2999 * linux-low.h (PTRACE_TYPE_ARG3): Move to
3000 common/linux-ptrace.h.
3001 (PTRACE_TYPE_ARG4): Likewise.
3002 Include linux-ptrace.h.
3003
32940073
PA
30042013-08-21 Pedro Alves <palves@redhat.com>
3005
3006 * config.in: Renegerate.
3007
33b60d58 30082013-08-19 Luis Machado <lgustavo@codesourcery.com>
a261b8f5 3009
33b60d58
LM
3010 * Makefile.in (INCLUDE_CFLAGS): Include -I$(srcdir)/../.
3011 (SFILES): Remove $(srcdir)/common/target-common.c and
3012 add $(srcdir)/target/waitstatus.c.
3013 (OBS): Remove target-common.o and add waitstatus.o.
3014 (server_h): Remove $(srcdir)/../common/target-common.h and
3015 add $(srcdir)/../target/resume.h, $(srcdir)/../target/wait.h
3016 and $(srcdir)/../target/waitstatus.h.
3017 (target-common.o): Remove.
3018 (waitstatus.o): New target object file.
3019 * target.h: Do not include target-common.h and
3020 include target/resume.h, target/wait.h and
3021 target/waitstatus.h.
3022
b8e1b30e
LM
30232013-08-13 Luis Machado <lgustavo@codesourcery.com>
3024
3025 * linux-arm-low.c: Rename all occurrences of PTRACE_ARG3_TYPE
3026 to PTRACE_TYPE_ARG3.
3027 * linux-low.c: Rename all occurrences of PTRACE_ARG3_TYPE
3028 to PTRACE_TYPE_ARG3 and PTRACE_ARG4_TYPE to
3029 PTRACE_TYPE_ARG4.
3030 * linux-low.h (PTRACE_ARG3_TYPE): Rename to PTRACE_TYPE_ARG3.
3031 (PTRACE_ARG4_TYPE): Rename to PTRACE_TYPE_ARG4.
3032
7a60ad40
YQ
30332013-07-27 Jie Zhang <jie@codesourcery.com>
3034 Daniel Jacobowitz <dan@codesourcery.com>
3035 Yao Qi <yao@codesourcery.com>
3036
3037 * Makefile.in (SFILES): Add common/mips-linux-watch.c.
3038 (mips-linux-watch.o): New rule.
3039 (mips_linux_watch_h): New variable.
3040 * configure.srv <mips*-*-linux*>: Add mips-linux-watch.o to
3041 srv_tgtobj.
3042 * linux-mips-low.c: Include mips-linux-watch.h.
3043 (struct arch_process_info, struct arch_lwp_info): New.
3044 (update_watch_registers_callback): New function.
3045 (mips_linux_new_process, mips_linux_new_thread) New functions.
3046 (mips_linux_prepare_to_resume, mips_insert_point): New
3047 functions.
3048 (mips_remove_point, mips_stopped_by_watchpoint): New
3049 functions.
3050 (rsp_bp_type_to_target_hw_bp_type): New function.
3051 (mips_stopped_data_address): New function.
3052 (the_low_target): Add watchpoint support functions.
3053
de6f69ad
YQ
30542013-07-27 Yao Qi <yao@codesourcery.com>
3055
3056 * i386-low.c: Include break-common.h.
3057 (enum target_hw_bp_type): Remove.
3058
3360c0bf
LM
30592013-07-24 Luis Machado <lgustavo@codesourcery.com>
3060
3061 * Makefile.in (SFILES): /common/target-common.c.
3062 (OBS): Add target-common.o.
3063 (server_h): Add $(srcdir)/../common/target-common.h.
3064 (target-common.o): New target.
3065 * server.c (queue_stop_reply_callback): Free
3066 status string after use.
3067 * target.c (target_waitstatus_to_string): Remove.
3068 * target.h: Include target-common.h.
3069 (resume_kind): Likewise.
3070 (target_waitkind): Likewise.
3071 (target_waitstatus): Likewise.
3072 (TARGET_WNOHANG): Likewise.
3073
bd885420
YQ
30742013-07-04 Yao Qi <yao@codesourcery.com>
3075
3076 * Makefile.in (host_alias): Use @host_noncanonical@.
3077 (target_alias): Use @target_noncanonical@.
3078 * configure.ac: Use ACX_NONCANONICAL_TARGET and
3079 ACX_NONCANONICAL_HOST.
3080 * configure: Regenerated.
3081
3082 Revert:
3083 2013-06-28 Mircea Gherzan <mircea.gherzan@intel.com>
3084
3085 * configure.ac (version_host, version_target): Set and AC_SUBST them.
3086 * configure: Rebuild.
3087 * Makefile.in (version_host, version_target): Get from configure.
3088 (version.c): Use $(version_host) and $(version_target).
3089
17ef446e
PA
30902013-07-03 Pedro Alves <palves@redhat.com>
3091
3092 * Makefile.in (config.status): Depend on development.sh.
3093 * acinclude.m4: Include libmcheck.m4.
3094 * configure: Regenerate.
3095
7a9a7487
MG
30962013-07-02 Mircea Gherzan <mircea.gherzan@intel.com>
3097
3098 * win32-low.c (winapi_DebugActiveProcessStop): Move the WINAPI
3099 attribute inside the parentheses.
3100 (winapi_DebugSetProcessKillOnExit): Ditto.
3101 (winapi_DebugBreakProcess): Ditto.
3102 (winapi_GenerateConsoleCtrlEvent): Ditto.
a261b8f5 3103
49b64de6
MG
31042013-07-02 Mircea Gherzan <mircea.gherzan@intel.com>
3105
3106 * notif.h (notif_event): Add a dummy member to avoid compiler
3107 errors.
3108
d5749ee7
PA
31092013-07-01 Pedro Alves <palves@redhat.com>
3110
3111 * hostio.c (HOSTIO_PATH_MAX): Define.
3112 (require_filename, handle_open, handle_unlink, handle_readlink):
3113 Use it.
3114
d8d2a3ee
PA
31152013-07-01 Pedro Alves <palves@redhat.com>
3116
3117 * server.h: Include "pathmax.h".
3118 * linux-low.c: Don't include sys/param.h.
3119 (linux_pid_exe_is_elf_64_file): Use PATH_MAX instead of
3120 MAXPATHLEN.
3121 * win32-low.c: Don't include sys/param.h.
3122 (win32_create_inferior): Use PATH_MAX instead of MAXPATHLEN.
3123
bc7dea8d
PA
31242013-07-01 Pedro Alves <palves@redhat.com>
3125
3126 * event-loop.c: Don't check HAVE_UNISTD_H before including
3127 <unistd.h>.
3128 * gdbreplay.c: Likewise.
3129 * remote-utils.c: Likewise.
3130 * server.c: Likewise.
3131 * configure.ac: Don't check for unistd.h.
3132 * configure: Regenerate.
3133
d6c2da54
TT
31342013-06-28 Tom Tromey <tromey@redhat.com>
3135
3136 * Makefile.in (version.c): Use version.in, not
3137 common/version.in.
3138
257b6bec
MG
31392013-06-28 Mircea Gherzan <mircea.gherzan@intel.com>
3140
3141 * configure.ac (version_host, version_target): Set and AC_SUBST them.
3142 * configure: Rebuild.
3143 * Makefile.in (version_host, version_target): Get from configure.
3144 (version.c): Use $(version_host) and $(version_target).
3145
86ebe149
DK
31462013-06-10 Dmitry Kozlov <ddk@codesourcery.com>
3147
3148 Fix trace-status to output user name without trailing colon.
3149 * tracepoint.c (cmd_qtstatus): Remove unnecessary colon from user name.
3150
f30aa5af
DK
31512013-06-10 Dmitry Kozlov <ddk@codesourcery.com>
3152
3153 Fix trace-status to output proper start-time and stop-time.
3154 * tracepoint.c (cmd_qtstatus): Modify trace-status output to
3155 output start time and stop time in hex as gdb expects.
3156
28a93511
YQ
31572013-06-26 Pedro Alves <pedro@codesourcery.com>
3158
3159 * tracepoint.c (build_traceframe_info_xml): Output trace state
3160 variables present in the trace buffer.
3161
01208463
TT
31622013-06-24 Tom Tromey <tromey@redhat.com>
3163
3164 * Makefile.in (version.c): Use bfd/version.h, common/version.in,
3165 create-version.sh.
3166 (version.o): Remove.
3167 * gdbreplay.c: Include version.h.
3168 (version, host_name): Don't declare.
3169 * server.h: Include version.h.
3170 (version, host_name): Don't declare.
3171
760256f9
PA
31722013-06-12 Pedro Alves <palves@redhat.com>
3173
3174 * linux-x86-low.c (linux_is_elf64): Delete global.
3175 (x86_siginfo_fixup): Replace reference to `linux_is_elf64' global
3176 with local linux_pid_exe_is_elf_64_file use.
3177
030031ee
PA
31782013-06-11 Pedro Alves <palves@redhat.com>
3179
3180 * linux-low.c (regset_disabled, disable_regset): New functions.
3181 (regsets_fetch_inferior_registers)
3182 (regsets_store_inferior_registers): Use them.
3183 (initialize_regsets_info); Don't allocate the disabled_regsets
3184 array here.
3185 * linux-low.h (struct regsets_info) <disabled_regsets>: Extend
3186 comment.
3187
5da6eb0a
PA
31882013-06-11 Pedro Alves <palves@redhat.com>
3189
3190 * linux-low.c (initialize_regsets_info): Use xcalloc instead of
3191 xmalloc.
3192
7e5aaa09
PA
31932013-06-11 Pedro Alves <palves@redhat.com>
3194
3195 * linux-x86-low.c (initialize_low_arch): Call
3196 init_registers_x32_avx_linux.
3197
d878444c
JK
31982013-06-09 Jan Kratochvil <jan.kratochvil@redhat.com>
3199
3200 Fix compatibility with Android Bionic.
3201 * linux-low.c (linux_qxfer_libraries_svr4): Ignore first entry even if
3202 it is not empty.
3203
3aee8918
PA
32042013-06-07 Pedro Alves <palves@redhat.com>
3205
5f2b57b5 3206 PR server/14823
3aee8918
PA
3207 * Makefile.in (OBS): Add tdesc.o.
3208 (IPA_OBJS): Add tdesc-ipa.o.
3209 (tdesc-ipa.o): New rule.
3210 * ax.c (gdb_eval_agent_expr): Adjust register_size call to new
3211 interface.
3212 * linux-low.c (new_inferior): Delete.
3213 (disabled_regsets, num_regsets): Delete.
3214 (linux_add_process): Adjust to set the new per-process
3215 new_inferior flag.
3216 (linux_detach_one_lwp): Adjust to call regcache_invalidate_thread.
3217 (linux_wait_for_lwp): Adjust. Only call arch_setup if the event
3218 was a stop. When calling arch_setup, switch the current inferior
3219 to the thread that got an event.
3220 (linux_resume_one_lwp): Adjust to call regcache_invalidate_thread.
3221 (regsets_fetch_inferior_registers)
3222 (regsets_store_inferior_registers): New regsets_info parameter.
3223 Adjust to use it.
3224 (linux_register_in_regsets): New regs_info parameter. Adjust to
3225 use it.
3226 (register_addr, fetch_register, store_register): New usrregs_info
3227 parameter. Adjust to use it.
3228 (usr_fetch_inferior_registers, usr_store_inferior_registers): New
3229 parameter regs_info. Adjust to use it.
3230 (linux_fetch_registers): Get the current inferior's regs_info, and
3231 adjust to use it.
3232 (linux_store_registers): Ditto.
3233 [HAVE_LINUX_REGSETS] (initialize_regsets_info): New.
3234 (initialize_low): Don't initialize the target_regsets here. Call
3235 initialize_low_arch.
3236 * linux-low.h (target_regsets): Delete declaration.
3237 (struct regsets_info): New.
3238 (struct usrregs_info): New.
3239 (struct regs_info): New.
3240 (struct process_info_private) <new_inferior>: New field.
3241 (struct linux_target_ops): Delete the num_regs, regmap, and
3242 regset_bitmap fields. New field regs_info.
3243 [HAVE_LINUX_REGSETS] (initialize_regsets_info): Declare.
3244 * i387-fp.c (num_xmm_registers): Delete.
3245 (i387_cache_to_fsave, i387_fsave_to_cache): Adjust find_regno
3246 calls to new interface.
3247 (i387_cache_to_fxsave, i387_cache_to_xsave, i387_fxsave_to_cache)
3248 (i387_xsave_to_cache): Adjust find_regno calls to new interface.
3249 Infer the number of xmm registers from the regcache's target
3250 description.
3251 * i387-fp.h (num_xmm_registers): Delete.
3252 * inferiors.c (add_thread): Don't install the thread's regcache
3253 here.
3254 * proc-service.c (gregset_info): Fetch the current inferior's
3255 regs_info. Adjust to use it.
3256 * regcache.c: Include tdesc.h.
3257 (register_bytes, reg_defs, num_registers)
3258 (gdbserver_expedite_regs): Delete.
3259 (get_thread_regcache): If the thread doesn't have a regcache yet,
3260 create one, instead of aborting gdbserver.
3261 (regcache_invalidate_one): Rename to ...
3262 (regcache_invalidate_thread): ... this.
3263 (regcache_invalidate_one): New.
3264 (regcache_invalidate): Only invalidate registers of the current
3265 process.
3266 (init_register_cache): Add target_desc parameter, and use it.
3267 (new_register_cache): Ditto. Assert the target description has a
3268 non zero registers_size.
3269 (regcache_cpy): Add assertions. Adjust.
3270 (realloc_register_cache, set_register_cache): Delete.
3271 (registers_to_string, registers_from_string): Adjust.
3272 (find_register_by_name, find_regno, find_register_by_number)
3273 (register_cache_size): Add target_desc parameter, and use it.
3274 (free_register_cache_thread, free_register_cache_thread_one)
3275 (regcache_release, register_cache_size): New.
3276 (register_size): Add target_desc parameter, and use it.
3277 (register_data, supply_register, supply_register_zeroed)
3278 (supply_regblock, supply_register_by_name, collect_register)
3279 (collect_register_as_string, collect_register_by_name): Adjust.
3280 * regcache.h (struct target_desc): Forward declare.
3281 (struct regcache) <tdesc>: New field.
3282 (init_register_cache, new_register_cache): Add target_desc
3283 parameter.
3284 (regcache_invalidate_thread): Declare.
3285 (regcache_invalidate_one): Delete declaration.
3286 (regcache_release): Declare.
3287 (find_register_by_number, register_cache_size, register_size)
3288 (find_regno): Add target_desc parameter.
3289 (gdbserver_expedite_regs, gdbserver_xmltarget): Delete
3290 declarations.
3291 * remote-utils.c: Include tdesc.h.
3292 (outreg, prepare_resume_reply): Adjust.
3293 * server.c: Include tdesc.h.
3294 (gdbserver_xmltarget): Delete declaration.
3295 (get_features_xml, process_serial_event): Adjust.
3296 * server.h [IN_PROCESS_AGENT] (struct target_desc): Forward
3297 declare.
3298 (struct process_info) <tdesc>: New field.
3299 (ipa_tdesc): Declare.
3300 * tdesc.c: New file.
3301 * tdesc.h: New file.
3302 * tracepoint.c: Include tdesc.h.
3303 [IN_PROCESS_AGENT] (ipa_tdesc): Define.
3304 (get_context_regcache): Adjust to pass ipa_tdesc down.
3305 (do_action_at_tracepoint): Adjust to get the register cache size
3306 from the context regcache's description.
3307 (traceframe_walk_blocks): Adjust to get the register cache size
3308 from the current trace frame's description.
3309 (traceframe_get_pc): Adjust to get current trace frame's
3310 description and pass it down.
3311 (gdb_collect): Adjust to get the register cache size from the
3312 IPA's description.
3313 * linux-amd64-ipa.c (tdesc_amd64_linux): Declare.
3314 (gdbserver_xmltarget): Delete.
3315 (initialize_low_tracepoint): Set the ipa's target description.
3316 * linux-i386-ipa.c (tdesc_i386_linux): Declare.
3317 (initialize_low_tracepoint): Set the ipa's target description.
3318 * linux-x86-low.c: Include tdesc.h.
3319 [__x86_64__] (is_64bit_tdesc): New.
3320 (ps_get_thread_area, x86_get_thread_area): Use it.
3321 (i386_cannot_store_register): Rename to ...
3322 (x86_cannot_store_register): ... this. Use is_64bit_tdesc.
3323 (i386_cannot_fetch_register): Rename to ...
3324 (x86_cannot_fetch_register): ... this. Use is_64bit_tdesc.
3325 (x86_fill_gregset, x86_store_gregset): Adjust register_size calls
3326 to new interface.
3327 (target_regsets): Rename to ...
3328 (x86_regsets): ... this.
3329 (x86_get_pc, x86_set_pc): Adjust register_size calls to new
3330 interface.
3331 (x86_siginfo_fixup): Use is_64bit_tdesc.
3332 [__x86_64__] (tdesc_amd64_linux, tdesc_amd64_avx_linux)
3333 (tdesc_x32_avx_linux, tdesc_x32_linux)
3334 (tdesc_i386_linux, tdesc_i386_mmx_linux, tdesc_i386_avx_linux):
3335 Declare.
3336 (x86_linux_update_xmltarget): Delete.
3337 (I386_LINUX_XSAVE_XCR0_OFFSET): Define.
3338 (have_ptrace_getfpxregs, have_ptrace_getregset): New.
3339 (AMD64_LINUX_USER64_CS): New.
3340 (x86_linux_read_description): New, based on
3341 x86_linux_update_xmltarget.
3342 (same_process_callback): New.
3343 (x86_arch_setup_process_callback): New.
3344 (x86_linux_update_xmltarget): New.
3345 (x86_regsets_info): New.
3346 (amd64_linux_regs_info): New.
3347 (i386_linux_usrregs_info): New.
3348 (i386_linux_regs_info): New.
3349 (x86_linux_regs_info): New.
3350 (x86_arch_setup): Reimplement.
3351 (x86_install_fast_tracepoint_jump_pad): Use is_64bit_tdesc.
3352 (x86_emit_ops): Ditto.
3353 (the_low_target): Adjust. Install x86_linux_regs_info,
3354 x86_cannot_fetch_register, and x86_cannot_store_register.
3355 (initialize_low_arch): New.
3356 * linux-ia64-low.c (tdesc_ia64): Declare.
3357 (ia64_fetch_register): Adjust.
3358 (ia64_usrregs_info, regs_info): New globals.
3359 (ia64_regs_info): New function.
3360 (the_low_target): Adjust.
3361 (initialize_low_arch): New function.
3362 * linux-sparc-low.c (tdesc_sparc64): Declare.
3363 (sparc_fill_gregset_to_stack, sparc_store_gregset_from_stack):
3364 Adjust.
3365 (sparc_arch_setup): New function.
3366 (sparc_regsets_info, sparc_usrregs_info, regs_info): New globals.
3367 (the_low_target): Adjust.
3368 (initialize_low_arch): New function.
3369 * linux-ppc-low.c (tdesc_powerpc_32l, tdesc_powerpc_altivec32l)
3370 (tdesc_powerpc_cell32l, tdesc_powerpc_vsx32l)
3371 (tdesc_powerpc_isa205_32l, tdesc_powerpc_isa205_altivec32l)
3372 (tdesc_powerpc_isa205_vsx32l, tdesc_powerpc_e500l)
3373 (tdesc_powerpc_64l, tdesc_powerpc_altivec64l)
3374 (tdesc_powerpc_cell64l, tdesc_powerpc_vsx64l)
3375 (tdesc_powerpc_isa205_64l, tdesc_powerpc_isa205_altivec64l)
3376 (tdesc_powerpc_isa205_vsx64l): Declare.
3377 (ppc_cannot_store_register, ppc_collect_ptrace_register)
3378 (ppc_supply_ptrace_register, parse_spufs_run, ppc_get_pc)
3379 (ppc_set_pc, ppc_get_hwcap): Adjust.
3380 (ppc_usrregs_info): Forward declare.
3381 (!__powerpc64__) ppc_regmap_adjusted: New global.
3382 (ppc_arch_setup): Adjust to the current process'es target
3383 description.
3384 (ppc_fill_vsxregset, ppc_store_vsxregset, ppc_fill_vrregset)
3385 (ppc_store_vrregset, ppc_fill_evrregset, ppc_store_evrregse)
3386 (ppc_store_evrregset): Adjust.
3387 (target_regsets): Rename to ...
3388 (ppc_regsets): ... this, and make static.
3389 (ppc_usrregs_info, ppc_regsets_info, regs_info): New globals.
3390 (ppc_regs_info): New function.
3391 (the_low_target): Adjust.
3392 (initialize_low_arch): New function.
3393 * linux-s390-low.c (tdesc_s390_linux32, tdesc_s390_linux32v1)
3394 (tdesc_s390_linux32v2, tdesc_s390_linux64, tdesc_s390_linux64v1)
3395 (tdesc_s390_linux64v2, tdesc_s390x_linux64, tdesc_s390x_linux64v1)
3396 (tdesc_s390x_linux64v2): Declare.
3397 (s390_collect_ptrace_register, s390_supply_ptrace_register)
3398 (s390_fill_gregset, s390_store_last_break): Adjust.
3399 (target_regsets): Rename to ...
3400 (s390_regsets): ... this, and make static.
3401 (s390_get_pc, s390_set_pc): Adjust.
3402 (s390_get_hwcap): New target_desc parameter, and use it.
3403 [__s390x__] (have_hwcap_s390_high_gprs): New global.
3404 (s390_arch_setup): Adjust to set the current process'es target
3405 description. Don't adjust the regmap.
3406 (s390_usrregs_info, s390_regsets_info, regs_info): New globals.
3407 [__s390x__] (s390_usrregs_info_3264, s390_regsets_info_3264)
3408 (regs_info_3264): New globals.
3409 (s390_regs_info): New function.
3410 (the_low_target): Adjust.
3411 (initialize_low_arch): New function.
3412 * linux-mips-low.c (tdesc_mips_linux, tdesc_mips_dsp_linux)
3413 (tdesc_mips64_linux, tdesc_mips64_dsp_linux): Declare.
3414 [__mips64] (init_registers_mips_linux)
3415 (init_registers_mips_dsp_linux): Delete defines.
3416 [__mips64] (tdesc_mips_linux, tdesc_mips_dsp_linux): New defines.
3417 (have_dsp): New global.
3418 (mips_read_description): New, based on mips_arch_setup.
3419 (mips_arch_setup): Reimplement.
3420 (get_usrregs_info): New function.
3421 (mips_cannot_fetch_register, mips_cannot_store_register)
3422 (mips_get_pc, mips_set_pc, mips_fill_gregset, mips_store_gregset)
3423 (mips_fill_fpregset, mips_store_fpregset): Adjust.
3424 (target_regsets): Rename to ...
3425 (mips_regsets): ... this, and make static.
3426 (mips_regsets_info, mips_dsp_usrregs_info, mips_usrregs_info)
3427 (dsp_regs_info, regs_info): New globals.
3428 (mips_regs_info): New function.
3429 (the_low_target): Adjust.
3430 (initialize_low_arch): New function.
3431 * linux-arm-low.c (tdesc_arm, tdesc_arm_with_iwmmxt)
3432 (tdesc_arm_with_vfpv2, tdesc_arm_with_vfpv3, tdesc_arm_with_neon):
3433 Declare.
3434 (arm_fill_vfpregset, arm_store_vfpregset): Adjust.
3435 (arm_read_description): New, with bits factored from
3436 arm_arch_setup.
3437 (arm_arch_setup): Reimplement.
3438 (target_regsets): Rename to ...
3439 (arm_regsets): ... this, and make static.
3440 (arm_regsets_info, arm_usrregs_info, regs_info): New globals.
3441 (arm_regs_info): New function.
3442 (the_low_target): Adjust.
3443 (initialize_low_arch): New function.
3444 * linux-m68k-low.c (tdesc_m68k): Declare.
3445 (target_regsets): Rename to ...
3446 (m68k_regsets): ... this, and make static.
3447 (m68k_regsets_info, m68k_usrregs_info, regs_info): New globals.
3448 (m68k_regs_info): New function.
3449 (m68k_arch_setup): New function.
3450 (the_low_target): Adjust.
3451 (initialize_low_arch): New function.
3452 * linux-sh-low.c (tdesc_sharch): Declare.
3453 (target_regsets): Rename to ...
3454 (sh_regsets): ... this, and make static.
3455 (sh_regsets_info, sh_usrregs_info, regs_info): New globals.
3456 (sh_regs_info, sh_arch_setup): New functions.
3457 (the_low_target): Adjust.
3458 (initialize_low_arch): New function.
3459 * linux-bfin-low.c (tdesc_bfin): Declare.
3460 (bfin_arch_setup): New function.
3461 (bfin_usrregs_info, regs_info): New globals.
3462 (bfin_regs_info): New function.
3463 (the_low_target): Adjust.
3464 (initialize_low_arch): New function.
3465 * linux-cris-low.c (tdesc_cris): Declare.
3466 (cris_arch_setup): New function.
3467 (cris_usrregs_info, regs_info): New globals.
3468 (cris_regs_info): New function.
3469 (the_low_target): Adjust.
3470 (initialize_low_arch): New function.
3471 * linux-cris-low.c (tdesc_crisv32): Declare.
3472 (cris_arch_setup): New function.
3473 (cris_regsets_info, cris_usrregs_info, regs_info): New globals.
3474 (cris_regs_info): New function.
3475 (the_low_target): Adjust.
3476 (initialize_low_arch): New function.
3477 * linux-m32r-low.c (tdesc_m32r): Declare.
3478 (m32r_arch_setup): New function.
3479 (m32r_usrregs_info, regs_info): New globals.
3480 (m32r_regs_info): Adjust.
3481 (initialize_low_arch): New function.
3482 * linux-tic6x-low.c (tdesc_tic6x_c64xp_linux)
3483 (tdesc_tic6x_c64x_linux, tdesc_tic6x_c62x_linux): Declare.
3484 (tic6x_usrregs_info): Forward declare.
3485 (tic6x_read_description): New function, based on ...
3486 (tic6x_arch_setup): ... this. Reimplement.
3487 (target_regsets): Rename to ...
3488 (tic6x_regsets): ... this, and make static.
3489 (tic6x_regsets_info, tic6x_usrregs_info, regs_info): New globals.
3490 (tic6x_regs_info): New function.
3491 (the_low_target): Adjust.
3492 (initialize_low_arch): New function.
3493 * linux-xtensa-low.c (tdesc_xtensa): Declare.
3494 (xtensa_fill_gregset, xtensa_store_gregset): Adjust.
3495 (target_regsets): Rename to ...
3496 (xtensa_regsets): ... this, and make static.
3497 (xtensa_regsets_info, xtensa_usrregs_info, regs_info): New
3498 globals.
3499 (xtensa_arch_setup, xtensa_regs_info): New functions.
3500 (the_low_target): Adjust.
3501 (initialize_low_arch): New function.
3502 * linux-nios2-low.c (tdesc_nios2_linux): Declare.
3503 (nios2_arch_setup): Set the current process'es tdesc.
3504 (target_regsets): Rename to ...
3505 (nios2_regsets): ... this.
3506 (nios2_regsets_info, nios2_usrregs_info, regs_info): New globals.
3507 (nios2_regs_info): New function.
3508 (the_low_target): Adjust.
3509 (initialize_low_arch): New function.
a261b8f5
PA
3510 * linux-aarch64-low.c (tdesc_aarch64): Declare.
3511 (aarch64_arch_setup): Set the current process'es tdesc.
3512 (target_regsets): Rename to ...
3513 (aarch64_regsets): ... this.
3514 (aarch64_regsets_info, aarch64_usrregs_info, regs_info): New globals.
3515 (aarch64_regs_info): New function.
3516 (the_low_target): Adjust.
3517 (initialize_low_arch): New function.
3aee8918
PA
3518 * linux-tile-low.c (tdesc_tilegx, tdesc_tilegx32): Declare
3519 globals.
3520 (target_regsets): Rename to ...
3521 (tile_regsets): ... this.
3522 (tile_regsets_info, tile_usrregs_info, regs_info): New globals.
3523 (tile_regs_info): New function.
3524 (tile_arch_setup): Set the current process'es tdesc.
3525 (the_low_target): Adjust.
3526 (initialize_low_arch): New function.
3527 * spu-low.c (tdesc_spu): Declare.
3528 (spu_create_inferior, spu_attach): Set the new process'es tdesc.
3529 * win32-arm-low.c (tdesc_arm): Declare.
3530 (arm_arch_setup): New function.
3531 (the_low_target): Install arm_arch_setup instead of
3532 init_registers_arm.
3533 * win32-i386-low.c (tdesc_i386, tdesc_amd64): Declare.
3534 (init_windows_x86): Rename to ...
3535 (i386_arch_setup): ... this. Set `win32_tdesc'.
3536 (the_low_target): Adjust.
3537 * win32-low.c (win32_tdesc): New global.
3538 (child_add_thread): Don't create the thread cache here.
3539 (do_initial_child_stuff): Set the new process'es tdesc.
3540 * win32-low.h (struct target_desc): Forward declare.
3541 (win32_tdesc): Declare.
3542 * lynx-i386-low.c (tdesc_i386): Declare global.
3543 (lynx_i386_arch_setup): Set `lynx_tdesc'.
3544 * lynx-low.c (lynx_tdesc): New global.
3545 (lynx_add_process): Set the new process'es tdesc.
3546 * lynx-low.h (struct target_desc): Forward declare.
3547 (lynx_tdesc): Declare global.
3548 * lynx-ppc-low.c (tdesc_powerpc_32): Declare global.
3549 (lynx_ppc_arch_setup): Set `lynx_tdesc'.
3550 * nto-low.c (nto_tdesc): New global.
3551 (do_attach): Set the new process'es tdesc.
3552 * nto-low.h (struct target_desc): Forward declare.
3553 (nto_tdesc): Declare.
3554 * nto-x86-low.c (tdesc_i386): Declare.
3555 (nto_x86_arch_setup): Set `nto_tdesc'.
3556
b1fbec62
GB
35572013-06-04 Gary Benson <gbenson@redhat.com>
3558
3559 * server.c (handle_query): Add "augmented-libraries-svr4-read+"
3560 to qSupported response when appropriate.
3561 (handle_qxfer_libraries_svr4): Allow qXfer:libraries-svr4:read
3562 with nonzero-length annex.
3563 * linux-low.c (linux_qxfer_libraries_svr4): Parse and handle
3564 arguments supplied in annex.
3565
d1ec4ce7
DE
35662013-05-31 Doug Evans <dje@google.com>
3567
ac44adcb 3568 PR server/15594
d1ec4ce7
DE
3569 * linux-x86-low.c (ps_get_thread_area): Properly extend address to
3570 64 bits in 64-cross-32 environment.
3571
9b25f2d3
PA
35722013-05-28 Pedro Alves <palves@redhat.com>
3573
3574 * Makefile.in (clean): Remove reference to aarch64-without-fpu.c.
3575 (aarch64-without-fpu.c): Delete rule.
3576 * configure.srv (aarch64*-*-linux*): Remove references to
3577 aarch64-without-fpu.o and aarch64-without-fpu.xml.
3578 * linux-aarch64-low.c (init_registers_aarch64_without_fpu): Remove
3579 declaration.
3580
6740dc9c
PA
35812013-05-24 Pedro Alves <palves@redhat.com>
3582
3583 * server.c (handle_v_cont) <vCont;r>: Use unpack_varlen_hex
3584 instead of strchr/decode_address. Error if the range isn't split
3585 with a ','. Don't assume there's be a ':' in the action.
3586
c2d6af84
PA
35872013-05-23 Yao Qi <yao@codesourcery.com>
3588 Pedro Alves <palves@redhat.com>
3589
3590 * linux-low.c (lwp_in_step_range): New function.
3591 (linux_wait_1): If the thread was range stepping and stopped
3592 outside the stepping range, report the stop to GDB. Otherwise,
3593 continue stepping. Add range stepping debug output.
3594 (linux_set_resume_request): Copy the step range from the resume
3595 request to the lwp.
3596 (linux_supports_range_stepping): New.
3597 (linux_target_ops) <supports_range_stepping>: Set to
3598 linux_supports_range_stepping.
3599 * linux-low.h (struct linux_target_ops)
3600 <supports_range_stepping>: New field.
3601 (struct lwp_info) <step_range_start, step_range_end>: New fields.
3602 * linux-x86-low.c (x86_supports_range_stepping): New.
3603 (the_low_target) <supports_range_stepping>: Set to
3604 x86_supports_range_stepping.
3605 * server.c (handle_v_cont): Handle 'r' action.
3606 (handle_v_requests): Append ";r" if the target supports range
3607 stepping.
3608 * target.h (struct thread_resume) <step_range_start,
3609 step_range_end>: New fields.
3610 (struct target_ops) <supports_range_stepping>:
3611 New field.
3612 (target_supports_range_stepping): New macro.
3613
58794e1a
JB
36142013-05-17 Joel Brobecker <brobecker@adacore.com>
3615
3616 * lynx-low.c (lynx_resume): Fix null_ptid/minus_one_ptid
3617 confusion in comment.
3618
d631c5a7
JB
36192013-05-17 Joel Brobecker <brobecker@adacore.com>
3620
3621 * lynx-low.c (struct process_info_private): New type.
3622 (lynx_add_process): New function.
3623 (lynx_create_inferior, lynx_attach): Replace calls to
3624 add_process by calls to lynx_add_process.
3625 (lynx_resume): If PTID is null, then try using
3626 current_process()->private->last_wait_event_ptid.
3627 Add comments.
3628 (lynx_clear_inferiors): Delete. The contents of that function
3629 has been inlined in lynx_mourn;
3630 (lynx_wait_1): Save the ptid in the process's private data.
3631 (lynx_mourn): Free the process' private data. Replace call
3632 to lynx_clear_inferiors by call to clear_inferiors.
3633
96f7a20f
YQ
36342013-05-17 Yao Qi <yao@codesourcery.com>
3635
3636 * i386-low.c (i386_length_and_rw_bits): Move the comment to
3637 the right place.
3638
db0dfaa0
LM
36392013-05-16 Luis Machado <lgustavo@codesourcery.com>
3640
3641 * linux-low.c: Move definition checks upwards for PT_TEXT_ADDR,
3642 PT_DATA_ADDR and PT_TEXT_END_ADDR. Update comments.
3643 (linux_read_offsets): Remove PT_TEXT_ADDR, PT_DATA_ADDR and
3644 PT_TEXT_END_ADDR guards. Update comments.
3645 (linux_target_op) <read_offsets>: Conditionally define to
3646 linux_read_offsets if the target is UCLIBC and if it defines
3647 PT_TEXT_ADDR, PT_DATA_ADDR and PT_TEXT_END_ADDR.
3648
68f5f838
SL
36492013-05-06 Sandra Loosemore <sandra@codesourcery.com>
3650 Andrew Jenner <andrew@codesourcery.com>
3651
3652 * Makefile.in (SFILES): Add linux-nios2-low.c.
3653 (clean): Add action to delete nios2-linux.c.
3654 (nios2-linux.c): New rule.
3655 * configure.srv: Add nios2*-*-linux*.
3656 * linux-nios2-low.c: New.
3657
1ebff1fd
HAQ
36582013-05-03 Hafiz Abid Qadeer <abidh@codesourcery.com>
3659
3660 * tracepoint.c (cmd_qtinit): Call 'stop_tracing'.
3661
f6150862
HZ
36622013-04-25 Hui Zhu <hui@codesourcery.com>
3663
3664 PR gdb/15186
f6150862
HZ
3665 * ax.c (ax_printf): Add fflush.
3666
614c279d
TT
36672013-04-22 Tom Tromey <tromey@redhat.com>
3668
3669 * Makefile.in (SFILES): Add filestuff.c.
3670 (OBS): Add filestuff.o.
3671 (filestuff.o): New target.
3672 * config.in, configure: Rebuild.
3673 * configure.ac: Check for fdwalk, pipe2.
3674
7d4e5717
PA
36752013-04-17 Pedro Alves <palves@redhat.com>
3676
3677 * configure.ac (USE_THREAD_DB): Delete variable.
3678 (if test "$srv_linux_thread_db" = "yes"): AC_DEFINE USE_THREAD_DB.
3679 Don't AC_SUBST USE_THREAD_DB.
3680 * Makefile.in (INTERNAL_CFLAGS): Remove @USE_THREAD_DB@.
3681 * config.in, configure: Regenerate.
3682
d5c93e41
PA
36832013-04-16 Pedro Alves <palves@redhat.com>
3684
3685 * linux-low.h (struct lwp_info) <thread_known>: Move under
3686 the USE_THREAD_DB #ifdef.
3687
04f5fe89
PA
36882013-04-16 Pedro Alves <palves@redhat.com>
3689
3690 * Makefile.in (INTERNAL_CFLAGS): Add @USE_THREAD_DB@.
3691 (linux-low.o): Delete rule.
3692 * linux-low.h: Always include "gdb_thread_db.h" instead of
3693 conditionally including thread_db.h.
3694 (struct lwp_info) <th>: Guard with #ifdef USE_THREAD_DB instead of
3695 HAVE_THREAD_DB_H.
3696
480b27bf
JK
36972013-04-07 Jan Kratochvil <jan.kratochvil@redhat.com>
3698
3699 * Makefile.in (install-only): Fix make install regression.
3700
43662968
JK
37012013-04-05 Jan Kratochvil <jan.kratochvil@redhat.com>
3702
3703 Convert man pages to texinfo, new gdbinit.5 texinfo page.
3704 * Makefile.in (install-only): Remove $(man1dir) and gdbserver.1
3705 installation.
3706 * gdbserver.1: Remove.
3707
3e74e146
PA
37082013-03-22 Pedro Alves <palves@redhat.com>
3709
3710 * linux-low.c (handle_extended_wait): Don't call
3711 linux_enable_event_reporting.
3712
a8347a2a
TT
37132013-03-15 Tony Theodore <tonyt@logyst.com>
3714
3715 PR build/9098:
3716 * Makefile.in (SHELL): Use @SHELL@.
3717
eeb56fa7
SDJ
37182013-03-14 Sergio Durigan Junior <sergiodj@redhat.com>
3719
3720 * tracepoint.c (cmd_qtv): Initialize `val' with zero, silencing
3721 compiler warning.
3722
4fa7e2ff
JB
37232013-03-13 Joel Brobecker <brobecker@adacore.com>
3724
3725 * linux-low.c (linux_target_ops) [!HAVE_LINUX_BTRACE]:
3726 Remove extraneous NULL element.
3727
8ddb1965
YQ
37282013-03-13 Yao Qi <yao@codesourcery.com>
3729
3730 * tracepoint.c (traceframe_read_tsv): Look for the last matched
3731 'V' block in trace frame.
3732
9accd112
MM
37332013-03-11 Markus Metzger <markus.t.metzger@intel.com>
3734
3735 * target.h (struct target_ops): Add btrace ops.
3736 (target_supports_btrace): New macro.
3737 (target_enable_btrace): New macro.
3738 (target_disable_btrace): New macro.
3739 (target_read_btrace): New macro.
3740 * gdbthread.h (struct thread_info): Add btrace field.
3741 * server.c: Include btrace-common.h.
3742 (handle_btrace_general_set): New function.
3743 (handle_btrace_enable): New function.
3744 (handle_btrace_disable): New function.
3745 (handle_general_set): Call handle_btrace_general_set.
3746 (handle_qxfer_btrace): New function.
3747 (struct qxfer qxfer_packets[]): Add btrace entry.
3748 * inferiors.c (remove_thread): Disable btrace.
3749 * linux-low: Include linux-btrace.h.
3750 (linux_low_enable_btrace): New function.
3751 (linux_low_read_btrace): New function.
3752 (linux_target_ops): Add btrace ops.
3753 * configure.srv (i[34567]86-*-linux*): Add linux-btrace.o.
3754 Add srv_linux_btrace=yes.
3755 (x86_64-*-linux*): Add linux-btrace.o.
3756 Add srv_linux_btrace=yes.
3757 * configure.ac: Define HAVE_LINUX_BTRACE.
3758 * config.in: Regenerated.
3759 * configure: Regenerated.
3760
5cc22e4c
MM
37612013-03-11 Markus Metzger <markus.t.metzger@intel.com>
3762
3763 * server.c (handle_qxfer): Preserve error message if -3 is
3764 returned.
3765 (qxfer): Document the -3 return value.
3766
7c97f91e
MM
37672013-03-11 Markus Metzger <markus.t.metzger@intel.com>
3768
3769 * Makefile.in (SFILES): Add $(srcdir)/common/linux-btrace.c.
3770 (linux_btrace_h): New variable.
3771 (linux-btrace.o): New rule.
3772
be9a119c 37732013-03-08 Stan Shebs <stan@codesourcery.com>
f6f899bf
HAQ
3774 Hafiz Abid Qadeer <abidh@codesourcery.com>
3775
3776 * tracepoint.c (trace_buffer_size): New global.
3777 (DEFAULT_TRACE_BUFFER_SIZE): New define.
3778 (init_trace_buffer): Change to one-argument function. Allocate
3779 trace buffer memory.
3780 (handle_tracepoint_general_set): Call cmd_bigqtbuffer_size to
3781 handle QTBuffer:size packet.
3782 (cmd_bigqtbuffer_size): New function.
3783 (initialize_tracepoint): Call init_trace_buffer with
3784 DEFAULT_TRACE_BUFFER_SIZE.
3785 * server.c (handle_query): Add QTBuffer:size in the
3786 supported packets.
3787
e64f7499
YQ
37882013-03-07 Yao Qi <yao@codesourcery.com>
3789
3790 * tracepoint.c (cur_action, cur_step_action): Make them unsigned.
3791 (cmd_qtfp): Initialize cur_action and cur_step_action 0 instead
3792 of -1.
3793 (cmd_qtsp): Adjust condition. Do post increment.
3794 Set cur_action and cur_step_action back to 0.
3795
f0ae6fc3
PA
37962013-03-07 Jeremy Bennett <jeremy.bennett@embecosm.com>
3797
3798 PR server/15236
3799 * linux-low.c (linux_write_memory): Return early success if LEN is
3800 zero.
3801
b5b0b0af
CV
38022013-03-05 Corinna Vinschen <vinschen@redhat.de>
3803
334ad4a8 3804 * configure.srv: Add x86_64-*-cygwin* as target.
b5b0b0af 3805
589bc927
TT
38062013-02-28 Tom Tromey <tromey@redhat.com>
3807
3808 * configure.ac: Invoke AC_SYS_LARGEFILE.
3809 * configure, config.in: Rebuild.
3810
dfe07582
CV
38112013-02-28 Corinna Vinschen <vinschen@redhat.com>
3812
3813 * win32-low.c: Throughout, fix format strings and casts of
3814 printf-like functions to avoid type related warnings on all
3815 platforms.
3816 (get_child_debug_event): Print dwDebugEventCode as hex since
3817 that's how it's usually documented.
3818
736cd585
YQ
38192013-02-28 Yao Qi <yao@codesourcery.com>
3820
3821 * tracepoint.c (cmd_qtbuffer): Call phex_nz instead of
3822 pulongest.
3823
e1f58301
JW
38242013-02-27 Jiong Wang <jiwang@tilera.com>
3825
3826 * Makefile.in (clean): Remove reg-tilegx.c, reg-tilegx32.c.
3827 (reg-tilegx32.c): New rule.
3828 * configure.srv (tilegx-*-linux*): Add reg-tilegx32.o to srv_regobj.
3829 * linux-tile-low.c (tile_arch_setup): New function. Invoke
3830 different register info initializer according to elf class.
3831 (init_registers_tilgx32): New function. The tilegx32 register info
3832 initializer.
3833 (tile_fill_gregset): Use "uint_reg_t" to represent register size.
3834 (tile_store_gregset): Likewise.
3835
d171ca78
YQ
38362013-02-27 Yao Qi <yao@codesourcery.com>
3837
3838 * server.c (process_point_options): Print debug message when
3839 debug_threads is true.
3840
282bbdf3
YQ
38412013-02-26 Yao Qi <yao@codesourcery.com>
3842
3843 * tracepoint.c (cmd_qtbuffer): Don't set '\0' in OWN_BUF.
3844
aca22551
PA
38452013-02-19 Pedro Alves <palves@redhat.com>
3846 Kai Tietz <ktietz@redhat.com>
3847
3848 PR gdb/15161
3849
3850 * server.c (handle_query) <CRC check>: Use unpack_varlen_hex
3851 instead of strtoul to extract address from packet.
3852 (process_serial_event) <'z'>: Likewise.
3853
4f3cee1c
YQ
38542013-02-18 Yao Qi <yao@codesourcery.com>
3855
3856 * linux-bfin-low.c (the_low_target): Use NULL instead of 0.
3857
8e1d55a3
PA
38582013-02-14 Pedro Alves <palves@redhat.com>
3859
3860 Plug memory leak.
3861
3862 * tracepoint.c (cmd_qtnotes): Free TRACING_USER_NAME,
3863 TRACING_NOTES and TRACING_STOP_NOTE before clobbering.
3864
458820da
PA
38652013-02-14 Pedro Alves <palves@redhat.com>
3866
3867 * tracepoint.c (cmd_qtdpsrc): Use savestring.
3868
baea0dae
PA
38692013-02-14 Pedro Alves <palves@redhat.com>
3870
3871 * tracepoint.c (save_string): Delete.
3872 (add_tracepoint_action): Use savestring instead of save_string.
3873
0b1afbb3
PA
38742013-02-12 Pedro Alves <palves@redhat.com>
3875
3876 * linux-xtensa-low.c: Ditto.
3877 * xtensa-xtregs.c: Ditto.
3878
8a4ac37e
PA
38792013-02-12 Sanimir Agovic <sanimir.agovic@intel.com>
3880
3881 * thread-db.c (thread_db_get_tls_address): NULL pointer check
3882 thread_db.
3883
148de6bb
MS
38842013-02-07 Marcus Shawcroft <marcus.shawcroft@arm.com>
3885
3886 * linux-aarch64-low.c (aarch64_arch_setup): Clamp
3887 aarch64_num_wp_regs and aarch64_num_bp_regs to
3888 AARCH64_HWP_MAX_NUM and AARCH64_HBP_MAX_NUM respectively.
3889
55fac6e0
MS
38902013-02-07 Marcus Shawcroft <marcus.shawcroft@arm.com>
3891
3892 * linux-aarch64-low.c (ps_get_thread_area): Replace
3893 PTRACE_GET_THREAD_AREA with PTRACE_GETREGSET.
3894
176eb98c
MS
38952013-02-04 Jim MacArthur <jim.macarthur@arm.com>
3896 Marcus Shawcroft <marcus.shawcroft@arm.com>
3897 Nigel Stephens <nigel.stephens@arm.com>
3898 Yufeng Zhang <yufeng.zhang@arm.com>
3899
3900 * Makefile.in (clean): Remove aarch64.c and aarch64-without-fpu.c.
3901 (aarch64.c, aarch64-without-fpu.c): New targets.
3902 * configure.srv (aarch64*-*-linux*): New.
3903 * linux-aarch64-low.c: New file.
3904
56f7af9c
MS
39052013-02-04 Marcus Shawcroft <marcus.shawcroft@arm.com>
3906
43aaf8b6 3907 * linux-low.c (handle_extended_wait, linux_create_inferior)
56f7af9c
MS
3908 (linux_attach_lwp_1, linux_kill_one_lwp, linux_attach_one_lwp)
3909 (dequeue_one_deferred_signal, linux_resume_one_thread)
3910 (fetch_register, linux_write_memory, linux_enable_event_reporting)
3911 (linux_tracefork_grandchild, linux_test_for_tracefork)
3912 (linux_read_offsets, linux_xfer_siginfo, linux_xfer_siginfo): Add
3913 PTRACE_ARG3_TYPE and PTRACE_ARG4_TYPE cast to ptrace arguments
3914 where the argument is 0.
3915
60f662b0
YQ
39162013-01-25 Yao Qi <yao@codesourcery.com>
3917
3918 * event-loop.c: Include "queue.h".
3919 (gdb_event_p): New typedef.
3920 (struct gdb_event) <next_event>: Remove.
3921 (event_queue): Change to QUEUE(gdb_event_p).
3922 (async_queue_event): Remove.
3923 (gdb_event_xfree): New.
3924 (initialize_event_loop): New.
3925 (process_event): Use API from QUEUE.
3926 (wait_for_event): Likewise.
3927 * server.c (main): Call initialize_event_loop.
3928 * server.h (initialize_event_loop): Declare.
3929
5ae4861a
YQ
39302013-01-18 Yao Qi <yao@codesourcery.com>
3931
3932 * ax.h (struct eval_agent_expr_context): New.
3933 (gdb_eval_agent_expr): Update declaration.
3934 * ax.c (gdb_eval_agent_expr): Remove argument REGCACHE and
3935 TFRAME. Add new argument CTX.
3936 * server.h (struct eval_agent_expr_context): Declare.
3937 (agent_mem_read, agent_tsv_read): Update declaration.
3938 (agent_mem_read_string): Likewise.
3939 * tracepoint.c (eval_tracepoint_agent_expr): Remove.
3940 (add_traceframe_block): Add new argument TPOINT.
3941 Increase TPOINT->traceframe_usage.
3942 (do_action_at_tracepoint): Call gdb_eval_agent_expr instead of
3943 eval_tracepoint_agent_expr.
3944 (condition_true_at_tracepoint): Likewise.
3945 (agent_mem_read): Remove argument TFRAME. Add argument CTX.
3946 (agent_mem_read_string, agent_tsv_read): Likewise.
3947
85e00e85
YQ
39482013-01-16 Yao Qi <yao@codesourcery.com>
3949
3950 * linux-low.c (linux_resume_one_lwp): Don't check
3951 'lwp->bp_reinsert != 0'.
3952
4039cf45
JB
39532013-01-07 Joel Brobecker <brobecker@adacore.com>
3954 Pedro Alves <palves@redhat.com>
3955
3956 * lynx-low.c (ptrace_request_to_str): Define a temporary
3957 macro and use it to simplify this function's implementation.
3958
9044dee2
JB
39592013-01-07 Joel Brobecker <brobecker@adacore.com>
3960
3961 * lynx-low.c (lynx_resume): Call perror_with_name if lynx_ptrace
3962 sets errno.
3963
e6352c8f
JB
39642013-01-07 Joel Brobecker <brobecker@adacore.com>
3965
3966 * configure.srv (i[34567]86-*-lynxos*): Set srv_xmlfiles.
3967
50681a27
JB
39682013-01-07 Joel Brobecker <brobecker@adacore.com>
3969
3970 * configure.srv (powerpc-*-lynxos*): Set srv_xmlfiles.
3971
3f6e77ef
JB
39722013-01-07 Joel Brobecker <brobecker@adacore.com>
3973
3974 * lynx-low.c (lynx_resume): Use the resume_info parameter
3975 to determine the ptid for the lynx_ptrace call, unless
3976 it is equal to minus_one_ptid, in which case we use the
3977 ptid of the current_inferior.
3978 (lynx_wait_1): After having received a thread create/exit
3979 event, resume the inferior's execution using the signaling
3980 thread's ptid, rather than the old ptid.
3981
7fda33ae
JB
39822013-01-07 Joel Brobecker <brobecker@adacore.com>
3983
3984 * lynx-low.c (lynx_resume): Delete variable ret.
3985
b9786c74
JB
39862013-01-01 Joel Brobecker <brobecker@adacore.com>
3987
3988 * gdbreplay.c (gdbreplay_version): Update copyright year.
3989 * server.c (gdbserver_version): Likewise.
3990
8b93d60f
JB
39912012-12-17 Joel Brobecker <brobecker@adacore.com>
3992
3993 * lynx-low.c (lynx_wait_1): Add debug trace before adding
3994 new thread.
3995
037335a7
JB
39962012-12-17 Joel Brobecker <brobecker@adacore.com>
3997
3998 * lynx-low.c (ptrace_request_to_str): Add handling for
3999 PTRACE_GETTRACESIG.
4000
52d4cbd8
JB
40012012-12-17 Joel Brobecker <brobecker@adacore.com>
4002
4003 * lynx-low.c (lynx_attach): Delete variable new_process.
4004
ab8f6ca9
JB
40052012-12-17 Joel Brobecker <brobecker@adacore.com>
4006
4007 * lynx-low.c (lynx_create_inferior): Delete variable
4008 new_process.
4009
78cbc024
JB
40102012-12-17 Joel Brobecker <brobecker@adacore.com>
4011
4012 * lynx-low.c (ptrace_request_to_str): Do not handle
4013 PTRACE_GETTHREADLIST if this macro does not exist.
4014
14a00470
YQ
40152012-12-15 Yao Qi <yao@codesourcery.com>
4016
4017 * Makefile.in (OBS): Add notif.o.
4018 * notif.c, notif.h: New.
4019 * server.c: Include "notif.h".
4020 (struct vstop_notif) <next>: Remove.
4021 <base>: New field.
4022 (queue_stop_reply): Update.
4023 (push_event, send_next_stop_reply): Remove.
4024 (discard_queued_stop_replies): Update.
4025 (notif_stop): New variable.
4026 (handle_v_stopped): Remove.
4027 (handle_v_requests): Don't call handle_v_stopped. Call
4028 handle_ack_notif instead.
4029 (queue_stop_reply_callback): Call notif_event_enque instead
4030 of queue_stop_reply.
4031 (handle_status): Don't call send_next_stop_reply, call
4032 notif_write_event instead.
4033 (kill_inferior_callback): Likewise.
4034 (detach_or_kill_inferior_callback): Likewise.
4035 (main): Call initialize_notif.
4036 (process_serial_event): Call QUEUE_is_empty.
4037 (handle_target_event): Call notif_push instead of push event.
4038 * server.h (push_event): Remove declaration.
4039
61c125b9
TT
40402012-12-10 Tom Tromey <tromey@redhat.com>
4041
4042 * Makefile.in (DEPMODE, DEPDIR, depcomp, COMPILE.pre)
4043 (COMPILE.post, COMPILE, POSTCOMPILE, IPAGENT_COMPILE): New
4044 macros.
4045 (.c.o): Rewrite.
4046 (ax-ipa.o, tracepoint-ipa.o, utils-ipa.o, format-ipa.o)
4047 (common-utils-ipa.o, remote-utils-ipa.o, regcache-ipa.o)
4048 (i386-linux-ipa.o, linux-i386-ipa.o, linux-amd64-ipa.o)
4049 (amd64-linux-ipa.o, ax.o): Rewrite.
4050 (event-loop.o, hostio.o, hostio-errno.o, inferiors.o, mem-break.o)
4051 (proc-service.o, regcache.o, remote-utils.o, server.o, target.o)
4052 (thread-db.o, tracepoint.o, utils.o, gdbreplay.o, dll.o): Remove.
4053 (signals.o, linux-procfs.o, linux-ptrace.o, common-utils.o, vec.o)
4054 (gdb_vecs.o, xml-utils.o, linux-osdata.o, ptid.o, buffer.o)
4055 (format.o, agent.o, vasprintf.o, vsnprintf.o): Rewrite.
4056 (i386-low.o, i387-fp.o, linux-low.o, linux-arm-low.o)
4057 (linux-bfin-low.o, linux-cris-low.o, linux-crisv32-low.o)
4058 (linux-ia64-low.o, linux-m32r-low.o, linux-mips-low.o)
4059 (linux-ppc-low.o, linux-s390-low.o, linux-sh-low.o)
4060 (linux-tic6x-low.o, linux-x86-low.o, linux-xtensa-low.o)
4061 (linux-tile-low.o, lynx-low.o, lynx-ppc-low.o, nto-low.o)
4062 (nto-x86-low.o, linux-low.o, win32-low.o, win32-arm-low.o)
4063 (win32-i386-low.o, spu-low.o, reg-arm.o, arm-with-iwmmxt.o)
4064 (arm-with-vfpv2.o, arm-with-vfpv3.o, arm-with-neon.o, reg-bfin.o)
4065 (reg-cris.o, reg-crisv32.o, i386.o, i386-linux.o, i386-avx.o)
4066 (i386-avx-linux.o, i386-mmx.o, i386-mmx-linux.o, reg-ia64.o)
4067 (reg-m32r.o, reg-m68k.o, reg-cf.o, mips-linux.o, mips-dsp-linux.o)
4068 (mips64-linux.o, mips64-dsp-linux.o, powerpc-32.o, powerpc-32l.o)
4069 (powerpc-altivec32l.o, powerpc-cell32l.o, powerpc-vsx32l.o)
4070 (powerpc-isa205-32l.o, powerpc-isa205-altivec32l.o)
4071 (powerpc-isa205-vsx32l.o, powerpc-e500l.o, powerpc-64l.o)
4072 (powerpc-altivec64l.o, powerpc-cell64l.o, powerpc-vsx64l.o)
4073 (powerpc-isa205-64l.o, powerpc-isa205-altivec64l.o)
4074 (powerpc-isa205-vsx64l.o, s390-linux32.o, s390-linux32v1.o)
4075 (s390-linux32v2.o, s390-linux64.o, s390-linux64v1.o)
4076 (s390-linux64v2.o, s390x-linux64.o, s390x-linux64v1.o)
4077 (s390x-linux64v2.o, tic6x-c64xp-linux.o, tic6x-c64x-linux.o)
4078 (tic6x-c62x-linux.o, reg-sh.o, reg-sparc64.o, reg-spu.o, amd64.o)
4079 (amd64-linux.o, amd64-avx.o, amd64-avx-linux.o, x32.o)
4080 (x32-linux.o, x32-avx.o, x32-avx-linux.o, reg-xtensa.o)
4081 (reg-tilegx.o): Remove.
4082 (all_object_files): New macro.
4083 Include .deps files.
4084 * aclocal.m4, configure: Rebuild.
4085 * acinclude.m4: Include depstand.m4, lead-dot.m4.
4086 * configure.ac: Invoke ZW_CREATE_DEPDIR,
4087 ZW_PROG_COMPILER_DEPENDENCIES. Compute GMAKE condition.
4088
e90e9ad9
TT
40892012-12-05 Tom Tromey <tromey@redhat.com>
4090
4091 PR gdb/14917:
4092 * server.h (current_insn_ptr, emit_error): Declare 'extern'.
4093
02d403bf 40942012-11-28 Markus Metzger <markus.t.metzger@intel.com>
945bf713
MM
4095
4096 * configure.ac: Check for linux/perf_event.h.
4097 * config.in: Regenerated.
4098 * configure: Regenerated.
4099
0270a750
PA
41002012-11-26 Maxime Villard <rustyBSD@gmx.fr>
4101
4102 * hostio.c (handle_readlink): Decrease buffer size
4103 parameter passed to readlink by one byte.
4104
8c29b58e
YQ
41052012-11-26 Yao Qi <yao@codesourcery.com>
4106
4107 * configure.ac (build_warnings): Append '-Wempty-body'.
4108 * configure: Regenerated.
4109 * linux-low.c (linux_create_inferior): Use braces for empty 'if'
4110 body.
4111
8bdce1ff
PM
41122012-11-15 Pierre Muller <muller@sourceware.org>
4113
4114 * configure.ac (AC_CHECK_HEADERS): Add wait.h header.
4115 * config.in: Regenerate.
4116 * configure: Regenerate.
4117 * linux-low.c: Use "gdb_stat.h" header instead of <sys/stat.h> header.
4118 Use "gdb_wait.h" header instead of <sys/wait.h> header.
4119 * lynx-low.c: Use "gdb_wait.h" header instead of <sys/wait.h> header.
4120 * remote-utils.c: Use "gdb_stat.h" header instead of <sys/stat.h>
4121 header.
4122 * server.c: Remove HAVE_WAIT_H conditional. Use "gdb_wait.h" header
4123 instead of <sys/wait.h> header.
4124 * spu-low.c: Use "gdb_wait.h" header instead of <sys/wait.h> header.
4125
02d403bf 41262012-11-13 Markus Metzger <markus.t.metzger@intel.com>
3ba6ad0f
MM
4127
4128 * Makefile.in: (INTERNAL_CFLAGS): Add -DGDBSERVER
4129 (various make rules): Remove -DGDBSERVER
4130
fbd5db48
YQ
41312012-11-09 Yao Qi <yao@codesourcery.com>
4132
4133 * spu-low.c (current_ptid): Move it to ..
4134 * gdbthread.h: ... here. New.
4135 * remote-utils.c (read_ptid): Use macro 'current_ptid'.
4136 * server.c (myresume, process_serial_event): Likewise.
4137 * thread-db.c (thread_db_find_new_threads): Likewise.
4138 * tracepoint.c (run_inferior_command): Likewise.
4139
b3dc46ff
AB
41402012-10-01 Andrew Burgess <aburgess@broadcom.com>
4141
4142 * server.c (handle_search_memory_1): Include access length in
4143 warning message.
4144
07c04788
HPN
41452012-09-05 Michael Brandt <michael.brandt@axis.com>
4146
4147 * linux-crisv32-low.c: Fix compile errors.
4148
918d227b
YQ
41492012-09-04 Yao Qi <yao@codesourcery.com>
4150
4151 * tracepoint.c (cmd_qtsv): Adjust debug message.
4152 Don't check CUR_TPOINT.
4153
18c1b81a
YQ
41542012-08-28 Yao Qi <yao@codesourcery.com>
4155
4156 * ax.c, tracepoint.c: Replace ATTR_FORMAT with ATTRIBUTE_PRINTF.
4157 * server.h: Include 'libiberty.h' and 'ansidecl.h'.
4158 (ATTR_NORETURN, ATTR_FORMAT, ATTR_MALLOC): Remove.
4159 Remove declarations of xmalloc, xreallloc, xstrdup and
4160 freeargv.
4161 * Makefile.in (libiberty_h): New.
4162 (server_h): Append dependencies 'libiberty.h' and 'ansidecl.h'.
4163 (linux-bfin-low.o): Append dependency 'libiberty.h'.
4164
dc82f37b
YQ
41652012-08-23 Yao Qi <yao@codesourcery.com>
4166
4167 * server.h: Remove declaration of 'xsnprintf'.
4168
406b1477
KS
41692012-08-22 Keith Seitz <keiths@redhat.com>
4170
4171 * server.h: Include build-gnulib-gbserver/config.h.
4172 * gdbreplay.c: Likewise.
4173
e6712ff1
DE
41742012-08-08 Doug Evans <dje@google.com>
4175
4176 * Makefile.in (SFILES): Add gdb_vecs.c.
4177 (OBS): Add gdb_vecs.o.
4178 (gdb_vecs_h, host_defs_h): New variables.
4179 (thread-db.o): Add $(gdb_vecs_h) dependency.
4180 (gdb_vecs.o): New rule.
4181 * thread-db.c: #include "gdb_vecs.h".
4182 (thread_db_load_search): Use a vector to iterate over path elements.
4183 Handle text appearing after "$pdir".
4184
4185 * configure.ac: Add check for strstr.
4186 * config.in: Regenerate.
4187 * configure: Regenerate.
4188
7c3270ae
UW
41892012-08-02 Ulrich Weigand <ulrich.weigand@linaro.org>
4190
4191 * hostio.c (handle_pread): If pread fails, fall back to attempting
4192 lseek/read.
4193 (handle_pwrite): Likewise for pwrite.
4194
b62e2b27
UW
41952012-08-01 Ulrich Weigand <ulrich.weigand@linaro.org>
4196
4197 * linux-arm-low.c (arm_linux_hw_point_initialize): Distinguish
4198 between unsupported TYPE and unimplementable ADDR/LEN combination.
4199 (arm_insert_point): Act on new return value.
4200
78a99e91
PA
42012012-07-31 Pedro Alves <palves@redhat.com>
4202
4203 * server.c (process_point_options): Only skip tokens if we find
4204 one that is unrecognized. Don't treat 'X' specially while
4205 skipping unrecognized tokens.
4206
fcf303ab
UW
42072012-07-30 Ulrich Weigand <ulrich.weigand@linaro.org>
4208
4209 * linux-arm-low.c (arm_linux_hw_point_initialize): Do not attempt
4210 to 4-byte-align HW breakpoint addresses for Thumb.
4211
7255706c
YQ
42122012-07-27 Yao Qi <yao@codesourcery.com>
4213
4214 PR remote/14161.
4215
4216 * server.h: Declare gdb_agent_about_to_close.
4217 * target.c (kill_inferior): Include "agent.h".
4218 New. Send command 'kill'.
4219 * target.h (kill_inferior): Removed macro.
4220 * tracepoint.c (gdb_agent_about_to_close): New.
4221 (gdb_agent_helper_thread): Handle command 'close'.
4222 Wait endlessly until the inferior stops.
4223 Install gdb_agent_remove_socket to atexit hook.
4224 (agent_socket_name): New static variable.
4225 (gdb_agent_socket_init): Replace local variable 'name' with
4226 'agent_socket_name'.
4227 (gdb_agent_remove_socket): New.
4228
5a3f286f
YQ
42292012-07-27 Yao Qi <yao@codesourcery.com>
4230
4231 * server.c (process_point_options): Stop at 'X' when parsing.
4232
961bd387
ME
42332012-07-19 Michael Eager <eager@eagercon.com>
4234
a261b8f5 4235 * i386-low.c (Z_packet_to_hw_type): Add Z_PACKET_HW_BP, translate
961bd387
ME
4236 to hw_execute.
4237 * linux-x86-low.c (x86_insert_point, x86_remove_point):
4238 Call i386_low_insert_watchpoint, i386_low_remove_watchpoint to add/del
4239 hardware breakpoint.
4240
aa7c7447
JK
42412012-07-07 Jan Kratochvil <jan.kratochvil@redhat.com>
4242
4243 * gdbserver/linux-low.c (initialize_low): Call
4244 linux_ptrace_init_warnings.
4245
7f216e7c
DE
42462012-07-02 Doug Evans <dje@google.com>
4247
4248 * mem-break.c (gdb_no_commands_at_breakpoint): Fix cast from
4249 pointer to int.
4250
d3ce09f5
SS
42512012-07-02 Stan Shebs <stan@codesourcery.com>
4252
4253 * Makefile.in (WARN_CFLAGS_NO_FORMAT): Define.
4254 (ax.o): Add it to build rule.
4255 (ax-ipa.o): Ditto.
4256 (OBS): Add format.o.
4257 (IPA_OBS): Add format.o.
4258 * server.c (handle_query): Claim support for breakpoint commands.
4259 (process_point_options): Add command case.
4260 (process_serial_event): Leave running if there are printfs in
4261 effect.
4262 * mem-break.h (any_persistent_commands): Declare.
4263 (add_breakpoint_commands): Declare.
4264 (gdb_no_commands_at_breakpoint): Declare.
4265 (run_breakpoint_commands): Declare.
4266 * mem-break.c (struct point_command_list): New struct.
4267 (struct breakpoint): New field command_list.
4268 (any_persistent_commands): New function.
4269 (add_commands_to_breakpoint): New function.
4270 (add_breakpoint_commands): New function.
4271 (gdb_no_commands_at_breakpoint): New function.
4272 (run_breakpoint_commands): New function.
4273 * linux-low.c (linux_wait_1): Test for and run breakpoint commands
4274 locally.
4275 * ax.c: Include format.h.
4276 (ax_printf): New function.
4277 (gdb_eval_agent_expr): Add printf opcode.
4278
2f8f6aed
YQ
42792012-06-13 Yao Qi <yao@codesourcery.com>
4280
4281 * server.c (start_inferior): Remove duplicated writes to fields
4282 'last_resume_kind' and 'last_status' of 'current_inferior'.
4283
0c9070b3
YQ
42842012-06-12 Yao Qi <yao@codesourcery.com>
4285 Pedro Alves <palves@redhat.com>
4286
4287 * linux-low.c (linux_set_resume_request): Simplify predicate. Add
4288 comment.
4289 * server.c (handle_v_cont): Extend comment.
4290
c52daf70
YQ
42912012-06-11 Yao Qi <yao@codesourcery.com>
4292
4293 * linux-low.c (linux_attach): Add 'static'.
4294
d38bbb0a
YQ
42952012-06-06 Yao Qi <yao@codesourcery.com>
4296
4297 * ax.c (gdb_eval_agent_expr): Print `top' in hex.
4298
89dc0afd
JK
42992012-06-01 Jan Kratochvil <jan.kratochvil@redhat.com>
4300
4301 Fix gcc -flto compilation warning.
4302 * server.c (main): Make variable multi_mode and attach volatile.
4303
75f62ce7
TJB
43042012-05-30 Thiago Jung Bauermann <thiago.bauermann@linaro.org>
4305
4306 * linux-low.c (get_r_debug): Disable code using DT_MIPS_RLD_MAP
4307 if the platform doesn't know about it.
4308
65f479b6
PA
43092012-05-30 Jeff Kenton <jkenton@tilera.com>
4310
4311 * Makefile.in (SFILES): Add linux-tile-low.c.
4312 (linux-tile-low.o, reg-tilegx.o, reg-tilegx.c): New rules.
4313 * configure.srv: Handle tilegx-*-linux*.
4314 * linux-tile-low.c: New file.
4315
0c5bf5a9
JK
43162012-05-28 Jan Kratochvil <jan.kratochvil@redhat.com>
4317
4318 * linux-low.c (linux_qxfer_libraries_svr4): Return -1 if R_DEBUG is -1.
4319
a493e3e2
PA
43202012-05-24 Pedro Alves <palves@redhat.com>
4321
4322 PR gdb/7205
4323
43aaf8b6 4324 Replace TARGET_SIGNAL_ with GDB_SIGNAL_ throughout.
a493e3e2 4325
2ea28649
PA
43262012-05-24 Pedro Alves <palves@redhat.com>
4327
4328 PR gdb/7205
4329
4330 Replace target_signal with gdb_signal throughout.
4331
8d409d16
MR
43322012-05-22 Maciej W. Rozycki <macro@codesourcery.com>
4333
4334 * linux-low.c (linux_store_registers): Avoid the copying sequence
4335 when no data has been retrieved by ptrace.
4336
23512c01
MGD
43372012-05-22 Will Deacon <will.deacon@arm.com>
4338
4339 * linux-low (__UCLIBC__ && !(__UCLIBC_HAS_MMU__ || __ARCH_HAS_MMU__)):
4340 Include asm/ptrace.h.
4341 (PT_TEXT_ADDR, PT_DATA_ADDR, PT_TEXT_END_ADDR): Define only if not
4342 already defined.
4343
4934b29e
MR
43442012-05-21 Maciej W. Rozycki <macro@codesourcery.com>
4345
4346 * linux-low.c (linux_store_registers): Don't re-retrieve data
4347 with ptrace that has already been obtained from /proc. Always
4348 copy any data retrieved with ptrace to the buffer supplied.
4349
bde24c0a
PA
43502012-05-11 Yao Qi <yao@codesourcery.com>
4351 Pedro Alves <palves@redhat.com>
4352
4353 * linux-low.c (enum stopping_threads_kind): New.
4354 (stopping_threads): Change type to `enum stopping_threads_kind'.
4355 (handle_extended_wait): If stopping and suspending threads, leave
4356 the new_lwp suspended too.
4357 (linux_wait_for_event): Adjust.
4358 (stop_all_lwps): Set `stopping_threads' to
4359 STOPPING_AND_SUSPENDING_THREADS or STOPPING_THREADS depending on
4360 whether we're suspending threads or just stopping them. Assert no
4361 recursion happens.
4362
623b6bdf
YQ
43632012-04-29 Yao Qi <yao@codesourcery.com>
4364
4365 * server.h: Move some code to ...
4366 * gdbthread.h: ... here. New.
4367 * Makefile.in (inferiors.o, regcache.o): Depends on gdbthread.h
4368 (remote-utils.o, server.o, target.o tracepoint.o): Likewise.
4369 (nto-low.o, win32-low.o): Likewise.
4370 * inferiors.c, linux-low.h, nto-low.c: Include gdbthread.h.
4371 * regcache.c, remote-utils.c, server.c: Likewise.
4372 * target.c, tracepoint.c, win32-low.c: Likewise.
4373
f15f9948
TJB
43742012-04-24 Thiago Jung Bauermann <thiago.bauermann@linaro.org>
4375
4376 * linux-low.h (PTRACE_ARG3_TYPE): Move macro from linux-low.c.
4377 (PTRACE_ARG4_TYPE): Likewise.
4378 (PTRACE_XFER_TYPE): Likewise.
4379 * linux-arm-low.c (arm_prepare_to_resume): Cast third argument of
4380 ptrace to PTRACE_ARG3_TYPE.
4381 * linux-low.c (PTRACE_ARG3_TYPE): Move macro to linux-low.h.
4382 (PTRACE_ARG4_TYPE): Likewise.
4383 (PTRACE_XFER_TYPE): Likewise.
4384 (linux_detach_one_lwp): Cast fourth argument of
4385 ptrace to long then PTRACE_ARG4_TYPE.
4386 (regsets_fetch_inferior_registers): Cast third argument of
4387 ptrace to long then PTRACE_ARG3_TYPE.
4388 (regsets_store_inferior_registers): Likewise.
4389
38ea300a
PA
43902012-04-20 Pedro Alves <palves@redhat.com>
4391
4392 * configure: Regenerate.
4393
c971b7fa
PA
43942012-04-19 Pedro Alves <palves@redhat.com>
4395
43aaf8b6 4396 * Makefile.in (GNULIB_BUILDDIR): New.
c971b7fa 4397 (LIBGNU, INCGNU, GNULIB_H): Adjust.
43aaf8b6
PA
4398 (SUBDIRS, CLEANDIRS, REQUIRED_SUBDIRS): New.
4399 (all, install-only, uninstall, clean-info, all-lib, clean): No
4400 longer pass GNULIB_FLAGS_TO_PASS. Use subdir_do.
4401 (maintainer-clean realclean distclean): Use subdir_do.
4402 (subdir_do): New.
4403 (gnulib/import/Makefile): Adjust. Replace gnulib/import with
c971b7fa 4404 $(GNULIB_BUILDDIR). Don't pass argument to config.status.
43aaf8b6
PA
4405 * acinclude.m4: Include acx_configure_dir.m4.
4406 * configure.ac: Remove gl_EARLY, gl_INIT, and AM_INIT_AUTOMAKE
4407 calls. Call AC_PROG_RANLIB. Configure gnulib using
4408 ACX_CONFIGURE_DIR.
4409 (GNULIB): New.
4410 (GNULIB_STDINT_H): Adjust.
4411 (AC_OUTPUT): Don't output gnulib/Makefile anymore.
4412 * gdbreplay.c: Include build-gnulib/config.h.
4413 * server.h: Likewise.
4414 * aclocal.m4: Regenerate.
4415 * config.in: Regenerate.
4416 * configure: Regenerate.
c971b7fa 4417
809277f8
PA
44182012-04-19 Pedro Alves <palves@redhat.com>
4419
4420 * Makefile.in (LIBGNU, INCGNU): Adjust.
4421 (GNULIB_FLAGS_TO_PASS, GNULIB_H): Adjust.
4422 (all, install-only, uninstall, clean-info, all-lib, clean)
4423 (maintainer-clean, Makefile, gnulib/Makefile): Adjust.
4424 * configure.ac: Adjust AC_OUTPUT output.
4425 * aclocal.m4: Regenerate.
4426 * configure: Regenerate.
4427
fd9bb8b8
PA
44282012-04-19 Pedro Alves <palves@redhat.com>
4429
4430 * Makefile.in (generated_files): New.
4431 (server_h): Remove the explicit dependency on config.h, and depend
4432 on $generated_files.
4433
1c298c66
PA
44342012-04-19 Pedro Alves <palves@redhat.com>
4435
4436 * Makefile.in (INCGNU): Add -Ignulib.
4437
57c4b50b
PA
44382012-04-19 Pedro Alves <palves@redhat.com>
4439
4440 * Makefile.in (GNULIB_INCLUDE_DIR): Rename to ...
4441 (INCGNU): ... this, and spell out -I here.
4442 (GNULIB_LIB): Rename to ...
4443 (LIBGNU): ... this.
4444 (INCLUDE_CFLAGS, gdbserver$(EXEEXT), $(GNULIB_LIB) rule): Adjust.
4445
1030e047
PA
44462012-04-19 Pedro Alves <palves@redhat.com>
4447
4448 * config.in: Regenerate.
4449
447d4319
PA
44502012-04-19 Pedro Alves <palves@redhat.com>
4451
4452 * configure.ac: Remove AC_CHECK_DECLS check for memmem.
4453 * server.h (memmem): Remove declaration.
4454 * config.in: Regenerate.
4455 * configure: Regenerate.
4456
aad9eab9
YQ
44572012-04-19 Yao Qi <yao@codesourcery.com>
4458
4459 * Makefile.in (SFILES): Add common/vec.c.
4460 (OBS): Add vec.o.
4461 (vec.o): New rule.
4462
3e10640f
YQ
44632012-04-19 Yao Qi <yao@codesourcery.com>
4464
4465 * remote-utils.c (prepare_resume_reply): Replace with macro
4466 target_core_of_thread.
4467 * server.c (handle_qxfer_threads_proper): Likewise.
4468 * target.h (traget_core_of_thread): New macro.
4469
71622373
PA
44702012-04-18 Pedro Alves <palves@redhat.com>
4471
4472 * aclocal.m4: Regenerate.
4473 * configure: Regenerate.
4474
80d26939
YQ
44752012-04-16 Yao Qi <yao@codesourcery.com>
4476
4477 * tracepoint.c (cmd_qtstart): Download tracepoints even when they are
4478 duplicated on address.
4479
42476b70
YQ
44802012-04-16 Yao Qi <yao@codesourcery.com>
4481
4482 * tracepoint.c (COPY_FIELD_TO_BUF): New macro.
4483 (struct tracepoint_action_ops) <send>: New field.
4484 (m_tracepoint_action_send, r_tracepoint_action_send): New.
4485 (agent_expr_send, x_tracepoint_action_send): New.
4486 (l_tracepoint_action_send): New.
4487 (cmd_qtdp): Download and install tracepoint
4488 according to `use_agent'.
4489 (run_inferior_command): Add one more parameter `len'.
4490 Update callers.
4491 (tracepoint_send_agent): New.
4492 (cmd_qtdp, cmd_qtstart): Call tracepoint_send_agent.
4493
7bc83639
YQ
44942012-04-16 Yao Qi <yao@codesourcery.com>
4495
4496 * tracepoint.c (download_tracepoints): Moved to ...
4497 (cmd_qtstart): ... here.
4498
5f18041e
YQ
44992012-04-14 Yao Qi <yao@codesourcery.com>
4500
4501 * tracepoint.c: Include inttypes.h.
4502 (struct collect_memory_action): Use sized types.
4503 (struct tracepoint): Likewise.
4504 (cmd_qtdp, stop_tracing): Update print specifiers.
4505 (cmd_qtp, response_tracepoint): Likewise.
4506 (collect_data_at_tracepoint): Likewise.
4507 (collect_data_at_step): Likewise.
4508
55a8c076
YQ
45092012-04-14 Yao Qi <yao@codesourcery.com>
4510
4511 Import gnulib module inttypes.
4512 * aclocal.m4, config.in, configure: Regenerated.
4513
dc750257
YQ
45142012-04-14 Yao Qi <yao@codesourcery.com>
4515
4516 * Makefile.in (maintainer-clean, realclean, distclean): Remove
4517 Makefile and config.status at last.
4518
0ab5faf9
YQ
45192012-04-13 Yao Qi <yao@codesourcery.com>
4520
4521 * tracepoint.c: Include stdint.h unconditionally.
4522
18f5fd81
TJB
45232012-04-13 Thiago Jung Bauermann <thiago.bauermann@linaro.org>
4524
4525 * acinclude.m4 (GDBSERVER_HAVE_THREAD_DB_TYPE): New macro based
4526 on BFD_HAVE_SYS_PROCFS_TYPE.
4527 * configure.ac: Look for lwpid_t and psaddr_t in libthread_db.h.
4528 * configure: Regenerate.
4529 * config.in: Likewise.
4530
4d47af5c
L
45312012-04-13 H.J. Lu <hongjiu.lu@intel.com>
4532
4533 * Makefile.in (clean): Also remove x32.c x32-linux.c
4534 x32-avx.c x32-avx-linux.c.
4535 (x32.o): New target.
4536 (x32.c): Likewise.
4537 (x32-linux.o): Likewise.
4538 (x32-linux.c): Likewise.
4539 (x32-avx.o): Likewise.
4540 (x32-avx.c): Likewise.
4541 (x32-avx-linux.o): Likewise.
4542 (x32-avx-linux.c): Likewise.
4543
4544 * configure.srv (srv_amd64_regobj): Add x32.o x32-avx.o.
4545 (srv_amd64_linux_regobj): Add x32-linux.o x32-avx-linux.o.
4546 (srv_i386_64bit_xmlfiles): Add i386/x32-core.xml.
4547 (srv_amd64_xmlfiles): Add i386/x32.xml i386/x32-avx.xml.
4548 (srv_amd64_linux_xmlfiles): Add i386/x32-linux.xml
4549 i386/x32-avx-linux.xml.
4550
4551 * linux-x86-low.c (init_registers_x32_linux): New prototype.
4552 (init_registers_x32_avx_linux): Likwise.
4553 (x86_linux_update_xmltarget): Call init_registers_x32_linux
4554 or init_registers_x32_avx_linux if linux_is_elf64 is false.
4555
ecedbe58
PA
45562012-04-13 Pedro Alves <palves@redhat.com>
4557
4558 * Makefile.in (GNULIB_FLAGS_TO_PASS): New.
4559 (FLAGS_TO_PASS): Don't change or set $top_srcdir, $srcdir and VPATH.
4560 (all, uninstall, clean-info, all-lib, clean, maintainer-clean)
4561 (realclean, distclean): Explicitly pass $GNULIB_FLAGS_TO_PASS to
4562 the sub-make.
4563
c92b5177
L
45642012-04-12 H.J. Lu <hongjiu.lu@intel.com>
4565
4566 * linux-x86-low.c (compat_x32_clock_t): New.
4567 (compat_x32_siginfo_t): Likewise.
4568 (compat_x32_siginfo_from_siginfo): Likewise.
4569 (siginfo_from_compat_x32_siginfo): Likewise.
4570 (linux_is_elf64): Likewise.
4571 (x86_siginfo_fixup): Call compat_x32_siginfo_from_siginfo
4572 and siginfo_from_compat_x32_siginfo for x32.
4573 (x86_arch_setup): Set linux_is_elf64.
4574
214d508e
L
45752012-04-12 H.J. Lu <hongjiu.lu@intel.com>
4576
4577 PR gdb/13969
4578 * linux-low.c (linux_pid_exe_is_elf_64_file): Also return the
4579 e_machine field.
4580 (linux_qxfer_libraries_svr4): Update call to elf_64_file_p.
4581 * linux-low.h (linux_pid_exe_is_elf_64_file): Updated.
4582 * linux-x86-low.c (x86_arch_setup): Check if GDBserver is
4583 compatible with process.
4584
c9a1864a
YQ
45852012-04-12 Yao Qi <yao@codesourcery.com>
4586
4587 * Makefile.in: Define abs_top_srcdir and abs_srcdir.
4588 (INCLUDE_CFLAGS): Append GNULIB_INCLUDE_DIR.
4589 (install-only, install-info, clean): Handle sub dir gnulib.
4590 (all-lib, am--refresh): New targets.
4591 (memmem.o): Remove target.
4592 * configure.ac: Remove AC_CONFIG_LIBOBJ_DIR.
4593 Invoke gl_EARLY. Invoke AC_CHECK_PROGS for make.
4594 (AC_REPLACE_FUNCS): Remove memmem.
4595 Invoke gl_INIT and AM_INIT_AUTOMAKE.
4596 (AC_OUTPUT): Generate Makefile in gnulib/.
4597 * aclocal.m4, config.in, configure: Regenerated.
4598
367ba2c2
MR
45992012-04-10 Maciej W. Rozycki <macro@codesourcery.com>
4600
4601 * linux-low.c (get_r_debug): Handle DT_MIPS_RLD_MAP.
4602
9d236627
PA
46032012-04-05 Pedro Alves <palves@redhat.com>
4604
4605 -Werror=strict-aliasing
4606
4607 * spu-low.c (parse_spufs_run): Avoid dereferencing type-punned
4608 pointer.
4609
111217b3
PA
46102012-04-04 Pedro Alves <palves@redhat.com>
4611
4612 * linux-sparc-low.c (sparc_fill_gregset_to_stack)
4613 (sparc_store_gregset_from_stack, sparc_store_gregset)
4614 (sparc_breakpoint_at): Fix formatting.
4615
8365dcf5
TJB
46162012-03-30 Thiago Jung Bauermann <thiago.bauermann@linaro.org>
4617
4618 * configure.ac: Check whether Elf32_auxv_t and Elf64_auxv_t
4619 are available.
4620 * linux-low.c [HAVE_ELF32_AUXV_T] (Elf32_auxv_t): Add typedef.
4621 [HAVE_ELF64_AUXV_T] (Elf64_auxv_t): Likewise.
4622 * config.in: Regenerate.
4623 * configure: Likewise.
4624
689cc2ae
PA
46252012-03-29 Pedro Alves <palves@redhat.com>
4626
4627 * linux-low.c (regsets_store_inferior_registers) [__sparc__]:
4628 Correct ptrace arguments.
4629
c14dfd32
PA
46302012-03-28 Pedro Alves <palves@redhat.com>
4631
4632 * linux-ia64-low.c (ia64_regmap): Map IA64_EC_REGNUM to PT_AR_EC.
4633 (IA64_GR0_REGNUM, IA64_FR0_REGNUM)
4634 (IA64_FR1_REGNUM): New defines.
4635 (ia64_fetch_register): New.
4636 (the_low_target): Install it.
4637 * linux-low.h (struct linux_target_ops) <fetch_register>: New
4638 field.
4639 * linux-low.c (linux_fetch_registers): Try the
4640 the_low_target.fetch_register hook first.
4641
4642 * linux-arm-low.c (the_low_target): Adjust.
4643 * linux-bfin-low.c (the_low_target): Adjust.
4644 * linux-cris-low.c (the_low_target): Adjust.
4645 * linux-crisv32-low.c (the_low_target): Adjust.
4646 * linux-m32r-low.c (the_low_target): Adjust.
4647 * linux-m68k-low.c (the_low_target): Adjust.
4648 * linux-mips-low.c (the_low_target): Adjust.
4649 * linux-ppc-low.c (the_low_target): Adjust.
4650 * linux-s390-low.c (the_low_target): Adjust.
4651 * linux-sh-low.c (the_low_target): Adjust.
4652 * linux-sparc-low.c (the_low_target): Adjust.
4653 * linux-tic6x-low.c (the_low_target): Adjust.
4654 * linux-x86-low.c (the_low_target): Adjust.
4655 * linux-xtensa-low.c (the_low_target): Adjust.
4656
63c88e13
PA
46572012-03-26 Pedro Alves <palves@redhat.com>
4658
4659 * server.c (handle_qxfer_libraries): Don't bail early if
4660 the_target->qxfer_libraries_svr4 is not NULL.
4661
fb723180
PA
46622012-03-26 Pedro Alves <palves@redhat.com>
4663
4664 * linux-low.c (linux_qxfer_libraries_svr4): Fix pasto in comment.
4665
0afae3cf
PA
46662012-03-23 Pedro Alves <palves@redhat.com>
4667
4668 * linux-low.c (linux_qxfer_libraries_svr4): Terminate the
4669 "library-list-svr4" element's start tag when the the DSO list is
4670 empty.
4671
485f1ee4
PA
46722012-03-23 Pedro Alves <palves@redhat.com>
4673
4674 * linux-low.c (read_one_ptr): Read the inferior's pointer through
4675 a variable whose type size is the same as the inferior's pointer
4676 size.
4677
a5362b9a
TS
46782012-03-21 Thomas Schwinge <thomas@codesourcery.com>
4679
4680 * linux-arm-low.c (arm_stopped_by_watchpoint): Use siginfo_t instead of
4681 struct siginfo.
4682 * linux-low.c (siginfo_fixup, linux_xfer_siginfo): Likewise.
4683 * linux-x86-low.c (x86_siginfo_fixup): Likewise.
4684 * linux-low.h: Include <signal.h>.
4685 (struct siginfo): Remove forward declaration.
4686 (struct linux_target_ops) <siginfo_fixup>: Use siginfo_t instead of
4687 struct siginfo.
4688
d226c142
MF
46892012-03-21 Mike Frysinger <vapier@gentoo.org>
4690
4691 * .gitignore: Ignore more files.
4692
122f36ef
PA
46932012-03-19 Pedro Alves <palves@redhat.com>
4694 Jan Kratochvil <jan.kratochvil@redhat.com>
4695
4696 * server.c (cont_thread, general_thread): Add describing comments.
4697 (start_inferior): Clear `cont_thread'.
4698 (handle_v_cont): Don't set `cont_thread' if resuming all threads
4699 of a process.
4700
fc3e5175
YQ
47012012-03-15 Yao Qi <yao@codesourcery.com>
4702
4703 * tracepoint.c (install_tracepoint): Move duplicated tracepoint
4704 handling to ...
4705 (cmd_qtdp): ... here.
4706
8d0d92cd
YQ
47072012-03-15 Yao Qi <yao@codesourcery.com>
4708
4709 * tracepoint.c (struct tracepoint_action_ops): New.
4710 (struct tracepoint_action) [!IN_PROCESS_AGENT] <ops>: New field.
4711 (m_tracepoint_action_download): New.
4712 (r_tracepoint_action_download): New.
4713 (x_tracepoint_action_download): New.
4714 (l_tracepoint_action_download): New.
4715 (add_tracepoint_action): Install `action->ops' according type.
4716 (download_tracepoint_1): Move code `download' function pointer
4717 of various tracepoint_action_ops.
4718
87b0bb13
JK
47192012-03-13 Jan Kratochvil <jan.kratochvil@redhat.com>
4720
4721 * linux-low.c (linux_attach_lwp_1): New variable buffer. Call
4722 linux_ptrace_attach_warnings.
4723
5f572dec
JK
47242012-03-13 Jan Kratochvil <jan.kratochvil@redhat.com>
4725
4726 * Makefile.in (linux-ptrace.o): New.
4727 * configure.srv (arm*-*-linux*, bfin-*-*linux*, crisv32-*-linux*)
4728 (cris-*-linux*, i[34567]86-*-linux*, ia64-*-linux*, m32r*-*-linux*)
4729 (m68*-*-linux*, m68*-*-uclinux*, mips*-*-linux*, powerpc*-*-linux*)
4730 (s390*-*-linux*, sh*-*-linux*, sparc*-*-linux*, tic6x-*-uclinux)
4731 (x86_64-*-linux*, xtensa*-*-linux*): Add linux-ptrace.o to SRV_TGTOBJ
4732 of these targets.
4733 * linux-low.c (linux_attach_lwp_1): Remove redundent else clause.
4734
f4647387
YQ
47352012-03-08 Yao Qi <yao@codesourcery.com>
4736 Pedro Alves <palves@redhat.com>
4737
4738 Fix PR server/13392.
4739 * linux-x86-low.c (amd64_install_fast_tracepoint_jump_pad): Check
4740 offset of JMP insn.
4741 * tracepoint.c (remove_tracepoint): New.
4742 (cmd_qtdp): Call remove_tracepoint when failed to install.
4743
9b224c5e
PA
47442012-03-07 Pedro Alves <palves@redhat.com>
4745
4746 * linux-low.c (get_detach_signal): New.
4747 (linux_detach_one_lwp): Get rid of a pending SIGSTOP with SIGCONT.
4748 Pass on pending signals to PTRACE_DETACH. Check the result of the
4749 ptrace call.
4750 * server.c (program_signals, program_signals_p): New.
4751 (handle_general_set): Handle QProgramSignals.
4752 * server.h (program_signals, program_signals_p): Declare.
4753
e237a7e2
JK
47542012-03-05 Pedro Alves <palves@redhat.com>
4755 Jan Kratochvil <jan.kratochvil@redhat.com>
4756
4757 * linux-low.c (get_dynamic): Don't warn when PT_PHDR isn't found.
4758 New comment why.
4759
5808517f
YQ
47602012-03-03 Yao Qi <yao@codesourcery.com>
4761
4762 * tracepoint.c (tracepoint_look_up_symbols): Update call to
4763 agent_look_up_symbols.
4764
58b4daa5
YQ
47652012-03-03 Yao Qi <yao@codesourcery.com>
4766
4767 * Makefile.in (linux-low.o): Keep dependence on agent.h.
4768 (linux-x86-low.o): Likewise.
4769 * server.h: Remove in_process_agent_loaded.
4770 * tracepoint.c (in_process_agent_loaded): Removed. Moved it
4771 common/agent.c.
4772 Update callers.
4773
8ffcbaaf
YQ
47742012-03-03 Yao Qi <yao@codesourcery.com>
4775
4776 * tracepoint.c (gdb_agent_capability): New global.
4777 (in_process_agent_loaded_ust): Renamed to
4778 `in_process_agent_supports_ust'.
4779 Update callers.
4780 (in_process_agent_supports_ust): Call agent_capability_check.
4781 (clear_installed_tracepoints): Assert that agent supports
4782 agent.
4783
d1feda86
YQ
47842012-03-03 Yao Qi <yao@codesourcery.com>
4785
4786 * linux-low.c (linux_supports_agent): New.
4787 (linux_target_ops): Initialize field `supports_agent' with
4788 linux_supports_agent.
4789 * target.h (struct target_ops) <supports_agent>: New.
4790 (target_supports_agent): New macro.
4791 * server.c (handle_general_set): Handle packet 'QAgent'.
4792 (handle_query): Send `QAgent+'.
4793 * Makefile.in (server.o): Depends on agent.h.
4794
2fa291ac
YQ
47952012-03-03 Yao Qi <yao@codesourcery.com>
4796
4797 * Makefile.in (OBS): Add agent.o.
4798 Add new rule for agent.o.
4799 Track dependence of tracepoint.c on agent.h.
4800 * tracepoint.c (run_inferior_command_1):
4801 (run_inferior_command): Call agent_run_command.
4802 (gdb_ust_connect_sync_socket): Deleted. Move it to
4803 common/agent.c.
4804 (resume_thread, stop_thread): Likewise.
4805 (gdb_ust_socket_init): Renamed to ...
4806 (gdb_agent_socket_init): ... New.
4807 (gdb_ust_thread): Renamed to ...
4808 (gdb_agent_helper_thread): ... New.
4809 (gdb_ust_init): Move some code to ...
4810 (gdb_agent_init): ... here. New.
4811 [HAVE_UST]: Call gdb_ust_init.
4812 (initialize_tracepoint_ftlib): Call gdb_agent_init.
4813 * configure.ac: Add `sys/un.h' to AC_CHECK_HEADERS.
4814 * config.in, configure: Regenerated.
4815
05044653
PA
48162012-03-02 Pedro Alves <palves@redhat.com>
4817
4818 * inferiors.c (add_pid_to_list, pull_pid_from_list): Delete.
4819 * linux-low.c (struct simple_pid_list): New.
4820 (stopped_pids): New a struct simple_pid_list pointer.
4821 (add_to_pid_list, pull_pid_from_list): New.
4822 (handle_extended_wait): Don't assume the first signal new children
4823 report is SIGSTOP. Adjust call to pull_pid_from_list.
4824 (linux_wait_for_lwp): Adjust.
4825
8d00225b
YQ
48262012-03-02 Yao Qi <yao@codesourcery.com>
4827
4828 * tracepoint.c (do_action_at_tracepoint): Write `stop_pc' in
4829 debug log.
4830
19560ba5
YQ
48312012-03-02 Yao Qi <yao@codesourcery.com>
4832
4833 * tracepoint.c (collect_ust_data_at_tracepoint): Remove parameters
4834 `stop_pc' and `tpoint'. Update caller.
4835
1faeff08
MR
48362012-03-01 Maciej W. Rozycki <macro@codesourcery.com>
4837
4838 * linux-low.h (linux_target_ops): Add regset_bitmap member.
4839 * linux-low.c (use_linux_regsets): New macro.
4840 [!HAVE_LINUX_REGSETS] (regsets_fetch_inferior_registers): Likewise.
4841 [!HAVE_LINUX_REGSETS] (regsets_store_inferior_registers): Likewise.
4842 (linux_register_in_regsets): New function.
4843 (usr_fetch_inferior_registers): Skip registers covered by
4844 regsets.
4845 (usr_store_inferior_registers): Likewise.
4846 (usr_fetch_inferior_registers): New macro.
4847 (usr_store_inferior_registers): Likewise.
4848 (linux_fetch_registers): Handle mixed regset/non-regset targets.
4849 (linux_store_registers): Likewise.
4850 * linux-mips-low.c (init_registers_mips_dsp_linux): New
4851 prototype.
4852 (init_registers_mips64_dsp_linux): Likewise.
4853 (init_registers_mips_linux): New macro.
4854 (init_registers_mips_dsp_linux): Likewise.
4855 (mips_dsp_num_regs): Likewise.
4856 (DSP_BASE, DSP_CONTROL): New fallback macros.
4857 (mips_base_regs): New macro.
4858 (mips_regmap): Use it. Fix the size.
4859 (mips_dsp_regmap): New variable.
4860 (mips_dsp_regset_bitmap): Likewise.
4861 (mips_arch_setup): New function.
4862 (mips_cannot_fetch_register): Use the_low_target.regmap rather
4863 than mips_regmap.
4864 (mips_cannot_store_register): Likewise.
4865 (the_low_target): Update .arch_setup, .num_regs and .regmap
4866 initializers. Add .regset_bitmap initializer.
4867 * linux-arm-low.c (the_low_target): Add .regset_bitmap
4868 initializer.
4869 * linux-bfin-low.c (the_low_target): Likewise.
4870 * linux-cris-low.c (the_low_target): Likewise.
4871 * linux-crisv32-low.c (the_low_target): Likewise.
4872 * linux-ia64-low.c (the_low_target): Likewise.
4873 * linux-m32r-low.c (the_low_target): Likewise.
4874 * linux-m68k-low.c (the_low_target): Likewise.
4875 * linux-ppc-low.c (the_low_target): Likewise.
4876 * linux-s390-low.c (the_low_target): Likewise.
4877 * linux-sh-low.c (the_low_target): Likewise.
4878 * linux-sparc-low.c (the_low_target): Likewise.
4879 * linux-tic6x-low.c (the_low_target): Likewise.
4880 * linux-x86-low.c (the_low_target): Likewise.
4881 * linux-xtensa-low.c (the_low_target): Likewise.
4882 * configure.srv <mips*-*-linux*>: Add mips-dsp-linux.o and
4883 mips64-dsp-linux.o to srv_regobj. Add mips-dsp-linux.xml,
4884 mips64-dsp-linux.xml, mips-dsp.xml and mips64-dsp.xml to
4885 srv_xmlfiles.
4886 * Makefile.in (mips-dsp-linux.o, mips-dsp-linux.c): New targets.
4887 (mips64-dsp-linux.o, mips64-dsp-linux.c): Likewise.
4888
c03e6ccc
YQ
48892012-02-29 Yao Qi <yao@codesourcery.com>
4890 Pedro Alves <palves@redhat.com>
4891
4892 * linux-low.c: (linux_wait_1): Call unsuspend_all_lwps when
4893 `step_over_finished' is true.
4894
644cebc9
PA
48952012-02-27 Pedro Alves <palves@redhat.com>
4896
4897 * linux-low.c (pid_is_stopped): Delete, moved to common/.
4898 (linux_attach_lwp_1): Adjust to use linux_proc_pid_is_stopped.
4899
c14d7ab2
PA
49002012-02-27 Pedro Alves <palves@redhat.com>
4901
4902 PR server/9684
4903 * linux-low.c (pid_is_stopped): New.
4904 (linux_attach_lwp_1): Handle attaching to 'T (stopped)' processes.
4905
412c89dd
LM
49062012-02-25 Luis Machado <lgustavo@codesourcery.com>
4907
4908 * mem-break.c (clear_gdb_breakpoint_conditions): Fix de-allocation
4909 of conditions.
4910
b745defe
MR
49112012-02-24 Maciej W. Rozycki <macro@codesourcery.com>
4912
4913 * linux-mips-low.c (mips_regmap): Correct the index of $f9.
4914
9f3a5c85
LM
49152012-02-24 Luis Machado <lgustavo@codesourcery>
4916
4917 * server.c (handle_query): Advertise support for target-side
4918 breakpoint condition evaluation.
4919 (process_point_options): New function.
4920 (process_serial_event): When inserting a breakpoint, check for
4921 a target-side condition that should be evaluated.
4922
4923 * mem-break.c: Include regcache.h and ax.h.
4924 (point_cond_list_t): New data structure.
4925 (breakpoint) <cond_list>: New field.
4926 (find_gdb_breakpoint_at): Make non-static.
4927 (delete_gdb_breakpoint_at): Clear any target-side
4928 conditions.
4929 (clear_gdb_breakpoint_conditions): New function.
4930 (add_condition_to_breakpoint): Likewise.
4931 (add_breakpoint_condition): Likewise.
4932 (gdb_condition_true_at_breakpoint): Likewise.
4933 (gdb_breakpoint_here): Return result directly instead
4934 of going through a local variable.
4935
4936 * mem-break.h (find_gdb_breakpoint_at): New prototype.
4937 (clear_gdb_breakpoint_conditions): Likewise.
4938 (add_breakpoint_condition): Likewise.
4939 (gdb_condition_true_at_breakpoint): Likewise.
4940
4941 * linux-low.c (linux_wait_1): Evaluate target-side breakpoint condition.
4942 (need_step_over_p): Take target-side breakpoint condition into
4943 consideration.
4944
5e1dc496
LM
49452012-02-24 Luis Machado <lgustavo@codesourcery>
4946
4947 * server.h: Include tracepoint.h.
4948 (agent_mem_read, agent_get_trace_state_variable_value,
4949 agent_set_trace_state_variable_value,
4950 agent_tsv_read, agent_mem_read_string, get_get_tsv_func_addr,
4951 get_set_tsv_func_addr): New prototypes.
4952
4953 * ax.h: New include file.
4954 * ax.c: New source file.
4955
4956 * tracepoint.c: Include ax.h.
4957 (gdb_agent_op, gdb_agent_op_names, gdb_agent_op_sizes,
4958 agent_expr, eval_result_type): Move to ax.h.
4959 (parse_agent_expr): Rename to ...
4960 (gdb_parse_agent_expr): ... this, make it non-static and move
4961 to ax.h.
4962 (unparse_agent_expr) Rename to ...
4963 (gdb_unparse_agent_expr): ... this, make it non-static and move
4964 to ax.h.
4965 (eval_agent_expr): Rename to ...
4966 (eval_tracepoint_agent_expr): ... this.
4967 (agent_mem_read, agent_mem_read_string, agent_tsv_read): Remove
4968 forward declarations.
4969 (add_tracepoint_action): Call gdb_parse_agent_expr (...).
4970 (agent_get_trace_state_variable_value): New function.
4971 (agent_set_trace_state_variable_value): New function.
4972 (cmd_qtdp): Call gdb_parse_agent_expr (...).
4973 (response_tracepoint): Call gdb_unparse_agent_expr (...).
4974 (do_action_at_tracepoint): Call eval_tracepoint_agent_expr (...).
4975 (condition_true_at_tracepoint): Likewise.
4976 (parse_agent_expr): Rename to ...
4977 (gdb_parse_agent_expr): ... this and move to ax.c.
4978 (unparse_agent_expr): Rename to ...
4979 (gdb_unparse_agent_expr): ... this and move to ax.c.
4980 (gdb_agent_op_name): Move to ax.c.
4981 (eval_agent_expr): Rename to ...
4982 (gdb_eval_agent_expr): ... this, use regcache passed as parameter
4983 and move to ax.c.
4984 (eval_tracepoint_agent_expr): New function.
4985 (agent_mem_read, agent_mem_read_string, agent_tsv_read): Make
43aaf8b6 4986 non-static.
5e1dc496
LM
4987 (current_insn_ptr, emit_error, struct bytecode_address): Move to
4988 ax.c.
4989 (emit_prologue, emit_epilogue, emit_add, emit_sub, emit_mul, emit_lsh,
4990 emit_rsh_signed, emit_rsh_unsigned, emit_ext, emit_log_not,
4991 emit_bit_and, emit_bit_or, emit_bit_xor, emit_bit_not, emit_equal,
4992 emit_less_signed, emit_less_unsigned, emit_ref, emit_if_goto,
4993 emit_goto, write_goto_address, emit_const, emit_reg, emit_pop,
4994 emit_stack, emit_zero_ext, emit_swap, emit_stack_adjust,
4995 emit_int_call_1, emit_void_call_2, emit_eq_goto, emit_ne_goto,
4996 emit_lt_goto, emit_ge_goto, emit_gt_goto, emit_le_goto): Move to ax.c.
4997 (get_get_tsv_func_addr, get_set_tsv_func_addr): New functions.
4998 (compile_bytecodes): Remove forward declaration.
4999 (is_goto_target): Move to ax.c.
5000 (compile_bytecodes): Move to ax.c and call
5001 agent_get_trace_state_variable_value (...) and
5002 agent_set_trace_state_variable_value (...).
5003
5004 * Makefile.in: Update ax.c and IPA dependencies.
5005
277e4e52
PA
50062012-02-24 Pedro Alves <palves@redhat.com>
5007
5008 * tracepoint.c (cmd_bigqtbuffer): Rename as ...
5009 (cmd_bigqtbuffer_circular): ... this. Only handle
5010 'QTBuffer:circular:'.
5011 (handle_tracepoint_general_set): Adjust.
5012
bf4c19f7
YQ
50132012-02-16 Yao Qi <yao@codesourcery.com>
5014
5015 * inferiors.c: Move code to ...
5016 * dll.c: .... here. New.
5017 * server.h: Declare clear_dlls.
5018 * Makefile.in (SFILES): Add dll.c.
5019 (OBS): Add dll.o
5020 (dll.o): New rule.
5021
d73f2619
YQ
50222012-02-11 Yao Qi <yao@codesourcery.com>
5023
5024 * server.c: (handle_monitor_command): Add a new parameter
5025 `own_buf'.
5026 (handle_query): Update caller.
5027
f8255c2a
JB
50282012-02-09 Joel Brobecker <brobecker@adacore.com>
5029
5030 * configure.ac: Add readlink to AC_CHECK_FUNCS list.
5031 * configure, config.in: Regenerate.
5032 * hostio.c: Provide an alternate implementation if HAVE_READLINK
5033 is not defined.
5034
da84f473
PA
50352012-02-02 Pedro Alves <palves@redhat.com>
5036
5037 Try SIGKILL first, then PTRACE_KILL.
5038 * linux-low.c (linux_kill_one_lwp): New.
5039 (linux_kill_one_lwp): Rename to ...
5040 (kill_one_lwp_callback): ... this. Use the new
5041 linux_kill_one_lwp.
5042
e886a173
PA
50432012-02-02 Pedro Alves <palves@redhat.com>
5044
5045 * tracepoint.c (cmd_qtminftpilen): Return 0 if there's no current
5046 inferior.
5047
be07f1a2
PA
50482012-01-27 Pedro Alves <palves@redhat.com>
5049
5050 * linux-low.c (linux_child_pid_to_exec_file): Delete.
5051 (elf_64_file_p): Make static.
5052 (linux_pid_exe_is_elf_64_file): New.
5053 * linux-low.h (linux_child_pid_to_exec_file, elf_64_file_p):
5054 Delete declarations.
5055 (linux_pid_exe_is_elf_64_file): Declare.
5056 * linux-x86-low.c (x86_arch_setup): Use
5057 linux_pid_exe_is_elf_64_file.
5058
d8301ad1
JK
50592012-01-25 Jan Kratochvil <jan.kratochvil@redhat.com>
5060
5061 * linux-low.c (linux_wait_for_event_1): Rename to ...
5062 (linux_wait_for_event): ... here and merge it with former
5063 linux_wait_for_event - new variable wait_ptid, use it.
5064 (linux_wait_for_event): Remove - merge it to linux_wait_for_event_1.
5065
01b17894
PA
50662012-01-23 Pedro Alves <palves@redhat.com>
5067
5068 * server.c (main): Avoid yet another case of infinite loop while
5069 detaching/killing after a longjmp.
5070
e825046f
JK
50712012-01-20 Jan Kratochvil <jan.kratochvil@redhat.com>
5072
5073 Code cleanup.
5074 * linux-low.c (linux_wait_for_event_1): Use ptid_is_pid.
5075
b9e7b9c3
UW
50762012-01-20 Ulrich Weigand <ulrich.weigand@linaro.org>
5077
5078 * hostio.c (handle_readlink): New function.
5079 (handle_vFile): Call it to handle "vFile:readlink" packets.
5080
901f9912
UW
50812012-01-20 Pedro Alves <palves@redhat.com>
5082 Ulrich Weigand <ulrich.weigand@linaro.org>
5083
5084 * server.c (handle_v_requests): Only support vAttach and vRun to
5085 start multiple processes when in extended protocol mode.
5086
fc1ab1a0
PA
50872012-01-17 Pedro Alves <palves@redhat.com>
5088
5089 * tracepoint.c (initialize_tracepoint): Use mmap instead of
5090 memalign plus mprotect to allocate the scratch buffer.
5091
7d5d4e98
PA
50922012-01-13 Pedro Alves <palves@redhat.com>
5093
5094 * server.c (attach_inferior): Clear `cont_thread'.
5095
f128d5e9
PA
50962012-01-13 Pedro Alves <palves@redhat.com>
5097
5098 * server.c (main): Avoid infinite loop while detaching/killing
5099 after a longjmp.
5100
06db92f0
DE
51012012-01-09 Doug Evans <dje@google.com>
5102
5103 * server.c (start_inferior): Set last_ptid in --wrapper case.
5104
32d92999
YQ
51052012-01-06 Yao Qi <yao@codesourcery.com>
5106
5107 * tracepoint.c [IN_PROCESS_AGENT] (debug_threads): Macro
5108 defined.
5109 [IN_PROCESS_AGENT] (debug_agent): New global variable.
5110
5e0a92a9
YQ
51112012-01-04 Yao Qi <yao@codesourcery.com>
5112
5113 * tracepoint.c (cmd_qtdp): Print debug message
5114 for static tracepoint.
5115
ae639e8c
YQ
51162012-01-04 Yao Qi <yao@codesourcery.com>
5117
5118 * tracepoint.c (trace_vdebug): Differentiate debug message
5119 between gdbserver and IPA.
5120
f72429c5
YQ
51212012-01-03 Yao Qi <yao@codesourcery.com>
5122
5123 * tracepoint.c (tracepoint_was_hit): Don't collect for
5124 static tracepoint.
5125
12c3e59c
JB
51262012-01-02 Joel Brobecker <brobecker@adacore.com>
5127
5128 * terminal.h: Reformat copyright header.
5129
67827812
JB
51302012-01-02 Joel Brobecker <brobecker@adacore.com>
5131
5132 * server.c (gdbserver_version): Update copyright year.
5133 * gdbreplay.c (gdbreplay_version): Likewise.
5134
3e52c33d
JK
51352011-12-18 Jan Kratochvil <jan.kratochvil@redhat.com>
5136
5137 * linux-low.c (linux_create_inferior): Put empty if clause for write.
5138
5139 Revert:
5140 2011-12-18 Hui Zhu <teawater@gmail.com>
5141 * linux-low.c (linux_create_inferior): Save return value to ret.
5142
66f1260e
HZ
51432011-12-18 Hui Zhu <teawater@gmail.com>
5144
5145 * linux-low.c (linux_create_inferior): Save return value to ret.
5146
e77616d7
DE
51472011-12-16 Doug Evans <dje@google.com>
5148
e7b06c57
DE
5149 * linux-low.c (linux_create_inferior): If stdio connection,
5150 redirect stdin from /dev/null, stdout to stderr.
5151 * remote-utils.c (remote_is_stdio): New static global.
5152 (remote_connection_is_stdio): New function.
5153 (remote_prepare): Handle stdio connection.
5154 (remote_open): Ditto.
5155 (remote_close): Don't close stdin for stdio connections.
5156 (read_prim,write_prim): New functions. Replace all calls to
5157 read/write to these.
5158 * server.c (main): Watch for "-" argument. Move call to
5159 remote_prepare before start_inferior.
5160 * server.h (STDIO_CONNECTION_NAME): New macro.
5161 (remote_connection_is_stdio): Declare.
5162
e77616d7
DE
5163 * remote-utils.c (prepare_resume_reply): Remove extraneous \n
5164 in debugging output.
5165
82067193
YQ
51662011-12-15 Yao Qi <yao@codesourcery.com>
5167
5168 * tracepoint.c: Include sys/syscall.h.
5169 (gdb_ust_thread): Remove preprocessor conditional.
5170
82bfbe7e
PA
51712011-12-14 Pedro Alves <pedro@codesourcery.com>
5172
5173 * linux-low.c (linux_detach_one_lwp): Call
5174 the_low_target.prepare_to_resume before detaching.
5175
712c6575
YQ
51762011-12-14 Yao Qi <yao@codesourcery.com>
5177
5178 * tracepoint.c (gdb_ust_thread): Don't ignore return value
5179 of write.
5180
d54d1edf
YQ
51812011-12-14 Yao Qi <yao@codesourcery.com>
5182
5183 * i386-low.c (i386_low_stopped_data_address): Initialize local
5184 variable `control'.
5185
6210a125
PA
51862011-12-13 Pedro Alves <pedro@codesourcery.com>
5187
5188 PR remote/13492
5189
5190 * i386-low.c (i386_low_stopped_data_address): Avoid fetching
5191 DR_CONTROL unless necessary. Extend comments.
5192 * linux-x86-low.c (x86_linux_prepare_to_resume): Don't write to
5193 DR0-3 if not used. If any watchpoint was set, clear DR_STATUS.
5194
2ece8244
YQ
51952011-12-13 Yao Qi <yao@codesourcery.com>
5196
5197 * tracepoint.c (trace_buffer_alloc): Replace magic numbers with
5198 macros.
5199 (upload_fast_traceframes, upload_fast_traceframes): Likewise.
5200
784867a5
JK
52012011-12-08 Jan Kratochvil <jan.kratochvil@redhat.com>
5202
5203 * linux-low.c (linux_kill): Skip PTRACE_KILL if LWP does not exist.
5204 Print new debug message for such case.
5205
6bf36717
JK
52062011-12-06 Jan Kratochvil <jan.kratochvil@redhat.com>
5207
5208 Fix overlapping memcpy.
5209 * mem-break.c (set_raw_breakpoint_at): New variable buf. Use it for
5210 the read_inferior_memory transfer.
5211 (delete_fast_tracepoint_jump): New variable buf. Use it for the
5212 write_inferior_memory transfer.
5213 (set_fast_tracepoint_jump): New variable buf. Use it for the
5214 read_inferior_memory and write_inferior_memory transfers.
5215 (uninsert_fast_tracepoint_jumps_at, reinsert_fast_tracepoint_jumps_at)
5216 (delete_raw_breakpoint, uninsert_raw_breakpoint): New variable buf.
5217 Use it for the write_inferior_memory transfer.
5218 (check_mem_read, check_mem_write): New gdb_asserts for overlapping
5219 buffers.
5220
50275556
MR
52212011-12-06 Maciej W. Rozycki <macro@codesourcery.com>
5222
5223 * linux-low.c (fetch_register, store_register): Make code
5224 consistent, fix formatting.
5225
7325beb4
MR
52262011-12-06 Maciej W. Rozycki <macro@codesourcery.com>
5227
5228 * linux-low.c (usr_store_inferior_registers): Factor out code
5229 to handle individual registers into...
5230 (store_register): ... this new function.
5231
c642a434
UW
52322011-12-06 Ulrich Weigand <uweigand@de.ibm.com>
5233
5234 * Makefile.in (s390-linux32v1.o, s390-linux32v1.c): New rules.
5235 (s390-linux32v2.o, s390-linux32v2.c): Likewise.
5236 (s390-linux64v1.o, s390-linux64v1.c): Likewise.
5237 (s390-linux64v2.o, s390-linux64v2.c): Likewise.
5238 (s390x-linux64v1.o, s390x-linux64v1.c): Likewise.
5239 (s390x-linux64v2.o, s390x-linux64v2.c): Likewise.
5240 * configure.srv [s390*-*-linux*] (srv_regobj): Add new objects.
5241 (srv_xmlfiles): Add new XML files.
5242
5243 * linux-s390-low.c: Include "elf/common.h", <sys/ptrace.h>,
5244 and <sys/uio.h>.
5245 (PTRACE_GETREGSET, PTRACE_SETREGSET): Define if undefined.
5246 (init_registers_s390_linux32v1): Add prototype.
5247 (init_registers_s390_linux32v2): Likewise.
5248 (init_registers_s390_linux64v1): Likewise.
5249 (init_registers_s390_linux64v2): Likewise.
5250 (init_registers_s390x_linux64v1): Likewise.
5251 (init_registers_s390x_linux64v2): Likewise.
5252 (s390_num_regs): Increment to 52.
5253 (s390_regmap): Add orig_r2 register.
5254 (s390_num_regs_3264): Increment to 68.
5255 (s390_regmap_3264): Add orig_r2 register.
5256 (s390_collect_ptrace_register): Handle orig_r2 register.
5257 (s390_supply_ptrace_register): Likewise.
5258 (s390_fill_last_break): New function.
5259 (s390_store_last_break): Likewise.
5260 (s390_fill_system_call): New function.
5261 (s390_store_system_call): Likewise.
5262 (target_regsets): Handle NT_S390_LAST_BREAK and NT_S390_SYSTEM_CALL
5263 register sets.
5264 (s390_check_regset): New function.
5265 (s390_arch_setup): Check for presence of NT_S390_LAST_BREAK and
5266 NT_S390_SYSTEM_CALL regsets and use appropriate description.
5267 Update target_regsets for available register sets.
5268
2268b414
JK
52692011-12-02 Paul Pluzhnikov <ppluzhnikov@google.com>
5270 Jan Kratochvil <jan.kratochvil@redhat.com>
5271
5272 * linux-low.c (get_phdr_phnum_from_proc_auxv, get_dynamic, get_r_debug)
5273 (read_one_ptr, struct link_map_offsets, linux_qxfer_libraries_svr4):
5274 New.
5275 (struct linux_target_ops): Install linux_qxfer_libraries_svr4.
5276 * linux-low.h (struct process_info_private): New member r_debug.
5277 * server.c (handle_qxfer_libraries): Call
5278 the_target->qxfer_libraries_svr4.
5279 (handle_qxfer_libraries_svr4): New function.
5280 (qxfer_packets): New entry "libraries-svr4".
5281 (handle_query): Check QXFER_LIBRARIES_SVR4 and report libraries-svr4.
5282 * target.h (struct target_ops): New member qxfer_libraries_svr4.
5283 * remote.c (remote_xfer_partial): Call add_packet_config_cmd for
5284 PACKET_qXfer_libraries_svr4.
5285
d6db1fab
UW
52862011-11-30 Ulrich Weigand <uweigand@de.ibm.com>
5287
5288 * linux-s390-low.c (s390_collect_ptrace_register): Fully convert
5289 PSW address/mask between 8-byte and 16-byte formats.
5290 (s390_supply_ptrace_register): Likewise.
5291 (s390_get_pc, s390_set_pc): 4-byte PSW address always includes
5292 basic addressing mode bit.
5293
242f5f1c
SS
52942011-11-24 Stan Shebs <stan@codesourcery.com>
5295
5296 * tracepoint.c (cmd_qtstatus): Use plongest instead of %llx.
5297
f196051f
SS
52982011-11-17 Stan Shebs <stan@codesourcery.com>
5299
5300 * tracepoint.c (struct tracepoint): New field traceframe_usage.
5301 (tracing_start_time): New global.
5302 (tracing_stop_time): New global.
5303 (tracing_user_name): New global.
5304 (tracing_notes): New global.
5305 (tracing_stop_note): New global.
5306 (cmd_qtstart): Set traceframe_usage, start_time.
5307 (stop_tracing): Set stop_time.
5308 (cmd_qtstatus): Report additional status.
5309 (cmd_qtp): New function.
5310 (handle_tracepoint_query): Call it.
5311 (cmd_qtnotes): New function.
5312 (handle_tracepoint_general_set): Call it.
5313 (get_timestamp): Rename from tsv_get_timestamp.
5314
405f8e94
SS
53152011-11-14 Stan Shebs <stan@codesourcery.com>
5316 Kwok Cheung Yeung <kcy@codesourcery.com>
5317
5318 * linux-x86-low.c (small_jump_insn): New.
5319 (i386_install_fast_tracepoint_jump_pad): Add arguments for
5320 trampoline and error message, build a trampoline and issue a small
5321 jump instruction to it.
5322 (x86_install_fast_tracepoint_jump_pad): Add arguments for
5323 trampoline and error message.
5324 (x86_get_min_fast_tracepoint_insn_len): New.
5325 (the_low_target): Add call to x86_get_min_fast_tracepoint_insn_len.
5326 * linux-low.h (struct linux_target_ops): Add arguments to
5327 install_fast_tracepoint_jump_pad operation, add new operation.
5328 * linux-low.c (linux_install_fast_tracepoint_jump_pad): Add
5329 arguments.
5330 (linux_get_min_fast_tracepoint_insn_len): New function.
5331 (linux_target_op): Add new operation.
5332 * tracepoint.c (gdb_trampoline_buffer): New IPA variable.
5333 (gdb_trampoline_buffer_end): Ditto.
5334 (gdb_trampoline_buffer_error): Ditto.
5335 (struct ipa_sym_addresses): Add fields for new IPA variables.
5336 (symbol_list): Add entries for new IPA variables.
5337 (struct tracepoint): Add fields to hold the address range of the
5338 trampoline used by the tracepoint.
5339 (trampoline_buffer_head): New static variable.
5340 (trampoline_buffer_tail): Ditto.
5341 (claim_trampoline_space): New function.
5342 (have_fast_tracepoint_trampoline_buffer): New function.
5343 (clone_fast_tracepoint): Fill in trampoline fields of tracepoint
5344 structure.
5345 (install_fast_tracepoint): Ditto, also add error buffer argument.
5346 (cmd_qtminftpilen): New function.
5347 (handle_tracepoint_query): Add response to qTMinFTPILen packet.
5348 (fast_tracepoint_from_trampoline_address): New function.
5349 (fast_tracepoint_collecting): Handle trampoline as part of jump
5350 pad space.
5351 (set_trampoline_buffer_space): New function.
5352 (initialize_tracepoint): Initialize new IPA variables.
5353 * target.h (struct target_ops): Add arguments to
5354 install_fast_tracepoint_jump_pad operation, add new
5355 get_min_fast_tracepoint_insn_len operation.
5356 (target_get_min_fast_tracepoint_insn_len): New.
5357 (install_fast_tracepoint_jump_pad): Add arguments.
5358 * server.h (IPA_BUFSIZ): Define.
5359 * linux-i386-ipa.c: Include extra header files.
5360 (initialize_fast_tracepoint_trampoline_buffer): New function.
5361 (initialize_low_tracepoint): Call it.
5362 * server.h (set_trampoline_buffer_space): Declare.
5363 (claim_trampoline_space): Ditto.
5364 (have_fast_tracepoint_trampoline_buffer): Ditto.
5365
1e4d1764
YQ
53662011-11-14 Yao Qi <yao@codesourcery.com>
5367
5368 * server.c (handle_query): Handle InstallInTrace for qSupported.
5369 * tracepoint.c (add_tracepoint): Sort list.
5370 (install_tracepoint, download_tracepoint): New.
5371 (cmd_qtdp): Call them to install and download tracepoints.
5372 (sort_tracepoints): Removed.
5373 (cmd_qtstart): Update.
5374
5c73ff4e
YQ
53752011-11-14 Yao Qi <yao@codesourcery.com>
5376
5377 * mem-break.c (inc_ref_fast_tracepoint_jump): New.
5378 * mem-break.h: Declare.
5379 * tracepoint.c (cmd_qtstart): Move some code to ...
5380 (clone_fast_tracepoint, install_fast_tracepoint): ... here.
5381 New.
5382 (download_tracepoints): Move some code to ...
5383 (download_tracepoint_1): ... here. New.
5384
86a30030
YQ
53852011-11-08 Yao Qi <yao@codesourcery.com>
5386
5387 * remote-utils.c (relocate_instruction): A comment fix.
5388
8d26e50c
JB
53892011-11-07 Joel Brobecker <brobecker@adacore.com>
5390
5391 * win32-i386-low.c (dr_status_mirror, dr_control_mirror): Delete.
5392 (i386_dr_low_get_control, i386_dr_low_get_status): Use
5393 dr_status_mirror and dr_control_mirror from debug_reg_state.
5394 (i386_dr_low_get_status): Use debug_reg_state.dr_status_mirror
5395 (i386_initial_stuff): Remove use of deleted globals.
5396 (i386_get_thread_context, i386_set_thread_context,
5397 i386_thread_added): Use dr_status_mirror and dr_control_mirror
5398 from debug_reg_state.
5399
a59306a3
YQ
54002011-11-05 Yao Qi <yao@codesourcery.com>
5401
5402 * tracepoint.c (gdb_collect): Loop over tracepoints of same
5403 address as TPOINT's.
5404
3065dfb6
SS
54052011-11-02 Stan Shebs <stan@codesourcery.com>
5406
5407 * tracepoint.c (agent_mem_read_string): New function.
5408 (eval_agent_expr): Call it for tracenz.
5409 * server.c (handle_query): Report support for tracenz.
5410
fd0d8c7c
YQ
54112011-11-02 Yao Qi <yao@codesourcery.com>
5412
5413 * tracepoint.c (cmd_qtstart): Remove unused local variables.
5414
609086b1
YQ
54152011-11-02 Yao Qi <yao@codesourcery.com>
5416
5417 * target.h: Fix a typo in comment.
5418
b9fd1791
PA
54192011-10-31 Pedro Alves <pedro@codesourcery.com>
5420
5421 * mem-break.c (check_mem_write): Add `myaddr' parameter. Don't
5422 clobber the breakpoints' shadows with fast tracepoint jumps.
5423 * mem-break.h (check_mem_write): Add `myaddr' parameter.
5424 * target.c (write_inferior_memory): Also pass MYADDR down to
5425 check_mem_write.
5426
03583c20
UW
54272011-10-07 Ulrich Weigand <ulrich.weigand@linaro.org>
5428
5429 * configure.ac: Check support for personality routine.
5430 * configure: Regenerate.
5431 * config.in: Likewise.
5432 * linux-low.c: Include <sys/personality.h>.
5433 Define ADDR_NO_RANDOMIZE if necessary.
5434 (linux_create_inferior): Disable address space randomization when
5435 forking inferior, if requested.
5436 (linux_supports_disable_randomization): New function.
5437 (linux_target_ops): Install it.
5438 * server.h (disable_randomization): Declare.
5439 * server.c (disable_randomization): New global variable.
5440 (handle_general_set): Handle QDisableRandomization.
5441 (handle_query): Likewise for qSupported.
5442 (main): Support --disable-randomization and --no-disable-randomization
5443 command line arguments.
5444 * target.h (struct target_ops): Add supports_disable_randomization.
5445 (target_supports_disable_randomization): New macro.
5446
723b724b
MF
54472011-09-29 Mike Frysinger <vapier@gentoo.org>
5448
5449 * linux-low.c (target_loadseg): Add defined PTRACE_GETFDPIC to the
5450 ifdef check.
5451 [PT_GETDSBT] (target_loadmap): Wrap in a defined PT_GETDSBT check.
5452 [!PT_GETDSBT] (target_loadmap): New definition.
5453 (LINUX_LOADMAP, LINUX_LOADMAP_EXEC, LINUX_LOADMAP_INTERP): Define.
5454 (linux_read_loadmap): Change PTRACE_GETDSBT_EXEC to
5455 LINUX_LOADMAP_EXEC, PTRACE_GETDSBT_INTERP to LINUX_LOADMAP_INTERP,
5456 and PT_GETDSBT to LINUX_LOADMAP.
5457 [!PT_GETDSBT] (linux_read_loadmap): Define to NULL.
5458 (linux_target_ops): Delete unnecessary ifdef PT_GETDSBT check.
5459
55329a5c 54602011-09-21 Ulrich Weigand <ulrich.weigand@linaro.org>
71487fd7
UW
5461
5462 * linux-arm-low.c (struct arm_linux_hwbp_cap): Remove.
5463 (arm_linux_hwbp_cap): New static variable.
5464 (arm_linux_get_hwbp_cap): Replace by ...
5465 (arm_linux_init_hwbp_cap): ... this new function.
5466 (arm_linux_get_hw_breakpoint_count): Use arm_linux_hwbp_cap.
5467 (arm_linux_get_hw_watchpoint_count): Likewise.
5468 (arm_linux_get_hw_watchpoint_max_length): Likewise.
5469 (arm_arch_setup): Call arm_linux_init_hwbp_cap.
5470 (arm_prepare_to_resume): Use perror_with_name instead of error.
5471
55329a5c 54722011-09-21 Ulrich Weigand <ulrich.weigand@linaro.org>
09b4ad9f
UW
5473
5474 * linux-arm-low.c: Include <signal.h>.
5475 (PTRACE_GETHBPREGS, PTRACE_SETHBPREGS): Define if necessary.
5476 (struct arm_linux_hwbp_cap): New data type.
5477 (arm_hwbp_type, arm_hwbp_control_t): New typedefs.
5478 (struct arm_linux_hw_breakpoint): New data type.
5479 (MAX_BPTS, MAX_WPTS): Define.
5480 (struct arch_process_info, struct arch_lwp_info): New data types.
5481 (arm_linux_get_hwbp_cap): New function.
5482 (arm_linux_get_hw_breakpoint_count): Likewise.
5483 (arm_linux_get_hw_watchpoint_count): Likewise.
5484 (arm_linux_get_hw_watchpoint_max_length): Likewise.
5485 (arm_hwbp_control_initialize): Likewise.
5486 (arm_hwbp_control_is_enabled): Likewise.
5487 (arm_hwbp_control_is_initialized): Likewise.
5488 (arm_hwbp_control_disable): Likewise.
5489 (arm_linux_hw_breakpoint_equal): Likewise.
5490 (arm_linux_hw_point_initialize): Likewise.
5491 (struct update_registers_data): New data structure.
5492 (update_registers_callback: New function.
5493 (arm_insert_point): Likewise.
5494 (arm_remove_point): Likewise.
5495 (arm_stopped_by_watchpoint): Likewise.
5496 (arm_stopped_data_address): Likewise.
5497 (arm_new_process): Likewise.
5498 (arm_new_thread): Likewise.
5499 (arm_prepare_to_resume): Likewise.
5500 (the_low_target): Register arm_insert_point, arm_remove_point,
5501 arm_stopped_by_watchpoint, arm_stopped_data_address, arm_new_process,
5502 arm_new_thread, and arm_prepare_to_resume.
5503
6b9801d4
SS
55042011-09-15 Stan Shebs <stan@codesourcery.com>
5505
5506 * server.h (struct emit_ops): Add compare-goto fields.
5507 * tracepoint.c (gdb_agent_op_sizes): New table.
5508 (emit_eq_goto): New function.
5509 (emit_ne_goto): New function.
5510 (emit_lt_goto): New function.
5511 (emit_le_goto): New function.
5512 (emit_gt_goto): New function.
5513 (emit_ge_goto): New function.
5514 (is_goto_target): New function.
5515 (compile_bytecodes): Recognize special cases of compare-goto
5516 combinations and call specialized emitters for them.
5517 * linux-x86-low.c (amd64_emit_eq_goto): New function.
5518 (amd64_emit_ne_goto): New function.
5519 (amd64_emit_lt_goto): New function.
5520 (amd64_emit_le_goto): New function.
5521 (amd64_emit_gt_goto): New function.
5522 (amd64_emit_ge_goto): New function.
5523 (amd64_emit_ops): Add the new functions.
5524 (i386_emit_eq_goto): New function.
5525 (i386_emit_ne_goto): New function.
5526 (i386_emit_lt_goto): New function.
5527 (i386_emit_le_goto): New function.
5528 (i386_emit_gt_goto): New function.
5529 (i386_emit_ge_goto): New function.
5530 (i386_emit_ops): Add the new functions.
5531
bf15cbda
SS
55322011-09-08 Stan Shebs <stan@codesourcery.com>
5533
5534 * linux-x86-low.c (i386_emit_prologue): Save %ebx.
5535 (i386_emit_epilogue): Restore %ebx.
5536
943ca1dd
JZ
55372011-08-31 Jie Zhang <jzhang918@gmail.com>
5538
5539 * server.c (step_thread): Remove definition.
5540 (process_serial_event): Don't handle Hs.
5541 * server.h (step_thread): Remove declaration.
5542 * target.c (set_desired_inferior): Remove use of step_thread.
5543
e3deef73
LM
55442011-08-24 Luis Machado <lgustavo@codesourcery.com>
5545
5546 * linux-low.c: Include linux-procfs.h.
5547 (linux_attach_lwp_1): Update comments.
5548 (linux_attach): Scan for existing threads when attaching to a
5549 process that is the tgid.
5550 * Makefile.in: Update dependencies.
5551
13da1c97
LM
55522011-08-24 Luis Machado <lgustavo@codesourcery.com>
5553
5554 * configure.srv: Add linux-procfs.o dependencies.
5555
881127c9
YQ
55562011-08-14 Yao Qi <yao@codesourcery.com>
5557
5558 * target.h (struct target_ops): Fix indent.
5559 * win32-low.c (win32_target_ops): Fix comment.
5560
58dbd541
YQ
55612011-08-14 Andrew Jenner <andrew@codesourcery.com>
5562 Yao Qi <yao@codesourcery.com>
5563
5564 * Makefile.in (clean): Remove tic6x-*.c files.
5565 (linux-tic6x-low.o, tic6x-c62x-linux.o, tic6x-c64x-linux.o): New rules.
5566 (tic6x-c64xp-linux.o, tic6x-c62x-linux.c, tic6x-c64x-linux.c): Likewise.
5567 (tic6x-c64xp-linux.c): Likewise.
5568 * configure.srv: Add support for tic6x-*-uclinux.
5569 * linux-tic6x-low.c: New.
5570 * linux-low.c (PT_TEXT_ADDR, PT_DATA_ADDR, PT_TEXT_END_ADDR): Define.
5571
78d85199
YQ
55722011-08-14 Andrew Stubbs <ams@codesourcery.com>
5573 Yao Qi <yao@codesourcery.com>
5574
5575 * target.h (struct target_ops): Add read_loadmap.
5576 * linux-low.c (struct target_loadseg): New type.
5577 (struct target_loadmap): New type.
5578 (linux_read_loadmap): New function.
5579 (linux_target_ops): Add linux_read_loadmap.
5580 * server.c (handle_query): Support qXfer:fdpic:read packet.
43aaf8b6
PA
5581 * win32-low.c (win32_target_ops): Initialize field `read_loadmap'
5582 to NULL.
78d85199 5583
a959a88d
EZ
55842011-08-05 Eli Zaretskii <eliz@gnu.org>
5585
5586 * win32-low.c: Include <stdint.h>.
5587
1ced966e
PA
55882011-07-22 Pedro Alves <pedro@codesourcery.com>
5589
5590 * i386-low.c (i386_insert_aligned_watchpoint): Don't pass the info
5591 to the inferior here.
5592 (i386_remove_aligned_watchpoint): Ditto.
5593 (i386_handle_nonaligned_watchpoint): Return immediate on fail to
5594 fit part of the watchpoint in the debug registers.
5595 (i386_update_inferior_debug_regs): New.
5596 (i386_low_insert_watchpoint): Work on a local mirror of the debug
5597 registers, and only update the inferior on success.
5598 (i386_low_remove_watchpoint): Ditto.
5599
d26e3629
KY
56002011-07-22 Kwok Cheung Yeung <kcy@codesourcery.com>
5601
5602 * linux-low.c (compare_ints, unique, list_threads, show_process,
5603 linux_core_of_thread): Delete.
5604 (linux_target_ops): Change linux_core_of_thread to
5605 linux_common_core_of_thread.
5606 (linux_qxfer_osdata): Defer to linux_common_xfer_osdata.
5607 * utils.c (malloc_failure): Change type of argument.
5608 (xmalloc, xrealloc, xcalloc, xsnprintf): Delete.
5609 * Makefile.in (SFILES): Add common/common-utils.c, common/xml-utils.c,
5610 common/linux-osdata.c, common/ptid.c and common/buffer.c.
5611 (OBS): Add xml-utils.o, common-utils.o, ptid.o and buffer.o.
5612 (IPA_OBJS): Add common-utils-ipa.o.
5613 (ptid_h, linux_osdata_h): New macros.
5614 (server_h): Add common/common-utils.h, common/xml-utils.h,
5615 common/buffer.h, common/gdb_assert.h, common/gdb_locale.h and
5616 common/ptid.h.
5617 (common-utils-ipa.o, common-utils.o, xml-utils.o, linux-osdata.o,
5618 ptid.o, buffer.o): New rules.
5619 (linux-low.o): Add common/linux-osdata.h as a dependency.
5620 * configure.srv (srv_tgtobj): Add linux-osdata.o to Linux targets.
5621 * configure.ac: Add AC_HEADER_DIRENT check.
5622 * config.in: Regenerate.
5623 * configure: Regenerate.
5624 * remote-utils.c (xml_escape_text): Delete.
5625 (buffer_grow, buffer_free, buffer_init, buffer_finish,
5626 buffer_xml_printf): Move to common/buffer.c.
5627 * server.c (main): Remove call to initialize_inferiors.
5628 * server.h (struct ptid, ptid_t, minus_one_ptid, null_ptid,
5629 ptid_build, pid_to_ptid, ptid_get_pid, ptid_get_lwp, ptid_get_tid,
5630 ptid_equal, ptid_is_pid, initialize_inferiors, xml_escape_text,
5631 internal_error, gdb_assert, gdb_assert_fail): Delete.
5632 (struct buffer, buffer_grow, buffer_free, buffer_init, buffer_finish,
5633 buffer_xml_printf, buffer_grow_str, buffer_grow_str0): Move to
5634 common/buffer.h.
5635 * inferiors.c (null_ptid, minus_one_ptid, ptid_build, pid_to_ptid,
5636 ptid_get_pid, ptid_get_lwp, ptid_get_tid, ptid_equal, ptid_is_pid,
5637 initialize_inferiors): Delete.
5638
2275a1a7
PA
56392011-07-20 Pedro Alves <pedro@codesourcery.com>
5640
5641 * tracepoint.c (tracepoint_look_up_symbols): Return upon the first
5642 symbol error.
5643
0a5b1e09
PA
56442011-05-31 Pedro Alves <pedro@codesourcery.com>
5645
5646 * linux-x86-low.c (i386_dr_low_get_addr): Fix off by one in
5647 assertion.
5648 * win32-i386-low.c (i386_dr_low_get_addr): Ditto.
5649
6938fd34
YQ
56502011-05-26 Yao Qi <yao@codesourcery.com>
5651
5652 * Makefile.in (thread-db.o): Track dependence to
5653 common/gdb_thread_db.h.
5654 * thread-db.c: include gdb_thread_db.h from right place.
5655
b481f9e0
TT
56562011-05-16 Adrian Cornish <gnu@bluedreamer.com>
5657
5658 * linux-i386-ipa.c (supply_static_tracepoint_registers): Pass
5659 __FILE__ and __LINE__ to internal_error.
5660
98a5dd13
DE
56612011-05-13 Doug Evans <dje@google.com>
5662
5663 * thread-db.c (try_thread_db_load_from_sdir): New function.
5664 (try_thread_db_load_from_dir): New function.
5665 (thread_db_load_search): Handle $sdir, ignore $pdir.
5666 Remove trying of system directories if search of
5667 libthread-db-search-path fails, that is now done via $sdir.
5668
d248b706
KY
56692011-05-12 Kwok Cheung Yeung <kcy@codesourcery.com>
5670
5671 * server.c (handle_query): Add EnableDisableTracepoints to the list
5672 of supported features.
43aaf8b6 5673 * tracepoint.c (clear_installed_tracepoints): Uninstall disabled
d248b706 5674 tracepoints.
43aaf8b6
PA
5675 (cmd_qtenable_disable): New.
5676 (cmd_qtstart): Install tracepoints even if disabled.
5677 (handle_tracepoint_general_set): Add call to cmd_qtenable_disable on
5678 receiving a QTEnable or QTDisable packet.
5679 (gdb_collect): Skip data collection if fast tracepoint is disabled.
5680 (ust_marker_to_static_tracepoint): Do not ignore disabled static
5681 tracepoints.
5682 (gdb_probe): Skip data collection if static tracepoint is disabled.
d248b706 5683
84e578fb
DE
56842011-05-10 Doug Evans <dje@google.com>
5685
5686 * thread-db.c (thread_db_handle_monitor_command): Handle elided path.
5687
71f55dd8
DE
56882011-05-04 Doug Evans <dje@google.com>
5689
5690 * linux-low.c (linux_join): Skip process lookup.
5691 * spu-low.c (spu_join): Ditto.
5692 * server.c (join_inferiors_callback): Delete.
5693 (process_serial_event): For 'D' packet (detach) call join_inferior
5694 directly.
5695
4d393d60
JM
56962011-05-04 Joseph Myers <joseph@codesourcery.com>
5697
5698 * README: Don't mention xscale*-*-linux*.
5699 * configure.srv (xscale*-*-linux*): Don't handle target.
5700
b00ad6ff
NF
57012011-04-27 Nathan Froyd <froydnj@codesourcery.com>
5702
5703 * linux-x86-low.c (amd64_emit_const): Call memcpy instead of
5704 casting pointers.
5705 (amd64_emit_reg, amd64_emit_int_call_1, amd64_emit_void_call_2):
5706 (i386_emit_const, i386_emit_reg, i386_emit_int_call_1):
5707 (i386_emit_void_call_2): Likewise.
5708
af96c192
YQ
57092011-04-26 Yao Qi <yao@codesourcery.com>
5710
43aaf8b6
PA
5711 * linux-low.c: Move common macros to linux-ptrace.h.
5712 Include linux-ptrace.h.
af96c192
YQ
5713 * Makefile.in (linux_ptrace_h): New.
5714 (linux-low.o): Depends on linux-ptrace.h.
5715
03f2bd59
JK
57162011-04-24 Jan Kratochvil <jan.kratochvil@redhat.com>
5717
5718 * remote-utils.c (handle_accept_event): Close LISTEN_DESC only if
5719 RUN_ONCE. Comment for the LISTEN_DESC delete_file_handler call.
5720 (remote_prepare): New function with most of the TCP code from ...
5721 (remote_open): ... here. Detect PORT here unconditionally. Move also
5722 setting transport_is_reliable.
5723 * server.c (run_once): New variable.
5724 (gdbserver_usage): Document it.
5725 (main): Set run_once for `--once'. Call remote_prepare. Exit after
5726 the first run if RUN_ONCE.
5727 * server.h (run_once, remote_prepare): New declarations.
5728
7a9dd1b2
TT
57292011-04-19 Tom Tromey <tromey@redhat.com>
5730
5731 * win32-low.c (handle_load_dll): Remove duplicate "the".
5732
81239425
PM
57332011-04-07 Pierre Muller <muller@ics.u-strasbg.fr>
5734
5735 Remove support for old Cygwin 1.5 versions.
5736 * win32-low.c (win32_create_inferior): Use new cygwin_path_list
5737 function to avoid warning.
5738 (win32_add_one_solib): Use cygwin_conv_path function to avoid
5739 warning.
5740
9e0627f1
PM
57412011-03-18 Pierre Muller <muller@ics.u-strasbg.fr>
5742
5743 * gdbserver/server.h (Macro _): Define it if not available.
5744
588eebee
MS
57452011-03-14 Michael Snyder <msnyder@vmware.com>
5746
348af9f7 5747 * hostio.c (handle_close): Remove unnecessary null test.
588eebee 5748
43f70d4c
JB
57492011-03-10 Joel Brobecker <brobecker@adacore.com>
5750
5751 * Makefile.in (maintainer-clean realclean distclean): Remove
5752 "make ... subdir_do" command.
5753
348af9f7
MS
57542011-03-10 Michael Snyder <msnyder@vmware.com>
5755
5756 * tracepoint.c (tracepoint_finish_step): Fix loop variable.
5757
5758 * server.c (handle_v_run): Free alloced buffer on early return.
5759
e637a4f5
YQ
57602011-03-09 Yao Qi <yao@codesourcery.com>
5761
5762 Revert:
5763 2011-03-04 Yao Qi <yao@codesourcery.com>
5764
5765 * Makefile.in: Remove GNU make feature --directory.
5766
5767 2011-03-05 Yao Qi <yao@codesourcery.com>
5768
5769 * Makefile.in (CLEANDIRS, REQUIRED_SUBDIRS): New variable.
5770 (subdir_do): New make target. Copied from gdb/Makefile.
5771 (maintainer-clean, realclean, distclean, clean): Call corresponding
5772 make targets in common/Makefile.
5773
5774 2011-02-11 Yao Qi <yao@codesourcery.com>
5775
5776 * configure.ac: Call AC_PROG_RANLIB.
5777 * Makefile.in: Remove signals.o from OBS. Link libcommon.a.
5778 * configure: Regenerate.
5779
e6edda56
JK
57802011-03-07 Jan Kratochvil <jan.kratochvil@redhat.com>
5781
5782 * remote-utils.c (putpkt_binary_1): Calculate BUF2 size dynamically.
5783
e5141119
JB
57842011-03-06 Yao Qi <yao@codesourcery.com>
5785
5786 * Makefile.in (REQUIRED_SUBDIRS): Remove $(LIBCOMMON_DIR).
5787
64794aa4
JB
57882011-03-05 Yao Qi <yao@codesourcery.com>
5789
5790 * Makefile.in (CLEANDIRS, REQUIRED_SUBDIRS): New variable.
5791 (subdir_do): New make target. Copied from gdb/Makefile.
5792 (maintainer-clean, realclean, distclean, clean): Call corresponding
5793 make targets in common/Makefile.
5794
7a762829
YQ
57952011-03-04 Yao Qi <yao@codesourcery.com>
5796
5797 * Makefile.in: Remove GNU make feature --directory.
5798
348af9f7
MS
57992011-03-04 Michael Snyder <msnyder@vmware.com>
5800
5801 * server.c (queue_stop_reply): Call xmalloc not malloc.
5802
58032011-03-02 Michael Snyder <msnyder@vmware.com>
5804
5805 * linux-arm-low.c (arm_arch_setup): Replace malloc with xmalloc.
5806
9f72fee2
MS
58072011-02-28 Michael Snyder <msnyder@vmware.com>
5808
588eebee
MS
5809 * tracepoint.c (cmd_qtv): Discard unused value 'packet'.
5810 (cmd_qtframe): Ditto.
5811 (cmd_qtbuffer): Ditto.
5812 (cmd_bigqtbuffer): Ditto.
5813
9f72fee2
MS
5814 * utils.c (decimal2str): Initialize 'width' to nine, then
5815 don't mess with it.
5816
8040bd49
UW
58172011-02-28 Ulrich Weigand <uweigand@de.ibm.com>
5818
5819 * hostio.c (require_data): Free *data, not data.
5820
7e52cbd0
JK
58212011-02-28 Jan Kratochvil <jan.kratochvil@redhat.com>
5822
5823 * hostio.c (require_data): Use free, not xfree.
5824
9130f83e
MS
58252011-02-27 Michael Snyder <msnyder@vmware.com>
5826
4b812f4e
MS
5827 * server.c (handle_query): Discard unused value.
5828
9130f83e
MS
5829 * hostio.c (require_data): Free malloc memory before returning
5830 error.
5831
69d37113
MS
58322011-02-26 Michael Snyder <msnyder@vmware.com>
5833
5834 * linux-low.c (list_threads): Call closedir for dirent.
5835
35f5825a
MS
58362011-02-27 Michael Snyder <msnyder@vmware.com>
5837
2a589cef
MS
5838 * i386-low.c (i386-length_and_rw_bits): Comment the fact that
5839 a case statement falls through.
5840
0adea5f7
MS
5841 * linux-low.c (linux_xfer_siginfo): Fix fencepost error.
5842
35f5825a
MS
5843 * linux-amd64-ipa.c (gdb_agent_get_raw_reg): Fix fencepost error
5844 in comparison.
5845
238f1c74
MS
58462011-02-26 Michael Snyder <msnyder@vmware.com>
5847
5848 * utils.c (decimal2str): Eliminate dead code and dead param.
5849 (pulongest): Drop dead param from call to decimal2str.
5850 (plongest): Ditto.
5851
633ff500
JB
58522011-02-24 Joel Brobecker <brobecker@adacore.com>
5853
5854 Revert the following patch (not approved yet):
5855 2011-02-21 Hui Zhu <teawater@gmail.com>
5856 * tracepoint.c (tp_printf): New function.
5857 (eval_agent_expr): Handle gdb_agent_op_printf.
5858
f9c6ff72
HZ
58592011-02-21 Hui Zhu <teawater@gmail.com>
5860
5861 * tracepoint.c (tp_printf): New function.
5862 (eval_agent_expr): Handle gdb_agent_op_printf.
5863
94d5e490
TT
58642011-02-18 Tom Tromey <tromey@redhat.com>
5865
5866 * Makefile.in (tracepoint-ipa.o): Depend on ax.def.
5867 (tracepoint.o): Likewise.
5868 * tracepoint.c (enum gdb_agent_op): Use ax.def.
5869 (gdb_agent_op_names): Likewise.
5870
c7f96d2b
TT
58712011-02-18 Tom Tromey <tromey@redhat.com>
5872
5873 * tracepoint.c (enum gdb_agent_op) <gdb_agent_op_pick,
5874 gdb_agent_op_rot>: New constants.
5875 (gdb_agent_op_names): Add pick and roll.
5876 (eval_agent_expr) <gdb_agent_op_pick, gdb_agent_op_rot>: New
5877 cases.
5878
0feedb2c
JK
58792011-02-15 Jan Kratochvil <jan.kratochvil@redhat.com>
5880
5881 * aclocal.m4: Regenerated with aclocal-1.11.1.
5882
b3b9301e
PA
58832011-02-14 Pedro Alves <pedro@codesourcery.com>
5884
5885 * server.c (handle_qxfer_traceframe_info): New.
5886 (qxfer_packets): Register "traceframe-info".
5887 (handle_query): Report support for qXfer:traceframe-info:read+.
5888 * tracepoint.c (match_blocktype): New.
5889 (traceframe_find_block_type): Rename to ...
5890 (traceframe_walk_blocks): ... this. Add callback filter argument,
5891 and use it.
5892 (traceframe_find_block_type): New, reimplemented on top of
5893 traceframe_walk_blocks.
5894 (build_traceframe_info_xml): New.
5895 (traceframe_read_info): New.
5896 * server.h (traceframe_read_info): Declare.
5897
4f3e6fb7
YQ
58982011-02-11 Yao Qi <yao@codesourcery.com>
5899
5900 * configure.ac: Call AC_PROG_RANLIB.
5901 * Makefile.in: Remove signals.o from OBS. Link libcommon.a.
5902 * configure: Regenerate.
5903
764880b7
PA
59042011-02-07 Pedro Alves <pedro@codesourcery.com>
5905
5906 * server.c (gdb_read_memory): Change return semantics to allow
5907 partial transfers.
5908 (handle_search_memory_1): Adjust.
5909 (process_serial_event) <'m' packet>: Handle partial transfers.
5910 * tracepoint.c (traceframe_read_mem): Handle partial transfers.
5911
1c79eb8a
PA
59122011-01-28 Pedro Alves <pedro@codesourcery.com>
5913
5914 * regcache.c (init_register_cache): Initialize
5915 regcache->register_status.
5916 (free_register_cache): Release regcache->register_status.
5917 (regcache_cpy): Copy register_status.
5918 (registers_to_string): Print 'x's for unavailable registers.
5919 (supply_register): Mark the register's status valid or
5920 unavailable, depending on whether a buffer was passed in or not.
5921 (supply_register_zeroed): New.
5922 (supply_regblock): Mark the registers' status valid or
5923 unavailable, depending on whether a buffer was passed in or not.
5924 * regcache.h (REG_UNAVAILABLE, REG_VALID): New defines.
5925 (struct regcache): New `register_status' field.
5926 (supply_register_zeroed): Declare.
5927 * i387-fp.c (i387_xsave_to_cache): Zero out registers using
5928 supply_register_zeroed, rather than passing a NULL buffer to
5929 supply_register.
5930 * tracepoint.c (fetch_traceframe_registers): Update comment.
5931
85724a0e
PA
59322011-01-28 Pedro Alves <pedro@codesourcery.com>
5933
5934 * i387-fp.c (i387_xsave_to_cache): Make passing NULL as register
5935 buffer explicit.
5936
d08aafef
PA
59372011-01-25 Pedro Alves <pedro@codesourcery.com>
5938
5939 * server.h (decode_xfer_write): Change prototype.
5940 * remote-utils.c (decode_xfer_write): Remove `annex' parameter,
5941 and don't extract the annex here.
5942 * server.c (decode_xfer_read): Remove `annex' parameter,
5943 and don't extract the annex here.
5944 (decode_xfer): New.
5945 (struct qxfer): New.
5946 (handle_qxfer_auxv, handle_qxfer_features, handle_qxfer_libraries)
5947 (handle_qxfer_osdata, handle_qxfer_siginfo, handle_qxfer_spu)
5948 (handle_qxfer_statictrace): New functions, abstracted out from
5949 handle_query, and made to use the struct qxfer interface.
5950 (handle_threads_qxfer_proper): Rename to ...
5951 (handle_qxfer_threads_proper): ... this.
5952 (handle_threads_qxfer): Rename to ...
5953 (handle_qxfer_threads): ... this. Adjust.
5954 (qxfer_packets): New array.
5955 (handle_qxfer): New function.
5956 (handle_query): Use handle_qxfer.
5957
493e2a69
MS
59582011-01-05 Michael Snyder <msnyder@msnyder-server.eng.vmware.com>
5959
5960 * gdbreplay.c: Shorten lines of >= 80 columns.
5961 * linux-low.c: Ditto.
5962 * linux-ppc-low.c: Ditto.
5963 * linux-s390-low.c: Ditto.
5964 * linux-sparc-low.c: Ditto.
5965 * linux-x86-low.c: Ditto.
5966 * linux-xtensa-low.c: Ditto.
5967 * mem-break.c: Ditto.
5968 * nto-low.c: Ditto.
5969 * regcache.h: Ditto.
5970 * remote-utils.c: Ditto.
5971 * server.c: Ditto.
5972 * server.h: Ditto.
5973 * thread-db.c: Ditto.
5974 * tracepoint.c: Ditto.
5975 * utils.c: Ditto.
5976 * win32-low.h: Ditto.
5977
44944448
JB
59782011-01-05 Joel Brobecker <brobecker@adacore.com>
5979
5980 * gdbserver/configure.ac, gdbserver/gdbserver.1: Copyright year
5981 update.
5982
71ce852c
JB
59832011-01-01 Joel Brobecker <brobecker@adacore.com>
5984
5985 * server.c (gdbserver_version): Update copyright year in version
5986 output.
5987 * gdbreplay.c (gdbreplay_version): Ditto.
5988
eb826dc6
MF
59892010-12-29 Jie Zhang <jie.zhang@analog.com>
5990
5991 * configure.srv (bfin-*-*linux*): Handle Blackfin/Linux targets.
5992 * linux-bfin-low.c: New file.
5993 * linux-low.c: Define PT_TEXT_ADDR, PT_TEXT_END_ADDR, and
5994 PT_DATA_ADDR for BFIN targets.
5995 * Makefile.in (SFILES): Add linux-bfin-low.c.
5996 (clean): Remove reg-bfin.c.
5997 (linux-bfin-low.o, reg-bfin.o, reg-bfin.c): New targets.
5998 * README: Mention supported Blackfin targets.
5999
39ab222a
MF
60002010-12-23 Mike Frysinger <vapier@gentoo.org>
6001
6002 * .gitignore: New file.
6003
a1f2ce7d
MF
60042010-11-16 Mike Frysinger <vapier@gentoo.org>
6005
6006 * linux-low.c (linux_tracefork_child): Add char* cast to arg.
6007
f474844c
JZ
60082010-10-22 Jie Zhang <jie@codesourcery.com>
6009
6010 * Makefile.in: Add FLAGS_TO_PASS variable.
6011 (install): Remove dependency of install-only and recursively
6012 invoke make for install-only.
6013
f1048712
DE
60142010-10-04 Doug Evans <dje@google.com>
6015
6016 * Makefile.in (uninstall): Use $(DESTDIR).
6017
b53a1623
PA
60182010-09-24 Pedro Alves <pedro@codesourcery.com>
6019
e6ee044d
PA
6020 PR gdb/11842
6021
b53a1623
PA
6022 * linux-x86-low.c (compat_siginfo_from_siginfo)
6023 (siginfo_from_compat_siginfo): Also copy si_pid and si_uid when
6024 si_code is < 0. Check for si_code == SI_TIMER before checking for
6025 si_code < 0.
6026
fa1bd1e4
JB
60272010-09-13 Joel Brobecker <brobecker@adacore.com>
6028
6029 * lynx-i386-low.c: New file.
6030 * configure.srv: Add handling of i[34567]86-*-lynxos* targets.
6031
47fac8f8
JB
60322010-09-13 Joel Brobecker <brobecker@adacore.com>
6033
6034 * lynx-low.c (ptrace_request_to_str): Remove handling for
6035 request values that have been removed in LynxOS 5.x.
6036
1adfc54d
JB
60372010-09-13 Joel Brobecker <brobecker@adacore.com>
6038
6039 * lynx-low.c, lynx-ppc-loc.c: Include <sys/ptrace.h> instead of
6040 <ptrace.h>
6041
c2a66c29
NS
60422010-09-09 Nathan Sidwell <nathan@codesourcery.com>
6043
6044 * configure.ac: Add --enable-inprocess-agent option.
6045 * configure: Rebuilt.
6046
32fcada3
YQ
60472010-09-06 Yao Qi <yao@codesourcery.com>
6048
6049 * linux-low.c (linux_kill): Remove unused variable.
6050 (linux_stabilize_threads): Likewise.
6051 * server.c (start_inferior): Likewise.
6052 (queue_stop_reply_callback): Likewise.
6053 * tracepoint.c (do_action_at_tracepoint): Likewise.
6054
0cccb683
YQ
60552010-09-06 Yao Qi <yao@codesourcery.com>
6056
6057 * linux-low.c (maybe_move_out_of_jump_pad): Restore current_inferior
6058 on return.
6059
423ec54c
JK
60602010-09-06 Jan Kratochvil <jan.kratochvil@redhat.com>
6061
6062 * target.c (mywait) <TARGET_WAITKIND_EXITED>: Fix to use INTEGER.
6063
12ac6819
PA
60642010-09-06 Pedro Alves <pedro@codesourcery.com>
6065
6066 * Makefile.in (install-only): Replace $IPA_DEPFILES with
6067 "$(IPA_DEPFILES)".
6068
8ed54b31
JB
60692010-09-01 Joel Brobecker <brobecker@adacore.com>
6070
6071 * gdbserver/lynx-low.c, gdbserver/lynx-low.h,
6072 gdbserver/lynx-ppc-low.c: New files.
6073 * Makefile.in (lynx_low_h): New variable.
6074 (lynx-low.o, lynx-ppc-low.o): New rules.
6075 * configure.ac: On LynxOS, link with -lnetinet.
6076 * configure.srv: Add handling of powerpc-*-lynxos* targets.
6077 * configure: regenerate.
6078
bb0116a4
JB
60792010-09-01 Joel Brobecker <brobecker@adacore.com>
6080
6081 * Makefile.in (vasprintf.o, vsnprintf.o): New rules.
6082 * configure.ac: Add check for vasprintf and vsnprintf.
6083 * configure, config.in: Regenerate.
6084 * server.h (vasprintf, vsnprintf): Add conditional declarations.
6085
a778ab81 60862010-09-01 Joel Brobecker <brobecker@adacore.com>
6087
6088 * gdbreplay.c: Move include of alloca.h up, next to include of
6089 malloc.h.
6090 * server.h: Add include of malloc.h.
6091 * mem-break.c: Remove include of malloc.h.
6092 * server.c, tracepoint.c, utils.c, win32-low.c: Likewise.
6093
8b034a19 60942010-09-01 Joel Brobecker <brobecker@adacore.com>
6095
6096 * Makefile.in (memmem.o): Build with -Wno-error.
6097
60982010-09-01 Joel Brobecker <brobecker@adacore.com>
6099
6100 * utils.c (xsnprintf): Make non-static.
6101 * server.h: Add xsnprintf declaration.
6102 * linux-low.c, nto-low.c, target.c, thread-db.c, tracepoint.c:
6103 replace calls to snprintf by calls to xsnprintf throughout.
6104
61052010-09-01 Joel Brobecker <brobecker@adacore.com>
6106
6107 * configure.ac: Add configure check for alloca.
6108 * configure, config.in: Regenerate.
6109 * server.h: Include alloca.h if it exists.
6110 * gdbreplay.c: Include alloca.h if it exists.
6111
1a981360
PA
61122010-08-28 Pedro Alves <pedro@codesourcery.com>
6113
6114 * linux-low.c (__SIGRTMIN): Define if not already defined.
6115 (linux_create_inferior): Check for __ANDROID__ rather than
6116 __SIGRTMIN.
6117 (enqueue_one_deferred_signal): Don't requeue non-RT signals that
6118 are already deferred.
6119 (linux_wait_1): Check for __ANDROID__ rather than __SIGRTMIN.
6120 (linux_resume_one_thread): Don't queue a SIGSTOP if the lwp is
6121 stopped and already has a pending signal to report.
6122 (proceed_one_lwp): : Don't queue a SIGSTOP if the lwp already has
6123 a pending signal to report or is moving out of a jump pad.
6124 (linux_init_signals): Check for __ANDROID__ rather than
6125 __SIGRTMIN.
6126
b4d51a55
PA
61272010-08-28 Pedro Alves <pedro@codesourcery.com>
6128
6129 * linux-low.c (linux_stabilize_threads): Wrap debug output in a
6130 debug_threads check. Avoid a linear search when not doing debug
6131 output.
6132
ec48365d
PA
61332010-08-27 Pedro Alves <pedro@codesourcery.com>
6134
6135 * event-loop.c (event_handle_func): Adjust to use gdb_fildes_t.
6136 (struct gdb_event) <fd>: Change type to gdb_fildes_t.
6137 (struct file_handler) <fd>: Change type to gdb_fildes_t.
6138 (process_event): Change local fd's type to gdb_fildes_t.
6139 (create_file_handler): Adjust prototype.
6140 (delete_file_handler): Adjust prototype.
6141 (handle_file_event): Adjust prototype. Use pfildes.
6142 (create_file_event): Adjsut prototype.
6143 * remote-utils.c (remote_desc, listen_desc): Change type to
6144 gdb_fildes_t.
6145 * server.h: New gdb_fildes_t typedef.
6146 [USE_WIN32API]: Include winsock2.h.
6147 (delete_file_handler, add_file_handler): Adjust prototypes.
6148 (pfildes): Declare.
6149 * utils.c (pfildes): New.
6150
854d88f0
PA
61512010-08-27 Pedro Alves <pedro@codesourcery.com>
6152
6153 * configure.ac (build_warnings): Add -Wno-char-subscripts.
6154 * configure: Regenerate.
6155
0146f85b
PA
61562010-08-27 Pedro Alves <pedro@codesourcery.com>
6157
6158 * linux-low.c (linux_unprepare_to_access_memory): Rename to ...
6159 (linux_done_accessing_memory): ... this.
6160 (linux_target_ops): Adjust.
6161 * linux-x86-low.c (x86_insert_point, x86_remove_point): Adjust.
6162 * nto-low.c (nto_target_ops): Adjust comment.
6163 * server.c (gdb_read_memory, gdb_write_memory): Adjust.
6164 * spu-low.c (spu_target_ops): Adjust comment.
6165 * target.h (target_ops): Rename unprepare_to_access_memory field
6166 to done_accessing_memory.
6167 (unprepare_to_access_memory): Rename to ...
6168 (done_accessing_memory): ... this.
6169
90d74c30
PA
61702010-08-26 Pedro Alves <pedro@codesourcery.com>
6171
6172 * linux-low.c (linux_prepare_to_access_memory): New.
6173 (linux_unprepare_to_access_memory): New.
6174 (linux_target_ops): Install them.
6175 * server.c (read_memory): Rename to ...
6176 (gdb_read_memory): ... this. Use
6177 prepare_to_access_memory/prepare_to_access_memory.
6178 (write_memory): Rename to ...
6179 (gdb_write_memory): ... this. Use
6180 prepare_to_access_memory/prepare_to_access_memory.
6181 (handle_search_memory_1): Adjust.
6182 (process_serial_event): Adjust.
6183 * target.h (struct target_ops): New fields
6184 prepare_to_access_memory and unprepare_to_access_memory.
6185 (prepare_to_access_memory, unprepare_to_access_memory): New.
6186 * linux-x86-low.c (x86_insert_point, x86_remove_point): Use
6187 prepare_to_access_memory/prepare_to_access_memory.
6188 * nto-low.c (nto_target_ops): Adjust.
6189 * spu-low.c (spu_target_ops): Adjust.
6190 * win32-low.c (win32_target_ops): Adjust.
6191
fd467969
PA
61922010-08-26 Pedro Alves <pedro@codesourcery.com>
6193
6194 * Makefile.in (WARN_CFLAGS): Get it from configure.
6195 (WERROR_CFLAGS): New.
6196 (INTERNAL_CFLAGS): Add WERROR_CFLAGS.
6197 * configure.ac: Introduce --enable-werror, which adds -Werror to
6198 the compiler command line. Enabled by default. Disable with
6199 --disable-werror. Add -Wdeclaration-after-statement
6200 Wpointer-arith and -Wformat-nonliteral to warning flags.
6201 * configure: Regenerate.
6202
331e2f5f
PA
62032010-08-26 Pedro Alves <pedro@codesourcery.com>
6204
6205 * mem-break.c [HAVE_MALLOC_H]: Include malloc.h.
6206
e581f2b4
PA
62072010-08-26 Pedro Alves <pedro@codesourcery.com>
6208
6209 * gdbreplay.c (remote_error): New.
6210 (gdbchar): New.
6211 (expect): Use gdbchar. Check for error reading from GDB.
6212 Clarify sync error output.
6213 (play): Check for errors writing to GDB.
6214 * linux-low.c (sigchld_handler): Really ignore `write' errors.
6215 * remote-utils.c (getpkt): Check for errors writing to the remote
6216 descriptor.
6217
3c11dd79
PA
62182010-08-25 Pedro Alves <pedro@codesourcery.com>
6219
6220 * linux-low.c (linux_wait_1): Move non-debugging code out of
6221 `debug_threads' control.
6222
d20a8ad9
PA
62232010-08-25 Pedro Alves <pedro@codesourcery.com>
6224
6225 * linux-low.c (linux_wait_1): Don't set last_status here.
6226 * server.c (push_event, queue_stop_reply_callback): Assert we're
6227 not pushing a TARGET_WAITKIND_IGNORE event.
6228 (start_inferior, start_inferior, attach_inferior, handle_v_cont)
6229 (myresume, handle_target_event): Set the thread's last_resume_kind
6230 and last_status from the target returned status.
6231
964e4306
PA
62322010-08-25 Pedro Alves <pedro@codesourcery.com>
6233
6234 PR threads/10729
6235
6236 * linux-x86-low.c (update_debug_registers_callback): New.
6237 (i386_dr_low_set_addr): Use it.
6238 (i386_dr_low_get_addr): New.
6239 (i386_dr_low_set_control): Use update_debug_registers_callback.
6240 (i386_dr_low_get_control): New.
6241 (i386_dr_low_get_status): Adjust.
6242 * linux-low.c (linux_stop_lwp): New.
6243 * linux-low.h (linux_stop_lwp): Declare.
6244
6245 * i386-low.c (I386_DR_GET_RW_LEN): Take the dr7 contents as
6246 argument instead of a i386_debug_reg_state.
6247 (I386_DR_WATCH_HIT): Take the dr6 contents as argument instead of
6248 a i386_debug_reg_state.
6249 (i386_insert_aligned_watchpoint): Adjust.
6250 (i386_remove_aligned_watchpoint): Adjust.
6251 (i386_low_stopped_data_address): Read the debug registers from the
6252 inferior instead of from the mirrors.
6253 * i386-low.h (struct i386_debug_reg_state): Extend comment.
6254 (i386_dr_low_get_addr): Declare.
6255 (i386_dr_low_get_control): Declare.
6256 (i386_dr_low_get_status): Change prototype.
6257
6258 * win32-i386-low.c (dr_status_mirror, dr_control_mirror): New globals.
6259 (i386_dr_low_get_addr): New.
6260 (i386_dr_low_get_control): New.
6261 (i386_dr_low_get_status): Adjust prototype. Return
6262 dr_status_mirror.
6263 (i386_initial_stuff): Clear dr_status_mirror and
6264 dr_control_mirror.
6265 (i386_get_thread_context): Adjust.
6266 (i386_set_thread_context): Adjust.
6267 (i386_thread_added): Adjust.
6268
5f21a75b
PA
62692010-08-24 Pedro Alves <pedro@codesourcery.com>
6270
6271 * linux-low.h (linux_thread_area): Delete declaration.
6272
3e4c1235
TS
62732010-08-11 Thomas Schwinge <thomas@codesourcery.com>
6274
6275 * linux-low.c (linux_wait_1): Correctly return the ptid of the child
6276 after its termination.
6277
1971b033
PA
62782010-08-09 Pedro Alves <pedro@codesourcery.com>
6279
6280 * linux-low.c (gdb_wants_lwp_stopped): Delete.
6281 (gdb_wants_all_stopped): Delete.
6282 (linux_wait_1): Don't call them.
6283 * server.c (handle_v_cont): Tag all threads as want-stopped.
6284 (gdb_wants_thread_stopped): Fix comments. Tag the thread that
6285 stopped as "client-wants-stopped".
6286
310444ac
PA
62872010-07-31 Pedro Alves <pedro@codesourcery.com>
6288
6289 * Makefile.in (signals_h): New.
6290 (server_h): Depend on it.
6291 (server.o): Don't depend on $(signals_def).
6292 (signals.o): Depend on $(signals_def).
6293
a19cae16
JK
62942010-07-31 Jan Kratochvil <jan.kratochvil@redhat.com>
6295
6296 * Makefile.in (signals_def): New.
6297 (server_h): Append include/gdb/signals.h and signals_def.
6298 (server.o): Append signals_def.
6299
30d50328
JK
63002010-07-25 Jan Kratochvil <jan.kratochvil@redhat.com>
6301
6302 * server.c (handle_target_event): Use target_signal_to_host for
6303 resume_info.sig initialization.
6304 * target.h (struct thread_resume) <sig>: New comment.
6305
5c3216e2
OS
63062010-07-20 Ozkan Sezer <sezeroz@gmail.com>
6307
c6f46ca0
OS
6308 * server.c (handle_query): strcpy() the returned string from paddress()
6309 instead of sprintf().
5c3216e2
OS
6310 * utils.c (paddress): Return phex_nz().
6311
6bd31874
JB
63122010-07-07 Joel Brobecker <brobecker@adacore.com>
6313
6314 * server.c (handle_v_cont): Call mourn_inferior if process
6315 just exited.
6316 (myresume): Likewise.
6317
0fb4aa4b
PA
63182010-07-01 Pedro Alves <pedro@codesourcery.com>
6319
6320 Static tracepoints, and integration with UST.
6321
6322 * configure.ac: Handle --with-ust. substitute ustlibs and ustinc.
6323 * mem-break.c (uninsert_all_breakpoints)
6324 (reinsert_all_breakpoints): New.
6325 * mem-break.h (reinsert_all_breakpoints, uninsert_all_breakpoints):
6326 * tracepoint.c (ust_loaded, helper_thread_id, cmd_buf): New.
6327 (gdb_agent_ust_loaded, helper_thread_id)
6328 (gdb_agent_helper_thread_id): New macros.
6329 (struct ipa_sym_addresses): Add addr_ust_loaded,
6330 addr_helper_thread_id, addr_cmd_buf.
6331 (symbol_list): Add ust_loaded, helper_thread_id, cmd_buf.
6332 (in_process_agent_loaded_ust): New.
6333 (write_e_ust_not_loaded): New.
6334 (maybe_write_ipa_ust_not_loaded): New.
6335 (struct collect_static_trace_data_action): New.
6336 (enum tracepoint_type) <static_tracepoint>: New.
6337 (struct tracepoint) <handle>: Mention static tracepoints.
6338 (struct static_tracepoint_ctx): New.
6339 (CMD_BUF_SIZE): New.
6340 (add_tracepoint_action): Handle static tracepoint actions.
6341 (unprobe_marker_at): New.
6342 (clear_installed_tracepoints): Handle static tracepoints.
6343 (cmd_qtdp): Handle static tracepoints.
6344 (probe_marker_at): New.
6345 (cmd_qtstart): Handle static tracepoints.
6346 (response_tracepoint): Handle static tracepoints.
6347 (cmd_qtfstm, cmd_qtsstm, cmd_qtstmat): New.
6348 (handle_tracepoint_query): Handle qTfSTM, qTsSTM and qTSTMat.
6349 (get_context_regcache): Handle static tracepoints.
6350 (do_action_at_tracepoint): Handle static tracepoint actions.
6351 (traceframe_find_block_type): Handle static trace data blocks.
6352 (traceframe_read_sdata): New.
6353 (download_tracepoints): Download static tracepoint actions.
6354 [HAVE_UST] Include ust/ust.h, dlfcn.h, sys/socket.h, and sys/un.h.
6355 (GDB_PROBE_NAME): New.
6356 (ust_ops): New.
6357 (GET_UST_SYM): New.
6358 (USTF): New.
6359 (dlsym_ust): New.
6360 (ust_marker_to_static_tracepoint): New.
6361 (gdb_probe): New.
6362 (collect_ust_data_at_tracepoint): New.
6363 (gdb_ust_probe): New.
6364 (UNIX_PATH_MAX, SOCK_DIR): New.
6365 (gdb_ust_connect_sync_socket): New.
6366 (resume_thread, stop_thread): New.
6367 (run_inferior_command): New.
6368 (init_named_socket): New.
6369 (gdb_ust_socket_init): New.
6370 (cstr_to_hexstr): New.
6371 (next_st): New.
6372 (first_marker, next_marker): New.
6373 (response_ust_marker): New.
6374 (cmd_qtfstm, cmd_qtsstm): New.
6375 (unprobe_marker_at, probe_marker_at): New.
6376 (cmd_qtstmat, gdb_ust_thread): New.
6377 (gdb_ust_init): New.
6378 (initialize_tracepoint_ftlib): Call gdb_ust_init.
6379 * linux-amd64-ipa.c [HAVE_UST]: Include ust/processor.h
6380 (ST_REGENTRY): New.
6381 (x86_64_st_collect_regmap): New.
6382 (X86_64_NUM_ST_COLLECT_GREGS): New.
6383 (AMD64_RIP_REGNUM): New.
6384 (supply_static_tracepoint_registers): New.
6385 * linux-i386-ipa.c [HAVE_UST]: Include ust/processor.h
6386 (ST_REGENTRY): New.
6387 (i386_st_collect_regmap): New.
6388 (i386_NUM_ST_COLLECT_GREGS): New.
6389 (supply_static_tracepoint_registers): New.
6390 * server.c (handle_query): Handle qXfer:statictrace:read.
6391 <qSupported>: Report support for StaticTracepoints, and
6392 qXfer:statictrace:read features.
6393 * server.h (traceframe_read_sdata)
6394 (supply_static_tracepoint_registers): Declare.
6395 * remote-utils.c (convert_int_to_ascii, hexchars, ishex, tohex)
6396 (unpack_varlen_hex): Include in IPA build.
6397 * Makefile.in (ustlibs, ustinc): New.
6398 (IPA_OBJS): Add remote-utils-ipa.o.
6399 ($(IPA_LIB)): Link -ldl and -lpthread.
6400 (UST_CFLAGS): New.
6401 (IPAGENT_CFLAGS): Add UST_CFLAGS.
6402 * config.in, configure: Regenerate.
6403
9e4344e5
PA
64042010-06-20 Ian Lance Taylor <iant@google.com>
6405 Pedro Alves <pedro@codesourcery.com>
6406
6407 * linux-x86-low.c (always_true): Delete.
6408 (EMIT_ASM, EMIT_ASM32): Use an uncondition asm jmp instead of
6409 trying to fool the compiler with always_true.
6410
c6beb2cb
PA
64112010-06-20 Pedro Alves <pedro@codesourcery.com>
6412
6413 * tracepoint.c (condition_true_at_tracepoint): Don't run compiled
6414 conditions in gdbserver.
6415
d2ed6730
UW
64162010-06-19 Ulrich Weigand <uweigand@de.ibm.com>
6417
6418 * spu-low.c (spu_read_memory): Wrap around local store limit.
6419 (spu_write_memory): Likewise.
6420
4e29fb54
PA
64212010-06-15 Pedro Alves <pedro@codesourcery.com>
6422
6423 * linux-x86-low.c (amd64_emit_const, amd64_emit_void_call_2)
6424 (i386_emit_const, i386_emit_void_call_2): Replace int64_t uses with
6425 LONGEST uses.
6426 * server.h (struct emit_ops): Replace int64_t uses with LONGEST
6427 uses.
6428 * tracepoint.c (emit_const, emit_void_call_2): Replace int64_t
6429 uses with LONGEST uses.
6430
6a271cae
PA
64312010-06-14 Stan Shebs <stan@codesourcery.com>
6432 Pedro Alves <pedro@codesourcery.com>
6433
6434 Bytecode compiler.
6435
6436 * linux-x86-low.c: Include limits.h.
6437 (add_insns): New.
6438 (always_true): New.
6439 (EMIT_ASM): New.
6440 (EMIT_ASM32): New.
6441 (amd64_emit_prologue, amd64_emit_epilogue, amd64_emit_add)
6442 (amd64_emit_sub, amd64_emit_mul, amd64_emit_lsh)
6443 (amd64_emit_rsh_signed, amd64_emit_rsh_unsigned, amd64_emit_ext,
6444 (amd64_emit_log_not, amd64_emit_bit_and, amd64_emit_bit_or)
6445 (amd64_emit_bit_xor, amd64_emit_bit_not, amd64_emit_equal,
6446 (amd64_emit_less_signed, amd64_emit_less_unsigned, amd64_emit_ref,
6447 (amd64_emit_if_goto, amd64_emit_goto, amd64_write_goto_address)
6448 (amd64_emit_const, amd64_emit_call, amd64_emit_reg)
6449 (amd64_emit_pop, amd64_emit_stack_flush, amd64_emit_zero_ext)
6450 (amd64_emit_swap, amd64_emit_stack_adjust, amd64_emit_int_call_1)
6451 (amd64_emit_void_call_2): New.
6452 (amd64_emit_ops): New.
6453 (i386_emit_prologue, i386_emit_epilogue, i386_emit_add)
6454 (i386_emit_sub,i386_emit_mul, i386_emit_lsh, i386_emit_rsh_signed)
6455 (i386_emit_rsh_unsigned, i386_emit_ext, i386_emit_log_not)
6456 (i386_emit_bit_and, i386_emit_bit_or, i386_emit_bit_xor)
6457 (i386_emit_bit_not, i386_emit_equal, i386_emit_less_signed)
6458 (i386_emit_less_unsigned, i386_emit_ref, i386_emit_if_goto)
6459 (i386_emit_goto, i386_write_goto_address, i386_emit_const)
6460 (i386_emit_call, i386_emit_reg, i386_emit_pop)
6461 (i386_emit_stack_flush, i386_emit_zero_ext, i386_emit_swap)
6462 (i386_emit_stack_adjust, i386_emit_int_call_1)
6463 (i386_emit_void_call_2): New.
6464 (i386_emit_ops): New.
6465 (x86_emit_ops): New.
6466 (the_low_target): Install x86_emit_ops.
6467 * server.h (struct emit_ops): New.
6468 (get_raw_reg_func_addr): Declare.
6469 (current_insn_ptr, emit_error): Declare.
6470 * tracepoint.c (get_raw_reg, get_trace_state_variable_value)
6471 (set_trace_state_variable_value): New defines.
6472 (struct ipa_sym_addresses): New fields addr_get_raw_reg,
6473 addr_get_trace_state_variable_value and
6474 addr_set_trace_state_variable_value.
6475 (symbol_list): New fields for get_raw_reg,
6476 get_trace_state_variable_value and set_trace_state_variable_value.
6477 (condfn): New typedef.
6478 (struct tracepoint): New field `compiled_cond'.
6479 (do_action_at_tracepoint): Clear compiled_cond.
6480 (get_trace_state_variable_value, set_trace_state_variable_value):
6481 Export in the IPA.
6482 (condition_true_at_tracepoint): If there's a compiled condition,
6483 run that.
6484 (current_insn_ptr, emit_error): New globals.
6485 (struct bytecode_address): New.
6486 (get_raw_reg_func_addr): New.
6487 (emit_prologue, emit_epilogue, emit_add, emit_sub, emit_mul)
6488 (emit_lsh, emit_rsh_signed, emit_rsh_unsigned, emit_ext)
6489 (emit_log_not, emit_bit_and, emit_bit_or, emit_bit_xor)
6490 (emit_bit_not, emit_equal, emit_less_signed, emit_less_unsigned)
6491 (emit_ref, emit_if_goto, emit_goto, write_goto_address, emit_const)
6492 (emit_reg, emit_pop, emit_stack_flush, emit_zero_ext, emit_swap)
6493 (emit_stack_adjust, emit_int_call_1, emit_void_call_2): New.
6494 (compile_tracepoint_condition, compile_bytecodes): New.
6495 * target.h (emit_ops): Forward declare.
6496 (struct target_ops): New field emit_ops.
6497 (target_emit_ops): New.
6498 * linux-amd64-ipa.c (gdb_agent_get_raw_reg): New.
6499 * linux-i386-ipa.c (gdb_agent_get_raw_reg): New.
6500 * linux-low.c (linux_emit_ops): New.
6501 (linux_target_ops): Install it.
6502 * linux-low.h (struct linux_target_ops): New field emit_ops.
6503
92b72907
UW
65042010-06-14 Ulrich Weigand <uweigand@de.ibm.com>
6505
6506 * linux-ppc-low.c (ppc_arch_setup): Use private regcache to test MSR.
6507 * linux-s390-low.c (ppc_arch_setup): Use private regcache to test PSW.
6508
fa593d66
PA
65092010-06-01 Pedro Alves <pedro@codesourcery.com>
6510 Stan Shebs <stan@codesourcery.com>
6511
6512 * Makefile.in (IPA_DEPFILES, extra_libraries): New.
6513 (all): Depend on $(extra_libraries).
6514 (install-only): Install the IPA.
6515 (IPA_OBJS, IPA_LIB): New.
6516 (clean): Remove the IPA lib.
6517 (IPAGENT_CFLAGS): New.
6518 (tracepoint-ipa.o, utils-ipa.o, remote-utils-ipa.o)
6519 (regcache-ipa.o, i386-linux-ipa.o, linux-i386-ipa.o)
6520 (linux-amd64-ipa.o, amd64-linux-ipa.o): New rules.
6521 * linux-amd64-ipa.c, linux-i386-ipa.c: New files.
6522 * configure.ac: Check for atomic builtins support in the compiler.
6523 (IPA_DEPFILES, extra_libraries): Define.
6524 * configure.srv (ipa_obj): Add description.
6525 (ipa_i386_linux_regobj, ipa_amd64_linux_regobj): Define.
6526 (i[34567]86-*-linux*): Set ipa_obj.
6527 (x86_64-*-linux*): Set ipa_obj.
6528 * linux-low.c (stabilizing_threads): New.
6529 (supports_fast_tracepoints): New.
6530 (linux_detach): Stabilize threads before detaching.
6531 (handle_tracepoints): Handle internal tracing breakpoints. Assert
6532 the lwp is either not stabilizing, or is moving out of a jump pad.
6533 (linux_fast_tracepoint_collecting): New.
6534 (maybe_move_out_of_jump_pad): New.
6535 (enqueue_one_deferred_signal): New.
6536 (dequeue_one_deferred_signal): New.
6537 (linux_wait_for_event_1): If moving out of a jump pad, defer
6538 pending signals to later.
6539 (linux_stabilize_threads): New.
6540 (linux_wait_1): Check if threads need moving out of jump pads, and
6541 do it if so.
6542 (stuck_in_jump_pad_callback): New.
6543 (move_out_of_jump_pad_callback): New.
6544 (lwp_running): New.
6545 (linux_resume_one_lwp): Handle moving out of jump pads.
6546 (linux_set_resume_request): Dequeue deferred signals.
6547 (need_step_over_p): Also step over fast tracepoint jumps.
6548 (start_step_over): Also uninsert fast tracepoint jumps.
6549 (finish_step_over): Also reinsert fast tracepoint jumps.
6550 (linux_install_fast_tracepoint_jump): New.
6551 (linux_target_ops): Install linux_stabilize_threads and
6552 linux_install_fast_tracepoint_jump_pad.
6553 * linux-low.h (linux_target_ops) <get_thread_area,
6554 install_fast_tracepoint_jump_pad>: New fields.
6555 (struct lwp_info) <collecting_fast_tracepoint,
6556 pending_signals_to_report, exit_jump_pad_bkpt>: New fields.
6557 (linux_get_thread_area): Declare.
6558 * linux-x86-low.c (jump_insn): New.
6559 (x86_get_thread_area): New.
6560 (append_insns): New.
6561 (push_opcode): New.
6562 (amd64_install_fast_tracepoint_jump_pad): New.
6563 (i386_install_fast_tracepoint_jump_pad): New.
6564 (x86_install_fast_tracepoint_jump_pad): New.
6565 (the_low_target): Install x86_get_thread_area and
6566 x86_install_fast_tracepoint_jump_pad.
6567 * mem-break.c (set_raw_breakpoint_at): Use read_inferior_memory.
6568 (struct fast_tracepoint_jump): New.
6569 (fast_tracepoint_jump_insn): New.
6570 (fast_tracepoint_jump_shadow): New.
6571 (find_fast_tracepoint_jump_at): New.
6572 (fast_tracepoint_jump_here): New.
6573 (delete_fast_tracepoint_jump): New.
6574 (set_fast_tracepoint_jump): New.
6575 (uninsert_fast_tracepoint_jumps_at): New.
6576 (reinsert_fast_tracepoint_jumps_at): New.
6577 (set_breakpoint_at): Use write_inferior_memory.
6578 (uninsert_raw_breakpoint): Use write_inferior_memory.
6579 (check_mem_read): Mask out fast tracepoint jumps.
6580 (check_mem_write): Mask out fast tracepoint jumps.
6581 * mem-break.h (struct fast_tracepoint_jump): Forward declare.
6582 (set_fast_tracepoint_jump): Declare.
6583 (delete_fast_tracepoint_jump)
6584 (fast_tracepoint_jump_here, uninsert_fast_tracepoint_jumps_at)
6585 (reinsert_fast_tracepoint_jumps_at): Declare.
6586 * regcache.c: Don't compile many functions when building the
6587 in-process agent library.
6588 (init_register_cache) [IN_PROCESS_AGENT]: Don't allow allocating
6589 the register buffer in the heap.
6590 (free_register_cache): If the register buffer isn't owned by the
6591 regcache, don't free it.
6592 (set_register_cache) [IN_PROCESS_AGENT]: Don't re-alocate
6593 pre-existing register caches.
6594 * remote-utils.c (convert_int_to_ascii): Constify `from' parameter
6595 type.
6596 (convert_ascii_to_int): : Constify `from' parameter type.
6597 (decode_M_packet, decode_X_packet): Replace the `to' parameter by
6598 a `to_p' pointer to pointer parameter. If TO_P is NULL, malloc
6599 the needed buffer in-place.
6600 (relocate_instruction): New.
6601 * server.c (handle_query) <qSymbols>: If the target supports
6602 tracepoints, give it a chance of looking up symbols. Report
6603 support for fast tracepoints.
6604 (handle_status): Stabilize threads.
6605 (process_serial_event): Adjust.
6606 * server.h (struct fast_tracepoint_jump): Forward declare.
6607 (struct process_info) <fast_tracepoint_jumps>: New field.
6608 (convert_ascii_to_int, convert_int_to_ascii): Adjust.
6609 (decode_X_packet, decode_M_packet): Adjust.
6610 (relocate_instruction): Declare.
6611 (in_process_agent_loaded): Declare.
6612 (tracepoint_look_up_symbols): Declare.
6613 (struct fast_tpoint_collect_status): Declare.
6614 (fast_tracepoint_collecting): Declare.
6615 (force_unlock_trace_buffer): Declare.
6616 (handle_tracepoint_bkpts): Declare.
6617 (initialize_low_tracepoint)
6618 (supply_fast_tracepoint_registers) [IN_PROCESS_AGENT]: Declare.
6619 * target.h (struct target_ops) <stabilize_threads,
6620 install_fast_tracepoint_jump_pad>: New fields.
6621 (stabilize_threads, install_fast_tracepoint_jump_pad): New.
6622 * tracepoint.c [HAVE_MALLOC_H]: Include malloc.h.
6623 [HAVE_STDINT_H]: Include stdint.h.
6624 (trace_debug_1): Rename to ...
6625 (trace_vdebug): ... this.
6626 (trace_debug): Rename to ...
6627 (trace_debug_1): ... this. Add `level' parameter.
6628 (trace_debug): New.
6629 (ATTR_USED, ATTR_NOINLINE): New.
6630 (IP_AGENT_EXPORT): New.
6631 (gdb_tp_heap_buffer, gdb_jump_pad_buffer, gdb_jump_pad_buffer_end)
6632 (collecting, gdb_collect, stop_tracing, flush_trace_buffer)
6633 (about_to_request_buffer_space, trace_buffer_is_full)
6634 (stopping_tracepoint, expr_eval_result, error_tracepoint)
6635 (tracepoints, tracing, trace_buffer_ctrl, trace_buffer_ctrl_curr)
6636 (trace_buffer_lo, trace_buffer_hi, traceframe_read_count)
6637 (traceframe_write_count, traceframes_created)
6638 (trace_state_variables)
6639 New renaming defines.
6640 (struct ipa_sym_addresses): New.
6641 (STRINGIZE_1, STRINGIZE, IPA_SYM): New.
6642 (symbol_list): New.
6643 (ipa_sym_addrs): New.
6644 (all_tracepoint_symbols_looked_up): New.
6645 (in_process_agent_loaded): New.
6646 (write_e_ipa_not_loaded): New.
6647 (maybe_write_ipa_not_loaded): New.
6648 (tracepoint_look_up_symbols): New.
6649 (debug_threads) [IN_PROCESS_AGENT]: New.
6650 (read_inferior_memory) [IN_PROCESS_AGENT]: New.
6651 (UNKNOWN_SIDE_EFFECTS): New.
6652 (stop_tracing): New.
6653 (flush_trace_buffer): New.
6654 (stop_tracing_bkpt): New.
6655 (flush_trace_buffer_bkpt): New.
6656 (read_inferior_integer): New.
6657 (read_inferior_uinteger): New.
6658 (read_inferior_data_pointer): New.
6659 (write_inferior_data_pointer): New.
6660 (write_inferior_integer): New.
6661 (write_inferior_uinteger): New.
6662 (struct collect_static_trace_data_action): Delete.
6663 (enum tracepoint_type): New.
6664 (struct tracepoint) <type>: New field `type'.
43aaf8b6
PA
6665 <actions_str, step_actions, step_actions_str>: Only include in
6666 GDBserver.
fa593d66
PA
6667 <orig_size, obj_addr_on_target, adjusted_insn_addr>
6668 <adjusted_insn_addr_end, jump_pad, jump_pad_end>: New fields.
6669 (tracepoints): Use IP_AGENT_EXPORT.
6670 (last_tracepoint): Don't include in the IPA.
6671 (stopping_tracepoint): Use IP_AGENT_EXPORT.
6672 (trace_buffer_is_full): Use IP_AGENT_EXPORT.
6673 (alloced_trace_state_variables): New.
6674 (trace_state_variables): Use IP_AGENT_EXPORT.
6675 (traceframe_t): Delete unused variable.
6676 (circular_trace_buffer): Don't include in the IPA.
6677 (trace_buffer_start): Delete.
6678 (struct trace_buffer_control): New.
6679 (trace_buffer_free): Delete.
6680 (struct ipa_trace_buffer_control): New.
6681 (GDBSERVER_FLUSH_COUNT_MASK, GDBSERVER_FLUSH_COUNT_MASK_PREV)
6682 (GDBSERVER_FLUSH_COUNT_MASK_CURR, GDBSERVER_UPDATED_FLUSH_COUNT_BIT):
6683 New.
6684 (trace_buffer_ctrl): New.
6685 (TRACE_BUFFER_CTRL_CURR): New.
6686 (trace_buffer_start, trace_buffer_free, trace_buffer_end_free):
6687 Reimplement as macros.
6688 (trace_buffer_wrap): Delete.
6689 (traceframe_write_count, traceframe_read_count)
6690 (traceframes_created, tracing): Use IP_AGENT_EXPORT.
6691 (struct tracepoint_hit_ctx) <type>: New field.
6692 (struct fast_tracepoint_ctx): New.
6693 (memory_barrier): New.
6694 (cmpxchg): New.
6695 (record_tracepoint_error): Update atomically in the IPA.
6696 (clear_inferior_trace_buffer): New.
6697 (about_to_request_buffer_space): New.
6698 (trace_buffer_alloc): Handle GDBserver and inferior simulatenous
6699 updating the same buffer.
6700 (add_tracepoint): Default the tracepoint's type to trap
6701 tracepoint, and orig_size to -1.
6702 (get_trace_state_variable) [IN_PROCESS_AGENT]: Handle allocated
6703 internal variables.
6704 (create_trace_state_variable): New parameter `gdb'. Handle it.
6705 (clear_installed_tracepoints): Clear fast tracepoint jumps.
6706 (cmd_qtdp): Handle fast tracepoints.
6707 (cmd_qtdv): Adjust.
6708 (max_jump_pad_size): New.
6709 (gdb_jump_pad_head): New.
6710 (get_jump_space_head): New.
6711 (claim_jump_space): New.
6712 (sort_tracepoints): New.
6713 (MAX_JUMP_SIZE): New.
6714 (cmd_qtstart): Handle fast tracepoints. Sync tracepoints with the
6715 IPA.
6716 (stop_tracing) [IN_PROCESS_AGENT]: Don't include the tdisconnected
6717 support. Upload fast traceframes, and delete internal IPA
6718 breakpoints.
6719 (stop_tracing_handler): New.
6720 (flush_trace_buffer_handler): New.
6721 (cmd_qtstop): Upload fast tracepoints.
6722 (response_tracepoint): Handle fast tracepoints.
6723 (tracepoint_finished_step): Upload fast traceframes. Set the
6724 tracepoint hit context's tracepoint type.
6725 (handle_tracepoint_bkpts): New.
6726 (tracepoint_was_hit): Set the tracepoint hit context's tracepoint
6727 type. Add comment about fast tracepoints.
6728 (collect_data_at_tracepoint) [IN_PROCESS_AGENT]: Don't access the
6729 non-existing action_str field.
6730 (get_context_regcache): Handle fast tracepoints.
6731 (do_action_at_tracepoint) [!IN_PROCESS_AGENT]: Don't write the PC
6732 to the regcache.
6733 (fast_tracepoint_from_jump_pad_address): New.
6734 (fast_tracepoint_from_ipa_tpoint_address): New.
6735 (collecting_t): New.
6736 (force_unlock_trace_buffer): New.
6737 (fast_tracepoint_collecting): New.
6738 (collecting): New.
6739 (gdb_collect): New.
6740 (write_inferior_data_ptr): New.
6741 (target_tp_heap): New.
6742 (target_malloc): New.
6743 (download_agent_expr): New.
6744 (UALIGN): New.
6745 (download_tracepoints): New.
6746 (download_trace_state_variables): New.
6747 (upload_fast_traceframes): New.
6748 (IPA_FIRST_TRACEFRAME): New.
6749 (IPA_NEXT_TRACEFRAME_1): New.
6750 (IPA_NEXT_TRACEFRAME): New.
6751 [IN_PROCESS_AGENT]: Include sys/mman.h and fcntl.h.
6752 [IN_PROCESS_AGENT] (gdb_tp_heap_buffer, gdb_jump_pad_buffer)
6753 (gdb_jump_pad_buffer_end): New.
6754 [IN_PROCESS_AGENT] (initialize_tracepoint_ftlib): New.
6755 (initialize_tracepoint): Adjust.
6756 [IN_PROCESS_AGENT]: Allocate the IPA heap, and jump pad scratch
6757 buffer. Initialize the low module.
6758 * utils.c (PREFIX, TOOLNAME): New.
6759 (malloc_failure): Use PREFIX.
6760 (error): In the IPA, an error causes an exit.
6761 (fatal, warning): Use PREFIX.
6762 (internal_error): Use TOOLNAME.
6763 (NUMCELLS): Increase to 10.
6764 * configure, config.in: Regenerate.
6765
d149dd1d
PA
67662010-06-01 Pedro Alves <pedro@codesourcery.com>
6767
6768 * server.c (handle_query) <qSupported>: Do two passes over the
6769 qSupported string to avoid nesting strtok.
6770
f6528abd
JK
67712010-05-28 Jan Kratochvil <jan.kratochvil@redhat.com>
6772
6773 * Makefile.in (SFILES): Add $(srcdir)/proc-service.list.
6774 (CDEPS): New.
6775 * configure.ac (RDYNAMIC): New AC_MSG_CHECKING wrapping. Test also
6776 -Wl,--dynamic-list.
6777 * configure: Regenerate.
6778 * proc-service.list: New.
6779
ca2a87a0
JK
67802010-05-28 Jan Kratochvil <jan.kratochvil@redhat.com>
6781
6782 * linux-low.c (linux_core_of_thread): Fix crash on invalid CONTENT.
6783 New comment.
6784
363a6e9f
OS
67852010-05-26 Ozkan Sezer <sezeroz@gmail.com>
6786
6787 * gdbreplay.c (remote_open): Check error return from socket() call by
6788 its equality to -1 not by it being negative.
6789 * remote-utils.c (remote_open): Likewise.
6790
d23b6cb1
PA
67912010-05-23 Pedro Alves <pedro@codesourcery.com>
6792
6793 * config.h: Regenerate.
6794
28d3cf85
MK
67952010-05-19 Maxim Kuvyrkov <maxim@codesourcery.com>
6796
6797 * linux-m68k-low.c (ps_get_thread_area): Don't define if kernel
6798 doesn't provide PTRACE_GET_THREAD_AREA.
6799
fea36a59
MK
68002010-05-19 Maxim Kuvyrkov <maxim@codesourcery.com>
6801
6802 * linux-m68k-low.c: Include <asm/ptrace.h>
6803 (ps_get_thread_area): Implement.
6804
24b066ba
DE
68052010-05-03 Doug Evans <dje@google.com>
6806
6807 * event-loop.c (struct callback_event): New struct.
6808 (callback_list): New global.
6809 (append_callback_event, delete_callback_event): New functions.
6810 (process_callback): New function.
6811 (start_event_loop): Call it.
6812 * remote-utils.c (NOT_SCHEDULED): Define.
6813 (readchar_buf, readchar_bufcnt, readchar_bufp): New static globals,
6814 moved out of readchar.
6815 (readchar): Rewrite. Call reschedule before returning.
6816 (reset_readchar): New function.
6817 (remote_close): Call it.
6818 (process_remaining, reschedule): New functions.
6819 * server.h (callback_handler_func): New typedef.
6820 (append_callback_event, delete_callback_event): Declare.
6821
9836d6ea
PA
68222010-05-03 Pedro Alves <pedro@codesourcery.com>
6823
6824 * proc-service.c (ps_pglobal_lookup): Use
6825 thread_db_look_up_one_symbol.
6826 * remote-utils.c (look_up_one_symbol): Add new `may_ask_gdb'
6827 parameter. Use it instead of all_symbols_looked_up.
6828 * server.h (struct process_info) <all_symbols_looked_up>: Delete
6829 field.
6830 (all_symbols_looked_up): Don't declare.
6831 (look_up_one_symbol): Add new `may_ask_gdb' parameter.
6832 * thread-db.c (struct thread_db) <all_symbols_looked_up>: New
6833 field.
6834 (thread_db_look_up_symbols): Adjust call to look_up_one_symbol.
6835 Set all_symbols_looked_up here.
6836 (thread_db_look_up_one_symbol): New.
6837 (thread_db_get_tls_address): Adjust.
6838 (thread_db_load_search, try_thread_db_load_1): Always allocate the
6839 thread_db object on the heap, and tentatively set it in the
6840 process structure.
6841 (thread_db_init): Don't set all_symbols_looked_up here.
6842 * linux-low.h (thread_db_look_up_one_symbol): Declare.
6843
7984d532
PA
68442010-05-03 Pedro Alves <pedro@codesourcery.com>
6845
6846 * linux-low.c (linux_kill, linux_detach): Adjust.
6847 (status_pending_p_callback): Remove redundant statement. Check
6848 for !TARGET_WAITIKIND_IGNORE, instead of
6849 TARGET_WAITKIND_STOPPED.
6850 (handle_tracepoints): Make sure LWP is locked. Adjust.
6851 (linux_wait_for_event_1): Adjust.
6852 (linux_cancel_breakpoints): New.
6853 (unsuspend_one_lwp): New.
6854 (unsuspend_all_lwps): New.
6855 (linux_wait_1): If finishing a step-over, unsuspend all lwps.
6856 (send_sigstop_callback): Change return type to int, add new
6857 `except' parameter and handle it.
6858 (suspend_and_send_sigstop_callback): New.
6859 (stop_all_lwps): Add new `suspend' and `expect' parameters, and
6860 pass them down. If SUSPEND, also increment the lwp's suspend
6861 count.
6862 (linux_resume_one_lwp): Add notice about resuming a suspended LWP.
6863 (need_step_over_p): Don't consider suspended LWPs.
6864 (start_step_over): Adjust.
6865 (proceed_one_lwp): Change return type to int, add new `except'
6866 parameter and handle it.
6867 (unsuspend_and_proceed_one_lwp): New.
6868 (proceed_all_lwps): Use find_inferior instead of
6869 for_each_inferior.
6870 (unstop_all_lwps): Add `unsuspend' parameter. If UNSUSPEND, them
6871 also decrement the suspend count of LWPs. Pass `except' down,
6872 instead of hacking its suspend count.
6873 (linux_pause_all): Add `freeze' parameter. Adjust.
6874 (linux_unpause_all): New.
6875 (linux_target_ops): Install linux_unpause_all.
6876 * server.c (handle_status): Adjust.
6877 * target.h (struct target_ops): New fields `unpause_all' and
6878 `cancel_breakpoints'. Add new parameter to `pause_all'.
6879 (pause_all): Add new `freeze' parameter.
6880 (unpause_all): New.
6881 (cancel_breakpoints): New.
6882 * tracepoint.c (clear_installed_tracepoints): Pause threads, and
6883 cancel breakpoints.
6884 (cmd_qtstart): Pause threads.
6885 (stop_tracing): Pause threads, and cancel breakpoints.
6886 * win32-low.c (win32_target_ops): Adjust.
6887
e471f25b
PA
68882010-05-03 Pedro Alves <pedro@codesourcery.com>
6889
6890 * linux-low.c (linux_wait_for_event_1): Move passing the signal to
6891 the inferior right away from here...
6892 (linux_wait_1): ... to here, and adjust to check the thread's
6893 last_resume_kind instead of the lwp's step or stop_expected flags.
6894
1915ef4f
PA
68952010-05-02 Pedro Alves <pedro@codesourcery.com>
6896
6897 * README: Use consistent `GDB' and `GDBserver' spellings.
6898
f9e39928
PA
68992010-05-02 Pedro Alves <pedro@codesourcery.com>
6900
6901 * linux-low.c (linux_kill_one_lwp): Assume the lwp is stopped.
6902 (linux_kill): Stop all lwps here. Don't delete the main lwp here.
6903 (linux_detach_one_lwp): Assume the lwp is stopped.
6904 (any_thread_of): Delete.
6905 (linux_detach): Stop all lwps here. Don't blindly delete all
6906 breakpoints.
6907 (delete_lwp_callback): New.
6908 (linux_mourn): Delete all lwps of the process that is gone.
6909 (linux_wait_1): Don't delete the last lwp of the process here.
6910 * mem-break.h (mark_breakpoints_out): Declare.
6911 * mem-break.c (mark_breakpoints_out): New.
6912 (free_all_breakpoints): Use it.
6913 * server.c (handle_target_event): If the process is gone, mark
6914 breakpoints out.
6915 * thread-db.c (struct thread_db) <create_bp>: New field.
6916 (thread_db_enable_reporting): Fix prototype. Store a thread event
6917 breakpoint reference in the thread_db struct.
6918 (thread_db_load_search): Clear the thread_db object.
6919 (try_thread_db_load_1): Ditto.
6920 (switch_to_process): New.
6921 (disable_thread_event_reporting): Use it.
6922 (remove_thread_event_breakpoints): New.
6923 (thread_db_detach, thread_db_mourn): Use it.
6924
1e7fc18c
PA
69252010-05-01 Pedro Alves <pedro@codesourcery.com>
6926
6927 * linux-low.c (linux_enable_event_reporting): New.
6928 (linux_wait_for_event_1, handle_extended_wait): Use it.
6929
02fc4de7
PA
69302010-04-30 Pedro Alves <pedro@codesourcery.com>
6931
6932 * linux-low.c (linux_kill_one_lwp, linux_kill)
6933 (linux_detach_one_lwp): Adjust to send_sigstop interface change.
6934 (send_sigstop): Take an lwp_info as parameter instead. Queue a
6935 SIGSTOP even if the LWP is stopped.
6936 (send_sigstop_callback): New.
6937 (stop_all_lwps): Use send_sigstop_callback instead.
6938 (linux_resume_one_thread): Adjust.
6939 (proceed_one_lwp): Still proceed an LWP that the client has
6940 requested to stop, if we haven't reported it as stopped yet. Make
6941 sure that LWPs the client want stopped, have a pending SIGSTOP.
6942
bc3b5632
DE
69432010-04-26 Doug Evans <dje@google.com>
6944
ae1ada35
DE
6945 * server.c (handle_general_set): Make static.
6946
bc3b5632
DE
6947 * remote-utils.c (putpkt_binary_1): Call readchar instead of read.
6948 Print received char after testing for error/eof instead of before.
6949 (input_interrupt): Tweak comment.
6950
65730243
DE
69512010-04-23 Doug Evans <dje@google.com>
6952
6953 * server.c (start_inferior): Print inferior argv if --debug.
6954
a8ae7dc0
AR
69552010-04-21 Aleksandar Ristovski <aristovski@qnx.com>
6956
6957 * Makefile.in (nto_low_h nto-low.o nto-x86-low.o): New dependency lists.
6958 * nto-x86-low.c: Include server.h
6959
1c07cc19
PM
69602010-04-20 Pierre Muller <muller@ics.u-strasbg.fr>
6961
6962 * win32-i386-low.c: Use __x86_64__ macro instead of __x86_64 to
6963 be consistent with other sources of this directory.
6964 (init_registers_amd64): Correct name of source file of this function
6965 in the comment.
6966
e0a61e09
PM
69672010-04-19 Pierre Muller <muller@ics.u-strasbg.fr>
6968
6969 * configure.srv (x86_64-*-mingw*): New configuration for Windows
6970 64-bit executables.
6971
54709339
PM
69722010-04-19 Pierre Muller <muller@ics.u-strasbg.fr>
6973
6974 * win32-i386-low.c: Add 64-bit support.
6975 (CONTEXT_EXTENDED_REGISTERS): Set macro to zero if not exisiting.
6976 (init_registers_amd64): Declare.
6977 (mappings): Add 64-bit version of array.
6978 (init_windows_x86): New function.
6979 (the_low_target): Change init_arch field to init_windows_x86.
6980
e8f0053d
PM
69812010-04-19 Pierre Muller <muller@ics.u-strasbg.fr>
6982
6983 * win32-low.c: Adapt to support also 64-bit architecture.
6984 (child_xfer_memory): Use uintptr_t type for local variable `addr'.
6985 (get_image_name): Use SIZE_T type for local variable `done'.
6986 (psapi_get_dll_name): Use LPVOID type for parameter `BaseAddress'.
6987 (toolhelp_get_dll_name): Idem.
6988 (handle_load_dll): Use CORE_ADDR type for local variable `load_addr'.
6989 Use uintptr_t typecast to avoid warning.
6990 (handle_unload_dll): Use uintptr_t typecast to avoid warning.
6991 (handle_exception): Use phex_nz to avoid warning.
6992 (win32_wait): Remove unused local variable `process'.
6993
c481e77e
PM
69942010-04-19 Pierre Muller <muller@ics.u-strasbg.fr>
6995
6996 * configure.srv (srv_amd64_regobj): Replace `x86-64-avx.o' by
6997 `amd64-avx.o'.
6998
12ea4b69
PM
69992010-04-17 Pierre Muller <muller@ics.u-strasbg.fr>
7000
7001 * configure.ac: Use `ws2_32' library for srv_mingw.
7002 * configure: Regenerate.
7003 * gdbreplay.c: Include winsock2.h instead of winsock.h.
7004 * remote-utils.c: Likewise.
7005
f6d1620c
L
70062010-04-17 H.J. Lu <hongjiu.lu@intel.com>
7007
7008 * linux-x86-low.c (xmltarget_amd64_linux_no_xml): Define only
7009 if __x86_64__ is defined.
7010
8e642873
PM
70112010-04-16 Pierre Muller <muller@ics.u-strasbg.fr>
7012
7013 * configure: Regenerate.
7014
711e434b
PM
70152010-04-16 Pierre Muller <muller@ics.u-strasbg.fr>
7016
7017 * server.c (handle_query): Handle 'qGetTIBAddr' query.
7018 * target.h (target_ops): New get_tib_address field.
7019 * win32-low.h (win32_thread_info): Add thread_local_base field.
7020 * win32-low.c (child_add_thread): Add tlb argument.
7021 Set thread_local_base field to TLB.
7022 (get_child_debug_event): Adapt to child_add_thread change.
7023 (win32_get_tib_address): New function.
7024 (win32_target_ops): Set get_tib_address field to
7025 win32_get_tib_address.
7026 * linux-low.c (linux_target_ops): Set get_tib_address field to NULL.
7027
505106cd
PA
70282010-04-12 Pedro Alves <pedro@codesourcery.com>
7029
505106cd
PA
7030 * linux-low.c (linux_mourn): Also remove the process.
7031 * server.c (handle_target_event): Don't remove the process here.
7032 * nto-low.c (nto_mourn): New.
7033 (nto_target_ops): Install it.
7034 * spu-low.c (spu_mourn): New.
7035 (spu_target_ops): Install it.
7036 * win32-low.c (win32_mourn): New.
7037 (win32_target_ops): Install it.
7038
e8470a06
PA
70392010-04-12 Pedro Alves <pedro@codesourcery.com>
7040
7041 * server.h (buffer_xml_printf): Remove redundant `;'.
7042
45ba0d02
PA
70432010-04-12 Pedro Alves <pedro@codesourcery.com>
7044
7045 * regcache.c (set_register_cache): Invalidate regcaches before
7046 changing the register cache layout.
7047 (regcache_invalidate_one): Allow a NULL regcache.
7048 * linux-x86-low.c (x86_linux_update_xmltarget): Invalidate
7049 regcaches before changing the register cache layout or the target
7050 regsets.
7051
59e04013
L
70522010-04-12 H.J. Lu <hongjiu.lu@intel.com>
7053
7054 * linux-x86-low.c (x86_linux_update_xmltarget): Avoid unused
7055 variable warning on Linux/x86-64.
7056
8336d594
PA
70572010-04-11 Pedro Alves <pedro@codesourcery.com>
7058
7059 GDBserver disconnected tracing support.
7060
7061 * linux-low.c (linux_remove_process): Delete.
7062 (add_lwp): Don't set last_resume_kind here.
7063 (linux_kill): Use `mourn'.
7064 (linux_detach): Use `thread_db_detach', and `mourn'.
7065 (linux_mourn): New.
7066 (linux_attach_lwp_1): Adjust comment.
7067 (linux_attach): last_resume_kind moved the thread_info; adjust.
7068 (status_pending_p_callback): Adjust.
7069 (linux_wait_for_event_1): Adjust.
7070 (count_events_callback, select_singlestep_lwp_callback)
7071 (select_event_lwp_callback, cancel_breakpoints_callback)
7072 (db_wants_lwp_stopped, linux_wait_1, need_step_over_p)
7073 (proceed_one_lwp): Adjust.
7074 (linux_async): Add debug output.
7075 (linux_thread_stopped): New.
7076 (linux_pause_all): New.
7077 (linux_target_ops): Install linux_mourn, linux_thread_stopped and
7078 linux_pause_all.
7079 * linux-low.h (struct lwp_info): Delete last_resume_kind field.
7080 (thread_db_free): Delete declaration.
7081 (thread_db_detach, thread_db_mourn): Declare.
7082 * thread-db.c (thread_db_init): Use thread_db_mourn.
7083 (thread_db_free): Delete, split in two.
7084 (disable_thread_event_reporting): New.
7085 (thread_db_detach): New.
7086 (thread_db_mourn): New.
7087
7088 * server.h (struct thread_info) <last_resume_kind>: New field.
7089 <attached>: Add comment.
7090 <gdb_detached>: New field.
7091 (handler_func): Change return type to int.
7092 (handle_serial_event, handle_target_event): Ditto.
7093 (gdb_connected): Declare.
7094 (tracing): Delete.
7095 (disconnected_tracing): Declare.
7096 (stop_tracing): Declare.
7097
7098 * server.c (handle_query) <qSupported>: Report support for
7099 disconnected tracing.
7100 (queue_stop_reply_callback): Account for running threads.
7101 (gdb_wants_thread_stopped): New.
7102 (gdb_wants_all_threads_stopped): New.
7103 (gdb_reattached_process): New.
7104 (handle_status): Clear the `gdb_detached' flag of all processes.
7105 In all-stop, stop all threads.
7106 (main): Be sure to leave tfind mode. Handle disconnected tracing.
7107 (process_serial_event): If the remote connection breaks, or if an
7108 exit was forced with "monitor exit", force an event loop exit.
7109 Handle disconnected tracing on detach.
7110 (handle_serial_event): Adjust.
7111 (handle_target_event): If GDB isn't connected, forward events back
7112 to the inferior, unless the last process exited, in which case,
7113 exit gdbserver. Adjust interface.
7114
7115 * remote-utils.c (remote_open): Don't block in accept. Instead
7116 register an event loop source on the listen socket file
7117 descriptor. Refactor bits into ...
7118 (listen_desc): ... this new global.
7119 (gdb_connected): ... this new function.
7120 (enable_async_notification): ... this new function.
7121 (handle_accept_event): ... this new function.
7122 (remote_close): Clear remote_desc.
7123
7124 * inferiors.c (add_thread): Set the new thread's last_resume_kind.
7125
7126 * target.h (struct target_ops) <mourn, thread_stopped, pause_all>:
7127 New fields.
7128 (mourn_inferior): Define.
7129 (target_process_qsupported): Avoid the dangling else problem.
7130 (thread_stopped): Define.
7131 (pause_all): Define.
7132 (target_waitstatus_to_string): Declare.
7133 * target.c (target_waitstatus_to_string): New.
7134
7135 * tracepoint.c (tracing): Make extern.
7136 (disconnected_tracing): New.
7137 (stop_tracing): Make extern. Handle tracing stops due to GDB
7138 disconnecting.
7139 (cmd_qtdisconnected): New.
7140 (cmd_qtstatus): Report disconnected tracing status in trace reply.
7141 (handle_tracepoint_general_set): Handle QTDisconnected.
7142
7143 * event-loop.c (event_handler_func): Change return type to int.
7144 (process_event): Bail out if the event handler wants the event
7145 loop to stop.
7146 (handle_file_event): Ditto.
7147 (start_event_loop): Bail out if the event handler wants the event
7148 loop to stop.
7149
7150 * nto-low.c (nto_target_ops): Adjust.
7151 * spu-low.c (spu_wait): Don't remove the process here.
7152 (spu_target_ops): Adjust.
7153 * win32-low.c (win32_wait): Don't remove the process here.
7154 (win32_target_ops): Adjust.
7155
5d267c4c
PA
71562010-04-11 Pedro Alves <pedro@codesourcery.com>
7157
7158 * regcache.c (realloc_register_cache): Invalidate inferior's
7159 regcache before recreating it.
7160
623ccd72
PA
71612010-04-09 Pedro Alves <pedro@codesourcery.com>
7162
7163 * tracepoint.c (cmd_qtstatus): Report trace buffer circularity.
7164
219f2f23
PA
71652010-04-09 Stan Shebs <stan@codesourcery.com>
7166 Pedro Alves <pedro@codesourcery.com>
7167
7168 * server.h (LONGEST): New.
7169 (struct thread_info) <while_stepping>: New field.
7170 (unpack_varlen_hex, xrealloc, pulongest, plongest, phex_nz):
7171 Declare.
7172 (initialize_tracepoint, handle_tracepoint_general_set)
7173 (handle_tracepoint_query, tracepoint_finished_step)
7174 (tracepoint_was_hit, release_while_stepping_state_list):
7175 (current_traceframe): Declare.
7176 * server.c (handle_general_set): Handle tracepoint packets.
7177 (read_memory): New.
7178 (write_memory): New.
7179 (handle_search_memory_1): Use read_memory.
7180 (handle_query): Report support for conditional tracepoints, trace
7181 state variables, and tracepoint sources. Handle tracepoint
7182 queries.
7183 (main): Initialize the tracepoints module.
7184 (process_serial_event): Handle traceframe reads/writes.
7185
7186 * linux-low.c (handle_tracepoints): New.
7187 (linux_wait_1): Call it.
7188 (linux_resume_one_lwp): Handle while-stepping.
7189 (linux_supports_tracepoints, linux_read_pc, linux_write_pc): New.
7190 (linux_target_ops): Install them.
7191 * linux-low.h (struct linux_target_ops) <supports_tracepoints>:
7192 New field.
7193 * linux-x86-low.c (x86_supports_tracepoints): New.
7194 (the_low_target). Install it.
7195
7196 * mem-break.h (delete_breakpoint): Declare.
7197 * mem-break.c (delete_breakpoint): Make external.
7198
7199 * target.h (struct target_ops): Add `supports_tracepoints',
7200 `read_pc', and `write_pc' fields.
7201 (target_supports_tracepoints): Define.
7202 * utils.c (xrealloc, decimal2str, pulongest, plongest, thirty_two)
7203 (phex_nz): New.
7204
7205 * regcache.h (struct regcache) <registers_owned>: New field.
7206 (init_register_cache, regcache_cpy): Declare.
7207 (regcache_read_pc, regcache_write_pc): Declare.
7208 (register_cache_size): Declare.
7209 (supply_regblock): Declare.
7210 * regcache.c (init_register_cache): New.
7211 (new_register_cache): Use it.
7212 (regcache_cpy): New.
7213 (register_cache_size): New.
7214 (supply_regblock): New.
7215 (regcache_read_pc, regcache_write_pc): New.
889bf7c5 7216
219f2f23
PA
7217 * tracepoint.c: New.
7218
7219 * Makefile.in (OBS): Add tracepoint.o.
7220 (tracepoint.o): New rule.
7221
3a13a53b
L
72222010-04-08 H.J. Lu <hongjiu.lu@intel.com>
7223
7224 * Makefile.in (clean): Also remove i386-mmx.c i386-mmx-linux.c.
7225 (i386-mmx.o): New.
7226 (i386-mmx.c): Likewise.
7227 (i386-mmx-linux.o): Likewise.
7228 (i386-mmx-linux.c): Likewise.
7229
7230 * configure.srv (srv_i386_regobj): Add i386-mmx.o.
7231 (srv_i386_linux_regobj): Add i386-mmx-linux.o.
7232 (srv_i386_xmlfiles): Add i386/i386-mmx.xml.
7233 (srv_i386_linux_xmlfiles): Add i386/i386-mmx-linux.xml.
7234
7235 * linux-x86-low.c (init_registers_i386_mmx_linux): New.
7236 (x86_linux_update_xmltarget): Call init_registers_i386_mmx_linux
7237 and return if ptrace PTRACE_GETFPXREGS failed in 32bit.
7238
1570b33e
L
72392010-04-07 H.J. Lu <hongjiu.lu@intel.com>
7240
7241 * Makefile.in (clean): Updated.
7242 (i386-avx.o): New.
7243 (i386-avx.c): Likewise.
7244 (i386-avx-linux.o): Likewise.
7245 (i386-avx-linux.c): Likewise.
7246 (amd64-avx.o): Likewise.
7247 (amd64-avx.c): Likewise.
7248 (amd64-avx-linux.o): Likewise.
7249 (amd64-avx-linux.c): Likewise.
7250
7251 * configure.srv (srv_i386_regobj): Add i386-avx.o.
7252 (srv_i386_linux_regobj): Add i386-avx-linux.o.
7253 (srv_amd64_regobj): Add amd64-avx.o.
7254 (srv_amd64_linux_regobj): Add amd64-avx-linux.o.
7255 (srv_i386_32bit_xmlfiles): Add i386/32bit-avx.xml.
7256 (srv_i386_64bit_xmlfiles): Add i386/64bit-avx.xml.
7257 (srv_i386_xmlfiles): Add i386/i386-avx.xml.
7258 (srv_amd64_xmlfiles): Add i386/amd64-avx.xml.
7259 (srv_i386_linux_xmlfiles): Add i386/i386-avx-linux.xml.
7260 (srv_amd64_linux_xmlfiles): Add i386/amd64-avx-linux.xml.
7261
7262 * i387-fp.c: Include "i386-xstate.h".
7263 (i387_xsave): New.
7264 (i387_cache_to_xsave): Likewise.
7265 (i387_xsave_to_cache): Likewise.
7266 (x86_xcr0): Likewise.
7267
7268 * i387-fp.h (i387_cache_to_xsave): Likewise.
7269 (i387_xsave_to_cache): Likewise.
7270 (x86_xcr0): Likewise.
7271
7272 * linux-arm-low.c (target_regsets): Initialize nt_type to 0.
7273 * linux-crisv32-low.c (target_regsets): Likewise.
7274 * linux-m68k-low.c (target_regsets): Likewise.
7275 * linux-mips-low.c (target_regsets): Likewise.
7276 * linux-ppc-low.c (target_regsets): Likewise.
7277 * linux-s390-low.c (target_regsets): Likewise.
7278 * linux-sh-low.c (target_regsets): Likewise.
7279 * linux-sparc-low.c (target_regsets): Likewise.
7280 * linux-xtensa-low.c (target_regsets): Likewise.
7281
7282 * linux-low.c: Include <sys/uio.h>.
7283 (regsets_fetch_inferior_registers): Support nt_type.
7284 (regsets_store_inferior_registers): Likewise.
7285 (linux_process_qsupported): New.
7286 (linux_target_ops): Add linux_process_qsupported.
7287
7288 * linux-low.h (regset_info): Add nt_type.
7289 (linux_target_ops): Add process_qsupported.
7290
7291 * linux-x86-low.c: Include "i386-xstate.h", "elf/common.h"
7292 and <sys/uio.h>.
7293 (init_registers_i386_avx_linux): New.
7294 (init_registers_amd64_avx_linux): Likewise.
7295 (xmltarget_i386_linux_no_xml): Likewise.
7296 (xmltarget_amd64_linux_no_xml): Likewise.
7297 (PTRACE_GETREGSET): Likewise.
7298 (PTRACE_SETREGSET): Likewise.
7299 (x86_fill_xstateregset): Likewise.
7300 (x86_store_xstateregset): Likewise.
7301 (use_xml): Likewise.
7302 (x86_linux_update_xmltarget): Likewise.
7303 (x86_linux_process_qsupported): Likewise.
7304 (target_regsets): Add NT_X86_XSTATE entry and Initialize nt_type.
7305 (x86_arch_setup): Don't call init_registers_amd64_linux nor
7306 init_registers_i386_linux here. Call
7307 x86_linux_update_xmltarget.
7308 (the_low_target): Add x86_linux_process_qsupported.
7309
7310 * server.c (handle_query): Call target_process_qsupported.
7311
7312 * target.h (target_ops): Add process_qsupported.
7313 (target_process_qsupported): New.
7314
fc7238bb
PA
73152010-04-03 Pedro Alves <pedro@codesourcery.com>
7316
7317 * inferiors.c (add_thread): Set last_status kind to
7318 TARGET_WAITKIND_IGNORE.
7319 * linux-low.c (cancel_breakpoint): Remove unnecessary regcache
7320 fetch. Use ptid_of. Avoid unnecessary get_lwp_thread calls.
7321 (linux_wait_1): Move `thread' local definition to block that uses
7322 it. Don't NULL initialize `event_child'.
7323 (linux_resume_one_thread): Avoid unnecessary get_lwp_thread calls.
7324 Alway set the thread's last_status to TARGET_WAITKIND_IGNORE.
7325 * linux-x86-low.c (x86_breakpoint_at): Read raw memory.
7326
bdabb078
PA
73272010-04-01 Pedro Alves <pedro@codesourcery.com>
7328
7329 * linux-low.c (get_stop_pc): Don't adjust the PC if stopped with
7330 an extended waitstatus, or by a watchpoint.
7331 (cancel_breakpoints_callback): Don't cancel a breakpoint if the
7332 thread was stepping or has been stopped by a watchpoint.
7333
d3bbe7a0
PA
73342010-04-01 Pedro Alves <pedro@codesourcery.com>
7335
7336 * mem-break.c (struct raw_breakpoint): New field shlib_disabled.
7337 (set_gdb_breakpoint_at): If GDB is inserting a breakpoint on top
7338 of another, then delete the previous, and validate all
7339 breakpoints.
7340 (validate_inserted_breakpoint): New.
7341 (delete_disabled_breakpoints): New.
7342 (validate_breakpoints): New.
7343 (check_mem_read): Validate breakpoints before trusting their
7344 shadow. Delete disabled breakpoints.
7345 (check_mem_write): Validate breakpoints before trusting they
7346 should be inserted. Delete disabled breakpoints.
7347 * mem-break.h (validate_breakpoints):
7348 * server.c (handle_query): Validate breakpoints when we see a
7349 qSymbol query.
7350
8b07ae33
PA
73512010-04-01 Pedro Alves <pedro@codesourcery.com>
7352
7353 * linux-low.c (linux_wait_1): Avoid setting need_step_over is
7354 there's a GDB breakpoint at stop_pc. Always report a trap to GDB
7355 if we could tell there's a GDB breakpoint at stop_pc.
7356 (need_step_over_p): Don't do a step over if we find a GDB
7357 breakpoint at the resume PC.
7358
7359 * mem-break.c (struct raw_breakpoint): New.
7360 (enum bkpt_type): New type `gdb_breakpoint'.
7361 (struct breakpoint): Delete the `PC', `old_data' and `inserted'
7362 fields. New field `raw'.
7363 (find_raw_breakpoint_at): New.
7364 (set_raw_breakpoint_at): Handle refcounting. Create a raw
7365 breakpoint instead.
7366 (set_breakpoint_at): Adjust.
7367 (delete_raw_breakpoint): New.
7368 (release_breakpoint): New.
7369 (delete_breakpoint): Rename to...
7370 (delete_breakpoint_1): ... this. Add proc parameter. Use
7371 release_breakpoint. Return ENOENT.
7372 (delete_breakpoint): Reimplement.
7373 (find_breakpoint_at): Delete.
7374 (find_gdb_breakpoint_at): New.
7375 (delete_breakpoint_at): Delete.
7376 (set_gdb_breakpoint_at): New.
7377 (delete_gdb_breakpoint_at): New.
7378 (gdb_breakpoint_here): New.
7379 (set_reinsert_breakpoint): Use release_breakpoint.
7380 (uninsert_breakpoint): Rename to ...
7381 (uninsert_raw_breakpoint): ... this.
7382 (uninsert_breakpoints_at): Adjust to handle raw breakpoints.
7383 (reinsert_raw_breakpoint): Change parameter type to
7384 raw_breakpoint.
7385 (reinsert_breakpoints_at): Adjust to handle raw breakpoints
7386 instead.
7387 (check_breakpoints): Adjust. Use release_breakpoint.
7388 (breakpoint_here): Rewrite using find_raw_breakpoint_at.
7389 (breakpoint_inserted_here): Ditto.
7390 (check_mem_read): Adjust to iterate over raw breakpoints instead.
7391 Don't trust the breakpoint's shadow if it is not inserted.
7392 (check_mem_write): Adjust to iterate over raw breakpoints instead.
7393 (delete_all_breakpoints): Adjust.
7394 (free_all_breakpoints): Mark all breakpoints as uninserted, and
7395 use delete_breakpoint_1.
7396
7397 * mem-break.h (breakpoints_supported): Delete declaration.
7398 (set_gdb_breakpoint_at): Declare.
7399 (gdb_breakpoint_here): Declare.
7400 (delete_breakpoint_at): Delete.
7401 (delete_gdb_breakpoint_at): Declare.
7402
7403 * server.h (struct raw_breakpoint): Forward declare.
7404 (struct process_info): New field `raw_breakpoints'.
7405
7406 * linux-x86-low.c (x86_insert_point, x86_remote_point): Handle Z0
7407 breakpoints.
7408
6bf5e0ba
PA
74092010-03-24 Pedro Alves <pedro@codesourcery.com>
7410
7411 * linux-low.c (status_pending_p_callback): Fix comment.
7412 (linux_wait_for_event_1): Move most of the internal breakpoint
7413 handling from here...
7414 (linux_wait_1): ... to here.
7415 (count_events_callback): New.
7416 (select_singlestep_lwp_callback): New.
7417 (select_event_lwp_callback): New.
7418 (cancel_breakpoints_callback): New.
7419 (select_event_lwp): New.
7420 (linux_wait_1): Simplify internal breakpoint handling. Give equal
7421 priority to all LWPs that have had events that should be reported
7422 to the client. Cancel breakpoints when about to reporting the
7423 event to the client, not while stopping lwps. No longer cancel
7424 finished single-steps here.
7425 (cancel_finished_single_step): Delete.
7426 (cancel_finished_single_steps): Delete.
7427
414a389f
PA
74282010-03-24 Pedro Alves <pedro@codesourcery.com>
7429
7430 * mem-break.c (enum bkpt_type): New.
7431 (struct breakpoint): New field `type'.
7432 (set_breakpoint_at): Change return type to struct breakpoint
7433 pointer. Set type to `other_breakpoint' by default.
7434 (delete_breakpoint): Rewrite, supporting more than one breakpoint
7435 in the breakpoint list.
7436 (delete_reinsert_breakpoints): Only delete reinsert breakpoints.
7437 (reinsert_breakpoint): Rename to ...
7438 (reinsert_raw_breakpoint): ... this.
7439 (reinsert_breakpoints_at): Adjust.
7440 * mem-break.h (struct breakpoint): Declare.
7441 (set_breakpoint_at): Change return type to struct breakpoint
7442 pointer.
7443
2280c721
PA
74442010-03-24 Pedro Alves <pedro@codesourcery.com>
7445
7446 * server.c (handle_query): Assign, not compare.
7447
d50171e4
PA
74482010-03-24 Pedro Alves <pedro@codesourcery.com>
7449
7450 Teach linux gdbserver to step-over-breakpoints.
7451
7452 * linux-low.c (can_hardware_single_step): New.
7453 (supports_breakpoints): New.
7454 (handle_extended_wait): If stopping threads, read the stop pc of
7455 the new cloned LWP.
7456 (get_pc): New.
7457 (get_stop_pc): Add `lwp' parameter. Handle it. Bail out if the
7458 low target doesn't support retrieving the PC.
7459 (add_lwp): Set last_resume_kind to resume_continue.
7460 (linux_attach_lwp_1): Adjust comments. Always set stop_expected.
7461 (linux_attach): Don't clear stop_expected. Set the lwp's
7462 last_resume_kind to resume_stop.
7463 (linux_detach_one_lwp): Don't check for removed breakpoints.
7464 (check_removed_breakpoint): Delete.
7465 (status_pending_p): Rename to ...
7466 (status_pending_p_callback): ... this. Don't check for removed
7467 breakpoints. Don't consider threads that are stopped from GDB's
7468 perspective.
7469 (linux_wait_for_lwp): Always read the stop_pc here.
7470 (cancel_breakpoint): New.
7471 (step_over_bkpt): New global.
7472 (linux_wait_for_event_1): Implement stepping over breakpoints.
7473 (gdb_wants_lwp_stopped): New.
7474 (gdb_wants_all_stopped): New.
7475 (linux_wait_1): Tag threads as gdb-wants-stopped. Cancel finished
7476 single-step traps here. Store the thread's last reported target
7477 wait status.
7478 (send_sigstop): Don't clear stop_expected. Always set it,
7479 instead.
7480 (mark_lwp_dead): Remove reference to pending_is_breakpoint.
7481 (cancel_finished_single_step): New.
7482 (cancel_finished_single_steps): New.
7483 (wait_for_sigstop): Don't cancel finished single-step traps here.
7484 (linux_resume_one_lwp): Don't check for removed breakpoints.
7485 Don't set `step' on non-hardware step archs.
7486 (linux_set_resume_request): Ignore resume_stop requests if already
7487 stopping or stopped. Set the lwp's last_resume_kind.
7488 (resume_status_pending_p): Don't check for removed breakpoints.
7489 (need_step_over_p): New.
7490 (start_step_over): New.
7491 (finish_step_over): New.
7492 (linux_resume_one_thread): Always queue a sigstop for resume_stop
7493 requests. Clear the thread's last reported target waitstatus.
7494 Don't use the `suspended' flag. Don't consider pending breakpoints.
7495 (linux_resume): Start a step-over if necessary.
7496 (proceed_one_lwp): New.
7497 (proceed_all_lwps): New.
7498 (unstop_all_lwps): New.
7499 * linux-low.h (struct lwp_info): Rewrite comment for the
7500 `suspended' flag. Add the `stop_pc' field. Delete the
7501 `pending_stop_pc' field. Tweak the `stepping' flag's comment.
7502 Add `'last_resume_kind' and `need_step_over' fields.
7503 * inferiors.c (struct thread_info): Delete, moved elsewhere.
7504 * mem-break.c (struct breakpoint): Delete `reinserting' flag.
7505 Delete `breakpoint_to_reinsert' field. New flag `inserted'.
7506 (set_raw_breakpoint_at): New.
7507 (set_breakpoint_at): Rewrite to use it.
7508 (reinsert_breakpoint_handler): Delete.
7509 (set_reinsert_breakpoint): New.
7510 (reinsert_breakpoint_by_bp): Delete.
7511 (delete_reinsert_breakpoints): New.
7512 (uninsert_breakpoint): Rewrite.
7513 (uninsert_breakpoints_at): New.
7514 (reinsert_breakpoint): Rewrite.
7515 (reinsert_breakpoints_at): New.
7516 (check_breakpoints): Rewrite.
7517 (breakpoint_here): New.
7518 (breakpoint_inserted_here): New.
7519 (check_mem_read): Adjust.
7520 * mem-break.h (breakpoints_supported, breakpoint_here)
7521 (breakpoint_inserted_here, set_reinsert_breakpoint): Declare.
7522 (reinsert_breakpoint_by_bp): Delete declaration.
7523 (delete_reinsert_breakpoints): Declare.
7524 (reinsert_breakpoint): Delete declaration.
7525 (reinsert_breakpoints_at): Declare.
7526 (uninsert_breakpoint): Delete declaration.
7527 (uninsert_breakpoints_at): Declare.
7528 (check_breakpoints): Adjust prototype.
7529 * server.h: Adjust include order.
7530 (struct thread_info): Declare here. Add a `last_status' field.
7531
30ba68cb
MS
75322010-03-23 Michael Snyder <msnyder@vmware.com>
7533
7534 * server.c (crc32): New function.
7535 (handle_query): Add handling for 'qCRC:' request.
7536
b9a881c2
PA
75372010-03-23 Pedro Alves <pedro@codesourcery.com>
7538
7539 * linux-x86-low.c (x86_linux_prepare_to_resume): Clear DR6 if the
7540 lwp had been stopped by a watchpoint.
7541
e92d13d5
PA
75422010-03-16 Pedro Alves <pedro@codesourcery.com>
7543
7544 * server.h (internal_error): Declare.
7545 (gdb_assert, ASSERT_FUNCTION, gdb_assert_fail): Define.
7546 * utils.c (internal_error): New function.
7547
64daa791
AS
75482010-03-15 Andreas Schwab <schwab@redhat.com>
7549
7550 * configure.srv: Fix typo setting srv_regobj.
7551
f52cd8cd
PA
75522010-03-15 Pedro Alves <pedro@codesourcery.com>
7553
7554 * linux-low.c (fetch_register): Avoid passing a non string literal
7555 format to `error'.
7556 (usr_store_inferior_registers): Ditto.
7557
93ae6fdc
PA
75582010-03-14 Pedro Alves <pedro@codesourcery.com>
7559
7560 * linux-low.c (linux_write_memory): Bail out early if peeking
7561 memory failed.
7562
c3adc08c
PA
75632010-03-14 Pedro Alves <pedro@codesourcery.com>
7564
7565 * linux-low.h (struct lwp_info): New fields
7566 `stopped_by_watchpoint' and `stopped_data_address'.
7567 * linux-low.c (linux_wait_for_lwp): Check for watchpoint triggers
7568 here, and cache them in the lwp object.
7569 (wait_for_sigstop): Check stopped_by_watchpoint lwp field
7570 directly.
7571 (linux_resume_one_lwp): Clear the lwp's stopped_by_watchpoint
7572 field.
7573 (linux_stopped_by_watchpoint): Rewrite.
7574 (linux_stopped_data_address): Rewrite.
7575
bce522a2
PA
75762010-03-06 Simo Melenius <simo.melenius@iki.fi>
7577
7578 * linux-low.c (linux_wait_for_lwp): Fetch the regcache after
7579 switching the current inferior, not before.
7580
90884b2b
L
75812010-03-01 H.J. Lu <hongjiu.lu@intel.com>
7582
7583 * Makefile.in (clean): Replace reg-i386.c, reg-x86-64.c,
7584 reg-i386-linux.c and reg-x86-64-linux.c with i386.c, amd64.c,
7585 i386-linux.c and amd64-linux.c.
7586 (reg-i386.o): Removed.
7587 (reg-i386.c): Likewise.
7588 (reg-i386-linux.o): Likewise.
7589 (reg-i386-linux.c): Likewise.
7590 (reg-x86-64.o): Likewise.
7591 (reg-x86-64.c): Likewise.
7592 (reg-x86-64-linux.o): Likewise.
7593 (reg-x86-64-linux.c): Likewise.
7594 (i386.o): New.
7595 (i386.c): Likewise.
7596 (i386-linux.o): Likewise.
7597 (i386-linux.c): Likewise.
7598 (amd64.o): Likewise.
7599 (amd64.c): Likewise.
7600 (amd64-linux.o): Likewise.
7601 (amd64-linux.c): Likewise.
7602
7603 * configure.srv (srv_i386_regobj): New.
7604 (srv_i386_linux_regobj): Likewise.
7605 (srv_amd64_regobj): Likewise.
7606 (srv_amd64_linux_regobj): Likewise.
7607 (srv_i386_32bit_xmlfiles): Likewise.
7608 (srv_i386_64bit_xmlfiles): Likewise.
7609 (srv_i386_xmlfiles): Likewise.
7610 (srv_amd64_xmlfiles): Likewise.
7611 (srv_i386_linux_xmlfiles): Likewise.
7612 (srv_amd64_linux_xmlfiles): Likewise.
7613 (i[34567]86-*-cygwin*): Set srv_regobj to $srv_i386_regobj. Set
7614 srv_xmlfiles to $srv_i386_xmlfiles.
7615 (i[34567]86-*-mingw32ce*): Likewise.
7616 (i[34567]86-*-mingw*): Likewise.
7617 (i[34567]86-*-nto*): Likewise.
7618 (i[34567]86-*-linux*): Set srv_regobj to $srv_i386_linux_regobj
7619 and $srv_amd64_linux_regobj. Set srv_xmlfiles to
7620 $srv_i386_linux_xmlfiles and $srv_amd64_linux_xmlfiles.
7621 (x86_64-*-linux*): Likewise.
7622
7623 * linux-x86-low.c (init_registers_x86_64_linux): Removed.
7624 (init_registers_amd64_linux): New.
7625 (x86_arch_setup): Replace init_registers_x86_64_linux with
7626 init_registers_amd64_linux.
7627
193f13e6
MK
76282010-02-23 Maxim Kuvyrkov <maxim@codesourcery.com>
7629
7630 * configure.ac: Check for libdl. If it is not available link against
7631 static libthread_db.
7632 * configure: Regenerate.
7633
85d721b8
PA
76342010-02-22 Pedro Alves <pedro@codesourcery.com>
7635
7636 PR9605
7637
7638 * i386-low.c (i386_length_and_rw_bits): Throw a fatal error if
7639 handing a read watchpoint.
7640 (i386_low_insert_watchpoint): Read watchpoints aren't supported.
7641
6076632b
DE
76422010-02-12 Doug Evans <dje@google.com>
7643
7644 * linux-low.c (linux_supports_tracefork_flag): Document.
7645 (linux_look_up_symbols): Add comment.
7646
3327ccf7
L
76472010-02-03 H.J. Lu <hongjiu.lu@intel.com>
7648
7649 * regcache.c (supply_register): Clear regcache if buf is NULL.
7650
0718675c 76512010-02-02 Nicolas Roche <roche@sourceware.org>
3327ccf7 7652 Joel Brobecker <brobecker@adacore.com>
0718675c
JB
7653
7654 * inferiors.c (find_inferior): Add function documentation.
7655 (unloaded_dll): Handle the case where the unloaded dll has not
7656 been previously registered in the dll list.
7657
177321bd
DJ
76582010-02-01 Daniel Jacobowitz <dan@codesourcery.com>
7659
7660 * linux-arm-low.c (thumb_breakpoint_len): Delete.
7661 (thumb2_breakpoint): New.
7662 (arm_breakpoint_at): Check for Thumb-2 breakpoints.
7663
2b009048
DJ
76642010-01-29 Daniel Jacobowitz <dan@codesourcery.com>
7665
7666 * linux-low.c (get_stop_pc): Check for SIGTRAP.
7667 (linux_wait_for_event_1): Handle SIGILL and SIGSEGV as possible
7668 breakpoints.
7669
3be029c7
PA
76702010-01-21 Pedro Alves <pedro@codesourcery.com>
7671
7672 * linux-ppc-low.c (ppc_arch_setup): Adjust to regcache changes.
7673
18f5de3b
JK
76742010-01-21 Jan Kratochvil <jan.kratochvil@redhat.com>
7675
7676 * linux-s390-low.c (s390_collect_ptrace_register)
7677 (s390_supply_ptrace_register): Adjust it for the new regcache parameter.
7678
3743bb4f
DE
76792010-01-21 Doug Evans <dje@google.com>
7680
14ce3065
DE
7681 * linux-low.c (PTRACE_ARG3_TYPE): Change from long to void*.
7682 (PTRACE_ARG4_TYPE): New macro.
7683 (handle_extended_wait): Cast ptrace arg4 to PTRACE_ARG4_TYPE.
7684 (linux_wait_for_event_1, linux_resume_one_lwp): Ditto.
7685 (fetch_register): Cast to uintptr_t before casting to PTRACE_ARG3_TYPE.
7686 (usr_store_inferior_registers): Ditto.
7687 (linux_read_memory, linux_write_memory): Ditto.
7688 (linux_test_for_tracefork): Ditto.
7689
3743bb4f
DE
7690 * linux-arm-low.c: Remove redundant include of gdb_proc_service.h.
7691 Only include elf.h if gdb_proc_service.h didn't include linux/elf.h.
7692
8b315be5
PA
76932010-01-21 Pedro Alves <pedro@codesourcery.com>
7694
7695 * proc-service.c (ps_lgetregs): Don't refetch registers from the
7696 target.
7697
85492558
PA
76982010-01-21 Pedro Alves <pedro@codesourcery.com>
7699
7700 * spu-low.c (spu_fetch_registers, spu_store_registers): Change
7701 prototype to take a regcache. Adjust.
7702
442ea881
PA
77032010-01-20 Pedro Alves <pedro@codesourcery.com>
7704
7705 * regcache.h (struct thread_info): Forward declare.
7706 (struct regcache): New.
7707 (new_register_cache): Adjust prototype.
7708 (get_thread_regcache): Declare.
7709 (free_register_cache): Adjust prototype.
7710 (registers_to_string, registers_from_string): Ditto.
7711 (supply_register, supply_register_by_name, collect_register)
7712 (collect_register_as_string, collect_register_by_name): Ditto.
7713 * regcache.c (struct inferior_regcache_data): Delete.
7714 (get_regcache): Rename to ...
7715 (get_thread_regcache): ... this. Adjust. Switch inferior before
7716 fetching registers.
7717 (regcache_invalidate_one): Adjust.
7718 (regcache_invalidate): Fix prototype.
7719 (new_register_cache): Return the new register cache.
7720 (free_register_cache): Change prototype.
7721 (realloc_register_cache): Adjust.
7722 (registers_to_string): Change prototype to take a regcache. Adjust.
7723 (registers_from_string): Ditto.
7724 (register_data): Ditto.
7725 (supply_register): Ditto.
7726 (supply_register_by_name): Ditto.
7727 (collect_register): Ditto.
7728 (collect_register_as_string): Ditto.
7729 (collect_register_by_name): Ditto.
7730 * server.c (process_serial_event): Adjust.
7731 * linux-low.h (regset_fill_func, regset_store_func): Change
7732 prototype.
7733 (get_pc, set_pc, collect_ptrace_register, supply_ptrace_register):
7734 Change prototype.
7735 * linux-low.c (get_stop_pc): Adjust.
7736 (check_removed_breakpoint): Adjust.
7737 (linux_wait_for_event): Adjust.
7738 (linux_resume_one_lwp): Adjust.
7739 (fetch_register): Add regcache parameter. Adjust.
7740 (usr_store_inferior_registers): Ditto.
7741 (regsets_fetch_inferior_registers): Ditto.
7742 (regsets_store_inferior_registers): Ditto.
7743 (linux_fetch_registers, linux_store_registers): Ditto.
7744 * i387-fp.c (i387_cache_to_fsave): Change prototype to take a
7745 regcache. Adjust.
43aaf8b6
PA
7746 (i387_fsave_to_cache, i387_cache_to_fxsave, i387_fxsave_to_cache):
7747 Ditto.
442ea881
PA
7748 * i387-fp.h (i387_cache_to_fsave, i387_fsave_to_cache): Change
7749 prototype to take a regcache.
7750 (i387_cache_to_fxsave, i387_fxsave_to_cache): Ditto.
7751 * remote-utils.c (convert_ascii_to_int, outreg)
7752 (prepare_resume_reply): Change prototype to take a regcache.
7753 Adjust.
7754 * target.h (struct target_ops) <fetch_registers, store_registers>:
7755 Change prototype to take a regcache.
7756 (fetch_inferior_registers, store_inferior_registers): Change
7757 prototype to take a regcache. Adjust.
7758 * proc-service.c (ps_lgetregs): Adjust.
7759 * linux-x86-low.c (x86_fill_gregset, x86_store_gregset)
7760 (x86_fill_fpregset, x86_store_fpregset, x86_fill_fpxregset)
7761 (x86_store_fpxregset, x86_get_pc, x86_set_pc): Change prototype to
7762 take a regcache. Adjust.
7763 * linux-arm-low.c (arm_fill_gregset, arm_store_gregset)
7764 (arm_fill_wmmxregset, arm_store_wmmxregset, arm_fill_vfpregset)
7765 (arm_store_vfpregset, arm_get_pc, arm_set_pc):
7766 (arm_breakpoint_at): Change prototype to take a regcache. Adjust.
7767 * linux-cris-low.c (cris_get_pc, cris_set_pc)
7768 (cris_cannot_fetch_register):
7769 (cris_breakpoint_at): Change prototype to take a regcache.
7770 Adjust.
7771 * linux-crisv32-low.c (cris_get_pc, cris_set_pc,
7772 cris_reinsert_addr, cris_write_data_breakpoint): Change prototype
7773 to take a regcache. Adjust.
7774 (cris_breakpoint_at, cris_insert_point, cris_remove_point):
7775 Adjust.
7776 * linux-m32r-low.c (m32r_get_pc, m32r_set_pc): Change prototype to
7777 take a regcache. Adjust.
7778 * linux-m68k-low.c (m68k_fill_gregset, m68k_store_gregset)
7779 (m68k_fill_fpregset, m68k_store_fpregset, m68k_get_pc,
7780 (m68k_set_pc): Change prototype to take a regcache. Adjust.
7781 * linux-mips-low.c (mips_get_pc):
7782 (mips_set_pc): Change prototype to take a regcache. Adjust.
7783 (mips_reinsert_addr): Adjust.
7784 (mips_collect_register): Change prototype to take a regcache.
7785 Adjust.
7786 (mips_supply_register):
7787 (mips_collect_register_32bit, mips_supply_register_32bit)
7788 (mips_fill_gregset, mips_store_gregset, mips_fill_fpregset)
7789 (mips_store_fpregset): Ditto.
43aaf8b6
PA
7790 * linux-ppc-low.c (ppc_supply_ptrace_register)
7791 (ppc_supply_ptrace_register): Ditto.
442ea881
PA
7792 (parse_spufs_run): Adjust.
7793 (ppc_get_pc, ppc_set_pc, ppc_fill_gregset, ppc_fill_vsxregset)
7794 (ppc_store_vsxregset, ppc_fill_vrregset, ppc_store_vrregset)
7795 (ppc_fill_evrregset, ppc_store_evrregset): Change prototype to
7796 take a regcache. Adjust.
7797 * linux-s390-low.c (s390_collect_ptrace_register)
7798 (s390_supply_ptrace_register, s390_fill_gregset, s390_get_pc)
7799 (s390_set_pc): Change prototype to take a regcache. Adjust.
7800 (s390_arch_setup): Adjust.
7801 * linux-sh-low.c (sh_get_pc, sh_breakpoint_at)
7802 (sh_fill_gregset): Change prototype to take a regcache. Adjust.
7803 * linux-sparc-low.c (sparc_fill_gregset_to_stack)
7804 (sparc_fill_gregset, sparc_store_gregset_from_stack)
7805 (sparc_store_gregset, sparc_get_pc): Change prototype to take a
7806 regcache. Adjust.
7807 (sparc_breakpoint_at): Adjust.
7808 * linux-xtensa-low.c (xtensa_fill_gregset):
7809 (xtensa_store_gregset):
7810 (xtensa_fill_xtregset, xtensa_store_xtregset, xtensa_get_pc)
7811 (xtensa_set_pc): Change prototype to take a regcache. Adjust.
7812 * nto-low.c (nto_fetch_registers, nto_store_registers): Change
7813 prototype to take a regcache. Adjust.
7814 * win32-arm-low.c (arm_fetch_inferior_register)
7815 (arm_store_inferior_register): Change prototype to take a
7816 regcache. Adjust.
7817 * win32-i386-low.c (i386_fetch_inferior_register)
7818 (i386_store_inferior_register): Change prototype to take a
7819 regcache. Adjust.
7820 * win32-low.c (child_fetch_inferior_registers)
7821 (child_store_inferior_registers): Change prototype to take a
7822 regcache. Adjust.
7823 (win32_wait): Adjust.
7824 (win32_fetch_inferior_registers): Change prototype to take a
7825 regcache. Adjust.
7826 (win32_store_inferior_registers): Adjust.
7827 * win32-low.h (struct win32_target_ops) <fetch_inferior_register,
7828 store_inferior_register>: Change prototype to take a regcache.
7829
60c3d7b0
DE
78302010-01-20 Doug Evans <dje@google.com>
7831
7832 * linux-low.c (linux_create_inferior): Wrap use of __SIGRTMIN in
7833 #ifdef.
7834 (linux_wait_for_event1, linux_init_signals): Ditto.
ec8ebe72 7835 (W_STOPCODE): Provide definition if missing.
60c3d7b0 7836
dc146f7c
VP
78372010-01-13 Vladimir Prus <vladimir@codesourcery.com>
7838
7839 * linux-low.c (linux_core_of_thread): New.
7840 (compare_ints, show_process, list_threads): New.
7841 (linux_qxfer_osdata): Report threads and cores.
7842 (linux_target_op): Register linux_core_of_thread.
7843 * remote-utils.c (prepare_resume_reply): Report the core.
7844 (buffer_xml_printf): Support %d specifier.
7845 * server.c (handle_threads_qxfer_proper, handle_threads_qxfer):
7846 New.
7847 (handle_query): Handle qXfer:threads. Announce availability
7848 thereof.
7849 * target.h (struct target_ops): New field core_of_thread.
7850
7803799a
UW
78512010-01-04 Ulrich Weigand <uweigand@de.ibm.com>
7852
7853 * Makefile.in (clean): Remove new generated files.
7854 (reg-s390.o, reg-s390.c): Remove rules.
7855 (reg-s390x.o, reg-s390x.c): Likewise.
7856 (s390-linux32.o, s390-linux32.c): Add rules.
7857 (s390-linux64.o, s390-linux64.c): Likewise.
7858 (s390x-linux64.o, s390x-linux64.c): Likewise.
7859 * configure.srv (s390*-*-linux*): Update srv_regobj and srv_xmlfiles.
7860 * linux-s390-low.c: Include <elf.h>.
7861 (HWCAP_S390_HIGH_GPRS): Define if undefined.
7862 (init_registers_s390): Remove prototype.
7863 (init_registers_s390x): Likewise.
7864 (init_registers_s390_linux32): Add prototype.
7865 (init_registers_s390_linux64): Likewise.
7866 (init_registers_s390x_linux64): Likewise.
7867 (s390_num_regs_3264): New define.
7868 (s390_regmap_3264): New global variable.
7869 (s390_cannot_fetch_register): Remove obsolete check.
7870 (s390_cannot_store_register): Likewise.
7871 (s390_collect_ptrace_register): Handle upper/lower register halves.
7872 (s390_supply_ptrace_register): Likewise.
7873 (s390_fill_gregset): Update to register number changes.
7874 (s390_get_hwcap): New routine.
7875 (s390_arch_setup): Detect 32-bit process running on 64-bit system.
7876 Install appropriate regmap and register set.
7877
6e7ffa39
JB
78782010-01-01 Joel Brobecker <brobecker@adacore.com>
7879
7880 * server.c (gdbserver_version): Update copyright year to 2010.
7881 * gdbreplay.c (gdbreplay_version): Likewise.
7882
957f3f49
DE
78832009-12-28 Doug Evans <dje@google.com>
7884
7885 * linux-low.c: Delete inclusion of ansidecl.h, elf/common.h,
7886 elf/external.h. Include <elf.h> instead but only if necessary.
7887
ca5c370d
PA
78882009-12-28 Pedro Alves <pedro@codesourcery.com>
7889
7890 * linux-low.c (linux_remove_process): Remove `detaching'
7891 parameter. Don't release/detach from thread_db here.
7892 (linux_kill): Release/detach from thread_db here, ...
7893 (linux_detach): ... and here, before actually detaching.
7894 (linux_wait_1): ... and here, when a process exits.
7895 * thread-db.c (any_thread_of): New.
7896 (thread_db_free): Switch the current inferior to a thread of the
7897 passed in process.
7898
4ee62156
DE
78992009-12-21 Doug Evans <dje@google.com>
7900
d90e6a88
DE
7901 * linux-x86-low.c: Delete outdated comment about Elf32_Phdr.
7902
c5f62d5f
DE
7903 * linux-low.c (kill_lwp): Use __NR_tkill instead of SYS_tkill.
7904 Move definition of tkill_failed to ifdef __NR_tkill to avoid gcc
7905 warning ifndef __NR_tkill. Move setting of errno there too.
7906 Delete unnecessary resetting of errno after syscall.
7907 Minor comment changes to match gdb/linux-nat.c:kill_lwp.
7908
10e86dd7
DE
7909 * configure.ac: Check for dladdr.
7910 * config.in: Regenerate.
7911 * configure: Regenerate.
7912 * thread-db.c (dladdr_to_soname): Only define ifdef HAVE_DLADDR.
7913 (try_thread_db_load): Update.
7914
4ee62156
DE
7915 * linux-low.c (my_waitpid): Delete unnecessary prototype.
7916
00f515da
DE
79172009-12-18 Doug Evans <dje@google.com>
7918
e9464885
DE
7919 * event-loop.c: Include unistd.h if it exists.
7920
07d4f67e
DE
7921 * linux-low.c (my_waitpid): Move definition away from being in
7922 between linux_tracefork_child/linux_test_for_tracefork.
7923
00f515da
DE
7924 * gdb_proc_service.h (psaddr_t): Fix type.
7925 * thread-db.c (thread_db_info.td_thr_tls_get_addr_p): Fix
7926 signature to match glibc.
7927
1de1badb
DE
79282009-12-16 Doug Evans <dje@google.com>
7929
7930 * linux-low.c (linux_read_memory): Fix argument to read.
7931
aeeb81d1
PA
79322009-11-26 Pedro Alves <pedro@codesourcery.com>
7933
7934 * win32-low.c (get_child_debug_event): On EXIT_THREAD_DEBUG_EVENT
7935 events, don't leave current_inferior pointing at null.
7936
10357975
PA
79372009-11-26 Pedro Alves <pedro@codesourcery.com>
7938
7939 * win32-low.c (LOG): Delete.
7940 (OUTMSG): Output to stderr.
7941 (OUTMSG2): Conditionalize on `debug_threads' variable, instead of
7942 on compile time LOG macro.
7943 (win32_wait): Fix debug output.
7944
cf6e3471
PA
79452009-11-26 Pedro Alves <pedro@codesourcery.com>
7946
7947 * win32-low.c (win32_add_one_solib): If the dll name is
7948 "ntdll.dll", prepend the system directory to the dll path.
7949
0c85e18e
MK
79502009-11-17 Daniel Jacobowitz <dan@codesourcery.com>
7951
7952 * m68k-tdep.c (m68k_gdbarch_init): Reuse previous initialization.
7953
9ac544ce 79542009-11-17 Nathan Sidwell <nathan@codesourcery.com>
889bf7c5 7955 Vladimir Prus <vladimir@codesourcery.com>
9ac544ce
MK
7956
7957 * Makefile.in (reg-cf.o, reg-cf.c): New targets.
7958 * configure.ac: Check for __mcoldfire__ and set
7959 gdb_cv_m68k_is_coldfire.
7960 * configure.srv: Use gdb_cv_m68k_is_coldfire to select between
7961 reg-cf.o and reg-m68k.o.
7962 * configure: Regenerated.
7963
fd7dd3e6
PA
79642009-11-16 Pedro Alves <pedro@codesourcery.com>
7965
7966 * linux-low.c (linux_remove_process): Add `detaching' parameter.
7967 Pass it to thread_db_free.
7968 (linux_kill, linux_detach, linux_wait_1): Adjust to pass the
7969 proper `detaching' argument to linux_remove_process.
7970 * linux-low.h (thread_db_free): Add `detaching' parameter.
7971 * thread-db.c (thread_db_init): Pass false as `detaching' argument
7972 to thread_db_free.
7973 (thread_db_free): Add `detaching' parameter. Only
7974 call td_ta_clear_event if detaching from process.
7975
75aa492e
MK
79762009-11-12 Maxim Kuvyrkov <maxim@codesourcery.com>
7977
7978 * thread-db.c (thread_db_free): Fix typo.
7979
21e1bee4
PP
79802009-11-11 Paul Pluzhnikov <ppluzhnikov@google.com>
7981
7982 PR gdb/10838
7983 * thread-db.c (thread_db_free): Call td_ta_clear_event.
7984
8838b45e
NS
79852009-11-03 Nathan Sidwell <nathan@codesourcery.com>
7986
7987 * configure.ac (i[34567]86-*): Check if we're targetting x86-64
7988 with an i686 compiler.
7989 * configure.srv (i[34567]86-*-linux*): Pull in x86-64 handling if
7990 needed.
7991 * configure: Rebuilt.
7992
8a35fb51
SL
79932009-10-29 Sandra Loosemore <sandra@codesourcery.com>
7994
7995 PR gdb/10783
7996
7997 * server.c (handle_search_memory_1): Correct read_addr initialization
7998 in loop for searching subsequent chunks.
7999
96f15937
PP
80002009-10-29 Paul Pluzhnikov <ppluzhnikov@google.com>
8001
8002 * configure.ac: New --with-libthread-db option.
8003 * thread-db.c: Allow direct dependence on libthread_db.
8004 (thread_db_free): Adjust.
8005 * config.in: Regenerate.
8006 * configure: Likewise.
889bf7c5 8007
5f7d1694
PP
80082009-10-28 Paul Pluzhnikov <ppluzhnikov@google.com>
8009
8010 PR gdb/10757
8011 * thread-db.c (attach_thread): New function.
8012 (maybe_attach_thread): Return success/failure.
8013 (find_new_threads_callback): Adjust.
889bf7c5
PA
8014 (thread_db_find_new_threads): Loop until no new threads.
8015
88e3b899
PA
80162009-10-13 Pedro Alves <pedro@codesourcery.com>
8017
8018 * proc-service.c (ps_lgetregs): Formatting.
8019
cdbfd419
PP
80202009-10-08 Paul Pluzhnikov <ppluzhnikov@google.com>
8021
8022 * acinclude.m4: (SRV_CHECK_THREAD_DB, SRV_CHECK_TLS_GET_ADDR): Remove.
8023 * configure.ac: Adjust.
8024 * linux-low.h (struct process_info_private): Move members to struct
8025 thread_db.
8026 (thread_db_free, thread_db_handle_monitor_command): New prototype.
8027 * linux-low.c (linux_remove_process): Adjust.
8028 (linux_wait_for_event_1, linux_look_up_symbols): Likewise.
8029 * server.c (handle_query): Move code ...
8030 (handle_monitor_command): ... here. New function.
8031 * target.h (struct target_ops): New member.
8032 * thread-db.c (struct thread_db): New.
8033 (libthread_db_search_path): New variable.
8034 (thread_db_create_event, thread_db_enable_reporting)
8035 (find_one_thread, maybe_attach_thread, find_new_threads_callback)
8036 (thread_db_find_new_threads, (thread_db_get_tls_address): Adjust.
8037 (try_thread_db_load_1, dladdr_to_soname): New functions.
8038 (try_thread_db_load, thread_db_load_search): New functions.
8039 (thread_db_init): Search for libthread_db.
8040 (thread_db_free): New function.
8041 (thread_db_handle_monitor_command): Likewise.
8042 * config.in: Regenerate.
8043 * configure: Regenerate.
889bf7c5 8044
4168d2d6
UW
80452009-09-27 Ulrich Weigand <uweigand@de.ibm.com>
8046
8047 * spu-low.c (spu_kill): Wait for inferior to terminate.
8048 Call clear_inferiors.
8049 (spu_detach): Call clear_inferiors.
8050
81ecdfbb
RW
80512009-08-22 Ralf Wildenhues <Ralf.Wildenhues@gmx.de>
8052
8053 * aclocal.m4: Regenerate.
8054 * config.in: Likewise.
8055 * configure: Likewise.
8056
0b9ff2c0
UW
80572009-07-31 Ulrich Weigand <uweigand@de.ibm.com>
8058
8059 * linux-ppc-low.c (INSTR_SC, NR_spu_run): Define.
8060 (parse_spufs_run): New function.
8061 (ppc_get_pc, ppc_set_pc): Detect and handle SPU PC.
8062 (ppc_breakpoint_at): Handle SPU breakpoints.
8063
efcbbd14
UW
80642009-07-31 Ulrich Weigand <uweigand@de.ibm.com>
8065
8066 * linux-low.c: Include <sys/stat.h> and <sys/vfs.h>.
8067 (SPUFS_MAGIC): Define.
8068 (spu_enumerate_spu_ids): New function.
8069 (linux_qxfer_spu): New function.
8070 (linux_target_ops): Install linux_qxfer_spu.
8071
f4d9bade
UW
80722009-07-31 Ulrich Weigand <uweigand@de.ibm.com>
8073
8074 * configure.srv (powerpc*-*-linux*): Add powerpc-cell32l.o
8075 and powerpc-cell64l.o to srv_regobj. Add rs6000/powerpc-cell32l.xml
8076 and rs6000/powerpc-cell64l.xml to srv_xmlfiles.
8077 * Makefile.in (powerpc-cell32l.o, powerpc-cell32l.c): New rules.
8078 (powerpc-cell64l.o, powerpc-cell64l.c): Likewise.
8079 (clean): Handle powerpc-cell32l.c and powerpc-cell64l.c.
8080 * linux-ppc-low.c (PPC_FEATURE_CELL): Define.
8081 (init_registers_powerpc_cell32l): Add prototype.
8082 (init_registers_powerpc_cell64l): Likewise.
8083 (ppc_arch_setup): Detect Cell/B.E. architecture.
8084
96e946ca
RW
80852009-07-30 Ralf Wildenhues <Ralf.Wildenhues@gmx.de>
8086
8087 * Makefile.in (datarootdir): New variable.
8088
58d6951d
DJ
80892009-07-28 Daniel Jacobowitz <dan@codesourcery.com>
8090
8091 * linux-low.c (linux_write_memory): Update debugging output.
8092 * Makefile.in (clean): Add new descriptions.
8093 (arm-with-vfpv2.o, arm-with-vfpv2.c, arm-with-vfpv3.o)
8094 (arm-with-vfpv3.c, arm-with-neon.o, arm-with-neon.c): New rules.
8095 * configure.srv: Add new files for arm*-*-linux*.
8096 * linux-arm-low.c: Add new declarations.
8097 (PTRACE_GETVFPREGS, PTRACE_SETVFPREGS): Define if undefined.
8098 (arm_hwcap, HWCAP_VFP, HWCAP_IWMMXT, HWCAP_NEON, HWCAP_VFPv3)
8099 (HWCAP_VFPv3D16): New.
8100 (arm_fill_wmmxregset, arm_store_wmmxregset): Check HWCAP_IWMMXT
8101 instead of __IWMMXT__.
8102 (arm_fill_vfpregset, arm_store_vfpregset, arm_get_hwcap)
8103 (arm_arch_setup): New.
8104 (target_regsets): Remove #ifdef. Add VFP regset.
8105 (the_low_target): Use arm_arch_setup.
8106
12b42a12
DJ
81072009-07-28 Daniel Jacobowitz <dan@codesourcery.com>
8108
8109 * linux-low.c (linux_kill_one_lwp): Adjust kernel workaround to skip
8110 the main thread again.
8111
ac8c974e
AR
81122009-07-06 Aleksandar Ristovski <aristovski@qnx.com>
8113
8114 Adding Neutrino gdbserver.
8115 * configure: Regenerated.
8116 * configure.ac: Add case for srv_qnx and set LIBS accordingly.
8117 * configure.srv (i[34567]86-*-nto*): New target.
8118 * nto-low.c, nto-low.h, nto-x86-low.c: New files.
8119 * remote-utils.c [__QNX__]: Include sys/iomgr.h
8120 (nto_comctrl) [__QNX__]: New function.
8121 (enable_async_io, disable_async_io) [__QNX__]: Call nto_comctrl.
8122
4424e0c3 81232009-07-05 Danny Backx <dannybackx@users.sourceforge.net>
7437790a
PA
8124
8125 * configure.srv (i[34567]86-*-mingw32ce*): Add i386-low.o to
8126 srv_tgtobj.
8127
912cf4ba
PA
81282009-07-04 Danny Backx <dannybackx@users.sourceforge.net>
8129 Pedro Alves <pedro@codesourcery.com>
8130
8131 * win32-i386-low.c (i386_get_thread_context): Handle systems that
8132 don't support CONTEXT_EXTENDED_REGISTERS.
8133 (i386_win32_breakpoint, i386_win32_breakpoint_len): New.
8134 (the_low_target): Install them.
8135 * win32-low.c (get_child_debug_event): Handle WaitForDebugEvent
8136 failing with ERROR_PIPE_NOT_CONNECTED.
8137
aa5ca48f
DE
81382009-06-30 Doug Evans <dje@google.com>
8139 Pierre Muller <muller@ics.u-strasbg.fr>
8140
8141 Add h/w watchpoint support to x86-linux, win32-i386.
8142 * Makefile.in (SFILES): Add i386-low.c
8143 (i386_low_h): Define.
8144 (i386-low.o): Add dependencies.
8145 (linux-x86-low.o): Add i386-low.h dependency.
8146 (win32-i386-low.o): Ditto.
8147 * i386-low.c: New file.
8148 * i386-low.h: New file.
8149 * configure.srv (i[34567]86-*-cygwin*): Add i386-low.o to srv_tgtobj.
8150 (i[34567]86-*-linux*, i[34567]86-*-mingw*, x86_64-*-linux*): Ditto.
8151 * linux-low.c (linux_add_process): Initialize arch_private.
8152 (linux_remove_process): Free arch_private.
8153 (add_lwp): Initialize arch_private.
8154 (delete_lwp): Free arch_private.
8155 (linux_resume_one_lwp): Call the_low_target.prepare_to_resume if
8156 provided.
8157 * linux-low.h (process_info_private): New member arch_private.
8158 (lwp_info): New member arch_private.
8159 (linux_target_ops): New members new_process, new_thread,
8160 prepare_to_resume.
8161 (ptid_of): New macro.
8162 * linux-x86-low.c: Include stddef.h, i386-low.h.
8163 (arch_process_info): New struct.
8164 (arch_lwp_info): New struct.
8165 (x86_linux_dr_get, x86_linux_dr_set): New functions.
8166 (i386_dr_low_set_addr, i386_dr_low_set_control): New functions.
8167 (i386_dr_low_get_status): New function.
8168 (x86_insert_point, x86_remove_point): New functions.
8169 (x86_stopped_by_watchpoint): New function.
8170 (x86_stopped_data_address): New function.
8171 (x86_linux_new_process, x86_linux_new_thread): New functions.
8172 (x86_linux_prepare_to_resume): New function.
8173 (the_low_target): Add entries for insert_point, remove_point,
8174 stopped_by_watchpoint, stopped_data_address, new_process, new_thread,
8175 prepare_to_resume.
8176 * server.c (debug_hw_points): New global.
8177 (monitor_show_help): Document set debug-hw-points.
8178 (handle_query): Process "set debug-hw-points".
8179 * server.h (debug_hw_points): Declare.
8180 (paddress): Declare.
8181 * utils.c (NUMCELLS, CELLSIZE): New macros.
8182 (get_sell, xsnprintf, paddress): New functions.
8183 * win32-arm-low.c (the_low_target): Add entries for insert_point,
8184 remove_point, stopped_by_watchpoint, stopped_data_address.
8185 * win32-i386-low.c: Include i386-low.h.
8186 (debug_reg_state): Replaces dr.
8187 (i386_dr_low_set_addr, i386_dr_low_set_control): New functions.
8188 (i386_dr_low_get_status): New function.
8189 (i386_insert_point, i386_remove_point): New functions.
8190 (i386_stopped_by_watchpoint): New function.
8191 (i386_stopped_data_address): New function.
8192 (i386_initial_stuff): Update.
8193 (get_thread_context,set_thread_context,i386_thread_added): Update.
8194 (the_low_target): Add entries for insert_point,
8195 remove_point, stopped_by_watchpoint, stopped_data_address.
8196 * win32-low.c (win32_insert_watchpoint): New function.
8197 (win32_remove_watchpoint): New function.
8198 (win32_stopped_by_watchpoint): New function.
8199 (win32_stopped_data_address): New function.
8200 (win32_target_ops): Add entries for insert_watchpoint,
8201 remove_watchpoint, stopped_by_watchpoint, stopped_data_address.
8202 * win32-low.h (win32_target_ops): New members insert_point,
8203 remove_point, stopped_by_watchpoint, stopped_data_address.
8204
d993e290
PA
82052009-06-25 Pedro Alves <pedro@codesourcery.com>
8206
8207 * server.c (process_serial_event): Re-return unsupported, not
8208 error, if the type isn't recognized. Re-allow supporting only
8209 insert or remove packets. Also call require_running for
8210 breakpoints. Add missing break statement to default case. Tidy.
8211 * target.h (struct target_ops): Rename insert_watchpoint to
8212 insert_point, and remove_watchpoint to remove_point.
8213
8214 * linux-low.h (struct linux_target_ops): Likewise.
8215 * linux-low.c (linux_insert_watchpoint): Rename to ...
8216 (linux_insert_point): ... this. Adjust.
8217 (linux_remove_watchpoint): Rename to ...
8218 (linux_remove_point): ... this. Adjust.
8219 (linux_target_ops): Adjust.
8220 * linux-crisv32-low.c (cris_insert_watchpoint): Rename to ...
8221 (cris_insert_point): ... this.
8222 (cris_remove_watchpoint): Rename to ...
8223 (cris_remove_point): ... this.
8224 (the_low_target): Adjust.
8225
0f54c268
PM
82262009-06-24 Pierre Muller <muller@ics.u-strasbg.fr>
8227
8228 * server.c (handle_v_kill): Pass signal_pid to
8229 kill_inferior if multi_process is zero.
8230
c6314022
AR
82312009-06-23 Aleksandar Ristovski <aristovski@qnx.com>
8232
8233 * server.c (process_serial_event): Add support for Z0 and Z1 packet.
8234 * target.h (target_ops): Comment for *_watchpoint to make it clear
8235 the functions can get types '0' and '1'.
8236
4463ce24
AR
82372009-06-22 Aleksandar Ristovski <aristovski@qnx.com>
8238
8239 * linux-low.c (usr_fetch_inferior_registers): Remove check for regno 0.
8240 * proc-service.c (ps_lgetregs): Pass -1 to fetch all registers.
8241 * regcache.c (get_regcache): Likewise.
8242 * spu-low.c (spu_fetch_registers): Remove 0 to -1 conversion.
8243 * win32-low.c (child_fetch_inferior_registers): Remove check for
8244 regno 0.
8245
cf8fd78b
PA
82462009-06-19 Aleksandar Ristovski <aristovski@qnx.com>
8247 Pedro Alves <pedro@codesourcery.com>
8248
8249 * target.h (struct target_ops) <supports_multi_process>: New
8250 callback.
8251 (target_supports_multi_process): New.
8252 * server.c (handle_query): Even if GDB reports support, only
8253 enable multi-process if the target also supports it. Report
8254 multi-process support only if the target backend supports it.
8255 * linux-low.c (linux_supports_multi_process): New function.
8256 (linux_target_ops): Install it as target_supports_multi_process
8257 callback.
8258
47c0c975
DE
82592009-05-24 Doug Evans <dje@google.com>
8260
e09875d4
DE
8261 Global renaming of find_thread_pid to find_thread_ptid.
8262 * server.h (find_thread_ptid): Renamed from find_thread_pid.
8263 * inferiors.c (find_thread_ptid): Renamed from find_thread_pid.
8264 All callers updated.
8265
e27d73f6
DE
8266 * linux-low.c (handle_extended_wait): Use linux_resume_one_lwp
8267 to resume the newly created thread, don't call ptrace (PTRACE_CONT)
8268 directly.
8269
47c0c975
DE
8270 * linux-low.c (get_stop_pc): Print pc if debug_threads.
8271 (check_removed_breakpoint, linux_wait_for_lwp): Ditto.
8272 (linux_resume_one_lwp): Ditto.
8273
2acc282a
DE
82742009-05-23 Doug Evans <dje@google.com>
8275
8276 * linux-low.c (linux_resume_one_lwp): Change type of first arg
8277 from struct inferior_list_entry * to struct lwp_info *.
8278 All callers updated.
8279
9f1036c1
DE
82802009-05-13 Doug Evans <dje@google.com>
8281
8282 * linux-x86-low.c: Don't include assert.h.
8283 (x86_siginfo_fixup): Use fatal, not assert.
8284 (x86_arch_setup): Fix comment.
8285
d0722149
DE
82862009-05-12 Doug Evans <dje@google.com>
8287
8288 Biarch support for i386/amd64 gdbserver.
8289 * Makefile.in (SFILES): Remove linux-i386-low.c, linux-x86-64-low.c.
8290 Add linux-x86-low.c.
8291 (linux-i386-low.o, linux-x86-64-low.o): Delete.
8292 (linux-x86-low.o): Add.
8293 * linux-x86-64-low.c: Delete.
8294 * linux-i386-low.c: Delete.
8295 * linux-x86-low.c: New file.
8296 * configure.srv (i?86-linux srv_tgtobj): Replace linux-i386-low.o with
8297 linux-x86-low.o.
8298 (x86_64-linux srv_tgtobj): Replace linux-x86-64-low.o with
8299 linux-x86-low.o.
8300 (x86_64-linux srv_regobj): Add reg-i386-linux.o.
8301 * linux-low.c: Include ansidecl.h, elf/common.h, elf/external.h.
8302 (linux_child_pid_to_exec_file): New function.
8303 (elf_64_header_p, elf_64_file_p): New functions.
8304 (siginfo_fixup): New function.
8305 (linux_xfer_siginfo): New local inf_siginfo. Call siginfo_fixup to
8306 give target a chance to convert layout.
8307 * linux-low.h (linux_target_ops): New member siginfo_fixup.
8308 (linux_child_pid_to_exec_file, elf_64_file_p): Declare.
8309
fdeb2a12
DE
83102009-05-07 Doug Evans <dje@google.com>
8311
8312 * linux-low.c (regsets_fetch_inferior_registers): Fix memory leak.
8313 (regsets_store_inferior_registers): Ditto.
8314
a6dbe5df
PA
83152009-05-06 Pedro Alves <pedro@codesourcery.com>
8316
8317 PR server/10048
8318
8319 * linux-low.c (must_set_ptrace_flags): Delete.
8320 (linux_create_inferior): Set `lwp->must_set_ptrace_flags' instead
8321 of the global.
8322 (linux_attach_lwp_1): Don't set PTRACE_SETOPTIONS here. Set
8323 `lwp->must_set_ptrace_flags' instead.
ba42693b 8324 (linux_wait_for_event_1): Set ptrace options here.
a6dbe5df
PA
8325 (linux_wait_1): ... not here.
8326
5091eb23
DE
83272009-04-30 Doug Evans <dje@google.com>
8328
9f767825
DE
8329 * inferiors.c (started_inferior_callback): New function.
8330 (attached_inferior_callback): New function.
8331 (have_started_inferiors_p, have_attached_inferiors_p): New functions.
8332 * server.c (print_started_pid, print_attached_pid): New functions.
8333 (detach_or_kill_for_exit): New function.
8334 (main): Call it instead of for_each_inferior (kill_inferior_callback).
8335 * server.h (have_started_inferiors_p): Declare.
8336 (have_attached_inferiors_p): Declare.
8337
5091eb23
DE
8338 * inferiors.c (remove_process): Fix memory leak, free process.
8339 * linux-low.c (linux_remove_process): New function.
8340 (linux_kill): Call it instead of remove_process.
8341 (linux_detach, linux_wait_1): Ditto.
8342
155c8968
PA
83432009-04-19 Danny Backx <dannybackx@users.sourceforge.net>
8344
8345 * configure.srv: Add x86 Windows CE target.
8346
7fe519cb
UW
83472009-04-03 Ulrich Weigand <uweigand@de.ibm.com>
8348
8349 * inferiors.c (get_thread_process): Make global.
8350 * server.h (get_thread_process): Add prototype.
8351 * thread-db.c (find_one_thread): Use get_thread_process
8352 instead of current_process.
8353 (thread_db_get_tls_address): Do not crash if called when
8354 thread layer is not yet initialized.
8355
5472f405
UW
83562009-04-03 Ulrich Weigand <uweigand@de.ibm.com>
8357
8358 * remote-utils.c (prepare_resume_reply): Null-terminate packet.
8359 * spu-low.c (current_tid): Rename to ...
8360 (current_ptid): ... this.
8361 (fetch_ppc_register, fetch_ppc_memory, store_ppc_memory,
8362 spu_proc_xfer_spu, spu_resume, spu_request_interrupt): Use
8363 ptid_get_lwp (current_ptid) instead of current_tid.
8364 (spu_kill, spu_detach, spu_join, spu_wait): Use pid argument
8365 instead of current_tid. Use find_process_pid to verify pid
8366 argument is valid. Pass proper argument to remove_process.
8367 (spu_thread_alive): Compare current_ptid instead of current_tid.
8368 (spu_resume): Likewise.
8369
55ac2b99
PA
83702009-04-02 Pedro Alves <pedro@codesourcery.com>
8371
8372 * linux-low.c (usr_store_inferior_registers): Declare local `pid'
8373 variable.
8374
95954743
PA
83752009-04-01 Pedro Alves <pedro@codesourcery.com>
8376
8377 Implement the multiprocess extensions, and add linux multiprocess
8378 support.
8379
8380 * server.h (ULONGEST): Declare.
8381 (struct ptid, ptid_t): New.
8382 (minus_one_ptid, null_ptid): Declare.
8383 (ptid_build, pid_to_ptid, ptid_get_pid, ptid_get_lwp)
8384 (ptid_get_tid, ptid_equal, ptid_is_pid): Declare.
8385 (struct inferior_list_entry): Change `id' type from unsigned from
8386 to ptid_t.
8387 (struct sym_cache, struct breakpoint, struct
8388 process_info_private): Forward declare.
8389 (struct process_info): Declare.
8390 (current_process): Declare.
8391 (all_processes): Declare.
8392 (initialize_inferiors): Declare.
8393 (add_thread): Adjust to use ptid_t.
8394 (thread_id_to_gdb_id, thread_to_gdb_id, gdb_id_to_thread_id): Ditto.
8395 (add_process, remove_process, find_thread_pid): Declare.
8396 (find_inferior_id): Adjust to use ptid_t.
8397 (cont_thread, general_thread, step_thread): Change type to ptid_t.
8398 (multi_process): Declare.
8399 (push_event): Adjust to use ptid_t.
8400 (read_ptid, write_ptid): Declare.
8401 (prepare_resume_reply): Adjust to use ptid_t.
8402 (clear_symbol_cache): Declare.
8403 * inferiors.c (all_processes): New.
8404 (null_ptid, minus_one_ptid): New.
8405 (ptid_build, pid_to_ptid, ptid_get_pid, ptid_get_lwp)
8406 (ptid_get_tid, ptid_equal, ptid_is_pid): New.
8407 (add_thread): Change unsigned long to ptid. Remove gdb_id
8408 parameter. Adjust.
8409 (thread_id_to_gdb_id, thread_to_gdb_id): Change unsigned long to ptid.
8410 (gdb_id_to_thread): Rename to ...
8411 (find_thread_pid): ... this. Change unsigned long to ptid.
8412 (gdb_id_to_thread_id, find_inferior_id): Change unsigned long to ptid.
8413 (loaded_dll, pull_pid_from_list): Adjust.
8414 (add_process, remove_process, find_process_pid)
8415 (get_thread_process, current_process, initialize_inferiors): New.
8416 * target.h (struct thread_resume) <thread>: Change type to ptid_t.
8417 (struct target_waitstatus) <related_pid>: Ditto.
8418 (struct target_ops) <kill, detach>: Add `pid' argument. Change
8419 return type to int.
8420 (struct target_ops) <join>: Add `pid' argument.
8421 (struct target_ops) <thread_alive>: Change pid's type to ptid_t.
8422 (struct target_ops) <wait>: Add `ptid' field. Change return type
8423 to ptid.
8424 (kill_inferior, detach_inferior, join_inferior): Add `pid' argument.
8425 (mywait): Add `ptid' argument. Change return type to ptid_t.
8426 (target_pid_to_str): Declare.
8427 * target.c (set_desired_inferior): Adjust to use ptids.
8428 (mywait): Add new `ptid' argument. Adjust.
8429 (target_pid_to_str): New.
8430 * mem-break.h (free_all_breakpoints): Declare.
8431 * mem-break.c (breakpoints): Delelete.
8432 (set_breakpoint_at, delete_breakpoint, find_breakpoint_at)
8433 (check_mem_read, check_mem_write, delete_all_breakpoints): Adjust
8434 to use per-process breakpoint list.
8435 (free_all_breakpoints): New.
8436 * remote-utils.c (struct sym_cache) <name>: Drop `const'.
8437 (symbol_cache, all_symbols_looked_up): Delete.
8438 (hexchars): New.
8439 (ishex, unpack_varlen_hex, write_ptid, hex_or_minus_one,
8440 read_ptid): New.
8441 (prepare_resume_reply): Change ptid argument's type from unsigned
8442 long to ptid_t. Adjust. Implement W;process and X;process.
8443 (free_sym_cache, clear_symbol_cache): New.
8444 (look_up_one_symbol): Adjust to per-process symbol cache. *
8445 * server.c (cont_thread, general_thread, step_thread): Change type
8446 to ptid_t.
8447 (attached): Delete.
8448 (multi_process): New.
8449 (last_ptid): Change type to ptid_t.
8450 (struct vstop_notif) <ptid>: Change type to ptid_t.
8451 (queue_stop_reply, push_event): Change `ptid' argument's type to
8452 ptid_t.
8453 (discard_queued_stop_replies): Add `pid' argument.
8454 (start_inferior): Adjust to use ptids. Adjust to mywait interface
8455 changes. Don't reference the `attached' global.
8456 (attach_inferior): Adjust to mywait interface changes.
8457 (handle_query): Adjust to use ptids. Parse GDB's qSupported
8458 features. Handle and report "multiprocess+". Handle
8459 "qAttached:PID".
8460 (handle_v_cont): Adjust to use ptids. Adjust to mywait interface
8461 changes.
8462 (handle_v_kill): New.
8463 (handle_v_stopped): Adjust to use target_pid_to_str.
8464 (handle_v_requests): Allow multiple attaches and runs when
8465 multiprocess extensions are in effect. Handle "vKill".
8466 (myresume): Adjust to use ptids.
8467 (queue_stop_reply_callback): Add `arg' parameter. Handle it.
8468 (handle_status): Adjust to discard_queued_stop_replies interface
8469 change.
8470 (first_thread_of, kill_inferior_callback)
8471 (detach_or_kill_inferior_callback, join_inferiors_callback): New.
8472 (main): Call initialize_inferiors. Adjust to use ptids, killing
8473 and detaching from all inferiors. Handle multiprocess packet
8474 variants.
8475 * linux-low.h: Include gdb_proc_service.h.
8476 (struct process_info_private): New.
8477 (struct linux_target_ops) <pid_of>: Use ptid_get_pid.
8478 <lwpid_of>: Use ptid_get_lwp.
8479 (get_lwp_thread): Adjust.
8480 (struct lwp_info): Add `dead' member.
8481 (find_lwp_pid): Declare.
8482 * linux-low.c (thread_db_active): Delete.
8483 (new_inferior): Adjust comment.
8484 (inferior_pid): Delete.
8485 (linux_add_process): New.
8486 (handle_extended_wait): Adjust.
8487 (add_lwp): Change unsigned long to ptid.
8488 (linux_create_inferior): Add process to processes table. Adjust
8489 to use ptids. Don't set new_inferior here.
8490 (linux_attach_lwp): Rename to ...
8491 (linux_attach_lwp_1): ... this. Add `initial' argument. Handle
8492 it. Adjust to use ptids.
8493 (linux_attach_lwp): New.
8494 (linux_attach): Add process to processes table. Don't set
8495 new_inferior here.
8496 (struct counter): New.
8497 (second_thread_of_pid_p, last_thread_of_process_p): New.
8498 (linux_kill_one_lwp): Add `args' parameter. Handle it. Adjust to
8499 multiple processes.
8500 (linux_kill): Add `pid' argument. Handle it. Adjust to multiple
8501 processes. Remove process from process table.
8502 (linux_detach_one_lwp): Add `args' parameter. Handle it. Adjust
8503 to multiple processes.
8504 (any_thread_of): New.
8505 (linux_detach): Add `pid' argument, and handle it. Remove process
8506 from processes table.
8507 (linux_join): Add `pid' argument. Handle it.
8508 (linux_thread_alive): Change unsighed long argument to ptid_t.
8509 Consider dead lwps as not being alive.
8510 (status_pending_p): Rename `dummy' argument to `arg'. Filter out
8511 threads we're not interested in.
8512 (same_lwp, find_lwp_pid): New.
8513 (linux_wait_for_lwp): Change `pid' argument's type from int to
8514 ptid_t. Adjust.
8515 (linux_wait_for_event): Rename to ...
8516 (linux_wait_for_event_1): ... this. Change `pid' argument's type
8517 from int to ptid_t. Adjust.
8518 (linux_wait_for_event): New.
8519 (linux_wait_1): Add `ptid' argument. Change return type to
8520 ptid_t. Adjust. Use last_thread_of_process_p. Remove processes
8521 that exit from the process table.
8522 (linux_wait): Add `ptid' argument. Change return type to ptid_t.
8523 Adjust.
8524 (mark_lwp_dead): New.
8525 (wait_for_sigstop): Adjust to use ptids. If a process exits while
8526 stopping all threads, mark its main lwp as dead.
8527 (linux_set_resume_request, linux_resume_one_thread): Adjust to use
8528 ptids.
8529 (fetch_register, usr_store_inferior_registers)
8530 (regsets_fetch_inferior_registers)
8531 (regsets_store_inferior_registers, linux_read_memory)
8532 (linux_write_memory): Inline `inferior_pid'.
8533 (linux_look_up_symbols): Adjust to use per-process
8534 `thread_db_active'.
8535 (linux_request_interrupt): Adjust to use ptids.
8536 (linux_read_auxv): Inline `inferior_pid'.
8537 (initialize_low): Don't reference thread_db_active.
8538 * gdb_proc_service.h (struct ps_prochandle) <pid>: Remove.
8539 * proc-service.c (ps_lgetregs): Use find_lwp_pid.
8540 (ps_getpid): Return the pid of the current inferior.
8541 * thread-db.c (proc_handle, thread_agent): Delete.
8542 (thread_db_create_event, thread_db_enable_reporting): Adjust to
8543 per-process data.
8544 (find_one_thread): Change argument type to ptid_t. Adjust to
8545 per-process data.
8546 (maybe_attach_thread): Adjust to per-process data and ptids.
8547 (thread_db_find_new_threads): Ditto.
8548 (thread_db_init): Ditto.
8549 * spu-low.c (spu_create_inferior, spu_attach): Add process to
8550 processes table. Adjust to use ptids.
8551 (spu_kill, spu_detach): Adjust interface. Remove process from
8552 processes table.
8553 (spu_join, spu_thread_alive): Adjust interface.
8554 (spu_wait): Adjust interface. Remove process from processes
8555 table. Adjust to use ptids.
8556 * win32-low.c (current_inferior_tid): Delete.
8557 (current_inferior_ptid): New.
8558 (debug_event_ptid): New.
8559 (thread_rec): Take a ptid. Adjust.
8560 (child_add_thread): Add `pid' argument. Adjust to use ptids.
8561 (child_delete_thread): Ditto.
8562 (do_initial_child_stuff): Add `attached' argument. Add process to
8563 processes table.
8564 (child_fetch_inferior_registers, child_store_inferior_registers):
8565 Adjust.
8566 (win32_create_inferior): Pass 0 to do_initial_child_stuff.
8567 (win32_attach): Pass 1 to do_initial_child_stuff.
8568 (win32_kill): Adjust interface. Remove process from processes
8569 table.
8570 (win32_detach): Ditto.
8571 (win32_join): Adjust interface.
8572 (win32_thread_alive): Take a ptid.
8573 (win32_resume): Adjust to use ptids.
8574 (get_child_debug_event): Ditto.
8575 (win32_wait): Adjust interface. Remove exiting process from
8576 processes table.
8577
bd99dc85
PA
85782009-04-01 Pedro Alves <pedro@codesourcery.com>
8579
8580 Non-stop mode support.
8581
8582 * server.h (non_stop): Declare.
8583 (gdb_client_data, handler_func): Declare.
8584 (delete_file_handler, add_file_handler, start_event_loop):
8585 Declare.
8586 (handle_serial_event, handle_target_event, push_event)
8587 (putpkt_notif): Declare.
8588 * target.h (enum resume_kind): New.
8589 (struct thread_resume): Replace `step' field by `kind' field.
8590 (TARGET_WNOHANG): Define.
8591 (struct target_ops) <wait>: Add `options' argument.
8592 <supports_non_stop, async, start_non_stop>: New fields.
8593 (target_supports_non_stop, target_async): New.
8594 (start_non_stop): Declare.
8595 (mywait): Add `options' argument.
8596 * target.c (mywait): Add `options' argument. Print child exit
8597 notifications here.
8598 (start_non_stop): New.
8599 * server.c (non_stop, own_buf, mem_buf): New globals.
8600 (struct vstop_notif): New.
8601 (notif_queue): New global.
8602 (queue_stop_reply, push_event, discard_queued_stop_replies)
8603 (send_next_stop_reply): New.
8604 (start_inferior): Adjust to use resume_kind. Adjust to mywait
8605 interface changes.
8606 (attach_inferior): In non-stop mode, don't wait for the target
8607 here.
8608 (handle_general_set): Handle QNonStop.
8609 (handle_query): When handling qC, return the current general
8610 thread, instead of the first thread of the list.
8611 (handle_query): If the backend supports non-stop mode, include
8612 QNonStop+ in the qSupported query response.
8613 (handle_v_cont): Adjust to use resume_kind. Handle resume_stop
8614 and non-stop mode.
8615 (handle_v_attach, handle_v_run): Handle non-stop mode.
8616 (handle_v_stopped): New.
8617 (handle_v_requests): Report support for vCont;t. Handle vStopped.
8618 (myresume): Adjust to use resume_kind. Handle non-stop.
8619 (queue_stop_reply_callback): New.
8620 (handle_status): Handle non-stop mode.
8621 (main): Clear non_stop flag on reconnection. Use the event-loop.
8622 Refactor serial protocol handling from here ...
8623 (process_serial_event): ... to this new function. When GDB
8624 selects any thread, select one here. In non-stop mode, wait until
8625 GDB acks all pending events before exiting.
8626 (handle_serial_event, handle_target_event): New.
8627 * remote-utils.c (remote_open): Install remote_desc in the event
8628 loop.
8629 (remote_close): Remove remote_desc from the event loop.
8630 (putpkt_binary): Rename to...
8631 (putpkt_binary_1): ... this. Add `is_notic' argument. Handle it.
8632 (putpkt_binary): New as wrapper around putpkt_binary_1.
8633 (putpkt_notif): New.
8634 (prepare_resume_reply): In non-stop mode, don't change the
8635 general_thread.
8636 * event-loop.c: New.
8637 * Makefile.in (OBJ): Add event-loop.o.
8638 (event-loop.o): New rule.
8639
8640 * linux-low.h (pid_of): Moved here.
8641 (lwpid_of): New.
8642 (get_lwp_thread): Use lwpid_of.
8643 (struct lwp_info): Delete `lwpid' field. Add `suspended' field.
8644 * linux-low.c (pid_of): Delete.
8645 (inferior_pid): Use lwpid_of.
8646 (linux_event_pipe): New.
8647 (target_is_async_p): New.
8648 (delete_lwp): New.
8649 (handle_extended_wait): Use lwpid_of.
8650 (add_lwp): Don't set lwpid field.
8651 (linux_attach_lwp): Adjust debug output. Use lwpid_of.
8652 (linux_kill_one_lwp): If killing a running lwp, stop it first.
8653 Use lwpid_of. Adjust to linux_wait_for_event interface changes.
8654 (linux_detach_one_lwp): If detaching from a running lwp, stop it
8655 first. Adjust to linux_wait_for_event interface changes. Use
8656 lwpid_of.
8657 (linux_detach): Don't delete the main lwp here.
8658 (linux_join): Use my_waitpid. Avoid signal_pid. Use lwpid_of.
8659 (status_pending_p): Don't consider explicitly suspended lwps.
8660 (linux_wait_for_lwp): Take an integer pid instead of a lwp_info
8661 pointer. Add OPTIONS argument. Change return type to int. Use
8662 my_waitpid instead of sleeping. Handle WNOHANG. Use lwpid_of.
8663 (linux_wait_for_event): Take an integer pid instead of a lwp_info
8664 pointer. Add status pointer argument. Return a pid instead of a
8665 status. Use lwpid_of. Adjust to linux_wait_for_lwp interface
8666 changes. In non-stop mode, don't switch to a random thread.
8667 (linux_wait): Rename to...
8668 (linux_wait_1): ... this. Add target_options argument, and handle
8669 it. Adjust to use resume_kind. Use lwpid_of. In non-stop mode,
8670 don't handle the continue thread. Handle TARGET_WNOHANG. Merge
8671 clean exit and signal exit code. Don't stop all threads in
8672 non-stop mode. In all-stop mode, only stop all threads when
8673 reporting a stop to GDB. Handle explicit thread stop requests.
8674 (async_file_flush, async_file_mark): New.
8675 (linux_wait): New.
8676 (send_sigstop): Use lwpid_of.
8677 (wait_for_sigstop): Use lwpid_of. Adjust to linux_wait_for_event
8678 interface changes. In non-stop mode, don't switch to a random
8679 thread.
8680 (linux_resume_one_lwp): Use lwpid_of.
8681 (linux_continue_one_thread, linux_queue_one_thread): Merge into ...
8682 (linux_resume_one_thread): ... this. Handle resume_stop. In
8683 non-stop mode, don't look for pending flag in all threads.
8684 (resume_status_pending_p): Don't consider explicitly suspended
8685 threads.
8686 (my_waitpid): Reimplement. Emulate __WALL.
8687 (linux_request_interrupt, linux_read_offsets, linux_xfer_siginfo):
8688 Use lwpid_of.
8689 (sigchld_handler, linux_supports_non_stop, linux_async)
8690 (linux_start_non_stop): New.
8691 (linux_target_ops): Register linux_supports_non_stop, linux_async
8692 and linux_start_non_stop.
8693 (initialize_low): Install SIGCHLD handler.
8694 * thread-db.c (thread_db_create_event, find_one_thread)
8695 (thread_db_get_tls_address): Use lwpid_of.
8696 * win32-low.c (win32_detach): Adjust to use resume_kind.
8697 (win32_wait): Add `options' argument.
8698 * spu-low.c (spu_resume): Adjust to use resume_kind.
8699 (spu_wait): Add `options' argument.
8700
5b1c542e
PA
87012009-04-01 Pedro Alves <pedro@codesourcery.com>
8702
8703 Decouple target code from remote protocol.
8704
8705 * target.h (enum target_waitkind): New.
8706 (struct target_waitstatus): New.
8707 (struct target_ops) <wait>: Return an unsigned long. Take a
8708 target_waitstatus pointer instead of a char pointer.
8709 (mywait): Likewise.
8710 * target.c (mywait): Change prototype to return an unsigned long.
8711 Take a target_waitstatus pointer instead of a char pointer. Adjust.
8712 * server.h (thread_from_wait, old_thread_from_wait): Delete
8713 declarations.
8714 (prepare_resume_reply): Change prototype to take a
8715 target_waitstatus.
8716 * server.c (thread_from_wait, old_thread_from_wait): Delete.
8717 (last_status, last_ptid): New.
8718 (start_inferior): Remove "statusptr" argument. Adjust. Return a
8719 pid instead of a signal.
8720 (attach_inferior): Remove "status" and "signal" parameters.
8721 Adjust.
8722 (handle_query): For qGetTLSAddr, parse the thread id with strtol,
8723 not as an address.
8724 (handle_v_cont, handle_v_attach, handle_v_run, handle_v_kill)
8725 (handle_v_requests, myresume): Remove "status" and "signal"
8726 parameters. Adjust.
8727 (handle_status): New.
8728 (main): Delete local `status'. Adjust.
8729 * remote-utils.c: Include target.h.
8730 (prepare_resume_reply): Change prototype to take a
8731 target_waitstatus. Adjust.
8732
8733 * linux-low.c (linux_wait): Adjust to new target_ops->wait
8734 interface.
8735 * spu-low.c (spu_wait): Adjust.
8736 * win32-low.c (enum target_waitkind, struct target_waitstatus):
8737 Delete.
8738 (win32_wait): Adjust.
8739
2bd7c093
PA
87402009-04-01 Pedro Alves <pedro@codesourcery.com>
8741
8742 * target.h (struct thread_resume): Delete leave_stopped member.
8743 (struct target_ops): Add a `n' argument to the `resume' callback.
8744 * server.c (start_inferior): Adjust.
8745 (handle_v_cont, myresume): Adjust.
8746 * linux-low.c (check_removed_breakpoint): Adjust to resume
8747 interface change, and to removed leave_stopped field.
8748 (resume_ptr): Delete.
8749 (struct thread_resume_array): New.
8750 (linux_set_resume_request): Add new `arg' parameter. Adjust to
8751 resume interface change.
8752 (linux_continue_one_thread, linux_queue_one_thread)
8753 (resume_status_pending_p): Check if the resume field is NULL
8754 instead of checking the leave_stopped member.
8755 (linux_resume): Adjust to the target resume interface change.
8756 * spu-low.c (spu_resume): Adjust to the target resume interface
8757 change.
8758 * win32-low.c (win32_detach, win32_resume): Ditto.
8759
c35fafde
PA
87602009-04-01 Pedro Alves <pedro@codesourcery.com>
8761
8762 * linux-low.c (linux_wait_for_event): Don't clear the `stepping'
8763 flag.
8764 (wait_for_sigstop): Don't leave a finished single-step SIGTRAP
8765 pending.
8766 (linux_continue_one_thread): Only preserve the stepping flag if
8767 there's a pending breakpoint.
8768
0a59d50b
PA
87692009-03-31 Pedro Alves <pedro@codesourcery.com>
8770
8771 * server.c (main): After the inferior having exited, call
8772 remote_close before exiting gdbserver.
8773
f04c6d38
TJB
87742009-03-25 Thiago Jung Bauermann <bauerman@br.ibm.com>
8775
8776 Fix size of FPSCR in Power 7 processors.
8777 * linux-ppc-low.c (PPC_FEATURE_ARCH_2_05): Remove #define.
8778 (PPC_FEATURE_HAS_DFP): New #define.
8779 (ppc_arch_setup): Check for DFP feature instead of ISA 2.05 to decide on
8780 size of the FPSCR.
8781
78e5cee6
PA
87822009-03-23 Pedro Alves <pedro@codesourcery.com>
8783
8784 * server.c (handle_query) Whitespace and formatting.
8785
1b3f6016
PA
87862009-03-22 Pedro Alves <pedro@codesourcery.com>
8787
8788 * i387-fp.c, linux-arm-low.c, linux-cris-low.c,
8789 linux-crisv32-low.c, linux-i386-low.c, linux-low.c,
8790 linux-mips-low.c, linux-s390-low.c, linux-sparc-low.c,
8791 linux-x86-64-low.c, linux-xtensa-low.c, proc-service.c,
8792 regcache.c, remote-utils.c, server.c, spu-low.c, target.h,
8793 thread-db.c, win32-low.c, xtensa-xtregs.c, gdbreplay.c,
8794 Makefile.in, configure.ac: Fix whitespace throughout.
8795 * configure: Regenerate.
8796
a07b2135
PA
87972009-03-22 Pedro Alves <pedro@codesourcery.com>
8798
8799 * inferiors.c (find_inferior): Make it safe for the callback
8800 function to delete the currently iterated inferior.
8801
67cc2626
PA
88022009-03-22 Pedro Alves <pedro@codesourcery.com>
8803
8804 * Makefile.in (linuw_low_h): Move higher.
8805 (thread-db.o): Depend on $(linux_low_h).
8806
54a0b537
PA
88072009-03-17 Pedro Alves <pedro@codesourcery.com>
8808
8809 Rename "process" to "lwp" throughout.
8810
8811 * linux-low.c (all_processes): Rename to...
8812 (all_lwps): ... this.
8813 (inferior_pid, handle_extended_wait, get_stop_pc): Adjust.
8814 (add_process): Rename to ...
8815 (add_lwp): ... this. Adjust.
8816 (linux_create_inferior): Adjust.
8817 (linux_attach_lwp): Adjust.
8818 (linux_attach): Adjust.
8819 (linux_kill_one_process): Rename to ...
8820 (linux_kill_one_lwp): ... this. Adjust.
8821 (linux_kill): Adjust.
8822 (linux_detach_one_process): Rename to ...
8823 (linux_detach_one_lwp): ... this. Adjust.
8824 (linux_detach): Adjust.
8825 (check_removed_breakpoint): Adjust.
8826 (status_pending_p): Adjust.
8827 (linux_wait_for_process): Rename to ...
8828 (linux_wait_for_lwp): ... this. Adjust.
8829 (linux_wait_for_event): Adjust.
8830 (send_sigstop): Adjust.
8831 (wait_for_sigstop): Adjust.
8832 (stop_all_processes): Rename to ...
8833 (stop_all_lwps): ... this.
8834 (linux_resume_one_process): Rename to ...
8835 (linux_resume_one_lwp): ... this. Adjust.
8836 (linux_set_resume_request, linux_continue_one_thread)
8837 (linux_queue_one_thread, resume_status_pending_p)
8838 (usr_store_inferior_registers, regsets_store_inferior_registers)
8839 (linux_request_interrupt, linux_read_offsets, linux_xfer_siginfo):
8840 Adjust.
8841 * linux-low.h (get_process): Rename to ...
8842 (get_lwp): ... this. Adjust.
8843 (get_thread_process): Rename to ...
8844 (get_thread_lwp): ... this. Adjust.
8845 (get_process_thread): Rename to ...
8846 (get_lwp_thread): ... this. Adjust.
8847 (struct process_info): Rename to ...
8848 (struct lwp_info): ... this.
8849 (all_processes): Rename to ...
8850 (all_lwps): ... this.
8851 * proc-service.c (ps_lgetregs): Adjust.
8852 * thread-db.c (thread_db_create_event, find_one_thread)
8853 (maybe_attach_thread, thread_db_get_tls_address): Adjust.
8854
0b16c5cf
PA
88552009-03-14 Pedro Alves <pedro@codesourcery.com>
8856
8857 * server.c (handle_query): Handle "qAttached".
8858
32de4b9d
NS
88592009-03-13 Nathan Sidwell <nathan@codesourcery.com>
8860
8861 * Makefile.in, hostio-errno.c, errno.c, xtensa-xtregs.c: Change to
8862 GPLv3, update license URL.
8863
2aecd87f
DE
88642009-03-01 Doug Evans <dje@google.com>
8865
93efd302 8866 * Makefile.in (INCLUDE_CFLAGS): Add -I$(srcdir)/../common.
2aecd87f
DE
8867 (server_h): Add gdb_signals.h.
8868 (signals.o): Update.
8869 * server.h (target_signal_from_host,target_signal_to_host_p)
8870 (target_signal_to_host,target_signal_to_name): Moved to gdb_signals.h.
8871
86b1f9c5
PM
88722009-02-14 Pierre Muller <muller@ics.u-strasbg.fr>
8873
8874 * remote-utils.c (getpkt): Also generate remote-debug
8875 information if noack_mode is set.
8876
4aa995e1
PA
88772009-02-06 Pedro Alves <pedro@codesourcery.com>
8878
8879 * server.c (handle_query): Report qXfer:siginfo:read and
8880 qXfer:siginfo:write as supported and handle them.
8881 * target.h (struct target_ops) <qxfer_siginfo>: New field.
8882 * linux-low.c (linux_xfer_siginfo): New.
8883 (linux_target_ops): Set it.
8884
62709adf
PA
88852009-01-26 Pedro Alves <pedro@codesourcery.com>
8886
8887 * server.c (gdbserver_usage): Mention --remote-debug.
8888 (main): Accept '--remote-debug' switch.
8889
aef93bd7
DE
88902009-01-18 Doug Evans <dje@google.com>
8891
8892 * regcache.c (new_register_cache): No need to check result of xcalloc.
8893 * server.c (handle_search_memory): Back out calls to xmalloc,
8894 result is checked and error is returned to user upon failure.
8895 (handle_query): Ditto. Add more checks for result of malloc.
8896 (handle_v_cont): Check result of malloc, report error back to
8897 user upon failure.
8898 (handle_v_run): Ditto. Call freeargv.
8899 * server.h (freeargv): Declare.
8900 * utils.c (freeargv): New fn.
8901
54363045
DE
89022009-01-15 Doug Evans <dje@google.com>
8903
f626972c
DE
8904 * gdbreplay.c (perror_with_name): Make arg const char *.
8905 * server.h (target_signal_to_name): Make return type const char *.
0842e787 8906 * thread-db.c (thread_db_err_str): Make return type const char *.
f626972c 8907 * utils.c (perror_with_name): Make arg const char *.
54363045 8908
18aae699
PA
89092009-01-14 Pedro Alves <pedro@codesourcery.com>
8910
8911 * win32-low.c (get_child_debug_event): Issue a final DBG_CONTINUE
8912 when handling a EXIT_PROCESS_DEBUG_EVENT.
8913
ff703abe
JB
89142009-01-06 Joel Brobecker <brobecker@adacore.com>
8915
8916 * gdbreplay.c (gdbreplay_version): Update copyright year.
8917 * server.c (gdbserver_version): Likewise.
8918
f21cc1a2 89192009-01-05 Doug Evans <dje@google.com>
0e21c1ec
DE
8920
8921 * linux-low.c (linux_attach_lwp): Add some comments/fixmes.
f21cc1a2 8922 (handle_extended_wait): Improve comment.
0e21c1ec 8923
bca929d3
DE
89242008-12-13 Doug Evans <dje@google.com>
8925
8926 * utils.c (xmalloc,xcalloc,xstrdup): New fns.
8927 * server.h (ATTR_MALLOC): New macro.
8928 (xmalloc,xcalloc,xstrdup): Declare.
8929 * hostio.c: Replace malloc,calloc,strdup with xmalloc,xcalloc,xstrdup.
8930 * inferiors.c: Ditto.
8931 * linux-low.c: Ditto.
8932 * mem-break.c: Ditto.
8933 * regcache.c: Ditto.
8934 * remote-utils.c: Ditto.
8935 * server.c: Ditto.
8936 * target.c: Ditto.
8937 * win32-low.c: Ditto.
8938
97438e3f
DE
89392008-12-12 Doug Evans <dje@google.com>
8940
896c7fbb
DE
8941 * linux-low.c (linux_wait_for_process): Don't clobber current_inferior
8942 in debugging printf.
8943
97438e3f
DE
8944 * linux-low.c (handle_extended_wait): Simplify, use my_waitpid.
8945
e3b886f8
DE
89462008-12-09 Doug Evans <dje@google.com>
8947
8948 * linux-low.h (struct process_info): Delete member tid, unused.
8949 * thread-db.c (find_one_thread): Update.
8950 (maybe_attach_thread): Update.
8951
07e059b5
VP
89522008-12-02 Pedro Alves <pedro@codesourcery.com>
8953
889bf7c5
PA
8954 * target.h (struct target_ops): Add qxfer_osdata member.
8955 * linux-low.c: Include ctype.h and pwd.h and sys/types.h
8956 and dirent.h.
8957 (linux_qxfer_osdata): New functions.
8958 (linux_target_ops): Register linux_qxfer_osdata as qxfer_osdata
8959 callback.
8960 * server.c (handle_query): Handle "qXfer:osdata:read:".
8961 * remote-utils.c (buffer_grow, buffer_free, buffer_init, buffer_finish)
8962 (buffer_xml_printf): New functions.
8963 * server.h (struct buffer): New.
8964 (buffer_grow_str, buffer_grow_str0): New macros.
8965 (buffer_grow, buffer_free, buffer_init, buffer_finish)
8966 (buffer_xml_printf): Declare.
07e059b5 8967
4cab47ab
DE
89682008-11-24 Doug Evans <dje@google.com>
8969
8970 * Makefile.in (VERSION,DIST,LINT,LINTFLAGS): Delete, unused.
8971
f142445f
DJ
89722008-11-24 Daniel Jacobowitz <dan@codesourcery.com>
8973
8974 * server.c (handle_v_run): Always use the supplied argument list.
8975
d0107bb6 89762008-11-19 Bob Wilson <bob.wilson@acm.org>
889bf7c5 8977
d0107bb6
BW
8978 * xtensa-xtregs.c (XTENSA_ELF_XTREG_SIZE): Change to 4.
8979 (xtensa_regmap_table): Add entry for scompare1.
889bf7c5 8980
2c4ad781
TJB
89812008-11-18 Thiago Jung Bauermann <bauerman@br.ibm.com>
8982
8983 * Makefile.in (powerpc-isa205-32l.o, powerpc-isa205-32l.c,
8984 powerpc-isa205-altivec32l.o, powerpc-isa205-altivec32l.c,
8985 powerpc-isa205-vsx32l.o, powerpc-isa205-vsx32l.c,
8986 powerpc-isa205-64l.o, powerpc-isa205-64l.c,
8987 powerpc-isa205-altivec64l.o, powerpc-isa205-altivec64l.c,
8988 powerpc-isa205-vsx64l.o, powerpc-isa205-vsx64l.c): New targets.
8989 * configure.srv (powerpc*-*-linux*): Add ISA 2.05 object files and
8990 XML target descriptions.
8991 * linux-ppc-low.c (ppc_arch_setup): Init registers with 64-bit FPSCR
8992 when inferior is running on an ISA 2.05 or later processor. Add
8993 special case to return offset for full 64-bit slot of FPSCR when
8994 in 32-bits.
8995
dfb64f85
DJ
89962008-11-14 Daniel Gutson <dgutson@codesourcery.com>
8997
8998 * Makefile.in (SFILES, clean): Added sparc64 files.
8999 (reg-sparc64.o, reg-sparc64.c): New.
9000 * configure.srv (sparc*-*-linux*): New configuration.
9001 * linux-low.c (regsets_fetch_inferior_registers): Swap ptrace
9002 syscall arguments for SPARC.
9003 (regsets_store_inferior_registers): Likewise.
9004 * linux-sparc-low.c: New file.
9005
66b6e1dd
DE
90062008-10-21 Doug Evans <dje@google.com>
9007
9008 * Makefile.in (BFD_DIR,BFD,BFD_SRC,BFD_CFLAGS): Delete.
9009 (READLINE_DIR,READLINE_DEP): Delete.
9010 (INTERNAL_CFLAGS): Update.
9011 (LINTFLAGS): Update.
9012
9b710a42
PA
90132008-10-10 Pedro Alves <pedro@codesourcery.com>
9014
9015 * server.c (handle_v_run): If GDB didn't specify an argv, use the
9016 whole argv from the last run, not just argv[0].
9017
5822d809
PA
90182008-09-08 Pedro Alves <pedro@codesourcery.com>
9019
9020 * regcache.c (new_register_cache): Return NULL if the register
9021 cache size isn't known yet.
9022 (free_register_cache): Avoid dereferencing a NULL regcache.
9023
74aac56f
DJ
90242008-09-04 Daniel Jacobowitz <dan@codesourcery.com>
9025
9026 * configure.srv: Merge MIPS and MIPS64.
9027
400b20f5
MR
90282008-08-24 Maciej W. Rozycki <macro@linux-mips.org>
9029
9030 * Makefile.in (uninstall): Apply $(EXEEXT) too.
9031
677c5bb1
LM
90322008-08-18 Luis Machado <luisgpm@br.ibm.com>
9033
9034 * Makefile.in: Add required vsx dependencies.
9035
9036 * linux-ppc-low: Define PPC_FEATURE_HAS_VSX.
9037 Declare init_registers_powerpc_vsx32l.
9038 Declare init_registers_powerpc_vsx64l.
9039 Define PTRACE_GETVSXREGS and PTRACE_SETVSXREGS.
9040 (ppc_arch_setup): Check for VSX in hwcap.
9041 (ppc_fill_vsxregset): New function.
9042 (ppc_store_vsxregset): New function.
9043 Add new VSX entry in regset_info target_regsets.
9044
9045 * configure.srv: Add new VSX dependencies.
9046
a6f3e723
SL
90472008-08-12 Pedro Alves <pedro@codesourcery.com>
9048
9049 * remote-utils.c (noack_mode, transport_is_reliable): New globals.
9050 (remote_open): Set or clear transport_is_reliable.
9051 (putpkt_binary): Don't expect acks in noack mode.
9052 (getpkt): Don't send ack/nac in noack mode.
9053 * server.c (handle_general_set): Handle QStartNoAckMode.
9054 (handle_query): If connected by tcp pass QStartNoAckMode+ in
9055 qSupported.
9056 (main): Reset noack_mode on every connection.
9057 * server.h (noack_mode): Declare.
9058
a417dc56
RW
90592008-08-07 Ralf Wildenhues <Ralf.Wildenhues@gmx.de>
9060
9061 * Makefile.in (GDBREPLAY_OBS): New variable.
9062 (gdbreplay$(EXEEXT)): Use it to avoid unportable $^.
9063
3221518c
UW
90642008-08-05 Ulrich Weigand <uweigand@de.ibm.com>
9065 Daniel Jacobowitz <dan@codesourcery.com>
9066
9067 * linux-low.c (linux_resume_one_process): Ignore ESRCH.
9068 (usr_store_inferior_registers): Likewise.
9069 (regsets_store_inferior_registers): Likewise.
9070
ec56be1b
PA
90712008-07-31 Rolf Jansen <rj@surtec.com>
9072 Pedro Alves <pedro@codesourcery.com>
9073
9074 * configure.ac: Check for memmem declaration.
9075 * server.c [HAVE_MALLOC_H]: Include malloc.h.
9076 (disable_packet_vCont, disable_packet_Tthread, disable_packet_qC)
9077 (disable_packet_qfThreadInfo): Unconditionally compile.
9078 * server.h [!HAVE_DECL_MEMMEM]: Declare memmem.
9079 * configure, config.in: Regenerate.
9080
2fe5e3ff
DE
90812008-07-28 Doug Kwan <dougkwan@google.com>
9082
9083 * linux-low.c (sys/dir.h, sys/user.h): Remove includes.
9084 (linux_write_memory): Remove declaration of errno.
9085
836acd6d
UW
90862008-07-12 Ulrich Weigand <uweigand@de.ibm.com>
9087
9088 * linux-low.c (handle_extended_wait): Do not use "status"
9089 variable uninitialized.
9090
aeba519e
PA
90912008-07-07 Pedro Alves <pedro@codesourcery.com>
9092
9093 * server.c (handle_v_attach): Inhibit reporting dll changes.
9094
db42f210
PA
90952008-06-27 Pedro Alves <pedro@codesourcery.com>
9096
9097 * remote-utils.c (prepare_resume_reply): If requested, don't
9098 output "thread:TID" in the T stop reply.
9099
9100 * server.c (disable_packet_vCont, disable_packet_Tthread)
9101 (disable_packet_qC, disable_packet_qfThreadInfo): New globals.
9102 (handle_query): If requested, disable support for qC, qfThreadInfo
9103 and qsThreadInfo.
9104 (handle_v_requests): If requested, disable support for vCont.
9105 (gdbserver_show_disableable): New.
9106 (main): Handle --disable-packet and --disable-packet=LIST.
9107
9108 * server.h (disable_packet_vCont, disable_packet_Tthread)
9109 (disable_packet_qC, disable_packet_qfThreadInfo): Declare.
9110
8e4c5421
CD
91112008-06-20 Carlos O'Donell <carlos@codesourcery.com>
9112
9113 * server.c (gdbserver_usage): Mention --version.
9114
6e23a804
DJ
91152008-06-06 Daniel Jacobowitz <dan@codesourcery.com>
9116
9117 * Makefile.in (gdbreplay.o): New rule.
9118
90aa6a40
JM
91192008-06-06 Joseph Myers <joseph@codesourcery.com>
9120
9121 * gdbreplay.c (gdbreplay_version): Say gdbreplay in version
9122 message, not gdbserver.
9123
c16158bc 91242008-06-05 Vladimir Prus <vladimir@codesourcery.com>
889bf7c5
PA
9125 Nathan Sidwell <nathan@codesourcery.com>
9126 Joseph Myers <joseph@codesourcery.com>
c16158bc
JM
9127
9128 * acinclude.m4: Include ../../config/acx.m4.
9129 * configure.ac: Use ACX_PKGVERSION and ACX_BUGURL.
9130 * configure, config.in: Regenerate.
9131 * Makefile.in (gdbreplay$(EXEEXT)): Add version.o.
9132 * server.c (gdbserver_version): Print PKGVERSION.
9133 (gdbsrever_usage): Add stream parameter. Print REPORT_BUGS_TO.
9134 (main): Adjust gdbserver_usage calls.
9135 * gdbreplay.c (version, host_name): Add declarations.
9136 (gdbreplay_version, gdbreplay_usage): New.
9137 (main): Accept --version and --help options.
9138
aeb75bf5
DJ
91392008-06-04 Daniel Jacobowitz <dan@codesourcery.com>
9140
9141 * linux-arm-low.c (thumb_breakpoint, thumb_breakpoint_len): New.
9142 (arm_breakpoint_at): Handle Thumb.
9143 (the_low_target): Add comment.
9144
76b233dd
UW
91452008-05-29 Ulrich Weigand <uweigand@de.ibm.com>
9146
9147 * linux-ppc-low.c (ppc_collect_ptrace_register): Clear buffer.
9148
08388c79
DE
91492008-05-09 Doug Evans <dje@google.com>
9150
a3c83fae
DE
9151 * server.h (decode_search_memory_packet): Declare.
9152 * remote-utils.c (decode_search_memory_packet): New fn.
9153 * server.c (handle_search_memory_1): New fn.
08388c79
DE
9154 (handle_search_memory): New fn.
9155 (handle_query): Process qSearch:memory packets.
9156
bb9c3d36
UW
91572008-05-08 Ulrich Weigand <uweigand@de.ibm.com>
9158
9159 * regcache.c (registers_length): Remove.
9160 (set_register_cache): Verify that PBUFSIZ is large enough to hold a
9161 full register packet.
9162 * regcache.h (registers_length): Remove prototype.
9163 * server.h (PBUFSIZ): Define to 16384.
9164
7284e1be
UW
91652008-05-03 Ulrich Weigand <uweigand@de.ibm.com>
9166
9167 * configure.srv (powerpc*-*-linux*): Set srv_regobj to
9168 powerpc-32l.o, powerpc-altivec32l.o, powerpc-e500l.o,
9169 powerpc-64l.o, and powerpc-altivec64l.o.
9170 Remove rs6000/powerpc-32.xml, rs6000/powerpc-64.xml, and
9171 rs6000/powerpc-e500.xml; add rs6000/powerpc-32l.xml,
9172 rs6000/powerpc-altivec32l.xml, rs6000/powerpc-e500l.xml,
9173 rs6000/powerpc-64l.xml, rs6000/powerpc-altivec64l.xml,
9174 rs6000/power-linux.xml, and rs6000/power64-linux.xml
9175 to srv_xmlfiles.
9176
9177 * Makefile.in (reg-ppc.o, reg-ppc.c): Remove, replace by ...
9178 (powerpc-32l.o, powerpc-32l.c): ... these new rules.
9179 (powerpc-32.o, powerpc-32.c): Remove, replace by ...
9180 (powerpc-altivec32l.o, powerpc-altivec32l.c): ... these new rules.
9181 (powerpc-e500.o, powerpc-e500.c): Remove, replace by ...
9182 (powerpc-e500l.o, powerpc-e500l.c): ... these new rules.
9183 (reg-ppc64.o, reg-ppc64.c): Remove, replace by ...
9184 (powerpc-64l.o, powerpc-64l.c): ... these new rules.
9185 (powerpc-64.o, powerpc-64.c): Remove, replace by ...
9186 (powerpc-altivec64l.o, powerpc-altivec64l.c): ... these new rules.
9187 (clean): Update.
9188
9189 * linux-ppc-low.c (init_registers_ppc): Remove, replace by ...
9190 (init_registers_powerpc_32l): ... this new prototype.
9191 (init_registers_powerpc_32): Remove, replace by ...
9192 (init_registers_powerpc_altivec32l): ... this new prototype.
9193 (init_registers_powerpc_e500): Remove, replace by ...
9194 (init_registers_powerpc_e500l): ... this new prototype.
9195 (init_registers_ppc64): Remove, replace by ...
9196 (init_registers_powerpc_64l): ... this new prototype.
9197 (init_registers_powerpc_64): Remove, replace by ...
9198 (init_registers_powerpc_altivec64l): ... this new prototype.
9199 (ppc_num_regs): Set to 73.
9200 (PT_ORIG_R3, PT_TRAP): Define if necessary.
9201 (ppc_regmap, ppc_regmap_e500): Add values for orig_r3 and trap.
9202 (ppc_cannot_store_register): Handle orig_r3 and trap.
9203 (ppc_arch_setup): Update init_registers_... calls.
9204 (ppc_fill_gregset): Handle orig_r3 and trap.
9205
9206 * inferiors.c (clear_inferiors): Reset current_inferior.
9207
fdc59709
PB
92082008-04-23 Paolo Bonzini <bonzini@gnu.org>
9209
889bf7c5
PA
9210 * acinclude.m4: Add override.m4.
9211 * configure: Regenerate.
fdc59709 9212
c9b2f845
UW
92132008-04-21 Ulrich Weigand <uweigand@de.ibm.com>
9214
9215 * linux-ppc-low.c (ppc_arch_setup): Reset ppc_hwcap after the
9216 initial call to init_register_ppc64.
9217
550512b8
UW
92182008-04-21 Ulrich Weigand <uweigand@de.ibm.com>
9219
43aaf8b6
PA
9220 * configure.srv (powerpc64-*-linux*, powerpc-*-linux*): Merge into
9221 single powerpc*-*-linux* case.
550512b8
UW
9222 (s390-*-linux*, s390x-*-linux*): Merge into single s390*-*-linux* case.
9223
b6430ec3
UW
92242008-04-17 Ulrich Weigand <uweigand@de.ibm.com>
9225
9226 * configure.srv [powerpc64-*-linux*]: Remove powerpc-e500.o from
889bf7c5 9227 srv_regobj. Remove rs6000/powerpc-e500.xml and rs6000/power-spe.xml
b6430ec3
UW
9228 from reg_xmlfiles.
9229 * linux-ppc-low.c: Include <elf.h>.
9230 (PPC_FEATURE_HAS_ALTIVEC, PPC_FEATURE_HAS_SPE): Define.
9231 (ppc_hwcap): New global variable.
9232 (ppc_regmap): Remove __SPE__ #ifdef sections.
9233 (ppc_regmap_e500): New global variable.
9234 (ppc_cannot_store_register): Update __SPE__ special case.
9235 (ppc_get_hwcap): New function.
9236 (ppc_arch_setup): Use it to determine whether inferior supports
9237 AltiVec or SPE registers. Set the_low_target.regmap if appropriate.
9238 (ppc_fill_vrregset, ppc_store_vrregset): Define unconditionally.
9239 Do not access registers if target does not support AltiVec.
9240 (ppc_fill_evrregset, ppc_store_evrregset): Define unconditionally.
9241 Do not access registers if target does not support SPE.
9242 (target_regsets): Unconditionally include AltiVec and SPE regsets.
9243
52fa2412
UW
92442008-04-17 Daniel Jacobowitz <dan@codesourcery.com>
9245
9246 * linux-low.c (disabled_regsets, num_regsets): New.
9247 (use_regsets_p): Delete.
9248 (linux_wait_for_process): Clear disabled_regsets.
9249 (regsets_fetch_inferior_registers): Check and set it.
9250 (regsets_store_inferior_registers): Likewise.
9251 (linux_fetch_registers, linux_store_registers): Do not use
9252 use_regsets_p.
9253 (initialize_low): Allocate disabled_regsets.
9254
e28b3332
DJ
92552008-04-14 Daniel Jacobowitz <dan@codesourcery.com>
9256
9257 * Makefile.in (LIBOBJS): New.
9258 (OBS): Use LIBOBJS.
9259 (memmem.o): New rule.
9260 * configure.ac: Use AC_CONFIG_LIBOBJ_DIR and check for memmem.
9261 * configure: Regenerated.
9262
4536995d
UW
92632008-04-04 Ulrich Weigand <uweigand@de.ibm.com>
9264
9265 * server.c (handle_query): Never return "unsupported" for
9266 qXfer:features:read queries.
9267
221c031f
UW
92682008-03-27 Ulrich Weigand <uweigand@de.ibm.com>
9269
9270 * server.c (get_features_xml): Fix inverted condition.
9271 (handle_query): Always support qXfer:feature:read.
9272
ccd213ac
DJ
92732008-03-10 Daniel Jacobowitz <dan@codesourcery.com>
9274
9275 * server.c (wrapper_argv): New.
9276 (start_inferior): Handle wrapper_argv. If set, expect an extra
9277 trap.
9278 (gdbserver_usage): Document --wrapper.
9279 (main): Parse --wrapper.
9280
6fe305f7
UW
92812008-02-28 Ulrich Weigand <uweigand@de.ibm.com>
9282
9283 * configure.srv [powerpc64-*-linux*]: Add all files mentioned for
9284 powerpc-*-linux* to srv_regobj and reg_xmlfiles.
9285 * linux-ppc-low.c (ppc_get_pc): Support bi-arch operation.
9286 (ppc_set_pc): Likewise.
9287 (ppc_arch_setup): New function.
9288 (ppc_fill_gregset): Call ppc_collect_ptrace_register instead
9289 of collect_register.
889bf7c5 9290 (the_low_target): Use ppc_arch_setup as arch_setup initializer.
6fe305f7 9291
5b0a002e
UW
92922008-02-28 Ulrich Weigand <uweigand@de.ibm.com>
9293
9294 * configure.srv [powerpc64-*-linux*]: Use linux-ppc-low.o
9295 instead of linux-ppc64-low.o.
9296 * linux-ppc64-low.c: Remove file.
9297 * Makefile.in (SFILES): Remove linux-ppc64-low.c.
9298 (linux-ppc64-low.o): Remove rule.
9299
9300 * linux-ppc-low.c (init_registers_ppc64): Add prototype.
9301 (init_registers_powerpc_64): Likewise.
9302 (ppc_regmap): Conditionally define depending on __powerpc64__.
9303 (ppc_cannot_store_register): Do not special-case "fpscr" when
9304 compiled on __powerpc64__.
9305 (ppc_collect_ptrace_register): New function.
9306 (ppc_supply_ptrace_register): New function.
9307 (ppc_breakpoint): Change type to "unsigned int".
9308 (ppc_breakpoint_at): Change type of "insn" to "unsigned int".
9309 (the_low_target): Conditionally provide initializers for the
889bf7c5 9310 arch_setup member depending on __powerpc64__. Install
5b0a002e
UW
9311 collect_ptrace_register and supply_ptrace_register members.
9312
9b4b61c8
UW
93132008-02-28 Ulrich Weigand <uweigand@de.ibm.com>
9314
9315 * regcache.h (gdbserver_xmltarget): Add extern declaration.
9316 * server.c (gdbserver_xmltarget): Define.
9317 (get_features_xml): Use it to replace "target.xml" and arch_string.
9318
9319 * configure.srv: Remove srv_xmltarget. Add XML files that were
9320 mentioned there to srv_xmlfiles instead. Remove conditional tests
9321 on gdb_cv_arm_iwmmxt, gdb_cv_ppc_altivec, gdb_cv_ppc_spe; set
9322 srv_xmlfiles and srv_regobj to include all possible choices.
9323 * configure.ac (srv_xmltarget): Remove.
9324 (srv_xmlfiles): Do not add "target.xml".
9325 (gdb_cv_arm_iwmmxt, gdb_cv_ppc_altivec, gdb_cv_ppc_spe): Remove
9326 checks for supplementary target information.
9327 * configure: Regenerate.
9328 * Makefile.in (XML_TARGET): Remove.
9329 (target.xml): Remove rule.
9330 (clean): Do not clean up target.xml.
9331 (.PRECIOUS): Do not mention target.xml.
9332
9333 * target.h (struct target_ops): Remove arch_string member.
9334 * linux-low.c (linux_arch_string): Remove.
9335 (linux_target_ops): Remove arch_string initializer.
9336 * linux-low.h (struct linux_target_ops): Remove arch_string member.
9337 * linux-i386-low.c (the_low_target): Remove arch_string initializer.
9338 * linux-x86-64-low.c (the_low_target): Remove arch_string initializer.
9339 * spu-low.c (spu_arch_string): Remove.
9340 (spu_target_ops): Remove arch_string initializer.
9341 * win32-low.c (win32_arch_string): Remove.
9342 (win32_target_ops): Remove arch_string initializer.
9343 * win32-low.h (struct win32_target_ops): Remove arch_string member.
9344 * win32-arm-low.c (the_low_target): Remove arch_string initializer.
9345 * win32-i368-low.c (the_low_target): Remove arch_string initializer.
9346
ee1a7ae4
UW
93472008-02-27 Ulrich Weigand <uweigand@de.ibm.com>
9348
9349 * linux-low.h (struct linux_target_ops): Replace left_pad_xfer field
9350 by collect_ptrace_register and supply_ptrace_register hooks.
9351 * linux-low.c (fetch_register): Use supply_ptrace_register callback
9352 instead of checking for the_low_target.left_pad_xfer.
9353 (usr_store_inferior_registers): Use collect_ptrace_register callback
9354 instead of checking for the_low_target.left_pad_xfer.
9355
9356 * linux-s390-low.c (s390_collect_ptrace_register): New function.
9357 (s390_supply_ptrace_register): Likewise.
9358 (s390_fill_gregset): Call s390_collect_ptrace_register.
9359 (the_low_target): Update.
9360
9361 * linux-ppc64-low.c (ppc_collect_ptrace_register): New function.
9362 (ppc_supply_ptrace_register): Likewise.
9363 (the_low_target): Update.
9364
9365 * linux-i386-low.c (the_low_target): Update.
9366 * linux-x86-64-low.c (the_low_target): Update.
9367
d61ddec4
UW
93682008-02-27 Ulrich Weigand <uweigand@de.ibm.com>
9369
9370 * configure.srv [s390x-*-linux*]: Set srv_regobj to include both
9371 reg-s390.o and reg-s390x.o.
9372
9373 * linux-low.c (new_inferior): New global variable.
9374 (linux_create_inferior, linux_attach): Set it.
9375 (linux_wait_for_process): Call the_low_target.arch_setup after the
9376 target has stopped for the first time.
9377 (initialize_low): Do not call the_low_target.arch_setup.
9378
9379 * linux-s390-low.c (s390_get_pc): Support bi-arch operation.
9380 (s390_set_pc): Likewise.
9381 (s390_arch_setup): New function.
9382 (the_low_target): Use s390_arch_setup as arch_setup routine.
9383
9384 * regcache.c (realloc_register_cache): New function.
9385 (set_register_cache): Call it for each existing regcache.
9386
d05b4ac3
UW
93872008-02-27 Ulrich Weigand <uweigand@de.ibm.com>
9388
9389 * server.h (init_registers): Remove prototype.
9390
9391 * linux-low.h (struct linux_target_ops): Add arch_setup field.
9392 * linux-low.c (initialize_low): Call the_low_target.arch_setup ()
9393 instead of init_registers ().
9394 * linux-arm-low.c (init_registers_arm): Add prototype.
9395 (init_registers_arm_with_iwmmxt): Likewise.
9396 (the_low_target): Add initializer for arch_setup field.
9397 * linux-cris-low.c (init_registers_cris): Add prototype.
9398 (the_low_target): Add initializer for arch_setup field.
9399 * linux-crisv32-low.c (init_registers_crisv32): Add prototype.
9400 (the_low_target): Add initializer for arch_setup field.
9401 * linux-i386-low.c (init_registers_i386_linux): Add prototype.
9402 (the_low_target): Add initializer for arch_setup field.
9403 * linux-ia64-low.c (init_registers_ia64): Add prototype.
9404 (the_low_target): Add initializer for arch_setup field.
9405 * linux-m32r-low.c (init_registers_m32r): Add prototype.
9406 (the_low_target): Add initializer for arch_setup field.
9407 * linux-m68k-low.c (init_registers_m68k): Add prototype.
9408 (the_low_target): Add initializer for arch_setup field.
9409 * linux-mips-low.c (init_registers_mips_linux): Add prototype.
9410 (init_registers_mips64_linux): Likewise.
9411 (the_low_target): Add initializer for arch_setup field.
9412 * linux-ppc-low.c (init_registers_ppc): Add prototype.
9413 (init_registers_powerpc_32, init_registers_powerpc_e500): Likewise.
9414 (the_low_target): Add initializer for arch_setup field.
9415 * linux-ppc64-low.c (init_registers_ppc64): Add prototype.
9416 (init_registers_powerpc_64): Likewise.
9417 (the_low_target): Add initializer for arch_setup field.
9418 * linux-s390-low.c (init_registers_s390): Add prototype.
9419 (init_registers_s390x): Likewise.
9420 (the_low_target): Add initializer for arch_setup field.
9421 * linux-sh-low.c (init_registers_sh): Add prototype.
9422 (the_low_target): Add initializer for arch_setup field.
9423 * linux-x86-64-low.c (init_registers_x86_64_linux): Add prototype.
9424 (the_low_target): Add initializer for arch_setup field.
9425 * linux-xtensa-low.c (init_registers_xtensa): Add prototype.
9426 (the_low_target): Add initializer for arch_setup field.
9427
9428 * win32-low.h (struct win32_target_ops): Add arch_setup field.
9429 * win32-low.c (initialize_low): Call the_low_target.arch_setup ()
9430 instead of init_registers ().
9431 * win32-arm-low.c (init_registers_arm): Add prototype.
9432 (the_low_target): Add initializer for arch_setup field.
9433 * win32-i386-low.c (init_registers_i386): Add prototype.
9434 (the_low_target): Add initializer for arch_setup field.
9435
9436 * spu-low.c (init_registers_spu): Add prototype.
9437 (initialize_low): Call initialie_registers_spu () instead of
9438 initialize_registers ().
9439
fd96d250
PA
94402008-02-19 Pedro Alves <pedro@codesourcery.com>
9441
9442 * server.c (handle_v_requests): When handling the vRun and vAttach
9443 packets, if already debugging a process, don't kill it. Return an
9444 error instead.
9445
d41b6bb4
DJ
94462008-02-17 Daniel Jacobowitz <dan@codesourcery.com>
9447
9448 * server.c (handle_query): Correct length check.
9449
5ac588cf
PA
94502008-02-14 Pedro Alves <pedro_alves@portugalmail.pt>
9451
9452 * win32-low.c (do_initial_child_stuff): Add process handle
9453 parameter. Set current_process_handle and current_process_id from the
9454 parameters. Clear globals.
9455 (win32_create_inferior): Don't set current_process_handle and
9456 current_process_id here. Instead pass them on the call to
9457 do_initial_child_stuff.
9458 (win32_attach): Likewise.
9459 (win32_clear_inferiors): New.
9460 (win32_kill): Don't close the current process handle or the
9461 current thread handle here. Instead call win32_clear_inferiors.
9462 (win32_detach): Don't open a new handle to the process. Call
9463 win32_clear_inferiors.
9464 (win32_join): Don't rely on current_process_handle; open a new
9465 handle using the process id.
9466 (win32_wait): Call win32_clear_inferiors when the inferior process
9467 has exited.
9468
ecd7ecbc
DJ
94692008-02-14 Daniel Jacobowitz <dan@codesourcery.com>
9470
9471 * server.c (monitor_show_help): Add "exit".
9472
1525d545
MG
94732008-02-11 Maxim Grigoriev <maxim2405@gmail.com>
9474
ecd7ecbc 9475 * Makefile.in (SFILES): Add linux-xtensa-low.c.
1525d545
MG
9476 (clean): Add reg-xtensa.c.
9477 (linux-xtensa-low.o, reg-xtensa.o, reg-xtensa.c): New dependencies.
ecd7ecbc
DJ
9478 * configure.srv (xtensa*-*-linux*) New target.
9479 * linux-xtensa-low.c: New.
9480 * xtensa-xtregs.c: New.
1525d545 9481
59a016f0
PA
94822008-02-01 Pedro Alves <pedro_alves@portugalmail.pt>
9483
9484 * hostio.c: Don't include errno.h.
9485 (errno_to_fileio_errno): Move to hostio-errno.
9486 * hostio.c: (hostio_error): Remove the error parameter. Defer the
9487 error number outputting to the target->hostio_last_error callback.
9488 (hostio_packet_error): Use FILEIO_EINVAL directly.
9489 (handle_open, handle_pread, hostio_error, handle_unlink): Update
9490 calls to hostio_error.
9491 * hostio-errno.c: New.
9492 * server.h (hostio_last_error_from_errno): Declare.
9493 * target.h (target_ops): Add hostio_last_error member.
9494 * linux-low.c (linux_target_op): Register hostio_last_error_from_errno
9495 as hostio_last_error handler.
889bf7c5 9496 * spu-low.c (spu_target_ops): Likewise.
59a016f0
PA
9497 * win32-low.c [_WIN32_WCE] (win32_error_to_fileio_error)
9498 (wince_hostio_last_error): New functions.
9499 (win32_target_ops) [_WIN32_WCE]: Register wince_hostio_last_error
9500 as hostio_last_error handler.
9501 (win32_target_ops) [!_WIN32_WCE]: Register
9502 hostio_last_error_from_errno as hostio_last_error handler.
9503 * Makefile.in (SFILES): Add hostio.c and hostio-errno.c.
9504 (hostio-errno.o): New rule.
9505 * configure.ac (GDBSERVER_DEPFILES): Add $srv_hostio_err_objs.
9506 * configure.srv (srv_hostio_err_objs): New variable. Default to
9507 hostio-errno.o.
9508 (arm*-*-mingw32ce*): Set srv_hostio_err_objs to "".
9509 * configure: Regenerate.
9510
2d717e4f
DJ
95112008-01-29 Daniel Jacobowitz <dan@codesourcery.com>
9512
9513 * linux-low.c (linux_attach_lwp): Do not _exit after errors.
9514 (linux_kill, linux_detach): Clean up the process list.
9515 * remote-utils.c (remote_open): Improve port number parsing.
9516 (putpkt_binary, input_interrupt): Only send interrupts if the target
9517 is running.
9518 * server.c (extended_protocol): Make static.
9519 (attached): Define earlier.
9520 (exit_requested, response_needed, program_argv): New variables.
9521 (target_running): New.
9522 (start_inferior): Clear attached here.
9523 (attach_inferior): Set attached here.
9524 (require_running): Define.
9525 (handle_query): Use require_running and target_running. Implement
9526 "monitor exit".
9527 (handle_v_attach, handle_v_run): New.
9528 (handle_v_requests): Use require_running. Handle vAttach and vRun.
9529 (gdbserver_usage): Update.
9530 (main): Redo argument parsing. Handle --debug and --multi. Handle
9531 --attach along with other options or after the port. Save
9532 program_argv. Support no initial program. Resynchronize
9533 communication with GDB after an error. Handle "monitor exit".
9534 Use require_running and target_running. Always allow the extended
9535 protocol. Do not error out for Hc0 or Hc-1. Do not automatically
9536 restart in extended mode.
9537 * README: Refer to the GDB manual. Update --attach usage.
9538
7407e2de
AS
95392007-12-20 Andreas Schwab <schwab@suse.de>
9540
9541 * linux-low.c (STACK_SIZE): Define.
9542 (linux_tracefork_child): Use it. Use __clone2 on ia64.
9543 (linux_test_for_tracefork): Likewise.
9544
b65d95c5
DJ
95452007-12-18 Daniel Jacobowitz <dan@codesourcery.com>
9546
9547 * linux-low.c (linux_wait_for_event): Update messages. Do not
9548 reinsert auto-delete breakpoints.
9549 * mem-break.c (struct breakpoint): Change return type of handler to
9550 int.
9551 (set_breakpoint_at): Update handler type.
9552 (reinsert_breakpoint_handler): Return 1 instead of calling
9553 delete_breakpoint.
9554 (reinsert_breakpoint_by_bp): Check for the original breakpoint before
9555 setting a new one.
9556 (check_breakpoints): Delete auto-delete breakpoints and return 2.
9557 * mem-break.h (set_breakpoint_at): Update handler type.
9558 * thread-db.c (thread_db_create_event, thread_db_create_event): Update.
9559 * win32-low.c (auto_delete_breakpoint): New.
9560 (get_child_debug_event): Use it.
9561
4e799345
DJ
95622007-12-16 Daniel Jacobowitz <dan@codesourcery.com>
9563
9564 * configure.ac: Check for pread and pwrite.
9565 * hostio.c (handle_pread): Fall back to lseek and read.
9566 (handle_pwrite): Fall back to lseek and write.
9567 * config.in, configure: Regenerated.
9568
27524b67
DJ
95692007-12-07 Daniel Jacobowitz <dan@codesourcery.com>
9570
9571 * server.c (myresume): Add own_buf argument.
9572 (main): Update calls.
9573
a20d5e98
DJ
95742007-12-06 Daniel Jacobowitz <dan@codesourcery.com>
9575
9576 * linux-low.c (linux_wait, linux_resume): Do not handle async I/O.
9577 * remote-utils.c (remote_open): Do not call disable_async_io.
9578 (block_async_io): Delete.
9579 (unblock_async_io): Make static.
9580 (initialize_async_io): New.
9581 * server.c (handle_v_cont): Handle async I/O here.
9582 (myresume): Likewise. Move other common resume tasks here...
9583 (main): ... from here. Call initialize_async_io. Disable async
9584 I/O before the main loop.
9585 * server.h (initialize_async_io): Declare.
9586 (block_async_io, unblock_async_io): Delete prototypes.
9587 * spu-low.c (spu_resume, spu_wait): Do not handle async I/O here.
9588
b79d787e
DJ
95892007-12-06 Mick Davis <mickd@goanna.iinet.net.au>
9590
9591 * remote-utils.c (readchar): Allow binary data in received messages.
9592
d97903b2
PA
95932007-12-03 Pedro Alves <pedro_alves@portugalmail.pt>
9594
9595 * win32-low.c (attaching): New global.
9596 (win32_create_inferior): Clear the `attaching' global.
9597 (win32_attach): Set the `attaching' global.
9598 (get_child_debug_event) [_WIN32_WCE]: Stop the inferior when
9599 attaching. Only set a breakpoint at the entry point if not
9600 attaching.
9601
311de423
PA
96022007-12-03 Pedro Alves <pedro_alves@portugalmail.pt>
9603
9604 * server.c (main): Don't report dll events on the initial
9605 connection on attaches.
9606
6c2d16d2
PA
96072007-12-03 Pedro Alves <pedro_alves@portugalmail.pt>
9608
9609 * server.c (main): Relax numerical bases supported for the pid of
9610 the --attach command line argument.
9611
5ca906e6
PA
96122007-12-03 Pedro Alves <pedro_alves@portugalmail.pt>
9613
9614 * win32-low.c (win32_attach): Call OpenProcess before
9615 DebugActiveProcess, not after. Add last error output to error
9616 call.
9617
9c6c8194
PA
96182007-12-03 Pedro Alves <pedro_alves@portugalmail.pt>
9619
9620 * win32-low.c (win32_get_thread_context)
9621 (win32_set_thread_context): New functions.
9622 (thread_rec): Use win32_get_thread_context.
9623 (continue_one_thread, win32_resume): Use win32_set_thread_context.
9624 * win32-low.h (win32_thread_info) [_WIN32_WCE]: Add `base_context'
9625 field.
9626
4d5d1aaa
PA
96272007-12-03 Leo Zayas
9628 Pedro Alves <pedro_alves@portugalmail.pt>
9629
9630 * win32-low.c (soft_interrupt_requested, faked_breakpoint): New
9631 global variables.
9632 (child_add_thread): Minor cleanup.
9633 (child_continue): Resume artificially suspended threads before
9634 calling ContinueDebugEvent.
9635 (suspend_one_thread): New.
9636 (fake_breakpoint_event): New.
9637 (get_child_debug_event): Change return type to int. Check here if
9638 gdb sent an interrupt request. If a soft interrupt was requested,
9639 fake a breakpoint event. Return 0 if there is no event to handle,
9640 and 1 otherwise.
9641 (win32_wait): Don't check here if gdb sent an interrupt request.
9642 Ensure there is a valid event to handle.
9643 (win32_request_interrupt): Add soft interruption method as last
9644 resort.
9645
c436e841
PA
96462007-12-03 Leo Zayas
9647 Pedro Alves <pedro_alves@portugalmail.pt>
9648
9649 * win32-low.h (win32_thread_info): Add descriptions to the
9650 structure members. Replace `suspend_count' counter by a
9651 `suspended' flag.
9652 * win32-low.c (thread_rec): Update condition of when to get the
9653 context from the inferior. Rely on ContextFlags being set if it
9654 has already been retrieved. Only suspend the inferior thread if
9655 we haven't already. Warn if that fails.
9656 (continue_one_thread): s/suspend_count/suspended/. Only call
9657 ResumeThread once. Warn if that fails.
9658
e7b5fa67
PA
96592007-12-02 Pedro Alves <pedro_alves@portugalmail.pt>
9660
9661 * win32-low.c (win32_wait): Don't read from the inferior when it
9662 has already exited.
9663
a385171d
PA
96642007-12-02 Pedro Alves <pedro_alves@portugalmail.pt>
9665
9666 * Makefile.in (win32_low_h): New variable.
9667 (win32-low.o): Add dependency on $(win32_low_h).
9668 (win32-arm-low.o, win32-i386-low.o): New rules.
9669
f80c84b3
DJ
96702007-11-30 Daniel Jacobowitz <dan@codesourcery.com>
9671
9672 * hostio.c: Correct copyright year.
9673
a6b151f1
DJ
96742007-11-30 Daniel Jacobowitz <dan@codesourcery.com>
9675
9676 * Makefile.in (OBS): Add hostio.o.
9677 (hostio.o): New rule.
9678 * server.h (handle_vFile): Declare.
9679 * hostio.c: New file.
9680 * server.c (handle_v_requests): Take packet_len and new_packet_len
9681 for binary packets. Call handle_vFile.
9682 (main): Update call to handle_v_requests.
9683
f9387fc3
DJ
96842007-11-05 Daniel Jacobowitz <dan@codesourcery.com>
9685
9686 * linux-low.c: Include <sched.h>.
9687
51c2684e
DJ
96882007-11-01 Daniel Jacobowitz <dan@codesourcery.com>
9689
9690 * linux-low.c (linux_tracefork_grandchild): New.
9691 (linux_tracefork_child): Use clone.
9692 (linux_test_for_tracefork): Use clone; allocate and free a stack.
9693
75f83163
JB
96942007-10-31 Joel Brobecker <brobecker@adacore.com>
9695
9696 * Makefile.in: Use $(SHELL) instead of "sh" to call regdat.sh.
9697
da5898ce
DJ
96982007-10-24 Daniel Jacobowitz <dan@codesourcery.com>
9699
9700 * linux-low.c (handle_extended_wait): Handle unexpected signals.
9701
24a09b5f
DJ
97022007-10-23 Daniel Jacobowitz <dan@codesourcery.com>
9703
9704 * inferiors.c (change_inferior_id): Delete.
9705 (add_pid_to_list, pull_pid_from_list): New.
9706 * linux-low.c (PTRACE_SETOPTIONS, PTRACE_GETEVENTMSG)
9707 (PTRACE_O_TRACESYSGOOD, PTRACE_O_TRACEFORK, PTRACE_O_TRACEVFORK)
9708 (PTRACE_O_TRACECLONE, PTRACE_O_TRACEEXEC, PTRACE_O_TRACEVFORKDONE)
9709 (PTRACE_O_TRACEEXIT, PTRACE_EVENT_FORK, PTRACE_EVENT_VFORK)
9710 (PTRACE_EVENT_CLONE, PTRACE_EVENT_EXEC, PTRACE_EVENT_VFORK_DONE)
9711 (PTRACE_EVENT_EXIT, __WALL): Provide default definitions.
9712 (stopped_pids, thread_db_active, must_set_ptrace_flags): New variables.
9713 (using_threads): Always set to 1.
9714 (handle_extended_wait): New.
9715 (add_process): Do not set TID.
9716 (linux_create_inferior): Set must_set_ptrace_flags.
9717 (linux_attach_lwp): Remove TID argument. Do not check using_threads.
9718 Use PTRACE_SETOPTIONS. Call new_thread_notify. Update all callers.
9719 (linux_thread_alive): Rename TID argument to LWPID.
9720 (linux_wait_for_process): Handle unknown processes. Do not use TID.
9721 (linux_wait_for_event): Do not use TID or check using_threads. Update
9722 call to dead_thread_notify. Call handle_extended_wait.
9723 (linux_create_inferior): Use PTRACE_SETOPTIONS.
9724 (send_sigstop): Delete sigstop_sent.
9725 (wait_for_sigstop): Avoid TID.
9726 (linux_supports_tracefork_flag, linux_tracefork_child, my_waitpid)
9727 (linux_test_for_tracefork): New.
9728 (linux_lookup_signals): Use thread_db_active and
9729 linux_supports_tracefork_flag.
9730 (initialize_low): Use thread_db_active and linux_test_for_tracefork.
9731 * linux-low.h (get_process_thread): Avoid TID.
9732 (struct process_ifo): Move thread_known and tid to the end. Remove
9733 sigstop_sent.
9734 (linux_attach_lwp, thread_db_init): Update prototypes.
9735 * server.h (change_inferior_id): Delete prototype.
9736 (add_pid_to_list, pull_pid_from_list): New prototypes.
9737 * thread-db.c (thread_db_use_events): New.
9738 (find_first_thread): Rename to...
9739 (find_one_thread): ...this. Update callers and messages. Do not
9740 call fatal. Check thread_db_use_events. Do not call
9741 change_inferior_id or new_thread_notify.
9742 (maybe_attach_thread): Update. Do not call new_thread_notify.
9743 (thread_db_init): Set thread_db_use_events. Check use_events.
9744 * utils.c (fatal, warning): Correct message prefix.
9745
30ed0a8f
DJ
97462007-10-15 Daniel Jacobowitz <dan@codesourcery.com>
9747
9748 * Makefile.in (clean): Remove new files.
9749 (powerpc-32.o, powerpc-32.c, powerpc-e500.o, powerpc-e500.c)
9750 (powerpc-64.o, powerpc-64.c): New rules.
9751 * configure.srv: Use alternate register sets for powerpc64-*-linux*
9752 with AltiVec, powerpc-*-linux* with AltiVec, and powerpc-*-linux*
9753 with SPE.
9754 * linux-ppc-low.c (ppc_regmap): Do not fetch the FP registers for
9755 SPE targets.
9756 (ppc_cannot_store_register): Do not check for FPSCR for SPE targets.
9757 (PTRACE_GETVRREGS, PTRACE_SETVRREGS, SIZEOF_VRREGS, ppc_fill_vrregset)
9758 (ppc_store_vrregset, PTRACE_GETEVRREGS, PTRACE_SETEVRREGS)
9759 (struct gdb_evrregset_t, ppc_fill_evrregset, ppc_store_evrregset): New.
9760 (target_regsets): Add AltiVec and SPE register sets.
9761 * configure.ac: Check for AltiVec and SPE.
9762 * linux-ppc64-low.c (PTRACE_GETVRREGS, PTRACE_SETVRREGS, SIZEOF_VRREGS)
9763 (ppc_fill_vrregset, ppc_store_vrregset): New.
9764 (target_regsets): Add AltiVec register set.
9765 * configure: Regenerated.
9766
fd462a61
DJ
97672007-09-19 Daniel Jacobowitz <dan@codesourcery.com>
9768
9769 * linux-low.c (O_LARGEFILE): Define.
9770 (linux_read_memory): Use /proc/PID/mem.
9771 * configure.ac: Use AC_GNU_SOURCE. Check for pread64.
9772 * configure, config.in: Regenerated.
9773
69f223ed
DJ
97742007-09-04 Daniel Jacobowitz <dan@codesourcery.com>
9775
9776 * linux-low.c (linux_wait_for_event): Do not pass signals while
9777 single-stepping.
9778
aec18585
PA
97792007-09-03 Pedro Alves <pedro_alves@portugalmail.pt>
9780
9781 * win32-low.c (create_process): New.
9782 (win32_create_inferior): Use create_process instead of
9783 CreateProcess. If create_process failed retry appending an ".exe"
9784 suffix. Store the GetLastError result immediatelly after
9785 create_process calls and use it on the call to error.
9786
34d86ddd
PA
97872007-09-03 Pedro Alves <pedro_alves@portugalmail.pt>
9788
9789 * win32-low.c (handle_load_dll): Don't use toolhelp when waiting.
9790
5a0e3bd0
JB
97912007-08-23 Joel Brobecker <brobecker@adacore.com>
9792
9793 * configure.ac: Switch license to GPLv3.
9794
f88c79e6
MS
97952007-08-01 Michael Snyder <msnyder@access-company.com>
9796
9797 * remote-utils.c (putpkt_binary): Memory leak, free buf2.
9798
6b3d9b83
PA
97992007-07-31 Pedro Alves <pedro_alves@portugalmail.pt>
9800
9801 * win32-low.c (winapi_CloseToolhelp32Snapshot) [_WIN32_WCE]: New
9802 typedef.
9803 (win32_CloseToolhelp32Snapshot) [_WIN32_WCE]: New global var.
9804 (load_toolhelp) [_WIN32_WCE]: Load TOOLHELP.DLL. Get
9805 CloseToolhelp32Snapshot.
9806 (toolhelp_get_dll_name) [_WIN32_WCE]: Close the snapshot with
9807 CloseToolhelp32Snapshot.
9808
c588c53c
MS
98092007-07-27 Michael Snyder <michael.snyder@access-company.com>
9810
9811 * server.c (main): Check for inferior exit before main loop.
9812
aa0403d9
PA
98132007-07-18 Pedro Alves <pedro_alves@portugalmail.pt>
9814
9815 * remote-utils.c (remote_open): Set SO_KEEPALIVE on remote_desc
9816 instead of on tmp_desc.
9817
255e7678
DJ
98182007-07-17 Pedro Alves <pedro_alves@portugalmail.pt>
9819 Daniel Jacobowitz <dan@codesourcery.com>
9820
9821 * inferiors.c (all_dlls, dlls_changed, get_dll): New.
9822 (add_thread): Minor cleanups.
9823 (clear_inferiors): Move lower in the file. Clear the DLL
9824 list.
9825 (free_one_dll, match_dll, loaded_dll, unloaded_dll, clear_list): New.
9826 * remote-utils.c (prepare_resume_reply): Check dlls_changed.
9827 (xml_escape_text): New.
9828 * server.c (handle_query): Handle qXfer:libraries:read. Report it
9829 for qSupported.
9830 (handle_v_cont): Report errors.
9831 (gdbserver_version): Update.
9832 (main): Correct size of own_buf. Do not report initial DLL events.
9833 * server.h (struct dll_info, all_dlls, dlls_changed, loaded_dll)
9834 (unloaded_dll, xml_escape_text): New.
9835 * win32-low.c (enum target_waitkind): Update comments.
9836 (win32_add_one_solib, get_image_name, winapi_EnumProcessModules)
9837 (winapi_GetModuleInformation, winapi_GetModuleFileNameExA)
9838 (win32_EnumProcessModules, win32_GetModuleInformation)
9839 (win32_GetModuleFileNameExA, load_psapi, psapi_get_dll_name)
9840 (winapi_CreateToolhelp32Snapshot, winapi_Module32First)
9841 (winapi_Module32Next, win32_CreateToolhelp32Snapshot)
9842 (win32_Module32First, win32_Module32Next, load_toolhelp)
9843 (toolhelp_get_dll_name, handle_load_dll, handle_unload_dll): New.
9844 (get_child_debug_event): Handle DLL events.
9845 (win32_wait): Likewise.
9846
0d37add9
DJ
98472007-07-12 Daniel Jacobowitz <dan@codesourcery.com>
9848
9849 * configure.srv: Set srv_linux_regsets for sh*-*-linux*.
9850 * linux-sh-low.c (sh_fill_gregset, target_regsets): New.
9851
45e2715e
PA
98522007-07-08 Pedro Alves <pedro_alves@portugalmail.pt>
9853
9854 * win32-low.c (handle_output_debug_string): Ignore event if not
9855 waiting.
9856
c5674cf1
PA
98572007-07-08 Pedro Alves <pedro_alves@portugalmail.pt>
9858
9859 * win32-arm-low.c (arm_wince_breakpoint): Fix typo.
9860
2bbe3cc1
DJ
98612007-07-03 Daniel Jacobowitz <dan@codesourcery.com>
9862
9863 * remote-utils.c (look_up_one_symbol): Handle 'm' packets.
9864
ae13219e
DJ
98652007-07-02 Daniel Jacobowitz <dan@codesourcery.com>
9866
9867 * inferiors.c (change_inferior_id): Add comment.
9868 * linux-low.c (check_removed_breakpoint): Add an early
9869 prototype. Improve debug output.
9870 (linux_attach): Doc update.
9871 (linux_detach_one_process, linux_detach): Clean up before releasing
9872 each process.
9873 (send_sigstop, wait_for_sigstop): Improve comments and debug output.
9874 * linux-low.h (struct process_info): Doc improvement.
9875 * mem-break.c (delete_all_breakpoints): New.
9876 * mem-break.h (delete_all_breakpoints): New prototype.
9877 * thread-db.c (find_first_thread): New.
9878 (thread_db_create_event): Call it instead of
9879 thread_db_find_new_threads. Clean up unused variables.
9880 (maybe_attach_thread): Remove first thread handling.
9881 (thread_db_find_new_threads): Use find_first_thread.
9882 (thread_db_get_tls_address): Likewise.
9883
4105de34
DJ
98842007-06-27 Daniel Jacobowitz <dan@codesourcery.com>
9885
9886 * thread-db.c (thread_db_find_new_threads): Add prototype.
9887 (thread_db_create_event): Check for the main thread before adding
9888 a new thread.
9889 (maybe_attach_thread): Only enable event reporting if TID == 0.
9890 (thread_db_get_tls_address): Check for new threads.
9891
2b876972
DJ
98922007-06-20 Daniel Jacobowitz <dan@codesourcery.com>
9893
9894 * linux-low.c (linux_create_inferior): Try execv before execvp.
9895 * spu-low.c (spu_create_inferior): Likewise.
9896
7a245884
DJ
98972007-06-13 Mike Frysinger <vapier@gentoo.org>
9898
9899 * linux-low.c (linux_create_inferior): Change execv to execvp.
9900 * spu-low.c (spu_create_inferior): Likewies.
9901
117ce543
DJ
99022007-06-13 Daniel Jacobowitz <dan@codesourcery.com>
9903
9904 * Makefile.in (clean): Clean new files instead of deleted ones.
9905 (reg-mips.o, reg-mips.c, reg-mips64.o, reg-mips64.c): Delete.
9906 (mips-linux.o, mips-linux.c, mips64-linux.o, mips64-linux.c): New
9907 rules.
9908 * configure.srv: Specify XML files and new regformats for MIPS and
9909 MIPS64 GNU/Linux.
9910 * linux-mips-low.c (mips_num_regs): Set to only used registers.
9911 (mips_regmap): Do not fetch $0. Remove unused registers. Add
9912 an entry for the restart register.
9913 (mips_cannot_fetch_register, mips_cannot_store_register)
9914 (mips_reinsert_addr, mips_fill_fpregset, mips_store_fpregset): Update
9915 register names to match the XML descriptions.
9916 (mips_fill_gregset, mips_store_gregset): Likewise. Handle the
9917 restart register instead of $0.
9918
0e7f50da
UW
99192007-06-12 Ulrich Weigand <uweigand@de.ibm.com>
9920 Markus Deuling <deuling@de.ibm.com>
9921
9922 * remote-utils.c (decode_xfer_write): New function.
9923 * server.h (decode_xfer_write): Add prototype.
9924 * server.c (handle_query): Add PACKET_LEN argument. Support
9925 qXfer:spu:read and qXfer:spu:write packets.
9926 (main): Pass packet_len to handle_query.
9927 * spu-low.c (spu_target_ops): Add spu_proc_xfer_spu.
9928 * target.h (target_ops): Add qxfer_spu.
9929
374c1d38
UW
99302007-06-12 Ulrich Weigand <uweigand@de.ibm.com>
9931
9932 * spu-low.c (spu_proc_xfer_spu): Do not return failure when
9933 accessing non-seekable spufs files.
9934
bb63802a
UW
99352007-05-16 Markus Deuling <deuling@de.ibm.com>
9936
889bf7c5 9937 * server.c (handle_query): Add reply for qC packet.
bb63802a 9938
7390519e
PA
99392007-05-10 Pedro Alves <pedro_alves@portugalmail.pt>
9940 Leo Zayas <lerele@champenstudios@com>
9941
9942 * server.h (check_remote_input_interrupt_request): New function.
9943 * remote_utils.c (INVALID_DESCRIPTOR): New define.
9944 (remote_desc): Initialize with INVALID_DESCRIPTOR.
9945 (input_interrupt): Expose on USE_WIN32API too. Fix whitespace.
9946 (check_remote_input_interrupt_request): New function.
9947 * server.h (check_remote_input_interrupt_request): Declare.
3ecf0694 9948 * win32-low.c (winapi_DebugBreakProcess,
7390519e
PA
9949 winapi_GenerateConsoleCtrlEvent): New typedefs.
9950 (get_child_debug_event): Lower Win32 debug event polling from 1 sec
9951 to 250 ms.
9952 (win32_wait): Check for remote interrupt request
9953 with check_remote_input_interrupt_request.
9954 (win32_request_interrupt): New function.
9955 (win32_target_op): Set request_interrupt to win32_request_interrupt.
9956
34b34921
PA
99572007-05-10 Pedro Alves <pedro_alves@portugalmail.pt>
9958
9959 * win32-low.c (debug_registers_changed,
9960 debug_registers_used, CONTEXT_EXTENDED_REGISTERS,
9961 CONTEXT_FLOATING_POINT, CONTEXT_DEBUG_REGISTERS,
9962 CONTEXT_DEBUGGER, CONTEXT_DEBUGGER_DR): Delete.
9963 (thread_rec): Get context using the low target.
9964 (child_add_thread): Call thread_added on the low target,
9965 which does the same thing.
9966 (regptr): Delete.
9967 (do_initial_child_stuff): Remove debug registers references.
9968 Set context using the low target. Resume threads after
9969 setting the contexts.
9970 (child_continue): Remove dead variable. Remove debug
9971 registers references.
9972 (child_fetch_inferior_registers): Go through the low target.
9973 (do_child_store_inferior_registers): Remove.
9974 (child_store_inferior_registers): Go through the low target.
9975 (win32_resume): Remove debug registers references.
9976 Set context using the low target.
9977 (handle_exception): Change return type to void. Don't record
9978 context here. Set status to TARGET_WAITKIND_SPURIOUS on a
9979 first chance exception.
889bf7c5 9980 (get_child_debug_event): Change return type to void. Remove
34b34921
PA
9981 goto loop. Always return after waiting for debug event.
9982 (win32_wait): Convert to switch statement. Handle spurious
9983 events.
9984
9985 * win32-i386-low.c (debug_registers_changed,
9986 debug_registers_used): New.
9987 (initial_stuff): Rename to ...
9988 (i386_initial_stuff): ... this. Clear debug registers
9989 state variables.
9990 (store_debug_registers): Delete.
9991 (i386_get_thread_context): New.
9992 (load_debug_registers): Delete.
9993 (i386_set_thread_context): New.
9994 (i386_thread_added): New.
9995 (single_step): Rename to ...
9996 (i386_single_step): ... this.
9997 (do_fetch_inferior_registers): Rename to ...
9998 (i386_fetch_inferior_register): ... this.
9999 (i386_store_inferior_register): New.
10000 (the_low_target): Adapt to new interface.
10001
10002 * win32-arm-low.c (CONTEXT_FLOATING_POINT): Define.
10003 (arm_get_thread_context): New.
10004 (arm_set_thread_context): New.
10005 (regptr): New.
10006 (do_fetch_inferior_registers): Rename to ...
10007 (arm_fetch_inferior_register): ... this.
10008 (arm_store_inferior_register): New.
10009 (arm_wince_breakpoint): Reimplement as unsigned long.
10010 (arm_wince_breakpoint_len): Define.
10011 (the_low_target): Adapt to new interface.
10012
10013 * win32-low.h (target_ops): Remove regmap, store_debug_registers and
10014 load_debug_registers. Add get_thread_context, set_thread_context,
10015 thread_added and store_inferior_register. Rename
10016 fetch_inferior_registers to fetch_inferior_register.
10017 (regptr): Remove declaration.
10018
dd6953e1
PA
100192007-05-10 Pedro Alves <pedro_alves@portugalmail.pt>
10020
10021 * linux-low.c (linux_detach): Change return type to int. Return 0.
10022 * spu-low.c (spu_detach): Likewise.
10023
444d6139
PA
100242007-05-10 Pedro Alves <pedro_alves@portugalmail.pt>
10025
10026 * target.h (target_ops): Change return type of detach to int.
10027 Add join.
10028 (join_inferior): New.
10029 * server.c (main): Don't skip detach support on mingw32.
10030 If the inferior doesn't support detaching return error.
10031 Call join_inferior instead of using waitpid.
10032 * linux-low.c (linux_join): New.
10033 (linux_target_op): Add linux_join.
10034 * spu-low.c (spu_join): New.
10035 (spu_target_ops): Add spu_join.
10036 * win32-low.c (win32_detach): Adapt to new interface.
10037 Reopen current_process_handle before detaching. Issue a child
10038 resume before detaching.
10039 (win32_join): New.
10040 (win32_target_op): Add win32_join.
10041
1d5315fe
PA
100422007-05-10 Pedro Alves <pedro_alves@portugalmail.pt>
10043
10044 * win32-low.c (win32-attach): Fix return value.
10045 * target.h (target_ops): Describe ATTACH return values.
10046
bf914831
PA
100472007-05-10 Pedro Alves <pedro_alves@portugalmail.pt>
10048
10049 * win32-low.c (GETPROCADDRESS): Define.
10050 (winapi_DebugActiveProcessStop): Add WINAPI. typedef as pointer.
10051 (winapi_DebugSetProcessKillOnExit): Likewise.
10052 (win32_create_inferior): Force usage of ansi CreateProcessA.
10053 (win32_attach): Use GETPROCADDRESS.
10054 (win32_detach): Likewise.
10055
f72f3e60
PA
100562007-05-10 Pedro Alves <pedro_alves@portugalmail.pt>
10057
10058 * win32-low.c (win32_wait): Don't use WSTOPSIG.
10059
ed50f18f
PA
100602007-03-30 Pedro Alves <pedro_alves@portugalmail.pt>
10061
10062 * win32-low.c: Commit leftover changes from 2007-03-29.
10063
0c2ead7e
DJ
100642007-03-30 Daniel Jacobowitz <dan@codesourcery.com>
10065
10066 * i387-fp.c (struct i387_fsave, struct i387_fxsave): Make 16-bit
10067 fields short instead of int. Add explicit padding.
10068 (i387_cache_to_fsave): Remove unnecessary casts.
10069 (i387_fsave_to_cache): Doc fix.
10070 (i387_cache_to_fxsave): Remove unnecessary casts and masking.
10071
73725ff3
DJ
100722007-03-30 Daniel Jacobowitz <dan@codesourcery.com>
10073
10074 * i387-fp.c (i387_cache_to_fxsave): Reinitialize val2 before use.
10075 (i387_fxsave_to_cache): Check fp->ftag while building ftag value.
10076
d99f33d8
PA
100772007-03-29 Pedro Alves <pedro_alves@portugalmail.pt>
10078
10079 * configure.srv (arm*-*-mingw32ce*): Move near the other
10080 arm targets.
10081
68070c10
PA
100822007-03-29 Pedro Alves <pedro_alves@portugalmail.pt>
10083
2482afc6 10084 * configure.ac: Add errno checking.
68070c10
PA
10085 (AC_CHECK_HEADERS): Add errno.h, fcntl.h, signal.h,
10086 sys/file.h and malloc.h.
10087 (AC_CHECK_DECLS): Add perror.
10088 (srv_mingwce): Handle.
2482afc6 10089 * configure.srv (i[34567]86-*-cygwin*): Add
68070c10
PA
10090 win32-i386-low.o to srv_tgtobj.
10091 (i[34567]86-*-mingw*): Likewise.
10092 (arm*-*-mingw32ce*): Add case.
10093 * gdbreplay.c [HAVE_SYS_FILE_H, HAVE_SIGNAL_H,
10094 HAVE_FCNTL_H, HAVE_ERRNO_H, HAVE_MALLOC_H]: Check.
10095 [__MINGW32CE__] (strerror): New function.
10096 [__MINGW32CE__] (errno): Define to GetLastError.
10097 [__MINGW32CE__] (COUNTOF): New macro.
10098 (remote_open): Remove extra close call.
10099 * mem-break.c (delete_breakpoint_at): New function.
10100 * mem-break.h (delete_breakpoint_at): Declare.
10101 * remote-utils.c [HAVE_SYS_FILE_H, HAVE_SIGNAL_H,
10102 HAVE_FCNTL_H, HAVE_UNISTD_H, HAVE_ERRNO_H]: Check.
10103 [USE_WIN32API] (read, write): Add char* casts.
10104 * server.c [HAVE_UNISTD_H, HAVE_SIGNAL_H]: Check.
10105 * server.h: Include wincecompat.h on Windows CE.
10106 [HAVE_ERRNO_H]: Check.
10107 (perror): Declare if not declared.
10108 * utils.c: Add stdlib.h, errno.h and malloc.h includes.
10109 (perror_with_name): Remove errno declaration.
10110 * wincecompat.h: New.
10111 * wincecompat.c: New.
10112 * win32-low.h: New.
10113 * win32-arm-low.c: New.
10114 * win32-i386-low.c: New.
10115 (win32-low.c): Include mem-break.h and win32-low.h, and winnt.h.
10116 (OUTMSG2): Make it safe.
10117 (_T): New macro.
10118 (COUNTOF): New macro.
10119 (NUM_REGS): Get it from the low target.
10120 (CONTEXT_EXTENDED_REGISTERS, CONTEXT_FLOATING_POINT,
10121 CONTEXT_DEBUG_REGISTERS): Add fallbacks to 0.
10122 (thread_rec): Let low target handle debug registers.
10123 (child_add_thread): Likewise.
10124 (child_init_thread_list): Likewise.
10125 (continue_one_thread): Likewise.
10126 (regptr): New.
10127 (do_child_fetch_inferior_registers): Move to ...
10128 * win32-i386-low.c: ... here, and rename to ...
10129 (do_fetch_inferior_registers): ... this.
889bf7c5 10130 * win32-low.c (child_fetch_inferior_registers):
68070c10
PA
10131 Go through the low target.
10132 (do_child_store_inferior_registers): Use regptr.
10133 (strwinerror): New function.
10134 (win32_create_inferior): Handle Windows CE.
10135 Use strwinerror instead of strerror on Windows error
10136 codes. Add program to the error output.
10137 Don't close the main thread handle on Windows CE.
10138 (win32_attach): Use coredll.dll on Windows CE.
10139 (win32_kill): Close current process and current
10140 thread handles.
10141 (win32_detach): Use coredll.dll on Windows CE.
10142 (win32_resume): Let low target handle debug registers, and
10143 step request.
10144 (handle_exception): Add/Remove initial breakpoint. Avoid
10145 non-existant WSTOPSIG on Windows CE.
10146 (win32_read_inferior_memory): Cast to remove warning.
10147 (win32_arch_string): Go through the low target.
10148 (initialize_low): Call set_breakpoint_data with the low
10149 target's breakpoint.
10150 * win32-low.c (dr, FLAG_TRACE_BIT, FCS_REGNUM,
10151 FOP_REGNUM, mappings): Move to ...
10152 * win32-i386-low.c: ... here.
10153 * win32-low.c (win32_thread_info): Move to ...
10154 * win32-low.h: ... here.
10155 * Makefile.in (SFILES): Add win32-low.c, win32-i386-low.c,
10156 win32-arm-low.c and wincecompat.c.
10157 (all:): Add $EXEEXT.
10158 (install-only:): Likewise.
10159 (gdbserver:): Likewise.
10160 (gdbreplay:): Likewise.
10161 * config.in: Regenerate.
10162 * configure: Regenerate.
10163
41093d81
PA
101642007-03-28 Pedro Alves <pedro_alves@portugalmail.pt>
10165
10166 * win32-low.c: Rename typedef thread_info to
10167 win32_thread_info throughout.
10168
544afa54
PA
101692007-03-28 Pedro Alves <pedro_alves@portugalmail.pt>
10170
10171 * win32-i386-low.c: Rename to ...
10172 * win32-low.c: ... this.
10173 * configure.srv: Replace win32-i386-low.o with win32-low.o.
10174 * Makefile.in: Likewise.
10175
bce7165d
PA
101762007-03-27 Pedro Alves <pedro_alves@portugalmail.pt>
10177
10178 * remote-utils.c (monitor_output): Constify msg parameter.
10179 * server.h (monitor_output): Likewise.
10180 * win32-i386-low.c (handle_output_debug_string): New.
10181 (win32_kill): Handle OUTPUT_DEBUG_STRING_EVENT events using
10182 handle_output_debug_string.
10183 (get_child_debug_event): Likewise.
10184
506c7aa0
DJ
101852007-03-27 Mat Hostetter <mat@lcs.mit.edu>
10186
10187 * server.c (main): Correct strtoul check.
10188
42c81e2a
DJ
101892007-03-27 Jon Ringle <jon@ringle.org>
10190
10191 * linux-low.c: Check __ARCH_HAS_MMU__ also.
10192
9453113a
DJ
101932007-03-27 Brooks Moses <brooks.moses@codesourcery.com>
10194
10195 * Makefile.in: Add dummy "pdf" and "install-pdf" targets.
10196
64a69107
DJ
101972007-02-27 Daniel Jacobowitz <dan@codesourcery.com>
10198
10199 * terminal.h: Check HAVE_SGTTY_H.
10200
102012007-02-27 Mat Hostetter <mat@lcs.mit.edu>
6f8486da
DJ
10202
10203 * remote-utils.c (remote_open): Print out the assigned port number.
10204
c74d0ad8
DJ
102052007-02-26 Daniel Jacobowitz <dan@codesourcery.com>
10206
10207 * remote-utils.c (monitor_output): New function.
10208 * server.c (debug_threads): Define here.
10209 (monitor_show_help): New function.
10210 (handle_query): Handle qRcmd.
10211 (main): Do not handle 'd' packet.
10212 * server.h (debug_threads, remote_debug, monitor_output): Declare.
10213 * linux-low.c, spu-low.c, win32-i386-low.c: Remove definitions
10214 of debug_threads.
10215
de7c3b4a
PA
102162007-02-25 Pedro Alves <pedro_alves@portugalmail.pt>
10217
10218 * Makefile.in (EXEEXT): New.
10219 (clean): Use $(EXEEXT).
10220
ef57601b
PA
102212007-02-25 Pedro Alves <pedro_alves@portugalmail.pt>
10222
10223 * target.h (target_ops): Rename send_signal to request_interrupt,
10224 and remove enum target_signal parameter.
10225 * linux-low.c (linux_request_interrupt): Rename from
10226 linux_send_signal, and always send SIGINT.
10227 * spu-low.c (spu_request_interrupt): Rename from spu_send_signal,
10228 and always send SIGINT.
10229 * remote-utils.c (putpkt_binary): Call request_interrupt, instead
10230 of send_signal.
10231 (input_interrupt): Likewise.
10232
820f2bda
PA
102332007-02-25 Pedro Alves <pedro_alves@portugalmail.pt>
10234
10235 * server.c (get_features_xml): Check if target implemented
10236 arch_string.
10237 * win32-i386-low.c (win32_arch_string): New.
10238 (win32_target_ops): Add win32_arch_string as arch_string member.
10239
ab39bf24
UW
102402007-02-22 Markus Deuling <deuling@de.ibm.com>
10241
10242 * spu-low.c (spu_arch_string): New.
10243 (spu_target_ops): Add spu_arch_string.
10244
61ff6e04
DJ
102452007-02-16 Daniel Jacobowitz <dan@codesourcery.com>
10246
10247 * remote-utils.c: Remove HAVE_TERMINAL_H check.
10248 * configure.ac: Do not check for terminal.h.
10249 * configure, config.in: Regenerated.
10250
fb1e4ffc
DJ
102512007-02-08 Daniel Jacobowitz <dan@codesourcery.com>
10252
10253 * Makefile.in (OBS): Add $(XML_BUILTIN).
10254 (XML_DIR, XML_TARGET, XML_FILES, XML_BUILTIN): New.
10255 (clean): Update.
10256 (target.xml, xml-builtin.c, stamp-xml, arm-with-iwmmxt.o)
10257 (arm-with-iwmmxt.c): New.
10258 * config.in, configure: Regenerate.
10259 * configure.ac: Check for iWMMXt. Handle srv_xmltarget,
10260 srv_xmlbuiltin, and srv_xmlfiles. Define USE_XML.
10261 * configure.srv: Mention srv_xmltarget and srv_xmlfiles.
10262 (arm*-*-linux*): Add iWMMXt and regset support.
10263 * linux-arm-low.c (PTRACE_GETWMMXREGS, PTRACE_SETWMMXREGS): Define.
10264 (arm_fill_gregset, arm_store_gregset, arm_fill_wmmxregset)
10265 (arm_store_wmmxregset, target_regsets): New.
10266 * server.c (get_features_xml): Take annex argument. Check builtin
10267 XML documents.
10268 (handle_query): Handle multiple annexes.
10269
0f48aa01
DJ
102702007-01-29 Daniel Jacobowitz <dan@codesourcery.com>
10271
10272 * remote-utils.c [USE_WIN32API] (read, write): Define.
10273 (putpkt_binary, input_interrupt, readchar, getpkt): Use read and
10274 write.
10275
23181151
DJ
102762007-01-09 Daniel Jacobowitz <dan@codesourcery.com>
10277
10278 * linux-i386-low.c (the_low_target): Set arch_string.
10279 * linux-x86-64-low.c (the_low_target): Likewise.
10280 * linux-low.c (linux_arch_string): New.
10281 (linux_target_ops): Add it.
10282 * linux-low.h (struct linux_target_ops): Add arch_string.
10283 * server.c (write_qxfer_response): Use const void * for DATA.
10284 (get_features_xml): New.
10285 (handle_query): Handle qXfer:features:read. Report it for qSupported.
10286 * target.h (struct target_ops): Add arch_string method.
10287
9d606399
DJ
102882007-01-03 Denis Pilat <denis.pilat@st.com>
10289 Daniel Jacobowitz <dan@codesourcery.com>
10290
10291 * linux-low.c (linux_kill): Handle being called with no threads.
10292 * win32-i386-low.c (win32_kill): Likewise.
10293 (get_child_debug_event): Clear current_process_handle.
10294
102952006-12-30 Denis PILAT <denis.pilat@st.com>
8264bb58
DJ
10296 Daniel Jacobowitz <dan@codesourcery.com>
10297
10298 * remote-utils.c (remote_open): Check the type of specified
10299 serial port devices before opening them.
10300 * server.c (main): Kill the inferior if an error occurs during
10301 the first remote_open.
10302
a5e13d24
DJ
103032006-12-05 Markus Deuling <deuling@de.ibm.com>
10304
10305 * README: Update supported targets.
10306
186947f7
DJ
103072006-11-28 Daniel Jacobowitz <dan@codesourcery.com>
10308
10309 * Makefile.in (clean): Remove reg-mips64.c.
10310 (reg-mips64.c, reg-mips64.o): New rules.
10311 * configure.srv: Handle mips64. Include regset support for mips.
10312 * linux-mips-low.c (union mips_register): New.
10313 (mips_get_pc, mips_set_pc, mips_reinsert_addr): Use it.
10314 (mips_breakpoint, mips_breakpoint_at): Use int.
10315 (mips_collect_register, mips_supply_register)
10316 (mips_collect_register_32bit, mips_supply_register_32bit)
10317 (mips_fill_gregset, mips_store_gregset, mips_fill_fpregset)
10318 (mips_store_fpregset, target_regsets): New.
10319 * thread-db.c (thread_db_get_tls_address): Use uintptr_t.
10320
a13e2c95
UW
103212006-11-22 Ulrich Weigand <uweigand@de.ibm.com>
10322
10323 * configure.srv: Add target "spu*-*-*".
10324 * Makefile.in (clean): Remove reg-spu.c.
10325 (reg-spu.c, reg-spu.o, spu-low.o): Add dependencies.
10326 * spu-low.c: New file.
10327
cb7283db
DJ
103282006-11-16 Daniel Jacobowitz <dan@codesourcery.com>
10329
10330 * configure.ac: Correct td_thr_tls_get_addr test.
10331 * configure: Regenerated.
10332
89be2091
DJ
103332006-11-16 Daniel Jacobowitz <dan@codesourcery.com>
10334
10335 * linux-low.c (linux_wait_for_event): Reformat. Use the
10336 pass_signals array.
10337 * remote-utils.c (decode_address_to_semicolon): New.
10338 * server.c (pass_signals, handle_general_set): New.
10339 (handle_query): Mention QPassSignals for qSupported.
10340 (main): Call handle_general_set.
10341 * server.h (pass_signals, decode_address_to_semicolon): New.
10342
000ef4f0
DJ
103432006-11-06 Daniel Jacobowitz <dan@codesourcery.com>
10344
10345 * server.c (handle_query): Correct error handling for read_auxv.
10346
b7149293
UW
103472005-10-19 Ulrich Weigand <uweigand@de.ibm.com>
10348
10349 * configure.srv [s390-*-linux*, s390x-*-linux*]: Set srv_linux_regsets
10350 and srv_linux_thread_db to yes.
10351 * linux-s390-low.c (s390_fill_gregset): New function.
10352 (target_regsets): Define data structure.
10353
dae5f5cf
DJ
103542006-10-17 Daniel Jacobowitz <dan@codesourcery.com>
10355
10356 * acinclude.m4 (SRV_CHECK_TLS_GET_ADDR): New.
10357 * configure.ac: Use it. Define HAVE_TD_THR_TLS_GET_ADDR.
10358 * config.in, configure: Regenerated.
10359 * inferiors.c (gdb_id_to_thread): New function.
10360 (gdb_id_to_thread_id): Use it.
10361 * linux-low.c (linux_target_ops): Use thread_db_get_tls_address.
10362 * linux-low.h (struct process_info): Add th member.
10363 (thread_db_get_tls_address): New prototype.
10364 * remote-utils.c (decode_address): Make non-static.
10365 * server.c (handle_query): Handle qGetTLSAddr.
10366 * server.h (gdb_id_to_thread, decode_address): New prototypes.
10367 * target.h (struct target_ops): Add get_tls_address.
10368 * thread-db.c (maybe_attach_thread): Save the thread handle.
10369 (thread_db_get_tls_address): New.
10370
32ca6d61
DJ
103712006-09-28 Daniel Jacobowitz <dan@codesourcery.com>
10372
10373 * linux-low.c (PTRACE_GETSIGINFO, PTRACE_SETSIGINFO): Define.
10374 (linux_resume_one_process): Take a siginfo_t *. Update all
10375 callers. Queue it if necessary. Use PTRACE_SETSIGINFO.
10376 (struct pending_signals): Add a siginfo_t.
10377 (linux_wait_for_process): Always set last_status.
10378 (linux_wait_for_event): Use PTRACE_GETSIGINFO.
10379 (linux_queue_one_thread): Use PTRACE_GETSIGINFO.
10380 * linux-low.h (struct process_info): Add last_status.
10381
5ffff7c1
DJ
103822006-09-21 Daniel Jacobowitz <dan@codesourcery.com>
10383
10384 * remote-utils.c (try_rle): New function.
10385 (putpkt_binary): Use it.
10386
8695c747
DJ
103872006-08-19 Daniel Jacobowitz <dan@codesourcery.com>
10388
10389 * Makefile.in (clean): Clean reg-x86-64-linux.c.
10390 (reg-x86-64-linux.o, reg-x86-64-linux.c): New.
10391 * configure.srv (x86_64-*-linux*): Use reg-x86-64-linux.o.
10392 * linux-x86-64-low.c (x86_64_regmap): Include ORIG_RAX.
10393 (x86_64_fill_gregset, x86_64_store_gregset): Skip floating
10394 point registers.
10395
290fadea
RS
103962006-08-08 Richard Sandiford <richard@codesourcery.com>
10397
10398 * server.c (terminal_fd): New variable.
10399 (old_foreground_pgrp): Likewise.
10400 (restore_old_foreground_pgrp): New function.
10401 (start_inferior): Record the terminal file descriptor in terminal_fd
10402 and its original foreground group in old_foreground_pgrp. Register
10403 restore_old_foreground_pgrp with atexit().
10404
9f2e1e63
DJ
104052006-07-26 Daniel Jacobowitz <dan@codesourcery.com>
10406
10407 * server.c (handle_query): Correct qPart to qXfer.
10408
b80864fb
DJ
104092006-07-22 Daniel Jacobowitz <dan@codesourcery.com>
10410
10411 * configure.ac: Check for more headers which are missing on
10412 Windows. Automatically supply -lwsock32 and USE_WIN32API.
10413 * configure.srv: Add Cygwin and mingw32.
10414 * remote-utils.c: Don't include headers unconditionally which
10415 are missing on mingw32. Include <winsock.h> for mingw32.
10416 (remote_open): Adjust for mingw32 support. Flush
10417 standard error after writing to it.
10418 (remote_close, putpkt_binary, input_interrupt, block_async_io)
10419 (unblock_async_io, enable_async_io, disable_async_io)
10420 (readchar, getpkt): Update for Winsock support.
10421 (prepare_resume_reply): Expect a protocol signal number.
10422 * server.c: Disable <sys/wait.h> on mingw32.
10423 (start_inferior): Adjust for mingw32 support. Flush
10424 standard error after writing to it.
10425 (attach_inferior): Likewise. Use protocol signal
10426 numbers.
10427 (main): Skip 'D' packet on mingw32. Use protocol signal numbers
10428 and names.
10429 * win32-i386-low.c: New file.
10430 * Makefile.in (XM_CLIBS): Set.
10431 (gdbserver, gdbreplay): Use $(INTERNAL_CFLAGS).
10432 (win32-i386-low.o): New dependency rule.
10433 * linux-low.c (linux_wait): Use target signal numbers.
10434 * target.h (struct target_ops): Doc fix.
10435 * server.h (target_signal_to_name): New prototype.
10436 * gdbreplay.c: Don't include headers unconditionally which
10437 are missing on mingw32. Include <winsock.h> for mingw32.
10438 (remote_close, remote_open): Adjust for Winsock support.
10439 * configure, config.in: Regenerated.
10440
0876f84a
DJ
104412006-07-12 Daniel Jacobowitz <dan@codesourcery.com>
10442
10443 * server.c (decode_xfer_read, write_qxfer_response): New.
10444 (handle_query): Take a packet length argument. Handle
10445 qXfer:auxv:read instead of qPart:auxv:read. Mention it in
10446 the qSupported response.
10447 (main): Update call to handle_query.
10448
01f9e8fa
DJ
104492006-06-22 Daniel Jacobowitz <dan@codesourcery.com>
10450
10451 * remote-utils.c (remote_escape_output, remote_unescape_input): New.
10452 (putpkt_binary): Renamed from putpkt and adjusted for binary
10453 data.
10454 (putpkt): New wrapper for putpkt_binary.
10455 (readchar): Don't mask off the high bit.
10456 (decode_X_packet): New function.
10457 * server.c (main): Call putpkt_binary if a handler sets the packet
10458 length. Save the length of the incoming packet. Handle 'X'.
10459 * server.h (gdb_byte, remote_escape_output, decode_X_packet): New.
10460
be2a5f71
DJ
104612006-06-21 Daniel Jacobowitz <dan@codesourcery.com>
10462
10463 * server.c (handle_query): Handle qSupported.
10464
ea025f5f
DJ
104652006-05-30 Daniel Jacobowitz <dan@codesourcery.com>
10466
10467 * remote-utils.c (all_symbols_looked_up): New variable.
10468 (look_up_one_symbol): Check it.
10469 * server.h (look_up_one_symbol): New declaration.
10470 * thread-db.c (thread_db_init): Set all_symbols_looked_up.
10471
9308fc88
DJ
104722006-05-30 Daniel Jacobowitz <dan@codesourcery.com>
10473
10474 * Makefile.in (linux-arm-low.o): Update dependencies.
66f338c7 10475 * linux-arm-low.c: Include "gdb_proc_service.h".
9308fc88
DJ
10476 (PTRACE_GET_THREAD_AREA): Define.
10477 (ps_get_thread_area): New function.
10478
52fb6437
NS
104792006-05-09 Nathan Sidwell <nathan@codesourcery.com>
10480
10481 * configure.srv (m68k*-*-uclinux*): New target.
10482 * linux-low.c (linux_create_inferior): Use vfork on mmuless systems.
10483 (linux_resume_one_process): Remove extraneous cast.
10484 (linux_read_offsets): New.
10485 (linux_target_op): Add linux_read_offsets on mmuless systems.
10486 * server.c (handle_query): Add qOffsets logic.
10487 * target.h (struct target_ops): Add read_offsets.
10488
21b0f40c
DJ
104892006-03-15 Daniel Jacobowitz <dan@codesourcery.com>
10490
10491 * linux-mips-low.c: Include <sys/ptrace.h> and "gdb_proc_service.h".
10492 (PTRACE_GET_THREAD_AREA): Define.
10493 (ps_get_thread_area): New function.
10494 * Makefile.in (linux-i386-low.o, linux-mips-low.o)
10495 (linux-x86-64-low.o): Update.
10496
0050a760
DJ
104972006-03-15 Daniel Jacobowitz <dan@codesourcery.com>
10498
10499 * configure.ac: Remove checks for prfpregset_t.
10500 * gdb_proc_service.h: New file.
10501 * linux-i386-low.c, linux-x86-64-low.c, thread-db.c: Use the
10502 new "gdb_proc_service.h".
10503 * proc-service.c: Likewise.
10504 (ps_pglobal_lookup, ps_pdread, ps_pdwrite): Use psaddr_t.
10505 (ps_lgetfpregs, ps_lsetfpregs): Use a void* argument.
10506 * Makefile.in (gdb_proc_service_h): Updated.
10507 * configure, config.in: Regenerated.
10508
b92a518e
DJ
105092006-03-03 Daniel Jacobowitz <dan@codesourcery.com>
10510
10511 * remote-utils.c (prepare_resume_reply): Move declaration
10512 of gdb_id_from_wait to the top of the block.
10513
545587ee
DJ
105142006-02-15 Daniel Jacobowitz <dan@codesourcery.com>
10515
10516 * linux-low.c (regsets_store_inferior_registers): Read the regset
10517 from the target before filling it.
10518
9db87ebd
DJ
105192006-02-08 Daniel Jacobowitz <dan@codesourcery.com>
10520
10521 * server.c (attach_inferior): Return SIGTRAP for a successful
10522 attach.
10523
dd24457d
DJ
105242006-02-01 Daniel Jacobowitz <dan@codesourcery.com>
10525
10526 * Makefile.in (OBS): Add version.o.
10527 (STAGESTUFF): Delete.
10528 (version.o): Add dependencies.
10529 (version.c): Replace rule.
10530 (clean): Remove version.c.
10531 * server.c (gdbserver_version): New.
10532 (gdbserver_usage): Use printf.
10533 (main): Handle --version and --help.
10534 * server.h (version, host_name): Add declarations.
10535
6f0f660e
EZ
105362005-12-23 Eli Zaretskii <eliz@gnu.org>
10537
889bf7c5
PA
10538 * linux-arm-low.c:
10539 * linux-arm-low.c:
10540 * inferiors.c:
10541 * i387-fp.h:
10542 * i387-fp.c:
10543 * gdbreplay.c:
10544 * regcache.c:
10545 * proc-service.c:
10546 * mem-break.h:
10547 * mem-break.c:
10548 * linux-x86-64-low.c:
10549 * linux-sh-low.c:
10550 * linux-s390-low.c:
10551 * linux-ppc64-low.c:
10552 * linux-ppc-low.c:
10553 * linux-mips-low.c:
10554 * linux-m68k-low.c:
10555 * linux-m32r-low.c:
10556 * linux-low.h:
10557 * linux-low.c:
10558 * linux-ia64-low.c:
10559 * linux-i386-low.c:
10560 * linux-crisv32-low.c:
10561 * thread-db.c:
10562 * terminal.h:
10563 * target.h:
10564 * target.c:
10565 * server.h:
10566 * server.c:
10567 * remote-utils.c:
10568 * regcache.h:
10569 * utils.c:
10570 * Makefile.in:
10571 * configure.ac:
6f0f660e
EZ
10572 * gdbserver.1: Add (C) after Copyright. Update the FSF
10573 address.
10574
9d1fb177
DJ
105752005-11-13 Daniel Jacobowitz <dan@codesourcery.com>
10576
10577 * linux-arm-low.c (arm_eabi_breakpoint): New variable.
10578 (arm_breakpoint_at): Recognize both breakpoints.
10579 (the_low_target): Use the correct breakpoint instruction.
10580
011a70c2
DJ
105812005-11-02 Daniel Jacobowitz <dan@codesourcery.com>
10582
10583 * configure.srv (x86_64-*-linux*): Turn on thread_db support.
10584 * linux-x86-64-low.c (x86_64_breakpoint, x86_64_breakpoint_len)
10585 (x86_64_get_pc, x86_64_set_pc, x86_64_breakpoint_at): New.
10586 (the_low_target): Update.
10587
7fb85e41
AS
105882005-10-25 Andreas Schwab <schwab@suse.de>
10589
10590 * server.c (main): Allocate mem_buf with PBUFSIZ bytes.
10591
10592 * linux-ia64-low.c (ia64_regmap): Remove NAT registers.
10593 (ia64_num_regs): Reduce to 462.
10594
3db0444b
DJ
105952005-09-17 Daniel Jacobowitz <dan@codesourcery.com>
10596
10597 * acinclude.m4: Correct quoting.
10598 * aclocal.m4: Regenerated.
10599
10600 Suggested by SZOKOVACS Robert <szo@ies.hu>:
10601 * thread-db.c (thread_db_err_str): Handle TD_VERSION.
10602 (thread_db_init): Call thread_db_err_str.
10603 * configure.ac: Check for TD_VERSION.
10604 * config.in, configure: Regenerated.
10605
bee0189a
DJ
106062005-07-31 Kaveh R. Ghazi <ghazi@caip.rutgers.edu>
10607
10608 * server.h (error, fatal, warning): Add ATTR_FORMAT.
10609
e9d25b98
DJ
106102005-07-13 Daniel Jacobowitz <dan@codesourcery.com>
10611
10612 * configure.ac: Define HAVE_LINUX_REGSETS even if PTRACE_GETREGS
10613 is not available. Define HAVE_PTRACE_GETREGS if it is.
10614 * config.in, configure: Regenerated.
10615 * configure.srv: Set srv_linux_regsets for PowerPC and PowerPC64.
10616 * linux-i386-low.c, linux-m68k-low.c: Update to use
10617 HAVE_PTRACE_GETREGS.
10618 * linux-low.c (regsets_fetch_inferior_registers)
10619 (regsets_store_inferior_registers): Only return 0 if we processed
10620 GENERAL_REGS.
10621 * linux-ppc-low.c (ppc_fill_gregset, target_regsets): New.
10622 * linux-ppc64-low.c (ppc_fill_gregset, target_regsets): New.
10623
a06660f7
DJ
106242005-07-13 Daniel Jacobowitz <dan@codesourcery.com>
10625
10626 * inferiors.c (struct thread_info): Add gdb_id.
10627 (add_thread): Add gdb_id argument.
10628 (thread_id_to_gdb_id, thread_to_gdb_id, gdb_id_to_thread_id): New.
10629 * linux-low.c (linux_create_inferior, linux_attach_lwp): Update
10630 calls to add_thread.
10631 * remote-utils.c (prepare_resume_reply: Use thread_to_gdb_id.
10632 * server.c (handle_query): Use thread_to_gdb_id.
10633 (handle_v_cont, main): Use gdb_id_to_thread_id.
10634 * server.h (add_thread): Update prototype.
10635 (thread_id_to_gdb_id, thread_to_gdb_id, gdb_id_to_thread_id): New
10636 prototypes.
10637
5a1f5858
DJ
106382005-07-13 Daniel Jacobowitz <dan@codesourcery.com>
10639
10640 * linux-low.c (fetch_register, usr_store_inferior_registers): Handle
10641 left-padded registers.
10642 * linux-low.h (struct linux_target_ops): Add left_pad_xfer.
10643 * linux-ppc64-low.c (the_low_target): Set left_pad_xfer.
10644
e122f1f5
SE
106452005-07-01 Steve Ellcey <sje@cup.hp.com>
10646
10647 * configure.ac (BFD_NEED_DECLARATION): Replace with AC_CHECK_DECLS.
10648 * configure: Regenerate.
10649 * config.in: Regenerate.
10650 * server.h (NEED_DECLARATION_STRERROR):
10651 Replace with !HAVE_DECL_STRERROR.
10652
d592fa2f
DJ
106532005-06-16 Daniel Jacobowitz <dan@codesourcery.com>
10654
10655 * linux-low.c (linux_wait, linux_send_signal): Don't test
10656 an unsigned long variable for > 0 if it could be MAX_ULONG.
10657 * server.c (myresume): Likewise.
10658 * target.c (set_desired_inferior): Likewise.
10659
ccbd4912
MK
106602005-06-13 Mark Kettenis <kettenis@gnu.org>
10661
10662 * configure.ac: Simplify and improve check for socklen_t.
10663 * configure, config.in: Regenerate.
10664
f450004a
DJ
106652005-06-12 Daniel Jacobowitz <dan@codesourcery.com>
10666
10667 * acconfig.h: Remove.
10668 * configure.ac: Add a test for socklen_t. Use three-argument
10669 AC_DEFINE throughout.
10670 * config.in: Regenerated using autoheader 2.59.
10671 * configure: Regenerated.
10672
10673 * gdbreplay.c (socklen_t): Provide a default.
10674 (remote_open): Use socklen_t.
10675 * remote-utils.c (socklen_t): Provide a default.
10676 (remote_open): Use socklen_t.
10677 (convert_int_to_ascii, convert_ascii_to_int, decode_M_packet): Use
10678 unsigned char.
10679
10680 * i387-fp.c (struct i387_fsave, struct i387_fxsave): Use unsigned
10681 char for buffers.
10682 * linux-low.c (linux_read_memory, linux_write_memory)
10683 (linux_read_auxv): Likewise.
10684 * mem-break.c (breakpoint_data, set_breakpoint_data, check_mem_read)
10685 (check_mem_write): Likewise.
10686 * mem-break.h (set_breakpoint_data, check_mem_read, check_mem_write):
10687 Likewise.
10688 * regcache.c (struct inferior_rgcache_data, registers_to_string)
10689 (registers_from_string, register_data): Likewise.
10690 * server.c (handle_query, main): Likewise.
10691 * server.h (convert_ascii_to_int, convert_int_to_ascii)
10692 (decode_M_packet): Likewise.
10693 * target.c (read_inferior_memory, write_inferior_memory): Likewise.
10694 * target.h (struct target_ops): Update read_memory, write_memory,
10695 and read_auxv.
10696 (read_inferior_memory, write_inferior_memory): Update.
10697 * linux-low.h (struct linux_target_ops): Change type of breakpoint
10698 to unsigned char *.
10699 * linux-arm-low.c, linux-cris-low.c, linux-crisv32-low.c,
10700 linux-i386-low.c, linux-m32r-low.c, linux-m68k-low.c,
10701 linux-mips-low.c, linux-ppc-low.c, linux-ppc64-low.c,
10702 linux-s390-low.c, linux-sh-low.c: Update for changes in
10703 read_inferior_memory and the_low_target->breakpoint.
10704
eee84df1
DJ
107052005-05-28 Daniel Jacobowitz <dan@codesourcery.com>
10706
10707 * Makefile.in (SFILES): Add linux-ppc64-low.c.
10708 (linux-ppc64-low.o, reg-ppc64.c, reg-ppc64.o): New targets.
10709 * configure.srv: Add powerpc64-*-linux*.
10710 * linux-ppc64-low.c: New file.
10711
45b134e5
OF
107122005-05-23 Orjan Friberg <orjanf@axis.com>
10713
10714 * linux-cris-low.c: New file with support for CRIS.
10715 * linux-crisv32-low.c: Ditto for CRISv32.
10716 * Makefile.in (SFILES): Add linux-cris-low.c, linux-crisv32-low.c.
10717 (clean): Add reg-cris.c and reg-crisv32.c.
889bf7c5 10718 Add linux-cris-low.o, linux-crisv32-low.o, reg-cris.o, reg-cris.c,
45b134e5
OF
10719 reg-crisv32.o, and reg-crisv32.c to make rules.
10720 * configure.srv: Add cris-*-linux* and crisv32-*-linux* to list of
10721 recognized targets.
10722
48d93c75
UW
107232005-05-16 Ulrich Weigand <uweigand@de.ibm.com>
10724
10725 * linux-low.c (fetch_register): Ensure buffer size is a multiple
10726 of sizeof (PTRACE_XFER_TYPE).
10727 (usr_store_inferior_registers): Likewise. Zero out excess bytes.
10728
e013ee27
OF
107292005-05-12 Orjan Friberg <orjanf@axis.com>
10730
889bf7c5 10731 * target.h (struct target_ops): Add insert_watchpoint,
e013ee27
OF
10732 remove_watchpoint, stopped_by_watchpoint, stopped_data_address function
10733 pointers for hardware watchpoint support.
10734 * linux-low.h (struct linux_target_ops): Ditto.
10735 * linux-low.c (linux_insert_watchpoint, linux_remove_watchpoint)
10736 (linux_stopped_by_watchpoint, linux_stopped_data_address): New. Add
10737 to linux_target_ops.
10738 * remote-utils.c (prepare_resume_reply): Add watchpoint information to
10739 reply packet.
10740 * server.c (main): Recognize 'Z' and 'z' packets.
10741
b0ded00b
UW
107422005-05-10 Ulrich Weigand <uweigand@de.ibm.com>
10743
10744 * linux-s390-low.c (s390_breakpoint, s390_breakpoint_len): Define.
10745 (s390_get_pc, s390_set_pc, s390_breakpoint_at): New functions.
10746 (the_low_target): Add new members.
10747
8643e2ad
DJ
107482005-05-04 Daniel Jacobowitz <dan@codesourcery.com>
10749
10750 * proc-service.c (ps_lgetregs): Search all_processes instead of
10751 all_threads.
10752
fc620387
DJ
107532005-05-04 Daniel Jacobowitz <dan@codesourcery.com>
10754
10755 * server.c (start_inferior): Change return type to int.
10756 (attach_inferior): Change sigptr to int *.
10757 (handle_v_cont, handle_v_requests): Change signal to int *.
10758 (main): Change signal to int.
10759
107602005-04-15 Kei Sakamoto <sakamoto.kei@renesas.com>
7cfbc4a0
KI
10761
10762 * Makefile.in: Add linux-m32r-low.o, reg-m32r.c and reg-m32r.o.
10763 * configure.srv: Add m32r*-*-linux*.
10764 * linux-m32r-low.c: New file.
10765
e0e76420
DJ
107662005-03-04 Daniel Jacobowitz <dan@codesourcery.com>
10767
10768 * Makefile.in (stamp-h): Set CONFIG_HEADERS explicitly.
10769
a1928bad
DJ
107702005-03-03 Daniel Jacobowitz <dan@codesourcery.com>
10771
10772 * inferiors.c (change_inferior_id, add_thread, find_inferior_id):
10773 Take unsigned long arguments for PIDs.
10774 * linux-low.c (add_process, linux_attach_lwp, linux_attach)
10775 (linux_thread_alive, linux_wait_for_event, kill_lwp, send_sigstop)
10776 (wait_for_sigstop, linux_resume_one_process)
10777 (regsets_fetch_inferior_registers, linux_send_signal)
10778 (linux_read_auxv): Likewise. Update the types of variables holding
10779 PIDs. Update format string specifiers.
10780 * linux-low.h (struct process_info, linux_attach_lwp): Likewise.
10781 * remote-utils.c (prepare_resume_reply): Likewise.
10782 * server.c (cont_thread, general_thread, step_thread)
10783 (thread_from_wait, old_thread_from_wait, signal_pid): Change type to
10784 unsigned long.
10785 (handle_query): Update format specifiers.
10786 (handle_v_cont, main): Use strtoul for thread IDs.
10787 * server.h (struct inferior_list_entry): Use unsigned long for ID.
10788 (add_thread, find_inferior_id, change_inferior_id, cont_thread)
10789 (general_thread, step_thread, thread_from_wait)
10790 (old_thread_from_wait): Update.
10791 * target.h (struct thread_resume): Use unsigned long for THREAD.
10792 (struct target_ops): Use unsigned long for arguments to attach and
10793 thread_alive.
10794
dcdb98d2
DJ
107952005-02-24 Daniel Jacobowitz <dan@codesourcery.com>
10796
10797 * acinclude.m4: Include bfd/bfd.m4 directly.
10798 * configure.ac: Use AC_ARG_PROGRAM. Suggested by Aron Griffis
10799 <agriffis@toolchain.org>.
10800 * aclocal.m4, configure: Regenerated.
10801
bec39cab
AC
108022005-01-07 Andrew Cagney <cagney@gnu.org>
10803
10804 * configure.ac: Rename configure.in, require autoconf 2.59.
10805 * configure: Re-generate.
10806
434c4c77
DJ
108072004-12-08 Daniel Jacobowitz <dan@debian.org>
10808
10809 * acinclude.m4 (SRV_CHECK_THREAD_DB): Add ps_get_thread_area. Reset
10810 LIBS when finished.
10811 * aclocal.m4: Regenerated.
10812 * configure: Regenerated.
10813
db1d3e1b
AS
108142004-11-21 Andreas Schwab <schwab@suse.de>
10815
10816 * linux-m68k-low.c (m68k_num_gregs): Define.
10817 (m68k_fill_gregset, m68k_store_gregset, m68k_fill_fpregset)
10818 (m68k_store_fpregset, target_regsets) [HAVE_LINUX_REGSETS]: New.
10819 (m68k_breakpoint, m68k_breakpoint_len, m68k_get_pc, m68k_set_pc)
10820 (m68k_breakpoint_at): New. Add to the_low_target.
10821
10822 * configure.srv (m68*-*-linux*): Set srv_linux_regsets and
10823 srv_linux_thread_db to yes.
10824
43360365
JB
108252004-10-20 Joel Brobecker <brobecker@gnat.com>
10826
10827 * linux-x86-64-low.c (ARCH_SET_GS): Add definition if missing.
10828 (ARCH_SET_FS): Likewise.
10829 (ARCH_GET_FS): Likewise.
10830 (ARCH_GET_GS): Likewise.
10831
fd500816
DJ
108322004-10-16 Daniel Jacobowitz <dan@debian.org>
10833
10834 * linux-i386-low.c (ps_get_thread_area): New.
10835 * linux-x86-64-low.c (ps_get_thread_area): New.
10836 * linux-low.c: Include <sys/syscall.h>.
10837 (linux_kill_one_process): Don't kill the first thread here.
10838 (linux_kill): Kill the first thread here.
10839 (kill_lwp): New function.
10840 (send_sigstop, linux_send_signal): Use it.
10841 * proc-service.c: Clean up #ifdefs.
10842 (fpregset_info): Delete.
10843 (ps_lgetregs): Update and enable implementation.
10844 (ps_lsetregs, ps_lgetfpregs, ps_lsetfpregs): Remove disabled
10845 implementations.
10846 * remote-utils.c (struct sym_cache, symbol_cache): New.
10847 (input_interrupt): Print a clearer message.
10848 (async_io_enabled): New variable.
10849 (enable_async_io, disable_async_io): Use it. Update comments.
10850 (look_up_one_symbol): Use the symbol cache.
10851 * thread-db.c (thread_db_look_up_symbols): New function.
10852 (thread_db_init): Update comments. Call thread_db_look_up_symbols.
10853
f6de3c42
DJ
108542004-10-16 Daniel Jacobowitz <dan@debian.org>
10855
10856 * configure.in: Test for -rdynamic.
10857 * configure: Regenerated.
10858 * Makefile (INTERNAL_LDFLAGS): New.
10859 (gdbserver, gdbreplay): Use it.
10860
2c0fc042
AC
108612004-09-02 Andrew Cagney <cagney@gnu.org>
10862
10863 * Makefile.in (TAGS): Replace TM_FILE with DEPRECATED_TM_FILE.
10864
075b3282
DJ
108652004-03-23 Daniel Jacobowitz <drow@mvista.com>
10866
10867 * linux-low.c (linux_wait): Clear all_processes list also.
10868
fa6a77dc
DJ
108692004-03-12 Daniel Jacobowitz <drow@mvista.com>
10870
10871 * linux-low.c: Include <errno.h>. Remove extern declaration of
10872 errno.
10873
6d782a97
DJ
108742004-03-12 Daniel Jacobowitz <drow@mvista.com>
10875
10876 * gdbreplay.c, server.h, utils.c: Update copyright years.
10877
3a7fb99b
DJ
108782004-03-04 Nathan J. Williams <nathanw@wasabisystems.com>
10879
10880 * server.c (main): Print child status or termination signal from
10881 variable 'signal', not 'sig'.
10882
c3e735a6
DJ
108832004-03-04 Nathan J. Williams <nathanw@wasabisystems.com>
10884
10885 * linux-low.c (linux_read_memory): Change return type to
10886 int. Check for and return error from ptrace().
10887 * target.c (read_inferior_memory): Change return type to int. Pass
10888 back return status from the_target->read_memory().
10889 * target.h (struct target_ops): Adapt *read_memory() prototype.
10890 Update comment.
10891 (read_inferior_memory): Adapt prototype.
10892 * server.c (main): Return an error packet if
10893 read_inferior_memory() returns an error.
10894
a59d1c82
DJ
108952004-03-04 Daniel Jacobowitz <drow@mvista.com>
10896
10897 * Makefile.in (distclean): Remove config.h, stamp-h, and config.log.
10898 Unify with other clean targets.
10899
dc3f8883
DJ
109002004-02-29 Daniel Jacobowitz <drow@mvista.com>
10901
10902 * server.c (handle_v_cont): Call set_desired_inferior.
10903
89a208da
DJ
109042004-02-29 Daniel Jacobowitz <drow@mvista.com>
10905
10906 * remote-utils.c (prepare_resume_reply): Always supply "thread:".
10907
62ea82f5
DJ
109082004-02-29 Daniel Jacobowitz <drow@mvista.com>
10909
10910 * linux-low.c (linux_wait): Unblock async I/O.
10911 (linux_resume): Block and enable async I/O.
10912 * remote-utils.c (block_async_io, unblock_async_io): New functions.
10913 * server.h (block_async_io, unblock_async_io): Add prototypes.
10914
6910d122
DJ
109152004-02-29 Daniel Jacobowitz <drow@mvista.com>
10916
10917 * remote-utils.c (remote_open): Print a status notice after
10918 opening a TCP port.
10919 * server.c (attach_inferior): Print a status notice after
10920 attaching.
10921
109222004-02-29 Daniel Jacobowitz <drow@mvista.com>
d677d77d
DJ
10923
10924 * linux-arm-low.c (arm_get_pc): Print out stop PC in debug mode.
10925
c89dc5d4
DJ
109262004-02-26 Daniel Jacobowitz <drow@mvista.com>
10927
10928 * remote-utils.c (write_enn): Use "E01" instead of "ENN" for the
10929 error packet.
10930 * server.c, target.h: Update copyright years.
10931
4b8dad4a
RM
109322004-02-25 Roland McGrath <roland@redhat.com>
10933
10934 * target.h (struct target_ops): New member `read_auxv'.
10935 * server.c (handle_query): Handle qPart:auxv:read: query using that.
10936 * linux-low.c (linux_read_auxv): New function.
10937 (linux_target_ops): Initialize `read_auxv' member to that.
10938
d7446758
JB
109392004-02-17 Ulrich Weigand <Ulrich.Weigand@de.ibm.com>
10940
10941 Committed by Jim Blandy <jimb@redhat.com>.
10942
10943 * linux-s390-low.c (s390_num_regs): Update.
4b8dad4a 10944 (s390_regmap): Remove control registers. Use __s390x__ predefine
d7446758
JB
10945 instead of GPR_SIZE to distiguish s390 and s390x targets.
10946
5544ad89
DJ
109472004-01-31 Daniel Jacobowitz <drow@mvista.com>
10948
10949 * linux-low.c: Update copyright year.
10950 (check_removed_breakpoint): Clear pending_is_breakpoint.
10951 (linux_set_resume_request, linux_queue_one_thread)
10952 (resume_status_pending_p): New functions.
10953 (linux_continue_one_thread): Use process->resume.
10954 (linux_resume): Only resume threads if there are no pending events.
10955 * linux-low.h (struct process_info): Add resume request
10956 pointer.
10957
2a68b70e
DJ
109582004-01-30 Daniel Jacobowitz <drow@mvista.com>
10959
10960 * regcache.c (new_register_cache): Clear the allocated register
10961 buffer. Suggested by Atsushi Nemoto <anemo@mba.ocn.ne.jp>.
10962
64386c31
DJ
109632003-10-13 Daniel Jacobowitz <drow@mvista.com>
10964
10965 * linux-low.c (linux_resume): Take a struct thread_resume *
10966 argument.
10967 (linux_wait): Update call.
10968 (resume_ptr): New static variable.
10969 (linux_continue_one_thread): Renamed from
10970 linux_continue_one_process. Use resume_ptr.
10971 (linux_resume): Use linux_continue_one_thread.
10972 * server.c (handle_v_cont, handle_v_requests): New functions.
10973 (myresume): New function.
10974 (main): Handle 'v' case.
10975 * target.h (struct thread_resume): New type.
10976 (struct target_ops): Change argument of "resume" to struct
10977 thread_resume *.
10978 (myresume): Delete macro.
10979
c938e9b0
L
109802003-08-08 H.J. Lu <hongjiu.lu@intel.com>
10981
10982 * Makefile.in (install-only): Create dest dir. Support DESTDIR.
10983 (uninstall): Support DESTDIR.
10984
7f313d07
BC
10985Mon Jul 21 20:09:34 UTC 2003 Brendan Conoboy <blc@redhat.com>
10986
10987 * configure.srv: Add xscale*linux copy of arm*linux entry.
10988
3b2fc2ea
DJ
109892003-07-24 Daniel Jacobowitz <drow@mvista.com>
10990
10991 * linux-arm-low.c (arm_reinsert_addr): New function.
10992 (the_low_target): Add arm_reinsert_addr.
10993
1c0a559e
MK
109942003-07-08 Mark Kettenis <kettenis@gnu.org>
10995
10996 * mem-break.c: Remove whitespace at end of file.
10997
43d5792c
DJ
109982003-06-28 Daniel Jacobowitz <drow@mvista.com>
10999
11000 * configure.in: Check whether we need to prototype strerror.
11001 * server.h: Optionally prototype strerror.
11002 * gdbreplay.c (perror_with_name): Use strerror.
11003 * linux-low.c (linux_attach_lwp): Use strerror.
11004 * utils.c (perror_with_name): Use strerror.
11005 * config.in, configure: Regenerated.
11006
c8a86edf
DJ
110072003-06-28 Daniel Jacobowitz <drow@mvista.com>
11008
11009 * linux-sh-low.c (sh_regmap): Fix FP register offsets, reported by
11010 SUGIOKA Toshinobu <sugioka@itonet.co.jp>.
11011
73d37363
DJ
110122003-06-20 Daniel Jacobowitz <drow@mvista.com>
11013
11014 * Makefile.in (SFILES): Update.
11015 * low-hppabsd.c, low-lynx.c, low-nbsd.c, low-sim.c, low-sparc.c,
11016 low-sun3.c: Remove files.
11017
6ad8ae5c
DJ
110182003-06-17 Daniel Jacobowitz <drow@mvista.com>
11019
11020 * linux-low.c: Move comment to linux_thread_alive where it belonged.
11021 (linux_detach_one_process, linux_detach): New functions.
11022 (linux_target_ops): Add linux_detach.
11023 * server.c (main): Handle 'D' packet.
11024 * target.h (struct target_ops): Add "detach" member.
11025 (detach_inferior): Define.
11026
1581182a
MK
110272003-06-13 Mark Kettenis <kettenis@gnu.org>
11028
11029 From Kelley Cook <kelleycook@wideopenwest.com>:
11030 * configure.srv: Accept i[34567]86 variants.
11031
e5379b03
DJ
110322003-06-05 Daniel Jacobowitz <drow@mvista.com>
11033
11034 * linux-low.c (linux_wait_for_event): Correct comment typos.
11035 (linux_resume_one_process): Call check_removed_breakpoint.
11036 (linux_send_signal): New function.
11037 (linux_target_ops): Add linux_send_signal.
11038 * remote-utils.c (putpkt, input_interrupt): Use send_signal instead
11039 of kill.
11040 * target.h (struct target_ops): Add send_signal.
11041
2ff29de4
JB
110422003-05-29 Jim Blandy <jimb@redhat.com>
11043
11044 * linux-low.c (usr_store_inferior_registers): Transfer buf in
11045 PTRACE_XFER_TYPE-sized chunks, not int-sized chunks. Otherwise,
11046 if 'int' is smaller than PTRACE_XFER_TYPE, you end up throwing
11047 away part of the register's value.
11048
254787d4
DJ
110492003-03-26 Daniel Jacobowitz <drow@mvista.com>
11050
11051 * linux-low.c (linux_create_inferior): Use __SIGRTMIN.
11052 (linux_wait_for_event, linux_init_signals): Likewise.
11053
94e10508
DJ
110542003-03-17 Daniel Jacobowitz <drow@mvista.com>
11055
11056 * configure.in: Check for stdlib.h.
11057 * configure: Regenerated.
11058 * config.in: Regenerated.
11059
4c0711e0
DJ
110602003-01-04 Andreas Schwab <schwab@suse.de>
11061
11062 * linux-m68k-low.c (m68k_num_regs): Define to 29 instead of 31.
11063
ef66e766
AC
110642003-01-02 Andrew Cagney <ac131313@redhat.com>
11065
11066 * Makefile.in: Remove obsolete code.
11067
a1358604
DJ
110682002-11-20 Daniel Jacobowitz <drow@mvista.com>
11069
11070 * linux-s390-low.c (s390_regmap): Check GPR_SIZE instead of
11071 defined(PT_FPR0_HI).
11072
23ce3b1c
DJ
110732002-11-17 Stuart Hughes <seh@zee2.com>
11074
11075 * linux-arm-low.c (arm_num_regs): Increase.
11076 (arm_regmap): Include status register.
11077
110782002-11-17 Daniel Jacobowitz <drow@mvista.com>
11079
11080 * linux-low.c (register_addr): Remove incorrect -1 check.
11081
a9fa9f7d
DJ
110822002-08-29 Daniel Jacobowitz <drow@mvista.com>
11083
11084 * linux-low.c (linux_create_inferior): Call setpgid. Return
11085 the new PID.
11086 (unstopped_p, linux_signal_pid): Remove.
11087 (linux_target_ops): Remove linux_signal_pid.
11088 * remote-utils.c (putpkt, input_interrupt): Use signal_pid
11089 global instead of target method.
11090 * target.h (struct target_ops): Remove signal_pid. Update comment
11091 for create_inferior.
11092 * server.c (signal_pid): New variable.
11093 (create_inferior): Set signal_pid. Block SIGTTOU and SIGTTIN in
4b8dad4a 11094 gdbserver. Set the child to be the foreground process group.
a9fa9f7d
DJ
11095 (attach_inferior): Set signal_pid.
11096
17574093
DJ
110972002-08-23 Daniel Jacobowitz <drow@mvista.com>
11098
11099 * ChangeLog: New file, with entries from gdb/ChangeLog after GDB 5.2.
11100
111012002-08-20 Jim Blandy <jimb@redhat.com>
11102
11103 * Makefile.in (LDFLAGS): Allow the configure script to establish a
11104 default for this.
11105
111062002-08-01 Andrew Cagney <cagney@redhat.com>
11107
11108 * Makefile.in: Make chill references obsolete.
11109
111102002-07-24 Kevin Buettner <kevinb@redhat.com>
11111
11112 * configure.in (unistd.h): Add to AC_CHECK_HEADERS list.
11113 * configure: Regenerate.
11114 * config.in: Regenerate.
11115
111162002-07-09 David O'Brien <obrien@FreeBSD.org>
11117
11118 * gdbreplay.c (stdlib.h, unistd.h): Conditionaly include.
11119 (perror_with_name, remote_close, remote_open, expect, play): Static.
11120
111212002-07-04 Michal Ludvig <mludvig@suse.cz>
11122
4b8dad4a 11123 * linux-x86-64-low.c (x86_64_regmap): Make it an array of
17574093
DJ
11124 byte offsets instead of an array of indexes.
11125 (x86_64_store_gregset, x86_64_store_fpregset): Parameter made const.
11126
111272002-06-13 Daniel Jacobowitz <drow@mvista.com>
11128
11129 * regcache.c: Add comment.
11130
111312002-06-11 Daniel Jacobowitz <drow@mvista.com>
11132
11133 * thread-db.c: New file.
11134 * proc-service.c: New file.
11135 * acinclude.m4: New file.
11136 * Makefile.in: Add GDBSERVER_LIBS, gdb_proc_service_h,
11137 proc-service.o, and thread-db.o.
11138 (linux-low.o): Add USE_THREAD_DB.
11139 * acconfig.h: Add HAVE_PRGREGSET_T, HAVE_PRFPREGSET_T,
11140 HAVE_LWPID_T, HAVE_PSADDR_T, and PRFPREGSET_T_BROKEN.
11141 * aclocal.m4: Regenerated.
11142 * config.in: Regenerated.
11143 * configure: Regenerated.
11144 * configure.in: Check for proc_service.h, sys/procfs.h,
11145 thread_db.h, and linux/elf.h headrs.
11146 Check for lwpid_t, psaddr_t, prgregset_t, prfpregset_t, and
11147 PRFPREGSET_T_BROKEN. Introduce srv_thread_depfiles and USE_THREAD_DB.
11148 Check for -lthread_db and thread support.
11149 * configure.srv: Enable thread_db support for ARM, i386, MIPS,
11150 PowerPC, and SuperH.
11151 * i387-fp.c: Constify arguments.
11152 * i387-fp.h: Likewise.
11153 * inferiors.c: (struct thread_info): Renamed from
11154 `struct inferior_info'. Remove PID member. Use generic inferior
11155 list header. All uses updated.
11156 (inferiors, signal_pid): Removed.
11157 (all_threads): New variable.
11158 (get_thread): Define.
11159 (add_inferior_to_list): New function.
11160 (for_each_inferior): New function.
11161 (change_inferior_id): New function.
11162 (add_inferior): Removed.
11163 (remove_inferior): New function.
11164 (add_thread): New function.
11165 (free_one_thread): New function.
11166 (remove_thread): New function.
11167 (clear_inferiors): Use for_each_inferior and free_one_thread.
11168 (find_inferior): New function.
11169 (find_inferior_id): New function.
11170 (inferior_target_data): Update argument type.
11171 (set_inferior_target_data): Likewise.
11172 (inferior_regcache_data): Likewise.
11173 (set_inferior_regcache_data): Likewise.
11174 * linux-low.c (linux_bp_reinsert): Remove.
11175 (all_processes, stopping_threads, using_thrads)
11176 (struct pending_signals, debug_threads, pid_of): New.
11177 (inferior_pid): Replace with macro.
11178 (struct inferior_linux_data): Remove.
11179 (get_stop_pc, add_process): New functions.
11180 (linux_create_inferior): Restore SIGRTMIN+1 before calling exec.
11181 Use add_process and add_thread.
11182 (linux_attach_lwp): New function, based on old linux_attach. Use
11183 add_process and add_thread. Set stop_expected for new threads.
11184 (linux_attach): New function.
11185 (linux_kill_one_process): New function.
11186 (linux_kill): Kill all LWPs.
11187 (linux_thread_alive): Use find_inferior_id.
11188 (check_removed_breakpoints, status_pending_p): New functions.
11189 (linux_wait_for_process): Renamed from linux_wait_for_one_inferior.
11190 Update. Use WNOHANG. Wait for cloned processes also. Update process
11191 struct for the found process.
11192 (linux_wait_for_event): New function.
11193 (linux_wait): Use it. Support LWPs.
11194 (send_sigstop, wait_for_sigstop, stop_all_processes)
11195 (linux_resume_one_process, linux_continue_one_process): New functions.
11196 (linux_resume): Support LWPs.
11197 (REGISTER_RAW_SIZE): Remove.
11198 (fetch_register): Use register_size instead. Call supply_register.
11199 (usr_store_inferior_registers): Likewise. Call collect_register.
11200 Fix recursive case.
11201 (regsets_fetch_inferior_registers): Improve error message.
11202 (regsets_store_inferior_registers): Add debugging.
11203 (linux_look_up_symbols): Call thread_db_init if USE_THREAD_DB.
11204 (unstopped_p, linux_signal_pid): New functions.
11205 (linux_target_ops): Add linux_signal_pid.
11206 (linux_init_signals): New function.
11207 (initialize_low): Call it. Initialize using_threads.
11208 * regcache.c (inferior_regcache_data): Add valid
11209 flag.
11210 (get_regcache): Fetch registers lazily. Add fetch argument
11211 and update all callers.
11212 (regcache_invalidate_one, regcache_invalidate): New
11213 functions.
11214 (new_register_cache): Renamed from create_register_cache.
11215 Return the new regcache.
11216 (free_register_cache): Change argument to a void *.
11217 (registers_to_string, registers_from_string): Call get_regcache
11218 with fetch flag set.
11219 (register_data): Make static. Pass fetch flag to get_regcache.
11220 (supply_register): Call get_regcache with fetch flag clear.
11221 (collect_register): Call get_regcache with fetch flag set.
11222 (collect_register_as_string): New function.
11223 * regcache.h: Update.
11224 * remote-utils.c (putpkt): Flush after debug output and use
11225 stderr.
11226 Handle input interrupts while waiting for an ACK.
11227 (input_interrupt): Use signal_pid method.
11228 (getpkt): Flush after debug output and use stderr.
11229 (outreg): Use collect_register_as_string.
11230 (new_thread_notify, dead_thread_notify): New functions.
11231 (prepare_resume_reply): Check using_threads. Set thread_from_wait
11232 and general_thread.
11233 (look_up_one_symbol): Flush after debug output.
11234 * server.c (step_thread, server_waiting): New variables.
11235 (start_inferior): Don't use signal_pid. Update call to mywait.
11236 (attach_inferior): Update call to mywait.
11237 (handle_query): Handle qfThreadInfo and qsThreadInfo.
11238 (main): Don't fetch/store registers explicitly. Use
11239 set_desired_inferior. Support proposed ``Hs'' packet. Update
11240 calls to mywait.
11241 * server.h: Update.
11242 (struct inferior_list, struct_inferior_list_entry): New.
11243 * target.c (set_desired_inferior): New.
11244 (write_inferior_memory): Constify.
11245 (mywait): New function.
11246 * target.h: Update.
11247 (struct target_ops): New signal_pid method.
11248 (mywait): Removed macro, added prototype.
11249
11250 * linux-low.h (regset_func): Removed.
11251 (regset_fill_func, regset_store_func): New.
11252 (enum regset_type): New.
11253 (struct regset_info): Add type field. Use new operation types.
11254 (struct linux_target_ops): stop_pc renamed to get_pc.
11255 Add decr_pc_after_break and breakpoint_at.
11256 (get_process, get_thread_proess, get_process_thread)
11257 (strut process_info, all_processes, linux_attach_lwp)
11258 (thread_db_init): New.
11259
11260 * linux-arm-low.c (arm_get_pc, arm_set_pc,
11261 arm_breakpoint, arm_breakpoint_len, arm_breakpoint_at): New.
11262 (the_low_target): Add new members.
11263 * linux-i386-low.c (i386_store_gregset, i386_store_fpregset)
11264 (i386_store_fpxregset): Constify.
11265 (target_regsets): Add new kind identifier.
11266 (i386_get_pc): Renamed from i386_stop_pc. Simplify.
11267 (i386_set_pc): Add debugging.
11268 (i386_breakpoint_at): New function.
11269 (the_low_target): Add new members.
11270 * linux-mips-low.c (mips_get_pc, mips_set_pc)
11271 (mips_breakpoint, mips_breakpoint_len, mips_reinsert_addr)
11272 (mips_breakpoint_at): New.
11273 (the_low_target): Add new members.
11274 * linux-ppc-low.c (ppc_get_pc, ppc_set_pc)
11275 (ppc_breakpoint, ppc_breakpoint_len, ppc_breakpoint_at): New.
11276 (the_low_target): Add new members.
11277 * linux-sh-low.c (sh_get_pc, sh_set_pc)
11278 (sh_breakpoint, sh_breakpoint_len, sh_breakpoint_at): New.
11279 (the_low_target): Add new members.
11280 * linux-x86-64-low.c (target_regsets): Add new kind
11281 identifier.
11282
112832002-05-15 Daniel Jacobowitz <drow@mvista.com>
11284
11285 From Martin Pool <mbp@samba.org>:
11286 * server.c (gdbserver_usage): New function.
11287 (main): Call it.
11288
112892002-05-14 Daniel Jacobowitz <drow@mvista.com>
11290
11291 * mem-break.c (reinsert_breakpoint_by_bp): Correct typo
11292 stop_at -> stop_pc.
11293
112942002-05-04 Andrew Cagney <ac131313@redhat.com>
11295
11296 * Makefile.in: Remove obsolete code.
11297
112982002-04-24 Michal Ludvig <mludvig@suse.cz>
11299
11300 * linux-low.c (regsets_fetch_inferior_registers),
11301 (regsets_store_inferior_registers): Removed cast to int from
11302 ptrace() calls.
11303 * regcache.h: Added declaration of struct inferior_info.
11304
113052002-04-20 Daniel Jacobowitz <drow@mvista.com>
11306
11307 * inferiors.c (struct inferior_info): Add regcache_data.
11308 (add_inferior): Call create_register_cache.
11309 (clear_inferiors): Call free_register_cache.
11310 (inferior_regcache_data, set_inferior_regcache_data): New functions.
11311 * regcache.c (struct inferior_regcache_data): New.
11312 (registers): Remove.
11313 (get_regcache): New function.
11314 (create_register_cache, free_register_cache): New functions.
11315 (set_register_cache): Don't initialize the register cache here.
11316 (registers_to_string, registers_from_string, register_data): Call
11317 get_regcache.
11318 * regcache.h: Add prototypes.
11319 * server.h: Likewise.
11320
113212002-04-20 Daniel Jacobowitz <drow@mvista.com>
11322
11323 * mem-break.c: New file.
11324 * mem-break.h: New file.
11325 * Makefile.in: Add mem-break.o rule; update server.h
11326 dependencies.
11327 * inferiors.c (struct inferior_info): Add target_data
11328 member.
11329 (clear_inferiors): Free target_data member if set.
11330 (inferior_target_data, set_inferior_target_data): New functions.
11331 * linux-i386-low.c (i386_breakpoint, i386_breakpoint_len)
11332 (i386_stop_pc, i386_set_pc): New. Add to the_low_target.
11333 * linux-low.c (linux_bp_reinsert): New variable.
11334 (struct inferior_linux_data): New.
11335 (linux_create_inferior): Use set_inferior_target_data.
11336 (linux_attach): Likewise. Call add_inferior.
11337 (linux_wait_for_one_inferior): New function.
11338 (linux_wait): Call it.
11339 (linux_write_memory): Add const.
11340 (initialize_low): Call set_breakpoint_data.
11341 * linux-low.h (struct linux_target_ops): Add breakpoint
11342 handling members.
11343 * server.c (attach_inferior): Remove extra add_inferior
11344 call.
11345 * server.h: Include mem-break.h. Update inferior.c
11346 prototypes.
11347 * target.c (read_inferior_memory)
11348 (write_inferior_memory): New functions.
11349 * target.h (read_inferior_memory)
11350 (write_inferior_memory): Change macros to prototypes.
11351 (struct target_ops): Update comments. Add const to write_memory
11352 definition.
11353
113542002-04-11 Daniel Jacobowitz <drow@mvista.com>
11355
11356 * linux-low.c (usr_store_inferior_registers): Support
11357 registers which are allowed to fail to store.
11358 * linux-low.h (linux_target_ops): Likewise.
11359 * linux-ppc-low.c (ppc_regmap): Support FPSCR.
11360 (ppc_cannot_store_register): FPSCR may not be storable.
11361
113622002-04-09 Daniel Jacobowitz <drow@mvista.com>
11363
11364 * server.h: Include <string.h> if HAVE_STRING_H.
11365 * ChangeLog: Correct paths in last ChangeLog entry.
11366
113672002-04-09 Daniel Jacobowitz <drow@mvista.com>
11368
11369 * linux-low.h: Remove obsolete prototypes.
11370 (struct linux_target_ops): New.
11371 (extern the_low_target): New.
11372 * linux-low.c (num_regs, regmap): Remove declarations.
11373 (register_addr): Use the_low_target explicitly.
11374 (fetch_register): Likewise.
11375 (usr_fetch_inferior_registers): Likewise.
11376 (usr_store_inferior_registers): Likewise.
11377 * linux-arm-low.c (num_regs): Remove.
11378 (arm_num_regs): Define.
11379 (arm_regmap): Renamed from regmap, made static.
11380 (arm_cannot_fetch_register): Renamed from cannot_fetch_register,
11381 made static.
11382 (arm_cannot_store_register): Renamed from cannot_store_register,
11383 made static.
11384 (the_low_target): New.
11385 * linux-i386-low.c (num_regs): Remove.
11386 (i386_num_regs): Define.
11387 (i386_regmap): Renamed from regmap, made static.
11388 (i386_cannot_fetch_register): Renamed from cannot_fetch_register,
11389 made static.
11390 (i386_cannot_store_register): Renamed from cannot_store_register,
11391 made static.
11392 (the_low_target): New.
11393 * linux-ia64-low.c (num_regs): Remove.
11394 (ia64_num_regs): Define.
11395 (ia64_regmap): Renamed from regmap, made static.
11396 (ia64_cannot_fetch_register): Renamed from cannot_fetch_register,
11397 made static.
11398 (ia64_cannot_store_register): Renamed from cannot_store_register,
11399 made static.
11400 (the_low_target): New.
11401 * linux-m68k-low.c (num_regs): Remove.
11402 (m68k_num_regs): Define.
11403 (m68k_regmap): Renamed from regmap, made static.
11404 (m68k_cannot_fetch_register): Renamed from cannot_fetch_register,
11405 made static.
11406 (m68k_cannot_store_register): Renamed from cannot_store_register,
11407 made static.
11408 (the_low_target): New.
11409 * linux-mips-low.c (num_regs): Remove.
11410 (mips_num_regs): Define.
11411 (mips_regmap): Renamed from regmap, made static.
11412 (mips_cannot_fetch_register): Renamed from cannot_fetch_register,
11413 made static.
11414 (mips_cannot_store_register): Renamed from cannot_store_register,
11415 made static.
11416 (the_low_target): New.
11417 * linux-ppc-low.c (num_regs): Remove.
11418 (ppc_num_regs): Define.
11419 (ppc_regmap): Renamed from regmap, made static.
11420 (ppc_cannot_fetch_register): Renamed from cannot_fetch_register,
11421 made static.
11422 (ppc_cannot_store_register): Renamed from cannot_store_register,
11423 made static.
11424 (the_low_target): New.
11425 * linux-s390-low.c (num_regs): Remove.
11426 (s390_num_regs): Define.
11427 (s390_regmap): Renamed from regmap, made static.
11428 (s390_cannot_fetch_register): Renamed from cannot_fetch_register,
11429 made static.
11430 (s390_cannot_store_register): Renamed from cannot_store_register,
11431 made static.
11432 (the_low_target): New.
11433 * linux-sh-low.c (num_regs): Remove.
11434 (sh_num_regs): Define.
11435 (sh_regmap): Renamed from regmap, made static.
11436 (sh_cannot_fetch_register): Renamed from cannot_fetch_register,
11437 made static.
11438 (sh_cannot_store_register): Renamed from cannot_store_register,
11439 made static.
11440 (the_low_target): New.
11441 * linux-x86-64-low.c (x86_64_regmap): Renamed from regmap.
11442 (the_low_target): New.
11443
114442002-04-09 Daniel Jacobowitz <drow@mvista.com>
11445
11446 * Makefile.in: Add stamp-h target.
11447 * configure.in: Create stamp-h.
11448 * configure: Regenerated.
11449
114502002-04-09 Daniel Jacobowitz <drow@mvista.com>
11451
11452 * inferiors.c: New file.
11453 * target.c: New file.
11454 * target.h: New file.
11455 * Makefile.in: Add target.o and inferiors.o. Update
11456 dependencies.
11457 * linux-low.c (inferior_pid): New static variable,
11458 moved from server.c.
11459 (linux_create_inferior): Renamed from create_inferior.
11460 Call add_inferior. Return 0 on success instead of a PID.
11461 (linux_attach): Renamed from myattach.
11462 (linux_kill): Renamed from kill_inferior. Call clear_inferiors ().
11463 (linux_thread_alive): Renamed from mythread_alive.
11464 (linux_wait): Renamed from mywait. Call clear_inferiors () if the
11465 child dies.
11466 (linux_resume): Renamed from myresume. Add missing ``return 0''.
11467 (regsets_store_inferior_registers): Correct error message.
11468 Add missing ``return 0''.
11469 (linux_fetch_registers): Renamed from fetch_inferior_registers.
11470 (linux_store_registers): Renamed from store_inferior_registers.
11471 (linux_read_memory): Renamed from read_inferior_memory.
11472 (linux_write_memory): Renamed from write_inferior_memory.
11473 (linux_target_ops): New structure.
11474 (initialize_low): Call set_target_ops ().
11475 * remote-utils.c (unhexify): New function.
11476 (hexify): New function.
11477 (input_interrupt): Send signals to ``signal_pid''.
11478 * server.c (inferior_pid): Remove.
11479 (start_inferior): Update create_inferior call.
11480 (attach_inferior): Call add_inferior.
11481 (handle_query): New function.
11482 (main): Call handle_query for `q' packets.
11483 * server.h: Include "target.h". Remove obsolete prototypes.
11484 Add prototypes for "inferiors.c", "target.c", hexify, and unhexify.
11485
114862002-04-09 Daniel Jacobowitz <drow@mvista.com>
11487
11488 * Makefile.in: Add WARN_CFLAGS. Update configury
11489 dependencies.
11490 * configure.in: Check for <string.h>
11491 * configure: Regenerate.
11492 * config.in: Regenerate.
11493 * gdbreplay.c: Include needed system headers.
11494 (remote_open): Remove strchr prototype.
11495 * linux-low.h: Correct #ifdef to HAVE_LINUX_USRREGS.
11496 * regcache.c (supply_register): Change buf argument to const void *.
11497 (supply_register_by_name): Likewise.
11498 (collect_register): Change buf argument to void *.
11499 (collect_register_by_name): Likewise.
11500 * regcache.h: Add missing prototypes.
11501 * remote-utils.c: Include <arpa/inet.h> for inet_ntoa.
11502 * server.c (handle_query): New function.
11503 (attached): New static variable, moved out of main.
11504 (main): Quiet longjmp clobber warnings.
11505 * server.h: Add ATTR_NORETURN and ATTR_FORMAT. Update prototypes.
11506 * utils.c (error): Remove NORETURN.
11507 (fatal): Likewise.
This page took 1.550047 seconds and 4 git commands to generate.