Use debug_printf to print debug message
[deliverable/binutils-gdb.git] / gdb / gdbserver / ChangeLog
CommitLineData
25abf979
YQ
12015-07-17 Yao Qi <yao.qi@linaro.org>
2
3 * linux-aarch64-low.c (aarch64_show_debug_reg_state): Use
4 debug_printf.
5 (aarch64_handle_unaligned_watchpoint): Likewise.
6
db1ff28b
JK
72015-07-15 Jan Kratochvil <jan.kratochvil@redhat.com>
8
9 Revert the previous 3 commits:
10 Move gdb_regex* to common/
11 Move linux_find_memory_regions_full & co.
12 gdbserver build-id attribute generator
13
700ca40f
JK
142015-07-15 Aleksandar Ristovski <aristovski@qnx.com
15 Jan Kratochvil <jan.kratochvil@redhat.com>
16
17 gdbserver build-id attribute generator.
18 * linux-low.c (nat/linux-maps.h, search.h, rsp-low.h): Include.
19 (ElfXX_Ehdr, ElfXX_Phdr, ElfXX_Nhdr): New.
20 (ELFXX_FLD, ELFXX_SIZEOF, ELFXX_ROUNDUP, BUILD_ID_INVALID): New.
21 (find_phdr): New.
22 (get_dynamic): Use find_pdhr to traverse program headers.
23 (struct mapping_entry, mapping_entry_s, free_mapping_entry_vec)
24 (compare_mapping_entry_range, struct find_memory_region_callback_data)
25 (read_build_id, find_memory_region_callback, lrfind_mapping_entry)
26 (get_hex_build_id): New.
27 (linux_qxfer_libraries_svr4): Add optional build-id attribute
28 to reply XML document.
29
9904185c
JK
302015-07-15 Aleksandar Ristovski <aristovski@qnx.com
31 Jan Kratochvil <jan.kratochvil@redhat.com>
32
33 * target.c: Include target/target-utils.h and fcntl.h.
34 (target_fileio_read_stralloc_1_pread, target_fileio_read_stralloc_1)
35 (target_fileio_read_stralloc): New functions.
36
6e5b4429
JK
372015-07-15 Jan Kratochvil <jan.kratochvil@redhat.com>
38
39 * Makefile.in (OBS): Add gdb_regex.o.
40 (gdb_regex.o): New.
41 * config.in: Rebuilt.
42 * configure: Rebuilt.
43
ddc98fbf
JK
442015-07-15 Aleksandar Ristovski <aristovski@qnx.com
45 Jan Kratochvil <jan.kratochvil@redhat.com>
46
47 Create empty nat/linux-maps.[ch] and common/target-utils.[ch].
48 * Makefile.in (OBS): Add target-utils.o.
49 (linux-maps.o, target-utils.o): New.
50 * configure.srv (srv_linux_obj): Add linux-maps.o.
51
e57bb7a0
PL
522015-07-15 Pierre Langlois <pierre.langlois@arm.com>
53
54 * linux-aarch64-low.c (aarch64_supports_range_stepping): New
55 function, return 1.
56 (the_low_target): Install it.
57
586b02a9
PA
582015-07-14 Pedro Alves <palves@redhat.com>
59
60 * linux-low.c (kill_wait_lwp): Don't assert if waitpid fails.
61 Instead, ignore ECHILD, and throw an error for other errnos.
62
58c1b36c
PA
632015-07-10 Pedro Alves <palves@redhat.com>
64
65 * event-loop.c (struct callback_event) <data>: Change type to
66 gdb_client_data instance instead of gdb_client_data pointer.
67 (append_callback_event): Adjust.
68
421530db
PL
692015-07-10 Pierre Langlois <pierre.langlois@arm.com>
70
71 * linux-aarch64-low.c: Add comments for each linux_target_ops
72 method. Remove comments already covered in target_ops and
73 linux_target_ops definitions.
74 (the_low_target): Add comments for each unimplemented method.
75
c2d65f38
YQ
762015-07-09 Yao Qi <yao.qi@linaro.org>
77
78 * linux-aarch64-low.c (aarch64_regmap): Remove.
79 (aarch64_usrregs_info): Remove.
80 (regs_info): Set field usrregs to NULL.
81
b20a6524
MM
822015-07-02 Markus Metzger <markus.t.metzger@intel.com>
83
84 * linux-low.c: Include "rsp-low.h"
85 (linux_low_encode_pt_config, linux_low_encode_raw): New.
86 (linux_low_read_btrace): Support BTRACE_FORMAT_PT.
87 (linux_low_btrace_conf): Support BTRACE_FORMAT_PT.
88 (handle_btrace_enable_pt): New.
89 (handle_btrace_general_set): Support "pt".
90 (handle_btrace_conf_general_set): Support "pt:size".
91
96c97461
PL
922015-06-29 Pierre Langlois <pierre.langlois@arm.com>
93
94 * linux-aarch64-low.c (aarch64_supports_z_point_type): Enable for
95 Z_PACKET_SW_BP.
96
37d66942
PL
972015-06-29 Pierre Langlois <pierre.langlois@arm.com>
98
99 * linux-aarch64-low.c: Remove comment about endianness.
100 (aarch64_breakpoint): Change type to gdb_byte[]. Set to "brk #0".
101 (aarch64_breakpoint_at): Change type of insn to gdb_byte[]. Use
102 memcmp.
103
dc06243f
GB
1042015-06-24 Gary Benson <gbenson@redhat.com>
105
106 * linux-i386-ipa.c (stdint.h): Do not include.
107 * lynx-i386-low.c (stdint.h): Likewise.
108 * lynx-ppc-low.c (stdint.h): Likewise.
109 * mem-break.c (stdint.h): Likewise.
110 * thread-db.c (stdint.h): Likewise.
111 * tracepoint.c (stdint.h): Likewise.
112 * win32-low.c (stdint.h): Likewise.
113
124e13d9
SM
1142015-06-18 Simon Marchi <simon.marchi@ericsson.com>
115
116 * server.c (write_qxfer_response): Update call to
117 remote_escape_output.
118
909c2cda
JK
1192015-06-15 Aleksandar Ristovski <aristovski@qnx.com
120 Jan Kratochvil <jan.kratochvil@redhat.com>
121
122 Merge multiple hex conversions.
123 * gdbreplay.c (tohex): Rename to 'fromhex'.
124 (logchar): Use fromhex.
125
24c05f46
JK
1262015-06-10 Jan Kratochvil <jan.kratochvil@redhat.com>
127
128 * server.c (handle_qxfer_libraries): Set `version' attribute for
129 <library-list>.
130
14d2069a
GB
1312015-06-10 Gary Benson <gbenson@redhat.com>
132
133 * target.h (struct target_ops) <multifs_open>: New field.
134 <multifs_unlink>: Likewise.
135 <multifs_readlink>: Likewise.
136 * linux-low.c (nat/linux-namespaces.h): New include.
137 (linux_target_ops): Initialize the_target->multifs_open,
138 the_target->multifs_unlink and the_target->multifs_readlink.
139 * hostio.h (hostio_handle_new_gdb_connection): New declaration.
140 * hostio.c (hostio_fs_pid): New static variable.
141 (hostio_handle_new_gdb_connection): New function.
142 (handle_setfs): Likewise.
143 (handle_open): Use the_target->multifs_open as appropriate.
144 (handle_unlink): Use the_target->multifs_unlink as appropriate.
145 (handle_readlink): Use the_target->multifs_readlink as
146 appropriate.
147 (handle_vFile): Handle vFile:setfs packets.
148 * server.c (handle_query): Call hostio_handle_new_gdb_connection
149 after target_handle_new_gdb_connection.
150
4b8b5e72
GB
1512015-06-10 Gary Benson <gbenson@redhat.com>
152
153 * configure.ac (AC_CHECK_FUNCS): Add setns.
154 * config.in: Regenerate.
155 * configure: Likewise.
156 * Makefile.in (SFILES): Add nat/linux-namespaces.c.
157 (linux-namespaces.o): New rule.
158 * configure.srv (srv_linux_obj): Add linux-namespaces.o.
159
3ac2e371
GB
1602015-06-09 Gary Benson <gbenson@redhat.com>
161
162 * hostio.c (handle_open): Process mode argument with
163 fileio_to_host_mode.
164
ca9b78ce
YQ
1652015-06-01 Yao Qi <yao.qi@linaro.org>
166
167 * linux-s390-low.c (PTRACE_GETREGSET, PTRACE_SETREGSET): Remove.
168 * linux-x86-low.c: Likewise.
169
bfacd19d
DB
1702015-05-28 Don Breazeal <donb@codesourcery.com>
171
172 * linux-low.c (handle_extended_wait): Initialize
173 thread_info.last_resume_kind for new fork children.
174
452003ef
PA
1752015-05-15 Pedro Alves <palves@redhat.com>
176
177 * target.h (target_handle_new_gdb_connection): Rewrite using if
178 wrapped in do/while.
179
1041a03c
JB
1802015-05-14 Joel Brobecker <brobecker@adacore.com>
181
182 * configure.ac: Add prfpregset_t BFD_HAVE_SYS_PROCFS_TYPE check.
183 * configure, config.in: Regenerate.
184 * gdb_proc_service.h [HAVE_PRFPREGSET_T] (prfpregset_t):
185 Declare typedef.
186
c269dbdb
DB
1872015-05-12 Don Breazeal <donb@codesourcery.com>
188
189 * linux-low.c (handle_extended_wait): Handle PTRACE_EVENT_FORK and
190 PTRACE_EVENT_VFORK_DONE.
191 (linux_low_ptrace_options, extended_event_reported): Add vfork
192 events.
193 * remote-utils.c (prepare_resume_reply): New stop reasons "vfork"
194 and "vforkdone" for RSP 'T' Stop Reply Packet.
195 * server.h (report_vfork_events): Declare
196 global variable.
197
3a8a0396
DB
1982015-05-12 Don Breazeal <donb@codesourcery.com>
199
200 * linux-aarch64-low.c (aarch64_linux_new_fork): New function.
201 (the_low_target) <new_fork>: Initialize new member.
202 * linux-arm-low.c (arm_new_fork): New function.
203 (the_low_target) <new_fork>: Initialize new member.
204 * linux-low.c (handle_extended_wait): Call new target function
205 new_fork.
206 * linux-low.h (struct linux_target_ops) <new_fork>: New member.
207 * linux-mips-low.c (mips_add_watchpoint): New function
208 extracted from mips_insert_point.
209 (the_low_target) <new_fork>: Initialize new member.
210 (mips_linux_new_fork): New function.
211 (mips_insert_point): Call mips_add_watchpoint.
212 * linux-x86-low.c (x86_linux_new_fork): New function.
213 (the_low_target) <new_fork>: Initialize new member.
214
de0d863e
DB
2152015-05-12 Don Breazeal <donb@codesourcery.com>
216
217 * linux-low.c (handle_extended_wait): Implement return value,
218 rename argument 'event_child' to 'event_lwp', handle
219 PTRACE_EVENT_FORK, call internal_error for unrecognized event.
220 (linux_low_ptrace_options): New function.
221 (linux_low_filter_event): Call linux_low_ptrace_options,
222 use different argument fo linux_enable_event_reporting,
223 use return value from handle_extended_wait.
224 (extended_event_reported): New function.
225 (linux_wait_1): Call extended_event_reported and set
226 status to report fork events.
227 (linux_write_memory): Add pid to debug message.
228 (reset_lwp_ptrace_options_callback): New function.
229 (linux_handle_new_gdb_connection): New function.
230 (linux_target_ops): Initialize new structure member.
231 * linux-low.h (struct lwp_info) <waitstatus>: New member.
232 * lynx-low.c: Initialize new structure member.
233 * remote-utils.c (prepare_resume_reply): Implement stop reason
234 "fork" for "T" stop message.
235 * server.c (handle_query): Call handle_new_gdb_connection.
236 * server.h (report_fork_events): Declare global flag.
237 * target.h (struct target_ops) <handle_new_gdb_connection>:
238 New member.
239 (target_handle_new_gdb_connection): New macro.
240 * win32-low.c: Initialize new structure member.
241
ddcbc397
DB
2422015-05-12 Don Breazeal <donb@codesourcery.com>
243
244 * mem-break.c (APPEND_TO_LIST): Define macro.
245 (clone_agent_expr): New function.
246 (clone_one_breakpoint): New function.
247 (clone_all_breakpoints): New function.
248 * mem-break.h: Declare new functions.
249
89245bc0
DB
2502015-05-12 Don Breazeal <donb@codesourcery.com>
251
252 * linux-low.c (linux_supports_fork_events): New function.
253 (linux_supports_vfork_events): New function.
254 (linux_target_ops): Initialize new structure members.
255 (initialize_low): Call linux_check_ptrace_features.
256 * lynx-low.c (lynx_target_ops): Initialize new structure
257 members.
258 * server.c (report_fork_events, report_vfork_events):
259 New global flags.
260 (handle_query): Add new features to qSupported packet and
261 response.
262 (captured_main): Initialize new global variables.
263 * target.h (struct target_ops) <supports_fork_events>:
264 New member.
265 <supports_vfork_events>: New member.
266 (target_supports_fork_events): New macro.
267 (target_supports_vfork_events): New macro.
268 * win32-low.c (win32_target_ops): Initialize new structure
269 members.
270
835205d0
GB
2712015-05-12 Gary Benson <gbenson@redhat.com>
272
273 * server.c (handle_qxfer_exec_file): Use current process
274 if annex is empty.
275
21e94bd9
SL
2762015-05-08 Sandra Loosemore <sandra@codesourcery.com>
277
278 * linux-nios2-low.c: Include elf/common.h. Adjust comments.
279 Remove HAVE_PTRACE_GETREGS conditionals.
280 (nios2_regsets): Use PTRACE_GETREGSET and PTRACE_SETREGSET
281 instead of PTRACE_GETREGS and PTRACE_SETREGS.
282
45614f15
YQ
2832015-05-08 Yao Qi <yao.qi@linaro.org>
284
285 * linux-low.c (linux_supports_conditional_breakpoints): New
286 function.
287 (linux_target_ops): Install new target method.
288 * lynx-low.c (lynx_target_ops): Install NULL hook for
289 supports_conditional_breakpoints.
290 * nto-low.c (nto_target_ops): Likewise.
291 * spu-low.c (spu_target_ops): Likewise.
292 * win32-low.c (win32_target_ops): Likewise.
293 * server.c (handle_query): Check
294 target_supports_conditional_breakpoints.
295 * target.h (struct target_ops) <supports_conditional_breakpoints>:
296 New field.
297 (target_supports_conditional_breakpoints): New macro.
298
80ad801e
PA
2992015-05-06 Pedro Alves <palves@redhat.com>
300
301 PR server/18081
302 * server.c (start_inferior): If the process exits, mourn it.
303
819843c7
GB
3042015-04-21 Gary Benson <gbenson@redhat.com>
305
306 * hostio.c (fileio_open_flags_to_host): Factored out to
307 fileio_to_host_openflags in common/fileio.c. Single use
308 updated.
309
a2d5a9d7
MF
3102015-04-17 Max Filippov <jcmvbkbc@gmail.com>
311
312 * linux-xtensa-low.c (xtensa_fill_gregset)
313 (xtensa_store_gregset): Check XCHAL_HAVE_LOOPS instead of
314 XCHAL_HAVE_LOOP.
315
deb44829
MF
3162015-04-17 Max Filippov <jcmvbkbc@gmail.com>
317
318 * linux-xtensa-low.c (xtensa_usrregs_info): Remove.
319 (regs_info): Replace usrregs pointer with NULL.
320
e57f1de3
GB
3212015-04-17 Gary Benson <gbenson@redhat.com>
322
323 * target.h (struct target_ops) <pid_to_exec_file>: New field.
324 * linux-low.c (linux_target_ops): Initialize pid_to_exec_file.
325 * server.c (handle_qxfer_exec_file): New function.
326 (qxfer_packets): Add exec-file entry.
327 (handle_query): Report qXfer:exec-file:read as supported packet.
328
62828379
RN
3292015-04-14 Romain Naour <romain.naour@openwide.fr> (tiny change)
330
331 * linux-low.c (linux_read_offsets): Remove get_thread_lwp.
332
b88bb450
GB
3332015-04-09 Gary Benson <gbenson@redhat.com>
334
335 * hostio-errno.c (errno_to_fileio_error): Remove function.
336 Update caller to use remote_fileio_to_fio_error.
337
c8f4bfdd
YQ
3382015-04-09 Yao Qi <yao.qi@linaro.org>
339
340 * linux-low.c (linux_insert_point): Call
341 insert_memory_breakpoint if TYPE is raw_bkpt_type_sw.
342 (linux_remove_point): Call remove_memory_breakpoint if type is
343 raw_bkpt_type_sw.
344 * linux-x86-low.c (x86_insert_point): Don't call
345 insert_memory_breakpoint.
346 (x86_remove_point): Don't call remove_memory_breakpoint.
347
41f98f02
PA
3482015-04-01 Pedro Alves <palves@redhat.com>
349 Cleber Rosa <crosa@redhat.com>
350
351 * server.c (gdbserver_usage): Reorganize and extend the usage
352 message.
353
2bf6fb9d
PA
3542015-03-24 Pedro Alves <palves@redhat.com>
355
356 * linux-low.c (check_stopped_by_breakpoint): Tweak debug log
357 output. Also dump TRAP_TRACE.
358 (linux_low_filter_event): In debug output, distinguish a
359 resume_stop SIGSTOP from a delayed SIGSTOP.
360
369f6daa
GB
3612015-03-24 Gary Benson <gbenson@redhat.com>
362
363 * linux-x86-low.c (x86_linux_new_thread): Moved to
364 nat/x86-linux.c.
365 (x86_linux_prepare_to_resume): Likewise.
366
8e5d4070
GB
3672015-03-24 Gary Benson <gbenson@redhat.com>
368
369 * Makefile.in (x86-linux-dregs.o): New rule.
370 * configure.srv: Add x86-linux-dregs.o to relevant targets.
371 * linux-x86-low.c: Include nat/x86-linux-dregs.h.
372 (u_debugreg_offset): Moved to nat/x86-linux-dregs.c.
373 (x86_linux_dr_get): Likewise.
374 (x86_linux_dr_set): Likewise.
375 (update_debug_registers_callback): Likewise.
376 (x86_linux_dr_set_addr): Likewise.
377 (x86_linux_dr_get_addr): Likewise.
378 (x86_linux_dr_set_control): Likewise.
379 (x86_linux_dr_get_control): Likewise.
380 (x86_linux_dr_get_status): Likewise.
381 (x86_linux_update_debug_registers): Likewise.
382
2b95d440
GB
3832015-03-24 Gary Benson <gbenson@redhat.com>
384
385 * linux-x86-low.c (x86_linux_update_debug_registers):
386 New function, factored out from...
387 (x86_linux_prepare_to_resume): ...this.
388
14b0bc68
GB
3892015-03-24 Gary Benson <gbenson@redhat.com>
390
391 * linux-x86-low.c (x86_linux_dr_get): Update comments.
392 (x86_linux_dr_set): Likewise.
393 (update_debug_registers_callback): Likewise.
394 (x86_linux_dr_set_addr): Likewise.
395 (x86_linux_dr_get_addr): Likewise.
396 (x86_linux_dr_set_control): Likewise.
397 (x86_linux_dr_get_control): Likewise.
398 (x86_linux_dr_get_status): Likewise.
399 (x86_linux_prepare_to_resume): Likewise.
400
5dfe6ca8
GB
4012015-03-24 Gary Benson <gbenson@redhat.com>
402
403 * linux-x86-low.c (x86_linux_dr_get): Add assertion.
404 Use perror_with_name. Pass string through gettext.
405 (x86_linux_dr_set): Likewise.
406
d33472ad
GB
4072015-03-24 Gary Benson <gbenson@redhat.com>
408
409 * linux-x86-low.c (x86_dr_low_set_addr): Rename to...
410 (x86_linux_dr_set_addr): ...this.
411 (x86_dr_low_get_addr): Rename to...
412 (x86_linux_dr_get_addr): ...this.
413 (x86_dr_low_set_control): Rename to...
414 (x86_linux_dr_set_control): ...this.
415 (x86_dr_low_get_control): Rename to...
416 (x86_linux_dr_get_control): ...this.
417 (x86_dr_low_get_status): Rename to...
418 (x86_linux_dr_get_status): ...this.
419 (x86_dr_low): Update with new function names.
420
4b134ca1
GB
4212015-03-24 Gary Benson <gbenson@redhat.com>
422
423 * Makefile.in (x86-linux.o): New rule.
424 * configure.srv: Add x86-linux.o to relevant targets.
425 * linux-low.c (lwp_set_arch_private_info): New function.
426 (lwp_arch_private_info): Likewise.
427 * linux-x86-low.c: Include nat/x86-linux.h.
428 (arch_lwp_info): Removed structure.
429 (update_debug_registers_callback):
430 Use lwp_set_debug_registers_changed.
431 (x86_linux_prepare_to_resume): Use lwp_debug_registers_changed
432 and lwp_set_debug_registers_changed.
433 (x86_linux_new_thread): Use lwp_set_debug_registers_changed.
434
34c703da
GB
4352015-03-24 Gary Benson <gbenson@redhat.com>
436
437 * linux-low.h (linux_target_ops) <new_thread>: Changed signature.
438 * linux-arm-low.c (arm_new_thread): Likewise.
439 * linux-aarch64-low.c (aarch64_linux_new_thread): Likewise.
440 * linux-mips-low.c (mips_linux_new_thread): Likewise.
441 * linux-x86-low.c (x86_linux_new_thread): Likewise.
442 * linux-low.c (add_lwp): Update the_low_target.new_thread call.
443
cff068da
GB
4442015-03-24 Gary Benson <gbenson@redhat.com>
445
446 * linux-low.c (ptid_of_lwp): New function.
447 (lwp_is_stopped): Likewise.
448 (lwp_stop_reason): Likewise.
449 * linux-x86-low.c (update_debug_registers_callback):
450 Use lwp_is_stopped.
451 (x86_linux_prepare_to_resume): Use ptid_of_lwp and
452 lwp_stop_reason.
453
b2f7c7e8
GB
4542015-03-24 Gary Benson <gbenson@redhat.com>
455
456 * linux-low.h (linux_stop_lwp): Remove declaration.
457
6d4ee8c6
GB
4582015-03-24 Gary Benson <gbenson@redhat.com>
459
460 * linux-low.h: Include nat/linux-nat.h.
461 * linux-low.c (iterate_over_lwps_args): New structure.
462 (iterate_over_lwps_filter): New function.
463 (iterate_over_lwps): Likewise.
464 * linux-x86-low.c (update_debug_registers_callback):
465 Update signature to what iterate_over_lwps expects.
466 Remove PID check that iterate_over_lwps now performs.
467 (x86_dr_low_set_addr): Use iterate_over_lwps.
468 (x86_dr_low_set_control): Likewise.
469
70a0bb6b
GB
4702015-03-24 Gary Benson <gbenson@redhat.com>
471
472 * linux-x86-low.c (x86_debug_reg_state): New function.
473 (x86_linux_prepare_to_resume): Use the above.
474
7b669087
GB
4752015-03-24 Gary Benson <gbenson@redhat.com>
476
477 * linux-low.c (current_lwp_ptid): New function.
478 * linux-x86-low.c: Include nat/linux-nat.h.
479 (x86_dr_low_get_addr): Use current_lwp_ptid.
480 (x86_dr_low_get_control): Likewise.
481 (x86_dr_low_get_status): Likewise.
482
eef49a3d
PA
4832015-03-20 Pedro Alves <palves@redhat.com>
484
485 * tracepoint.c (cmd_qtstatus): Make "str" const.
486
b2333d22
PA
4872015-03-20 Pedro Alves <palves@redhat.com>
488
489 * server.c (handle_general_set): Make "req_str" const.
490
23f238d3
PA
4912015-03-19 Pedro Alves <palves@redhat.com>
492
493 * linux-low.c (linux_resume_one_lwp): Rename to ...
494 (linux_resume_one_lwp_throw): ... this. Don't handle ESRCH here,
495 instead call perror_with_name.
496 (check_ptrace_stopped_lwp_gone): New function.
497 (linux_resume_one_lwp): Reimplement as wrapper around
498 linux_resume_one_lwp_throw that swallows errors if the LWP is
499 gone.
500
91baf43f
PA
5012015-03-19 Pedro Alves <palves@redhat.com>
502
503 * linux-low.c (count_events_callback, select_event_lwp_callback):
504 No longer check whether the thread has resume_stop as last resume
505 kind.
506
8bf3b159
PA
5072015-03-19 Pedro Alves <palves@redhat.com>
508
509 * linux-low.c (count_events_callback, select_event_lwp_callback):
510 Use the lwp's status_pending_p field, not the thread's.
511
b90fc188
PA
5122015-03-19 Pedro Alves <palves@redhat.com>
513
514 * linux-low.c (select_event_lwp_callback): Update comments to
515 no longer mention SIGTRAP.
516
464b0089
GB
5172015-03-18 Gary Benson <gbenson@redhat.com>
518
519 * server.c (handle_query): Do not report vFile:fstat as supported.
520
aa9e327f
GB
5212015-03-11 Gary Benson <gbenson@redhat.com>
522
523 * hostio.c (sys/types.h): New include.
524 (sys/stat.h): Likewise.
525 (common-remote-fileio.h): Likewise.
526 (handle_fstat): New function.
527 (handle_vFile): Handle vFile:fstat packets.
aa9e327f 528
791c0056
GB
5292015-03-11 Gary Benson <gbenson@redhat.com>
530
531 * configure.ac (AC_CHECK_MEMBERS): Add checks for
532 struct stat.st_blocks and struct stat.st_blksize.
533 * configure: Regenerate.
534 * config.in: Likewise.
535 * Makefile.in (SFILES): Add common/common-remote-fileio.c.
536 (OBS): Add common-remote-fileio.o.
537 (common-remote-fileio.o): New rule.
538
9a9df970
PA
5392015-03-09 Pedro Alves <palves@redhat.com>
540
541 * tracepoint.c (gdb_agent_helper_thread): Cast '&sockaddr' to
542 'struct sockaddr' pointer in 'accept' call.
543
9eb1356e
PA
5442015-03-09 Pedro Alves <palves@redhat.com>
545
546 Revert:
547 2015-03-07 Pedro Alves <palves@redhat.com>
548 * gdbreplay.c: No longer include <netinet/in.h>, <sys/socket.h>,
549 or <winsock2.h> here. Instead include "gdb_socket.h".
550 (remote_open): Use union gdb_sockaddr_u.
551 * remote-utils.c: No longer include <netinet/in.h>, <sys/socket.h>
552 or <winsock2.h> here. Instead include "gdb_socket.h".
553 (handle_accept_event, remote_prepare): Use union gdb_sockaddr_u.
554 * tracepoint.c: Include "gdb_socket.h" instead of <sys/socket.h>
555 or <sys/un.h>.
556 (init_named_socket, gdb_agent_helper_thread): Use union
557 gdb_sockaddr_u.
558
aac331e4
PA
5592015-03-07 Pedro Alves <palves@redhat.com>
560
561 * configure.ac (build_warnings): Move
562 -Wdeclaration-after-statement to the C-specific set.
563 * configure: Regenerate.
564
366c75fc
PA
5652015-03-07 Pedro Alves <palves@redhat.com>
566
567 * gdbreplay.c: No longer include <netinet/in.h>, <sys/socket.h>,
568 or <winsock2.h> here. Instead include "gdb_socket.h".
569 (remote_open): Use union gdb_sockaddr_u.
570 * remote-utils.c: No longer include <netinet/in.h>, <sys/socket.h>
571 or <winsock2.h> here. Instead include "gdb_socket.h".
572 (handle_accept_event, remote_prepare): Use union gdb_sockaddr_u.
573 * tracepoint.c: Include "gdb_socket.h" instead of <sys/socket.h>
574 or <sys/un.h>.
575 (init_named_socket, gdb_agent_helper_thread): Use union
576 gdb_sockaddr_u.
577
492d29ea
PA
5782015-03-07 Pedro Alves <palves@redhat.com>
579
580 Adjust all callers of TRY_CATCH to use TRY/CATCH/END_CATCH
581 instead.
582
60a191ed
YQ
5832015-03-06 Yao Qi <yao.qi@linaro.org>
584
585 * linux-aarch64-low.c (aarch64_insert_point): Use
586 show_debug_regs as a boolean.
587 (aarch64_remove_point): Likewise.
588
f5771b1d
PA
5892015-03-05 Pedro Alves <palves@redhat.com>
590
591 * lynx-low.c (lynx_target_ops): Install NULL hooks for
592 stopped_by_sw_breakpoint, supports_stopped_by_sw_breakpoint,
593 stopped_by_hw_breakpoint, supports_stopped_by_hw_breakpoint.
594 * nto-low.c (nto_target_ops): Likewise.
595 * spu-low.c (spu_target_ops): Likewise.
596 * win32-low.c (win32_target_ops): Likewise.
597
3e572f71
PA
5982015-03-04 Pedro Alves <palves@redhat.com>
599
600 * linux-low.c (check_stopped_by_breakpoint) [USE_SIGTRAP_SIGINFO]:
601 Decide whether a breakpoint triggered based on the SIGTRAP's
602 siginfo.si_code.
603 (thread_still_has_status_pending_p) [USE_SIGTRAP_SIGINFO]: Don't check whether a
604 breakpoint is inserted if relying on SIGTRAP's siginfo.si_code.
605 (linux_low_filter_event): Check for breakpoints before checking
606 watchpoints.
607 (linux_wait_1): Don't re-increment the PC if relying on SIGTRAP's
608 siginfo.si_code.
609 (linux_stopped_by_sw_breakpoint)
610 (linux_supports_stopped_by_sw_breakpoint)
611 (linux_stopped_by_hw_breakpoint)
612 (linux_supports_stopped_by_hw_breakpoint): New functions.
613 (linux_target_ops): Install new target methods.
614
1ec68e26
PA
6152015-03-04 Pedro Alves <palves@redhat.com>
616
617 * remote-utils.c (prepare_resume_reply): Report swbreak/hbreak.
618 * server.c (swbreak_feature, hwbreak_feature): New globals.
619 (handle_query) <qSupported>: Handle "swbreak+" and "hwbreak+".
620 (captured_main): Clear swbreak_feature and hwbreak_feature.
621 * server.h (swbreak_feature, hwbreak_feature): Declare.
622 * target.h (struct target_ops) <stopped_by_sw_breakpoint,
623 supports_stopped_by_sw_breakpoint, stopped_by_hw_breakpoint,
624 supports_stopped_by_hw_breakpoint>: New fields.
625 (target_supports_stopped_by_sw_breakpoint)
626 (target_stopped_by_sw_breakpoint)
627 (target_supports_stopped_by_hw_breakpoint)
628 (target_stopped_by_hw_breakpoint): Declare.
629
15c66dd6
PA
6302015-03-04 Pedro Alves <palves@redhat.com>
631
632 enum lwp_stop_reason -> enum target_stop_reason
633 * linux-low.c (check_stopped_by_breakpoint): Adjust.
634 (thread_still_has_status_pending_p, check_stopped_by_watchpoint)
635 (linux_wait_1, stuck_in_jump_pad_callback)
636 (move_out_of_jump_pad_callback, linux_resume_one_lwp)
637 (linux_stopped_by_watchpoint):
638 * linux-low.h (enum lwp_stop_reason): Delete.
639 (struct lwp_info) <stop_reason>: Now an enum target_stop_reason.
640 * linux-x86-low.c (x86_linux_prepare_to_resume): Adjust.
641
98fc70d6
YQ
6422015-03-04 Yao Qi <yao.qi@linaro.org>
643
644 * Makefile.in (SFILES): Add linux-aarch64-low.c.
645
dd2ac174
GB
6462015-03-03 Gary Benson <gbenson@redhat.com>
647
648 * hostio.c (handle_vFile): Fix prefix lengths.
649
d68e53f4
MM
6502015-03-03 Markus Metzger <markus.t.metzger@intel.com>
651
652 * linux-low.c (linux_low_enable_btrace): Do not overwrite non-zero
653 ptr_bits.
654
bf2d68ab
AA
6552015-03-02 Andreas Arnez <arnez@linux.vnet.ibm.com>
656
657 * Makefile.in (s390-vx-linux64.c, s390-tevx-linux64.c)
658 (s390x-vx-linux64.c, s390x-tevx-linux64.c): New rules.
659 (clean): Add "rm -f" for above C files.
660 * configure.srv (srv_regobj): Add s390-vx-linux64.o,
661 s390-tevx-linux64.o, s390x-vx-linux64.o, and s390x-tevx-linux64.o.
662 (srv_xmlfiles): Add s390-vx-linux64.xml, s390-tevx-linux64.xml,
663 s390x-vx-linux64.xml, s390x-tevx-linux64.xml, and s390-vx.xml.
664 * linux-s390-low.c (HWCAP_S390_VX): New macro.
665 (init_registers_s390_vx_linux64, init_registers_s390_tevx_linux64)
666 (init_registers_s390x_vx_linux64)
667 (init_registers_s390x_tevx_linux64)
668 (tdesc_s390_vx_linux64, tdesc_s390_tevx_linux64)
669 (tdesc_s390x_vx_linux64, tdesc_s390x_tevx_linux64): New extern
670 declarations.
671 (s390_fill_vxrs_low, s390_store_vxrs_low, s390_fill_vxrs_high)
672 (s390_store_vxrs_high): New functions.
673 (s390_regsets): Add entries for NT_S390_VXRS_LOW and
674 NT_S390_VXRS_HIGH.
675 (s390_arch_setup): Add logic for selecting one of the new target
676 descriptions. Activate the new vector regsets if applicable.
677 (initialize_low_arch): Also invoke init_registers_s390_vx_linux64,
678 init_registers_s390_tevx_linux64, init_registers_s390x_vx_linux64,
679 and init_registers_s390x_tevx_linux64.
680
c966a859
PA
6812015-03-01 Pedro Alves <palves@redhat.com>
682
683 * linux-i386-ipa.c (gdb_agent_get_raw_reg): Constify 'raw_regs'
684 parameter.
685
4180215b
PA
6862015-02-27 Pedro Alves <palves@redhat.com>
687
688 * linux-x86-low.c (u_debugreg_offset): New function.
689 (x86_linux_dr_get, x86_linux_dr_set): Use it.
690
749bab01
PA
6912015-02-27 Pedro Alves <palves@redhat.com>
692
693 * gdb_proc_service.h: Wrap with EXTERN_C_PUSH/EXTERN_C_POP.
694 [!HAVE_PROC_SERVICE_H] (struct ps_prochandle): Forward declare.
695 [!HAVE_PROC_SERVICE_H] (ps_pdread, ps_pdwrite, ps_ptread)
696 ps_ptwrite, ps_lgetregs, ps_lsetregs, ps_lgetfpregs)
697 (ps_lsetfpregs, ps_getpid)
698 (ps_get_thread_area, ps_pglobal_lookup, ps_pstop, ps_pcontinue)
699 (ps_lstop, ps_lcontinue, ps_lgetxregsize, ps_lgetxregs)
700 (ps_lsetxregs, ps_plog): Declare.
701
3c14e5a3
PA
7022015-02-27 Pedro Alves <palves@redhat.com>
703
704 * linux-amd64-ipa.c (gdb_agent_get_raw_reg): Use
705 IP_AGENT_EXPORT_FUNC.
706 * linux-i386-ipa.c (gdb_agent_get_raw_reg): Use
707 IP_AGENT_EXPORT_FUNC.
708 * tracepoint.c (ATTR_USED, ATTR_NOINLINE, ATTR_CONSTRUCTOR)
709 (IP_AGENT_EXPORT): Delete.
710 (gdb_tp_heap_buffer, gdb_jump_pad_buffer, gdb_jump_pad_buffer_end)
711 (gdb_trampoline_buffer, gdb_trampoline_buffer_end)
712 (gdb_trampoline_buffer_error, collecting, gdb_collect)
713 (stop_tracing, flush_trace_buffer, about_to_request_buffer_space)
714 (trace_buffer_is_full, stopping_tracepoint, expr_eval_result)
715 (error_tracepoint, tracepoints, tracing, trace_buffer_ctrl)
716 (trace_buffer_ctrl_curr, trace_buffer_lo, trace_buffer_hi)
717 (traceframe_read_count, traceframe_write_count)
718 (traceframes_created, trace_state_variables, get_raw_reg)
719 (get_trace_state_variable_value, set_trace_state_variable_value)
720 (ust_loaded, helper_thread_id, cmd_buf): Use
721 IPA_SYM_EXPORTED_NAME.
722 (stop_tracing, flush_trace_buffer): Use IP_AGENT_EXPORT_FUNC.
723 (tracepoints) Use IP_AGENT_EXPORT_VAR.
724 (stopping_tracepoint, trace_buffer_is_full, expr_eval_result): Use
725 IP_AGENT_EXPORT_VAR and wrap in EXTERN_C_PUSH/EXTERN_C_POP.
726 (last_tracepoint): Move into !IN_PROCESS_AGENT block.
727 (error_tracepoint): Use IP_AGENT_EXPORT_VAR and wrap in
728 EXTERN_C_PUSH/EXTERN_C_POP.
729 (trace_state_variables): Use IP_AGENT_EXPORT_VAR.
730 (trace_buffer_lo, trace_buffer_hi): Use IP_AGENT_EXPORT_VAR and
731 wrap in EXTERN_C_PUSH/EXTERN_C_POP.
732 (trace_buffer_ctrl, trace_buffer_ctrl_curr)
733 (traceframe_write_count, traceframe_read_count)
734 (traceframes_created, tracing): Use IP_AGENT_EXPORT_VAR.
735 (about_to_request_buffer_space, get_trace_state_variable_value)
736 (set_trace_state_variable_value): Use IP_AGENT_EXPORT_FUNC.
737 (collecting): Use IP_AGENT_EXPORT_VAR and wrap in
738 EXTERN_C_PUSH/EXTERN_C_POP.
739 (gdb_collect): Use IP_AGENT_EXPORT_FUNC.
740 (ust_loaded, cmd_buf): Use IP_AGENT_EXPORT_VAR.
741 (helper_thread_id, gdb_agent_capability): Use IP_AGENT_EXPORT_VAR
742 and wrap in EXTERN_C_PUSH/EXTERN_C_POP.
743 (gdb_tp_heap_buffer, gdb_jump_pad_buffer, gdb_jump_pad_buffer_end)
744 (gdb_trampoline_buffer, gdb_trampoline_buffer_end)
745 (gdb_trampoline_buffer_error): Use IP_AGENT_EXPORT_VAR.
746 * tracepoint.h (ATTR_USED, ATTR_NOINLINE, EXPORTED_SYMBOL):
747 Define.
748 (IP_AGENT_EXPORT_FUNC, IP_AGENT_EXPORT_VAR)
749 (IP_AGENT_EXPORT_VAR_DECL): Define.
750 (tracing): Declare.
751 (gdb_agent_get_raw_reg): Declare.
752
fe978cb0
PA
7532015-02-27 Tom Tromey <tromey@redhat.com>
754 Pedro Alves <palves@redhat.com>
755
756 Rename symbols whose names are reserved C++ keywords throughout.
757
3bc3d82a
PA
7582015-02-27 Pedro Alves <palves@redhat.com>
759
760 * Makefile.in (COMPILER): New, get it from autoconf.
761 (CXX): Get from autoconf instead.
762 (COMPILE.pre): Use COMPILER.
763 (CC-LD): Rename to ...
764 (CC_LD): ... this. Use COMPILER.
765 (gdbserver$(EXEEXT), gdbreplay$(EXEEXT), $(IPA_LIB)): Adjust.
766 (CXX_FOR_TARGET): Default to g++ instead of gcc.
767 * acinclude.m4: Include build-with-cxx.m4.
768 * configure.ac: Call AC_PROG_CXX and GDB_AC_BUILD_WITH_CXX.
769 Disable -Werror by default if building in C++ mode.
770 (build_warnings): Add -Wno-sign-compare, -Wno-write-strings and
771 -Wno-narrowing in C++ mode. Run supported-warning-flags tests with
772 the C++ compiler. Save/restore CXXFLAGS too.
773 * configure: Regenerate.
774
07697489
PA
7752015-02-27 Pedro Alves <palves@redhat.com>
776
777 * acinclude.m4: Include libiberty.m4.
778 * configure.ac: Call libiberty_INIT.
779 * config.in, configure: Regenerate.
780
9beb7c4e
PA
7812015-02-26 Pedro Alves <palves@redhat.com>
782
783 * linux-low.c (linux_wait_1): When incrementing the PC past a
784 program breakpoint always use the_low_target.breakpoint_len as
785 increment, rather than the maximum between that and
786 the_low_target.decr_pc_after_break.
787
8090aef2
PA
7882015-02-23 Pedro Alves <palves@redhat.com>
789
790 * linux-low.c (check_stopped_by_breakpoint): Don't check if the
791 thread was doing a step-over; always adjust the PC if
792 we stepped over a permanent breakpoint.
793 (linux_wait_1): If we stepped over breakpoint that was on top of a
794 permanent breakpoint, manually advance the PC past it.
795
bc9540e8
PA
7962015-02-23 Pedro Alves <palves@redhat.com>
797
798 * linux-x86-low.c (REGSIZE): Define in both 32-bit and 64-bit
799 modes.
800 (x86_fill_gregset, x86_store_gregset): Use it when handling
801 $orig_eax.
802
2db9a427
PA
8032015-02-20 Pedro Alves <palves@redhat.com>
804
805 * thread-db.c: Include "nat/linux-procfs.h".
806 (thread_db_init): Skip listing new threads if the kernel supports
807 PTRACE_EVENT_CLONE and /proc/PID/task/ is accessible.
808
afa8d396
PA
8092015-02-20 Pedro Alves <palves@redhat.com>
810
811 * linux-low.c (status_pending_p_callback): Use ptid_match.
812
c9587f88
AT
8132015-02-19 Antoine Tremblay <antoine.tremblay@ericsson.com>
814
815 PR breakpoints/16812
816 * linux-low.c (wstatus_maybe_breakpoint): Remove.
817 (linux_low_filter_event): Update wstatus_maybe_breakpoint name.
818 (linux_wait_1): Report SIGTRAP,SIGILL,SIGSEGV.
819
b05ec7a5
AT
8202015-02-10 Antoine Tremblay <antoine.tremblay@ericsson.com>
821
822 PR breakpoints/15956
823 * tracepoint.c (cmd_qtinit): Add check for current_thread.
824
d33501a5
MM
8252015-02-09 Markus Metzger <markus.t.metzger@intel.com>
826
827 * linux-low.c (linux_low_btrace_conf): Print size.
828 * server.c (handle_btrace_conf_general_set): New.
829 (hanle_general_set): Call handle_btrace_conf_general_set.
830 (handle_query): Report Qbtrace-conf:bts:size as supported.
831
f4abbc16
MM
8322015-02-09 Markus Metzger <markus.t.metzger@intel.com>
833
834 * linux-low.c (linux_low_enable_btrace): Update parameters.
835 (linux_low_btrace_conf): New.
836 (linux_target_ops)<to_btrace_conf>: Initialize.
837 * server.c (current_btrace_conf): New.
838 (handle_btrace_enable): Rename to ...
839 (handle_btrace_enable_bts): ... this. Pass &current_btrace_conf
840 to target_enable_btrace. Update comment. Update users.
841 (handle_qxfer_btrace_conf): New.
842 (qxfer_packets): Add btrace-conf entry.
843 (handle_query): Report qXfer:btrace-conf:read as supported packet.
844 * target.h (target_ops)<enable_btrace>: Update parameters and comment.
845 (target_ops)<read_btrace_conf>: New.
846 (target_enable_btrace): Update parameters.
847 (target_read_btrace_conf): New.
848
043c3577
MM
8492015-02-09 Markus Metzger <markus.t.metzger@intel.com>
850
851 * server.c (handle_btrace_general_set): Remove call to
852 target_supports_btrace.
853 (supported_btrace_packets): New.
854 (handle_query): Call supported_btrace_packets.
855 * target.h: include btrace-common.h.
856 (btrace_target_info): Removed.
857 (supports_btrace, target_supports_btrace): Update parameters.
858
734b0e4b
MM
8592015-02-09 Markus Metzger <markus.t.metzger@intel.com>
860
861 * Makefile.in (SFILES): Add common/btrace-common.c.
862 (OBS): Add common/btrace-common.o.
863 (btrace-common.o): Add build rules.
864 * linux-low: Include btrace-common.h.
865 (linux_low_read_btrace): Use struct btrace_data. Call
866 btrace_data_init and btrace_data_fini.
867
d6c146e9
PA
8682015-02-06 Pedro Alves <palves@redhat.com>
869
870 * thread-db.c (find_new_threads_callback): Add debug output.
871
20ba1ce6
PA
8722015-02-04 Pedro Alves <palves@redhat.com>
873
874 * linux-low.c (handle_extended_wait): Don't resume LWPs here.
875 (resume_stopped_resumed_lwps): New function.
876 (linux_wait_for_event_filtered): Use it.
877
8cc73a39
SDJ
8782015-01-15 Sergio Durigan Junior <sergiodj@redhat.com>
879
880 * Makefile.in (SFILES): Add linux-personality.c.
881 (linux-personality.o): New rule.
882 * configure.srv (srv_linux_obj): Add linux-personality.o to the
883 list of objects to be built.
884 * linux-low.c: Include nat/linux-personality.h.
885 (linux_create_inferior): Remove code to disable address space
886 randomization (moved to ../nat/linux-personality.c). Create
887 cleanup to disable address space randomization.
888
fb23d554
SDJ
8892015-01-15 Sergio Durigan Junior <sergiodj@redhat.com>
890
891 * Makefile.in (posix-strerror.o): New rule.
892 (mingw-strerror.o): Likewise.
893 * configure: Regenerated.
894 * configure.ac: Source file ../common/common.host. Initialize new
895 variable srv_host_obs. Add srv_host_obs to GDBSERVER_DEPFILES.
896
cdf43629
YQ
8972015-01-14 Yao Qi <yao@codesourcery.com>
898
899 * Makefile.in (SFILES): Add nat/ppc-linux.c.
900 (ppc-linux.o): New rule.
901 * configure.srv (powerpc*-*-linux*): Add ppc-linux.o.
902 * configure.ac: AC_CHECK_FUNCS(getauxval).
903 * config.in: Re-generated.
904 * configure: Re-generated.
905 * linux-ppc-low.c (ppc_arch_setup) [__powerpc64__]: Call
906 ppc64_64bit_inferior_p
907
514c5338
YQ
9082015-01-14 Yao Qi <yao@codesourcery.com>
909
910 * linux-ppc-low.c: Include "nat/ppc-linux.h".
911 (PPC_FEATURE_HAS_VSX): Move to nat/ppc-linux.h.
912 (PPC_FEATURE_HAS_ALTIVEC, PPC_FEATURE_HAS_SPE): Likewise.
913 (PT_ORIG_R3, PT_TRAP): Likewise.
914 (PTRACE_GETVSXREGS, PTRACE_SETVSXREGS): Likewise.
915 (PTRACE_GETVRREGS, PTRACE_SETVRREGS): Likewise.
916 (PTRACE_GETEVRREGS, PTRACE_SETEVRREGS): Likewise.
917
3368c1e5
JB
9182015-01-10 Joel Brobecker <brobecker@adacore.com>
919
920 * i387-fp.c (i387_cache_to_xsave): In look over
921 num_avx512_zmmh_high_registers, replace use of struct i387_xsave
922 zmmh_low_space field by use of zmmh_high_space.
923
582511be
PA
9242015-01-09 Pedro Alves <palves@redhat.com>
925
926 * linux-low.c (step_over_bkpt): Move higher up in the file.
927 (handle_extended_wait): Don't store the stop_pc here.
928 (get_stop_pc): Adjust comments and rename to ...
929 (check_stopped_by_breakpoint): ... this. Record whether the LWP
930 stopped for a software breakpoint or hardware breakpoint.
931 (thread_still_has_status_pending_p): New function.
932 (status_pending_p_callback): Use
933 thread_still_has_status_pending_p. If the event is no longer
934 interesting, resume the LWP.
935 (handle_tracepoints): Add assert.
936 (maybe_move_out_of_jump_pad): Remove cancel_breakpoints call.
937 (wstatus_maybe_breakpoint): New function.
938 (cancel_breakpoint): Delete function.
939 (check_stopped_by_watchpoint): New function, factored out from
940 linux_low_filter_event.
941 (lp_status_maybe_breakpoint): Delete function.
942 (linux_low_filter_event): Remove filter_ptid argument.
943 Leave thread group exits pending here. Store the LWP's stop PC.
944 Always leave events pending.
945 (linux_wait_for_event_filtered): Pull all events out of the
946 kernel, and leave them all pending.
947 (count_events_callback, select_event_lwp_callback): Consider all
948 events.
949 (cancel_breakpoints_callback, linux_cancel_breakpoints): Delete.
950 (select_event_lwp): Only give preference to the stepping LWP in
951 all-stop mode. Adjust comments.
952 (ignore_event): New function.
953 (linux_wait_1): Delete 'retry' label. Use ignore_event. Remove
954 references to cancel_breakpoints. Adjust to renames. Also give
955 equal priority to all LWPs that have had events in non-stop mode.
956 If reporting a software breakpoint event, unadjust the LWP's PC.
957 (linux_wait): If linux_wait_1 returned an ignored event, retry.
958 (stuck_in_jump_pad_callback, move_out_of_jump_pad_callback):
959 Adjust.
960 (linux_resume_one_lwp): Store the LWP's PC. Adjust.
961 (resume_status_pending_p): Use thread_still_has_status_pending_p.
962 (linux_stopped_by_watchpoint): Adjust.
963 (linux_target_ops): Remove reference to linux_cancel_breakpoints.
964 * linux-low.h (enum lwp_stop_reason): New.
965 (struct lwp_info) <stop_pc>: Adjust comment.
966 <stopped_by_watchpoint>: Delete field.
967 <stop_reason>: New field.
968 * linux-x86-low.c (x86_linux_prepare_to_resume): Adjust.
969 * mem-break.c (software_breakpoint_inserted_here)
970 (hardware_breakpoint_inserted_here): New function.
971 * mem-break.h (software_breakpoint_inserted_here)
972 (hardware_breakpoint_inserted_here): Declare.
973 * target.h (struct target_ops) <cancel_breakpoints>: Remove field.
974 (cancel_breakpoints): Delete.
975 * tracepoint.c (clear_installed_tracepoints, stop_tracing)
976 (upload_fast_traceframes): Remove references to
977 cancel_breakpoints.
978
a33e3959
PA
9792015-01-09 Pedro Alves <palves@redhat.com>
980
981 * thread-db.c (find_new_threads_callback): Ignore thread if the
982 kernel thread ID is -1.
983
8784d563
PA
9842015-01-09 Pedro Alves <palves@redhat.com>
985
986 * linux-low.c (linux_attach_fail_reason_string): Move to
987 nat/linux-ptrace.c, and rename.
988 (linux_attach_lwp): Update comment.
989 (attach_proc_task_lwp_callback): New function.
990 (linux_attach): Adjust to rename and use
991 linux_proc_attach_tgid_threads.
992 (linux_attach_fail_reason_string): Delete declaration.
993
76f2b779
JB
9942015-01-01 Joel Brobecker <brobecker@adacore.com>
995
996 * gdbreplay.c (gdbreplay_version): Update copyright year to 2015.
997 * server.c (gdbserver_version): Likewise.
998
fafcc06a
SDJ
9992014-12-29 Sergio Durigan Junior <sergiodj@redhat.com>
1000
1001 * remote-utils.c: Include ctype.h.
1002 (input_interrupt): Explicitly handle the case when the char
1003 received is the NUL byte. Improve the printing of non-ASCII
1004 characters.
1005
beed38b8
JB
10062014-12-16 Joel Brobecker <brobecker@adacore.com>
1007
1008 * linux-low.c (linux_low_filter_event): Update call to
1009 linux_enable_event_reporting following the addition of
1010 a new parameter to that function.
1011
bf330350
CU
10122014-12-16 Catalin Udma <catalin.udma@freescale.com>
1013
1014 PR server/17457
1015 * linux-aarch64-low.c (AARCH64_FPSR_REGNO): New define.
1016 (AARCH64_FPCR_REGNO): Likewise.
1017 (AARCH64_NUM_REGS): Update to include fpsr/fpcr registers.
1018 (aarch64_fill_fpregset): Add missing fpsr/fpcr registers.
1019 (aarch64_store_fpregset): Likewise.
1020
5227d625
JB
10212014-12-15 Joel Brobecker <brobecker@adacore.com>
1022
1023 * lynx-low.c (lynx_resume): Use PTRACE_SINGLESTEP_ONE if N == 1.
1024 Remove FIXME comment about assumption about N.
1025
f93b65a0
JB
10262014-12-13 Joel Brobecker <brobecker@adacore.com>
1027
1028 * configure.ac: If large-file support is disabled in GDBserver,
1029 pass --disable-largefile to ACX_CONFIGURE_DIR call for "gnulib".
1030 * configure: Regenerate.
1031
e5a9158d
AA
10322014-12-12 Andreas Arnez <arnez@linux.vnet.ibm.com>
1033
1034 * linux-low.c (regsets_fetch_inferior_registers): Suppress the
1035 warning upon ENODATA from ptrace.
1036 * linux-s390-low.c (s390_store_tdb): New.
1037 (s390_regsets): Add regset for NT_S390_TDB.
1038
feea5f36
AA
10392014-12-12 Andreas Arnez <arnez@linux.vnet.ibm.com>
1040
1041 * linux-low.c (regsets_store_inferior_registers): Skip regsets
1042 without a fill_function.
1043 * linux-s390-low.c (s390_fill_last_break): Remove.
1044 (s390_regsets): Set fill_function to NULL for NT_S390_LAST_BREAK.
1045 (s390_arch_setup): Use regset's size instead of fill_function for
1046 loop end condition.
1047
098dbe61
AA
10482014-12-12 Andreas Arnez <arnez@linux.vnet.ibm.com>
1049
1050 * linux-low.c (regsets_fetch_inferior_registers): Do not invoke
1051 the regset's store function when ptrace returned an error.
1052 * regcache.c (get_thread_regcache): Invalidate register cache
1053 before fetching inferior's registers.
1054
28eef672
AA
10552014-12-12 Andreas Arnez <arnez@linux.vnet.ibm.com>
1056
1057 * linux-low.c (regsets_fetch_inferior_registers): Rephrase
1058 while-loop as for-loop.
1059 (regsets_store_inferior_registers): Likewise.
1060
bdca27a2
YQ
10612014-11-28 Yao Qi <yao@codesourcery.com>
1062
1063 * configure.ac(AC_CHECK_FUNCS): Remove readlink.
1064 * config.in, configure: Re-generate.
1065 * hostio.c (handle_unlink): Remove code checking HAVE_READLINK
1066 is defined.
1067
9c232dda
YQ
10682014-11-21 Yao Qi <yao@codesourcery.com>
1069
1070 * configure.ac: Don't invoke AC_FUNC_ALLOCA.
1071 (AC_CHECK_HEADERS): Remove malloc.h.
1072 * configure: Re-generated.
1073 * config.in: Re-generated.
1074 * server.h: Don't include alloca.h and malloc.h.
1075 * gdbreplay.c: Don't check HAVE_ALLOCA_H is defined.
1076 Don't include malloc.h.
1077
43968415
JB
10782014-11-17 Joel Brobecker <brobecker@adacore.com>
1079
1080 * lynx-low.c (lynx_write_memory): Put lynx_read_memory and
1081 corresponding ERRNO check in same block.
1082
40e91bc7
PA
10832014-11-12 Pedro Alves <palves@redhat.com>
1084
1085 * server.c (cont_thread): Update comment.
1086 (start_inferior, attach_inferior): No longer clear cont_thread.
1087 (handle_v_cont): No longer set cont_thread.
1088 (captured_main): Clear cont_thread each time a GDB connects.
1089
c2c118cf
PA
10902014-11-12 Pedro Alves <palves@redhat.com>
1091
1092 * linux-low.c (linux_wait_1): Don't force a wait for the Hc
1093 thread, and don't resume all threads if the Hc thread has exited.
1094
78708b7c
PA
10952014-11-12 Pedro Alves <palves@redhat.com>
1096
1097 * linux-low.c (linux_request_interrupt): Always send a SIGINT to
1098 the process group instead of to a specific LWP.
1099
a2abc7de
PA
11002014-10-15 Pedro Alves <palves@redhat.com>
1101
1102 PR server/17487
1103 * win32-arm-low.c (arm_set_thread_context): Remove current_event
1104 parameter.
1105 (arm_set_thread_context): Delete.
1106 (the_low_target): Adjust.
1107 * win32-i386-low.c (debug_registers_changed)
1108 (debug_registers_used): Delete.
1109 (update_debug_registers_callback): New function.
1110 (x86_dr_low_set_addr, x86_dr_low_set_control): Mark all threads as
1111 needing to update their debug registers.
1112 (win32_get_current_dr): New function.
1113 (x86_dr_low_get_addr, x86_dr_low_get_control)
1114 (x86_dr_low_get_status): Fetch the debug register from the thread
1115 record's context.
1116 (i386_initial_stuff): Adjust.
1117 (i386_get_thread_context): Remove current_event parameter. Don't
1118 clear debug_registers_changed nor copy DR values to
1119 debug_reg_state.
1120 (i386_set_thread_context): Delete.
1121 (i386_prepare_to_resume): New function.
1122 (i386_thread_added): Mark the thread as needing to update irs
1123 debug registers.
1124 (the_low_target): Remove i386_set_thread_context and install
1125 i386_prepare_to_resume.
1126 * win32-low.c (win32_get_thread_context): Adjust.
1127 (win32_set_thread_context): Use SetThreadContext
1128 directly.
1129 (win32_prepare_to_resume): New function.
1130 (win32_require_context): New function, factored out from ...
1131 (thread_rec): ... this.
1132 (continue_one_thread): Call win32_prepare_to_resume on each thread
1133 we're about to continue.
1134 (win32_resume): Call win32_prepare_to_resume on the event thread.
1135 * win32-low.h (struct win32_thread_info)
1136 <debug_registers_changed>: New field.
1137 (struct win32_target_ops): Change prototype of set_thread_context,
1138 delete set_thread_context and add prepare_to_resume.
1139 (win32_require_context): New declaration.
1140
a442d071
GB
11412014-10-08 Gary Benson <gbenson@redhat.com>
1142
1143 * server.h: Do not include common-exceptions.h.
1144
6f1947e8
GB
11452014-10-08 Gary Benson <gbenson@redhat.com>
1146
1147 * server.h: Do not include cleanups.h.
1148
63b434a4
JH
11492014-09-30 James Hogan <james.hogan@imgtec.com>
1150
1151 * Makefile.in (clean): Add rm -f commands for mips-dsp-linux.c and
1152 mips64-dsp-linux.c.
1153
c4d9ceb6
YQ
11542014-09-23 Yao Qi <yao@codesourcery.com>
1155
1156 * linux-low.c (lp_status_maybe_breakpoint): New function.
1157 (linux_low_filter_event): Call lp_status_maybe_breakpoint.
1158 (count_events_callback): Likewise.
1159 (select_event_lwp_callback): Likewise.
1160 (cancel_breakpoints_callback): Likewise.
1161
89a5711c
DB
11622014-09-19 Don Breazeal <donb@codesourcery.com>
1163
1164 * linux-low.c (handle_extended_wait): Call
1165 linux_ptrace_get_extended_event.
1166 (get_stop_pc, get_detach_signal, linux_low_filter_event): Call
1167 linux_is_extended_waitstatus.
1168
bffc0964
JB
11692014-09-16 Joel Brobecker <brobecker@adacore.com>
1170
1171 * Makefile.in (CPPFLAGS): Define.
1172 (INTERNAL_CFLAGS_BASE): Add ${CPPFLAGS}.
1173 (IPAGENT_CFLAGS): Remove ${CPPFLAGS}.
1174
0bfdf32f
GB
11752014-09-16 Gary Benson <gbenson@redhat.com>
1176
1177 * inferiors.h (current_inferior): Renamed as...
1178 (current_thread): New variable. All uses updated.
1179 * linux-low.c (get_pc): Renamed saved_inferior as saved_thread.
1180 (maybe_move_out_of_jump_pad): Likewise.
1181 (cancel_breakpoint): Likewise.
1182 (linux_low_filter_event): Likewise.
1183 (wait_for_sigstop): Likewise.
1184 (linux_resume_one_lwp): Likewise.
1185 (need_step_over_p): Likewise.
1186 (start_step_over): Likewise.
1187 (linux_stabilize_threads): Renamed save_inferior as saved_thread.
1188 * linux-x86-low.c (x86_linux_update_xmltarget): Likewise.
1189 * proc-service.c (ps_lgetregs): Renamed reg_inferior as reg_thread
1190 and save_inferior as saved_thread.
1191 * regcache.c (get_thread_regcache): Renamed saved_inferior as
1192 saved_thread.
1193 (regcache_invalidate_thread): Likewise.
1194 * remote-utils.c (prepare_resume_reply): Likewise.
1195 * thread-db.c (thread_db_get_tls_address): Likewise.
1196 (disable_thread_event_reporting): Likewise.
1197 (remove_thread_event_breakpoints): Likewise.
1198 * tracepoint.c (gdb_agent_about_to_close): Renamed save_inferior
1199 as saved_thread.
1200 * target.h (set_desired_inferior): Renamed as...
1201 (set_desired_thread): New declaration. All uses updated.
1202 * server.c (myresume): Updated comment to reference thread instead
1203 of inferior.
1204 (handle_serial_event): Likewise.
1205 (handle_target_event): Likewise.
1206
361c8ade
GB
12072014-09-12 Tom Tromey <tromey@redhat.com>
1208 Gary Benson <gbenson@redhat.com>
1209
1210 * regcache.h: Include common-regcache.h.
1211 (regcache_read_pc): Don't declare.
1212 * regcache.c (get_thread_regcache_for_ptid): New function.
1213
bd9269f7
GB
12142014-09-11 Tom Tromey <tromey@redhat.com>
1215 Gary Benson <gbenson@redhat.com>
1216
1217 * symbol.c: New file.
1218 * Makefile.in (SFILES): Add symbol.c.
1219 (OBS): Add symbol.o.
1220
f8c1d06b
GB
12212014-09-11 Gary Benson <gbenson@redhat.com>
1222
1223 * target.c (target_stop_ptid, target_continue_ptid): New
1224 functions.
1225
721ec300
GB
12262014-09-11 Tom Tromey <tromey@redhat.com>
1227 Gary Benson <gbenson@redhat.com>
1228
1229 * target.h: Include target/target.h.
1230 * target.c (target_read_memory, target_read_uint32)
1231 (target_write_memory): New functions.
1232
c5e92cca
GB
12332014-09-11 Gary Benson <gbenson@redhat.com>
1234
1235 * server.h (debug_hw_points): Don't declare.
1236 * server.c (debug_hw_points): Don't define. Replace all uses
1237 with show_debug_regs.
1238 * linux-aarch64-low.c (debug_hw_points): Don't define. Replace
1239 all uses with show_debug_regs.
1240
2e4bb98a
EBM
12412014-09-08 Edjunior Barbosa Machado <emachado@linux.vnet.ibm.com>
1242
1243 * linux-ppc-low.c (ppc_collect_ptrace_register): Adjust routine to take
1244 endianness into account.
1245 (ppc_supply_ptrace_register): Likewise.
1246
ac740bc7
JH
12472014-09-03 James Hogan <james.hogan@imgtec.com>
1248
1249 * linux-mips-low.c (mips_read_description): Reset errno to 0 prior
1250 to reading DSP_CONTROL with PTRACE_PEEKUSER ptrace call.
1251
97ea6506
GB
12522014-09-03 Gary Benson <gbenson@redhat.com>
1253
1254 * linux-x86-low.c (x86_linux_prepare_to_resume): Use
1255 ALL_DEBUG_ADDRESS_REGISTERS.
1256
df7e5265
GB
12572014-09-02 Gary Benson <gbenson@redhat.com>
1258
1259 * i386-low.h: Renamed as...
1260 * x86-low.h: New file. All type, function and variable name
1261 prefixes changed from "i386_" to "x86_". All references updated.
1262 * i386-low.c: Renamed as...
1263 * x86-low.c: New file. All type, function and variable name
1264 prefixes changed from "i386_" to "x86_". All references updated.
1265
ed859da7
GB
12662014-09-02 Gary Benson <gbenson@redhat.com>
1267
1268 * linux-x86-low.c (x86_linux_new_process): Use XCNEW.
1269 (x86_linux_new_thread): Likewise.
1270
860789c7
GB
12712014-08-29 Gary Benson <gbenson@redhat.com>
1272
1273 * server.h (setjmp.h): Do not include.
1274 (toplevel): Do not declare.
1275 (common-exceptions.h): Include.
1276 (cleanups.h): Likewise.
1277 * server.c (toplevel): Do not define.
1278 (exit_code): New static global.
1279 (detach_or_kill_for_exit_cleanup): New function.
1280 (main): New function. Original main renamed to...
1281 (captured_main): New function.
1282 * utils.c (verror) [!IN_PROCESS_AGENT]: Use throw_verror.
1283
ff55e1b5
GB
12842014-08-29 Gary Benson <gbenson@redhat.com>
1285
1286 * Makefile.in (SFILES): Add common/common-exceptions.c.
1287 (OBS): Add common-exceptions.o.
1288 (common-exceptions.o): New rule.
1289 * utils.c (prepare_to_throw_exception): New function.
1290
e9bcb658
GB
12912014-08-29 Gary Benson <gbenson@redhat.com>
1292
1293 * config.in: Regenerate.
1294 * configure: Likewise.
1295
e3180625
GB
12962014-08-29 Gary Benson <gbenson@redhat.com>
1297
1298 * Makefile.in (SFILES): Add common/cleanups.c.
1299 (OBS): cleanups.o.
1300 (cleanups.o): New rule.
1301
e3d6ba5d
GB
13022014-08-29 Gary Benson <gbenson@redhat.com>
1303
1304 * utils.c (internal_vwarning): New function.
1305
7096e886
GB
13062014-08-28 Gary Benson <gbenson@redhat.com>
1307
1308 * utils.h (fatal): Remove declaration.
1309 * utils.c (fatal): Remove function.
1310
14ce3192
GB
13112014-08-28 Gary Benson <gbenson@redhat.com>
1312
1313 * tracepoint.c (gdb_agent_init): Replace fatal with
1314 perror_with_name.
1315 (initialize_tracepoint): Likewise.
1316
50278d59
GB
13172014-08-28 Gary Benson <gbenson@redhat.com>
1318
1319 * remote-utils.c (remote_prepare): Replace fatal with error.
1320
aa96c426
GB
13212014-08-28 Gary Benson <gbenson@redhat.com>
1322
1323 * linux-low.c (linux_async): Replace fatal with warning.
1324 Tidy up and return.
1325 (linux_start_non_stop): Return -1 if linux_async failed.
1326
f7160e97
GB
13272014-08-28 Gary Benson <gbenson@redhat.com>
1328
1329 * linux-x86-low.c (i386_dr_low_set_addr): Replace check with
1330 gdb_assert.
1331 (i386_dr_low_get_addr): Remove vague comment.
1332 * win32-i386-low.c (i386_dr_low_set_addr): Replace check with
1333 gdb_assert.
1334
38e08fca
GB
13352014-08-28 Gary Benson <gbenson@redhat.com>
1336
1337 * inferiors.c (get_thread_process): Replace check with gdb_assert.
1338 * linux-low.c (linux_wait_for_event_filtered): Replace fatal with
1339 internal_error.
1340 (linux_resume_one_lwp): Likewise.
1341 * linux-x86-low.c (x86_siginfo_fixup): Replace checks with
1342 gdb_assert.
1343 * mem-break.c (raw_bkpt_type_to_target_hw_bp_type): Replace fatal
1344 with internal_error.
1345 * regcache.c (get_thread_regcache): Replace check with gdb_assert.
1346 (init_register_cache): Replace fatal with gdb_assert_not_reached.
1347 (find_register_by_name): Replace fatal with internal_error.
1348 (find_regno): Likewise.
1349 * tdesc.c (init_target_desc): Replace check with gdb_assert.
1350 * thread-db.c (thread_db_create_event): Likewise.
1351 (thread_db_load_search): Likewise.
1352 (try_thread_db_load_1): Likewise.
1353 * tracepoint.c (get_jump_space_head): Replace fatal with
1354 internal_error.
1355 (claim_trampoline_space): Likewise.
1356 (have_fast_tracepoint_trampoline_buffer): Likewise.
1357 (cmd_qtstart): Likewise.
1358 (stop_tracing): Likewise.
1359 (fast_tracepoint_collecting): Likewise.
1360 (target_malloc): Likewise.
1361 (download_tracepoint): Likewise.
1362 (download_trace_state_variables): Replace check with gdb_assert.
1363 (upload_fast_traceframes): Replace fatal with internal_error.
1364
34abf635
GB
13652014-08-19 Tom Tromey <tromey@redhat.com>
1366 Gary Benson <gbenson@redhat.com>
1367
1368 * Makefile.in (SFILES): Add common/common-debug.c.
1369 (OBS): Add common-debug.o.
1370 (common-debug.o): New rule.
1371 * debug.h (debug_printf): Don't declare.
1372 * debug.c (debug_printf): Renamed and rewritten as...
1373 (debug_vprintf): New function.
1374
f6e94d78
GB
13752014-08-19 Gary Benson <gbenson@redhat.com>
1376
1377 * utils.h: Do not include print-utils.h.
1378
9239eeab
GB
13792014-08-19 Tom Tromey <tromey@redhat.com>
1380 Gary Benson <gbenson@redhat.com>
1381
1382 * server.h: Add static assertion.
1383 (gdb_byte, CORE_ADDR, LONGEST, ULONGEST): Remove.
1384
ef87c8bb
GB
13852014-08-19 Tom Tromey <tromey@redhat.com>
1386 Gary Benson <gbenson@redhat.com>
1387
1388 * Makefile.in (SFILES): Add common/errors.c.
1389 (OBS): Add errors.o.
1390 (IPA_OBS): Add errors-ipa.o.
1391 (errors.o): New rule.
1392 (errors-ipa.o): Likewise.
1393 * utils.h (perror_with_name, error, warning): Don't declare.
1394 * utils.c (warning): Renamed and rewritten as...
1395 (vwarning): New function.
1396 (error): Renamed and rewritten as...
1397 (verror): New function.
1398 (internal_error): Renamed and rewritten as...
1399 (internal_verror): New function.
1400
bb974a24
GB
14012014-08-07 Gary Benson <gbenson@redhat.com>
1402
1403 * configure.ac (AC_CHECK_HEADERS): Remove errno.h.
1404 * configure: Regenerate.
1405 * config.in: Likewise.
1406 * server.h: Do not include errno.h.
1407 * event-loop.c: Likewise.
1408 * hostio-errno.c: Likewise.
1409 * linux-low.c: Likewise.
1410 * remote-utils.c: Likewise.
1411 * spu-low.c: Likewise.
1412 * utils.c: Likewise.
1413 * gdbreplay.c: Unconditionally include errno.h.
1414
6d3d12eb
GB
14152014-08-07 Gary Benson <gbenson@redhat.com>
1416
1417 * server.h: Do not include string.h.
1418 * event-loop.c: Likewise.
1419 * linux-low.c: Likewise.
1420 * regcache.c: Likewise.
1421 * remote-utils.c: Likewise.
1422 * spu-low.c: Likewise.
1423 * utils.c: Likewise.
1424
dccbb609
GB
14252014-08-07 Gary Benson <gbenson@redhat.com>
1426
1427 * server.h: Do not include gdb_assert.h.
1428
e76df0d0
GB
14292014-08-07 Gary Benson <gbenson@redhat.com>
1430
1431 * server.h: Do not include common-utils.h.
1432
4cb9c816
GB
14332014-08-07 Gary Benson <gbenson@redhat.com>
1434
1435 * server.h: Do not include ptid.h.
1436 * notif.h: Likewise.
1437
3995eeee
GB
14382014-08-07 Gary Benson <gbenson@redhat.com>
1439
1440 * server.h: Do not include gdb_locale.h.
1441
cb9f1a9b
GB
14422014-08-07 Gary Benson <gbenson@redhat.com>
1443
1444 * server.h: Do not include gdb/signals.h.
1445 * win32-low.c: Likewise.
1446
a5fceff8
GB
14472014-08-07 Gary Benson <gbenson@redhat.com>
1448
1449 * server.h: Do not include pathmax.h.
1450
b9391142
GB
14512014-08-07 Gary Benson <gbenson@redhat.com>
1452
1453 * server.h: Do not include libiberty.h.
1454 * linux-bfin-low.c: Likewise.
1455
0e443c87
GB
14562014-08-07 Gary Benson <gbenson@redhat.com>
1457
1458 * server.h: Do not include ansidecl.h.
1459
8ebb3f56
GB
14602014-08-07 Gary Benson <gbenson@redhat.com>
1461
1462 * linux-x86-low.c: Do not include stddef.h.
1463 * lynx-ppc-low.c: Likewise.
1464 * tracepoint.c: Likewise.
1465
8980bdf6
GB
14662014-08-07 Gary Benson <gbenson@redhat.com>
1467
1468 * server.h: Do not include stdarg.h.
1469 * nto-low.c: Likewise.
1470
d7096f71
GB
14712014-08-07 Gary Benson <gbenson@redhat.com>
1472
1473 * server.h: Do not include stdlib.h.
1474 * inferiors.c: Likewise.
1475 * linux-low.c: Likewise.
1476 * regcache.c: Likewise.
1477 * spu-low.c: Likewise.
1478 * tracepoint.c: Likewise.
1479 * utils.c: Likewise.
1480
d02f550d
GB
14812014-08-07 Gary Benson <gbenson@redhat.com>
1482
1483 * server.h: Do not include stdio.h.
1484 * linux-low.c: Likewise.
1485 * remote-utils.c: Likewise.
1486 * spu-low.c: Likewise.
1487 * utils.c: Likewise.
1488 * wincecompat.c: Likewise.
1489
87f6c4e3
GB
14902014-08-06 Gary Benson <gbenson@redhat.com>
1491
1492 * regcache.c (init_register_cache): Move conditionals inside if.
1493
7089dca4
GB
14942014-08-06 Gary Benson <gbenson@redhat.com>
1495
1496 * linux-low.c (linux_supports_non_stop): Use target_is_async_p.
1497
462f517e
GB
14982014-07-31 Gary Benson <gbenson@redhat.com>
1499
1500 * ax.h: Do not include server.h.
1501 * gdbthread.h: Likewise.
1502 * lynx-low.h: Likewise.
1503 * notif.h: Likewise.
1504
976411d6
GB
15052014-07-30 Gary Benson <gbenson@redhat.com>
1506
1507 * server.h: Include common-defs.h.
1508 Do not include config.h or build-gnulib-gdbserver/config.h.
1509
d41f6d8e
GB
15102014-07-30 Gary Benson <gbenson@redhat.com>
1511
1512 * hostio-errno.c: Move server.h to top of includes list.
1513 * inferiors.c: Likewise.
1514 * linux-x86-low.c: Likewise.
1515 * notif.c: Include server.h.
1516
314c6a35
TT
15172014-07-24 Tom Tromey <tromey@redhat.com>
1518 Gary Benson <gbenson@redhat.com>
1519
1520 * server.h (CORE_ADDR): Now unsigned.
1521
69ff6be5
PA
15222014-07-16 Pedro Alves <palves@redhat.com>
1523
1524 * linux-low.c (linux_kill_one_lwp): Use kill_lwp, not kill.
1525
ce9e3fe7
PA
15262014-07-15 Pedro Alves <palves@redhat.com>
1527
1528 * linux-low.c (linux_kill_one_lwp): Save errno and work with saved
1529 copy.
1530
e76126e8
PA
15312014-07-11 Pedro Alves <palves@redhat.com>
1532
1533 * linux-low.c (kill_wait_lwp): New function, based on
1534 kill_one_lwp_callback, but use my_waitpid directly.
1535 (kill_one_lwp_callback, linux_kill): Use it.
1536
8e9db26e
PA
15372014-06-23 Pedro Alves <palves@redhat.com>
1538
1539 * linux-x86-low.c (x86_linux_prepare_to_resume): Clear DR_CONTROL
1540 before setting DR0..DR3.
1541
698b3e08
GB
15422014-06-20 Gary Benson <gbenson@redhat.com>
1543
1544 * configure.ac (AC_REPLACE_FUNCS) <vasprintf, vsnprintf>: Removed.
1545 * configure: Regenerated.
1546 * config.in: Likewise.
1547
125f8a3d
GB
15482014-06-20 Gary Benson <gbenson@redhat.com>
1549
1550 * Makefile.in (SFILES): Update locations for files moved
1551 from common to nat.
1552 (object file files): Reordered.
1553
42995dbd
GB
15542014-06-20 Gary Benson <gbenson@redhat.com>
1555
1556 * i386-low.h (i386_dr_low_can_set_addr): Removed.
1557 (i386_dr_low_set_addr): Likewise.
1558 (i386_dr_low_get_addr): Likewise.
1559 (i386_dr_low_can_set_control): Likewise.
1560 (i386_dr_low_set_control): Likewise.
1561 (i386_dr_low_get_control): Likewise.
1562 (i386_dr_low_get_status): Likewise.
1563 (i386_get_debug_register_length): Likewise.
1564 * linux-x86-low.c (i386_dr_low_set_addr):
1565 Changed signature. Made static.
1566 (i386_dr_low_get_addr): Likewise.
1567 (i386_dr_low_set_control): Likewise.
1568 (i386_dr_low_get_control): Likewise.
1569 (i386_dr_low_get_status): Likewise.
1570 (i386_dr_low): New global variable.
1571 * win32-i386-low.c (i386_dr_low_set_addr):
1572 Changed signature. Made static.
1573 (i386_dr_low_get_addr): Likewise.
1574 (i386_dr_low_set_control): Likewise.
1575 (i386_dr_low_get_control): Likewise.
1576 (i386_dr_low_get_status): Likewise.
1577 (i386_dr_low): New global variable.
1578
e1d2394b
MS
15792014-06-20 Marcus Shawcroft <marcus.shawcroft@arm.com>
1580
1581 * configure.ac: Invoke. AC_CHECK_TOOL(AR, ar).
1582 * Makefile.in (AR, AR_FLAGS): Define.
1583 * configure: Regenerate.
1584
3a8ee006
GB
15852014-06-19 Gary Benson <gbenson@redhat.com>
1586
1587 * Makefile.in (i386-dregs.o): New rule.
1588 * configure.srv: Add i386-dregs.o to all targets using i386-low.o.
1589 * i386-low.c (target.h): Remove include.
1590 (TARGET_HAS_DR_LEN_8): Now in i386-dregs.c.
1591 (DR_CONTROL_SHIFT): Likewise.
1592 (DR_CONTROL_SIZE): Likewise.
1593 (DR_RW_EXECUTE): Likewise.
1594 (DR_RW_WRITE): Likewise.
1595 (DR_RW_READ): Likewise.
1596 (DR_RW_IORW): Likewise.
1597 (DR_LEN_1): Likewise.
1598 (DR_LEN_2): Likewise.
1599 (DR_LEN_4): Likewise.
1600 (DR_LEN_8): Likewise.
1601 (DR_LOCAL_ENABLE_SHIFT): Likewise.
1602 (DR_GLOBAL_ENABLE_SHIFT): Likewise.
1603 (DR_ENABLE_SIZE): Likewise.
1604 (DR_LOCAL_SLOWDOWN): Likewise.
1605 (DR_GLOBAL_SLOWDOWN): Likewise.
1606 (DR_CONTROL_RESERVED): Likewise.
1607 (I386_DR_CONTROL_MASK): Likewise.
1608 (I386_DR_VACANT): Likewise.
1609 (I386_DR_LOCAL_ENABLE): Likewise.
1610 (I386_DR_GLOBAL_ENABLE): Likewise.
1611 (I386_DR_DISABLE): Likewise.
1612 (I386_DR_SET_RW_LEN): Likewise.
1613 (I386_DR_GET_RW_LEN): Likewise.
1614 (I386_DR_WATCH_HIT): Likewise.
1615 (i386_wp_op_t): Likewise.
1616 (i386_show_dr): Likewise.
1617 (i386_length_and_rw_bits): Likewise.
1618 (i386_insert_aligned_watchpoint): Likewise.
1619 (i386_remove_aligned_watchpoint): Likewise.
1620 (i386_handle_nonaligned_watchpoint): Likewise.
1621 i386_update_inferior_debug_regs(): Likewise.
1622 (i386_dr_insert_watchpoint): Likewise.
1623 (i386_dr_remove_watchpoint): Likewise.
1624 (i386_dr_region_ok_for_watchpoint): Likewise.
1625 (i386_dr_stopped_data_address): Likewise.
1626 (i386_dr_stopped_by_watchpoint): Likewise.
1627
8f26655c
GB
16282014-06-19 Gary Benson <gbenson@redhat.com>
1629
1630 * i386-low.c (i386_dr_show): Renamed to
1631 i386_show_dr and made static. All uses updated.
1632 (i386_dr_length_and_rw_bits): Renamed to
1633 i386_length_and_rw_bits and made static.
1634 All uses updated.
1635 (i386_dr_insert_aligned_watchpoint): Renamed to
1636 i386_insert_aligned_watchpoint and made static.
1637 All uses updated.
1638 (i386_dr_remove_aligned_watchpoint): Renamed to
1639 i386_remove_aligned_watchpoint and made static.
1640 All uses updated.
1641 (i386_dr_update_inferior_debug_regs): Renamed to
1642 i386_update_inferior_debug_regs and made static.
1643 All uses updated.
1644
b9228891
GB
16452014-06-18 Gary Benson <gbenson@redhat.com>
1646
5171def3
GB
1647 * i386-low.h (i386_dr_low_can_set_addr): New macro.
1648 (i386_dr_low_can_set_control): Likewise.
1649 (i386_get_debug_register_length): Likewise.
1650 * i386-low.c (i386_dr_low_can_set_addr): Now in i386-low.h.
1651 (i386_dr_low_can_set_control): Likewise.
1652 (i386_get_debug_register_length): Likewise.
1653
16542014-06-17 Gary Benson <gbenson@redhat.com>
1655
b9228891
GB
1656 * i386-low.h (i386-dregs.h): New include.
1657 (DR_FIRSTADDR): Now in i386-dregs.h.
1658 (DR_LASTADDR): Likewise.
1659 (DR_NADDR): Likewise.
1660 (DR_STATUS): Likewise.
1661 (DR_CONTROL): Likewise.
1662 (i386_debug_reg_state): Likewise.
1663 (i386_dr_insert_watchpoint): Likewise.
1664 (i386_dr_remove_watchpoint): Likewise.
1665 (i386_dr_region_ok_for_watchpoint): Likewise.
1666 (i386_dr_stopped_data_address): Likewise.
1667 (i386_dr_stopped_by_watchpoint): Likewise.
1668 * i386-low.c (ALL_DEBUG_REGISTERS): Likewise.
1669
4be83cc2
GB
16702014-06-18 Gary Benson <gbenson@redhat.com>
1671
1672 * i386-low.h (i386_low_insert_watchpoint): Renamed to
1673 i386_dr_insert_watchpoint.
1674 (i386_low_remove_watchpoint): Renamed to
1675 i386_dr_remove_watchpoint.
1676 (i386_low_region_ok_for_watchpoint): Renamed to
1677 i386_dr_region_ok_for_watchpoint.
1678 (i386_low_stopped_data_address): Renamed to
1679 i386_dr_stopped_data_address.
1680 (i386_low_stopped_by_watchpoint): Renamed to
1681 i386_dr_stopped_by_watchpoint.
1682 * i386-low.c (i386_show_dr): Renamed to
1683 i386_dr_show and made nonstatic. All uses updated.
1684 (i386_length_and_rw_bits): Renamed to
1685 i386_dr_length_and_rw_bits and made nonstatic.
1686 All uses updated.
1687 (i386_insert_aligned_watchpoint): Renamed to
1688 i386_dr_insert_aligned_watchpoint and made nonstatic.
1689 All uses updated.
1690 (i386_remove_aligned_watchpoint): Renamed to
1691 i386_dr_remove_aligned_watchpoint and made nonstatic.
1692 All uses updated.
1693 (i386_update_inferior_debug_regs): Renamed to
1694 i386_dr_update_inferior_debug_regs and made nonstatic.
1695 All uses updated.
1696 (i386_low_insert_watchpoint): Renamed to
1697 i386_dr_insert_watchpoint. All uses updated.
1698 (i386_low_remove_watchpoint): Renamed to
1699 i386_dr_remove_watchpoint. All uses updated.
1700 (i386_low_region_ok_for_watchpoint): Renamed to
1701 i386_dr_region_ok_for_watchpoint. All uses updated.
1702 (i386_low_stopped_data_address): Renamed to
1703 i386_dr_stopped_data_address. All uses updated.
1704 (i386_low_stopped_by_watchpoint): Renamed to
1705 i386_dr_stopped_by_watchpoint. All uses updated.
1706
131aa0d4
GB
17072014-06-18 Gary Benson <gbenson@redhat.com>
1708
1709 * i386-low.c (i386_dr_low_can_set_addr): New macro.
1710 (i386_dr_low_can_set_control): Likewise.
1711 (i386_insert_aligned_watchpoint): New check.
1712
d9305f7f
GB
17132014-06-18 Gary Benson <gbenson@redhat.com>
1714
1715 * i386-low.c (i386_update_inferior_debug_regs) <inf_state>:
1716 Renamed to state.
1717
e927c9fc
GB
17182014-06-18 Gary Benson <gbenson@redhat.com>
1719
1720 * i386-low.c (i386_length_and_rw_bits): Use internal_error
1721 instead of fatal and error.
1722 (i386_handle_nonaligned_watchpoint): Likewise.
1723
1b6d4134
GB
17242014-06-18 Gary Benson <gbenson@redhat.com>
1725
1726 * i386-low.c (i386_get_debug_register_length): New macro.
1727 (TARGET_HAS_DR_LEN_8): Remove conditional. Use above macro.
1728 (i386_show_dr): Use debug_printf instead of fprintf. Use
1729 phex to format values.
1730
6e62758f
GB
17312014-06-18 Gary Benson <gbenson@redhat.com>
1732
1733 * i386-low.h: Comment changes.
1734 * i386-low.c: Likewise.
1735
fc6e2f03
GB
17362014-06-18 Gary Benson <gbenson@redhat.com>
1737
1738 * i386-low.c: Whitespace changes.
1739
f9d1eeed
TT
17402014-06-12 Tom Tromey <tromey@redhat.com>
1741
1742 * utils.c (freeargv): Remove.
1743
0b04e523
TT
17442014-06-12 Tom Tromey <tromey@redhat.com>
1745
1746 * debug.c (debug_printf): Remove HAVE_GETTIMEOFDAY checks.
1747 * server.c (monitor_show_help): Remove HAVE_GETTIMEOFDAY check.
1748 (parse_debug_format_options): Likewise.
1749 (gdbserver_usage): Likewise.
1750 * Makefile.in (LIBIBERTY_BUILDDIR, LIBIBERTY): New variables.
1751 (SUBDIRS, REQUIRED_SUBDIRS): Add libiberty.
1752 (gdbserver$(EXEEXT), gdbreplay$(EXEEXT)): Depend on and link
1753 against libiberty.
1754 ($(LIBGNU)): Depend on libiberty.
1755 (all-lib): Recurse into all subdirs.
1756 (install-only): Invoke "install" target in subdirs.
1757 (vasprintf.o, vsnprintf.o, safe-ctype.o, lbasename.o): Remove
1758 targets.
1759 * configure: Rebuild.
1760 * configure.ac: Add ACX_CONFIGURE_DIR for libiberty. Don't check
1761 for vasprintf, vsnprintf, or gettimeofday.
1762 * configure.srv: Don't add safe-ctype.o or lbasename.o to
1763 srv_tgtobj.
1764
270c9937
JB
17652014-06-05 Joel Brobecker <brobecker@adacore.com>
1766
1767 * development.sh: Delete.
1768 * Makefile.in (config.status): Adjust dependency on development.sh.
1769 * configure.ac: Adjust development.sh source call.
1770 * configure: Regenerate.
1771
0a261ed8
PA
17722014-06-02 Pedro Alves <palves@redhat.com>
1773
1774 * ax.c (gdb_free_agent_expr): New function.
1775 * ax.h (gdb_free_agent_expr): New declaration.
1776 * mem-break.c (delete_gdb_breakpoint_1): Also clear the commands
1777 list.
1778 (clear_breakpoint_conditions, clear_breakpoint_commands): Make
1779 static.
1780 (clear_breakpoint_conditions_and_commands): New function.
1781 * mem-break.h (clear_breakpoint_conditions): Delete declaration.
1782 (clear_breakpoint_conditions_and_commands): New declaration.
1783
e9dae05e
RR
17842014-05-23 Ramana Radhakrishnan <ramana.radhakrishnan@arm.com>
1785
1786 * linux-aarch64-low.c (asm/ptrace.h): Include.
1787
5876f503
JK
17882014-05-21 Jan Kratochvil <jan.kratochvil@redhat.com>
1789
1790 Fix TLS access for -static -pthread.
1791 * gdbserver/thread-db.c (struct thread_db): Add td_thr_tlsbase_p.
1792 (thread_db_get_tls_address): Call it if LOAD_MODULE is zero.
1793 (thread_db_load_search, try_thread_db_load_1): Initialize it.
1794
802e8e6d
PA
17952014-05-20 Pedro Alves <palves@redhat.com>
1796
1797 * linux-aarch64-low.c (aarch64_insert_point)
1798 (aarch64_remove_point): No longer check whether the type is
1799 supported here. Adjust to new interface.
1800 (the_low_target): Install aarch64_supports_z_point_type as
1801 supports_z_point_type method.
1802 * linux-arm-low.c (raw_bkpt_type_to_arm_hwbp_type): New function.
1803 (arm_linux_hw_point_initialize): Take an enum raw_bkpt_type
1804 instead of a Z packet char. Adjust.
1805 (arm_supports_z_point_type): New function.
1806 (arm_insert_point, arm_remove_point): Adjust to new interface.
1807 (the_low_target): Install arm_supports_z_point_type.
1808 * linux-crisv32-low.c (cris_supports_z_point_type): New function.
1809 (cris_insert_point, cris_remove_point): Adjust to new interface.
1810 Don't check whether the type is supported here.
1811 (the_low_target): Install cris_supports_z_point_type.
1812 * linux-low.c (linux_supports_z_point_type): New function.
1813 (linux_insert_point, linux_remove_point): Adjust to new interface.
1814 * linux-low.h (struct linux_target_ops) <insert_point,
1815 remove_point>: Take an enum raw_bkpt_type instead of a char. Add
1816 raw_breakpoint pointer parameter.
1817 <supports_z_point_type>: New method.
1818 * linux-mips-low.c (mips_supports_z_point_type): New function.
1819 (mips_insert_point, mips_remove_point): Adjust to new interface.
1820 Use mips_supports_z_point_type.
1821 (the_low_target): Install mips_supports_z_point_type.
1822 * linux-ppc-low.c (the_low_target): Install NULL as
1823 supports_z_point_type method.
1824 * linux-s390-low.c (the_low_target): Install NULL as
1825 supports_z_point_type method.
1826 * linux-sparc-low.c (the_low_target): Install NULL as
1827 supports_z_point_type method.
1828 * linux-x86-low.c (x86_supports_z_point_type): New function.
1829 (x86_insert_point): Adjust to new insert_point interface. Use
1830 insert_memory_breakpoint. Adjust to new
1831 i386_low_insert_watchpoint interface.
1832 (x86_remove_point): Adjust to remove_point interface. Use
1833 remove_memory_breakpoint. Adjust to new
1834 i386_low_remove_watchpoint interface.
1835 (the_low_target): Install x86_supports_z_point_type.
1836 * lynx-low.c (lynx_target_ops): Install NULL as
1837 supports_z_point_type callback.
1838 * nto-low.c (nto_supports_z_point_type): New.
1839 (nto_insert_point, nto_remove_point): Adjust to new interface.
1840 (nto_target_ops): Install nto_supports_z_point_type.
1841 * mem-break.c: Adjust intro comment.
1842 (struct raw_breakpoint) <raw_type, size>: New fields.
1843 <inserted>: Update comment.
1844 <shlib_disabled>: Delete field.
1845 (enum bkpt_type) <gdb_breakpoint>: Delete value.
1846 <gdb_breakpoint_Z0, gdb_breakpoint_Z1, gdb_breakpoint_Z2,
1847 gdb_breakpoint_Z3, gdb_breakpoint_Z4>: New values.
1848 (raw_bkpt_type_to_target_hw_bp_type): New function.
1849 (find_enabled_raw_code_breakpoint_at): New function.
1850 (find_raw_breakpoint_at): New type and size parameters. Use them.
1851 (insert_memory_breakpoint): New function, based off
1852 set_raw_breakpoint_at.
1853 (remove_memory_breakpoint): New function.
1854 (set_raw_breakpoint_at): Reimplement.
1855 (set_breakpoint): New, based on set_breakpoint_at.
1856 (set_breakpoint_at): Reimplement.
1857 (delete_raw_breakpoint): Go through the_target->remove_point
1858 instead of assuming memory breakpoints.
1859 (find_gdb_breakpoint_at): Delete.
1860 (Z_packet_to_bkpt_type, Z_packet_to_raw_bkpt_type): New functions.
1861 (find_gdb_breakpoint): New function.
1862 (set_gdb_breakpoint_at): Delete.
1863 (z_type_supported): New function.
1864 (set_gdb_breakpoint_1): New function, loosely based off
1865 set_gdb_breakpoint_at.
1866 (check_gdb_bp_preconditions, set_gdb_breakpoint): New functions.
1867 (delete_gdb_breakpoint_at): Delete.
1868 (delete_gdb_breakpoint_1): New function, loosely based off
1869 delete_gdb_breakpoint_at.
1870 (delete_gdb_breakpoint): New function.
1871 (clear_gdb_breakpoint_conditions): Rename to ...
1872 (clear_breakpoint_conditions): ... this. Don't handle a NULL
1873 breakpoint.
1874 (add_condition_to_breakpoint): Make static.
1875 (add_breakpoint_condition): Take a struct breakpoint pointer
1876 instead of an address. Adjust.
1877 (gdb_condition_true_at_breakpoint): Rename to ...
1878 (gdb_condition_true_at_breakpoint_z_type): ... this, and add
1879 z_type parameter.
1880 (gdb_condition_true_at_breakpoint): Reimplement.
1881 (add_breakpoint_commands): Take a struct breakpoint pointer
1882 instead of an address. Adjust.
1883 (gdb_no_commands_at_breakpoint): Rename to ...
1884 (gdb_no_commands_at_breakpoint_z_type): ... this. Add z_type
1885 parameter. Return true if no breakpoint was found. Change debug
1886 output.
1887 (gdb_no_commands_at_breakpoint): Reimplement.
1888 (run_breakpoint_commands): Rename to ...
1889 (run_breakpoint_commands_z_type): ... this. Add z_type parameter,
1890 and change return type to boolean.
1891 (run_breakpoint_commands): New function.
1892 (gdb_breakpoint_here): Also check for Z1 breakpoints.
1893 (uninsert_raw_breakpoint): Don't try to reinsert a disabled
1894 breakpoint. Go through the_target->remove_point instead of
1895 assuming memory breakpoint.
1896 (uninsert_breakpoints_at, uninsert_all_breakpoints): Uninsert
1897 software and hardware breakpoints.
1898 (reinsert_raw_breakpoint): Go through the_target->insert_point
1899 instead of assuming memory breakpoint.
1900 (reinsert_breakpoints_at, reinsert_all_breakpoints): Reinsert
1901 software and hardware breakpoints.
1902 (check_breakpoints, breakpoint_here, breakpoint_inserted_here):
1903 Check both software and hardware breakpoints.
1904 (validate_inserted_breakpoint): Assert the breakpoint is a
1905 software breakpoint. Set the inserted flag to -1 instead of
1906 setting shlib_disabled.
1907 (delete_disabled_breakpoints): Adjust.
1908 (validate_breakpoints): Only validate software breakpoints.
1909 Adjust to inserted flag change.
1910 (check_mem_read, check_mem_write): Skip breakpoint types other
1911 than software breakpoints. Adjust to inserted flag change.
1912 * mem-break.h (enum raw_bkpt_type): New enum.
1913 (raw_breakpoint, struct process_info): Forward declare.
1914 (Z_packet_to_target_hw_bp_type): Delete declaration.
1915 (raw_bkpt_type_to_target_hw_bp_type, Z_packet_to_raw_bkpt_type)
1916 (set_gdb_breakpoint, delete_gdb_breakpoint)
1917 (clear_breakpoint_conditions): New declarations.
1918 (set_gdb_breakpoint_at, clear_gdb_breakpoint_conditions): Delete.
1919 (breakpoint_inserted_here): Update comment.
1920 (add_breakpoint_condition, add_breakpoint_commands): Replace
1921 address parameter with a breakpoint pointer parameter.
1922 (gdb_breakpoint_here): Update comment.
1923 (delete_gdb_breakpoint_at): Delete.
1924 (insert_memory_breakpoint, remove_memory_breakpoint): Declare.
1925 * server.c (process_point_options): Take a struct breakpoint
1926 pointer instead of an address. Adjust.
1927 (process_serial_event) <Z/z packets>: Use set_gdb_breakpoint and
1928 delete_gdb_breakpoint.
1929 * spu-low.c (spu_target_ops): Install NULL as
1930 supports_z_point_type method.
1931 * target.h: Include mem-break.h.
1932 (struct target_ops) <prepare_to_access_memory>: Update comment.
1933 <supports_z_point_type>: New field.
1934 <insert_point, remove_point>: Take an enum raw_bkpt_type argument
1935 instead of a char. Also take a raw breakpoint pointer.
1936 * win32-arm-low.c (the_low_target): Install NULL as
1937 supports_z_point_type.
1938 * win32-i386-low.c (i386_supports_z_point_type): New function.
1939 (i386_insert_point, i386_remove_point): Adjust to new interface.
1940 (the_low_target): Install i386_supports_z_point_type.
1941 * win32-low.c (win32_supports_z_point_type): New function.
1942 (win32_insert_point, win32_remove_point): Adjust to new interface.
1943 (win32_target_ops): Install win32_supports_z_point_type.
1944 * win32-low.h (struct win32_target_ops):
1945 <supports_z_point_type>: New method.
1946 <insert_point, remove_point>: Take an enum raw_bkpt_type argument
1947 instead of a char. Also take a raw breakpoint pointer.
1948
932539e3
PA
19492014-05-20 Pedro Alves <palves@redhat.com>
1950
1951 * mem-break.h: Include break-common.h.
1952 (Z_PACKET_SW_BP, Z_PACKET_HW_BP, Z_PACKET_WRITE_WP)
1953 (Z_PACKET_READ_WP, Z_PACKET_ACCESS_WP): New defines.
1954 (Z_packet_to_target_hw_bp_type): New declaration.
1955 * mem-break.c (Z_packet_to_target_hw_bp_type): New function.
1956 * i386-low.c (Z_PACKET_HW_BP, Z_PACKET_WRITE_WP, Z_PACKET_READ_WP)
1957 (Z_PACKET_ACCESS_WP): Delete macros.
1958 (Z_packet_to_hw_type): Delete function.
1959 * i386-low.h: Don't include break-common.h here.
1960 (Z_packet_to_hw_type): Delete declaration.
1961 * linux-x86-low.c (x86_insert_point, x86_insert_point): Call
1962 Z_packet_to_target_hw_bp_type instead of Z_packet_to_hw_type.
1963 * win32-i386-low.c (i386_insert_point, i386_remove_point): Call
1964 Z_packet_to_target_hw_bp_type instead of Z_packet_to_hw_type.
1965 * linux-aarch64-low.c: Don't include break-common.h here.
1966 (Z_PACKET_SW_BP, Z_PACKET_HW_BP, Z_PACKET_WRITE_WP)
1967 (Z_PACKET_READ_WP, Z_PACKET_ACCESS_WP): Delete macros.
1968 (Z_packet_to_target_hw_bp_type): Delete function.
1969 * linux-mips-low.c (rsp_bp_type_to_target_hw_bp_type): Delete
1970 function.
1971 (mips_insert_point, mips_remove_point): Use
1972 Z_packet_to_target_hw_bp_type.
1973
4ff0d3d8
PA
19742014-05-20 Pedro Alves <palves@redhat.com>
1975
1976 * linux-aarch64-low.c: Include break-common.h.
1977 (enum target_point_type): Delete.
1978 (Z_packet_to_point_type): Rename to ...
1979 (Z_packet_to_target_hw_bp_type): ... this, and return a
1980 target_hw_bp_type instead.
1981 (aarch64_show_debug_reg_state): Take an enum target_hw_bp_type
1982 instead of an enum target_point_type.
1983 (aarch64_point_encode_ctrl_reg): Likewise. Compute type mask from
1984 breakpoint type.
1985 (aarch64_dr_state_insert_one_point)
1986 (aarch64_dr_state_remove_one_point, aarch64_handle_breakpoint)
1987 (aarch64_handle_aligned_watchpoint)
1988 (aarch64_handle_unaligned_watchpoint, aarch64_handle_watchpoint):
1989 Take an enum target_hw_bp_type instead of an enum
1990 target_point_type.
1991 (aarch64_supports_z_point_type): New function.
1992 (aarch64_insert_point, aarch64_remove_point): Use it. Adjust to
1993 use Z_packet_to_target_hw_bp_type.
1994
786dc519
JB
19952014-05-20 Joel Brobecker <brobecker@adacore.com>
1996
1997 * configure.ac: Only use -Werror by default when DEVELOPMENT
1998 is true.
1999 * configure: Regenerate.
2000
9e0aa64f
JK
20012014-05-19 Jan Kratochvil <jan.kratochvil@redhat.com>
2002
2003 Fix gdbserver qGetTLSAddr for x86_64 -m32.
2004 * linux-x86-low.c (X86_64_USER_REGS): New.
2005 (x86_fill_gregset): Call memset for BUF first in x86_64 -m32 case.
2006
2b577b92
YQ
20072014-04-28 Yao Qi <yao@codesourcery.com>
2008
2009 * Makefile.in (i386-avx512.c): Fix the typo of generated file
2010 name.
2011
94611da2
PA
20122014-04-25 Pedro Alves <palves@redhat.com>
2013
2014 PR server/16255
2015 * linux-low.c (linux_attach_fail_reason_string): New function.
2016 (linux_attach_lwp): Delete.
2017 (linux_attach_lwp_1): Rename to ...
2018 (linux_attach_lwp): ... this. Take a ptid instead of a pid as
2019 argument. Remove "initial" parameter. Return int instead of
2020 void. Don't error or warn here.
2021 (linux_attach): Adjust to call linux_attach_lwp. Call error on
2022 failure to attach to the tgid. Call warning when failing to
2023 attach to an lwp.
2024 * linux-low.h (linux_attach_lwp): Take a ptid instead of a pid as
2025 argument. Remove "initial" parameter. Return int instead of
2026 void. Don't error or warn here.
2027 (linux_attach_fail_reason_string): New declaration.
2028 * thread-db.c (attach_thread): Adjust to linux_attach_lwp's
2029 interface change. Use linux_attach_fail_reason_string.
2030
01f9f808
MS
20312014-04-24 Michael Sturm <michael.sturm@mintel.com>
2032 Walfred Tedeschi <walfred.tedeschi@intel.com>
2033
2034 * Makefile.in: Added rules to handle new files
2035 i386-avx512.c i386-avx512-linux.c amd64-avx512.c
2036 amd64-avx512-linux.c x32-avx512.c x32-avx512-linux.c.
2037 * configure.srv (srv_i386_regobj): Add i386-avx512.o.
2038 (srv_i386_linux_regobj): Add i386-avx512-linux.o.
2039 (srv_amd64_regobj): Add amd64-avx512.o and x32-avx512.o.
2040 (srv_amd64_linux_regobj): Add amd64-avx512-linux.o and
2041 x32-avx512-linux.o.
2042 (srv_i386_32bit_xmlfiles): Add i386/32bit-avx512.xml.
2043 (srv_i386_64bit_xmlfiles): Add i386/64bit-avx512.xml.
2044 (srv_amd64_xmlfiles): Add i386/amd64-avx512.xml and
2045 i386/x32-avx512.xml.
2046 (srv_i386_linux_xmlfiles): Add i386/i386-avx512-linux.xml.
2047 (srv_amd64_linux_xmlfiles): Add i386/amd64-avx512-linux.xml and
2048 i386/x32-avx512-linux.xml.
2049 * i387-fp.c (num_avx512_k_registers): New constant for number
2050 of K registers.
2051 (num_avx512_zmmh_low_registers): New constant for number of
2052 lower ZMM registers (0-15).
2053 (num_avx512_zmmh_high_registers): New constant for number of
2054 higher ZMM registers (16-31).
2055 (num_avx512_ymmh_registers): New contant for number of higher
2056 YMM registers (ymm16-31 added by avx521 on x86_64).
2057 (num_avx512_xmm_registers): New constant for number of higher
2058 XMM registers (xmm16-31 added by AVX512 on x86_64).
2059 (struct i387_xsave): Add space for AVX512 registers.
2060 (i387_cache_to_xsave): Change raw buffer size to 64 characters.
2061 Add code to handle AVX512 registers.
2062 (i387_xsave_to_cache): Add code to handle AVX512 registers.
2063 * linux-x86-low.c (init_registers_amd64_avx512_linux): New
2064 prototypei from generated file.
2065 (tdesc_amd64_avx512_linux): Likewise.
2066 (init_registers_x32_avx512_linux): Likewise.
2067 (tdesc_x32_avx512_linux): Likewise.
2068 (init_registers_i386_avx512_linux): Likewise.
2069 (tdesc_i386_avx512_linux): Likewise.
2070 (x86_64_regmap): Add AVX512 registers.
2071 (x86_linux_read_description): Add code to handle AVX512 XSTATE
2072 mask.
2073 (initialize_low_arch): Add code to initialize AVX512 registers.
2074
51aa91f9
PA
20752014-04-23 Pedro Alves <palves@redhat.com>
2076
2077 * mem-break.c (find_gdb_breakpoint_at): Make static.
2078 * mem-break.h (find_gdb_breakpoint_at): Delete declaration.
2079
a4165e94
PA
20802014-04-23 Pedro Alves <palves@redhat.com>
2081
2082 * i386-low.c: Don't include break-common.h here.
2083 (i386_low_insert_watchpoint, i386_low_remove_watchpoint): Change
2084 prototype to take target_hw_bp_type as argument instead of a Z
2085 packet char.
2086 * i386-low.h: Include break-common.h here.
2087 (Z_packet_to_hw_type): Declare.
2088 (i386_low_insert_watchpoint, i386_low_remove_watchpoint): Change
2089 prototypes.
2090 * linux-x86-low.c (x86_insert_point): Convert the packet number to
2091 a target_hw_bp_type before calling i386_low_insert_watchpoint.
2092 (x86_remove_point): Convert the packet number to a
2093 target_hw_bp_type before calling i386_low_remove_watchpoint.
2094 * win32-i386-low.c (i386_insert_point): Convert the packet number
2095 to a target_hw_bp_type before calling i386_low_insert_watchpoint.
2096 (i386_remove_point): Convert the packet number to a
2097 target_hw_bp_type before calling i386_low_remove_watchpoint.
2098
b8acf843
PA
20992014-04-23 Pedro Alves <palves@redhat.com>
2100
2101 * utils.h (perror_with_name): Add ATTRIBUTE_NORETURN.
2102
d708bcd1
PA
21032014-04-10 Pedro Alves <palves@redhat.com>
2104
2105 * mem-break.c (add_breakpoint_condition, add_breakpoint_commands):
2106 Check if the condition or command is NULL before checking if the
2107 breakpoint is known. On success, return true.
2108 * mem-break.h (add_breakpoint_condition): Document return.
2109 (add_breakpoint_commands): Add describing comment.
2110 * server.c (skip_to_semicolon): New function.
2111 (process_point_options): Use it.
2112
2eec7d5b
PA
21132014-04-09 Pedro Alves <palves@redhat.com>
2114
2115 * linux-low.c (linux_read_loadmap): Pass current_inferior directly
2116 to lwpid_of.
2117
fa96cb38
PA
21182014-02-27 Pedro Alves <palves@redhat.com>
2119
2120 PR 12702
2121 * inferiors.h (A_I_NEXT, ALL_INFERIORS_TYPE, ALL_PROCESSES): New
2122 macros.
2123 * linux-low.c (delete_lwp, handle_extended_wait): Add debug
2124 output.
2125 (last_thread_of_process_p): Take a PID argument instead of a
2126 thread pointer.
2127 (linux_wait_for_lwp): Delete.
2128 (num_lwps, check_zombie_leaders, not_stopped_callback): New
2129 functions.
2130 (linux_low_filter_event): New function, party factored out from
2131 linux_wait_for_event.
2132 (linux_wait_for_event): Rename to ...
2133 (linux_wait_for_event_filtered): ... this. Add new filter ptid
2134 argument. Partly rewrite. Always use waitpid(-1, WNOHANG) and
2135 sigsuspend. Check for zombie leaders.
2136 (linux_wait_for_event): Reimplement as wrapper around
2137 linux_wait_for_event_filtered.
2138 (linux_wait_1): Handle TARGET_WAITKIND_NO_RESUMED. Assume that if
2139 a normal or signal exit is seen, it's the whole process exiting.
2140 (wait_for_sigstop): No longer a for_each_inferior callback.
2141 Rewrite on top of linux_wait_for_event_filtered.
2142 (stop_all_lwps): Call wait_for_sigstop directly.
2143 * server.c (resume, handle_target_event): Handle
2144 TARGET_WAITKIND_NO_RESUMED.
2145
d763de10
JB
21462014-02-26 Joel Brobecker <brobecker@adacore.com>
2147
2148 * win32-low.c (psapi_get_dll_name,
2149 * win32_CreateToolhelp32Snapshot): Delete.
2150 (win32_CreateToolhelp32Snapshot, win32_Module32First)
2151 (win32_Module32Next, load_toolhelp, toolhelp_get_dll_name):
2152 Delete.
2153 (handle_load_dll): Add function description.
2154 Remove code using psapi_get_dll_name and toolhelp_get_dll_name.
2155
850a0f76
JB
21562014-02-26 Joel Brobecker <brobecker@adacore.com>
2157
2158 * win32-low.c (win32_add_one_solib): Add 0x1000 to load_addr.
2159 Add comment.
2160 (win32_add_all_dlls): Remove 0x1000 offset applied to DLL
2161 base address when calling win32_add_one_solib.
2162 (handle_load_dll): Delete local variable load_addr.
2163 Remove 0x1000 offset applied to DLL base address when calling
2164 win32_add_one_solib.
2165 (handle_unload_dll): Add comment.
2166
f25b3fc3
JB
21672014-02-26 Joel Brobecker <brobecker@adacore.com>
2168
2169 * win32-low.c (win32_add_all_dlls): Renames
2170 win32_ensure_ntdll_loaded. Rewrite function documentation.
2171 Adjust implementation to always load all DLLs.
2172 Add 0x1000 offset to DLL base address when calling
2173 win32_add_one_solib.
2174 (child_initialization_done): New static global.
2175 (do_initial_child_stuff): Set child_initialization_done to
2176 zero during child initialization, and 1 after. Replace call
2177 to win32_ensure_ntdll_loaded by call to win32_add_all_dlls.
2178 Add comment.
2179 (match_dll_by_basename, dll_is_loaded_by_basename): Delete.
2180 (handle_unload_dll): Add function documentation.
2181 (get_child_debug_event): Ignore load and unload DLL events
2182 during child initialization.
2183
d86d4aaf
DE
21842014-02-20 Doug Evans <dje@google.com>
2185
3bc32da3 2186 Remove global all_lwps.
d86d4aaf
DE
2187 * inferiors.h (ptid_of): Move here from linux-low.h.
2188 (pid_of, lwpid_of): Ditto.
2189 * linux-aarch64-low.c (debug_reg_change_callback): Update, "entry"
2190 parameter is a struct thread_info * now.
2191 (aarch64_notify_debug_reg_change): Fetch pid from current_inferior
2192 directly. Pass &all_threads to find_inferior instead of &all_lwps.
2193 (aarch64_stopped_data_address): Fetch lwpid from current_inferior
2194 directly.
2195 (aarch64_linux_prepare_to_resume): Fetch ptid from thread.
2196 (aarch64_arch_setup): Fetch lwpid from current_inferior directly.
2197 * linux-arm-low.c (update_registers_callback): Update, "entry"
2198 parameter is a struct thread_info * now.
2199 Fetch lwpid from current_inferior directly.
2200 (arm_insert_point): Pass &all_threads to find_inferior instead of
2201 &all_lwps.
2202 (arm_remove_point): Ditto.
2203 (arm_stopped_by_watchpoint): Fetch lwp from current_inferior.
2204 (arm_prepare_to_resume): Fetch pid from thread.
2205 (arm_read_description): Fetch lwpid from current_inferior directly.
2206 * linux-low.c (all_lwps): Delete.
2207 (delete_lwp): Delete call to remove_inferior.
2208 (handle_extended_wait): Fetch lwpid from thread.
2209 (add_lwp): Don't set lwp->entry.id. Remove call to
2210 add_inferior_to_list.
2211 (linux_attach_lwp_1): Fetch pid from current_inferior directly.
2212 (linux_kill_one_lwp): Fetch ptid,lwpid from thread.
2213 (kill_one_lwp_callback): Ditto.
2214 (linux_kill): Don't dereference NULL pointer.
2215 Fetch ptid,lwpid from thread.
2216 (get_detach_signal): Fetch ptid from thread.
2217 (linux_detach_one_lwp): Fetch ptid,lwpid from thread.
2218 Simplify call to regcache_invalidate_thread.
2219 (delete_lwp_callback): Update, "entry" parameter is a
2220 struct thread_info * now. Fetch pid from thread.
2221 (linux_mourn): Pass &all_threads to find_inferior instead of &all_lwps.
2222 (status_pending_p_callback): Update, "entry" parameter is a
2223 struct thread_info * now. Fetch ptid from thread.
2224 (find_lwp_pid): Update, "entry" parameter is a
2225 struct thread_info * now.
2226 (linux_wait_for_lwp): Fetch pid from thread.
2227 (linux_fast_tracepoint_collecting): Fetch lwpid from thread.
2228 (maybe_move_out_of_jump_pad): Fetch lwpid from current_inferior.
2229 (enqueue_one_deferred_signal): Fetch lwpid from thread.
2230 (dequeue_one_deferred_signal): Ditto.
2231 (cancel_breakpoint): Fetch ptid from current_inferior.
2232 (linux_wait_for_event): Pass &all_threads to find_inferior,
2233 not &all_lwps. Fetch ptid, lwpid from thread.
2234 (count_events_callback): Update, "entry" parameter is a
2235 struct thread_info * now.
2236 (select_singlestep_lwp_callback): Ditto.
2237 (select_event_lwp_callback): Ditto.
2238 (cancel_breakpoints_callback): Ditto.
2239 (linux_cancel_breakpoints): Pass &all_threads to find_inferior,
2240 not &all_lwps.
2241 (select_event_lwp): Ditto. Fetch ptid from event_thread.
2242 (unsuspend_one_lwp): Update, "entry" parameter is a
2243 struct thread_info * now.
2244 (unsuspend_all_lwps): Pass &all_threads to find_inferior,
2245 not &all_lwps.
2246 (linux_stabilize_threads): Ditto. And for for_each_inferior.
2247 Fetch lwpid from thread, not lwp.
2248 (linux_wait_1): Fetch ptid, lwpid from current_inferior.
2249 Pass &all_threads to find_inferior, not &all_lwps.
2250 (send_sigstop): Fetch lwpid from thread, not lwp.
2251 (send_sigstop_callback): Update, "entry" parameter is a
2252 struct thread_info * now.
2253 (suspend_and_send_sigstop_callback): Ditto.
2254 (wait_for_sigstop): Ditto. Fetch ptid, lwpid from thread, lwp.
2255 (stuck_in_jump_pad_callback): Update, "entry" parameter is a
2256 struct thread_info * now.
2257 (move_out_of_jump_pad_callback): Ditto. Fetch ptid, lwpid
2258 from thread, lwp.
2259 (lwp_running): Update, "entry" parameter is a
2260 struct thread_info * now.
2261 (stop_all_lwps): Fetch ptid from thread.
2262 Pass &all_threads to find_inferior, for_each_inferior, not &all_lwps.
2263 (linux_resume_one_lwp): Fetch lwpid from thread.
2264 (linux_set_resume_request): Update, "entry" parameter is a
2265 struct thread_info * now. Fetch pid, lwpid from thread.
2266 (resume_status_pending_p): Update, "entry" parameter is a
2267 struct thread_info * now.
2268 (need_step_over_p): Ditto. Fetch lwpid from thread.
2269 (start_step_over): Fetch lwpid from thread.
2270 (linux_resume_one_thread): Update, "entry" parameter is a
2271 struct thread_info * now. Fetch lwpid from thread.
2272 (linux_resume): Pass &all_threads to find_inferior, not &all_lwps.
2273 (proceed_one_lwp): Update, "entry" parameter is a
2274 struct thread_info * now. Fetch lwpid from thread.
2275 (unsuspend_and_proceed_one_lwp): Update, "entry" parameter is a
2276 struct thread_info * now.
2277 (proceed_all_lwps): Pass &all_threads to find_inferior, not &all_lwps.
2278 (unstop_all_lwps): Ditto. Fetch lwpid from thread.
2279 (regsets_fetch_inferior_registers): Fetch lwpid from current_inferior
2280 directly.
2281 (regsets_store_inferior_registers): Ditto.
2282 (fetch_register, store_register): Ditto.
2283 (linux_read_memory, linux_write_memory): Ditto.
2284 (linux_request_interrupt): Ditto.
2285 (linux_read_auxv): Ditto.
2286 (linux_xfer_siginfo): Ditto.
2287 (linux_qxfer_spu): Ditto.
2288 (linux_qxfer_libraries_svr4): Ditto.
2289 * linux-low.h (ptid_of, pid_of, lwpid_of): Delete,
2290 moved to inferiors.h.
2291 (get_lwp): Delete.
2292 (get_thread_lwp): Update.
2293 (struct lwp_info): Delete member "entry". Simplify comment for
2294 member "thread".
2295 (all_lwps): Delete.
2296 * linux-mips-low.c (mips_read_description): Fetch lwpid from
2297 current_inferior directly.
2298 (update_watch_registers_callback): Update, "entry" parameter is a
2299 struct thread_info * now. Fetch pid from thread.
2300 (mips_linux_prepare_to_resume): Fetch ptid from thread.
2301 (mips_insert_point): Fetch lwpid from current_inferior.
2302 Pass &all_threads to find_inferior, not &all_lwps.
2303 (mips_remove_point): Pass &all_threads to find_inferior, not &all_lwps.
2304 (mips_stopped_by_watchpoint): Fetch lwpid from current_inferior
2305 directly.
2306 (mips_stopped_data_address): Ditto.
2307 * linux-s390-low.c (s390_arch_setup): Fetch pid from current_inferior
2308 directly.
2309 * linux-tile-low.c (tile_arch_setup): Ditto.
2310 * linux-x86-low.c (x86_get_thread_area): Fetch lwpid from thread.
2311 (update_debug_registers_callback): Update, "entry" parameter is a
2312 struct thread_info * now. Fetch pid from thread.
2313 (i386_dr_low_set_addr): Fetch pid from current_inferior directly.
2314 Pass &all_threads to find_inferior, not &all_lwps.
2315 (i386_dr_low_get_addr): Fetch ptid from current_inferior directly.
2316 (i386_dr_low_set_control): Fetch pid from current_inferior directly.
2317 Pass &all_threads to find_inferior, not &all_lwps.
2318 (i386_dr_low_get_control): Fetch ptid from current_inferior directly.
2319 (i386_dr_low_get_status): Ditto.
2320 (x86_linux_prepare_to_resume): Fetch ptid from thread.
2321 (x86_siginfo_fixup): Fetch lwpid from current_inferior directly.
2322 (x86_linux_read_description): Ditto.
2323 * proc-service.c (ps_getpid): Fetch pid from current_inferior directly.
2324
3b8361aa
DE
23252014-02-20 Doug Evans <dje@google.com>
2326
2327 * inferiors.c (get_first_inferior): Fix buglet.
2328
f7667f0d
DE
23292014-02-19 Doug Evans <dje@google.com>
2330
2331 * gdbthread.h (add_thread): Change result type to struct thread_info *.
2332 * inferiors.c (add_thread): Change result type to struct thread_info *.
2333 All callers updated.
2334 (add_lwp): Call add_thread here instead of in callers.
2335 All callers updated.
2336 * linux-low.h (get_lwp_thread): Rewrite.
2337 (struct lwp_info): New member "thread".
2338
b3312d80
DE
23392014-02-19 Doug Evans <dje@google.com>
2340
2341 * linux-low.c (add_lwp): Change result to struct lwp_info *.
2342 All callers updated.
2343
ecc6f45c
DE
23442014-02-19 Doug Evans <dje@google.com>
2345
2346 * inferiors.c (add_thread): Fix whitespace.
2347
649ebbca
DE
23482014-02-19 Doug Evans <dje@google.com>
2349
2350 * dll.c (clear_dlls): Replace accessing list implemention details
2351 with API function.
2352 * gdbthread.h (get_first_thread): Declare.
2353 * inferiors.c (for_each_inferior_with_data): New function.
2354 (get_first_thread): New function.
2355 (find_thread_ptid): Simplify.
2356 (get_first_inferior): New function.
2357 (clear_list): Delete.
2358 (one_inferior_p): New function.
2359 (clear_inferior_list): New function.
2360 (clear_inferiors): Update.
2361 * inferiors.h (for_each_inferior_with_data): Declare.
2362 (clear_inferior_list): Declare.
2363 (one_inferior_p): Declare.
2364 (get_first_inferior): Declare.
2365 * linux-low.c (linux_wait_for_event): Replace accessing list
2366 implemention details with API function.
2367 * server.c (target_running): Ditto.
2368 (accumulate_file_name_length): New function.
2369 (emit_dll_description): New function.
2370 (handle_qxfer_libraries): Replace accessing list implemention
2371 details with API function.
2372 (handle_qxfer_threads_worker): New function.
2373 (handle_qxfer_threads_proper): Replace accessing list implemention
2374 details with API function.
2375 (handle_query): Ditto.
2376 (visit_actioned_threads_callback_ftype): New typedef.
2377 (visit_actioned_threads_data): New struct.
2378 (visit_actioned_threads): Rewrite to be find_inferior callback.
2379 (resume): Call find_inferior.
2380 (handle_status): Replace accessing list implemention
2381 details with API function.
2382 (process_serial_event): Replace accessing list implemention details
2383 with API function.
2384 * target.c (set_desired_inferior): Replace accessing list implemention
2385 details with API function.
2386 * tracepoint.c (same_process_p): New function.
2387 (gdb_agent_about_to_close): Replace accessing list implemention
2388 details with API function.
2389 * win32-low.c (child_delete_thread): Replace accessing list
2390 implemention details with API function.
2391 (match_dll_by_basename): New function.
2392 (dll_is_loaded_by_basename): New function.
2393 (win32_ensure_ntdll_loaded): Replace accessing list implemention
2394 details call to dll_is_loaded_by_basename.
2395
80894984
DE
23962014-02-19 Doug Evans <dje@google.com>
2397
2398 * dll.h (struct dll_info): Add comment.
2399 * gdbthread.h (struct thread_info): Add comment.
2400 (current_ptid): Simplify.
2401 * inferiors.c (add_process): Update.
2402 (remove_process): Update.
2403 * inferiors.h (struct process_info): Rename member "head" to "entry".
2404 * linux-low.c (delete_lwp): Update.
2405 (add_lwp): Update.
2406 (last_thread_of_process_p): Update.
2407 (kill_one_lwp_callback, linux_kill): Update.
2408 (status_pending_p_callback): Update.
2409 (wait_for_sigstop): Update. Simplify read of ptid.
2410 (start_step_over): Update.
2411 * linux-low.h (ptid_of, pid_of, lwpid_of): Update.
2412 (get_lwp_thread): Update.
2413 (struct lwp_info): Rename member "head" to "entry".
2414 * regcache.h (inferior_list_entry): Delete.
2415 * server.c (kill_inferior_callback): Update.
2416 (detach_or_kill_inferior_callback): Update.
2417 (print_started_pid): Update.
2418 (print_attached_pid): Update.
2419 (process_serial_event): Simplify read of ptid.
2420 * thread-db.c (thread_db_create_event): Update.
2421 (thread_db_get_tls_address): Update.
2422 * win32-low.c (current_inferior_ptid): Simplify.
2423
46917d26
TT
24242014-02-19 Tom Tromey <tromey@redhat.com>
2425
2426 * target.h (struct target_ops) <supports_btrace>: Add target_ops
2427 argument.
2428 (target_supports_btrace): Update.
2429
0759a81e
YQ
24302014-02-14 Yao Qi <yao@codesourcery.com>
2431
2432 * Makefile.in (IPA_OBJS): Append rsp-low-ipa.o.
2433 (rsp-low-ipa.o): New target.
2434
a7191e8b
TT
24352014-02-12 Tom Tromey <tromey@redhat.com>
2436
2437 * ax.c (gdb_parse_agent_expr): Use hex2bin, not
2438 convert_ascii_to_int.
2439 * regcache.c (registers_to_string): Likewise.
2440 * remote-utils.c (decode_M_packet): Likewise.
2441 * server.c (process_serial_event): Likewise.
2442
ff0e980e
TT
24432014-02-12 Tom Tromey <tromey@redhat.com>
2444
2445 * server.c (handle_query, handle_v_run): Use hex2bin, not
2446 unhexify.
2447 * tracepoint.c (cmd_qtdpsrc, cmd_qtdv, cmd_qtnotes): Likewise.
2448
e9371aff
TT
24492014-02-12 Tom Tromey <tromey@redhat.com>
2450
2451 * ax.c (gdb_unparse_agent_expr): Use bin2hex, not
2452 convert_int_to_ascii.
2453 * regcache.c (registers_to_string, collect_register_as_string):
2454 Likewise.
2455 * remote-utils.c (look_up_one_symbol, relocate_instruction):
2456 Likewise.
2457 * server.c (process_serial_event): Likewise.
2458 * tracepoint.c (cmd_qtstatus, response_source, response_tsv)
2459 (cmd_qtbuffer, cstr_to_hexstr): Likewise.
2460
971dc0b8
TT
24612014-02-12 Tom Tromey <tromey@redhat.com>
2462
2463 * remote-utils.c (look_up_one_symbol, monitor_output): Use
2464 bin2hex, not hexify.
2465 * tracepoint.c (cmd_qtstatus): Likewise.
2466
0a822afb
TT
24672014-02-12 Tom Tromey <tromey@redhat.com>
2468
2469 * remote-utils.c (monitor_output): Pass explicit length to
2470 hexify.
2471
9c3d6531
TT
24722014-02-12 Tom Tromey <tromey@redhat.com>
2473
2474 * tracepoint.c: Include rsp-low.h.
2475 * server.c: Include rsp-low.h.
2476 * remote-utils.h (convert_ascii_to_int, convert_int_to_ascii)
2477 (unhexify, hexify, remote_escape_output, unpack_varlen_hex): Don't
2478 declare.
2479 * remote-utils.c: Include rsp-low.h.
2480 (fromhex, hexchars, ishex, unhexify, tohex, hexify)
2481 (remote_escape_output, remote_unescape_input, unpack_varlen_hex)
2482 (convert_int_to_ascii, convert_ascii_to_int): Move to
2483 common/rsp-low.c.
2484 * regcache.c: Include rsp-low.h.
2485 * ax.c: Include rsp-low.h.
2486 * Makefile.in (SFILES): Add common/rsp-low.c.
2487 (OBS): Add rsp-low.o.
2488 (rsp-low.o): New target.
2489
01fd3ea5
TT
24902014-02-12 Tom Tromey <tromey@redhat.com>
2491
2492 * utils.h (pulongest, plongest, phex_nz): Don't declare.
2493 Include print-utils.h.
2494 * utils.c (NUMCELLS, CELLSIZE, get_cell, decimal2str, pulongest)
2495 (plongest, thirty_two, phex_nz): Remove.
2496 * Makefile.in (SFILES): Add common/print-utils.c.
2497 (OBS): Add print-utils.o.
2498 (print-utils-ipa.o): New target.
2499 (print-utils.o): New target.
2500 (IPA_OBJS): Add print-utils-ipa.o.
2501
e99dc820
TT
25022014-02-06 Tom Tromey <tromey@redhat.com>
2503
2504 * Makefile.in (SFILES): Fix indentation.
2505
ee1e2d4f
DE
25062014-02-05 Doug Evans <dje@google.com>
2507
2508 * linux-low.c (linux_wait_for_event): Improve comment.
2509 (linux_wait_1): Keep current_inferior in sync with event_child.
2510
f5a02773
DE
25112014-01-22 Doug Evans <dje@google.com>
2512
2513 * gdbthread.h (gdb_id_to_thread): Delete, unused.
2514
87ce2a04
DE
25152014-01-22 Doug Evans <dje@google.com>
2516
2517 * configure.ac (AC_CHECK_FUNCS): Add test for gettimeofday.
2518 * configure: Regenerate.
2519 * config.in: Regenerate.
2520 * Makefile.in (SFILES): Add debug.c.
2521 (OBS): Add debug.o.
2522 * debug.c: New file.
2523 * debug.h: New file.
2524 * linux-aarch64-low.c (*): Update all debugging printfs to use
2525 debug_printf instead of fprintf.
2526 * linux-arm-low.c (*): Ditto.
2527 * linux-cris-low.c (*): Ditto.
2528 * linux-crisv32-low.c (*): Ditto.
2529 * linux-m32r-low.c (*): Ditto.
2530 * linux-sparc-low.c (*): Ditto.
2531 * linux-x86.c (*): Ditto.
2532 * linux-low.c (*): Ditto.
2533 (linux_wait_1): Add calls to debug_enter, debug_exit.
2534 (linux_wait): Remove redundant debugging printf.
2535 (stop_all_lwps): Add calls to debug_enter, debug_exit.
2536 (linux_resume, unstop_all_lwps): Ditto.
2537 * mem-break.c (*): Update all debugging printfs to use
2538 debug_printf instead of fprintf.
2539 * remote-utils.c (*): Ditto.
2540 * thread-db.c (*): Ditto.
2541 * server.c #include <ctype.h>, "gdb_vecs.h".
2542 (debug_threads): Moved to debug.c.
2543 (*): Update all debugging printfs to use debug_printf instead of
2544 fprintf.
2545 (start_inferior): Replace call to fflush with call to debug_flush.
2546 (monitor_show_help): Mention set debug-format.
2547 (parse_debug_format_options): New function.
2548 (handle_monitor_command): Handle "monitor set debug-format".
2549 (gdbserver_usage): Mention --debug-format.
2550 (main): Parse --debug-format.
2551 * server.h (debug_threads): Declaration moved to debug.h.
2552 #include "debug.h".
2553 * tracepoint.c (trace_debug_1) [!IN_PROCESS_AGENT]: Add version of
2554 trace_debug_1 that uses debug_printf.
2555 (tracepoint_look_up_symbols): Update all debugging printfs to use
2556 debug_printf instead of fprintf.
2557
e671835b
BS
25582014-01-20 Baruch Siach <baruch@tkos.co.il>
2559
2560 * linux-xtensa-low.c: Include asm/ptrace.h instead of
2561 sys/ptrace.h.
2562
b5737fa9
PA
25632014-01-17 Pedro Alves <palves@redhat.com>
2564
ea38d2a9 2565 PR build/16445
c7faa97a
PA
2566 * linux-x86-low.c: Don't include elf/common.h if ELFMAG0 is
2567 defined after including gdb_proc_service.h.
b5737fa9 2568
40ed484e
DE
25692014-01-16 Doug Evans <dje@google.com>
2570
2571 * dll.c (UNSPECIFIED_CORE_ADDR): New macro.
2572 (match_dll): Use it.
2573
969c39fb
MM
25742014-01-16 Markus Metzger <markus.t.metzger@intel.com>
2575
2576 * target.h (target_ops) <read_btrace>: Change parameters and
2577 return type to allow error reporting.
2578 * server.c (handle_qxfer_btrace): Support delta reads. Pass
2579 trace reading errors on.
2580 * linux-low.c (linux_low_read_btrace): Pass trace reading
2581 errors on.
2582 (linux_low_disable_btrace): New.
2583
ab7f45ba
DE
25842014-01-15 Doug Evans <dje@google.com>
2585
2586 * inferiors.c (thread_id_to_gdb_id): Delete.
2587 * inferiors.h (thread_id_to_gdb_id): Delete.
2588
66af0f44
EZ
25892014-01-13 Eli Zaretskii <eliz@gnu.org>
2590
2591 * Makefile.in (INCLUDE_CFLAGS): Remove trailing slash from
2592 "-I$(srcdir)/../". Fixes MinGW compilation errors with old GCC
2593 versions.
2594
9939e131
PA
25952014-01-08 Pedro Alves <palves@redhat.com>
2596
2597 * server.c (handle_status): Don't discard previous queued stop
2598 replies or thread's pending status here.
2599 (main) <disconnection>: Do it here instead.
2600
b7ea362b
PA
26012014-01-08 Pedro Alves <palves@redhat.com>
2602
2603 * gdbthread.h (struct thread_info) <status_pending_p>: New field.
2604 * server.c (visit_actioned_threads, handle_pending_status): New
2605 function.
2606 (handle_v_cont): Factor out parts to ...
2607 (resume): ... this new function. If in all-stop, and a thread
2608 being resumed has a pending status, report it without actually
2609 resuming.
2610 (myresume): Adjust to use the new 'resume' function.
2611 (clear_pending_status_callback, set_pending_status_callback)
2612 (find_status_pending_thread_callback): New functions.
2613 (handle_status): Handle the case of multiple threads having
2614 interesting statuses to report. Report threads' real last signal
2615 instead of always reporting GDB_SIGNAL_TRAP. Look for a thread
2616 with an interesting thread to report the status for, instead of
2617 always reporting the status of the first thread.
2618
28498c42
JB
26192014-01-01 Joel Brobecker <brobecker@adacore.com>
2620
2621 * gdbserver.c (gdbserver_version): Set copyright year to 2014.
2622 * gdbreplay.c (gdbreplay_version): Likewise.
2623
f45c82da
YZ
26242013-12-18 Yufeng Zhang <yufeng.zhang@arm.com>
2625
2626 * linux-aarch64-low.c (aarch64_linux_set_debug_regs): Set
2627 iov.iov_len with the real length in use.
2628
379a5e2d
JB
26292013-12-13 Joel Brobecker <brobecker@adacore.com>
2630
2631 * Makefile.in (safe-ctype.o, lbasename.o): New rules.
2632 * configure.srv: Add safe-ctype.o and lbasename.o to srv_tgtobj
2633 for all targets that use win32-low.c.
2634 * win32-low.c (win32_ensure_ntdll_loaded): New function.
2635 (do_initial_child_stuff): Add call to win32_ensure_ntdll_loaded.
2636
4210d83e
PA
26372013-12-13 Pedro Alves <palves@redhat.com>
2638
2639 * target.c (mywait): Set OURSTATUS->KIND to TARGET_WAITKIND_STOPPED
2640 if equal to TARGET_WAITKIND_LOADED.
2641 * win32-low.c (cached_status): New static global.
2642 (win32_wait): Add declaration.
2643 (do_initial_child_stuff): Flush all initial pending debug events
2644 up to the initial breakpoint.
2645 (win32_wait): If CACHED_STATUS was set, return that instead
2646 of doing a real wait. Remove the code resuming the execution
2647 of the inferior after receiving a TARGET_WAITKIND_LOADED event
2648 during the initial phase. Also remove the code changing
2649 OURSTATUS->KIND from TARGET_WAITKIND_LOADED to
2650 TARGET_WAITKIND_STOPPED.
2651
e7f0d979
YQ
26522013-12-11 Yao Qi <yao@codesourcery.com>
2653
2654 * notif.c (handle_notif_ack): Return 0 if no notification
2655 matches.
2656
ebcf782c
DE
26572013-11-20 Doug Evans <dje@google.com>
2658
2659 * linux-low.c (linux_set_resume_request): Fix comment.
2660
20ad9378
DE
26612013-11-20 Doug Evans <dje@google.com>
2662
2663 * linux-low.c (resume_status_pending_p): Tweak comment.
2664
a196ebeb
WT
26652013-11-20 Walfred Tedeschi <walfred.tedeschi@intel.com>
2666
2667 * Makefile.in: Add i386-mpx.c, i386-mpx-linux.c, amd64-mpx.c,
2668 amd64-mpx-linux.c, x32-mpx.c and x32-mpx-linux.c generation.
2669 * configure.srv (srv_i386_regobj): Add i386-mpx.o.
2670 (srv_i386_linux_regobj): Add i386-mpx-linux.o.
2671 (srv_amd64_regobj): Add amd64-mpx.o.
2672 (srv_amd64_linux_regobj): Add amd64-mpx-linux.o.
2673 (srv_i386_32bit_xmlfiles): Add i386/32bit-mpx.xml.
2674 (srv_i386_64bit_xmlfiles): Add i386/64bit-mpx.xml.
2675 * i387-fp.c (num_pl_bnd_register) Added constant.
2676 (num_pl_bnd_cfg_registers) Added constant.
2677 (struct i387_xsave) Added reserved area and MPX fields.
2678 (i387_cache_to_xsave, i387_xsave_to_cache) Add MPX.
2679 * linux-x86-low.c (init_registers_i386_mpx_linux): Declare new
2680 function.
2681 (tdesc_i386_mpx_linux): Add MPX amd64 target.
2682 (init_registers_amd64_mpx_linux): Declare new function.
2683 (tdesc_amd64_mpx_linux): Add MPX amd64 target.
2684 (x86_64_regmap): Add MPX registers.
2685 (x86_linux_read_description): Add MPX case.
2686 (initialize_low_arch): Initialize MPX targets.
2687
0080a2f6
TT
26882013-11-18 Tom Tromey <tromey@redhat.com>
2689
2690 * configure: Rebuild.
2691 * configure.ac: Don't check for stdlib.h.
2692 * gdbreplay.c: Unconditionally include stdlib.h.
2693
2978b111
TT
26942013-11-18 Tom Tromey <tromey@redhat.com>
2695
2696 * config.in: Rebuild.
2697 * configure: Rebuild.
2698 * configure.ac: Don't use AC_HEADER_DIRENT.
2699
a3d08894
TT
27002013-11-18 Tom Tromey <tromey@redhat.com>
2701
2702 * server.h: Don't check HAVE_STRING_H.
2703 * gdbreplay.c: Don't check HAVE_STRING_H.
2704 * configure: Rebuild.
2705
0a5dd17d
TT
27062013-11-18 Tom Tromey <tromey@redhat.com>
2707
2708 * Makefile.in (gdbreplay$(EXEEXT)): Depend on and link against
2709 LIBGNU.
2710
1bd2f0ba
TT
27112013-11-08 Tom Tromey <tromey@redhat.com>
2712
2713 * configure, config.in: Rebuild.
2714 * configure.ac: Remove unused configury.
2715
3266f10b
TT
27162013-11-08 Tom Tromey <tromey@redhat.com>
2717
2718 * acinclude.m4: Include common.m4, codeset.m4.
2719 * configure, config.in: Rebuild.
2720 * configure.ac: Use GDB_AC_COMMON.
2721
6682d959
AA
27222013-11-06 Andreas Arnez <arnez@linux.vnet.ibm.com>
2723
2724 * linux-s390-low.c (HWCAP_S390_TE): New define.
2725 (s390_arch_setup): Consider the TE field in the HWCAP for
2726 determining 'have_regset_tdb'.
2727
fd0a4d76
SDJ
27282013-10-16 Sergio Durigan Junior <sergiodj@redhat.com>
2729
2730 PR gdb/16014
2731 * tracepoint.c (download_tracepoint_1): Remove unnecessary double
2732 call to sizeof.
2733
1a3d890b
PA
27342013-10-02 Pedro Alves <palves@redhat.com>
2735
2736 * server.c (process_serial_event): Don't output "GDBserver
2737 exiting" if GDB is connected through stdio.
2738 * target.c (mywait): Likewise, be silent if GDB is connected
2739 through stdio.
2740
97ad4581
JB
27412013-10-01 Joel Brobecker <brobecker@adacore.com>
2742
2743 * lynx-low.c (lynx_add_threads_after_attach): New function.
2744 (lynx_attach): Remove call to add_thread. Add call to
2745 lynx_add_threads_after_attach instead.
2746
5b4e221c
MF
27472013-09-28 Mike Frysinger <vapier@gentoo.org>
2748
2749 * configure.ac (AC_CHECK_HEADERS): Add sys/syscall.h
2750 * config.in, configure: Regenerated.
2751
ee47b2f8
YQ
27522013-09-18 Yao Qi <yao@codesourcery.com>
2753
2754 PR server/15959
2755 * server.c (start_inferior): Clear 'resume_info'.
2756
d6707650 27572013-09-16 Jiong Wang <jiwang@tilera.com>
0f63d4db 2758
d6707650
JW
2759 * linux-tile-low.c (tile_regsets): Modify the size field to 64-bit
2760 for each register.
2761
9243dd0e 27622013-09-16 Jiong Wang <jiwang@tilera.com>
0f63d4db 2763
9243dd0e
JW
2764 * configure.srv <tilegx*-*-linux*>: Remove linux-osdata.o from and add
2765 linux-tile-low.o to srv_tgtobj.
2766
c623a6ef
WN
27672013-09-16 Will Newton <will.newton@linaro.org>
2768
2769 * linux-aarch64-low.c (aarch64_linux_set_debug_regs): Zero
2770 out regs.
2771
fb71d39e
PA
27722013-09-06 Pedro Alves <palves@redhat.com>
2773
2774 * Makefile.in (gdb_proc_service_h, regdef_h, regcache_h)
2775 (signals_def, signals_h, ptid_h, ax_h, agent_h, linux_btrace_h)
2776 (linux_osdata_h, vec_h, gdb_vecs_h, host_defs_h, libiberty_h)
2777 (server_h, gdbthread_h, linux_low_h, linux_ptrace_h)
2778 (gdb_thread_db_h, linux_procfs_h, lynx_low_h, nto_low_h)
2779 (mips_linux_watch_h, i386_low_h, win32_low_h): Delete.
2780
8e7e9910
PA
27812013-09-06 Pedro Alves <palves@redhat.com>
2782
2783 * Makefile.in (linux-btrace.o, mips-linux-watch.o): Remove
2784 explicit header dependencies and use $COMPILE/$POSTCOMPILE.
2785
7c3a12ca
PA
27862013-09-06 Pedro Alves <palves@redhat.com>
2787
2788 * linux-amd64-ipa.c: Include tracepoint.h.
2789 * linux-i386-ipa.c: Include tracepoint.h.
2790
8eb3d7b6
RW
27912013-09-06 Ricard Wanderlof <ricardw@axis.com>
2792
2793 * linux-crisv32-low.c (PTRACE_GET_THREAD_AREA): New macro.
2794 (ps_get_thread_area): New function.
2795
eddddb9d
RW
27962013-09-06 Ricard Wanderlof <ricardw@axis.com>
2797
2798 * linux-crisv32-low.c (elf_gregset_t): Delete typedef.
2799 (initialize_low_arch): Call init_registers_crisv32 rather than
2800 init_register_crisv32.
2801
533b0600
PA
28022013-09-05 Pedro Alves <palves@redhat.com>
2803
2804 * server.h (handle_vFile, hostio_last_error_from_errno): Move
2805 to ...
2806 * hostio.h: ... this new file.
2807 * hostio.c, server.c, linux-low.c, nto-low.c, spu-low,
2808 win32-low.c: Include hostio.h.
2809
0ce3d3b5
PA
28102013-09-05 Pedro Alves <palves@redhat.com>
2811
2812 * server.h (gdb_client_data, handler_func, callback_handler_func)
2813 (delete_file_handler, add_file_handler, append_callback_event)
2814 (delete_callback_event, start_event_loop, initialize_event_loop):
2815 Move to event-loop.h and include it.
2816 * event-loop.h: New file.
2817
799cdc37
PA
28182013-09-05 Pedro Alves <palves@redhat.com>
2819
2820 * dll.c, inferiors.c, remote-utils.c, server.c: Include "dll.h".
2821 * server.h (struct dll_info, all_dlls, dlls_changed, clear_dlls)
2822 (loaded_dll, unloaded_dll): Move to ...
2823 * dll.h: ... this new file.
2824 * inferiors.c, remote-utils.c, win32-low.c: Include "dll.h".
2825
6a6bbd9d
PA
28262013-09-05 Pedro Alves <palves@redhat.com>
2827
2828 * server.h (current_process, get_thread_process, all_processes)
2829 (add_inferior_to_list, for_each_inferior, current_inferior)
2830 (remove_inferior, add_process, remove_process, find_process_pid)
2831 (have_started_inferiors_p, have_attached_inferiors_p)
2832 (thread_id_to_gdb_id, thread_to_gdb_id, gdb_id_to_thread_id)
2833 (clear_inferiors, find_inferior, find_inferior_id)
2834 (inferior_target_data, set_inferior_target_data)
2835 (inferior_regcache_data, set_inferior_regcache_data): Move to
2836 inferiors.h, and include it.
2837 * inferiors.h: New file.
2838
f699aaba
PA
28392013-09-05 Pedro Alves <palves@redhat.com>
2840
2841 * server.h (struct emit_ops, current_insn_ptr, emit_error):
2842 Move ...
2843 * ax.h: ... here.
2844
c144c7a0
PA
28452013-09-05 Pedro Alves <palves@redhat.com>
2846
2847 * ax.c, linux-low.c, linux-x86-low.c, server.c: Include
2848 tracepoint.h.
2849 * server.h (IPA_BUFSIZ, initialize_tracepoint, tracing)
2850 (disconnected_tracing, tracepoint_look_up_symbols, stop_tracing
2851 (handle_tracepoint_general_set, handle_tracepoint_query)
2852 (tracepoint_finished_step, tracepoint_was_hit)
2853 (release_while_stepping_state_list, current_traceframe)
2854 (in_readonly_region, traceframe_read_mem)
2855 (fetch_traceframe_registers, traceframe_read_sdata)
2856 (traceframe_read_info, struct fast_tpoint_collect_status)
2857 (fast_tracepoint_collecting, force_unlock_trace_buffer)
2858 (handle_tracepoit_bkpts, initialize_low_tracepoint)
2859 (supply_fast_tracepoint_registers)
2860 (supply_static_tracepoint_registers, set_trampoline_buffer_space)
2861 (ipa_tdesc, claim_trampoline_space)
2862 (have_fast_tracepoint_trampoline_buffer, gdb_agent_about_to_close)
2863 (agent_mem_read, agent_get_trace_state_variable_value)
2864 (agent_set_trace_state_variable_value, agent_tsv_read)
2865 (agent_mem_read_string, get_raw_reg_func_addr)
2866 (get_get_tsv_func_addr, get_set_tsv_func_addr): Move to ...
2867 * tracepoint.h: ... this new file.
2868
ff42e6ab
PA
28692013-09-05 Pedro Alves <palves@redhat.com>
2870
2871 * server.h (perror_with_name, error, fatal, warning, paddress)
2872 (pulongest, plongest, phex_nz, pfildes): Move to utils.h, and
2873 include it.
2874 * utils.h: New file.
2875
541af0f4
PA
28762013-09-05 Pedro Alves <palves@redhat.com>
2877
2878 * server.h (remote_debug, noack_mode, transport_is_reliable)
2879 (gdb_connected, STDIO_CONNECTION_NAME, remote_connection_is_stdio)
2880 (read_ptid, write_ptid, putpkt, putpkt_binary, putpkt_notif)
2881 (getpkt, remote_prepare, remote_open, remote_close, write_ok)
2882 (write_enn, initialize_async_io, enable_async_io)
2883 (disable_async_io, check_remote_input_interrupt_request)
2884 (convert_ascii_to_int, convert_int_to_ascii, new_thread_notify)
2885 (dead_thread_notify, prepare_resume_reply)
2886 (decode_address_to_semicolon, decode_address, decode_m_packet)
2887 (decode_M_packet, decode_X_packet, decode_xfer_write)
2888 (decode_search_memory_packet, unhexify, hexify)
2889 (remote_escape_output, unpack_varlen_hex, clear_symbol_cache)
2890 (look_up_one_symbol, relocate_instruction)
2891 (monitor_output): Move to remote-utils.h, and include it.
2892 * remote-utils.h: New file.
2893
eebdf26b
PA
28942013-09-05 Pedro Alves <palves@redhat.com>
2895
2896 * server.h (_): Delete.
2897
3aafd2ff
PA
28982013-09-02 Pedro Alves <palves@redhat.com>
2899
2900 * tracepoint.c (TRACEFRAME_EOB_MARKER_SIZE): New macro.
2901 (init_trace_buffer): Ensure at least TRACEFRAME_EOB_MARKER_SIZE is
2902 allocated.
2903 (trace_buffer_alloc): Use TRACEFRAME_EOB_MARKER_SIZE.
2904
cee83bcb
PM
29052013-09-02 Pierre Muller <muller@sourceware.org>
2906
2907 * win32-low.c (child_xfer_memory): Check if ReadProcessMemory
2908 or WriteProcessMemory complete successfully and handle
2909 ERROR_PARTIAL_COPY error.
2910
9a13b2fa
PA
29112013-09-02 Pedro Alves <palves@redhat.com>
2912
2913 * server.c (gdb_read_memory): Return -1 on traceframe memory read
2914 error instead of EIO.
2915
602e3198
JK
29162013-08-28 Jan Kratochvil <jan.kratochvil@redhat.com>
2917
2918 PR server/15604
2919 * linux-low.c: Include filestuff.h.
2920 (linux_create_inferior) <pid == 0>: Call close_most_fds.
2921 * lynx-low.c: Include filestuff.h.
2922 (lynx_create_inferior) <pid == 0>: Call close_most_fds.
2923 * server.c: Include filestuff.h.
2924 (main): Call notice_open_fds.
2925 * spu-low.c: Include filestuff.h.
2926 (spu_create_inferior) <pid == 0>: Call close_most_fds.
2927
96d7229d
LM
29282013-08-22 Luis Machado <lgustavo@codesourcery.com>
2929
2930 * Makefile.in: Explain why ../target and ../nat are not
2931 listed as include file search paths.
2932 (linux-waitpid.o): New object file rule.
2933 * configure.srv (srv_native_linux_obj): New variable.
2934 Replace all occurrences of linux native object files with
2935 $srv_native_linux_obj.
2936 * linux-low.c: Include nat/linux-nat.h and nat/linux-waitpid.h.
2937 (HAS_NOMMU): Move defining logic to common/linux-ptrace.c.
2938 (linux_enable_event_reporting): Remove declaration.
2939 (my_waitpid): Moved to common/linux-waitpid.c.
2940 (linux_wait_for_event): Pass ptid when calling
2941 linux_enable_event_reporting.
2942 (linux_supports_tracefork_flag): Remove.
2943 (linux_enable_event_reporting): Likewise.
2944 (linux_tracefork_grandchild): Remove.
2945 (STACK_SIZE): Moved to common/linux-ptrace.c.
2946 (linux_tracefork_child): Remove.
2947 (linux_test_for_tracefork): Remove.
2948 (linux_look_up_symbols): Call linux_supports_traceclone.
2949 (initialize_low): Remove call to linux_test_for_tracefork.
2950 * linux-low.h (PTRACE_TYPE_ARG3): Move to
2951 common/linux-ptrace.h.
2952 (PTRACE_TYPE_ARG4): Likewise.
2953 Include linux-ptrace.h.
2954
32940073
PA
29552013-08-21 Pedro Alves <palves@redhat.com>
2956
2957 * config.in: Renegerate.
2958
33b60d58 29592013-08-19 Luis Machado <lgustavo@codesourcery.com>
a261b8f5 2960
33b60d58
LM
2961 * Makefile.in (INCLUDE_CFLAGS): Include -I$(srcdir)/../.
2962 (SFILES): Remove $(srcdir)/common/target-common.c and
2963 add $(srcdir)/target/waitstatus.c.
2964 (OBS): Remove target-common.o and add waitstatus.o.
2965 (server_h): Remove $(srcdir)/../common/target-common.h and
2966 add $(srcdir)/../target/resume.h, $(srcdir)/../target/wait.h
2967 and $(srcdir)/../target/waitstatus.h.
2968 (target-common.o): Remove.
2969 (waitstatus.o): New target object file.
2970 * target.h: Do not include target-common.h and
2971 include target/resume.h, target/wait.h and
2972 target/waitstatus.h.
2973
b8e1b30e
LM
29742013-08-13 Luis Machado <lgustavo@codesourcery.com>
2975
2976 * linux-arm-low.c: Rename all occurrences of PTRACE_ARG3_TYPE
2977 to PTRACE_TYPE_ARG3.
2978 * linux-low.c: Rename all occurrences of PTRACE_ARG3_TYPE
2979 to PTRACE_TYPE_ARG3 and PTRACE_ARG4_TYPE to
2980 PTRACE_TYPE_ARG4.
2981 * linux-low.h (PTRACE_ARG3_TYPE): Rename to PTRACE_TYPE_ARG3.
2982 (PTRACE_ARG4_TYPE): Rename to PTRACE_TYPE_ARG4.
2983
7a60ad40
YQ
29842013-07-27 Jie Zhang <jie@codesourcery.com>
2985 Daniel Jacobowitz <dan@codesourcery.com>
2986 Yao Qi <yao@codesourcery.com>
2987
2988 * Makefile.in (SFILES): Add common/mips-linux-watch.c.
2989 (mips-linux-watch.o): New rule.
2990 (mips_linux_watch_h): New variable.
2991 * configure.srv <mips*-*-linux*>: Add mips-linux-watch.o to
2992 srv_tgtobj.
2993 * linux-mips-low.c: Include mips-linux-watch.h.
2994 (struct arch_process_info, struct arch_lwp_info): New.
2995 (update_watch_registers_callback): New function.
2996 (mips_linux_new_process, mips_linux_new_thread) New functions.
2997 (mips_linux_prepare_to_resume, mips_insert_point): New
2998 functions.
2999 (mips_remove_point, mips_stopped_by_watchpoint): New
3000 functions.
3001 (rsp_bp_type_to_target_hw_bp_type): New function.
3002 (mips_stopped_data_address): New function.
3003 (the_low_target): Add watchpoint support functions.
3004
de6f69ad
YQ
30052013-07-27 Yao Qi <yao@codesourcery.com>
3006
3007 * i386-low.c: Include break-common.h.
3008 (enum target_hw_bp_type): Remove.
3009
3360c0bf
LM
30102013-07-24 Luis Machado <lgustavo@codesourcery.com>
3011
3012 * Makefile.in (SFILES): /common/target-common.c.
3013 (OBS): Add target-common.o.
3014 (server_h): Add $(srcdir)/../common/target-common.h.
3015 (target-common.o): New target.
3016 * server.c (queue_stop_reply_callback): Free
3017 status string after use.
3018 * target.c (target_waitstatus_to_string): Remove.
3019 * target.h: Include target-common.h.
3020 (resume_kind): Likewise.
3021 (target_waitkind): Likewise.
3022 (target_waitstatus): Likewise.
3023 (TARGET_WNOHANG): Likewise.
3024
bd885420
YQ
30252013-07-04 Yao Qi <yao@codesourcery.com>
3026
3027 * Makefile.in (host_alias): Use @host_noncanonical@.
3028 (target_alias): Use @target_noncanonical@.
3029 * configure.ac: Use ACX_NONCANONICAL_TARGET and
3030 ACX_NONCANONICAL_HOST.
3031 * configure: Regenerated.
3032
3033 Revert:
3034 2013-06-28 Mircea Gherzan <mircea.gherzan@intel.com>
3035
3036 * configure.ac (version_host, version_target): Set and AC_SUBST them.
3037 * configure: Rebuild.
3038 * Makefile.in (version_host, version_target): Get from configure.
3039 (version.c): Use $(version_host) and $(version_target).
3040
17ef446e
PA
30412013-07-03 Pedro Alves <palves@redhat.com>
3042
3043 * Makefile.in (config.status): Depend on development.sh.
3044 * acinclude.m4: Include libmcheck.m4.
3045 * configure: Regenerate.
3046
7a9a7487
MG
30472013-07-02 Mircea Gherzan <mircea.gherzan@intel.com>
3048
3049 * win32-low.c (winapi_DebugActiveProcessStop): Move the WINAPI
3050 attribute inside the parentheses.
3051 (winapi_DebugSetProcessKillOnExit): Ditto.
3052 (winapi_DebugBreakProcess): Ditto.
3053 (winapi_GenerateConsoleCtrlEvent): Ditto.
a261b8f5 3054
49b64de6
MG
30552013-07-02 Mircea Gherzan <mircea.gherzan@intel.com>
3056
3057 * notif.h (notif_event): Add a dummy member to avoid compiler
3058 errors.
3059
d5749ee7
PA
30602013-07-01 Pedro Alves <palves@redhat.com>
3061
3062 * hostio.c (HOSTIO_PATH_MAX): Define.
3063 (require_filename, handle_open, handle_unlink, handle_readlink):
3064 Use it.
3065
d8d2a3ee
PA
30662013-07-01 Pedro Alves <palves@redhat.com>
3067
3068 * server.h: Include "pathmax.h".
3069 * linux-low.c: Don't include sys/param.h.
3070 (linux_pid_exe_is_elf_64_file): Use PATH_MAX instead of
3071 MAXPATHLEN.
3072 * win32-low.c: Don't include sys/param.h.
3073 (win32_create_inferior): Use PATH_MAX instead of MAXPATHLEN.
3074
bc7dea8d
PA
30752013-07-01 Pedro Alves <palves@redhat.com>
3076
3077 * event-loop.c: Don't check HAVE_UNISTD_H before including
3078 <unistd.h>.
3079 * gdbreplay.c: Likewise.
3080 * remote-utils.c: Likewise.
3081 * server.c: Likewise.
3082 * configure.ac: Don't check for unistd.h.
3083 * configure: Regenerate.
3084
d6c2da54
TT
30852013-06-28 Tom Tromey <tromey@redhat.com>
3086
3087 * Makefile.in (version.c): Use version.in, not
3088 common/version.in.
3089
257b6bec
MG
30902013-06-28 Mircea Gherzan <mircea.gherzan@intel.com>
3091
3092 * configure.ac (version_host, version_target): Set and AC_SUBST them.
3093 * configure: Rebuild.
3094 * Makefile.in (version_host, version_target): Get from configure.
3095 (version.c): Use $(version_host) and $(version_target).
3096
86ebe149
DK
30972013-06-10 Dmitry Kozlov <ddk@codesourcery.com>
3098
3099 Fix trace-status to output user name without trailing colon.
3100 * tracepoint.c (cmd_qtstatus): Remove unnecessary colon from user name.
3101
f30aa5af
DK
31022013-06-10 Dmitry Kozlov <ddk@codesourcery.com>
3103
3104 Fix trace-status to output proper start-time and stop-time.
3105 * tracepoint.c (cmd_qtstatus): Modify trace-status output to
3106 output start time and stop time in hex as gdb expects.
3107
28a93511
YQ
31082013-06-26 Pedro Alves <pedro@codesourcery.com>
3109
3110 * tracepoint.c (build_traceframe_info_xml): Output trace state
3111 variables present in the trace buffer.
3112
01208463
TT
31132013-06-24 Tom Tromey <tromey@redhat.com>
3114
3115 * Makefile.in (version.c): Use bfd/version.h, common/version.in,
3116 create-version.sh.
3117 (version.o): Remove.
3118 * gdbreplay.c: Include version.h.
3119 (version, host_name): Don't declare.
3120 * server.h: Include version.h.
3121 (version, host_name): Don't declare.
3122
760256f9
PA
31232013-06-12 Pedro Alves <palves@redhat.com>
3124
3125 * linux-x86-low.c (linux_is_elf64): Delete global.
3126 (x86_siginfo_fixup): Replace reference to `linux_is_elf64' global
3127 with local linux_pid_exe_is_elf_64_file use.
3128
030031ee
PA
31292013-06-11 Pedro Alves <palves@redhat.com>
3130
3131 * linux-low.c (regset_disabled, disable_regset): New functions.
3132 (regsets_fetch_inferior_registers)
3133 (regsets_store_inferior_registers): Use them.
3134 (initialize_regsets_info); Don't allocate the disabled_regsets
3135 array here.
3136 * linux-low.h (struct regsets_info) <disabled_regsets>: Extend
3137 comment.
3138
5da6eb0a
PA
31392013-06-11 Pedro Alves <palves@redhat.com>
3140
3141 * linux-low.c (initialize_regsets_info): Use xcalloc instead of
3142 xmalloc.
3143
7e5aaa09
PA
31442013-06-11 Pedro Alves <palves@redhat.com>
3145
3146 * linux-x86-low.c (initialize_low_arch): Call
3147 init_registers_x32_avx_linux.
3148
d878444c
JK
31492013-06-09 Jan Kratochvil <jan.kratochvil@redhat.com>
3150
3151 Fix compatibility with Android Bionic.
3152 * linux-low.c (linux_qxfer_libraries_svr4): Ignore first entry even if
3153 it is not empty.
3154
3aee8918
PA
31552013-06-07 Pedro Alves <palves@redhat.com>
3156
5f2b57b5 3157 PR server/14823
3aee8918
PA
3158 * Makefile.in (OBS): Add tdesc.o.
3159 (IPA_OBJS): Add tdesc-ipa.o.
3160 (tdesc-ipa.o): New rule.
3161 * ax.c (gdb_eval_agent_expr): Adjust register_size call to new
3162 interface.
3163 * linux-low.c (new_inferior): Delete.
3164 (disabled_regsets, num_regsets): Delete.
3165 (linux_add_process): Adjust to set the new per-process
3166 new_inferior flag.
3167 (linux_detach_one_lwp): Adjust to call regcache_invalidate_thread.
3168 (linux_wait_for_lwp): Adjust. Only call arch_setup if the event
3169 was a stop. When calling arch_setup, switch the current inferior
3170 to the thread that got an event.
3171 (linux_resume_one_lwp): Adjust to call regcache_invalidate_thread.
3172 (regsets_fetch_inferior_registers)
3173 (regsets_store_inferior_registers): New regsets_info parameter.
3174 Adjust to use it.
3175 (linux_register_in_regsets): New regs_info parameter. Adjust to
3176 use it.
3177 (register_addr, fetch_register, store_register): New usrregs_info
3178 parameter. Adjust to use it.
3179 (usr_fetch_inferior_registers, usr_store_inferior_registers): New
3180 parameter regs_info. Adjust to use it.
3181 (linux_fetch_registers): Get the current inferior's regs_info, and
3182 adjust to use it.
3183 (linux_store_registers): Ditto.
3184 [HAVE_LINUX_REGSETS] (initialize_regsets_info): New.
3185 (initialize_low): Don't initialize the target_regsets here. Call
3186 initialize_low_arch.
3187 * linux-low.h (target_regsets): Delete declaration.
3188 (struct regsets_info): New.
3189 (struct usrregs_info): New.
3190 (struct regs_info): New.
3191 (struct process_info_private) <new_inferior>: New field.
3192 (struct linux_target_ops): Delete the num_regs, regmap, and
3193 regset_bitmap fields. New field regs_info.
3194 [HAVE_LINUX_REGSETS] (initialize_regsets_info): Declare.
3195 * i387-fp.c (num_xmm_registers): Delete.
3196 (i387_cache_to_fsave, i387_fsave_to_cache): Adjust find_regno
3197 calls to new interface.
3198 (i387_cache_to_fxsave, i387_cache_to_xsave, i387_fxsave_to_cache)
3199 (i387_xsave_to_cache): Adjust find_regno calls to new interface.
3200 Infer the number of xmm registers from the regcache's target
3201 description.
3202 * i387-fp.h (num_xmm_registers): Delete.
3203 * inferiors.c (add_thread): Don't install the thread's regcache
3204 here.
3205 * proc-service.c (gregset_info): Fetch the current inferior's
3206 regs_info. Adjust to use it.
3207 * regcache.c: Include tdesc.h.
3208 (register_bytes, reg_defs, num_registers)
3209 (gdbserver_expedite_regs): Delete.
3210 (get_thread_regcache): If the thread doesn't have a regcache yet,
3211 create one, instead of aborting gdbserver.
3212 (regcache_invalidate_one): Rename to ...
3213 (regcache_invalidate_thread): ... this.
3214 (regcache_invalidate_one): New.
3215 (regcache_invalidate): Only invalidate registers of the current
3216 process.
3217 (init_register_cache): Add target_desc parameter, and use it.
3218 (new_register_cache): Ditto. Assert the target description has a
3219 non zero registers_size.
3220 (regcache_cpy): Add assertions. Adjust.
3221 (realloc_register_cache, set_register_cache): Delete.
3222 (registers_to_string, registers_from_string): Adjust.
3223 (find_register_by_name, find_regno, find_register_by_number)
3224 (register_cache_size): Add target_desc parameter, and use it.
3225 (free_register_cache_thread, free_register_cache_thread_one)
3226 (regcache_release, register_cache_size): New.
3227 (register_size): Add target_desc parameter, and use it.
3228 (register_data, supply_register, supply_register_zeroed)
3229 (supply_regblock, supply_register_by_name, collect_register)
3230 (collect_register_as_string, collect_register_by_name): Adjust.
3231 * regcache.h (struct target_desc): Forward declare.
3232 (struct regcache) <tdesc>: New field.
3233 (init_register_cache, new_register_cache): Add target_desc
3234 parameter.
3235 (regcache_invalidate_thread): Declare.
3236 (regcache_invalidate_one): Delete declaration.
3237 (regcache_release): Declare.
3238 (find_register_by_number, register_cache_size, register_size)
3239 (find_regno): Add target_desc parameter.
3240 (gdbserver_expedite_regs, gdbserver_xmltarget): Delete
3241 declarations.
3242 * remote-utils.c: Include tdesc.h.
3243 (outreg, prepare_resume_reply): Adjust.
3244 * server.c: Include tdesc.h.
3245 (gdbserver_xmltarget): Delete declaration.
3246 (get_features_xml, process_serial_event): Adjust.
3247 * server.h [IN_PROCESS_AGENT] (struct target_desc): Forward
3248 declare.
3249 (struct process_info) <tdesc>: New field.
3250 (ipa_tdesc): Declare.
3251 * tdesc.c: New file.
3252 * tdesc.h: New file.
3253 * tracepoint.c: Include tdesc.h.
3254 [IN_PROCESS_AGENT] (ipa_tdesc): Define.
3255 (get_context_regcache): Adjust to pass ipa_tdesc down.
3256 (do_action_at_tracepoint): Adjust to get the register cache size
3257 from the context regcache's description.
3258 (traceframe_walk_blocks): Adjust to get the register cache size
3259 from the current trace frame's description.
3260 (traceframe_get_pc): Adjust to get current trace frame's
3261 description and pass it down.
3262 (gdb_collect): Adjust to get the register cache size from the
3263 IPA's description.
3264 * linux-amd64-ipa.c (tdesc_amd64_linux): Declare.
3265 (gdbserver_xmltarget): Delete.
3266 (initialize_low_tracepoint): Set the ipa's target description.
3267 * linux-i386-ipa.c (tdesc_i386_linux): Declare.
3268 (initialize_low_tracepoint): Set the ipa's target description.
3269 * linux-x86-low.c: Include tdesc.h.
3270 [__x86_64__] (is_64bit_tdesc): New.
3271 (ps_get_thread_area, x86_get_thread_area): Use it.
3272 (i386_cannot_store_register): Rename to ...
3273 (x86_cannot_store_register): ... this. Use is_64bit_tdesc.
3274 (i386_cannot_fetch_register): Rename to ...
3275 (x86_cannot_fetch_register): ... this. Use is_64bit_tdesc.
3276 (x86_fill_gregset, x86_store_gregset): Adjust register_size calls
3277 to new interface.
3278 (target_regsets): Rename to ...
3279 (x86_regsets): ... this.
3280 (x86_get_pc, x86_set_pc): Adjust register_size calls to new
3281 interface.
3282 (x86_siginfo_fixup): Use is_64bit_tdesc.
3283 [__x86_64__] (tdesc_amd64_linux, tdesc_amd64_avx_linux)
3284 (tdesc_x32_avx_linux, tdesc_x32_linux)
3285 (tdesc_i386_linux, tdesc_i386_mmx_linux, tdesc_i386_avx_linux):
3286 Declare.
3287 (x86_linux_update_xmltarget): Delete.
3288 (I386_LINUX_XSAVE_XCR0_OFFSET): Define.
3289 (have_ptrace_getfpxregs, have_ptrace_getregset): New.
3290 (AMD64_LINUX_USER64_CS): New.
3291 (x86_linux_read_description): New, based on
3292 x86_linux_update_xmltarget.
3293 (same_process_callback): New.
3294 (x86_arch_setup_process_callback): New.
3295 (x86_linux_update_xmltarget): New.
3296 (x86_regsets_info): New.
3297 (amd64_linux_regs_info): New.
3298 (i386_linux_usrregs_info): New.
3299 (i386_linux_regs_info): New.
3300 (x86_linux_regs_info): New.
3301 (x86_arch_setup): Reimplement.
3302 (x86_install_fast_tracepoint_jump_pad): Use is_64bit_tdesc.
3303 (x86_emit_ops): Ditto.
3304 (the_low_target): Adjust. Install x86_linux_regs_info,
3305 x86_cannot_fetch_register, and x86_cannot_store_register.
3306 (initialize_low_arch): New.
3307 * linux-ia64-low.c (tdesc_ia64): Declare.
3308 (ia64_fetch_register): Adjust.
3309 (ia64_usrregs_info, regs_info): New globals.
3310 (ia64_regs_info): New function.
3311 (the_low_target): Adjust.
3312 (initialize_low_arch): New function.
3313 * linux-sparc-low.c (tdesc_sparc64): Declare.
3314 (sparc_fill_gregset_to_stack, sparc_store_gregset_from_stack):
3315 Adjust.
3316 (sparc_arch_setup): New function.
3317 (sparc_regsets_info, sparc_usrregs_info, regs_info): New globals.
3318 (the_low_target): Adjust.
3319 (initialize_low_arch): New function.
3320 * linux-ppc-low.c (tdesc_powerpc_32l, tdesc_powerpc_altivec32l)
3321 (tdesc_powerpc_cell32l, tdesc_powerpc_vsx32l)
3322 (tdesc_powerpc_isa205_32l, tdesc_powerpc_isa205_altivec32l)
3323 (tdesc_powerpc_isa205_vsx32l, tdesc_powerpc_e500l)
3324 (tdesc_powerpc_64l, tdesc_powerpc_altivec64l)
3325 (tdesc_powerpc_cell64l, tdesc_powerpc_vsx64l)
3326 (tdesc_powerpc_isa205_64l, tdesc_powerpc_isa205_altivec64l)
3327 (tdesc_powerpc_isa205_vsx64l): Declare.
3328 (ppc_cannot_store_register, ppc_collect_ptrace_register)
3329 (ppc_supply_ptrace_register, parse_spufs_run, ppc_get_pc)
3330 (ppc_set_pc, ppc_get_hwcap): Adjust.
3331 (ppc_usrregs_info): Forward declare.
3332 (!__powerpc64__) ppc_regmap_adjusted: New global.
3333 (ppc_arch_setup): Adjust to the current process'es target
3334 description.
3335 (ppc_fill_vsxregset, ppc_store_vsxregset, ppc_fill_vrregset)
3336 (ppc_store_vrregset, ppc_fill_evrregset, ppc_store_evrregse)
3337 (ppc_store_evrregset): Adjust.
3338 (target_regsets): Rename to ...
3339 (ppc_regsets): ... this, and make static.
3340 (ppc_usrregs_info, ppc_regsets_info, regs_info): New globals.
3341 (ppc_regs_info): New function.
3342 (the_low_target): Adjust.
3343 (initialize_low_arch): New function.
3344 * linux-s390-low.c (tdesc_s390_linux32, tdesc_s390_linux32v1)
3345 (tdesc_s390_linux32v2, tdesc_s390_linux64, tdesc_s390_linux64v1)
3346 (tdesc_s390_linux64v2, tdesc_s390x_linux64, tdesc_s390x_linux64v1)
3347 (tdesc_s390x_linux64v2): Declare.
3348 (s390_collect_ptrace_register, s390_supply_ptrace_register)
3349 (s390_fill_gregset, s390_store_last_break): Adjust.
3350 (target_regsets): Rename to ...
3351 (s390_regsets): ... this, and make static.
3352 (s390_get_pc, s390_set_pc): Adjust.
3353 (s390_get_hwcap): New target_desc parameter, and use it.
3354 [__s390x__] (have_hwcap_s390_high_gprs): New global.
3355 (s390_arch_setup): Adjust to set the current process'es target
3356 description. Don't adjust the regmap.
3357 (s390_usrregs_info, s390_regsets_info, regs_info): New globals.
3358 [__s390x__] (s390_usrregs_info_3264, s390_regsets_info_3264)
3359 (regs_info_3264): New globals.
3360 (s390_regs_info): New function.
3361 (the_low_target): Adjust.
3362 (initialize_low_arch): New function.
3363 * linux-mips-low.c (tdesc_mips_linux, tdesc_mips_dsp_linux)
3364 (tdesc_mips64_linux, tdesc_mips64_dsp_linux): Declare.
3365 [__mips64] (init_registers_mips_linux)
3366 (init_registers_mips_dsp_linux): Delete defines.
3367 [__mips64] (tdesc_mips_linux, tdesc_mips_dsp_linux): New defines.
3368 (have_dsp): New global.
3369 (mips_read_description): New, based on mips_arch_setup.
3370 (mips_arch_setup): Reimplement.
3371 (get_usrregs_info): New function.
3372 (mips_cannot_fetch_register, mips_cannot_store_register)
3373 (mips_get_pc, mips_set_pc, mips_fill_gregset, mips_store_gregset)
3374 (mips_fill_fpregset, mips_store_fpregset): Adjust.
3375 (target_regsets): Rename to ...
3376 (mips_regsets): ... this, and make static.
3377 (mips_regsets_info, mips_dsp_usrregs_info, mips_usrregs_info)
3378 (dsp_regs_info, regs_info): New globals.
3379 (mips_regs_info): New function.
3380 (the_low_target): Adjust.
3381 (initialize_low_arch): New function.
3382 * linux-arm-low.c (tdesc_arm, tdesc_arm_with_iwmmxt)
3383 (tdesc_arm_with_vfpv2, tdesc_arm_with_vfpv3, tdesc_arm_with_neon):
3384 Declare.
3385 (arm_fill_vfpregset, arm_store_vfpregset): Adjust.
3386 (arm_read_description): New, with bits factored from
3387 arm_arch_setup.
3388 (arm_arch_setup): Reimplement.
3389 (target_regsets): Rename to ...
3390 (arm_regsets): ... this, and make static.
3391 (arm_regsets_info, arm_usrregs_info, regs_info): New globals.
3392 (arm_regs_info): New function.
3393 (the_low_target): Adjust.
3394 (initialize_low_arch): New function.
3395 * linux-m68k-low.c (tdesc_m68k): Declare.
3396 (target_regsets): Rename to ...
3397 (m68k_regsets): ... this, and make static.
3398 (m68k_regsets_info, m68k_usrregs_info, regs_info): New globals.
3399 (m68k_regs_info): New function.
3400 (m68k_arch_setup): New function.
3401 (the_low_target): Adjust.
3402 (initialize_low_arch): New function.
3403 * linux-sh-low.c (tdesc_sharch): Declare.
3404 (target_regsets): Rename to ...
3405 (sh_regsets): ... this, and make static.
3406 (sh_regsets_info, sh_usrregs_info, regs_info): New globals.
3407 (sh_regs_info, sh_arch_setup): New functions.
3408 (the_low_target): Adjust.
3409 (initialize_low_arch): New function.
3410 * linux-bfin-low.c (tdesc_bfin): Declare.
3411 (bfin_arch_setup): New function.
3412 (bfin_usrregs_info, regs_info): New globals.
3413 (bfin_regs_info): New function.
3414 (the_low_target): Adjust.
3415 (initialize_low_arch): New function.
3416 * linux-cris-low.c (tdesc_cris): Declare.
3417 (cris_arch_setup): New function.
3418 (cris_usrregs_info, regs_info): New globals.
3419 (cris_regs_info): New function.
3420 (the_low_target): Adjust.
3421 (initialize_low_arch): New function.
3422 * linux-cris-low.c (tdesc_crisv32): Declare.
3423 (cris_arch_setup): New function.
3424 (cris_regsets_info, cris_usrregs_info, regs_info): New globals.
3425 (cris_regs_info): New function.
3426 (the_low_target): Adjust.
3427 (initialize_low_arch): New function.
3428 * linux-m32r-low.c (tdesc_m32r): Declare.
3429 (m32r_arch_setup): New function.
3430 (m32r_usrregs_info, regs_info): New globals.
3431 (m32r_regs_info): Adjust.
3432 (initialize_low_arch): New function.
3433 * linux-tic6x-low.c (tdesc_tic6x_c64xp_linux)
3434 (tdesc_tic6x_c64x_linux, tdesc_tic6x_c62x_linux): Declare.
3435 (tic6x_usrregs_info): Forward declare.
3436 (tic6x_read_description): New function, based on ...
3437 (tic6x_arch_setup): ... this. Reimplement.
3438 (target_regsets): Rename to ...
3439 (tic6x_regsets): ... this, and make static.
3440 (tic6x_regsets_info, tic6x_usrregs_info, regs_info): New globals.
3441 (tic6x_regs_info): New function.
3442 (the_low_target): Adjust.
3443 (initialize_low_arch): New function.
3444 * linux-xtensa-low.c (tdesc_xtensa): Declare.
3445 (xtensa_fill_gregset, xtensa_store_gregset): Adjust.
3446 (target_regsets): Rename to ...
3447 (xtensa_regsets): ... this, and make static.
3448 (xtensa_regsets_info, xtensa_usrregs_info, regs_info): New
3449 globals.
3450 (xtensa_arch_setup, xtensa_regs_info): New functions.
3451 (the_low_target): Adjust.
3452 (initialize_low_arch): New function.
3453 * linux-nios2-low.c (tdesc_nios2_linux): Declare.
3454 (nios2_arch_setup): Set the current process'es tdesc.
3455 (target_regsets): Rename to ...
3456 (nios2_regsets): ... this.
3457 (nios2_regsets_info, nios2_usrregs_info, regs_info): New globals.
3458 (nios2_regs_info): New function.
3459 (the_low_target): Adjust.
3460 (initialize_low_arch): New function.
a261b8f5
PA
3461 * linux-aarch64-low.c (tdesc_aarch64): Declare.
3462 (aarch64_arch_setup): Set the current process'es tdesc.
3463 (target_regsets): Rename to ...
3464 (aarch64_regsets): ... this.
3465 (aarch64_regsets_info, aarch64_usrregs_info, regs_info): New globals.
3466 (aarch64_regs_info): New function.
3467 (the_low_target): Adjust.
3468 (initialize_low_arch): New function.
3aee8918
PA
3469 * linux-tile-low.c (tdesc_tilegx, tdesc_tilegx32): Declare
3470 globals.
3471 (target_regsets): Rename to ...
3472 (tile_regsets): ... this.
3473 (tile_regsets_info, tile_usrregs_info, regs_info): New globals.
3474 (tile_regs_info): New function.
3475 (tile_arch_setup): Set the current process'es tdesc.
3476 (the_low_target): Adjust.
3477 (initialize_low_arch): New function.
3478 * spu-low.c (tdesc_spu): Declare.
3479 (spu_create_inferior, spu_attach): Set the new process'es tdesc.
3480 * win32-arm-low.c (tdesc_arm): Declare.
3481 (arm_arch_setup): New function.
3482 (the_low_target): Install arm_arch_setup instead of
3483 init_registers_arm.
3484 * win32-i386-low.c (tdesc_i386, tdesc_amd64): Declare.
3485 (init_windows_x86): Rename to ...
3486 (i386_arch_setup): ... this. Set `win32_tdesc'.
3487 (the_low_target): Adjust.
3488 * win32-low.c (win32_tdesc): New global.
3489 (child_add_thread): Don't create the thread cache here.
3490 (do_initial_child_stuff): Set the new process'es tdesc.
3491 * win32-low.h (struct target_desc): Forward declare.
3492 (win32_tdesc): Declare.
3493 * lynx-i386-low.c (tdesc_i386): Declare global.
3494 (lynx_i386_arch_setup): Set `lynx_tdesc'.
3495 * lynx-low.c (lynx_tdesc): New global.
3496 (lynx_add_process): Set the new process'es tdesc.
3497 * lynx-low.h (struct target_desc): Forward declare.
3498 (lynx_tdesc): Declare global.
3499 * lynx-ppc-low.c (tdesc_powerpc_32): Declare global.
3500 (lynx_ppc_arch_setup): Set `lynx_tdesc'.
3501 * nto-low.c (nto_tdesc): New global.
3502 (do_attach): Set the new process'es tdesc.
3503 * nto-low.h (struct target_desc): Forward declare.
3504 (nto_tdesc): Declare.
3505 * nto-x86-low.c (tdesc_i386): Declare.
3506 (nto_x86_arch_setup): Set `nto_tdesc'.
3507
b1fbec62
GB
35082013-06-04 Gary Benson <gbenson@redhat.com>
3509
3510 * server.c (handle_query): Add "augmented-libraries-svr4-read+"
3511 to qSupported response when appropriate.
3512 (handle_qxfer_libraries_svr4): Allow qXfer:libraries-svr4:read
3513 with nonzero-length annex.
3514 * linux-low.c (linux_qxfer_libraries_svr4): Parse and handle
3515 arguments supplied in annex.
3516
d1ec4ce7
DE
35172013-05-31 Doug Evans <dje@google.com>
3518
ac44adcb 3519 PR server/15594
d1ec4ce7
DE
3520 * linux-x86-low.c (ps_get_thread_area): Properly extend address to
3521 64 bits in 64-cross-32 environment.
3522
9b25f2d3
PA
35232013-05-28 Pedro Alves <palves@redhat.com>
3524
3525 * Makefile.in (clean): Remove reference to aarch64-without-fpu.c.
3526 (aarch64-without-fpu.c): Delete rule.
3527 * configure.srv (aarch64*-*-linux*): Remove references to
3528 aarch64-without-fpu.o and aarch64-without-fpu.xml.
3529 * linux-aarch64-low.c (init_registers_aarch64_without_fpu): Remove
3530 declaration.
3531
6740dc9c
PA
35322013-05-24 Pedro Alves <palves@redhat.com>
3533
3534 * server.c (handle_v_cont) <vCont;r>: Use unpack_varlen_hex
3535 instead of strchr/decode_address. Error if the range isn't split
3536 with a ','. Don't assume there's be a ':' in the action.
3537
c2d6af84
PA
35382013-05-23 Yao Qi <yao@codesourcery.com>
3539 Pedro Alves <palves@redhat.com>
3540
3541 * linux-low.c (lwp_in_step_range): New function.
3542 (linux_wait_1): If the thread was range stepping and stopped
3543 outside the stepping range, report the stop to GDB. Otherwise,
3544 continue stepping. Add range stepping debug output.
3545 (linux_set_resume_request): Copy the step range from the resume
3546 request to the lwp.
3547 (linux_supports_range_stepping): New.
3548 (linux_target_ops) <supports_range_stepping>: Set to
3549 linux_supports_range_stepping.
3550 * linux-low.h (struct linux_target_ops)
3551 <supports_range_stepping>: New field.
3552 (struct lwp_info) <step_range_start, step_range_end>: New fields.
3553 * linux-x86-low.c (x86_supports_range_stepping): New.
3554 (the_low_target) <supports_range_stepping>: Set to
3555 x86_supports_range_stepping.
3556 * server.c (handle_v_cont): Handle 'r' action.
3557 (handle_v_requests): Append ";r" if the target supports range
3558 stepping.
3559 * target.h (struct thread_resume) <step_range_start,
3560 step_range_end>: New fields.
3561 (struct target_ops) <supports_range_stepping>:
3562 New field.
3563 (target_supports_range_stepping): New macro.
3564
58794e1a
JB
35652013-05-17 Joel Brobecker <brobecker@adacore.com>
3566
3567 * lynx-low.c (lynx_resume): Fix null_ptid/minus_one_ptid
3568 confusion in comment.
3569
d631c5a7
JB
35702013-05-17 Joel Brobecker <brobecker@adacore.com>
3571
3572 * lynx-low.c (struct process_info_private): New type.
3573 (lynx_add_process): New function.
3574 (lynx_create_inferior, lynx_attach): Replace calls to
3575 add_process by calls to lynx_add_process.
3576 (lynx_resume): If PTID is null, then try using
3577 current_process()->private->last_wait_event_ptid.
3578 Add comments.
3579 (lynx_clear_inferiors): Delete. The contents of that function
3580 has been inlined in lynx_mourn;
3581 (lynx_wait_1): Save the ptid in the process's private data.
3582 (lynx_mourn): Free the process' private data. Replace call
3583 to lynx_clear_inferiors by call to clear_inferiors.
3584
96f7a20f
YQ
35852013-05-17 Yao Qi <yao@codesourcery.com>
3586
3587 * i386-low.c (i386_length_and_rw_bits): Move the comment to
3588 the right place.
3589
db0dfaa0
LM
35902013-05-16 Luis Machado <lgustavo@codesourcery.com>
3591
3592 * linux-low.c: Move definition checks upwards for PT_TEXT_ADDR,
3593 PT_DATA_ADDR and PT_TEXT_END_ADDR. Update comments.
3594 (linux_read_offsets): Remove PT_TEXT_ADDR, PT_DATA_ADDR and
3595 PT_TEXT_END_ADDR guards. Update comments.
3596 (linux_target_op) <read_offsets>: Conditionally define to
3597 linux_read_offsets if the target is UCLIBC and if it defines
3598 PT_TEXT_ADDR, PT_DATA_ADDR and PT_TEXT_END_ADDR.
3599
68f5f838
SL
36002013-05-06 Sandra Loosemore <sandra@codesourcery.com>
3601 Andrew Jenner <andrew@codesourcery.com>
3602
3603 * Makefile.in (SFILES): Add linux-nios2-low.c.
3604 (clean): Add action to delete nios2-linux.c.
3605 (nios2-linux.c): New rule.
3606 * configure.srv: Add nios2*-*-linux*.
3607 * linux-nios2-low.c: New.
3608
1ebff1fd
HAQ
36092013-05-03 Hafiz Abid Qadeer <abidh@codesourcery.com>
3610
3611 * tracepoint.c (cmd_qtinit): Call 'stop_tracing'.
3612
f6150862
HZ
36132013-04-25 Hui Zhu <hui@codesourcery.com>
3614
3615 PR gdb/15186
f6150862
HZ
3616 * ax.c (ax_printf): Add fflush.
3617
614c279d
TT
36182013-04-22 Tom Tromey <tromey@redhat.com>
3619
3620 * Makefile.in (SFILES): Add filestuff.c.
3621 (OBS): Add filestuff.o.
3622 (filestuff.o): New target.
3623 * config.in, configure: Rebuild.
3624 * configure.ac: Check for fdwalk, pipe2.
3625
7d4e5717
PA
36262013-04-17 Pedro Alves <palves@redhat.com>
3627
3628 * configure.ac (USE_THREAD_DB): Delete variable.
3629 (if test "$srv_linux_thread_db" = "yes"): AC_DEFINE USE_THREAD_DB.
3630 Don't AC_SUBST USE_THREAD_DB.
3631 * Makefile.in (INTERNAL_CFLAGS): Remove @USE_THREAD_DB@.
3632 * config.in, configure: Regenerate.
3633
d5c93e41
PA
36342013-04-16 Pedro Alves <palves@redhat.com>
3635
3636 * linux-low.h (struct lwp_info) <thread_known>: Move under
3637 the USE_THREAD_DB #ifdef.
3638
04f5fe89
PA
36392013-04-16 Pedro Alves <palves@redhat.com>
3640
3641 * Makefile.in (INTERNAL_CFLAGS): Add @USE_THREAD_DB@.
3642 (linux-low.o): Delete rule.
3643 * linux-low.h: Always include "gdb_thread_db.h" instead of
3644 conditionally including thread_db.h.
3645 (struct lwp_info) <th>: Guard with #ifdef USE_THREAD_DB instead of
3646 HAVE_THREAD_DB_H.
3647
480b27bf
JK
36482013-04-07 Jan Kratochvil <jan.kratochvil@redhat.com>
3649
3650 * Makefile.in (install-only): Fix make install regression.
3651
43662968
JK
36522013-04-05 Jan Kratochvil <jan.kratochvil@redhat.com>
3653
3654 Convert man pages to texinfo, new gdbinit.5 texinfo page.
3655 * Makefile.in (install-only): Remove $(man1dir) and gdbserver.1
3656 installation.
3657 * gdbserver.1: Remove.
3658
3e74e146
PA
36592013-03-22 Pedro Alves <palves@redhat.com>
3660
3661 * linux-low.c (handle_extended_wait): Don't call
3662 linux_enable_event_reporting.
3663
a8347a2a
TT
36642013-03-15 Tony Theodore <tonyt@logyst.com>
3665
3666 PR build/9098:
3667 * Makefile.in (SHELL): Use @SHELL@.
3668
eeb56fa7
SDJ
36692013-03-14 Sergio Durigan Junior <sergiodj@redhat.com>
3670
3671 * tracepoint.c (cmd_qtv): Initialize `val' with zero, silencing
3672 compiler warning.
3673
4fa7e2ff
JB
36742013-03-13 Joel Brobecker <brobecker@adacore.com>
3675
3676 * linux-low.c (linux_target_ops) [!HAVE_LINUX_BTRACE]:
3677 Remove extraneous NULL element.
3678
8ddb1965
YQ
36792013-03-13 Yao Qi <yao@codesourcery.com>
3680
3681 * tracepoint.c (traceframe_read_tsv): Look for the last matched
3682 'V' block in trace frame.
3683
9accd112
MM
36842013-03-11 Markus Metzger <markus.t.metzger@intel.com>
3685
3686 * target.h (struct target_ops): Add btrace ops.
3687 (target_supports_btrace): New macro.
3688 (target_enable_btrace): New macro.
3689 (target_disable_btrace): New macro.
3690 (target_read_btrace): New macro.
3691 * gdbthread.h (struct thread_info): Add btrace field.
3692 * server.c: Include btrace-common.h.
3693 (handle_btrace_general_set): New function.
3694 (handle_btrace_enable): New function.
3695 (handle_btrace_disable): New function.
3696 (handle_general_set): Call handle_btrace_general_set.
3697 (handle_qxfer_btrace): New function.
3698 (struct qxfer qxfer_packets[]): Add btrace entry.
3699 * inferiors.c (remove_thread): Disable btrace.
3700 * linux-low: Include linux-btrace.h.
3701 (linux_low_enable_btrace): New function.
3702 (linux_low_read_btrace): New function.
3703 (linux_target_ops): Add btrace ops.
3704 * configure.srv (i[34567]86-*-linux*): Add linux-btrace.o.
3705 Add srv_linux_btrace=yes.
3706 (x86_64-*-linux*): Add linux-btrace.o.
3707 Add srv_linux_btrace=yes.
3708 * configure.ac: Define HAVE_LINUX_BTRACE.
3709 * config.in: Regenerated.
3710 * configure: Regenerated.
3711
5cc22e4c
MM
37122013-03-11 Markus Metzger <markus.t.metzger@intel.com>
3713
3714 * server.c (handle_qxfer): Preserve error message if -3 is
3715 returned.
3716 (qxfer): Document the -3 return value.
3717
7c97f91e
MM
37182013-03-11 Markus Metzger <markus.t.metzger@intel.com>
3719
3720 * Makefile.in (SFILES): Add $(srcdir)/common/linux-btrace.c.
3721 (linux_btrace_h): New variable.
3722 (linux-btrace.o): New rule.
3723
be9a119c 37242013-03-08 Stan Shebs <stan@codesourcery.com>
f6f899bf
HAQ
3725 Hafiz Abid Qadeer <abidh@codesourcery.com>
3726
3727 * tracepoint.c (trace_buffer_size): New global.
3728 (DEFAULT_TRACE_BUFFER_SIZE): New define.
3729 (init_trace_buffer): Change to one-argument function. Allocate
3730 trace buffer memory.
3731 (handle_tracepoint_general_set): Call cmd_bigqtbuffer_size to
3732 handle QTBuffer:size packet.
3733 (cmd_bigqtbuffer_size): New function.
3734 (initialize_tracepoint): Call init_trace_buffer with
3735 DEFAULT_TRACE_BUFFER_SIZE.
3736 * server.c (handle_query): Add QTBuffer:size in the
3737 supported packets.
3738
e64f7499
YQ
37392013-03-07 Yao Qi <yao@codesourcery.com>
3740
3741 * tracepoint.c (cur_action, cur_step_action): Make them unsigned.
3742 (cmd_qtfp): Initialize cur_action and cur_step_action 0 instead
3743 of -1.
3744 (cmd_qtsp): Adjust condition. Do post increment.
3745 Set cur_action and cur_step_action back to 0.
3746
f0ae6fc3
PA
37472013-03-07 Jeremy Bennett <jeremy.bennett@embecosm.com>
3748
3749 PR server/15236
3750 * linux-low.c (linux_write_memory): Return early success if LEN is
3751 zero.
3752
b5b0b0af
CV
37532013-03-05 Corinna Vinschen <vinschen@redhat.de>
3754
334ad4a8 3755 * configure.srv: Add x86_64-*-cygwin* as target.
b5b0b0af 3756
589bc927
TT
37572013-02-28 Tom Tromey <tromey@redhat.com>
3758
3759 * configure.ac: Invoke AC_SYS_LARGEFILE.
3760 * configure, config.in: Rebuild.
3761
dfe07582
CV
37622013-02-28 Corinna Vinschen <vinschen@redhat.com>
3763
3764 * win32-low.c: Throughout, fix format strings and casts of
3765 printf-like functions to avoid type related warnings on all
3766 platforms.
3767 (get_child_debug_event): Print dwDebugEventCode as hex since
3768 that's how it's usually documented.
3769
736cd585
YQ
37702013-02-28 Yao Qi <yao@codesourcery.com>
3771
3772 * tracepoint.c (cmd_qtbuffer): Call phex_nz instead of
3773 pulongest.
3774
e1f58301
JW
37752013-02-27 Jiong Wang <jiwang@tilera.com>
3776
3777 * Makefile.in (clean): Remove reg-tilegx.c, reg-tilegx32.c.
3778 (reg-tilegx32.c): New rule.
3779 * configure.srv (tilegx-*-linux*): Add reg-tilegx32.o to srv_regobj.
3780 * linux-tile-low.c (tile_arch_setup): New function. Invoke
3781 different register info initializer according to elf class.
3782 (init_registers_tilgx32): New function. The tilegx32 register info
3783 initializer.
3784 (tile_fill_gregset): Use "uint_reg_t" to represent register size.
3785 (tile_store_gregset): Likewise.
3786
d171ca78
YQ
37872013-02-27 Yao Qi <yao@codesourcery.com>
3788
3789 * server.c (process_point_options): Print debug message when
3790 debug_threads is true.
3791
282bbdf3
YQ
37922013-02-26 Yao Qi <yao@codesourcery.com>
3793
3794 * tracepoint.c (cmd_qtbuffer): Don't set '\0' in OWN_BUF.
3795
aca22551
PA
37962013-02-19 Pedro Alves <palves@redhat.com>
3797 Kai Tietz <ktietz@redhat.com>
3798
3799 PR gdb/15161
3800
3801 * server.c (handle_query) <CRC check>: Use unpack_varlen_hex
3802 instead of strtoul to extract address from packet.
3803 (process_serial_event) <'z'>: Likewise.
3804
4f3cee1c
YQ
38052013-02-18 Yao Qi <yao@codesourcery.com>
3806
3807 * linux-bfin-low.c (the_low_target): Use NULL instead of 0.
3808
8e1d55a3
PA
38092013-02-14 Pedro Alves <palves@redhat.com>
3810
3811 Plug memory leak.
3812
3813 * tracepoint.c (cmd_qtnotes): Free TRACING_USER_NAME,
3814 TRACING_NOTES and TRACING_STOP_NOTE before clobbering.
3815
458820da
PA
38162013-02-14 Pedro Alves <palves@redhat.com>
3817
3818 * tracepoint.c (cmd_qtdpsrc): Use savestring.
3819
baea0dae
PA
38202013-02-14 Pedro Alves <palves@redhat.com>
3821
3822 * tracepoint.c (save_string): Delete.
3823 (add_tracepoint_action): Use savestring instead of save_string.
3824
0b1afbb3
PA
38252013-02-12 Pedro Alves <palves@redhat.com>
3826
3827 * linux-xtensa-low.c: Ditto.
3828 * xtensa-xtregs.c: Ditto.
3829
8a4ac37e
PA
38302013-02-12 Sanimir Agovic <sanimir.agovic@intel.com>
3831
3832 * thread-db.c (thread_db_get_tls_address): NULL pointer check
3833 thread_db.
3834
148de6bb
MS
38352013-02-07 Marcus Shawcroft <marcus.shawcroft@arm.com>
3836
3837 * linux-aarch64-low.c (aarch64_arch_setup): Clamp
3838 aarch64_num_wp_regs and aarch64_num_bp_regs to
3839 AARCH64_HWP_MAX_NUM and AARCH64_HBP_MAX_NUM respectively.
3840
55fac6e0
MS
38412013-02-07 Marcus Shawcroft <marcus.shawcroft@arm.com>
3842
3843 * linux-aarch64-low.c (ps_get_thread_area): Replace
3844 PTRACE_GET_THREAD_AREA with PTRACE_GETREGSET.
3845
176eb98c
MS
38462013-02-04 Jim MacArthur <jim.macarthur@arm.com>
3847 Marcus Shawcroft <marcus.shawcroft@arm.com>
3848 Nigel Stephens <nigel.stephens@arm.com>
3849 Yufeng Zhang <yufeng.zhang@arm.com>
3850
3851 * Makefile.in (clean): Remove aarch64.c and aarch64-without-fpu.c.
3852 (aarch64.c, aarch64-without-fpu.c): New targets.
3853 * configure.srv (aarch64*-*-linux*): New.
3854 * linux-aarch64-low.c: New file.
3855
56f7af9c
MS
38562013-02-04 Marcus Shawcroft <marcus.shawcroft@arm.com>
3857
43aaf8b6 3858 * linux-low.c (handle_extended_wait, linux_create_inferior)
56f7af9c
MS
3859 (linux_attach_lwp_1, linux_kill_one_lwp, linux_attach_one_lwp)
3860 (dequeue_one_deferred_signal, linux_resume_one_thread)
3861 (fetch_register, linux_write_memory, linux_enable_event_reporting)
3862 (linux_tracefork_grandchild, linux_test_for_tracefork)
3863 (linux_read_offsets, linux_xfer_siginfo, linux_xfer_siginfo): Add
3864 PTRACE_ARG3_TYPE and PTRACE_ARG4_TYPE cast to ptrace arguments
3865 where the argument is 0.
3866
60f662b0
YQ
38672013-01-25 Yao Qi <yao@codesourcery.com>
3868
3869 * event-loop.c: Include "queue.h".
3870 (gdb_event_p): New typedef.
3871 (struct gdb_event) <next_event>: Remove.
3872 (event_queue): Change to QUEUE(gdb_event_p).
3873 (async_queue_event): Remove.
3874 (gdb_event_xfree): New.
3875 (initialize_event_loop): New.
3876 (process_event): Use API from QUEUE.
3877 (wait_for_event): Likewise.
3878 * server.c (main): Call initialize_event_loop.
3879 * server.h (initialize_event_loop): Declare.
3880
5ae4861a
YQ
38812013-01-18 Yao Qi <yao@codesourcery.com>
3882
3883 * ax.h (struct eval_agent_expr_context): New.
3884 (gdb_eval_agent_expr): Update declaration.
3885 * ax.c (gdb_eval_agent_expr): Remove argument REGCACHE and
3886 TFRAME. Add new argument CTX.
3887 * server.h (struct eval_agent_expr_context): Declare.
3888 (agent_mem_read, agent_tsv_read): Update declaration.
3889 (agent_mem_read_string): Likewise.
3890 * tracepoint.c (eval_tracepoint_agent_expr): Remove.
3891 (add_traceframe_block): Add new argument TPOINT.
3892 Increase TPOINT->traceframe_usage.
3893 (do_action_at_tracepoint): Call gdb_eval_agent_expr instead of
3894 eval_tracepoint_agent_expr.
3895 (condition_true_at_tracepoint): Likewise.
3896 (agent_mem_read): Remove argument TFRAME. Add argument CTX.
3897 (agent_mem_read_string, agent_tsv_read): Likewise.
3898
85e00e85
YQ
38992013-01-16 Yao Qi <yao@codesourcery.com>
3900
3901 * linux-low.c (linux_resume_one_lwp): Don't check
3902 'lwp->bp_reinsert != 0'.
3903
4039cf45
JB
39042013-01-07 Joel Brobecker <brobecker@adacore.com>
3905 Pedro Alves <palves@redhat.com>
3906
3907 * lynx-low.c (ptrace_request_to_str): Define a temporary
3908 macro and use it to simplify this function's implementation.
3909
9044dee2
JB
39102013-01-07 Joel Brobecker <brobecker@adacore.com>
3911
3912 * lynx-low.c (lynx_resume): Call perror_with_name if lynx_ptrace
3913 sets errno.
3914
e6352c8f
JB
39152013-01-07 Joel Brobecker <brobecker@adacore.com>
3916
3917 * configure.srv (i[34567]86-*-lynxos*): Set srv_xmlfiles.
3918
50681a27
JB
39192013-01-07 Joel Brobecker <brobecker@adacore.com>
3920
3921 * configure.srv (powerpc-*-lynxos*): Set srv_xmlfiles.
3922
3f6e77ef
JB
39232013-01-07 Joel Brobecker <brobecker@adacore.com>
3924
3925 * lynx-low.c (lynx_resume): Use the resume_info parameter
3926 to determine the ptid for the lynx_ptrace call, unless
3927 it is equal to minus_one_ptid, in which case we use the
3928 ptid of the current_inferior.
3929 (lynx_wait_1): After having received a thread create/exit
3930 event, resume the inferior's execution using the signaling
3931 thread's ptid, rather than the old ptid.
3932
7fda33ae
JB
39332013-01-07 Joel Brobecker <brobecker@adacore.com>
3934
3935 * lynx-low.c (lynx_resume): Delete variable ret.
3936
b9786c74
JB
39372013-01-01 Joel Brobecker <brobecker@adacore.com>
3938
3939 * gdbreplay.c (gdbreplay_version): Update copyright year.
3940 * server.c (gdbserver_version): Likewise.
3941
8b93d60f
JB
39422012-12-17 Joel Brobecker <brobecker@adacore.com>
3943
3944 * lynx-low.c (lynx_wait_1): Add debug trace before adding
3945 new thread.
3946
037335a7
JB
39472012-12-17 Joel Brobecker <brobecker@adacore.com>
3948
3949 * lynx-low.c (ptrace_request_to_str): Add handling for
3950 PTRACE_GETTRACESIG.
3951
52d4cbd8
JB
39522012-12-17 Joel Brobecker <brobecker@adacore.com>
3953
3954 * lynx-low.c (lynx_attach): Delete variable new_process.
3955
ab8f6ca9
JB
39562012-12-17 Joel Brobecker <brobecker@adacore.com>
3957
3958 * lynx-low.c (lynx_create_inferior): Delete variable
3959 new_process.
3960
78cbc024
JB
39612012-12-17 Joel Brobecker <brobecker@adacore.com>
3962
3963 * lynx-low.c (ptrace_request_to_str): Do not handle
3964 PTRACE_GETTHREADLIST if this macro does not exist.
3965
14a00470
YQ
39662012-12-15 Yao Qi <yao@codesourcery.com>
3967
3968 * Makefile.in (OBS): Add notif.o.
3969 * notif.c, notif.h: New.
3970 * server.c: Include "notif.h".
3971 (struct vstop_notif) <next>: Remove.
3972 <base>: New field.
3973 (queue_stop_reply): Update.
3974 (push_event, send_next_stop_reply): Remove.
3975 (discard_queued_stop_replies): Update.
3976 (notif_stop): New variable.
3977 (handle_v_stopped): Remove.
3978 (handle_v_requests): Don't call handle_v_stopped. Call
3979 handle_ack_notif instead.
3980 (queue_stop_reply_callback): Call notif_event_enque instead
3981 of queue_stop_reply.
3982 (handle_status): Don't call send_next_stop_reply, call
3983 notif_write_event instead.
3984 (kill_inferior_callback): Likewise.
3985 (detach_or_kill_inferior_callback): Likewise.
3986 (main): Call initialize_notif.
3987 (process_serial_event): Call QUEUE_is_empty.
3988 (handle_target_event): Call notif_push instead of push event.
3989 * server.h (push_event): Remove declaration.
3990
61c125b9
TT
39912012-12-10 Tom Tromey <tromey@redhat.com>
3992
3993 * Makefile.in (DEPMODE, DEPDIR, depcomp, COMPILE.pre)
3994 (COMPILE.post, COMPILE, POSTCOMPILE, IPAGENT_COMPILE): New
3995 macros.
3996 (.c.o): Rewrite.
3997 (ax-ipa.o, tracepoint-ipa.o, utils-ipa.o, format-ipa.o)
3998 (common-utils-ipa.o, remote-utils-ipa.o, regcache-ipa.o)
3999 (i386-linux-ipa.o, linux-i386-ipa.o, linux-amd64-ipa.o)
4000 (amd64-linux-ipa.o, ax.o): Rewrite.
4001 (event-loop.o, hostio.o, hostio-errno.o, inferiors.o, mem-break.o)
4002 (proc-service.o, regcache.o, remote-utils.o, server.o, target.o)
4003 (thread-db.o, tracepoint.o, utils.o, gdbreplay.o, dll.o): Remove.
4004 (signals.o, linux-procfs.o, linux-ptrace.o, common-utils.o, vec.o)
4005 (gdb_vecs.o, xml-utils.o, linux-osdata.o, ptid.o, buffer.o)
4006 (format.o, agent.o, vasprintf.o, vsnprintf.o): Rewrite.
4007 (i386-low.o, i387-fp.o, linux-low.o, linux-arm-low.o)
4008 (linux-bfin-low.o, linux-cris-low.o, linux-crisv32-low.o)
4009 (linux-ia64-low.o, linux-m32r-low.o, linux-mips-low.o)
4010 (linux-ppc-low.o, linux-s390-low.o, linux-sh-low.o)
4011 (linux-tic6x-low.o, linux-x86-low.o, linux-xtensa-low.o)
4012 (linux-tile-low.o, lynx-low.o, lynx-ppc-low.o, nto-low.o)
4013 (nto-x86-low.o, linux-low.o, win32-low.o, win32-arm-low.o)
4014 (win32-i386-low.o, spu-low.o, reg-arm.o, arm-with-iwmmxt.o)
4015 (arm-with-vfpv2.o, arm-with-vfpv3.o, arm-with-neon.o, reg-bfin.o)
4016 (reg-cris.o, reg-crisv32.o, i386.o, i386-linux.o, i386-avx.o)
4017 (i386-avx-linux.o, i386-mmx.o, i386-mmx-linux.o, reg-ia64.o)
4018 (reg-m32r.o, reg-m68k.o, reg-cf.o, mips-linux.o, mips-dsp-linux.o)
4019 (mips64-linux.o, mips64-dsp-linux.o, powerpc-32.o, powerpc-32l.o)
4020 (powerpc-altivec32l.o, powerpc-cell32l.o, powerpc-vsx32l.o)
4021 (powerpc-isa205-32l.o, powerpc-isa205-altivec32l.o)
4022 (powerpc-isa205-vsx32l.o, powerpc-e500l.o, powerpc-64l.o)
4023 (powerpc-altivec64l.o, powerpc-cell64l.o, powerpc-vsx64l.o)
4024 (powerpc-isa205-64l.o, powerpc-isa205-altivec64l.o)
4025 (powerpc-isa205-vsx64l.o, s390-linux32.o, s390-linux32v1.o)
4026 (s390-linux32v2.o, s390-linux64.o, s390-linux64v1.o)
4027 (s390-linux64v2.o, s390x-linux64.o, s390x-linux64v1.o)
4028 (s390x-linux64v2.o, tic6x-c64xp-linux.o, tic6x-c64x-linux.o)
4029 (tic6x-c62x-linux.o, reg-sh.o, reg-sparc64.o, reg-spu.o, amd64.o)
4030 (amd64-linux.o, amd64-avx.o, amd64-avx-linux.o, x32.o)
4031 (x32-linux.o, x32-avx.o, x32-avx-linux.o, reg-xtensa.o)
4032 (reg-tilegx.o): Remove.
4033 (all_object_files): New macro.
4034 Include .deps files.
4035 * aclocal.m4, configure: Rebuild.
4036 * acinclude.m4: Include depstand.m4, lead-dot.m4.
4037 * configure.ac: Invoke ZW_CREATE_DEPDIR,
4038 ZW_PROG_COMPILER_DEPENDENCIES. Compute GMAKE condition.
4039
e90e9ad9
TT
40402012-12-05 Tom Tromey <tromey@redhat.com>
4041
4042 PR gdb/14917:
4043 * server.h (current_insn_ptr, emit_error): Declare 'extern'.
4044
02d403bf 40452012-11-28 Markus Metzger <markus.t.metzger@intel.com>
945bf713
MM
4046
4047 * configure.ac: Check for linux/perf_event.h.
4048 * config.in: Regenerated.
4049 * configure: Regenerated.
4050
0270a750
PA
40512012-11-26 Maxime Villard <rustyBSD@gmx.fr>
4052
4053 * hostio.c (handle_readlink): Decrease buffer size
4054 parameter passed to readlink by one byte.
4055
8c29b58e
YQ
40562012-11-26 Yao Qi <yao@codesourcery.com>
4057
4058 * configure.ac (build_warnings): Append '-Wempty-body'.
4059 * configure: Regenerated.
4060 * linux-low.c (linux_create_inferior): Use braces for empty 'if'
4061 body.
4062
8bdce1ff
PM
40632012-11-15 Pierre Muller <muller@sourceware.org>
4064
4065 * configure.ac (AC_CHECK_HEADERS): Add wait.h header.
4066 * config.in: Regenerate.
4067 * configure: Regenerate.
4068 * linux-low.c: Use "gdb_stat.h" header instead of <sys/stat.h> header.
4069 Use "gdb_wait.h" header instead of <sys/wait.h> header.
4070 * lynx-low.c: Use "gdb_wait.h" header instead of <sys/wait.h> header.
4071 * remote-utils.c: Use "gdb_stat.h" header instead of <sys/stat.h>
4072 header.
4073 * server.c: Remove HAVE_WAIT_H conditional. Use "gdb_wait.h" header
4074 instead of <sys/wait.h> header.
4075 * spu-low.c: Use "gdb_wait.h" header instead of <sys/wait.h> header.
4076
02d403bf 40772012-11-13 Markus Metzger <markus.t.metzger@intel.com>
3ba6ad0f
MM
4078
4079 * Makefile.in: (INTERNAL_CFLAGS): Add -DGDBSERVER
4080 (various make rules): Remove -DGDBSERVER
4081
fbd5db48
YQ
40822012-11-09 Yao Qi <yao@codesourcery.com>
4083
4084 * spu-low.c (current_ptid): Move it to ..
4085 * gdbthread.h: ... here. New.
4086 * remote-utils.c (read_ptid): Use macro 'current_ptid'.
4087 * server.c (myresume, process_serial_event): Likewise.
4088 * thread-db.c (thread_db_find_new_threads): Likewise.
4089 * tracepoint.c (run_inferior_command): Likewise.
4090
b3dc46ff
AB
40912012-10-01 Andrew Burgess <aburgess@broadcom.com>
4092
4093 * server.c (handle_search_memory_1): Include access length in
4094 warning message.
4095
07c04788
HPN
40962012-09-05 Michael Brandt <michael.brandt@axis.com>
4097
4098 * linux-crisv32-low.c: Fix compile errors.
4099
918d227b
YQ
41002012-09-04 Yao Qi <yao@codesourcery.com>
4101
4102 * tracepoint.c (cmd_qtsv): Adjust debug message.
4103 Don't check CUR_TPOINT.
4104
18c1b81a
YQ
41052012-08-28 Yao Qi <yao@codesourcery.com>
4106
4107 * ax.c, tracepoint.c: Replace ATTR_FORMAT with ATTRIBUTE_PRINTF.
4108 * server.h: Include 'libiberty.h' and 'ansidecl.h'.
4109 (ATTR_NORETURN, ATTR_FORMAT, ATTR_MALLOC): Remove.
4110 Remove declarations of xmalloc, xreallloc, xstrdup and
4111 freeargv.
4112 * Makefile.in (libiberty_h): New.
4113 (server_h): Append dependencies 'libiberty.h' and 'ansidecl.h'.
4114 (linux-bfin-low.o): Append dependency 'libiberty.h'.
4115
dc82f37b
YQ
41162012-08-23 Yao Qi <yao@codesourcery.com>
4117
4118 * server.h: Remove declaration of 'xsnprintf'.
4119
406b1477
KS
41202012-08-22 Keith Seitz <keiths@redhat.com>
4121
4122 * server.h: Include build-gnulib-gbserver/config.h.
4123 * gdbreplay.c: Likewise.
4124
e6712ff1
DE
41252012-08-08 Doug Evans <dje@google.com>
4126
4127 * Makefile.in (SFILES): Add gdb_vecs.c.
4128 (OBS): Add gdb_vecs.o.
4129 (gdb_vecs_h, host_defs_h): New variables.
4130 (thread-db.o): Add $(gdb_vecs_h) dependency.
4131 (gdb_vecs.o): New rule.
4132 * thread-db.c: #include "gdb_vecs.h".
4133 (thread_db_load_search): Use a vector to iterate over path elements.
4134 Handle text appearing after "$pdir".
4135
4136 * configure.ac: Add check for strstr.
4137 * config.in: Regenerate.
4138 * configure: Regenerate.
4139
7c3270ae
UW
41402012-08-02 Ulrich Weigand <ulrich.weigand@linaro.org>
4141
4142 * hostio.c (handle_pread): If pread fails, fall back to attempting
4143 lseek/read.
4144 (handle_pwrite): Likewise for pwrite.
4145
b62e2b27
UW
41462012-08-01 Ulrich Weigand <ulrich.weigand@linaro.org>
4147
4148 * linux-arm-low.c (arm_linux_hw_point_initialize): Distinguish
4149 between unsupported TYPE and unimplementable ADDR/LEN combination.
4150 (arm_insert_point): Act on new return value.
4151
78a99e91
PA
41522012-07-31 Pedro Alves <palves@redhat.com>
4153
4154 * server.c (process_point_options): Only skip tokens if we find
4155 one that is unrecognized. Don't treat 'X' specially while
4156 skipping unrecognized tokens.
4157
fcf303ab
UW
41582012-07-30 Ulrich Weigand <ulrich.weigand@linaro.org>
4159
4160 * linux-arm-low.c (arm_linux_hw_point_initialize): Do not attempt
4161 to 4-byte-align HW breakpoint addresses for Thumb.
4162
7255706c
YQ
41632012-07-27 Yao Qi <yao@codesourcery.com>
4164
4165 PR remote/14161.
4166
4167 * server.h: Declare gdb_agent_about_to_close.
4168 * target.c (kill_inferior): Include "agent.h".
4169 New. Send command 'kill'.
4170 * target.h (kill_inferior): Removed macro.
4171 * tracepoint.c (gdb_agent_about_to_close): New.
4172 (gdb_agent_helper_thread): Handle command 'close'.
4173 Wait endlessly until the inferior stops.
4174 Install gdb_agent_remove_socket to atexit hook.
4175 (agent_socket_name): New static variable.
4176 (gdb_agent_socket_init): Replace local variable 'name' with
4177 'agent_socket_name'.
4178 (gdb_agent_remove_socket): New.
4179
5a3f286f
YQ
41802012-07-27 Yao Qi <yao@codesourcery.com>
4181
4182 * server.c (process_point_options): Stop at 'X' when parsing.
4183
961bd387
ME
41842012-07-19 Michael Eager <eager@eagercon.com>
4185
a261b8f5 4186 * i386-low.c (Z_packet_to_hw_type): Add Z_PACKET_HW_BP, translate
961bd387
ME
4187 to hw_execute.
4188 * linux-x86-low.c (x86_insert_point, x86_remove_point):
4189 Call i386_low_insert_watchpoint, i386_low_remove_watchpoint to add/del
4190 hardware breakpoint.
4191
aa7c7447
JK
41922012-07-07 Jan Kratochvil <jan.kratochvil@redhat.com>
4193
4194 * gdbserver/linux-low.c (initialize_low): Call
4195 linux_ptrace_init_warnings.
4196
7f216e7c
DE
41972012-07-02 Doug Evans <dje@google.com>
4198
4199 * mem-break.c (gdb_no_commands_at_breakpoint): Fix cast from
4200 pointer to int.
4201
d3ce09f5
SS
42022012-07-02 Stan Shebs <stan@codesourcery.com>
4203
4204 * Makefile.in (WARN_CFLAGS_NO_FORMAT): Define.
4205 (ax.o): Add it to build rule.
4206 (ax-ipa.o): Ditto.
4207 (OBS): Add format.o.
4208 (IPA_OBS): Add format.o.
4209 * server.c (handle_query): Claim support for breakpoint commands.
4210 (process_point_options): Add command case.
4211 (process_serial_event): Leave running if there are printfs in
4212 effect.
4213 * mem-break.h (any_persistent_commands): Declare.
4214 (add_breakpoint_commands): Declare.
4215 (gdb_no_commands_at_breakpoint): Declare.
4216 (run_breakpoint_commands): Declare.
4217 * mem-break.c (struct point_command_list): New struct.
4218 (struct breakpoint): New field command_list.
4219 (any_persistent_commands): New function.
4220 (add_commands_to_breakpoint): New function.
4221 (add_breakpoint_commands): New function.
4222 (gdb_no_commands_at_breakpoint): New function.
4223 (run_breakpoint_commands): New function.
4224 * linux-low.c (linux_wait_1): Test for and run breakpoint commands
4225 locally.
4226 * ax.c: Include format.h.
4227 (ax_printf): New function.
4228 (gdb_eval_agent_expr): Add printf opcode.
4229
2f8f6aed
YQ
42302012-06-13 Yao Qi <yao@codesourcery.com>
4231
4232 * server.c (start_inferior): Remove duplicated writes to fields
4233 'last_resume_kind' and 'last_status' of 'current_inferior'.
4234
0c9070b3
YQ
42352012-06-12 Yao Qi <yao@codesourcery.com>
4236 Pedro Alves <palves@redhat.com>
4237
4238 * linux-low.c (linux_set_resume_request): Simplify predicate. Add
4239 comment.
4240 * server.c (handle_v_cont): Extend comment.
4241
c52daf70
YQ
42422012-06-11 Yao Qi <yao@codesourcery.com>
4243
4244 * linux-low.c (linux_attach): Add 'static'.
4245
d38bbb0a
YQ
42462012-06-06 Yao Qi <yao@codesourcery.com>
4247
4248 * ax.c (gdb_eval_agent_expr): Print `top' in hex.
4249
89dc0afd
JK
42502012-06-01 Jan Kratochvil <jan.kratochvil@redhat.com>
4251
4252 Fix gcc -flto compilation warning.
4253 * server.c (main): Make variable multi_mode and attach volatile.
4254
75f62ce7
TJB
42552012-05-30 Thiago Jung Bauermann <thiago.bauermann@linaro.org>
4256
4257 * linux-low.c (get_r_debug): Disable code using DT_MIPS_RLD_MAP
4258 if the platform doesn't know about it.
4259
65f479b6
PA
42602012-05-30 Jeff Kenton <jkenton@tilera.com>
4261
4262 * Makefile.in (SFILES): Add linux-tile-low.c.
4263 (linux-tile-low.o, reg-tilegx.o, reg-tilegx.c): New rules.
4264 * configure.srv: Handle tilegx-*-linux*.
4265 * linux-tile-low.c: New file.
4266
0c5bf5a9
JK
42672012-05-28 Jan Kratochvil <jan.kratochvil@redhat.com>
4268
4269 * linux-low.c (linux_qxfer_libraries_svr4): Return -1 if R_DEBUG is -1.
4270
a493e3e2
PA
42712012-05-24 Pedro Alves <palves@redhat.com>
4272
4273 PR gdb/7205
4274
43aaf8b6 4275 Replace TARGET_SIGNAL_ with GDB_SIGNAL_ throughout.
a493e3e2 4276
2ea28649
PA
42772012-05-24 Pedro Alves <palves@redhat.com>
4278
4279 PR gdb/7205
4280
4281 Replace target_signal with gdb_signal throughout.
4282
8d409d16
MR
42832012-05-22 Maciej W. Rozycki <macro@codesourcery.com>
4284
4285 * linux-low.c (linux_store_registers): Avoid the copying sequence
4286 when no data has been retrieved by ptrace.
4287
23512c01
MGD
42882012-05-22 Will Deacon <will.deacon@arm.com>
4289
4290 * linux-low (__UCLIBC__ && !(__UCLIBC_HAS_MMU__ || __ARCH_HAS_MMU__)):
4291 Include asm/ptrace.h.
4292 (PT_TEXT_ADDR, PT_DATA_ADDR, PT_TEXT_END_ADDR): Define only if not
4293 already defined.
4294
4934b29e
MR
42952012-05-21 Maciej W. Rozycki <macro@codesourcery.com>
4296
4297 * linux-low.c (linux_store_registers): Don't re-retrieve data
4298 with ptrace that has already been obtained from /proc. Always
4299 copy any data retrieved with ptrace to the buffer supplied.
4300
bde24c0a
PA
43012012-05-11 Yao Qi <yao@codesourcery.com>
4302 Pedro Alves <palves@redhat.com>
4303
4304 * linux-low.c (enum stopping_threads_kind): New.
4305 (stopping_threads): Change type to `enum stopping_threads_kind'.
4306 (handle_extended_wait): If stopping and suspending threads, leave
4307 the new_lwp suspended too.
4308 (linux_wait_for_event): Adjust.
4309 (stop_all_lwps): Set `stopping_threads' to
4310 STOPPING_AND_SUSPENDING_THREADS or STOPPING_THREADS depending on
4311 whether we're suspending threads or just stopping them. Assert no
4312 recursion happens.
4313
623b6bdf
YQ
43142012-04-29 Yao Qi <yao@codesourcery.com>
4315
4316 * server.h: Move some code to ...
4317 * gdbthread.h: ... here. New.
4318 * Makefile.in (inferiors.o, regcache.o): Depends on gdbthread.h
4319 (remote-utils.o, server.o, target.o tracepoint.o): Likewise.
4320 (nto-low.o, win32-low.o): Likewise.
4321 * inferiors.c, linux-low.h, nto-low.c: Include gdbthread.h.
4322 * regcache.c, remote-utils.c, server.c: Likewise.
4323 * target.c, tracepoint.c, win32-low.c: Likewise.
4324
f15f9948
TJB
43252012-04-24 Thiago Jung Bauermann <thiago.bauermann@linaro.org>
4326
4327 * linux-low.h (PTRACE_ARG3_TYPE): Move macro from linux-low.c.
4328 (PTRACE_ARG4_TYPE): Likewise.
4329 (PTRACE_XFER_TYPE): Likewise.
4330 * linux-arm-low.c (arm_prepare_to_resume): Cast third argument of
4331 ptrace to PTRACE_ARG3_TYPE.
4332 * linux-low.c (PTRACE_ARG3_TYPE): Move macro to linux-low.h.
4333 (PTRACE_ARG4_TYPE): Likewise.
4334 (PTRACE_XFER_TYPE): Likewise.
4335 (linux_detach_one_lwp): Cast fourth argument of
4336 ptrace to long then PTRACE_ARG4_TYPE.
4337 (regsets_fetch_inferior_registers): Cast third argument of
4338 ptrace to long then PTRACE_ARG3_TYPE.
4339 (regsets_store_inferior_registers): Likewise.
4340
38ea300a
PA
43412012-04-20 Pedro Alves <palves@redhat.com>
4342
4343 * configure: Regenerate.
4344
c971b7fa
PA
43452012-04-19 Pedro Alves <palves@redhat.com>
4346
43aaf8b6 4347 * Makefile.in (GNULIB_BUILDDIR): New.
c971b7fa 4348 (LIBGNU, INCGNU, GNULIB_H): Adjust.
43aaf8b6
PA
4349 (SUBDIRS, CLEANDIRS, REQUIRED_SUBDIRS): New.
4350 (all, install-only, uninstall, clean-info, all-lib, clean): No
4351 longer pass GNULIB_FLAGS_TO_PASS. Use subdir_do.
4352 (maintainer-clean realclean distclean): Use subdir_do.
4353 (subdir_do): New.
4354 (gnulib/import/Makefile): Adjust. Replace gnulib/import with
c971b7fa 4355 $(GNULIB_BUILDDIR). Don't pass argument to config.status.
43aaf8b6
PA
4356 * acinclude.m4: Include acx_configure_dir.m4.
4357 * configure.ac: Remove gl_EARLY, gl_INIT, and AM_INIT_AUTOMAKE
4358 calls. Call AC_PROG_RANLIB. Configure gnulib using
4359 ACX_CONFIGURE_DIR.
4360 (GNULIB): New.
4361 (GNULIB_STDINT_H): Adjust.
4362 (AC_OUTPUT): Don't output gnulib/Makefile anymore.
4363 * gdbreplay.c: Include build-gnulib/config.h.
4364 * server.h: Likewise.
4365 * aclocal.m4: Regenerate.
4366 * config.in: Regenerate.
4367 * configure: Regenerate.
c971b7fa 4368
809277f8
PA
43692012-04-19 Pedro Alves <palves@redhat.com>
4370
4371 * Makefile.in (LIBGNU, INCGNU): Adjust.
4372 (GNULIB_FLAGS_TO_PASS, GNULIB_H): Adjust.
4373 (all, install-only, uninstall, clean-info, all-lib, clean)
4374 (maintainer-clean, Makefile, gnulib/Makefile): Adjust.
4375 * configure.ac: Adjust AC_OUTPUT output.
4376 * aclocal.m4: Regenerate.
4377 * configure: Regenerate.
4378
fd9bb8b8
PA
43792012-04-19 Pedro Alves <palves@redhat.com>
4380
4381 * Makefile.in (generated_files): New.
4382 (server_h): Remove the explicit dependency on config.h, and depend
4383 on $generated_files.
4384
1c298c66
PA
43852012-04-19 Pedro Alves <palves@redhat.com>
4386
4387 * Makefile.in (INCGNU): Add -Ignulib.
4388
57c4b50b
PA
43892012-04-19 Pedro Alves <palves@redhat.com>
4390
4391 * Makefile.in (GNULIB_INCLUDE_DIR): Rename to ...
4392 (INCGNU): ... this, and spell out -I here.
4393 (GNULIB_LIB): Rename to ...
4394 (LIBGNU): ... this.
4395 (INCLUDE_CFLAGS, gdbserver$(EXEEXT), $(GNULIB_LIB) rule): Adjust.
4396
1030e047
PA
43972012-04-19 Pedro Alves <palves@redhat.com>
4398
4399 * config.in: Regenerate.
4400
447d4319
PA
44012012-04-19 Pedro Alves <palves@redhat.com>
4402
4403 * configure.ac: Remove AC_CHECK_DECLS check for memmem.
4404 * server.h (memmem): Remove declaration.
4405 * config.in: Regenerate.
4406 * configure: Regenerate.
4407
aad9eab9
YQ
44082012-04-19 Yao Qi <yao@codesourcery.com>
4409
4410 * Makefile.in (SFILES): Add common/vec.c.
4411 (OBS): Add vec.o.
4412 (vec.o): New rule.
4413
3e10640f
YQ
44142012-04-19 Yao Qi <yao@codesourcery.com>
4415
4416 * remote-utils.c (prepare_resume_reply): Replace with macro
4417 target_core_of_thread.
4418 * server.c (handle_qxfer_threads_proper): Likewise.
4419 * target.h (traget_core_of_thread): New macro.
4420
71622373
PA
44212012-04-18 Pedro Alves <palves@redhat.com>
4422
4423 * aclocal.m4: Regenerate.
4424 * configure: Regenerate.
4425
80d26939
YQ
44262012-04-16 Yao Qi <yao@codesourcery.com>
4427
4428 * tracepoint.c (cmd_qtstart): Download tracepoints even when they are
4429 duplicated on address.
4430
42476b70
YQ
44312012-04-16 Yao Qi <yao@codesourcery.com>
4432
4433 * tracepoint.c (COPY_FIELD_TO_BUF): New macro.
4434 (struct tracepoint_action_ops) <send>: New field.
4435 (m_tracepoint_action_send, r_tracepoint_action_send): New.
4436 (agent_expr_send, x_tracepoint_action_send): New.
4437 (l_tracepoint_action_send): New.
4438 (cmd_qtdp): Download and install tracepoint
4439 according to `use_agent'.
4440 (run_inferior_command): Add one more parameter `len'.
4441 Update callers.
4442 (tracepoint_send_agent): New.
4443 (cmd_qtdp, cmd_qtstart): Call tracepoint_send_agent.
4444
7bc83639
YQ
44452012-04-16 Yao Qi <yao@codesourcery.com>
4446
4447 * tracepoint.c (download_tracepoints): Moved to ...
4448 (cmd_qtstart): ... here.
4449
5f18041e
YQ
44502012-04-14 Yao Qi <yao@codesourcery.com>
4451
4452 * tracepoint.c: Include inttypes.h.
4453 (struct collect_memory_action): Use sized types.
4454 (struct tracepoint): Likewise.
4455 (cmd_qtdp, stop_tracing): Update print specifiers.
4456 (cmd_qtp, response_tracepoint): Likewise.
4457 (collect_data_at_tracepoint): Likewise.
4458 (collect_data_at_step): Likewise.
4459
55a8c076
YQ
44602012-04-14 Yao Qi <yao@codesourcery.com>
4461
4462 Import gnulib module inttypes.
4463 * aclocal.m4, config.in, configure: Regenerated.
4464
dc750257
YQ
44652012-04-14 Yao Qi <yao@codesourcery.com>
4466
4467 * Makefile.in (maintainer-clean, realclean, distclean): Remove
4468 Makefile and config.status at last.
4469
0ab5faf9
YQ
44702012-04-13 Yao Qi <yao@codesourcery.com>
4471
4472 * tracepoint.c: Include stdint.h unconditionally.
4473
18f5fd81
TJB
44742012-04-13 Thiago Jung Bauermann <thiago.bauermann@linaro.org>
4475
4476 * acinclude.m4 (GDBSERVER_HAVE_THREAD_DB_TYPE): New macro based
4477 on BFD_HAVE_SYS_PROCFS_TYPE.
4478 * configure.ac: Look for lwpid_t and psaddr_t in libthread_db.h.
4479 * configure: Regenerate.
4480 * config.in: Likewise.
4481
4d47af5c
L
44822012-04-13 H.J. Lu <hongjiu.lu@intel.com>
4483
4484 * Makefile.in (clean): Also remove x32.c x32-linux.c
4485 x32-avx.c x32-avx-linux.c.
4486 (x32.o): New target.
4487 (x32.c): Likewise.
4488 (x32-linux.o): Likewise.
4489 (x32-linux.c): Likewise.
4490 (x32-avx.o): Likewise.
4491 (x32-avx.c): Likewise.
4492 (x32-avx-linux.o): Likewise.
4493 (x32-avx-linux.c): Likewise.
4494
4495 * configure.srv (srv_amd64_regobj): Add x32.o x32-avx.o.
4496 (srv_amd64_linux_regobj): Add x32-linux.o x32-avx-linux.o.
4497 (srv_i386_64bit_xmlfiles): Add i386/x32-core.xml.
4498 (srv_amd64_xmlfiles): Add i386/x32.xml i386/x32-avx.xml.
4499 (srv_amd64_linux_xmlfiles): Add i386/x32-linux.xml
4500 i386/x32-avx-linux.xml.
4501
4502 * linux-x86-low.c (init_registers_x32_linux): New prototype.
4503 (init_registers_x32_avx_linux): Likwise.
4504 (x86_linux_update_xmltarget): Call init_registers_x32_linux
4505 or init_registers_x32_avx_linux if linux_is_elf64 is false.
4506
ecedbe58
PA
45072012-04-13 Pedro Alves <palves@redhat.com>
4508
4509 * Makefile.in (GNULIB_FLAGS_TO_PASS): New.
4510 (FLAGS_TO_PASS): Don't change or set $top_srcdir, $srcdir and VPATH.
4511 (all, uninstall, clean-info, all-lib, clean, maintainer-clean)
4512 (realclean, distclean): Explicitly pass $GNULIB_FLAGS_TO_PASS to
4513 the sub-make.
4514
c92b5177
L
45152012-04-12 H.J. Lu <hongjiu.lu@intel.com>
4516
4517 * linux-x86-low.c (compat_x32_clock_t): New.
4518 (compat_x32_siginfo_t): Likewise.
4519 (compat_x32_siginfo_from_siginfo): Likewise.
4520 (siginfo_from_compat_x32_siginfo): Likewise.
4521 (linux_is_elf64): Likewise.
4522 (x86_siginfo_fixup): Call compat_x32_siginfo_from_siginfo
4523 and siginfo_from_compat_x32_siginfo for x32.
4524 (x86_arch_setup): Set linux_is_elf64.
4525
214d508e
L
45262012-04-12 H.J. Lu <hongjiu.lu@intel.com>
4527
4528 PR gdb/13969
4529 * linux-low.c (linux_pid_exe_is_elf_64_file): Also return the
4530 e_machine field.
4531 (linux_qxfer_libraries_svr4): Update call to elf_64_file_p.
4532 * linux-low.h (linux_pid_exe_is_elf_64_file): Updated.
4533 * linux-x86-low.c (x86_arch_setup): Check if GDBserver is
4534 compatible with process.
4535
c9a1864a
YQ
45362012-04-12 Yao Qi <yao@codesourcery.com>
4537
4538 * Makefile.in: Define abs_top_srcdir and abs_srcdir.
4539 (INCLUDE_CFLAGS): Append GNULIB_INCLUDE_DIR.
4540 (install-only, install-info, clean): Handle sub dir gnulib.
4541 (all-lib, am--refresh): New targets.
4542 (memmem.o): Remove target.
4543 * configure.ac: Remove AC_CONFIG_LIBOBJ_DIR.
4544 Invoke gl_EARLY. Invoke AC_CHECK_PROGS for make.
4545 (AC_REPLACE_FUNCS): Remove memmem.
4546 Invoke gl_INIT and AM_INIT_AUTOMAKE.
4547 (AC_OUTPUT): Generate Makefile in gnulib/.
4548 * aclocal.m4, config.in, configure: Regenerated.
4549
367ba2c2
MR
45502012-04-10 Maciej W. Rozycki <macro@codesourcery.com>
4551
4552 * linux-low.c (get_r_debug): Handle DT_MIPS_RLD_MAP.
4553
9d236627
PA
45542012-04-05 Pedro Alves <palves@redhat.com>
4555
4556 -Werror=strict-aliasing
4557
4558 * spu-low.c (parse_spufs_run): Avoid dereferencing type-punned
4559 pointer.
4560
111217b3
PA
45612012-04-04 Pedro Alves <palves@redhat.com>
4562
4563 * linux-sparc-low.c (sparc_fill_gregset_to_stack)
4564 (sparc_store_gregset_from_stack, sparc_store_gregset)
4565 (sparc_breakpoint_at): Fix formatting.
4566
8365dcf5
TJB
45672012-03-30 Thiago Jung Bauermann <thiago.bauermann@linaro.org>
4568
4569 * configure.ac: Check whether Elf32_auxv_t and Elf64_auxv_t
4570 are available.
4571 * linux-low.c [HAVE_ELF32_AUXV_T] (Elf32_auxv_t): Add typedef.
4572 [HAVE_ELF64_AUXV_T] (Elf64_auxv_t): Likewise.
4573 * config.in: Regenerate.
4574 * configure: Likewise.
4575
689cc2ae
PA
45762012-03-29 Pedro Alves <palves@redhat.com>
4577
4578 * linux-low.c (regsets_store_inferior_registers) [__sparc__]:
4579 Correct ptrace arguments.
4580
c14dfd32
PA
45812012-03-28 Pedro Alves <palves@redhat.com>
4582
4583 * linux-ia64-low.c (ia64_regmap): Map IA64_EC_REGNUM to PT_AR_EC.
4584 (IA64_GR0_REGNUM, IA64_FR0_REGNUM)
4585 (IA64_FR1_REGNUM): New defines.
4586 (ia64_fetch_register): New.
4587 (the_low_target): Install it.
4588 * linux-low.h (struct linux_target_ops) <fetch_register>: New
4589 field.
4590 * linux-low.c (linux_fetch_registers): Try the
4591 the_low_target.fetch_register hook first.
4592
4593 * linux-arm-low.c (the_low_target): Adjust.
4594 * linux-bfin-low.c (the_low_target): Adjust.
4595 * linux-cris-low.c (the_low_target): Adjust.
4596 * linux-crisv32-low.c (the_low_target): Adjust.
4597 * linux-m32r-low.c (the_low_target): Adjust.
4598 * linux-m68k-low.c (the_low_target): Adjust.
4599 * linux-mips-low.c (the_low_target): Adjust.
4600 * linux-ppc-low.c (the_low_target): Adjust.
4601 * linux-s390-low.c (the_low_target): Adjust.
4602 * linux-sh-low.c (the_low_target): Adjust.
4603 * linux-sparc-low.c (the_low_target): Adjust.
4604 * linux-tic6x-low.c (the_low_target): Adjust.
4605 * linux-x86-low.c (the_low_target): Adjust.
4606 * linux-xtensa-low.c (the_low_target): Adjust.
4607
63c88e13
PA
46082012-03-26 Pedro Alves <palves@redhat.com>
4609
4610 * server.c (handle_qxfer_libraries): Don't bail early if
4611 the_target->qxfer_libraries_svr4 is not NULL.
4612
fb723180
PA
46132012-03-26 Pedro Alves <palves@redhat.com>
4614
4615 * linux-low.c (linux_qxfer_libraries_svr4): Fix pasto in comment.
4616
0afae3cf
PA
46172012-03-23 Pedro Alves <palves@redhat.com>
4618
4619 * linux-low.c (linux_qxfer_libraries_svr4): Terminate the
4620 "library-list-svr4" element's start tag when the the DSO list is
4621 empty.
4622
485f1ee4
PA
46232012-03-23 Pedro Alves <palves@redhat.com>
4624
4625 * linux-low.c (read_one_ptr): Read the inferior's pointer through
4626 a variable whose type size is the same as the inferior's pointer
4627 size.
4628
a5362b9a
TS
46292012-03-21 Thomas Schwinge <thomas@codesourcery.com>
4630
4631 * linux-arm-low.c (arm_stopped_by_watchpoint): Use siginfo_t instead of
4632 struct siginfo.
4633 * linux-low.c (siginfo_fixup, linux_xfer_siginfo): Likewise.
4634 * linux-x86-low.c (x86_siginfo_fixup): Likewise.
4635 * linux-low.h: Include <signal.h>.
4636 (struct siginfo): Remove forward declaration.
4637 (struct linux_target_ops) <siginfo_fixup>: Use siginfo_t instead of
4638 struct siginfo.
4639
d226c142
MF
46402012-03-21 Mike Frysinger <vapier@gentoo.org>
4641
4642 * .gitignore: Ignore more files.
4643
122f36ef
PA
46442012-03-19 Pedro Alves <palves@redhat.com>
4645 Jan Kratochvil <jan.kratochvil@redhat.com>
4646
4647 * server.c (cont_thread, general_thread): Add describing comments.
4648 (start_inferior): Clear `cont_thread'.
4649 (handle_v_cont): Don't set `cont_thread' if resuming all threads
4650 of a process.
4651
fc3e5175
YQ
46522012-03-15 Yao Qi <yao@codesourcery.com>
4653
4654 * tracepoint.c (install_tracepoint): Move duplicated tracepoint
4655 handling to ...
4656 (cmd_qtdp): ... here.
4657
8d0d92cd
YQ
46582012-03-15 Yao Qi <yao@codesourcery.com>
4659
4660 * tracepoint.c (struct tracepoint_action_ops): New.
4661 (struct tracepoint_action) [!IN_PROCESS_AGENT] <ops>: New field.
4662 (m_tracepoint_action_download): New.
4663 (r_tracepoint_action_download): New.
4664 (x_tracepoint_action_download): New.
4665 (l_tracepoint_action_download): New.
4666 (add_tracepoint_action): Install `action->ops' according type.
4667 (download_tracepoint_1): Move code `download' function pointer
4668 of various tracepoint_action_ops.
4669
87b0bb13
JK
46702012-03-13 Jan Kratochvil <jan.kratochvil@redhat.com>
4671
4672 * linux-low.c (linux_attach_lwp_1): New variable buffer. Call
4673 linux_ptrace_attach_warnings.
4674
5f572dec
JK
46752012-03-13 Jan Kratochvil <jan.kratochvil@redhat.com>
4676
4677 * Makefile.in (linux-ptrace.o): New.
4678 * configure.srv (arm*-*-linux*, bfin-*-*linux*, crisv32-*-linux*)
4679 (cris-*-linux*, i[34567]86-*-linux*, ia64-*-linux*, m32r*-*-linux*)
4680 (m68*-*-linux*, m68*-*-uclinux*, mips*-*-linux*, powerpc*-*-linux*)
4681 (s390*-*-linux*, sh*-*-linux*, sparc*-*-linux*, tic6x-*-uclinux)
4682 (x86_64-*-linux*, xtensa*-*-linux*): Add linux-ptrace.o to SRV_TGTOBJ
4683 of these targets.
4684 * linux-low.c (linux_attach_lwp_1): Remove redundent else clause.
4685
f4647387
YQ
46862012-03-08 Yao Qi <yao@codesourcery.com>
4687 Pedro Alves <palves@redhat.com>
4688
4689 Fix PR server/13392.
4690 * linux-x86-low.c (amd64_install_fast_tracepoint_jump_pad): Check
4691 offset of JMP insn.
4692 * tracepoint.c (remove_tracepoint): New.
4693 (cmd_qtdp): Call remove_tracepoint when failed to install.
4694
9b224c5e
PA
46952012-03-07 Pedro Alves <palves@redhat.com>
4696
4697 * linux-low.c (get_detach_signal): New.
4698 (linux_detach_one_lwp): Get rid of a pending SIGSTOP with SIGCONT.
4699 Pass on pending signals to PTRACE_DETACH. Check the result of the
4700 ptrace call.
4701 * server.c (program_signals, program_signals_p): New.
4702 (handle_general_set): Handle QProgramSignals.
4703 * server.h (program_signals, program_signals_p): Declare.
4704
e237a7e2
JK
47052012-03-05 Pedro Alves <palves@redhat.com>
4706 Jan Kratochvil <jan.kratochvil@redhat.com>
4707
4708 * linux-low.c (get_dynamic): Don't warn when PT_PHDR isn't found.
4709 New comment why.
4710
5808517f
YQ
47112012-03-03 Yao Qi <yao@codesourcery.com>
4712
4713 * tracepoint.c (tracepoint_look_up_symbols): Update call to
4714 agent_look_up_symbols.
4715
58b4daa5
YQ
47162012-03-03 Yao Qi <yao@codesourcery.com>
4717
4718 * Makefile.in (linux-low.o): Keep dependence on agent.h.
4719 (linux-x86-low.o): Likewise.
4720 * server.h: Remove in_process_agent_loaded.
4721 * tracepoint.c (in_process_agent_loaded): Removed. Moved it
4722 common/agent.c.
4723 Update callers.
4724
8ffcbaaf
YQ
47252012-03-03 Yao Qi <yao@codesourcery.com>
4726
4727 * tracepoint.c (gdb_agent_capability): New global.
4728 (in_process_agent_loaded_ust): Renamed to
4729 `in_process_agent_supports_ust'.
4730 Update callers.
4731 (in_process_agent_supports_ust): Call agent_capability_check.
4732 (clear_installed_tracepoints): Assert that agent supports
4733 agent.
4734
d1feda86
YQ
47352012-03-03 Yao Qi <yao@codesourcery.com>
4736
4737 * linux-low.c (linux_supports_agent): New.
4738 (linux_target_ops): Initialize field `supports_agent' with
4739 linux_supports_agent.
4740 * target.h (struct target_ops) <supports_agent>: New.
4741 (target_supports_agent): New macro.
4742 * server.c (handle_general_set): Handle packet 'QAgent'.
4743 (handle_query): Send `QAgent+'.
4744 * Makefile.in (server.o): Depends on agent.h.
4745
2fa291ac
YQ
47462012-03-03 Yao Qi <yao@codesourcery.com>
4747
4748 * Makefile.in (OBS): Add agent.o.
4749 Add new rule for agent.o.
4750 Track dependence of tracepoint.c on agent.h.
4751 * tracepoint.c (run_inferior_command_1):
4752 (run_inferior_command): Call agent_run_command.
4753 (gdb_ust_connect_sync_socket): Deleted. Move it to
4754 common/agent.c.
4755 (resume_thread, stop_thread): Likewise.
4756 (gdb_ust_socket_init): Renamed to ...
4757 (gdb_agent_socket_init): ... New.
4758 (gdb_ust_thread): Renamed to ...
4759 (gdb_agent_helper_thread): ... New.
4760 (gdb_ust_init): Move some code to ...
4761 (gdb_agent_init): ... here. New.
4762 [HAVE_UST]: Call gdb_ust_init.
4763 (initialize_tracepoint_ftlib): Call gdb_agent_init.
4764 * configure.ac: Add `sys/un.h' to AC_CHECK_HEADERS.
4765 * config.in, configure: Regenerated.
4766
05044653
PA
47672012-03-02 Pedro Alves <palves@redhat.com>
4768
4769 * inferiors.c (add_pid_to_list, pull_pid_from_list): Delete.
4770 * linux-low.c (struct simple_pid_list): New.
4771 (stopped_pids): New a struct simple_pid_list pointer.
4772 (add_to_pid_list, pull_pid_from_list): New.
4773 (handle_extended_wait): Don't assume the first signal new children
4774 report is SIGSTOP. Adjust call to pull_pid_from_list.
4775 (linux_wait_for_lwp): Adjust.
4776
8d00225b
YQ
47772012-03-02 Yao Qi <yao@codesourcery.com>
4778
4779 * tracepoint.c (do_action_at_tracepoint): Write `stop_pc' in
4780 debug log.
4781
19560ba5
YQ
47822012-03-02 Yao Qi <yao@codesourcery.com>
4783
4784 * tracepoint.c (collect_ust_data_at_tracepoint): Remove parameters
4785 `stop_pc' and `tpoint'. Update caller.
4786
1faeff08
MR
47872012-03-01 Maciej W. Rozycki <macro@codesourcery.com>
4788
4789 * linux-low.h (linux_target_ops): Add regset_bitmap member.
4790 * linux-low.c (use_linux_regsets): New macro.
4791 [!HAVE_LINUX_REGSETS] (regsets_fetch_inferior_registers): Likewise.
4792 [!HAVE_LINUX_REGSETS] (regsets_store_inferior_registers): Likewise.
4793 (linux_register_in_regsets): New function.
4794 (usr_fetch_inferior_registers): Skip registers covered by
4795 regsets.
4796 (usr_store_inferior_registers): Likewise.
4797 (usr_fetch_inferior_registers): New macro.
4798 (usr_store_inferior_registers): Likewise.
4799 (linux_fetch_registers): Handle mixed regset/non-regset targets.
4800 (linux_store_registers): Likewise.
4801 * linux-mips-low.c (init_registers_mips_dsp_linux): New
4802 prototype.
4803 (init_registers_mips64_dsp_linux): Likewise.
4804 (init_registers_mips_linux): New macro.
4805 (init_registers_mips_dsp_linux): Likewise.
4806 (mips_dsp_num_regs): Likewise.
4807 (DSP_BASE, DSP_CONTROL): New fallback macros.
4808 (mips_base_regs): New macro.
4809 (mips_regmap): Use it. Fix the size.
4810 (mips_dsp_regmap): New variable.
4811 (mips_dsp_regset_bitmap): Likewise.
4812 (mips_arch_setup): New function.
4813 (mips_cannot_fetch_register): Use the_low_target.regmap rather
4814 than mips_regmap.
4815 (mips_cannot_store_register): Likewise.
4816 (the_low_target): Update .arch_setup, .num_regs and .regmap
4817 initializers. Add .regset_bitmap initializer.
4818 * linux-arm-low.c (the_low_target): Add .regset_bitmap
4819 initializer.
4820 * linux-bfin-low.c (the_low_target): Likewise.
4821 * linux-cris-low.c (the_low_target): Likewise.
4822 * linux-crisv32-low.c (the_low_target): Likewise.
4823 * linux-ia64-low.c (the_low_target): Likewise.
4824 * linux-m32r-low.c (the_low_target): Likewise.
4825 * linux-m68k-low.c (the_low_target): Likewise.
4826 * linux-ppc-low.c (the_low_target): Likewise.
4827 * linux-s390-low.c (the_low_target): Likewise.
4828 * linux-sh-low.c (the_low_target): Likewise.
4829 * linux-sparc-low.c (the_low_target): Likewise.
4830 * linux-tic6x-low.c (the_low_target): Likewise.
4831 * linux-x86-low.c (the_low_target): Likewise.
4832 * linux-xtensa-low.c (the_low_target): Likewise.
4833 * configure.srv <mips*-*-linux*>: Add mips-dsp-linux.o and
4834 mips64-dsp-linux.o to srv_regobj. Add mips-dsp-linux.xml,
4835 mips64-dsp-linux.xml, mips-dsp.xml and mips64-dsp.xml to
4836 srv_xmlfiles.
4837 * Makefile.in (mips-dsp-linux.o, mips-dsp-linux.c): New targets.
4838 (mips64-dsp-linux.o, mips64-dsp-linux.c): Likewise.
4839
c03e6ccc
YQ
48402012-02-29 Yao Qi <yao@codesourcery.com>
4841 Pedro Alves <palves@redhat.com>
4842
4843 * linux-low.c: (linux_wait_1): Call unsuspend_all_lwps when
4844 `step_over_finished' is true.
4845
644cebc9
PA
48462012-02-27 Pedro Alves <palves@redhat.com>
4847
4848 * linux-low.c (pid_is_stopped): Delete, moved to common/.
4849 (linux_attach_lwp_1): Adjust to use linux_proc_pid_is_stopped.
4850
c14d7ab2
PA
48512012-02-27 Pedro Alves <palves@redhat.com>
4852
4853 PR server/9684
4854 * linux-low.c (pid_is_stopped): New.
4855 (linux_attach_lwp_1): Handle attaching to 'T (stopped)' processes.
4856
412c89dd
LM
48572012-02-25 Luis Machado <lgustavo@codesourcery.com>
4858
4859 * mem-break.c (clear_gdb_breakpoint_conditions): Fix de-allocation
4860 of conditions.
4861
b745defe
MR
48622012-02-24 Maciej W. Rozycki <macro@codesourcery.com>
4863
4864 * linux-mips-low.c (mips_regmap): Correct the index of $f9.
4865
9f3a5c85
LM
48662012-02-24 Luis Machado <lgustavo@codesourcery>
4867
4868 * server.c (handle_query): Advertise support for target-side
4869 breakpoint condition evaluation.
4870 (process_point_options): New function.
4871 (process_serial_event): When inserting a breakpoint, check for
4872 a target-side condition that should be evaluated.
4873
4874 * mem-break.c: Include regcache.h and ax.h.
4875 (point_cond_list_t): New data structure.
4876 (breakpoint) <cond_list>: New field.
4877 (find_gdb_breakpoint_at): Make non-static.
4878 (delete_gdb_breakpoint_at): Clear any target-side
4879 conditions.
4880 (clear_gdb_breakpoint_conditions): New function.
4881 (add_condition_to_breakpoint): Likewise.
4882 (add_breakpoint_condition): Likewise.
4883 (gdb_condition_true_at_breakpoint): Likewise.
4884 (gdb_breakpoint_here): Return result directly instead
4885 of going through a local variable.
4886
4887 * mem-break.h (find_gdb_breakpoint_at): New prototype.
4888 (clear_gdb_breakpoint_conditions): Likewise.
4889 (add_breakpoint_condition): Likewise.
4890 (gdb_condition_true_at_breakpoint): Likewise.
4891
4892 * linux-low.c (linux_wait_1): Evaluate target-side breakpoint condition.
4893 (need_step_over_p): Take target-side breakpoint condition into
4894 consideration.
4895
5e1dc496
LM
48962012-02-24 Luis Machado <lgustavo@codesourcery>
4897
4898 * server.h: Include tracepoint.h.
4899 (agent_mem_read, agent_get_trace_state_variable_value,
4900 agent_set_trace_state_variable_value,
4901 agent_tsv_read, agent_mem_read_string, get_get_tsv_func_addr,
4902 get_set_tsv_func_addr): New prototypes.
4903
4904 * ax.h: New include file.
4905 * ax.c: New source file.
4906
4907 * tracepoint.c: Include ax.h.
4908 (gdb_agent_op, gdb_agent_op_names, gdb_agent_op_sizes,
4909 agent_expr, eval_result_type): Move to ax.h.
4910 (parse_agent_expr): Rename to ...
4911 (gdb_parse_agent_expr): ... this, make it non-static and move
4912 to ax.h.
4913 (unparse_agent_expr) Rename to ...
4914 (gdb_unparse_agent_expr): ... this, make it non-static and move
4915 to ax.h.
4916 (eval_agent_expr): Rename to ...
4917 (eval_tracepoint_agent_expr): ... this.
4918 (agent_mem_read, agent_mem_read_string, agent_tsv_read): Remove
4919 forward declarations.
4920 (add_tracepoint_action): Call gdb_parse_agent_expr (...).
4921 (agent_get_trace_state_variable_value): New function.
4922 (agent_set_trace_state_variable_value): New function.
4923 (cmd_qtdp): Call gdb_parse_agent_expr (...).
4924 (response_tracepoint): Call gdb_unparse_agent_expr (...).
4925 (do_action_at_tracepoint): Call eval_tracepoint_agent_expr (...).
4926 (condition_true_at_tracepoint): Likewise.
4927 (parse_agent_expr): Rename to ...
4928 (gdb_parse_agent_expr): ... this and move to ax.c.
4929 (unparse_agent_expr): Rename to ...
4930 (gdb_unparse_agent_expr): ... this and move to ax.c.
4931 (gdb_agent_op_name): Move to ax.c.
4932 (eval_agent_expr): Rename to ...
4933 (gdb_eval_agent_expr): ... this, use regcache passed as parameter
4934 and move to ax.c.
4935 (eval_tracepoint_agent_expr): New function.
4936 (agent_mem_read, agent_mem_read_string, agent_tsv_read): Make
43aaf8b6 4937 non-static.
5e1dc496
LM
4938 (current_insn_ptr, emit_error, struct bytecode_address): Move to
4939 ax.c.
4940 (emit_prologue, emit_epilogue, emit_add, emit_sub, emit_mul, emit_lsh,
4941 emit_rsh_signed, emit_rsh_unsigned, emit_ext, emit_log_not,
4942 emit_bit_and, emit_bit_or, emit_bit_xor, emit_bit_not, emit_equal,
4943 emit_less_signed, emit_less_unsigned, emit_ref, emit_if_goto,
4944 emit_goto, write_goto_address, emit_const, emit_reg, emit_pop,
4945 emit_stack, emit_zero_ext, emit_swap, emit_stack_adjust,
4946 emit_int_call_1, emit_void_call_2, emit_eq_goto, emit_ne_goto,
4947 emit_lt_goto, emit_ge_goto, emit_gt_goto, emit_le_goto): Move to ax.c.
4948 (get_get_tsv_func_addr, get_set_tsv_func_addr): New functions.
4949 (compile_bytecodes): Remove forward declaration.
4950 (is_goto_target): Move to ax.c.
4951 (compile_bytecodes): Move to ax.c and call
4952 agent_get_trace_state_variable_value (...) and
4953 agent_set_trace_state_variable_value (...).
4954
4955 * Makefile.in: Update ax.c and IPA dependencies.
4956
277e4e52
PA
49572012-02-24 Pedro Alves <palves@redhat.com>
4958
4959 * tracepoint.c (cmd_bigqtbuffer): Rename as ...
4960 (cmd_bigqtbuffer_circular): ... this. Only handle
4961 'QTBuffer:circular:'.
4962 (handle_tracepoint_general_set): Adjust.
4963
bf4c19f7
YQ
49642012-02-16 Yao Qi <yao@codesourcery.com>
4965
4966 * inferiors.c: Move code to ...
4967 * dll.c: .... here. New.
4968 * server.h: Declare clear_dlls.
4969 * Makefile.in (SFILES): Add dll.c.
4970 (OBS): Add dll.o
4971 (dll.o): New rule.
4972
d73f2619
YQ
49732012-02-11 Yao Qi <yao@codesourcery.com>
4974
4975 * server.c: (handle_monitor_command): Add a new parameter
4976 `own_buf'.
4977 (handle_query): Update caller.
4978
f8255c2a
JB
49792012-02-09 Joel Brobecker <brobecker@adacore.com>
4980
4981 * configure.ac: Add readlink to AC_CHECK_FUNCS list.
4982 * configure, config.in: Regenerate.
4983 * hostio.c: Provide an alternate implementation if HAVE_READLINK
4984 is not defined.
4985
da84f473
PA
49862012-02-02 Pedro Alves <palves@redhat.com>
4987
4988 Try SIGKILL first, then PTRACE_KILL.
4989 * linux-low.c (linux_kill_one_lwp): New.
4990 (linux_kill_one_lwp): Rename to ...
4991 (kill_one_lwp_callback): ... this. Use the new
4992 linux_kill_one_lwp.
4993
e886a173
PA
49942012-02-02 Pedro Alves <palves@redhat.com>
4995
4996 * tracepoint.c (cmd_qtminftpilen): Return 0 if there's no current
4997 inferior.
4998
be07f1a2
PA
49992012-01-27 Pedro Alves <palves@redhat.com>
5000
5001 * linux-low.c (linux_child_pid_to_exec_file): Delete.
5002 (elf_64_file_p): Make static.
5003 (linux_pid_exe_is_elf_64_file): New.
5004 * linux-low.h (linux_child_pid_to_exec_file, elf_64_file_p):
5005 Delete declarations.
5006 (linux_pid_exe_is_elf_64_file): Declare.
5007 * linux-x86-low.c (x86_arch_setup): Use
5008 linux_pid_exe_is_elf_64_file.
5009
d8301ad1
JK
50102012-01-25 Jan Kratochvil <jan.kratochvil@redhat.com>
5011
5012 * linux-low.c (linux_wait_for_event_1): Rename to ...
5013 (linux_wait_for_event): ... here and merge it with former
5014 linux_wait_for_event - new variable wait_ptid, use it.
5015 (linux_wait_for_event): Remove - merge it to linux_wait_for_event_1.
5016
01b17894
PA
50172012-01-23 Pedro Alves <palves@redhat.com>
5018
5019 * server.c (main): Avoid yet another case of infinite loop while
5020 detaching/killing after a longjmp.
5021
e825046f
JK
50222012-01-20 Jan Kratochvil <jan.kratochvil@redhat.com>
5023
5024 Code cleanup.
5025 * linux-low.c (linux_wait_for_event_1): Use ptid_is_pid.
5026
b9e7b9c3
UW
50272012-01-20 Ulrich Weigand <ulrich.weigand@linaro.org>
5028
5029 * hostio.c (handle_readlink): New function.
5030 (handle_vFile): Call it to handle "vFile:readlink" packets.
5031
901f9912
UW
50322012-01-20 Pedro Alves <palves@redhat.com>
5033 Ulrich Weigand <ulrich.weigand@linaro.org>
5034
5035 * server.c (handle_v_requests): Only support vAttach and vRun to
5036 start multiple processes when in extended protocol mode.
5037
fc1ab1a0
PA
50382012-01-17 Pedro Alves <palves@redhat.com>
5039
5040 * tracepoint.c (initialize_tracepoint): Use mmap instead of
5041 memalign plus mprotect to allocate the scratch buffer.
5042
7d5d4e98
PA
50432012-01-13 Pedro Alves <palves@redhat.com>
5044
5045 * server.c (attach_inferior): Clear `cont_thread'.
5046
f128d5e9
PA
50472012-01-13 Pedro Alves <palves@redhat.com>
5048
5049 * server.c (main): Avoid infinite loop while detaching/killing
5050 after a longjmp.
5051
06db92f0
DE
50522012-01-09 Doug Evans <dje@google.com>
5053
5054 * server.c (start_inferior): Set last_ptid in --wrapper case.
5055
32d92999
YQ
50562012-01-06 Yao Qi <yao@codesourcery.com>
5057
5058 * tracepoint.c [IN_PROCESS_AGENT] (debug_threads): Macro
5059 defined.
5060 [IN_PROCESS_AGENT] (debug_agent): New global variable.
5061
5e0a92a9
YQ
50622012-01-04 Yao Qi <yao@codesourcery.com>
5063
5064 * tracepoint.c (cmd_qtdp): Print debug message
5065 for static tracepoint.
5066
ae639e8c
YQ
50672012-01-04 Yao Qi <yao@codesourcery.com>
5068
5069 * tracepoint.c (trace_vdebug): Differentiate debug message
5070 between gdbserver and IPA.
5071
f72429c5
YQ
50722012-01-03 Yao Qi <yao@codesourcery.com>
5073
5074 * tracepoint.c (tracepoint_was_hit): Don't collect for
5075 static tracepoint.
5076
12c3e59c
JB
50772012-01-02 Joel Brobecker <brobecker@adacore.com>
5078
5079 * terminal.h: Reformat copyright header.
5080
67827812
JB
50812012-01-02 Joel Brobecker <brobecker@adacore.com>
5082
5083 * server.c (gdbserver_version): Update copyright year.
5084 * gdbreplay.c (gdbreplay_version): Likewise.
5085
3e52c33d
JK
50862011-12-18 Jan Kratochvil <jan.kratochvil@redhat.com>
5087
5088 * linux-low.c (linux_create_inferior): Put empty if clause for write.
5089
5090 Revert:
5091 2011-12-18 Hui Zhu <teawater@gmail.com>
5092 * linux-low.c (linux_create_inferior): Save return value to ret.
5093
66f1260e
HZ
50942011-12-18 Hui Zhu <teawater@gmail.com>
5095
5096 * linux-low.c (linux_create_inferior): Save return value to ret.
5097
e77616d7
DE
50982011-12-16 Doug Evans <dje@google.com>
5099
e7b06c57
DE
5100 * linux-low.c (linux_create_inferior): If stdio connection,
5101 redirect stdin from /dev/null, stdout to stderr.
5102 * remote-utils.c (remote_is_stdio): New static global.
5103 (remote_connection_is_stdio): New function.
5104 (remote_prepare): Handle stdio connection.
5105 (remote_open): Ditto.
5106 (remote_close): Don't close stdin for stdio connections.
5107 (read_prim,write_prim): New functions. Replace all calls to
5108 read/write to these.
5109 * server.c (main): Watch for "-" argument. Move call to
5110 remote_prepare before start_inferior.
5111 * server.h (STDIO_CONNECTION_NAME): New macro.
5112 (remote_connection_is_stdio): Declare.
5113
e77616d7
DE
5114 * remote-utils.c (prepare_resume_reply): Remove extraneous \n
5115 in debugging output.
5116
82067193
YQ
51172011-12-15 Yao Qi <yao@codesourcery.com>
5118
5119 * tracepoint.c: Include sys/syscall.h.
5120 (gdb_ust_thread): Remove preprocessor conditional.
5121
82bfbe7e
PA
51222011-12-14 Pedro Alves <pedro@codesourcery.com>
5123
5124 * linux-low.c (linux_detach_one_lwp): Call
5125 the_low_target.prepare_to_resume before detaching.
5126
712c6575
YQ
51272011-12-14 Yao Qi <yao@codesourcery.com>
5128
5129 * tracepoint.c (gdb_ust_thread): Don't ignore return value
5130 of write.
5131
d54d1edf
YQ
51322011-12-14 Yao Qi <yao@codesourcery.com>
5133
5134 * i386-low.c (i386_low_stopped_data_address): Initialize local
5135 variable `control'.
5136
6210a125
PA
51372011-12-13 Pedro Alves <pedro@codesourcery.com>
5138
5139 PR remote/13492
5140
5141 * i386-low.c (i386_low_stopped_data_address): Avoid fetching
5142 DR_CONTROL unless necessary. Extend comments.
5143 * linux-x86-low.c (x86_linux_prepare_to_resume): Don't write to
5144 DR0-3 if not used. If any watchpoint was set, clear DR_STATUS.
5145
2ece8244
YQ
51462011-12-13 Yao Qi <yao@codesourcery.com>
5147
5148 * tracepoint.c (trace_buffer_alloc): Replace magic numbers with
5149 macros.
5150 (upload_fast_traceframes, upload_fast_traceframes): Likewise.
5151
784867a5
JK
51522011-12-08 Jan Kratochvil <jan.kratochvil@redhat.com>
5153
5154 * linux-low.c (linux_kill): Skip PTRACE_KILL if LWP does not exist.
5155 Print new debug message for such case.
5156
6bf36717
JK
51572011-12-06 Jan Kratochvil <jan.kratochvil@redhat.com>
5158
5159 Fix overlapping memcpy.
5160 * mem-break.c (set_raw_breakpoint_at): New variable buf. Use it for
5161 the read_inferior_memory transfer.
5162 (delete_fast_tracepoint_jump): New variable buf. Use it for the
5163 write_inferior_memory transfer.
5164 (set_fast_tracepoint_jump): New variable buf. Use it for the
5165 read_inferior_memory and write_inferior_memory transfers.
5166 (uninsert_fast_tracepoint_jumps_at, reinsert_fast_tracepoint_jumps_at)
5167 (delete_raw_breakpoint, uninsert_raw_breakpoint): New variable buf.
5168 Use it for the write_inferior_memory transfer.
5169 (check_mem_read, check_mem_write): New gdb_asserts for overlapping
5170 buffers.
5171
50275556
MR
51722011-12-06 Maciej W. Rozycki <macro@codesourcery.com>
5173
5174 * linux-low.c (fetch_register, store_register): Make code
5175 consistent, fix formatting.
5176
7325beb4
MR
51772011-12-06 Maciej W. Rozycki <macro@codesourcery.com>
5178
5179 * linux-low.c (usr_store_inferior_registers): Factor out code
5180 to handle individual registers into...
5181 (store_register): ... this new function.
5182
c642a434
UW
51832011-12-06 Ulrich Weigand <uweigand@de.ibm.com>
5184
5185 * Makefile.in (s390-linux32v1.o, s390-linux32v1.c): New rules.
5186 (s390-linux32v2.o, s390-linux32v2.c): Likewise.
5187 (s390-linux64v1.o, s390-linux64v1.c): Likewise.
5188 (s390-linux64v2.o, s390-linux64v2.c): Likewise.
5189 (s390x-linux64v1.o, s390x-linux64v1.c): Likewise.
5190 (s390x-linux64v2.o, s390x-linux64v2.c): Likewise.
5191 * configure.srv [s390*-*-linux*] (srv_regobj): Add new objects.
5192 (srv_xmlfiles): Add new XML files.
5193
5194 * linux-s390-low.c: Include "elf/common.h", <sys/ptrace.h>,
5195 and <sys/uio.h>.
5196 (PTRACE_GETREGSET, PTRACE_SETREGSET): Define if undefined.
5197 (init_registers_s390_linux32v1): Add prototype.
5198 (init_registers_s390_linux32v2): Likewise.
5199 (init_registers_s390_linux64v1): Likewise.
5200 (init_registers_s390_linux64v2): Likewise.
5201 (init_registers_s390x_linux64v1): Likewise.
5202 (init_registers_s390x_linux64v2): Likewise.
5203 (s390_num_regs): Increment to 52.
5204 (s390_regmap): Add orig_r2 register.
5205 (s390_num_regs_3264): Increment to 68.
5206 (s390_regmap_3264): Add orig_r2 register.
5207 (s390_collect_ptrace_register): Handle orig_r2 register.
5208 (s390_supply_ptrace_register): Likewise.
5209 (s390_fill_last_break): New function.
5210 (s390_store_last_break): Likewise.
5211 (s390_fill_system_call): New function.
5212 (s390_store_system_call): Likewise.
5213 (target_regsets): Handle NT_S390_LAST_BREAK and NT_S390_SYSTEM_CALL
5214 register sets.
5215 (s390_check_regset): New function.
5216 (s390_arch_setup): Check for presence of NT_S390_LAST_BREAK and
5217 NT_S390_SYSTEM_CALL regsets and use appropriate description.
5218 Update target_regsets for available register sets.
5219
2268b414
JK
52202011-12-02 Paul Pluzhnikov <ppluzhnikov@google.com>
5221 Jan Kratochvil <jan.kratochvil@redhat.com>
5222
5223 * linux-low.c (get_phdr_phnum_from_proc_auxv, get_dynamic, get_r_debug)
5224 (read_one_ptr, struct link_map_offsets, linux_qxfer_libraries_svr4):
5225 New.
5226 (struct linux_target_ops): Install linux_qxfer_libraries_svr4.
5227 * linux-low.h (struct process_info_private): New member r_debug.
5228 * server.c (handle_qxfer_libraries): Call
5229 the_target->qxfer_libraries_svr4.
5230 (handle_qxfer_libraries_svr4): New function.
5231 (qxfer_packets): New entry "libraries-svr4".
5232 (handle_query): Check QXFER_LIBRARIES_SVR4 and report libraries-svr4.
5233 * target.h (struct target_ops): New member qxfer_libraries_svr4.
5234 * remote.c (remote_xfer_partial): Call add_packet_config_cmd for
5235 PACKET_qXfer_libraries_svr4.
5236
d6db1fab
UW
52372011-11-30 Ulrich Weigand <uweigand@de.ibm.com>
5238
5239 * linux-s390-low.c (s390_collect_ptrace_register): Fully convert
5240 PSW address/mask between 8-byte and 16-byte formats.
5241 (s390_supply_ptrace_register): Likewise.
5242 (s390_get_pc, s390_set_pc): 4-byte PSW address always includes
5243 basic addressing mode bit.
5244
242f5f1c
SS
52452011-11-24 Stan Shebs <stan@codesourcery.com>
5246
5247 * tracepoint.c (cmd_qtstatus): Use plongest instead of %llx.
5248
f196051f
SS
52492011-11-17 Stan Shebs <stan@codesourcery.com>
5250
5251 * tracepoint.c (struct tracepoint): New field traceframe_usage.
5252 (tracing_start_time): New global.
5253 (tracing_stop_time): New global.
5254 (tracing_user_name): New global.
5255 (tracing_notes): New global.
5256 (tracing_stop_note): New global.
5257 (cmd_qtstart): Set traceframe_usage, start_time.
5258 (stop_tracing): Set stop_time.
5259 (cmd_qtstatus): Report additional status.
5260 (cmd_qtp): New function.
5261 (handle_tracepoint_query): Call it.
5262 (cmd_qtnotes): New function.
5263 (handle_tracepoint_general_set): Call it.
5264 (get_timestamp): Rename from tsv_get_timestamp.
5265
405f8e94
SS
52662011-11-14 Stan Shebs <stan@codesourcery.com>
5267 Kwok Cheung Yeung <kcy@codesourcery.com>
5268
5269 * linux-x86-low.c (small_jump_insn): New.
5270 (i386_install_fast_tracepoint_jump_pad): Add arguments for
5271 trampoline and error message, build a trampoline and issue a small
5272 jump instruction to it.
5273 (x86_install_fast_tracepoint_jump_pad): Add arguments for
5274 trampoline and error message.
5275 (x86_get_min_fast_tracepoint_insn_len): New.
5276 (the_low_target): Add call to x86_get_min_fast_tracepoint_insn_len.
5277 * linux-low.h (struct linux_target_ops): Add arguments to
5278 install_fast_tracepoint_jump_pad operation, add new operation.
5279 * linux-low.c (linux_install_fast_tracepoint_jump_pad): Add
5280 arguments.
5281 (linux_get_min_fast_tracepoint_insn_len): New function.
5282 (linux_target_op): Add new operation.
5283 * tracepoint.c (gdb_trampoline_buffer): New IPA variable.
5284 (gdb_trampoline_buffer_end): Ditto.
5285 (gdb_trampoline_buffer_error): Ditto.
5286 (struct ipa_sym_addresses): Add fields for new IPA variables.
5287 (symbol_list): Add entries for new IPA variables.
5288 (struct tracepoint): Add fields to hold the address range of the
5289 trampoline used by the tracepoint.
5290 (trampoline_buffer_head): New static variable.
5291 (trampoline_buffer_tail): Ditto.
5292 (claim_trampoline_space): New function.
5293 (have_fast_tracepoint_trampoline_buffer): New function.
5294 (clone_fast_tracepoint): Fill in trampoline fields of tracepoint
5295 structure.
5296 (install_fast_tracepoint): Ditto, also add error buffer argument.
5297 (cmd_qtminftpilen): New function.
5298 (handle_tracepoint_query): Add response to qTMinFTPILen packet.
5299 (fast_tracepoint_from_trampoline_address): New function.
5300 (fast_tracepoint_collecting): Handle trampoline as part of jump
5301 pad space.
5302 (set_trampoline_buffer_space): New function.
5303 (initialize_tracepoint): Initialize new IPA variables.
5304 * target.h (struct target_ops): Add arguments to
5305 install_fast_tracepoint_jump_pad operation, add new
5306 get_min_fast_tracepoint_insn_len operation.
5307 (target_get_min_fast_tracepoint_insn_len): New.
5308 (install_fast_tracepoint_jump_pad): Add arguments.
5309 * server.h (IPA_BUFSIZ): Define.
5310 * linux-i386-ipa.c: Include extra header files.
5311 (initialize_fast_tracepoint_trampoline_buffer): New function.
5312 (initialize_low_tracepoint): Call it.
5313 * server.h (set_trampoline_buffer_space): Declare.
5314 (claim_trampoline_space): Ditto.
5315 (have_fast_tracepoint_trampoline_buffer): Ditto.
5316
1e4d1764
YQ
53172011-11-14 Yao Qi <yao@codesourcery.com>
5318
5319 * server.c (handle_query): Handle InstallInTrace for qSupported.
5320 * tracepoint.c (add_tracepoint): Sort list.
5321 (install_tracepoint, download_tracepoint): New.
5322 (cmd_qtdp): Call them to install and download tracepoints.
5323 (sort_tracepoints): Removed.
5324 (cmd_qtstart): Update.
5325
5c73ff4e
YQ
53262011-11-14 Yao Qi <yao@codesourcery.com>
5327
5328 * mem-break.c (inc_ref_fast_tracepoint_jump): New.
5329 * mem-break.h: Declare.
5330 * tracepoint.c (cmd_qtstart): Move some code to ...
5331 (clone_fast_tracepoint, install_fast_tracepoint): ... here.
5332 New.
5333 (download_tracepoints): Move some code to ...
5334 (download_tracepoint_1): ... here. New.
5335
86a30030
YQ
53362011-11-08 Yao Qi <yao@codesourcery.com>
5337
5338 * remote-utils.c (relocate_instruction): A comment fix.
5339
8d26e50c
JB
53402011-11-07 Joel Brobecker <brobecker@adacore.com>
5341
5342 * win32-i386-low.c (dr_status_mirror, dr_control_mirror): Delete.
5343 (i386_dr_low_get_control, i386_dr_low_get_status): Use
5344 dr_status_mirror and dr_control_mirror from debug_reg_state.
5345 (i386_dr_low_get_status): Use debug_reg_state.dr_status_mirror
5346 (i386_initial_stuff): Remove use of deleted globals.
5347 (i386_get_thread_context, i386_set_thread_context,
5348 i386_thread_added): Use dr_status_mirror and dr_control_mirror
5349 from debug_reg_state.
5350
a59306a3
YQ
53512011-11-05 Yao Qi <yao@codesourcery.com>
5352
5353 * tracepoint.c (gdb_collect): Loop over tracepoints of same
5354 address as TPOINT's.
5355
3065dfb6
SS
53562011-11-02 Stan Shebs <stan@codesourcery.com>
5357
5358 * tracepoint.c (agent_mem_read_string): New function.
5359 (eval_agent_expr): Call it for tracenz.
5360 * server.c (handle_query): Report support for tracenz.
5361
fd0d8c7c
YQ
53622011-11-02 Yao Qi <yao@codesourcery.com>
5363
5364 * tracepoint.c (cmd_qtstart): Remove unused local variables.
5365
609086b1
YQ
53662011-11-02 Yao Qi <yao@codesourcery.com>
5367
5368 * target.h: Fix a typo in comment.
5369
b9fd1791
PA
53702011-10-31 Pedro Alves <pedro@codesourcery.com>
5371
5372 * mem-break.c (check_mem_write): Add `myaddr' parameter. Don't
5373 clobber the breakpoints' shadows with fast tracepoint jumps.
5374 * mem-break.h (check_mem_write): Add `myaddr' parameter.
5375 * target.c (write_inferior_memory): Also pass MYADDR down to
5376 check_mem_write.
5377
03583c20
UW
53782011-10-07 Ulrich Weigand <ulrich.weigand@linaro.org>
5379
5380 * configure.ac: Check support for personality routine.
5381 * configure: Regenerate.
5382 * config.in: Likewise.
5383 * linux-low.c: Include <sys/personality.h>.
5384 Define ADDR_NO_RANDOMIZE if necessary.
5385 (linux_create_inferior): Disable address space randomization when
5386 forking inferior, if requested.
5387 (linux_supports_disable_randomization): New function.
5388 (linux_target_ops): Install it.
5389 * server.h (disable_randomization): Declare.
5390 * server.c (disable_randomization): New global variable.
5391 (handle_general_set): Handle QDisableRandomization.
5392 (handle_query): Likewise for qSupported.
5393 (main): Support --disable-randomization and --no-disable-randomization
5394 command line arguments.
5395 * target.h (struct target_ops): Add supports_disable_randomization.
5396 (target_supports_disable_randomization): New macro.
5397
723b724b
MF
53982011-09-29 Mike Frysinger <vapier@gentoo.org>
5399
5400 * linux-low.c (target_loadseg): Add defined PTRACE_GETFDPIC to the
5401 ifdef check.
5402 [PT_GETDSBT] (target_loadmap): Wrap in a defined PT_GETDSBT check.
5403 [!PT_GETDSBT] (target_loadmap): New definition.
5404 (LINUX_LOADMAP, LINUX_LOADMAP_EXEC, LINUX_LOADMAP_INTERP): Define.
5405 (linux_read_loadmap): Change PTRACE_GETDSBT_EXEC to
5406 LINUX_LOADMAP_EXEC, PTRACE_GETDSBT_INTERP to LINUX_LOADMAP_INTERP,
5407 and PT_GETDSBT to LINUX_LOADMAP.
5408 [!PT_GETDSBT] (linux_read_loadmap): Define to NULL.
5409 (linux_target_ops): Delete unnecessary ifdef PT_GETDSBT check.
5410
55329a5c 54112011-09-21 Ulrich Weigand <ulrich.weigand@linaro.org>
71487fd7
UW
5412
5413 * linux-arm-low.c (struct arm_linux_hwbp_cap): Remove.
5414 (arm_linux_hwbp_cap): New static variable.
5415 (arm_linux_get_hwbp_cap): Replace by ...
5416 (arm_linux_init_hwbp_cap): ... this new function.
5417 (arm_linux_get_hw_breakpoint_count): Use arm_linux_hwbp_cap.
5418 (arm_linux_get_hw_watchpoint_count): Likewise.
5419 (arm_linux_get_hw_watchpoint_max_length): Likewise.
5420 (arm_arch_setup): Call arm_linux_init_hwbp_cap.
5421 (arm_prepare_to_resume): Use perror_with_name instead of error.
5422
55329a5c 54232011-09-21 Ulrich Weigand <ulrich.weigand@linaro.org>
09b4ad9f
UW
5424
5425 * linux-arm-low.c: Include <signal.h>.
5426 (PTRACE_GETHBPREGS, PTRACE_SETHBPREGS): Define if necessary.
5427 (struct arm_linux_hwbp_cap): New data type.
5428 (arm_hwbp_type, arm_hwbp_control_t): New typedefs.
5429 (struct arm_linux_hw_breakpoint): New data type.
5430 (MAX_BPTS, MAX_WPTS): Define.
5431 (struct arch_process_info, struct arch_lwp_info): New data types.
5432 (arm_linux_get_hwbp_cap): New function.
5433 (arm_linux_get_hw_breakpoint_count): Likewise.
5434 (arm_linux_get_hw_watchpoint_count): Likewise.
5435 (arm_linux_get_hw_watchpoint_max_length): Likewise.
5436 (arm_hwbp_control_initialize): Likewise.
5437 (arm_hwbp_control_is_enabled): Likewise.
5438 (arm_hwbp_control_is_initialized): Likewise.
5439 (arm_hwbp_control_disable): Likewise.
5440 (arm_linux_hw_breakpoint_equal): Likewise.
5441 (arm_linux_hw_point_initialize): Likewise.
5442 (struct update_registers_data): New data structure.
5443 (update_registers_callback: New function.
5444 (arm_insert_point): Likewise.
5445 (arm_remove_point): Likewise.
5446 (arm_stopped_by_watchpoint): Likewise.
5447 (arm_stopped_data_address): Likewise.
5448 (arm_new_process): Likewise.
5449 (arm_new_thread): Likewise.
5450 (arm_prepare_to_resume): Likewise.
5451 (the_low_target): Register arm_insert_point, arm_remove_point,
5452 arm_stopped_by_watchpoint, arm_stopped_data_address, arm_new_process,
5453 arm_new_thread, and arm_prepare_to_resume.
5454
6b9801d4
SS
54552011-09-15 Stan Shebs <stan@codesourcery.com>
5456
5457 * server.h (struct emit_ops): Add compare-goto fields.
5458 * tracepoint.c (gdb_agent_op_sizes): New table.
5459 (emit_eq_goto): New function.
5460 (emit_ne_goto): New function.
5461 (emit_lt_goto): New function.
5462 (emit_le_goto): New function.
5463 (emit_gt_goto): New function.
5464 (emit_ge_goto): New function.
5465 (is_goto_target): New function.
5466 (compile_bytecodes): Recognize special cases of compare-goto
5467 combinations and call specialized emitters for them.
5468 * linux-x86-low.c (amd64_emit_eq_goto): New function.
5469 (amd64_emit_ne_goto): New function.
5470 (amd64_emit_lt_goto): New function.
5471 (amd64_emit_le_goto): New function.
5472 (amd64_emit_gt_goto): New function.
5473 (amd64_emit_ge_goto): New function.
5474 (amd64_emit_ops): Add the new functions.
5475 (i386_emit_eq_goto): New function.
5476 (i386_emit_ne_goto): New function.
5477 (i386_emit_lt_goto): New function.
5478 (i386_emit_le_goto): New function.
5479 (i386_emit_gt_goto): New function.
5480 (i386_emit_ge_goto): New function.
5481 (i386_emit_ops): Add the new functions.
5482
bf15cbda
SS
54832011-09-08 Stan Shebs <stan@codesourcery.com>
5484
5485 * linux-x86-low.c (i386_emit_prologue): Save %ebx.
5486 (i386_emit_epilogue): Restore %ebx.
5487
943ca1dd
JZ
54882011-08-31 Jie Zhang <jzhang918@gmail.com>
5489
5490 * server.c (step_thread): Remove definition.
5491 (process_serial_event): Don't handle Hs.
5492 * server.h (step_thread): Remove declaration.
5493 * target.c (set_desired_inferior): Remove use of step_thread.
5494
e3deef73
LM
54952011-08-24 Luis Machado <lgustavo@codesourcery.com>
5496
5497 * linux-low.c: Include linux-procfs.h.
5498 (linux_attach_lwp_1): Update comments.
5499 (linux_attach): Scan for existing threads when attaching to a
5500 process that is the tgid.
5501 * Makefile.in: Update dependencies.
5502
13da1c97
LM
55032011-08-24 Luis Machado <lgustavo@codesourcery.com>
5504
5505 * configure.srv: Add linux-procfs.o dependencies.
5506
881127c9
YQ
55072011-08-14 Yao Qi <yao@codesourcery.com>
5508
5509 * target.h (struct target_ops): Fix indent.
5510 * win32-low.c (win32_target_ops): Fix comment.
5511
58dbd541
YQ
55122011-08-14 Andrew Jenner <andrew@codesourcery.com>
5513 Yao Qi <yao@codesourcery.com>
5514
5515 * Makefile.in (clean): Remove tic6x-*.c files.
5516 (linux-tic6x-low.o, tic6x-c62x-linux.o, tic6x-c64x-linux.o): New rules.
5517 (tic6x-c64xp-linux.o, tic6x-c62x-linux.c, tic6x-c64x-linux.c): Likewise.
5518 (tic6x-c64xp-linux.c): Likewise.
5519 * configure.srv: Add support for tic6x-*-uclinux.
5520 * linux-tic6x-low.c: New.
5521 * linux-low.c (PT_TEXT_ADDR, PT_DATA_ADDR, PT_TEXT_END_ADDR): Define.
5522
78d85199
YQ
55232011-08-14 Andrew Stubbs <ams@codesourcery.com>
5524 Yao Qi <yao@codesourcery.com>
5525
5526 * target.h (struct target_ops): Add read_loadmap.
5527 * linux-low.c (struct target_loadseg): New type.
5528 (struct target_loadmap): New type.
5529 (linux_read_loadmap): New function.
5530 (linux_target_ops): Add linux_read_loadmap.
5531 * server.c (handle_query): Support qXfer:fdpic:read packet.
43aaf8b6
PA
5532 * win32-low.c (win32_target_ops): Initialize field `read_loadmap'
5533 to NULL.
78d85199 5534
a959a88d
EZ
55352011-08-05 Eli Zaretskii <eliz@gnu.org>
5536
5537 * win32-low.c: Include <stdint.h>.
5538
1ced966e
PA
55392011-07-22 Pedro Alves <pedro@codesourcery.com>
5540
5541 * i386-low.c (i386_insert_aligned_watchpoint): Don't pass the info
5542 to the inferior here.
5543 (i386_remove_aligned_watchpoint): Ditto.
5544 (i386_handle_nonaligned_watchpoint): Return immediate on fail to
5545 fit part of the watchpoint in the debug registers.
5546 (i386_update_inferior_debug_regs): New.
5547 (i386_low_insert_watchpoint): Work on a local mirror of the debug
5548 registers, and only update the inferior on success.
5549 (i386_low_remove_watchpoint): Ditto.
5550
d26e3629
KY
55512011-07-22 Kwok Cheung Yeung <kcy@codesourcery.com>
5552
5553 * linux-low.c (compare_ints, unique, list_threads, show_process,
5554 linux_core_of_thread): Delete.
5555 (linux_target_ops): Change linux_core_of_thread to
5556 linux_common_core_of_thread.
5557 (linux_qxfer_osdata): Defer to linux_common_xfer_osdata.
5558 * utils.c (malloc_failure): Change type of argument.
5559 (xmalloc, xrealloc, xcalloc, xsnprintf): Delete.
5560 * Makefile.in (SFILES): Add common/common-utils.c, common/xml-utils.c,
5561 common/linux-osdata.c, common/ptid.c and common/buffer.c.
5562 (OBS): Add xml-utils.o, common-utils.o, ptid.o and buffer.o.
5563 (IPA_OBJS): Add common-utils-ipa.o.
5564 (ptid_h, linux_osdata_h): New macros.
5565 (server_h): Add common/common-utils.h, common/xml-utils.h,
5566 common/buffer.h, common/gdb_assert.h, common/gdb_locale.h and
5567 common/ptid.h.
5568 (common-utils-ipa.o, common-utils.o, xml-utils.o, linux-osdata.o,
5569 ptid.o, buffer.o): New rules.
5570 (linux-low.o): Add common/linux-osdata.h as a dependency.
5571 * configure.srv (srv_tgtobj): Add linux-osdata.o to Linux targets.
5572 * configure.ac: Add AC_HEADER_DIRENT check.
5573 * config.in: Regenerate.
5574 * configure: Regenerate.
5575 * remote-utils.c (xml_escape_text): Delete.
5576 (buffer_grow, buffer_free, buffer_init, buffer_finish,
5577 buffer_xml_printf): Move to common/buffer.c.
5578 * server.c (main): Remove call to initialize_inferiors.
5579 * server.h (struct ptid, ptid_t, minus_one_ptid, null_ptid,
5580 ptid_build, pid_to_ptid, ptid_get_pid, ptid_get_lwp, ptid_get_tid,
5581 ptid_equal, ptid_is_pid, initialize_inferiors, xml_escape_text,
5582 internal_error, gdb_assert, gdb_assert_fail): Delete.
5583 (struct buffer, buffer_grow, buffer_free, buffer_init, buffer_finish,
5584 buffer_xml_printf, buffer_grow_str, buffer_grow_str0): Move to
5585 common/buffer.h.
5586 * inferiors.c (null_ptid, minus_one_ptid, ptid_build, pid_to_ptid,
5587 ptid_get_pid, ptid_get_lwp, ptid_get_tid, ptid_equal, ptid_is_pid,
5588 initialize_inferiors): Delete.
5589
2275a1a7
PA
55902011-07-20 Pedro Alves <pedro@codesourcery.com>
5591
5592 * tracepoint.c (tracepoint_look_up_symbols): Return upon the first
5593 symbol error.
5594
0a5b1e09
PA
55952011-05-31 Pedro Alves <pedro@codesourcery.com>
5596
5597 * linux-x86-low.c (i386_dr_low_get_addr): Fix off by one in
5598 assertion.
5599 * win32-i386-low.c (i386_dr_low_get_addr): Ditto.
5600
6938fd34
YQ
56012011-05-26 Yao Qi <yao@codesourcery.com>
5602
5603 * Makefile.in (thread-db.o): Track dependence to
5604 common/gdb_thread_db.h.
5605 * thread-db.c: include gdb_thread_db.h from right place.
5606
b481f9e0
TT
56072011-05-16 Adrian Cornish <gnu@bluedreamer.com>
5608
5609 * linux-i386-ipa.c (supply_static_tracepoint_registers): Pass
5610 __FILE__ and __LINE__ to internal_error.
5611
98a5dd13
DE
56122011-05-13 Doug Evans <dje@google.com>
5613
5614 * thread-db.c (try_thread_db_load_from_sdir): New function.
5615 (try_thread_db_load_from_dir): New function.
5616 (thread_db_load_search): Handle $sdir, ignore $pdir.
5617 Remove trying of system directories if search of
5618 libthread-db-search-path fails, that is now done via $sdir.
5619
d248b706
KY
56202011-05-12 Kwok Cheung Yeung <kcy@codesourcery.com>
5621
5622 * server.c (handle_query): Add EnableDisableTracepoints to the list
5623 of supported features.
43aaf8b6 5624 * tracepoint.c (clear_installed_tracepoints): Uninstall disabled
d248b706 5625 tracepoints.
43aaf8b6
PA
5626 (cmd_qtenable_disable): New.
5627 (cmd_qtstart): Install tracepoints even if disabled.
5628 (handle_tracepoint_general_set): Add call to cmd_qtenable_disable on
5629 receiving a QTEnable or QTDisable packet.
5630 (gdb_collect): Skip data collection if fast tracepoint is disabled.
5631 (ust_marker_to_static_tracepoint): Do not ignore disabled static
5632 tracepoints.
5633 (gdb_probe): Skip data collection if static tracepoint is disabled.
d248b706 5634
84e578fb
DE
56352011-05-10 Doug Evans <dje@google.com>
5636
5637 * thread-db.c (thread_db_handle_monitor_command): Handle elided path.
5638
71f55dd8
DE
56392011-05-04 Doug Evans <dje@google.com>
5640
5641 * linux-low.c (linux_join): Skip process lookup.
5642 * spu-low.c (spu_join): Ditto.
5643 * server.c (join_inferiors_callback): Delete.
5644 (process_serial_event): For 'D' packet (detach) call join_inferior
5645 directly.
5646
4d393d60
JM
56472011-05-04 Joseph Myers <joseph@codesourcery.com>
5648
5649 * README: Don't mention xscale*-*-linux*.
5650 * configure.srv (xscale*-*-linux*): Don't handle target.
5651
b00ad6ff
NF
56522011-04-27 Nathan Froyd <froydnj@codesourcery.com>
5653
5654 * linux-x86-low.c (amd64_emit_const): Call memcpy instead of
5655 casting pointers.
5656 (amd64_emit_reg, amd64_emit_int_call_1, amd64_emit_void_call_2):
5657 (i386_emit_const, i386_emit_reg, i386_emit_int_call_1):
5658 (i386_emit_void_call_2): Likewise.
5659
af96c192
YQ
56602011-04-26 Yao Qi <yao@codesourcery.com>
5661
43aaf8b6
PA
5662 * linux-low.c: Move common macros to linux-ptrace.h.
5663 Include linux-ptrace.h.
af96c192
YQ
5664 * Makefile.in (linux_ptrace_h): New.
5665 (linux-low.o): Depends on linux-ptrace.h.
5666
03f2bd59
JK
56672011-04-24 Jan Kratochvil <jan.kratochvil@redhat.com>
5668
5669 * remote-utils.c (handle_accept_event): Close LISTEN_DESC only if
5670 RUN_ONCE. Comment for the LISTEN_DESC delete_file_handler call.
5671 (remote_prepare): New function with most of the TCP code from ...
5672 (remote_open): ... here. Detect PORT here unconditionally. Move also
5673 setting transport_is_reliable.
5674 * server.c (run_once): New variable.
5675 (gdbserver_usage): Document it.
5676 (main): Set run_once for `--once'. Call remote_prepare. Exit after
5677 the first run if RUN_ONCE.
5678 * server.h (run_once, remote_prepare): New declarations.
5679
7a9dd1b2
TT
56802011-04-19 Tom Tromey <tromey@redhat.com>
5681
5682 * win32-low.c (handle_load_dll): Remove duplicate "the".
5683
81239425
PM
56842011-04-07 Pierre Muller <muller@ics.u-strasbg.fr>
5685
5686 Remove support for old Cygwin 1.5 versions.
5687 * win32-low.c (win32_create_inferior): Use new cygwin_path_list
5688 function to avoid warning.
5689 (win32_add_one_solib): Use cygwin_conv_path function to avoid
5690 warning.
5691
9e0627f1
PM
56922011-03-18 Pierre Muller <muller@ics.u-strasbg.fr>
5693
5694 * gdbserver/server.h (Macro _): Define it if not available.
5695
588eebee
MS
56962011-03-14 Michael Snyder <msnyder@vmware.com>
5697
348af9f7 5698 * hostio.c (handle_close): Remove unnecessary null test.
588eebee 5699
43f70d4c
JB
57002011-03-10 Joel Brobecker <brobecker@adacore.com>
5701
5702 * Makefile.in (maintainer-clean realclean distclean): Remove
5703 "make ... subdir_do" command.
5704
348af9f7
MS
57052011-03-10 Michael Snyder <msnyder@vmware.com>
5706
5707 * tracepoint.c (tracepoint_finish_step): Fix loop variable.
5708
5709 * server.c (handle_v_run): Free alloced buffer on early return.
5710
e637a4f5
YQ
57112011-03-09 Yao Qi <yao@codesourcery.com>
5712
5713 Revert:
5714 2011-03-04 Yao Qi <yao@codesourcery.com>
5715
5716 * Makefile.in: Remove GNU make feature --directory.
5717
5718 2011-03-05 Yao Qi <yao@codesourcery.com>
5719
5720 * Makefile.in (CLEANDIRS, REQUIRED_SUBDIRS): New variable.
5721 (subdir_do): New make target. Copied from gdb/Makefile.
5722 (maintainer-clean, realclean, distclean, clean): Call corresponding
5723 make targets in common/Makefile.
5724
5725 2011-02-11 Yao Qi <yao@codesourcery.com>
5726
5727 * configure.ac: Call AC_PROG_RANLIB.
5728 * Makefile.in: Remove signals.o from OBS. Link libcommon.a.
5729 * configure: Regenerate.
5730
e6edda56
JK
57312011-03-07 Jan Kratochvil <jan.kratochvil@redhat.com>
5732
5733 * remote-utils.c (putpkt_binary_1): Calculate BUF2 size dynamically.
5734
e5141119
JB
57352011-03-06 Yao Qi <yao@codesourcery.com>
5736
5737 * Makefile.in (REQUIRED_SUBDIRS): Remove $(LIBCOMMON_DIR).
5738
64794aa4
JB
57392011-03-05 Yao Qi <yao@codesourcery.com>
5740
5741 * Makefile.in (CLEANDIRS, REQUIRED_SUBDIRS): New variable.
5742 (subdir_do): New make target. Copied from gdb/Makefile.
5743 (maintainer-clean, realclean, distclean, clean): Call corresponding
5744 make targets in common/Makefile.
5745
7a762829
YQ
57462011-03-04 Yao Qi <yao@codesourcery.com>
5747
5748 * Makefile.in: Remove GNU make feature --directory.
5749
348af9f7
MS
57502011-03-04 Michael Snyder <msnyder@vmware.com>
5751
5752 * server.c (queue_stop_reply): Call xmalloc not malloc.
5753
57542011-03-02 Michael Snyder <msnyder@vmware.com>
5755
5756 * linux-arm-low.c (arm_arch_setup): Replace malloc with xmalloc.
5757
9f72fee2
MS
57582011-02-28 Michael Snyder <msnyder@vmware.com>
5759
588eebee
MS
5760 * tracepoint.c (cmd_qtv): Discard unused value 'packet'.
5761 (cmd_qtframe): Ditto.
5762 (cmd_qtbuffer): Ditto.
5763 (cmd_bigqtbuffer): Ditto.
5764
9f72fee2
MS
5765 * utils.c (decimal2str): Initialize 'width' to nine, then
5766 don't mess with it.
5767
8040bd49
UW
57682011-02-28 Ulrich Weigand <uweigand@de.ibm.com>
5769
5770 * hostio.c (require_data): Free *data, not data.
5771
7e52cbd0
JK
57722011-02-28 Jan Kratochvil <jan.kratochvil@redhat.com>
5773
5774 * hostio.c (require_data): Use free, not xfree.
5775
9130f83e
MS
57762011-02-27 Michael Snyder <msnyder@vmware.com>
5777
4b812f4e
MS
5778 * server.c (handle_query): Discard unused value.
5779
9130f83e
MS
5780 * hostio.c (require_data): Free malloc memory before returning
5781 error.
5782
69d37113
MS
57832011-02-26 Michael Snyder <msnyder@vmware.com>
5784
5785 * linux-low.c (list_threads): Call closedir for dirent.
5786
35f5825a
MS
57872011-02-27 Michael Snyder <msnyder@vmware.com>
5788
2a589cef
MS
5789 * i386-low.c (i386-length_and_rw_bits): Comment the fact that
5790 a case statement falls through.
5791
0adea5f7
MS
5792 * linux-low.c (linux_xfer_siginfo): Fix fencepost error.
5793
35f5825a
MS
5794 * linux-amd64-ipa.c (gdb_agent_get_raw_reg): Fix fencepost error
5795 in comparison.
5796
238f1c74
MS
57972011-02-26 Michael Snyder <msnyder@vmware.com>
5798
5799 * utils.c (decimal2str): Eliminate dead code and dead param.
5800 (pulongest): Drop dead param from call to decimal2str.
5801 (plongest): Ditto.
5802
633ff500
JB
58032011-02-24 Joel Brobecker <brobecker@adacore.com>
5804
5805 Revert the following patch (not approved yet):
5806 2011-02-21 Hui Zhu <teawater@gmail.com>
5807 * tracepoint.c (tp_printf): New function.
5808 (eval_agent_expr): Handle gdb_agent_op_printf.
5809
f9c6ff72
HZ
58102011-02-21 Hui Zhu <teawater@gmail.com>
5811
5812 * tracepoint.c (tp_printf): New function.
5813 (eval_agent_expr): Handle gdb_agent_op_printf.
5814
94d5e490
TT
58152011-02-18 Tom Tromey <tromey@redhat.com>
5816
5817 * Makefile.in (tracepoint-ipa.o): Depend on ax.def.
5818 (tracepoint.o): Likewise.
5819 * tracepoint.c (enum gdb_agent_op): Use ax.def.
5820 (gdb_agent_op_names): Likewise.
5821
c7f96d2b
TT
58222011-02-18 Tom Tromey <tromey@redhat.com>
5823
5824 * tracepoint.c (enum gdb_agent_op) <gdb_agent_op_pick,
5825 gdb_agent_op_rot>: New constants.
5826 (gdb_agent_op_names): Add pick and roll.
5827 (eval_agent_expr) <gdb_agent_op_pick, gdb_agent_op_rot>: New
5828 cases.
5829
0feedb2c
JK
58302011-02-15 Jan Kratochvil <jan.kratochvil@redhat.com>
5831
5832 * aclocal.m4: Regenerated with aclocal-1.11.1.
5833
b3b9301e
PA
58342011-02-14 Pedro Alves <pedro@codesourcery.com>
5835
5836 * server.c (handle_qxfer_traceframe_info): New.
5837 (qxfer_packets): Register "traceframe-info".
5838 (handle_query): Report support for qXfer:traceframe-info:read+.
5839 * tracepoint.c (match_blocktype): New.
5840 (traceframe_find_block_type): Rename to ...
5841 (traceframe_walk_blocks): ... this. Add callback filter argument,
5842 and use it.
5843 (traceframe_find_block_type): New, reimplemented on top of
5844 traceframe_walk_blocks.
5845 (build_traceframe_info_xml): New.
5846 (traceframe_read_info): New.
5847 * server.h (traceframe_read_info): Declare.
5848
4f3e6fb7
YQ
58492011-02-11 Yao Qi <yao@codesourcery.com>
5850
5851 * configure.ac: Call AC_PROG_RANLIB.
5852 * Makefile.in: Remove signals.o from OBS. Link libcommon.a.
5853 * configure: Regenerate.
5854
764880b7
PA
58552011-02-07 Pedro Alves <pedro@codesourcery.com>
5856
5857 * server.c (gdb_read_memory): Change return semantics to allow
5858 partial transfers.
5859 (handle_search_memory_1): Adjust.
5860 (process_serial_event) <'m' packet>: Handle partial transfers.
5861 * tracepoint.c (traceframe_read_mem): Handle partial transfers.
5862
1c79eb8a
PA
58632011-01-28 Pedro Alves <pedro@codesourcery.com>
5864
5865 * regcache.c (init_register_cache): Initialize
5866 regcache->register_status.
5867 (free_register_cache): Release regcache->register_status.
5868 (regcache_cpy): Copy register_status.
5869 (registers_to_string): Print 'x's for unavailable registers.
5870 (supply_register): Mark the register's status valid or
5871 unavailable, depending on whether a buffer was passed in or not.
5872 (supply_register_zeroed): New.
5873 (supply_regblock): Mark the registers' status valid or
5874 unavailable, depending on whether a buffer was passed in or not.
5875 * regcache.h (REG_UNAVAILABLE, REG_VALID): New defines.
5876 (struct regcache): New `register_status' field.
5877 (supply_register_zeroed): Declare.
5878 * i387-fp.c (i387_xsave_to_cache): Zero out registers using
5879 supply_register_zeroed, rather than passing a NULL buffer to
5880 supply_register.
5881 * tracepoint.c (fetch_traceframe_registers): Update comment.
5882
85724a0e
PA
58832011-01-28 Pedro Alves <pedro@codesourcery.com>
5884
5885 * i387-fp.c (i387_xsave_to_cache): Make passing NULL as register
5886 buffer explicit.
5887
d08aafef
PA
58882011-01-25 Pedro Alves <pedro@codesourcery.com>
5889
5890 * server.h (decode_xfer_write): Change prototype.
5891 * remote-utils.c (decode_xfer_write): Remove `annex' parameter,
5892 and don't extract the annex here.
5893 * server.c (decode_xfer_read): Remove `annex' parameter,
5894 and don't extract the annex here.
5895 (decode_xfer): New.
5896 (struct qxfer): New.
5897 (handle_qxfer_auxv, handle_qxfer_features, handle_qxfer_libraries)
5898 (handle_qxfer_osdata, handle_qxfer_siginfo, handle_qxfer_spu)
5899 (handle_qxfer_statictrace): New functions, abstracted out from
5900 handle_query, and made to use the struct qxfer interface.
5901 (handle_threads_qxfer_proper): Rename to ...
5902 (handle_qxfer_threads_proper): ... this.
5903 (handle_threads_qxfer): Rename to ...
5904 (handle_qxfer_threads): ... this. Adjust.
5905 (qxfer_packets): New array.
5906 (handle_qxfer): New function.
5907 (handle_query): Use handle_qxfer.
5908
493e2a69
MS
59092011-01-05 Michael Snyder <msnyder@msnyder-server.eng.vmware.com>
5910
5911 * gdbreplay.c: Shorten lines of >= 80 columns.
5912 * linux-low.c: Ditto.
5913 * linux-ppc-low.c: Ditto.
5914 * linux-s390-low.c: Ditto.
5915 * linux-sparc-low.c: Ditto.
5916 * linux-x86-low.c: Ditto.
5917 * linux-xtensa-low.c: Ditto.
5918 * mem-break.c: Ditto.
5919 * nto-low.c: Ditto.
5920 * regcache.h: Ditto.
5921 * remote-utils.c: Ditto.
5922 * server.c: Ditto.
5923 * server.h: Ditto.
5924 * thread-db.c: Ditto.
5925 * tracepoint.c: Ditto.
5926 * utils.c: Ditto.
5927 * win32-low.h: Ditto.
5928
44944448
JB
59292011-01-05 Joel Brobecker <brobecker@adacore.com>
5930
5931 * gdbserver/configure.ac, gdbserver/gdbserver.1: Copyright year
5932 update.
5933
71ce852c
JB
59342011-01-01 Joel Brobecker <brobecker@adacore.com>
5935
5936 * server.c (gdbserver_version): Update copyright year in version
5937 output.
5938 * gdbreplay.c (gdbreplay_version): Ditto.
5939
eb826dc6
MF
59402010-12-29 Jie Zhang <jie.zhang@analog.com>
5941
5942 * configure.srv (bfin-*-*linux*): Handle Blackfin/Linux targets.
5943 * linux-bfin-low.c: New file.
5944 * linux-low.c: Define PT_TEXT_ADDR, PT_TEXT_END_ADDR, and
5945 PT_DATA_ADDR for BFIN targets.
5946 * Makefile.in (SFILES): Add linux-bfin-low.c.
5947 (clean): Remove reg-bfin.c.
5948 (linux-bfin-low.o, reg-bfin.o, reg-bfin.c): New targets.
5949 * README: Mention supported Blackfin targets.
5950
39ab222a
MF
59512010-12-23 Mike Frysinger <vapier@gentoo.org>
5952
5953 * .gitignore: New file.
5954
a1f2ce7d
MF
59552010-11-16 Mike Frysinger <vapier@gentoo.org>
5956
5957 * linux-low.c (linux_tracefork_child): Add char* cast to arg.
5958
f474844c
JZ
59592010-10-22 Jie Zhang <jie@codesourcery.com>
5960
5961 * Makefile.in: Add FLAGS_TO_PASS variable.
5962 (install): Remove dependency of install-only and recursively
5963 invoke make for install-only.
5964
f1048712
DE
59652010-10-04 Doug Evans <dje@google.com>
5966
5967 * Makefile.in (uninstall): Use $(DESTDIR).
5968
b53a1623
PA
59692010-09-24 Pedro Alves <pedro@codesourcery.com>
5970
e6ee044d
PA
5971 PR gdb/11842
5972
b53a1623
PA
5973 * linux-x86-low.c (compat_siginfo_from_siginfo)
5974 (siginfo_from_compat_siginfo): Also copy si_pid and si_uid when
5975 si_code is < 0. Check for si_code == SI_TIMER before checking for
5976 si_code < 0.
5977
fa1bd1e4
JB
59782010-09-13 Joel Brobecker <brobecker@adacore.com>
5979
5980 * lynx-i386-low.c: New file.
5981 * configure.srv: Add handling of i[34567]86-*-lynxos* targets.
5982
47fac8f8
JB
59832010-09-13 Joel Brobecker <brobecker@adacore.com>
5984
5985 * lynx-low.c (ptrace_request_to_str): Remove handling for
5986 request values that have been removed in LynxOS 5.x.
5987
1adfc54d
JB
59882010-09-13 Joel Brobecker <brobecker@adacore.com>
5989
5990 * lynx-low.c, lynx-ppc-loc.c: Include <sys/ptrace.h> instead of
5991 <ptrace.h>
5992
c2a66c29
NS
59932010-09-09 Nathan Sidwell <nathan@codesourcery.com>
5994
5995 * configure.ac: Add --enable-inprocess-agent option.
5996 * configure: Rebuilt.
5997
32fcada3
YQ
59982010-09-06 Yao Qi <yao@codesourcery.com>
5999
6000 * linux-low.c (linux_kill): Remove unused variable.
6001 (linux_stabilize_threads): Likewise.
6002 * server.c (start_inferior): Likewise.
6003 (queue_stop_reply_callback): Likewise.
6004 * tracepoint.c (do_action_at_tracepoint): Likewise.
6005
0cccb683
YQ
60062010-09-06 Yao Qi <yao@codesourcery.com>
6007
6008 * linux-low.c (maybe_move_out_of_jump_pad): Restore current_inferior
6009 on return.
6010
423ec54c
JK
60112010-09-06 Jan Kratochvil <jan.kratochvil@redhat.com>
6012
6013 * target.c (mywait) <TARGET_WAITKIND_EXITED>: Fix to use INTEGER.
6014
12ac6819
PA
60152010-09-06 Pedro Alves <pedro@codesourcery.com>
6016
6017 * Makefile.in (install-only): Replace $IPA_DEPFILES with
6018 "$(IPA_DEPFILES)".
6019
8ed54b31
JB
60202010-09-01 Joel Brobecker <brobecker@adacore.com>
6021
6022 * gdbserver/lynx-low.c, gdbserver/lynx-low.h,
6023 gdbserver/lynx-ppc-low.c: New files.
6024 * Makefile.in (lynx_low_h): New variable.
6025 (lynx-low.o, lynx-ppc-low.o): New rules.
6026 * configure.ac: On LynxOS, link with -lnetinet.
6027 * configure.srv: Add handling of powerpc-*-lynxos* targets.
6028 * configure: regenerate.
6029
bb0116a4
JB
60302010-09-01 Joel Brobecker <brobecker@adacore.com>
6031
6032 * Makefile.in (vasprintf.o, vsnprintf.o): New rules.
6033 * configure.ac: Add check for vasprintf and vsnprintf.
6034 * configure, config.in: Regenerate.
6035 * server.h (vasprintf, vsnprintf): Add conditional declarations.
6036
a778ab81 60372010-09-01 Joel Brobecker <brobecker@adacore.com>
6038
6039 * gdbreplay.c: Move include of alloca.h up, next to include of
6040 malloc.h.
6041 * server.h: Add include of malloc.h.
6042 * mem-break.c: Remove include of malloc.h.
6043 * server.c, tracepoint.c, utils.c, win32-low.c: Likewise.
6044
8b034a19 60452010-09-01 Joel Brobecker <brobecker@adacore.com>
6046
6047 * Makefile.in (memmem.o): Build with -Wno-error.
6048
60492010-09-01 Joel Brobecker <brobecker@adacore.com>
6050
6051 * utils.c (xsnprintf): Make non-static.
6052 * server.h: Add xsnprintf declaration.
6053 * linux-low.c, nto-low.c, target.c, thread-db.c, tracepoint.c:
6054 replace calls to snprintf by calls to xsnprintf throughout.
6055
60562010-09-01 Joel Brobecker <brobecker@adacore.com>
6057
6058 * configure.ac: Add configure check for alloca.
6059 * configure, config.in: Regenerate.
6060 * server.h: Include alloca.h if it exists.
6061 * gdbreplay.c: Include alloca.h if it exists.
6062
1a981360
PA
60632010-08-28 Pedro Alves <pedro@codesourcery.com>
6064
6065 * linux-low.c (__SIGRTMIN): Define if not already defined.
6066 (linux_create_inferior): Check for __ANDROID__ rather than
6067 __SIGRTMIN.
6068 (enqueue_one_deferred_signal): Don't requeue non-RT signals that
6069 are already deferred.
6070 (linux_wait_1): Check for __ANDROID__ rather than __SIGRTMIN.
6071 (linux_resume_one_thread): Don't queue a SIGSTOP if the lwp is
6072 stopped and already has a pending signal to report.
6073 (proceed_one_lwp): : Don't queue a SIGSTOP if the lwp already has
6074 a pending signal to report or is moving out of a jump pad.
6075 (linux_init_signals): Check for __ANDROID__ rather than
6076 __SIGRTMIN.
6077
b4d51a55
PA
60782010-08-28 Pedro Alves <pedro@codesourcery.com>
6079
6080 * linux-low.c (linux_stabilize_threads): Wrap debug output in a
6081 debug_threads check. Avoid a linear search when not doing debug
6082 output.
6083
ec48365d
PA
60842010-08-27 Pedro Alves <pedro@codesourcery.com>
6085
6086 * event-loop.c (event_handle_func): Adjust to use gdb_fildes_t.
6087 (struct gdb_event) <fd>: Change type to gdb_fildes_t.
6088 (struct file_handler) <fd>: Change type to gdb_fildes_t.
6089 (process_event): Change local fd's type to gdb_fildes_t.
6090 (create_file_handler): Adjust prototype.
6091 (delete_file_handler): Adjust prototype.
6092 (handle_file_event): Adjust prototype. Use pfildes.
6093 (create_file_event): Adjsut prototype.
6094 * remote-utils.c (remote_desc, listen_desc): Change type to
6095 gdb_fildes_t.
6096 * server.h: New gdb_fildes_t typedef.
6097 [USE_WIN32API]: Include winsock2.h.
6098 (delete_file_handler, add_file_handler): Adjust prototypes.
6099 (pfildes): Declare.
6100 * utils.c (pfildes): New.
6101
854d88f0
PA
61022010-08-27 Pedro Alves <pedro@codesourcery.com>
6103
6104 * configure.ac (build_warnings): Add -Wno-char-subscripts.
6105 * configure: Regenerate.
6106
0146f85b
PA
61072010-08-27 Pedro Alves <pedro@codesourcery.com>
6108
6109 * linux-low.c (linux_unprepare_to_access_memory): Rename to ...
6110 (linux_done_accessing_memory): ... this.
6111 (linux_target_ops): Adjust.
6112 * linux-x86-low.c (x86_insert_point, x86_remove_point): Adjust.
6113 * nto-low.c (nto_target_ops): Adjust comment.
6114 * server.c (gdb_read_memory, gdb_write_memory): Adjust.
6115 * spu-low.c (spu_target_ops): Adjust comment.
6116 * target.h (target_ops): Rename unprepare_to_access_memory field
6117 to done_accessing_memory.
6118 (unprepare_to_access_memory): Rename to ...
6119 (done_accessing_memory): ... this.
6120
90d74c30
PA
61212010-08-26 Pedro Alves <pedro@codesourcery.com>
6122
6123 * linux-low.c (linux_prepare_to_access_memory): New.
6124 (linux_unprepare_to_access_memory): New.
6125 (linux_target_ops): Install them.
6126 * server.c (read_memory): Rename to ...
6127 (gdb_read_memory): ... this. Use
6128 prepare_to_access_memory/prepare_to_access_memory.
6129 (write_memory): Rename to ...
6130 (gdb_write_memory): ... this. Use
6131 prepare_to_access_memory/prepare_to_access_memory.
6132 (handle_search_memory_1): Adjust.
6133 (process_serial_event): Adjust.
6134 * target.h (struct target_ops): New fields
6135 prepare_to_access_memory and unprepare_to_access_memory.
6136 (prepare_to_access_memory, unprepare_to_access_memory): New.
6137 * linux-x86-low.c (x86_insert_point, x86_remove_point): Use
6138 prepare_to_access_memory/prepare_to_access_memory.
6139 * nto-low.c (nto_target_ops): Adjust.
6140 * spu-low.c (spu_target_ops): Adjust.
6141 * win32-low.c (win32_target_ops): Adjust.
6142
fd467969
PA
61432010-08-26 Pedro Alves <pedro@codesourcery.com>
6144
6145 * Makefile.in (WARN_CFLAGS): Get it from configure.
6146 (WERROR_CFLAGS): New.
6147 (INTERNAL_CFLAGS): Add WERROR_CFLAGS.
6148 * configure.ac: Introduce --enable-werror, which adds -Werror to
6149 the compiler command line. Enabled by default. Disable with
6150 --disable-werror. Add -Wdeclaration-after-statement
6151 Wpointer-arith and -Wformat-nonliteral to warning flags.
6152 * configure: Regenerate.
6153
331e2f5f
PA
61542010-08-26 Pedro Alves <pedro@codesourcery.com>
6155
6156 * mem-break.c [HAVE_MALLOC_H]: Include malloc.h.
6157
e581f2b4
PA
61582010-08-26 Pedro Alves <pedro@codesourcery.com>
6159
6160 * gdbreplay.c (remote_error): New.
6161 (gdbchar): New.
6162 (expect): Use gdbchar. Check for error reading from GDB.
6163 Clarify sync error output.
6164 (play): Check for errors writing to GDB.
6165 * linux-low.c (sigchld_handler): Really ignore `write' errors.
6166 * remote-utils.c (getpkt): Check for errors writing to the remote
6167 descriptor.
6168
3c11dd79
PA
61692010-08-25 Pedro Alves <pedro@codesourcery.com>
6170
6171 * linux-low.c (linux_wait_1): Move non-debugging code out of
6172 `debug_threads' control.
6173
d20a8ad9
PA
61742010-08-25 Pedro Alves <pedro@codesourcery.com>
6175
6176 * linux-low.c (linux_wait_1): Don't set last_status here.
6177 * server.c (push_event, queue_stop_reply_callback): Assert we're
6178 not pushing a TARGET_WAITKIND_IGNORE event.
6179 (start_inferior, start_inferior, attach_inferior, handle_v_cont)
6180 (myresume, handle_target_event): Set the thread's last_resume_kind
6181 and last_status from the target returned status.
6182
964e4306
PA
61832010-08-25 Pedro Alves <pedro@codesourcery.com>
6184
6185 PR threads/10729
6186
6187 * linux-x86-low.c (update_debug_registers_callback): New.
6188 (i386_dr_low_set_addr): Use it.
6189 (i386_dr_low_get_addr): New.
6190 (i386_dr_low_set_control): Use update_debug_registers_callback.
6191 (i386_dr_low_get_control): New.
6192 (i386_dr_low_get_status): Adjust.
6193 * linux-low.c (linux_stop_lwp): New.
6194 * linux-low.h (linux_stop_lwp): Declare.
6195
6196 * i386-low.c (I386_DR_GET_RW_LEN): Take the dr7 contents as
6197 argument instead of a i386_debug_reg_state.
6198 (I386_DR_WATCH_HIT): Take the dr6 contents as argument instead of
6199 a i386_debug_reg_state.
6200 (i386_insert_aligned_watchpoint): Adjust.
6201 (i386_remove_aligned_watchpoint): Adjust.
6202 (i386_low_stopped_data_address): Read the debug registers from the
6203 inferior instead of from the mirrors.
6204 * i386-low.h (struct i386_debug_reg_state): Extend comment.
6205 (i386_dr_low_get_addr): Declare.
6206 (i386_dr_low_get_control): Declare.
6207 (i386_dr_low_get_status): Change prototype.
6208
6209 * win32-i386-low.c (dr_status_mirror, dr_control_mirror): New globals.
6210 (i386_dr_low_get_addr): New.
6211 (i386_dr_low_get_control): New.
6212 (i386_dr_low_get_status): Adjust prototype. Return
6213 dr_status_mirror.
6214 (i386_initial_stuff): Clear dr_status_mirror and
6215 dr_control_mirror.
6216 (i386_get_thread_context): Adjust.
6217 (i386_set_thread_context): Adjust.
6218 (i386_thread_added): Adjust.
6219
5f21a75b
PA
62202010-08-24 Pedro Alves <pedro@codesourcery.com>
6221
6222 * linux-low.h (linux_thread_area): Delete declaration.
6223
3e4c1235
TS
62242010-08-11 Thomas Schwinge <thomas@codesourcery.com>
6225
6226 * linux-low.c (linux_wait_1): Correctly return the ptid of the child
6227 after its termination.
6228
1971b033
PA
62292010-08-09 Pedro Alves <pedro@codesourcery.com>
6230
6231 * linux-low.c (gdb_wants_lwp_stopped): Delete.
6232 (gdb_wants_all_stopped): Delete.
6233 (linux_wait_1): Don't call them.
6234 * server.c (handle_v_cont): Tag all threads as want-stopped.
6235 (gdb_wants_thread_stopped): Fix comments. Tag the thread that
6236 stopped as "client-wants-stopped".
6237
310444ac
PA
62382010-07-31 Pedro Alves <pedro@codesourcery.com>
6239
6240 * Makefile.in (signals_h): New.
6241 (server_h): Depend on it.
6242 (server.o): Don't depend on $(signals_def).
6243 (signals.o): Depend on $(signals_def).
6244
a19cae16
JK
62452010-07-31 Jan Kratochvil <jan.kratochvil@redhat.com>
6246
6247 * Makefile.in (signals_def): New.
6248 (server_h): Append include/gdb/signals.h and signals_def.
6249 (server.o): Append signals_def.
6250
30d50328
JK
62512010-07-25 Jan Kratochvil <jan.kratochvil@redhat.com>
6252
6253 * server.c (handle_target_event): Use target_signal_to_host for
6254 resume_info.sig initialization.
6255 * target.h (struct thread_resume) <sig>: New comment.
6256
5c3216e2
OS
62572010-07-20 Ozkan Sezer <sezeroz@gmail.com>
6258
c6f46ca0
OS
6259 * server.c (handle_query): strcpy() the returned string from paddress()
6260 instead of sprintf().
5c3216e2
OS
6261 * utils.c (paddress): Return phex_nz().
6262
6bd31874
JB
62632010-07-07 Joel Brobecker <brobecker@adacore.com>
6264
6265 * server.c (handle_v_cont): Call mourn_inferior if process
6266 just exited.
6267 (myresume): Likewise.
6268
0fb4aa4b
PA
62692010-07-01 Pedro Alves <pedro@codesourcery.com>
6270
6271 Static tracepoints, and integration with UST.
6272
6273 * configure.ac: Handle --with-ust. substitute ustlibs and ustinc.
6274 * mem-break.c (uninsert_all_breakpoints)
6275 (reinsert_all_breakpoints): New.
6276 * mem-break.h (reinsert_all_breakpoints, uninsert_all_breakpoints):
6277 * tracepoint.c (ust_loaded, helper_thread_id, cmd_buf): New.
6278 (gdb_agent_ust_loaded, helper_thread_id)
6279 (gdb_agent_helper_thread_id): New macros.
6280 (struct ipa_sym_addresses): Add addr_ust_loaded,
6281 addr_helper_thread_id, addr_cmd_buf.
6282 (symbol_list): Add ust_loaded, helper_thread_id, cmd_buf.
6283 (in_process_agent_loaded_ust): New.
6284 (write_e_ust_not_loaded): New.
6285 (maybe_write_ipa_ust_not_loaded): New.
6286 (struct collect_static_trace_data_action): New.
6287 (enum tracepoint_type) <static_tracepoint>: New.
6288 (struct tracepoint) <handle>: Mention static tracepoints.
6289 (struct static_tracepoint_ctx): New.
6290 (CMD_BUF_SIZE): New.
6291 (add_tracepoint_action): Handle static tracepoint actions.
6292 (unprobe_marker_at): New.
6293 (clear_installed_tracepoints): Handle static tracepoints.
6294 (cmd_qtdp): Handle static tracepoints.
6295 (probe_marker_at): New.
6296 (cmd_qtstart): Handle static tracepoints.
6297 (response_tracepoint): Handle static tracepoints.
6298 (cmd_qtfstm, cmd_qtsstm, cmd_qtstmat): New.
6299 (handle_tracepoint_query): Handle qTfSTM, qTsSTM and qTSTMat.
6300 (get_context_regcache): Handle static tracepoints.
6301 (do_action_at_tracepoint): Handle static tracepoint actions.
6302 (traceframe_find_block_type): Handle static trace data blocks.
6303 (traceframe_read_sdata): New.
6304 (download_tracepoints): Download static tracepoint actions.
6305 [HAVE_UST] Include ust/ust.h, dlfcn.h, sys/socket.h, and sys/un.h.
6306 (GDB_PROBE_NAME): New.
6307 (ust_ops): New.
6308 (GET_UST_SYM): New.
6309 (USTF): New.
6310 (dlsym_ust): New.
6311 (ust_marker_to_static_tracepoint): New.
6312 (gdb_probe): New.
6313 (collect_ust_data_at_tracepoint): New.
6314 (gdb_ust_probe): New.
6315 (UNIX_PATH_MAX, SOCK_DIR): New.
6316 (gdb_ust_connect_sync_socket): New.
6317 (resume_thread, stop_thread): New.
6318 (run_inferior_command): New.
6319 (init_named_socket): New.
6320 (gdb_ust_socket_init): New.
6321 (cstr_to_hexstr): New.
6322 (next_st): New.
6323 (first_marker, next_marker): New.
6324 (response_ust_marker): New.
6325 (cmd_qtfstm, cmd_qtsstm): New.
6326 (unprobe_marker_at, probe_marker_at): New.
6327 (cmd_qtstmat, gdb_ust_thread): New.
6328 (gdb_ust_init): New.
6329 (initialize_tracepoint_ftlib): Call gdb_ust_init.
6330 * linux-amd64-ipa.c [HAVE_UST]: Include ust/processor.h
6331 (ST_REGENTRY): New.
6332 (x86_64_st_collect_regmap): New.
6333 (X86_64_NUM_ST_COLLECT_GREGS): New.
6334 (AMD64_RIP_REGNUM): New.
6335 (supply_static_tracepoint_registers): New.
6336 * linux-i386-ipa.c [HAVE_UST]: Include ust/processor.h
6337 (ST_REGENTRY): New.
6338 (i386_st_collect_regmap): New.
6339 (i386_NUM_ST_COLLECT_GREGS): New.
6340 (supply_static_tracepoint_registers): New.
6341 * server.c (handle_query): Handle qXfer:statictrace:read.
6342 <qSupported>: Report support for StaticTracepoints, and
6343 qXfer:statictrace:read features.
6344 * server.h (traceframe_read_sdata)
6345 (supply_static_tracepoint_registers): Declare.
6346 * remote-utils.c (convert_int_to_ascii, hexchars, ishex, tohex)
6347 (unpack_varlen_hex): Include in IPA build.
6348 * Makefile.in (ustlibs, ustinc): New.
6349 (IPA_OBJS): Add remote-utils-ipa.o.
6350 ($(IPA_LIB)): Link -ldl and -lpthread.
6351 (UST_CFLAGS): New.
6352 (IPAGENT_CFLAGS): Add UST_CFLAGS.
6353 * config.in, configure: Regenerate.
6354
9e4344e5
PA
63552010-06-20 Ian Lance Taylor <iant@google.com>
6356 Pedro Alves <pedro@codesourcery.com>
6357
6358 * linux-x86-low.c (always_true): Delete.
6359 (EMIT_ASM, EMIT_ASM32): Use an uncondition asm jmp instead of
6360 trying to fool the compiler with always_true.
6361
c6beb2cb
PA
63622010-06-20 Pedro Alves <pedro@codesourcery.com>
6363
6364 * tracepoint.c (condition_true_at_tracepoint): Don't run compiled
6365 conditions in gdbserver.
6366
d2ed6730
UW
63672010-06-19 Ulrich Weigand <uweigand@de.ibm.com>
6368
6369 * spu-low.c (spu_read_memory): Wrap around local store limit.
6370 (spu_write_memory): Likewise.
6371
4e29fb54
PA
63722010-06-15 Pedro Alves <pedro@codesourcery.com>
6373
6374 * linux-x86-low.c (amd64_emit_const, amd64_emit_void_call_2)
6375 (i386_emit_const, i386_emit_void_call_2): Replace int64_t uses with
6376 LONGEST uses.
6377 * server.h (struct emit_ops): Replace int64_t uses with LONGEST
6378 uses.
6379 * tracepoint.c (emit_const, emit_void_call_2): Replace int64_t
6380 uses with LONGEST uses.
6381
6a271cae
PA
63822010-06-14 Stan Shebs <stan@codesourcery.com>
6383 Pedro Alves <pedro@codesourcery.com>
6384
6385 Bytecode compiler.
6386
6387 * linux-x86-low.c: Include limits.h.
6388 (add_insns): New.
6389 (always_true): New.
6390 (EMIT_ASM): New.
6391 (EMIT_ASM32): New.
6392 (amd64_emit_prologue, amd64_emit_epilogue, amd64_emit_add)
6393 (amd64_emit_sub, amd64_emit_mul, amd64_emit_lsh)
6394 (amd64_emit_rsh_signed, amd64_emit_rsh_unsigned, amd64_emit_ext,
6395 (amd64_emit_log_not, amd64_emit_bit_and, amd64_emit_bit_or)
6396 (amd64_emit_bit_xor, amd64_emit_bit_not, amd64_emit_equal,
6397 (amd64_emit_less_signed, amd64_emit_less_unsigned, amd64_emit_ref,
6398 (amd64_emit_if_goto, amd64_emit_goto, amd64_write_goto_address)
6399 (amd64_emit_const, amd64_emit_call, amd64_emit_reg)
6400 (amd64_emit_pop, amd64_emit_stack_flush, amd64_emit_zero_ext)
6401 (amd64_emit_swap, amd64_emit_stack_adjust, amd64_emit_int_call_1)
6402 (amd64_emit_void_call_2): New.
6403 (amd64_emit_ops): New.
6404 (i386_emit_prologue, i386_emit_epilogue, i386_emit_add)
6405 (i386_emit_sub,i386_emit_mul, i386_emit_lsh, i386_emit_rsh_signed)
6406 (i386_emit_rsh_unsigned, i386_emit_ext, i386_emit_log_not)
6407 (i386_emit_bit_and, i386_emit_bit_or, i386_emit_bit_xor)
6408 (i386_emit_bit_not, i386_emit_equal, i386_emit_less_signed)
6409 (i386_emit_less_unsigned, i386_emit_ref, i386_emit_if_goto)
6410 (i386_emit_goto, i386_write_goto_address, i386_emit_const)
6411 (i386_emit_call, i386_emit_reg, i386_emit_pop)
6412 (i386_emit_stack_flush, i386_emit_zero_ext, i386_emit_swap)
6413 (i386_emit_stack_adjust, i386_emit_int_call_1)
6414 (i386_emit_void_call_2): New.
6415 (i386_emit_ops): New.
6416 (x86_emit_ops): New.
6417 (the_low_target): Install x86_emit_ops.
6418 * server.h (struct emit_ops): New.
6419 (get_raw_reg_func_addr): Declare.
6420 (current_insn_ptr, emit_error): Declare.
6421 * tracepoint.c (get_raw_reg, get_trace_state_variable_value)
6422 (set_trace_state_variable_value): New defines.
6423 (struct ipa_sym_addresses): New fields addr_get_raw_reg,
6424 addr_get_trace_state_variable_value and
6425 addr_set_trace_state_variable_value.
6426 (symbol_list): New fields for get_raw_reg,
6427 get_trace_state_variable_value and set_trace_state_variable_value.
6428 (condfn): New typedef.
6429 (struct tracepoint): New field `compiled_cond'.
6430 (do_action_at_tracepoint): Clear compiled_cond.
6431 (get_trace_state_variable_value, set_trace_state_variable_value):
6432 Export in the IPA.
6433 (condition_true_at_tracepoint): If there's a compiled condition,
6434 run that.
6435 (current_insn_ptr, emit_error): New globals.
6436 (struct bytecode_address): New.
6437 (get_raw_reg_func_addr): New.
6438 (emit_prologue, emit_epilogue, emit_add, emit_sub, emit_mul)
6439 (emit_lsh, emit_rsh_signed, emit_rsh_unsigned, emit_ext)
6440 (emit_log_not, emit_bit_and, emit_bit_or, emit_bit_xor)
6441 (emit_bit_not, emit_equal, emit_less_signed, emit_less_unsigned)
6442 (emit_ref, emit_if_goto, emit_goto, write_goto_address, emit_const)
6443 (emit_reg, emit_pop, emit_stack_flush, emit_zero_ext, emit_swap)
6444 (emit_stack_adjust, emit_int_call_1, emit_void_call_2): New.
6445 (compile_tracepoint_condition, compile_bytecodes): New.
6446 * target.h (emit_ops): Forward declare.
6447 (struct target_ops): New field emit_ops.
6448 (target_emit_ops): New.
6449 * linux-amd64-ipa.c (gdb_agent_get_raw_reg): New.
6450 * linux-i386-ipa.c (gdb_agent_get_raw_reg): New.
6451 * linux-low.c (linux_emit_ops): New.
6452 (linux_target_ops): Install it.
6453 * linux-low.h (struct linux_target_ops): New field emit_ops.
6454
92b72907
UW
64552010-06-14 Ulrich Weigand <uweigand@de.ibm.com>
6456
6457 * linux-ppc-low.c (ppc_arch_setup): Use private regcache to test MSR.
6458 * linux-s390-low.c (ppc_arch_setup): Use private regcache to test PSW.
6459
fa593d66
PA
64602010-06-01 Pedro Alves <pedro@codesourcery.com>
6461 Stan Shebs <stan@codesourcery.com>
6462
6463 * Makefile.in (IPA_DEPFILES, extra_libraries): New.
6464 (all): Depend on $(extra_libraries).
6465 (install-only): Install the IPA.
6466 (IPA_OBJS, IPA_LIB): New.
6467 (clean): Remove the IPA lib.
6468 (IPAGENT_CFLAGS): New.
6469 (tracepoint-ipa.o, utils-ipa.o, remote-utils-ipa.o)
6470 (regcache-ipa.o, i386-linux-ipa.o, linux-i386-ipa.o)
6471 (linux-amd64-ipa.o, amd64-linux-ipa.o): New rules.
6472 * linux-amd64-ipa.c, linux-i386-ipa.c: New files.
6473 * configure.ac: Check for atomic builtins support in the compiler.
6474 (IPA_DEPFILES, extra_libraries): Define.
6475 * configure.srv (ipa_obj): Add description.
6476 (ipa_i386_linux_regobj, ipa_amd64_linux_regobj): Define.
6477 (i[34567]86-*-linux*): Set ipa_obj.
6478 (x86_64-*-linux*): Set ipa_obj.
6479 * linux-low.c (stabilizing_threads): New.
6480 (supports_fast_tracepoints): New.
6481 (linux_detach): Stabilize threads before detaching.
6482 (handle_tracepoints): Handle internal tracing breakpoints. Assert
6483 the lwp is either not stabilizing, or is moving out of a jump pad.
6484 (linux_fast_tracepoint_collecting): New.
6485 (maybe_move_out_of_jump_pad): New.
6486 (enqueue_one_deferred_signal): New.
6487 (dequeue_one_deferred_signal): New.
6488 (linux_wait_for_event_1): If moving out of a jump pad, defer
6489 pending signals to later.
6490 (linux_stabilize_threads): New.
6491 (linux_wait_1): Check if threads need moving out of jump pads, and
6492 do it if so.
6493 (stuck_in_jump_pad_callback): New.
6494 (move_out_of_jump_pad_callback): New.
6495 (lwp_running): New.
6496 (linux_resume_one_lwp): Handle moving out of jump pads.
6497 (linux_set_resume_request): Dequeue deferred signals.
6498 (need_step_over_p): Also step over fast tracepoint jumps.
6499 (start_step_over): Also uninsert fast tracepoint jumps.
6500 (finish_step_over): Also reinsert fast tracepoint jumps.
6501 (linux_install_fast_tracepoint_jump): New.
6502 (linux_target_ops): Install linux_stabilize_threads and
6503 linux_install_fast_tracepoint_jump_pad.
6504 * linux-low.h (linux_target_ops) <get_thread_area,
6505 install_fast_tracepoint_jump_pad>: New fields.
6506 (struct lwp_info) <collecting_fast_tracepoint,
6507 pending_signals_to_report, exit_jump_pad_bkpt>: New fields.
6508 (linux_get_thread_area): Declare.
6509 * linux-x86-low.c (jump_insn): New.
6510 (x86_get_thread_area): New.
6511 (append_insns): New.
6512 (push_opcode): New.
6513 (amd64_install_fast_tracepoint_jump_pad): New.
6514 (i386_install_fast_tracepoint_jump_pad): New.
6515 (x86_install_fast_tracepoint_jump_pad): New.
6516 (the_low_target): Install x86_get_thread_area and
6517 x86_install_fast_tracepoint_jump_pad.
6518 * mem-break.c (set_raw_breakpoint_at): Use read_inferior_memory.
6519 (struct fast_tracepoint_jump): New.
6520 (fast_tracepoint_jump_insn): New.
6521 (fast_tracepoint_jump_shadow): New.
6522 (find_fast_tracepoint_jump_at): New.
6523 (fast_tracepoint_jump_here): New.
6524 (delete_fast_tracepoint_jump): New.
6525 (set_fast_tracepoint_jump): New.
6526 (uninsert_fast_tracepoint_jumps_at): New.
6527 (reinsert_fast_tracepoint_jumps_at): New.
6528 (set_breakpoint_at): Use write_inferior_memory.
6529 (uninsert_raw_breakpoint): Use write_inferior_memory.
6530 (check_mem_read): Mask out fast tracepoint jumps.
6531 (check_mem_write): Mask out fast tracepoint jumps.
6532 * mem-break.h (struct fast_tracepoint_jump): Forward declare.
6533 (set_fast_tracepoint_jump): Declare.
6534 (delete_fast_tracepoint_jump)
6535 (fast_tracepoint_jump_here, uninsert_fast_tracepoint_jumps_at)
6536 (reinsert_fast_tracepoint_jumps_at): Declare.
6537 * regcache.c: Don't compile many functions when building the
6538 in-process agent library.
6539 (init_register_cache) [IN_PROCESS_AGENT]: Don't allow allocating
6540 the register buffer in the heap.
6541 (free_register_cache): If the register buffer isn't owned by the
6542 regcache, don't free it.
6543 (set_register_cache) [IN_PROCESS_AGENT]: Don't re-alocate
6544 pre-existing register caches.
6545 * remote-utils.c (convert_int_to_ascii): Constify `from' parameter
6546 type.
6547 (convert_ascii_to_int): : Constify `from' parameter type.
6548 (decode_M_packet, decode_X_packet): Replace the `to' parameter by
6549 a `to_p' pointer to pointer parameter. If TO_P is NULL, malloc
6550 the needed buffer in-place.
6551 (relocate_instruction): New.
6552 * server.c (handle_query) <qSymbols>: If the target supports
6553 tracepoints, give it a chance of looking up symbols. Report
6554 support for fast tracepoints.
6555 (handle_status): Stabilize threads.
6556 (process_serial_event): Adjust.
6557 * server.h (struct fast_tracepoint_jump): Forward declare.
6558 (struct process_info) <fast_tracepoint_jumps>: New field.
6559 (convert_ascii_to_int, convert_int_to_ascii): Adjust.
6560 (decode_X_packet, decode_M_packet): Adjust.
6561 (relocate_instruction): Declare.
6562 (in_process_agent_loaded): Declare.
6563 (tracepoint_look_up_symbols): Declare.
6564 (struct fast_tpoint_collect_status): Declare.
6565 (fast_tracepoint_collecting): Declare.
6566 (force_unlock_trace_buffer): Declare.
6567 (handle_tracepoint_bkpts): Declare.
6568 (initialize_low_tracepoint)
6569 (supply_fast_tracepoint_registers) [IN_PROCESS_AGENT]: Declare.
6570 * target.h (struct target_ops) <stabilize_threads,
6571 install_fast_tracepoint_jump_pad>: New fields.
6572 (stabilize_threads, install_fast_tracepoint_jump_pad): New.
6573 * tracepoint.c [HAVE_MALLOC_H]: Include malloc.h.
6574 [HAVE_STDINT_H]: Include stdint.h.
6575 (trace_debug_1): Rename to ...
6576 (trace_vdebug): ... this.
6577 (trace_debug): Rename to ...
6578 (trace_debug_1): ... this. Add `level' parameter.
6579 (trace_debug): New.
6580 (ATTR_USED, ATTR_NOINLINE): New.
6581 (IP_AGENT_EXPORT): New.
6582 (gdb_tp_heap_buffer, gdb_jump_pad_buffer, gdb_jump_pad_buffer_end)
6583 (collecting, gdb_collect, stop_tracing, flush_trace_buffer)
6584 (about_to_request_buffer_space, trace_buffer_is_full)
6585 (stopping_tracepoint, expr_eval_result, error_tracepoint)
6586 (tracepoints, tracing, trace_buffer_ctrl, trace_buffer_ctrl_curr)
6587 (trace_buffer_lo, trace_buffer_hi, traceframe_read_count)
6588 (traceframe_write_count, traceframes_created)
6589 (trace_state_variables)
6590 New renaming defines.
6591 (struct ipa_sym_addresses): New.
6592 (STRINGIZE_1, STRINGIZE, IPA_SYM): New.
6593 (symbol_list): New.
6594 (ipa_sym_addrs): New.
6595 (all_tracepoint_symbols_looked_up): New.
6596 (in_process_agent_loaded): New.
6597 (write_e_ipa_not_loaded): New.
6598 (maybe_write_ipa_not_loaded): New.
6599 (tracepoint_look_up_symbols): New.
6600 (debug_threads) [IN_PROCESS_AGENT]: New.
6601 (read_inferior_memory) [IN_PROCESS_AGENT]: New.
6602 (UNKNOWN_SIDE_EFFECTS): New.
6603 (stop_tracing): New.
6604 (flush_trace_buffer): New.
6605 (stop_tracing_bkpt): New.
6606 (flush_trace_buffer_bkpt): New.
6607 (read_inferior_integer): New.
6608 (read_inferior_uinteger): New.
6609 (read_inferior_data_pointer): New.
6610 (write_inferior_data_pointer): New.
6611 (write_inferior_integer): New.
6612 (write_inferior_uinteger): New.
6613 (struct collect_static_trace_data_action): Delete.
6614 (enum tracepoint_type): New.
6615 (struct tracepoint) <type>: New field `type'.
43aaf8b6
PA
6616 <actions_str, step_actions, step_actions_str>: Only include in
6617 GDBserver.
fa593d66
PA
6618 <orig_size, obj_addr_on_target, adjusted_insn_addr>
6619 <adjusted_insn_addr_end, jump_pad, jump_pad_end>: New fields.
6620 (tracepoints): Use IP_AGENT_EXPORT.
6621 (last_tracepoint): Don't include in the IPA.
6622 (stopping_tracepoint): Use IP_AGENT_EXPORT.
6623 (trace_buffer_is_full): Use IP_AGENT_EXPORT.
6624 (alloced_trace_state_variables): New.
6625 (trace_state_variables): Use IP_AGENT_EXPORT.
6626 (traceframe_t): Delete unused variable.
6627 (circular_trace_buffer): Don't include in the IPA.
6628 (trace_buffer_start): Delete.
6629 (struct trace_buffer_control): New.
6630 (trace_buffer_free): Delete.
6631 (struct ipa_trace_buffer_control): New.
6632 (GDBSERVER_FLUSH_COUNT_MASK, GDBSERVER_FLUSH_COUNT_MASK_PREV)
6633 (GDBSERVER_FLUSH_COUNT_MASK_CURR, GDBSERVER_UPDATED_FLUSH_COUNT_BIT):
6634 New.
6635 (trace_buffer_ctrl): New.
6636 (TRACE_BUFFER_CTRL_CURR): New.
6637 (trace_buffer_start, trace_buffer_free, trace_buffer_end_free):
6638 Reimplement as macros.
6639 (trace_buffer_wrap): Delete.
6640 (traceframe_write_count, traceframe_read_count)
6641 (traceframes_created, tracing): Use IP_AGENT_EXPORT.
6642 (struct tracepoint_hit_ctx) <type>: New field.
6643 (struct fast_tracepoint_ctx): New.
6644 (memory_barrier): New.
6645 (cmpxchg): New.
6646 (record_tracepoint_error): Update atomically in the IPA.
6647 (clear_inferior_trace_buffer): New.
6648 (about_to_request_buffer_space): New.
6649 (trace_buffer_alloc): Handle GDBserver and inferior simulatenous
6650 updating the same buffer.
6651 (add_tracepoint): Default the tracepoint's type to trap
6652 tracepoint, and orig_size to -1.
6653 (get_trace_state_variable) [IN_PROCESS_AGENT]: Handle allocated
6654 internal variables.
6655 (create_trace_state_variable): New parameter `gdb'. Handle it.
6656 (clear_installed_tracepoints): Clear fast tracepoint jumps.
6657 (cmd_qtdp): Handle fast tracepoints.
6658 (cmd_qtdv): Adjust.
6659 (max_jump_pad_size): New.
6660 (gdb_jump_pad_head): New.
6661 (get_jump_space_head): New.
6662 (claim_jump_space): New.
6663 (sort_tracepoints): New.
6664 (MAX_JUMP_SIZE): New.
6665 (cmd_qtstart): Handle fast tracepoints. Sync tracepoints with the
6666 IPA.
6667 (stop_tracing) [IN_PROCESS_AGENT]: Don't include the tdisconnected
6668 support. Upload fast traceframes, and delete internal IPA
6669 breakpoints.
6670 (stop_tracing_handler): New.
6671 (flush_trace_buffer_handler): New.
6672 (cmd_qtstop): Upload fast tracepoints.
6673 (response_tracepoint): Handle fast tracepoints.
6674 (tracepoint_finished_step): Upload fast traceframes. Set the
6675 tracepoint hit context's tracepoint type.
6676 (handle_tracepoint_bkpts): New.
6677 (tracepoint_was_hit): Set the tracepoint hit context's tracepoint
6678 type. Add comment about fast tracepoints.
6679 (collect_data_at_tracepoint) [IN_PROCESS_AGENT]: Don't access the
6680 non-existing action_str field.
6681 (get_context_regcache): Handle fast tracepoints.
6682 (do_action_at_tracepoint) [!IN_PROCESS_AGENT]: Don't write the PC
6683 to the regcache.
6684 (fast_tracepoint_from_jump_pad_address): New.
6685 (fast_tracepoint_from_ipa_tpoint_address): New.
6686 (collecting_t): New.
6687 (force_unlock_trace_buffer): New.
6688 (fast_tracepoint_collecting): New.
6689 (collecting): New.
6690 (gdb_collect): New.
6691 (write_inferior_data_ptr): New.
6692 (target_tp_heap): New.
6693 (target_malloc): New.
6694 (download_agent_expr): New.
6695 (UALIGN): New.
6696 (download_tracepoints): New.
6697 (download_trace_state_variables): New.
6698 (upload_fast_traceframes): New.
6699 (IPA_FIRST_TRACEFRAME): New.
6700 (IPA_NEXT_TRACEFRAME_1): New.
6701 (IPA_NEXT_TRACEFRAME): New.
6702 [IN_PROCESS_AGENT]: Include sys/mman.h and fcntl.h.
6703 [IN_PROCESS_AGENT] (gdb_tp_heap_buffer, gdb_jump_pad_buffer)
6704 (gdb_jump_pad_buffer_end): New.
6705 [IN_PROCESS_AGENT] (initialize_tracepoint_ftlib): New.
6706 (initialize_tracepoint): Adjust.
6707 [IN_PROCESS_AGENT]: Allocate the IPA heap, and jump pad scratch
6708 buffer. Initialize the low module.
6709 * utils.c (PREFIX, TOOLNAME): New.
6710 (malloc_failure): Use PREFIX.
6711 (error): In the IPA, an error causes an exit.
6712 (fatal, warning): Use PREFIX.
6713 (internal_error): Use TOOLNAME.
6714 (NUMCELLS): Increase to 10.
6715 * configure, config.in: Regenerate.
6716
d149dd1d
PA
67172010-06-01 Pedro Alves <pedro@codesourcery.com>
6718
6719 * server.c (handle_query) <qSupported>: Do two passes over the
6720 qSupported string to avoid nesting strtok.
6721
f6528abd
JK
67222010-05-28 Jan Kratochvil <jan.kratochvil@redhat.com>
6723
6724 * Makefile.in (SFILES): Add $(srcdir)/proc-service.list.
6725 (CDEPS): New.
6726 * configure.ac (RDYNAMIC): New AC_MSG_CHECKING wrapping. Test also
6727 -Wl,--dynamic-list.
6728 * configure: Regenerate.
6729 * proc-service.list: New.
6730
ca2a87a0
JK
67312010-05-28 Jan Kratochvil <jan.kratochvil@redhat.com>
6732
6733 * linux-low.c (linux_core_of_thread): Fix crash on invalid CONTENT.
6734 New comment.
6735
363a6e9f
OS
67362010-05-26 Ozkan Sezer <sezeroz@gmail.com>
6737
6738 * gdbreplay.c (remote_open): Check error return from socket() call by
6739 its equality to -1 not by it being negative.
6740 * remote-utils.c (remote_open): Likewise.
6741
d23b6cb1
PA
67422010-05-23 Pedro Alves <pedro@codesourcery.com>
6743
6744 * config.h: Regenerate.
6745
28d3cf85
MK
67462010-05-19 Maxim Kuvyrkov <maxim@codesourcery.com>
6747
6748 * linux-m68k-low.c (ps_get_thread_area): Don't define if kernel
6749 doesn't provide PTRACE_GET_THREAD_AREA.
6750
fea36a59
MK
67512010-05-19 Maxim Kuvyrkov <maxim@codesourcery.com>
6752
6753 * linux-m68k-low.c: Include <asm/ptrace.h>
6754 (ps_get_thread_area): Implement.
6755
24b066ba
DE
67562010-05-03 Doug Evans <dje@google.com>
6757
6758 * event-loop.c (struct callback_event): New struct.
6759 (callback_list): New global.
6760 (append_callback_event, delete_callback_event): New functions.
6761 (process_callback): New function.
6762 (start_event_loop): Call it.
6763 * remote-utils.c (NOT_SCHEDULED): Define.
6764 (readchar_buf, readchar_bufcnt, readchar_bufp): New static globals,
6765 moved out of readchar.
6766 (readchar): Rewrite. Call reschedule before returning.
6767 (reset_readchar): New function.
6768 (remote_close): Call it.
6769 (process_remaining, reschedule): New functions.
6770 * server.h (callback_handler_func): New typedef.
6771 (append_callback_event, delete_callback_event): Declare.
6772
9836d6ea
PA
67732010-05-03 Pedro Alves <pedro@codesourcery.com>
6774
6775 * proc-service.c (ps_pglobal_lookup): Use
6776 thread_db_look_up_one_symbol.
6777 * remote-utils.c (look_up_one_symbol): Add new `may_ask_gdb'
6778 parameter. Use it instead of all_symbols_looked_up.
6779 * server.h (struct process_info) <all_symbols_looked_up>: Delete
6780 field.
6781 (all_symbols_looked_up): Don't declare.
6782 (look_up_one_symbol): Add new `may_ask_gdb' parameter.
6783 * thread-db.c (struct thread_db) <all_symbols_looked_up>: New
6784 field.
6785 (thread_db_look_up_symbols): Adjust call to look_up_one_symbol.
6786 Set all_symbols_looked_up here.
6787 (thread_db_look_up_one_symbol): New.
6788 (thread_db_get_tls_address): Adjust.
6789 (thread_db_load_search, try_thread_db_load_1): Always allocate the
6790 thread_db object on the heap, and tentatively set it in the
6791 process structure.
6792 (thread_db_init): Don't set all_symbols_looked_up here.
6793 * linux-low.h (thread_db_look_up_one_symbol): Declare.
6794
7984d532
PA
67952010-05-03 Pedro Alves <pedro@codesourcery.com>
6796
6797 * linux-low.c (linux_kill, linux_detach): Adjust.
6798 (status_pending_p_callback): Remove redundant statement. Check
6799 for !TARGET_WAITIKIND_IGNORE, instead of
6800 TARGET_WAITKIND_STOPPED.
6801 (handle_tracepoints): Make sure LWP is locked. Adjust.
6802 (linux_wait_for_event_1): Adjust.
6803 (linux_cancel_breakpoints): New.
6804 (unsuspend_one_lwp): New.
6805 (unsuspend_all_lwps): New.
6806 (linux_wait_1): If finishing a step-over, unsuspend all lwps.
6807 (send_sigstop_callback): Change return type to int, add new
6808 `except' parameter and handle it.
6809 (suspend_and_send_sigstop_callback): New.
6810 (stop_all_lwps): Add new `suspend' and `expect' parameters, and
6811 pass them down. If SUSPEND, also increment the lwp's suspend
6812 count.
6813 (linux_resume_one_lwp): Add notice about resuming a suspended LWP.
6814 (need_step_over_p): Don't consider suspended LWPs.
6815 (start_step_over): Adjust.
6816 (proceed_one_lwp): Change return type to int, add new `except'
6817 parameter and handle it.
6818 (unsuspend_and_proceed_one_lwp): New.
6819 (proceed_all_lwps): Use find_inferior instead of
6820 for_each_inferior.
6821 (unstop_all_lwps): Add `unsuspend' parameter. If UNSUSPEND, them
6822 also decrement the suspend count of LWPs. Pass `except' down,
6823 instead of hacking its suspend count.
6824 (linux_pause_all): Add `freeze' parameter. Adjust.
6825 (linux_unpause_all): New.
6826 (linux_target_ops): Install linux_unpause_all.
6827 * server.c (handle_status): Adjust.
6828 * target.h (struct target_ops): New fields `unpause_all' and
6829 `cancel_breakpoints'. Add new parameter to `pause_all'.
6830 (pause_all): Add new `freeze' parameter.
6831 (unpause_all): New.
6832 (cancel_breakpoints): New.
6833 * tracepoint.c (clear_installed_tracepoints): Pause threads, and
6834 cancel breakpoints.
6835 (cmd_qtstart): Pause threads.
6836 (stop_tracing): Pause threads, and cancel breakpoints.
6837 * win32-low.c (win32_target_ops): Adjust.
6838
e471f25b
PA
68392010-05-03 Pedro Alves <pedro@codesourcery.com>
6840
6841 * linux-low.c (linux_wait_for_event_1): Move passing the signal to
6842 the inferior right away from here...
6843 (linux_wait_1): ... to here, and adjust to check the thread's
6844 last_resume_kind instead of the lwp's step or stop_expected flags.
6845
1915ef4f
PA
68462010-05-02 Pedro Alves <pedro@codesourcery.com>
6847
6848 * README: Use consistent `GDB' and `GDBserver' spellings.
6849
f9e39928
PA
68502010-05-02 Pedro Alves <pedro@codesourcery.com>
6851
6852 * linux-low.c (linux_kill_one_lwp): Assume the lwp is stopped.
6853 (linux_kill): Stop all lwps here. Don't delete the main lwp here.
6854 (linux_detach_one_lwp): Assume the lwp is stopped.
6855 (any_thread_of): Delete.
6856 (linux_detach): Stop all lwps here. Don't blindly delete all
6857 breakpoints.
6858 (delete_lwp_callback): New.
6859 (linux_mourn): Delete all lwps of the process that is gone.
6860 (linux_wait_1): Don't delete the last lwp of the process here.
6861 * mem-break.h (mark_breakpoints_out): Declare.
6862 * mem-break.c (mark_breakpoints_out): New.
6863 (free_all_breakpoints): Use it.
6864 * server.c (handle_target_event): If the process is gone, mark
6865 breakpoints out.
6866 * thread-db.c (struct thread_db) <create_bp>: New field.
6867 (thread_db_enable_reporting): Fix prototype. Store a thread event
6868 breakpoint reference in the thread_db struct.
6869 (thread_db_load_search): Clear the thread_db object.
6870 (try_thread_db_load_1): Ditto.
6871 (switch_to_process): New.
6872 (disable_thread_event_reporting): Use it.
6873 (remove_thread_event_breakpoints): New.
6874 (thread_db_detach, thread_db_mourn): Use it.
6875
1e7fc18c
PA
68762010-05-01 Pedro Alves <pedro@codesourcery.com>
6877
6878 * linux-low.c (linux_enable_event_reporting): New.
6879 (linux_wait_for_event_1, handle_extended_wait): Use it.
6880
02fc4de7
PA
68812010-04-30 Pedro Alves <pedro@codesourcery.com>
6882
6883 * linux-low.c (linux_kill_one_lwp, linux_kill)
6884 (linux_detach_one_lwp): Adjust to send_sigstop interface change.
6885 (send_sigstop): Take an lwp_info as parameter instead. Queue a
6886 SIGSTOP even if the LWP is stopped.
6887 (send_sigstop_callback): New.
6888 (stop_all_lwps): Use send_sigstop_callback instead.
6889 (linux_resume_one_thread): Adjust.
6890 (proceed_one_lwp): Still proceed an LWP that the client has
6891 requested to stop, if we haven't reported it as stopped yet. Make
6892 sure that LWPs the client want stopped, have a pending SIGSTOP.
6893
bc3b5632
DE
68942010-04-26 Doug Evans <dje@google.com>
6895
ae1ada35
DE
6896 * server.c (handle_general_set): Make static.
6897
bc3b5632
DE
6898 * remote-utils.c (putpkt_binary_1): Call readchar instead of read.
6899 Print received char after testing for error/eof instead of before.
6900 (input_interrupt): Tweak comment.
6901
65730243
DE
69022010-04-23 Doug Evans <dje@google.com>
6903
6904 * server.c (start_inferior): Print inferior argv if --debug.
6905
a8ae7dc0
AR
69062010-04-21 Aleksandar Ristovski <aristovski@qnx.com>
6907
6908 * Makefile.in (nto_low_h nto-low.o nto-x86-low.o): New dependency lists.
6909 * nto-x86-low.c: Include server.h
6910
1c07cc19
PM
69112010-04-20 Pierre Muller <muller@ics.u-strasbg.fr>
6912
6913 * win32-i386-low.c: Use __x86_64__ macro instead of __x86_64 to
6914 be consistent with other sources of this directory.
6915 (init_registers_amd64): Correct name of source file of this function
6916 in the comment.
6917
e0a61e09
PM
69182010-04-19 Pierre Muller <muller@ics.u-strasbg.fr>
6919
6920 * configure.srv (x86_64-*-mingw*): New configuration for Windows
6921 64-bit executables.
6922
54709339
PM
69232010-04-19 Pierre Muller <muller@ics.u-strasbg.fr>
6924
6925 * win32-i386-low.c: Add 64-bit support.
6926 (CONTEXT_EXTENDED_REGISTERS): Set macro to zero if not exisiting.
6927 (init_registers_amd64): Declare.
6928 (mappings): Add 64-bit version of array.
6929 (init_windows_x86): New function.
6930 (the_low_target): Change init_arch field to init_windows_x86.
6931
e8f0053d
PM
69322010-04-19 Pierre Muller <muller@ics.u-strasbg.fr>
6933
6934 * win32-low.c: Adapt to support also 64-bit architecture.
6935 (child_xfer_memory): Use uintptr_t type for local variable `addr'.
6936 (get_image_name): Use SIZE_T type for local variable `done'.
6937 (psapi_get_dll_name): Use LPVOID type for parameter `BaseAddress'.
6938 (toolhelp_get_dll_name): Idem.
6939 (handle_load_dll): Use CORE_ADDR type for local variable `load_addr'.
6940 Use uintptr_t typecast to avoid warning.
6941 (handle_unload_dll): Use uintptr_t typecast to avoid warning.
6942 (handle_exception): Use phex_nz to avoid warning.
6943 (win32_wait): Remove unused local variable `process'.
6944
c481e77e
PM
69452010-04-19 Pierre Muller <muller@ics.u-strasbg.fr>
6946
6947 * configure.srv (srv_amd64_regobj): Replace `x86-64-avx.o' by
6948 `amd64-avx.o'.
6949
12ea4b69
PM
69502010-04-17 Pierre Muller <muller@ics.u-strasbg.fr>
6951
6952 * configure.ac: Use `ws2_32' library for srv_mingw.
6953 * configure: Regenerate.
6954 * gdbreplay.c: Include winsock2.h instead of winsock.h.
6955 * remote-utils.c: Likewise.
6956
f6d1620c
L
69572010-04-17 H.J. Lu <hongjiu.lu@intel.com>
6958
6959 * linux-x86-low.c (xmltarget_amd64_linux_no_xml): Define only
6960 if __x86_64__ is defined.
6961
8e642873
PM
69622010-04-16 Pierre Muller <muller@ics.u-strasbg.fr>
6963
6964 * configure: Regenerate.
6965
711e434b
PM
69662010-04-16 Pierre Muller <muller@ics.u-strasbg.fr>
6967
6968 * server.c (handle_query): Handle 'qGetTIBAddr' query.
6969 * target.h (target_ops): New get_tib_address field.
6970 * win32-low.h (win32_thread_info): Add thread_local_base field.
6971 * win32-low.c (child_add_thread): Add tlb argument.
6972 Set thread_local_base field to TLB.
6973 (get_child_debug_event): Adapt to child_add_thread change.
6974 (win32_get_tib_address): New function.
6975 (win32_target_ops): Set get_tib_address field to
6976 win32_get_tib_address.
6977 * linux-low.c (linux_target_ops): Set get_tib_address field to NULL.
6978
505106cd
PA
69792010-04-12 Pedro Alves <pedro@codesourcery.com>
6980
505106cd
PA
6981 * linux-low.c (linux_mourn): Also remove the process.
6982 * server.c (handle_target_event): Don't remove the process here.
6983 * nto-low.c (nto_mourn): New.
6984 (nto_target_ops): Install it.
6985 * spu-low.c (spu_mourn): New.
6986 (spu_target_ops): Install it.
6987 * win32-low.c (win32_mourn): New.
6988 (win32_target_ops): Install it.
6989
e8470a06
PA
69902010-04-12 Pedro Alves <pedro@codesourcery.com>
6991
6992 * server.h (buffer_xml_printf): Remove redundant `;'.
6993
45ba0d02
PA
69942010-04-12 Pedro Alves <pedro@codesourcery.com>
6995
6996 * regcache.c (set_register_cache): Invalidate regcaches before
6997 changing the register cache layout.
6998 (regcache_invalidate_one): Allow a NULL regcache.
6999 * linux-x86-low.c (x86_linux_update_xmltarget): Invalidate
7000 regcaches before changing the register cache layout or the target
7001 regsets.
7002
59e04013
L
70032010-04-12 H.J. Lu <hongjiu.lu@intel.com>
7004
7005 * linux-x86-low.c (x86_linux_update_xmltarget): Avoid unused
7006 variable warning on Linux/x86-64.
7007
8336d594
PA
70082010-04-11 Pedro Alves <pedro@codesourcery.com>
7009
7010 GDBserver disconnected tracing support.
7011
7012 * linux-low.c (linux_remove_process): Delete.
7013 (add_lwp): Don't set last_resume_kind here.
7014 (linux_kill): Use `mourn'.
7015 (linux_detach): Use `thread_db_detach', and `mourn'.
7016 (linux_mourn): New.
7017 (linux_attach_lwp_1): Adjust comment.
7018 (linux_attach): last_resume_kind moved the thread_info; adjust.
7019 (status_pending_p_callback): Adjust.
7020 (linux_wait_for_event_1): Adjust.
7021 (count_events_callback, select_singlestep_lwp_callback)
7022 (select_event_lwp_callback, cancel_breakpoints_callback)
7023 (db_wants_lwp_stopped, linux_wait_1, need_step_over_p)
7024 (proceed_one_lwp): Adjust.
7025 (linux_async): Add debug output.
7026 (linux_thread_stopped): New.
7027 (linux_pause_all): New.
7028 (linux_target_ops): Install linux_mourn, linux_thread_stopped and
7029 linux_pause_all.
7030 * linux-low.h (struct lwp_info): Delete last_resume_kind field.
7031 (thread_db_free): Delete declaration.
7032 (thread_db_detach, thread_db_mourn): Declare.
7033 * thread-db.c (thread_db_init): Use thread_db_mourn.
7034 (thread_db_free): Delete, split in two.
7035 (disable_thread_event_reporting): New.
7036 (thread_db_detach): New.
7037 (thread_db_mourn): New.
7038
7039 * server.h (struct thread_info) <last_resume_kind>: New field.
7040 <attached>: Add comment.
7041 <gdb_detached>: New field.
7042 (handler_func): Change return type to int.
7043 (handle_serial_event, handle_target_event): Ditto.
7044 (gdb_connected): Declare.
7045 (tracing): Delete.
7046 (disconnected_tracing): Declare.
7047 (stop_tracing): Declare.
7048
7049 * server.c (handle_query) <qSupported>: Report support for
7050 disconnected tracing.
7051 (queue_stop_reply_callback): Account for running threads.
7052 (gdb_wants_thread_stopped): New.
7053 (gdb_wants_all_threads_stopped): New.
7054 (gdb_reattached_process): New.
7055 (handle_status): Clear the `gdb_detached' flag of all processes.
7056 In all-stop, stop all threads.
7057 (main): Be sure to leave tfind mode. Handle disconnected tracing.
7058 (process_serial_event): If the remote connection breaks, or if an
7059 exit was forced with "monitor exit", force an event loop exit.
7060 Handle disconnected tracing on detach.
7061 (handle_serial_event): Adjust.
7062 (handle_target_event): If GDB isn't connected, forward events back
7063 to the inferior, unless the last process exited, in which case,
7064 exit gdbserver. Adjust interface.
7065
7066 * remote-utils.c (remote_open): Don't block in accept. Instead
7067 register an event loop source on the listen socket file
7068 descriptor. Refactor bits into ...
7069 (listen_desc): ... this new global.
7070 (gdb_connected): ... this new function.
7071 (enable_async_notification): ... this new function.
7072 (handle_accept_event): ... this new function.
7073 (remote_close): Clear remote_desc.
7074
7075 * inferiors.c (add_thread): Set the new thread's last_resume_kind.
7076
7077 * target.h (struct target_ops) <mourn, thread_stopped, pause_all>:
7078 New fields.
7079 (mourn_inferior): Define.
7080 (target_process_qsupported): Avoid the dangling else problem.
7081 (thread_stopped): Define.
7082 (pause_all): Define.
7083 (target_waitstatus_to_string): Declare.
7084 * target.c (target_waitstatus_to_string): New.
7085
7086 * tracepoint.c (tracing): Make extern.
7087 (disconnected_tracing): New.
7088 (stop_tracing): Make extern. Handle tracing stops due to GDB
7089 disconnecting.
7090 (cmd_qtdisconnected): New.
7091 (cmd_qtstatus): Report disconnected tracing status in trace reply.
7092 (handle_tracepoint_general_set): Handle QTDisconnected.
7093
7094 * event-loop.c (event_handler_func): Change return type to int.
7095 (process_event): Bail out if the event handler wants the event
7096 loop to stop.
7097 (handle_file_event): Ditto.
7098 (start_event_loop): Bail out if the event handler wants the event
7099 loop to stop.
7100
7101 * nto-low.c (nto_target_ops): Adjust.
7102 * spu-low.c (spu_wait): Don't remove the process here.
7103 (spu_target_ops): Adjust.
7104 * win32-low.c (win32_wait): Don't remove the process here.
7105 (win32_target_ops): Adjust.
7106
5d267c4c
PA
71072010-04-11 Pedro Alves <pedro@codesourcery.com>
7108
7109 * regcache.c (realloc_register_cache): Invalidate inferior's
7110 regcache before recreating it.
7111
623ccd72
PA
71122010-04-09 Pedro Alves <pedro@codesourcery.com>
7113
7114 * tracepoint.c (cmd_qtstatus): Report trace buffer circularity.
7115
219f2f23
PA
71162010-04-09 Stan Shebs <stan@codesourcery.com>
7117 Pedro Alves <pedro@codesourcery.com>
7118
7119 * server.h (LONGEST): New.
7120 (struct thread_info) <while_stepping>: New field.
7121 (unpack_varlen_hex, xrealloc, pulongest, plongest, phex_nz):
7122 Declare.
7123 (initialize_tracepoint, handle_tracepoint_general_set)
7124 (handle_tracepoint_query, tracepoint_finished_step)
7125 (tracepoint_was_hit, release_while_stepping_state_list):
7126 (current_traceframe): Declare.
7127 * server.c (handle_general_set): Handle tracepoint packets.
7128 (read_memory): New.
7129 (write_memory): New.
7130 (handle_search_memory_1): Use read_memory.
7131 (handle_query): Report support for conditional tracepoints, trace
7132 state variables, and tracepoint sources. Handle tracepoint
7133 queries.
7134 (main): Initialize the tracepoints module.
7135 (process_serial_event): Handle traceframe reads/writes.
7136
7137 * linux-low.c (handle_tracepoints): New.
7138 (linux_wait_1): Call it.
7139 (linux_resume_one_lwp): Handle while-stepping.
7140 (linux_supports_tracepoints, linux_read_pc, linux_write_pc): New.
7141 (linux_target_ops): Install them.
7142 * linux-low.h (struct linux_target_ops) <supports_tracepoints>:
7143 New field.
7144 * linux-x86-low.c (x86_supports_tracepoints): New.
7145 (the_low_target). Install it.
7146
7147 * mem-break.h (delete_breakpoint): Declare.
7148 * mem-break.c (delete_breakpoint): Make external.
7149
7150 * target.h (struct target_ops): Add `supports_tracepoints',
7151 `read_pc', and `write_pc' fields.
7152 (target_supports_tracepoints): Define.
7153 * utils.c (xrealloc, decimal2str, pulongest, plongest, thirty_two)
7154 (phex_nz): New.
7155
7156 * regcache.h (struct regcache) <registers_owned>: New field.
7157 (init_register_cache, regcache_cpy): Declare.
7158 (regcache_read_pc, regcache_write_pc): Declare.
7159 (register_cache_size): Declare.
7160 (supply_regblock): Declare.
7161 * regcache.c (init_register_cache): New.
7162 (new_register_cache): Use it.
7163 (regcache_cpy): New.
7164 (register_cache_size): New.
7165 (supply_regblock): New.
7166 (regcache_read_pc, regcache_write_pc): New.
889bf7c5 7167
219f2f23
PA
7168 * tracepoint.c: New.
7169
7170 * Makefile.in (OBS): Add tracepoint.o.
7171 (tracepoint.o): New rule.
7172
3a13a53b
L
71732010-04-08 H.J. Lu <hongjiu.lu@intel.com>
7174
7175 * Makefile.in (clean): Also remove i386-mmx.c i386-mmx-linux.c.
7176 (i386-mmx.o): New.
7177 (i386-mmx.c): Likewise.
7178 (i386-mmx-linux.o): Likewise.
7179 (i386-mmx-linux.c): Likewise.
7180
7181 * configure.srv (srv_i386_regobj): Add i386-mmx.o.
7182 (srv_i386_linux_regobj): Add i386-mmx-linux.o.
7183 (srv_i386_xmlfiles): Add i386/i386-mmx.xml.
7184 (srv_i386_linux_xmlfiles): Add i386/i386-mmx-linux.xml.
7185
7186 * linux-x86-low.c (init_registers_i386_mmx_linux): New.
7187 (x86_linux_update_xmltarget): Call init_registers_i386_mmx_linux
7188 and return if ptrace PTRACE_GETFPXREGS failed in 32bit.
7189
1570b33e
L
71902010-04-07 H.J. Lu <hongjiu.lu@intel.com>
7191
7192 * Makefile.in (clean): Updated.
7193 (i386-avx.o): New.
7194 (i386-avx.c): Likewise.
7195 (i386-avx-linux.o): Likewise.
7196 (i386-avx-linux.c): Likewise.
7197 (amd64-avx.o): Likewise.
7198 (amd64-avx.c): Likewise.
7199 (amd64-avx-linux.o): Likewise.
7200 (amd64-avx-linux.c): Likewise.
7201
7202 * configure.srv (srv_i386_regobj): Add i386-avx.o.
7203 (srv_i386_linux_regobj): Add i386-avx-linux.o.
7204 (srv_amd64_regobj): Add amd64-avx.o.
7205 (srv_amd64_linux_regobj): Add amd64-avx-linux.o.
7206 (srv_i386_32bit_xmlfiles): Add i386/32bit-avx.xml.
7207 (srv_i386_64bit_xmlfiles): Add i386/64bit-avx.xml.
7208 (srv_i386_xmlfiles): Add i386/i386-avx.xml.
7209 (srv_amd64_xmlfiles): Add i386/amd64-avx.xml.
7210 (srv_i386_linux_xmlfiles): Add i386/i386-avx-linux.xml.
7211 (srv_amd64_linux_xmlfiles): Add i386/amd64-avx-linux.xml.
7212
7213 * i387-fp.c: Include "i386-xstate.h".
7214 (i387_xsave): New.
7215 (i387_cache_to_xsave): Likewise.
7216 (i387_xsave_to_cache): Likewise.
7217 (x86_xcr0): Likewise.
7218
7219 * i387-fp.h (i387_cache_to_xsave): Likewise.
7220 (i387_xsave_to_cache): Likewise.
7221 (x86_xcr0): Likewise.
7222
7223 * linux-arm-low.c (target_regsets): Initialize nt_type to 0.
7224 * linux-crisv32-low.c (target_regsets): Likewise.
7225 * linux-m68k-low.c (target_regsets): Likewise.
7226 * linux-mips-low.c (target_regsets): Likewise.
7227 * linux-ppc-low.c (target_regsets): Likewise.
7228 * linux-s390-low.c (target_regsets): Likewise.
7229 * linux-sh-low.c (target_regsets): Likewise.
7230 * linux-sparc-low.c (target_regsets): Likewise.
7231 * linux-xtensa-low.c (target_regsets): Likewise.
7232
7233 * linux-low.c: Include <sys/uio.h>.
7234 (regsets_fetch_inferior_registers): Support nt_type.
7235 (regsets_store_inferior_registers): Likewise.
7236 (linux_process_qsupported): New.
7237 (linux_target_ops): Add linux_process_qsupported.
7238
7239 * linux-low.h (regset_info): Add nt_type.
7240 (linux_target_ops): Add process_qsupported.
7241
7242 * linux-x86-low.c: Include "i386-xstate.h", "elf/common.h"
7243 and <sys/uio.h>.
7244 (init_registers_i386_avx_linux): New.
7245 (init_registers_amd64_avx_linux): Likewise.
7246 (xmltarget_i386_linux_no_xml): Likewise.
7247 (xmltarget_amd64_linux_no_xml): Likewise.
7248 (PTRACE_GETREGSET): Likewise.
7249 (PTRACE_SETREGSET): Likewise.
7250 (x86_fill_xstateregset): Likewise.
7251 (x86_store_xstateregset): Likewise.
7252 (use_xml): Likewise.
7253 (x86_linux_update_xmltarget): Likewise.
7254 (x86_linux_process_qsupported): Likewise.
7255 (target_regsets): Add NT_X86_XSTATE entry and Initialize nt_type.
7256 (x86_arch_setup): Don't call init_registers_amd64_linux nor
7257 init_registers_i386_linux here. Call
7258 x86_linux_update_xmltarget.
7259 (the_low_target): Add x86_linux_process_qsupported.
7260
7261 * server.c (handle_query): Call target_process_qsupported.
7262
7263 * target.h (target_ops): Add process_qsupported.
7264 (target_process_qsupported): New.
7265
fc7238bb
PA
72662010-04-03 Pedro Alves <pedro@codesourcery.com>
7267
7268 * inferiors.c (add_thread): Set last_status kind to
7269 TARGET_WAITKIND_IGNORE.
7270 * linux-low.c (cancel_breakpoint): Remove unnecessary regcache
7271 fetch. Use ptid_of. Avoid unnecessary get_lwp_thread calls.
7272 (linux_wait_1): Move `thread' local definition to block that uses
7273 it. Don't NULL initialize `event_child'.
7274 (linux_resume_one_thread): Avoid unnecessary get_lwp_thread calls.
7275 Alway set the thread's last_status to TARGET_WAITKIND_IGNORE.
7276 * linux-x86-low.c (x86_breakpoint_at): Read raw memory.
7277
bdabb078
PA
72782010-04-01 Pedro Alves <pedro@codesourcery.com>
7279
7280 * linux-low.c (get_stop_pc): Don't adjust the PC if stopped with
7281 an extended waitstatus, or by a watchpoint.
7282 (cancel_breakpoints_callback): Don't cancel a breakpoint if the
7283 thread was stepping or has been stopped by a watchpoint.
7284
d3bbe7a0
PA
72852010-04-01 Pedro Alves <pedro@codesourcery.com>
7286
7287 * mem-break.c (struct raw_breakpoint): New field shlib_disabled.
7288 (set_gdb_breakpoint_at): If GDB is inserting a breakpoint on top
7289 of another, then delete the previous, and validate all
7290 breakpoints.
7291 (validate_inserted_breakpoint): New.
7292 (delete_disabled_breakpoints): New.
7293 (validate_breakpoints): New.
7294 (check_mem_read): Validate breakpoints before trusting their
7295 shadow. Delete disabled breakpoints.
7296 (check_mem_write): Validate breakpoints before trusting they
7297 should be inserted. Delete disabled breakpoints.
7298 * mem-break.h (validate_breakpoints):
7299 * server.c (handle_query): Validate breakpoints when we see a
7300 qSymbol query.
7301
8b07ae33
PA
73022010-04-01 Pedro Alves <pedro@codesourcery.com>
7303
7304 * linux-low.c (linux_wait_1): Avoid setting need_step_over is
7305 there's a GDB breakpoint at stop_pc. Always report a trap to GDB
7306 if we could tell there's a GDB breakpoint at stop_pc.
7307 (need_step_over_p): Don't do a step over if we find a GDB
7308 breakpoint at the resume PC.
7309
7310 * mem-break.c (struct raw_breakpoint): New.
7311 (enum bkpt_type): New type `gdb_breakpoint'.
7312 (struct breakpoint): Delete the `PC', `old_data' and `inserted'
7313 fields. New field `raw'.
7314 (find_raw_breakpoint_at): New.
7315 (set_raw_breakpoint_at): Handle refcounting. Create a raw
7316 breakpoint instead.
7317 (set_breakpoint_at): Adjust.
7318 (delete_raw_breakpoint): New.
7319 (release_breakpoint): New.
7320 (delete_breakpoint): Rename to...
7321 (delete_breakpoint_1): ... this. Add proc parameter. Use
7322 release_breakpoint. Return ENOENT.
7323 (delete_breakpoint): Reimplement.
7324 (find_breakpoint_at): Delete.
7325 (find_gdb_breakpoint_at): New.
7326 (delete_breakpoint_at): Delete.
7327 (set_gdb_breakpoint_at): New.
7328 (delete_gdb_breakpoint_at): New.
7329 (gdb_breakpoint_here): New.
7330 (set_reinsert_breakpoint): Use release_breakpoint.
7331 (uninsert_breakpoint): Rename to ...
7332 (uninsert_raw_breakpoint): ... this.
7333 (uninsert_breakpoints_at): Adjust to handle raw breakpoints.
7334 (reinsert_raw_breakpoint): Change parameter type to
7335 raw_breakpoint.
7336 (reinsert_breakpoints_at): Adjust to handle raw breakpoints
7337 instead.
7338 (check_breakpoints): Adjust. Use release_breakpoint.
7339 (breakpoint_here): Rewrite using find_raw_breakpoint_at.
7340 (breakpoint_inserted_here): Ditto.
7341 (check_mem_read): Adjust to iterate over raw breakpoints instead.
7342 Don't trust the breakpoint's shadow if it is not inserted.
7343 (check_mem_write): Adjust to iterate over raw breakpoints instead.
7344 (delete_all_breakpoints): Adjust.
7345 (free_all_breakpoints): Mark all breakpoints as uninserted, and
7346 use delete_breakpoint_1.
7347
7348 * mem-break.h (breakpoints_supported): Delete declaration.
7349 (set_gdb_breakpoint_at): Declare.
7350 (gdb_breakpoint_here): Declare.
7351 (delete_breakpoint_at): Delete.
7352 (delete_gdb_breakpoint_at): Declare.
7353
7354 * server.h (struct raw_breakpoint): Forward declare.
7355 (struct process_info): New field `raw_breakpoints'.
7356
7357 * linux-x86-low.c (x86_insert_point, x86_remote_point): Handle Z0
7358 breakpoints.
7359
6bf5e0ba
PA
73602010-03-24 Pedro Alves <pedro@codesourcery.com>
7361
7362 * linux-low.c (status_pending_p_callback): Fix comment.
7363 (linux_wait_for_event_1): Move most of the internal breakpoint
7364 handling from here...
7365 (linux_wait_1): ... to here.
7366 (count_events_callback): New.
7367 (select_singlestep_lwp_callback): New.
7368 (select_event_lwp_callback): New.
7369 (cancel_breakpoints_callback): New.
7370 (select_event_lwp): New.
7371 (linux_wait_1): Simplify internal breakpoint handling. Give equal
7372 priority to all LWPs that have had events that should be reported
7373 to the client. Cancel breakpoints when about to reporting the
7374 event to the client, not while stopping lwps. No longer cancel
7375 finished single-steps here.
7376 (cancel_finished_single_step): Delete.
7377 (cancel_finished_single_steps): Delete.
7378
414a389f
PA
73792010-03-24 Pedro Alves <pedro@codesourcery.com>
7380
7381 * mem-break.c (enum bkpt_type): New.
7382 (struct breakpoint): New field `type'.
7383 (set_breakpoint_at): Change return type to struct breakpoint
7384 pointer. Set type to `other_breakpoint' by default.
7385 (delete_breakpoint): Rewrite, supporting more than one breakpoint
7386 in the breakpoint list.
7387 (delete_reinsert_breakpoints): Only delete reinsert breakpoints.
7388 (reinsert_breakpoint): Rename to ...
7389 (reinsert_raw_breakpoint): ... this.
7390 (reinsert_breakpoints_at): Adjust.
7391 * mem-break.h (struct breakpoint): Declare.
7392 (set_breakpoint_at): Change return type to struct breakpoint
7393 pointer.
7394
2280c721
PA
73952010-03-24 Pedro Alves <pedro@codesourcery.com>
7396
7397 * server.c (handle_query): Assign, not compare.
7398
d50171e4
PA
73992010-03-24 Pedro Alves <pedro@codesourcery.com>
7400
7401 Teach linux gdbserver to step-over-breakpoints.
7402
7403 * linux-low.c (can_hardware_single_step): New.
7404 (supports_breakpoints): New.
7405 (handle_extended_wait): If stopping threads, read the stop pc of
7406 the new cloned LWP.
7407 (get_pc): New.
7408 (get_stop_pc): Add `lwp' parameter. Handle it. Bail out if the
7409 low target doesn't support retrieving the PC.
7410 (add_lwp): Set last_resume_kind to resume_continue.
7411 (linux_attach_lwp_1): Adjust comments. Always set stop_expected.
7412 (linux_attach): Don't clear stop_expected. Set the lwp's
7413 last_resume_kind to resume_stop.
7414 (linux_detach_one_lwp): Don't check for removed breakpoints.
7415 (check_removed_breakpoint): Delete.
7416 (status_pending_p): Rename to ...
7417 (status_pending_p_callback): ... this. Don't check for removed
7418 breakpoints. Don't consider threads that are stopped from GDB's
7419 perspective.
7420 (linux_wait_for_lwp): Always read the stop_pc here.
7421 (cancel_breakpoint): New.
7422 (step_over_bkpt): New global.
7423 (linux_wait_for_event_1): Implement stepping over breakpoints.
7424 (gdb_wants_lwp_stopped): New.
7425 (gdb_wants_all_stopped): New.
7426 (linux_wait_1): Tag threads as gdb-wants-stopped. Cancel finished
7427 single-step traps here. Store the thread's last reported target
7428 wait status.
7429 (send_sigstop): Don't clear stop_expected. Always set it,
7430 instead.
7431 (mark_lwp_dead): Remove reference to pending_is_breakpoint.
7432 (cancel_finished_single_step): New.
7433 (cancel_finished_single_steps): New.
7434 (wait_for_sigstop): Don't cancel finished single-step traps here.
7435 (linux_resume_one_lwp): Don't check for removed breakpoints.
7436 Don't set `step' on non-hardware step archs.
7437 (linux_set_resume_request): Ignore resume_stop requests if already
7438 stopping or stopped. Set the lwp's last_resume_kind.
7439 (resume_status_pending_p): Don't check for removed breakpoints.
7440 (need_step_over_p): New.
7441 (start_step_over): New.
7442 (finish_step_over): New.
7443 (linux_resume_one_thread): Always queue a sigstop for resume_stop
7444 requests. Clear the thread's last reported target waitstatus.
7445 Don't use the `suspended' flag. Don't consider pending breakpoints.
7446 (linux_resume): Start a step-over if necessary.
7447 (proceed_one_lwp): New.
7448 (proceed_all_lwps): New.
7449 (unstop_all_lwps): New.
7450 * linux-low.h (struct lwp_info): Rewrite comment for the
7451 `suspended' flag. Add the `stop_pc' field. Delete the
7452 `pending_stop_pc' field. Tweak the `stepping' flag's comment.
7453 Add `'last_resume_kind' and `need_step_over' fields.
7454 * inferiors.c (struct thread_info): Delete, moved elsewhere.
7455 * mem-break.c (struct breakpoint): Delete `reinserting' flag.
7456 Delete `breakpoint_to_reinsert' field. New flag `inserted'.
7457 (set_raw_breakpoint_at): New.
7458 (set_breakpoint_at): Rewrite to use it.
7459 (reinsert_breakpoint_handler): Delete.
7460 (set_reinsert_breakpoint): New.
7461 (reinsert_breakpoint_by_bp): Delete.
7462 (delete_reinsert_breakpoints): New.
7463 (uninsert_breakpoint): Rewrite.
7464 (uninsert_breakpoints_at): New.
7465 (reinsert_breakpoint): Rewrite.
7466 (reinsert_breakpoints_at): New.
7467 (check_breakpoints): Rewrite.
7468 (breakpoint_here): New.
7469 (breakpoint_inserted_here): New.
7470 (check_mem_read): Adjust.
7471 * mem-break.h (breakpoints_supported, breakpoint_here)
7472 (breakpoint_inserted_here, set_reinsert_breakpoint): Declare.
7473 (reinsert_breakpoint_by_bp): Delete declaration.
7474 (delete_reinsert_breakpoints): Declare.
7475 (reinsert_breakpoint): Delete declaration.
7476 (reinsert_breakpoints_at): Declare.
7477 (uninsert_breakpoint): Delete declaration.
7478 (uninsert_breakpoints_at): Declare.
7479 (check_breakpoints): Adjust prototype.
7480 * server.h: Adjust include order.
7481 (struct thread_info): Declare here. Add a `last_status' field.
7482
30ba68cb
MS
74832010-03-23 Michael Snyder <msnyder@vmware.com>
7484
7485 * server.c (crc32): New function.
7486 (handle_query): Add handling for 'qCRC:' request.
7487
b9a881c2
PA
74882010-03-23 Pedro Alves <pedro@codesourcery.com>
7489
7490 * linux-x86-low.c (x86_linux_prepare_to_resume): Clear DR6 if the
7491 lwp had been stopped by a watchpoint.
7492
e92d13d5
PA
74932010-03-16 Pedro Alves <pedro@codesourcery.com>
7494
7495 * server.h (internal_error): Declare.
7496 (gdb_assert, ASSERT_FUNCTION, gdb_assert_fail): Define.
7497 * utils.c (internal_error): New function.
7498
64daa791
AS
74992010-03-15 Andreas Schwab <schwab@redhat.com>
7500
7501 * configure.srv: Fix typo setting srv_regobj.
7502
f52cd8cd
PA
75032010-03-15 Pedro Alves <pedro@codesourcery.com>
7504
7505 * linux-low.c (fetch_register): Avoid passing a non string literal
7506 format to `error'.
7507 (usr_store_inferior_registers): Ditto.
7508
93ae6fdc
PA
75092010-03-14 Pedro Alves <pedro@codesourcery.com>
7510
7511 * linux-low.c (linux_write_memory): Bail out early if peeking
7512 memory failed.
7513
c3adc08c
PA
75142010-03-14 Pedro Alves <pedro@codesourcery.com>
7515
7516 * linux-low.h (struct lwp_info): New fields
7517 `stopped_by_watchpoint' and `stopped_data_address'.
7518 * linux-low.c (linux_wait_for_lwp): Check for watchpoint triggers
7519 here, and cache them in the lwp object.
7520 (wait_for_sigstop): Check stopped_by_watchpoint lwp field
7521 directly.
7522 (linux_resume_one_lwp): Clear the lwp's stopped_by_watchpoint
7523 field.
7524 (linux_stopped_by_watchpoint): Rewrite.
7525 (linux_stopped_data_address): Rewrite.
7526
bce522a2
PA
75272010-03-06 Simo Melenius <simo.melenius@iki.fi>
7528
7529 * linux-low.c (linux_wait_for_lwp): Fetch the regcache after
7530 switching the current inferior, not before.
7531
90884b2b
L
75322010-03-01 H.J. Lu <hongjiu.lu@intel.com>
7533
7534 * Makefile.in (clean): Replace reg-i386.c, reg-x86-64.c,
7535 reg-i386-linux.c and reg-x86-64-linux.c with i386.c, amd64.c,
7536 i386-linux.c and amd64-linux.c.
7537 (reg-i386.o): Removed.
7538 (reg-i386.c): Likewise.
7539 (reg-i386-linux.o): Likewise.
7540 (reg-i386-linux.c): Likewise.
7541 (reg-x86-64.o): Likewise.
7542 (reg-x86-64.c): Likewise.
7543 (reg-x86-64-linux.o): Likewise.
7544 (reg-x86-64-linux.c): Likewise.
7545 (i386.o): New.
7546 (i386.c): Likewise.
7547 (i386-linux.o): Likewise.
7548 (i386-linux.c): Likewise.
7549 (amd64.o): Likewise.
7550 (amd64.c): Likewise.
7551 (amd64-linux.o): Likewise.
7552 (amd64-linux.c): Likewise.
7553
7554 * configure.srv (srv_i386_regobj): New.
7555 (srv_i386_linux_regobj): Likewise.
7556 (srv_amd64_regobj): Likewise.
7557 (srv_amd64_linux_regobj): Likewise.
7558 (srv_i386_32bit_xmlfiles): Likewise.
7559 (srv_i386_64bit_xmlfiles): Likewise.
7560 (srv_i386_xmlfiles): Likewise.
7561 (srv_amd64_xmlfiles): Likewise.
7562 (srv_i386_linux_xmlfiles): Likewise.
7563 (srv_amd64_linux_xmlfiles): Likewise.
7564 (i[34567]86-*-cygwin*): Set srv_regobj to $srv_i386_regobj. Set
7565 srv_xmlfiles to $srv_i386_xmlfiles.
7566 (i[34567]86-*-mingw32ce*): Likewise.
7567 (i[34567]86-*-mingw*): Likewise.
7568 (i[34567]86-*-nto*): Likewise.
7569 (i[34567]86-*-linux*): Set srv_regobj to $srv_i386_linux_regobj
7570 and $srv_amd64_linux_regobj. Set srv_xmlfiles to
7571 $srv_i386_linux_xmlfiles and $srv_amd64_linux_xmlfiles.
7572 (x86_64-*-linux*): Likewise.
7573
7574 * linux-x86-low.c (init_registers_x86_64_linux): Removed.
7575 (init_registers_amd64_linux): New.
7576 (x86_arch_setup): Replace init_registers_x86_64_linux with
7577 init_registers_amd64_linux.
7578
193f13e6
MK
75792010-02-23 Maxim Kuvyrkov <maxim@codesourcery.com>
7580
7581 * configure.ac: Check for libdl. If it is not available link against
7582 static libthread_db.
7583 * configure: Regenerate.
7584
85d721b8
PA
75852010-02-22 Pedro Alves <pedro@codesourcery.com>
7586
7587 PR9605
7588
7589 * i386-low.c (i386_length_and_rw_bits): Throw a fatal error if
7590 handing a read watchpoint.
7591 (i386_low_insert_watchpoint): Read watchpoints aren't supported.
7592
6076632b
DE
75932010-02-12 Doug Evans <dje@google.com>
7594
7595 * linux-low.c (linux_supports_tracefork_flag): Document.
7596 (linux_look_up_symbols): Add comment.
7597
3327ccf7
L
75982010-02-03 H.J. Lu <hongjiu.lu@intel.com>
7599
7600 * regcache.c (supply_register): Clear regcache if buf is NULL.
7601
0718675c 76022010-02-02 Nicolas Roche <roche@sourceware.org>
3327ccf7 7603 Joel Brobecker <brobecker@adacore.com>
0718675c
JB
7604
7605 * inferiors.c (find_inferior): Add function documentation.
7606 (unloaded_dll): Handle the case where the unloaded dll has not
7607 been previously registered in the dll list.
7608
177321bd
DJ
76092010-02-01 Daniel Jacobowitz <dan@codesourcery.com>
7610
7611 * linux-arm-low.c (thumb_breakpoint_len): Delete.
7612 (thumb2_breakpoint): New.
7613 (arm_breakpoint_at): Check for Thumb-2 breakpoints.
7614
2b009048
DJ
76152010-01-29 Daniel Jacobowitz <dan@codesourcery.com>
7616
7617 * linux-low.c (get_stop_pc): Check for SIGTRAP.
7618 (linux_wait_for_event_1): Handle SIGILL and SIGSEGV as possible
7619 breakpoints.
7620
3be029c7
PA
76212010-01-21 Pedro Alves <pedro@codesourcery.com>
7622
7623 * linux-ppc-low.c (ppc_arch_setup): Adjust to regcache changes.
7624
18f5de3b
JK
76252010-01-21 Jan Kratochvil <jan.kratochvil@redhat.com>
7626
7627 * linux-s390-low.c (s390_collect_ptrace_register)
7628 (s390_supply_ptrace_register): Adjust it for the new regcache parameter.
7629
3743bb4f
DE
76302010-01-21 Doug Evans <dje@google.com>
7631
14ce3065
DE
7632 * linux-low.c (PTRACE_ARG3_TYPE): Change from long to void*.
7633 (PTRACE_ARG4_TYPE): New macro.
7634 (handle_extended_wait): Cast ptrace arg4 to PTRACE_ARG4_TYPE.
7635 (linux_wait_for_event_1, linux_resume_one_lwp): Ditto.
7636 (fetch_register): Cast to uintptr_t before casting to PTRACE_ARG3_TYPE.
7637 (usr_store_inferior_registers): Ditto.
7638 (linux_read_memory, linux_write_memory): Ditto.
7639 (linux_test_for_tracefork): Ditto.
7640
3743bb4f
DE
7641 * linux-arm-low.c: Remove redundant include of gdb_proc_service.h.
7642 Only include elf.h if gdb_proc_service.h didn't include linux/elf.h.
7643
8b315be5
PA
76442010-01-21 Pedro Alves <pedro@codesourcery.com>
7645
7646 * proc-service.c (ps_lgetregs): Don't refetch registers from the
7647 target.
7648
85492558
PA
76492010-01-21 Pedro Alves <pedro@codesourcery.com>
7650
7651 * spu-low.c (spu_fetch_registers, spu_store_registers): Change
7652 prototype to take a regcache. Adjust.
7653
442ea881
PA
76542010-01-20 Pedro Alves <pedro@codesourcery.com>
7655
7656 * regcache.h (struct thread_info): Forward declare.
7657 (struct regcache): New.
7658 (new_register_cache): Adjust prototype.
7659 (get_thread_regcache): Declare.
7660 (free_register_cache): Adjust prototype.
7661 (registers_to_string, registers_from_string): Ditto.
7662 (supply_register, supply_register_by_name, collect_register)
7663 (collect_register_as_string, collect_register_by_name): Ditto.
7664 * regcache.c (struct inferior_regcache_data): Delete.
7665 (get_regcache): Rename to ...
7666 (get_thread_regcache): ... this. Adjust. Switch inferior before
7667 fetching registers.
7668 (regcache_invalidate_one): Adjust.
7669 (regcache_invalidate): Fix prototype.
7670 (new_register_cache): Return the new register cache.
7671 (free_register_cache): Change prototype.
7672 (realloc_register_cache): Adjust.
7673 (registers_to_string): Change prototype to take a regcache. Adjust.
7674 (registers_from_string): Ditto.
7675 (register_data): Ditto.
7676 (supply_register): Ditto.
7677 (supply_register_by_name): Ditto.
7678 (collect_register): Ditto.
7679 (collect_register_as_string): Ditto.
7680 (collect_register_by_name): Ditto.
7681 * server.c (process_serial_event): Adjust.
7682 * linux-low.h (regset_fill_func, regset_store_func): Change
7683 prototype.
7684 (get_pc, set_pc, collect_ptrace_register, supply_ptrace_register):
7685 Change prototype.
7686 * linux-low.c (get_stop_pc): Adjust.
7687 (check_removed_breakpoint): Adjust.
7688 (linux_wait_for_event): Adjust.
7689 (linux_resume_one_lwp): Adjust.
7690 (fetch_register): Add regcache parameter. Adjust.
7691 (usr_store_inferior_registers): Ditto.
7692 (regsets_fetch_inferior_registers): Ditto.
7693 (regsets_store_inferior_registers): Ditto.
7694 (linux_fetch_registers, linux_store_registers): Ditto.
7695 * i387-fp.c (i387_cache_to_fsave): Change prototype to take a
7696 regcache. Adjust.
43aaf8b6
PA
7697 (i387_fsave_to_cache, i387_cache_to_fxsave, i387_fxsave_to_cache):
7698 Ditto.
442ea881
PA
7699 * i387-fp.h (i387_cache_to_fsave, i387_fsave_to_cache): Change
7700 prototype to take a regcache.
7701 (i387_cache_to_fxsave, i387_fxsave_to_cache): Ditto.
7702 * remote-utils.c (convert_ascii_to_int, outreg)
7703 (prepare_resume_reply): Change prototype to take a regcache.
7704 Adjust.
7705 * target.h (struct target_ops) <fetch_registers, store_registers>:
7706 Change prototype to take a regcache.
7707 (fetch_inferior_registers, store_inferior_registers): Change
7708 prototype to take a regcache. Adjust.
7709 * proc-service.c (ps_lgetregs): Adjust.
7710 * linux-x86-low.c (x86_fill_gregset, x86_store_gregset)
7711 (x86_fill_fpregset, x86_store_fpregset, x86_fill_fpxregset)
7712 (x86_store_fpxregset, x86_get_pc, x86_set_pc): Change prototype to
7713 take a regcache. Adjust.
7714 * linux-arm-low.c (arm_fill_gregset, arm_store_gregset)
7715 (arm_fill_wmmxregset, arm_store_wmmxregset, arm_fill_vfpregset)
7716 (arm_store_vfpregset, arm_get_pc, arm_set_pc):
7717 (arm_breakpoint_at): Change prototype to take a regcache. Adjust.
7718 * linux-cris-low.c (cris_get_pc, cris_set_pc)
7719 (cris_cannot_fetch_register):
7720 (cris_breakpoint_at): Change prototype to take a regcache.
7721 Adjust.
7722 * linux-crisv32-low.c (cris_get_pc, cris_set_pc,
7723 cris_reinsert_addr, cris_write_data_breakpoint): Change prototype
7724 to take a regcache. Adjust.
7725 (cris_breakpoint_at, cris_insert_point, cris_remove_point):
7726 Adjust.
7727 * linux-m32r-low.c (m32r_get_pc, m32r_set_pc): Change prototype to
7728 take a regcache. Adjust.
7729 * linux-m68k-low.c (m68k_fill_gregset, m68k_store_gregset)
7730 (m68k_fill_fpregset, m68k_store_fpregset, m68k_get_pc,
7731 (m68k_set_pc): Change prototype to take a regcache. Adjust.
7732 * linux-mips-low.c (mips_get_pc):
7733 (mips_set_pc): Change prototype to take a regcache. Adjust.
7734 (mips_reinsert_addr): Adjust.
7735 (mips_collect_register): Change prototype to take a regcache.
7736 Adjust.
7737 (mips_supply_register):
7738 (mips_collect_register_32bit, mips_supply_register_32bit)
7739 (mips_fill_gregset, mips_store_gregset, mips_fill_fpregset)
7740 (mips_store_fpregset): Ditto.
43aaf8b6
PA
7741 * linux-ppc-low.c (ppc_supply_ptrace_register)
7742 (ppc_supply_ptrace_register): Ditto.
442ea881
PA
7743 (parse_spufs_run): Adjust.
7744 (ppc_get_pc, ppc_set_pc, ppc_fill_gregset, ppc_fill_vsxregset)
7745 (ppc_store_vsxregset, ppc_fill_vrregset, ppc_store_vrregset)
7746 (ppc_fill_evrregset, ppc_store_evrregset): Change prototype to
7747 take a regcache. Adjust.
7748 * linux-s390-low.c (s390_collect_ptrace_register)
7749 (s390_supply_ptrace_register, s390_fill_gregset, s390_get_pc)
7750 (s390_set_pc): Change prototype to take a regcache. Adjust.
7751 (s390_arch_setup): Adjust.
7752 * linux-sh-low.c (sh_get_pc, sh_breakpoint_at)
7753 (sh_fill_gregset): Change prototype to take a regcache. Adjust.
7754 * linux-sparc-low.c (sparc_fill_gregset_to_stack)
7755 (sparc_fill_gregset, sparc_store_gregset_from_stack)
7756 (sparc_store_gregset, sparc_get_pc): Change prototype to take a
7757 regcache. Adjust.
7758 (sparc_breakpoint_at): Adjust.
7759 * linux-xtensa-low.c (xtensa_fill_gregset):
7760 (xtensa_store_gregset):
7761 (xtensa_fill_xtregset, xtensa_store_xtregset, xtensa_get_pc)
7762 (xtensa_set_pc): Change prototype to take a regcache. Adjust.
7763 * nto-low.c (nto_fetch_registers, nto_store_registers): Change
7764 prototype to take a regcache. Adjust.
7765 * win32-arm-low.c (arm_fetch_inferior_register)
7766 (arm_store_inferior_register): Change prototype to take a
7767 regcache. Adjust.
7768 * win32-i386-low.c (i386_fetch_inferior_register)
7769 (i386_store_inferior_register): Change prototype to take a
7770 regcache. Adjust.
7771 * win32-low.c (child_fetch_inferior_registers)
7772 (child_store_inferior_registers): Change prototype to take a
7773 regcache. Adjust.
7774 (win32_wait): Adjust.
7775 (win32_fetch_inferior_registers): Change prototype to take a
7776 regcache. Adjust.
7777 (win32_store_inferior_registers): Adjust.
7778 * win32-low.h (struct win32_target_ops) <fetch_inferior_register,
7779 store_inferior_register>: Change prototype to take a regcache.
7780
60c3d7b0
DE
77812010-01-20 Doug Evans <dje@google.com>
7782
7783 * linux-low.c (linux_create_inferior): Wrap use of __SIGRTMIN in
7784 #ifdef.
7785 (linux_wait_for_event1, linux_init_signals): Ditto.
ec8ebe72 7786 (W_STOPCODE): Provide definition if missing.
60c3d7b0 7787
dc146f7c
VP
77882010-01-13 Vladimir Prus <vladimir@codesourcery.com>
7789
7790 * linux-low.c (linux_core_of_thread): New.
7791 (compare_ints, show_process, list_threads): New.
7792 (linux_qxfer_osdata): Report threads and cores.
7793 (linux_target_op): Register linux_core_of_thread.
7794 * remote-utils.c (prepare_resume_reply): Report the core.
7795 (buffer_xml_printf): Support %d specifier.
7796 * server.c (handle_threads_qxfer_proper, handle_threads_qxfer):
7797 New.
7798 (handle_query): Handle qXfer:threads. Announce availability
7799 thereof.
7800 * target.h (struct target_ops): New field core_of_thread.
7801
7803799a
UW
78022010-01-04 Ulrich Weigand <uweigand@de.ibm.com>
7803
7804 * Makefile.in (clean): Remove new generated files.
7805 (reg-s390.o, reg-s390.c): Remove rules.
7806 (reg-s390x.o, reg-s390x.c): Likewise.
7807 (s390-linux32.o, s390-linux32.c): Add rules.
7808 (s390-linux64.o, s390-linux64.c): Likewise.
7809 (s390x-linux64.o, s390x-linux64.c): Likewise.
7810 * configure.srv (s390*-*-linux*): Update srv_regobj and srv_xmlfiles.
7811 * linux-s390-low.c: Include <elf.h>.
7812 (HWCAP_S390_HIGH_GPRS): Define if undefined.
7813 (init_registers_s390): Remove prototype.
7814 (init_registers_s390x): Likewise.
7815 (init_registers_s390_linux32): Add prototype.
7816 (init_registers_s390_linux64): Likewise.
7817 (init_registers_s390x_linux64): Likewise.
7818 (s390_num_regs_3264): New define.
7819 (s390_regmap_3264): New global variable.
7820 (s390_cannot_fetch_register): Remove obsolete check.
7821 (s390_cannot_store_register): Likewise.
7822 (s390_collect_ptrace_register): Handle upper/lower register halves.
7823 (s390_supply_ptrace_register): Likewise.
7824 (s390_fill_gregset): Update to register number changes.
7825 (s390_get_hwcap): New routine.
7826 (s390_arch_setup): Detect 32-bit process running on 64-bit system.
7827 Install appropriate regmap and register set.
7828
6e7ffa39
JB
78292010-01-01 Joel Brobecker <brobecker@adacore.com>
7830
7831 * server.c (gdbserver_version): Update copyright year to 2010.
7832 * gdbreplay.c (gdbreplay_version): Likewise.
7833
957f3f49
DE
78342009-12-28 Doug Evans <dje@google.com>
7835
7836 * linux-low.c: Delete inclusion of ansidecl.h, elf/common.h,
7837 elf/external.h. Include <elf.h> instead but only if necessary.
7838
ca5c370d
PA
78392009-12-28 Pedro Alves <pedro@codesourcery.com>
7840
7841 * linux-low.c (linux_remove_process): Remove `detaching'
7842 parameter. Don't release/detach from thread_db here.
7843 (linux_kill): Release/detach from thread_db here, ...
7844 (linux_detach): ... and here, before actually detaching.
7845 (linux_wait_1): ... and here, when a process exits.
7846 * thread-db.c (any_thread_of): New.
7847 (thread_db_free): Switch the current inferior to a thread of the
7848 passed in process.
7849
4ee62156
DE
78502009-12-21 Doug Evans <dje@google.com>
7851
d90e6a88
DE
7852 * linux-x86-low.c: Delete outdated comment about Elf32_Phdr.
7853
c5f62d5f
DE
7854 * linux-low.c (kill_lwp): Use __NR_tkill instead of SYS_tkill.
7855 Move definition of tkill_failed to ifdef __NR_tkill to avoid gcc
7856 warning ifndef __NR_tkill. Move setting of errno there too.
7857 Delete unnecessary resetting of errno after syscall.
7858 Minor comment changes to match gdb/linux-nat.c:kill_lwp.
7859
10e86dd7
DE
7860 * configure.ac: Check for dladdr.
7861 * config.in: Regenerate.
7862 * configure: Regenerate.
7863 * thread-db.c (dladdr_to_soname): Only define ifdef HAVE_DLADDR.
7864 (try_thread_db_load): Update.
7865
4ee62156
DE
7866 * linux-low.c (my_waitpid): Delete unnecessary prototype.
7867
00f515da
DE
78682009-12-18 Doug Evans <dje@google.com>
7869
e9464885
DE
7870 * event-loop.c: Include unistd.h if it exists.
7871
07d4f67e
DE
7872 * linux-low.c (my_waitpid): Move definition away from being in
7873 between linux_tracefork_child/linux_test_for_tracefork.
7874
00f515da
DE
7875 * gdb_proc_service.h (psaddr_t): Fix type.
7876 * thread-db.c (thread_db_info.td_thr_tls_get_addr_p): Fix
7877 signature to match glibc.
7878
1de1badb
DE
78792009-12-16 Doug Evans <dje@google.com>
7880
7881 * linux-low.c (linux_read_memory): Fix argument to read.
7882
aeeb81d1
PA
78832009-11-26 Pedro Alves <pedro@codesourcery.com>
7884
7885 * win32-low.c (get_child_debug_event): On EXIT_THREAD_DEBUG_EVENT
7886 events, don't leave current_inferior pointing at null.
7887
10357975
PA
78882009-11-26 Pedro Alves <pedro@codesourcery.com>
7889
7890 * win32-low.c (LOG): Delete.
7891 (OUTMSG): Output to stderr.
7892 (OUTMSG2): Conditionalize on `debug_threads' variable, instead of
7893 on compile time LOG macro.
7894 (win32_wait): Fix debug output.
7895
cf6e3471
PA
78962009-11-26 Pedro Alves <pedro@codesourcery.com>
7897
7898 * win32-low.c (win32_add_one_solib): If the dll name is
7899 "ntdll.dll", prepend the system directory to the dll path.
7900
0c85e18e
MK
79012009-11-17 Daniel Jacobowitz <dan@codesourcery.com>
7902
7903 * m68k-tdep.c (m68k_gdbarch_init): Reuse previous initialization.
7904
9ac544ce 79052009-11-17 Nathan Sidwell <nathan@codesourcery.com>
889bf7c5 7906 Vladimir Prus <vladimir@codesourcery.com>
9ac544ce
MK
7907
7908 * Makefile.in (reg-cf.o, reg-cf.c): New targets.
7909 * configure.ac: Check for __mcoldfire__ and set
7910 gdb_cv_m68k_is_coldfire.
7911 * configure.srv: Use gdb_cv_m68k_is_coldfire to select between
7912 reg-cf.o and reg-m68k.o.
7913 * configure: Regenerated.
7914
fd7dd3e6
PA
79152009-11-16 Pedro Alves <pedro@codesourcery.com>
7916
7917 * linux-low.c (linux_remove_process): Add `detaching' parameter.
7918 Pass it to thread_db_free.
7919 (linux_kill, linux_detach, linux_wait_1): Adjust to pass the
7920 proper `detaching' argument to linux_remove_process.
7921 * linux-low.h (thread_db_free): Add `detaching' parameter.
7922 * thread-db.c (thread_db_init): Pass false as `detaching' argument
7923 to thread_db_free.
7924 (thread_db_free): Add `detaching' parameter. Only
7925 call td_ta_clear_event if detaching from process.
7926
75aa492e
MK
79272009-11-12 Maxim Kuvyrkov <maxim@codesourcery.com>
7928
7929 * thread-db.c (thread_db_free): Fix typo.
7930
21e1bee4
PP
79312009-11-11 Paul Pluzhnikov <ppluzhnikov@google.com>
7932
7933 PR gdb/10838
7934 * thread-db.c (thread_db_free): Call td_ta_clear_event.
7935
8838b45e
NS
79362009-11-03 Nathan Sidwell <nathan@codesourcery.com>
7937
7938 * configure.ac (i[34567]86-*): Check if we're targetting x86-64
7939 with an i686 compiler.
7940 * configure.srv (i[34567]86-*-linux*): Pull in x86-64 handling if
7941 needed.
7942 * configure: Rebuilt.
7943
8a35fb51
SL
79442009-10-29 Sandra Loosemore <sandra@codesourcery.com>
7945
7946 PR gdb/10783
7947
7948 * server.c (handle_search_memory_1): Correct read_addr initialization
7949 in loop for searching subsequent chunks.
7950
96f15937
PP
79512009-10-29 Paul Pluzhnikov <ppluzhnikov@google.com>
7952
7953 * configure.ac: New --with-libthread-db option.
7954 * thread-db.c: Allow direct dependence on libthread_db.
7955 (thread_db_free): Adjust.
7956 * config.in: Regenerate.
7957 * configure: Likewise.
889bf7c5 7958
5f7d1694
PP
79592009-10-28 Paul Pluzhnikov <ppluzhnikov@google.com>
7960
7961 PR gdb/10757
7962 * thread-db.c (attach_thread): New function.
7963 (maybe_attach_thread): Return success/failure.
7964 (find_new_threads_callback): Adjust.
889bf7c5
PA
7965 (thread_db_find_new_threads): Loop until no new threads.
7966
88e3b899
PA
79672009-10-13 Pedro Alves <pedro@codesourcery.com>
7968
7969 * proc-service.c (ps_lgetregs): Formatting.
7970
cdbfd419
PP
79712009-10-08 Paul Pluzhnikov <ppluzhnikov@google.com>
7972
7973 * acinclude.m4: (SRV_CHECK_THREAD_DB, SRV_CHECK_TLS_GET_ADDR): Remove.
7974 * configure.ac: Adjust.
7975 * linux-low.h (struct process_info_private): Move members to struct
7976 thread_db.
7977 (thread_db_free, thread_db_handle_monitor_command): New prototype.
7978 * linux-low.c (linux_remove_process): Adjust.
7979 (linux_wait_for_event_1, linux_look_up_symbols): Likewise.
7980 * server.c (handle_query): Move code ...
7981 (handle_monitor_command): ... here. New function.
7982 * target.h (struct target_ops): New member.
7983 * thread-db.c (struct thread_db): New.
7984 (libthread_db_search_path): New variable.
7985 (thread_db_create_event, thread_db_enable_reporting)
7986 (find_one_thread, maybe_attach_thread, find_new_threads_callback)
7987 (thread_db_find_new_threads, (thread_db_get_tls_address): Adjust.
7988 (try_thread_db_load_1, dladdr_to_soname): New functions.
7989 (try_thread_db_load, thread_db_load_search): New functions.
7990 (thread_db_init): Search for libthread_db.
7991 (thread_db_free): New function.
7992 (thread_db_handle_monitor_command): Likewise.
7993 * config.in: Regenerate.
7994 * configure: Regenerate.
889bf7c5 7995
4168d2d6
UW
79962009-09-27 Ulrich Weigand <uweigand@de.ibm.com>
7997
7998 * spu-low.c (spu_kill): Wait for inferior to terminate.
7999 Call clear_inferiors.
8000 (spu_detach): Call clear_inferiors.
8001
81ecdfbb
RW
80022009-08-22 Ralf Wildenhues <Ralf.Wildenhues@gmx.de>
8003
8004 * aclocal.m4: Regenerate.
8005 * config.in: Likewise.
8006 * configure: Likewise.
8007
0b9ff2c0
UW
80082009-07-31 Ulrich Weigand <uweigand@de.ibm.com>
8009
8010 * linux-ppc-low.c (INSTR_SC, NR_spu_run): Define.
8011 (parse_spufs_run): New function.
8012 (ppc_get_pc, ppc_set_pc): Detect and handle SPU PC.
8013 (ppc_breakpoint_at): Handle SPU breakpoints.
8014
efcbbd14
UW
80152009-07-31 Ulrich Weigand <uweigand@de.ibm.com>
8016
8017 * linux-low.c: Include <sys/stat.h> and <sys/vfs.h>.
8018 (SPUFS_MAGIC): Define.
8019 (spu_enumerate_spu_ids): New function.
8020 (linux_qxfer_spu): New function.
8021 (linux_target_ops): Install linux_qxfer_spu.
8022
f4d9bade
UW
80232009-07-31 Ulrich Weigand <uweigand@de.ibm.com>
8024
8025 * configure.srv (powerpc*-*-linux*): Add powerpc-cell32l.o
8026 and powerpc-cell64l.o to srv_regobj. Add rs6000/powerpc-cell32l.xml
8027 and rs6000/powerpc-cell64l.xml to srv_xmlfiles.
8028 * Makefile.in (powerpc-cell32l.o, powerpc-cell32l.c): New rules.
8029 (powerpc-cell64l.o, powerpc-cell64l.c): Likewise.
8030 (clean): Handle powerpc-cell32l.c and powerpc-cell64l.c.
8031 * linux-ppc-low.c (PPC_FEATURE_CELL): Define.
8032 (init_registers_powerpc_cell32l): Add prototype.
8033 (init_registers_powerpc_cell64l): Likewise.
8034 (ppc_arch_setup): Detect Cell/B.E. architecture.
8035
96e946ca
RW
80362009-07-30 Ralf Wildenhues <Ralf.Wildenhues@gmx.de>
8037
8038 * Makefile.in (datarootdir): New variable.
8039
58d6951d
DJ
80402009-07-28 Daniel Jacobowitz <dan@codesourcery.com>
8041
8042 * linux-low.c (linux_write_memory): Update debugging output.
8043 * Makefile.in (clean): Add new descriptions.
8044 (arm-with-vfpv2.o, arm-with-vfpv2.c, arm-with-vfpv3.o)
8045 (arm-with-vfpv3.c, arm-with-neon.o, arm-with-neon.c): New rules.
8046 * configure.srv: Add new files for arm*-*-linux*.
8047 * linux-arm-low.c: Add new declarations.
8048 (PTRACE_GETVFPREGS, PTRACE_SETVFPREGS): Define if undefined.
8049 (arm_hwcap, HWCAP_VFP, HWCAP_IWMMXT, HWCAP_NEON, HWCAP_VFPv3)
8050 (HWCAP_VFPv3D16): New.
8051 (arm_fill_wmmxregset, arm_store_wmmxregset): Check HWCAP_IWMMXT
8052 instead of __IWMMXT__.
8053 (arm_fill_vfpregset, arm_store_vfpregset, arm_get_hwcap)
8054 (arm_arch_setup): New.
8055 (target_regsets): Remove #ifdef. Add VFP regset.
8056 (the_low_target): Use arm_arch_setup.
8057
12b42a12
DJ
80582009-07-28 Daniel Jacobowitz <dan@codesourcery.com>
8059
8060 * linux-low.c (linux_kill_one_lwp): Adjust kernel workaround to skip
8061 the main thread again.
8062
ac8c974e
AR
80632009-07-06 Aleksandar Ristovski <aristovski@qnx.com>
8064
8065 Adding Neutrino gdbserver.
8066 * configure: Regenerated.
8067 * configure.ac: Add case for srv_qnx and set LIBS accordingly.
8068 * configure.srv (i[34567]86-*-nto*): New target.
8069 * nto-low.c, nto-low.h, nto-x86-low.c: New files.
8070 * remote-utils.c [__QNX__]: Include sys/iomgr.h
8071 (nto_comctrl) [__QNX__]: New function.
8072 (enable_async_io, disable_async_io) [__QNX__]: Call nto_comctrl.
8073
4424e0c3 80742009-07-05 Danny Backx <dannybackx@users.sourceforge.net>
7437790a
PA
8075
8076 * configure.srv (i[34567]86-*-mingw32ce*): Add i386-low.o to
8077 srv_tgtobj.
8078
912cf4ba
PA
80792009-07-04 Danny Backx <dannybackx@users.sourceforge.net>
8080 Pedro Alves <pedro@codesourcery.com>
8081
8082 * win32-i386-low.c (i386_get_thread_context): Handle systems that
8083 don't support CONTEXT_EXTENDED_REGISTERS.
8084 (i386_win32_breakpoint, i386_win32_breakpoint_len): New.
8085 (the_low_target): Install them.
8086 * win32-low.c (get_child_debug_event): Handle WaitForDebugEvent
8087 failing with ERROR_PIPE_NOT_CONNECTED.
8088
aa5ca48f
DE
80892009-06-30 Doug Evans <dje@google.com>
8090 Pierre Muller <muller@ics.u-strasbg.fr>
8091
8092 Add h/w watchpoint support to x86-linux, win32-i386.
8093 * Makefile.in (SFILES): Add i386-low.c
8094 (i386_low_h): Define.
8095 (i386-low.o): Add dependencies.
8096 (linux-x86-low.o): Add i386-low.h dependency.
8097 (win32-i386-low.o): Ditto.
8098 * i386-low.c: New file.
8099 * i386-low.h: New file.
8100 * configure.srv (i[34567]86-*-cygwin*): Add i386-low.o to srv_tgtobj.
8101 (i[34567]86-*-linux*, i[34567]86-*-mingw*, x86_64-*-linux*): Ditto.
8102 * linux-low.c (linux_add_process): Initialize arch_private.
8103 (linux_remove_process): Free arch_private.
8104 (add_lwp): Initialize arch_private.
8105 (delete_lwp): Free arch_private.
8106 (linux_resume_one_lwp): Call the_low_target.prepare_to_resume if
8107 provided.
8108 * linux-low.h (process_info_private): New member arch_private.
8109 (lwp_info): New member arch_private.
8110 (linux_target_ops): New members new_process, new_thread,
8111 prepare_to_resume.
8112 (ptid_of): New macro.
8113 * linux-x86-low.c: Include stddef.h, i386-low.h.
8114 (arch_process_info): New struct.
8115 (arch_lwp_info): New struct.
8116 (x86_linux_dr_get, x86_linux_dr_set): New functions.
8117 (i386_dr_low_set_addr, i386_dr_low_set_control): New functions.
8118 (i386_dr_low_get_status): New function.
8119 (x86_insert_point, x86_remove_point): New functions.
8120 (x86_stopped_by_watchpoint): New function.
8121 (x86_stopped_data_address): New function.
8122 (x86_linux_new_process, x86_linux_new_thread): New functions.
8123 (x86_linux_prepare_to_resume): New function.
8124 (the_low_target): Add entries for insert_point, remove_point,
8125 stopped_by_watchpoint, stopped_data_address, new_process, new_thread,
8126 prepare_to_resume.
8127 * server.c (debug_hw_points): New global.
8128 (monitor_show_help): Document set debug-hw-points.
8129 (handle_query): Process "set debug-hw-points".
8130 * server.h (debug_hw_points): Declare.
8131 (paddress): Declare.
8132 * utils.c (NUMCELLS, CELLSIZE): New macros.
8133 (get_sell, xsnprintf, paddress): New functions.
8134 * win32-arm-low.c (the_low_target): Add entries for insert_point,
8135 remove_point, stopped_by_watchpoint, stopped_data_address.
8136 * win32-i386-low.c: Include i386-low.h.
8137 (debug_reg_state): Replaces dr.
8138 (i386_dr_low_set_addr, i386_dr_low_set_control): New functions.
8139 (i386_dr_low_get_status): New function.
8140 (i386_insert_point, i386_remove_point): New functions.
8141 (i386_stopped_by_watchpoint): New function.
8142 (i386_stopped_data_address): New function.
8143 (i386_initial_stuff): Update.
8144 (get_thread_context,set_thread_context,i386_thread_added): Update.
8145 (the_low_target): Add entries for insert_point,
8146 remove_point, stopped_by_watchpoint, stopped_data_address.
8147 * win32-low.c (win32_insert_watchpoint): New function.
8148 (win32_remove_watchpoint): New function.
8149 (win32_stopped_by_watchpoint): New function.
8150 (win32_stopped_data_address): New function.
8151 (win32_target_ops): Add entries for insert_watchpoint,
8152 remove_watchpoint, stopped_by_watchpoint, stopped_data_address.
8153 * win32-low.h (win32_target_ops): New members insert_point,
8154 remove_point, stopped_by_watchpoint, stopped_data_address.
8155
d993e290
PA
81562009-06-25 Pedro Alves <pedro@codesourcery.com>
8157
8158 * server.c (process_serial_event): Re-return unsupported, not
8159 error, if the type isn't recognized. Re-allow supporting only
8160 insert or remove packets. Also call require_running for
8161 breakpoints. Add missing break statement to default case. Tidy.
8162 * target.h (struct target_ops): Rename insert_watchpoint to
8163 insert_point, and remove_watchpoint to remove_point.
8164
8165 * linux-low.h (struct linux_target_ops): Likewise.
8166 * linux-low.c (linux_insert_watchpoint): Rename to ...
8167 (linux_insert_point): ... this. Adjust.
8168 (linux_remove_watchpoint): Rename to ...
8169 (linux_remove_point): ... this. Adjust.
8170 (linux_target_ops): Adjust.
8171 * linux-crisv32-low.c (cris_insert_watchpoint): Rename to ...
8172 (cris_insert_point): ... this.
8173 (cris_remove_watchpoint): Rename to ...
8174 (cris_remove_point): ... this.
8175 (the_low_target): Adjust.
8176
0f54c268
PM
81772009-06-24 Pierre Muller <muller@ics.u-strasbg.fr>
8178
8179 * server.c (handle_v_kill): Pass signal_pid to
8180 kill_inferior if multi_process is zero.
8181
c6314022
AR
81822009-06-23 Aleksandar Ristovski <aristovski@qnx.com>
8183
8184 * server.c (process_serial_event): Add support for Z0 and Z1 packet.
8185 * target.h (target_ops): Comment for *_watchpoint to make it clear
8186 the functions can get types '0' and '1'.
8187
4463ce24
AR
81882009-06-22 Aleksandar Ristovski <aristovski@qnx.com>
8189
8190 * linux-low.c (usr_fetch_inferior_registers): Remove check for regno 0.
8191 * proc-service.c (ps_lgetregs): Pass -1 to fetch all registers.
8192 * regcache.c (get_regcache): Likewise.
8193 * spu-low.c (spu_fetch_registers): Remove 0 to -1 conversion.
8194 * win32-low.c (child_fetch_inferior_registers): Remove check for
8195 regno 0.
8196
cf8fd78b
PA
81972009-06-19 Aleksandar Ristovski <aristovski@qnx.com>
8198 Pedro Alves <pedro@codesourcery.com>
8199
8200 * target.h (struct target_ops) <supports_multi_process>: New
8201 callback.
8202 (target_supports_multi_process): New.
8203 * server.c (handle_query): Even if GDB reports support, only
8204 enable multi-process if the target also supports it. Report
8205 multi-process support only if the target backend supports it.
8206 * linux-low.c (linux_supports_multi_process): New function.
8207 (linux_target_ops): Install it as target_supports_multi_process
8208 callback.
8209
47c0c975
DE
82102009-05-24 Doug Evans <dje@google.com>
8211
e09875d4
DE
8212 Global renaming of find_thread_pid to find_thread_ptid.
8213 * server.h (find_thread_ptid): Renamed from find_thread_pid.
8214 * inferiors.c (find_thread_ptid): Renamed from find_thread_pid.
8215 All callers updated.
8216
e27d73f6
DE
8217 * linux-low.c (handle_extended_wait): Use linux_resume_one_lwp
8218 to resume the newly created thread, don't call ptrace (PTRACE_CONT)
8219 directly.
8220
47c0c975
DE
8221 * linux-low.c (get_stop_pc): Print pc if debug_threads.
8222 (check_removed_breakpoint, linux_wait_for_lwp): Ditto.
8223 (linux_resume_one_lwp): Ditto.
8224
2acc282a
DE
82252009-05-23 Doug Evans <dje@google.com>
8226
8227 * linux-low.c (linux_resume_one_lwp): Change type of first arg
8228 from struct inferior_list_entry * to struct lwp_info *.
8229 All callers updated.
8230
9f1036c1
DE
82312009-05-13 Doug Evans <dje@google.com>
8232
8233 * linux-x86-low.c: Don't include assert.h.
8234 (x86_siginfo_fixup): Use fatal, not assert.
8235 (x86_arch_setup): Fix comment.
8236
d0722149
DE
82372009-05-12 Doug Evans <dje@google.com>
8238
8239 Biarch support for i386/amd64 gdbserver.
8240 * Makefile.in (SFILES): Remove linux-i386-low.c, linux-x86-64-low.c.
8241 Add linux-x86-low.c.
8242 (linux-i386-low.o, linux-x86-64-low.o): Delete.
8243 (linux-x86-low.o): Add.
8244 * linux-x86-64-low.c: Delete.
8245 * linux-i386-low.c: Delete.
8246 * linux-x86-low.c: New file.
8247 * configure.srv (i?86-linux srv_tgtobj): Replace linux-i386-low.o with
8248 linux-x86-low.o.
8249 (x86_64-linux srv_tgtobj): Replace linux-x86-64-low.o with
8250 linux-x86-low.o.
8251 (x86_64-linux srv_regobj): Add reg-i386-linux.o.
8252 * linux-low.c: Include ansidecl.h, elf/common.h, elf/external.h.
8253 (linux_child_pid_to_exec_file): New function.
8254 (elf_64_header_p, elf_64_file_p): New functions.
8255 (siginfo_fixup): New function.
8256 (linux_xfer_siginfo): New local inf_siginfo. Call siginfo_fixup to
8257 give target a chance to convert layout.
8258 * linux-low.h (linux_target_ops): New member siginfo_fixup.
8259 (linux_child_pid_to_exec_file, elf_64_file_p): Declare.
8260
fdeb2a12
DE
82612009-05-07 Doug Evans <dje@google.com>
8262
8263 * linux-low.c (regsets_fetch_inferior_registers): Fix memory leak.
8264 (regsets_store_inferior_registers): Ditto.
8265
a6dbe5df
PA
82662009-05-06 Pedro Alves <pedro@codesourcery.com>
8267
8268 PR server/10048
8269
8270 * linux-low.c (must_set_ptrace_flags): Delete.
8271 (linux_create_inferior): Set `lwp->must_set_ptrace_flags' instead
8272 of the global.
8273 (linux_attach_lwp_1): Don't set PTRACE_SETOPTIONS here. Set
8274 `lwp->must_set_ptrace_flags' instead.
ba42693b 8275 (linux_wait_for_event_1): Set ptrace options here.
a6dbe5df
PA
8276 (linux_wait_1): ... not here.
8277
5091eb23
DE
82782009-04-30 Doug Evans <dje@google.com>
8279
9f767825
DE
8280 * inferiors.c (started_inferior_callback): New function.
8281 (attached_inferior_callback): New function.
8282 (have_started_inferiors_p, have_attached_inferiors_p): New functions.
8283 * server.c (print_started_pid, print_attached_pid): New functions.
8284 (detach_or_kill_for_exit): New function.
8285 (main): Call it instead of for_each_inferior (kill_inferior_callback).
8286 * server.h (have_started_inferiors_p): Declare.
8287 (have_attached_inferiors_p): Declare.
8288
5091eb23
DE
8289 * inferiors.c (remove_process): Fix memory leak, free process.
8290 * linux-low.c (linux_remove_process): New function.
8291 (linux_kill): Call it instead of remove_process.
8292 (linux_detach, linux_wait_1): Ditto.
8293
155c8968
PA
82942009-04-19 Danny Backx <dannybackx@users.sourceforge.net>
8295
8296 * configure.srv: Add x86 Windows CE target.
8297
7fe519cb
UW
82982009-04-03 Ulrich Weigand <uweigand@de.ibm.com>
8299
8300 * inferiors.c (get_thread_process): Make global.
8301 * server.h (get_thread_process): Add prototype.
8302 * thread-db.c (find_one_thread): Use get_thread_process
8303 instead of current_process.
8304 (thread_db_get_tls_address): Do not crash if called when
8305 thread layer is not yet initialized.
8306
5472f405
UW
83072009-04-03 Ulrich Weigand <uweigand@de.ibm.com>
8308
8309 * remote-utils.c (prepare_resume_reply): Null-terminate packet.
8310 * spu-low.c (current_tid): Rename to ...
8311 (current_ptid): ... this.
8312 (fetch_ppc_register, fetch_ppc_memory, store_ppc_memory,
8313 spu_proc_xfer_spu, spu_resume, spu_request_interrupt): Use
8314 ptid_get_lwp (current_ptid) instead of current_tid.
8315 (spu_kill, spu_detach, spu_join, spu_wait): Use pid argument
8316 instead of current_tid. Use find_process_pid to verify pid
8317 argument is valid. Pass proper argument to remove_process.
8318 (spu_thread_alive): Compare current_ptid instead of current_tid.
8319 (spu_resume): Likewise.
8320
55ac2b99
PA
83212009-04-02 Pedro Alves <pedro@codesourcery.com>
8322
8323 * linux-low.c (usr_store_inferior_registers): Declare local `pid'
8324 variable.
8325
95954743
PA
83262009-04-01 Pedro Alves <pedro@codesourcery.com>
8327
8328 Implement the multiprocess extensions, and add linux multiprocess
8329 support.
8330
8331 * server.h (ULONGEST): Declare.
8332 (struct ptid, ptid_t): New.
8333 (minus_one_ptid, null_ptid): Declare.
8334 (ptid_build, pid_to_ptid, ptid_get_pid, ptid_get_lwp)
8335 (ptid_get_tid, ptid_equal, ptid_is_pid): Declare.
8336 (struct inferior_list_entry): Change `id' type from unsigned from
8337 to ptid_t.
8338 (struct sym_cache, struct breakpoint, struct
8339 process_info_private): Forward declare.
8340 (struct process_info): Declare.
8341 (current_process): Declare.
8342 (all_processes): Declare.
8343 (initialize_inferiors): Declare.
8344 (add_thread): Adjust to use ptid_t.
8345 (thread_id_to_gdb_id, thread_to_gdb_id, gdb_id_to_thread_id): Ditto.
8346 (add_process, remove_process, find_thread_pid): Declare.
8347 (find_inferior_id): Adjust to use ptid_t.
8348 (cont_thread, general_thread, step_thread): Change type to ptid_t.
8349 (multi_process): Declare.
8350 (push_event): Adjust to use ptid_t.
8351 (read_ptid, write_ptid): Declare.
8352 (prepare_resume_reply): Adjust to use ptid_t.
8353 (clear_symbol_cache): Declare.
8354 * inferiors.c (all_processes): New.
8355 (null_ptid, minus_one_ptid): New.
8356 (ptid_build, pid_to_ptid, ptid_get_pid, ptid_get_lwp)
8357 (ptid_get_tid, ptid_equal, ptid_is_pid): New.
8358 (add_thread): Change unsigned long to ptid. Remove gdb_id
8359 parameter. Adjust.
8360 (thread_id_to_gdb_id, thread_to_gdb_id): Change unsigned long to ptid.
8361 (gdb_id_to_thread): Rename to ...
8362 (find_thread_pid): ... this. Change unsigned long to ptid.
8363 (gdb_id_to_thread_id, find_inferior_id): Change unsigned long to ptid.
8364 (loaded_dll, pull_pid_from_list): Adjust.
8365 (add_process, remove_process, find_process_pid)
8366 (get_thread_process, current_process, initialize_inferiors): New.
8367 * target.h (struct thread_resume) <thread>: Change type to ptid_t.
8368 (struct target_waitstatus) <related_pid>: Ditto.
8369 (struct target_ops) <kill, detach>: Add `pid' argument. Change
8370 return type to int.
8371 (struct target_ops) <join>: Add `pid' argument.
8372 (struct target_ops) <thread_alive>: Change pid's type to ptid_t.
8373 (struct target_ops) <wait>: Add `ptid' field. Change return type
8374 to ptid.
8375 (kill_inferior, detach_inferior, join_inferior): Add `pid' argument.
8376 (mywait): Add `ptid' argument. Change return type to ptid_t.
8377 (target_pid_to_str): Declare.
8378 * target.c (set_desired_inferior): Adjust to use ptids.
8379 (mywait): Add new `ptid' argument. Adjust.
8380 (target_pid_to_str): New.
8381 * mem-break.h (free_all_breakpoints): Declare.
8382 * mem-break.c (breakpoints): Delelete.
8383 (set_breakpoint_at, delete_breakpoint, find_breakpoint_at)
8384 (check_mem_read, check_mem_write, delete_all_breakpoints): Adjust
8385 to use per-process breakpoint list.
8386 (free_all_breakpoints): New.
8387 * remote-utils.c (struct sym_cache) <name>: Drop `const'.
8388 (symbol_cache, all_symbols_looked_up): Delete.
8389 (hexchars): New.
8390 (ishex, unpack_varlen_hex, write_ptid, hex_or_minus_one,
8391 read_ptid): New.
8392 (prepare_resume_reply): Change ptid argument's type from unsigned
8393 long to ptid_t. Adjust. Implement W;process and X;process.
8394 (free_sym_cache, clear_symbol_cache): New.
8395 (look_up_one_symbol): Adjust to per-process symbol cache. *
8396 * server.c (cont_thread, general_thread, step_thread): Change type
8397 to ptid_t.
8398 (attached): Delete.
8399 (multi_process): New.
8400 (last_ptid): Change type to ptid_t.
8401 (struct vstop_notif) <ptid>: Change type to ptid_t.
8402 (queue_stop_reply, push_event): Change `ptid' argument's type to
8403 ptid_t.
8404 (discard_queued_stop_replies): Add `pid' argument.
8405 (start_inferior): Adjust to use ptids. Adjust to mywait interface
8406 changes. Don't reference the `attached' global.
8407 (attach_inferior): Adjust to mywait interface changes.
8408 (handle_query): Adjust to use ptids. Parse GDB's qSupported
8409 features. Handle and report "multiprocess+". Handle
8410 "qAttached:PID".
8411 (handle_v_cont): Adjust to use ptids. Adjust to mywait interface
8412 changes.
8413 (handle_v_kill): New.
8414 (handle_v_stopped): Adjust to use target_pid_to_str.
8415 (handle_v_requests): Allow multiple attaches and runs when
8416 multiprocess extensions are in effect. Handle "vKill".
8417 (myresume): Adjust to use ptids.
8418 (queue_stop_reply_callback): Add `arg' parameter. Handle it.
8419 (handle_status): Adjust to discard_queued_stop_replies interface
8420 change.
8421 (first_thread_of, kill_inferior_callback)
8422 (detach_or_kill_inferior_callback, join_inferiors_callback): New.
8423 (main): Call initialize_inferiors. Adjust to use ptids, killing
8424 and detaching from all inferiors. Handle multiprocess packet
8425 variants.
8426 * linux-low.h: Include gdb_proc_service.h.
8427 (struct process_info_private): New.
8428 (struct linux_target_ops) <pid_of>: Use ptid_get_pid.
8429 <lwpid_of>: Use ptid_get_lwp.
8430 (get_lwp_thread): Adjust.
8431 (struct lwp_info): Add `dead' member.
8432 (find_lwp_pid): Declare.
8433 * linux-low.c (thread_db_active): Delete.
8434 (new_inferior): Adjust comment.
8435 (inferior_pid): Delete.
8436 (linux_add_process): New.
8437 (handle_extended_wait): Adjust.
8438 (add_lwp): Change unsigned long to ptid.
8439 (linux_create_inferior): Add process to processes table. Adjust
8440 to use ptids. Don't set new_inferior here.
8441 (linux_attach_lwp): Rename to ...
8442 (linux_attach_lwp_1): ... this. Add `initial' argument. Handle
8443 it. Adjust to use ptids.
8444 (linux_attach_lwp): New.
8445 (linux_attach): Add process to processes table. Don't set
8446 new_inferior here.
8447 (struct counter): New.
8448 (second_thread_of_pid_p, last_thread_of_process_p): New.
8449 (linux_kill_one_lwp): Add `args' parameter. Handle it. Adjust to
8450 multiple processes.
8451 (linux_kill): Add `pid' argument. Handle it. Adjust to multiple
8452 processes. Remove process from process table.
8453 (linux_detach_one_lwp): Add `args' parameter. Handle it. Adjust
8454 to multiple processes.
8455 (any_thread_of): New.
8456 (linux_detach): Add `pid' argument, and handle it. Remove process
8457 from processes table.
8458 (linux_join): Add `pid' argument. Handle it.
8459 (linux_thread_alive): Change unsighed long argument to ptid_t.
8460 Consider dead lwps as not being alive.
8461 (status_pending_p): Rename `dummy' argument to `arg'. Filter out
8462 threads we're not interested in.
8463 (same_lwp, find_lwp_pid): New.
8464 (linux_wait_for_lwp): Change `pid' argument's type from int to
8465 ptid_t. Adjust.
8466 (linux_wait_for_event): Rename to ...
8467 (linux_wait_for_event_1): ... this. Change `pid' argument's type
8468 from int to ptid_t. Adjust.
8469 (linux_wait_for_event): New.
8470 (linux_wait_1): Add `ptid' argument. Change return type to
8471 ptid_t. Adjust. Use last_thread_of_process_p. Remove processes
8472 that exit from the process table.
8473 (linux_wait): Add `ptid' argument. Change return type to ptid_t.
8474 Adjust.
8475 (mark_lwp_dead): New.
8476 (wait_for_sigstop): Adjust to use ptids. If a process exits while
8477 stopping all threads, mark its main lwp as dead.
8478 (linux_set_resume_request, linux_resume_one_thread): Adjust to use
8479 ptids.
8480 (fetch_register, usr_store_inferior_registers)
8481 (regsets_fetch_inferior_registers)
8482 (regsets_store_inferior_registers, linux_read_memory)
8483 (linux_write_memory): Inline `inferior_pid'.
8484 (linux_look_up_symbols): Adjust to use per-process
8485 `thread_db_active'.
8486 (linux_request_interrupt): Adjust to use ptids.
8487 (linux_read_auxv): Inline `inferior_pid'.
8488 (initialize_low): Don't reference thread_db_active.
8489 * gdb_proc_service.h (struct ps_prochandle) <pid>: Remove.
8490 * proc-service.c (ps_lgetregs): Use find_lwp_pid.
8491 (ps_getpid): Return the pid of the current inferior.
8492 * thread-db.c (proc_handle, thread_agent): Delete.
8493 (thread_db_create_event, thread_db_enable_reporting): Adjust to
8494 per-process data.
8495 (find_one_thread): Change argument type to ptid_t. Adjust to
8496 per-process data.
8497 (maybe_attach_thread): Adjust to per-process data and ptids.
8498 (thread_db_find_new_threads): Ditto.
8499 (thread_db_init): Ditto.
8500 * spu-low.c (spu_create_inferior, spu_attach): Add process to
8501 processes table. Adjust to use ptids.
8502 (spu_kill, spu_detach): Adjust interface. Remove process from
8503 processes table.
8504 (spu_join, spu_thread_alive): Adjust interface.
8505 (spu_wait): Adjust interface. Remove process from processes
8506 table. Adjust to use ptids.
8507 * win32-low.c (current_inferior_tid): Delete.
8508 (current_inferior_ptid): New.
8509 (debug_event_ptid): New.
8510 (thread_rec): Take a ptid. Adjust.
8511 (child_add_thread): Add `pid' argument. Adjust to use ptids.
8512 (child_delete_thread): Ditto.
8513 (do_initial_child_stuff): Add `attached' argument. Add process to
8514 processes table.
8515 (child_fetch_inferior_registers, child_store_inferior_registers):
8516 Adjust.
8517 (win32_create_inferior): Pass 0 to do_initial_child_stuff.
8518 (win32_attach): Pass 1 to do_initial_child_stuff.
8519 (win32_kill): Adjust interface. Remove process from processes
8520 table.
8521 (win32_detach): Ditto.
8522 (win32_join): Adjust interface.
8523 (win32_thread_alive): Take a ptid.
8524 (win32_resume): Adjust to use ptids.
8525 (get_child_debug_event): Ditto.
8526 (win32_wait): Adjust interface. Remove exiting process from
8527 processes table.
8528
bd99dc85
PA
85292009-04-01 Pedro Alves <pedro@codesourcery.com>
8530
8531 Non-stop mode support.
8532
8533 * server.h (non_stop): Declare.
8534 (gdb_client_data, handler_func): Declare.
8535 (delete_file_handler, add_file_handler, start_event_loop):
8536 Declare.
8537 (handle_serial_event, handle_target_event, push_event)
8538 (putpkt_notif): Declare.
8539 * target.h (enum resume_kind): New.
8540 (struct thread_resume): Replace `step' field by `kind' field.
8541 (TARGET_WNOHANG): Define.
8542 (struct target_ops) <wait>: Add `options' argument.
8543 <supports_non_stop, async, start_non_stop>: New fields.
8544 (target_supports_non_stop, target_async): New.
8545 (start_non_stop): Declare.
8546 (mywait): Add `options' argument.
8547 * target.c (mywait): Add `options' argument. Print child exit
8548 notifications here.
8549 (start_non_stop): New.
8550 * server.c (non_stop, own_buf, mem_buf): New globals.
8551 (struct vstop_notif): New.
8552 (notif_queue): New global.
8553 (queue_stop_reply, push_event, discard_queued_stop_replies)
8554 (send_next_stop_reply): New.
8555 (start_inferior): Adjust to use resume_kind. Adjust to mywait
8556 interface changes.
8557 (attach_inferior): In non-stop mode, don't wait for the target
8558 here.
8559 (handle_general_set): Handle QNonStop.
8560 (handle_query): When handling qC, return the current general
8561 thread, instead of the first thread of the list.
8562 (handle_query): If the backend supports non-stop mode, include
8563 QNonStop+ in the qSupported query response.
8564 (handle_v_cont): Adjust to use resume_kind. Handle resume_stop
8565 and non-stop mode.
8566 (handle_v_attach, handle_v_run): Handle non-stop mode.
8567 (handle_v_stopped): New.
8568 (handle_v_requests): Report support for vCont;t. Handle vStopped.
8569 (myresume): Adjust to use resume_kind. Handle non-stop.
8570 (queue_stop_reply_callback): New.
8571 (handle_status): Handle non-stop mode.
8572 (main): Clear non_stop flag on reconnection. Use the event-loop.
8573 Refactor serial protocol handling from here ...
8574 (process_serial_event): ... to this new function. When GDB
8575 selects any thread, select one here. In non-stop mode, wait until
8576 GDB acks all pending events before exiting.
8577 (handle_serial_event, handle_target_event): New.
8578 * remote-utils.c (remote_open): Install remote_desc in the event
8579 loop.
8580 (remote_close): Remove remote_desc from the event loop.
8581 (putpkt_binary): Rename to...
8582 (putpkt_binary_1): ... this. Add `is_notic' argument. Handle it.
8583 (putpkt_binary): New as wrapper around putpkt_binary_1.
8584 (putpkt_notif): New.
8585 (prepare_resume_reply): In non-stop mode, don't change the
8586 general_thread.
8587 * event-loop.c: New.
8588 * Makefile.in (OBJ): Add event-loop.o.
8589 (event-loop.o): New rule.
8590
8591 * linux-low.h (pid_of): Moved here.
8592 (lwpid_of): New.
8593 (get_lwp_thread): Use lwpid_of.
8594 (struct lwp_info): Delete `lwpid' field. Add `suspended' field.
8595 * linux-low.c (pid_of): Delete.
8596 (inferior_pid): Use lwpid_of.
8597 (linux_event_pipe): New.
8598 (target_is_async_p): New.
8599 (delete_lwp): New.
8600 (handle_extended_wait): Use lwpid_of.
8601 (add_lwp): Don't set lwpid field.
8602 (linux_attach_lwp): Adjust debug output. Use lwpid_of.
8603 (linux_kill_one_lwp): If killing a running lwp, stop it first.
8604 Use lwpid_of. Adjust to linux_wait_for_event interface changes.
8605 (linux_detach_one_lwp): If detaching from a running lwp, stop it
8606 first. Adjust to linux_wait_for_event interface changes. Use
8607 lwpid_of.
8608 (linux_detach): Don't delete the main lwp here.
8609 (linux_join): Use my_waitpid. Avoid signal_pid. Use lwpid_of.
8610 (status_pending_p): Don't consider explicitly suspended lwps.
8611 (linux_wait_for_lwp): Take an integer pid instead of a lwp_info
8612 pointer. Add OPTIONS argument. Change return type to int. Use
8613 my_waitpid instead of sleeping. Handle WNOHANG. Use lwpid_of.
8614 (linux_wait_for_event): Take an integer pid instead of a lwp_info
8615 pointer. Add status pointer argument. Return a pid instead of a
8616 status. Use lwpid_of. Adjust to linux_wait_for_lwp interface
8617 changes. In non-stop mode, don't switch to a random thread.
8618 (linux_wait): Rename to...
8619 (linux_wait_1): ... this. Add target_options argument, and handle
8620 it. Adjust to use resume_kind. Use lwpid_of. In non-stop mode,
8621 don't handle the continue thread. Handle TARGET_WNOHANG. Merge
8622 clean exit and signal exit code. Don't stop all threads in
8623 non-stop mode. In all-stop mode, only stop all threads when
8624 reporting a stop to GDB. Handle explicit thread stop requests.
8625 (async_file_flush, async_file_mark): New.
8626 (linux_wait): New.
8627 (send_sigstop): Use lwpid_of.
8628 (wait_for_sigstop): Use lwpid_of. Adjust to linux_wait_for_event
8629 interface changes. In non-stop mode, don't switch to a random
8630 thread.
8631 (linux_resume_one_lwp): Use lwpid_of.
8632 (linux_continue_one_thread, linux_queue_one_thread): Merge into ...
8633 (linux_resume_one_thread): ... this. Handle resume_stop. In
8634 non-stop mode, don't look for pending flag in all threads.
8635 (resume_status_pending_p): Don't consider explicitly suspended
8636 threads.
8637 (my_waitpid): Reimplement. Emulate __WALL.
8638 (linux_request_interrupt, linux_read_offsets, linux_xfer_siginfo):
8639 Use lwpid_of.
8640 (sigchld_handler, linux_supports_non_stop, linux_async)
8641 (linux_start_non_stop): New.
8642 (linux_target_ops): Register linux_supports_non_stop, linux_async
8643 and linux_start_non_stop.
8644 (initialize_low): Install SIGCHLD handler.
8645 * thread-db.c (thread_db_create_event, find_one_thread)
8646 (thread_db_get_tls_address): Use lwpid_of.
8647 * win32-low.c (win32_detach): Adjust to use resume_kind.
8648 (win32_wait): Add `options' argument.
8649 * spu-low.c (spu_resume): Adjust to use resume_kind.
8650 (spu_wait): Add `options' argument.
8651
5b1c542e
PA
86522009-04-01 Pedro Alves <pedro@codesourcery.com>
8653
8654 Decouple target code from remote protocol.
8655
8656 * target.h (enum target_waitkind): New.
8657 (struct target_waitstatus): New.
8658 (struct target_ops) <wait>: Return an unsigned long. Take a
8659 target_waitstatus pointer instead of a char pointer.
8660 (mywait): Likewise.
8661 * target.c (mywait): Change prototype to return an unsigned long.
8662 Take a target_waitstatus pointer instead of a char pointer. Adjust.
8663 * server.h (thread_from_wait, old_thread_from_wait): Delete
8664 declarations.
8665 (prepare_resume_reply): Change prototype to take a
8666 target_waitstatus.
8667 * server.c (thread_from_wait, old_thread_from_wait): Delete.
8668 (last_status, last_ptid): New.
8669 (start_inferior): Remove "statusptr" argument. Adjust. Return a
8670 pid instead of a signal.
8671 (attach_inferior): Remove "status" and "signal" parameters.
8672 Adjust.
8673 (handle_query): For qGetTLSAddr, parse the thread id with strtol,
8674 not as an address.
8675 (handle_v_cont, handle_v_attach, handle_v_run, handle_v_kill)
8676 (handle_v_requests, myresume): Remove "status" and "signal"
8677 parameters. Adjust.
8678 (handle_status): New.
8679 (main): Delete local `status'. Adjust.
8680 * remote-utils.c: Include target.h.
8681 (prepare_resume_reply): Change prototype to take a
8682 target_waitstatus. Adjust.
8683
8684 * linux-low.c (linux_wait): Adjust to new target_ops->wait
8685 interface.
8686 * spu-low.c (spu_wait): Adjust.
8687 * win32-low.c (enum target_waitkind, struct target_waitstatus):
8688 Delete.
8689 (win32_wait): Adjust.
8690
2bd7c093
PA
86912009-04-01 Pedro Alves <pedro@codesourcery.com>
8692
8693 * target.h (struct thread_resume): Delete leave_stopped member.
8694 (struct target_ops): Add a `n' argument to the `resume' callback.
8695 * server.c (start_inferior): Adjust.
8696 (handle_v_cont, myresume): Adjust.
8697 * linux-low.c (check_removed_breakpoint): Adjust to resume
8698 interface change, and to removed leave_stopped field.
8699 (resume_ptr): Delete.
8700 (struct thread_resume_array): New.
8701 (linux_set_resume_request): Add new `arg' parameter. Adjust to
8702 resume interface change.
8703 (linux_continue_one_thread, linux_queue_one_thread)
8704 (resume_status_pending_p): Check if the resume field is NULL
8705 instead of checking the leave_stopped member.
8706 (linux_resume): Adjust to the target resume interface change.
8707 * spu-low.c (spu_resume): Adjust to the target resume interface
8708 change.
8709 * win32-low.c (win32_detach, win32_resume): Ditto.
8710
c35fafde
PA
87112009-04-01 Pedro Alves <pedro@codesourcery.com>
8712
8713 * linux-low.c (linux_wait_for_event): Don't clear the `stepping'
8714 flag.
8715 (wait_for_sigstop): Don't leave a finished single-step SIGTRAP
8716 pending.
8717 (linux_continue_one_thread): Only preserve the stepping flag if
8718 there's a pending breakpoint.
8719
0a59d50b
PA
87202009-03-31 Pedro Alves <pedro@codesourcery.com>
8721
8722 * server.c (main): After the inferior having exited, call
8723 remote_close before exiting gdbserver.
8724
f04c6d38
TJB
87252009-03-25 Thiago Jung Bauermann <bauerman@br.ibm.com>
8726
8727 Fix size of FPSCR in Power 7 processors.
8728 * linux-ppc-low.c (PPC_FEATURE_ARCH_2_05): Remove #define.
8729 (PPC_FEATURE_HAS_DFP): New #define.
8730 (ppc_arch_setup): Check for DFP feature instead of ISA 2.05 to decide on
8731 size of the FPSCR.
8732
78e5cee6
PA
87332009-03-23 Pedro Alves <pedro@codesourcery.com>
8734
8735 * server.c (handle_query) Whitespace and formatting.
8736
1b3f6016
PA
87372009-03-22 Pedro Alves <pedro@codesourcery.com>
8738
8739 * i387-fp.c, linux-arm-low.c, linux-cris-low.c,
8740 linux-crisv32-low.c, linux-i386-low.c, linux-low.c,
8741 linux-mips-low.c, linux-s390-low.c, linux-sparc-low.c,
8742 linux-x86-64-low.c, linux-xtensa-low.c, proc-service.c,
8743 regcache.c, remote-utils.c, server.c, spu-low.c, target.h,
8744 thread-db.c, win32-low.c, xtensa-xtregs.c, gdbreplay.c,
8745 Makefile.in, configure.ac: Fix whitespace throughout.
8746 * configure: Regenerate.
8747
a07b2135
PA
87482009-03-22 Pedro Alves <pedro@codesourcery.com>
8749
8750 * inferiors.c (find_inferior): Make it safe for the callback
8751 function to delete the currently iterated inferior.
8752
67cc2626
PA
87532009-03-22 Pedro Alves <pedro@codesourcery.com>
8754
8755 * Makefile.in (linuw_low_h): Move higher.
8756 (thread-db.o): Depend on $(linux_low_h).
8757
54a0b537
PA
87582009-03-17 Pedro Alves <pedro@codesourcery.com>
8759
8760 Rename "process" to "lwp" throughout.
8761
8762 * linux-low.c (all_processes): Rename to...
8763 (all_lwps): ... this.
8764 (inferior_pid, handle_extended_wait, get_stop_pc): Adjust.
8765 (add_process): Rename to ...
8766 (add_lwp): ... this. Adjust.
8767 (linux_create_inferior): Adjust.
8768 (linux_attach_lwp): Adjust.
8769 (linux_attach): Adjust.
8770 (linux_kill_one_process): Rename to ...
8771 (linux_kill_one_lwp): ... this. Adjust.
8772 (linux_kill): Adjust.
8773 (linux_detach_one_process): Rename to ...
8774 (linux_detach_one_lwp): ... this. Adjust.
8775 (linux_detach): Adjust.
8776 (check_removed_breakpoint): Adjust.
8777 (status_pending_p): Adjust.
8778 (linux_wait_for_process): Rename to ...
8779 (linux_wait_for_lwp): ... this. Adjust.
8780 (linux_wait_for_event): Adjust.
8781 (send_sigstop): Adjust.
8782 (wait_for_sigstop): Adjust.
8783 (stop_all_processes): Rename to ...
8784 (stop_all_lwps): ... this.
8785 (linux_resume_one_process): Rename to ...
8786 (linux_resume_one_lwp): ... this. Adjust.
8787 (linux_set_resume_request, linux_continue_one_thread)
8788 (linux_queue_one_thread, resume_status_pending_p)
8789 (usr_store_inferior_registers, regsets_store_inferior_registers)
8790 (linux_request_interrupt, linux_read_offsets, linux_xfer_siginfo):
8791 Adjust.
8792 * linux-low.h (get_process): Rename to ...
8793 (get_lwp): ... this. Adjust.
8794 (get_thread_process): Rename to ...
8795 (get_thread_lwp): ... this. Adjust.
8796 (get_process_thread): Rename to ...
8797 (get_lwp_thread): ... this. Adjust.
8798 (struct process_info): Rename to ...
8799 (struct lwp_info): ... this.
8800 (all_processes): Rename to ...
8801 (all_lwps): ... this.
8802 * proc-service.c (ps_lgetregs): Adjust.
8803 * thread-db.c (thread_db_create_event, find_one_thread)
8804 (maybe_attach_thread, thread_db_get_tls_address): Adjust.
8805
0b16c5cf
PA
88062009-03-14 Pedro Alves <pedro@codesourcery.com>
8807
8808 * server.c (handle_query): Handle "qAttached".
8809
32de4b9d
NS
88102009-03-13 Nathan Sidwell <nathan@codesourcery.com>
8811
8812 * Makefile.in, hostio-errno.c, errno.c, xtensa-xtregs.c: Change to
8813 GPLv3, update license URL.
8814
2aecd87f
DE
88152009-03-01 Doug Evans <dje@google.com>
8816
93efd302 8817 * Makefile.in (INCLUDE_CFLAGS): Add -I$(srcdir)/../common.
2aecd87f
DE
8818 (server_h): Add gdb_signals.h.
8819 (signals.o): Update.
8820 * server.h (target_signal_from_host,target_signal_to_host_p)
8821 (target_signal_to_host,target_signal_to_name): Moved to gdb_signals.h.
8822
86b1f9c5
PM
88232009-02-14 Pierre Muller <muller@ics.u-strasbg.fr>
8824
8825 * remote-utils.c (getpkt): Also generate remote-debug
8826 information if noack_mode is set.
8827
4aa995e1
PA
88282009-02-06 Pedro Alves <pedro@codesourcery.com>
8829
8830 * server.c (handle_query): Report qXfer:siginfo:read and
8831 qXfer:siginfo:write as supported and handle them.
8832 * target.h (struct target_ops) <qxfer_siginfo>: New field.
8833 * linux-low.c (linux_xfer_siginfo): New.
8834 (linux_target_ops): Set it.
8835
62709adf
PA
88362009-01-26 Pedro Alves <pedro@codesourcery.com>
8837
8838 * server.c (gdbserver_usage): Mention --remote-debug.
8839 (main): Accept '--remote-debug' switch.
8840
aef93bd7
DE
88412009-01-18 Doug Evans <dje@google.com>
8842
8843 * regcache.c (new_register_cache): No need to check result of xcalloc.
8844 * server.c (handle_search_memory): Back out calls to xmalloc,
8845 result is checked and error is returned to user upon failure.
8846 (handle_query): Ditto. Add more checks for result of malloc.
8847 (handle_v_cont): Check result of malloc, report error back to
8848 user upon failure.
8849 (handle_v_run): Ditto. Call freeargv.
8850 * server.h (freeargv): Declare.
8851 * utils.c (freeargv): New fn.
8852
54363045
DE
88532009-01-15 Doug Evans <dje@google.com>
8854
f626972c
DE
8855 * gdbreplay.c (perror_with_name): Make arg const char *.
8856 * server.h (target_signal_to_name): Make return type const char *.
0842e787 8857 * thread-db.c (thread_db_err_str): Make return type const char *.
f626972c 8858 * utils.c (perror_with_name): Make arg const char *.
54363045 8859
18aae699
PA
88602009-01-14 Pedro Alves <pedro@codesourcery.com>
8861
8862 * win32-low.c (get_child_debug_event): Issue a final DBG_CONTINUE
8863 when handling a EXIT_PROCESS_DEBUG_EVENT.
8864
ff703abe
JB
88652009-01-06 Joel Brobecker <brobecker@adacore.com>
8866
8867 * gdbreplay.c (gdbreplay_version): Update copyright year.
8868 * server.c (gdbserver_version): Likewise.
8869
f21cc1a2 88702009-01-05 Doug Evans <dje@google.com>
0e21c1ec
DE
8871
8872 * linux-low.c (linux_attach_lwp): Add some comments/fixmes.
f21cc1a2 8873 (handle_extended_wait): Improve comment.
0e21c1ec 8874
bca929d3
DE
88752008-12-13 Doug Evans <dje@google.com>
8876
8877 * utils.c (xmalloc,xcalloc,xstrdup): New fns.
8878 * server.h (ATTR_MALLOC): New macro.
8879 (xmalloc,xcalloc,xstrdup): Declare.
8880 * hostio.c: Replace malloc,calloc,strdup with xmalloc,xcalloc,xstrdup.
8881 * inferiors.c: Ditto.
8882 * linux-low.c: Ditto.
8883 * mem-break.c: Ditto.
8884 * regcache.c: Ditto.
8885 * remote-utils.c: Ditto.
8886 * server.c: Ditto.
8887 * target.c: Ditto.
8888 * win32-low.c: Ditto.
8889
97438e3f
DE
88902008-12-12 Doug Evans <dje@google.com>
8891
896c7fbb
DE
8892 * linux-low.c (linux_wait_for_process): Don't clobber current_inferior
8893 in debugging printf.
8894
97438e3f
DE
8895 * linux-low.c (handle_extended_wait): Simplify, use my_waitpid.
8896
e3b886f8
DE
88972008-12-09 Doug Evans <dje@google.com>
8898
8899 * linux-low.h (struct process_info): Delete member tid, unused.
8900 * thread-db.c (find_one_thread): Update.
8901 (maybe_attach_thread): Update.
8902
07e059b5
VP
89032008-12-02 Pedro Alves <pedro@codesourcery.com>
8904
889bf7c5
PA
8905 * target.h (struct target_ops): Add qxfer_osdata member.
8906 * linux-low.c: Include ctype.h and pwd.h and sys/types.h
8907 and dirent.h.
8908 (linux_qxfer_osdata): New functions.
8909 (linux_target_ops): Register linux_qxfer_osdata as qxfer_osdata
8910 callback.
8911 * server.c (handle_query): Handle "qXfer:osdata:read:".
8912 * remote-utils.c (buffer_grow, buffer_free, buffer_init, buffer_finish)
8913 (buffer_xml_printf): New functions.
8914 * server.h (struct buffer): New.
8915 (buffer_grow_str, buffer_grow_str0): New macros.
8916 (buffer_grow, buffer_free, buffer_init, buffer_finish)
8917 (buffer_xml_printf): Declare.
07e059b5 8918
4cab47ab
DE
89192008-11-24 Doug Evans <dje@google.com>
8920
8921 * Makefile.in (VERSION,DIST,LINT,LINTFLAGS): Delete, unused.
8922
f142445f
DJ
89232008-11-24 Daniel Jacobowitz <dan@codesourcery.com>
8924
8925 * server.c (handle_v_run): Always use the supplied argument list.
8926
d0107bb6 89272008-11-19 Bob Wilson <bob.wilson@acm.org>
889bf7c5 8928
d0107bb6
BW
8929 * xtensa-xtregs.c (XTENSA_ELF_XTREG_SIZE): Change to 4.
8930 (xtensa_regmap_table): Add entry for scompare1.
889bf7c5 8931
2c4ad781
TJB
89322008-11-18 Thiago Jung Bauermann <bauerman@br.ibm.com>
8933
8934 * Makefile.in (powerpc-isa205-32l.o, powerpc-isa205-32l.c,
8935 powerpc-isa205-altivec32l.o, powerpc-isa205-altivec32l.c,
8936 powerpc-isa205-vsx32l.o, powerpc-isa205-vsx32l.c,
8937 powerpc-isa205-64l.o, powerpc-isa205-64l.c,
8938 powerpc-isa205-altivec64l.o, powerpc-isa205-altivec64l.c,
8939 powerpc-isa205-vsx64l.o, powerpc-isa205-vsx64l.c): New targets.
8940 * configure.srv (powerpc*-*-linux*): Add ISA 2.05 object files and
8941 XML target descriptions.
8942 * linux-ppc-low.c (ppc_arch_setup): Init registers with 64-bit FPSCR
8943 when inferior is running on an ISA 2.05 or later processor. Add
8944 special case to return offset for full 64-bit slot of FPSCR when
8945 in 32-bits.
8946
dfb64f85
DJ
89472008-11-14 Daniel Gutson <dgutson@codesourcery.com>
8948
8949 * Makefile.in (SFILES, clean): Added sparc64 files.
8950 (reg-sparc64.o, reg-sparc64.c): New.
8951 * configure.srv (sparc*-*-linux*): New configuration.
8952 * linux-low.c (regsets_fetch_inferior_registers): Swap ptrace
8953 syscall arguments for SPARC.
8954 (regsets_store_inferior_registers): Likewise.
8955 * linux-sparc-low.c: New file.
8956
66b6e1dd
DE
89572008-10-21 Doug Evans <dje@google.com>
8958
8959 * Makefile.in (BFD_DIR,BFD,BFD_SRC,BFD_CFLAGS): Delete.
8960 (READLINE_DIR,READLINE_DEP): Delete.
8961 (INTERNAL_CFLAGS): Update.
8962 (LINTFLAGS): Update.
8963
9b710a42
PA
89642008-10-10 Pedro Alves <pedro@codesourcery.com>
8965
8966 * server.c (handle_v_run): If GDB didn't specify an argv, use the
8967 whole argv from the last run, not just argv[0].
8968
5822d809
PA
89692008-09-08 Pedro Alves <pedro@codesourcery.com>
8970
8971 * regcache.c (new_register_cache): Return NULL if the register
8972 cache size isn't known yet.
8973 (free_register_cache): Avoid dereferencing a NULL regcache.
8974
74aac56f
DJ
89752008-09-04 Daniel Jacobowitz <dan@codesourcery.com>
8976
8977 * configure.srv: Merge MIPS and MIPS64.
8978
400b20f5
MR
89792008-08-24 Maciej W. Rozycki <macro@linux-mips.org>
8980
8981 * Makefile.in (uninstall): Apply $(EXEEXT) too.
8982
677c5bb1
LM
89832008-08-18 Luis Machado <luisgpm@br.ibm.com>
8984
8985 * Makefile.in: Add required vsx dependencies.
8986
8987 * linux-ppc-low: Define PPC_FEATURE_HAS_VSX.
8988 Declare init_registers_powerpc_vsx32l.
8989 Declare init_registers_powerpc_vsx64l.
8990 Define PTRACE_GETVSXREGS and PTRACE_SETVSXREGS.
8991 (ppc_arch_setup): Check for VSX in hwcap.
8992 (ppc_fill_vsxregset): New function.
8993 (ppc_store_vsxregset): New function.
8994 Add new VSX entry in regset_info target_regsets.
8995
8996 * configure.srv: Add new VSX dependencies.
8997
a6f3e723
SL
89982008-08-12 Pedro Alves <pedro@codesourcery.com>
8999
9000 * remote-utils.c (noack_mode, transport_is_reliable): New globals.
9001 (remote_open): Set or clear transport_is_reliable.
9002 (putpkt_binary): Don't expect acks in noack mode.
9003 (getpkt): Don't send ack/nac in noack mode.
9004 * server.c (handle_general_set): Handle QStartNoAckMode.
9005 (handle_query): If connected by tcp pass QStartNoAckMode+ in
9006 qSupported.
9007 (main): Reset noack_mode on every connection.
9008 * server.h (noack_mode): Declare.
9009
a417dc56
RW
90102008-08-07 Ralf Wildenhues <Ralf.Wildenhues@gmx.de>
9011
9012 * Makefile.in (GDBREPLAY_OBS): New variable.
9013 (gdbreplay$(EXEEXT)): Use it to avoid unportable $^.
9014
3221518c
UW
90152008-08-05 Ulrich Weigand <uweigand@de.ibm.com>
9016 Daniel Jacobowitz <dan@codesourcery.com>
9017
9018 * linux-low.c (linux_resume_one_process): Ignore ESRCH.
9019 (usr_store_inferior_registers): Likewise.
9020 (regsets_store_inferior_registers): Likewise.
9021
ec56be1b
PA
90222008-07-31 Rolf Jansen <rj@surtec.com>
9023 Pedro Alves <pedro@codesourcery.com>
9024
9025 * configure.ac: Check for memmem declaration.
9026 * server.c [HAVE_MALLOC_H]: Include malloc.h.
9027 (disable_packet_vCont, disable_packet_Tthread, disable_packet_qC)
9028 (disable_packet_qfThreadInfo): Unconditionally compile.
9029 * server.h [!HAVE_DECL_MEMMEM]: Declare memmem.
9030 * configure, config.in: Regenerate.
9031
2fe5e3ff
DE
90322008-07-28 Doug Kwan <dougkwan@google.com>
9033
9034 * linux-low.c (sys/dir.h, sys/user.h): Remove includes.
9035 (linux_write_memory): Remove declaration of errno.
9036
836acd6d
UW
90372008-07-12 Ulrich Weigand <uweigand@de.ibm.com>
9038
9039 * linux-low.c (handle_extended_wait): Do not use "status"
9040 variable uninitialized.
9041
aeba519e
PA
90422008-07-07 Pedro Alves <pedro@codesourcery.com>
9043
9044 * server.c (handle_v_attach): Inhibit reporting dll changes.
9045
db42f210
PA
90462008-06-27 Pedro Alves <pedro@codesourcery.com>
9047
9048 * remote-utils.c (prepare_resume_reply): If requested, don't
9049 output "thread:TID" in the T stop reply.
9050
9051 * server.c (disable_packet_vCont, disable_packet_Tthread)
9052 (disable_packet_qC, disable_packet_qfThreadInfo): New globals.
9053 (handle_query): If requested, disable support for qC, qfThreadInfo
9054 and qsThreadInfo.
9055 (handle_v_requests): If requested, disable support for vCont.
9056 (gdbserver_show_disableable): New.
9057 (main): Handle --disable-packet and --disable-packet=LIST.
9058
9059 * server.h (disable_packet_vCont, disable_packet_Tthread)
9060 (disable_packet_qC, disable_packet_qfThreadInfo): Declare.
9061
8e4c5421
CD
90622008-06-20 Carlos O'Donell <carlos@codesourcery.com>
9063
9064 * server.c (gdbserver_usage): Mention --version.
9065
6e23a804
DJ
90662008-06-06 Daniel Jacobowitz <dan@codesourcery.com>
9067
9068 * Makefile.in (gdbreplay.o): New rule.
9069
90aa6a40
JM
90702008-06-06 Joseph Myers <joseph@codesourcery.com>
9071
9072 * gdbreplay.c (gdbreplay_version): Say gdbreplay in version
9073 message, not gdbserver.
9074
c16158bc 90752008-06-05 Vladimir Prus <vladimir@codesourcery.com>
889bf7c5
PA
9076 Nathan Sidwell <nathan@codesourcery.com>
9077 Joseph Myers <joseph@codesourcery.com>
c16158bc
JM
9078
9079 * acinclude.m4: Include ../../config/acx.m4.
9080 * configure.ac: Use ACX_PKGVERSION and ACX_BUGURL.
9081 * configure, config.in: Regenerate.
9082 * Makefile.in (gdbreplay$(EXEEXT)): Add version.o.
9083 * server.c (gdbserver_version): Print PKGVERSION.
9084 (gdbsrever_usage): Add stream parameter. Print REPORT_BUGS_TO.
9085 (main): Adjust gdbserver_usage calls.
9086 * gdbreplay.c (version, host_name): Add declarations.
9087 (gdbreplay_version, gdbreplay_usage): New.
9088 (main): Accept --version and --help options.
9089
aeb75bf5
DJ
90902008-06-04 Daniel Jacobowitz <dan@codesourcery.com>
9091
9092 * linux-arm-low.c (thumb_breakpoint, thumb_breakpoint_len): New.
9093 (arm_breakpoint_at): Handle Thumb.
9094 (the_low_target): Add comment.
9095
76b233dd
UW
90962008-05-29 Ulrich Weigand <uweigand@de.ibm.com>
9097
9098 * linux-ppc-low.c (ppc_collect_ptrace_register): Clear buffer.
9099
08388c79
DE
91002008-05-09 Doug Evans <dje@google.com>
9101
a3c83fae
DE
9102 * server.h (decode_search_memory_packet): Declare.
9103 * remote-utils.c (decode_search_memory_packet): New fn.
9104 * server.c (handle_search_memory_1): New fn.
08388c79
DE
9105 (handle_search_memory): New fn.
9106 (handle_query): Process qSearch:memory packets.
9107
bb9c3d36
UW
91082008-05-08 Ulrich Weigand <uweigand@de.ibm.com>
9109
9110 * regcache.c (registers_length): Remove.
9111 (set_register_cache): Verify that PBUFSIZ is large enough to hold a
9112 full register packet.
9113 * regcache.h (registers_length): Remove prototype.
9114 * server.h (PBUFSIZ): Define to 16384.
9115
7284e1be
UW
91162008-05-03 Ulrich Weigand <uweigand@de.ibm.com>
9117
9118 * configure.srv (powerpc*-*-linux*): Set srv_regobj to
9119 powerpc-32l.o, powerpc-altivec32l.o, powerpc-e500l.o,
9120 powerpc-64l.o, and powerpc-altivec64l.o.
9121 Remove rs6000/powerpc-32.xml, rs6000/powerpc-64.xml, and
9122 rs6000/powerpc-e500.xml; add rs6000/powerpc-32l.xml,
9123 rs6000/powerpc-altivec32l.xml, rs6000/powerpc-e500l.xml,
9124 rs6000/powerpc-64l.xml, rs6000/powerpc-altivec64l.xml,
9125 rs6000/power-linux.xml, and rs6000/power64-linux.xml
9126 to srv_xmlfiles.
9127
9128 * Makefile.in (reg-ppc.o, reg-ppc.c): Remove, replace by ...
9129 (powerpc-32l.o, powerpc-32l.c): ... these new rules.
9130 (powerpc-32.o, powerpc-32.c): Remove, replace by ...
9131 (powerpc-altivec32l.o, powerpc-altivec32l.c): ... these new rules.
9132 (powerpc-e500.o, powerpc-e500.c): Remove, replace by ...
9133 (powerpc-e500l.o, powerpc-e500l.c): ... these new rules.
9134 (reg-ppc64.o, reg-ppc64.c): Remove, replace by ...
9135 (powerpc-64l.o, powerpc-64l.c): ... these new rules.
9136 (powerpc-64.o, powerpc-64.c): Remove, replace by ...
9137 (powerpc-altivec64l.o, powerpc-altivec64l.c): ... these new rules.
9138 (clean): Update.
9139
9140 * linux-ppc-low.c (init_registers_ppc): Remove, replace by ...
9141 (init_registers_powerpc_32l): ... this new prototype.
9142 (init_registers_powerpc_32): Remove, replace by ...
9143 (init_registers_powerpc_altivec32l): ... this new prototype.
9144 (init_registers_powerpc_e500): Remove, replace by ...
9145 (init_registers_powerpc_e500l): ... this new prototype.
9146 (init_registers_ppc64): Remove, replace by ...
9147 (init_registers_powerpc_64l): ... this new prototype.
9148 (init_registers_powerpc_64): Remove, replace by ...
9149 (init_registers_powerpc_altivec64l): ... this new prototype.
9150 (ppc_num_regs): Set to 73.
9151 (PT_ORIG_R3, PT_TRAP): Define if necessary.
9152 (ppc_regmap, ppc_regmap_e500): Add values for orig_r3 and trap.
9153 (ppc_cannot_store_register): Handle orig_r3 and trap.
9154 (ppc_arch_setup): Update init_registers_... calls.
9155 (ppc_fill_gregset): Handle orig_r3 and trap.
9156
9157 * inferiors.c (clear_inferiors): Reset current_inferior.
9158
fdc59709
PB
91592008-04-23 Paolo Bonzini <bonzini@gnu.org>
9160
889bf7c5
PA
9161 * acinclude.m4: Add override.m4.
9162 * configure: Regenerate.
fdc59709 9163
c9b2f845
UW
91642008-04-21 Ulrich Weigand <uweigand@de.ibm.com>
9165
9166 * linux-ppc-low.c (ppc_arch_setup): Reset ppc_hwcap after the
9167 initial call to init_register_ppc64.
9168
550512b8
UW
91692008-04-21 Ulrich Weigand <uweigand@de.ibm.com>
9170
43aaf8b6
PA
9171 * configure.srv (powerpc64-*-linux*, powerpc-*-linux*): Merge into
9172 single powerpc*-*-linux* case.
550512b8
UW
9173 (s390-*-linux*, s390x-*-linux*): Merge into single s390*-*-linux* case.
9174
b6430ec3
UW
91752008-04-17 Ulrich Weigand <uweigand@de.ibm.com>
9176
9177 * configure.srv [powerpc64-*-linux*]: Remove powerpc-e500.o from
889bf7c5 9178 srv_regobj. Remove rs6000/powerpc-e500.xml and rs6000/power-spe.xml
b6430ec3
UW
9179 from reg_xmlfiles.
9180 * linux-ppc-low.c: Include <elf.h>.
9181 (PPC_FEATURE_HAS_ALTIVEC, PPC_FEATURE_HAS_SPE): Define.
9182 (ppc_hwcap): New global variable.
9183 (ppc_regmap): Remove __SPE__ #ifdef sections.
9184 (ppc_regmap_e500): New global variable.
9185 (ppc_cannot_store_register): Update __SPE__ special case.
9186 (ppc_get_hwcap): New function.
9187 (ppc_arch_setup): Use it to determine whether inferior supports
9188 AltiVec or SPE registers. Set the_low_target.regmap if appropriate.
9189 (ppc_fill_vrregset, ppc_store_vrregset): Define unconditionally.
9190 Do not access registers if target does not support AltiVec.
9191 (ppc_fill_evrregset, ppc_store_evrregset): Define unconditionally.
9192 Do not access registers if target does not support SPE.
9193 (target_regsets): Unconditionally include AltiVec and SPE regsets.
9194
52fa2412
UW
91952008-04-17 Daniel Jacobowitz <dan@codesourcery.com>
9196
9197 * linux-low.c (disabled_regsets, num_regsets): New.
9198 (use_regsets_p): Delete.
9199 (linux_wait_for_process): Clear disabled_regsets.
9200 (regsets_fetch_inferior_registers): Check and set it.
9201 (regsets_store_inferior_registers): Likewise.
9202 (linux_fetch_registers, linux_store_registers): Do not use
9203 use_regsets_p.
9204 (initialize_low): Allocate disabled_regsets.
9205
e28b3332
DJ
92062008-04-14 Daniel Jacobowitz <dan@codesourcery.com>
9207
9208 * Makefile.in (LIBOBJS): New.
9209 (OBS): Use LIBOBJS.
9210 (memmem.o): New rule.
9211 * configure.ac: Use AC_CONFIG_LIBOBJ_DIR and check for memmem.
9212 * configure: Regenerated.
9213
4536995d
UW
92142008-04-04 Ulrich Weigand <uweigand@de.ibm.com>
9215
9216 * server.c (handle_query): Never return "unsupported" for
9217 qXfer:features:read queries.
9218
221c031f
UW
92192008-03-27 Ulrich Weigand <uweigand@de.ibm.com>
9220
9221 * server.c (get_features_xml): Fix inverted condition.
9222 (handle_query): Always support qXfer:feature:read.
9223
ccd213ac
DJ
92242008-03-10 Daniel Jacobowitz <dan@codesourcery.com>
9225
9226 * server.c (wrapper_argv): New.
9227 (start_inferior): Handle wrapper_argv. If set, expect an extra
9228 trap.
9229 (gdbserver_usage): Document --wrapper.
9230 (main): Parse --wrapper.
9231
6fe305f7
UW
92322008-02-28 Ulrich Weigand <uweigand@de.ibm.com>
9233
9234 * configure.srv [powerpc64-*-linux*]: Add all files mentioned for
9235 powerpc-*-linux* to srv_regobj and reg_xmlfiles.
9236 * linux-ppc-low.c (ppc_get_pc): Support bi-arch operation.
9237 (ppc_set_pc): Likewise.
9238 (ppc_arch_setup): New function.
9239 (ppc_fill_gregset): Call ppc_collect_ptrace_register instead
9240 of collect_register.
889bf7c5 9241 (the_low_target): Use ppc_arch_setup as arch_setup initializer.
6fe305f7 9242
5b0a002e
UW
92432008-02-28 Ulrich Weigand <uweigand@de.ibm.com>
9244
9245 * configure.srv [powerpc64-*-linux*]: Use linux-ppc-low.o
9246 instead of linux-ppc64-low.o.
9247 * linux-ppc64-low.c: Remove file.
9248 * Makefile.in (SFILES): Remove linux-ppc64-low.c.
9249 (linux-ppc64-low.o): Remove rule.
9250
9251 * linux-ppc-low.c (init_registers_ppc64): Add prototype.
9252 (init_registers_powerpc_64): Likewise.
9253 (ppc_regmap): Conditionally define depending on __powerpc64__.
9254 (ppc_cannot_store_register): Do not special-case "fpscr" when
9255 compiled on __powerpc64__.
9256 (ppc_collect_ptrace_register): New function.
9257 (ppc_supply_ptrace_register): New function.
9258 (ppc_breakpoint): Change type to "unsigned int".
9259 (ppc_breakpoint_at): Change type of "insn" to "unsigned int".
9260 (the_low_target): Conditionally provide initializers for the
889bf7c5 9261 arch_setup member depending on __powerpc64__. Install
5b0a002e
UW
9262 collect_ptrace_register and supply_ptrace_register members.
9263
9b4b61c8
UW
92642008-02-28 Ulrich Weigand <uweigand@de.ibm.com>
9265
9266 * regcache.h (gdbserver_xmltarget): Add extern declaration.
9267 * server.c (gdbserver_xmltarget): Define.
9268 (get_features_xml): Use it to replace "target.xml" and arch_string.
9269
9270 * configure.srv: Remove srv_xmltarget. Add XML files that were
9271 mentioned there to srv_xmlfiles instead. Remove conditional tests
9272 on gdb_cv_arm_iwmmxt, gdb_cv_ppc_altivec, gdb_cv_ppc_spe; set
9273 srv_xmlfiles and srv_regobj to include all possible choices.
9274 * configure.ac (srv_xmltarget): Remove.
9275 (srv_xmlfiles): Do not add "target.xml".
9276 (gdb_cv_arm_iwmmxt, gdb_cv_ppc_altivec, gdb_cv_ppc_spe): Remove
9277 checks for supplementary target information.
9278 * configure: Regenerate.
9279 * Makefile.in (XML_TARGET): Remove.
9280 (target.xml): Remove rule.
9281 (clean): Do not clean up target.xml.
9282 (.PRECIOUS): Do not mention target.xml.
9283
9284 * target.h (struct target_ops): Remove arch_string member.
9285 * linux-low.c (linux_arch_string): Remove.
9286 (linux_target_ops): Remove arch_string initializer.
9287 * linux-low.h (struct linux_target_ops): Remove arch_string member.
9288 * linux-i386-low.c (the_low_target): Remove arch_string initializer.
9289 * linux-x86-64-low.c (the_low_target): Remove arch_string initializer.
9290 * spu-low.c (spu_arch_string): Remove.
9291 (spu_target_ops): Remove arch_string initializer.
9292 * win32-low.c (win32_arch_string): Remove.
9293 (win32_target_ops): Remove arch_string initializer.
9294 * win32-low.h (struct win32_target_ops): Remove arch_string member.
9295 * win32-arm-low.c (the_low_target): Remove arch_string initializer.
9296 * win32-i368-low.c (the_low_target): Remove arch_string initializer.
9297
ee1a7ae4
UW
92982008-02-27 Ulrich Weigand <uweigand@de.ibm.com>
9299
9300 * linux-low.h (struct linux_target_ops): Replace left_pad_xfer field
9301 by collect_ptrace_register and supply_ptrace_register hooks.
9302 * linux-low.c (fetch_register): Use supply_ptrace_register callback
9303 instead of checking for the_low_target.left_pad_xfer.
9304 (usr_store_inferior_registers): Use collect_ptrace_register callback
9305 instead of checking for the_low_target.left_pad_xfer.
9306
9307 * linux-s390-low.c (s390_collect_ptrace_register): New function.
9308 (s390_supply_ptrace_register): Likewise.
9309 (s390_fill_gregset): Call s390_collect_ptrace_register.
9310 (the_low_target): Update.
9311
9312 * linux-ppc64-low.c (ppc_collect_ptrace_register): New function.
9313 (ppc_supply_ptrace_register): Likewise.
9314 (the_low_target): Update.
9315
9316 * linux-i386-low.c (the_low_target): Update.
9317 * linux-x86-64-low.c (the_low_target): Update.
9318
d61ddec4
UW
93192008-02-27 Ulrich Weigand <uweigand@de.ibm.com>
9320
9321 * configure.srv [s390x-*-linux*]: Set srv_regobj to include both
9322 reg-s390.o and reg-s390x.o.
9323
9324 * linux-low.c (new_inferior): New global variable.
9325 (linux_create_inferior, linux_attach): Set it.
9326 (linux_wait_for_process): Call the_low_target.arch_setup after the
9327 target has stopped for the first time.
9328 (initialize_low): Do not call the_low_target.arch_setup.
9329
9330 * linux-s390-low.c (s390_get_pc): Support bi-arch operation.
9331 (s390_set_pc): Likewise.
9332 (s390_arch_setup): New function.
9333 (the_low_target): Use s390_arch_setup as arch_setup routine.
9334
9335 * regcache.c (realloc_register_cache): New function.
9336 (set_register_cache): Call it for each existing regcache.
9337
d05b4ac3
UW
93382008-02-27 Ulrich Weigand <uweigand@de.ibm.com>
9339
9340 * server.h (init_registers): Remove prototype.
9341
9342 * linux-low.h (struct linux_target_ops): Add arch_setup field.
9343 * linux-low.c (initialize_low): Call the_low_target.arch_setup ()
9344 instead of init_registers ().
9345 * linux-arm-low.c (init_registers_arm): Add prototype.
9346 (init_registers_arm_with_iwmmxt): Likewise.
9347 (the_low_target): Add initializer for arch_setup field.
9348 * linux-cris-low.c (init_registers_cris): Add prototype.
9349 (the_low_target): Add initializer for arch_setup field.
9350 * linux-crisv32-low.c (init_registers_crisv32): Add prototype.
9351 (the_low_target): Add initializer for arch_setup field.
9352 * linux-i386-low.c (init_registers_i386_linux): Add prototype.
9353 (the_low_target): Add initializer for arch_setup field.
9354 * linux-ia64-low.c (init_registers_ia64): Add prototype.
9355 (the_low_target): Add initializer for arch_setup field.
9356 * linux-m32r-low.c (init_registers_m32r): Add prototype.
9357 (the_low_target): Add initializer for arch_setup field.
9358 * linux-m68k-low.c (init_registers_m68k): Add prototype.
9359 (the_low_target): Add initializer for arch_setup field.
9360 * linux-mips-low.c (init_registers_mips_linux): Add prototype.
9361 (init_registers_mips64_linux): Likewise.
9362 (the_low_target): Add initializer for arch_setup field.
9363 * linux-ppc-low.c (init_registers_ppc): Add prototype.
9364 (init_registers_powerpc_32, init_registers_powerpc_e500): Likewise.
9365 (the_low_target): Add initializer for arch_setup field.
9366 * linux-ppc64-low.c (init_registers_ppc64): Add prototype.
9367 (init_registers_powerpc_64): Likewise.
9368 (the_low_target): Add initializer for arch_setup field.
9369 * linux-s390-low.c (init_registers_s390): Add prototype.
9370 (init_registers_s390x): Likewise.
9371 (the_low_target): Add initializer for arch_setup field.
9372 * linux-sh-low.c (init_registers_sh): Add prototype.
9373 (the_low_target): Add initializer for arch_setup field.
9374 * linux-x86-64-low.c (init_registers_x86_64_linux): Add prototype.
9375 (the_low_target): Add initializer for arch_setup field.
9376 * linux-xtensa-low.c (init_registers_xtensa): Add prototype.
9377 (the_low_target): Add initializer for arch_setup field.
9378
9379 * win32-low.h (struct win32_target_ops): Add arch_setup field.
9380 * win32-low.c (initialize_low): Call the_low_target.arch_setup ()
9381 instead of init_registers ().
9382 * win32-arm-low.c (init_registers_arm): Add prototype.
9383 (the_low_target): Add initializer for arch_setup field.
9384 * win32-i386-low.c (init_registers_i386): Add prototype.
9385 (the_low_target): Add initializer for arch_setup field.
9386
9387 * spu-low.c (init_registers_spu): Add prototype.
9388 (initialize_low): Call initialie_registers_spu () instead of
9389 initialize_registers ().
9390
fd96d250
PA
93912008-02-19 Pedro Alves <pedro@codesourcery.com>
9392
9393 * server.c (handle_v_requests): When handling the vRun and vAttach
9394 packets, if already debugging a process, don't kill it. Return an
9395 error instead.
9396
d41b6bb4
DJ
93972008-02-17 Daniel Jacobowitz <dan@codesourcery.com>
9398
9399 * server.c (handle_query): Correct length check.
9400
5ac588cf
PA
94012008-02-14 Pedro Alves <pedro_alves@portugalmail.pt>
9402
9403 * win32-low.c (do_initial_child_stuff): Add process handle
9404 parameter. Set current_process_handle and current_process_id from the
9405 parameters. Clear globals.
9406 (win32_create_inferior): Don't set current_process_handle and
9407 current_process_id here. Instead pass them on the call to
9408 do_initial_child_stuff.
9409 (win32_attach): Likewise.
9410 (win32_clear_inferiors): New.
9411 (win32_kill): Don't close the current process handle or the
9412 current thread handle here. Instead call win32_clear_inferiors.
9413 (win32_detach): Don't open a new handle to the process. Call
9414 win32_clear_inferiors.
9415 (win32_join): Don't rely on current_process_handle; open a new
9416 handle using the process id.
9417 (win32_wait): Call win32_clear_inferiors when the inferior process
9418 has exited.
9419
ecd7ecbc
DJ
94202008-02-14 Daniel Jacobowitz <dan@codesourcery.com>
9421
9422 * server.c (monitor_show_help): Add "exit".
9423
1525d545
MG
94242008-02-11 Maxim Grigoriev <maxim2405@gmail.com>
9425
ecd7ecbc 9426 * Makefile.in (SFILES): Add linux-xtensa-low.c.
1525d545
MG
9427 (clean): Add reg-xtensa.c.
9428 (linux-xtensa-low.o, reg-xtensa.o, reg-xtensa.c): New dependencies.
ecd7ecbc
DJ
9429 * configure.srv (xtensa*-*-linux*) New target.
9430 * linux-xtensa-low.c: New.
9431 * xtensa-xtregs.c: New.
1525d545 9432
59a016f0
PA
94332008-02-01 Pedro Alves <pedro_alves@portugalmail.pt>
9434
9435 * hostio.c: Don't include errno.h.
9436 (errno_to_fileio_errno): Move to hostio-errno.
9437 * hostio.c: (hostio_error): Remove the error parameter. Defer the
9438 error number outputting to the target->hostio_last_error callback.
9439 (hostio_packet_error): Use FILEIO_EINVAL directly.
9440 (handle_open, handle_pread, hostio_error, handle_unlink): Update
9441 calls to hostio_error.
9442 * hostio-errno.c: New.
9443 * server.h (hostio_last_error_from_errno): Declare.
9444 * target.h (target_ops): Add hostio_last_error member.
9445 * linux-low.c (linux_target_op): Register hostio_last_error_from_errno
9446 as hostio_last_error handler.
889bf7c5 9447 * spu-low.c (spu_target_ops): Likewise.
59a016f0
PA
9448 * win32-low.c [_WIN32_WCE] (win32_error_to_fileio_error)
9449 (wince_hostio_last_error): New functions.
9450 (win32_target_ops) [_WIN32_WCE]: Register wince_hostio_last_error
9451 as hostio_last_error handler.
9452 (win32_target_ops) [!_WIN32_WCE]: Register
9453 hostio_last_error_from_errno as hostio_last_error handler.
9454 * Makefile.in (SFILES): Add hostio.c and hostio-errno.c.
9455 (hostio-errno.o): New rule.
9456 * configure.ac (GDBSERVER_DEPFILES): Add $srv_hostio_err_objs.
9457 * configure.srv (srv_hostio_err_objs): New variable. Default to
9458 hostio-errno.o.
9459 (arm*-*-mingw32ce*): Set srv_hostio_err_objs to "".
9460 * configure: Regenerate.
9461
2d717e4f
DJ
94622008-01-29 Daniel Jacobowitz <dan@codesourcery.com>
9463
9464 * linux-low.c (linux_attach_lwp): Do not _exit after errors.
9465 (linux_kill, linux_detach): Clean up the process list.
9466 * remote-utils.c (remote_open): Improve port number parsing.
9467 (putpkt_binary, input_interrupt): Only send interrupts if the target
9468 is running.
9469 * server.c (extended_protocol): Make static.
9470 (attached): Define earlier.
9471 (exit_requested, response_needed, program_argv): New variables.
9472 (target_running): New.
9473 (start_inferior): Clear attached here.
9474 (attach_inferior): Set attached here.
9475 (require_running): Define.
9476 (handle_query): Use require_running and target_running. Implement
9477 "monitor exit".
9478 (handle_v_attach, handle_v_run): New.
9479 (handle_v_requests): Use require_running. Handle vAttach and vRun.
9480 (gdbserver_usage): Update.
9481 (main): Redo argument parsing. Handle --debug and --multi. Handle
9482 --attach along with other options or after the port. Save
9483 program_argv. Support no initial program. Resynchronize
9484 communication with GDB after an error. Handle "monitor exit".
9485 Use require_running and target_running. Always allow the extended
9486 protocol. Do not error out for Hc0 or Hc-1. Do not automatically
9487 restart in extended mode.
9488 * README: Refer to the GDB manual. Update --attach usage.
9489
7407e2de
AS
94902007-12-20 Andreas Schwab <schwab@suse.de>
9491
9492 * linux-low.c (STACK_SIZE): Define.
9493 (linux_tracefork_child): Use it. Use __clone2 on ia64.
9494 (linux_test_for_tracefork): Likewise.
9495
b65d95c5
DJ
94962007-12-18 Daniel Jacobowitz <dan@codesourcery.com>
9497
9498 * linux-low.c (linux_wait_for_event): Update messages. Do not
9499 reinsert auto-delete breakpoints.
9500 * mem-break.c (struct breakpoint): Change return type of handler to
9501 int.
9502 (set_breakpoint_at): Update handler type.
9503 (reinsert_breakpoint_handler): Return 1 instead of calling
9504 delete_breakpoint.
9505 (reinsert_breakpoint_by_bp): Check for the original breakpoint before
9506 setting a new one.
9507 (check_breakpoints): Delete auto-delete breakpoints and return 2.
9508 * mem-break.h (set_breakpoint_at): Update handler type.
9509 * thread-db.c (thread_db_create_event, thread_db_create_event): Update.
9510 * win32-low.c (auto_delete_breakpoint): New.
9511 (get_child_debug_event): Use it.
9512
4e799345
DJ
95132007-12-16 Daniel Jacobowitz <dan@codesourcery.com>
9514
9515 * configure.ac: Check for pread and pwrite.
9516 * hostio.c (handle_pread): Fall back to lseek and read.
9517 (handle_pwrite): Fall back to lseek and write.
9518 * config.in, configure: Regenerated.
9519
27524b67
DJ
95202007-12-07 Daniel Jacobowitz <dan@codesourcery.com>
9521
9522 * server.c (myresume): Add own_buf argument.
9523 (main): Update calls.
9524
a20d5e98
DJ
95252007-12-06 Daniel Jacobowitz <dan@codesourcery.com>
9526
9527 * linux-low.c (linux_wait, linux_resume): Do not handle async I/O.
9528 * remote-utils.c (remote_open): Do not call disable_async_io.
9529 (block_async_io): Delete.
9530 (unblock_async_io): Make static.
9531 (initialize_async_io): New.
9532 * server.c (handle_v_cont): Handle async I/O here.
9533 (myresume): Likewise. Move other common resume tasks here...
9534 (main): ... from here. Call initialize_async_io. Disable async
9535 I/O before the main loop.
9536 * server.h (initialize_async_io): Declare.
9537 (block_async_io, unblock_async_io): Delete prototypes.
9538 * spu-low.c (spu_resume, spu_wait): Do not handle async I/O here.
9539
b79d787e
DJ
95402007-12-06 Mick Davis <mickd@goanna.iinet.net.au>
9541
9542 * remote-utils.c (readchar): Allow binary data in received messages.
9543
d97903b2
PA
95442007-12-03 Pedro Alves <pedro_alves@portugalmail.pt>
9545
9546 * win32-low.c (attaching): New global.
9547 (win32_create_inferior): Clear the `attaching' global.
9548 (win32_attach): Set the `attaching' global.
9549 (get_child_debug_event) [_WIN32_WCE]: Stop the inferior when
9550 attaching. Only set a breakpoint at the entry point if not
9551 attaching.
9552
311de423
PA
95532007-12-03 Pedro Alves <pedro_alves@portugalmail.pt>
9554
9555 * server.c (main): Don't report dll events on the initial
9556 connection on attaches.
9557
6c2d16d2
PA
95582007-12-03 Pedro Alves <pedro_alves@portugalmail.pt>
9559
9560 * server.c (main): Relax numerical bases supported for the pid of
9561 the --attach command line argument.
9562
5ca906e6
PA
95632007-12-03 Pedro Alves <pedro_alves@portugalmail.pt>
9564
9565 * win32-low.c (win32_attach): Call OpenProcess before
9566 DebugActiveProcess, not after. Add last error output to error
9567 call.
9568
9c6c8194
PA
95692007-12-03 Pedro Alves <pedro_alves@portugalmail.pt>
9570
9571 * win32-low.c (win32_get_thread_context)
9572 (win32_set_thread_context): New functions.
9573 (thread_rec): Use win32_get_thread_context.
9574 (continue_one_thread, win32_resume): Use win32_set_thread_context.
9575 * win32-low.h (win32_thread_info) [_WIN32_WCE]: Add `base_context'
9576 field.
9577
4d5d1aaa
PA
95782007-12-03 Leo Zayas
9579 Pedro Alves <pedro_alves@portugalmail.pt>
9580
9581 * win32-low.c (soft_interrupt_requested, faked_breakpoint): New
9582 global variables.
9583 (child_add_thread): Minor cleanup.
9584 (child_continue): Resume artificially suspended threads before
9585 calling ContinueDebugEvent.
9586 (suspend_one_thread): New.
9587 (fake_breakpoint_event): New.
9588 (get_child_debug_event): Change return type to int. Check here if
9589 gdb sent an interrupt request. If a soft interrupt was requested,
9590 fake a breakpoint event. Return 0 if there is no event to handle,
9591 and 1 otherwise.
9592 (win32_wait): Don't check here if gdb sent an interrupt request.
9593 Ensure there is a valid event to handle.
9594 (win32_request_interrupt): Add soft interruption method as last
9595 resort.
9596
c436e841
PA
95972007-12-03 Leo Zayas
9598 Pedro Alves <pedro_alves@portugalmail.pt>
9599
9600 * win32-low.h (win32_thread_info): Add descriptions to the
9601 structure members. Replace `suspend_count' counter by a
9602 `suspended' flag.
9603 * win32-low.c (thread_rec): Update condition of when to get the
9604 context from the inferior. Rely on ContextFlags being set if it
9605 has already been retrieved. Only suspend the inferior thread if
9606 we haven't already. Warn if that fails.
9607 (continue_one_thread): s/suspend_count/suspended/. Only call
9608 ResumeThread once. Warn if that fails.
9609
e7b5fa67
PA
96102007-12-02 Pedro Alves <pedro_alves@portugalmail.pt>
9611
9612 * win32-low.c (win32_wait): Don't read from the inferior when it
9613 has already exited.
9614
a385171d
PA
96152007-12-02 Pedro Alves <pedro_alves@portugalmail.pt>
9616
9617 * Makefile.in (win32_low_h): New variable.
9618 (win32-low.o): Add dependency on $(win32_low_h).
9619 (win32-arm-low.o, win32-i386-low.o): New rules.
9620
f80c84b3
DJ
96212007-11-30 Daniel Jacobowitz <dan@codesourcery.com>
9622
9623 * hostio.c: Correct copyright year.
9624
a6b151f1
DJ
96252007-11-30 Daniel Jacobowitz <dan@codesourcery.com>
9626
9627 * Makefile.in (OBS): Add hostio.o.
9628 (hostio.o): New rule.
9629 * server.h (handle_vFile): Declare.
9630 * hostio.c: New file.
9631 * server.c (handle_v_requests): Take packet_len and new_packet_len
9632 for binary packets. Call handle_vFile.
9633 (main): Update call to handle_v_requests.
9634
f9387fc3
DJ
96352007-11-05 Daniel Jacobowitz <dan@codesourcery.com>
9636
9637 * linux-low.c: Include <sched.h>.
9638
51c2684e
DJ
96392007-11-01 Daniel Jacobowitz <dan@codesourcery.com>
9640
9641 * linux-low.c (linux_tracefork_grandchild): New.
9642 (linux_tracefork_child): Use clone.
9643 (linux_test_for_tracefork): Use clone; allocate and free a stack.
9644
75f83163
JB
96452007-10-31 Joel Brobecker <brobecker@adacore.com>
9646
9647 * Makefile.in: Use $(SHELL) instead of "sh" to call regdat.sh.
9648
da5898ce
DJ
96492007-10-24 Daniel Jacobowitz <dan@codesourcery.com>
9650
9651 * linux-low.c (handle_extended_wait): Handle unexpected signals.
9652
24a09b5f
DJ
96532007-10-23 Daniel Jacobowitz <dan@codesourcery.com>
9654
9655 * inferiors.c (change_inferior_id): Delete.
9656 (add_pid_to_list, pull_pid_from_list): New.
9657 * linux-low.c (PTRACE_SETOPTIONS, PTRACE_GETEVENTMSG)
9658 (PTRACE_O_TRACESYSGOOD, PTRACE_O_TRACEFORK, PTRACE_O_TRACEVFORK)
9659 (PTRACE_O_TRACECLONE, PTRACE_O_TRACEEXEC, PTRACE_O_TRACEVFORKDONE)
9660 (PTRACE_O_TRACEEXIT, PTRACE_EVENT_FORK, PTRACE_EVENT_VFORK)
9661 (PTRACE_EVENT_CLONE, PTRACE_EVENT_EXEC, PTRACE_EVENT_VFORK_DONE)
9662 (PTRACE_EVENT_EXIT, __WALL): Provide default definitions.
9663 (stopped_pids, thread_db_active, must_set_ptrace_flags): New variables.
9664 (using_threads): Always set to 1.
9665 (handle_extended_wait): New.
9666 (add_process): Do not set TID.
9667 (linux_create_inferior): Set must_set_ptrace_flags.
9668 (linux_attach_lwp): Remove TID argument. Do not check using_threads.
9669 Use PTRACE_SETOPTIONS. Call new_thread_notify. Update all callers.
9670 (linux_thread_alive): Rename TID argument to LWPID.
9671 (linux_wait_for_process): Handle unknown processes. Do not use TID.
9672 (linux_wait_for_event): Do not use TID or check using_threads. Update
9673 call to dead_thread_notify. Call handle_extended_wait.
9674 (linux_create_inferior): Use PTRACE_SETOPTIONS.
9675 (send_sigstop): Delete sigstop_sent.
9676 (wait_for_sigstop): Avoid TID.
9677 (linux_supports_tracefork_flag, linux_tracefork_child, my_waitpid)
9678 (linux_test_for_tracefork): New.
9679 (linux_lookup_signals): Use thread_db_active and
9680 linux_supports_tracefork_flag.
9681 (initialize_low): Use thread_db_active and linux_test_for_tracefork.
9682 * linux-low.h (get_process_thread): Avoid TID.
9683 (struct process_ifo): Move thread_known and tid to the end. Remove
9684 sigstop_sent.
9685 (linux_attach_lwp, thread_db_init): Update prototypes.
9686 * server.h (change_inferior_id): Delete prototype.
9687 (add_pid_to_list, pull_pid_from_list): New prototypes.
9688 * thread-db.c (thread_db_use_events): New.
9689 (find_first_thread): Rename to...
9690 (find_one_thread): ...this. Update callers and messages. Do not
9691 call fatal. Check thread_db_use_events. Do not call
9692 change_inferior_id or new_thread_notify.
9693 (maybe_attach_thread): Update. Do not call new_thread_notify.
9694 (thread_db_init): Set thread_db_use_events. Check use_events.
9695 * utils.c (fatal, warning): Correct message prefix.
9696
30ed0a8f
DJ
96972007-10-15 Daniel Jacobowitz <dan@codesourcery.com>
9698
9699 * Makefile.in (clean): Remove new files.
9700 (powerpc-32.o, powerpc-32.c, powerpc-e500.o, powerpc-e500.c)
9701 (powerpc-64.o, powerpc-64.c): New rules.
9702 * configure.srv: Use alternate register sets for powerpc64-*-linux*
9703 with AltiVec, powerpc-*-linux* with AltiVec, and powerpc-*-linux*
9704 with SPE.
9705 * linux-ppc-low.c (ppc_regmap): Do not fetch the FP registers for
9706 SPE targets.
9707 (ppc_cannot_store_register): Do not check for FPSCR for SPE targets.
9708 (PTRACE_GETVRREGS, PTRACE_SETVRREGS, SIZEOF_VRREGS, ppc_fill_vrregset)
9709 (ppc_store_vrregset, PTRACE_GETEVRREGS, PTRACE_SETEVRREGS)
9710 (struct gdb_evrregset_t, ppc_fill_evrregset, ppc_store_evrregset): New.
9711 (target_regsets): Add AltiVec and SPE register sets.
9712 * configure.ac: Check for AltiVec and SPE.
9713 * linux-ppc64-low.c (PTRACE_GETVRREGS, PTRACE_SETVRREGS, SIZEOF_VRREGS)
9714 (ppc_fill_vrregset, ppc_store_vrregset): New.
9715 (target_regsets): Add AltiVec register set.
9716 * configure: Regenerated.
9717
fd462a61
DJ
97182007-09-19 Daniel Jacobowitz <dan@codesourcery.com>
9719
9720 * linux-low.c (O_LARGEFILE): Define.
9721 (linux_read_memory): Use /proc/PID/mem.
9722 * configure.ac: Use AC_GNU_SOURCE. Check for pread64.
9723 * configure, config.in: Regenerated.
9724
69f223ed
DJ
97252007-09-04 Daniel Jacobowitz <dan@codesourcery.com>
9726
9727 * linux-low.c (linux_wait_for_event): Do not pass signals while
9728 single-stepping.
9729
aec18585
PA
97302007-09-03 Pedro Alves <pedro_alves@portugalmail.pt>
9731
9732 * win32-low.c (create_process): New.
9733 (win32_create_inferior): Use create_process instead of
9734 CreateProcess. If create_process failed retry appending an ".exe"
9735 suffix. Store the GetLastError result immediatelly after
9736 create_process calls and use it on the call to error.
9737
34d86ddd
PA
97382007-09-03 Pedro Alves <pedro_alves@portugalmail.pt>
9739
9740 * win32-low.c (handle_load_dll): Don't use toolhelp when waiting.
9741
5a0e3bd0
JB
97422007-08-23 Joel Brobecker <brobecker@adacore.com>
9743
9744 * configure.ac: Switch license to GPLv3.
9745
f88c79e6
MS
97462007-08-01 Michael Snyder <msnyder@access-company.com>
9747
9748 * remote-utils.c (putpkt_binary): Memory leak, free buf2.
9749
6b3d9b83
PA
97502007-07-31 Pedro Alves <pedro_alves@portugalmail.pt>
9751
9752 * win32-low.c (winapi_CloseToolhelp32Snapshot) [_WIN32_WCE]: New
9753 typedef.
9754 (win32_CloseToolhelp32Snapshot) [_WIN32_WCE]: New global var.
9755 (load_toolhelp) [_WIN32_WCE]: Load TOOLHELP.DLL. Get
9756 CloseToolhelp32Snapshot.
9757 (toolhelp_get_dll_name) [_WIN32_WCE]: Close the snapshot with
9758 CloseToolhelp32Snapshot.
9759
c588c53c
MS
97602007-07-27 Michael Snyder <michael.snyder@access-company.com>
9761
9762 * server.c (main): Check for inferior exit before main loop.
9763
aa0403d9
PA
97642007-07-18 Pedro Alves <pedro_alves@portugalmail.pt>
9765
9766 * remote-utils.c (remote_open): Set SO_KEEPALIVE on remote_desc
9767 instead of on tmp_desc.
9768
255e7678
DJ
97692007-07-17 Pedro Alves <pedro_alves@portugalmail.pt>
9770 Daniel Jacobowitz <dan@codesourcery.com>
9771
9772 * inferiors.c (all_dlls, dlls_changed, get_dll): New.
9773 (add_thread): Minor cleanups.
9774 (clear_inferiors): Move lower in the file. Clear the DLL
9775 list.
9776 (free_one_dll, match_dll, loaded_dll, unloaded_dll, clear_list): New.
9777 * remote-utils.c (prepare_resume_reply): Check dlls_changed.
9778 (xml_escape_text): New.
9779 * server.c (handle_query): Handle qXfer:libraries:read. Report it
9780 for qSupported.
9781 (handle_v_cont): Report errors.
9782 (gdbserver_version): Update.
9783 (main): Correct size of own_buf. Do not report initial DLL events.
9784 * server.h (struct dll_info, all_dlls, dlls_changed, loaded_dll)
9785 (unloaded_dll, xml_escape_text): New.
9786 * win32-low.c (enum target_waitkind): Update comments.
9787 (win32_add_one_solib, get_image_name, winapi_EnumProcessModules)
9788 (winapi_GetModuleInformation, winapi_GetModuleFileNameExA)
9789 (win32_EnumProcessModules, win32_GetModuleInformation)
9790 (win32_GetModuleFileNameExA, load_psapi, psapi_get_dll_name)
9791 (winapi_CreateToolhelp32Snapshot, winapi_Module32First)
9792 (winapi_Module32Next, win32_CreateToolhelp32Snapshot)
9793 (win32_Module32First, win32_Module32Next, load_toolhelp)
9794 (toolhelp_get_dll_name, handle_load_dll, handle_unload_dll): New.
9795 (get_child_debug_event): Handle DLL events.
9796 (win32_wait): Likewise.
9797
0d37add9
DJ
97982007-07-12 Daniel Jacobowitz <dan@codesourcery.com>
9799
9800 * configure.srv: Set srv_linux_regsets for sh*-*-linux*.
9801 * linux-sh-low.c (sh_fill_gregset, target_regsets): New.
9802
45e2715e
PA
98032007-07-08 Pedro Alves <pedro_alves@portugalmail.pt>
9804
9805 * win32-low.c (handle_output_debug_string): Ignore event if not
9806 waiting.
9807
c5674cf1
PA
98082007-07-08 Pedro Alves <pedro_alves@portugalmail.pt>
9809
9810 * win32-arm-low.c (arm_wince_breakpoint): Fix typo.
9811
2bbe3cc1
DJ
98122007-07-03 Daniel Jacobowitz <dan@codesourcery.com>
9813
9814 * remote-utils.c (look_up_one_symbol): Handle 'm' packets.
9815
ae13219e
DJ
98162007-07-02 Daniel Jacobowitz <dan@codesourcery.com>
9817
9818 * inferiors.c (change_inferior_id): Add comment.
9819 * linux-low.c (check_removed_breakpoint): Add an early
9820 prototype. Improve debug output.
9821 (linux_attach): Doc update.
9822 (linux_detach_one_process, linux_detach): Clean up before releasing
9823 each process.
9824 (send_sigstop, wait_for_sigstop): Improve comments and debug output.
9825 * linux-low.h (struct process_info): Doc improvement.
9826 * mem-break.c (delete_all_breakpoints): New.
9827 * mem-break.h (delete_all_breakpoints): New prototype.
9828 * thread-db.c (find_first_thread): New.
9829 (thread_db_create_event): Call it instead of
9830 thread_db_find_new_threads. Clean up unused variables.
9831 (maybe_attach_thread): Remove first thread handling.
9832 (thread_db_find_new_threads): Use find_first_thread.
9833 (thread_db_get_tls_address): Likewise.
9834
4105de34
DJ
98352007-06-27 Daniel Jacobowitz <dan@codesourcery.com>
9836
9837 * thread-db.c (thread_db_find_new_threads): Add prototype.
9838 (thread_db_create_event): Check for the main thread before adding
9839 a new thread.
9840 (maybe_attach_thread): Only enable event reporting if TID == 0.
9841 (thread_db_get_tls_address): Check for new threads.
9842
2b876972
DJ
98432007-06-20 Daniel Jacobowitz <dan@codesourcery.com>
9844
9845 * linux-low.c (linux_create_inferior): Try execv before execvp.
9846 * spu-low.c (spu_create_inferior): Likewise.
9847
7a245884
DJ
98482007-06-13 Mike Frysinger <vapier@gentoo.org>
9849
9850 * linux-low.c (linux_create_inferior): Change execv to execvp.
9851 * spu-low.c (spu_create_inferior): Likewies.
9852
117ce543
DJ
98532007-06-13 Daniel Jacobowitz <dan@codesourcery.com>
9854
9855 * Makefile.in (clean): Clean new files instead of deleted ones.
9856 (reg-mips.o, reg-mips.c, reg-mips64.o, reg-mips64.c): Delete.
9857 (mips-linux.o, mips-linux.c, mips64-linux.o, mips64-linux.c): New
9858 rules.
9859 * configure.srv: Specify XML files and new regformats for MIPS and
9860 MIPS64 GNU/Linux.
9861 * linux-mips-low.c (mips_num_regs): Set to only used registers.
9862 (mips_regmap): Do not fetch $0. Remove unused registers. Add
9863 an entry for the restart register.
9864 (mips_cannot_fetch_register, mips_cannot_store_register)
9865 (mips_reinsert_addr, mips_fill_fpregset, mips_store_fpregset): Update
9866 register names to match the XML descriptions.
9867 (mips_fill_gregset, mips_store_gregset): Likewise. Handle the
9868 restart register instead of $0.
9869
0e7f50da
UW
98702007-06-12 Ulrich Weigand <uweigand@de.ibm.com>
9871 Markus Deuling <deuling@de.ibm.com>
9872
9873 * remote-utils.c (decode_xfer_write): New function.
9874 * server.h (decode_xfer_write): Add prototype.
9875 * server.c (handle_query): Add PACKET_LEN argument. Support
9876 qXfer:spu:read and qXfer:spu:write packets.
9877 (main): Pass packet_len to handle_query.
9878 * spu-low.c (spu_target_ops): Add spu_proc_xfer_spu.
9879 * target.h (target_ops): Add qxfer_spu.
9880
374c1d38
UW
98812007-06-12 Ulrich Weigand <uweigand@de.ibm.com>
9882
9883 * spu-low.c (spu_proc_xfer_spu): Do not return failure when
9884 accessing non-seekable spufs files.
9885
bb63802a
UW
98862007-05-16 Markus Deuling <deuling@de.ibm.com>
9887
889bf7c5 9888 * server.c (handle_query): Add reply for qC packet.
bb63802a 9889
7390519e
PA
98902007-05-10 Pedro Alves <pedro_alves@portugalmail.pt>
9891 Leo Zayas <lerele@champenstudios@com>
9892
9893 * server.h (check_remote_input_interrupt_request): New function.
9894 * remote_utils.c (INVALID_DESCRIPTOR): New define.
9895 (remote_desc): Initialize with INVALID_DESCRIPTOR.
9896 (input_interrupt): Expose on USE_WIN32API too. Fix whitespace.
9897 (check_remote_input_interrupt_request): New function.
9898 * server.h (check_remote_input_interrupt_request): Declare.
3ecf0694 9899 * win32-low.c (winapi_DebugBreakProcess,
7390519e
PA
9900 winapi_GenerateConsoleCtrlEvent): New typedefs.
9901 (get_child_debug_event): Lower Win32 debug event polling from 1 sec
9902 to 250 ms.
9903 (win32_wait): Check for remote interrupt request
9904 with check_remote_input_interrupt_request.
9905 (win32_request_interrupt): New function.
9906 (win32_target_op): Set request_interrupt to win32_request_interrupt.
9907
34b34921
PA
99082007-05-10 Pedro Alves <pedro_alves@portugalmail.pt>
9909
9910 * win32-low.c (debug_registers_changed,
9911 debug_registers_used, CONTEXT_EXTENDED_REGISTERS,
9912 CONTEXT_FLOATING_POINT, CONTEXT_DEBUG_REGISTERS,
9913 CONTEXT_DEBUGGER, CONTEXT_DEBUGGER_DR): Delete.
9914 (thread_rec): Get context using the low target.
9915 (child_add_thread): Call thread_added on the low target,
9916 which does the same thing.
9917 (regptr): Delete.
9918 (do_initial_child_stuff): Remove debug registers references.
9919 Set context using the low target. Resume threads after
9920 setting the contexts.
9921 (child_continue): Remove dead variable. Remove debug
9922 registers references.
9923 (child_fetch_inferior_registers): Go through the low target.
9924 (do_child_store_inferior_registers): Remove.
9925 (child_store_inferior_registers): Go through the low target.
9926 (win32_resume): Remove debug registers references.
9927 Set context using the low target.
9928 (handle_exception): Change return type to void. Don't record
9929 context here. Set status to TARGET_WAITKIND_SPURIOUS on a
9930 first chance exception.
889bf7c5 9931 (get_child_debug_event): Change return type to void. Remove
34b34921
PA
9932 goto loop. Always return after waiting for debug event.
9933 (win32_wait): Convert to switch statement. Handle spurious
9934 events.
9935
9936 * win32-i386-low.c (debug_registers_changed,
9937 debug_registers_used): New.
9938 (initial_stuff): Rename to ...
9939 (i386_initial_stuff): ... this. Clear debug registers
9940 state variables.
9941 (store_debug_registers): Delete.
9942 (i386_get_thread_context): New.
9943 (load_debug_registers): Delete.
9944 (i386_set_thread_context): New.
9945 (i386_thread_added): New.
9946 (single_step): Rename to ...
9947 (i386_single_step): ... this.
9948 (do_fetch_inferior_registers): Rename to ...
9949 (i386_fetch_inferior_register): ... this.
9950 (i386_store_inferior_register): New.
9951 (the_low_target): Adapt to new interface.
9952
9953 * win32-arm-low.c (CONTEXT_FLOATING_POINT): Define.
9954 (arm_get_thread_context): New.
9955 (arm_set_thread_context): New.
9956 (regptr): New.
9957 (do_fetch_inferior_registers): Rename to ...
9958 (arm_fetch_inferior_register): ... this.
9959 (arm_store_inferior_register): New.
9960 (arm_wince_breakpoint): Reimplement as unsigned long.
9961 (arm_wince_breakpoint_len): Define.
9962 (the_low_target): Adapt to new interface.
9963
9964 * win32-low.h (target_ops): Remove regmap, store_debug_registers and
9965 load_debug_registers. Add get_thread_context, set_thread_context,
9966 thread_added and store_inferior_register. Rename
9967 fetch_inferior_registers to fetch_inferior_register.
9968 (regptr): Remove declaration.
9969
dd6953e1
PA
99702007-05-10 Pedro Alves <pedro_alves@portugalmail.pt>
9971
9972 * linux-low.c (linux_detach): Change return type to int. Return 0.
9973 * spu-low.c (spu_detach): Likewise.
9974
444d6139
PA
99752007-05-10 Pedro Alves <pedro_alves@portugalmail.pt>
9976
9977 * target.h (target_ops): Change return type of detach to int.
9978 Add join.
9979 (join_inferior): New.
9980 * server.c (main): Don't skip detach support on mingw32.
9981 If the inferior doesn't support detaching return error.
9982 Call join_inferior instead of using waitpid.
9983 * linux-low.c (linux_join): New.
9984 (linux_target_op): Add linux_join.
9985 * spu-low.c (spu_join): New.
9986 (spu_target_ops): Add spu_join.
9987 * win32-low.c (win32_detach): Adapt to new interface.
9988 Reopen current_process_handle before detaching. Issue a child
9989 resume before detaching.
9990 (win32_join): New.
9991 (win32_target_op): Add win32_join.
9992
1d5315fe
PA
99932007-05-10 Pedro Alves <pedro_alves@portugalmail.pt>
9994
9995 * win32-low.c (win32-attach): Fix return value.
9996 * target.h (target_ops): Describe ATTACH return values.
9997
bf914831
PA
99982007-05-10 Pedro Alves <pedro_alves@portugalmail.pt>
9999
10000 * win32-low.c (GETPROCADDRESS): Define.
10001 (winapi_DebugActiveProcessStop): Add WINAPI. typedef as pointer.
10002 (winapi_DebugSetProcessKillOnExit): Likewise.
10003 (win32_create_inferior): Force usage of ansi CreateProcessA.
10004 (win32_attach): Use GETPROCADDRESS.
10005 (win32_detach): Likewise.
10006
f72f3e60
PA
100072007-05-10 Pedro Alves <pedro_alves@portugalmail.pt>
10008
10009 * win32-low.c (win32_wait): Don't use WSTOPSIG.
10010
ed50f18f
PA
100112007-03-30 Pedro Alves <pedro_alves@portugalmail.pt>
10012
10013 * win32-low.c: Commit leftover changes from 2007-03-29.
10014
0c2ead7e
DJ
100152007-03-30 Daniel Jacobowitz <dan@codesourcery.com>
10016
10017 * i387-fp.c (struct i387_fsave, struct i387_fxsave): Make 16-bit
10018 fields short instead of int. Add explicit padding.
10019 (i387_cache_to_fsave): Remove unnecessary casts.
10020 (i387_fsave_to_cache): Doc fix.
10021 (i387_cache_to_fxsave): Remove unnecessary casts and masking.
10022
73725ff3
DJ
100232007-03-30 Daniel Jacobowitz <dan@codesourcery.com>
10024
10025 * i387-fp.c (i387_cache_to_fxsave): Reinitialize val2 before use.
10026 (i387_fxsave_to_cache): Check fp->ftag while building ftag value.
10027
d99f33d8
PA
100282007-03-29 Pedro Alves <pedro_alves@portugalmail.pt>
10029
10030 * configure.srv (arm*-*-mingw32ce*): Move near the other
10031 arm targets.
10032
68070c10
PA
100332007-03-29 Pedro Alves <pedro_alves@portugalmail.pt>
10034
2482afc6 10035 * configure.ac: Add errno checking.
68070c10
PA
10036 (AC_CHECK_HEADERS): Add errno.h, fcntl.h, signal.h,
10037 sys/file.h and malloc.h.
10038 (AC_CHECK_DECLS): Add perror.
10039 (srv_mingwce): Handle.
2482afc6 10040 * configure.srv (i[34567]86-*-cygwin*): Add
68070c10
PA
10041 win32-i386-low.o to srv_tgtobj.
10042 (i[34567]86-*-mingw*): Likewise.
10043 (arm*-*-mingw32ce*): Add case.
10044 * gdbreplay.c [HAVE_SYS_FILE_H, HAVE_SIGNAL_H,
10045 HAVE_FCNTL_H, HAVE_ERRNO_H, HAVE_MALLOC_H]: Check.
10046 [__MINGW32CE__] (strerror): New function.
10047 [__MINGW32CE__] (errno): Define to GetLastError.
10048 [__MINGW32CE__] (COUNTOF): New macro.
10049 (remote_open): Remove extra close call.
10050 * mem-break.c (delete_breakpoint_at): New function.
10051 * mem-break.h (delete_breakpoint_at): Declare.
10052 * remote-utils.c [HAVE_SYS_FILE_H, HAVE_SIGNAL_H,
10053 HAVE_FCNTL_H, HAVE_UNISTD_H, HAVE_ERRNO_H]: Check.
10054 [USE_WIN32API] (read, write): Add char* casts.
10055 * server.c [HAVE_UNISTD_H, HAVE_SIGNAL_H]: Check.
10056 * server.h: Include wincecompat.h on Windows CE.
10057 [HAVE_ERRNO_H]: Check.
10058 (perror): Declare if not declared.
10059 * utils.c: Add stdlib.h, errno.h and malloc.h includes.
10060 (perror_with_name): Remove errno declaration.
10061 * wincecompat.h: New.
10062 * wincecompat.c: New.
10063 * win32-low.h: New.
10064 * win32-arm-low.c: New.
10065 * win32-i386-low.c: New.
10066 (win32-low.c): Include mem-break.h and win32-low.h, and winnt.h.
10067 (OUTMSG2): Make it safe.
10068 (_T): New macro.
10069 (COUNTOF): New macro.
10070 (NUM_REGS): Get it from the low target.
10071 (CONTEXT_EXTENDED_REGISTERS, CONTEXT_FLOATING_POINT,
10072 CONTEXT_DEBUG_REGISTERS): Add fallbacks to 0.
10073 (thread_rec): Let low target handle debug registers.
10074 (child_add_thread): Likewise.
10075 (child_init_thread_list): Likewise.
10076 (continue_one_thread): Likewise.
10077 (regptr): New.
10078 (do_child_fetch_inferior_registers): Move to ...
10079 * win32-i386-low.c: ... here, and rename to ...
10080 (do_fetch_inferior_registers): ... this.
889bf7c5 10081 * win32-low.c (child_fetch_inferior_registers):
68070c10
PA
10082 Go through the low target.
10083 (do_child_store_inferior_registers): Use regptr.
10084 (strwinerror): New function.
10085 (win32_create_inferior): Handle Windows CE.
10086 Use strwinerror instead of strerror on Windows error
10087 codes. Add program to the error output.
10088 Don't close the main thread handle on Windows CE.
10089 (win32_attach): Use coredll.dll on Windows CE.
10090 (win32_kill): Close current process and current
10091 thread handles.
10092 (win32_detach): Use coredll.dll on Windows CE.
10093 (win32_resume): Let low target handle debug registers, and
10094 step request.
10095 (handle_exception): Add/Remove initial breakpoint. Avoid
10096 non-existant WSTOPSIG on Windows CE.
10097 (win32_read_inferior_memory): Cast to remove warning.
10098 (win32_arch_string): Go through the low target.
10099 (initialize_low): Call set_breakpoint_data with the low
10100 target's breakpoint.
10101 * win32-low.c (dr, FLAG_TRACE_BIT, FCS_REGNUM,
10102 FOP_REGNUM, mappings): Move to ...
10103 * win32-i386-low.c: ... here.
10104 * win32-low.c (win32_thread_info): Move to ...
10105 * win32-low.h: ... here.
10106 * Makefile.in (SFILES): Add win32-low.c, win32-i386-low.c,
10107 win32-arm-low.c and wincecompat.c.
10108 (all:): Add $EXEEXT.
10109 (install-only:): Likewise.
10110 (gdbserver:): Likewise.
10111 (gdbreplay:): Likewise.
10112 * config.in: Regenerate.
10113 * configure: Regenerate.
10114
41093d81
PA
101152007-03-28 Pedro Alves <pedro_alves@portugalmail.pt>
10116
10117 * win32-low.c: Rename typedef thread_info to
10118 win32_thread_info throughout.
10119
544afa54
PA
101202007-03-28 Pedro Alves <pedro_alves@portugalmail.pt>
10121
10122 * win32-i386-low.c: Rename to ...
10123 * win32-low.c: ... this.
10124 * configure.srv: Replace win32-i386-low.o with win32-low.o.
10125 * Makefile.in: Likewise.
10126
bce7165d
PA
101272007-03-27 Pedro Alves <pedro_alves@portugalmail.pt>
10128
10129 * remote-utils.c (monitor_output): Constify msg parameter.
10130 * server.h (monitor_output): Likewise.
10131 * win32-i386-low.c (handle_output_debug_string): New.
10132 (win32_kill): Handle OUTPUT_DEBUG_STRING_EVENT events using
10133 handle_output_debug_string.
10134 (get_child_debug_event): Likewise.
10135
506c7aa0
DJ
101362007-03-27 Mat Hostetter <mat@lcs.mit.edu>
10137
10138 * server.c (main): Correct strtoul check.
10139
42c81e2a
DJ
101402007-03-27 Jon Ringle <jon@ringle.org>
10141
10142 * linux-low.c: Check __ARCH_HAS_MMU__ also.
10143
9453113a
DJ
101442007-03-27 Brooks Moses <brooks.moses@codesourcery.com>
10145
10146 * Makefile.in: Add dummy "pdf" and "install-pdf" targets.
10147
64a69107
DJ
101482007-02-27 Daniel Jacobowitz <dan@codesourcery.com>
10149
10150 * terminal.h: Check HAVE_SGTTY_H.
10151
101522007-02-27 Mat Hostetter <mat@lcs.mit.edu>
6f8486da
DJ
10153
10154 * remote-utils.c (remote_open): Print out the assigned port number.
10155
c74d0ad8
DJ
101562007-02-26 Daniel Jacobowitz <dan@codesourcery.com>
10157
10158 * remote-utils.c (monitor_output): New function.
10159 * server.c (debug_threads): Define here.
10160 (monitor_show_help): New function.
10161 (handle_query): Handle qRcmd.
10162 (main): Do not handle 'd' packet.
10163 * server.h (debug_threads, remote_debug, monitor_output): Declare.
10164 * linux-low.c, spu-low.c, win32-i386-low.c: Remove definitions
10165 of debug_threads.
10166
de7c3b4a
PA
101672007-02-25 Pedro Alves <pedro_alves@portugalmail.pt>
10168
10169 * Makefile.in (EXEEXT): New.
10170 (clean): Use $(EXEEXT).
10171
ef57601b
PA
101722007-02-25 Pedro Alves <pedro_alves@portugalmail.pt>
10173
10174 * target.h (target_ops): Rename send_signal to request_interrupt,
10175 and remove enum target_signal parameter.
10176 * linux-low.c (linux_request_interrupt): Rename from
10177 linux_send_signal, and always send SIGINT.
10178 * spu-low.c (spu_request_interrupt): Rename from spu_send_signal,
10179 and always send SIGINT.
10180 * remote-utils.c (putpkt_binary): Call request_interrupt, instead
10181 of send_signal.
10182 (input_interrupt): Likewise.
10183
820f2bda
PA
101842007-02-25 Pedro Alves <pedro_alves@portugalmail.pt>
10185
10186 * server.c (get_features_xml): Check if target implemented
10187 arch_string.
10188 * win32-i386-low.c (win32_arch_string): New.
10189 (win32_target_ops): Add win32_arch_string as arch_string member.
10190
ab39bf24
UW
101912007-02-22 Markus Deuling <deuling@de.ibm.com>
10192
10193 * spu-low.c (spu_arch_string): New.
10194 (spu_target_ops): Add spu_arch_string.
10195
61ff6e04
DJ
101962007-02-16 Daniel Jacobowitz <dan@codesourcery.com>
10197
10198 * remote-utils.c: Remove HAVE_TERMINAL_H check.
10199 * configure.ac: Do not check for terminal.h.
10200 * configure, config.in: Regenerated.
10201
fb1e4ffc
DJ
102022007-02-08 Daniel Jacobowitz <dan@codesourcery.com>
10203
10204 * Makefile.in (OBS): Add $(XML_BUILTIN).
10205 (XML_DIR, XML_TARGET, XML_FILES, XML_BUILTIN): New.
10206 (clean): Update.
10207 (target.xml, xml-builtin.c, stamp-xml, arm-with-iwmmxt.o)
10208 (arm-with-iwmmxt.c): New.
10209 * config.in, configure: Regenerate.
10210 * configure.ac: Check for iWMMXt. Handle srv_xmltarget,
10211 srv_xmlbuiltin, and srv_xmlfiles. Define USE_XML.
10212 * configure.srv: Mention srv_xmltarget and srv_xmlfiles.
10213 (arm*-*-linux*): Add iWMMXt and regset support.
10214 * linux-arm-low.c (PTRACE_GETWMMXREGS, PTRACE_SETWMMXREGS): Define.
10215 (arm_fill_gregset, arm_store_gregset, arm_fill_wmmxregset)
10216 (arm_store_wmmxregset, target_regsets): New.
10217 * server.c (get_features_xml): Take annex argument. Check builtin
10218 XML documents.
10219 (handle_query): Handle multiple annexes.
10220
0f48aa01
DJ
102212007-01-29 Daniel Jacobowitz <dan@codesourcery.com>
10222
10223 * remote-utils.c [USE_WIN32API] (read, write): Define.
10224 (putpkt_binary, input_interrupt, readchar, getpkt): Use read and
10225 write.
10226
23181151
DJ
102272007-01-09 Daniel Jacobowitz <dan@codesourcery.com>
10228
10229 * linux-i386-low.c (the_low_target): Set arch_string.
10230 * linux-x86-64-low.c (the_low_target): Likewise.
10231 * linux-low.c (linux_arch_string): New.
10232 (linux_target_ops): Add it.
10233 * linux-low.h (struct linux_target_ops): Add arch_string.
10234 * server.c (write_qxfer_response): Use const void * for DATA.
10235 (get_features_xml): New.
10236 (handle_query): Handle qXfer:features:read. Report it for qSupported.
10237 * target.h (struct target_ops): Add arch_string method.
10238
9d606399
DJ
102392007-01-03 Denis Pilat <denis.pilat@st.com>
10240 Daniel Jacobowitz <dan@codesourcery.com>
10241
10242 * linux-low.c (linux_kill): Handle being called with no threads.
10243 * win32-i386-low.c (win32_kill): Likewise.
10244 (get_child_debug_event): Clear current_process_handle.
10245
102462006-12-30 Denis PILAT <denis.pilat@st.com>
8264bb58
DJ
10247 Daniel Jacobowitz <dan@codesourcery.com>
10248
10249 * remote-utils.c (remote_open): Check the type of specified
10250 serial port devices before opening them.
10251 * server.c (main): Kill the inferior if an error occurs during
10252 the first remote_open.
10253
a5e13d24
DJ
102542006-12-05 Markus Deuling <deuling@de.ibm.com>
10255
10256 * README: Update supported targets.
10257
186947f7
DJ
102582006-11-28 Daniel Jacobowitz <dan@codesourcery.com>
10259
10260 * Makefile.in (clean): Remove reg-mips64.c.
10261 (reg-mips64.c, reg-mips64.o): New rules.
10262 * configure.srv: Handle mips64. Include regset support for mips.
10263 * linux-mips-low.c (union mips_register): New.
10264 (mips_get_pc, mips_set_pc, mips_reinsert_addr): Use it.
10265 (mips_breakpoint, mips_breakpoint_at): Use int.
10266 (mips_collect_register, mips_supply_register)
10267 (mips_collect_register_32bit, mips_supply_register_32bit)
10268 (mips_fill_gregset, mips_store_gregset, mips_fill_fpregset)
10269 (mips_store_fpregset, target_regsets): New.
10270 * thread-db.c (thread_db_get_tls_address): Use uintptr_t.
10271
a13e2c95
UW
102722006-11-22 Ulrich Weigand <uweigand@de.ibm.com>
10273
10274 * configure.srv: Add target "spu*-*-*".
10275 * Makefile.in (clean): Remove reg-spu.c.
10276 (reg-spu.c, reg-spu.o, spu-low.o): Add dependencies.
10277 * spu-low.c: New file.
10278
cb7283db
DJ
102792006-11-16 Daniel Jacobowitz <dan@codesourcery.com>
10280
10281 * configure.ac: Correct td_thr_tls_get_addr test.
10282 * configure: Regenerated.
10283
89be2091
DJ
102842006-11-16 Daniel Jacobowitz <dan@codesourcery.com>
10285
10286 * linux-low.c (linux_wait_for_event): Reformat. Use the
10287 pass_signals array.
10288 * remote-utils.c (decode_address_to_semicolon): New.
10289 * server.c (pass_signals, handle_general_set): New.
10290 (handle_query): Mention QPassSignals for qSupported.
10291 (main): Call handle_general_set.
10292 * server.h (pass_signals, decode_address_to_semicolon): New.
10293
000ef4f0
DJ
102942006-11-06 Daniel Jacobowitz <dan@codesourcery.com>
10295
10296 * server.c (handle_query): Correct error handling for read_auxv.
10297
b7149293
UW
102982005-10-19 Ulrich Weigand <uweigand@de.ibm.com>
10299
10300 * configure.srv [s390-*-linux*, s390x-*-linux*]: Set srv_linux_regsets
10301 and srv_linux_thread_db to yes.
10302 * linux-s390-low.c (s390_fill_gregset): New function.
10303 (target_regsets): Define data structure.
10304
dae5f5cf
DJ
103052006-10-17 Daniel Jacobowitz <dan@codesourcery.com>
10306
10307 * acinclude.m4 (SRV_CHECK_TLS_GET_ADDR): New.
10308 * configure.ac: Use it. Define HAVE_TD_THR_TLS_GET_ADDR.
10309 * config.in, configure: Regenerated.
10310 * inferiors.c (gdb_id_to_thread): New function.
10311 (gdb_id_to_thread_id): Use it.
10312 * linux-low.c (linux_target_ops): Use thread_db_get_tls_address.
10313 * linux-low.h (struct process_info): Add th member.
10314 (thread_db_get_tls_address): New prototype.
10315 * remote-utils.c (decode_address): Make non-static.
10316 * server.c (handle_query): Handle qGetTLSAddr.
10317 * server.h (gdb_id_to_thread, decode_address): New prototypes.
10318 * target.h (struct target_ops): Add get_tls_address.
10319 * thread-db.c (maybe_attach_thread): Save the thread handle.
10320 (thread_db_get_tls_address): New.
10321
32ca6d61
DJ
103222006-09-28 Daniel Jacobowitz <dan@codesourcery.com>
10323
10324 * linux-low.c (PTRACE_GETSIGINFO, PTRACE_SETSIGINFO): Define.
10325 (linux_resume_one_process): Take a siginfo_t *. Update all
10326 callers. Queue it if necessary. Use PTRACE_SETSIGINFO.
10327 (struct pending_signals): Add a siginfo_t.
10328 (linux_wait_for_process): Always set last_status.
10329 (linux_wait_for_event): Use PTRACE_GETSIGINFO.
10330 (linux_queue_one_thread): Use PTRACE_GETSIGINFO.
10331 * linux-low.h (struct process_info): Add last_status.
10332
5ffff7c1
DJ
103332006-09-21 Daniel Jacobowitz <dan@codesourcery.com>
10334
10335 * remote-utils.c (try_rle): New function.
10336 (putpkt_binary): Use it.
10337
8695c747
DJ
103382006-08-19 Daniel Jacobowitz <dan@codesourcery.com>
10339
10340 * Makefile.in (clean): Clean reg-x86-64-linux.c.
10341 (reg-x86-64-linux.o, reg-x86-64-linux.c): New.
10342 * configure.srv (x86_64-*-linux*): Use reg-x86-64-linux.o.
10343 * linux-x86-64-low.c (x86_64_regmap): Include ORIG_RAX.
10344 (x86_64_fill_gregset, x86_64_store_gregset): Skip floating
10345 point registers.
10346
290fadea
RS
103472006-08-08 Richard Sandiford <richard@codesourcery.com>
10348
10349 * server.c (terminal_fd): New variable.
10350 (old_foreground_pgrp): Likewise.
10351 (restore_old_foreground_pgrp): New function.
10352 (start_inferior): Record the terminal file descriptor in terminal_fd
10353 and its original foreground group in old_foreground_pgrp. Register
10354 restore_old_foreground_pgrp with atexit().
10355
9f2e1e63
DJ
103562006-07-26 Daniel Jacobowitz <dan@codesourcery.com>
10357
10358 * server.c (handle_query): Correct qPart to qXfer.
10359
b80864fb
DJ
103602006-07-22 Daniel Jacobowitz <dan@codesourcery.com>
10361
10362 * configure.ac: Check for more headers which are missing on
10363 Windows. Automatically supply -lwsock32 and USE_WIN32API.
10364 * configure.srv: Add Cygwin and mingw32.
10365 * remote-utils.c: Don't include headers unconditionally which
10366 are missing on mingw32. Include <winsock.h> for mingw32.
10367 (remote_open): Adjust for mingw32 support. Flush
10368 standard error after writing to it.
10369 (remote_close, putpkt_binary, input_interrupt, block_async_io)
10370 (unblock_async_io, enable_async_io, disable_async_io)
10371 (readchar, getpkt): Update for Winsock support.
10372 (prepare_resume_reply): Expect a protocol signal number.
10373 * server.c: Disable <sys/wait.h> on mingw32.
10374 (start_inferior): Adjust for mingw32 support. Flush
10375 standard error after writing to it.
10376 (attach_inferior): Likewise. Use protocol signal
10377 numbers.
10378 (main): Skip 'D' packet on mingw32. Use protocol signal numbers
10379 and names.
10380 * win32-i386-low.c: New file.
10381 * Makefile.in (XM_CLIBS): Set.
10382 (gdbserver, gdbreplay): Use $(INTERNAL_CFLAGS).
10383 (win32-i386-low.o): New dependency rule.
10384 * linux-low.c (linux_wait): Use target signal numbers.
10385 * target.h (struct target_ops): Doc fix.
10386 * server.h (target_signal_to_name): New prototype.
10387 * gdbreplay.c: Don't include headers unconditionally which
10388 are missing on mingw32. Include <winsock.h> for mingw32.
10389 (remote_close, remote_open): Adjust for Winsock support.
10390 * configure, config.in: Regenerated.
10391
0876f84a
DJ
103922006-07-12 Daniel Jacobowitz <dan@codesourcery.com>
10393
10394 * server.c (decode_xfer_read, write_qxfer_response): New.
10395 (handle_query): Take a packet length argument. Handle
10396 qXfer:auxv:read instead of qPart:auxv:read. Mention it in
10397 the qSupported response.
10398 (main): Update call to handle_query.
10399
01f9e8fa
DJ
104002006-06-22 Daniel Jacobowitz <dan@codesourcery.com>
10401
10402 * remote-utils.c (remote_escape_output, remote_unescape_input): New.
10403 (putpkt_binary): Renamed from putpkt and adjusted for binary
10404 data.
10405 (putpkt): New wrapper for putpkt_binary.
10406 (readchar): Don't mask off the high bit.
10407 (decode_X_packet): New function.
10408 * server.c (main): Call putpkt_binary if a handler sets the packet
10409 length. Save the length of the incoming packet. Handle 'X'.
10410 * server.h (gdb_byte, remote_escape_output, decode_X_packet): New.
10411
be2a5f71
DJ
104122006-06-21 Daniel Jacobowitz <dan@codesourcery.com>
10413
10414 * server.c (handle_query): Handle qSupported.
10415
ea025f5f
DJ
104162006-05-30 Daniel Jacobowitz <dan@codesourcery.com>
10417
10418 * remote-utils.c (all_symbols_looked_up): New variable.
10419 (look_up_one_symbol): Check it.
10420 * server.h (look_up_one_symbol): New declaration.
10421 * thread-db.c (thread_db_init): Set all_symbols_looked_up.
10422
9308fc88
DJ
104232006-05-30 Daniel Jacobowitz <dan@codesourcery.com>
10424
10425 * Makefile.in (linux-arm-low.o): Update dependencies.
66f338c7 10426 * linux-arm-low.c: Include "gdb_proc_service.h".
9308fc88
DJ
10427 (PTRACE_GET_THREAD_AREA): Define.
10428 (ps_get_thread_area): New function.
10429
52fb6437
NS
104302006-05-09 Nathan Sidwell <nathan@codesourcery.com>
10431
10432 * configure.srv (m68k*-*-uclinux*): New target.
10433 * linux-low.c (linux_create_inferior): Use vfork on mmuless systems.
10434 (linux_resume_one_process): Remove extraneous cast.
10435 (linux_read_offsets): New.
10436 (linux_target_op): Add linux_read_offsets on mmuless systems.
10437 * server.c (handle_query): Add qOffsets logic.
10438 * target.h (struct target_ops): Add read_offsets.
10439
21b0f40c
DJ
104402006-03-15 Daniel Jacobowitz <dan@codesourcery.com>
10441
10442 * linux-mips-low.c: Include <sys/ptrace.h> and "gdb_proc_service.h".
10443 (PTRACE_GET_THREAD_AREA): Define.
10444 (ps_get_thread_area): New function.
10445 * Makefile.in (linux-i386-low.o, linux-mips-low.o)
10446 (linux-x86-64-low.o): Update.
10447
0050a760
DJ
104482006-03-15 Daniel Jacobowitz <dan@codesourcery.com>
10449
10450 * configure.ac: Remove checks for prfpregset_t.
10451 * gdb_proc_service.h: New file.
10452 * linux-i386-low.c, linux-x86-64-low.c, thread-db.c: Use the
10453 new "gdb_proc_service.h".
10454 * proc-service.c: Likewise.
10455 (ps_pglobal_lookup, ps_pdread, ps_pdwrite): Use psaddr_t.
10456 (ps_lgetfpregs, ps_lsetfpregs): Use a void* argument.
10457 * Makefile.in (gdb_proc_service_h): Updated.
10458 * configure, config.in: Regenerated.
10459
b92a518e
DJ
104602006-03-03 Daniel Jacobowitz <dan@codesourcery.com>
10461
10462 * remote-utils.c (prepare_resume_reply): Move declaration
10463 of gdb_id_from_wait to the top of the block.
10464
545587ee
DJ
104652006-02-15 Daniel Jacobowitz <dan@codesourcery.com>
10466
10467 * linux-low.c (regsets_store_inferior_registers): Read the regset
10468 from the target before filling it.
10469
9db87ebd
DJ
104702006-02-08 Daniel Jacobowitz <dan@codesourcery.com>
10471
10472 * server.c (attach_inferior): Return SIGTRAP for a successful
10473 attach.
10474
dd24457d
DJ
104752006-02-01 Daniel Jacobowitz <dan@codesourcery.com>
10476
10477 * Makefile.in (OBS): Add version.o.
10478 (STAGESTUFF): Delete.
10479 (version.o): Add dependencies.
10480 (version.c): Replace rule.
10481 (clean): Remove version.c.
10482 * server.c (gdbserver_version): New.
10483 (gdbserver_usage): Use printf.
10484 (main): Handle --version and --help.
10485 * server.h (version, host_name): Add declarations.
10486
6f0f660e
EZ
104872005-12-23 Eli Zaretskii <eliz@gnu.org>
10488
889bf7c5
PA
10489 * linux-arm-low.c:
10490 * linux-arm-low.c:
10491 * inferiors.c:
10492 * i387-fp.h:
10493 * i387-fp.c:
10494 * gdbreplay.c:
10495 * regcache.c:
10496 * proc-service.c:
10497 * mem-break.h:
10498 * mem-break.c:
10499 * linux-x86-64-low.c:
10500 * linux-sh-low.c:
10501 * linux-s390-low.c:
10502 * linux-ppc64-low.c:
10503 * linux-ppc-low.c:
10504 * linux-mips-low.c:
10505 * linux-m68k-low.c:
10506 * linux-m32r-low.c:
10507 * linux-low.h:
10508 * linux-low.c:
10509 * linux-ia64-low.c:
10510 * linux-i386-low.c:
10511 * linux-crisv32-low.c:
10512 * thread-db.c:
10513 * terminal.h:
10514 * target.h:
10515 * target.c:
10516 * server.h:
10517 * server.c:
10518 * remote-utils.c:
10519 * regcache.h:
10520 * utils.c:
10521 * Makefile.in:
10522 * configure.ac:
6f0f660e
EZ
10523 * gdbserver.1: Add (C) after Copyright. Update the FSF
10524 address.
10525
9d1fb177
DJ
105262005-11-13 Daniel Jacobowitz <dan@codesourcery.com>
10527
10528 * linux-arm-low.c (arm_eabi_breakpoint): New variable.
10529 (arm_breakpoint_at): Recognize both breakpoints.
10530 (the_low_target): Use the correct breakpoint instruction.
10531
011a70c2
DJ
105322005-11-02 Daniel Jacobowitz <dan@codesourcery.com>
10533
10534 * configure.srv (x86_64-*-linux*): Turn on thread_db support.
10535 * linux-x86-64-low.c (x86_64_breakpoint, x86_64_breakpoint_len)
10536 (x86_64_get_pc, x86_64_set_pc, x86_64_breakpoint_at): New.
10537 (the_low_target): Update.
10538
7fb85e41
AS
105392005-10-25 Andreas Schwab <schwab@suse.de>
10540
10541 * server.c (main): Allocate mem_buf with PBUFSIZ bytes.
10542
10543 * linux-ia64-low.c (ia64_regmap): Remove NAT registers.
10544 (ia64_num_regs): Reduce to 462.
10545
3db0444b
DJ
105462005-09-17 Daniel Jacobowitz <dan@codesourcery.com>
10547
10548 * acinclude.m4: Correct quoting.
10549 * aclocal.m4: Regenerated.
10550
10551 Suggested by SZOKOVACS Robert <szo@ies.hu>:
10552 * thread-db.c (thread_db_err_str): Handle TD_VERSION.
10553 (thread_db_init): Call thread_db_err_str.
10554 * configure.ac: Check for TD_VERSION.
10555 * config.in, configure: Regenerated.
10556
bee0189a
DJ
105572005-07-31 Kaveh R. Ghazi <ghazi@caip.rutgers.edu>
10558
10559 * server.h (error, fatal, warning): Add ATTR_FORMAT.
10560
e9d25b98
DJ
105612005-07-13 Daniel Jacobowitz <dan@codesourcery.com>
10562
10563 * configure.ac: Define HAVE_LINUX_REGSETS even if PTRACE_GETREGS
10564 is not available. Define HAVE_PTRACE_GETREGS if it is.
10565 * config.in, configure: Regenerated.
10566 * configure.srv: Set srv_linux_regsets for PowerPC and PowerPC64.
10567 * linux-i386-low.c, linux-m68k-low.c: Update to use
10568 HAVE_PTRACE_GETREGS.
10569 * linux-low.c (regsets_fetch_inferior_registers)
10570 (regsets_store_inferior_registers): Only return 0 if we processed
10571 GENERAL_REGS.
10572 * linux-ppc-low.c (ppc_fill_gregset, target_regsets): New.
10573 * linux-ppc64-low.c (ppc_fill_gregset, target_regsets): New.
10574
a06660f7
DJ
105752005-07-13 Daniel Jacobowitz <dan@codesourcery.com>
10576
10577 * inferiors.c (struct thread_info): Add gdb_id.
10578 (add_thread): Add gdb_id argument.
10579 (thread_id_to_gdb_id, thread_to_gdb_id, gdb_id_to_thread_id): New.
10580 * linux-low.c (linux_create_inferior, linux_attach_lwp): Update
10581 calls to add_thread.
10582 * remote-utils.c (prepare_resume_reply: Use thread_to_gdb_id.
10583 * server.c (handle_query): Use thread_to_gdb_id.
10584 (handle_v_cont, main): Use gdb_id_to_thread_id.
10585 * server.h (add_thread): Update prototype.
10586 (thread_id_to_gdb_id, thread_to_gdb_id, gdb_id_to_thread_id): New
10587 prototypes.
10588
5a1f5858
DJ
105892005-07-13 Daniel Jacobowitz <dan@codesourcery.com>
10590
10591 * linux-low.c (fetch_register, usr_store_inferior_registers): Handle
10592 left-padded registers.
10593 * linux-low.h (struct linux_target_ops): Add left_pad_xfer.
10594 * linux-ppc64-low.c (the_low_target): Set left_pad_xfer.
10595
e122f1f5
SE
105962005-07-01 Steve Ellcey <sje@cup.hp.com>
10597
10598 * configure.ac (BFD_NEED_DECLARATION): Replace with AC_CHECK_DECLS.
10599 * configure: Regenerate.
10600 * config.in: Regenerate.
10601 * server.h (NEED_DECLARATION_STRERROR):
10602 Replace with !HAVE_DECL_STRERROR.
10603
d592fa2f
DJ
106042005-06-16 Daniel Jacobowitz <dan@codesourcery.com>
10605
10606 * linux-low.c (linux_wait, linux_send_signal): Don't test
10607 an unsigned long variable for > 0 if it could be MAX_ULONG.
10608 * server.c (myresume): Likewise.
10609 * target.c (set_desired_inferior): Likewise.
10610
ccbd4912
MK
106112005-06-13 Mark Kettenis <kettenis@gnu.org>
10612
10613 * configure.ac: Simplify and improve check for socklen_t.
10614 * configure, config.in: Regenerate.
10615
f450004a
DJ
106162005-06-12 Daniel Jacobowitz <dan@codesourcery.com>
10617
10618 * acconfig.h: Remove.
10619 * configure.ac: Add a test for socklen_t. Use three-argument
10620 AC_DEFINE throughout.
10621 * config.in: Regenerated using autoheader 2.59.
10622 * configure: Regenerated.
10623
10624 * gdbreplay.c (socklen_t): Provide a default.
10625 (remote_open): Use socklen_t.
10626 * remote-utils.c (socklen_t): Provide a default.
10627 (remote_open): Use socklen_t.
10628 (convert_int_to_ascii, convert_ascii_to_int, decode_M_packet): Use
10629 unsigned char.
10630
10631 * i387-fp.c (struct i387_fsave, struct i387_fxsave): Use unsigned
10632 char for buffers.
10633 * linux-low.c (linux_read_memory, linux_write_memory)
10634 (linux_read_auxv): Likewise.
10635 * mem-break.c (breakpoint_data, set_breakpoint_data, check_mem_read)
10636 (check_mem_write): Likewise.
10637 * mem-break.h (set_breakpoint_data, check_mem_read, check_mem_write):
10638 Likewise.
10639 * regcache.c (struct inferior_rgcache_data, registers_to_string)
10640 (registers_from_string, register_data): Likewise.
10641 * server.c (handle_query, main): Likewise.
10642 * server.h (convert_ascii_to_int, convert_int_to_ascii)
10643 (decode_M_packet): Likewise.
10644 * target.c (read_inferior_memory, write_inferior_memory): Likewise.
10645 * target.h (struct target_ops): Update read_memory, write_memory,
10646 and read_auxv.
10647 (read_inferior_memory, write_inferior_memory): Update.
10648 * linux-low.h (struct linux_target_ops): Change type of breakpoint
10649 to unsigned char *.
10650 * linux-arm-low.c, linux-cris-low.c, linux-crisv32-low.c,
10651 linux-i386-low.c, linux-m32r-low.c, linux-m68k-low.c,
10652 linux-mips-low.c, linux-ppc-low.c, linux-ppc64-low.c,
10653 linux-s390-low.c, linux-sh-low.c: Update for changes in
10654 read_inferior_memory and the_low_target->breakpoint.
10655
eee84df1
DJ
106562005-05-28 Daniel Jacobowitz <dan@codesourcery.com>
10657
10658 * Makefile.in (SFILES): Add linux-ppc64-low.c.
10659 (linux-ppc64-low.o, reg-ppc64.c, reg-ppc64.o): New targets.
10660 * configure.srv: Add powerpc64-*-linux*.
10661 * linux-ppc64-low.c: New file.
10662
45b134e5
OF
106632005-05-23 Orjan Friberg <orjanf@axis.com>
10664
10665 * linux-cris-low.c: New file with support for CRIS.
10666 * linux-crisv32-low.c: Ditto for CRISv32.
10667 * Makefile.in (SFILES): Add linux-cris-low.c, linux-crisv32-low.c.
10668 (clean): Add reg-cris.c and reg-crisv32.c.
889bf7c5 10669 Add linux-cris-low.o, linux-crisv32-low.o, reg-cris.o, reg-cris.c,
45b134e5
OF
10670 reg-crisv32.o, and reg-crisv32.c to make rules.
10671 * configure.srv: Add cris-*-linux* and crisv32-*-linux* to list of
10672 recognized targets.
10673
48d93c75
UW
106742005-05-16 Ulrich Weigand <uweigand@de.ibm.com>
10675
10676 * linux-low.c (fetch_register): Ensure buffer size is a multiple
10677 of sizeof (PTRACE_XFER_TYPE).
10678 (usr_store_inferior_registers): Likewise. Zero out excess bytes.
10679
e013ee27
OF
106802005-05-12 Orjan Friberg <orjanf@axis.com>
10681
889bf7c5 10682 * target.h (struct target_ops): Add insert_watchpoint,
e013ee27
OF
10683 remove_watchpoint, stopped_by_watchpoint, stopped_data_address function
10684 pointers for hardware watchpoint support.
10685 * linux-low.h (struct linux_target_ops): Ditto.
10686 * linux-low.c (linux_insert_watchpoint, linux_remove_watchpoint)
10687 (linux_stopped_by_watchpoint, linux_stopped_data_address): New. Add
10688 to linux_target_ops.
10689 * remote-utils.c (prepare_resume_reply): Add watchpoint information to
10690 reply packet.
10691 * server.c (main): Recognize 'Z' and 'z' packets.
10692
b0ded00b
UW
106932005-05-10 Ulrich Weigand <uweigand@de.ibm.com>
10694
10695 * linux-s390-low.c (s390_breakpoint, s390_breakpoint_len): Define.
10696 (s390_get_pc, s390_set_pc, s390_breakpoint_at): New functions.
10697 (the_low_target): Add new members.
10698
8643e2ad
DJ
106992005-05-04 Daniel Jacobowitz <dan@codesourcery.com>
10700
10701 * proc-service.c (ps_lgetregs): Search all_processes instead of
10702 all_threads.
10703
fc620387
DJ
107042005-05-04 Daniel Jacobowitz <dan@codesourcery.com>
10705
10706 * server.c (start_inferior): Change return type to int.
10707 (attach_inferior): Change sigptr to int *.
10708 (handle_v_cont, handle_v_requests): Change signal to int *.
10709 (main): Change signal to int.
10710
107112005-04-15 Kei Sakamoto <sakamoto.kei@renesas.com>
7cfbc4a0
KI
10712
10713 * Makefile.in: Add linux-m32r-low.o, reg-m32r.c and reg-m32r.o.
10714 * configure.srv: Add m32r*-*-linux*.
10715 * linux-m32r-low.c: New file.
10716
e0e76420
DJ
107172005-03-04 Daniel Jacobowitz <dan@codesourcery.com>
10718
10719 * Makefile.in (stamp-h): Set CONFIG_HEADERS explicitly.
10720
a1928bad
DJ
107212005-03-03 Daniel Jacobowitz <dan@codesourcery.com>
10722
10723 * inferiors.c (change_inferior_id, add_thread, find_inferior_id):
10724 Take unsigned long arguments for PIDs.
10725 * linux-low.c (add_process, linux_attach_lwp, linux_attach)
10726 (linux_thread_alive, linux_wait_for_event, kill_lwp, send_sigstop)
10727 (wait_for_sigstop, linux_resume_one_process)
10728 (regsets_fetch_inferior_registers, linux_send_signal)
10729 (linux_read_auxv): Likewise. Update the types of variables holding
10730 PIDs. Update format string specifiers.
10731 * linux-low.h (struct process_info, linux_attach_lwp): Likewise.
10732 * remote-utils.c (prepare_resume_reply): Likewise.
10733 * server.c (cont_thread, general_thread, step_thread)
10734 (thread_from_wait, old_thread_from_wait, signal_pid): Change type to
10735 unsigned long.
10736 (handle_query): Update format specifiers.
10737 (handle_v_cont, main): Use strtoul for thread IDs.
10738 * server.h (struct inferior_list_entry): Use unsigned long for ID.
10739 (add_thread, find_inferior_id, change_inferior_id, cont_thread)
10740 (general_thread, step_thread, thread_from_wait)
10741 (old_thread_from_wait): Update.
10742 * target.h (struct thread_resume): Use unsigned long for THREAD.
10743 (struct target_ops): Use unsigned long for arguments to attach and
10744 thread_alive.
10745
dcdb98d2
DJ
107462005-02-24 Daniel Jacobowitz <dan@codesourcery.com>
10747
10748 * acinclude.m4: Include bfd/bfd.m4 directly.
10749 * configure.ac: Use AC_ARG_PROGRAM. Suggested by Aron Griffis
10750 <agriffis@toolchain.org>.
10751 * aclocal.m4, configure: Regenerated.
10752
bec39cab
AC
107532005-01-07 Andrew Cagney <cagney@gnu.org>
10754
10755 * configure.ac: Rename configure.in, require autoconf 2.59.
10756 * configure: Re-generate.
10757
434c4c77
DJ
107582004-12-08 Daniel Jacobowitz <dan@debian.org>
10759
10760 * acinclude.m4 (SRV_CHECK_THREAD_DB): Add ps_get_thread_area. Reset
10761 LIBS when finished.
10762 * aclocal.m4: Regenerated.
10763 * configure: Regenerated.
10764
db1d3e1b
AS
107652004-11-21 Andreas Schwab <schwab@suse.de>
10766
10767 * linux-m68k-low.c (m68k_num_gregs): Define.
10768 (m68k_fill_gregset, m68k_store_gregset, m68k_fill_fpregset)
10769 (m68k_store_fpregset, target_regsets) [HAVE_LINUX_REGSETS]: New.
10770 (m68k_breakpoint, m68k_breakpoint_len, m68k_get_pc, m68k_set_pc)
10771 (m68k_breakpoint_at): New. Add to the_low_target.
10772
10773 * configure.srv (m68*-*-linux*): Set srv_linux_regsets and
10774 srv_linux_thread_db to yes.
10775
43360365
JB
107762004-10-20 Joel Brobecker <brobecker@gnat.com>
10777
10778 * linux-x86-64-low.c (ARCH_SET_GS): Add definition if missing.
10779 (ARCH_SET_FS): Likewise.
10780 (ARCH_GET_FS): Likewise.
10781 (ARCH_GET_GS): Likewise.
10782
fd500816
DJ
107832004-10-16 Daniel Jacobowitz <dan@debian.org>
10784
10785 * linux-i386-low.c (ps_get_thread_area): New.
10786 * linux-x86-64-low.c (ps_get_thread_area): New.
10787 * linux-low.c: Include <sys/syscall.h>.
10788 (linux_kill_one_process): Don't kill the first thread here.
10789 (linux_kill): Kill the first thread here.
10790 (kill_lwp): New function.
10791 (send_sigstop, linux_send_signal): Use it.
10792 * proc-service.c: Clean up #ifdefs.
10793 (fpregset_info): Delete.
10794 (ps_lgetregs): Update and enable implementation.
10795 (ps_lsetregs, ps_lgetfpregs, ps_lsetfpregs): Remove disabled
10796 implementations.
10797 * remote-utils.c (struct sym_cache, symbol_cache): New.
10798 (input_interrupt): Print a clearer message.
10799 (async_io_enabled): New variable.
10800 (enable_async_io, disable_async_io): Use it. Update comments.
10801 (look_up_one_symbol): Use the symbol cache.
10802 * thread-db.c (thread_db_look_up_symbols): New function.
10803 (thread_db_init): Update comments. Call thread_db_look_up_symbols.
10804
f6de3c42
DJ
108052004-10-16 Daniel Jacobowitz <dan@debian.org>
10806
10807 * configure.in: Test for -rdynamic.
10808 * configure: Regenerated.
10809 * Makefile (INTERNAL_LDFLAGS): New.
10810 (gdbserver, gdbreplay): Use it.
10811
2c0fc042
AC
108122004-09-02 Andrew Cagney <cagney@gnu.org>
10813
10814 * Makefile.in (TAGS): Replace TM_FILE with DEPRECATED_TM_FILE.
10815
075b3282
DJ
108162004-03-23 Daniel Jacobowitz <drow@mvista.com>
10817
10818 * linux-low.c (linux_wait): Clear all_processes list also.
10819
fa6a77dc
DJ
108202004-03-12 Daniel Jacobowitz <drow@mvista.com>
10821
10822 * linux-low.c: Include <errno.h>. Remove extern declaration of
10823 errno.
10824
6d782a97
DJ
108252004-03-12 Daniel Jacobowitz <drow@mvista.com>
10826
10827 * gdbreplay.c, server.h, utils.c: Update copyright years.
10828
3a7fb99b
DJ
108292004-03-04 Nathan J. Williams <nathanw@wasabisystems.com>
10830
10831 * server.c (main): Print child status or termination signal from
10832 variable 'signal', not 'sig'.
10833
c3e735a6
DJ
108342004-03-04 Nathan J. Williams <nathanw@wasabisystems.com>
10835
10836 * linux-low.c (linux_read_memory): Change return type to
10837 int. Check for and return error from ptrace().
10838 * target.c (read_inferior_memory): Change return type to int. Pass
10839 back return status from the_target->read_memory().
10840 * target.h (struct target_ops): Adapt *read_memory() prototype.
10841 Update comment.
10842 (read_inferior_memory): Adapt prototype.
10843 * server.c (main): Return an error packet if
10844 read_inferior_memory() returns an error.
10845
a59d1c82
DJ
108462004-03-04 Daniel Jacobowitz <drow@mvista.com>
10847
10848 * Makefile.in (distclean): Remove config.h, stamp-h, and config.log.
10849 Unify with other clean targets.
10850
dc3f8883
DJ
108512004-02-29 Daniel Jacobowitz <drow@mvista.com>
10852
10853 * server.c (handle_v_cont): Call set_desired_inferior.
10854
89a208da
DJ
108552004-02-29 Daniel Jacobowitz <drow@mvista.com>
10856
10857 * remote-utils.c (prepare_resume_reply): Always supply "thread:".
10858
62ea82f5
DJ
108592004-02-29 Daniel Jacobowitz <drow@mvista.com>
10860
10861 * linux-low.c (linux_wait): Unblock async I/O.
10862 (linux_resume): Block and enable async I/O.
10863 * remote-utils.c (block_async_io, unblock_async_io): New functions.
10864 * server.h (block_async_io, unblock_async_io): Add prototypes.
10865
6910d122
DJ
108662004-02-29 Daniel Jacobowitz <drow@mvista.com>
10867
10868 * remote-utils.c (remote_open): Print a status notice after
10869 opening a TCP port.
10870 * server.c (attach_inferior): Print a status notice after
10871 attaching.
10872
108732004-02-29 Daniel Jacobowitz <drow@mvista.com>
d677d77d
DJ
10874
10875 * linux-arm-low.c (arm_get_pc): Print out stop PC in debug mode.
10876
c89dc5d4
DJ
108772004-02-26 Daniel Jacobowitz <drow@mvista.com>
10878
10879 * remote-utils.c (write_enn): Use "E01" instead of "ENN" for the
10880 error packet.
10881 * server.c, target.h: Update copyright years.
10882
4b8dad4a
RM
108832004-02-25 Roland McGrath <roland@redhat.com>
10884
10885 * target.h (struct target_ops): New member `read_auxv'.
10886 * server.c (handle_query): Handle qPart:auxv:read: query using that.
10887 * linux-low.c (linux_read_auxv): New function.
10888 (linux_target_ops): Initialize `read_auxv' member to that.
10889
d7446758
JB
108902004-02-17 Ulrich Weigand <Ulrich.Weigand@de.ibm.com>
10891
10892 Committed by Jim Blandy <jimb@redhat.com>.
10893
10894 * linux-s390-low.c (s390_num_regs): Update.
4b8dad4a 10895 (s390_regmap): Remove control registers. Use __s390x__ predefine
d7446758
JB
10896 instead of GPR_SIZE to distiguish s390 and s390x targets.
10897
5544ad89
DJ
108982004-01-31 Daniel Jacobowitz <drow@mvista.com>
10899
10900 * linux-low.c: Update copyright year.
10901 (check_removed_breakpoint): Clear pending_is_breakpoint.
10902 (linux_set_resume_request, linux_queue_one_thread)
10903 (resume_status_pending_p): New functions.
10904 (linux_continue_one_thread): Use process->resume.
10905 (linux_resume): Only resume threads if there are no pending events.
10906 * linux-low.h (struct process_info): Add resume request
10907 pointer.
10908
2a68b70e
DJ
109092004-01-30 Daniel Jacobowitz <drow@mvista.com>
10910
10911 * regcache.c (new_register_cache): Clear the allocated register
10912 buffer. Suggested by Atsushi Nemoto <anemo@mba.ocn.ne.jp>.
10913
64386c31
DJ
109142003-10-13 Daniel Jacobowitz <drow@mvista.com>
10915
10916 * linux-low.c (linux_resume): Take a struct thread_resume *
10917 argument.
10918 (linux_wait): Update call.
10919 (resume_ptr): New static variable.
10920 (linux_continue_one_thread): Renamed from
10921 linux_continue_one_process. Use resume_ptr.
10922 (linux_resume): Use linux_continue_one_thread.
10923 * server.c (handle_v_cont, handle_v_requests): New functions.
10924 (myresume): New function.
10925 (main): Handle 'v' case.
10926 * target.h (struct thread_resume): New type.
10927 (struct target_ops): Change argument of "resume" to struct
10928 thread_resume *.
10929 (myresume): Delete macro.
10930
c938e9b0
L
109312003-08-08 H.J. Lu <hongjiu.lu@intel.com>
10932
10933 * Makefile.in (install-only): Create dest dir. Support DESTDIR.
10934 (uninstall): Support DESTDIR.
10935
7f313d07
BC
10936Mon Jul 21 20:09:34 UTC 2003 Brendan Conoboy <blc@redhat.com>
10937
10938 * configure.srv: Add xscale*linux copy of arm*linux entry.
10939
3b2fc2ea
DJ
109402003-07-24 Daniel Jacobowitz <drow@mvista.com>
10941
10942 * linux-arm-low.c (arm_reinsert_addr): New function.
10943 (the_low_target): Add arm_reinsert_addr.
10944
1c0a559e
MK
109452003-07-08 Mark Kettenis <kettenis@gnu.org>
10946
10947 * mem-break.c: Remove whitespace at end of file.
10948
43d5792c
DJ
109492003-06-28 Daniel Jacobowitz <drow@mvista.com>
10950
10951 * configure.in: Check whether we need to prototype strerror.
10952 * server.h: Optionally prototype strerror.
10953 * gdbreplay.c (perror_with_name): Use strerror.
10954 * linux-low.c (linux_attach_lwp): Use strerror.
10955 * utils.c (perror_with_name): Use strerror.
10956 * config.in, configure: Regenerated.
10957
c8a86edf
DJ
109582003-06-28 Daniel Jacobowitz <drow@mvista.com>
10959
10960 * linux-sh-low.c (sh_regmap): Fix FP register offsets, reported by
10961 SUGIOKA Toshinobu <sugioka@itonet.co.jp>.
10962
73d37363
DJ
109632003-06-20 Daniel Jacobowitz <drow@mvista.com>
10964
10965 * Makefile.in (SFILES): Update.
10966 * low-hppabsd.c, low-lynx.c, low-nbsd.c, low-sim.c, low-sparc.c,
10967 low-sun3.c: Remove files.
10968
6ad8ae5c
DJ
109692003-06-17 Daniel Jacobowitz <drow@mvista.com>
10970
10971 * linux-low.c: Move comment to linux_thread_alive where it belonged.
10972 (linux_detach_one_process, linux_detach): New functions.
10973 (linux_target_ops): Add linux_detach.
10974 * server.c (main): Handle 'D' packet.
10975 * target.h (struct target_ops): Add "detach" member.
10976 (detach_inferior): Define.
10977
1581182a
MK
109782003-06-13 Mark Kettenis <kettenis@gnu.org>
10979
10980 From Kelley Cook <kelleycook@wideopenwest.com>:
10981 * configure.srv: Accept i[34567]86 variants.
10982
e5379b03
DJ
109832003-06-05 Daniel Jacobowitz <drow@mvista.com>
10984
10985 * linux-low.c (linux_wait_for_event): Correct comment typos.
10986 (linux_resume_one_process): Call check_removed_breakpoint.
10987 (linux_send_signal): New function.
10988 (linux_target_ops): Add linux_send_signal.
10989 * remote-utils.c (putpkt, input_interrupt): Use send_signal instead
10990 of kill.
10991 * target.h (struct target_ops): Add send_signal.
10992
2ff29de4
JB
109932003-05-29 Jim Blandy <jimb@redhat.com>
10994
10995 * linux-low.c (usr_store_inferior_registers): Transfer buf in
10996 PTRACE_XFER_TYPE-sized chunks, not int-sized chunks. Otherwise,
10997 if 'int' is smaller than PTRACE_XFER_TYPE, you end up throwing
10998 away part of the register's value.
10999
254787d4
DJ
110002003-03-26 Daniel Jacobowitz <drow@mvista.com>
11001
11002 * linux-low.c (linux_create_inferior): Use __SIGRTMIN.
11003 (linux_wait_for_event, linux_init_signals): Likewise.
11004
94e10508
DJ
110052003-03-17 Daniel Jacobowitz <drow@mvista.com>
11006
11007 * configure.in: Check for stdlib.h.
11008 * configure: Regenerated.
11009 * config.in: Regenerated.
11010
4c0711e0
DJ
110112003-01-04 Andreas Schwab <schwab@suse.de>
11012
11013 * linux-m68k-low.c (m68k_num_regs): Define to 29 instead of 31.
11014
ef66e766
AC
110152003-01-02 Andrew Cagney <ac131313@redhat.com>
11016
11017 * Makefile.in: Remove obsolete code.
11018
a1358604
DJ
110192002-11-20 Daniel Jacobowitz <drow@mvista.com>
11020
11021 * linux-s390-low.c (s390_regmap): Check GPR_SIZE instead of
11022 defined(PT_FPR0_HI).
11023
23ce3b1c
DJ
110242002-11-17 Stuart Hughes <seh@zee2.com>
11025
11026 * linux-arm-low.c (arm_num_regs): Increase.
11027 (arm_regmap): Include status register.
11028
110292002-11-17 Daniel Jacobowitz <drow@mvista.com>
11030
11031 * linux-low.c (register_addr): Remove incorrect -1 check.
11032
a9fa9f7d
DJ
110332002-08-29 Daniel Jacobowitz <drow@mvista.com>
11034
11035 * linux-low.c (linux_create_inferior): Call setpgid. Return
11036 the new PID.
11037 (unstopped_p, linux_signal_pid): Remove.
11038 (linux_target_ops): Remove linux_signal_pid.
11039 * remote-utils.c (putpkt, input_interrupt): Use signal_pid
11040 global instead of target method.
11041 * target.h (struct target_ops): Remove signal_pid. Update comment
11042 for create_inferior.
11043 * server.c (signal_pid): New variable.
11044 (create_inferior): Set signal_pid. Block SIGTTOU and SIGTTIN in
4b8dad4a 11045 gdbserver. Set the child to be the foreground process group.
a9fa9f7d
DJ
11046 (attach_inferior): Set signal_pid.
11047
17574093
DJ
110482002-08-23 Daniel Jacobowitz <drow@mvista.com>
11049
11050 * ChangeLog: New file, with entries from gdb/ChangeLog after GDB 5.2.
11051
110522002-08-20 Jim Blandy <jimb@redhat.com>
11053
11054 * Makefile.in (LDFLAGS): Allow the configure script to establish a
11055 default for this.
11056
110572002-08-01 Andrew Cagney <cagney@redhat.com>
11058
11059 * Makefile.in: Make chill references obsolete.
11060
110612002-07-24 Kevin Buettner <kevinb@redhat.com>
11062
11063 * configure.in (unistd.h): Add to AC_CHECK_HEADERS list.
11064 * configure: Regenerate.
11065 * config.in: Regenerate.
11066
110672002-07-09 David O'Brien <obrien@FreeBSD.org>
11068
11069 * gdbreplay.c (stdlib.h, unistd.h): Conditionaly include.
11070 (perror_with_name, remote_close, remote_open, expect, play): Static.
11071
110722002-07-04 Michal Ludvig <mludvig@suse.cz>
11073
4b8dad4a 11074 * linux-x86-64-low.c (x86_64_regmap): Make it an array of
17574093
DJ
11075 byte offsets instead of an array of indexes.
11076 (x86_64_store_gregset, x86_64_store_fpregset): Parameter made const.
11077
110782002-06-13 Daniel Jacobowitz <drow@mvista.com>
11079
11080 * regcache.c: Add comment.
11081
110822002-06-11 Daniel Jacobowitz <drow@mvista.com>
11083
11084 * thread-db.c: New file.
11085 * proc-service.c: New file.
11086 * acinclude.m4: New file.
11087 * Makefile.in: Add GDBSERVER_LIBS, gdb_proc_service_h,
11088 proc-service.o, and thread-db.o.
11089 (linux-low.o): Add USE_THREAD_DB.
11090 * acconfig.h: Add HAVE_PRGREGSET_T, HAVE_PRFPREGSET_T,
11091 HAVE_LWPID_T, HAVE_PSADDR_T, and PRFPREGSET_T_BROKEN.
11092 * aclocal.m4: Regenerated.
11093 * config.in: Regenerated.
11094 * configure: Regenerated.
11095 * configure.in: Check for proc_service.h, sys/procfs.h,
11096 thread_db.h, and linux/elf.h headrs.
11097 Check for lwpid_t, psaddr_t, prgregset_t, prfpregset_t, and
11098 PRFPREGSET_T_BROKEN. Introduce srv_thread_depfiles and USE_THREAD_DB.
11099 Check for -lthread_db and thread support.
11100 * configure.srv: Enable thread_db support for ARM, i386, MIPS,
11101 PowerPC, and SuperH.
11102 * i387-fp.c: Constify arguments.
11103 * i387-fp.h: Likewise.
11104 * inferiors.c: (struct thread_info): Renamed from
11105 `struct inferior_info'. Remove PID member. Use generic inferior
11106 list header. All uses updated.
11107 (inferiors, signal_pid): Removed.
11108 (all_threads): New variable.
11109 (get_thread): Define.
11110 (add_inferior_to_list): New function.
11111 (for_each_inferior): New function.
11112 (change_inferior_id): New function.
11113 (add_inferior): Removed.
11114 (remove_inferior): New function.
11115 (add_thread): New function.
11116 (free_one_thread): New function.
11117 (remove_thread): New function.
11118 (clear_inferiors): Use for_each_inferior and free_one_thread.
11119 (find_inferior): New function.
11120 (find_inferior_id): New function.
11121 (inferior_target_data): Update argument type.
11122 (set_inferior_target_data): Likewise.
11123 (inferior_regcache_data): Likewise.
11124 (set_inferior_regcache_data): Likewise.
11125 * linux-low.c (linux_bp_reinsert): Remove.
11126 (all_processes, stopping_threads, using_thrads)
11127 (struct pending_signals, debug_threads, pid_of): New.
11128 (inferior_pid): Replace with macro.
11129 (struct inferior_linux_data): Remove.
11130 (get_stop_pc, add_process): New functions.
11131 (linux_create_inferior): Restore SIGRTMIN+1 before calling exec.
11132 Use add_process and add_thread.
11133 (linux_attach_lwp): New function, based on old linux_attach. Use
11134 add_process and add_thread. Set stop_expected for new threads.
11135 (linux_attach): New function.
11136 (linux_kill_one_process): New function.
11137 (linux_kill): Kill all LWPs.
11138 (linux_thread_alive): Use find_inferior_id.
11139 (check_removed_breakpoints, status_pending_p): New functions.
11140 (linux_wait_for_process): Renamed from linux_wait_for_one_inferior.
11141 Update. Use WNOHANG. Wait for cloned processes also. Update process
11142 struct for the found process.
11143 (linux_wait_for_event): New function.
11144 (linux_wait): Use it. Support LWPs.
11145 (send_sigstop, wait_for_sigstop, stop_all_processes)
11146 (linux_resume_one_process, linux_continue_one_process): New functions.
11147 (linux_resume): Support LWPs.
11148 (REGISTER_RAW_SIZE): Remove.
11149 (fetch_register): Use register_size instead. Call supply_register.
11150 (usr_store_inferior_registers): Likewise. Call collect_register.
11151 Fix recursive case.
11152 (regsets_fetch_inferior_registers): Improve error message.
11153 (regsets_store_inferior_registers): Add debugging.
11154 (linux_look_up_symbols): Call thread_db_init if USE_THREAD_DB.
11155 (unstopped_p, linux_signal_pid): New functions.
11156 (linux_target_ops): Add linux_signal_pid.
11157 (linux_init_signals): New function.
11158 (initialize_low): Call it. Initialize using_threads.
11159 * regcache.c (inferior_regcache_data): Add valid
11160 flag.
11161 (get_regcache): Fetch registers lazily. Add fetch argument
11162 and update all callers.
11163 (regcache_invalidate_one, regcache_invalidate): New
11164 functions.
11165 (new_register_cache): Renamed from create_register_cache.
11166 Return the new regcache.
11167 (free_register_cache): Change argument to a void *.
11168 (registers_to_string, registers_from_string): Call get_regcache
11169 with fetch flag set.
11170 (register_data): Make static. Pass fetch flag to get_regcache.
11171 (supply_register): Call get_regcache with fetch flag clear.
11172 (collect_register): Call get_regcache with fetch flag set.
11173 (collect_register_as_string): New function.
11174 * regcache.h: Update.
11175 * remote-utils.c (putpkt): Flush after debug output and use
11176 stderr.
11177 Handle input interrupts while waiting for an ACK.
11178 (input_interrupt): Use signal_pid method.
11179 (getpkt): Flush after debug output and use stderr.
11180 (outreg): Use collect_register_as_string.
11181 (new_thread_notify, dead_thread_notify): New functions.
11182 (prepare_resume_reply): Check using_threads. Set thread_from_wait
11183 and general_thread.
11184 (look_up_one_symbol): Flush after debug output.
11185 * server.c (step_thread, server_waiting): New variables.
11186 (start_inferior): Don't use signal_pid. Update call to mywait.
11187 (attach_inferior): Update call to mywait.
11188 (handle_query): Handle qfThreadInfo and qsThreadInfo.
11189 (main): Don't fetch/store registers explicitly. Use
11190 set_desired_inferior. Support proposed ``Hs'' packet. Update
11191 calls to mywait.
11192 * server.h: Update.
11193 (struct inferior_list, struct_inferior_list_entry): New.
11194 * target.c (set_desired_inferior): New.
11195 (write_inferior_memory): Constify.
11196 (mywait): New function.
11197 * target.h: Update.
11198 (struct target_ops): New signal_pid method.
11199 (mywait): Removed macro, added prototype.
11200
11201 * linux-low.h (regset_func): Removed.
11202 (regset_fill_func, regset_store_func): New.
11203 (enum regset_type): New.
11204 (struct regset_info): Add type field. Use new operation types.
11205 (struct linux_target_ops): stop_pc renamed to get_pc.
11206 Add decr_pc_after_break and breakpoint_at.
11207 (get_process, get_thread_proess, get_process_thread)
11208 (strut process_info, all_processes, linux_attach_lwp)
11209 (thread_db_init): New.
11210
11211 * linux-arm-low.c (arm_get_pc, arm_set_pc,
11212 arm_breakpoint, arm_breakpoint_len, arm_breakpoint_at): New.
11213 (the_low_target): Add new members.
11214 * linux-i386-low.c (i386_store_gregset, i386_store_fpregset)
11215 (i386_store_fpxregset): Constify.
11216 (target_regsets): Add new kind identifier.
11217 (i386_get_pc): Renamed from i386_stop_pc. Simplify.
11218 (i386_set_pc): Add debugging.
11219 (i386_breakpoint_at): New function.
11220 (the_low_target): Add new members.
11221 * linux-mips-low.c (mips_get_pc, mips_set_pc)
11222 (mips_breakpoint, mips_breakpoint_len, mips_reinsert_addr)
11223 (mips_breakpoint_at): New.
11224 (the_low_target): Add new members.
11225 * linux-ppc-low.c (ppc_get_pc, ppc_set_pc)
11226 (ppc_breakpoint, ppc_breakpoint_len, ppc_breakpoint_at): New.
11227 (the_low_target): Add new members.
11228 * linux-sh-low.c (sh_get_pc, sh_set_pc)
11229 (sh_breakpoint, sh_breakpoint_len, sh_breakpoint_at): New.
11230 (the_low_target): Add new members.
11231 * linux-x86-64-low.c (target_regsets): Add new kind
11232 identifier.
11233
112342002-05-15 Daniel Jacobowitz <drow@mvista.com>
11235
11236 From Martin Pool <mbp@samba.org>:
11237 * server.c (gdbserver_usage): New function.
11238 (main): Call it.
11239
112402002-05-14 Daniel Jacobowitz <drow@mvista.com>
11241
11242 * mem-break.c (reinsert_breakpoint_by_bp): Correct typo
11243 stop_at -> stop_pc.
11244
112452002-05-04 Andrew Cagney <ac131313@redhat.com>
11246
11247 * Makefile.in: Remove obsolete code.
11248
112492002-04-24 Michal Ludvig <mludvig@suse.cz>
11250
11251 * linux-low.c (regsets_fetch_inferior_registers),
11252 (regsets_store_inferior_registers): Removed cast to int from
11253 ptrace() calls.
11254 * regcache.h: Added declaration of struct inferior_info.
11255
112562002-04-20 Daniel Jacobowitz <drow@mvista.com>
11257
11258 * inferiors.c (struct inferior_info): Add regcache_data.
11259 (add_inferior): Call create_register_cache.
11260 (clear_inferiors): Call free_register_cache.
11261 (inferior_regcache_data, set_inferior_regcache_data): New functions.
11262 * regcache.c (struct inferior_regcache_data): New.
11263 (registers): Remove.
11264 (get_regcache): New function.
11265 (create_register_cache, free_register_cache): New functions.
11266 (set_register_cache): Don't initialize the register cache here.
11267 (registers_to_string, registers_from_string, register_data): Call
11268 get_regcache.
11269 * regcache.h: Add prototypes.
11270 * server.h: Likewise.
11271
112722002-04-20 Daniel Jacobowitz <drow@mvista.com>
11273
11274 * mem-break.c: New file.
11275 * mem-break.h: New file.
11276 * Makefile.in: Add mem-break.o rule; update server.h
11277 dependencies.
11278 * inferiors.c (struct inferior_info): Add target_data
11279 member.
11280 (clear_inferiors): Free target_data member if set.
11281 (inferior_target_data, set_inferior_target_data): New functions.
11282 * linux-i386-low.c (i386_breakpoint, i386_breakpoint_len)
11283 (i386_stop_pc, i386_set_pc): New. Add to the_low_target.
11284 * linux-low.c (linux_bp_reinsert): New variable.
11285 (struct inferior_linux_data): New.
11286 (linux_create_inferior): Use set_inferior_target_data.
11287 (linux_attach): Likewise. Call add_inferior.
11288 (linux_wait_for_one_inferior): New function.
11289 (linux_wait): Call it.
11290 (linux_write_memory): Add const.
11291 (initialize_low): Call set_breakpoint_data.
11292 * linux-low.h (struct linux_target_ops): Add breakpoint
11293 handling members.
11294 * server.c (attach_inferior): Remove extra add_inferior
11295 call.
11296 * server.h: Include mem-break.h. Update inferior.c
11297 prototypes.
11298 * target.c (read_inferior_memory)
11299 (write_inferior_memory): New functions.
11300 * target.h (read_inferior_memory)
11301 (write_inferior_memory): Change macros to prototypes.
11302 (struct target_ops): Update comments. Add const to write_memory
11303 definition.
11304
113052002-04-11 Daniel Jacobowitz <drow@mvista.com>
11306
11307 * linux-low.c (usr_store_inferior_registers): Support
11308 registers which are allowed to fail to store.
11309 * linux-low.h (linux_target_ops): Likewise.
11310 * linux-ppc-low.c (ppc_regmap): Support FPSCR.
11311 (ppc_cannot_store_register): FPSCR may not be storable.
11312
113132002-04-09 Daniel Jacobowitz <drow@mvista.com>
11314
11315 * server.h: Include <string.h> if HAVE_STRING_H.
11316 * ChangeLog: Correct paths in last ChangeLog entry.
11317
113182002-04-09 Daniel Jacobowitz <drow@mvista.com>
11319
11320 * linux-low.h: Remove obsolete prototypes.
11321 (struct linux_target_ops): New.
11322 (extern the_low_target): New.
11323 * linux-low.c (num_regs, regmap): Remove declarations.
11324 (register_addr): Use the_low_target explicitly.
11325 (fetch_register): Likewise.
11326 (usr_fetch_inferior_registers): Likewise.
11327 (usr_store_inferior_registers): Likewise.
11328 * linux-arm-low.c (num_regs): Remove.
11329 (arm_num_regs): Define.
11330 (arm_regmap): Renamed from regmap, made static.
11331 (arm_cannot_fetch_register): Renamed from cannot_fetch_register,
11332 made static.
11333 (arm_cannot_store_register): Renamed from cannot_store_register,
11334 made static.
11335 (the_low_target): New.
11336 * linux-i386-low.c (num_regs): Remove.
11337 (i386_num_regs): Define.
11338 (i386_regmap): Renamed from regmap, made static.
11339 (i386_cannot_fetch_register): Renamed from cannot_fetch_register,
11340 made static.
11341 (i386_cannot_store_register): Renamed from cannot_store_register,
11342 made static.
11343 (the_low_target): New.
11344 * linux-ia64-low.c (num_regs): Remove.
11345 (ia64_num_regs): Define.
11346 (ia64_regmap): Renamed from regmap, made static.
11347 (ia64_cannot_fetch_register): Renamed from cannot_fetch_register,
11348 made static.
11349 (ia64_cannot_store_register): Renamed from cannot_store_register,
11350 made static.
11351 (the_low_target): New.
11352 * linux-m68k-low.c (num_regs): Remove.
11353 (m68k_num_regs): Define.
11354 (m68k_regmap): Renamed from regmap, made static.
11355 (m68k_cannot_fetch_register): Renamed from cannot_fetch_register,
11356 made static.
11357 (m68k_cannot_store_register): Renamed from cannot_store_register,
11358 made static.
11359 (the_low_target): New.
11360 * linux-mips-low.c (num_regs): Remove.
11361 (mips_num_regs): Define.
11362 (mips_regmap): Renamed from regmap, made static.
11363 (mips_cannot_fetch_register): Renamed from cannot_fetch_register,
11364 made static.
11365 (mips_cannot_store_register): Renamed from cannot_store_register,
11366 made static.
11367 (the_low_target): New.
11368 * linux-ppc-low.c (num_regs): Remove.
11369 (ppc_num_regs): Define.
11370 (ppc_regmap): Renamed from regmap, made static.
11371 (ppc_cannot_fetch_register): Renamed from cannot_fetch_register,
11372 made static.
11373 (ppc_cannot_store_register): Renamed from cannot_store_register,
11374 made static.
11375 (the_low_target): New.
11376 * linux-s390-low.c (num_regs): Remove.
11377 (s390_num_regs): Define.
11378 (s390_regmap): Renamed from regmap, made static.
11379 (s390_cannot_fetch_register): Renamed from cannot_fetch_register,
11380 made static.
11381 (s390_cannot_store_register): Renamed from cannot_store_register,
11382 made static.
11383 (the_low_target): New.
11384 * linux-sh-low.c (num_regs): Remove.
11385 (sh_num_regs): Define.
11386 (sh_regmap): Renamed from regmap, made static.
11387 (sh_cannot_fetch_register): Renamed from cannot_fetch_register,
11388 made static.
11389 (sh_cannot_store_register): Renamed from cannot_store_register,
11390 made static.
11391 (the_low_target): New.
11392 * linux-x86-64-low.c (x86_64_regmap): Renamed from regmap.
11393 (the_low_target): New.
11394
113952002-04-09 Daniel Jacobowitz <drow@mvista.com>
11396
11397 * Makefile.in: Add stamp-h target.
11398 * configure.in: Create stamp-h.
11399 * configure: Regenerated.
11400
114012002-04-09 Daniel Jacobowitz <drow@mvista.com>
11402
11403 * inferiors.c: New file.
11404 * target.c: New file.
11405 * target.h: New file.
11406 * Makefile.in: Add target.o and inferiors.o. Update
11407 dependencies.
11408 * linux-low.c (inferior_pid): New static variable,
11409 moved from server.c.
11410 (linux_create_inferior): Renamed from create_inferior.
11411 Call add_inferior. Return 0 on success instead of a PID.
11412 (linux_attach): Renamed from myattach.
11413 (linux_kill): Renamed from kill_inferior. Call clear_inferiors ().
11414 (linux_thread_alive): Renamed from mythread_alive.
11415 (linux_wait): Renamed from mywait. Call clear_inferiors () if the
11416 child dies.
11417 (linux_resume): Renamed from myresume. Add missing ``return 0''.
11418 (regsets_store_inferior_registers): Correct error message.
11419 Add missing ``return 0''.
11420 (linux_fetch_registers): Renamed from fetch_inferior_registers.
11421 (linux_store_registers): Renamed from store_inferior_registers.
11422 (linux_read_memory): Renamed from read_inferior_memory.
11423 (linux_write_memory): Renamed from write_inferior_memory.
11424 (linux_target_ops): New structure.
11425 (initialize_low): Call set_target_ops ().
11426 * remote-utils.c (unhexify): New function.
11427 (hexify): New function.
11428 (input_interrupt): Send signals to ``signal_pid''.
11429 * server.c (inferior_pid): Remove.
11430 (start_inferior): Update create_inferior call.
11431 (attach_inferior): Call add_inferior.
11432 (handle_query): New function.
11433 (main): Call handle_query for `q' packets.
11434 * server.h: Include "target.h". Remove obsolete prototypes.
11435 Add prototypes for "inferiors.c", "target.c", hexify, and unhexify.
11436
114372002-04-09 Daniel Jacobowitz <drow@mvista.com>
11438
11439 * Makefile.in: Add WARN_CFLAGS. Update configury
11440 dependencies.
11441 * configure.in: Check for <string.h>
11442 * configure: Regenerate.
11443 * config.in: Regenerate.
11444 * gdbreplay.c: Include needed system headers.
11445 (remote_open): Remove strchr prototype.
11446 * linux-low.h: Correct #ifdef to HAVE_LINUX_USRREGS.
11447 * regcache.c (supply_register): Change buf argument to const void *.
11448 (supply_register_by_name): Likewise.
11449 (collect_register): Change buf argument to void *.
11450 (collect_register_by_name): Likewise.
11451 * regcache.h: Add missing prototypes.
11452 * remote-utils.c: Include <arpa/inet.h> for inet_ntoa.
11453 * server.c (handle_query): New function.
11454 (attached): New static variable, moved out of main.
11455 (main): Quiet longjmp clobber warnings.
11456 * server.h: Add ATTR_NORETURN and ATTR_FORMAT. Update prototypes.
11457 * utils.c (error): Remove NORETURN.
11458 (fatal): Likewise.
This page took 1.528499 seconds and 4 git commands to generate.