Linux: sys/ptrace.h -> nat/gdb_ptrace.h everywhere
[deliverable/binutils-gdb.git] / gdb / gdbserver / ChangeLog
CommitLineData
5826e159
PA
12015-07-24 Pedro Alves <palves@redhat.c: Likewise.om>
2
3 * linux-aarch64-low.c: Include nat/gdb_ptrace.h instead of
4 sys/ptrace.h.
5 * linux-arm-low.c: Likewise.
6 * linux-cris-low.c: Likewise.
7 * linux-crisv32-low.c: Likewise.
8 * linux-low.c: Likewise.
9 * linux-m68k-low.c: Likewise.
10 * linux-mips-low.c: Likewise.
11 * linux-nios2-low.c: Likewise.
12 * linux-s390-low.c: Likewise.
13 * linux-sparc-low.c: Likewise.
14 * linux-tic6x-low.c: Likewise.
15 * linux-tile-low.c: Likewise.
16 * linux-x86-low.c: Likewise.
17
54019719
PA
182015-07-24 Pedro Alves <palves@redhat.com>
19
20 * config.in: Regenerate.
21 * configure: Regenerate.
22
eb7aa561
PA
232015-07-24 Pedro Alves <palves@redhat.com>
24
25 * acinclude.m4: Include ../ptrace.m4.
26 * configure.ac: Call GDB_AC_PTRACE.
27 * config.in, configure: Regenerate.
28
55d7b841
YQ
292015-07-24 Yao Qi <yao.qi@linaro.org>
30
31 * linux-low.c (linux_create_inferior): Remove setting to
32 proc->priv->new_inferior.
33 (linux_attach): Likewise.
34 (linux_low_filter_event): Likewise.
35 * linux-low.h (struct process_info_private) <new_inferior>: Remove.
36
c06cbd92
YQ
372015-07-24 Yao Qi <yao.qi@linaro.org>
38
39 * linux-low.c (linux_arch_setup): New function.
40 (linux_low_filter_event): If proc->tdesc is NULL and
41 proc->attached is true, call the_low_target.arch_setup.
42 Otherwise, keep status pending, and return.
43 (linux_resume_one_lwp_throw): Don't call get_pc if
44 thread->while_stepping isn't NULL. Don't call
45 get_thread_regcache if proc->tdesc is NULL.
46 (need_step_over_p): Return 0 if proc->tdesc is NULL.
47 (linux_target_ops): Install arch_setup.
48 * server.c (start_inferior): Call the_target->arch_setup.
49 * target.h (struct target_ops) <arch_setup>: New field.
50 (target_arch_setup): New marco.
51 * lynx-low.c (lynx_target_ops): Update.
52 * nto-low.c (nto_target_ops): Update.
53 * spu-low.c (spu_target_ops): Update.
54 * win32-low.c (win32_target_ops): Update.
55
5ae3ebba
YQ
562015-07-24 Yao Qi <yao.qi@linaro.org>
57
58 * linux-low.c (linux_add_process): Don't set
59 proc->priv->new_inferior.
60 (linux_create_inferior): Set proc->priv->new_inferior to 1.
61 (linux_attach): Likewise.
62
eb97750b
YQ
632015-07-24 Yao Qi <yao.qi@linaro.org>
64
65 * server.c (start_inferior): Code refactor.
66
51aee833
YQ
672015-07-24 Yao Qi <yao.qi@linaro.org>
68
69 * server.c (process_serial_event): Set general_thread.
70
af1b22f3
YQ
712015-07-21 Yao Qi <yao.qi@linaro.org>
72
73 * linux-aarch64-low.c (aarch64_arch_setup): Remove code and call
74 aarch64_linux_get_debug_reg_capacity.
75
554717a3
YQ
762015-07-17 Yao Qi <yao.qi@linaro.org>
77
78 * Makefile.in (aarch64-linux-hw-point.o): New rule.
79 * configure.srv (srv_tgtobj): Append aarch64-linux-hw-point.o.
80 * linux-aarch64-low.c: Include nat/aarch64-linux-hw-point.h.
81 (AARCH64_HBP_MAX_NUM): Move to nat/aarch64-linux-hw-point.h.
82 (AARCH64_HWP_MAX_NUM, AARCH64_HBP_ALIGNMENT): Likewise.
83 (AARCH64_HWP_ALIGNMENT): Likewise.
84 (AARCH64_HWP_MAX_LEN_PER_REG): Likewise.
85 (AARCH64_DEBUG_NUM_SLOTS, AARCH64_DEBUG_ARCH): Likewise.
86 (aarch64_num_bp_regs, aarch64_num_wp_regs): Likewise.
87 (AARCH64_DEBUG_ARCH_V8, DR_MARK_ALL_CHANGED): Likewise.
88 (DR_MARK_N_CHANGED, DR_CLEAR_CHANGED): Likewise.
89 (DR_HAS_CHANGED, DR_N_HAS_CHANGE): Likewise.
90 (struct aarch64_debug_reg_state): Likewise.
91 (struct arch_lwp_info): Likewise.
92 (aarch64_align_watchpoint): Likewise.
93 (DR_CONTROL_ENABLED, DR_CONTROL_LENGTH): Likewise.
94 (aarch64_watchpoint_length): Likewise.
95 (aarch64_point_encode_ctrl_reg): Likewise
96 (aarch64_point_is_aligned): Likewise.
97 (aarch64_align_watchpoint): Likewise.
98 (aarch64_linux_set_debug_regs):
99 (aarch64_dr_state_insert_one_point): Likewise.
100 (aarch64_dr_state_remove_one_point): Likewise.
101 (aarch64_handle_breakpoint): Likewise.
102 (aarch64_handle_aligned_watchpoint): Likewise.
103 (aarch64_handle_unaligned_watchpoint): Likewise.
104 (aarch64_handle_watchpoint): Likewise.
105
c67ca4de
YQ
1062015-07-17 Yao Qi <yao.qi@linaro.org>
107
108 * linux-aarch64-low.c (aarch64_handle_breakpoint): Add argument state
109 and don't aarch64_get_debug_reg_state. All callers update.
110 (aarch64_handle_aligned_watchpoint): Likewise.
111 (aarch64_handle_unaligned_watchpoint): Likewise.
112 (aarch64_handle_watchpoint): Likewise.
113 (aarch64_insert_point): Call aarch64_get_debug_reg_state earlier.
114 (aarch64_remove_point): Likewise.
115
25abf979
YQ
1162015-07-17 Yao Qi <yao.qi@linaro.org>
117
118 * linux-aarch64-low.c (aarch64_show_debug_reg_state): Use
119 debug_printf.
120 (aarch64_handle_unaligned_watchpoint): Likewise.
121
db1ff28b
JK
1222015-07-15 Jan Kratochvil <jan.kratochvil@redhat.com>
123
124 Revert the previous 3 commits:
125 Move gdb_regex* to common/
126 Move linux_find_memory_regions_full & co.
127 gdbserver build-id attribute generator
128
700ca40f
JK
1292015-07-15 Aleksandar Ristovski <aristovski@qnx.com
130 Jan Kratochvil <jan.kratochvil@redhat.com>
131
132 gdbserver build-id attribute generator.
133 * linux-low.c (nat/linux-maps.h, search.h, rsp-low.h): Include.
134 (ElfXX_Ehdr, ElfXX_Phdr, ElfXX_Nhdr): New.
135 (ELFXX_FLD, ELFXX_SIZEOF, ELFXX_ROUNDUP, BUILD_ID_INVALID): New.
136 (find_phdr): New.
137 (get_dynamic): Use find_pdhr to traverse program headers.
138 (struct mapping_entry, mapping_entry_s, free_mapping_entry_vec)
139 (compare_mapping_entry_range, struct find_memory_region_callback_data)
140 (read_build_id, find_memory_region_callback, lrfind_mapping_entry)
141 (get_hex_build_id): New.
142 (linux_qxfer_libraries_svr4): Add optional build-id attribute
143 to reply XML document.
144
9904185c
JK
1452015-07-15 Aleksandar Ristovski <aristovski@qnx.com
146 Jan Kratochvil <jan.kratochvil@redhat.com>
147
148 * target.c: Include target/target-utils.h and fcntl.h.
149 (target_fileio_read_stralloc_1_pread, target_fileio_read_stralloc_1)
150 (target_fileio_read_stralloc): New functions.
151
6e5b4429
JK
1522015-07-15 Jan Kratochvil <jan.kratochvil@redhat.com>
153
154 * Makefile.in (OBS): Add gdb_regex.o.
155 (gdb_regex.o): New.
156 * config.in: Rebuilt.
157 * configure: Rebuilt.
158
ddc98fbf
JK
1592015-07-15 Aleksandar Ristovski <aristovski@qnx.com
160 Jan Kratochvil <jan.kratochvil@redhat.com>
161
162 Create empty nat/linux-maps.[ch] and common/target-utils.[ch].
163 * Makefile.in (OBS): Add target-utils.o.
164 (linux-maps.o, target-utils.o): New.
165 * configure.srv (srv_linux_obj): Add linux-maps.o.
166
e57bb7a0
PL
1672015-07-15 Pierre Langlois <pierre.langlois@arm.com>
168
169 * linux-aarch64-low.c (aarch64_supports_range_stepping): New
170 function, return 1.
171 (the_low_target): Install it.
172
586b02a9
PA
1732015-07-14 Pedro Alves <palves@redhat.com>
174
175 * linux-low.c (kill_wait_lwp): Don't assert if waitpid fails.
176 Instead, ignore ECHILD, and throw an error for other errnos.
177
58c1b36c
PA
1782015-07-10 Pedro Alves <palves@redhat.com>
179
180 * event-loop.c (struct callback_event) <data>: Change type to
181 gdb_client_data instance instead of gdb_client_data pointer.
182 (append_callback_event): Adjust.
183
421530db
PL
1842015-07-10 Pierre Langlois <pierre.langlois@arm.com>
185
186 * linux-aarch64-low.c: Add comments for each linux_target_ops
187 method. Remove comments already covered in target_ops and
188 linux_target_ops definitions.
189 (the_low_target): Add comments for each unimplemented method.
190
c2d65f38
YQ
1912015-07-09 Yao Qi <yao.qi@linaro.org>
192
193 * linux-aarch64-low.c (aarch64_regmap): Remove.
194 (aarch64_usrregs_info): Remove.
195 (regs_info): Set field usrregs to NULL.
196
b20a6524
MM
1972015-07-02 Markus Metzger <markus.t.metzger@intel.com>
198
199 * linux-low.c: Include "rsp-low.h"
200 (linux_low_encode_pt_config, linux_low_encode_raw): New.
201 (linux_low_read_btrace): Support BTRACE_FORMAT_PT.
202 (linux_low_btrace_conf): Support BTRACE_FORMAT_PT.
203 (handle_btrace_enable_pt): New.
204 (handle_btrace_general_set): Support "pt".
205 (handle_btrace_conf_general_set): Support "pt:size".
206
96c97461
PL
2072015-06-29 Pierre Langlois <pierre.langlois@arm.com>
208
209 * linux-aarch64-low.c (aarch64_supports_z_point_type): Enable for
210 Z_PACKET_SW_BP.
211
37d66942
PL
2122015-06-29 Pierre Langlois <pierre.langlois@arm.com>
213
214 * linux-aarch64-low.c: Remove comment about endianness.
215 (aarch64_breakpoint): Change type to gdb_byte[]. Set to "brk #0".
216 (aarch64_breakpoint_at): Change type of insn to gdb_byte[]. Use
217 memcmp.
218
dc06243f
GB
2192015-06-24 Gary Benson <gbenson@redhat.com>
220
221 * linux-i386-ipa.c (stdint.h): Do not include.
222 * lynx-i386-low.c (stdint.h): Likewise.
223 * lynx-ppc-low.c (stdint.h): Likewise.
224 * mem-break.c (stdint.h): Likewise.
225 * thread-db.c (stdint.h): Likewise.
226 * tracepoint.c (stdint.h): Likewise.
227 * win32-low.c (stdint.h): Likewise.
228
124e13d9
SM
2292015-06-18 Simon Marchi <simon.marchi@ericsson.com>
230
231 * server.c (write_qxfer_response): Update call to
232 remote_escape_output.
233
909c2cda
JK
2342015-06-15 Aleksandar Ristovski <aristovski@qnx.com
235 Jan Kratochvil <jan.kratochvil@redhat.com>
236
237 Merge multiple hex conversions.
238 * gdbreplay.c (tohex): Rename to 'fromhex'.
239 (logchar): Use fromhex.
240
24c05f46
JK
2412015-06-10 Jan Kratochvil <jan.kratochvil@redhat.com>
242
243 * server.c (handle_qxfer_libraries): Set `version' attribute for
244 <library-list>.
245
14d2069a
GB
2462015-06-10 Gary Benson <gbenson@redhat.com>
247
248 * target.h (struct target_ops) <multifs_open>: New field.
249 <multifs_unlink>: Likewise.
250 <multifs_readlink>: Likewise.
251 * linux-low.c (nat/linux-namespaces.h): New include.
252 (linux_target_ops): Initialize the_target->multifs_open,
253 the_target->multifs_unlink and the_target->multifs_readlink.
254 * hostio.h (hostio_handle_new_gdb_connection): New declaration.
255 * hostio.c (hostio_fs_pid): New static variable.
256 (hostio_handle_new_gdb_connection): New function.
257 (handle_setfs): Likewise.
258 (handle_open): Use the_target->multifs_open as appropriate.
259 (handle_unlink): Use the_target->multifs_unlink as appropriate.
260 (handle_readlink): Use the_target->multifs_readlink as
261 appropriate.
262 (handle_vFile): Handle vFile:setfs packets.
263 * server.c (handle_query): Call hostio_handle_new_gdb_connection
264 after target_handle_new_gdb_connection.
265
4b8b5e72
GB
2662015-06-10 Gary Benson <gbenson@redhat.com>
267
268 * configure.ac (AC_CHECK_FUNCS): Add setns.
269 * config.in: Regenerate.
270 * configure: Likewise.
271 * Makefile.in (SFILES): Add nat/linux-namespaces.c.
272 (linux-namespaces.o): New rule.
273 * configure.srv (srv_linux_obj): Add linux-namespaces.o.
274
3ac2e371
GB
2752015-06-09 Gary Benson <gbenson@redhat.com>
276
277 * hostio.c (handle_open): Process mode argument with
278 fileio_to_host_mode.
279
ca9b78ce
YQ
2802015-06-01 Yao Qi <yao.qi@linaro.org>
281
282 * linux-s390-low.c (PTRACE_GETREGSET, PTRACE_SETREGSET): Remove.
283 * linux-x86-low.c: Likewise.
284
bfacd19d
DB
2852015-05-28 Don Breazeal <donb@codesourcery.com>
286
287 * linux-low.c (handle_extended_wait): Initialize
288 thread_info.last_resume_kind for new fork children.
289
452003ef
PA
2902015-05-15 Pedro Alves <palves@redhat.com>
291
292 * target.h (target_handle_new_gdb_connection): Rewrite using if
293 wrapped in do/while.
294
1041a03c
JB
2952015-05-14 Joel Brobecker <brobecker@adacore.com>
296
297 * configure.ac: Add prfpregset_t BFD_HAVE_SYS_PROCFS_TYPE check.
298 * configure, config.in: Regenerate.
299 * gdb_proc_service.h [HAVE_PRFPREGSET_T] (prfpregset_t):
300 Declare typedef.
301
c269dbdb
DB
3022015-05-12 Don Breazeal <donb@codesourcery.com>
303
304 * linux-low.c (handle_extended_wait): Handle PTRACE_EVENT_FORK and
305 PTRACE_EVENT_VFORK_DONE.
306 (linux_low_ptrace_options, extended_event_reported): Add vfork
307 events.
308 * remote-utils.c (prepare_resume_reply): New stop reasons "vfork"
309 and "vforkdone" for RSP 'T' Stop Reply Packet.
310 * server.h (report_vfork_events): Declare
311 global variable.
312
3a8a0396
DB
3132015-05-12 Don Breazeal <donb@codesourcery.com>
314
315 * linux-aarch64-low.c (aarch64_linux_new_fork): New function.
316 (the_low_target) <new_fork>: Initialize new member.
317 * linux-arm-low.c (arm_new_fork): New function.
318 (the_low_target) <new_fork>: Initialize new member.
319 * linux-low.c (handle_extended_wait): Call new target function
320 new_fork.
321 * linux-low.h (struct linux_target_ops) <new_fork>: New member.
322 * linux-mips-low.c (mips_add_watchpoint): New function
323 extracted from mips_insert_point.
324 (the_low_target) <new_fork>: Initialize new member.
325 (mips_linux_new_fork): New function.
326 (mips_insert_point): Call mips_add_watchpoint.
327 * linux-x86-low.c (x86_linux_new_fork): New function.
328 (the_low_target) <new_fork>: Initialize new member.
329
de0d863e
DB
3302015-05-12 Don Breazeal <donb@codesourcery.com>
331
332 * linux-low.c (handle_extended_wait): Implement return value,
333 rename argument 'event_child' to 'event_lwp', handle
334 PTRACE_EVENT_FORK, call internal_error for unrecognized event.
335 (linux_low_ptrace_options): New function.
336 (linux_low_filter_event): Call linux_low_ptrace_options,
337 use different argument fo linux_enable_event_reporting,
338 use return value from handle_extended_wait.
339 (extended_event_reported): New function.
340 (linux_wait_1): Call extended_event_reported and set
341 status to report fork events.
342 (linux_write_memory): Add pid to debug message.
343 (reset_lwp_ptrace_options_callback): New function.
344 (linux_handle_new_gdb_connection): New function.
345 (linux_target_ops): Initialize new structure member.
346 * linux-low.h (struct lwp_info) <waitstatus>: New member.
347 * lynx-low.c: Initialize new structure member.
348 * remote-utils.c (prepare_resume_reply): Implement stop reason
349 "fork" for "T" stop message.
350 * server.c (handle_query): Call handle_new_gdb_connection.
351 * server.h (report_fork_events): Declare global flag.
352 * target.h (struct target_ops) <handle_new_gdb_connection>:
353 New member.
354 (target_handle_new_gdb_connection): New macro.
355 * win32-low.c: Initialize new structure member.
356
ddcbc397
DB
3572015-05-12 Don Breazeal <donb@codesourcery.com>
358
359 * mem-break.c (APPEND_TO_LIST): Define macro.
360 (clone_agent_expr): New function.
361 (clone_one_breakpoint): New function.
362 (clone_all_breakpoints): New function.
363 * mem-break.h: Declare new functions.
364
89245bc0
DB
3652015-05-12 Don Breazeal <donb@codesourcery.com>
366
367 * linux-low.c (linux_supports_fork_events): New function.
368 (linux_supports_vfork_events): New function.
369 (linux_target_ops): Initialize new structure members.
370 (initialize_low): Call linux_check_ptrace_features.
371 * lynx-low.c (lynx_target_ops): Initialize new structure
372 members.
373 * server.c (report_fork_events, report_vfork_events):
374 New global flags.
375 (handle_query): Add new features to qSupported packet and
376 response.
377 (captured_main): Initialize new global variables.
378 * target.h (struct target_ops) <supports_fork_events>:
379 New member.
380 <supports_vfork_events>: New member.
381 (target_supports_fork_events): New macro.
382 (target_supports_vfork_events): New macro.
383 * win32-low.c (win32_target_ops): Initialize new structure
384 members.
385
835205d0
GB
3862015-05-12 Gary Benson <gbenson@redhat.com>
387
388 * server.c (handle_qxfer_exec_file): Use current process
389 if annex is empty.
390
21e94bd9
SL
3912015-05-08 Sandra Loosemore <sandra@codesourcery.com>
392
393 * linux-nios2-low.c: Include elf/common.h. Adjust comments.
394 Remove HAVE_PTRACE_GETREGS conditionals.
395 (nios2_regsets): Use PTRACE_GETREGSET and PTRACE_SETREGSET
396 instead of PTRACE_GETREGS and PTRACE_SETREGS.
397
45614f15
YQ
3982015-05-08 Yao Qi <yao.qi@linaro.org>
399
400 * linux-low.c (linux_supports_conditional_breakpoints): New
401 function.
402 (linux_target_ops): Install new target method.
403 * lynx-low.c (lynx_target_ops): Install NULL hook for
404 supports_conditional_breakpoints.
405 * nto-low.c (nto_target_ops): Likewise.
406 * spu-low.c (spu_target_ops): Likewise.
407 * win32-low.c (win32_target_ops): Likewise.
408 * server.c (handle_query): Check
409 target_supports_conditional_breakpoints.
410 * target.h (struct target_ops) <supports_conditional_breakpoints>:
411 New field.
412 (target_supports_conditional_breakpoints): New macro.
413
80ad801e
PA
4142015-05-06 Pedro Alves <palves@redhat.com>
415
416 PR server/18081
417 * server.c (start_inferior): If the process exits, mourn it.
418
819843c7
GB
4192015-04-21 Gary Benson <gbenson@redhat.com>
420
421 * hostio.c (fileio_open_flags_to_host): Factored out to
422 fileio_to_host_openflags in common/fileio.c. Single use
423 updated.
424
a2d5a9d7
MF
4252015-04-17 Max Filippov <jcmvbkbc@gmail.com>
426
427 * linux-xtensa-low.c (xtensa_fill_gregset)
428 (xtensa_store_gregset): Check XCHAL_HAVE_LOOPS instead of
429 XCHAL_HAVE_LOOP.
430
deb44829
MF
4312015-04-17 Max Filippov <jcmvbkbc@gmail.com>
432
433 * linux-xtensa-low.c (xtensa_usrregs_info): Remove.
434 (regs_info): Replace usrregs pointer with NULL.
435
e57f1de3
GB
4362015-04-17 Gary Benson <gbenson@redhat.com>
437
438 * target.h (struct target_ops) <pid_to_exec_file>: New field.
439 * linux-low.c (linux_target_ops): Initialize pid_to_exec_file.
440 * server.c (handle_qxfer_exec_file): New function.
441 (qxfer_packets): Add exec-file entry.
442 (handle_query): Report qXfer:exec-file:read as supported packet.
443
62828379
RN
4442015-04-14 Romain Naour <romain.naour@openwide.fr> (tiny change)
445
446 * linux-low.c (linux_read_offsets): Remove get_thread_lwp.
447
b88bb450
GB
4482015-04-09 Gary Benson <gbenson@redhat.com>
449
450 * hostio-errno.c (errno_to_fileio_error): Remove function.
451 Update caller to use remote_fileio_to_fio_error.
452
c8f4bfdd
YQ
4532015-04-09 Yao Qi <yao.qi@linaro.org>
454
455 * linux-low.c (linux_insert_point): Call
456 insert_memory_breakpoint if TYPE is raw_bkpt_type_sw.
457 (linux_remove_point): Call remove_memory_breakpoint if type is
458 raw_bkpt_type_sw.
459 * linux-x86-low.c (x86_insert_point): Don't call
460 insert_memory_breakpoint.
461 (x86_remove_point): Don't call remove_memory_breakpoint.
462
41f98f02
PA
4632015-04-01 Pedro Alves <palves@redhat.com>
464 Cleber Rosa <crosa@redhat.com>
465
466 * server.c (gdbserver_usage): Reorganize and extend the usage
467 message.
468
2bf6fb9d
PA
4692015-03-24 Pedro Alves <palves@redhat.com>
470
471 * linux-low.c (check_stopped_by_breakpoint): Tweak debug log
472 output. Also dump TRAP_TRACE.
473 (linux_low_filter_event): In debug output, distinguish a
474 resume_stop SIGSTOP from a delayed SIGSTOP.
475
369f6daa
GB
4762015-03-24 Gary Benson <gbenson@redhat.com>
477
478 * linux-x86-low.c (x86_linux_new_thread): Moved to
479 nat/x86-linux.c.
480 (x86_linux_prepare_to_resume): Likewise.
481
8e5d4070
GB
4822015-03-24 Gary Benson <gbenson@redhat.com>
483
484 * Makefile.in (x86-linux-dregs.o): New rule.
485 * configure.srv: Add x86-linux-dregs.o to relevant targets.
486 * linux-x86-low.c: Include nat/x86-linux-dregs.h.
487 (u_debugreg_offset): Moved to nat/x86-linux-dregs.c.
488 (x86_linux_dr_get): Likewise.
489 (x86_linux_dr_set): Likewise.
490 (update_debug_registers_callback): Likewise.
491 (x86_linux_dr_set_addr): Likewise.
492 (x86_linux_dr_get_addr): Likewise.
493 (x86_linux_dr_set_control): Likewise.
494 (x86_linux_dr_get_control): Likewise.
495 (x86_linux_dr_get_status): Likewise.
496 (x86_linux_update_debug_registers): Likewise.
497
2b95d440
GB
4982015-03-24 Gary Benson <gbenson@redhat.com>
499
500 * linux-x86-low.c (x86_linux_update_debug_registers):
501 New function, factored out from...
502 (x86_linux_prepare_to_resume): ...this.
503
14b0bc68
GB
5042015-03-24 Gary Benson <gbenson@redhat.com>
505
506 * linux-x86-low.c (x86_linux_dr_get): Update comments.
507 (x86_linux_dr_set): Likewise.
508 (update_debug_registers_callback): Likewise.
509 (x86_linux_dr_set_addr): Likewise.
510 (x86_linux_dr_get_addr): Likewise.
511 (x86_linux_dr_set_control): Likewise.
512 (x86_linux_dr_get_control): Likewise.
513 (x86_linux_dr_get_status): Likewise.
514 (x86_linux_prepare_to_resume): Likewise.
515
5dfe6ca8
GB
5162015-03-24 Gary Benson <gbenson@redhat.com>
517
518 * linux-x86-low.c (x86_linux_dr_get): Add assertion.
519 Use perror_with_name. Pass string through gettext.
520 (x86_linux_dr_set): Likewise.
521
d33472ad
GB
5222015-03-24 Gary Benson <gbenson@redhat.com>
523
524 * linux-x86-low.c (x86_dr_low_set_addr): Rename to...
525 (x86_linux_dr_set_addr): ...this.
526 (x86_dr_low_get_addr): Rename to...
527 (x86_linux_dr_get_addr): ...this.
528 (x86_dr_low_set_control): Rename to...
529 (x86_linux_dr_set_control): ...this.
530 (x86_dr_low_get_control): Rename to...
531 (x86_linux_dr_get_control): ...this.
532 (x86_dr_low_get_status): Rename to...
533 (x86_linux_dr_get_status): ...this.
534 (x86_dr_low): Update with new function names.
535
4b134ca1
GB
5362015-03-24 Gary Benson <gbenson@redhat.com>
537
538 * Makefile.in (x86-linux.o): New rule.
539 * configure.srv: Add x86-linux.o to relevant targets.
540 * linux-low.c (lwp_set_arch_private_info): New function.
541 (lwp_arch_private_info): Likewise.
542 * linux-x86-low.c: Include nat/x86-linux.h.
543 (arch_lwp_info): Removed structure.
544 (update_debug_registers_callback):
545 Use lwp_set_debug_registers_changed.
546 (x86_linux_prepare_to_resume): Use lwp_debug_registers_changed
547 and lwp_set_debug_registers_changed.
548 (x86_linux_new_thread): Use lwp_set_debug_registers_changed.
549
34c703da
GB
5502015-03-24 Gary Benson <gbenson@redhat.com>
551
552 * linux-low.h (linux_target_ops) <new_thread>: Changed signature.
553 * linux-arm-low.c (arm_new_thread): Likewise.
554 * linux-aarch64-low.c (aarch64_linux_new_thread): Likewise.
555 * linux-mips-low.c (mips_linux_new_thread): Likewise.
556 * linux-x86-low.c (x86_linux_new_thread): Likewise.
557 * linux-low.c (add_lwp): Update the_low_target.new_thread call.
558
cff068da
GB
5592015-03-24 Gary Benson <gbenson@redhat.com>
560
561 * linux-low.c (ptid_of_lwp): New function.
562 (lwp_is_stopped): Likewise.
563 (lwp_stop_reason): Likewise.
564 * linux-x86-low.c (update_debug_registers_callback):
565 Use lwp_is_stopped.
566 (x86_linux_prepare_to_resume): Use ptid_of_lwp and
567 lwp_stop_reason.
568
b2f7c7e8
GB
5692015-03-24 Gary Benson <gbenson@redhat.com>
570
571 * linux-low.h (linux_stop_lwp): Remove declaration.
572
6d4ee8c6
GB
5732015-03-24 Gary Benson <gbenson@redhat.com>
574
575 * linux-low.h: Include nat/linux-nat.h.
576 * linux-low.c (iterate_over_lwps_args): New structure.
577 (iterate_over_lwps_filter): New function.
578 (iterate_over_lwps): Likewise.
579 * linux-x86-low.c (update_debug_registers_callback):
580 Update signature to what iterate_over_lwps expects.
581 Remove PID check that iterate_over_lwps now performs.
582 (x86_dr_low_set_addr): Use iterate_over_lwps.
583 (x86_dr_low_set_control): Likewise.
584
70a0bb6b
GB
5852015-03-24 Gary Benson <gbenson@redhat.com>
586
587 * linux-x86-low.c (x86_debug_reg_state): New function.
588 (x86_linux_prepare_to_resume): Use the above.
589
7b669087
GB
5902015-03-24 Gary Benson <gbenson@redhat.com>
591
592 * linux-low.c (current_lwp_ptid): New function.
593 * linux-x86-low.c: Include nat/linux-nat.h.
594 (x86_dr_low_get_addr): Use current_lwp_ptid.
595 (x86_dr_low_get_control): Likewise.
596 (x86_dr_low_get_status): Likewise.
597
eef49a3d
PA
5982015-03-20 Pedro Alves <palves@redhat.com>
599
600 * tracepoint.c (cmd_qtstatus): Make "str" const.
601
b2333d22
PA
6022015-03-20 Pedro Alves <palves@redhat.com>
603
604 * server.c (handle_general_set): Make "req_str" const.
605
23f238d3
PA
6062015-03-19 Pedro Alves <palves@redhat.com>
607
608 * linux-low.c (linux_resume_one_lwp): Rename to ...
609 (linux_resume_one_lwp_throw): ... this. Don't handle ESRCH here,
610 instead call perror_with_name.
611 (check_ptrace_stopped_lwp_gone): New function.
612 (linux_resume_one_lwp): Reimplement as wrapper around
613 linux_resume_one_lwp_throw that swallows errors if the LWP is
614 gone.
615
91baf43f
PA
6162015-03-19 Pedro Alves <palves@redhat.com>
617
618 * linux-low.c (count_events_callback, select_event_lwp_callback):
619 No longer check whether the thread has resume_stop as last resume
620 kind.
621
8bf3b159
PA
6222015-03-19 Pedro Alves <palves@redhat.com>
623
624 * linux-low.c (count_events_callback, select_event_lwp_callback):
625 Use the lwp's status_pending_p field, not the thread's.
626
b90fc188
PA
6272015-03-19 Pedro Alves <palves@redhat.com>
628
629 * linux-low.c (select_event_lwp_callback): Update comments to
630 no longer mention SIGTRAP.
631
464b0089
GB
6322015-03-18 Gary Benson <gbenson@redhat.com>
633
634 * server.c (handle_query): Do not report vFile:fstat as supported.
635
aa9e327f
GB
6362015-03-11 Gary Benson <gbenson@redhat.com>
637
638 * hostio.c (sys/types.h): New include.
639 (sys/stat.h): Likewise.
640 (common-remote-fileio.h): Likewise.
641 (handle_fstat): New function.
642 (handle_vFile): Handle vFile:fstat packets.
aa9e327f 643
791c0056
GB
6442015-03-11 Gary Benson <gbenson@redhat.com>
645
646 * configure.ac (AC_CHECK_MEMBERS): Add checks for
647 struct stat.st_blocks and struct stat.st_blksize.
648 * configure: Regenerate.
649 * config.in: Likewise.
650 * Makefile.in (SFILES): Add common/common-remote-fileio.c.
651 (OBS): Add common-remote-fileio.o.
652 (common-remote-fileio.o): New rule.
653
9a9df970
PA
6542015-03-09 Pedro Alves <palves@redhat.com>
655
656 * tracepoint.c (gdb_agent_helper_thread): Cast '&sockaddr' to
657 'struct sockaddr' pointer in 'accept' call.
658
9eb1356e
PA
6592015-03-09 Pedro Alves <palves@redhat.com>
660
661 Revert:
662 2015-03-07 Pedro Alves <palves@redhat.com>
663 * gdbreplay.c: No longer include <netinet/in.h>, <sys/socket.h>,
664 or <winsock2.h> here. Instead include "gdb_socket.h".
665 (remote_open): Use union gdb_sockaddr_u.
666 * remote-utils.c: No longer include <netinet/in.h>, <sys/socket.h>
667 or <winsock2.h> here. Instead include "gdb_socket.h".
668 (handle_accept_event, remote_prepare): Use union gdb_sockaddr_u.
669 * tracepoint.c: Include "gdb_socket.h" instead of <sys/socket.h>
670 or <sys/un.h>.
671 (init_named_socket, gdb_agent_helper_thread): Use union
672 gdb_sockaddr_u.
673
aac331e4
PA
6742015-03-07 Pedro Alves <palves@redhat.com>
675
676 * configure.ac (build_warnings): Move
677 -Wdeclaration-after-statement to the C-specific set.
678 * configure: Regenerate.
679
366c75fc
PA
6802015-03-07 Pedro Alves <palves@redhat.com>
681
682 * gdbreplay.c: No longer include <netinet/in.h>, <sys/socket.h>,
683 or <winsock2.h> here. Instead include "gdb_socket.h".
684 (remote_open): Use union gdb_sockaddr_u.
685 * remote-utils.c: No longer include <netinet/in.h>, <sys/socket.h>
686 or <winsock2.h> here. Instead include "gdb_socket.h".
687 (handle_accept_event, remote_prepare): Use union gdb_sockaddr_u.
688 * tracepoint.c: Include "gdb_socket.h" instead of <sys/socket.h>
689 or <sys/un.h>.
690 (init_named_socket, gdb_agent_helper_thread): Use union
691 gdb_sockaddr_u.
692
492d29ea
PA
6932015-03-07 Pedro Alves <palves@redhat.com>
694
695 Adjust all callers of TRY_CATCH to use TRY/CATCH/END_CATCH
696 instead.
697
60a191ed
YQ
6982015-03-06 Yao Qi <yao.qi@linaro.org>
699
700 * linux-aarch64-low.c (aarch64_insert_point): Use
701 show_debug_regs as a boolean.
702 (aarch64_remove_point): Likewise.
703
f5771b1d
PA
7042015-03-05 Pedro Alves <palves@redhat.com>
705
706 * lynx-low.c (lynx_target_ops): Install NULL hooks for
707 stopped_by_sw_breakpoint, supports_stopped_by_sw_breakpoint,
708 stopped_by_hw_breakpoint, supports_stopped_by_hw_breakpoint.
709 * nto-low.c (nto_target_ops): Likewise.
710 * spu-low.c (spu_target_ops): Likewise.
711 * win32-low.c (win32_target_ops): Likewise.
712
3e572f71
PA
7132015-03-04 Pedro Alves <palves@redhat.com>
714
72f4393d 715 * linux-low.c (check_stopped_by_breakpoint) [USE_SIGTRAP_SIGINFO]:
3e572f71
PA
716 Decide whether a breakpoint triggered based on the SIGTRAP's
717 siginfo.si_code.
72f4393d
L
718 (thread_still_has_status_pending_p) [USE_SIGTRAP_SIGINFO]: Don't check whether a
719 breakpoint is inserted if relying on SIGTRAP's siginfo.si_code.
3e572f71
PA
720 (linux_low_filter_event): Check for breakpoints before checking
721 watchpoints.
722 (linux_wait_1): Don't re-increment the PC if relying on SIGTRAP's
723 siginfo.si_code.
72f4393d
L
724 (linux_stopped_by_sw_breakpoint)
725 (linux_supports_stopped_by_sw_breakpoint)
726 (linux_stopped_by_hw_breakpoint)
727 (linux_supports_stopped_by_hw_breakpoint): New functions.
728 (linux_target_ops): Install new target methods.
3e572f71 729
1ec68e26
PA
7302015-03-04 Pedro Alves <palves@redhat.com>
731
732 * remote-utils.c (prepare_resume_reply): Report swbreak/hbreak.
733 * server.c (swbreak_feature, hwbreak_feature): New globals.
734 (handle_query) <qSupported>: Handle "swbreak+" and "hwbreak+".
735 (captured_main): Clear swbreak_feature and hwbreak_feature.
736 * server.h (swbreak_feature, hwbreak_feature): Declare.
737 * target.h (struct target_ops) <stopped_by_sw_breakpoint,
738 supports_stopped_by_sw_breakpoint, stopped_by_hw_breakpoint,
739 supports_stopped_by_hw_breakpoint>: New fields.
740 (target_supports_stopped_by_sw_breakpoint)
741 (target_stopped_by_sw_breakpoint)
742 (target_supports_stopped_by_hw_breakpoint)
743 (target_stopped_by_hw_breakpoint): Declare.
744
15c66dd6
PA
7452015-03-04 Pedro Alves <palves@redhat.com>
746
747 enum lwp_stop_reason -> enum target_stop_reason
748 * linux-low.c (check_stopped_by_breakpoint): Adjust.
749 (thread_still_has_status_pending_p, check_stopped_by_watchpoint)
750 (linux_wait_1, stuck_in_jump_pad_callback)
751 (move_out_of_jump_pad_callback, linux_resume_one_lwp)
752 (linux_stopped_by_watchpoint):
753 * linux-low.h (enum lwp_stop_reason): Delete.
754 (struct lwp_info) <stop_reason>: Now an enum target_stop_reason.
755 * linux-x86-low.c (x86_linux_prepare_to_resume): Adjust.
756
98fc70d6
YQ
7572015-03-04 Yao Qi <yao.qi@linaro.org>
758
759 * Makefile.in (SFILES): Add linux-aarch64-low.c.
760
dd2ac174
GB
7612015-03-03 Gary Benson <gbenson@redhat.com>
762
763 * hostio.c (handle_vFile): Fix prefix lengths.
764
d68e53f4
MM
7652015-03-03 Markus Metzger <markus.t.metzger@intel.com>
766
767 * linux-low.c (linux_low_enable_btrace): Do not overwrite non-zero
768 ptr_bits.
769
bf2d68ab
AA
7702015-03-02 Andreas Arnez <arnez@linux.vnet.ibm.com>
771
772 * Makefile.in (s390-vx-linux64.c, s390-tevx-linux64.c)
773 (s390x-vx-linux64.c, s390x-tevx-linux64.c): New rules.
774 (clean): Add "rm -f" for above C files.
775 * configure.srv (srv_regobj): Add s390-vx-linux64.o,
776 s390-tevx-linux64.o, s390x-vx-linux64.o, and s390x-tevx-linux64.o.
777 (srv_xmlfiles): Add s390-vx-linux64.xml, s390-tevx-linux64.xml,
778 s390x-vx-linux64.xml, s390x-tevx-linux64.xml, and s390-vx.xml.
779 * linux-s390-low.c (HWCAP_S390_VX): New macro.
780 (init_registers_s390_vx_linux64, init_registers_s390_tevx_linux64)
781 (init_registers_s390x_vx_linux64)
782 (init_registers_s390x_tevx_linux64)
783 (tdesc_s390_vx_linux64, tdesc_s390_tevx_linux64)
784 (tdesc_s390x_vx_linux64, tdesc_s390x_tevx_linux64): New extern
785 declarations.
786 (s390_fill_vxrs_low, s390_store_vxrs_low, s390_fill_vxrs_high)
787 (s390_store_vxrs_high): New functions.
788 (s390_regsets): Add entries for NT_S390_VXRS_LOW and
789 NT_S390_VXRS_HIGH.
790 (s390_arch_setup): Add logic for selecting one of the new target
791 descriptions. Activate the new vector regsets if applicable.
792 (initialize_low_arch): Also invoke init_registers_s390_vx_linux64,
793 init_registers_s390_tevx_linux64, init_registers_s390x_vx_linux64,
794 and init_registers_s390x_tevx_linux64.
795
c966a859
PA
7962015-03-01 Pedro Alves <palves@redhat.com>
797
798 * linux-i386-ipa.c (gdb_agent_get_raw_reg): Constify 'raw_regs'
799 parameter.
800
4180215b
PA
8012015-02-27 Pedro Alves <palves@redhat.com>
802
803 * linux-x86-low.c (u_debugreg_offset): New function.
804 (x86_linux_dr_get, x86_linux_dr_set): Use it.
805
749bab01
PA
8062015-02-27 Pedro Alves <palves@redhat.com>
807
808 * gdb_proc_service.h: Wrap with EXTERN_C_PUSH/EXTERN_C_POP.
809 [!HAVE_PROC_SERVICE_H] (struct ps_prochandle): Forward declare.
810 [!HAVE_PROC_SERVICE_H] (ps_pdread, ps_pdwrite, ps_ptread)
811 ps_ptwrite, ps_lgetregs, ps_lsetregs, ps_lgetfpregs)
812 (ps_lsetfpregs, ps_getpid)
813 (ps_get_thread_area, ps_pglobal_lookup, ps_pstop, ps_pcontinue)
814 (ps_lstop, ps_lcontinue, ps_lgetxregsize, ps_lgetxregs)
815 (ps_lsetxregs, ps_plog): Declare.
816
3c14e5a3
PA
8172015-02-27 Pedro Alves <palves@redhat.com>
818
819 * linux-amd64-ipa.c (gdb_agent_get_raw_reg): Use
820 IP_AGENT_EXPORT_FUNC.
821 * linux-i386-ipa.c (gdb_agent_get_raw_reg): Use
822 IP_AGENT_EXPORT_FUNC.
823 * tracepoint.c (ATTR_USED, ATTR_NOINLINE, ATTR_CONSTRUCTOR)
824 (IP_AGENT_EXPORT): Delete.
825 (gdb_tp_heap_buffer, gdb_jump_pad_buffer, gdb_jump_pad_buffer_end)
826 (gdb_trampoline_buffer, gdb_trampoline_buffer_end)
827 (gdb_trampoline_buffer_error, collecting, gdb_collect)
828 (stop_tracing, flush_trace_buffer, about_to_request_buffer_space)
829 (trace_buffer_is_full, stopping_tracepoint, expr_eval_result)
830 (error_tracepoint, tracepoints, tracing, trace_buffer_ctrl)
831 (trace_buffer_ctrl_curr, trace_buffer_lo, trace_buffer_hi)
832 (traceframe_read_count, traceframe_write_count)
833 (traceframes_created, trace_state_variables, get_raw_reg)
834 (get_trace_state_variable_value, set_trace_state_variable_value)
835 (ust_loaded, helper_thread_id, cmd_buf): Use
836 IPA_SYM_EXPORTED_NAME.
837 (stop_tracing, flush_trace_buffer): Use IP_AGENT_EXPORT_FUNC.
838 (tracepoints) Use IP_AGENT_EXPORT_VAR.
839 (stopping_tracepoint, trace_buffer_is_full, expr_eval_result): Use
840 IP_AGENT_EXPORT_VAR and wrap in EXTERN_C_PUSH/EXTERN_C_POP.
841 (last_tracepoint): Move into !IN_PROCESS_AGENT block.
842 (error_tracepoint): Use IP_AGENT_EXPORT_VAR and wrap in
843 EXTERN_C_PUSH/EXTERN_C_POP.
844 (trace_state_variables): Use IP_AGENT_EXPORT_VAR.
845 (trace_buffer_lo, trace_buffer_hi): Use IP_AGENT_EXPORT_VAR and
846 wrap in EXTERN_C_PUSH/EXTERN_C_POP.
847 (trace_buffer_ctrl, trace_buffer_ctrl_curr)
848 (traceframe_write_count, traceframe_read_count)
849 (traceframes_created, tracing): Use IP_AGENT_EXPORT_VAR.
850 (about_to_request_buffer_space, get_trace_state_variable_value)
851 (set_trace_state_variable_value): Use IP_AGENT_EXPORT_FUNC.
852 (collecting): Use IP_AGENT_EXPORT_VAR and wrap in
853 EXTERN_C_PUSH/EXTERN_C_POP.
854 (gdb_collect): Use IP_AGENT_EXPORT_FUNC.
855 (ust_loaded, cmd_buf): Use IP_AGENT_EXPORT_VAR.
856 (helper_thread_id, gdb_agent_capability): Use IP_AGENT_EXPORT_VAR
857 and wrap in EXTERN_C_PUSH/EXTERN_C_POP.
858 (gdb_tp_heap_buffer, gdb_jump_pad_buffer, gdb_jump_pad_buffer_end)
859 (gdb_trampoline_buffer, gdb_trampoline_buffer_end)
860 (gdb_trampoline_buffer_error): Use IP_AGENT_EXPORT_VAR.
861 * tracepoint.h (ATTR_USED, ATTR_NOINLINE, EXPORTED_SYMBOL):
862 Define.
863 (IP_AGENT_EXPORT_FUNC, IP_AGENT_EXPORT_VAR)
864 (IP_AGENT_EXPORT_VAR_DECL): Define.
865 (tracing): Declare.
866 (gdb_agent_get_raw_reg): Declare.
867
fe978cb0
PA
8682015-02-27 Tom Tromey <tromey@redhat.com>
869 Pedro Alves <palves@redhat.com>
870
871 Rename symbols whose names are reserved C++ keywords throughout.
872
3bc3d82a
PA
8732015-02-27 Pedro Alves <palves@redhat.com>
874
875 * Makefile.in (COMPILER): New, get it from autoconf.
876 (CXX): Get from autoconf instead.
877 (COMPILE.pre): Use COMPILER.
878 (CC-LD): Rename to ...
879 (CC_LD): ... this. Use COMPILER.
880 (gdbserver$(EXEEXT), gdbreplay$(EXEEXT), $(IPA_LIB)): Adjust.
881 (CXX_FOR_TARGET): Default to g++ instead of gcc.
882 * acinclude.m4: Include build-with-cxx.m4.
883 * configure.ac: Call AC_PROG_CXX and GDB_AC_BUILD_WITH_CXX.
884 Disable -Werror by default if building in C++ mode.
885 (build_warnings): Add -Wno-sign-compare, -Wno-write-strings and
886 -Wno-narrowing in C++ mode. Run supported-warning-flags tests with
887 the C++ compiler. Save/restore CXXFLAGS too.
888 * configure: Regenerate.
889
07697489
PA
8902015-02-27 Pedro Alves <palves@redhat.com>
891
892 * acinclude.m4: Include libiberty.m4.
893 * configure.ac: Call libiberty_INIT.
894 * config.in, configure: Regenerate.
895
9beb7c4e
PA
8962015-02-26 Pedro Alves <palves@redhat.com>
897
898 * linux-low.c (linux_wait_1): When incrementing the PC past a
899 program breakpoint always use the_low_target.breakpoint_len as
900 increment, rather than the maximum between that and
901 the_low_target.decr_pc_after_break.
902
8090aef2
PA
9032015-02-23 Pedro Alves <palves@redhat.com>
904
905 * linux-low.c (check_stopped_by_breakpoint): Don't check if the
906 thread was doing a step-over; always adjust the PC if
907 we stepped over a permanent breakpoint.
908 (linux_wait_1): If we stepped over breakpoint that was on top of a
909 permanent breakpoint, manually advance the PC past it.
910
bc9540e8
PA
9112015-02-23 Pedro Alves <palves@redhat.com>
912
913 * linux-x86-low.c (REGSIZE): Define in both 32-bit and 64-bit
914 modes.
915 (x86_fill_gregset, x86_store_gregset): Use it when handling
916 $orig_eax.
917
2db9a427
PA
9182015-02-20 Pedro Alves <palves@redhat.com>
919
920 * thread-db.c: Include "nat/linux-procfs.h".
921 (thread_db_init): Skip listing new threads if the kernel supports
922 PTRACE_EVENT_CLONE and /proc/PID/task/ is accessible.
923
afa8d396
PA
9242015-02-20 Pedro Alves <palves@redhat.com>
925
926 * linux-low.c (status_pending_p_callback): Use ptid_match.
927
c9587f88
AT
9282015-02-19 Antoine Tremblay <antoine.tremblay@ericsson.com>
929
930 PR breakpoints/16812
931 * linux-low.c (wstatus_maybe_breakpoint): Remove.
932 (linux_low_filter_event): Update wstatus_maybe_breakpoint name.
933 (linux_wait_1): Report SIGTRAP,SIGILL,SIGSEGV.
934
b05ec7a5
AT
9352015-02-10 Antoine Tremblay <antoine.tremblay@ericsson.com>
936
937 PR breakpoints/15956
938 * tracepoint.c (cmd_qtinit): Add check for current_thread.
939
d33501a5
MM
9402015-02-09 Markus Metzger <markus.t.metzger@intel.com>
941
942 * linux-low.c (linux_low_btrace_conf): Print size.
943 * server.c (handle_btrace_conf_general_set): New.
944 (hanle_general_set): Call handle_btrace_conf_general_set.
945 (handle_query): Report Qbtrace-conf:bts:size as supported.
946
f4abbc16
MM
9472015-02-09 Markus Metzger <markus.t.metzger@intel.com>
948
949 * linux-low.c (linux_low_enable_btrace): Update parameters.
950 (linux_low_btrace_conf): New.
951 (linux_target_ops)<to_btrace_conf>: Initialize.
952 * server.c (current_btrace_conf): New.
953 (handle_btrace_enable): Rename to ...
954 (handle_btrace_enable_bts): ... this. Pass &current_btrace_conf
955 to target_enable_btrace. Update comment. Update users.
956 (handle_qxfer_btrace_conf): New.
957 (qxfer_packets): Add btrace-conf entry.
958 (handle_query): Report qXfer:btrace-conf:read as supported packet.
959 * target.h (target_ops)<enable_btrace>: Update parameters and comment.
960 (target_ops)<read_btrace_conf>: New.
961 (target_enable_btrace): Update parameters.
962 (target_read_btrace_conf): New.
963
043c3577
MM
9642015-02-09 Markus Metzger <markus.t.metzger@intel.com>
965
966 * server.c (handle_btrace_general_set): Remove call to
967 target_supports_btrace.
968 (supported_btrace_packets): New.
969 (handle_query): Call supported_btrace_packets.
970 * target.h: include btrace-common.h.
971 (btrace_target_info): Removed.
972 (supports_btrace, target_supports_btrace): Update parameters.
973
734b0e4b
MM
9742015-02-09 Markus Metzger <markus.t.metzger@intel.com>
975
976 * Makefile.in (SFILES): Add common/btrace-common.c.
977 (OBS): Add common/btrace-common.o.
978 (btrace-common.o): Add build rules.
979 * linux-low: Include btrace-common.h.
980 (linux_low_read_btrace): Use struct btrace_data. Call
981 btrace_data_init and btrace_data_fini.
982
d6c146e9
PA
9832015-02-06 Pedro Alves <palves@redhat.com>
984
985 * thread-db.c (find_new_threads_callback): Add debug output.
986
20ba1ce6
PA
9872015-02-04 Pedro Alves <palves@redhat.com>
988
989 * linux-low.c (handle_extended_wait): Don't resume LWPs here.
990 (resume_stopped_resumed_lwps): New function.
991 (linux_wait_for_event_filtered): Use it.
992
8cc73a39
SDJ
9932015-01-15 Sergio Durigan Junior <sergiodj@redhat.com>
994
995 * Makefile.in (SFILES): Add linux-personality.c.
996 (linux-personality.o): New rule.
997 * configure.srv (srv_linux_obj): Add linux-personality.o to the
998 list of objects to be built.
999 * linux-low.c: Include nat/linux-personality.h.
1000 (linux_create_inferior): Remove code to disable address space
1001 randomization (moved to ../nat/linux-personality.c). Create
1002 cleanup to disable address space randomization.
1003
fb23d554
SDJ
10042015-01-15 Sergio Durigan Junior <sergiodj@redhat.com>
1005
1006 * Makefile.in (posix-strerror.o): New rule.
1007 (mingw-strerror.o): Likewise.
1008 * configure: Regenerated.
1009 * configure.ac: Source file ../common/common.host. Initialize new
1010 variable srv_host_obs. Add srv_host_obs to GDBSERVER_DEPFILES.
1011
cdf43629
YQ
10122015-01-14 Yao Qi <yao@codesourcery.com>
1013
1014 * Makefile.in (SFILES): Add nat/ppc-linux.c.
1015 (ppc-linux.o): New rule.
1016 * configure.srv (powerpc*-*-linux*): Add ppc-linux.o.
1017 * configure.ac: AC_CHECK_FUNCS(getauxval).
1018 * config.in: Re-generated.
1019 * configure: Re-generated.
1020 * linux-ppc-low.c (ppc_arch_setup) [__powerpc64__]: Call
1021 ppc64_64bit_inferior_p
1022
514c5338
YQ
10232015-01-14 Yao Qi <yao@codesourcery.com>
1024
1025 * linux-ppc-low.c: Include "nat/ppc-linux.h".
1026 (PPC_FEATURE_HAS_VSX): Move to nat/ppc-linux.h.
1027 (PPC_FEATURE_HAS_ALTIVEC, PPC_FEATURE_HAS_SPE): Likewise.
1028 (PT_ORIG_R3, PT_TRAP): Likewise.
1029 (PTRACE_GETVSXREGS, PTRACE_SETVSXREGS): Likewise.
1030 (PTRACE_GETVRREGS, PTRACE_SETVRREGS): Likewise.
1031 (PTRACE_GETEVRREGS, PTRACE_SETEVRREGS): Likewise.
1032
3368c1e5
JB
10332015-01-10 Joel Brobecker <brobecker@adacore.com>
1034
1035 * i387-fp.c (i387_cache_to_xsave): In look over
1036 num_avx512_zmmh_high_registers, replace use of struct i387_xsave
1037 zmmh_low_space field by use of zmmh_high_space.
1038
582511be
PA
10392015-01-09 Pedro Alves <palves@redhat.com>
1040
1041 * linux-low.c (step_over_bkpt): Move higher up in the file.
1042 (handle_extended_wait): Don't store the stop_pc here.
1043 (get_stop_pc): Adjust comments and rename to ...
1044 (check_stopped_by_breakpoint): ... this. Record whether the LWP
1045 stopped for a software breakpoint or hardware breakpoint.
1046 (thread_still_has_status_pending_p): New function.
1047 (status_pending_p_callback): Use
1048 thread_still_has_status_pending_p. If the event is no longer
1049 interesting, resume the LWP.
1050 (handle_tracepoints): Add assert.
1051 (maybe_move_out_of_jump_pad): Remove cancel_breakpoints call.
1052 (wstatus_maybe_breakpoint): New function.
1053 (cancel_breakpoint): Delete function.
1054 (check_stopped_by_watchpoint): New function, factored out from
1055 linux_low_filter_event.
1056 (lp_status_maybe_breakpoint): Delete function.
1057 (linux_low_filter_event): Remove filter_ptid argument.
1058 Leave thread group exits pending here. Store the LWP's stop PC.
1059 Always leave events pending.
1060 (linux_wait_for_event_filtered): Pull all events out of the
1061 kernel, and leave them all pending.
1062 (count_events_callback, select_event_lwp_callback): Consider all
1063 events.
1064 (cancel_breakpoints_callback, linux_cancel_breakpoints): Delete.
1065 (select_event_lwp): Only give preference to the stepping LWP in
1066 all-stop mode. Adjust comments.
1067 (ignore_event): New function.
1068 (linux_wait_1): Delete 'retry' label. Use ignore_event. Remove
1069 references to cancel_breakpoints. Adjust to renames. Also give
1070 equal priority to all LWPs that have had events in non-stop mode.
1071 If reporting a software breakpoint event, unadjust the LWP's PC.
1072 (linux_wait): If linux_wait_1 returned an ignored event, retry.
1073 (stuck_in_jump_pad_callback, move_out_of_jump_pad_callback):
1074 Adjust.
1075 (linux_resume_one_lwp): Store the LWP's PC. Adjust.
1076 (resume_status_pending_p): Use thread_still_has_status_pending_p.
1077 (linux_stopped_by_watchpoint): Adjust.
1078 (linux_target_ops): Remove reference to linux_cancel_breakpoints.
1079 * linux-low.h (enum lwp_stop_reason): New.
1080 (struct lwp_info) <stop_pc>: Adjust comment.
1081 <stopped_by_watchpoint>: Delete field.
1082 <stop_reason>: New field.
1083 * linux-x86-low.c (x86_linux_prepare_to_resume): Adjust.
1084 * mem-break.c (software_breakpoint_inserted_here)
1085 (hardware_breakpoint_inserted_here): New function.
1086 * mem-break.h (software_breakpoint_inserted_here)
1087 (hardware_breakpoint_inserted_here): Declare.
1088 * target.h (struct target_ops) <cancel_breakpoints>: Remove field.
1089 (cancel_breakpoints): Delete.
1090 * tracepoint.c (clear_installed_tracepoints, stop_tracing)
1091 (upload_fast_traceframes): Remove references to
1092 cancel_breakpoints.
1093
a33e3959
PA
10942015-01-09 Pedro Alves <palves@redhat.com>
1095
1096 * thread-db.c (find_new_threads_callback): Ignore thread if the
1097 kernel thread ID is -1.
1098
8784d563
PA
10992015-01-09 Pedro Alves <palves@redhat.com>
1100
1101 * linux-low.c (linux_attach_fail_reason_string): Move to
1102 nat/linux-ptrace.c, and rename.
1103 (linux_attach_lwp): Update comment.
1104 (attach_proc_task_lwp_callback): New function.
1105 (linux_attach): Adjust to rename and use
1106 linux_proc_attach_tgid_threads.
1107 (linux_attach_fail_reason_string): Delete declaration.
1108
76f2b779
JB
11092015-01-01 Joel Brobecker <brobecker@adacore.com>
1110
1111 * gdbreplay.c (gdbreplay_version): Update copyright year to 2015.
1112 * server.c (gdbserver_version): Likewise.
1113
fafcc06a
SDJ
11142014-12-29 Sergio Durigan Junior <sergiodj@redhat.com>
1115
1116 * remote-utils.c: Include ctype.h.
1117 (input_interrupt): Explicitly handle the case when the char
1118 received is the NUL byte. Improve the printing of non-ASCII
1119 characters.
1120
beed38b8
JB
11212014-12-16 Joel Brobecker <brobecker@adacore.com>
1122
1123 * linux-low.c (linux_low_filter_event): Update call to
1124 linux_enable_event_reporting following the addition of
1125 a new parameter to that function.
1126
bf330350
CU
11272014-12-16 Catalin Udma <catalin.udma@freescale.com>
1128
1129 PR server/17457
1130 * linux-aarch64-low.c (AARCH64_FPSR_REGNO): New define.
1131 (AARCH64_FPCR_REGNO): Likewise.
1132 (AARCH64_NUM_REGS): Update to include fpsr/fpcr registers.
1133 (aarch64_fill_fpregset): Add missing fpsr/fpcr registers.
1134 (aarch64_store_fpregset): Likewise.
1135
5227d625
JB
11362014-12-15 Joel Brobecker <brobecker@adacore.com>
1137
1138 * lynx-low.c (lynx_resume): Use PTRACE_SINGLESTEP_ONE if N == 1.
1139 Remove FIXME comment about assumption about N.
1140
f93b65a0
JB
11412014-12-13 Joel Brobecker <brobecker@adacore.com>
1142
1143 * configure.ac: If large-file support is disabled in GDBserver,
1144 pass --disable-largefile to ACX_CONFIGURE_DIR call for "gnulib".
1145 * configure: Regenerate.
1146
e5a9158d
AA
11472014-12-12 Andreas Arnez <arnez@linux.vnet.ibm.com>
1148
1149 * linux-low.c (regsets_fetch_inferior_registers): Suppress the
1150 warning upon ENODATA from ptrace.
1151 * linux-s390-low.c (s390_store_tdb): New.
1152 (s390_regsets): Add regset for NT_S390_TDB.
1153
feea5f36
AA
11542014-12-12 Andreas Arnez <arnez@linux.vnet.ibm.com>
1155
1156 * linux-low.c (regsets_store_inferior_registers): Skip regsets
1157 without a fill_function.
1158 * linux-s390-low.c (s390_fill_last_break): Remove.
1159 (s390_regsets): Set fill_function to NULL for NT_S390_LAST_BREAK.
1160 (s390_arch_setup): Use regset's size instead of fill_function for
1161 loop end condition.
1162
098dbe61
AA
11632014-12-12 Andreas Arnez <arnez@linux.vnet.ibm.com>
1164
1165 * linux-low.c (regsets_fetch_inferior_registers): Do not invoke
1166 the regset's store function when ptrace returned an error.
1167 * regcache.c (get_thread_regcache): Invalidate register cache
1168 before fetching inferior's registers.
1169
28eef672
AA
11702014-12-12 Andreas Arnez <arnez@linux.vnet.ibm.com>
1171
1172 * linux-low.c (regsets_fetch_inferior_registers): Rephrase
1173 while-loop as for-loop.
1174 (regsets_store_inferior_registers): Likewise.
1175
bdca27a2
YQ
11762014-11-28 Yao Qi <yao@codesourcery.com>
1177
1178 * configure.ac(AC_CHECK_FUNCS): Remove readlink.
1179 * config.in, configure: Re-generate.
1180 * hostio.c (handle_unlink): Remove code checking HAVE_READLINK
1181 is defined.
1182
9c232dda
YQ
11832014-11-21 Yao Qi <yao@codesourcery.com>
1184
1185 * configure.ac: Don't invoke AC_FUNC_ALLOCA.
1186 (AC_CHECK_HEADERS): Remove malloc.h.
1187 * configure: Re-generated.
1188 * config.in: Re-generated.
1189 * server.h: Don't include alloca.h and malloc.h.
1190 * gdbreplay.c: Don't check HAVE_ALLOCA_H is defined.
1191 Don't include malloc.h.
1192
43968415
JB
11932014-11-17 Joel Brobecker <brobecker@adacore.com>
1194
1195 * lynx-low.c (lynx_write_memory): Put lynx_read_memory and
1196 corresponding ERRNO check in same block.
1197
40e91bc7
PA
11982014-11-12 Pedro Alves <palves@redhat.com>
1199
1200 * server.c (cont_thread): Update comment.
1201 (start_inferior, attach_inferior): No longer clear cont_thread.
1202 (handle_v_cont): No longer set cont_thread.
1203 (captured_main): Clear cont_thread each time a GDB connects.
1204
c2c118cf
PA
12052014-11-12 Pedro Alves <palves@redhat.com>
1206
1207 * linux-low.c (linux_wait_1): Don't force a wait for the Hc
1208 thread, and don't resume all threads if the Hc thread has exited.
1209
78708b7c
PA
12102014-11-12 Pedro Alves <palves@redhat.com>
1211
1212 * linux-low.c (linux_request_interrupt): Always send a SIGINT to
1213 the process group instead of to a specific LWP.
1214
a2abc7de
PA
12152014-10-15 Pedro Alves <palves@redhat.com>
1216
1217 PR server/17487
1218 * win32-arm-low.c (arm_set_thread_context): Remove current_event
1219 parameter.
1220 (arm_set_thread_context): Delete.
1221 (the_low_target): Adjust.
1222 * win32-i386-low.c (debug_registers_changed)
1223 (debug_registers_used): Delete.
1224 (update_debug_registers_callback): New function.
1225 (x86_dr_low_set_addr, x86_dr_low_set_control): Mark all threads as
1226 needing to update their debug registers.
1227 (win32_get_current_dr): New function.
1228 (x86_dr_low_get_addr, x86_dr_low_get_control)
1229 (x86_dr_low_get_status): Fetch the debug register from the thread
1230 record's context.
1231 (i386_initial_stuff): Adjust.
1232 (i386_get_thread_context): Remove current_event parameter. Don't
1233 clear debug_registers_changed nor copy DR values to
1234 debug_reg_state.
1235 (i386_set_thread_context): Delete.
1236 (i386_prepare_to_resume): New function.
1237 (i386_thread_added): Mark the thread as needing to update irs
1238 debug registers.
1239 (the_low_target): Remove i386_set_thread_context and install
1240 i386_prepare_to_resume.
1241 * win32-low.c (win32_get_thread_context): Adjust.
1242 (win32_set_thread_context): Use SetThreadContext
1243 directly.
1244 (win32_prepare_to_resume): New function.
1245 (win32_require_context): New function, factored out from ...
1246 (thread_rec): ... this.
1247 (continue_one_thread): Call win32_prepare_to_resume on each thread
1248 we're about to continue.
1249 (win32_resume): Call win32_prepare_to_resume on the event thread.
1250 * win32-low.h (struct win32_thread_info)
1251 <debug_registers_changed>: New field.
1252 (struct win32_target_ops): Change prototype of set_thread_context,
1253 delete set_thread_context and add prepare_to_resume.
1254 (win32_require_context): New declaration.
1255
a442d071
GB
12562014-10-08 Gary Benson <gbenson@redhat.com>
1257
1258 * server.h: Do not include common-exceptions.h.
1259
6f1947e8
GB
12602014-10-08 Gary Benson <gbenson@redhat.com>
1261
1262 * server.h: Do not include cleanups.h.
1263
63b434a4
JH
12642014-09-30 James Hogan <james.hogan@imgtec.com>
1265
1266 * Makefile.in (clean): Add rm -f commands for mips-dsp-linux.c and
1267 mips64-dsp-linux.c.
1268
c4d9ceb6
YQ
12692014-09-23 Yao Qi <yao@codesourcery.com>
1270
1271 * linux-low.c (lp_status_maybe_breakpoint): New function.
1272 (linux_low_filter_event): Call lp_status_maybe_breakpoint.
1273 (count_events_callback): Likewise.
1274 (select_event_lwp_callback): Likewise.
1275 (cancel_breakpoints_callback): Likewise.
1276
89a5711c
DB
12772014-09-19 Don Breazeal <donb@codesourcery.com>
1278
1279 * linux-low.c (handle_extended_wait): Call
1280 linux_ptrace_get_extended_event.
1281 (get_stop_pc, get_detach_signal, linux_low_filter_event): Call
1282 linux_is_extended_waitstatus.
1283
bffc0964
JB
12842014-09-16 Joel Brobecker <brobecker@adacore.com>
1285
1286 * Makefile.in (CPPFLAGS): Define.
1287 (INTERNAL_CFLAGS_BASE): Add ${CPPFLAGS}.
1288 (IPAGENT_CFLAGS): Remove ${CPPFLAGS}.
1289
0bfdf32f
GB
12902014-09-16 Gary Benson <gbenson@redhat.com>
1291
1292 * inferiors.h (current_inferior): Renamed as...
1293 (current_thread): New variable. All uses updated.
1294 * linux-low.c (get_pc): Renamed saved_inferior as saved_thread.
1295 (maybe_move_out_of_jump_pad): Likewise.
1296 (cancel_breakpoint): Likewise.
1297 (linux_low_filter_event): Likewise.
1298 (wait_for_sigstop): Likewise.
1299 (linux_resume_one_lwp): Likewise.
1300 (need_step_over_p): Likewise.
1301 (start_step_over): Likewise.
1302 (linux_stabilize_threads): Renamed save_inferior as saved_thread.
1303 * linux-x86-low.c (x86_linux_update_xmltarget): Likewise.
1304 * proc-service.c (ps_lgetregs): Renamed reg_inferior as reg_thread
1305 and save_inferior as saved_thread.
1306 * regcache.c (get_thread_regcache): Renamed saved_inferior as
1307 saved_thread.
1308 (regcache_invalidate_thread): Likewise.
1309 * remote-utils.c (prepare_resume_reply): Likewise.
1310 * thread-db.c (thread_db_get_tls_address): Likewise.
1311 (disable_thread_event_reporting): Likewise.
1312 (remove_thread_event_breakpoints): Likewise.
1313 * tracepoint.c (gdb_agent_about_to_close): Renamed save_inferior
1314 as saved_thread.
1315 * target.h (set_desired_inferior): Renamed as...
1316 (set_desired_thread): New declaration. All uses updated.
1317 * server.c (myresume): Updated comment to reference thread instead
1318 of inferior.
1319 (handle_serial_event): Likewise.
1320 (handle_target_event): Likewise.
1321
361c8ade
GB
13222014-09-12 Tom Tromey <tromey@redhat.com>
1323 Gary Benson <gbenson@redhat.com>
1324
1325 * regcache.h: Include common-regcache.h.
1326 (regcache_read_pc): Don't declare.
1327 * regcache.c (get_thread_regcache_for_ptid): New function.
1328
bd9269f7
GB
13292014-09-11 Tom Tromey <tromey@redhat.com>
1330 Gary Benson <gbenson@redhat.com>
1331
1332 * symbol.c: New file.
1333 * Makefile.in (SFILES): Add symbol.c.
1334 (OBS): Add symbol.o.
1335
f8c1d06b
GB
13362014-09-11 Gary Benson <gbenson@redhat.com>
1337
1338 * target.c (target_stop_ptid, target_continue_ptid): New
1339 functions.
1340
721ec300
GB
13412014-09-11 Tom Tromey <tromey@redhat.com>
1342 Gary Benson <gbenson@redhat.com>
1343
1344 * target.h: Include target/target.h.
1345 * target.c (target_read_memory, target_read_uint32)
1346 (target_write_memory): New functions.
1347
c5e92cca
GB
13482014-09-11 Gary Benson <gbenson@redhat.com>
1349
1350 * server.h (debug_hw_points): Don't declare.
1351 * server.c (debug_hw_points): Don't define. Replace all uses
1352 with show_debug_regs.
1353 * linux-aarch64-low.c (debug_hw_points): Don't define. Replace
1354 all uses with show_debug_regs.
1355
2e4bb98a
EBM
13562014-09-08 Edjunior Barbosa Machado <emachado@linux.vnet.ibm.com>
1357
1358 * linux-ppc-low.c (ppc_collect_ptrace_register): Adjust routine to take
1359 endianness into account.
1360 (ppc_supply_ptrace_register): Likewise.
1361
ac740bc7
JH
13622014-09-03 James Hogan <james.hogan@imgtec.com>
1363
1364 * linux-mips-low.c (mips_read_description): Reset errno to 0 prior
1365 to reading DSP_CONTROL with PTRACE_PEEKUSER ptrace call.
1366
97ea6506
GB
13672014-09-03 Gary Benson <gbenson@redhat.com>
1368
1369 * linux-x86-low.c (x86_linux_prepare_to_resume): Use
1370 ALL_DEBUG_ADDRESS_REGISTERS.
1371
df7e5265
GB
13722014-09-02 Gary Benson <gbenson@redhat.com>
1373
1374 * i386-low.h: Renamed as...
1375 * x86-low.h: New file. All type, function and variable name
1376 prefixes changed from "i386_" to "x86_". All references updated.
1377 * i386-low.c: Renamed as...
1378 * x86-low.c: New file. All type, function and variable name
1379 prefixes changed from "i386_" to "x86_". All references updated.
1380
ed859da7
GB
13812014-09-02 Gary Benson <gbenson@redhat.com>
1382
1383 * linux-x86-low.c (x86_linux_new_process): Use XCNEW.
1384 (x86_linux_new_thread): Likewise.
1385
860789c7
GB
13862014-08-29 Gary Benson <gbenson@redhat.com>
1387
1388 * server.h (setjmp.h): Do not include.
1389 (toplevel): Do not declare.
1390 (common-exceptions.h): Include.
1391 (cleanups.h): Likewise.
1392 * server.c (toplevel): Do not define.
1393 (exit_code): New static global.
1394 (detach_or_kill_for_exit_cleanup): New function.
1395 (main): New function. Original main renamed to...
1396 (captured_main): New function.
1397 * utils.c (verror) [!IN_PROCESS_AGENT]: Use throw_verror.
1398
ff55e1b5
GB
13992014-08-29 Gary Benson <gbenson@redhat.com>
1400
1401 * Makefile.in (SFILES): Add common/common-exceptions.c.
1402 (OBS): Add common-exceptions.o.
1403 (common-exceptions.o): New rule.
1404 * utils.c (prepare_to_throw_exception): New function.
1405
e9bcb658
GB
14062014-08-29 Gary Benson <gbenson@redhat.com>
1407
1408 * config.in: Regenerate.
1409 * configure: Likewise.
1410
e3180625
GB
14112014-08-29 Gary Benson <gbenson@redhat.com>
1412
1413 * Makefile.in (SFILES): Add common/cleanups.c.
1414 (OBS): cleanups.o.
1415 (cleanups.o): New rule.
1416
e3d6ba5d
GB
14172014-08-29 Gary Benson <gbenson@redhat.com>
1418
1419 * utils.c (internal_vwarning): New function.
1420
7096e886
GB
14212014-08-28 Gary Benson <gbenson@redhat.com>
1422
1423 * utils.h (fatal): Remove declaration.
1424 * utils.c (fatal): Remove function.
1425
14ce3192
GB
14262014-08-28 Gary Benson <gbenson@redhat.com>
1427
1428 * tracepoint.c (gdb_agent_init): Replace fatal with
1429 perror_with_name.
1430 (initialize_tracepoint): Likewise.
1431
50278d59
GB
14322014-08-28 Gary Benson <gbenson@redhat.com>
1433
1434 * remote-utils.c (remote_prepare): Replace fatal with error.
1435
aa96c426
GB
14362014-08-28 Gary Benson <gbenson@redhat.com>
1437
1438 * linux-low.c (linux_async): Replace fatal with warning.
1439 Tidy up and return.
1440 (linux_start_non_stop): Return -1 if linux_async failed.
1441
f7160e97
GB
14422014-08-28 Gary Benson <gbenson@redhat.com>
1443
1444 * linux-x86-low.c (i386_dr_low_set_addr): Replace check with
1445 gdb_assert.
1446 (i386_dr_low_get_addr): Remove vague comment.
1447 * win32-i386-low.c (i386_dr_low_set_addr): Replace check with
1448 gdb_assert.
1449
38e08fca
GB
14502014-08-28 Gary Benson <gbenson@redhat.com>
1451
1452 * inferiors.c (get_thread_process): Replace check with gdb_assert.
1453 * linux-low.c (linux_wait_for_event_filtered): Replace fatal with
1454 internal_error.
1455 (linux_resume_one_lwp): Likewise.
1456 * linux-x86-low.c (x86_siginfo_fixup): Replace checks with
1457 gdb_assert.
1458 * mem-break.c (raw_bkpt_type_to_target_hw_bp_type): Replace fatal
1459 with internal_error.
1460 * regcache.c (get_thread_regcache): Replace check with gdb_assert.
1461 (init_register_cache): Replace fatal with gdb_assert_not_reached.
1462 (find_register_by_name): Replace fatal with internal_error.
1463 (find_regno): Likewise.
1464 * tdesc.c (init_target_desc): Replace check with gdb_assert.
1465 * thread-db.c (thread_db_create_event): Likewise.
1466 (thread_db_load_search): Likewise.
1467 (try_thread_db_load_1): Likewise.
1468 * tracepoint.c (get_jump_space_head): Replace fatal with
1469 internal_error.
1470 (claim_trampoline_space): Likewise.
1471 (have_fast_tracepoint_trampoline_buffer): Likewise.
1472 (cmd_qtstart): Likewise.
1473 (stop_tracing): Likewise.
1474 (fast_tracepoint_collecting): Likewise.
1475 (target_malloc): Likewise.
1476 (download_tracepoint): Likewise.
1477 (download_trace_state_variables): Replace check with gdb_assert.
1478 (upload_fast_traceframes): Replace fatal with internal_error.
1479
34abf635
GB
14802014-08-19 Tom Tromey <tromey@redhat.com>
1481 Gary Benson <gbenson@redhat.com>
1482
1483 * Makefile.in (SFILES): Add common/common-debug.c.
1484 (OBS): Add common-debug.o.
1485 (common-debug.o): New rule.
1486 * debug.h (debug_printf): Don't declare.
1487 * debug.c (debug_printf): Renamed and rewritten as...
1488 (debug_vprintf): New function.
1489
f6e94d78
GB
14902014-08-19 Gary Benson <gbenson@redhat.com>
1491
1492 * utils.h: Do not include print-utils.h.
1493
9239eeab
GB
14942014-08-19 Tom Tromey <tromey@redhat.com>
1495 Gary Benson <gbenson@redhat.com>
1496
1497 * server.h: Add static assertion.
1498 (gdb_byte, CORE_ADDR, LONGEST, ULONGEST): Remove.
1499
ef87c8bb
GB
15002014-08-19 Tom Tromey <tromey@redhat.com>
1501 Gary Benson <gbenson@redhat.com>
1502
1503 * Makefile.in (SFILES): Add common/errors.c.
1504 (OBS): Add errors.o.
1505 (IPA_OBS): Add errors-ipa.o.
1506 (errors.o): New rule.
1507 (errors-ipa.o): Likewise.
1508 * utils.h (perror_with_name, error, warning): Don't declare.
1509 * utils.c (warning): Renamed and rewritten as...
1510 (vwarning): New function.
1511 (error): Renamed and rewritten as...
1512 (verror): New function.
1513 (internal_error): Renamed and rewritten as...
1514 (internal_verror): New function.
1515
bb974a24
GB
15162014-08-07 Gary Benson <gbenson@redhat.com>
1517
1518 * configure.ac (AC_CHECK_HEADERS): Remove errno.h.
1519 * configure: Regenerate.
1520 * config.in: Likewise.
1521 * server.h: Do not include errno.h.
1522 * event-loop.c: Likewise.
1523 * hostio-errno.c: Likewise.
1524 * linux-low.c: Likewise.
1525 * remote-utils.c: Likewise.
1526 * spu-low.c: Likewise.
1527 * utils.c: Likewise.
1528 * gdbreplay.c: Unconditionally include errno.h.
1529
6d3d12eb
GB
15302014-08-07 Gary Benson <gbenson@redhat.com>
1531
1532 * server.h: Do not include string.h.
1533 * event-loop.c: Likewise.
1534 * linux-low.c: Likewise.
1535 * regcache.c: Likewise.
1536 * remote-utils.c: Likewise.
1537 * spu-low.c: Likewise.
1538 * utils.c: Likewise.
1539
dccbb609
GB
15402014-08-07 Gary Benson <gbenson@redhat.com>
1541
1542 * server.h: Do not include gdb_assert.h.
1543
e76df0d0
GB
15442014-08-07 Gary Benson <gbenson@redhat.com>
1545
1546 * server.h: Do not include common-utils.h.
1547
4cb9c816
GB
15482014-08-07 Gary Benson <gbenson@redhat.com>
1549
1550 * server.h: Do not include ptid.h.
1551 * notif.h: Likewise.
1552
3995eeee
GB
15532014-08-07 Gary Benson <gbenson@redhat.com>
1554
1555 * server.h: Do not include gdb_locale.h.
1556
cb9f1a9b
GB
15572014-08-07 Gary Benson <gbenson@redhat.com>
1558
1559 * server.h: Do not include gdb/signals.h.
1560 * win32-low.c: Likewise.
1561
a5fceff8
GB
15622014-08-07 Gary Benson <gbenson@redhat.com>
1563
1564 * server.h: Do not include pathmax.h.
1565
b9391142
GB
15662014-08-07 Gary Benson <gbenson@redhat.com>
1567
1568 * server.h: Do not include libiberty.h.
1569 * linux-bfin-low.c: Likewise.
1570
0e443c87
GB
15712014-08-07 Gary Benson <gbenson@redhat.com>
1572
1573 * server.h: Do not include ansidecl.h.
1574
8ebb3f56
GB
15752014-08-07 Gary Benson <gbenson@redhat.com>
1576
1577 * linux-x86-low.c: Do not include stddef.h.
1578 * lynx-ppc-low.c: Likewise.
1579 * tracepoint.c: Likewise.
1580
8980bdf6
GB
15812014-08-07 Gary Benson <gbenson@redhat.com>
1582
1583 * server.h: Do not include stdarg.h.
1584 * nto-low.c: Likewise.
1585
d7096f71
GB
15862014-08-07 Gary Benson <gbenson@redhat.com>
1587
1588 * server.h: Do not include stdlib.h.
1589 * inferiors.c: Likewise.
1590 * linux-low.c: Likewise.
1591 * regcache.c: Likewise.
1592 * spu-low.c: Likewise.
1593 * tracepoint.c: Likewise.
1594 * utils.c: Likewise.
1595
d02f550d
GB
15962014-08-07 Gary Benson <gbenson@redhat.com>
1597
1598 * server.h: Do not include stdio.h.
1599 * linux-low.c: Likewise.
1600 * remote-utils.c: Likewise.
1601 * spu-low.c: Likewise.
1602 * utils.c: Likewise.
1603 * wincecompat.c: Likewise.
1604
87f6c4e3
GB
16052014-08-06 Gary Benson <gbenson@redhat.com>
1606
1607 * regcache.c (init_register_cache): Move conditionals inside if.
1608
7089dca4
GB
16092014-08-06 Gary Benson <gbenson@redhat.com>
1610
1611 * linux-low.c (linux_supports_non_stop): Use target_is_async_p.
1612
462f517e
GB
16132014-07-31 Gary Benson <gbenson@redhat.com>
1614
1615 * ax.h: Do not include server.h.
1616 * gdbthread.h: Likewise.
1617 * lynx-low.h: Likewise.
1618 * notif.h: Likewise.
1619
976411d6
GB
16202014-07-30 Gary Benson <gbenson@redhat.com>
1621
1622 * server.h: Include common-defs.h.
1623 Do not include config.h or build-gnulib-gdbserver/config.h.
1624
d41f6d8e
GB
16252014-07-30 Gary Benson <gbenson@redhat.com>
1626
1627 * hostio-errno.c: Move server.h to top of includes list.
1628 * inferiors.c: Likewise.
1629 * linux-x86-low.c: Likewise.
1630 * notif.c: Include server.h.
1631
314c6a35
TT
16322014-07-24 Tom Tromey <tromey@redhat.com>
1633 Gary Benson <gbenson@redhat.com>
1634
1635 * server.h (CORE_ADDR): Now unsigned.
1636
69ff6be5
PA
16372014-07-16 Pedro Alves <palves@redhat.com>
1638
1639 * linux-low.c (linux_kill_one_lwp): Use kill_lwp, not kill.
1640
ce9e3fe7
PA
16412014-07-15 Pedro Alves <palves@redhat.com>
1642
1643 * linux-low.c (linux_kill_one_lwp): Save errno and work with saved
1644 copy.
1645
e76126e8
PA
16462014-07-11 Pedro Alves <palves@redhat.com>
1647
1648 * linux-low.c (kill_wait_lwp): New function, based on
1649 kill_one_lwp_callback, but use my_waitpid directly.
1650 (kill_one_lwp_callback, linux_kill): Use it.
1651
8e9db26e
PA
16522014-06-23 Pedro Alves <palves@redhat.com>
1653
1654 * linux-x86-low.c (x86_linux_prepare_to_resume): Clear DR_CONTROL
1655 before setting DR0..DR3.
1656
698b3e08
GB
16572014-06-20 Gary Benson <gbenson@redhat.com>
1658
1659 * configure.ac (AC_REPLACE_FUNCS) <vasprintf, vsnprintf>: Removed.
1660 * configure: Regenerated.
1661 * config.in: Likewise.
1662
125f8a3d
GB
16632014-06-20 Gary Benson <gbenson@redhat.com>
1664
1665 * Makefile.in (SFILES): Update locations for files moved
1666 from common to nat.
1667 (object file files): Reordered.
1668
42995dbd
GB
16692014-06-20 Gary Benson <gbenson@redhat.com>
1670
1671 * i386-low.h (i386_dr_low_can_set_addr): Removed.
1672 (i386_dr_low_set_addr): Likewise.
1673 (i386_dr_low_get_addr): Likewise.
1674 (i386_dr_low_can_set_control): Likewise.
1675 (i386_dr_low_set_control): Likewise.
1676 (i386_dr_low_get_control): Likewise.
1677 (i386_dr_low_get_status): Likewise.
1678 (i386_get_debug_register_length): Likewise.
1679 * linux-x86-low.c (i386_dr_low_set_addr):
1680 Changed signature. Made static.
1681 (i386_dr_low_get_addr): Likewise.
1682 (i386_dr_low_set_control): Likewise.
1683 (i386_dr_low_get_control): Likewise.
1684 (i386_dr_low_get_status): Likewise.
1685 (i386_dr_low): New global variable.
1686 * win32-i386-low.c (i386_dr_low_set_addr):
1687 Changed signature. Made static.
1688 (i386_dr_low_get_addr): Likewise.
1689 (i386_dr_low_set_control): Likewise.
1690 (i386_dr_low_get_control): Likewise.
1691 (i386_dr_low_get_status): Likewise.
1692 (i386_dr_low): New global variable.
1693
e1d2394b
MS
16942014-06-20 Marcus Shawcroft <marcus.shawcroft@arm.com>
1695
1696 * configure.ac: Invoke. AC_CHECK_TOOL(AR, ar).
1697 * Makefile.in (AR, AR_FLAGS): Define.
1698 * configure: Regenerate.
1699
3a8ee006
GB
17002014-06-19 Gary Benson <gbenson@redhat.com>
1701
1702 * Makefile.in (i386-dregs.o): New rule.
1703 * configure.srv: Add i386-dregs.o to all targets using i386-low.o.
1704 * i386-low.c (target.h): Remove include.
1705 (TARGET_HAS_DR_LEN_8): Now in i386-dregs.c.
1706 (DR_CONTROL_SHIFT): Likewise.
1707 (DR_CONTROL_SIZE): Likewise.
1708 (DR_RW_EXECUTE): Likewise.
1709 (DR_RW_WRITE): Likewise.
1710 (DR_RW_READ): Likewise.
1711 (DR_RW_IORW): Likewise.
1712 (DR_LEN_1): Likewise.
1713 (DR_LEN_2): Likewise.
1714 (DR_LEN_4): Likewise.
1715 (DR_LEN_8): Likewise.
1716 (DR_LOCAL_ENABLE_SHIFT): Likewise.
1717 (DR_GLOBAL_ENABLE_SHIFT): Likewise.
1718 (DR_ENABLE_SIZE): Likewise.
1719 (DR_LOCAL_SLOWDOWN): Likewise.
1720 (DR_GLOBAL_SLOWDOWN): Likewise.
1721 (DR_CONTROL_RESERVED): Likewise.
1722 (I386_DR_CONTROL_MASK): Likewise.
1723 (I386_DR_VACANT): Likewise.
1724 (I386_DR_LOCAL_ENABLE): Likewise.
1725 (I386_DR_GLOBAL_ENABLE): Likewise.
1726 (I386_DR_DISABLE): Likewise.
1727 (I386_DR_SET_RW_LEN): Likewise.
1728 (I386_DR_GET_RW_LEN): Likewise.
1729 (I386_DR_WATCH_HIT): Likewise.
1730 (i386_wp_op_t): Likewise.
1731 (i386_show_dr): Likewise.
1732 (i386_length_and_rw_bits): Likewise.
1733 (i386_insert_aligned_watchpoint): Likewise.
1734 (i386_remove_aligned_watchpoint): Likewise.
1735 (i386_handle_nonaligned_watchpoint): Likewise.
1736 i386_update_inferior_debug_regs(): Likewise.
1737 (i386_dr_insert_watchpoint): Likewise.
1738 (i386_dr_remove_watchpoint): Likewise.
1739 (i386_dr_region_ok_for_watchpoint): Likewise.
1740 (i386_dr_stopped_data_address): Likewise.
1741 (i386_dr_stopped_by_watchpoint): Likewise.
1742
8f26655c
GB
17432014-06-19 Gary Benson <gbenson@redhat.com>
1744
1745 * i386-low.c (i386_dr_show): Renamed to
1746 i386_show_dr and made static. All uses updated.
1747 (i386_dr_length_and_rw_bits): Renamed to
1748 i386_length_and_rw_bits and made static.
1749 All uses updated.
1750 (i386_dr_insert_aligned_watchpoint): Renamed to
1751 i386_insert_aligned_watchpoint and made static.
1752 All uses updated.
1753 (i386_dr_remove_aligned_watchpoint): Renamed to
1754 i386_remove_aligned_watchpoint and made static.
1755 All uses updated.
1756 (i386_dr_update_inferior_debug_regs): Renamed to
1757 i386_update_inferior_debug_regs and made static.
1758 All uses updated.
1759
b9228891
GB
17602014-06-18 Gary Benson <gbenson@redhat.com>
1761
5171def3
GB
1762 * i386-low.h (i386_dr_low_can_set_addr): New macro.
1763 (i386_dr_low_can_set_control): Likewise.
1764 (i386_get_debug_register_length): Likewise.
1765 * i386-low.c (i386_dr_low_can_set_addr): Now in i386-low.h.
1766 (i386_dr_low_can_set_control): Likewise.
1767 (i386_get_debug_register_length): Likewise.
1768
17692014-06-17 Gary Benson <gbenson@redhat.com>
1770
b9228891
GB
1771 * i386-low.h (i386-dregs.h): New include.
1772 (DR_FIRSTADDR): Now in i386-dregs.h.
1773 (DR_LASTADDR): Likewise.
1774 (DR_NADDR): Likewise.
1775 (DR_STATUS): Likewise.
1776 (DR_CONTROL): Likewise.
1777 (i386_debug_reg_state): Likewise.
1778 (i386_dr_insert_watchpoint): Likewise.
1779 (i386_dr_remove_watchpoint): Likewise.
1780 (i386_dr_region_ok_for_watchpoint): Likewise.
1781 (i386_dr_stopped_data_address): Likewise.
1782 (i386_dr_stopped_by_watchpoint): Likewise.
1783 * i386-low.c (ALL_DEBUG_REGISTERS): Likewise.
1784
4be83cc2
GB
17852014-06-18 Gary Benson <gbenson@redhat.com>
1786
1787 * i386-low.h (i386_low_insert_watchpoint): Renamed to
1788 i386_dr_insert_watchpoint.
1789 (i386_low_remove_watchpoint): Renamed to
1790 i386_dr_remove_watchpoint.
1791 (i386_low_region_ok_for_watchpoint): Renamed to
1792 i386_dr_region_ok_for_watchpoint.
1793 (i386_low_stopped_data_address): Renamed to
1794 i386_dr_stopped_data_address.
1795 (i386_low_stopped_by_watchpoint): Renamed to
1796 i386_dr_stopped_by_watchpoint.
1797 * i386-low.c (i386_show_dr): Renamed to
1798 i386_dr_show and made nonstatic. All uses updated.
1799 (i386_length_and_rw_bits): Renamed to
1800 i386_dr_length_and_rw_bits and made nonstatic.
1801 All uses updated.
1802 (i386_insert_aligned_watchpoint): Renamed to
1803 i386_dr_insert_aligned_watchpoint and made nonstatic.
1804 All uses updated.
1805 (i386_remove_aligned_watchpoint): Renamed to
1806 i386_dr_remove_aligned_watchpoint and made nonstatic.
1807 All uses updated.
1808 (i386_update_inferior_debug_regs): Renamed to
1809 i386_dr_update_inferior_debug_regs and made nonstatic.
1810 All uses updated.
1811 (i386_low_insert_watchpoint): Renamed to
1812 i386_dr_insert_watchpoint. All uses updated.
1813 (i386_low_remove_watchpoint): Renamed to
1814 i386_dr_remove_watchpoint. All uses updated.
1815 (i386_low_region_ok_for_watchpoint): Renamed to
1816 i386_dr_region_ok_for_watchpoint. All uses updated.
1817 (i386_low_stopped_data_address): Renamed to
1818 i386_dr_stopped_data_address. All uses updated.
1819 (i386_low_stopped_by_watchpoint): Renamed to
1820 i386_dr_stopped_by_watchpoint. All uses updated.
1821
131aa0d4
GB
18222014-06-18 Gary Benson <gbenson@redhat.com>
1823
1824 * i386-low.c (i386_dr_low_can_set_addr): New macro.
1825 (i386_dr_low_can_set_control): Likewise.
1826 (i386_insert_aligned_watchpoint): New check.
1827
d9305f7f
GB
18282014-06-18 Gary Benson <gbenson@redhat.com>
1829
1830 * i386-low.c (i386_update_inferior_debug_regs) <inf_state>:
1831 Renamed to state.
1832
e927c9fc
GB
18332014-06-18 Gary Benson <gbenson@redhat.com>
1834
1835 * i386-low.c (i386_length_and_rw_bits): Use internal_error
1836 instead of fatal and error.
1837 (i386_handle_nonaligned_watchpoint): Likewise.
1838
1b6d4134
GB
18392014-06-18 Gary Benson <gbenson@redhat.com>
1840
1841 * i386-low.c (i386_get_debug_register_length): New macro.
1842 (TARGET_HAS_DR_LEN_8): Remove conditional. Use above macro.
1843 (i386_show_dr): Use debug_printf instead of fprintf. Use
1844 phex to format values.
1845
6e62758f
GB
18462014-06-18 Gary Benson <gbenson@redhat.com>
1847
1848 * i386-low.h: Comment changes.
1849 * i386-low.c: Likewise.
1850
fc6e2f03
GB
18512014-06-18 Gary Benson <gbenson@redhat.com>
1852
1853 * i386-low.c: Whitespace changes.
1854
f9d1eeed
TT
18552014-06-12 Tom Tromey <tromey@redhat.com>
1856
1857 * utils.c (freeargv): Remove.
1858
0b04e523
TT
18592014-06-12 Tom Tromey <tromey@redhat.com>
1860
1861 * debug.c (debug_printf): Remove HAVE_GETTIMEOFDAY checks.
1862 * server.c (monitor_show_help): Remove HAVE_GETTIMEOFDAY check.
1863 (parse_debug_format_options): Likewise.
1864 (gdbserver_usage): Likewise.
1865 * Makefile.in (LIBIBERTY_BUILDDIR, LIBIBERTY): New variables.
1866 (SUBDIRS, REQUIRED_SUBDIRS): Add libiberty.
1867 (gdbserver$(EXEEXT), gdbreplay$(EXEEXT)): Depend on and link
1868 against libiberty.
1869 ($(LIBGNU)): Depend on libiberty.
1870 (all-lib): Recurse into all subdirs.
1871 (install-only): Invoke "install" target in subdirs.
1872 (vasprintf.o, vsnprintf.o, safe-ctype.o, lbasename.o): Remove
1873 targets.
1874 * configure: Rebuild.
1875 * configure.ac: Add ACX_CONFIGURE_DIR for libiberty. Don't check
1876 for vasprintf, vsnprintf, or gettimeofday.
1877 * configure.srv: Don't add safe-ctype.o or lbasename.o to
1878 srv_tgtobj.
1879
270c9937
JB
18802014-06-05 Joel Brobecker <brobecker@adacore.com>
1881
1882 * development.sh: Delete.
1883 * Makefile.in (config.status): Adjust dependency on development.sh.
1884 * configure.ac: Adjust development.sh source call.
1885 * configure: Regenerate.
1886
0a261ed8
PA
18872014-06-02 Pedro Alves <palves@redhat.com>
1888
1889 * ax.c (gdb_free_agent_expr): New function.
1890 * ax.h (gdb_free_agent_expr): New declaration.
1891 * mem-break.c (delete_gdb_breakpoint_1): Also clear the commands
1892 list.
1893 (clear_breakpoint_conditions, clear_breakpoint_commands): Make
1894 static.
1895 (clear_breakpoint_conditions_and_commands): New function.
1896 * mem-break.h (clear_breakpoint_conditions): Delete declaration.
1897 (clear_breakpoint_conditions_and_commands): New declaration.
1898
e9dae05e
RR
18992014-05-23 Ramana Radhakrishnan <ramana.radhakrishnan@arm.com>
1900
1901 * linux-aarch64-low.c (asm/ptrace.h): Include.
1902
5876f503
JK
19032014-05-21 Jan Kratochvil <jan.kratochvil@redhat.com>
1904
1905 Fix TLS access for -static -pthread.
1906 * gdbserver/thread-db.c (struct thread_db): Add td_thr_tlsbase_p.
1907 (thread_db_get_tls_address): Call it if LOAD_MODULE is zero.
1908 (thread_db_load_search, try_thread_db_load_1): Initialize it.
1909
802e8e6d
PA
19102014-05-20 Pedro Alves <palves@redhat.com>
1911
1912 * linux-aarch64-low.c (aarch64_insert_point)
1913 (aarch64_remove_point): No longer check whether the type is
1914 supported here. Adjust to new interface.
1915 (the_low_target): Install aarch64_supports_z_point_type as
1916 supports_z_point_type method.
1917 * linux-arm-low.c (raw_bkpt_type_to_arm_hwbp_type): New function.
1918 (arm_linux_hw_point_initialize): Take an enum raw_bkpt_type
1919 instead of a Z packet char. Adjust.
1920 (arm_supports_z_point_type): New function.
1921 (arm_insert_point, arm_remove_point): Adjust to new interface.
1922 (the_low_target): Install arm_supports_z_point_type.
1923 * linux-crisv32-low.c (cris_supports_z_point_type): New function.
1924 (cris_insert_point, cris_remove_point): Adjust to new interface.
1925 Don't check whether the type is supported here.
1926 (the_low_target): Install cris_supports_z_point_type.
1927 * linux-low.c (linux_supports_z_point_type): New function.
1928 (linux_insert_point, linux_remove_point): Adjust to new interface.
1929 * linux-low.h (struct linux_target_ops) <insert_point,
1930 remove_point>: Take an enum raw_bkpt_type instead of a char. Add
1931 raw_breakpoint pointer parameter.
1932 <supports_z_point_type>: New method.
1933 * linux-mips-low.c (mips_supports_z_point_type): New function.
1934 (mips_insert_point, mips_remove_point): Adjust to new interface.
1935 Use mips_supports_z_point_type.
1936 (the_low_target): Install mips_supports_z_point_type.
1937 * linux-ppc-low.c (the_low_target): Install NULL as
1938 supports_z_point_type method.
1939 * linux-s390-low.c (the_low_target): Install NULL as
1940 supports_z_point_type method.
1941 * linux-sparc-low.c (the_low_target): Install NULL as
1942 supports_z_point_type method.
1943 * linux-x86-low.c (x86_supports_z_point_type): New function.
1944 (x86_insert_point): Adjust to new insert_point interface. Use
1945 insert_memory_breakpoint. Adjust to new
1946 i386_low_insert_watchpoint interface.
1947 (x86_remove_point): Adjust to remove_point interface. Use
1948 remove_memory_breakpoint. Adjust to new
1949 i386_low_remove_watchpoint interface.
1950 (the_low_target): Install x86_supports_z_point_type.
1951 * lynx-low.c (lynx_target_ops): Install NULL as
1952 supports_z_point_type callback.
1953 * nto-low.c (nto_supports_z_point_type): New.
1954 (nto_insert_point, nto_remove_point): Adjust to new interface.
1955 (nto_target_ops): Install nto_supports_z_point_type.
1956 * mem-break.c: Adjust intro comment.
1957 (struct raw_breakpoint) <raw_type, size>: New fields.
1958 <inserted>: Update comment.
1959 <shlib_disabled>: Delete field.
1960 (enum bkpt_type) <gdb_breakpoint>: Delete value.
1961 <gdb_breakpoint_Z0, gdb_breakpoint_Z1, gdb_breakpoint_Z2,
1962 gdb_breakpoint_Z3, gdb_breakpoint_Z4>: New values.
1963 (raw_bkpt_type_to_target_hw_bp_type): New function.
1964 (find_enabled_raw_code_breakpoint_at): New function.
1965 (find_raw_breakpoint_at): New type and size parameters. Use them.
1966 (insert_memory_breakpoint): New function, based off
1967 set_raw_breakpoint_at.
1968 (remove_memory_breakpoint): New function.
1969 (set_raw_breakpoint_at): Reimplement.
1970 (set_breakpoint): New, based on set_breakpoint_at.
1971 (set_breakpoint_at): Reimplement.
1972 (delete_raw_breakpoint): Go through the_target->remove_point
1973 instead of assuming memory breakpoints.
1974 (find_gdb_breakpoint_at): Delete.
1975 (Z_packet_to_bkpt_type, Z_packet_to_raw_bkpt_type): New functions.
1976 (find_gdb_breakpoint): New function.
1977 (set_gdb_breakpoint_at): Delete.
1978 (z_type_supported): New function.
1979 (set_gdb_breakpoint_1): New function, loosely based off
1980 set_gdb_breakpoint_at.
1981 (check_gdb_bp_preconditions, set_gdb_breakpoint): New functions.
1982 (delete_gdb_breakpoint_at): Delete.
1983 (delete_gdb_breakpoint_1): New function, loosely based off
1984 delete_gdb_breakpoint_at.
1985 (delete_gdb_breakpoint): New function.
1986 (clear_gdb_breakpoint_conditions): Rename to ...
1987 (clear_breakpoint_conditions): ... this. Don't handle a NULL
1988 breakpoint.
1989 (add_condition_to_breakpoint): Make static.
1990 (add_breakpoint_condition): Take a struct breakpoint pointer
1991 instead of an address. Adjust.
1992 (gdb_condition_true_at_breakpoint): Rename to ...
1993 (gdb_condition_true_at_breakpoint_z_type): ... this, and add
1994 z_type parameter.
1995 (gdb_condition_true_at_breakpoint): Reimplement.
1996 (add_breakpoint_commands): Take a struct breakpoint pointer
1997 instead of an address. Adjust.
1998 (gdb_no_commands_at_breakpoint): Rename to ...
1999 (gdb_no_commands_at_breakpoint_z_type): ... this. Add z_type
2000 parameter. Return true if no breakpoint was found. Change debug
2001 output.
2002 (gdb_no_commands_at_breakpoint): Reimplement.
2003 (run_breakpoint_commands): Rename to ...
2004 (run_breakpoint_commands_z_type): ... this. Add z_type parameter,
2005 and change return type to boolean.
2006 (run_breakpoint_commands): New function.
2007 (gdb_breakpoint_here): Also check for Z1 breakpoints.
2008 (uninsert_raw_breakpoint): Don't try to reinsert a disabled
2009 breakpoint. Go through the_target->remove_point instead of
2010 assuming memory breakpoint.
2011 (uninsert_breakpoints_at, uninsert_all_breakpoints): Uninsert
2012 software and hardware breakpoints.
2013 (reinsert_raw_breakpoint): Go through the_target->insert_point
2014 instead of assuming memory breakpoint.
2015 (reinsert_breakpoints_at, reinsert_all_breakpoints): Reinsert
2016 software and hardware breakpoints.
2017 (check_breakpoints, breakpoint_here, breakpoint_inserted_here):
2018 Check both software and hardware breakpoints.
2019 (validate_inserted_breakpoint): Assert the breakpoint is a
2020 software breakpoint. Set the inserted flag to -1 instead of
2021 setting shlib_disabled.
2022 (delete_disabled_breakpoints): Adjust.
2023 (validate_breakpoints): Only validate software breakpoints.
2024 Adjust to inserted flag change.
2025 (check_mem_read, check_mem_write): Skip breakpoint types other
2026 than software breakpoints. Adjust to inserted flag change.
2027 * mem-break.h (enum raw_bkpt_type): New enum.
2028 (raw_breakpoint, struct process_info): Forward declare.
2029 (Z_packet_to_target_hw_bp_type): Delete declaration.
2030 (raw_bkpt_type_to_target_hw_bp_type, Z_packet_to_raw_bkpt_type)
2031 (set_gdb_breakpoint, delete_gdb_breakpoint)
2032 (clear_breakpoint_conditions): New declarations.
2033 (set_gdb_breakpoint_at, clear_gdb_breakpoint_conditions): Delete.
2034 (breakpoint_inserted_here): Update comment.
2035 (add_breakpoint_condition, add_breakpoint_commands): Replace
2036 address parameter with a breakpoint pointer parameter.
2037 (gdb_breakpoint_here): Update comment.
2038 (delete_gdb_breakpoint_at): Delete.
2039 (insert_memory_breakpoint, remove_memory_breakpoint): Declare.
2040 * server.c (process_point_options): Take a struct breakpoint
2041 pointer instead of an address. Adjust.
2042 (process_serial_event) <Z/z packets>: Use set_gdb_breakpoint and
2043 delete_gdb_breakpoint.
2044 * spu-low.c (spu_target_ops): Install NULL as
2045 supports_z_point_type method.
2046 * target.h: Include mem-break.h.
2047 (struct target_ops) <prepare_to_access_memory>: Update comment.
2048 <supports_z_point_type>: New field.
2049 <insert_point, remove_point>: Take an enum raw_bkpt_type argument
2050 instead of a char. Also take a raw breakpoint pointer.
2051 * win32-arm-low.c (the_low_target): Install NULL as
2052 supports_z_point_type.
2053 * win32-i386-low.c (i386_supports_z_point_type): New function.
2054 (i386_insert_point, i386_remove_point): Adjust to new interface.
2055 (the_low_target): Install i386_supports_z_point_type.
2056 * win32-low.c (win32_supports_z_point_type): New function.
2057 (win32_insert_point, win32_remove_point): Adjust to new interface.
2058 (win32_target_ops): Install win32_supports_z_point_type.
2059 * win32-low.h (struct win32_target_ops):
2060 <supports_z_point_type>: New method.
2061 <insert_point, remove_point>: Take an enum raw_bkpt_type argument
2062 instead of a char. Also take a raw breakpoint pointer.
2063
932539e3
PA
20642014-05-20 Pedro Alves <palves@redhat.com>
2065
2066 * mem-break.h: Include break-common.h.
2067 (Z_PACKET_SW_BP, Z_PACKET_HW_BP, Z_PACKET_WRITE_WP)
2068 (Z_PACKET_READ_WP, Z_PACKET_ACCESS_WP): New defines.
2069 (Z_packet_to_target_hw_bp_type): New declaration.
2070 * mem-break.c (Z_packet_to_target_hw_bp_type): New function.
2071 * i386-low.c (Z_PACKET_HW_BP, Z_PACKET_WRITE_WP, Z_PACKET_READ_WP)
2072 (Z_PACKET_ACCESS_WP): Delete macros.
2073 (Z_packet_to_hw_type): Delete function.
2074 * i386-low.h: Don't include break-common.h here.
2075 (Z_packet_to_hw_type): Delete declaration.
2076 * linux-x86-low.c (x86_insert_point, x86_insert_point): Call
2077 Z_packet_to_target_hw_bp_type instead of Z_packet_to_hw_type.
2078 * win32-i386-low.c (i386_insert_point, i386_remove_point): Call
2079 Z_packet_to_target_hw_bp_type instead of Z_packet_to_hw_type.
2080 * linux-aarch64-low.c: Don't include break-common.h here.
2081 (Z_PACKET_SW_BP, Z_PACKET_HW_BP, Z_PACKET_WRITE_WP)
2082 (Z_PACKET_READ_WP, Z_PACKET_ACCESS_WP): Delete macros.
2083 (Z_packet_to_target_hw_bp_type): Delete function.
2084 * linux-mips-low.c (rsp_bp_type_to_target_hw_bp_type): Delete
2085 function.
2086 (mips_insert_point, mips_remove_point): Use
2087 Z_packet_to_target_hw_bp_type.
2088
4ff0d3d8
PA
20892014-05-20 Pedro Alves <palves@redhat.com>
2090
2091 * linux-aarch64-low.c: Include break-common.h.
2092 (enum target_point_type): Delete.
2093 (Z_packet_to_point_type): Rename to ...
2094 (Z_packet_to_target_hw_bp_type): ... this, and return a
2095 target_hw_bp_type instead.
2096 (aarch64_show_debug_reg_state): Take an enum target_hw_bp_type
2097 instead of an enum target_point_type.
2098 (aarch64_point_encode_ctrl_reg): Likewise. Compute type mask from
2099 breakpoint type.
2100 (aarch64_dr_state_insert_one_point)
2101 (aarch64_dr_state_remove_one_point, aarch64_handle_breakpoint)
2102 (aarch64_handle_aligned_watchpoint)
2103 (aarch64_handle_unaligned_watchpoint, aarch64_handle_watchpoint):
2104 Take an enum target_hw_bp_type instead of an enum
2105 target_point_type.
2106 (aarch64_supports_z_point_type): New function.
2107 (aarch64_insert_point, aarch64_remove_point): Use it. Adjust to
2108 use Z_packet_to_target_hw_bp_type.
2109
786dc519
JB
21102014-05-20 Joel Brobecker <brobecker@adacore.com>
2111
2112 * configure.ac: Only use -Werror by default when DEVELOPMENT
2113 is true.
2114 * configure: Regenerate.
2115
9e0aa64f
JK
21162014-05-19 Jan Kratochvil <jan.kratochvil@redhat.com>
2117
2118 Fix gdbserver qGetTLSAddr for x86_64 -m32.
2119 * linux-x86-low.c (X86_64_USER_REGS): New.
2120 (x86_fill_gregset): Call memset for BUF first in x86_64 -m32 case.
2121
2b577b92
YQ
21222014-04-28 Yao Qi <yao@codesourcery.com>
2123
2124 * Makefile.in (i386-avx512.c): Fix the typo of generated file
2125 name.
2126
94611da2
PA
21272014-04-25 Pedro Alves <palves@redhat.com>
2128
2129 PR server/16255
2130 * linux-low.c (linux_attach_fail_reason_string): New function.
2131 (linux_attach_lwp): Delete.
2132 (linux_attach_lwp_1): Rename to ...
2133 (linux_attach_lwp): ... this. Take a ptid instead of a pid as
2134 argument. Remove "initial" parameter. Return int instead of
2135 void. Don't error or warn here.
2136 (linux_attach): Adjust to call linux_attach_lwp. Call error on
2137 failure to attach to the tgid. Call warning when failing to
2138 attach to an lwp.
2139 * linux-low.h (linux_attach_lwp): Take a ptid instead of a pid as
2140 argument. Remove "initial" parameter. Return int instead of
2141 void. Don't error or warn here.
2142 (linux_attach_fail_reason_string): New declaration.
2143 * thread-db.c (attach_thread): Adjust to linux_attach_lwp's
2144 interface change. Use linux_attach_fail_reason_string.
2145
01f9f808
MS
21462014-04-24 Michael Sturm <michael.sturm@mintel.com>
2147 Walfred Tedeschi <walfred.tedeschi@intel.com>
2148
2149 * Makefile.in: Added rules to handle new files
2150 i386-avx512.c i386-avx512-linux.c amd64-avx512.c
2151 amd64-avx512-linux.c x32-avx512.c x32-avx512-linux.c.
2152 * configure.srv (srv_i386_regobj): Add i386-avx512.o.
2153 (srv_i386_linux_regobj): Add i386-avx512-linux.o.
2154 (srv_amd64_regobj): Add amd64-avx512.o and x32-avx512.o.
2155 (srv_amd64_linux_regobj): Add amd64-avx512-linux.o and
2156 x32-avx512-linux.o.
2157 (srv_i386_32bit_xmlfiles): Add i386/32bit-avx512.xml.
2158 (srv_i386_64bit_xmlfiles): Add i386/64bit-avx512.xml.
2159 (srv_amd64_xmlfiles): Add i386/amd64-avx512.xml and
2160 i386/x32-avx512.xml.
2161 (srv_i386_linux_xmlfiles): Add i386/i386-avx512-linux.xml.
2162 (srv_amd64_linux_xmlfiles): Add i386/amd64-avx512-linux.xml and
2163 i386/x32-avx512-linux.xml.
2164 * i387-fp.c (num_avx512_k_registers): New constant for number
2165 of K registers.
2166 (num_avx512_zmmh_low_registers): New constant for number of
2167 lower ZMM registers (0-15).
2168 (num_avx512_zmmh_high_registers): New constant for number of
2169 higher ZMM registers (16-31).
2170 (num_avx512_ymmh_registers): New contant for number of higher
2171 YMM registers (ymm16-31 added by avx521 on x86_64).
2172 (num_avx512_xmm_registers): New constant for number of higher
2173 XMM registers (xmm16-31 added by AVX512 on x86_64).
2174 (struct i387_xsave): Add space for AVX512 registers.
2175 (i387_cache_to_xsave): Change raw buffer size to 64 characters.
2176 Add code to handle AVX512 registers.
2177 (i387_xsave_to_cache): Add code to handle AVX512 registers.
2178 * linux-x86-low.c (init_registers_amd64_avx512_linux): New
2179 prototypei from generated file.
2180 (tdesc_amd64_avx512_linux): Likewise.
2181 (init_registers_x32_avx512_linux): Likewise.
2182 (tdesc_x32_avx512_linux): Likewise.
2183 (init_registers_i386_avx512_linux): Likewise.
2184 (tdesc_i386_avx512_linux): Likewise.
2185 (x86_64_regmap): Add AVX512 registers.
2186 (x86_linux_read_description): Add code to handle AVX512 XSTATE
2187 mask.
2188 (initialize_low_arch): Add code to initialize AVX512 registers.
2189
51aa91f9
PA
21902014-04-23 Pedro Alves <palves@redhat.com>
2191
2192 * mem-break.c (find_gdb_breakpoint_at): Make static.
2193 * mem-break.h (find_gdb_breakpoint_at): Delete declaration.
2194
a4165e94
PA
21952014-04-23 Pedro Alves <palves@redhat.com>
2196
2197 * i386-low.c: Don't include break-common.h here.
2198 (i386_low_insert_watchpoint, i386_low_remove_watchpoint): Change
2199 prototype to take target_hw_bp_type as argument instead of a Z
2200 packet char.
2201 * i386-low.h: Include break-common.h here.
2202 (Z_packet_to_hw_type): Declare.
2203 (i386_low_insert_watchpoint, i386_low_remove_watchpoint): Change
2204 prototypes.
2205 * linux-x86-low.c (x86_insert_point): Convert the packet number to
2206 a target_hw_bp_type before calling i386_low_insert_watchpoint.
2207 (x86_remove_point): Convert the packet number to a
2208 target_hw_bp_type before calling i386_low_remove_watchpoint.
2209 * win32-i386-low.c (i386_insert_point): Convert the packet number
2210 to a target_hw_bp_type before calling i386_low_insert_watchpoint.
2211 (i386_remove_point): Convert the packet number to a
2212 target_hw_bp_type before calling i386_low_remove_watchpoint.
2213
b8acf843
PA
22142014-04-23 Pedro Alves <palves@redhat.com>
2215
2216 * utils.h (perror_with_name): Add ATTRIBUTE_NORETURN.
2217
d708bcd1
PA
22182014-04-10 Pedro Alves <palves@redhat.com>
2219
2220 * mem-break.c (add_breakpoint_condition, add_breakpoint_commands):
2221 Check if the condition or command is NULL before checking if the
2222 breakpoint is known. On success, return true.
2223 * mem-break.h (add_breakpoint_condition): Document return.
2224 (add_breakpoint_commands): Add describing comment.
2225 * server.c (skip_to_semicolon): New function.
2226 (process_point_options): Use it.
2227
2eec7d5b
PA
22282014-04-09 Pedro Alves <palves@redhat.com>
2229
2230 * linux-low.c (linux_read_loadmap): Pass current_inferior directly
2231 to lwpid_of.
2232
fa96cb38
PA
22332014-02-27 Pedro Alves <palves@redhat.com>
2234
2235 PR 12702
2236 * inferiors.h (A_I_NEXT, ALL_INFERIORS_TYPE, ALL_PROCESSES): New
2237 macros.
2238 * linux-low.c (delete_lwp, handle_extended_wait): Add debug
2239 output.
2240 (last_thread_of_process_p): Take a PID argument instead of a
2241 thread pointer.
2242 (linux_wait_for_lwp): Delete.
2243 (num_lwps, check_zombie_leaders, not_stopped_callback): New
2244 functions.
2245 (linux_low_filter_event): New function, party factored out from
2246 linux_wait_for_event.
2247 (linux_wait_for_event): Rename to ...
2248 (linux_wait_for_event_filtered): ... this. Add new filter ptid
2249 argument. Partly rewrite. Always use waitpid(-1, WNOHANG) and
2250 sigsuspend. Check for zombie leaders.
2251 (linux_wait_for_event): Reimplement as wrapper around
2252 linux_wait_for_event_filtered.
2253 (linux_wait_1): Handle TARGET_WAITKIND_NO_RESUMED. Assume that if
2254 a normal or signal exit is seen, it's the whole process exiting.
2255 (wait_for_sigstop): No longer a for_each_inferior callback.
2256 Rewrite on top of linux_wait_for_event_filtered.
2257 (stop_all_lwps): Call wait_for_sigstop directly.
2258 * server.c (resume, handle_target_event): Handle
2259 TARGET_WAITKIND_NO_RESUMED.
2260
d763de10
JB
22612014-02-26 Joel Brobecker <brobecker@adacore.com>
2262
2263 * win32-low.c (psapi_get_dll_name,
2264 * win32_CreateToolhelp32Snapshot): Delete.
2265 (win32_CreateToolhelp32Snapshot, win32_Module32First)
2266 (win32_Module32Next, load_toolhelp, toolhelp_get_dll_name):
2267 Delete.
2268 (handle_load_dll): Add function description.
2269 Remove code using psapi_get_dll_name and toolhelp_get_dll_name.
2270
850a0f76
JB
22712014-02-26 Joel Brobecker <brobecker@adacore.com>
2272
2273 * win32-low.c (win32_add_one_solib): Add 0x1000 to load_addr.
2274 Add comment.
2275 (win32_add_all_dlls): Remove 0x1000 offset applied to DLL
2276 base address when calling win32_add_one_solib.
2277 (handle_load_dll): Delete local variable load_addr.
2278 Remove 0x1000 offset applied to DLL base address when calling
2279 win32_add_one_solib.
2280 (handle_unload_dll): Add comment.
2281
f25b3fc3
JB
22822014-02-26 Joel Brobecker <brobecker@adacore.com>
2283
2284 * win32-low.c (win32_add_all_dlls): Renames
2285 win32_ensure_ntdll_loaded. Rewrite function documentation.
2286 Adjust implementation to always load all DLLs.
2287 Add 0x1000 offset to DLL base address when calling
2288 win32_add_one_solib.
2289 (child_initialization_done): New static global.
2290 (do_initial_child_stuff): Set child_initialization_done to
2291 zero during child initialization, and 1 after. Replace call
2292 to win32_ensure_ntdll_loaded by call to win32_add_all_dlls.
2293 Add comment.
2294 (match_dll_by_basename, dll_is_loaded_by_basename): Delete.
2295 (handle_unload_dll): Add function documentation.
2296 (get_child_debug_event): Ignore load and unload DLL events
2297 during child initialization.
2298
d86d4aaf
DE
22992014-02-20 Doug Evans <dje@google.com>
2300
3bc32da3 2301 Remove global all_lwps.
d86d4aaf
DE
2302 * inferiors.h (ptid_of): Move here from linux-low.h.
2303 (pid_of, lwpid_of): Ditto.
2304 * linux-aarch64-low.c (debug_reg_change_callback): Update, "entry"
2305 parameter is a struct thread_info * now.
2306 (aarch64_notify_debug_reg_change): Fetch pid from current_inferior
2307 directly. Pass &all_threads to find_inferior instead of &all_lwps.
2308 (aarch64_stopped_data_address): Fetch lwpid from current_inferior
2309 directly.
2310 (aarch64_linux_prepare_to_resume): Fetch ptid from thread.
2311 (aarch64_arch_setup): Fetch lwpid from current_inferior directly.
2312 * linux-arm-low.c (update_registers_callback): Update, "entry"
2313 parameter is a struct thread_info * now.
2314 Fetch lwpid from current_inferior directly.
2315 (arm_insert_point): Pass &all_threads to find_inferior instead of
2316 &all_lwps.
2317 (arm_remove_point): Ditto.
2318 (arm_stopped_by_watchpoint): Fetch lwp from current_inferior.
2319 (arm_prepare_to_resume): Fetch pid from thread.
2320 (arm_read_description): Fetch lwpid from current_inferior directly.
2321 * linux-low.c (all_lwps): Delete.
2322 (delete_lwp): Delete call to remove_inferior.
2323 (handle_extended_wait): Fetch lwpid from thread.
2324 (add_lwp): Don't set lwp->entry.id. Remove call to
2325 add_inferior_to_list.
2326 (linux_attach_lwp_1): Fetch pid from current_inferior directly.
2327 (linux_kill_one_lwp): Fetch ptid,lwpid from thread.
2328 (kill_one_lwp_callback): Ditto.
2329 (linux_kill): Don't dereference NULL pointer.
2330 Fetch ptid,lwpid from thread.
2331 (get_detach_signal): Fetch ptid from thread.
2332 (linux_detach_one_lwp): Fetch ptid,lwpid from thread.
2333 Simplify call to regcache_invalidate_thread.
2334 (delete_lwp_callback): Update, "entry" parameter is a
2335 struct thread_info * now. Fetch pid from thread.
2336 (linux_mourn): Pass &all_threads to find_inferior instead of &all_lwps.
2337 (status_pending_p_callback): Update, "entry" parameter is a
2338 struct thread_info * now. Fetch ptid from thread.
2339 (find_lwp_pid): Update, "entry" parameter is a
2340 struct thread_info * now.
2341 (linux_wait_for_lwp): Fetch pid from thread.
2342 (linux_fast_tracepoint_collecting): Fetch lwpid from thread.
2343 (maybe_move_out_of_jump_pad): Fetch lwpid from current_inferior.
2344 (enqueue_one_deferred_signal): Fetch lwpid from thread.
2345 (dequeue_one_deferred_signal): Ditto.
2346 (cancel_breakpoint): Fetch ptid from current_inferior.
2347 (linux_wait_for_event): Pass &all_threads to find_inferior,
2348 not &all_lwps. Fetch ptid, lwpid from thread.
2349 (count_events_callback): Update, "entry" parameter is a
2350 struct thread_info * now.
2351 (select_singlestep_lwp_callback): Ditto.
2352 (select_event_lwp_callback): Ditto.
2353 (cancel_breakpoints_callback): Ditto.
2354 (linux_cancel_breakpoints): Pass &all_threads to find_inferior,
2355 not &all_lwps.
2356 (select_event_lwp): Ditto. Fetch ptid from event_thread.
2357 (unsuspend_one_lwp): Update, "entry" parameter is a
2358 struct thread_info * now.
2359 (unsuspend_all_lwps): Pass &all_threads to find_inferior,
2360 not &all_lwps.
2361 (linux_stabilize_threads): Ditto. And for for_each_inferior.
2362 Fetch lwpid from thread, not lwp.
2363 (linux_wait_1): Fetch ptid, lwpid from current_inferior.
2364 Pass &all_threads to find_inferior, not &all_lwps.
2365 (send_sigstop): Fetch lwpid from thread, not lwp.
2366 (send_sigstop_callback): Update, "entry" parameter is a
2367 struct thread_info * now.
2368 (suspend_and_send_sigstop_callback): Ditto.
2369 (wait_for_sigstop): Ditto. Fetch ptid, lwpid from thread, lwp.
2370 (stuck_in_jump_pad_callback): Update, "entry" parameter is a
2371 struct thread_info * now.
2372 (move_out_of_jump_pad_callback): Ditto. Fetch ptid, lwpid
2373 from thread, lwp.
2374 (lwp_running): Update, "entry" parameter is a
2375 struct thread_info * now.
2376 (stop_all_lwps): Fetch ptid from thread.
2377 Pass &all_threads to find_inferior, for_each_inferior, not &all_lwps.
2378 (linux_resume_one_lwp): Fetch lwpid from thread.
2379 (linux_set_resume_request): Update, "entry" parameter is a
2380 struct thread_info * now. Fetch pid, lwpid from thread.
2381 (resume_status_pending_p): Update, "entry" parameter is a
2382 struct thread_info * now.
2383 (need_step_over_p): Ditto. Fetch lwpid from thread.
2384 (start_step_over): Fetch lwpid from thread.
2385 (linux_resume_one_thread): Update, "entry" parameter is a
2386 struct thread_info * now. Fetch lwpid from thread.
2387 (linux_resume): Pass &all_threads to find_inferior, not &all_lwps.
2388 (proceed_one_lwp): Update, "entry" parameter is a
2389 struct thread_info * now. Fetch lwpid from thread.
2390 (unsuspend_and_proceed_one_lwp): Update, "entry" parameter is a
2391 struct thread_info * now.
2392 (proceed_all_lwps): Pass &all_threads to find_inferior, not &all_lwps.
2393 (unstop_all_lwps): Ditto. Fetch lwpid from thread.
2394 (regsets_fetch_inferior_registers): Fetch lwpid from current_inferior
2395 directly.
2396 (regsets_store_inferior_registers): Ditto.
2397 (fetch_register, store_register): Ditto.
2398 (linux_read_memory, linux_write_memory): Ditto.
2399 (linux_request_interrupt): Ditto.
2400 (linux_read_auxv): Ditto.
2401 (linux_xfer_siginfo): Ditto.
2402 (linux_qxfer_spu): Ditto.
2403 (linux_qxfer_libraries_svr4): Ditto.
2404 * linux-low.h (ptid_of, pid_of, lwpid_of): Delete,
2405 moved to inferiors.h.
2406 (get_lwp): Delete.
2407 (get_thread_lwp): Update.
2408 (struct lwp_info): Delete member "entry". Simplify comment for
2409 member "thread".
2410 (all_lwps): Delete.
2411 * linux-mips-low.c (mips_read_description): Fetch lwpid from
2412 current_inferior directly.
2413 (update_watch_registers_callback): Update, "entry" parameter is a
2414 struct thread_info * now. Fetch pid from thread.
2415 (mips_linux_prepare_to_resume): Fetch ptid from thread.
2416 (mips_insert_point): Fetch lwpid from current_inferior.
2417 Pass &all_threads to find_inferior, not &all_lwps.
2418 (mips_remove_point): Pass &all_threads to find_inferior, not &all_lwps.
2419 (mips_stopped_by_watchpoint): Fetch lwpid from current_inferior
2420 directly.
2421 (mips_stopped_data_address): Ditto.
2422 * linux-s390-low.c (s390_arch_setup): Fetch pid from current_inferior
2423 directly.
2424 * linux-tile-low.c (tile_arch_setup): Ditto.
2425 * linux-x86-low.c (x86_get_thread_area): Fetch lwpid from thread.
2426 (update_debug_registers_callback): Update, "entry" parameter is a
2427 struct thread_info * now. Fetch pid from thread.
2428 (i386_dr_low_set_addr): Fetch pid from current_inferior directly.
2429 Pass &all_threads to find_inferior, not &all_lwps.
2430 (i386_dr_low_get_addr): Fetch ptid from current_inferior directly.
2431 (i386_dr_low_set_control): Fetch pid from current_inferior directly.
2432 Pass &all_threads to find_inferior, not &all_lwps.
2433 (i386_dr_low_get_control): Fetch ptid from current_inferior directly.
2434 (i386_dr_low_get_status): Ditto.
2435 (x86_linux_prepare_to_resume): Fetch ptid from thread.
2436 (x86_siginfo_fixup): Fetch lwpid from current_inferior directly.
2437 (x86_linux_read_description): Ditto.
2438 * proc-service.c (ps_getpid): Fetch pid from current_inferior directly.
2439
3b8361aa
DE
24402014-02-20 Doug Evans <dje@google.com>
2441
2442 * inferiors.c (get_first_inferior): Fix buglet.
2443
f7667f0d
DE
24442014-02-19 Doug Evans <dje@google.com>
2445
2446 * gdbthread.h (add_thread): Change result type to struct thread_info *.
2447 * inferiors.c (add_thread): Change result type to struct thread_info *.
2448 All callers updated.
2449 (add_lwp): Call add_thread here instead of in callers.
2450 All callers updated.
2451 * linux-low.h (get_lwp_thread): Rewrite.
2452 (struct lwp_info): New member "thread".
2453
b3312d80
DE
24542014-02-19 Doug Evans <dje@google.com>
2455
2456 * linux-low.c (add_lwp): Change result to struct lwp_info *.
2457 All callers updated.
2458
ecc6f45c
DE
24592014-02-19 Doug Evans <dje@google.com>
2460
2461 * inferiors.c (add_thread): Fix whitespace.
2462
649ebbca
DE
24632014-02-19 Doug Evans <dje@google.com>
2464
2465 * dll.c (clear_dlls): Replace accessing list implemention details
2466 with API function.
2467 * gdbthread.h (get_first_thread): Declare.
2468 * inferiors.c (for_each_inferior_with_data): New function.
2469 (get_first_thread): New function.
2470 (find_thread_ptid): Simplify.
2471 (get_first_inferior): New function.
2472 (clear_list): Delete.
2473 (one_inferior_p): New function.
2474 (clear_inferior_list): New function.
2475 (clear_inferiors): Update.
2476 * inferiors.h (for_each_inferior_with_data): Declare.
2477 (clear_inferior_list): Declare.
2478 (one_inferior_p): Declare.
2479 (get_first_inferior): Declare.
2480 * linux-low.c (linux_wait_for_event): Replace accessing list
2481 implemention details with API function.
2482 * server.c (target_running): Ditto.
2483 (accumulate_file_name_length): New function.
2484 (emit_dll_description): New function.
2485 (handle_qxfer_libraries): Replace accessing list implemention
2486 details with API function.
2487 (handle_qxfer_threads_worker): New function.
2488 (handle_qxfer_threads_proper): Replace accessing list implemention
2489 details with API function.
2490 (handle_query): Ditto.
2491 (visit_actioned_threads_callback_ftype): New typedef.
2492 (visit_actioned_threads_data): New struct.
2493 (visit_actioned_threads): Rewrite to be find_inferior callback.
2494 (resume): Call find_inferior.
2495 (handle_status): Replace accessing list implemention
2496 details with API function.
2497 (process_serial_event): Replace accessing list implemention details
2498 with API function.
2499 * target.c (set_desired_inferior): Replace accessing list implemention
2500 details with API function.
2501 * tracepoint.c (same_process_p): New function.
2502 (gdb_agent_about_to_close): Replace accessing list implemention
2503 details with API function.
2504 * win32-low.c (child_delete_thread): Replace accessing list
2505 implemention details with API function.
2506 (match_dll_by_basename): New function.
2507 (dll_is_loaded_by_basename): New function.
2508 (win32_ensure_ntdll_loaded): Replace accessing list implemention
2509 details call to dll_is_loaded_by_basename.
2510
80894984
DE
25112014-02-19 Doug Evans <dje@google.com>
2512
2513 * dll.h (struct dll_info): Add comment.
2514 * gdbthread.h (struct thread_info): Add comment.
2515 (current_ptid): Simplify.
2516 * inferiors.c (add_process): Update.
2517 (remove_process): Update.
2518 * inferiors.h (struct process_info): Rename member "head" to "entry".
2519 * linux-low.c (delete_lwp): Update.
2520 (add_lwp): Update.
2521 (last_thread_of_process_p): Update.
2522 (kill_one_lwp_callback, linux_kill): Update.
2523 (status_pending_p_callback): Update.
2524 (wait_for_sigstop): Update. Simplify read of ptid.
2525 (start_step_over): Update.
2526 * linux-low.h (ptid_of, pid_of, lwpid_of): Update.
2527 (get_lwp_thread): Update.
2528 (struct lwp_info): Rename member "head" to "entry".
2529 * regcache.h (inferior_list_entry): Delete.
2530 * server.c (kill_inferior_callback): Update.
2531 (detach_or_kill_inferior_callback): Update.
2532 (print_started_pid): Update.
2533 (print_attached_pid): Update.
2534 (process_serial_event): Simplify read of ptid.
2535 * thread-db.c (thread_db_create_event): Update.
2536 (thread_db_get_tls_address): Update.
2537 * win32-low.c (current_inferior_ptid): Simplify.
2538
46917d26
TT
25392014-02-19 Tom Tromey <tromey@redhat.com>
2540
2541 * target.h (struct target_ops) <supports_btrace>: Add target_ops
2542 argument.
2543 (target_supports_btrace): Update.
2544
0759a81e
YQ
25452014-02-14 Yao Qi <yao@codesourcery.com>
2546
2547 * Makefile.in (IPA_OBJS): Append rsp-low-ipa.o.
2548 (rsp-low-ipa.o): New target.
2549
a7191e8b
TT
25502014-02-12 Tom Tromey <tromey@redhat.com>
2551
2552 * ax.c (gdb_parse_agent_expr): Use hex2bin, not
2553 convert_ascii_to_int.
2554 * regcache.c (registers_to_string): Likewise.
2555 * remote-utils.c (decode_M_packet): Likewise.
2556 * server.c (process_serial_event): Likewise.
2557
ff0e980e
TT
25582014-02-12 Tom Tromey <tromey@redhat.com>
2559
2560 * server.c (handle_query, handle_v_run): Use hex2bin, not
2561 unhexify.
2562 * tracepoint.c (cmd_qtdpsrc, cmd_qtdv, cmd_qtnotes): Likewise.
2563
e9371aff
TT
25642014-02-12 Tom Tromey <tromey@redhat.com>
2565
2566 * ax.c (gdb_unparse_agent_expr): Use bin2hex, not
2567 convert_int_to_ascii.
2568 * regcache.c (registers_to_string, collect_register_as_string):
2569 Likewise.
2570 * remote-utils.c (look_up_one_symbol, relocate_instruction):
2571 Likewise.
2572 * server.c (process_serial_event): Likewise.
2573 * tracepoint.c (cmd_qtstatus, response_source, response_tsv)
2574 (cmd_qtbuffer, cstr_to_hexstr): Likewise.
2575
971dc0b8
TT
25762014-02-12 Tom Tromey <tromey@redhat.com>
2577
2578 * remote-utils.c (look_up_one_symbol, monitor_output): Use
2579 bin2hex, not hexify.
2580 * tracepoint.c (cmd_qtstatus): Likewise.
2581
0a822afb
TT
25822014-02-12 Tom Tromey <tromey@redhat.com>
2583
2584 * remote-utils.c (monitor_output): Pass explicit length to
2585 hexify.
2586
9c3d6531
TT
25872014-02-12 Tom Tromey <tromey@redhat.com>
2588
2589 * tracepoint.c: Include rsp-low.h.
2590 * server.c: Include rsp-low.h.
2591 * remote-utils.h (convert_ascii_to_int, convert_int_to_ascii)
2592 (unhexify, hexify, remote_escape_output, unpack_varlen_hex): Don't
2593 declare.
2594 * remote-utils.c: Include rsp-low.h.
2595 (fromhex, hexchars, ishex, unhexify, tohex, hexify)
2596 (remote_escape_output, remote_unescape_input, unpack_varlen_hex)
2597 (convert_int_to_ascii, convert_ascii_to_int): Move to
2598 common/rsp-low.c.
2599 * regcache.c: Include rsp-low.h.
2600 * ax.c: Include rsp-low.h.
2601 * Makefile.in (SFILES): Add common/rsp-low.c.
2602 (OBS): Add rsp-low.o.
2603 (rsp-low.o): New target.
2604
01fd3ea5
TT
26052014-02-12 Tom Tromey <tromey@redhat.com>
2606
2607 * utils.h (pulongest, plongest, phex_nz): Don't declare.
2608 Include print-utils.h.
2609 * utils.c (NUMCELLS, CELLSIZE, get_cell, decimal2str, pulongest)
2610 (plongest, thirty_two, phex_nz): Remove.
2611 * Makefile.in (SFILES): Add common/print-utils.c.
2612 (OBS): Add print-utils.o.
2613 (print-utils-ipa.o): New target.
2614 (print-utils.o): New target.
2615 (IPA_OBJS): Add print-utils-ipa.o.
2616
e99dc820
TT
26172014-02-06 Tom Tromey <tromey@redhat.com>
2618
2619 * Makefile.in (SFILES): Fix indentation.
2620
ee1e2d4f
DE
26212014-02-05 Doug Evans <dje@google.com>
2622
2623 * linux-low.c (linux_wait_for_event): Improve comment.
2624 (linux_wait_1): Keep current_inferior in sync with event_child.
2625
f5a02773
DE
26262014-01-22 Doug Evans <dje@google.com>
2627
2628 * gdbthread.h (gdb_id_to_thread): Delete, unused.
2629
87ce2a04
DE
26302014-01-22 Doug Evans <dje@google.com>
2631
2632 * configure.ac (AC_CHECK_FUNCS): Add test for gettimeofday.
2633 * configure: Regenerate.
2634 * config.in: Regenerate.
2635 * Makefile.in (SFILES): Add debug.c.
2636 (OBS): Add debug.o.
2637 * debug.c: New file.
2638 * debug.h: New file.
2639 * linux-aarch64-low.c (*): Update all debugging printfs to use
2640 debug_printf instead of fprintf.
2641 * linux-arm-low.c (*): Ditto.
2642 * linux-cris-low.c (*): Ditto.
2643 * linux-crisv32-low.c (*): Ditto.
2644 * linux-m32r-low.c (*): Ditto.
2645 * linux-sparc-low.c (*): Ditto.
2646 * linux-x86.c (*): Ditto.
2647 * linux-low.c (*): Ditto.
2648 (linux_wait_1): Add calls to debug_enter, debug_exit.
2649 (linux_wait): Remove redundant debugging printf.
2650 (stop_all_lwps): Add calls to debug_enter, debug_exit.
2651 (linux_resume, unstop_all_lwps): Ditto.
2652 * mem-break.c (*): Update all debugging printfs to use
2653 debug_printf instead of fprintf.
2654 * remote-utils.c (*): Ditto.
2655 * thread-db.c (*): Ditto.
2656 * server.c #include <ctype.h>, "gdb_vecs.h".
2657 (debug_threads): Moved to debug.c.
2658 (*): Update all debugging printfs to use debug_printf instead of
2659 fprintf.
2660 (start_inferior): Replace call to fflush with call to debug_flush.
2661 (monitor_show_help): Mention set debug-format.
2662 (parse_debug_format_options): New function.
2663 (handle_monitor_command): Handle "monitor set debug-format".
2664 (gdbserver_usage): Mention --debug-format.
2665 (main): Parse --debug-format.
2666 * server.h (debug_threads): Declaration moved to debug.h.
2667 #include "debug.h".
2668 * tracepoint.c (trace_debug_1) [!IN_PROCESS_AGENT]: Add version of
2669 trace_debug_1 that uses debug_printf.
2670 (tracepoint_look_up_symbols): Update all debugging printfs to use
2671 debug_printf instead of fprintf.
2672
e671835b
BS
26732014-01-20 Baruch Siach <baruch@tkos.co.il>
2674
2675 * linux-xtensa-low.c: Include asm/ptrace.h instead of
2676 sys/ptrace.h.
2677
b5737fa9
PA
26782014-01-17 Pedro Alves <palves@redhat.com>
2679
ea38d2a9 2680 PR build/16445
c7faa97a
PA
2681 * linux-x86-low.c: Don't include elf/common.h if ELFMAG0 is
2682 defined after including gdb_proc_service.h.
b5737fa9 2683
40ed484e
DE
26842014-01-16 Doug Evans <dje@google.com>
2685
2686 * dll.c (UNSPECIFIED_CORE_ADDR): New macro.
2687 (match_dll): Use it.
2688
969c39fb
MM
26892014-01-16 Markus Metzger <markus.t.metzger@intel.com>
2690
2691 * target.h (target_ops) <read_btrace>: Change parameters and
2692 return type to allow error reporting.
2693 * server.c (handle_qxfer_btrace): Support delta reads. Pass
2694 trace reading errors on.
2695 * linux-low.c (linux_low_read_btrace): Pass trace reading
2696 errors on.
2697 (linux_low_disable_btrace): New.
2698
ab7f45ba
DE
26992014-01-15 Doug Evans <dje@google.com>
2700
2701 * inferiors.c (thread_id_to_gdb_id): Delete.
2702 * inferiors.h (thread_id_to_gdb_id): Delete.
2703
66af0f44
EZ
27042014-01-13 Eli Zaretskii <eliz@gnu.org>
2705
2706 * Makefile.in (INCLUDE_CFLAGS): Remove trailing slash from
2707 "-I$(srcdir)/../". Fixes MinGW compilation errors with old GCC
2708 versions.
2709
9939e131
PA
27102014-01-08 Pedro Alves <palves@redhat.com>
2711
2712 * server.c (handle_status): Don't discard previous queued stop
2713 replies or thread's pending status here.
2714 (main) <disconnection>: Do it here instead.
2715
b7ea362b
PA
27162014-01-08 Pedro Alves <palves@redhat.com>
2717
2718 * gdbthread.h (struct thread_info) <status_pending_p>: New field.
2719 * server.c (visit_actioned_threads, handle_pending_status): New
2720 function.
2721 (handle_v_cont): Factor out parts to ...
2722 (resume): ... this new function. If in all-stop, and a thread
2723 being resumed has a pending status, report it without actually
2724 resuming.
2725 (myresume): Adjust to use the new 'resume' function.
2726 (clear_pending_status_callback, set_pending_status_callback)
2727 (find_status_pending_thread_callback): New functions.
2728 (handle_status): Handle the case of multiple threads having
2729 interesting statuses to report. Report threads' real last signal
2730 instead of always reporting GDB_SIGNAL_TRAP. Look for a thread
2731 with an interesting thread to report the status for, instead of
2732 always reporting the status of the first thread.
2733
28498c42
JB
27342014-01-01 Joel Brobecker <brobecker@adacore.com>
2735
2736 * gdbserver.c (gdbserver_version): Set copyright year to 2014.
2737 * gdbreplay.c (gdbreplay_version): Likewise.
2738
f45c82da
YZ
27392013-12-18 Yufeng Zhang <yufeng.zhang@arm.com>
2740
2741 * linux-aarch64-low.c (aarch64_linux_set_debug_regs): Set
2742 iov.iov_len with the real length in use.
2743
379a5e2d
JB
27442013-12-13 Joel Brobecker <brobecker@adacore.com>
2745
2746 * Makefile.in (safe-ctype.o, lbasename.o): New rules.
2747 * configure.srv: Add safe-ctype.o and lbasename.o to srv_tgtobj
2748 for all targets that use win32-low.c.
2749 * win32-low.c (win32_ensure_ntdll_loaded): New function.
2750 (do_initial_child_stuff): Add call to win32_ensure_ntdll_loaded.
2751
4210d83e
PA
27522013-12-13 Pedro Alves <palves@redhat.com>
2753
2754 * target.c (mywait): Set OURSTATUS->KIND to TARGET_WAITKIND_STOPPED
2755 if equal to TARGET_WAITKIND_LOADED.
2756 * win32-low.c (cached_status): New static global.
2757 (win32_wait): Add declaration.
2758 (do_initial_child_stuff): Flush all initial pending debug events
2759 up to the initial breakpoint.
2760 (win32_wait): If CACHED_STATUS was set, return that instead
2761 of doing a real wait. Remove the code resuming the execution
2762 of the inferior after receiving a TARGET_WAITKIND_LOADED event
2763 during the initial phase. Also remove the code changing
2764 OURSTATUS->KIND from TARGET_WAITKIND_LOADED to
2765 TARGET_WAITKIND_STOPPED.
2766
e7f0d979
YQ
27672013-12-11 Yao Qi <yao@codesourcery.com>
2768
2769 * notif.c (handle_notif_ack): Return 0 if no notification
2770 matches.
2771
ebcf782c
DE
27722013-11-20 Doug Evans <dje@google.com>
2773
2774 * linux-low.c (linux_set_resume_request): Fix comment.
2775
20ad9378
DE
27762013-11-20 Doug Evans <dje@google.com>
2777
2778 * linux-low.c (resume_status_pending_p): Tweak comment.
2779
a196ebeb
WT
27802013-11-20 Walfred Tedeschi <walfred.tedeschi@intel.com>
2781
2782 * Makefile.in: Add i386-mpx.c, i386-mpx-linux.c, amd64-mpx.c,
2783 amd64-mpx-linux.c, x32-mpx.c and x32-mpx-linux.c generation.
2784 * configure.srv (srv_i386_regobj): Add i386-mpx.o.
2785 (srv_i386_linux_regobj): Add i386-mpx-linux.o.
2786 (srv_amd64_regobj): Add amd64-mpx.o.
2787 (srv_amd64_linux_regobj): Add amd64-mpx-linux.o.
2788 (srv_i386_32bit_xmlfiles): Add i386/32bit-mpx.xml.
2789 (srv_i386_64bit_xmlfiles): Add i386/64bit-mpx.xml.
2790 * i387-fp.c (num_pl_bnd_register) Added constant.
2791 (num_pl_bnd_cfg_registers) Added constant.
2792 (struct i387_xsave) Added reserved area and MPX fields.
2793 (i387_cache_to_xsave, i387_xsave_to_cache) Add MPX.
2794 * linux-x86-low.c (init_registers_i386_mpx_linux): Declare new
2795 function.
2796 (tdesc_i386_mpx_linux): Add MPX amd64 target.
2797 (init_registers_amd64_mpx_linux): Declare new function.
2798 (tdesc_amd64_mpx_linux): Add MPX amd64 target.
2799 (x86_64_regmap): Add MPX registers.
2800 (x86_linux_read_description): Add MPX case.
2801 (initialize_low_arch): Initialize MPX targets.
2802
0080a2f6
TT
28032013-11-18 Tom Tromey <tromey@redhat.com>
2804
2805 * configure: Rebuild.
2806 * configure.ac: Don't check for stdlib.h.
2807 * gdbreplay.c: Unconditionally include stdlib.h.
2808
2978b111
TT
28092013-11-18 Tom Tromey <tromey@redhat.com>
2810
2811 * config.in: Rebuild.
2812 * configure: Rebuild.
2813 * configure.ac: Don't use AC_HEADER_DIRENT.
2814
a3d08894
TT
28152013-11-18 Tom Tromey <tromey@redhat.com>
2816
2817 * server.h: Don't check HAVE_STRING_H.
2818 * gdbreplay.c: Don't check HAVE_STRING_H.
2819 * configure: Rebuild.
2820
0a5dd17d
TT
28212013-11-18 Tom Tromey <tromey@redhat.com>
2822
2823 * Makefile.in (gdbreplay$(EXEEXT)): Depend on and link against
2824 LIBGNU.
2825
1bd2f0ba
TT
28262013-11-08 Tom Tromey <tromey@redhat.com>
2827
2828 * configure, config.in: Rebuild.
2829 * configure.ac: Remove unused configury.
2830
3266f10b
TT
28312013-11-08 Tom Tromey <tromey@redhat.com>
2832
2833 * acinclude.m4: Include common.m4, codeset.m4.
2834 * configure, config.in: Rebuild.
2835 * configure.ac: Use GDB_AC_COMMON.
2836
6682d959
AA
28372013-11-06 Andreas Arnez <arnez@linux.vnet.ibm.com>
2838
2839 * linux-s390-low.c (HWCAP_S390_TE): New define.
2840 (s390_arch_setup): Consider the TE field in the HWCAP for
2841 determining 'have_regset_tdb'.
2842
fd0a4d76
SDJ
28432013-10-16 Sergio Durigan Junior <sergiodj@redhat.com>
2844
2845 PR gdb/16014
2846 * tracepoint.c (download_tracepoint_1): Remove unnecessary double
2847 call to sizeof.
2848
1a3d890b
PA
28492013-10-02 Pedro Alves <palves@redhat.com>
2850
2851 * server.c (process_serial_event): Don't output "GDBserver
2852 exiting" if GDB is connected through stdio.
2853 * target.c (mywait): Likewise, be silent if GDB is connected
2854 through stdio.
2855
97ad4581
JB
28562013-10-01 Joel Brobecker <brobecker@adacore.com>
2857
2858 * lynx-low.c (lynx_add_threads_after_attach): New function.
2859 (lynx_attach): Remove call to add_thread. Add call to
2860 lynx_add_threads_after_attach instead.
2861
5b4e221c
MF
28622013-09-28 Mike Frysinger <vapier@gentoo.org>
2863
2864 * configure.ac (AC_CHECK_HEADERS): Add sys/syscall.h
2865 * config.in, configure: Regenerated.
2866
ee47b2f8
YQ
28672013-09-18 Yao Qi <yao@codesourcery.com>
2868
2869 PR server/15959
2870 * server.c (start_inferior): Clear 'resume_info'.
2871
d6707650 28722013-09-16 Jiong Wang <jiwang@tilera.com>
0f63d4db 2873
d6707650
JW
2874 * linux-tile-low.c (tile_regsets): Modify the size field to 64-bit
2875 for each register.
2876
9243dd0e 28772013-09-16 Jiong Wang <jiwang@tilera.com>
0f63d4db 2878
9243dd0e
JW
2879 * configure.srv <tilegx*-*-linux*>: Remove linux-osdata.o from and add
2880 linux-tile-low.o to srv_tgtobj.
2881
c623a6ef
WN
28822013-09-16 Will Newton <will.newton@linaro.org>
2883
2884 * linux-aarch64-low.c (aarch64_linux_set_debug_regs): Zero
2885 out regs.
2886
fb71d39e
PA
28872013-09-06 Pedro Alves <palves@redhat.com>
2888
2889 * Makefile.in (gdb_proc_service_h, regdef_h, regcache_h)
2890 (signals_def, signals_h, ptid_h, ax_h, agent_h, linux_btrace_h)
2891 (linux_osdata_h, vec_h, gdb_vecs_h, host_defs_h, libiberty_h)
2892 (server_h, gdbthread_h, linux_low_h, linux_ptrace_h)
2893 (gdb_thread_db_h, linux_procfs_h, lynx_low_h, nto_low_h)
2894 (mips_linux_watch_h, i386_low_h, win32_low_h): Delete.
2895
8e7e9910
PA
28962013-09-06 Pedro Alves <palves@redhat.com>
2897
2898 * Makefile.in (linux-btrace.o, mips-linux-watch.o): Remove
2899 explicit header dependencies and use $COMPILE/$POSTCOMPILE.
2900
7c3a12ca
PA
29012013-09-06 Pedro Alves <palves@redhat.com>
2902
2903 * linux-amd64-ipa.c: Include tracepoint.h.
2904 * linux-i386-ipa.c: Include tracepoint.h.
2905
8eb3d7b6
RW
29062013-09-06 Ricard Wanderlof <ricardw@axis.com>
2907
2908 * linux-crisv32-low.c (PTRACE_GET_THREAD_AREA): New macro.
2909 (ps_get_thread_area): New function.
2910
eddddb9d
RW
29112013-09-06 Ricard Wanderlof <ricardw@axis.com>
2912
2913 * linux-crisv32-low.c (elf_gregset_t): Delete typedef.
2914 (initialize_low_arch): Call init_registers_crisv32 rather than
2915 init_register_crisv32.
2916
533b0600
PA
29172013-09-05 Pedro Alves <palves@redhat.com>
2918
2919 * server.h (handle_vFile, hostio_last_error_from_errno): Move
2920 to ...
2921 * hostio.h: ... this new file.
2922 * hostio.c, server.c, linux-low.c, nto-low.c, spu-low,
2923 win32-low.c: Include hostio.h.
2924
0ce3d3b5
PA
29252013-09-05 Pedro Alves <palves@redhat.com>
2926
2927 * server.h (gdb_client_data, handler_func, callback_handler_func)
2928 (delete_file_handler, add_file_handler, append_callback_event)
2929 (delete_callback_event, start_event_loop, initialize_event_loop):
2930 Move to event-loop.h and include it.
2931 * event-loop.h: New file.
2932
799cdc37
PA
29332013-09-05 Pedro Alves <palves@redhat.com>
2934
2935 * dll.c, inferiors.c, remote-utils.c, server.c: Include "dll.h".
2936 * server.h (struct dll_info, all_dlls, dlls_changed, clear_dlls)
2937 (loaded_dll, unloaded_dll): Move to ...
2938 * dll.h: ... this new file.
2939 * inferiors.c, remote-utils.c, win32-low.c: Include "dll.h".
2940
6a6bbd9d
PA
29412013-09-05 Pedro Alves <palves@redhat.com>
2942
2943 * server.h (current_process, get_thread_process, all_processes)
2944 (add_inferior_to_list, for_each_inferior, current_inferior)
2945 (remove_inferior, add_process, remove_process, find_process_pid)
2946 (have_started_inferiors_p, have_attached_inferiors_p)
2947 (thread_id_to_gdb_id, thread_to_gdb_id, gdb_id_to_thread_id)
2948 (clear_inferiors, find_inferior, find_inferior_id)
2949 (inferior_target_data, set_inferior_target_data)
2950 (inferior_regcache_data, set_inferior_regcache_data): Move to
2951 inferiors.h, and include it.
2952 * inferiors.h: New file.
2953
f699aaba
PA
29542013-09-05 Pedro Alves <palves@redhat.com>
2955
2956 * server.h (struct emit_ops, current_insn_ptr, emit_error):
2957 Move ...
72f4393d 2958 * ax.h: ... here.
f699aaba 2959
c144c7a0
PA
29602013-09-05 Pedro Alves <palves@redhat.com>
2961
2962 * ax.c, linux-low.c, linux-x86-low.c, server.c: Include
2963 tracepoint.h.
2964 * server.h (IPA_BUFSIZ, initialize_tracepoint, tracing)
2965 (disconnected_tracing, tracepoint_look_up_symbols, stop_tracing
2966 (handle_tracepoint_general_set, handle_tracepoint_query)
2967 (tracepoint_finished_step, tracepoint_was_hit)
2968 (release_while_stepping_state_list, current_traceframe)
2969 (in_readonly_region, traceframe_read_mem)
2970 (fetch_traceframe_registers, traceframe_read_sdata)
2971 (traceframe_read_info, struct fast_tpoint_collect_status)
2972 (fast_tracepoint_collecting, force_unlock_trace_buffer)
2973 (handle_tracepoit_bkpts, initialize_low_tracepoint)
2974 (supply_fast_tracepoint_registers)
2975 (supply_static_tracepoint_registers, set_trampoline_buffer_space)
2976 (ipa_tdesc, claim_trampoline_space)
2977 (have_fast_tracepoint_trampoline_buffer, gdb_agent_about_to_close)
2978 (agent_mem_read, agent_get_trace_state_variable_value)
2979 (agent_set_trace_state_variable_value, agent_tsv_read)
2980 (agent_mem_read_string, get_raw_reg_func_addr)
2981 (get_get_tsv_func_addr, get_set_tsv_func_addr): Move to ...
2982 * tracepoint.h: ... this new file.
2983
ff42e6ab
PA
29842013-09-05 Pedro Alves <palves@redhat.com>
2985
2986 * server.h (perror_with_name, error, fatal, warning, paddress)
2987 (pulongest, plongest, phex_nz, pfildes): Move to utils.h, and
2988 include it.
2989 * utils.h: New file.
2990
541af0f4
PA
29912013-09-05 Pedro Alves <palves@redhat.com>
2992
2993 * server.h (remote_debug, noack_mode, transport_is_reliable)
2994 (gdb_connected, STDIO_CONNECTION_NAME, remote_connection_is_stdio)
2995 (read_ptid, write_ptid, putpkt, putpkt_binary, putpkt_notif)
2996 (getpkt, remote_prepare, remote_open, remote_close, write_ok)
2997 (write_enn, initialize_async_io, enable_async_io)
2998 (disable_async_io, check_remote_input_interrupt_request)
2999 (convert_ascii_to_int, convert_int_to_ascii, new_thread_notify)
3000 (dead_thread_notify, prepare_resume_reply)
3001 (decode_address_to_semicolon, decode_address, decode_m_packet)
3002 (decode_M_packet, decode_X_packet, decode_xfer_write)
3003 (decode_search_memory_packet, unhexify, hexify)
3004 (remote_escape_output, unpack_varlen_hex, clear_symbol_cache)
3005 (look_up_one_symbol, relocate_instruction)
3006 (monitor_output): Move to remote-utils.h, and include it.
3007 * remote-utils.h: New file.
3008
eebdf26b
PA
30092013-09-05 Pedro Alves <palves@redhat.com>
3010
3011 * server.h (_): Delete.
3012
3aafd2ff
PA
30132013-09-02 Pedro Alves <palves@redhat.com>
3014
3015 * tracepoint.c (TRACEFRAME_EOB_MARKER_SIZE): New macro.
3016 (init_trace_buffer): Ensure at least TRACEFRAME_EOB_MARKER_SIZE is
3017 allocated.
3018 (trace_buffer_alloc): Use TRACEFRAME_EOB_MARKER_SIZE.
3019
cee83bcb
PM
30202013-09-02 Pierre Muller <muller@sourceware.org>
3021
3022 * win32-low.c (child_xfer_memory): Check if ReadProcessMemory
3023 or WriteProcessMemory complete successfully and handle
3024 ERROR_PARTIAL_COPY error.
3025
9a13b2fa
PA
30262013-09-02 Pedro Alves <palves@redhat.com>
3027
3028 * server.c (gdb_read_memory): Return -1 on traceframe memory read
3029 error instead of EIO.
3030
602e3198
JK
30312013-08-28 Jan Kratochvil <jan.kratochvil@redhat.com>
3032
3033 PR server/15604
3034 * linux-low.c: Include filestuff.h.
3035 (linux_create_inferior) <pid == 0>: Call close_most_fds.
3036 * lynx-low.c: Include filestuff.h.
3037 (lynx_create_inferior) <pid == 0>: Call close_most_fds.
3038 * server.c: Include filestuff.h.
3039 (main): Call notice_open_fds.
3040 * spu-low.c: Include filestuff.h.
3041 (spu_create_inferior) <pid == 0>: Call close_most_fds.
3042
96d7229d
LM
30432013-08-22 Luis Machado <lgustavo@codesourcery.com>
3044
3045 * Makefile.in: Explain why ../target and ../nat are not
3046 listed as include file search paths.
3047 (linux-waitpid.o): New object file rule.
3048 * configure.srv (srv_native_linux_obj): New variable.
3049 Replace all occurrences of linux native object files with
3050 $srv_native_linux_obj.
3051 * linux-low.c: Include nat/linux-nat.h and nat/linux-waitpid.h.
3052 (HAS_NOMMU): Move defining logic to common/linux-ptrace.c.
3053 (linux_enable_event_reporting): Remove declaration.
3054 (my_waitpid): Moved to common/linux-waitpid.c.
3055 (linux_wait_for_event): Pass ptid when calling
3056 linux_enable_event_reporting.
3057 (linux_supports_tracefork_flag): Remove.
3058 (linux_enable_event_reporting): Likewise.
3059 (linux_tracefork_grandchild): Remove.
3060 (STACK_SIZE): Moved to common/linux-ptrace.c.
3061 (linux_tracefork_child): Remove.
3062 (linux_test_for_tracefork): Remove.
3063 (linux_look_up_symbols): Call linux_supports_traceclone.
3064 (initialize_low): Remove call to linux_test_for_tracefork.
3065 * linux-low.h (PTRACE_TYPE_ARG3): Move to
3066 common/linux-ptrace.h.
3067 (PTRACE_TYPE_ARG4): Likewise.
3068 Include linux-ptrace.h.
3069
32940073
PA
30702013-08-21 Pedro Alves <palves@redhat.com>
3071
3072 * config.in: Renegerate.
3073
33b60d58 30742013-08-19 Luis Machado <lgustavo@codesourcery.com>
a261b8f5 3075
33b60d58
LM
3076 * Makefile.in (INCLUDE_CFLAGS): Include -I$(srcdir)/../.
3077 (SFILES): Remove $(srcdir)/common/target-common.c and
3078 add $(srcdir)/target/waitstatus.c.
3079 (OBS): Remove target-common.o and add waitstatus.o.
3080 (server_h): Remove $(srcdir)/../common/target-common.h and
3081 add $(srcdir)/../target/resume.h, $(srcdir)/../target/wait.h
3082 and $(srcdir)/../target/waitstatus.h.
3083 (target-common.o): Remove.
3084 (waitstatus.o): New target object file.
3085 * target.h: Do not include target-common.h and
3086 include target/resume.h, target/wait.h and
3087 target/waitstatus.h.
3088
b8e1b30e
LM
30892013-08-13 Luis Machado <lgustavo@codesourcery.com>
3090
3091 * linux-arm-low.c: Rename all occurrences of PTRACE_ARG3_TYPE
3092 to PTRACE_TYPE_ARG3.
3093 * linux-low.c: Rename all occurrences of PTRACE_ARG3_TYPE
3094 to PTRACE_TYPE_ARG3 and PTRACE_ARG4_TYPE to
3095 PTRACE_TYPE_ARG4.
3096 * linux-low.h (PTRACE_ARG3_TYPE): Rename to PTRACE_TYPE_ARG3.
3097 (PTRACE_ARG4_TYPE): Rename to PTRACE_TYPE_ARG4.
3098
7a60ad40
YQ
30992013-07-27 Jie Zhang <jie@codesourcery.com>
3100 Daniel Jacobowitz <dan@codesourcery.com>
3101 Yao Qi <yao@codesourcery.com>
3102
3103 * Makefile.in (SFILES): Add common/mips-linux-watch.c.
3104 (mips-linux-watch.o): New rule.
3105 (mips_linux_watch_h): New variable.
3106 * configure.srv <mips*-*-linux*>: Add mips-linux-watch.o to
3107 srv_tgtobj.
3108 * linux-mips-low.c: Include mips-linux-watch.h.
3109 (struct arch_process_info, struct arch_lwp_info): New.
3110 (update_watch_registers_callback): New function.
3111 (mips_linux_new_process, mips_linux_new_thread) New functions.
3112 (mips_linux_prepare_to_resume, mips_insert_point): New
3113 functions.
3114 (mips_remove_point, mips_stopped_by_watchpoint): New
3115 functions.
3116 (rsp_bp_type_to_target_hw_bp_type): New function.
3117 (mips_stopped_data_address): New function.
3118 (the_low_target): Add watchpoint support functions.
3119
de6f69ad
YQ
31202013-07-27 Yao Qi <yao@codesourcery.com>
3121
3122 * i386-low.c: Include break-common.h.
3123 (enum target_hw_bp_type): Remove.
3124
3360c0bf
LM
31252013-07-24 Luis Machado <lgustavo@codesourcery.com>
3126
3127 * Makefile.in (SFILES): /common/target-common.c.
3128 (OBS): Add target-common.o.
3129 (server_h): Add $(srcdir)/../common/target-common.h.
3130 (target-common.o): New target.
3131 * server.c (queue_stop_reply_callback): Free
3132 status string after use.
3133 * target.c (target_waitstatus_to_string): Remove.
3134 * target.h: Include target-common.h.
3135 (resume_kind): Likewise.
3136 (target_waitkind): Likewise.
3137 (target_waitstatus): Likewise.
3138 (TARGET_WNOHANG): Likewise.
3139
bd885420
YQ
31402013-07-04 Yao Qi <yao@codesourcery.com>
3141
3142 * Makefile.in (host_alias): Use @host_noncanonical@.
3143 (target_alias): Use @target_noncanonical@.
3144 * configure.ac: Use ACX_NONCANONICAL_TARGET and
3145 ACX_NONCANONICAL_HOST.
3146 * configure: Regenerated.
3147
3148 Revert:
3149 2013-06-28 Mircea Gherzan <mircea.gherzan@intel.com>
3150
3151 * configure.ac (version_host, version_target): Set and AC_SUBST them.
3152 * configure: Rebuild.
3153 * Makefile.in (version_host, version_target): Get from configure.
3154 (version.c): Use $(version_host) and $(version_target).
3155
17ef446e
PA
31562013-07-03 Pedro Alves <palves@redhat.com>
3157
3158 * Makefile.in (config.status): Depend on development.sh.
3159 * acinclude.m4: Include libmcheck.m4.
3160 * configure: Regenerate.
3161
7a9a7487
MG
31622013-07-02 Mircea Gherzan <mircea.gherzan@intel.com>
3163
3164 * win32-low.c (winapi_DebugActiveProcessStop): Move the WINAPI
3165 attribute inside the parentheses.
3166 (winapi_DebugSetProcessKillOnExit): Ditto.
3167 (winapi_DebugBreakProcess): Ditto.
3168 (winapi_GenerateConsoleCtrlEvent): Ditto.
a261b8f5 3169
49b64de6
MG
31702013-07-02 Mircea Gherzan <mircea.gherzan@intel.com>
3171
3172 * notif.h (notif_event): Add a dummy member to avoid compiler
3173 errors.
3174
d5749ee7
PA
31752013-07-01 Pedro Alves <palves@redhat.com>
3176
3177 * hostio.c (HOSTIO_PATH_MAX): Define.
3178 (require_filename, handle_open, handle_unlink, handle_readlink):
3179 Use it.
3180
d8d2a3ee
PA
31812013-07-01 Pedro Alves <palves@redhat.com>
3182
3183 * server.h: Include "pathmax.h".
3184 * linux-low.c: Don't include sys/param.h.
3185 (linux_pid_exe_is_elf_64_file): Use PATH_MAX instead of
3186 MAXPATHLEN.
3187 * win32-low.c: Don't include sys/param.h.
3188 (win32_create_inferior): Use PATH_MAX instead of MAXPATHLEN.
3189
bc7dea8d
PA
31902013-07-01 Pedro Alves <palves@redhat.com>
3191
3192 * event-loop.c: Don't check HAVE_UNISTD_H before including
3193 <unistd.h>.
3194 * gdbreplay.c: Likewise.
3195 * remote-utils.c: Likewise.
3196 * server.c: Likewise.
3197 * configure.ac: Don't check for unistd.h.
3198 * configure: Regenerate.
3199
d6c2da54
TT
32002013-06-28 Tom Tromey <tromey@redhat.com>
3201
3202 * Makefile.in (version.c): Use version.in, not
3203 common/version.in.
3204
257b6bec
MG
32052013-06-28 Mircea Gherzan <mircea.gherzan@intel.com>
3206
3207 * configure.ac (version_host, version_target): Set and AC_SUBST them.
3208 * configure: Rebuild.
3209 * Makefile.in (version_host, version_target): Get from configure.
3210 (version.c): Use $(version_host) and $(version_target).
3211
86ebe149
DK
32122013-06-10 Dmitry Kozlov <ddk@codesourcery.com>
3213
3214 Fix trace-status to output user name without trailing colon.
3215 * tracepoint.c (cmd_qtstatus): Remove unnecessary colon from user name.
3216
f30aa5af
DK
32172013-06-10 Dmitry Kozlov <ddk@codesourcery.com>
3218
3219 Fix trace-status to output proper start-time and stop-time.
3220 * tracepoint.c (cmd_qtstatus): Modify trace-status output to
3221 output start time and stop time in hex as gdb expects.
3222
28a93511
YQ
32232013-06-26 Pedro Alves <pedro@codesourcery.com>
3224
3225 * tracepoint.c (build_traceframe_info_xml): Output trace state
3226 variables present in the trace buffer.
3227
01208463
TT
32282013-06-24 Tom Tromey <tromey@redhat.com>
3229
3230 * Makefile.in (version.c): Use bfd/version.h, common/version.in,
3231 create-version.sh.
3232 (version.o): Remove.
3233 * gdbreplay.c: Include version.h.
3234 (version, host_name): Don't declare.
3235 * server.h: Include version.h.
3236 (version, host_name): Don't declare.
3237
760256f9
PA
32382013-06-12 Pedro Alves <palves@redhat.com>
3239
3240 * linux-x86-low.c (linux_is_elf64): Delete global.
3241 (x86_siginfo_fixup): Replace reference to `linux_is_elf64' global
3242 with local linux_pid_exe_is_elf_64_file use.
3243
030031ee
PA
32442013-06-11 Pedro Alves <palves@redhat.com>
3245
3246 * linux-low.c (regset_disabled, disable_regset): New functions.
3247 (regsets_fetch_inferior_registers)
3248 (regsets_store_inferior_registers): Use them.
3249 (initialize_regsets_info); Don't allocate the disabled_regsets
3250 array here.
3251 * linux-low.h (struct regsets_info) <disabled_regsets>: Extend
3252 comment.
3253
5da6eb0a
PA
32542013-06-11 Pedro Alves <palves@redhat.com>
3255
3256 * linux-low.c (initialize_regsets_info): Use xcalloc instead of
3257 xmalloc.
3258
7e5aaa09
PA
32592013-06-11 Pedro Alves <palves@redhat.com>
3260
3261 * linux-x86-low.c (initialize_low_arch): Call
3262 init_registers_x32_avx_linux.
3263
d878444c
JK
32642013-06-09 Jan Kratochvil <jan.kratochvil@redhat.com>
3265
3266 Fix compatibility with Android Bionic.
3267 * linux-low.c (linux_qxfer_libraries_svr4): Ignore first entry even if
3268 it is not empty.
3269
3aee8918
PA
32702013-06-07 Pedro Alves <palves@redhat.com>
3271
5f2b57b5 3272 PR server/14823
3aee8918
PA
3273 * Makefile.in (OBS): Add tdesc.o.
3274 (IPA_OBJS): Add tdesc-ipa.o.
3275 (tdesc-ipa.o): New rule.
3276 * ax.c (gdb_eval_agent_expr): Adjust register_size call to new
3277 interface.
3278 * linux-low.c (new_inferior): Delete.
3279 (disabled_regsets, num_regsets): Delete.
3280 (linux_add_process): Adjust to set the new per-process
3281 new_inferior flag.
3282 (linux_detach_one_lwp): Adjust to call regcache_invalidate_thread.
3283 (linux_wait_for_lwp): Adjust. Only call arch_setup if the event
3284 was a stop. When calling arch_setup, switch the current inferior
3285 to the thread that got an event.
3286 (linux_resume_one_lwp): Adjust to call regcache_invalidate_thread.
3287 (regsets_fetch_inferior_registers)
3288 (regsets_store_inferior_registers): New regsets_info parameter.
3289 Adjust to use it.
3290 (linux_register_in_regsets): New regs_info parameter. Adjust to
3291 use it.
3292 (register_addr, fetch_register, store_register): New usrregs_info
3293 parameter. Adjust to use it.
3294 (usr_fetch_inferior_registers, usr_store_inferior_registers): New
3295 parameter regs_info. Adjust to use it.
3296 (linux_fetch_registers): Get the current inferior's regs_info, and
3297 adjust to use it.
3298 (linux_store_registers): Ditto.
3299 [HAVE_LINUX_REGSETS] (initialize_regsets_info): New.
3300 (initialize_low): Don't initialize the target_regsets here. Call
3301 initialize_low_arch.
3302 * linux-low.h (target_regsets): Delete declaration.
3303 (struct regsets_info): New.
3304 (struct usrregs_info): New.
3305 (struct regs_info): New.
3306 (struct process_info_private) <new_inferior>: New field.
3307 (struct linux_target_ops): Delete the num_regs, regmap, and
3308 regset_bitmap fields. New field regs_info.
3309 [HAVE_LINUX_REGSETS] (initialize_regsets_info): Declare.
3310 * i387-fp.c (num_xmm_registers): Delete.
3311 (i387_cache_to_fsave, i387_fsave_to_cache): Adjust find_regno
3312 calls to new interface.
3313 (i387_cache_to_fxsave, i387_cache_to_xsave, i387_fxsave_to_cache)
3314 (i387_xsave_to_cache): Adjust find_regno calls to new interface.
3315 Infer the number of xmm registers from the regcache's target
3316 description.
3317 * i387-fp.h (num_xmm_registers): Delete.
3318 * inferiors.c (add_thread): Don't install the thread's regcache
3319 here.
3320 * proc-service.c (gregset_info): Fetch the current inferior's
3321 regs_info. Adjust to use it.
3322 * regcache.c: Include tdesc.h.
3323 (register_bytes, reg_defs, num_registers)
3324 (gdbserver_expedite_regs): Delete.
3325 (get_thread_regcache): If the thread doesn't have a regcache yet,
3326 create one, instead of aborting gdbserver.
3327 (regcache_invalidate_one): Rename to ...
3328 (regcache_invalidate_thread): ... this.
3329 (regcache_invalidate_one): New.
3330 (regcache_invalidate): Only invalidate registers of the current
3331 process.
3332 (init_register_cache): Add target_desc parameter, and use it.
3333 (new_register_cache): Ditto. Assert the target description has a
3334 non zero registers_size.
3335 (regcache_cpy): Add assertions. Adjust.
3336 (realloc_register_cache, set_register_cache): Delete.
3337 (registers_to_string, registers_from_string): Adjust.
3338 (find_register_by_name, find_regno, find_register_by_number)
3339 (register_cache_size): Add target_desc parameter, and use it.
3340 (free_register_cache_thread, free_register_cache_thread_one)
3341 (regcache_release, register_cache_size): New.
3342 (register_size): Add target_desc parameter, and use it.
3343 (register_data, supply_register, supply_register_zeroed)
3344 (supply_regblock, supply_register_by_name, collect_register)
3345 (collect_register_as_string, collect_register_by_name): Adjust.
3346 * regcache.h (struct target_desc): Forward declare.
3347 (struct regcache) <tdesc>: New field.
3348 (init_register_cache, new_register_cache): Add target_desc
3349 parameter.
3350 (regcache_invalidate_thread): Declare.
3351 (regcache_invalidate_one): Delete declaration.
3352 (regcache_release): Declare.
3353 (find_register_by_number, register_cache_size, register_size)
3354 (find_regno): Add target_desc parameter.
3355 (gdbserver_expedite_regs, gdbserver_xmltarget): Delete
3356 declarations.
3357 * remote-utils.c: Include tdesc.h.
3358 (outreg, prepare_resume_reply): Adjust.
3359 * server.c: Include tdesc.h.
3360 (gdbserver_xmltarget): Delete declaration.
3361 (get_features_xml, process_serial_event): Adjust.
3362 * server.h [IN_PROCESS_AGENT] (struct target_desc): Forward
3363 declare.
3364 (struct process_info) <tdesc>: New field.
3365 (ipa_tdesc): Declare.
3366 * tdesc.c: New file.
3367 * tdesc.h: New file.
3368 * tracepoint.c: Include tdesc.h.
3369 [IN_PROCESS_AGENT] (ipa_tdesc): Define.
3370 (get_context_regcache): Adjust to pass ipa_tdesc down.
3371 (do_action_at_tracepoint): Adjust to get the register cache size
3372 from the context regcache's description.
3373 (traceframe_walk_blocks): Adjust to get the register cache size
3374 from the current trace frame's description.
3375 (traceframe_get_pc): Adjust to get current trace frame's
3376 description and pass it down.
3377 (gdb_collect): Adjust to get the register cache size from the
3378 IPA's description.
3379 * linux-amd64-ipa.c (tdesc_amd64_linux): Declare.
3380 (gdbserver_xmltarget): Delete.
3381 (initialize_low_tracepoint): Set the ipa's target description.
3382 * linux-i386-ipa.c (tdesc_i386_linux): Declare.
3383 (initialize_low_tracepoint): Set the ipa's target description.
3384 * linux-x86-low.c: Include tdesc.h.
3385 [__x86_64__] (is_64bit_tdesc): New.
3386 (ps_get_thread_area, x86_get_thread_area): Use it.
3387 (i386_cannot_store_register): Rename to ...
3388 (x86_cannot_store_register): ... this. Use is_64bit_tdesc.
3389 (i386_cannot_fetch_register): Rename to ...
3390 (x86_cannot_fetch_register): ... this. Use is_64bit_tdesc.
3391 (x86_fill_gregset, x86_store_gregset): Adjust register_size calls
3392 to new interface.
3393 (target_regsets): Rename to ...
3394 (x86_regsets): ... this.
3395 (x86_get_pc, x86_set_pc): Adjust register_size calls to new
3396 interface.
3397 (x86_siginfo_fixup): Use is_64bit_tdesc.
3398 [__x86_64__] (tdesc_amd64_linux, tdesc_amd64_avx_linux)
3399 (tdesc_x32_avx_linux, tdesc_x32_linux)
3400 (tdesc_i386_linux, tdesc_i386_mmx_linux, tdesc_i386_avx_linux):
3401 Declare.
3402 (x86_linux_update_xmltarget): Delete.
3403 (I386_LINUX_XSAVE_XCR0_OFFSET): Define.
3404 (have_ptrace_getfpxregs, have_ptrace_getregset): New.
3405 (AMD64_LINUX_USER64_CS): New.
3406 (x86_linux_read_description): New, based on
3407 x86_linux_update_xmltarget.
3408 (same_process_callback): New.
3409 (x86_arch_setup_process_callback): New.
3410 (x86_linux_update_xmltarget): New.
3411 (x86_regsets_info): New.
3412 (amd64_linux_regs_info): New.
3413 (i386_linux_usrregs_info): New.
3414 (i386_linux_regs_info): New.
3415 (x86_linux_regs_info): New.
3416 (x86_arch_setup): Reimplement.
3417 (x86_install_fast_tracepoint_jump_pad): Use is_64bit_tdesc.
3418 (x86_emit_ops): Ditto.
3419 (the_low_target): Adjust. Install x86_linux_regs_info,
3420 x86_cannot_fetch_register, and x86_cannot_store_register.
3421 (initialize_low_arch): New.
3422 * linux-ia64-low.c (tdesc_ia64): Declare.
3423 (ia64_fetch_register): Adjust.
3424 (ia64_usrregs_info, regs_info): New globals.
3425 (ia64_regs_info): New function.
3426 (the_low_target): Adjust.
3427 (initialize_low_arch): New function.
3428 * linux-sparc-low.c (tdesc_sparc64): Declare.
3429 (sparc_fill_gregset_to_stack, sparc_store_gregset_from_stack):
3430 Adjust.
3431 (sparc_arch_setup): New function.
3432 (sparc_regsets_info, sparc_usrregs_info, regs_info): New globals.
3433 (the_low_target): Adjust.
3434 (initialize_low_arch): New function.
3435 * linux-ppc-low.c (tdesc_powerpc_32l, tdesc_powerpc_altivec32l)
3436 (tdesc_powerpc_cell32l, tdesc_powerpc_vsx32l)
3437 (tdesc_powerpc_isa205_32l, tdesc_powerpc_isa205_altivec32l)
3438 (tdesc_powerpc_isa205_vsx32l, tdesc_powerpc_e500l)
3439 (tdesc_powerpc_64l, tdesc_powerpc_altivec64l)
3440 (tdesc_powerpc_cell64l, tdesc_powerpc_vsx64l)
3441 (tdesc_powerpc_isa205_64l, tdesc_powerpc_isa205_altivec64l)
3442 (tdesc_powerpc_isa205_vsx64l): Declare.
3443 (ppc_cannot_store_register, ppc_collect_ptrace_register)
3444 (ppc_supply_ptrace_register, parse_spufs_run, ppc_get_pc)
3445 (ppc_set_pc, ppc_get_hwcap): Adjust.
3446 (ppc_usrregs_info): Forward declare.
3447 (!__powerpc64__) ppc_regmap_adjusted: New global.
3448 (ppc_arch_setup): Adjust to the current process'es target
3449 description.
3450 (ppc_fill_vsxregset, ppc_store_vsxregset, ppc_fill_vrregset)
3451 (ppc_store_vrregset, ppc_fill_evrregset, ppc_store_evrregse)
3452 (ppc_store_evrregset): Adjust.
3453 (target_regsets): Rename to ...
3454 (ppc_regsets): ... this, and make static.
3455 (ppc_usrregs_info, ppc_regsets_info, regs_info): New globals.
3456 (ppc_regs_info): New function.
3457 (the_low_target): Adjust.
3458 (initialize_low_arch): New function.
3459 * linux-s390-low.c (tdesc_s390_linux32, tdesc_s390_linux32v1)
3460 (tdesc_s390_linux32v2, tdesc_s390_linux64, tdesc_s390_linux64v1)
3461 (tdesc_s390_linux64v2, tdesc_s390x_linux64, tdesc_s390x_linux64v1)
3462 (tdesc_s390x_linux64v2): Declare.
3463 (s390_collect_ptrace_register, s390_supply_ptrace_register)
3464 (s390_fill_gregset, s390_store_last_break): Adjust.
3465 (target_regsets): Rename to ...
3466 (s390_regsets): ... this, and make static.
3467 (s390_get_pc, s390_set_pc): Adjust.
3468 (s390_get_hwcap): New target_desc parameter, and use it.
3469 [__s390x__] (have_hwcap_s390_high_gprs): New global.
3470 (s390_arch_setup): Adjust to set the current process'es target
3471 description. Don't adjust the regmap.
3472 (s390_usrregs_info, s390_regsets_info, regs_info): New globals.
3473 [__s390x__] (s390_usrregs_info_3264, s390_regsets_info_3264)
3474 (regs_info_3264): New globals.
3475 (s390_regs_info): New function.
3476 (the_low_target): Adjust.
3477 (initialize_low_arch): New function.
3478 * linux-mips-low.c (tdesc_mips_linux, tdesc_mips_dsp_linux)
3479 (tdesc_mips64_linux, tdesc_mips64_dsp_linux): Declare.
3480 [__mips64] (init_registers_mips_linux)
3481 (init_registers_mips_dsp_linux): Delete defines.
3482 [__mips64] (tdesc_mips_linux, tdesc_mips_dsp_linux): New defines.
3483 (have_dsp): New global.
3484 (mips_read_description): New, based on mips_arch_setup.
3485 (mips_arch_setup): Reimplement.
3486 (get_usrregs_info): New function.
3487 (mips_cannot_fetch_register, mips_cannot_store_register)
3488 (mips_get_pc, mips_set_pc, mips_fill_gregset, mips_store_gregset)
3489 (mips_fill_fpregset, mips_store_fpregset): Adjust.
3490 (target_regsets): Rename to ...
3491 (mips_regsets): ... this, and make static.
3492 (mips_regsets_info, mips_dsp_usrregs_info, mips_usrregs_info)
3493 (dsp_regs_info, regs_info): New globals.
3494 (mips_regs_info): New function.
3495 (the_low_target): Adjust.
3496 (initialize_low_arch): New function.
3497 * linux-arm-low.c (tdesc_arm, tdesc_arm_with_iwmmxt)
3498 (tdesc_arm_with_vfpv2, tdesc_arm_with_vfpv3, tdesc_arm_with_neon):
3499 Declare.
3500 (arm_fill_vfpregset, arm_store_vfpregset): Adjust.
3501 (arm_read_description): New, with bits factored from
3502 arm_arch_setup.
3503 (arm_arch_setup): Reimplement.
3504 (target_regsets): Rename to ...
3505 (arm_regsets): ... this, and make static.
3506 (arm_regsets_info, arm_usrregs_info, regs_info): New globals.
3507 (arm_regs_info): New function.
3508 (the_low_target): Adjust.
3509 (initialize_low_arch): New function.
3510 * linux-m68k-low.c (tdesc_m68k): Declare.
3511 (target_regsets): Rename to ...
3512 (m68k_regsets): ... this, and make static.
3513 (m68k_regsets_info, m68k_usrregs_info, regs_info): New globals.
3514 (m68k_regs_info): New function.
3515 (m68k_arch_setup): New function.
3516 (the_low_target): Adjust.
3517 (initialize_low_arch): New function.
3518 * linux-sh-low.c (tdesc_sharch): Declare.
3519 (target_regsets): Rename to ...
3520 (sh_regsets): ... this, and make static.
3521 (sh_regsets_info, sh_usrregs_info, regs_info): New globals.
3522 (sh_regs_info, sh_arch_setup): New functions.
3523 (the_low_target): Adjust.
3524 (initialize_low_arch): New function.
3525 * linux-bfin-low.c (tdesc_bfin): Declare.
3526 (bfin_arch_setup): New function.
3527 (bfin_usrregs_info, regs_info): New globals.
3528 (bfin_regs_info): New function.
3529 (the_low_target): Adjust.
3530 (initialize_low_arch): New function.
3531 * linux-cris-low.c (tdesc_cris): Declare.
3532 (cris_arch_setup): New function.
3533 (cris_usrregs_info, regs_info): New globals.
3534 (cris_regs_info): New function.
3535 (the_low_target): Adjust.
3536 (initialize_low_arch): New function.
3537 * linux-cris-low.c (tdesc_crisv32): Declare.
3538 (cris_arch_setup): New function.
3539 (cris_regsets_info, cris_usrregs_info, regs_info): New globals.
3540 (cris_regs_info): New function.
3541 (the_low_target): Adjust.
3542 (initialize_low_arch): New function.
3543 * linux-m32r-low.c (tdesc_m32r): Declare.
3544 (m32r_arch_setup): New function.
3545 (m32r_usrregs_info, regs_info): New globals.
3546 (m32r_regs_info): Adjust.
3547 (initialize_low_arch): New function.
3548 * linux-tic6x-low.c (tdesc_tic6x_c64xp_linux)
3549 (tdesc_tic6x_c64x_linux, tdesc_tic6x_c62x_linux): Declare.
3550 (tic6x_usrregs_info): Forward declare.
3551 (tic6x_read_description): New function, based on ...
3552 (tic6x_arch_setup): ... this. Reimplement.
3553 (target_regsets): Rename to ...
3554 (tic6x_regsets): ... this, and make static.
3555 (tic6x_regsets_info, tic6x_usrregs_info, regs_info): New globals.
3556 (tic6x_regs_info): New function.
3557 (the_low_target): Adjust.
3558 (initialize_low_arch): New function.
3559 * linux-xtensa-low.c (tdesc_xtensa): Declare.
3560 (xtensa_fill_gregset, xtensa_store_gregset): Adjust.
3561 (target_regsets): Rename to ...
3562 (xtensa_regsets): ... this, and make static.
3563 (xtensa_regsets_info, xtensa_usrregs_info, regs_info): New
3564 globals.
3565 (xtensa_arch_setup, xtensa_regs_info): New functions.
3566 (the_low_target): Adjust.
3567 (initialize_low_arch): New function.
3568 * linux-nios2-low.c (tdesc_nios2_linux): Declare.
3569 (nios2_arch_setup): Set the current process'es tdesc.
3570 (target_regsets): Rename to ...
3571 (nios2_regsets): ... this.
3572 (nios2_regsets_info, nios2_usrregs_info, regs_info): New globals.
3573 (nios2_regs_info): New function.
3574 (the_low_target): Adjust.
3575 (initialize_low_arch): New function.
a261b8f5
PA
3576 * linux-aarch64-low.c (tdesc_aarch64): Declare.
3577 (aarch64_arch_setup): Set the current process'es tdesc.
3578 (target_regsets): Rename to ...
3579 (aarch64_regsets): ... this.
3580 (aarch64_regsets_info, aarch64_usrregs_info, regs_info): New globals.
3581 (aarch64_regs_info): New function.
3582 (the_low_target): Adjust.
3583 (initialize_low_arch): New function.
3aee8918
PA
3584 * linux-tile-low.c (tdesc_tilegx, tdesc_tilegx32): Declare
3585 globals.
3586 (target_regsets): Rename to ...
3587 (tile_regsets): ... this.
3588 (tile_regsets_info, tile_usrregs_info, regs_info): New globals.
3589 (tile_regs_info): New function.
3590 (tile_arch_setup): Set the current process'es tdesc.
3591 (the_low_target): Adjust.
3592 (initialize_low_arch): New function.
3593 * spu-low.c (tdesc_spu): Declare.
3594 (spu_create_inferior, spu_attach): Set the new process'es tdesc.
3595 * win32-arm-low.c (tdesc_arm): Declare.
3596 (arm_arch_setup): New function.
3597 (the_low_target): Install arm_arch_setup instead of
3598 init_registers_arm.
3599 * win32-i386-low.c (tdesc_i386, tdesc_amd64): Declare.
3600 (init_windows_x86): Rename to ...
3601 (i386_arch_setup): ... this. Set `win32_tdesc'.
3602 (the_low_target): Adjust.
3603 * win32-low.c (win32_tdesc): New global.
3604 (child_add_thread): Don't create the thread cache here.
3605 (do_initial_child_stuff): Set the new process'es tdesc.
3606 * win32-low.h (struct target_desc): Forward declare.
3607 (win32_tdesc): Declare.
3608 * lynx-i386-low.c (tdesc_i386): Declare global.
3609 (lynx_i386_arch_setup): Set `lynx_tdesc'.
3610 * lynx-low.c (lynx_tdesc): New global.
3611 (lynx_add_process): Set the new process'es tdesc.
3612 * lynx-low.h (struct target_desc): Forward declare.
3613 (lynx_tdesc): Declare global.
3614 * lynx-ppc-low.c (tdesc_powerpc_32): Declare global.
3615 (lynx_ppc_arch_setup): Set `lynx_tdesc'.
3616 * nto-low.c (nto_tdesc): New global.
3617 (do_attach): Set the new process'es tdesc.
3618 * nto-low.h (struct target_desc): Forward declare.
3619 (nto_tdesc): Declare.
3620 * nto-x86-low.c (tdesc_i386): Declare.
3621 (nto_x86_arch_setup): Set `nto_tdesc'.
3622
b1fbec62
GB
36232013-06-04 Gary Benson <gbenson@redhat.com>
3624
3625 * server.c (handle_query): Add "augmented-libraries-svr4-read+"
3626 to qSupported response when appropriate.
3627 (handle_qxfer_libraries_svr4): Allow qXfer:libraries-svr4:read
3628 with nonzero-length annex.
3629 * linux-low.c (linux_qxfer_libraries_svr4): Parse and handle
3630 arguments supplied in annex.
3631
d1ec4ce7
DE
36322013-05-31 Doug Evans <dje@google.com>
3633
ac44adcb 3634 PR server/15594
d1ec4ce7
DE
3635 * linux-x86-low.c (ps_get_thread_area): Properly extend address to
3636 64 bits in 64-cross-32 environment.
3637
9b25f2d3
PA
36382013-05-28 Pedro Alves <palves@redhat.com>
3639
3640 * Makefile.in (clean): Remove reference to aarch64-without-fpu.c.
3641 (aarch64-without-fpu.c): Delete rule.
3642 * configure.srv (aarch64*-*-linux*): Remove references to
3643 aarch64-without-fpu.o and aarch64-without-fpu.xml.
3644 * linux-aarch64-low.c (init_registers_aarch64_without_fpu): Remove
3645 declaration.
3646
6740dc9c
PA
36472013-05-24 Pedro Alves <palves@redhat.com>
3648
3649 * server.c (handle_v_cont) <vCont;r>: Use unpack_varlen_hex
3650 instead of strchr/decode_address. Error if the range isn't split
3651 with a ','. Don't assume there's be a ':' in the action.
3652
c2d6af84
PA
36532013-05-23 Yao Qi <yao@codesourcery.com>
3654 Pedro Alves <palves@redhat.com>
3655
3656 * linux-low.c (lwp_in_step_range): New function.
3657 (linux_wait_1): If the thread was range stepping and stopped
3658 outside the stepping range, report the stop to GDB. Otherwise,
3659 continue stepping. Add range stepping debug output.
3660 (linux_set_resume_request): Copy the step range from the resume
3661 request to the lwp.
3662 (linux_supports_range_stepping): New.
3663 (linux_target_ops) <supports_range_stepping>: Set to
3664 linux_supports_range_stepping.
3665 * linux-low.h (struct linux_target_ops)
3666 <supports_range_stepping>: New field.
3667 (struct lwp_info) <step_range_start, step_range_end>: New fields.
3668 * linux-x86-low.c (x86_supports_range_stepping): New.
3669 (the_low_target) <supports_range_stepping>: Set to
3670 x86_supports_range_stepping.
3671 * server.c (handle_v_cont): Handle 'r' action.
3672 (handle_v_requests): Append ";r" if the target supports range
3673 stepping.
3674 * target.h (struct thread_resume) <step_range_start,
3675 step_range_end>: New fields.
3676 (struct target_ops) <supports_range_stepping>:
3677 New field.
3678 (target_supports_range_stepping): New macro.
3679
58794e1a
JB
36802013-05-17 Joel Brobecker <brobecker@adacore.com>
3681
3682 * lynx-low.c (lynx_resume): Fix null_ptid/minus_one_ptid
3683 confusion in comment.
3684
d631c5a7
JB
36852013-05-17 Joel Brobecker <brobecker@adacore.com>
3686
3687 * lynx-low.c (struct process_info_private): New type.
3688 (lynx_add_process): New function.
3689 (lynx_create_inferior, lynx_attach): Replace calls to
3690 add_process by calls to lynx_add_process.
3691 (lynx_resume): If PTID is null, then try using
3692 current_process()->private->last_wait_event_ptid.
3693 Add comments.
3694 (lynx_clear_inferiors): Delete. The contents of that function
3695 has been inlined in lynx_mourn;
3696 (lynx_wait_1): Save the ptid in the process's private data.
3697 (lynx_mourn): Free the process' private data. Replace call
3698 to lynx_clear_inferiors by call to clear_inferiors.
3699
96f7a20f
YQ
37002013-05-17 Yao Qi <yao@codesourcery.com>
3701
3702 * i386-low.c (i386_length_and_rw_bits): Move the comment to
3703 the right place.
3704
db0dfaa0
LM
37052013-05-16 Luis Machado <lgustavo@codesourcery.com>
3706
3707 * linux-low.c: Move definition checks upwards for PT_TEXT_ADDR,
3708 PT_DATA_ADDR and PT_TEXT_END_ADDR. Update comments.
3709 (linux_read_offsets): Remove PT_TEXT_ADDR, PT_DATA_ADDR and
3710 PT_TEXT_END_ADDR guards. Update comments.
3711 (linux_target_op) <read_offsets>: Conditionally define to
3712 linux_read_offsets if the target is UCLIBC and if it defines
3713 PT_TEXT_ADDR, PT_DATA_ADDR and PT_TEXT_END_ADDR.
3714
68f5f838
SL
37152013-05-06 Sandra Loosemore <sandra@codesourcery.com>
3716 Andrew Jenner <andrew@codesourcery.com>
3717
3718 * Makefile.in (SFILES): Add linux-nios2-low.c.
3719 (clean): Add action to delete nios2-linux.c.
3720 (nios2-linux.c): New rule.
3721 * configure.srv: Add nios2*-*-linux*.
3722 * linux-nios2-low.c: New.
3723
1ebff1fd
HAQ
37242013-05-03 Hafiz Abid Qadeer <abidh@codesourcery.com>
3725
3726 * tracepoint.c (cmd_qtinit): Call 'stop_tracing'.
3727
f6150862
HZ
37282013-04-25 Hui Zhu <hui@codesourcery.com>
3729
3730 PR gdb/15186
f6150862
HZ
3731 * ax.c (ax_printf): Add fflush.
3732
614c279d
TT
37332013-04-22 Tom Tromey <tromey@redhat.com>
3734
3735 * Makefile.in (SFILES): Add filestuff.c.
3736 (OBS): Add filestuff.o.
3737 (filestuff.o): New target.
3738 * config.in, configure: Rebuild.
3739 * configure.ac: Check for fdwalk, pipe2.
3740
7d4e5717
PA
37412013-04-17 Pedro Alves <palves@redhat.com>
3742
3743 * configure.ac (USE_THREAD_DB): Delete variable.
3744 (if test "$srv_linux_thread_db" = "yes"): AC_DEFINE USE_THREAD_DB.
3745 Don't AC_SUBST USE_THREAD_DB.
3746 * Makefile.in (INTERNAL_CFLAGS): Remove @USE_THREAD_DB@.
3747 * config.in, configure: Regenerate.
3748
d5c93e41
PA
37492013-04-16 Pedro Alves <palves@redhat.com>
3750
3751 * linux-low.h (struct lwp_info) <thread_known>: Move under
3752 the USE_THREAD_DB #ifdef.
3753
04f5fe89
PA
37542013-04-16 Pedro Alves <palves@redhat.com>
3755
3756 * Makefile.in (INTERNAL_CFLAGS): Add @USE_THREAD_DB@.
3757 (linux-low.o): Delete rule.
3758 * linux-low.h: Always include "gdb_thread_db.h" instead of
3759 conditionally including thread_db.h.
3760 (struct lwp_info) <th>: Guard with #ifdef USE_THREAD_DB instead of
3761 HAVE_THREAD_DB_H.
3762
480b27bf
JK
37632013-04-07 Jan Kratochvil <jan.kratochvil@redhat.com>
3764
3765 * Makefile.in (install-only): Fix make install regression.
3766
43662968
JK
37672013-04-05 Jan Kratochvil <jan.kratochvil@redhat.com>
3768
3769 Convert man pages to texinfo, new gdbinit.5 texinfo page.
3770 * Makefile.in (install-only): Remove $(man1dir) and gdbserver.1
3771 installation.
3772 * gdbserver.1: Remove.
3773
3e74e146
PA
37742013-03-22 Pedro Alves <palves@redhat.com>
3775
3776 * linux-low.c (handle_extended_wait): Don't call
3777 linux_enable_event_reporting.
3778
a8347a2a
TT
37792013-03-15 Tony Theodore <tonyt@logyst.com>
3780
3781 PR build/9098:
3782 * Makefile.in (SHELL): Use @SHELL@.
3783
eeb56fa7
SDJ
37842013-03-14 Sergio Durigan Junior <sergiodj@redhat.com>
3785
3786 * tracepoint.c (cmd_qtv): Initialize `val' with zero, silencing
3787 compiler warning.
3788
4fa7e2ff
JB
37892013-03-13 Joel Brobecker <brobecker@adacore.com>
3790
3791 * linux-low.c (linux_target_ops) [!HAVE_LINUX_BTRACE]:
3792 Remove extraneous NULL element.
3793
8ddb1965
YQ
37942013-03-13 Yao Qi <yao@codesourcery.com>
3795
3796 * tracepoint.c (traceframe_read_tsv): Look for the last matched
3797 'V' block in trace frame.
3798
9accd112
MM
37992013-03-11 Markus Metzger <markus.t.metzger@intel.com>
3800
3801 * target.h (struct target_ops): Add btrace ops.
3802 (target_supports_btrace): New macro.
3803 (target_enable_btrace): New macro.
3804 (target_disable_btrace): New macro.
3805 (target_read_btrace): New macro.
3806 * gdbthread.h (struct thread_info): Add btrace field.
3807 * server.c: Include btrace-common.h.
3808 (handle_btrace_general_set): New function.
3809 (handle_btrace_enable): New function.
3810 (handle_btrace_disable): New function.
3811 (handle_general_set): Call handle_btrace_general_set.
3812 (handle_qxfer_btrace): New function.
3813 (struct qxfer qxfer_packets[]): Add btrace entry.
3814 * inferiors.c (remove_thread): Disable btrace.
3815 * linux-low: Include linux-btrace.h.
3816 (linux_low_enable_btrace): New function.
3817 (linux_low_read_btrace): New function.
3818 (linux_target_ops): Add btrace ops.
3819 * configure.srv (i[34567]86-*-linux*): Add linux-btrace.o.
3820 Add srv_linux_btrace=yes.
3821 (x86_64-*-linux*): Add linux-btrace.o.
3822 Add srv_linux_btrace=yes.
3823 * configure.ac: Define HAVE_LINUX_BTRACE.
3824 * config.in: Regenerated.
3825 * configure: Regenerated.
3826
5cc22e4c
MM
38272013-03-11 Markus Metzger <markus.t.metzger@intel.com>
3828
3829 * server.c (handle_qxfer): Preserve error message if -3 is
3830 returned.
3831 (qxfer): Document the -3 return value.
3832
7c97f91e
MM
38332013-03-11 Markus Metzger <markus.t.metzger@intel.com>
3834
3835 * Makefile.in (SFILES): Add $(srcdir)/common/linux-btrace.c.
3836 (linux_btrace_h): New variable.
3837 (linux-btrace.o): New rule.
3838
be9a119c 38392013-03-08 Stan Shebs <stan@codesourcery.com>
f6f899bf
HAQ
3840 Hafiz Abid Qadeer <abidh@codesourcery.com>
3841
3842 * tracepoint.c (trace_buffer_size): New global.
3843 (DEFAULT_TRACE_BUFFER_SIZE): New define.
3844 (init_trace_buffer): Change to one-argument function. Allocate
3845 trace buffer memory.
3846 (handle_tracepoint_general_set): Call cmd_bigqtbuffer_size to
3847 handle QTBuffer:size packet.
3848 (cmd_bigqtbuffer_size): New function.
3849 (initialize_tracepoint): Call init_trace_buffer with
3850 DEFAULT_TRACE_BUFFER_SIZE.
3851 * server.c (handle_query): Add QTBuffer:size in the
3852 supported packets.
3853
e64f7499
YQ
38542013-03-07 Yao Qi <yao@codesourcery.com>
3855
3856 * tracepoint.c (cur_action, cur_step_action): Make them unsigned.
3857 (cmd_qtfp): Initialize cur_action and cur_step_action 0 instead
3858 of -1.
3859 (cmd_qtsp): Adjust condition. Do post increment.
3860 Set cur_action and cur_step_action back to 0.
3861
f0ae6fc3
PA
38622013-03-07 Jeremy Bennett <jeremy.bennett@embecosm.com>
3863
3864 PR server/15236
3865 * linux-low.c (linux_write_memory): Return early success if LEN is
3866 zero.
3867
b5b0b0af
CV
38682013-03-05 Corinna Vinschen <vinschen@redhat.de>
3869
334ad4a8 3870 * configure.srv: Add x86_64-*-cygwin* as target.
b5b0b0af 3871
589bc927
TT
38722013-02-28 Tom Tromey <tromey@redhat.com>
3873
3874 * configure.ac: Invoke AC_SYS_LARGEFILE.
3875 * configure, config.in: Rebuild.
3876
dfe07582
CV
38772013-02-28 Corinna Vinschen <vinschen@redhat.com>
3878
3879 * win32-low.c: Throughout, fix format strings and casts of
3880 printf-like functions to avoid type related warnings on all
3881 platforms.
3882 (get_child_debug_event): Print dwDebugEventCode as hex since
3883 that's how it's usually documented.
3884
736cd585
YQ
38852013-02-28 Yao Qi <yao@codesourcery.com>
3886
3887 * tracepoint.c (cmd_qtbuffer): Call phex_nz instead of
3888 pulongest.
3889
e1f58301
JW
38902013-02-27 Jiong Wang <jiwang@tilera.com>
3891
3892 * Makefile.in (clean): Remove reg-tilegx.c, reg-tilegx32.c.
3893 (reg-tilegx32.c): New rule.
3894 * configure.srv (tilegx-*-linux*): Add reg-tilegx32.o to srv_regobj.
3895 * linux-tile-low.c (tile_arch_setup): New function. Invoke
3896 different register info initializer according to elf class.
3897 (init_registers_tilgx32): New function. The tilegx32 register info
3898 initializer.
3899 (tile_fill_gregset): Use "uint_reg_t" to represent register size.
3900 (tile_store_gregset): Likewise.
3901
d171ca78
YQ
39022013-02-27 Yao Qi <yao@codesourcery.com>
3903
3904 * server.c (process_point_options): Print debug message when
3905 debug_threads is true.
3906
282bbdf3
YQ
39072013-02-26 Yao Qi <yao@codesourcery.com>
3908
3909 * tracepoint.c (cmd_qtbuffer): Don't set '\0' in OWN_BUF.
3910
aca22551
PA
39112013-02-19 Pedro Alves <palves@redhat.com>
3912 Kai Tietz <ktietz@redhat.com>
3913
3914 PR gdb/15161
3915
3916 * server.c (handle_query) <CRC check>: Use unpack_varlen_hex
3917 instead of strtoul to extract address from packet.
3918 (process_serial_event) <'z'>: Likewise.
3919
4f3cee1c
YQ
39202013-02-18 Yao Qi <yao@codesourcery.com>
3921
3922 * linux-bfin-low.c (the_low_target): Use NULL instead of 0.
3923
8e1d55a3
PA
39242013-02-14 Pedro Alves <palves@redhat.com>
3925
3926 Plug memory leak.
3927
3928 * tracepoint.c (cmd_qtnotes): Free TRACING_USER_NAME,
3929 TRACING_NOTES and TRACING_STOP_NOTE before clobbering.
3930
458820da
PA
39312013-02-14 Pedro Alves <palves@redhat.com>
3932
3933 * tracepoint.c (cmd_qtdpsrc): Use savestring.
3934
baea0dae
PA
39352013-02-14 Pedro Alves <palves@redhat.com>
3936
3937 * tracepoint.c (save_string): Delete.
3938 (add_tracepoint_action): Use savestring instead of save_string.
3939
0b1afbb3
PA
39402013-02-12 Pedro Alves <palves@redhat.com>
3941
3942 * linux-xtensa-low.c: Ditto.
3943 * xtensa-xtregs.c: Ditto.
3944
8a4ac37e
PA
39452013-02-12 Sanimir Agovic <sanimir.agovic@intel.com>
3946
3947 * thread-db.c (thread_db_get_tls_address): NULL pointer check
3948 thread_db.
3949
148de6bb
MS
39502013-02-07 Marcus Shawcroft <marcus.shawcroft@arm.com>
3951
3952 * linux-aarch64-low.c (aarch64_arch_setup): Clamp
3953 aarch64_num_wp_regs and aarch64_num_bp_regs to
3954 AARCH64_HWP_MAX_NUM and AARCH64_HBP_MAX_NUM respectively.
3955
55fac6e0
MS
39562013-02-07 Marcus Shawcroft <marcus.shawcroft@arm.com>
3957
3958 * linux-aarch64-low.c (ps_get_thread_area): Replace
3959 PTRACE_GET_THREAD_AREA with PTRACE_GETREGSET.
3960
176eb98c
MS
39612013-02-04 Jim MacArthur <jim.macarthur@arm.com>
3962 Marcus Shawcroft <marcus.shawcroft@arm.com>
3963 Nigel Stephens <nigel.stephens@arm.com>
3964 Yufeng Zhang <yufeng.zhang@arm.com>
3965
3966 * Makefile.in (clean): Remove aarch64.c and aarch64-without-fpu.c.
3967 (aarch64.c, aarch64-without-fpu.c): New targets.
3968 * configure.srv (aarch64*-*-linux*): New.
3969 * linux-aarch64-low.c: New file.
3970
56f7af9c
MS
39712013-02-04 Marcus Shawcroft <marcus.shawcroft@arm.com>
3972
43aaf8b6 3973 * linux-low.c (handle_extended_wait, linux_create_inferior)
56f7af9c
MS
3974 (linux_attach_lwp_1, linux_kill_one_lwp, linux_attach_one_lwp)
3975 (dequeue_one_deferred_signal, linux_resume_one_thread)
3976 (fetch_register, linux_write_memory, linux_enable_event_reporting)
3977 (linux_tracefork_grandchild, linux_test_for_tracefork)
3978 (linux_read_offsets, linux_xfer_siginfo, linux_xfer_siginfo): Add
3979 PTRACE_ARG3_TYPE and PTRACE_ARG4_TYPE cast to ptrace arguments
3980 where the argument is 0.
3981
60f662b0
YQ
39822013-01-25 Yao Qi <yao@codesourcery.com>
3983
3984 * event-loop.c: Include "queue.h".
3985 (gdb_event_p): New typedef.
3986 (struct gdb_event) <next_event>: Remove.
3987 (event_queue): Change to QUEUE(gdb_event_p).
3988 (async_queue_event): Remove.
3989 (gdb_event_xfree): New.
3990 (initialize_event_loop): New.
3991 (process_event): Use API from QUEUE.
3992 (wait_for_event): Likewise.
3993 * server.c (main): Call initialize_event_loop.
3994 * server.h (initialize_event_loop): Declare.
3995
5ae4861a
YQ
39962013-01-18 Yao Qi <yao@codesourcery.com>
3997
3998 * ax.h (struct eval_agent_expr_context): New.
3999 (gdb_eval_agent_expr): Update declaration.
4000 * ax.c (gdb_eval_agent_expr): Remove argument REGCACHE and
4001 TFRAME. Add new argument CTX.
4002 * server.h (struct eval_agent_expr_context): Declare.
4003 (agent_mem_read, agent_tsv_read): Update declaration.
4004 (agent_mem_read_string): Likewise.
4005 * tracepoint.c (eval_tracepoint_agent_expr): Remove.
4006 (add_traceframe_block): Add new argument TPOINT.
4007 Increase TPOINT->traceframe_usage.
4008 (do_action_at_tracepoint): Call gdb_eval_agent_expr instead of
4009 eval_tracepoint_agent_expr.
4010 (condition_true_at_tracepoint): Likewise.
4011 (agent_mem_read): Remove argument TFRAME. Add argument CTX.
4012 (agent_mem_read_string, agent_tsv_read): Likewise.
4013
85e00e85
YQ
40142013-01-16 Yao Qi <yao@codesourcery.com>
4015
4016 * linux-low.c (linux_resume_one_lwp): Don't check
4017 'lwp->bp_reinsert != 0'.
4018
4039cf45
JB
40192013-01-07 Joel Brobecker <brobecker@adacore.com>
4020 Pedro Alves <palves@redhat.com>
4021
4022 * lynx-low.c (ptrace_request_to_str): Define a temporary
4023 macro and use it to simplify this function's implementation.
4024
9044dee2
JB
40252013-01-07 Joel Brobecker <brobecker@adacore.com>
4026
4027 * lynx-low.c (lynx_resume): Call perror_with_name if lynx_ptrace
4028 sets errno.
4029
e6352c8f
JB
40302013-01-07 Joel Brobecker <brobecker@adacore.com>
4031
4032 * configure.srv (i[34567]86-*-lynxos*): Set srv_xmlfiles.
4033
50681a27
JB
40342013-01-07 Joel Brobecker <brobecker@adacore.com>
4035
4036 * configure.srv (powerpc-*-lynxos*): Set srv_xmlfiles.
4037
3f6e77ef
JB
40382013-01-07 Joel Brobecker <brobecker@adacore.com>
4039
4040 * lynx-low.c (lynx_resume): Use the resume_info parameter
4041 to determine the ptid for the lynx_ptrace call, unless
4042 it is equal to minus_one_ptid, in which case we use the
4043 ptid of the current_inferior.
4044 (lynx_wait_1): After having received a thread create/exit
4045 event, resume the inferior's execution using the signaling
4046 thread's ptid, rather than the old ptid.
4047
7fda33ae
JB
40482013-01-07 Joel Brobecker <brobecker@adacore.com>
4049
4050 * lynx-low.c (lynx_resume): Delete variable ret.
4051
b9786c74
JB
40522013-01-01 Joel Brobecker <brobecker@adacore.com>
4053
4054 * gdbreplay.c (gdbreplay_version): Update copyright year.
4055 * server.c (gdbserver_version): Likewise.
4056
8b93d60f
JB
40572012-12-17 Joel Brobecker <brobecker@adacore.com>
4058
4059 * lynx-low.c (lynx_wait_1): Add debug trace before adding
4060 new thread.
4061
037335a7
JB
40622012-12-17 Joel Brobecker <brobecker@adacore.com>
4063
4064 * lynx-low.c (ptrace_request_to_str): Add handling for
4065 PTRACE_GETTRACESIG.
4066
52d4cbd8
JB
40672012-12-17 Joel Brobecker <brobecker@adacore.com>
4068
4069 * lynx-low.c (lynx_attach): Delete variable new_process.
4070
ab8f6ca9
JB
40712012-12-17 Joel Brobecker <brobecker@adacore.com>
4072
4073 * lynx-low.c (lynx_create_inferior): Delete variable
4074 new_process.
4075
78cbc024
JB
40762012-12-17 Joel Brobecker <brobecker@adacore.com>
4077
4078 * lynx-low.c (ptrace_request_to_str): Do not handle
4079 PTRACE_GETTHREADLIST if this macro does not exist.
4080
14a00470
YQ
40812012-12-15 Yao Qi <yao@codesourcery.com>
4082
4083 * Makefile.in (OBS): Add notif.o.
4084 * notif.c, notif.h: New.
4085 * server.c: Include "notif.h".
4086 (struct vstop_notif) <next>: Remove.
4087 <base>: New field.
4088 (queue_stop_reply): Update.
4089 (push_event, send_next_stop_reply): Remove.
4090 (discard_queued_stop_replies): Update.
4091 (notif_stop): New variable.
4092 (handle_v_stopped): Remove.
4093 (handle_v_requests): Don't call handle_v_stopped. Call
4094 handle_ack_notif instead.
4095 (queue_stop_reply_callback): Call notif_event_enque instead
4096 of queue_stop_reply.
4097 (handle_status): Don't call send_next_stop_reply, call
4098 notif_write_event instead.
4099 (kill_inferior_callback): Likewise.
4100 (detach_or_kill_inferior_callback): Likewise.
4101 (main): Call initialize_notif.
4102 (process_serial_event): Call QUEUE_is_empty.
4103 (handle_target_event): Call notif_push instead of push event.
4104 * server.h (push_event): Remove declaration.
4105
61c125b9
TT
41062012-12-10 Tom Tromey <tromey@redhat.com>
4107
4108 * Makefile.in (DEPMODE, DEPDIR, depcomp, COMPILE.pre)
4109 (COMPILE.post, COMPILE, POSTCOMPILE, IPAGENT_COMPILE): New
4110 macros.
4111 (.c.o): Rewrite.
4112 (ax-ipa.o, tracepoint-ipa.o, utils-ipa.o, format-ipa.o)
4113 (common-utils-ipa.o, remote-utils-ipa.o, regcache-ipa.o)
4114 (i386-linux-ipa.o, linux-i386-ipa.o, linux-amd64-ipa.o)
4115 (amd64-linux-ipa.o, ax.o): Rewrite.
4116 (event-loop.o, hostio.o, hostio-errno.o, inferiors.o, mem-break.o)
4117 (proc-service.o, regcache.o, remote-utils.o, server.o, target.o)
4118 (thread-db.o, tracepoint.o, utils.o, gdbreplay.o, dll.o): Remove.
4119 (signals.o, linux-procfs.o, linux-ptrace.o, common-utils.o, vec.o)
4120 (gdb_vecs.o, xml-utils.o, linux-osdata.o, ptid.o, buffer.o)
4121 (format.o, agent.o, vasprintf.o, vsnprintf.o): Rewrite.
4122 (i386-low.o, i387-fp.o, linux-low.o, linux-arm-low.o)
4123 (linux-bfin-low.o, linux-cris-low.o, linux-crisv32-low.o)
4124 (linux-ia64-low.o, linux-m32r-low.o, linux-mips-low.o)
4125 (linux-ppc-low.o, linux-s390-low.o, linux-sh-low.o)
4126 (linux-tic6x-low.o, linux-x86-low.o, linux-xtensa-low.o)
4127 (linux-tile-low.o, lynx-low.o, lynx-ppc-low.o, nto-low.o)
4128 (nto-x86-low.o, linux-low.o, win32-low.o, win32-arm-low.o)
4129 (win32-i386-low.o, spu-low.o, reg-arm.o, arm-with-iwmmxt.o)
4130 (arm-with-vfpv2.o, arm-with-vfpv3.o, arm-with-neon.o, reg-bfin.o)
4131 (reg-cris.o, reg-crisv32.o, i386.o, i386-linux.o, i386-avx.o)
4132 (i386-avx-linux.o, i386-mmx.o, i386-mmx-linux.o, reg-ia64.o)
4133 (reg-m32r.o, reg-m68k.o, reg-cf.o, mips-linux.o, mips-dsp-linux.o)
4134 (mips64-linux.o, mips64-dsp-linux.o, powerpc-32.o, powerpc-32l.o)
4135 (powerpc-altivec32l.o, powerpc-cell32l.o, powerpc-vsx32l.o)
4136 (powerpc-isa205-32l.o, powerpc-isa205-altivec32l.o)
4137 (powerpc-isa205-vsx32l.o, powerpc-e500l.o, powerpc-64l.o)
4138 (powerpc-altivec64l.o, powerpc-cell64l.o, powerpc-vsx64l.o)
4139 (powerpc-isa205-64l.o, powerpc-isa205-altivec64l.o)
4140 (powerpc-isa205-vsx64l.o, s390-linux32.o, s390-linux32v1.o)
4141 (s390-linux32v2.o, s390-linux64.o, s390-linux64v1.o)
4142 (s390-linux64v2.o, s390x-linux64.o, s390x-linux64v1.o)
4143 (s390x-linux64v2.o, tic6x-c64xp-linux.o, tic6x-c64x-linux.o)
4144 (tic6x-c62x-linux.o, reg-sh.o, reg-sparc64.o, reg-spu.o, amd64.o)
4145 (amd64-linux.o, amd64-avx.o, amd64-avx-linux.o, x32.o)
4146 (x32-linux.o, x32-avx.o, x32-avx-linux.o, reg-xtensa.o)
4147 (reg-tilegx.o): Remove.
4148 (all_object_files): New macro.
4149 Include .deps files.
4150 * aclocal.m4, configure: Rebuild.
4151 * acinclude.m4: Include depstand.m4, lead-dot.m4.
4152 * configure.ac: Invoke ZW_CREATE_DEPDIR,
4153 ZW_PROG_COMPILER_DEPENDENCIES. Compute GMAKE condition.
4154
e90e9ad9
TT
41552012-12-05 Tom Tromey <tromey@redhat.com>
4156
4157 PR gdb/14917:
4158 * server.h (current_insn_ptr, emit_error): Declare 'extern'.
4159
02d403bf 41602012-11-28 Markus Metzger <markus.t.metzger@intel.com>
945bf713
MM
4161
4162 * configure.ac: Check for linux/perf_event.h.
4163 * config.in: Regenerated.
4164 * configure: Regenerated.
4165
0270a750
PA
41662012-11-26 Maxime Villard <rustyBSD@gmx.fr>
4167
4168 * hostio.c (handle_readlink): Decrease buffer size
4169 parameter passed to readlink by one byte.
4170
8c29b58e
YQ
41712012-11-26 Yao Qi <yao@codesourcery.com>
4172
4173 * configure.ac (build_warnings): Append '-Wempty-body'.
4174 * configure: Regenerated.
4175 * linux-low.c (linux_create_inferior): Use braces for empty 'if'
4176 body.
4177
8bdce1ff
PM
41782012-11-15 Pierre Muller <muller@sourceware.org>
4179
4180 * configure.ac (AC_CHECK_HEADERS): Add wait.h header.
4181 * config.in: Regenerate.
4182 * configure: Regenerate.
4183 * linux-low.c: Use "gdb_stat.h" header instead of <sys/stat.h> header.
4184 Use "gdb_wait.h" header instead of <sys/wait.h> header.
4185 * lynx-low.c: Use "gdb_wait.h" header instead of <sys/wait.h> header.
4186 * remote-utils.c: Use "gdb_stat.h" header instead of <sys/stat.h>
4187 header.
4188 * server.c: Remove HAVE_WAIT_H conditional. Use "gdb_wait.h" header
4189 instead of <sys/wait.h> header.
4190 * spu-low.c: Use "gdb_wait.h" header instead of <sys/wait.h> header.
4191
02d403bf 41922012-11-13 Markus Metzger <markus.t.metzger@intel.com>
3ba6ad0f
MM
4193
4194 * Makefile.in: (INTERNAL_CFLAGS): Add -DGDBSERVER
4195 (various make rules): Remove -DGDBSERVER
4196
fbd5db48
YQ
41972012-11-09 Yao Qi <yao@codesourcery.com>
4198
4199 * spu-low.c (current_ptid): Move it to ..
4200 * gdbthread.h: ... here. New.
4201 * remote-utils.c (read_ptid): Use macro 'current_ptid'.
4202 * server.c (myresume, process_serial_event): Likewise.
4203 * thread-db.c (thread_db_find_new_threads): Likewise.
4204 * tracepoint.c (run_inferior_command): Likewise.
4205
b3dc46ff
AB
42062012-10-01 Andrew Burgess <aburgess@broadcom.com>
4207
4208 * server.c (handle_search_memory_1): Include access length in
4209 warning message.
4210
07c04788
HPN
42112012-09-05 Michael Brandt <michael.brandt@axis.com>
4212
4213 * linux-crisv32-low.c: Fix compile errors.
4214
918d227b
YQ
42152012-09-04 Yao Qi <yao@codesourcery.com>
4216
4217 * tracepoint.c (cmd_qtsv): Adjust debug message.
4218 Don't check CUR_TPOINT.
4219
18c1b81a
YQ
42202012-08-28 Yao Qi <yao@codesourcery.com>
4221
4222 * ax.c, tracepoint.c: Replace ATTR_FORMAT with ATTRIBUTE_PRINTF.
4223 * server.h: Include 'libiberty.h' and 'ansidecl.h'.
4224 (ATTR_NORETURN, ATTR_FORMAT, ATTR_MALLOC): Remove.
4225 Remove declarations of xmalloc, xreallloc, xstrdup and
4226 freeargv.
4227 * Makefile.in (libiberty_h): New.
4228 (server_h): Append dependencies 'libiberty.h' and 'ansidecl.h'.
4229 (linux-bfin-low.o): Append dependency 'libiberty.h'.
4230
dc82f37b
YQ
42312012-08-23 Yao Qi <yao@codesourcery.com>
4232
4233 * server.h: Remove declaration of 'xsnprintf'.
4234
406b1477
KS
42352012-08-22 Keith Seitz <keiths@redhat.com>
4236
4237 * server.h: Include build-gnulib-gbserver/config.h.
4238 * gdbreplay.c: Likewise.
4239
e6712ff1
DE
42402012-08-08 Doug Evans <dje@google.com>
4241
4242 * Makefile.in (SFILES): Add gdb_vecs.c.
4243 (OBS): Add gdb_vecs.o.
4244 (gdb_vecs_h, host_defs_h): New variables.
4245 (thread-db.o): Add $(gdb_vecs_h) dependency.
4246 (gdb_vecs.o): New rule.
4247 * thread-db.c: #include "gdb_vecs.h".
4248 (thread_db_load_search): Use a vector to iterate over path elements.
4249 Handle text appearing after "$pdir".
4250
4251 * configure.ac: Add check for strstr.
4252 * config.in: Regenerate.
4253 * configure: Regenerate.
4254
7c3270ae
UW
42552012-08-02 Ulrich Weigand <ulrich.weigand@linaro.org>
4256
4257 * hostio.c (handle_pread): If pread fails, fall back to attempting
4258 lseek/read.
4259 (handle_pwrite): Likewise for pwrite.
4260
b62e2b27
UW
42612012-08-01 Ulrich Weigand <ulrich.weigand@linaro.org>
4262
4263 * linux-arm-low.c (arm_linux_hw_point_initialize): Distinguish
4264 between unsupported TYPE and unimplementable ADDR/LEN combination.
4265 (arm_insert_point): Act on new return value.
4266
78a99e91
PA
42672012-07-31 Pedro Alves <palves@redhat.com>
4268
4269 * server.c (process_point_options): Only skip tokens if we find
4270 one that is unrecognized. Don't treat 'X' specially while
4271 skipping unrecognized tokens.
4272
fcf303ab
UW
42732012-07-30 Ulrich Weigand <ulrich.weigand@linaro.org>
4274
4275 * linux-arm-low.c (arm_linux_hw_point_initialize): Do not attempt
4276 to 4-byte-align HW breakpoint addresses for Thumb.
4277
7255706c
YQ
42782012-07-27 Yao Qi <yao@codesourcery.com>
4279
4280 PR remote/14161.
4281
4282 * server.h: Declare gdb_agent_about_to_close.
4283 * target.c (kill_inferior): Include "agent.h".
4284 New. Send command 'kill'.
4285 * target.h (kill_inferior): Removed macro.
4286 * tracepoint.c (gdb_agent_about_to_close): New.
4287 (gdb_agent_helper_thread): Handle command 'close'.
4288 Wait endlessly until the inferior stops.
4289 Install gdb_agent_remove_socket to atexit hook.
4290 (agent_socket_name): New static variable.
4291 (gdb_agent_socket_init): Replace local variable 'name' with
4292 'agent_socket_name'.
4293 (gdb_agent_remove_socket): New.
4294
5a3f286f
YQ
42952012-07-27 Yao Qi <yao@codesourcery.com>
4296
4297 * server.c (process_point_options): Stop at 'X' when parsing.
4298
961bd387
ME
42992012-07-19 Michael Eager <eager@eagercon.com>
4300
a261b8f5 4301 * i386-low.c (Z_packet_to_hw_type): Add Z_PACKET_HW_BP, translate
961bd387
ME
4302 to hw_execute.
4303 * linux-x86-low.c (x86_insert_point, x86_remove_point):
4304 Call i386_low_insert_watchpoint, i386_low_remove_watchpoint to add/del
4305 hardware breakpoint.
4306
aa7c7447
JK
43072012-07-07 Jan Kratochvil <jan.kratochvil@redhat.com>
4308
4309 * gdbserver/linux-low.c (initialize_low): Call
4310 linux_ptrace_init_warnings.
4311
7f216e7c
DE
43122012-07-02 Doug Evans <dje@google.com>
4313
4314 * mem-break.c (gdb_no_commands_at_breakpoint): Fix cast from
4315 pointer to int.
4316
d3ce09f5
SS
43172012-07-02 Stan Shebs <stan@codesourcery.com>
4318
4319 * Makefile.in (WARN_CFLAGS_NO_FORMAT): Define.
4320 (ax.o): Add it to build rule.
4321 (ax-ipa.o): Ditto.
4322 (OBS): Add format.o.
4323 (IPA_OBS): Add format.o.
4324 * server.c (handle_query): Claim support for breakpoint commands.
4325 (process_point_options): Add command case.
4326 (process_serial_event): Leave running if there are printfs in
4327 effect.
4328 * mem-break.h (any_persistent_commands): Declare.
4329 (add_breakpoint_commands): Declare.
4330 (gdb_no_commands_at_breakpoint): Declare.
4331 (run_breakpoint_commands): Declare.
4332 * mem-break.c (struct point_command_list): New struct.
4333 (struct breakpoint): New field command_list.
4334 (any_persistent_commands): New function.
4335 (add_commands_to_breakpoint): New function.
4336 (add_breakpoint_commands): New function.
4337 (gdb_no_commands_at_breakpoint): New function.
4338 (run_breakpoint_commands): New function.
4339 * linux-low.c (linux_wait_1): Test for and run breakpoint commands
4340 locally.
4341 * ax.c: Include format.h.
4342 (ax_printf): New function.
4343 (gdb_eval_agent_expr): Add printf opcode.
4344
2f8f6aed
YQ
43452012-06-13 Yao Qi <yao@codesourcery.com>
4346
4347 * server.c (start_inferior): Remove duplicated writes to fields
4348 'last_resume_kind' and 'last_status' of 'current_inferior'.
4349
0c9070b3
YQ
43502012-06-12 Yao Qi <yao@codesourcery.com>
4351 Pedro Alves <palves@redhat.com>
4352
4353 * linux-low.c (linux_set_resume_request): Simplify predicate. Add
4354 comment.
4355 * server.c (handle_v_cont): Extend comment.
4356
c52daf70
YQ
43572012-06-11 Yao Qi <yao@codesourcery.com>
4358
4359 * linux-low.c (linux_attach): Add 'static'.
4360
d38bbb0a
YQ
43612012-06-06 Yao Qi <yao@codesourcery.com>
4362
4363 * ax.c (gdb_eval_agent_expr): Print `top' in hex.
4364
89dc0afd
JK
43652012-06-01 Jan Kratochvil <jan.kratochvil@redhat.com>
4366
4367 Fix gcc -flto compilation warning.
4368 * server.c (main): Make variable multi_mode and attach volatile.
4369
75f62ce7
TJB
43702012-05-30 Thiago Jung Bauermann <thiago.bauermann@linaro.org>
4371
4372 * linux-low.c (get_r_debug): Disable code using DT_MIPS_RLD_MAP
4373 if the platform doesn't know about it.
4374
65f479b6
PA
43752012-05-30 Jeff Kenton <jkenton@tilera.com>
4376
4377 * Makefile.in (SFILES): Add linux-tile-low.c.
4378 (linux-tile-low.o, reg-tilegx.o, reg-tilegx.c): New rules.
4379 * configure.srv: Handle tilegx-*-linux*.
4380 * linux-tile-low.c: New file.
4381
0c5bf5a9
JK
43822012-05-28 Jan Kratochvil <jan.kratochvil@redhat.com>
4383
4384 * linux-low.c (linux_qxfer_libraries_svr4): Return -1 if R_DEBUG is -1.
4385
a493e3e2
PA
43862012-05-24 Pedro Alves <palves@redhat.com>
4387
4388 PR gdb/7205
4389
43aaf8b6 4390 Replace TARGET_SIGNAL_ with GDB_SIGNAL_ throughout.
a493e3e2 4391
2ea28649
PA
43922012-05-24 Pedro Alves <palves@redhat.com>
4393
4394 PR gdb/7205
4395
4396 Replace target_signal with gdb_signal throughout.
4397
8d409d16
MR
43982012-05-22 Maciej W. Rozycki <macro@codesourcery.com>
4399
4400 * linux-low.c (linux_store_registers): Avoid the copying sequence
4401 when no data has been retrieved by ptrace.
4402
23512c01
MGD
44032012-05-22 Will Deacon <will.deacon@arm.com>
4404
4405 * linux-low (__UCLIBC__ && !(__UCLIBC_HAS_MMU__ || __ARCH_HAS_MMU__)):
4406 Include asm/ptrace.h.
4407 (PT_TEXT_ADDR, PT_DATA_ADDR, PT_TEXT_END_ADDR): Define only if not
4408 already defined.
4409
4934b29e
MR
44102012-05-21 Maciej W. Rozycki <macro@codesourcery.com>
4411
4412 * linux-low.c (linux_store_registers): Don't re-retrieve data
4413 with ptrace that has already been obtained from /proc. Always
4414 copy any data retrieved with ptrace to the buffer supplied.
4415
bde24c0a
PA
44162012-05-11 Yao Qi <yao@codesourcery.com>
4417 Pedro Alves <palves@redhat.com>
4418
4419 * linux-low.c (enum stopping_threads_kind): New.
4420 (stopping_threads): Change type to `enum stopping_threads_kind'.
4421 (handle_extended_wait): If stopping and suspending threads, leave
4422 the new_lwp suspended too.
4423 (linux_wait_for_event): Adjust.
4424 (stop_all_lwps): Set `stopping_threads' to
4425 STOPPING_AND_SUSPENDING_THREADS or STOPPING_THREADS depending on
4426 whether we're suspending threads or just stopping them. Assert no
4427 recursion happens.
4428
623b6bdf
YQ
44292012-04-29 Yao Qi <yao@codesourcery.com>
4430
4431 * server.h: Move some code to ...
4432 * gdbthread.h: ... here. New.
4433 * Makefile.in (inferiors.o, regcache.o): Depends on gdbthread.h
4434 (remote-utils.o, server.o, target.o tracepoint.o): Likewise.
4435 (nto-low.o, win32-low.o): Likewise.
4436 * inferiors.c, linux-low.h, nto-low.c: Include gdbthread.h.
4437 * regcache.c, remote-utils.c, server.c: Likewise.
4438 * target.c, tracepoint.c, win32-low.c: Likewise.
4439
f15f9948
TJB
44402012-04-24 Thiago Jung Bauermann <thiago.bauermann@linaro.org>
4441
4442 * linux-low.h (PTRACE_ARG3_TYPE): Move macro from linux-low.c.
4443 (PTRACE_ARG4_TYPE): Likewise.
4444 (PTRACE_XFER_TYPE): Likewise.
4445 * linux-arm-low.c (arm_prepare_to_resume): Cast third argument of
4446 ptrace to PTRACE_ARG3_TYPE.
4447 * linux-low.c (PTRACE_ARG3_TYPE): Move macro to linux-low.h.
4448 (PTRACE_ARG4_TYPE): Likewise.
4449 (PTRACE_XFER_TYPE): Likewise.
4450 (linux_detach_one_lwp): Cast fourth argument of
4451 ptrace to long then PTRACE_ARG4_TYPE.
4452 (regsets_fetch_inferior_registers): Cast third argument of
4453 ptrace to long then PTRACE_ARG3_TYPE.
4454 (regsets_store_inferior_registers): Likewise.
4455
38ea300a
PA
44562012-04-20 Pedro Alves <palves@redhat.com>
4457
4458 * configure: Regenerate.
4459
c971b7fa
PA
44602012-04-19 Pedro Alves <palves@redhat.com>
4461
43aaf8b6 4462 * Makefile.in (GNULIB_BUILDDIR): New.
c971b7fa 4463 (LIBGNU, INCGNU, GNULIB_H): Adjust.
43aaf8b6
PA
4464 (SUBDIRS, CLEANDIRS, REQUIRED_SUBDIRS): New.
4465 (all, install-only, uninstall, clean-info, all-lib, clean): No
4466 longer pass GNULIB_FLAGS_TO_PASS. Use subdir_do.
4467 (maintainer-clean realclean distclean): Use subdir_do.
4468 (subdir_do): New.
4469 (gnulib/import/Makefile): Adjust. Replace gnulib/import with
c971b7fa 4470 $(GNULIB_BUILDDIR). Don't pass argument to config.status.
43aaf8b6
PA
4471 * acinclude.m4: Include acx_configure_dir.m4.
4472 * configure.ac: Remove gl_EARLY, gl_INIT, and AM_INIT_AUTOMAKE
4473 calls. Call AC_PROG_RANLIB. Configure gnulib using
4474 ACX_CONFIGURE_DIR.
4475 (GNULIB): New.
4476 (GNULIB_STDINT_H): Adjust.
4477 (AC_OUTPUT): Don't output gnulib/Makefile anymore.
4478 * gdbreplay.c: Include build-gnulib/config.h.
4479 * server.h: Likewise.
4480 * aclocal.m4: Regenerate.
4481 * config.in: Regenerate.
4482 * configure: Regenerate.
c971b7fa 4483
809277f8
PA
44842012-04-19 Pedro Alves <palves@redhat.com>
4485
4486 * Makefile.in (LIBGNU, INCGNU): Adjust.
4487 (GNULIB_FLAGS_TO_PASS, GNULIB_H): Adjust.
4488 (all, install-only, uninstall, clean-info, all-lib, clean)
4489 (maintainer-clean, Makefile, gnulib/Makefile): Adjust.
4490 * configure.ac: Adjust AC_OUTPUT output.
4491 * aclocal.m4: Regenerate.
4492 * configure: Regenerate.
4493
fd9bb8b8
PA
44942012-04-19 Pedro Alves <palves@redhat.com>
4495
4496 * Makefile.in (generated_files): New.
4497 (server_h): Remove the explicit dependency on config.h, and depend
4498 on $generated_files.
4499
1c298c66
PA
45002012-04-19 Pedro Alves <palves@redhat.com>
4501
4502 * Makefile.in (INCGNU): Add -Ignulib.
4503
57c4b50b
PA
45042012-04-19 Pedro Alves <palves@redhat.com>
4505
4506 * Makefile.in (GNULIB_INCLUDE_DIR): Rename to ...
4507 (INCGNU): ... this, and spell out -I here.
4508 (GNULIB_LIB): Rename to ...
4509 (LIBGNU): ... this.
4510 (INCLUDE_CFLAGS, gdbserver$(EXEEXT), $(GNULIB_LIB) rule): Adjust.
4511
1030e047
PA
45122012-04-19 Pedro Alves <palves@redhat.com>
4513
4514 * config.in: Regenerate.
4515
447d4319
PA
45162012-04-19 Pedro Alves <palves@redhat.com>
4517
4518 * configure.ac: Remove AC_CHECK_DECLS check for memmem.
4519 * server.h (memmem): Remove declaration.
4520 * config.in: Regenerate.
4521 * configure: Regenerate.
4522
aad9eab9
YQ
45232012-04-19 Yao Qi <yao@codesourcery.com>
4524
4525 * Makefile.in (SFILES): Add common/vec.c.
4526 (OBS): Add vec.o.
4527 (vec.o): New rule.
4528
3e10640f
YQ
45292012-04-19 Yao Qi <yao@codesourcery.com>
4530
4531 * remote-utils.c (prepare_resume_reply): Replace with macro
4532 target_core_of_thread.
4533 * server.c (handle_qxfer_threads_proper): Likewise.
4534 * target.h (traget_core_of_thread): New macro.
4535
71622373
PA
45362012-04-18 Pedro Alves <palves@redhat.com>
4537
4538 * aclocal.m4: Regenerate.
4539 * configure: Regenerate.
4540
80d26939
YQ
45412012-04-16 Yao Qi <yao@codesourcery.com>
4542
4543 * tracepoint.c (cmd_qtstart): Download tracepoints even when they are
4544 duplicated on address.
4545
42476b70
YQ
45462012-04-16 Yao Qi <yao@codesourcery.com>
4547
4548 * tracepoint.c (COPY_FIELD_TO_BUF): New macro.
4549 (struct tracepoint_action_ops) <send>: New field.
4550 (m_tracepoint_action_send, r_tracepoint_action_send): New.
4551 (agent_expr_send, x_tracepoint_action_send): New.
4552 (l_tracepoint_action_send): New.
4553 (cmd_qtdp): Download and install tracepoint
4554 according to `use_agent'.
4555 (run_inferior_command): Add one more parameter `len'.
4556 Update callers.
4557 (tracepoint_send_agent): New.
4558 (cmd_qtdp, cmd_qtstart): Call tracepoint_send_agent.
4559
7bc83639
YQ
45602012-04-16 Yao Qi <yao@codesourcery.com>
4561
4562 * tracepoint.c (download_tracepoints): Moved to ...
4563 (cmd_qtstart): ... here.
4564
5f18041e
YQ
45652012-04-14 Yao Qi <yao@codesourcery.com>
4566
4567 * tracepoint.c: Include inttypes.h.
4568 (struct collect_memory_action): Use sized types.
4569 (struct tracepoint): Likewise.
4570 (cmd_qtdp, stop_tracing): Update print specifiers.
4571 (cmd_qtp, response_tracepoint): Likewise.
4572 (collect_data_at_tracepoint): Likewise.
4573 (collect_data_at_step): Likewise.
4574
55a8c076
YQ
45752012-04-14 Yao Qi <yao@codesourcery.com>
4576
4577 Import gnulib module inttypes.
4578 * aclocal.m4, config.in, configure: Regenerated.
4579
dc750257
YQ
45802012-04-14 Yao Qi <yao@codesourcery.com>
4581
4582 * Makefile.in (maintainer-clean, realclean, distclean): Remove
4583 Makefile and config.status at last.
4584
0ab5faf9
YQ
45852012-04-13 Yao Qi <yao@codesourcery.com>
4586
4587 * tracepoint.c: Include stdint.h unconditionally.
4588
18f5fd81
TJB
45892012-04-13 Thiago Jung Bauermann <thiago.bauermann@linaro.org>
4590
4591 * acinclude.m4 (GDBSERVER_HAVE_THREAD_DB_TYPE): New macro based
4592 on BFD_HAVE_SYS_PROCFS_TYPE.
4593 * configure.ac: Look for lwpid_t and psaddr_t in libthread_db.h.
4594 * configure: Regenerate.
4595 * config.in: Likewise.
4596
4d47af5c
L
45972012-04-13 H.J. Lu <hongjiu.lu@intel.com>
4598
4599 * Makefile.in (clean): Also remove x32.c x32-linux.c
4600 x32-avx.c x32-avx-linux.c.
4601 (x32.o): New target.
4602 (x32.c): Likewise.
4603 (x32-linux.o): Likewise.
4604 (x32-linux.c): Likewise.
4605 (x32-avx.o): Likewise.
4606 (x32-avx.c): Likewise.
4607 (x32-avx-linux.o): Likewise.
4608 (x32-avx-linux.c): Likewise.
4609
4610 * configure.srv (srv_amd64_regobj): Add x32.o x32-avx.o.
4611 (srv_amd64_linux_regobj): Add x32-linux.o x32-avx-linux.o.
4612 (srv_i386_64bit_xmlfiles): Add i386/x32-core.xml.
4613 (srv_amd64_xmlfiles): Add i386/x32.xml i386/x32-avx.xml.
4614 (srv_amd64_linux_xmlfiles): Add i386/x32-linux.xml
4615 i386/x32-avx-linux.xml.
4616
4617 * linux-x86-low.c (init_registers_x32_linux): New prototype.
4618 (init_registers_x32_avx_linux): Likwise.
4619 (x86_linux_update_xmltarget): Call init_registers_x32_linux
4620 or init_registers_x32_avx_linux if linux_is_elf64 is false.
4621
ecedbe58
PA
46222012-04-13 Pedro Alves <palves@redhat.com>
4623
4624 * Makefile.in (GNULIB_FLAGS_TO_PASS): New.
4625 (FLAGS_TO_PASS): Don't change or set $top_srcdir, $srcdir and VPATH.
4626 (all, uninstall, clean-info, all-lib, clean, maintainer-clean)
4627 (realclean, distclean): Explicitly pass $GNULIB_FLAGS_TO_PASS to
4628 the sub-make.
4629
c92b5177
L
46302012-04-12 H.J. Lu <hongjiu.lu@intel.com>
4631
4632 * linux-x86-low.c (compat_x32_clock_t): New.
4633 (compat_x32_siginfo_t): Likewise.
4634 (compat_x32_siginfo_from_siginfo): Likewise.
4635 (siginfo_from_compat_x32_siginfo): Likewise.
4636 (linux_is_elf64): Likewise.
4637 (x86_siginfo_fixup): Call compat_x32_siginfo_from_siginfo
4638 and siginfo_from_compat_x32_siginfo for x32.
4639 (x86_arch_setup): Set linux_is_elf64.
4640
214d508e
L
46412012-04-12 H.J. Lu <hongjiu.lu@intel.com>
4642
4643 PR gdb/13969
4644 * linux-low.c (linux_pid_exe_is_elf_64_file): Also return the
4645 e_machine field.
4646 (linux_qxfer_libraries_svr4): Update call to elf_64_file_p.
4647 * linux-low.h (linux_pid_exe_is_elf_64_file): Updated.
4648 * linux-x86-low.c (x86_arch_setup): Check if GDBserver is
4649 compatible with process.
4650
c9a1864a
YQ
46512012-04-12 Yao Qi <yao@codesourcery.com>
4652
4653 * Makefile.in: Define abs_top_srcdir and abs_srcdir.
4654 (INCLUDE_CFLAGS): Append GNULIB_INCLUDE_DIR.
4655 (install-only, install-info, clean): Handle sub dir gnulib.
4656 (all-lib, am--refresh): New targets.
4657 (memmem.o): Remove target.
4658 * configure.ac: Remove AC_CONFIG_LIBOBJ_DIR.
4659 Invoke gl_EARLY. Invoke AC_CHECK_PROGS for make.
4660 (AC_REPLACE_FUNCS): Remove memmem.
4661 Invoke gl_INIT and AM_INIT_AUTOMAKE.
4662 (AC_OUTPUT): Generate Makefile in gnulib/.
4663 * aclocal.m4, config.in, configure: Regenerated.
4664
367ba2c2
MR
46652012-04-10 Maciej W. Rozycki <macro@codesourcery.com>
4666
4667 * linux-low.c (get_r_debug): Handle DT_MIPS_RLD_MAP.
4668
9d236627
PA
46692012-04-05 Pedro Alves <palves@redhat.com>
4670
4671 -Werror=strict-aliasing
4672
4673 * spu-low.c (parse_spufs_run): Avoid dereferencing type-punned
4674 pointer.
4675
111217b3
PA
46762012-04-04 Pedro Alves <palves@redhat.com>
4677
4678 * linux-sparc-low.c (sparc_fill_gregset_to_stack)
4679 (sparc_store_gregset_from_stack, sparc_store_gregset)
4680 (sparc_breakpoint_at): Fix formatting.
4681
8365dcf5
TJB
46822012-03-30 Thiago Jung Bauermann <thiago.bauermann@linaro.org>
4683
4684 * configure.ac: Check whether Elf32_auxv_t and Elf64_auxv_t
4685 are available.
4686 * linux-low.c [HAVE_ELF32_AUXV_T] (Elf32_auxv_t): Add typedef.
4687 [HAVE_ELF64_AUXV_T] (Elf64_auxv_t): Likewise.
4688 * config.in: Regenerate.
4689 * configure: Likewise.
4690
689cc2ae
PA
46912012-03-29 Pedro Alves <palves@redhat.com>
4692
4693 * linux-low.c (regsets_store_inferior_registers) [__sparc__]:
4694 Correct ptrace arguments.
4695
c14dfd32
PA
46962012-03-28 Pedro Alves <palves@redhat.com>
4697
4698 * linux-ia64-low.c (ia64_regmap): Map IA64_EC_REGNUM to PT_AR_EC.
4699 (IA64_GR0_REGNUM, IA64_FR0_REGNUM)
4700 (IA64_FR1_REGNUM): New defines.
4701 (ia64_fetch_register): New.
4702 (the_low_target): Install it.
4703 * linux-low.h (struct linux_target_ops) <fetch_register>: New
4704 field.
4705 * linux-low.c (linux_fetch_registers): Try the
4706 the_low_target.fetch_register hook first.
4707
4708 * linux-arm-low.c (the_low_target): Adjust.
4709 * linux-bfin-low.c (the_low_target): Adjust.
4710 * linux-cris-low.c (the_low_target): Adjust.
4711 * linux-crisv32-low.c (the_low_target): Adjust.
4712 * linux-m32r-low.c (the_low_target): Adjust.
4713 * linux-m68k-low.c (the_low_target): Adjust.
4714 * linux-mips-low.c (the_low_target): Adjust.
4715 * linux-ppc-low.c (the_low_target): Adjust.
4716 * linux-s390-low.c (the_low_target): Adjust.
4717 * linux-sh-low.c (the_low_target): Adjust.
4718 * linux-sparc-low.c (the_low_target): Adjust.
4719 * linux-tic6x-low.c (the_low_target): Adjust.
4720 * linux-x86-low.c (the_low_target): Adjust.
4721 * linux-xtensa-low.c (the_low_target): Adjust.
4722
63c88e13
PA
47232012-03-26 Pedro Alves <palves@redhat.com>
4724
4725 * server.c (handle_qxfer_libraries): Don't bail early if
4726 the_target->qxfer_libraries_svr4 is not NULL.
4727
fb723180
PA
47282012-03-26 Pedro Alves <palves@redhat.com>
4729
4730 * linux-low.c (linux_qxfer_libraries_svr4): Fix pasto in comment.
4731
0afae3cf
PA
47322012-03-23 Pedro Alves <palves@redhat.com>
4733
4734 * linux-low.c (linux_qxfer_libraries_svr4): Terminate the
4735 "library-list-svr4" element's start tag when the the DSO list is
4736 empty.
4737
485f1ee4
PA
47382012-03-23 Pedro Alves <palves@redhat.com>
4739
4740 * linux-low.c (read_one_ptr): Read the inferior's pointer through
4741 a variable whose type size is the same as the inferior's pointer
4742 size.
4743
a5362b9a
TS
47442012-03-21 Thomas Schwinge <thomas@codesourcery.com>
4745
4746 * linux-arm-low.c (arm_stopped_by_watchpoint): Use siginfo_t instead of
4747 struct siginfo.
4748 * linux-low.c (siginfo_fixup, linux_xfer_siginfo): Likewise.
4749 * linux-x86-low.c (x86_siginfo_fixup): Likewise.
4750 * linux-low.h: Include <signal.h>.
4751 (struct siginfo): Remove forward declaration.
4752 (struct linux_target_ops) <siginfo_fixup>: Use siginfo_t instead of
4753 struct siginfo.
4754
d226c142
MF
47552012-03-21 Mike Frysinger <vapier@gentoo.org>
4756
4757 * .gitignore: Ignore more files.
4758
122f36ef
PA
47592012-03-19 Pedro Alves <palves@redhat.com>
4760 Jan Kratochvil <jan.kratochvil@redhat.com>
4761
4762 * server.c (cont_thread, general_thread): Add describing comments.
4763 (start_inferior): Clear `cont_thread'.
4764 (handle_v_cont): Don't set `cont_thread' if resuming all threads
4765 of a process.
4766
fc3e5175
YQ
47672012-03-15 Yao Qi <yao@codesourcery.com>
4768
4769 * tracepoint.c (install_tracepoint): Move duplicated tracepoint
4770 handling to ...
4771 (cmd_qtdp): ... here.
4772
8d0d92cd
YQ
47732012-03-15 Yao Qi <yao@codesourcery.com>
4774
4775 * tracepoint.c (struct tracepoint_action_ops): New.
4776 (struct tracepoint_action) [!IN_PROCESS_AGENT] <ops>: New field.
4777 (m_tracepoint_action_download): New.
4778 (r_tracepoint_action_download): New.
4779 (x_tracepoint_action_download): New.
4780 (l_tracepoint_action_download): New.
4781 (add_tracepoint_action): Install `action->ops' according type.
4782 (download_tracepoint_1): Move code `download' function pointer
4783 of various tracepoint_action_ops.
4784
87b0bb13
JK
47852012-03-13 Jan Kratochvil <jan.kratochvil@redhat.com>
4786
4787 * linux-low.c (linux_attach_lwp_1): New variable buffer. Call
4788 linux_ptrace_attach_warnings.
4789
5f572dec
JK
47902012-03-13 Jan Kratochvil <jan.kratochvil@redhat.com>
4791
4792 * Makefile.in (linux-ptrace.o): New.
4793 * configure.srv (arm*-*-linux*, bfin-*-*linux*, crisv32-*-linux*)
4794 (cris-*-linux*, i[34567]86-*-linux*, ia64-*-linux*, m32r*-*-linux*)
4795 (m68*-*-linux*, m68*-*-uclinux*, mips*-*-linux*, powerpc*-*-linux*)
4796 (s390*-*-linux*, sh*-*-linux*, sparc*-*-linux*, tic6x-*-uclinux)
4797 (x86_64-*-linux*, xtensa*-*-linux*): Add linux-ptrace.o to SRV_TGTOBJ
4798 of these targets.
4799 * linux-low.c (linux_attach_lwp_1): Remove redundent else clause.
4800
f4647387
YQ
48012012-03-08 Yao Qi <yao@codesourcery.com>
4802 Pedro Alves <palves@redhat.com>
4803
4804 Fix PR server/13392.
4805 * linux-x86-low.c (amd64_install_fast_tracepoint_jump_pad): Check
4806 offset of JMP insn.
4807 * tracepoint.c (remove_tracepoint): New.
4808 (cmd_qtdp): Call remove_tracepoint when failed to install.
4809
9b224c5e
PA
48102012-03-07 Pedro Alves <palves@redhat.com>
4811
4812 * linux-low.c (get_detach_signal): New.
4813 (linux_detach_one_lwp): Get rid of a pending SIGSTOP with SIGCONT.
4814 Pass on pending signals to PTRACE_DETACH. Check the result of the
4815 ptrace call.
4816 * server.c (program_signals, program_signals_p): New.
4817 (handle_general_set): Handle QProgramSignals.
4818 * server.h (program_signals, program_signals_p): Declare.
4819
e237a7e2
JK
48202012-03-05 Pedro Alves <palves@redhat.com>
4821 Jan Kratochvil <jan.kratochvil@redhat.com>
4822
4823 * linux-low.c (get_dynamic): Don't warn when PT_PHDR isn't found.
4824 New comment why.
4825
5808517f
YQ
48262012-03-03 Yao Qi <yao@codesourcery.com>
4827
4828 * tracepoint.c (tracepoint_look_up_symbols): Update call to
4829 agent_look_up_symbols.
4830
58b4daa5
YQ
48312012-03-03 Yao Qi <yao@codesourcery.com>
4832
4833 * Makefile.in (linux-low.o): Keep dependence on agent.h.
4834 (linux-x86-low.o): Likewise.
4835 * server.h: Remove in_process_agent_loaded.
4836 * tracepoint.c (in_process_agent_loaded): Removed. Moved it
4837 common/agent.c.
4838 Update callers.
4839
8ffcbaaf
YQ
48402012-03-03 Yao Qi <yao@codesourcery.com>
4841
4842 * tracepoint.c (gdb_agent_capability): New global.
4843 (in_process_agent_loaded_ust): Renamed to
4844 `in_process_agent_supports_ust'.
4845 Update callers.
4846 (in_process_agent_supports_ust): Call agent_capability_check.
4847 (clear_installed_tracepoints): Assert that agent supports
4848 agent.
4849
d1feda86
YQ
48502012-03-03 Yao Qi <yao@codesourcery.com>
4851
4852 * linux-low.c (linux_supports_agent): New.
4853 (linux_target_ops): Initialize field `supports_agent' with
4854 linux_supports_agent.
4855 * target.h (struct target_ops) <supports_agent>: New.
4856 (target_supports_agent): New macro.
4857 * server.c (handle_general_set): Handle packet 'QAgent'.
4858 (handle_query): Send `QAgent+'.
4859 * Makefile.in (server.o): Depends on agent.h.
4860
2fa291ac
YQ
48612012-03-03 Yao Qi <yao@codesourcery.com>
4862
4863 * Makefile.in (OBS): Add agent.o.
4864 Add new rule for agent.o.
4865 Track dependence of tracepoint.c on agent.h.
4866 * tracepoint.c (run_inferior_command_1):
4867 (run_inferior_command): Call agent_run_command.
4868 (gdb_ust_connect_sync_socket): Deleted. Move it to
4869 common/agent.c.
4870 (resume_thread, stop_thread): Likewise.
4871 (gdb_ust_socket_init): Renamed to ...
4872 (gdb_agent_socket_init): ... New.
4873 (gdb_ust_thread): Renamed to ...
4874 (gdb_agent_helper_thread): ... New.
4875 (gdb_ust_init): Move some code to ...
4876 (gdb_agent_init): ... here. New.
4877 [HAVE_UST]: Call gdb_ust_init.
4878 (initialize_tracepoint_ftlib): Call gdb_agent_init.
4879 * configure.ac: Add `sys/un.h' to AC_CHECK_HEADERS.
4880 * config.in, configure: Regenerated.
4881
05044653
PA
48822012-03-02 Pedro Alves <palves@redhat.com>
4883
4884 * inferiors.c (add_pid_to_list, pull_pid_from_list): Delete.
4885 * linux-low.c (struct simple_pid_list): New.
4886 (stopped_pids): New a struct simple_pid_list pointer.
4887 (add_to_pid_list, pull_pid_from_list): New.
4888 (handle_extended_wait): Don't assume the first signal new children
4889 report is SIGSTOP. Adjust call to pull_pid_from_list.
4890 (linux_wait_for_lwp): Adjust.
4891
8d00225b
YQ
48922012-03-02 Yao Qi <yao@codesourcery.com>
4893
4894 * tracepoint.c (do_action_at_tracepoint): Write `stop_pc' in
4895 debug log.
4896
19560ba5
YQ
48972012-03-02 Yao Qi <yao@codesourcery.com>
4898
4899 * tracepoint.c (collect_ust_data_at_tracepoint): Remove parameters
4900 `stop_pc' and `tpoint'. Update caller.
4901
1faeff08
MR
49022012-03-01 Maciej W. Rozycki <macro@codesourcery.com>
4903
4904 * linux-low.h (linux_target_ops): Add regset_bitmap member.
4905 * linux-low.c (use_linux_regsets): New macro.
4906 [!HAVE_LINUX_REGSETS] (regsets_fetch_inferior_registers): Likewise.
4907 [!HAVE_LINUX_REGSETS] (regsets_store_inferior_registers): Likewise.
4908 (linux_register_in_regsets): New function.
4909 (usr_fetch_inferior_registers): Skip registers covered by
4910 regsets.
4911 (usr_store_inferior_registers): Likewise.
4912 (usr_fetch_inferior_registers): New macro.
4913 (usr_store_inferior_registers): Likewise.
4914 (linux_fetch_registers): Handle mixed regset/non-regset targets.
4915 (linux_store_registers): Likewise.
4916 * linux-mips-low.c (init_registers_mips_dsp_linux): New
4917 prototype.
4918 (init_registers_mips64_dsp_linux): Likewise.
4919 (init_registers_mips_linux): New macro.
4920 (init_registers_mips_dsp_linux): Likewise.
4921 (mips_dsp_num_regs): Likewise.
4922 (DSP_BASE, DSP_CONTROL): New fallback macros.
4923 (mips_base_regs): New macro.
4924 (mips_regmap): Use it. Fix the size.
4925 (mips_dsp_regmap): New variable.
4926 (mips_dsp_regset_bitmap): Likewise.
4927 (mips_arch_setup): New function.
4928 (mips_cannot_fetch_register): Use the_low_target.regmap rather
4929 than mips_regmap.
4930 (mips_cannot_store_register): Likewise.
4931 (the_low_target): Update .arch_setup, .num_regs and .regmap
4932 initializers. Add .regset_bitmap initializer.
4933 * linux-arm-low.c (the_low_target): Add .regset_bitmap
4934 initializer.
4935 * linux-bfin-low.c (the_low_target): Likewise.
4936 * linux-cris-low.c (the_low_target): Likewise.
4937 * linux-crisv32-low.c (the_low_target): Likewise.
4938 * linux-ia64-low.c (the_low_target): Likewise.
4939 * linux-m32r-low.c (the_low_target): Likewise.
4940 * linux-m68k-low.c (the_low_target): Likewise.
4941 * linux-ppc-low.c (the_low_target): Likewise.
4942 * linux-s390-low.c (the_low_target): Likewise.
4943 * linux-sh-low.c (the_low_target): Likewise.
4944 * linux-sparc-low.c (the_low_target): Likewise.
4945 * linux-tic6x-low.c (the_low_target): Likewise.
4946 * linux-x86-low.c (the_low_target): Likewise.
4947 * linux-xtensa-low.c (the_low_target): Likewise.
4948 * configure.srv <mips*-*-linux*>: Add mips-dsp-linux.o and
4949 mips64-dsp-linux.o to srv_regobj. Add mips-dsp-linux.xml,
4950 mips64-dsp-linux.xml, mips-dsp.xml and mips64-dsp.xml to
4951 srv_xmlfiles.
4952 * Makefile.in (mips-dsp-linux.o, mips-dsp-linux.c): New targets.
4953 (mips64-dsp-linux.o, mips64-dsp-linux.c): Likewise.
4954
c03e6ccc
YQ
49552012-02-29 Yao Qi <yao@codesourcery.com>
4956 Pedro Alves <palves@redhat.com>
4957
4958 * linux-low.c: (linux_wait_1): Call unsuspend_all_lwps when
4959 `step_over_finished' is true.
4960
644cebc9
PA
49612012-02-27 Pedro Alves <palves@redhat.com>
4962
4963 * linux-low.c (pid_is_stopped): Delete, moved to common/.
4964 (linux_attach_lwp_1): Adjust to use linux_proc_pid_is_stopped.
4965
c14d7ab2
PA
49662012-02-27 Pedro Alves <palves@redhat.com>
4967
4968 PR server/9684
4969 * linux-low.c (pid_is_stopped): New.
4970 (linux_attach_lwp_1): Handle attaching to 'T (stopped)' processes.
4971
412c89dd
LM
49722012-02-25 Luis Machado <lgustavo@codesourcery.com>
4973
4974 * mem-break.c (clear_gdb_breakpoint_conditions): Fix de-allocation
4975 of conditions.
4976
b745defe
MR
49772012-02-24 Maciej W. Rozycki <macro@codesourcery.com>
4978
4979 * linux-mips-low.c (mips_regmap): Correct the index of $f9.
4980
9f3a5c85
LM
49812012-02-24 Luis Machado <lgustavo@codesourcery>
4982
4983 * server.c (handle_query): Advertise support for target-side
4984 breakpoint condition evaluation.
4985 (process_point_options): New function.
4986 (process_serial_event): When inserting a breakpoint, check for
4987 a target-side condition that should be evaluated.
4988
4989 * mem-break.c: Include regcache.h and ax.h.
4990 (point_cond_list_t): New data structure.
4991 (breakpoint) <cond_list>: New field.
4992 (find_gdb_breakpoint_at): Make non-static.
4993 (delete_gdb_breakpoint_at): Clear any target-side
4994 conditions.
4995 (clear_gdb_breakpoint_conditions): New function.
4996 (add_condition_to_breakpoint): Likewise.
4997 (add_breakpoint_condition): Likewise.
4998 (gdb_condition_true_at_breakpoint): Likewise.
4999 (gdb_breakpoint_here): Return result directly instead
5000 of going through a local variable.
5001
5002 * mem-break.h (find_gdb_breakpoint_at): New prototype.
5003 (clear_gdb_breakpoint_conditions): Likewise.
5004 (add_breakpoint_condition): Likewise.
5005 (gdb_condition_true_at_breakpoint): Likewise.
5006
5007 * linux-low.c (linux_wait_1): Evaluate target-side breakpoint condition.
5008 (need_step_over_p): Take target-side breakpoint condition into
5009 consideration.
5010
5e1dc496
LM
50112012-02-24 Luis Machado <lgustavo@codesourcery>
5012
5013 * server.h: Include tracepoint.h.
5014 (agent_mem_read, agent_get_trace_state_variable_value,
5015 agent_set_trace_state_variable_value,
5016 agent_tsv_read, agent_mem_read_string, get_get_tsv_func_addr,
5017 get_set_tsv_func_addr): New prototypes.
5018
5019 * ax.h: New include file.
5020 * ax.c: New source file.
5021
5022 * tracepoint.c: Include ax.h.
5023 (gdb_agent_op, gdb_agent_op_names, gdb_agent_op_sizes,
5024 agent_expr, eval_result_type): Move to ax.h.
5025 (parse_agent_expr): Rename to ...
5026 (gdb_parse_agent_expr): ... this, make it non-static and move
5027 to ax.h.
5028 (unparse_agent_expr) Rename to ...
5029 (gdb_unparse_agent_expr): ... this, make it non-static and move
5030 to ax.h.
5031 (eval_agent_expr): Rename to ...
5032 (eval_tracepoint_agent_expr): ... this.
5033 (agent_mem_read, agent_mem_read_string, agent_tsv_read): Remove
5034 forward declarations.
5035 (add_tracepoint_action): Call gdb_parse_agent_expr (...).
5036 (agent_get_trace_state_variable_value): New function.
5037 (agent_set_trace_state_variable_value): New function.
5038 (cmd_qtdp): Call gdb_parse_agent_expr (...).
5039 (response_tracepoint): Call gdb_unparse_agent_expr (...).
5040 (do_action_at_tracepoint): Call eval_tracepoint_agent_expr (...).
5041 (condition_true_at_tracepoint): Likewise.
5042 (parse_agent_expr): Rename to ...
5043 (gdb_parse_agent_expr): ... this and move to ax.c.
5044 (unparse_agent_expr): Rename to ...
5045 (gdb_unparse_agent_expr): ... this and move to ax.c.
5046 (gdb_agent_op_name): Move to ax.c.
5047 (eval_agent_expr): Rename to ...
5048 (gdb_eval_agent_expr): ... this, use regcache passed as parameter
5049 and move to ax.c.
5050 (eval_tracepoint_agent_expr): New function.
5051 (agent_mem_read, agent_mem_read_string, agent_tsv_read): Make
43aaf8b6 5052 non-static.
5e1dc496
LM
5053 (current_insn_ptr, emit_error, struct bytecode_address): Move to
5054 ax.c.
5055 (emit_prologue, emit_epilogue, emit_add, emit_sub, emit_mul, emit_lsh,
5056 emit_rsh_signed, emit_rsh_unsigned, emit_ext, emit_log_not,
5057 emit_bit_and, emit_bit_or, emit_bit_xor, emit_bit_not, emit_equal,
5058 emit_less_signed, emit_less_unsigned, emit_ref, emit_if_goto,
5059 emit_goto, write_goto_address, emit_const, emit_reg, emit_pop,
5060 emit_stack, emit_zero_ext, emit_swap, emit_stack_adjust,
5061 emit_int_call_1, emit_void_call_2, emit_eq_goto, emit_ne_goto,
5062 emit_lt_goto, emit_ge_goto, emit_gt_goto, emit_le_goto): Move to ax.c.
5063 (get_get_tsv_func_addr, get_set_tsv_func_addr): New functions.
5064 (compile_bytecodes): Remove forward declaration.
5065 (is_goto_target): Move to ax.c.
5066 (compile_bytecodes): Move to ax.c and call
5067 agent_get_trace_state_variable_value (...) and
5068 agent_set_trace_state_variable_value (...).
5069
5070 * Makefile.in: Update ax.c and IPA dependencies.
5071
277e4e52
PA
50722012-02-24 Pedro Alves <palves@redhat.com>
5073
5074 * tracepoint.c (cmd_bigqtbuffer): Rename as ...
5075 (cmd_bigqtbuffer_circular): ... this. Only handle
5076 'QTBuffer:circular:'.
5077 (handle_tracepoint_general_set): Adjust.
5078
bf4c19f7
YQ
50792012-02-16 Yao Qi <yao@codesourcery.com>
5080
5081 * inferiors.c: Move code to ...
5082 * dll.c: .... here. New.
5083 * server.h: Declare clear_dlls.
5084 * Makefile.in (SFILES): Add dll.c.
5085 (OBS): Add dll.o
5086 (dll.o): New rule.
5087
d73f2619
YQ
50882012-02-11 Yao Qi <yao@codesourcery.com>
5089
5090 * server.c: (handle_monitor_command): Add a new parameter
5091 `own_buf'.
5092 (handle_query): Update caller.
5093
f8255c2a
JB
50942012-02-09 Joel Brobecker <brobecker@adacore.com>
5095
5096 * configure.ac: Add readlink to AC_CHECK_FUNCS list.
5097 * configure, config.in: Regenerate.
5098 * hostio.c: Provide an alternate implementation if HAVE_READLINK
5099 is not defined.
5100
da84f473
PA
51012012-02-02 Pedro Alves <palves@redhat.com>
5102
5103 Try SIGKILL first, then PTRACE_KILL.
5104 * linux-low.c (linux_kill_one_lwp): New.
5105 (linux_kill_one_lwp): Rename to ...
5106 (kill_one_lwp_callback): ... this. Use the new
5107 linux_kill_one_lwp.
5108
e886a173
PA
51092012-02-02 Pedro Alves <palves@redhat.com>
5110
5111 * tracepoint.c (cmd_qtminftpilen): Return 0 if there's no current
5112 inferior.
5113
be07f1a2
PA
51142012-01-27 Pedro Alves <palves@redhat.com>
5115
5116 * linux-low.c (linux_child_pid_to_exec_file): Delete.
5117 (elf_64_file_p): Make static.
5118 (linux_pid_exe_is_elf_64_file): New.
5119 * linux-low.h (linux_child_pid_to_exec_file, elf_64_file_p):
5120 Delete declarations.
5121 (linux_pid_exe_is_elf_64_file): Declare.
5122 * linux-x86-low.c (x86_arch_setup): Use
5123 linux_pid_exe_is_elf_64_file.
5124
d8301ad1
JK
51252012-01-25 Jan Kratochvil <jan.kratochvil@redhat.com>
5126
5127 * linux-low.c (linux_wait_for_event_1): Rename to ...
5128 (linux_wait_for_event): ... here and merge it with former
5129 linux_wait_for_event - new variable wait_ptid, use it.
5130 (linux_wait_for_event): Remove - merge it to linux_wait_for_event_1.
5131
01b17894
PA
51322012-01-23 Pedro Alves <palves@redhat.com>
5133
5134 * server.c (main): Avoid yet another case of infinite loop while
5135 detaching/killing after a longjmp.
5136
e825046f
JK
51372012-01-20 Jan Kratochvil <jan.kratochvil@redhat.com>
5138
5139 Code cleanup.
5140 * linux-low.c (linux_wait_for_event_1): Use ptid_is_pid.
5141
b9e7b9c3
UW
51422012-01-20 Ulrich Weigand <ulrich.weigand@linaro.org>
5143
5144 * hostio.c (handle_readlink): New function.
5145 (handle_vFile): Call it to handle "vFile:readlink" packets.
5146
901f9912
UW
51472012-01-20 Pedro Alves <palves@redhat.com>
5148 Ulrich Weigand <ulrich.weigand@linaro.org>
5149
5150 * server.c (handle_v_requests): Only support vAttach and vRun to
5151 start multiple processes when in extended protocol mode.
5152
fc1ab1a0
PA
51532012-01-17 Pedro Alves <palves@redhat.com>
5154
5155 * tracepoint.c (initialize_tracepoint): Use mmap instead of
5156 memalign plus mprotect to allocate the scratch buffer.
5157
7d5d4e98
PA
51582012-01-13 Pedro Alves <palves@redhat.com>
5159
5160 * server.c (attach_inferior): Clear `cont_thread'.
5161
f128d5e9
PA
51622012-01-13 Pedro Alves <palves@redhat.com>
5163
5164 * server.c (main): Avoid infinite loop while detaching/killing
5165 after a longjmp.
5166
06db92f0
DE
51672012-01-09 Doug Evans <dje@google.com>
5168
5169 * server.c (start_inferior): Set last_ptid in --wrapper case.
5170
32d92999
YQ
51712012-01-06 Yao Qi <yao@codesourcery.com>
5172
5173 * tracepoint.c [IN_PROCESS_AGENT] (debug_threads): Macro
5174 defined.
5175 [IN_PROCESS_AGENT] (debug_agent): New global variable.
5176
5e0a92a9
YQ
51772012-01-04 Yao Qi <yao@codesourcery.com>
5178
5179 * tracepoint.c (cmd_qtdp): Print debug message
5180 for static tracepoint.
5181
ae639e8c
YQ
51822012-01-04 Yao Qi <yao@codesourcery.com>
5183
5184 * tracepoint.c (trace_vdebug): Differentiate debug message
5185 between gdbserver and IPA.
5186
f72429c5
YQ
51872012-01-03 Yao Qi <yao@codesourcery.com>
5188
5189 * tracepoint.c (tracepoint_was_hit): Don't collect for
5190 static tracepoint.
5191
12c3e59c
JB
51922012-01-02 Joel Brobecker <brobecker@adacore.com>
5193
5194 * terminal.h: Reformat copyright header.
5195
67827812
JB
51962012-01-02 Joel Brobecker <brobecker@adacore.com>
5197
5198 * server.c (gdbserver_version): Update copyright year.
5199 * gdbreplay.c (gdbreplay_version): Likewise.
5200
3e52c33d
JK
52012011-12-18 Jan Kratochvil <jan.kratochvil@redhat.com>
5202
5203 * linux-low.c (linux_create_inferior): Put empty if clause for write.
5204
5205 Revert:
5206 2011-12-18 Hui Zhu <teawater@gmail.com>
5207 * linux-low.c (linux_create_inferior): Save return value to ret.
5208
66f1260e
HZ
52092011-12-18 Hui Zhu <teawater@gmail.com>
5210
5211 * linux-low.c (linux_create_inferior): Save return value to ret.
5212
e77616d7
DE
52132011-12-16 Doug Evans <dje@google.com>
5214
e7b06c57
DE
5215 * linux-low.c (linux_create_inferior): If stdio connection,
5216 redirect stdin from /dev/null, stdout to stderr.
5217 * remote-utils.c (remote_is_stdio): New static global.
5218 (remote_connection_is_stdio): New function.
5219 (remote_prepare): Handle stdio connection.
5220 (remote_open): Ditto.
5221 (remote_close): Don't close stdin for stdio connections.
5222 (read_prim,write_prim): New functions. Replace all calls to
5223 read/write to these.
5224 * server.c (main): Watch for "-" argument. Move call to
5225 remote_prepare before start_inferior.
5226 * server.h (STDIO_CONNECTION_NAME): New macro.
5227 (remote_connection_is_stdio): Declare.
5228
e77616d7
DE
5229 * remote-utils.c (prepare_resume_reply): Remove extraneous \n
5230 in debugging output.
5231
82067193
YQ
52322011-12-15 Yao Qi <yao@codesourcery.com>
5233
5234 * tracepoint.c: Include sys/syscall.h.
5235 (gdb_ust_thread): Remove preprocessor conditional.
5236
82bfbe7e
PA
52372011-12-14 Pedro Alves <pedro@codesourcery.com>
5238
5239 * linux-low.c (linux_detach_one_lwp): Call
5240 the_low_target.prepare_to_resume before detaching.
5241
712c6575
YQ
52422011-12-14 Yao Qi <yao@codesourcery.com>
5243
5244 * tracepoint.c (gdb_ust_thread): Don't ignore return value
5245 of write.
5246
d54d1edf
YQ
52472011-12-14 Yao Qi <yao@codesourcery.com>
5248
5249 * i386-low.c (i386_low_stopped_data_address): Initialize local
5250 variable `control'.
5251
6210a125
PA
52522011-12-13 Pedro Alves <pedro@codesourcery.com>
5253
5254 PR remote/13492
5255
5256 * i386-low.c (i386_low_stopped_data_address): Avoid fetching
5257 DR_CONTROL unless necessary. Extend comments.
5258 * linux-x86-low.c (x86_linux_prepare_to_resume): Don't write to
5259 DR0-3 if not used. If any watchpoint was set, clear DR_STATUS.
5260
2ece8244
YQ
52612011-12-13 Yao Qi <yao@codesourcery.com>
5262
5263 * tracepoint.c (trace_buffer_alloc): Replace magic numbers with
5264 macros.
5265 (upload_fast_traceframes, upload_fast_traceframes): Likewise.
5266
784867a5
JK
52672011-12-08 Jan Kratochvil <jan.kratochvil@redhat.com>
5268
5269 * linux-low.c (linux_kill): Skip PTRACE_KILL if LWP does not exist.
5270 Print new debug message for such case.
5271
6bf36717
JK
52722011-12-06 Jan Kratochvil <jan.kratochvil@redhat.com>
5273
5274 Fix overlapping memcpy.
5275 * mem-break.c (set_raw_breakpoint_at): New variable buf. Use it for
5276 the read_inferior_memory transfer.
5277 (delete_fast_tracepoint_jump): New variable buf. Use it for the
5278 write_inferior_memory transfer.
5279 (set_fast_tracepoint_jump): New variable buf. Use it for the
5280 read_inferior_memory and write_inferior_memory transfers.
5281 (uninsert_fast_tracepoint_jumps_at, reinsert_fast_tracepoint_jumps_at)
5282 (delete_raw_breakpoint, uninsert_raw_breakpoint): New variable buf.
5283 Use it for the write_inferior_memory transfer.
5284 (check_mem_read, check_mem_write): New gdb_asserts for overlapping
5285 buffers.
5286
50275556
MR
52872011-12-06 Maciej W. Rozycki <macro@codesourcery.com>
5288
5289 * linux-low.c (fetch_register, store_register): Make code
5290 consistent, fix formatting.
5291
7325beb4
MR
52922011-12-06 Maciej W. Rozycki <macro@codesourcery.com>
5293
5294 * linux-low.c (usr_store_inferior_registers): Factor out code
5295 to handle individual registers into...
5296 (store_register): ... this new function.
5297
c642a434
UW
52982011-12-06 Ulrich Weigand <uweigand@de.ibm.com>
5299
5300 * Makefile.in (s390-linux32v1.o, s390-linux32v1.c): New rules.
5301 (s390-linux32v2.o, s390-linux32v2.c): Likewise.
5302 (s390-linux64v1.o, s390-linux64v1.c): Likewise.
5303 (s390-linux64v2.o, s390-linux64v2.c): Likewise.
5304 (s390x-linux64v1.o, s390x-linux64v1.c): Likewise.
5305 (s390x-linux64v2.o, s390x-linux64v2.c): Likewise.
5306 * configure.srv [s390*-*-linux*] (srv_regobj): Add new objects.
5307 (srv_xmlfiles): Add new XML files.
5308
5309 * linux-s390-low.c: Include "elf/common.h", <sys/ptrace.h>,
5310 and <sys/uio.h>.
5311 (PTRACE_GETREGSET, PTRACE_SETREGSET): Define if undefined.
5312 (init_registers_s390_linux32v1): Add prototype.
5313 (init_registers_s390_linux32v2): Likewise.
5314 (init_registers_s390_linux64v1): Likewise.
5315 (init_registers_s390_linux64v2): Likewise.
5316 (init_registers_s390x_linux64v1): Likewise.
5317 (init_registers_s390x_linux64v2): Likewise.
5318 (s390_num_regs): Increment to 52.
5319 (s390_regmap): Add orig_r2 register.
5320 (s390_num_regs_3264): Increment to 68.
5321 (s390_regmap_3264): Add orig_r2 register.
5322 (s390_collect_ptrace_register): Handle orig_r2 register.
5323 (s390_supply_ptrace_register): Likewise.
5324 (s390_fill_last_break): New function.
5325 (s390_store_last_break): Likewise.
5326 (s390_fill_system_call): New function.
5327 (s390_store_system_call): Likewise.
5328 (target_regsets): Handle NT_S390_LAST_BREAK and NT_S390_SYSTEM_CALL
5329 register sets.
5330 (s390_check_regset): New function.
5331 (s390_arch_setup): Check for presence of NT_S390_LAST_BREAK and
5332 NT_S390_SYSTEM_CALL regsets and use appropriate description.
5333 Update target_regsets for available register sets.
5334
2268b414
JK
53352011-12-02 Paul Pluzhnikov <ppluzhnikov@google.com>
5336 Jan Kratochvil <jan.kratochvil@redhat.com>
5337
5338 * linux-low.c (get_phdr_phnum_from_proc_auxv, get_dynamic, get_r_debug)
5339 (read_one_ptr, struct link_map_offsets, linux_qxfer_libraries_svr4):
5340 New.
5341 (struct linux_target_ops): Install linux_qxfer_libraries_svr4.
5342 * linux-low.h (struct process_info_private): New member r_debug.
5343 * server.c (handle_qxfer_libraries): Call
5344 the_target->qxfer_libraries_svr4.
5345 (handle_qxfer_libraries_svr4): New function.
5346 (qxfer_packets): New entry "libraries-svr4".
5347 (handle_query): Check QXFER_LIBRARIES_SVR4 and report libraries-svr4.
5348 * target.h (struct target_ops): New member qxfer_libraries_svr4.
5349 * remote.c (remote_xfer_partial): Call add_packet_config_cmd for
5350 PACKET_qXfer_libraries_svr4.
5351
d6db1fab
UW
53522011-11-30 Ulrich Weigand <uweigand@de.ibm.com>
5353
5354 * linux-s390-low.c (s390_collect_ptrace_register): Fully convert
5355 PSW address/mask between 8-byte and 16-byte formats.
5356 (s390_supply_ptrace_register): Likewise.
5357 (s390_get_pc, s390_set_pc): 4-byte PSW address always includes
5358 basic addressing mode bit.
5359
242f5f1c
SS
53602011-11-24 Stan Shebs <stan@codesourcery.com>
5361
5362 * tracepoint.c (cmd_qtstatus): Use plongest instead of %llx.
5363
f196051f
SS
53642011-11-17 Stan Shebs <stan@codesourcery.com>
5365
5366 * tracepoint.c (struct tracepoint): New field traceframe_usage.
5367 (tracing_start_time): New global.
5368 (tracing_stop_time): New global.
5369 (tracing_user_name): New global.
5370 (tracing_notes): New global.
5371 (tracing_stop_note): New global.
5372 (cmd_qtstart): Set traceframe_usage, start_time.
5373 (stop_tracing): Set stop_time.
5374 (cmd_qtstatus): Report additional status.
5375 (cmd_qtp): New function.
5376 (handle_tracepoint_query): Call it.
5377 (cmd_qtnotes): New function.
5378 (handle_tracepoint_general_set): Call it.
5379 (get_timestamp): Rename from tsv_get_timestamp.
5380
405f8e94
SS
53812011-11-14 Stan Shebs <stan@codesourcery.com>
5382 Kwok Cheung Yeung <kcy@codesourcery.com>
5383
5384 * linux-x86-low.c (small_jump_insn): New.
5385 (i386_install_fast_tracepoint_jump_pad): Add arguments for
5386 trampoline and error message, build a trampoline and issue a small
5387 jump instruction to it.
5388 (x86_install_fast_tracepoint_jump_pad): Add arguments for
5389 trampoline and error message.
5390 (x86_get_min_fast_tracepoint_insn_len): New.
5391 (the_low_target): Add call to x86_get_min_fast_tracepoint_insn_len.
5392 * linux-low.h (struct linux_target_ops): Add arguments to
5393 install_fast_tracepoint_jump_pad operation, add new operation.
5394 * linux-low.c (linux_install_fast_tracepoint_jump_pad): Add
5395 arguments.
5396 (linux_get_min_fast_tracepoint_insn_len): New function.
5397 (linux_target_op): Add new operation.
5398 * tracepoint.c (gdb_trampoline_buffer): New IPA variable.
5399 (gdb_trampoline_buffer_end): Ditto.
5400 (gdb_trampoline_buffer_error): Ditto.
5401 (struct ipa_sym_addresses): Add fields for new IPA variables.
5402 (symbol_list): Add entries for new IPA variables.
5403 (struct tracepoint): Add fields to hold the address range of the
5404 trampoline used by the tracepoint.
5405 (trampoline_buffer_head): New static variable.
5406 (trampoline_buffer_tail): Ditto.
5407 (claim_trampoline_space): New function.
5408 (have_fast_tracepoint_trampoline_buffer): New function.
5409 (clone_fast_tracepoint): Fill in trampoline fields of tracepoint
5410 structure.
5411 (install_fast_tracepoint): Ditto, also add error buffer argument.
5412 (cmd_qtminftpilen): New function.
5413 (handle_tracepoint_query): Add response to qTMinFTPILen packet.
5414 (fast_tracepoint_from_trampoline_address): New function.
5415 (fast_tracepoint_collecting): Handle trampoline as part of jump
5416 pad space.
5417 (set_trampoline_buffer_space): New function.
5418 (initialize_tracepoint): Initialize new IPA variables.
5419 * target.h (struct target_ops): Add arguments to
5420 install_fast_tracepoint_jump_pad operation, add new
5421 get_min_fast_tracepoint_insn_len operation.
5422 (target_get_min_fast_tracepoint_insn_len): New.
5423 (install_fast_tracepoint_jump_pad): Add arguments.
5424 * server.h (IPA_BUFSIZ): Define.
5425 * linux-i386-ipa.c: Include extra header files.
5426 (initialize_fast_tracepoint_trampoline_buffer): New function.
5427 (initialize_low_tracepoint): Call it.
5428 * server.h (set_trampoline_buffer_space): Declare.
5429 (claim_trampoline_space): Ditto.
5430 (have_fast_tracepoint_trampoline_buffer): Ditto.
5431
1e4d1764
YQ
54322011-11-14 Yao Qi <yao@codesourcery.com>
5433
5434 * server.c (handle_query): Handle InstallInTrace for qSupported.
5435 * tracepoint.c (add_tracepoint): Sort list.
5436 (install_tracepoint, download_tracepoint): New.
5437 (cmd_qtdp): Call them to install and download tracepoints.
5438 (sort_tracepoints): Removed.
5439 (cmd_qtstart): Update.
5440
5c73ff4e
YQ
54412011-11-14 Yao Qi <yao@codesourcery.com>
5442
5443 * mem-break.c (inc_ref_fast_tracepoint_jump): New.
5444 * mem-break.h: Declare.
5445 * tracepoint.c (cmd_qtstart): Move some code to ...
5446 (clone_fast_tracepoint, install_fast_tracepoint): ... here.
5447 New.
5448 (download_tracepoints): Move some code to ...
5449 (download_tracepoint_1): ... here. New.
5450
86a30030
YQ
54512011-11-08 Yao Qi <yao@codesourcery.com>
5452
5453 * remote-utils.c (relocate_instruction): A comment fix.
5454
8d26e50c
JB
54552011-11-07 Joel Brobecker <brobecker@adacore.com>
5456
5457 * win32-i386-low.c (dr_status_mirror, dr_control_mirror): Delete.
5458 (i386_dr_low_get_control, i386_dr_low_get_status): Use
5459 dr_status_mirror and dr_control_mirror from debug_reg_state.
5460 (i386_dr_low_get_status): Use debug_reg_state.dr_status_mirror
5461 (i386_initial_stuff): Remove use of deleted globals.
5462 (i386_get_thread_context, i386_set_thread_context,
5463 i386_thread_added): Use dr_status_mirror and dr_control_mirror
5464 from debug_reg_state.
5465
a59306a3
YQ
54662011-11-05 Yao Qi <yao@codesourcery.com>
5467
5468 * tracepoint.c (gdb_collect): Loop over tracepoints of same
5469 address as TPOINT's.
5470
3065dfb6
SS
54712011-11-02 Stan Shebs <stan@codesourcery.com>
5472
5473 * tracepoint.c (agent_mem_read_string): New function.
5474 (eval_agent_expr): Call it for tracenz.
5475 * server.c (handle_query): Report support for tracenz.
5476
fd0d8c7c
YQ
54772011-11-02 Yao Qi <yao@codesourcery.com>
5478
5479 * tracepoint.c (cmd_qtstart): Remove unused local variables.
5480
609086b1
YQ
54812011-11-02 Yao Qi <yao@codesourcery.com>
5482
5483 * target.h: Fix a typo in comment.
5484
b9fd1791
PA
54852011-10-31 Pedro Alves <pedro@codesourcery.com>
5486
5487 * mem-break.c (check_mem_write): Add `myaddr' parameter. Don't
5488 clobber the breakpoints' shadows with fast tracepoint jumps.
5489 * mem-break.h (check_mem_write): Add `myaddr' parameter.
5490 * target.c (write_inferior_memory): Also pass MYADDR down to
5491 check_mem_write.
5492
03583c20
UW
54932011-10-07 Ulrich Weigand <ulrich.weigand@linaro.org>
5494
5495 * configure.ac: Check support for personality routine.
5496 * configure: Regenerate.
5497 * config.in: Likewise.
5498 * linux-low.c: Include <sys/personality.h>.
5499 Define ADDR_NO_RANDOMIZE if necessary.
5500 (linux_create_inferior): Disable address space randomization when
5501 forking inferior, if requested.
5502 (linux_supports_disable_randomization): New function.
5503 (linux_target_ops): Install it.
5504 * server.h (disable_randomization): Declare.
5505 * server.c (disable_randomization): New global variable.
5506 (handle_general_set): Handle QDisableRandomization.
5507 (handle_query): Likewise for qSupported.
5508 (main): Support --disable-randomization and --no-disable-randomization
5509 command line arguments.
5510 * target.h (struct target_ops): Add supports_disable_randomization.
5511 (target_supports_disable_randomization): New macro.
5512
723b724b
MF
55132011-09-29 Mike Frysinger <vapier@gentoo.org>
5514
5515 * linux-low.c (target_loadseg): Add defined PTRACE_GETFDPIC to the
5516 ifdef check.
5517 [PT_GETDSBT] (target_loadmap): Wrap in a defined PT_GETDSBT check.
5518 [!PT_GETDSBT] (target_loadmap): New definition.
5519 (LINUX_LOADMAP, LINUX_LOADMAP_EXEC, LINUX_LOADMAP_INTERP): Define.
5520 (linux_read_loadmap): Change PTRACE_GETDSBT_EXEC to
5521 LINUX_LOADMAP_EXEC, PTRACE_GETDSBT_INTERP to LINUX_LOADMAP_INTERP,
5522 and PT_GETDSBT to LINUX_LOADMAP.
5523 [!PT_GETDSBT] (linux_read_loadmap): Define to NULL.
5524 (linux_target_ops): Delete unnecessary ifdef PT_GETDSBT check.
5525
55329a5c 55262011-09-21 Ulrich Weigand <ulrich.weigand@linaro.org>
71487fd7
UW
5527
5528 * linux-arm-low.c (struct arm_linux_hwbp_cap): Remove.
5529 (arm_linux_hwbp_cap): New static variable.
5530 (arm_linux_get_hwbp_cap): Replace by ...
5531 (arm_linux_init_hwbp_cap): ... this new function.
5532 (arm_linux_get_hw_breakpoint_count): Use arm_linux_hwbp_cap.
5533 (arm_linux_get_hw_watchpoint_count): Likewise.
5534 (arm_linux_get_hw_watchpoint_max_length): Likewise.
5535 (arm_arch_setup): Call arm_linux_init_hwbp_cap.
5536 (arm_prepare_to_resume): Use perror_with_name instead of error.
5537
55329a5c 55382011-09-21 Ulrich Weigand <ulrich.weigand@linaro.org>
09b4ad9f
UW
5539
5540 * linux-arm-low.c: Include <signal.h>.
5541 (PTRACE_GETHBPREGS, PTRACE_SETHBPREGS): Define if necessary.
5542 (struct arm_linux_hwbp_cap): New data type.
5543 (arm_hwbp_type, arm_hwbp_control_t): New typedefs.
5544 (struct arm_linux_hw_breakpoint): New data type.
5545 (MAX_BPTS, MAX_WPTS): Define.
5546 (struct arch_process_info, struct arch_lwp_info): New data types.
5547 (arm_linux_get_hwbp_cap): New function.
5548 (arm_linux_get_hw_breakpoint_count): Likewise.
5549 (arm_linux_get_hw_watchpoint_count): Likewise.
5550 (arm_linux_get_hw_watchpoint_max_length): Likewise.
5551 (arm_hwbp_control_initialize): Likewise.
5552 (arm_hwbp_control_is_enabled): Likewise.
5553 (arm_hwbp_control_is_initialized): Likewise.
5554 (arm_hwbp_control_disable): Likewise.
5555 (arm_linux_hw_breakpoint_equal): Likewise.
5556 (arm_linux_hw_point_initialize): Likewise.
5557 (struct update_registers_data): New data structure.
5558 (update_registers_callback: New function.
5559 (arm_insert_point): Likewise.
5560 (arm_remove_point): Likewise.
5561 (arm_stopped_by_watchpoint): Likewise.
5562 (arm_stopped_data_address): Likewise.
5563 (arm_new_process): Likewise.
5564 (arm_new_thread): Likewise.
5565 (arm_prepare_to_resume): Likewise.
5566 (the_low_target): Register arm_insert_point, arm_remove_point,
5567 arm_stopped_by_watchpoint, arm_stopped_data_address, arm_new_process,
5568 arm_new_thread, and arm_prepare_to_resume.
5569
6b9801d4
SS
55702011-09-15 Stan Shebs <stan@codesourcery.com>
5571
5572 * server.h (struct emit_ops): Add compare-goto fields.
5573 * tracepoint.c (gdb_agent_op_sizes): New table.
5574 (emit_eq_goto): New function.
5575 (emit_ne_goto): New function.
5576 (emit_lt_goto): New function.
5577 (emit_le_goto): New function.
5578 (emit_gt_goto): New function.
5579 (emit_ge_goto): New function.
5580 (is_goto_target): New function.
5581 (compile_bytecodes): Recognize special cases of compare-goto
5582 combinations and call specialized emitters for them.
5583 * linux-x86-low.c (amd64_emit_eq_goto): New function.
5584 (amd64_emit_ne_goto): New function.
5585 (amd64_emit_lt_goto): New function.
5586 (amd64_emit_le_goto): New function.
5587 (amd64_emit_gt_goto): New function.
5588 (amd64_emit_ge_goto): New function.
5589 (amd64_emit_ops): Add the new functions.
5590 (i386_emit_eq_goto): New function.
5591 (i386_emit_ne_goto): New function.
5592 (i386_emit_lt_goto): New function.
5593 (i386_emit_le_goto): New function.
5594 (i386_emit_gt_goto): New function.
5595 (i386_emit_ge_goto): New function.
5596 (i386_emit_ops): Add the new functions.
5597
bf15cbda
SS
55982011-09-08 Stan Shebs <stan@codesourcery.com>
5599
5600 * linux-x86-low.c (i386_emit_prologue): Save %ebx.
5601 (i386_emit_epilogue): Restore %ebx.
5602
943ca1dd
JZ
56032011-08-31 Jie Zhang <jzhang918@gmail.com>
5604
5605 * server.c (step_thread): Remove definition.
5606 (process_serial_event): Don't handle Hs.
5607 * server.h (step_thread): Remove declaration.
5608 * target.c (set_desired_inferior): Remove use of step_thread.
5609
e3deef73
LM
56102011-08-24 Luis Machado <lgustavo@codesourcery.com>
5611
5612 * linux-low.c: Include linux-procfs.h.
5613 (linux_attach_lwp_1): Update comments.
5614 (linux_attach): Scan for existing threads when attaching to a
5615 process that is the tgid.
5616 * Makefile.in: Update dependencies.
5617
13da1c97
LM
56182011-08-24 Luis Machado <lgustavo@codesourcery.com>
5619
5620 * configure.srv: Add linux-procfs.o dependencies.
5621
881127c9
YQ
56222011-08-14 Yao Qi <yao@codesourcery.com>
5623
5624 * target.h (struct target_ops): Fix indent.
5625 * win32-low.c (win32_target_ops): Fix comment.
5626
58dbd541
YQ
56272011-08-14 Andrew Jenner <andrew@codesourcery.com>
5628 Yao Qi <yao@codesourcery.com>
5629
5630 * Makefile.in (clean): Remove tic6x-*.c files.
5631 (linux-tic6x-low.o, tic6x-c62x-linux.o, tic6x-c64x-linux.o): New rules.
5632 (tic6x-c64xp-linux.o, tic6x-c62x-linux.c, tic6x-c64x-linux.c): Likewise.
5633 (tic6x-c64xp-linux.c): Likewise.
5634 * configure.srv: Add support for tic6x-*-uclinux.
5635 * linux-tic6x-low.c: New.
5636 * linux-low.c (PT_TEXT_ADDR, PT_DATA_ADDR, PT_TEXT_END_ADDR): Define.
5637
78d85199
YQ
56382011-08-14 Andrew Stubbs <ams@codesourcery.com>
5639 Yao Qi <yao@codesourcery.com>
5640
5641 * target.h (struct target_ops): Add read_loadmap.
5642 * linux-low.c (struct target_loadseg): New type.
5643 (struct target_loadmap): New type.
5644 (linux_read_loadmap): New function.
5645 (linux_target_ops): Add linux_read_loadmap.
5646 * server.c (handle_query): Support qXfer:fdpic:read packet.
43aaf8b6
PA
5647 * win32-low.c (win32_target_ops): Initialize field `read_loadmap'
5648 to NULL.
78d85199 5649
a959a88d
EZ
56502011-08-05 Eli Zaretskii <eliz@gnu.org>
5651
5652 * win32-low.c: Include <stdint.h>.
5653
1ced966e
PA
56542011-07-22 Pedro Alves <pedro@codesourcery.com>
5655
5656 * i386-low.c (i386_insert_aligned_watchpoint): Don't pass the info
5657 to the inferior here.
5658 (i386_remove_aligned_watchpoint): Ditto.
5659 (i386_handle_nonaligned_watchpoint): Return immediate on fail to
5660 fit part of the watchpoint in the debug registers.
5661 (i386_update_inferior_debug_regs): New.
5662 (i386_low_insert_watchpoint): Work on a local mirror of the debug
5663 registers, and only update the inferior on success.
5664 (i386_low_remove_watchpoint): Ditto.
5665
d26e3629
KY
56662011-07-22 Kwok Cheung Yeung <kcy@codesourcery.com>
5667
5668 * linux-low.c (compare_ints, unique, list_threads, show_process,
5669 linux_core_of_thread): Delete.
5670 (linux_target_ops): Change linux_core_of_thread to
5671 linux_common_core_of_thread.
5672 (linux_qxfer_osdata): Defer to linux_common_xfer_osdata.
5673 * utils.c (malloc_failure): Change type of argument.
5674 (xmalloc, xrealloc, xcalloc, xsnprintf): Delete.
5675 * Makefile.in (SFILES): Add common/common-utils.c, common/xml-utils.c,
5676 common/linux-osdata.c, common/ptid.c and common/buffer.c.
5677 (OBS): Add xml-utils.o, common-utils.o, ptid.o and buffer.o.
5678 (IPA_OBJS): Add common-utils-ipa.o.
5679 (ptid_h, linux_osdata_h): New macros.
5680 (server_h): Add common/common-utils.h, common/xml-utils.h,
5681 common/buffer.h, common/gdb_assert.h, common/gdb_locale.h and
5682 common/ptid.h.
5683 (common-utils-ipa.o, common-utils.o, xml-utils.o, linux-osdata.o,
5684 ptid.o, buffer.o): New rules.
5685 (linux-low.o): Add common/linux-osdata.h as a dependency.
5686 * configure.srv (srv_tgtobj): Add linux-osdata.o to Linux targets.
5687 * configure.ac: Add AC_HEADER_DIRENT check.
5688 * config.in: Regenerate.
5689 * configure: Regenerate.
5690 * remote-utils.c (xml_escape_text): Delete.
5691 (buffer_grow, buffer_free, buffer_init, buffer_finish,
5692 buffer_xml_printf): Move to common/buffer.c.
5693 * server.c (main): Remove call to initialize_inferiors.
5694 * server.h (struct ptid, ptid_t, minus_one_ptid, null_ptid,
5695 ptid_build, pid_to_ptid, ptid_get_pid, ptid_get_lwp, ptid_get_tid,
5696 ptid_equal, ptid_is_pid, initialize_inferiors, xml_escape_text,
5697 internal_error, gdb_assert, gdb_assert_fail): Delete.
5698 (struct buffer, buffer_grow, buffer_free, buffer_init, buffer_finish,
5699 buffer_xml_printf, buffer_grow_str, buffer_grow_str0): Move to
5700 common/buffer.h.
5701 * inferiors.c (null_ptid, minus_one_ptid, ptid_build, pid_to_ptid,
5702 ptid_get_pid, ptid_get_lwp, ptid_get_tid, ptid_equal, ptid_is_pid,
5703 initialize_inferiors): Delete.
5704
2275a1a7
PA
57052011-07-20 Pedro Alves <pedro@codesourcery.com>
5706
5707 * tracepoint.c (tracepoint_look_up_symbols): Return upon the first
5708 symbol error.
5709
0a5b1e09
PA
57102011-05-31 Pedro Alves <pedro@codesourcery.com>
5711
5712 * linux-x86-low.c (i386_dr_low_get_addr): Fix off by one in
5713 assertion.
5714 * win32-i386-low.c (i386_dr_low_get_addr): Ditto.
5715
6938fd34
YQ
57162011-05-26 Yao Qi <yao@codesourcery.com>
5717
5718 * Makefile.in (thread-db.o): Track dependence to
5719 common/gdb_thread_db.h.
5720 * thread-db.c: include gdb_thread_db.h from right place.
5721
b481f9e0
TT
57222011-05-16 Adrian Cornish <gnu@bluedreamer.com>
5723
5724 * linux-i386-ipa.c (supply_static_tracepoint_registers): Pass
5725 __FILE__ and __LINE__ to internal_error.
5726
98a5dd13
DE
57272011-05-13 Doug Evans <dje@google.com>
5728
5729 * thread-db.c (try_thread_db_load_from_sdir): New function.
5730 (try_thread_db_load_from_dir): New function.
5731 (thread_db_load_search): Handle $sdir, ignore $pdir.
5732 Remove trying of system directories if search of
5733 libthread-db-search-path fails, that is now done via $sdir.
5734
d248b706
KY
57352011-05-12 Kwok Cheung Yeung <kcy@codesourcery.com>
5736
5737 * server.c (handle_query): Add EnableDisableTracepoints to the list
5738 of supported features.
43aaf8b6 5739 * tracepoint.c (clear_installed_tracepoints): Uninstall disabled
d248b706 5740 tracepoints.
43aaf8b6
PA
5741 (cmd_qtenable_disable): New.
5742 (cmd_qtstart): Install tracepoints even if disabled.
5743 (handle_tracepoint_general_set): Add call to cmd_qtenable_disable on
5744 receiving a QTEnable or QTDisable packet.
5745 (gdb_collect): Skip data collection if fast tracepoint is disabled.
5746 (ust_marker_to_static_tracepoint): Do not ignore disabled static
5747 tracepoints.
5748 (gdb_probe): Skip data collection if static tracepoint is disabled.
d248b706 5749
84e578fb
DE
57502011-05-10 Doug Evans <dje@google.com>
5751
5752 * thread-db.c (thread_db_handle_monitor_command): Handle elided path.
5753
71f55dd8
DE
57542011-05-04 Doug Evans <dje@google.com>
5755
5756 * linux-low.c (linux_join): Skip process lookup.
5757 * spu-low.c (spu_join): Ditto.
5758 * server.c (join_inferiors_callback): Delete.
5759 (process_serial_event): For 'D' packet (detach) call join_inferior
5760 directly.
5761
4d393d60
JM
57622011-05-04 Joseph Myers <joseph@codesourcery.com>
5763
5764 * README: Don't mention xscale*-*-linux*.
5765 * configure.srv (xscale*-*-linux*): Don't handle target.
5766
b00ad6ff
NF
57672011-04-27 Nathan Froyd <froydnj@codesourcery.com>
5768
5769 * linux-x86-low.c (amd64_emit_const): Call memcpy instead of
5770 casting pointers.
5771 (amd64_emit_reg, amd64_emit_int_call_1, amd64_emit_void_call_2):
5772 (i386_emit_const, i386_emit_reg, i386_emit_int_call_1):
5773 (i386_emit_void_call_2): Likewise.
5774
af96c192
YQ
57752011-04-26 Yao Qi <yao@codesourcery.com>
5776
43aaf8b6
PA
5777 * linux-low.c: Move common macros to linux-ptrace.h.
5778 Include linux-ptrace.h.
af96c192
YQ
5779 * Makefile.in (linux_ptrace_h): New.
5780 (linux-low.o): Depends on linux-ptrace.h.
5781
03f2bd59
JK
57822011-04-24 Jan Kratochvil <jan.kratochvil@redhat.com>
5783
5784 * remote-utils.c (handle_accept_event): Close LISTEN_DESC only if
5785 RUN_ONCE. Comment for the LISTEN_DESC delete_file_handler call.
5786 (remote_prepare): New function with most of the TCP code from ...
5787 (remote_open): ... here. Detect PORT here unconditionally. Move also
5788 setting transport_is_reliable.
5789 * server.c (run_once): New variable.
5790 (gdbserver_usage): Document it.
5791 (main): Set run_once for `--once'. Call remote_prepare. Exit after
5792 the first run if RUN_ONCE.
5793 * server.h (run_once, remote_prepare): New declarations.
5794
7a9dd1b2
TT
57952011-04-19 Tom Tromey <tromey@redhat.com>
5796
5797 * win32-low.c (handle_load_dll): Remove duplicate "the".
5798
81239425
PM
57992011-04-07 Pierre Muller <muller@ics.u-strasbg.fr>
5800
5801 Remove support for old Cygwin 1.5 versions.
5802 * win32-low.c (win32_create_inferior): Use new cygwin_path_list
5803 function to avoid warning.
5804 (win32_add_one_solib): Use cygwin_conv_path function to avoid
5805 warning.
5806
9e0627f1
PM
58072011-03-18 Pierre Muller <muller@ics.u-strasbg.fr>
5808
5809 * gdbserver/server.h (Macro _): Define it if not available.
5810
588eebee
MS
58112011-03-14 Michael Snyder <msnyder@vmware.com>
5812
348af9f7 5813 * hostio.c (handle_close): Remove unnecessary null test.
588eebee 5814
43f70d4c
JB
58152011-03-10 Joel Brobecker <brobecker@adacore.com>
5816
5817 * Makefile.in (maintainer-clean realclean distclean): Remove
5818 "make ... subdir_do" command.
5819
348af9f7
MS
58202011-03-10 Michael Snyder <msnyder@vmware.com>
5821
5822 * tracepoint.c (tracepoint_finish_step): Fix loop variable.
5823
5824 * server.c (handle_v_run): Free alloced buffer on early return.
5825
e637a4f5
YQ
58262011-03-09 Yao Qi <yao@codesourcery.com>
5827
5828 Revert:
5829 2011-03-04 Yao Qi <yao@codesourcery.com>
5830
5831 * Makefile.in: Remove GNU make feature --directory.
5832
5833 2011-03-05 Yao Qi <yao@codesourcery.com>
5834
5835 * Makefile.in (CLEANDIRS, REQUIRED_SUBDIRS): New variable.
5836 (subdir_do): New make target. Copied from gdb/Makefile.
5837 (maintainer-clean, realclean, distclean, clean): Call corresponding
5838 make targets in common/Makefile.
5839
5840 2011-02-11 Yao Qi <yao@codesourcery.com>
5841
5842 * configure.ac: Call AC_PROG_RANLIB.
5843 * Makefile.in: Remove signals.o from OBS. Link libcommon.a.
5844 * configure: Regenerate.
5845
e6edda56
JK
58462011-03-07 Jan Kratochvil <jan.kratochvil@redhat.com>
5847
5848 * remote-utils.c (putpkt_binary_1): Calculate BUF2 size dynamically.
5849
e5141119
JB
58502011-03-06 Yao Qi <yao@codesourcery.com>
5851
5852 * Makefile.in (REQUIRED_SUBDIRS): Remove $(LIBCOMMON_DIR).
5853
64794aa4
JB
58542011-03-05 Yao Qi <yao@codesourcery.com>
5855
5856 * Makefile.in (CLEANDIRS, REQUIRED_SUBDIRS): New variable.
5857 (subdir_do): New make target. Copied from gdb/Makefile.
5858 (maintainer-clean, realclean, distclean, clean): Call corresponding
5859 make targets in common/Makefile.
5860
7a762829
YQ
58612011-03-04 Yao Qi <yao@codesourcery.com>
5862
5863 * Makefile.in: Remove GNU make feature --directory.
5864
348af9f7
MS
58652011-03-04 Michael Snyder <msnyder@vmware.com>
5866
5867 * server.c (queue_stop_reply): Call xmalloc not malloc.
5868
58692011-03-02 Michael Snyder <msnyder@vmware.com>
5870
5871 * linux-arm-low.c (arm_arch_setup): Replace malloc with xmalloc.
5872
9f72fee2
MS
58732011-02-28 Michael Snyder <msnyder@vmware.com>
5874
588eebee
MS
5875 * tracepoint.c (cmd_qtv): Discard unused value 'packet'.
5876 (cmd_qtframe): Ditto.
5877 (cmd_qtbuffer): Ditto.
5878 (cmd_bigqtbuffer): Ditto.
5879
9f72fee2
MS
5880 * utils.c (decimal2str): Initialize 'width' to nine, then
5881 don't mess with it.
5882
8040bd49
UW
58832011-02-28 Ulrich Weigand <uweigand@de.ibm.com>
5884
5885 * hostio.c (require_data): Free *data, not data.
5886
7e52cbd0
JK
58872011-02-28 Jan Kratochvil <jan.kratochvil@redhat.com>
5888
5889 * hostio.c (require_data): Use free, not xfree.
5890
9130f83e
MS
58912011-02-27 Michael Snyder <msnyder@vmware.com>
5892
4b812f4e
MS
5893 * server.c (handle_query): Discard unused value.
5894
9130f83e
MS
5895 * hostio.c (require_data): Free malloc memory before returning
5896 error.
5897
69d37113
MS
58982011-02-26 Michael Snyder <msnyder@vmware.com>
5899
5900 * linux-low.c (list_threads): Call closedir for dirent.
5901
35f5825a
MS
59022011-02-27 Michael Snyder <msnyder@vmware.com>
5903
2a589cef
MS
5904 * i386-low.c (i386-length_and_rw_bits): Comment the fact that
5905 a case statement falls through.
5906
0adea5f7
MS
5907 * linux-low.c (linux_xfer_siginfo): Fix fencepost error.
5908
35f5825a
MS
5909 * linux-amd64-ipa.c (gdb_agent_get_raw_reg): Fix fencepost error
5910 in comparison.
5911
238f1c74
MS
59122011-02-26 Michael Snyder <msnyder@vmware.com>
5913
5914 * utils.c (decimal2str): Eliminate dead code and dead param.
5915 (pulongest): Drop dead param from call to decimal2str.
5916 (plongest): Ditto.
5917
633ff500
JB
59182011-02-24 Joel Brobecker <brobecker@adacore.com>
5919
5920 Revert the following patch (not approved yet):
5921 2011-02-21 Hui Zhu <teawater@gmail.com>
5922 * tracepoint.c (tp_printf): New function.
5923 (eval_agent_expr): Handle gdb_agent_op_printf.
5924
f9c6ff72
HZ
59252011-02-21 Hui Zhu <teawater@gmail.com>
5926
5927 * tracepoint.c (tp_printf): New function.
5928 (eval_agent_expr): Handle gdb_agent_op_printf.
5929
94d5e490
TT
59302011-02-18 Tom Tromey <tromey@redhat.com>
5931
5932 * Makefile.in (tracepoint-ipa.o): Depend on ax.def.
5933 (tracepoint.o): Likewise.
5934 * tracepoint.c (enum gdb_agent_op): Use ax.def.
5935 (gdb_agent_op_names): Likewise.
5936
c7f96d2b
TT
59372011-02-18 Tom Tromey <tromey@redhat.com>
5938
5939 * tracepoint.c (enum gdb_agent_op) <gdb_agent_op_pick,
5940 gdb_agent_op_rot>: New constants.
5941 (gdb_agent_op_names): Add pick and roll.
5942 (eval_agent_expr) <gdb_agent_op_pick, gdb_agent_op_rot>: New
5943 cases.
5944
0feedb2c
JK
59452011-02-15 Jan Kratochvil <jan.kratochvil@redhat.com>
5946
5947 * aclocal.m4: Regenerated with aclocal-1.11.1.
5948
b3b9301e
PA
59492011-02-14 Pedro Alves <pedro@codesourcery.com>
5950
5951 * server.c (handle_qxfer_traceframe_info): New.
5952 (qxfer_packets): Register "traceframe-info".
5953 (handle_query): Report support for qXfer:traceframe-info:read+.
5954 * tracepoint.c (match_blocktype): New.
5955 (traceframe_find_block_type): Rename to ...
5956 (traceframe_walk_blocks): ... this. Add callback filter argument,
5957 and use it.
5958 (traceframe_find_block_type): New, reimplemented on top of
5959 traceframe_walk_blocks.
5960 (build_traceframe_info_xml): New.
5961 (traceframe_read_info): New.
5962 * server.h (traceframe_read_info): Declare.
5963
4f3e6fb7
YQ
59642011-02-11 Yao Qi <yao@codesourcery.com>
5965
5966 * configure.ac: Call AC_PROG_RANLIB.
5967 * Makefile.in: Remove signals.o from OBS. Link libcommon.a.
5968 * configure: Regenerate.
5969
764880b7
PA
59702011-02-07 Pedro Alves <pedro@codesourcery.com>
5971
5972 * server.c (gdb_read_memory): Change return semantics to allow
5973 partial transfers.
5974 (handle_search_memory_1): Adjust.
5975 (process_serial_event) <'m' packet>: Handle partial transfers.
5976 * tracepoint.c (traceframe_read_mem): Handle partial transfers.
5977
1c79eb8a
PA
59782011-01-28 Pedro Alves <pedro@codesourcery.com>
5979
5980 * regcache.c (init_register_cache): Initialize
5981 regcache->register_status.
5982 (free_register_cache): Release regcache->register_status.
5983 (regcache_cpy): Copy register_status.
5984 (registers_to_string): Print 'x's for unavailable registers.
5985 (supply_register): Mark the register's status valid or
5986 unavailable, depending on whether a buffer was passed in or not.
5987 (supply_register_zeroed): New.
5988 (supply_regblock): Mark the registers' status valid or
5989 unavailable, depending on whether a buffer was passed in or not.
5990 * regcache.h (REG_UNAVAILABLE, REG_VALID): New defines.
5991 (struct regcache): New `register_status' field.
5992 (supply_register_zeroed): Declare.
5993 * i387-fp.c (i387_xsave_to_cache): Zero out registers using
5994 supply_register_zeroed, rather than passing a NULL buffer to
5995 supply_register.
5996 * tracepoint.c (fetch_traceframe_registers): Update comment.
5997
85724a0e
PA
59982011-01-28 Pedro Alves <pedro@codesourcery.com>
5999
6000 * i387-fp.c (i387_xsave_to_cache): Make passing NULL as register
6001 buffer explicit.
6002
d08aafef
PA
60032011-01-25 Pedro Alves <pedro@codesourcery.com>
6004
6005 * server.h (decode_xfer_write): Change prototype.
6006 * remote-utils.c (decode_xfer_write): Remove `annex' parameter,
6007 and don't extract the annex here.
6008 * server.c (decode_xfer_read): Remove `annex' parameter,
6009 and don't extract the annex here.
6010 (decode_xfer): New.
6011 (struct qxfer): New.
6012 (handle_qxfer_auxv, handle_qxfer_features, handle_qxfer_libraries)
6013 (handle_qxfer_osdata, handle_qxfer_siginfo, handle_qxfer_spu)
6014 (handle_qxfer_statictrace): New functions, abstracted out from
6015 handle_query, and made to use the struct qxfer interface.
6016 (handle_threads_qxfer_proper): Rename to ...
6017 (handle_qxfer_threads_proper): ... this.
6018 (handle_threads_qxfer): Rename to ...
6019 (handle_qxfer_threads): ... this. Adjust.
6020 (qxfer_packets): New array.
6021 (handle_qxfer): New function.
6022 (handle_query): Use handle_qxfer.
6023
493e2a69
MS
60242011-01-05 Michael Snyder <msnyder@msnyder-server.eng.vmware.com>
6025
6026 * gdbreplay.c: Shorten lines of >= 80 columns.
6027 * linux-low.c: Ditto.
6028 * linux-ppc-low.c: Ditto.
6029 * linux-s390-low.c: Ditto.
6030 * linux-sparc-low.c: Ditto.
6031 * linux-x86-low.c: Ditto.
6032 * linux-xtensa-low.c: Ditto.
6033 * mem-break.c: Ditto.
6034 * nto-low.c: Ditto.
6035 * regcache.h: Ditto.
6036 * remote-utils.c: Ditto.
6037 * server.c: Ditto.
6038 * server.h: Ditto.
6039 * thread-db.c: Ditto.
6040 * tracepoint.c: Ditto.
6041 * utils.c: Ditto.
6042 * win32-low.h: Ditto.
6043
44944448
JB
60442011-01-05 Joel Brobecker <brobecker@adacore.com>
6045
6046 * gdbserver/configure.ac, gdbserver/gdbserver.1: Copyright year
6047 update.
6048
71ce852c
JB
60492011-01-01 Joel Brobecker <brobecker@adacore.com>
6050
6051 * server.c (gdbserver_version): Update copyright year in version
6052 output.
6053 * gdbreplay.c (gdbreplay_version): Ditto.
6054
eb826dc6
MF
60552010-12-29 Jie Zhang <jie.zhang@analog.com>
6056
6057 * configure.srv (bfin-*-*linux*): Handle Blackfin/Linux targets.
6058 * linux-bfin-low.c: New file.
6059 * linux-low.c: Define PT_TEXT_ADDR, PT_TEXT_END_ADDR, and
6060 PT_DATA_ADDR for BFIN targets.
6061 * Makefile.in (SFILES): Add linux-bfin-low.c.
6062 (clean): Remove reg-bfin.c.
6063 (linux-bfin-low.o, reg-bfin.o, reg-bfin.c): New targets.
6064 * README: Mention supported Blackfin targets.
6065
39ab222a
MF
60662010-12-23 Mike Frysinger <vapier@gentoo.org>
6067
6068 * .gitignore: New file.
6069
a1f2ce7d
MF
60702010-11-16 Mike Frysinger <vapier@gentoo.org>
6071
6072 * linux-low.c (linux_tracefork_child): Add char* cast to arg.
6073
f474844c
JZ
60742010-10-22 Jie Zhang <jie@codesourcery.com>
6075
6076 * Makefile.in: Add FLAGS_TO_PASS variable.
6077 (install): Remove dependency of install-only and recursively
6078 invoke make for install-only.
6079
f1048712
DE
60802010-10-04 Doug Evans <dje@google.com>
6081
6082 * Makefile.in (uninstall): Use $(DESTDIR).
6083
b53a1623
PA
60842010-09-24 Pedro Alves <pedro@codesourcery.com>
6085
e6ee044d
PA
6086 PR gdb/11842
6087
b53a1623
PA
6088 * linux-x86-low.c (compat_siginfo_from_siginfo)
6089 (siginfo_from_compat_siginfo): Also copy si_pid and si_uid when
6090 si_code is < 0. Check for si_code == SI_TIMER before checking for
6091 si_code < 0.
6092
fa1bd1e4
JB
60932010-09-13 Joel Brobecker <brobecker@adacore.com>
6094
6095 * lynx-i386-low.c: New file.
6096 * configure.srv: Add handling of i[34567]86-*-lynxos* targets.
6097
47fac8f8
JB
60982010-09-13 Joel Brobecker <brobecker@adacore.com>
6099
6100 * lynx-low.c (ptrace_request_to_str): Remove handling for
6101 request values that have been removed in LynxOS 5.x.
6102
1adfc54d
JB
61032010-09-13 Joel Brobecker <brobecker@adacore.com>
6104
6105 * lynx-low.c, lynx-ppc-loc.c: Include <sys/ptrace.h> instead of
6106 <ptrace.h>
6107
c2a66c29
NS
61082010-09-09 Nathan Sidwell <nathan@codesourcery.com>
6109
6110 * configure.ac: Add --enable-inprocess-agent option.
6111 * configure: Rebuilt.
6112
32fcada3
YQ
61132010-09-06 Yao Qi <yao@codesourcery.com>
6114
6115 * linux-low.c (linux_kill): Remove unused variable.
6116 (linux_stabilize_threads): Likewise.
6117 * server.c (start_inferior): Likewise.
6118 (queue_stop_reply_callback): Likewise.
6119 * tracepoint.c (do_action_at_tracepoint): Likewise.
6120
0cccb683
YQ
61212010-09-06 Yao Qi <yao@codesourcery.com>
6122
6123 * linux-low.c (maybe_move_out_of_jump_pad): Restore current_inferior
6124 on return.
6125
423ec54c
JK
61262010-09-06 Jan Kratochvil <jan.kratochvil@redhat.com>
6127
6128 * target.c (mywait) <TARGET_WAITKIND_EXITED>: Fix to use INTEGER.
6129
12ac6819
PA
61302010-09-06 Pedro Alves <pedro@codesourcery.com>
6131
6132 * Makefile.in (install-only): Replace $IPA_DEPFILES with
6133 "$(IPA_DEPFILES)".
6134
8ed54b31
JB
61352010-09-01 Joel Brobecker <brobecker@adacore.com>
6136
6137 * gdbserver/lynx-low.c, gdbserver/lynx-low.h,
6138 gdbserver/lynx-ppc-low.c: New files.
6139 * Makefile.in (lynx_low_h): New variable.
6140 (lynx-low.o, lynx-ppc-low.o): New rules.
6141 * configure.ac: On LynxOS, link with -lnetinet.
6142 * configure.srv: Add handling of powerpc-*-lynxos* targets.
6143 * configure: regenerate.
6144
bb0116a4
JB
61452010-09-01 Joel Brobecker <brobecker@adacore.com>
6146
6147 * Makefile.in (vasprintf.o, vsnprintf.o): New rules.
6148 * configure.ac: Add check for vasprintf and vsnprintf.
6149 * configure, config.in: Regenerate.
6150 * server.h (vasprintf, vsnprintf): Add conditional declarations.
6151
a778ab81 61522010-09-01 Joel Brobecker <brobecker@adacore.com>
6153
6154 * gdbreplay.c: Move include of alloca.h up, next to include of
6155 malloc.h.
6156 * server.h: Add include of malloc.h.
6157 * mem-break.c: Remove include of malloc.h.
6158 * server.c, tracepoint.c, utils.c, win32-low.c: Likewise.
6159
8b034a19 61602010-09-01 Joel Brobecker <brobecker@adacore.com>
6161
6162 * Makefile.in (memmem.o): Build with -Wno-error.
6163
61642010-09-01 Joel Brobecker <brobecker@adacore.com>
6165
6166 * utils.c (xsnprintf): Make non-static.
6167 * server.h: Add xsnprintf declaration.
6168 * linux-low.c, nto-low.c, target.c, thread-db.c, tracepoint.c:
6169 replace calls to snprintf by calls to xsnprintf throughout.
6170
61712010-09-01 Joel Brobecker <brobecker@adacore.com>
6172
6173 * configure.ac: Add configure check for alloca.
6174 * configure, config.in: Regenerate.
6175 * server.h: Include alloca.h if it exists.
6176 * gdbreplay.c: Include alloca.h if it exists.
6177
1a981360
PA
61782010-08-28 Pedro Alves <pedro@codesourcery.com>
6179
6180 * linux-low.c (__SIGRTMIN): Define if not already defined.
6181 (linux_create_inferior): Check for __ANDROID__ rather than
6182 __SIGRTMIN.
6183 (enqueue_one_deferred_signal): Don't requeue non-RT signals that
6184 are already deferred.
6185 (linux_wait_1): Check for __ANDROID__ rather than __SIGRTMIN.
6186 (linux_resume_one_thread): Don't queue a SIGSTOP if the lwp is
6187 stopped and already has a pending signal to report.
6188 (proceed_one_lwp): : Don't queue a SIGSTOP if the lwp already has
6189 a pending signal to report or is moving out of a jump pad.
6190 (linux_init_signals): Check for __ANDROID__ rather than
6191 __SIGRTMIN.
6192
b4d51a55
PA
61932010-08-28 Pedro Alves <pedro@codesourcery.com>
6194
6195 * linux-low.c (linux_stabilize_threads): Wrap debug output in a
6196 debug_threads check. Avoid a linear search when not doing debug
6197 output.
6198
ec48365d
PA
61992010-08-27 Pedro Alves <pedro@codesourcery.com>
6200
6201 * event-loop.c (event_handle_func): Adjust to use gdb_fildes_t.
6202 (struct gdb_event) <fd>: Change type to gdb_fildes_t.
6203 (struct file_handler) <fd>: Change type to gdb_fildes_t.
6204 (process_event): Change local fd's type to gdb_fildes_t.
6205 (create_file_handler): Adjust prototype.
6206 (delete_file_handler): Adjust prototype.
6207 (handle_file_event): Adjust prototype. Use pfildes.
6208 (create_file_event): Adjsut prototype.
6209 * remote-utils.c (remote_desc, listen_desc): Change type to
6210 gdb_fildes_t.
6211 * server.h: New gdb_fildes_t typedef.
6212 [USE_WIN32API]: Include winsock2.h.
6213 (delete_file_handler, add_file_handler): Adjust prototypes.
6214 (pfildes): Declare.
6215 * utils.c (pfildes): New.
6216
854d88f0
PA
62172010-08-27 Pedro Alves <pedro@codesourcery.com>
6218
6219 * configure.ac (build_warnings): Add -Wno-char-subscripts.
6220 * configure: Regenerate.
6221
0146f85b
PA
62222010-08-27 Pedro Alves <pedro@codesourcery.com>
6223
6224 * linux-low.c (linux_unprepare_to_access_memory): Rename to ...
6225 (linux_done_accessing_memory): ... this.
6226 (linux_target_ops): Adjust.
6227 * linux-x86-low.c (x86_insert_point, x86_remove_point): Adjust.
6228 * nto-low.c (nto_target_ops): Adjust comment.
6229 * server.c (gdb_read_memory, gdb_write_memory): Adjust.
6230 * spu-low.c (spu_target_ops): Adjust comment.
6231 * target.h (target_ops): Rename unprepare_to_access_memory field
6232 to done_accessing_memory.
6233 (unprepare_to_access_memory): Rename to ...
6234 (done_accessing_memory): ... this.
6235
90d74c30
PA
62362010-08-26 Pedro Alves <pedro@codesourcery.com>
6237
6238 * linux-low.c (linux_prepare_to_access_memory): New.
6239 (linux_unprepare_to_access_memory): New.
6240 (linux_target_ops): Install them.
6241 * server.c (read_memory): Rename to ...
6242 (gdb_read_memory): ... this. Use
6243 prepare_to_access_memory/prepare_to_access_memory.
6244 (write_memory): Rename to ...
6245 (gdb_write_memory): ... this. Use
6246 prepare_to_access_memory/prepare_to_access_memory.
6247 (handle_search_memory_1): Adjust.
6248 (process_serial_event): Adjust.
6249 * target.h (struct target_ops): New fields
6250 prepare_to_access_memory and unprepare_to_access_memory.
6251 (prepare_to_access_memory, unprepare_to_access_memory): New.
6252 * linux-x86-low.c (x86_insert_point, x86_remove_point): Use
6253 prepare_to_access_memory/prepare_to_access_memory.
6254 * nto-low.c (nto_target_ops): Adjust.
6255 * spu-low.c (spu_target_ops): Adjust.
6256 * win32-low.c (win32_target_ops): Adjust.
6257
fd467969
PA
62582010-08-26 Pedro Alves <pedro@codesourcery.com>
6259
6260 * Makefile.in (WARN_CFLAGS): Get it from configure.
6261 (WERROR_CFLAGS): New.
6262 (INTERNAL_CFLAGS): Add WERROR_CFLAGS.
6263 * configure.ac: Introduce --enable-werror, which adds -Werror to
6264 the compiler command line. Enabled by default. Disable with
6265 --disable-werror. Add -Wdeclaration-after-statement
6266 Wpointer-arith and -Wformat-nonliteral to warning flags.
6267 * configure: Regenerate.
6268
331e2f5f
PA
62692010-08-26 Pedro Alves <pedro@codesourcery.com>
6270
6271 * mem-break.c [HAVE_MALLOC_H]: Include malloc.h.
6272
e581f2b4
PA
62732010-08-26 Pedro Alves <pedro@codesourcery.com>
6274
6275 * gdbreplay.c (remote_error): New.
6276 (gdbchar): New.
6277 (expect): Use gdbchar. Check for error reading from GDB.
6278 Clarify sync error output.
6279 (play): Check for errors writing to GDB.
6280 * linux-low.c (sigchld_handler): Really ignore `write' errors.
6281 * remote-utils.c (getpkt): Check for errors writing to the remote
6282 descriptor.
6283
3c11dd79
PA
62842010-08-25 Pedro Alves <pedro@codesourcery.com>
6285
6286 * linux-low.c (linux_wait_1): Move non-debugging code out of
6287 `debug_threads' control.
6288
d20a8ad9
PA
62892010-08-25 Pedro Alves <pedro@codesourcery.com>
6290
6291 * linux-low.c (linux_wait_1): Don't set last_status here.
6292 * server.c (push_event, queue_stop_reply_callback): Assert we're
6293 not pushing a TARGET_WAITKIND_IGNORE event.
6294 (start_inferior, start_inferior, attach_inferior, handle_v_cont)
6295 (myresume, handle_target_event): Set the thread's last_resume_kind
6296 and last_status from the target returned status.
6297
964e4306
PA
62982010-08-25 Pedro Alves <pedro@codesourcery.com>
6299
6300 PR threads/10729
6301
6302 * linux-x86-low.c (update_debug_registers_callback): New.
6303 (i386_dr_low_set_addr): Use it.
6304 (i386_dr_low_get_addr): New.
6305 (i386_dr_low_set_control): Use update_debug_registers_callback.
6306 (i386_dr_low_get_control): New.
6307 (i386_dr_low_get_status): Adjust.
6308 * linux-low.c (linux_stop_lwp): New.
6309 * linux-low.h (linux_stop_lwp): Declare.
6310
6311 * i386-low.c (I386_DR_GET_RW_LEN): Take the dr7 contents as
6312 argument instead of a i386_debug_reg_state.
6313 (I386_DR_WATCH_HIT): Take the dr6 contents as argument instead of
6314 a i386_debug_reg_state.
6315 (i386_insert_aligned_watchpoint): Adjust.
6316 (i386_remove_aligned_watchpoint): Adjust.
6317 (i386_low_stopped_data_address): Read the debug registers from the
6318 inferior instead of from the mirrors.
6319 * i386-low.h (struct i386_debug_reg_state): Extend comment.
6320 (i386_dr_low_get_addr): Declare.
6321 (i386_dr_low_get_control): Declare.
6322 (i386_dr_low_get_status): Change prototype.
6323
6324 * win32-i386-low.c (dr_status_mirror, dr_control_mirror): New globals.
6325 (i386_dr_low_get_addr): New.
6326 (i386_dr_low_get_control): New.
6327 (i386_dr_low_get_status): Adjust prototype. Return
6328 dr_status_mirror.
6329 (i386_initial_stuff): Clear dr_status_mirror and
6330 dr_control_mirror.
6331 (i386_get_thread_context): Adjust.
6332 (i386_set_thread_context): Adjust.
6333 (i386_thread_added): Adjust.
6334
5f21a75b
PA
63352010-08-24 Pedro Alves <pedro@codesourcery.com>
6336
6337 * linux-low.h (linux_thread_area): Delete declaration.
6338
3e4c1235
TS
63392010-08-11 Thomas Schwinge <thomas@codesourcery.com>
6340
6341 * linux-low.c (linux_wait_1): Correctly return the ptid of the child
6342 after its termination.
6343
1971b033
PA
63442010-08-09 Pedro Alves <pedro@codesourcery.com>
6345
6346 * linux-low.c (gdb_wants_lwp_stopped): Delete.
6347 (gdb_wants_all_stopped): Delete.
6348 (linux_wait_1): Don't call them.
6349 * server.c (handle_v_cont): Tag all threads as want-stopped.
6350 (gdb_wants_thread_stopped): Fix comments. Tag the thread that
6351 stopped as "client-wants-stopped".
6352
310444ac
PA
63532010-07-31 Pedro Alves <pedro@codesourcery.com>
6354
6355 * Makefile.in (signals_h): New.
6356 (server_h): Depend on it.
6357 (server.o): Don't depend on $(signals_def).
6358 (signals.o): Depend on $(signals_def).
6359
a19cae16
JK
63602010-07-31 Jan Kratochvil <jan.kratochvil@redhat.com>
6361
6362 * Makefile.in (signals_def): New.
6363 (server_h): Append include/gdb/signals.h and signals_def.
6364 (server.o): Append signals_def.
6365
30d50328
JK
63662010-07-25 Jan Kratochvil <jan.kratochvil@redhat.com>
6367
6368 * server.c (handle_target_event): Use target_signal_to_host for
6369 resume_info.sig initialization.
6370 * target.h (struct thread_resume) <sig>: New comment.
6371
5c3216e2
OS
63722010-07-20 Ozkan Sezer <sezeroz@gmail.com>
6373
c6f46ca0
OS
6374 * server.c (handle_query): strcpy() the returned string from paddress()
6375 instead of sprintf().
5c3216e2
OS
6376 * utils.c (paddress): Return phex_nz().
6377
6bd31874
JB
63782010-07-07 Joel Brobecker <brobecker@adacore.com>
6379
6380 * server.c (handle_v_cont): Call mourn_inferior if process
6381 just exited.
6382 (myresume): Likewise.
6383
0fb4aa4b
PA
63842010-07-01 Pedro Alves <pedro@codesourcery.com>
6385
6386 Static tracepoints, and integration with UST.
6387
6388 * configure.ac: Handle --with-ust. substitute ustlibs and ustinc.
6389 * mem-break.c (uninsert_all_breakpoints)
6390 (reinsert_all_breakpoints): New.
6391 * mem-break.h (reinsert_all_breakpoints, uninsert_all_breakpoints):
6392 * tracepoint.c (ust_loaded, helper_thread_id, cmd_buf): New.
6393 (gdb_agent_ust_loaded, helper_thread_id)
6394 (gdb_agent_helper_thread_id): New macros.
6395 (struct ipa_sym_addresses): Add addr_ust_loaded,
6396 addr_helper_thread_id, addr_cmd_buf.
6397 (symbol_list): Add ust_loaded, helper_thread_id, cmd_buf.
6398 (in_process_agent_loaded_ust): New.
6399 (write_e_ust_not_loaded): New.
6400 (maybe_write_ipa_ust_not_loaded): New.
6401 (struct collect_static_trace_data_action): New.
6402 (enum tracepoint_type) <static_tracepoint>: New.
6403 (struct tracepoint) <handle>: Mention static tracepoints.
6404 (struct static_tracepoint_ctx): New.
6405 (CMD_BUF_SIZE): New.
6406 (add_tracepoint_action): Handle static tracepoint actions.
6407 (unprobe_marker_at): New.
6408 (clear_installed_tracepoints): Handle static tracepoints.
6409 (cmd_qtdp): Handle static tracepoints.
6410 (probe_marker_at): New.
6411 (cmd_qtstart): Handle static tracepoints.
6412 (response_tracepoint): Handle static tracepoints.
6413 (cmd_qtfstm, cmd_qtsstm, cmd_qtstmat): New.
6414 (handle_tracepoint_query): Handle qTfSTM, qTsSTM and qTSTMat.
6415 (get_context_regcache): Handle static tracepoints.
6416 (do_action_at_tracepoint): Handle static tracepoint actions.
6417 (traceframe_find_block_type): Handle static trace data blocks.
6418 (traceframe_read_sdata): New.
6419 (download_tracepoints): Download static tracepoint actions.
6420 [HAVE_UST] Include ust/ust.h, dlfcn.h, sys/socket.h, and sys/un.h.
6421 (GDB_PROBE_NAME): New.
6422 (ust_ops): New.
6423 (GET_UST_SYM): New.
6424 (USTF): New.
6425 (dlsym_ust): New.
6426 (ust_marker_to_static_tracepoint): New.
6427 (gdb_probe): New.
6428 (collect_ust_data_at_tracepoint): New.
6429 (gdb_ust_probe): New.
6430 (UNIX_PATH_MAX, SOCK_DIR): New.
6431 (gdb_ust_connect_sync_socket): New.
6432 (resume_thread, stop_thread): New.
6433 (run_inferior_command): New.
6434 (init_named_socket): New.
6435 (gdb_ust_socket_init): New.
6436 (cstr_to_hexstr): New.
6437 (next_st): New.
6438 (first_marker, next_marker): New.
6439 (response_ust_marker): New.
6440 (cmd_qtfstm, cmd_qtsstm): New.
6441 (unprobe_marker_at, probe_marker_at): New.
6442 (cmd_qtstmat, gdb_ust_thread): New.
6443 (gdb_ust_init): New.
6444 (initialize_tracepoint_ftlib): Call gdb_ust_init.
6445 * linux-amd64-ipa.c [HAVE_UST]: Include ust/processor.h
6446 (ST_REGENTRY): New.
6447 (x86_64_st_collect_regmap): New.
6448 (X86_64_NUM_ST_COLLECT_GREGS): New.
6449 (AMD64_RIP_REGNUM): New.
6450 (supply_static_tracepoint_registers): New.
6451 * linux-i386-ipa.c [HAVE_UST]: Include ust/processor.h
6452 (ST_REGENTRY): New.
6453 (i386_st_collect_regmap): New.
6454 (i386_NUM_ST_COLLECT_GREGS): New.
6455 (supply_static_tracepoint_registers): New.
6456 * server.c (handle_query): Handle qXfer:statictrace:read.
6457 <qSupported>: Report support for StaticTracepoints, and
6458 qXfer:statictrace:read features.
6459 * server.h (traceframe_read_sdata)
6460 (supply_static_tracepoint_registers): Declare.
6461 * remote-utils.c (convert_int_to_ascii, hexchars, ishex, tohex)
6462 (unpack_varlen_hex): Include in IPA build.
6463 * Makefile.in (ustlibs, ustinc): New.
6464 (IPA_OBJS): Add remote-utils-ipa.o.
6465 ($(IPA_LIB)): Link -ldl and -lpthread.
6466 (UST_CFLAGS): New.
6467 (IPAGENT_CFLAGS): Add UST_CFLAGS.
6468 * config.in, configure: Regenerate.
6469
9e4344e5
PA
64702010-06-20 Ian Lance Taylor <iant@google.com>
6471 Pedro Alves <pedro@codesourcery.com>
6472
6473 * linux-x86-low.c (always_true): Delete.
6474 (EMIT_ASM, EMIT_ASM32): Use an uncondition asm jmp instead of
6475 trying to fool the compiler with always_true.
6476
c6beb2cb
PA
64772010-06-20 Pedro Alves <pedro@codesourcery.com>
6478
6479 * tracepoint.c (condition_true_at_tracepoint): Don't run compiled
6480 conditions in gdbserver.
6481
d2ed6730
UW
64822010-06-19 Ulrich Weigand <uweigand@de.ibm.com>
6483
6484 * spu-low.c (spu_read_memory): Wrap around local store limit.
6485 (spu_write_memory): Likewise.
6486
4e29fb54
PA
64872010-06-15 Pedro Alves <pedro@codesourcery.com>
6488
6489 * linux-x86-low.c (amd64_emit_const, amd64_emit_void_call_2)
6490 (i386_emit_const, i386_emit_void_call_2): Replace int64_t uses with
6491 LONGEST uses.
6492 * server.h (struct emit_ops): Replace int64_t uses with LONGEST
6493 uses.
6494 * tracepoint.c (emit_const, emit_void_call_2): Replace int64_t
6495 uses with LONGEST uses.
6496
6a271cae
PA
64972010-06-14 Stan Shebs <stan@codesourcery.com>
6498 Pedro Alves <pedro@codesourcery.com>
6499
6500 Bytecode compiler.
6501
6502 * linux-x86-low.c: Include limits.h.
6503 (add_insns): New.
6504 (always_true): New.
6505 (EMIT_ASM): New.
6506 (EMIT_ASM32): New.
6507 (amd64_emit_prologue, amd64_emit_epilogue, amd64_emit_add)
6508 (amd64_emit_sub, amd64_emit_mul, amd64_emit_lsh)
6509 (amd64_emit_rsh_signed, amd64_emit_rsh_unsigned, amd64_emit_ext,
6510 (amd64_emit_log_not, amd64_emit_bit_and, amd64_emit_bit_or)
6511 (amd64_emit_bit_xor, amd64_emit_bit_not, amd64_emit_equal,
6512 (amd64_emit_less_signed, amd64_emit_less_unsigned, amd64_emit_ref,
6513 (amd64_emit_if_goto, amd64_emit_goto, amd64_write_goto_address)
6514 (amd64_emit_const, amd64_emit_call, amd64_emit_reg)
6515 (amd64_emit_pop, amd64_emit_stack_flush, amd64_emit_zero_ext)
6516 (amd64_emit_swap, amd64_emit_stack_adjust, amd64_emit_int_call_1)
6517 (amd64_emit_void_call_2): New.
6518 (amd64_emit_ops): New.
6519 (i386_emit_prologue, i386_emit_epilogue, i386_emit_add)
6520 (i386_emit_sub,i386_emit_mul, i386_emit_lsh, i386_emit_rsh_signed)
6521 (i386_emit_rsh_unsigned, i386_emit_ext, i386_emit_log_not)
6522 (i386_emit_bit_and, i386_emit_bit_or, i386_emit_bit_xor)
6523 (i386_emit_bit_not, i386_emit_equal, i386_emit_less_signed)
6524 (i386_emit_less_unsigned, i386_emit_ref, i386_emit_if_goto)
6525 (i386_emit_goto, i386_write_goto_address, i386_emit_const)
6526 (i386_emit_call, i386_emit_reg, i386_emit_pop)
6527 (i386_emit_stack_flush, i386_emit_zero_ext, i386_emit_swap)
6528 (i386_emit_stack_adjust, i386_emit_int_call_1)
6529 (i386_emit_void_call_2): New.
6530 (i386_emit_ops): New.
6531 (x86_emit_ops): New.
6532 (the_low_target): Install x86_emit_ops.
6533 * server.h (struct emit_ops): New.
6534 (get_raw_reg_func_addr): Declare.
6535 (current_insn_ptr, emit_error): Declare.
6536 * tracepoint.c (get_raw_reg, get_trace_state_variable_value)
6537 (set_trace_state_variable_value): New defines.
6538 (struct ipa_sym_addresses): New fields addr_get_raw_reg,
6539 addr_get_trace_state_variable_value and
6540 addr_set_trace_state_variable_value.
6541 (symbol_list): New fields for get_raw_reg,
6542 get_trace_state_variable_value and set_trace_state_variable_value.
6543 (condfn): New typedef.
6544 (struct tracepoint): New field `compiled_cond'.
6545 (do_action_at_tracepoint): Clear compiled_cond.
6546 (get_trace_state_variable_value, set_trace_state_variable_value):
6547 Export in the IPA.
6548 (condition_true_at_tracepoint): If there's a compiled condition,
6549 run that.
6550 (current_insn_ptr, emit_error): New globals.
6551 (struct bytecode_address): New.
6552 (get_raw_reg_func_addr): New.
6553 (emit_prologue, emit_epilogue, emit_add, emit_sub, emit_mul)
6554 (emit_lsh, emit_rsh_signed, emit_rsh_unsigned, emit_ext)
6555 (emit_log_not, emit_bit_and, emit_bit_or, emit_bit_xor)
6556 (emit_bit_not, emit_equal, emit_less_signed, emit_less_unsigned)
6557 (emit_ref, emit_if_goto, emit_goto, write_goto_address, emit_const)
6558 (emit_reg, emit_pop, emit_stack_flush, emit_zero_ext, emit_swap)
6559 (emit_stack_adjust, emit_int_call_1, emit_void_call_2): New.
6560 (compile_tracepoint_condition, compile_bytecodes): New.
6561 * target.h (emit_ops): Forward declare.
6562 (struct target_ops): New field emit_ops.
6563 (target_emit_ops): New.
6564 * linux-amd64-ipa.c (gdb_agent_get_raw_reg): New.
6565 * linux-i386-ipa.c (gdb_agent_get_raw_reg): New.
6566 * linux-low.c (linux_emit_ops): New.
6567 (linux_target_ops): Install it.
6568 * linux-low.h (struct linux_target_ops): New field emit_ops.
6569
92b72907
UW
65702010-06-14 Ulrich Weigand <uweigand@de.ibm.com>
6571
6572 * linux-ppc-low.c (ppc_arch_setup): Use private regcache to test MSR.
6573 * linux-s390-low.c (ppc_arch_setup): Use private regcache to test PSW.
6574
fa593d66
PA
65752010-06-01 Pedro Alves <pedro@codesourcery.com>
6576 Stan Shebs <stan@codesourcery.com>
6577
6578 * Makefile.in (IPA_DEPFILES, extra_libraries): New.
6579 (all): Depend on $(extra_libraries).
6580 (install-only): Install the IPA.
6581 (IPA_OBJS, IPA_LIB): New.
6582 (clean): Remove the IPA lib.
6583 (IPAGENT_CFLAGS): New.
6584 (tracepoint-ipa.o, utils-ipa.o, remote-utils-ipa.o)
6585 (regcache-ipa.o, i386-linux-ipa.o, linux-i386-ipa.o)
6586 (linux-amd64-ipa.o, amd64-linux-ipa.o): New rules.
6587 * linux-amd64-ipa.c, linux-i386-ipa.c: New files.
6588 * configure.ac: Check for atomic builtins support in the compiler.
6589 (IPA_DEPFILES, extra_libraries): Define.
6590 * configure.srv (ipa_obj): Add description.
6591 (ipa_i386_linux_regobj, ipa_amd64_linux_regobj): Define.
6592 (i[34567]86-*-linux*): Set ipa_obj.
6593 (x86_64-*-linux*): Set ipa_obj.
6594 * linux-low.c (stabilizing_threads): New.
6595 (supports_fast_tracepoints): New.
6596 (linux_detach): Stabilize threads before detaching.
6597 (handle_tracepoints): Handle internal tracing breakpoints. Assert
6598 the lwp is either not stabilizing, or is moving out of a jump pad.
6599 (linux_fast_tracepoint_collecting): New.
6600 (maybe_move_out_of_jump_pad): New.
6601 (enqueue_one_deferred_signal): New.
6602 (dequeue_one_deferred_signal): New.
6603 (linux_wait_for_event_1): If moving out of a jump pad, defer
6604 pending signals to later.
6605 (linux_stabilize_threads): New.
6606 (linux_wait_1): Check if threads need moving out of jump pads, and
6607 do it if so.
6608 (stuck_in_jump_pad_callback): New.
6609 (move_out_of_jump_pad_callback): New.
6610 (lwp_running): New.
6611 (linux_resume_one_lwp): Handle moving out of jump pads.
6612 (linux_set_resume_request): Dequeue deferred signals.
6613 (need_step_over_p): Also step over fast tracepoint jumps.
6614 (start_step_over): Also uninsert fast tracepoint jumps.
6615 (finish_step_over): Also reinsert fast tracepoint jumps.
6616 (linux_install_fast_tracepoint_jump): New.
6617 (linux_target_ops): Install linux_stabilize_threads and
6618 linux_install_fast_tracepoint_jump_pad.
6619 * linux-low.h (linux_target_ops) <get_thread_area,
6620 install_fast_tracepoint_jump_pad>: New fields.
6621 (struct lwp_info) <collecting_fast_tracepoint,
6622 pending_signals_to_report, exit_jump_pad_bkpt>: New fields.
6623 (linux_get_thread_area): Declare.
6624 * linux-x86-low.c (jump_insn): New.
6625 (x86_get_thread_area): New.
6626 (append_insns): New.
6627 (push_opcode): New.
6628 (amd64_install_fast_tracepoint_jump_pad): New.
6629 (i386_install_fast_tracepoint_jump_pad): New.
6630 (x86_install_fast_tracepoint_jump_pad): New.
6631 (the_low_target): Install x86_get_thread_area and
6632 x86_install_fast_tracepoint_jump_pad.
6633 * mem-break.c (set_raw_breakpoint_at): Use read_inferior_memory.
6634 (struct fast_tracepoint_jump): New.
6635 (fast_tracepoint_jump_insn): New.
6636 (fast_tracepoint_jump_shadow): New.
6637 (find_fast_tracepoint_jump_at): New.
6638 (fast_tracepoint_jump_here): New.
6639 (delete_fast_tracepoint_jump): New.
6640 (set_fast_tracepoint_jump): New.
6641 (uninsert_fast_tracepoint_jumps_at): New.
6642 (reinsert_fast_tracepoint_jumps_at): New.
6643 (set_breakpoint_at): Use write_inferior_memory.
6644 (uninsert_raw_breakpoint): Use write_inferior_memory.
6645 (check_mem_read): Mask out fast tracepoint jumps.
6646 (check_mem_write): Mask out fast tracepoint jumps.
6647 * mem-break.h (struct fast_tracepoint_jump): Forward declare.
6648 (set_fast_tracepoint_jump): Declare.
6649 (delete_fast_tracepoint_jump)
6650 (fast_tracepoint_jump_here, uninsert_fast_tracepoint_jumps_at)
6651 (reinsert_fast_tracepoint_jumps_at): Declare.
6652 * regcache.c: Don't compile many functions when building the
6653 in-process agent library.
6654 (init_register_cache) [IN_PROCESS_AGENT]: Don't allow allocating
6655 the register buffer in the heap.
6656 (free_register_cache): If the register buffer isn't owned by the
6657 regcache, don't free it.
6658 (set_register_cache) [IN_PROCESS_AGENT]: Don't re-alocate
6659 pre-existing register caches.
6660 * remote-utils.c (convert_int_to_ascii): Constify `from' parameter
6661 type.
6662 (convert_ascii_to_int): : Constify `from' parameter type.
6663 (decode_M_packet, decode_X_packet): Replace the `to' parameter by
6664 a `to_p' pointer to pointer parameter. If TO_P is NULL, malloc
6665 the needed buffer in-place.
6666 (relocate_instruction): New.
6667 * server.c (handle_query) <qSymbols>: If the target supports
6668 tracepoints, give it a chance of looking up symbols. Report
6669 support for fast tracepoints.
6670 (handle_status): Stabilize threads.
6671 (process_serial_event): Adjust.
6672 * server.h (struct fast_tracepoint_jump): Forward declare.
6673 (struct process_info) <fast_tracepoint_jumps>: New field.
6674 (convert_ascii_to_int, convert_int_to_ascii): Adjust.
6675 (decode_X_packet, decode_M_packet): Adjust.
6676 (relocate_instruction): Declare.
6677 (in_process_agent_loaded): Declare.
6678 (tracepoint_look_up_symbols): Declare.
6679 (struct fast_tpoint_collect_status): Declare.
6680 (fast_tracepoint_collecting): Declare.
6681 (force_unlock_trace_buffer): Declare.
6682 (handle_tracepoint_bkpts): Declare.
6683 (initialize_low_tracepoint)
6684 (supply_fast_tracepoint_registers) [IN_PROCESS_AGENT]: Declare.
6685 * target.h (struct target_ops) <stabilize_threads,
6686 install_fast_tracepoint_jump_pad>: New fields.
6687 (stabilize_threads, install_fast_tracepoint_jump_pad): New.
6688 * tracepoint.c [HAVE_MALLOC_H]: Include malloc.h.
6689 [HAVE_STDINT_H]: Include stdint.h.
6690 (trace_debug_1): Rename to ...
6691 (trace_vdebug): ... this.
6692 (trace_debug): Rename to ...
6693 (trace_debug_1): ... this. Add `level' parameter.
6694 (trace_debug): New.
6695 (ATTR_USED, ATTR_NOINLINE): New.
6696 (IP_AGENT_EXPORT): New.
6697 (gdb_tp_heap_buffer, gdb_jump_pad_buffer, gdb_jump_pad_buffer_end)
6698 (collecting, gdb_collect, stop_tracing, flush_trace_buffer)
6699 (about_to_request_buffer_space, trace_buffer_is_full)
6700 (stopping_tracepoint, expr_eval_result, error_tracepoint)
6701 (tracepoints, tracing, trace_buffer_ctrl, trace_buffer_ctrl_curr)
6702 (trace_buffer_lo, trace_buffer_hi, traceframe_read_count)
6703 (traceframe_write_count, traceframes_created)
6704 (trace_state_variables)
6705 New renaming defines.
6706 (struct ipa_sym_addresses): New.
6707 (STRINGIZE_1, STRINGIZE, IPA_SYM): New.
6708 (symbol_list): New.
6709 (ipa_sym_addrs): New.
6710 (all_tracepoint_symbols_looked_up): New.
6711 (in_process_agent_loaded): New.
6712 (write_e_ipa_not_loaded): New.
6713 (maybe_write_ipa_not_loaded): New.
6714 (tracepoint_look_up_symbols): New.
6715 (debug_threads) [IN_PROCESS_AGENT]: New.
6716 (read_inferior_memory) [IN_PROCESS_AGENT]: New.
6717 (UNKNOWN_SIDE_EFFECTS): New.
6718 (stop_tracing): New.
6719 (flush_trace_buffer): New.
6720 (stop_tracing_bkpt): New.
6721 (flush_trace_buffer_bkpt): New.
6722 (read_inferior_integer): New.
6723 (read_inferior_uinteger): New.
6724 (read_inferior_data_pointer): New.
6725 (write_inferior_data_pointer): New.
6726 (write_inferior_integer): New.
6727 (write_inferior_uinteger): New.
6728 (struct collect_static_trace_data_action): Delete.
6729 (enum tracepoint_type): New.
6730 (struct tracepoint) <type>: New field `type'.
43aaf8b6
PA
6731 <actions_str, step_actions, step_actions_str>: Only include in
6732 GDBserver.
fa593d66
PA
6733 <orig_size, obj_addr_on_target, adjusted_insn_addr>
6734 <adjusted_insn_addr_end, jump_pad, jump_pad_end>: New fields.
6735 (tracepoints): Use IP_AGENT_EXPORT.
6736 (last_tracepoint): Don't include in the IPA.
6737 (stopping_tracepoint): Use IP_AGENT_EXPORT.
6738 (trace_buffer_is_full): Use IP_AGENT_EXPORT.
6739 (alloced_trace_state_variables): New.
6740 (trace_state_variables): Use IP_AGENT_EXPORT.
6741 (traceframe_t): Delete unused variable.
6742 (circular_trace_buffer): Don't include in the IPA.
6743 (trace_buffer_start): Delete.
6744 (struct trace_buffer_control): New.
6745 (trace_buffer_free): Delete.
6746 (struct ipa_trace_buffer_control): New.
6747 (GDBSERVER_FLUSH_COUNT_MASK, GDBSERVER_FLUSH_COUNT_MASK_PREV)
6748 (GDBSERVER_FLUSH_COUNT_MASK_CURR, GDBSERVER_UPDATED_FLUSH_COUNT_BIT):
6749 New.
6750 (trace_buffer_ctrl): New.
6751 (TRACE_BUFFER_CTRL_CURR): New.
6752 (trace_buffer_start, trace_buffer_free, trace_buffer_end_free):
6753 Reimplement as macros.
6754 (trace_buffer_wrap): Delete.
6755 (traceframe_write_count, traceframe_read_count)
6756 (traceframes_created, tracing): Use IP_AGENT_EXPORT.
6757 (struct tracepoint_hit_ctx) <type>: New field.
6758 (struct fast_tracepoint_ctx): New.
6759 (memory_barrier): New.
6760 (cmpxchg): New.
6761 (record_tracepoint_error): Update atomically in the IPA.
6762 (clear_inferior_trace_buffer): New.
6763 (about_to_request_buffer_space): New.
6764 (trace_buffer_alloc): Handle GDBserver and inferior simulatenous
6765 updating the same buffer.
6766 (add_tracepoint): Default the tracepoint's type to trap
6767 tracepoint, and orig_size to -1.
6768 (get_trace_state_variable) [IN_PROCESS_AGENT]: Handle allocated
6769 internal variables.
6770 (create_trace_state_variable): New parameter `gdb'. Handle it.
6771 (clear_installed_tracepoints): Clear fast tracepoint jumps.
6772 (cmd_qtdp): Handle fast tracepoints.
6773 (cmd_qtdv): Adjust.
6774 (max_jump_pad_size): New.
6775 (gdb_jump_pad_head): New.
6776 (get_jump_space_head): New.
6777 (claim_jump_space): New.
6778 (sort_tracepoints): New.
6779 (MAX_JUMP_SIZE): New.
6780 (cmd_qtstart): Handle fast tracepoints. Sync tracepoints with the
6781 IPA.
6782 (stop_tracing) [IN_PROCESS_AGENT]: Don't include the tdisconnected
6783 support. Upload fast traceframes, and delete internal IPA
6784 breakpoints.
6785 (stop_tracing_handler): New.
6786 (flush_trace_buffer_handler): New.
6787 (cmd_qtstop): Upload fast tracepoints.
6788 (response_tracepoint): Handle fast tracepoints.
6789 (tracepoint_finished_step): Upload fast traceframes. Set the
6790 tracepoint hit context's tracepoint type.
6791 (handle_tracepoint_bkpts): New.
6792 (tracepoint_was_hit): Set the tracepoint hit context's tracepoint
6793 type. Add comment about fast tracepoints.
6794 (collect_data_at_tracepoint) [IN_PROCESS_AGENT]: Don't access the
6795 non-existing action_str field.
6796 (get_context_regcache): Handle fast tracepoints.
6797 (do_action_at_tracepoint) [!IN_PROCESS_AGENT]: Don't write the PC
6798 to the regcache.
6799 (fast_tracepoint_from_jump_pad_address): New.
6800 (fast_tracepoint_from_ipa_tpoint_address): New.
6801 (collecting_t): New.
6802 (force_unlock_trace_buffer): New.
6803 (fast_tracepoint_collecting): New.
6804 (collecting): New.
6805 (gdb_collect): New.
6806 (write_inferior_data_ptr): New.
6807 (target_tp_heap): New.
6808 (target_malloc): New.
6809 (download_agent_expr): New.
6810 (UALIGN): New.
6811 (download_tracepoints): New.
6812 (download_trace_state_variables): New.
6813 (upload_fast_traceframes): New.
6814 (IPA_FIRST_TRACEFRAME): New.
6815 (IPA_NEXT_TRACEFRAME_1): New.
6816 (IPA_NEXT_TRACEFRAME): New.
6817 [IN_PROCESS_AGENT]: Include sys/mman.h and fcntl.h.
6818 [IN_PROCESS_AGENT] (gdb_tp_heap_buffer, gdb_jump_pad_buffer)
6819 (gdb_jump_pad_buffer_end): New.
6820 [IN_PROCESS_AGENT] (initialize_tracepoint_ftlib): New.
6821 (initialize_tracepoint): Adjust.
6822 [IN_PROCESS_AGENT]: Allocate the IPA heap, and jump pad scratch
6823 buffer. Initialize the low module.
6824 * utils.c (PREFIX, TOOLNAME): New.
6825 (malloc_failure): Use PREFIX.
6826 (error): In the IPA, an error causes an exit.
6827 (fatal, warning): Use PREFIX.
6828 (internal_error): Use TOOLNAME.
6829 (NUMCELLS): Increase to 10.
6830 * configure, config.in: Regenerate.
6831
d149dd1d
PA
68322010-06-01 Pedro Alves <pedro@codesourcery.com>
6833
6834 * server.c (handle_query) <qSupported>: Do two passes over the
6835 qSupported string to avoid nesting strtok.
6836
f6528abd
JK
68372010-05-28 Jan Kratochvil <jan.kratochvil@redhat.com>
6838
6839 * Makefile.in (SFILES): Add $(srcdir)/proc-service.list.
6840 (CDEPS): New.
6841 * configure.ac (RDYNAMIC): New AC_MSG_CHECKING wrapping. Test also
6842 -Wl,--dynamic-list.
6843 * configure: Regenerate.
6844 * proc-service.list: New.
6845
ca2a87a0
JK
68462010-05-28 Jan Kratochvil <jan.kratochvil@redhat.com>
6847
6848 * linux-low.c (linux_core_of_thread): Fix crash on invalid CONTENT.
6849 New comment.
6850
363a6e9f
OS
68512010-05-26 Ozkan Sezer <sezeroz@gmail.com>
6852
6853 * gdbreplay.c (remote_open): Check error return from socket() call by
6854 its equality to -1 not by it being negative.
6855 * remote-utils.c (remote_open): Likewise.
6856
d23b6cb1
PA
68572010-05-23 Pedro Alves <pedro@codesourcery.com>
6858
6859 * config.h: Regenerate.
6860
28d3cf85
MK
68612010-05-19 Maxim Kuvyrkov <maxim@codesourcery.com>
6862
6863 * linux-m68k-low.c (ps_get_thread_area): Don't define if kernel
6864 doesn't provide PTRACE_GET_THREAD_AREA.
6865
fea36a59
MK
68662010-05-19 Maxim Kuvyrkov <maxim@codesourcery.com>
6867
6868 * linux-m68k-low.c: Include <asm/ptrace.h>
6869 (ps_get_thread_area): Implement.
6870
24b066ba
DE
68712010-05-03 Doug Evans <dje@google.com>
6872
6873 * event-loop.c (struct callback_event): New struct.
6874 (callback_list): New global.
6875 (append_callback_event, delete_callback_event): New functions.
6876 (process_callback): New function.
6877 (start_event_loop): Call it.
6878 * remote-utils.c (NOT_SCHEDULED): Define.
6879 (readchar_buf, readchar_bufcnt, readchar_bufp): New static globals,
6880 moved out of readchar.
6881 (readchar): Rewrite. Call reschedule before returning.
6882 (reset_readchar): New function.
6883 (remote_close): Call it.
6884 (process_remaining, reschedule): New functions.
6885 * server.h (callback_handler_func): New typedef.
6886 (append_callback_event, delete_callback_event): Declare.
6887
9836d6ea
PA
68882010-05-03 Pedro Alves <pedro@codesourcery.com>
6889
6890 * proc-service.c (ps_pglobal_lookup): Use
6891 thread_db_look_up_one_symbol.
6892 * remote-utils.c (look_up_one_symbol): Add new `may_ask_gdb'
6893 parameter. Use it instead of all_symbols_looked_up.
6894 * server.h (struct process_info) <all_symbols_looked_up>: Delete
6895 field.
6896 (all_symbols_looked_up): Don't declare.
6897 (look_up_one_symbol): Add new `may_ask_gdb' parameter.
6898 * thread-db.c (struct thread_db) <all_symbols_looked_up>: New
6899 field.
6900 (thread_db_look_up_symbols): Adjust call to look_up_one_symbol.
6901 Set all_symbols_looked_up here.
6902 (thread_db_look_up_one_symbol): New.
6903 (thread_db_get_tls_address): Adjust.
6904 (thread_db_load_search, try_thread_db_load_1): Always allocate the
6905 thread_db object on the heap, and tentatively set it in the
6906 process structure.
6907 (thread_db_init): Don't set all_symbols_looked_up here.
6908 * linux-low.h (thread_db_look_up_one_symbol): Declare.
6909
7984d532
PA
69102010-05-03 Pedro Alves <pedro@codesourcery.com>
6911
6912 * linux-low.c (linux_kill, linux_detach): Adjust.
6913 (status_pending_p_callback): Remove redundant statement. Check
6914 for !TARGET_WAITIKIND_IGNORE, instead of
6915 TARGET_WAITKIND_STOPPED.
6916 (handle_tracepoints): Make sure LWP is locked. Adjust.
6917 (linux_wait_for_event_1): Adjust.
6918 (linux_cancel_breakpoints): New.
6919 (unsuspend_one_lwp): New.
6920 (unsuspend_all_lwps): New.
6921 (linux_wait_1): If finishing a step-over, unsuspend all lwps.
6922 (send_sigstop_callback): Change return type to int, add new
6923 `except' parameter and handle it.
6924 (suspend_and_send_sigstop_callback): New.
6925 (stop_all_lwps): Add new `suspend' and `expect' parameters, and
6926 pass them down. If SUSPEND, also increment the lwp's suspend
6927 count.
6928 (linux_resume_one_lwp): Add notice about resuming a suspended LWP.
6929 (need_step_over_p): Don't consider suspended LWPs.
6930 (start_step_over): Adjust.
6931 (proceed_one_lwp): Change return type to int, add new `except'
6932 parameter and handle it.
6933 (unsuspend_and_proceed_one_lwp): New.
6934 (proceed_all_lwps): Use find_inferior instead of
6935 for_each_inferior.
6936 (unstop_all_lwps): Add `unsuspend' parameter. If UNSUSPEND, them
6937 also decrement the suspend count of LWPs. Pass `except' down,
6938 instead of hacking its suspend count.
6939 (linux_pause_all): Add `freeze' parameter. Adjust.
6940 (linux_unpause_all): New.
6941 (linux_target_ops): Install linux_unpause_all.
6942 * server.c (handle_status): Adjust.
6943 * target.h (struct target_ops): New fields `unpause_all' and
6944 `cancel_breakpoints'. Add new parameter to `pause_all'.
6945 (pause_all): Add new `freeze' parameter.
6946 (unpause_all): New.
6947 (cancel_breakpoints): New.
6948 * tracepoint.c (clear_installed_tracepoints): Pause threads, and
6949 cancel breakpoints.
6950 (cmd_qtstart): Pause threads.
6951 (stop_tracing): Pause threads, and cancel breakpoints.
6952 * win32-low.c (win32_target_ops): Adjust.
6953
e471f25b
PA
69542010-05-03 Pedro Alves <pedro@codesourcery.com>
6955
6956 * linux-low.c (linux_wait_for_event_1): Move passing the signal to
6957 the inferior right away from here...
6958 (linux_wait_1): ... to here, and adjust to check the thread's
6959 last_resume_kind instead of the lwp's step or stop_expected flags.
6960
1915ef4f
PA
69612010-05-02 Pedro Alves <pedro@codesourcery.com>
6962
6963 * README: Use consistent `GDB' and `GDBserver' spellings.
6964
f9e39928
PA
69652010-05-02 Pedro Alves <pedro@codesourcery.com>
6966
6967 * linux-low.c (linux_kill_one_lwp): Assume the lwp is stopped.
6968 (linux_kill): Stop all lwps here. Don't delete the main lwp here.
6969 (linux_detach_one_lwp): Assume the lwp is stopped.
6970 (any_thread_of): Delete.
6971 (linux_detach): Stop all lwps here. Don't blindly delete all
6972 breakpoints.
6973 (delete_lwp_callback): New.
6974 (linux_mourn): Delete all lwps of the process that is gone.
6975 (linux_wait_1): Don't delete the last lwp of the process here.
6976 * mem-break.h (mark_breakpoints_out): Declare.
6977 * mem-break.c (mark_breakpoints_out): New.
6978 (free_all_breakpoints): Use it.
6979 * server.c (handle_target_event): If the process is gone, mark
6980 breakpoints out.
6981 * thread-db.c (struct thread_db) <create_bp>: New field.
6982 (thread_db_enable_reporting): Fix prototype. Store a thread event
6983 breakpoint reference in the thread_db struct.
6984 (thread_db_load_search): Clear the thread_db object.
6985 (try_thread_db_load_1): Ditto.
6986 (switch_to_process): New.
6987 (disable_thread_event_reporting): Use it.
6988 (remove_thread_event_breakpoints): New.
6989 (thread_db_detach, thread_db_mourn): Use it.
6990
1e7fc18c
PA
69912010-05-01 Pedro Alves <pedro@codesourcery.com>
6992
6993 * linux-low.c (linux_enable_event_reporting): New.
6994 (linux_wait_for_event_1, handle_extended_wait): Use it.
6995
02fc4de7
PA
69962010-04-30 Pedro Alves <pedro@codesourcery.com>
6997
6998 * linux-low.c (linux_kill_one_lwp, linux_kill)
6999 (linux_detach_one_lwp): Adjust to send_sigstop interface change.
7000 (send_sigstop): Take an lwp_info as parameter instead. Queue a
7001 SIGSTOP even if the LWP is stopped.
7002 (send_sigstop_callback): New.
7003 (stop_all_lwps): Use send_sigstop_callback instead.
7004 (linux_resume_one_thread): Adjust.
7005 (proceed_one_lwp): Still proceed an LWP that the client has
7006 requested to stop, if we haven't reported it as stopped yet. Make
7007 sure that LWPs the client want stopped, have a pending SIGSTOP.
7008
bc3b5632
DE
70092010-04-26 Doug Evans <dje@google.com>
7010
ae1ada35
DE
7011 * server.c (handle_general_set): Make static.
7012
bc3b5632
DE
7013 * remote-utils.c (putpkt_binary_1): Call readchar instead of read.
7014 Print received char after testing for error/eof instead of before.
7015 (input_interrupt): Tweak comment.
7016
65730243
DE
70172010-04-23 Doug Evans <dje@google.com>
7018
7019 * server.c (start_inferior): Print inferior argv if --debug.
7020
a8ae7dc0
AR
70212010-04-21 Aleksandar Ristovski <aristovski@qnx.com>
7022
7023 * Makefile.in (nto_low_h nto-low.o nto-x86-low.o): New dependency lists.
7024 * nto-x86-low.c: Include server.h
7025
1c07cc19
PM
70262010-04-20 Pierre Muller <muller@ics.u-strasbg.fr>
7027
7028 * win32-i386-low.c: Use __x86_64__ macro instead of __x86_64 to
7029 be consistent with other sources of this directory.
7030 (init_registers_amd64): Correct name of source file of this function
7031 in the comment.
7032
e0a61e09
PM
70332010-04-19 Pierre Muller <muller@ics.u-strasbg.fr>
7034
7035 * configure.srv (x86_64-*-mingw*): New configuration for Windows
7036 64-bit executables.
7037
54709339
PM
70382010-04-19 Pierre Muller <muller@ics.u-strasbg.fr>
7039
7040 * win32-i386-low.c: Add 64-bit support.
7041 (CONTEXT_EXTENDED_REGISTERS): Set macro to zero if not exisiting.
7042 (init_registers_amd64): Declare.
7043 (mappings): Add 64-bit version of array.
7044 (init_windows_x86): New function.
7045 (the_low_target): Change init_arch field to init_windows_x86.
7046
e8f0053d
PM
70472010-04-19 Pierre Muller <muller@ics.u-strasbg.fr>
7048
7049 * win32-low.c: Adapt to support also 64-bit architecture.
7050 (child_xfer_memory): Use uintptr_t type for local variable `addr'.
7051 (get_image_name): Use SIZE_T type for local variable `done'.
7052 (psapi_get_dll_name): Use LPVOID type for parameter `BaseAddress'.
7053 (toolhelp_get_dll_name): Idem.
7054 (handle_load_dll): Use CORE_ADDR type for local variable `load_addr'.
7055 Use uintptr_t typecast to avoid warning.
7056 (handle_unload_dll): Use uintptr_t typecast to avoid warning.
7057 (handle_exception): Use phex_nz to avoid warning.
7058 (win32_wait): Remove unused local variable `process'.
7059
c481e77e
PM
70602010-04-19 Pierre Muller <muller@ics.u-strasbg.fr>
7061
7062 * configure.srv (srv_amd64_regobj): Replace `x86-64-avx.o' by
7063 `amd64-avx.o'.
7064
12ea4b69
PM
70652010-04-17 Pierre Muller <muller@ics.u-strasbg.fr>
7066
7067 * configure.ac: Use `ws2_32' library for srv_mingw.
7068 * configure: Regenerate.
7069 * gdbreplay.c: Include winsock2.h instead of winsock.h.
7070 * remote-utils.c: Likewise.
7071
f6d1620c
L
70722010-04-17 H.J. Lu <hongjiu.lu@intel.com>
7073
7074 * linux-x86-low.c (xmltarget_amd64_linux_no_xml): Define only
7075 if __x86_64__ is defined.
7076
8e642873
PM
70772010-04-16 Pierre Muller <muller@ics.u-strasbg.fr>
7078
7079 * configure: Regenerate.
7080
711e434b
PM
70812010-04-16 Pierre Muller <muller@ics.u-strasbg.fr>
7082
7083 * server.c (handle_query): Handle 'qGetTIBAddr' query.
7084 * target.h (target_ops): New get_tib_address field.
7085 * win32-low.h (win32_thread_info): Add thread_local_base field.
7086 * win32-low.c (child_add_thread): Add tlb argument.
7087 Set thread_local_base field to TLB.
7088 (get_child_debug_event): Adapt to child_add_thread change.
7089 (win32_get_tib_address): New function.
7090 (win32_target_ops): Set get_tib_address field to
7091 win32_get_tib_address.
7092 * linux-low.c (linux_target_ops): Set get_tib_address field to NULL.
7093
505106cd
PA
70942010-04-12 Pedro Alves <pedro@codesourcery.com>
7095
505106cd
PA
7096 * linux-low.c (linux_mourn): Also remove the process.
7097 * server.c (handle_target_event): Don't remove the process here.
7098 * nto-low.c (nto_mourn): New.
7099 (nto_target_ops): Install it.
7100 * spu-low.c (spu_mourn): New.
7101 (spu_target_ops): Install it.
7102 * win32-low.c (win32_mourn): New.
7103 (win32_target_ops): Install it.
7104
e8470a06
PA
71052010-04-12 Pedro Alves <pedro@codesourcery.com>
7106
7107 * server.h (buffer_xml_printf): Remove redundant `;'.
7108
45ba0d02
PA
71092010-04-12 Pedro Alves <pedro@codesourcery.com>
7110
7111 * regcache.c (set_register_cache): Invalidate regcaches before
7112 changing the register cache layout.
7113 (regcache_invalidate_one): Allow a NULL regcache.
7114 * linux-x86-low.c (x86_linux_update_xmltarget): Invalidate
7115 regcaches before changing the register cache layout or the target
7116 regsets.
7117
59e04013
L
71182010-04-12 H.J. Lu <hongjiu.lu@intel.com>
7119
7120 * linux-x86-low.c (x86_linux_update_xmltarget): Avoid unused
7121 variable warning on Linux/x86-64.
7122
8336d594
PA
71232010-04-11 Pedro Alves <pedro@codesourcery.com>
7124
7125 GDBserver disconnected tracing support.
7126
7127 * linux-low.c (linux_remove_process): Delete.
7128 (add_lwp): Don't set last_resume_kind here.
7129 (linux_kill): Use `mourn'.
7130 (linux_detach): Use `thread_db_detach', and `mourn'.
7131 (linux_mourn): New.
7132 (linux_attach_lwp_1): Adjust comment.
7133 (linux_attach): last_resume_kind moved the thread_info; adjust.
7134 (status_pending_p_callback): Adjust.
7135 (linux_wait_for_event_1): Adjust.
7136 (count_events_callback, select_singlestep_lwp_callback)
7137 (select_event_lwp_callback, cancel_breakpoints_callback)
7138 (db_wants_lwp_stopped, linux_wait_1, need_step_over_p)
7139 (proceed_one_lwp): Adjust.
7140 (linux_async): Add debug output.
7141 (linux_thread_stopped): New.
7142 (linux_pause_all): New.
7143 (linux_target_ops): Install linux_mourn, linux_thread_stopped and
7144 linux_pause_all.
7145 * linux-low.h (struct lwp_info): Delete last_resume_kind field.
7146 (thread_db_free): Delete declaration.
7147 (thread_db_detach, thread_db_mourn): Declare.
7148 * thread-db.c (thread_db_init): Use thread_db_mourn.
7149 (thread_db_free): Delete, split in two.
7150 (disable_thread_event_reporting): New.
7151 (thread_db_detach): New.
7152 (thread_db_mourn): New.
7153
7154 * server.h (struct thread_info) <last_resume_kind>: New field.
7155 <attached>: Add comment.
7156 <gdb_detached>: New field.
7157 (handler_func): Change return type to int.
7158 (handle_serial_event, handle_target_event): Ditto.
7159 (gdb_connected): Declare.
7160 (tracing): Delete.
7161 (disconnected_tracing): Declare.
7162 (stop_tracing): Declare.
7163
7164 * server.c (handle_query) <qSupported>: Report support for
7165 disconnected tracing.
7166 (queue_stop_reply_callback): Account for running threads.
7167 (gdb_wants_thread_stopped): New.
7168 (gdb_wants_all_threads_stopped): New.
7169 (gdb_reattached_process): New.
7170 (handle_status): Clear the `gdb_detached' flag of all processes.
7171 In all-stop, stop all threads.
7172 (main): Be sure to leave tfind mode. Handle disconnected tracing.
7173 (process_serial_event): If the remote connection breaks, or if an
7174 exit was forced with "monitor exit", force an event loop exit.
7175 Handle disconnected tracing on detach.
7176 (handle_serial_event): Adjust.
7177 (handle_target_event): If GDB isn't connected, forward events back
7178 to the inferior, unless the last process exited, in which case,
7179 exit gdbserver. Adjust interface.
7180
7181 * remote-utils.c (remote_open): Don't block in accept. Instead
7182 register an event loop source on the listen socket file
7183 descriptor. Refactor bits into ...
7184 (listen_desc): ... this new global.
7185 (gdb_connected): ... this new function.
7186 (enable_async_notification): ... this new function.
7187 (handle_accept_event): ... this new function.
7188 (remote_close): Clear remote_desc.
7189
7190 * inferiors.c (add_thread): Set the new thread's last_resume_kind.
7191
7192 * target.h (struct target_ops) <mourn, thread_stopped, pause_all>:
7193 New fields.
7194 (mourn_inferior): Define.
7195 (target_process_qsupported): Avoid the dangling else problem.
7196 (thread_stopped): Define.
7197 (pause_all): Define.
7198 (target_waitstatus_to_string): Declare.
7199 * target.c (target_waitstatus_to_string): New.
7200
7201 * tracepoint.c (tracing): Make extern.
7202 (disconnected_tracing): New.
7203 (stop_tracing): Make extern. Handle tracing stops due to GDB
7204 disconnecting.
7205 (cmd_qtdisconnected): New.
7206 (cmd_qtstatus): Report disconnected tracing status in trace reply.
7207 (handle_tracepoint_general_set): Handle QTDisconnected.
7208
7209 * event-loop.c (event_handler_func): Change return type to int.
7210 (process_event): Bail out if the event handler wants the event
7211 loop to stop.
7212 (handle_file_event): Ditto.
7213 (start_event_loop): Bail out if the event handler wants the event
7214 loop to stop.
7215
7216 * nto-low.c (nto_target_ops): Adjust.
7217 * spu-low.c (spu_wait): Don't remove the process here.
7218 (spu_target_ops): Adjust.
7219 * win32-low.c (win32_wait): Don't remove the process here.
7220 (win32_target_ops): Adjust.
7221
5d267c4c
PA
72222010-04-11 Pedro Alves <pedro@codesourcery.com>
7223
7224 * regcache.c (realloc_register_cache): Invalidate inferior's
7225 regcache before recreating it.
7226
623ccd72
PA
72272010-04-09 Pedro Alves <pedro@codesourcery.com>
7228
7229 * tracepoint.c (cmd_qtstatus): Report trace buffer circularity.
7230
219f2f23
PA
72312010-04-09 Stan Shebs <stan@codesourcery.com>
7232 Pedro Alves <pedro@codesourcery.com>
7233
7234 * server.h (LONGEST): New.
7235 (struct thread_info) <while_stepping>: New field.
7236 (unpack_varlen_hex, xrealloc, pulongest, plongest, phex_nz):
7237 Declare.
7238 (initialize_tracepoint, handle_tracepoint_general_set)
7239 (handle_tracepoint_query, tracepoint_finished_step)
7240 (tracepoint_was_hit, release_while_stepping_state_list):
7241 (current_traceframe): Declare.
7242 * server.c (handle_general_set): Handle tracepoint packets.
7243 (read_memory): New.
7244 (write_memory): New.
7245 (handle_search_memory_1): Use read_memory.
7246 (handle_query): Report support for conditional tracepoints, trace
7247 state variables, and tracepoint sources. Handle tracepoint
7248 queries.
7249 (main): Initialize the tracepoints module.
7250 (process_serial_event): Handle traceframe reads/writes.
7251
7252 * linux-low.c (handle_tracepoints): New.
7253 (linux_wait_1): Call it.
7254 (linux_resume_one_lwp): Handle while-stepping.
7255 (linux_supports_tracepoints, linux_read_pc, linux_write_pc): New.
7256 (linux_target_ops): Install them.
7257 * linux-low.h (struct linux_target_ops) <supports_tracepoints>:
7258 New field.
7259 * linux-x86-low.c (x86_supports_tracepoints): New.
7260 (the_low_target). Install it.
7261
7262 * mem-break.h (delete_breakpoint): Declare.
7263 * mem-break.c (delete_breakpoint): Make external.
7264
7265 * target.h (struct target_ops): Add `supports_tracepoints',
7266 `read_pc', and `write_pc' fields.
7267 (target_supports_tracepoints): Define.
7268 * utils.c (xrealloc, decimal2str, pulongest, plongest, thirty_two)
7269 (phex_nz): New.
7270
7271 * regcache.h (struct regcache) <registers_owned>: New field.
7272 (init_register_cache, regcache_cpy): Declare.
7273 (regcache_read_pc, regcache_write_pc): Declare.
7274 (register_cache_size): Declare.
7275 (supply_regblock): Declare.
7276 * regcache.c (init_register_cache): New.
7277 (new_register_cache): Use it.
7278 (regcache_cpy): New.
7279 (register_cache_size): New.
7280 (supply_regblock): New.
7281 (regcache_read_pc, regcache_write_pc): New.
889bf7c5 7282
219f2f23
PA
7283 * tracepoint.c: New.
7284
7285 * Makefile.in (OBS): Add tracepoint.o.
7286 (tracepoint.o): New rule.
7287
3a13a53b
L
72882010-04-08 H.J. Lu <hongjiu.lu@intel.com>
7289
7290 * Makefile.in (clean): Also remove i386-mmx.c i386-mmx-linux.c.
7291 (i386-mmx.o): New.
7292 (i386-mmx.c): Likewise.
7293 (i386-mmx-linux.o): Likewise.
7294 (i386-mmx-linux.c): Likewise.
7295
7296 * configure.srv (srv_i386_regobj): Add i386-mmx.o.
7297 (srv_i386_linux_regobj): Add i386-mmx-linux.o.
7298 (srv_i386_xmlfiles): Add i386/i386-mmx.xml.
7299 (srv_i386_linux_xmlfiles): Add i386/i386-mmx-linux.xml.
7300
7301 * linux-x86-low.c (init_registers_i386_mmx_linux): New.
7302 (x86_linux_update_xmltarget): Call init_registers_i386_mmx_linux
7303 and return if ptrace PTRACE_GETFPXREGS failed in 32bit.
7304
1570b33e
L
73052010-04-07 H.J. Lu <hongjiu.lu@intel.com>
7306
7307 * Makefile.in (clean): Updated.
7308 (i386-avx.o): New.
7309 (i386-avx.c): Likewise.
7310 (i386-avx-linux.o): Likewise.
7311 (i386-avx-linux.c): Likewise.
7312 (amd64-avx.o): Likewise.
7313 (amd64-avx.c): Likewise.
7314 (amd64-avx-linux.o): Likewise.
7315 (amd64-avx-linux.c): Likewise.
7316
7317 * configure.srv (srv_i386_regobj): Add i386-avx.o.
7318 (srv_i386_linux_regobj): Add i386-avx-linux.o.
7319 (srv_amd64_regobj): Add amd64-avx.o.
7320 (srv_amd64_linux_regobj): Add amd64-avx-linux.o.
7321 (srv_i386_32bit_xmlfiles): Add i386/32bit-avx.xml.
7322 (srv_i386_64bit_xmlfiles): Add i386/64bit-avx.xml.
7323 (srv_i386_xmlfiles): Add i386/i386-avx.xml.
7324 (srv_amd64_xmlfiles): Add i386/amd64-avx.xml.
7325 (srv_i386_linux_xmlfiles): Add i386/i386-avx-linux.xml.
7326 (srv_amd64_linux_xmlfiles): Add i386/amd64-avx-linux.xml.
7327
7328 * i387-fp.c: Include "i386-xstate.h".
7329 (i387_xsave): New.
7330 (i387_cache_to_xsave): Likewise.
7331 (i387_xsave_to_cache): Likewise.
7332 (x86_xcr0): Likewise.
7333
7334 * i387-fp.h (i387_cache_to_xsave): Likewise.
7335 (i387_xsave_to_cache): Likewise.
7336 (x86_xcr0): Likewise.
7337
7338 * linux-arm-low.c (target_regsets): Initialize nt_type to 0.
7339 * linux-crisv32-low.c (target_regsets): Likewise.
7340 * linux-m68k-low.c (target_regsets): Likewise.
7341 * linux-mips-low.c (target_regsets): Likewise.
7342 * linux-ppc-low.c (target_regsets): Likewise.
7343 * linux-s390-low.c (target_regsets): Likewise.
7344 * linux-sh-low.c (target_regsets): Likewise.
7345 * linux-sparc-low.c (target_regsets): Likewise.
7346 * linux-xtensa-low.c (target_regsets): Likewise.
7347
7348 * linux-low.c: Include <sys/uio.h>.
7349 (regsets_fetch_inferior_registers): Support nt_type.
7350 (regsets_store_inferior_registers): Likewise.
7351 (linux_process_qsupported): New.
7352 (linux_target_ops): Add linux_process_qsupported.
7353
7354 * linux-low.h (regset_info): Add nt_type.
7355 (linux_target_ops): Add process_qsupported.
7356
7357 * linux-x86-low.c: Include "i386-xstate.h", "elf/common.h"
7358 and <sys/uio.h>.
7359 (init_registers_i386_avx_linux): New.
7360 (init_registers_amd64_avx_linux): Likewise.
7361 (xmltarget_i386_linux_no_xml): Likewise.
7362 (xmltarget_amd64_linux_no_xml): Likewise.
7363 (PTRACE_GETREGSET): Likewise.
7364 (PTRACE_SETREGSET): Likewise.
7365 (x86_fill_xstateregset): Likewise.
7366 (x86_store_xstateregset): Likewise.
7367 (use_xml): Likewise.
7368 (x86_linux_update_xmltarget): Likewise.
7369 (x86_linux_process_qsupported): Likewise.
7370 (target_regsets): Add NT_X86_XSTATE entry and Initialize nt_type.
7371 (x86_arch_setup): Don't call init_registers_amd64_linux nor
7372 init_registers_i386_linux here. Call
7373 x86_linux_update_xmltarget.
7374 (the_low_target): Add x86_linux_process_qsupported.
7375
7376 * server.c (handle_query): Call target_process_qsupported.
7377
7378 * target.h (target_ops): Add process_qsupported.
7379 (target_process_qsupported): New.
7380
fc7238bb
PA
73812010-04-03 Pedro Alves <pedro@codesourcery.com>
7382
7383 * inferiors.c (add_thread): Set last_status kind to
7384 TARGET_WAITKIND_IGNORE.
7385 * linux-low.c (cancel_breakpoint): Remove unnecessary regcache
7386 fetch. Use ptid_of. Avoid unnecessary get_lwp_thread calls.
7387 (linux_wait_1): Move `thread' local definition to block that uses
7388 it. Don't NULL initialize `event_child'.
7389 (linux_resume_one_thread): Avoid unnecessary get_lwp_thread calls.
7390 Alway set the thread's last_status to TARGET_WAITKIND_IGNORE.
7391 * linux-x86-low.c (x86_breakpoint_at): Read raw memory.
7392
bdabb078
PA
73932010-04-01 Pedro Alves <pedro@codesourcery.com>
7394
7395 * linux-low.c (get_stop_pc): Don't adjust the PC if stopped with
7396 an extended waitstatus, or by a watchpoint.
7397 (cancel_breakpoints_callback): Don't cancel a breakpoint if the
7398 thread was stepping or has been stopped by a watchpoint.
7399
d3bbe7a0
PA
74002010-04-01 Pedro Alves <pedro@codesourcery.com>
7401
7402 * mem-break.c (struct raw_breakpoint): New field shlib_disabled.
7403 (set_gdb_breakpoint_at): If GDB is inserting a breakpoint on top
7404 of another, then delete the previous, and validate all
7405 breakpoints.
7406 (validate_inserted_breakpoint): New.
7407 (delete_disabled_breakpoints): New.
7408 (validate_breakpoints): New.
7409 (check_mem_read): Validate breakpoints before trusting their
7410 shadow. Delete disabled breakpoints.
7411 (check_mem_write): Validate breakpoints before trusting they
7412 should be inserted. Delete disabled breakpoints.
7413 * mem-break.h (validate_breakpoints):
7414 * server.c (handle_query): Validate breakpoints when we see a
7415 qSymbol query.
7416
8b07ae33
PA
74172010-04-01 Pedro Alves <pedro@codesourcery.com>
7418
7419 * linux-low.c (linux_wait_1): Avoid setting need_step_over is
7420 there's a GDB breakpoint at stop_pc. Always report a trap to GDB
7421 if we could tell there's a GDB breakpoint at stop_pc.
7422 (need_step_over_p): Don't do a step over if we find a GDB
7423 breakpoint at the resume PC.
7424
7425 * mem-break.c (struct raw_breakpoint): New.
7426 (enum bkpt_type): New type `gdb_breakpoint'.
7427 (struct breakpoint): Delete the `PC', `old_data' and `inserted'
7428 fields. New field `raw'.
7429 (find_raw_breakpoint_at): New.
7430 (set_raw_breakpoint_at): Handle refcounting. Create a raw
7431 breakpoint instead.
7432 (set_breakpoint_at): Adjust.
7433 (delete_raw_breakpoint): New.
7434 (release_breakpoint): New.
7435 (delete_breakpoint): Rename to...
7436 (delete_breakpoint_1): ... this. Add proc parameter. Use
7437 release_breakpoint. Return ENOENT.
7438 (delete_breakpoint): Reimplement.
7439 (find_breakpoint_at): Delete.
7440 (find_gdb_breakpoint_at): New.
7441 (delete_breakpoint_at): Delete.
7442 (set_gdb_breakpoint_at): New.
7443 (delete_gdb_breakpoint_at): New.
7444 (gdb_breakpoint_here): New.
7445 (set_reinsert_breakpoint): Use release_breakpoint.
7446 (uninsert_breakpoint): Rename to ...
7447 (uninsert_raw_breakpoint): ... this.
7448 (uninsert_breakpoints_at): Adjust to handle raw breakpoints.
7449 (reinsert_raw_breakpoint): Change parameter type to
7450 raw_breakpoint.
7451 (reinsert_breakpoints_at): Adjust to handle raw breakpoints
7452 instead.
7453 (check_breakpoints): Adjust. Use release_breakpoint.
7454 (breakpoint_here): Rewrite using find_raw_breakpoint_at.
7455 (breakpoint_inserted_here): Ditto.
7456 (check_mem_read): Adjust to iterate over raw breakpoints instead.
7457 Don't trust the breakpoint's shadow if it is not inserted.
7458 (check_mem_write): Adjust to iterate over raw breakpoints instead.
7459 (delete_all_breakpoints): Adjust.
7460 (free_all_breakpoints): Mark all breakpoints as uninserted, and
7461 use delete_breakpoint_1.
7462
7463 * mem-break.h (breakpoints_supported): Delete declaration.
7464 (set_gdb_breakpoint_at): Declare.
7465 (gdb_breakpoint_here): Declare.
7466 (delete_breakpoint_at): Delete.
7467 (delete_gdb_breakpoint_at): Declare.
7468
7469 * server.h (struct raw_breakpoint): Forward declare.
7470 (struct process_info): New field `raw_breakpoints'.
7471
7472 * linux-x86-low.c (x86_insert_point, x86_remote_point): Handle Z0
7473 breakpoints.
7474
6bf5e0ba
PA
74752010-03-24 Pedro Alves <pedro@codesourcery.com>
7476
7477 * linux-low.c (status_pending_p_callback): Fix comment.
7478 (linux_wait_for_event_1): Move most of the internal breakpoint
7479 handling from here...
7480 (linux_wait_1): ... to here.
7481 (count_events_callback): New.
7482 (select_singlestep_lwp_callback): New.
7483 (select_event_lwp_callback): New.
7484 (cancel_breakpoints_callback): New.
7485 (select_event_lwp): New.
7486 (linux_wait_1): Simplify internal breakpoint handling. Give equal
7487 priority to all LWPs that have had events that should be reported
7488 to the client. Cancel breakpoints when about to reporting the
7489 event to the client, not while stopping lwps. No longer cancel
7490 finished single-steps here.
7491 (cancel_finished_single_step): Delete.
7492 (cancel_finished_single_steps): Delete.
7493
414a389f
PA
74942010-03-24 Pedro Alves <pedro@codesourcery.com>
7495
7496 * mem-break.c (enum bkpt_type): New.
7497 (struct breakpoint): New field `type'.
7498 (set_breakpoint_at): Change return type to struct breakpoint
7499 pointer. Set type to `other_breakpoint' by default.
7500 (delete_breakpoint): Rewrite, supporting more than one breakpoint
7501 in the breakpoint list.
7502 (delete_reinsert_breakpoints): Only delete reinsert breakpoints.
7503 (reinsert_breakpoint): Rename to ...
7504 (reinsert_raw_breakpoint): ... this.
7505 (reinsert_breakpoints_at): Adjust.
7506 * mem-break.h (struct breakpoint): Declare.
7507 (set_breakpoint_at): Change return type to struct breakpoint
7508 pointer.
7509
2280c721
PA
75102010-03-24 Pedro Alves <pedro@codesourcery.com>
7511
7512 * server.c (handle_query): Assign, not compare.
7513
d50171e4
PA
75142010-03-24 Pedro Alves <pedro@codesourcery.com>
7515
7516 Teach linux gdbserver to step-over-breakpoints.
7517
7518 * linux-low.c (can_hardware_single_step): New.
7519 (supports_breakpoints): New.
7520 (handle_extended_wait): If stopping threads, read the stop pc of
7521 the new cloned LWP.
7522 (get_pc): New.
7523 (get_stop_pc): Add `lwp' parameter. Handle it. Bail out if the
7524 low target doesn't support retrieving the PC.
7525 (add_lwp): Set last_resume_kind to resume_continue.
7526 (linux_attach_lwp_1): Adjust comments. Always set stop_expected.
7527 (linux_attach): Don't clear stop_expected. Set the lwp's
7528 last_resume_kind to resume_stop.
7529 (linux_detach_one_lwp): Don't check for removed breakpoints.
7530 (check_removed_breakpoint): Delete.
7531 (status_pending_p): Rename to ...
7532 (status_pending_p_callback): ... this. Don't check for removed
7533 breakpoints. Don't consider threads that are stopped from GDB's
7534 perspective.
7535 (linux_wait_for_lwp): Always read the stop_pc here.
7536 (cancel_breakpoint): New.
7537 (step_over_bkpt): New global.
7538 (linux_wait_for_event_1): Implement stepping over breakpoints.
7539 (gdb_wants_lwp_stopped): New.
7540 (gdb_wants_all_stopped): New.
7541 (linux_wait_1): Tag threads as gdb-wants-stopped. Cancel finished
7542 single-step traps here. Store the thread's last reported target
7543 wait status.
7544 (send_sigstop): Don't clear stop_expected. Always set it,
7545 instead.
7546 (mark_lwp_dead): Remove reference to pending_is_breakpoint.
7547 (cancel_finished_single_step): New.
7548 (cancel_finished_single_steps): New.
7549 (wait_for_sigstop): Don't cancel finished single-step traps here.
7550 (linux_resume_one_lwp): Don't check for removed breakpoints.
7551 Don't set `step' on non-hardware step archs.
7552 (linux_set_resume_request): Ignore resume_stop requests if already
7553 stopping or stopped. Set the lwp's last_resume_kind.
7554 (resume_status_pending_p): Don't check for removed breakpoints.
7555 (need_step_over_p): New.
7556 (start_step_over): New.
7557 (finish_step_over): New.
7558 (linux_resume_one_thread): Always queue a sigstop for resume_stop
7559 requests. Clear the thread's last reported target waitstatus.
7560 Don't use the `suspended' flag. Don't consider pending breakpoints.
7561 (linux_resume): Start a step-over if necessary.
7562 (proceed_one_lwp): New.
7563 (proceed_all_lwps): New.
7564 (unstop_all_lwps): New.
7565 * linux-low.h (struct lwp_info): Rewrite comment for the
7566 `suspended' flag. Add the `stop_pc' field. Delete the
7567 `pending_stop_pc' field. Tweak the `stepping' flag's comment.
7568 Add `'last_resume_kind' and `need_step_over' fields.
7569 * inferiors.c (struct thread_info): Delete, moved elsewhere.
7570 * mem-break.c (struct breakpoint): Delete `reinserting' flag.
7571 Delete `breakpoint_to_reinsert' field. New flag `inserted'.
7572 (set_raw_breakpoint_at): New.
7573 (set_breakpoint_at): Rewrite to use it.
7574 (reinsert_breakpoint_handler): Delete.
7575 (set_reinsert_breakpoint): New.
7576 (reinsert_breakpoint_by_bp): Delete.
7577 (delete_reinsert_breakpoints): New.
7578 (uninsert_breakpoint): Rewrite.
7579 (uninsert_breakpoints_at): New.
7580 (reinsert_breakpoint): Rewrite.
7581 (reinsert_breakpoints_at): New.
7582 (check_breakpoints): Rewrite.
7583 (breakpoint_here): New.
7584 (breakpoint_inserted_here): New.
7585 (check_mem_read): Adjust.
7586 * mem-break.h (breakpoints_supported, breakpoint_here)
7587 (breakpoint_inserted_here, set_reinsert_breakpoint): Declare.
7588 (reinsert_breakpoint_by_bp): Delete declaration.
7589 (delete_reinsert_breakpoints): Declare.
7590 (reinsert_breakpoint): Delete declaration.
7591 (reinsert_breakpoints_at): Declare.
7592 (uninsert_breakpoint): Delete declaration.
7593 (uninsert_breakpoints_at): Declare.
7594 (check_breakpoints): Adjust prototype.
7595 * server.h: Adjust include order.
7596 (struct thread_info): Declare here. Add a `last_status' field.
7597
30ba68cb
MS
75982010-03-23 Michael Snyder <msnyder@vmware.com>
7599
7600 * server.c (crc32): New function.
7601 (handle_query): Add handling for 'qCRC:' request.
7602
b9a881c2
PA
76032010-03-23 Pedro Alves <pedro@codesourcery.com>
7604
7605 * linux-x86-low.c (x86_linux_prepare_to_resume): Clear DR6 if the
7606 lwp had been stopped by a watchpoint.
7607
e92d13d5
PA
76082010-03-16 Pedro Alves <pedro@codesourcery.com>
7609
7610 * server.h (internal_error): Declare.
7611 (gdb_assert, ASSERT_FUNCTION, gdb_assert_fail): Define.
7612 * utils.c (internal_error): New function.
7613
64daa791
AS
76142010-03-15 Andreas Schwab <schwab@redhat.com>
7615
7616 * configure.srv: Fix typo setting srv_regobj.
7617
f52cd8cd
PA
76182010-03-15 Pedro Alves <pedro@codesourcery.com>
7619
7620 * linux-low.c (fetch_register): Avoid passing a non string literal
7621 format to `error'.
7622 (usr_store_inferior_registers): Ditto.
7623
93ae6fdc
PA
76242010-03-14 Pedro Alves <pedro@codesourcery.com>
7625
7626 * linux-low.c (linux_write_memory): Bail out early if peeking
7627 memory failed.
7628
c3adc08c
PA
76292010-03-14 Pedro Alves <pedro@codesourcery.com>
7630
7631 * linux-low.h (struct lwp_info): New fields
7632 `stopped_by_watchpoint' and `stopped_data_address'.
7633 * linux-low.c (linux_wait_for_lwp): Check for watchpoint triggers
7634 here, and cache them in the lwp object.
7635 (wait_for_sigstop): Check stopped_by_watchpoint lwp field
7636 directly.
7637 (linux_resume_one_lwp): Clear the lwp's stopped_by_watchpoint
7638 field.
7639 (linux_stopped_by_watchpoint): Rewrite.
7640 (linux_stopped_data_address): Rewrite.
7641
bce522a2
PA
76422010-03-06 Simo Melenius <simo.melenius@iki.fi>
7643
7644 * linux-low.c (linux_wait_for_lwp): Fetch the regcache after
7645 switching the current inferior, not before.
7646
90884b2b
L
76472010-03-01 H.J. Lu <hongjiu.lu@intel.com>
7648
7649 * Makefile.in (clean): Replace reg-i386.c, reg-x86-64.c,
7650 reg-i386-linux.c and reg-x86-64-linux.c with i386.c, amd64.c,
7651 i386-linux.c and amd64-linux.c.
7652 (reg-i386.o): Removed.
7653 (reg-i386.c): Likewise.
7654 (reg-i386-linux.o): Likewise.
7655 (reg-i386-linux.c): Likewise.
7656 (reg-x86-64.o): Likewise.
7657 (reg-x86-64.c): Likewise.
7658 (reg-x86-64-linux.o): Likewise.
7659 (reg-x86-64-linux.c): Likewise.
7660 (i386.o): New.
7661 (i386.c): Likewise.
7662 (i386-linux.o): Likewise.
7663 (i386-linux.c): Likewise.
7664 (amd64.o): Likewise.
7665 (amd64.c): Likewise.
7666 (amd64-linux.o): Likewise.
7667 (amd64-linux.c): Likewise.
7668
7669 * configure.srv (srv_i386_regobj): New.
7670 (srv_i386_linux_regobj): Likewise.
7671 (srv_amd64_regobj): Likewise.
7672 (srv_amd64_linux_regobj): Likewise.
7673 (srv_i386_32bit_xmlfiles): Likewise.
7674 (srv_i386_64bit_xmlfiles): Likewise.
7675 (srv_i386_xmlfiles): Likewise.
7676 (srv_amd64_xmlfiles): Likewise.
7677 (srv_i386_linux_xmlfiles): Likewise.
7678 (srv_amd64_linux_xmlfiles): Likewise.
7679 (i[34567]86-*-cygwin*): Set srv_regobj to $srv_i386_regobj. Set
7680 srv_xmlfiles to $srv_i386_xmlfiles.
7681 (i[34567]86-*-mingw32ce*): Likewise.
7682 (i[34567]86-*-mingw*): Likewise.
7683 (i[34567]86-*-nto*): Likewise.
7684 (i[34567]86-*-linux*): Set srv_regobj to $srv_i386_linux_regobj
7685 and $srv_amd64_linux_regobj. Set srv_xmlfiles to
7686 $srv_i386_linux_xmlfiles and $srv_amd64_linux_xmlfiles.
7687 (x86_64-*-linux*): Likewise.
7688
7689 * linux-x86-low.c (init_registers_x86_64_linux): Removed.
7690 (init_registers_amd64_linux): New.
7691 (x86_arch_setup): Replace init_registers_x86_64_linux with
7692 init_registers_amd64_linux.
7693
193f13e6
MK
76942010-02-23 Maxim Kuvyrkov <maxim@codesourcery.com>
7695
7696 * configure.ac: Check for libdl. If it is not available link against
7697 static libthread_db.
7698 * configure: Regenerate.
7699
85d721b8
PA
77002010-02-22 Pedro Alves <pedro@codesourcery.com>
7701
7702 PR9605
7703
7704 * i386-low.c (i386_length_and_rw_bits): Throw a fatal error if
7705 handing a read watchpoint.
7706 (i386_low_insert_watchpoint): Read watchpoints aren't supported.
7707
6076632b
DE
77082010-02-12 Doug Evans <dje@google.com>
7709
7710 * linux-low.c (linux_supports_tracefork_flag): Document.
7711 (linux_look_up_symbols): Add comment.
7712
3327ccf7
L
77132010-02-03 H.J. Lu <hongjiu.lu@intel.com>
7714
7715 * regcache.c (supply_register): Clear regcache if buf is NULL.
7716
0718675c 77172010-02-02 Nicolas Roche <roche@sourceware.org>
3327ccf7 7718 Joel Brobecker <brobecker@adacore.com>
0718675c
JB
7719
7720 * inferiors.c (find_inferior): Add function documentation.
7721 (unloaded_dll): Handle the case where the unloaded dll has not
7722 been previously registered in the dll list.
7723
177321bd
DJ
77242010-02-01 Daniel Jacobowitz <dan@codesourcery.com>
7725
7726 * linux-arm-low.c (thumb_breakpoint_len): Delete.
7727 (thumb2_breakpoint): New.
7728 (arm_breakpoint_at): Check for Thumb-2 breakpoints.
7729
2b009048
DJ
77302010-01-29 Daniel Jacobowitz <dan@codesourcery.com>
7731
7732 * linux-low.c (get_stop_pc): Check for SIGTRAP.
7733 (linux_wait_for_event_1): Handle SIGILL and SIGSEGV as possible
7734 breakpoints.
7735
3be029c7
PA
77362010-01-21 Pedro Alves <pedro@codesourcery.com>
7737
7738 * linux-ppc-low.c (ppc_arch_setup): Adjust to regcache changes.
7739
18f5de3b
JK
77402010-01-21 Jan Kratochvil <jan.kratochvil@redhat.com>
7741
7742 * linux-s390-low.c (s390_collect_ptrace_register)
7743 (s390_supply_ptrace_register): Adjust it for the new regcache parameter.
7744
3743bb4f
DE
77452010-01-21 Doug Evans <dje@google.com>
7746
14ce3065
DE
7747 * linux-low.c (PTRACE_ARG3_TYPE): Change from long to void*.
7748 (PTRACE_ARG4_TYPE): New macro.
7749 (handle_extended_wait): Cast ptrace arg4 to PTRACE_ARG4_TYPE.
7750 (linux_wait_for_event_1, linux_resume_one_lwp): Ditto.
7751 (fetch_register): Cast to uintptr_t before casting to PTRACE_ARG3_TYPE.
7752 (usr_store_inferior_registers): Ditto.
7753 (linux_read_memory, linux_write_memory): Ditto.
7754 (linux_test_for_tracefork): Ditto.
7755
3743bb4f
DE
7756 * linux-arm-low.c: Remove redundant include of gdb_proc_service.h.
7757 Only include elf.h if gdb_proc_service.h didn't include linux/elf.h.
7758
8b315be5
PA
77592010-01-21 Pedro Alves <pedro@codesourcery.com>
7760
7761 * proc-service.c (ps_lgetregs): Don't refetch registers from the
7762 target.
7763
85492558
PA
77642010-01-21 Pedro Alves <pedro@codesourcery.com>
7765
7766 * spu-low.c (spu_fetch_registers, spu_store_registers): Change
7767 prototype to take a regcache. Adjust.
7768
442ea881
PA
77692010-01-20 Pedro Alves <pedro@codesourcery.com>
7770
7771 * regcache.h (struct thread_info): Forward declare.
7772 (struct regcache): New.
7773 (new_register_cache): Adjust prototype.
7774 (get_thread_regcache): Declare.
7775 (free_register_cache): Adjust prototype.
7776 (registers_to_string, registers_from_string): Ditto.
7777 (supply_register, supply_register_by_name, collect_register)
7778 (collect_register_as_string, collect_register_by_name): Ditto.
7779 * regcache.c (struct inferior_regcache_data): Delete.
7780 (get_regcache): Rename to ...
7781 (get_thread_regcache): ... this. Adjust. Switch inferior before
7782 fetching registers.
7783 (regcache_invalidate_one): Adjust.
7784 (regcache_invalidate): Fix prototype.
7785 (new_register_cache): Return the new register cache.
7786 (free_register_cache): Change prototype.
7787 (realloc_register_cache): Adjust.
7788 (registers_to_string): Change prototype to take a regcache. Adjust.
7789 (registers_from_string): Ditto.
7790 (register_data): Ditto.
7791 (supply_register): Ditto.
7792 (supply_register_by_name): Ditto.
7793 (collect_register): Ditto.
7794 (collect_register_as_string): Ditto.
7795 (collect_register_by_name): Ditto.
7796 * server.c (process_serial_event): Adjust.
7797 * linux-low.h (regset_fill_func, regset_store_func): Change
7798 prototype.
7799 (get_pc, set_pc, collect_ptrace_register, supply_ptrace_register):
7800 Change prototype.
7801 * linux-low.c (get_stop_pc): Adjust.
7802 (check_removed_breakpoint): Adjust.
7803 (linux_wait_for_event): Adjust.
7804 (linux_resume_one_lwp): Adjust.
7805 (fetch_register): Add regcache parameter. Adjust.
7806 (usr_store_inferior_registers): Ditto.
7807 (regsets_fetch_inferior_registers): Ditto.
7808 (regsets_store_inferior_registers): Ditto.
7809 (linux_fetch_registers, linux_store_registers): Ditto.
7810 * i387-fp.c (i387_cache_to_fsave): Change prototype to take a
7811 regcache. Adjust.
43aaf8b6
PA
7812 (i387_fsave_to_cache, i387_cache_to_fxsave, i387_fxsave_to_cache):
7813 Ditto.
442ea881
PA
7814 * i387-fp.h (i387_cache_to_fsave, i387_fsave_to_cache): Change
7815 prototype to take a regcache.
7816 (i387_cache_to_fxsave, i387_fxsave_to_cache): Ditto.
7817 * remote-utils.c (convert_ascii_to_int, outreg)
7818 (prepare_resume_reply): Change prototype to take a regcache.
7819 Adjust.
7820 * target.h (struct target_ops) <fetch_registers, store_registers>:
7821 Change prototype to take a regcache.
7822 (fetch_inferior_registers, store_inferior_registers): Change
7823 prototype to take a regcache. Adjust.
7824 * proc-service.c (ps_lgetregs): Adjust.
7825 * linux-x86-low.c (x86_fill_gregset, x86_store_gregset)
7826 (x86_fill_fpregset, x86_store_fpregset, x86_fill_fpxregset)
7827 (x86_store_fpxregset, x86_get_pc, x86_set_pc): Change prototype to
7828 take a regcache. Adjust.
7829 * linux-arm-low.c (arm_fill_gregset, arm_store_gregset)
7830 (arm_fill_wmmxregset, arm_store_wmmxregset, arm_fill_vfpregset)
7831 (arm_store_vfpregset, arm_get_pc, arm_set_pc):
7832 (arm_breakpoint_at): Change prototype to take a regcache. Adjust.
7833 * linux-cris-low.c (cris_get_pc, cris_set_pc)
7834 (cris_cannot_fetch_register):
7835 (cris_breakpoint_at): Change prototype to take a regcache.
7836 Adjust.
7837 * linux-crisv32-low.c (cris_get_pc, cris_set_pc,
7838 cris_reinsert_addr, cris_write_data_breakpoint): Change prototype
7839 to take a regcache. Adjust.
7840 (cris_breakpoint_at, cris_insert_point, cris_remove_point):
7841 Adjust.
7842 * linux-m32r-low.c (m32r_get_pc, m32r_set_pc): Change prototype to
7843 take a regcache. Adjust.
7844 * linux-m68k-low.c (m68k_fill_gregset, m68k_store_gregset)
7845 (m68k_fill_fpregset, m68k_store_fpregset, m68k_get_pc,
7846 (m68k_set_pc): Change prototype to take a regcache. Adjust.
7847 * linux-mips-low.c (mips_get_pc):
7848 (mips_set_pc): Change prototype to take a regcache. Adjust.
7849 (mips_reinsert_addr): Adjust.
7850 (mips_collect_register): Change prototype to take a regcache.
7851 Adjust.
7852 (mips_supply_register):
7853 (mips_collect_register_32bit, mips_supply_register_32bit)
7854 (mips_fill_gregset, mips_store_gregset, mips_fill_fpregset)
7855 (mips_store_fpregset): Ditto.
43aaf8b6
PA
7856 * linux-ppc-low.c (ppc_supply_ptrace_register)
7857 (ppc_supply_ptrace_register): Ditto.
442ea881
PA
7858 (parse_spufs_run): Adjust.
7859 (ppc_get_pc, ppc_set_pc, ppc_fill_gregset, ppc_fill_vsxregset)
7860 (ppc_store_vsxregset, ppc_fill_vrregset, ppc_store_vrregset)
7861 (ppc_fill_evrregset, ppc_store_evrregset): Change prototype to
7862 take a regcache. Adjust.
7863 * linux-s390-low.c (s390_collect_ptrace_register)
7864 (s390_supply_ptrace_register, s390_fill_gregset, s390_get_pc)
7865 (s390_set_pc): Change prototype to take a regcache. Adjust.
7866 (s390_arch_setup): Adjust.
7867 * linux-sh-low.c (sh_get_pc, sh_breakpoint_at)
7868 (sh_fill_gregset): Change prototype to take a regcache. Adjust.
7869 * linux-sparc-low.c (sparc_fill_gregset_to_stack)
7870 (sparc_fill_gregset, sparc_store_gregset_from_stack)
7871 (sparc_store_gregset, sparc_get_pc): Change prototype to take a
7872 regcache. Adjust.
7873 (sparc_breakpoint_at): Adjust.
7874 * linux-xtensa-low.c (xtensa_fill_gregset):
7875 (xtensa_store_gregset):
7876 (xtensa_fill_xtregset, xtensa_store_xtregset, xtensa_get_pc)
7877 (xtensa_set_pc): Change prototype to take a regcache. Adjust.
7878 * nto-low.c (nto_fetch_registers, nto_store_registers): Change
7879 prototype to take a regcache. Adjust.
7880 * win32-arm-low.c (arm_fetch_inferior_register)
7881 (arm_store_inferior_register): Change prototype to take a
7882 regcache. Adjust.
7883 * win32-i386-low.c (i386_fetch_inferior_register)
7884 (i386_store_inferior_register): Change prototype to take a
7885 regcache. Adjust.
7886 * win32-low.c (child_fetch_inferior_registers)
7887 (child_store_inferior_registers): Change prototype to take a
7888 regcache. Adjust.
7889 (win32_wait): Adjust.
7890 (win32_fetch_inferior_registers): Change prototype to take a
7891 regcache. Adjust.
7892 (win32_store_inferior_registers): Adjust.
7893 * win32-low.h (struct win32_target_ops) <fetch_inferior_register,
7894 store_inferior_register>: Change prototype to take a regcache.
7895
60c3d7b0
DE
78962010-01-20 Doug Evans <dje@google.com>
7897
7898 * linux-low.c (linux_create_inferior): Wrap use of __SIGRTMIN in
7899 #ifdef.
7900 (linux_wait_for_event1, linux_init_signals): Ditto.
ec8ebe72 7901 (W_STOPCODE): Provide definition if missing.
60c3d7b0 7902
dc146f7c
VP
79032010-01-13 Vladimir Prus <vladimir@codesourcery.com>
7904
7905 * linux-low.c (linux_core_of_thread): New.
7906 (compare_ints, show_process, list_threads): New.
7907 (linux_qxfer_osdata): Report threads and cores.
7908 (linux_target_op): Register linux_core_of_thread.
7909 * remote-utils.c (prepare_resume_reply): Report the core.
7910 (buffer_xml_printf): Support %d specifier.
7911 * server.c (handle_threads_qxfer_proper, handle_threads_qxfer):
7912 New.
7913 (handle_query): Handle qXfer:threads. Announce availability
7914 thereof.
7915 * target.h (struct target_ops): New field core_of_thread.
7916
7803799a
UW
79172010-01-04 Ulrich Weigand <uweigand@de.ibm.com>
7918
7919 * Makefile.in (clean): Remove new generated files.
7920 (reg-s390.o, reg-s390.c): Remove rules.
7921 (reg-s390x.o, reg-s390x.c): Likewise.
7922 (s390-linux32.o, s390-linux32.c): Add rules.
7923 (s390-linux64.o, s390-linux64.c): Likewise.
7924 (s390x-linux64.o, s390x-linux64.c): Likewise.
7925 * configure.srv (s390*-*-linux*): Update srv_regobj and srv_xmlfiles.
7926 * linux-s390-low.c: Include <elf.h>.
7927 (HWCAP_S390_HIGH_GPRS): Define if undefined.
7928 (init_registers_s390): Remove prototype.
7929 (init_registers_s390x): Likewise.
7930 (init_registers_s390_linux32): Add prototype.
7931 (init_registers_s390_linux64): Likewise.
7932 (init_registers_s390x_linux64): Likewise.
7933 (s390_num_regs_3264): New define.
7934 (s390_regmap_3264): New global variable.
7935 (s390_cannot_fetch_register): Remove obsolete check.
7936 (s390_cannot_store_register): Likewise.
7937 (s390_collect_ptrace_register): Handle upper/lower register halves.
7938 (s390_supply_ptrace_register): Likewise.
7939 (s390_fill_gregset): Update to register number changes.
7940 (s390_get_hwcap): New routine.
7941 (s390_arch_setup): Detect 32-bit process running on 64-bit system.
7942 Install appropriate regmap and register set.
7943
6e7ffa39
JB
79442010-01-01 Joel Brobecker <brobecker@adacore.com>
7945
7946 * server.c (gdbserver_version): Update copyright year to 2010.
7947 * gdbreplay.c (gdbreplay_version): Likewise.
7948
957f3f49
DE
79492009-12-28 Doug Evans <dje@google.com>
7950
7951 * linux-low.c: Delete inclusion of ansidecl.h, elf/common.h,
7952 elf/external.h. Include <elf.h> instead but only if necessary.
7953
ca5c370d
PA
79542009-12-28 Pedro Alves <pedro@codesourcery.com>
7955
7956 * linux-low.c (linux_remove_process): Remove `detaching'
7957 parameter. Don't release/detach from thread_db here.
7958 (linux_kill): Release/detach from thread_db here, ...
7959 (linux_detach): ... and here, before actually detaching.
7960 (linux_wait_1): ... and here, when a process exits.
7961 * thread-db.c (any_thread_of): New.
7962 (thread_db_free): Switch the current inferior to a thread of the
7963 passed in process.
7964
4ee62156
DE
79652009-12-21 Doug Evans <dje@google.com>
7966
d90e6a88
DE
7967 * linux-x86-low.c: Delete outdated comment about Elf32_Phdr.
7968
c5f62d5f
DE
7969 * linux-low.c (kill_lwp): Use __NR_tkill instead of SYS_tkill.
7970 Move definition of tkill_failed to ifdef __NR_tkill to avoid gcc
7971 warning ifndef __NR_tkill. Move setting of errno there too.
7972 Delete unnecessary resetting of errno after syscall.
7973 Minor comment changes to match gdb/linux-nat.c:kill_lwp.
7974
10e86dd7
DE
7975 * configure.ac: Check for dladdr.
7976 * config.in: Regenerate.
7977 * configure: Regenerate.
7978 * thread-db.c (dladdr_to_soname): Only define ifdef HAVE_DLADDR.
7979 (try_thread_db_load): Update.
7980
4ee62156
DE
7981 * linux-low.c (my_waitpid): Delete unnecessary prototype.
7982
00f515da
DE
79832009-12-18 Doug Evans <dje@google.com>
7984
e9464885
DE
7985 * event-loop.c: Include unistd.h if it exists.
7986
07d4f67e
DE
7987 * linux-low.c (my_waitpid): Move definition away from being in
7988 between linux_tracefork_child/linux_test_for_tracefork.
7989
00f515da
DE
7990 * gdb_proc_service.h (psaddr_t): Fix type.
7991 * thread-db.c (thread_db_info.td_thr_tls_get_addr_p): Fix
7992 signature to match glibc.
7993
1de1badb
DE
79942009-12-16 Doug Evans <dje@google.com>
7995
7996 * linux-low.c (linux_read_memory): Fix argument to read.
7997
aeeb81d1
PA
79982009-11-26 Pedro Alves <pedro@codesourcery.com>
7999
8000 * win32-low.c (get_child_debug_event): On EXIT_THREAD_DEBUG_EVENT
8001 events, don't leave current_inferior pointing at null.
8002
10357975
PA
80032009-11-26 Pedro Alves <pedro@codesourcery.com>
8004
8005 * win32-low.c (LOG): Delete.
8006 (OUTMSG): Output to stderr.
8007 (OUTMSG2): Conditionalize on `debug_threads' variable, instead of
8008 on compile time LOG macro.
8009 (win32_wait): Fix debug output.
8010
cf6e3471
PA
80112009-11-26 Pedro Alves <pedro@codesourcery.com>
8012
8013 * win32-low.c (win32_add_one_solib): If the dll name is
8014 "ntdll.dll", prepend the system directory to the dll path.
8015
0c85e18e
MK
80162009-11-17 Daniel Jacobowitz <dan@codesourcery.com>
8017
8018 * m68k-tdep.c (m68k_gdbarch_init): Reuse previous initialization.
8019
9ac544ce 80202009-11-17 Nathan Sidwell <nathan@codesourcery.com>
889bf7c5 8021 Vladimir Prus <vladimir@codesourcery.com>
9ac544ce
MK
8022
8023 * Makefile.in (reg-cf.o, reg-cf.c): New targets.
8024 * configure.ac: Check for __mcoldfire__ and set
8025 gdb_cv_m68k_is_coldfire.
8026 * configure.srv: Use gdb_cv_m68k_is_coldfire to select between
8027 reg-cf.o and reg-m68k.o.
8028 * configure: Regenerated.
8029
fd7dd3e6
PA
80302009-11-16 Pedro Alves <pedro@codesourcery.com>
8031
8032 * linux-low.c (linux_remove_process): Add `detaching' parameter.
8033 Pass it to thread_db_free.
8034 (linux_kill, linux_detach, linux_wait_1): Adjust to pass the
8035 proper `detaching' argument to linux_remove_process.
8036 * linux-low.h (thread_db_free): Add `detaching' parameter.
8037 * thread-db.c (thread_db_init): Pass false as `detaching' argument
8038 to thread_db_free.
8039 (thread_db_free): Add `detaching' parameter. Only
8040 call td_ta_clear_event if detaching from process.
8041
75aa492e
MK
80422009-11-12 Maxim Kuvyrkov <maxim@codesourcery.com>
8043
8044 * thread-db.c (thread_db_free): Fix typo.
8045
21e1bee4
PP
80462009-11-11 Paul Pluzhnikov <ppluzhnikov@google.com>
8047
8048 PR gdb/10838
8049 * thread-db.c (thread_db_free): Call td_ta_clear_event.
8050
8838b45e
NS
80512009-11-03 Nathan Sidwell <nathan@codesourcery.com>
8052
8053 * configure.ac (i[34567]86-*): Check if we're targetting x86-64
8054 with an i686 compiler.
8055 * configure.srv (i[34567]86-*-linux*): Pull in x86-64 handling if
8056 needed.
8057 * configure: Rebuilt.
8058
8a35fb51
SL
80592009-10-29 Sandra Loosemore <sandra@codesourcery.com>
8060
8061 PR gdb/10783
8062
8063 * server.c (handle_search_memory_1): Correct read_addr initialization
8064 in loop for searching subsequent chunks.
8065
96f15937
PP
80662009-10-29 Paul Pluzhnikov <ppluzhnikov@google.com>
8067
8068 * configure.ac: New --with-libthread-db option.
8069 * thread-db.c: Allow direct dependence on libthread_db.
8070 (thread_db_free): Adjust.
8071 * config.in: Regenerate.
8072 * configure: Likewise.
889bf7c5 8073
5f7d1694
PP
80742009-10-28 Paul Pluzhnikov <ppluzhnikov@google.com>
8075
8076 PR gdb/10757
8077 * thread-db.c (attach_thread): New function.
8078 (maybe_attach_thread): Return success/failure.
8079 (find_new_threads_callback): Adjust.
889bf7c5
PA
8080 (thread_db_find_new_threads): Loop until no new threads.
8081
88e3b899
PA
80822009-10-13 Pedro Alves <pedro@codesourcery.com>
8083
8084 * proc-service.c (ps_lgetregs): Formatting.
8085
cdbfd419
PP
80862009-10-08 Paul Pluzhnikov <ppluzhnikov@google.com>
8087
8088 * acinclude.m4: (SRV_CHECK_THREAD_DB, SRV_CHECK_TLS_GET_ADDR): Remove.
8089 * configure.ac: Adjust.
8090 * linux-low.h (struct process_info_private): Move members to struct
8091 thread_db.
8092 (thread_db_free, thread_db_handle_monitor_command): New prototype.
8093 * linux-low.c (linux_remove_process): Adjust.
8094 (linux_wait_for_event_1, linux_look_up_symbols): Likewise.
8095 * server.c (handle_query): Move code ...
8096 (handle_monitor_command): ... here. New function.
8097 * target.h (struct target_ops): New member.
8098 * thread-db.c (struct thread_db): New.
8099 (libthread_db_search_path): New variable.
8100 (thread_db_create_event, thread_db_enable_reporting)
8101 (find_one_thread, maybe_attach_thread, find_new_threads_callback)
8102 (thread_db_find_new_threads, (thread_db_get_tls_address): Adjust.
8103 (try_thread_db_load_1, dladdr_to_soname): New functions.
8104 (try_thread_db_load, thread_db_load_search): New functions.
8105 (thread_db_init): Search for libthread_db.
8106 (thread_db_free): New function.
8107 (thread_db_handle_monitor_command): Likewise.
8108 * config.in: Regenerate.
8109 * configure: Regenerate.
889bf7c5 8110
4168d2d6
UW
81112009-09-27 Ulrich Weigand <uweigand@de.ibm.com>
8112
8113 * spu-low.c (spu_kill): Wait for inferior to terminate.
8114 Call clear_inferiors.
8115 (spu_detach): Call clear_inferiors.
8116
81ecdfbb
RW
81172009-08-22 Ralf Wildenhues <Ralf.Wildenhues@gmx.de>
8118
8119 * aclocal.m4: Regenerate.
8120 * config.in: Likewise.
8121 * configure: Likewise.
8122
0b9ff2c0
UW
81232009-07-31 Ulrich Weigand <uweigand@de.ibm.com>
8124
8125 * linux-ppc-low.c (INSTR_SC, NR_spu_run): Define.
8126 (parse_spufs_run): New function.
8127 (ppc_get_pc, ppc_set_pc): Detect and handle SPU PC.
8128 (ppc_breakpoint_at): Handle SPU breakpoints.
8129
efcbbd14
UW
81302009-07-31 Ulrich Weigand <uweigand@de.ibm.com>
8131
8132 * linux-low.c: Include <sys/stat.h> and <sys/vfs.h>.
8133 (SPUFS_MAGIC): Define.
8134 (spu_enumerate_spu_ids): New function.
8135 (linux_qxfer_spu): New function.
8136 (linux_target_ops): Install linux_qxfer_spu.
8137
f4d9bade
UW
81382009-07-31 Ulrich Weigand <uweigand@de.ibm.com>
8139
8140 * configure.srv (powerpc*-*-linux*): Add powerpc-cell32l.o
8141 and powerpc-cell64l.o to srv_regobj. Add rs6000/powerpc-cell32l.xml
8142 and rs6000/powerpc-cell64l.xml to srv_xmlfiles.
8143 * Makefile.in (powerpc-cell32l.o, powerpc-cell32l.c): New rules.
8144 (powerpc-cell64l.o, powerpc-cell64l.c): Likewise.
8145 (clean): Handle powerpc-cell32l.c and powerpc-cell64l.c.
8146 * linux-ppc-low.c (PPC_FEATURE_CELL): Define.
8147 (init_registers_powerpc_cell32l): Add prototype.
8148 (init_registers_powerpc_cell64l): Likewise.
8149 (ppc_arch_setup): Detect Cell/B.E. architecture.
8150
96e946ca
RW
81512009-07-30 Ralf Wildenhues <Ralf.Wildenhues@gmx.de>
8152
8153 * Makefile.in (datarootdir): New variable.
8154
58d6951d
DJ
81552009-07-28 Daniel Jacobowitz <dan@codesourcery.com>
8156
8157 * linux-low.c (linux_write_memory): Update debugging output.
8158 * Makefile.in (clean): Add new descriptions.
8159 (arm-with-vfpv2.o, arm-with-vfpv2.c, arm-with-vfpv3.o)
8160 (arm-with-vfpv3.c, arm-with-neon.o, arm-with-neon.c): New rules.
8161 * configure.srv: Add new files for arm*-*-linux*.
8162 * linux-arm-low.c: Add new declarations.
8163 (PTRACE_GETVFPREGS, PTRACE_SETVFPREGS): Define if undefined.
8164 (arm_hwcap, HWCAP_VFP, HWCAP_IWMMXT, HWCAP_NEON, HWCAP_VFPv3)
8165 (HWCAP_VFPv3D16): New.
8166 (arm_fill_wmmxregset, arm_store_wmmxregset): Check HWCAP_IWMMXT
8167 instead of __IWMMXT__.
8168 (arm_fill_vfpregset, arm_store_vfpregset, arm_get_hwcap)
8169 (arm_arch_setup): New.
8170 (target_regsets): Remove #ifdef. Add VFP regset.
8171 (the_low_target): Use arm_arch_setup.
8172
12b42a12
DJ
81732009-07-28 Daniel Jacobowitz <dan@codesourcery.com>
8174
8175 * linux-low.c (linux_kill_one_lwp): Adjust kernel workaround to skip
8176 the main thread again.
8177
ac8c974e
AR
81782009-07-06 Aleksandar Ristovski <aristovski@qnx.com>
8179
8180 Adding Neutrino gdbserver.
8181 * configure: Regenerated.
8182 * configure.ac: Add case for srv_qnx and set LIBS accordingly.
8183 * configure.srv (i[34567]86-*-nto*): New target.
8184 * nto-low.c, nto-low.h, nto-x86-low.c: New files.
8185 * remote-utils.c [__QNX__]: Include sys/iomgr.h
8186 (nto_comctrl) [__QNX__]: New function.
8187 (enable_async_io, disable_async_io) [__QNX__]: Call nto_comctrl.
8188
4424e0c3 81892009-07-05 Danny Backx <dannybackx@users.sourceforge.net>
7437790a
PA
8190
8191 * configure.srv (i[34567]86-*-mingw32ce*): Add i386-low.o to
8192 srv_tgtobj.
8193
912cf4ba
PA
81942009-07-04 Danny Backx <dannybackx@users.sourceforge.net>
8195 Pedro Alves <pedro@codesourcery.com>
8196
8197 * win32-i386-low.c (i386_get_thread_context): Handle systems that
8198 don't support CONTEXT_EXTENDED_REGISTERS.
8199 (i386_win32_breakpoint, i386_win32_breakpoint_len): New.
8200 (the_low_target): Install them.
8201 * win32-low.c (get_child_debug_event): Handle WaitForDebugEvent
8202 failing with ERROR_PIPE_NOT_CONNECTED.
8203
aa5ca48f
DE
82042009-06-30 Doug Evans <dje@google.com>
8205 Pierre Muller <muller@ics.u-strasbg.fr>
8206
8207 Add h/w watchpoint support to x86-linux, win32-i386.
8208 * Makefile.in (SFILES): Add i386-low.c
8209 (i386_low_h): Define.
8210 (i386-low.o): Add dependencies.
8211 (linux-x86-low.o): Add i386-low.h dependency.
8212 (win32-i386-low.o): Ditto.
8213 * i386-low.c: New file.
8214 * i386-low.h: New file.
8215 * configure.srv (i[34567]86-*-cygwin*): Add i386-low.o to srv_tgtobj.
8216 (i[34567]86-*-linux*, i[34567]86-*-mingw*, x86_64-*-linux*): Ditto.
8217 * linux-low.c (linux_add_process): Initialize arch_private.
8218 (linux_remove_process): Free arch_private.
8219 (add_lwp): Initialize arch_private.
8220 (delete_lwp): Free arch_private.
8221 (linux_resume_one_lwp): Call the_low_target.prepare_to_resume if
8222 provided.
8223 * linux-low.h (process_info_private): New member arch_private.
8224 (lwp_info): New member arch_private.
8225 (linux_target_ops): New members new_process, new_thread,
8226 prepare_to_resume.
8227 (ptid_of): New macro.
8228 * linux-x86-low.c: Include stddef.h, i386-low.h.
8229 (arch_process_info): New struct.
8230 (arch_lwp_info): New struct.
8231 (x86_linux_dr_get, x86_linux_dr_set): New functions.
8232 (i386_dr_low_set_addr, i386_dr_low_set_control): New functions.
8233 (i386_dr_low_get_status): New function.
8234 (x86_insert_point, x86_remove_point): New functions.
8235 (x86_stopped_by_watchpoint): New function.
8236 (x86_stopped_data_address): New function.
8237 (x86_linux_new_process, x86_linux_new_thread): New functions.
8238 (x86_linux_prepare_to_resume): New function.
8239 (the_low_target): Add entries for insert_point, remove_point,
8240 stopped_by_watchpoint, stopped_data_address, new_process, new_thread,
8241 prepare_to_resume.
8242 * server.c (debug_hw_points): New global.
8243 (monitor_show_help): Document set debug-hw-points.
8244 (handle_query): Process "set debug-hw-points".
8245 * server.h (debug_hw_points): Declare.
8246 (paddress): Declare.
8247 * utils.c (NUMCELLS, CELLSIZE): New macros.
8248 (get_sell, xsnprintf, paddress): New functions.
8249 * win32-arm-low.c (the_low_target): Add entries for insert_point,
8250 remove_point, stopped_by_watchpoint, stopped_data_address.
8251 * win32-i386-low.c: Include i386-low.h.
8252 (debug_reg_state): Replaces dr.
8253 (i386_dr_low_set_addr, i386_dr_low_set_control): New functions.
8254 (i386_dr_low_get_status): New function.
8255 (i386_insert_point, i386_remove_point): New functions.
8256 (i386_stopped_by_watchpoint): New function.
8257 (i386_stopped_data_address): New function.
8258 (i386_initial_stuff): Update.
8259 (get_thread_context,set_thread_context,i386_thread_added): Update.
8260 (the_low_target): Add entries for insert_point,
8261 remove_point, stopped_by_watchpoint, stopped_data_address.
8262 * win32-low.c (win32_insert_watchpoint): New function.
8263 (win32_remove_watchpoint): New function.
8264 (win32_stopped_by_watchpoint): New function.
8265 (win32_stopped_data_address): New function.
8266 (win32_target_ops): Add entries for insert_watchpoint,
8267 remove_watchpoint, stopped_by_watchpoint, stopped_data_address.
8268 * win32-low.h (win32_target_ops): New members insert_point,
8269 remove_point, stopped_by_watchpoint, stopped_data_address.
8270
d993e290
PA
82712009-06-25 Pedro Alves <pedro@codesourcery.com>
8272
8273 * server.c (process_serial_event): Re-return unsupported, not
8274 error, if the type isn't recognized. Re-allow supporting only
8275 insert or remove packets. Also call require_running for
8276 breakpoints. Add missing break statement to default case. Tidy.
8277 * target.h (struct target_ops): Rename insert_watchpoint to
8278 insert_point, and remove_watchpoint to remove_point.
8279
8280 * linux-low.h (struct linux_target_ops): Likewise.
8281 * linux-low.c (linux_insert_watchpoint): Rename to ...
8282 (linux_insert_point): ... this. Adjust.
8283 (linux_remove_watchpoint): Rename to ...
8284 (linux_remove_point): ... this. Adjust.
8285 (linux_target_ops): Adjust.
8286 * linux-crisv32-low.c (cris_insert_watchpoint): Rename to ...
8287 (cris_insert_point): ... this.
8288 (cris_remove_watchpoint): Rename to ...
8289 (cris_remove_point): ... this.
8290 (the_low_target): Adjust.
8291
0f54c268
PM
82922009-06-24 Pierre Muller <muller@ics.u-strasbg.fr>
8293
8294 * server.c (handle_v_kill): Pass signal_pid to
8295 kill_inferior if multi_process is zero.
8296
c6314022
AR
82972009-06-23 Aleksandar Ristovski <aristovski@qnx.com>
8298
8299 * server.c (process_serial_event): Add support for Z0 and Z1 packet.
8300 * target.h (target_ops): Comment for *_watchpoint to make it clear
8301 the functions can get types '0' and '1'.
8302
4463ce24
AR
83032009-06-22 Aleksandar Ristovski <aristovski@qnx.com>
8304
8305 * linux-low.c (usr_fetch_inferior_registers): Remove check for regno 0.
8306 * proc-service.c (ps_lgetregs): Pass -1 to fetch all registers.
8307 * regcache.c (get_regcache): Likewise.
8308 * spu-low.c (spu_fetch_registers): Remove 0 to -1 conversion.
8309 * win32-low.c (child_fetch_inferior_registers): Remove check for
8310 regno 0.
8311
cf8fd78b
PA
83122009-06-19 Aleksandar Ristovski <aristovski@qnx.com>
8313 Pedro Alves <pedro@codesourcery.com>
8314
8315 * target.h (struct target_ops) <supports_multi_process>: New
8316 callback.
8317 (target_supports_multi_process): New.
8318 * server.c (handle_query): Even if GDB reports support, only
8319 enable multi-process if the target also supports it. Report
8320 multi-process support only if the target backend supports it.
8321 * linux-low.c (linux_supports_multi_process): New function.
8322 (linux_target_ops): Install it as target_supports_multi_process
8323 callback.
8324
47c0c975
DE
83252009-05-24 Doug Evans <dje@google.com>
8326
e09875d4
DE
8327 Global renaming of find_thread_pid to find_thread_ptid.
8328 * server.h (find_thread_ptid): Renamed from find_thread_pid.
8329 * inferiors.c (find_thread_ptid): Renamed from find_thread_pid.
8330 All callers updated.
8331
e27d73f6
DE
8332 * linux-low.c (handle_extended_wait): Use linux_resume_one_lwp
8333 to resume the newly created thread, don't call ptrace (PTRACE_CONT)
8334 directly.
8335
47c0c975
DE
8336 * linux-low.c (get_stop_pc): Print pc if debug_threads.
8337 (check_removed_breakpoint, linux_wait_for_lwp): Ditto.
8338 (linux_resume_one_lwp): Ditto.
8339
2acc282a
DE
83402009-05-23 Doug Evans <dje@google.com>
8341
8342 * linux-low.c (linux_resume_one_lwp): Change type of first arg
8343 from struct inferior_list_entry * to struct lwp_info *.
8344 All callers updated.
8345
9f1036c1
DE
83462009-05-13 Doug Evans <dje@google.com>
8347
8348 * linux-x86-low.c: Don't include assert.h.
8349 (x86_siginfo_fixup): Use fatal, not assert.
8350 (x86_arch_setup): Fix comment.
8351
d0722149
DE
83522009-05-12 Doug Evans <dje@google.com>
8353
8354 Biarch support for i386/amd64 gdbserver.
8355 * Makefile.in (SFILES): Remove linux-i386-low.c, linux-x86-64-low.c.
8356 Add linux-x86-low.c.
8357 (linux-i386-low.o, linux-x86-64-low.o): Delete.
8358 (linux-x86-low.o): Add.
8359 * linux-x86-64-low.c: Delete.
8360 * linux-i386-low.c: Delete.
8361 * linux-x86-low.c: New file.
8362 * configure.srv (i?86-linux srv_tgtobj): Replace linux-i386-low.o with
8363 linux-x86-low.o.
8364 (x86_64-linux srv_tgtobj): Replace linux-x86-64-low.o with
8365 linux-x86-low.o.
8366 (x86_64-linux srv_regobj): Add reg-i386-linux.o.
8367 * linux-low.c: Include ansidecl.h, elf/common.h, elf/external.h.
8368 (linux_child_pid_to_exec_file): New function.
8369 (elf_64_header_p, elf_64_file_p): New functions.
8370 (siginfo_fixup): New function.
8371 (linux_xfer_siginfo): New local inf_siginfo. Call siginfo_fixup to
8372 give target a chance to convert layout.
8373 * linux-low.h (linux_target_ops): New member siginfo_fixup.
8374 (linux_child_pid_to_exec_file, elf_64_file_p): Declare.
8375
fdeb2a12
DE
83762009-05-07 Doug Evans <dje@google.com>
8377
8378 * linux-low.c (regsets_fetch_inferior_registers): Fix memory leak.
8379 (regsets_store_inferior_registers): Ditto.
8380
a6dbe5df
PA
83812009-05-06 Pedro Alves <pedro@codesourcery.com>
8382
8383 PR server/10048
8384
8385 * linux-low.c (must_set_ptrace_flags): Delete.
8386 (linux_create_inferior): Set `lwp->must_set_ptrace_flags' instead
8387 of the global.
8388 (linux_attach_lwp_1): Don't set PTRACE_SETOPTIONS here. Set
8389 `lwp->must_set_ptrace_flags' instead.
ba42693b 8390 (linux_wait_for_event_1): Set ptrace options here.
a6dbe5df
PA
8391 (linux_wait_1): ... not here.
8392
5091eb23
DE
83932009-04-30 Doug Evans <dje@google.com>
8394
9f767825
DE
8395 * inferiors.c (started_inferior_callback): New function.
8396 (attached_inferior_callback): New function.
8397 (have_started_inferiors_p, have_attached_inferiors_p): New functions.
8398 * server.c (print_started_pid, print_attached_pid): New functions.
8399 (detach_or_kill_for_exit): New function.
8400 (main): Call it instead of for_each_inferior (kill_inferior_callback).
8401 * server.h (have_started_inferiors_p): Declare.
8402 (have_attached_inferiors_p): Declare.
8403
5091eb23
DE
8404 * inferiors.c (remove_process): Fix memory leak, free process.
8405 * linux-low.c (linux_remove_process): New function.
8406 (linux_kill): Call it instead of remove_process.
8407 (linux_detach, linux_wait_1): Ditto.
8408
155c8968
PA
84092009-04-19 Danny Backx <dannybackx@users.sourceforge.net>
8410
8411 * configure.srv: Add x86 Windows CE target.
8412
7fe519cb
UW
84132009-04-03 Ulrich Weigand <uweigand@de.ibm.com>
8414
8415 * inferiors.c (get_thread_process): Make global.
8416 * server.h (get_thread_process): Add prototype.
8417 * thread-db.c (find_one_thread): Use get_thread_process
8418 instead of current_process.
8419 (thread_db_get_tls_address): Do not crash if called when
8420 thread layer is not yet initialized.
8421
5472f405
UW
84222009-04-03 Ulrich Weigand <uweigand@de.ibm.com>
8423
8424 * remote-utils.c (prepare_resume_reply): Null-terminate packet.
8425 * spu-low.c (current_tid): Rename to ...
8426 (current_ptid): ... this.
8427 (fetch_ppc_register, fetch_ppc_memory, store_ppc_memory,
8428 spu_proc_xfer_spu, spu_resume, spu_request_interrupt): Use
8429 ptid_get_lwp (current_ptid) instead of current_tid.
8430 (spu_kill, spu_detach, spu_join, spu_wait): Use pid argument
8431 instead of current_tid. Use find_process_pid to verify pid
8432 argument is valid. Pass proper argument to remove_process.
8433 (spu_thread_alive): Compare current_ptid instead of current_tid.
8434 (spu_resume): Likewise.
8435
55ac2b99
PA
84362009-04-02 Pedro Alves <pedro@codesourcery.com>
8437
8438 * linux-low.c (usr_store_inferior_registers): Declare local `pid'
8439 variable.
8440
95954743
PA
84412009-04-01 Pedro Alves <pedro@codesourcery.com>
8442
8443 Implement the multiprocess extensions, and add linux multiprocess
8444 support.
8445
8446 * server.h (ULONGEST): Declare.
8447 (struct ptid, ptid_t): New.
8448 (minus_one_ptid, null_ptid): Declare.
8449 (ptid_build, pid_to_ptid, ptid_get_pid, ptid_get_lwp)
8450 (ptid_get_tid, ptid_equal, ptid_is_pid): Declare.
8451 (struct inferior_list_entry): Change `id' type from unsigned from
8452 to ptid_t.
8453 (struct sym_cache, struct breakpoint, struct
8454 process_info_private): Forward declare.
8455 (struct process_info): Declare.
8456 (current_process): Declare.
8457 (all_processes): Declare.
8458 (initialize_inferiors): Declare.
8459 (add_thread): Adjust to use ptid_t.
8460 (thread_id_to_gdb_id, thread_to_gdb_id, gdb_id_to_thread_id): Ditto.
8461 (add_process, remove_process, find_thread_pid): Declare.
8462 (find_inferior_id): Adjust to use ptid_t.
8463 (cont_thread, general_thread, step_thread): Change type to ptid_t.
8464 (multi_process): Declare.
8465 (push_event): Adjust to use ptid_t.
8466 (read_ptid, write_ptid): Declare.
8467 (prepare_resume_reply): Adjust to use ptid_t.
8468 (clear_symbol_cache): Declare.
8469 * inferiors.c (all_processes): New.
8470 (null_ptid, minus_one_ptid): New.
8471 (ptid_build, pid_to_ptid, ptid_get_pid, ptid_get_lwp)
8472 (ptid_get_tid, ptid_equal, ptid_is_pid): New.
8473 (add_thread): Change unsigned long to ptid. Remove gdb_id
8474 parameter. Adjust.
8475 (thread_id_to_gdb_id, thread_to_gdb_id): Change unsigned long to ptid.
8476 (gdb_id_to_thread): Rename to ...
8477 (find_thread_pid): ... this. Change unsigned long to ptid.
8478 (gdb_id_to_thread_id, find_inferior_id): Change unsigned long to ptid.
8479 (loaded_dll, pull_pid_from_list): Adjust.
8480 (add_process, remove_process, find_process_pid)
8481 (get_thread_process, current_process, initialize_inferiors): New.
8482 * target.h (struct thread_resume) <thread>: Change type to ptid_t.
8483 (struct target_waitstatus) <related_pid>: Ditto.
8484 (struct target_ops) <kill, detach>: Add `pid' argument. Change
8485 return type to int.
8486 (struct target_ops) <join>: Add `pid' argument.
8487 (struct target_ops) <thread_alive>: Change pid's type to ptid_t.
8488 (struct target_ops) <wait>: Add `ptid' field. Change return type
8489 to ptid.
8490 (kill_inferior, detach_inferior, join_inferior): Add `pid' argument.
8491 (mywait): Add `ptid' argument. Change return type to ptid_t.
8492 (target_pid_to_str): Declare.
8493 * target.c (set_desired_inferior): Adjust to use ptids.
8494 (mywait): Add new `ptid' argument. Adjust.
8495 (target_pid_to_str): New.
8496 * mem-break.h (free_all_breakpoints): Declare.
8497 * mem-break.c (breakpoints): Delelete.
8498 (set_breakpoint_at, delete_breakpoint, find_breakpoint_at)
8499 (check_mem_read, check_mem_write, delete_all_breakpoints): Adjust
8500 to use per-process breakpoint list.
8501 (free_all_breakpoints): New.
8502 * remote-utils.c (struct sym_cache) <name>: Drop `const'.
8503 (symbol_cache, all_symbols_looked_up): Delete.
8504 (hexchars): New.
8505 (ishex, unpack_varlen_hex, write_ptid, hex_or_minus_one,
8506 read_ptid): New.
8507 (prepare_resume_reply): Change ptid argument's type from unsigned
8508 long to ptid_t. Adjust. Implement W;process and X;process.
8509 (free_sym_cache, clear_symbol_cache): New.
8510 (look_up_one_symbol): Adjust to per-process symbol cache. *
8511 * server.c (cont_thread, general_thread, step_thread): Change type
8512 to ptid_t.
8513 (attached): Delete.
8514 (multi_process): New.
8515 (last_ptid): Change type to ptid_t.
8516 (struct vstop_notif) <ptid>: Change type to ptid_t.
8517 (queue_stop_reply, push_event): Change `ptid' argument's type to
8518 ptid_t.
8519 (discard_queued_stop_replies): Add `pid' argument.
8520 (start_inferior): Adjust to use ptids. Adjust to mywait interface
8521 changes. Don't reference the `attached' global.
8522 (attach_inferior): Adjust to mywait interface changes.
8523 (handle_query): Adjust to use ptids. Parse GDB's qSupported
8524 features. Handle and report "multiprocess+". Handle
8525 "qAttached:PID".
8526 (handle_v_cont): Adjust to use ptids. Adjust to mywait interface
8527 changes.
8528 (handle_v_kill): New.
8529 (handle_v_stopped): Adjust to use target_pid_to_str.
8530 (handle_v_requests): Allow multiple attaches and runs when
8531 multiprocess extensions are in effect. Handle "vKill".
8532 (myresume): Adjust to use ptids.
8533 (queue_stop_reply_callback): Add `arg' parameter. Handle it.
8534 (handle_status): Adjust to discard_queued_stop_replies interface
8535 change.
8536 (first_thread_of, kill_inferior_callback)
8537 (detach_or_kill_inferior_callback, join_inferiors_callback): New.
8538 (main): Call initialize_inferiors. Adjust to use ptids, killing
8539 and detaching from all inferiors. Handle multiprocess packet
8540 variants.
8541 * linux-low.h: Include gdb_proc_service.h.
8542 (struct process_info_private): New.
8543 (struct linux_target_ops) <pid_of>: Use ptid_get_pid.
8544 <lwpid_of>: Use ptid_get_lwp.
8545 (get_lwp_thread): Adjust.
8546 (struct lwp_info): Add `dead' member.
8547 (find_lwp_pid): Declare.
8548 * linux-low.c (thread_db_active): Delete.
8549 (new_inferior): Adjust comment.
8550 (inferior_pid): Delete.
8551 (linux_add_process): New.
8552 (handle_extended_wait): Adjust.
8553 (add_lwp): Change unsigned long to ptid.
8554 (linux_create_inferior): Add process to processes table. Adjust
8555 to use ptids. Don't set new_inferior here.
8556 (linux_attach_lwp): Rename to ...
8557 (linux_attach_lwp_1): ... this. Add `initial' argument. Handle
8558 it. Adjust to use ptids.
8559 (linux_attach_lwp): New.
8560 (linux_attach): Add process to processes table. Don't set
8561 new_inferior here.
8562 (struct counter): New.
8563 (second_thread_of_pid_p, last_thread_of_process_p): New.
8564 (linux_kill_one_lwp): Add `args' parameter. Handle it. Adjust to
8565 multiple processes.
8566 (linux_kill): Add `pid' argument. Handle it. Adjust to multiple
8567 processes. Remove process from process table.
8568 (linux_detach_one_lwp): Add `args' parameter. Handle it. Adjust
8569 to multiple processes.
8570 (any_thread_of): New.
8571 (linux_detach): Add `pid' argument, and handle it. Remove process
8572 from processes table.
8573 (linux_join): Add `pid' argument. Handle it.
8574 (linux_thread_alive): Change unsighed long argument to ptid_t.
8575 Consider dead lwps as not being alive.
8576 (status_pending_p): Rename `dummy' argument to `arg'. Filter out
8577 threads we're not interested in.
8578 (same_lwp, find_lwp_pid): New.
8579 (linux_wait_for_lwp): Change `pid' argument's type from int to
8580 ptid_t. Adjust.
8581 (linux_wait_for_event): Rename to ...
8582 (linux_wait_for_event_1): ... this. Change `pid' argument's type
8583 from int to ptid_t. Adjust.
8584 (linux_wait_for_event): New.
8585 (linux_wait_1): Add `ptid' argument. Change return type to
8586 ptid_t. Adjust. Use last_thread_of_process_p. Remove processes
8587 that exit from the process table.
8588 (linux_wait): Add `ptid' argument. Change return type to ptid_t.
8589 Adjust.
8590 (mark_lwp_dead): New.
8591 (wait_for_sigstop): Adjust to use ptids. If a process exits while
8592 stopping all threads, mark its main lwp as dead.
8593 (linux_set_resume_request, linux_resume_one_thread): Adjust to use
8594 ptids.
8595 (fetch_register, usr_store_inferior_registers)
8596 (regsets_fetch_inferior_registers)
8597 (regsets_store_inferior_registers, linux_read_memory)
8598 (linux_write_memory): Inline `inferior_pid'.
8599 (linux_look_up_symbols): Adjust to use per-process
8600 `thread_db_active'.
8601 (linux_request_interrupt): Adjust to use ptids.
8602 (linux_read_auxv): Inline `inferior_pid'.
8603 (initialize_low): Don't reference thread_db_active.
8604 * gdb_proc_service.h (struct ps_prochandle) <pid>: Remove.
8605 * proc-service.c (ps_lgetregs): Use find_lwp_pid.
8606 (ps_getpid): Return the pid of the current inferior.
8607 * thread-db.c (proc_handle, thread_agent): Delete.
8608 (thread_db_create_event, thread_db_enable_reporting): Adjust to
8609 per-process data.
8610 (find_one_thread): Change argument type to ptid_t. Adjust to
8611 per-process data.
8612 (maybe_attach_thread): Adjust to per-process data and ptids.
8613 (thread_db_find_new_threads): Ditto.
8614 (thread_db_init): Ditto.
8615 * spu-low.c (spu_create_inferior, spu_attach): Add process to
8616 processes table. Adjust to use ptids.
8617 (spu_kill, spu_detach): Adjust interface. Remove process from
8618 processes table.
8619 (spu_join, spu_thread_alive): Adjust interface.
8620 (spu_wait): Adjust interface. Remove process from processes
8621 table. Adjust to use ptids.
8622 * win32-low.c (current_inferior_tid): Delete.
8623 (current_inferior_ptid): New.
8624 (debug_event_ptid): New.
8625 (thread_rec): Take a ptid. Adjust.
8626 (child_add_thread): Add `pid' argument. Adjust to use ptids.
8627 (child_delete_thread): Ditto.
8628 (do_initial_child_stuff): Add `attached' argument. Add process to
8629 processes table.
8630 (child_fetch_inferior_registers, child_store_inferior_registers):
8631 Adjust.
8632 (win32_create_inferior): Pass 0 to do_initial_child_stuff.
8633 (win32_attach): Pass 1 to do_initial_child_stuff.
8634 (win32_kill): Adjust interface. Remove process from processes
8635 table.
8636 (win32_detach): Ditto.
8637 (win32_join): Adjust interface.
8638 (win32_thread_alive): Take a ptid.
8639 (win32_resume): Adjust to use ptids.
8640 (get_child_debug_event): Ditto.
8641 (win32_wait): Adjust interface. Remove exiting process from
8642 processes table.
8643
bd99dc85
PA
86442009-04-01 Pedro Alves <pedro@codesourcery.com>
8645
8646 Non-stop mode support.
8647
8648 * server.h (non_stop): Declare.
8649 (gdb_client_data, handler_func): Declare.
8650 (delete_file_handler, add_file_handler, start_event_loop):
8651 Declare.
8652 (handle_serial_event, handle_target_event, push_event)
8653 (putpkt_notif): Declare.
8654 * target.h (enum resume_kind): New.
8655 (struct thread_resume): Replace `step' field by `kind' field.
8656 (TARGET_WNOHANG): Define.
8657 (struct target_ops) <wait>: Add `options' argument.
8658 <supports_non_stop, async, start_non_stop>: New fields.
8659 (target_supports_non_stop, target_async): New.
8660 (start_non_stop): Declare.
8661 (mywait): Add `options' argument.
8662 * target.c (mywait): Add `options' argument. Print child exit
8663 notifications here.
8664 (start_non_stop): New.
8665 * server.c (non_stop, own_buf, mem_buf): New globals.
8666 (struct vstop_notif): New.
8667 (notif_queue): New global.
8668 (queue_stop_reply, push_event, discard_queued_stop_replies)
8669 (send_next_stop_reply): New.
8670 (start_inferior): Adjust to use resume_kind. Adjust to mywait
8671 interface changes.
8672 (attach_inferior): In non-stop mode, don't wait for the target
8673 here.
8674 (handle_general_set): Handle QNonStop.
8675 (handle_query): When handling qC, return the current general
8676 thread, instead of the first thread of the list.
8677 (handle_query): If the backend supports non-stop mode, include
8678 QNonStop+ in the qSupported query response.
8679 (handle_v_cont): Adjust to use resume_kind. Handle resume_stop
8680 and non-stop mode.
8681 (handle_v_attach, handle_v_run): Handle non-stop mode.
8682 (handle_v_stopped): New.
8683 (handle_v_requests): Report support for vCont;t. Handle vStopped.
8684 (myresume): Adjust to use resume_kind. Handle non-stop.
8685 (queue_stop_reply_callback): New.
8686 (handle_status): Handle non-stop mode.
8687 (main): Clear non_stop flag on reconnection. Use the event-loop.
8688 Refactor serial protocol handling from here ...
8689 (process_serial_event): ... to this new function. When GDB
8690 selects any thread, select one here. In non-stop mode, wait until
8691 GDB acks all pending events before exiting.
8692 (handle_serial_event, handle_target_event): New.
8693 * remote-utils.c (remote_open): Install remote_desc in the event
8694 loop.
8695 (remote_close): Remove remote_desc from the event loop.
8696 (putpkt_binary): Rename to...
8697 (putpkt_binary_1): ... this. Add `is_notic' argument. Handle it.
8698 (putpkt_binary): New as wrapper around putpkt_binary_1.
8699 (putpkt_notif): New.
8700 (prepare_resume_reply): In non-stop mode, don't change the
8701 general_thread.
8702 * event-loop.c: New.
8703 * Makefile.in (OBJ): Add event-loop.o.
8704 (event-loop.o): New rule.
8705
8706 * linux-low.h (pid_of): Moved here.
8707 (lwpid_of): New.
8708 (get_lwp_thread): Use lwpid_of.
8709 (struct lwp_info): Delete `lwpid' field. Add `suspended' field.
8710 * linux-low.c (pid_of): Delete.
8711 (inferior_pid): Use lwpid_of.
8712 (linux_event_pipe): New.
8713 (target_is_async_p): New.
8714 (delete_lwp): New.
8715 (handle_extended_wait): Use lwpid_of.
8716 (add_lwp): Don't set lwpid field.
8717 (linux_attach_lwp): Adjust debug output. Use lwpid_of.
8718 (linux_kill_one_lwp): If killing a running lwp, stop it first.
8719 Use lwpid_of. Adjust to linux_wait_for_event interface changes.
8720 (linux_detach_one_lwp): If detaching from a running lwp, stop it
8721 first. Adjust to linux_wait_for_event interface changes. Use
8722 lwpid_of.
8723 (linux_detach): Don't delete the main lwp here.
8724 (linux_join): Use my_waitpid. Avoid signal_pid. Use lwpid_of.
8725 (status_pending_p): Don't consider explicitly suspended lwps.
8726 (linux_wait_for_lwp): Take an integer pid instead of a lwp_info
8727 pointer. Add OPTIONS argument. Change return type to int. Use
8728 my_waitpid instead of sleeping. Handle WNOHANG. Use lwpid_of.
8729 (linux_wait_for_event): Take an integer pid instead of a lwp_info
8730 pointer. Add status pointer argument. Return a pid instead of a
8731 status. Use lwpid_of. Adjust to linux_wait_for_lwp interface
8732 changes. In non-stop mode, don't switch to a random thread.
8733 (linux_wait): Rename to...
8734 (linux_wait_1): ... this. Add target_options argument, and handle
8735 it. Adjust to use resume_kind. Use lwpid_of. In non-stop mode,
8736 don't handle the continue thread. Handle TARGET_WNOHANG. Merge
8737 clean exit and signal exit code. Don't stop all threads in
8738 non-stop mode. In all-stop mode, only stop all threads when
8739 reporting a stop to GDB. Handle explicit thread stop requests.
8740 (async_file_flush, async_file_mark): New.
8741 (linux_wait): New.
8742 (send_sigstop): Use lwpid_of.
8743 (wait_for_sigstop): Use lwpid_of. Adjust to linux_wait_for_event
8744 interface changes. In non-stop mode, don't switch to a random
8745 thread.
8746 (linux_resume_one_lwp): Use lwpid_of.
8747 (linux_continue_one_thread, linux_queue_one_thread): Merge into ...
8748 (linux_resume_one_thread): ... this. Handle resume_stop. In
8749 non-stop mode, don't look for pending flag in all threads.
8750 (resume_status_pending_p): Don't consider explicitly suspended
8751 threads.
8752 (my_waitpid): Reimplement. Emulate __WALL.
8753 (linux_request_interrupt, linux_read_offsets, linux_xfer_siginfo):
8754 Use lwpid_of.
8755 (sigchld_handler, linux_supports_non_stop, linux_async)
8756 (linux_start_non_stop): New.
8757 (linux_target_ops): Register linux_supports_non_stop, linux_async
8758 and linux_start_non_stop.
8759 (initialize_low): Install SIGCHLD handler.
8760 * thread-db.c (thread_db_create_event, find_one_thread)
8761 (thread_db_get_tls_address): Use lwpid_of.
8762 * win32-low.c (win32_detach): Adjust to use resume_kind.
8763 (win32_wait): Add `options' argument.
8764 * spu-low.c (spu_resume): Adjust to use resume_kind.
8765 (spu_wait): Add `options' argument.
8766
5b1c542e
PA
87672009-04-01 Pedro Alves <pedro@codesourcery.com>
8768
8769 Decouple target code from remote protocol.
8770
8771 * target.h (enum target_waitkind): New.
8772 (struct target_waitstatus): New.
8773 (struct target_ops) <wait>: Return an unsigned long. Take a
8774 target_waitstatus pointer instead of a char pointer.
8775 (mywait): Likewise.
8776 * target.c (mywait): Change prototype to return an unsigned long.
8777 Take a target_waitstatus pointer instead of a char pointer. Adjust.
8778 * server.h (thread_from_wait, old_thread_from_wait): Delete
8779 declarations.
8780 (prepare_resume_reply): Change prototype to take a
8781 target_waitstatus.
8782 * server.c (thread_from_wait, old_thread_from_wait): Delete.
8783 (last_status, last_ptid): New.
8784 (start_inferior): Remove "statusptr" argument. Adjust. Return a
8785 pid instead of a signal.
8786 (attach_inferior): Remove "status" and "signal" parameters.
8787 Adjust.
8788 (handle_query): For qGetTLSAddr, parse the thread id with strtol,
8789 not as an address.
8790 (handle_v_cont, handle_v_attach, handle_v_run, handle_v_kill)
8791 (handle_v_requests, myresume): Remove "status" and "signal"
8792 parameters. Adjust.
8793 (handle_status): New.
8794 (main): Delete local `status'. Adjust.
8795 * remote-utils.c: Include target.h.
8796 (prepare_resume_reply): Change prototype to take a
8797 target_waitstatus. Adjust.
8798
8799 * linux-low.c (linux_wait): Adjust to new target_ops->wait
8800 interface.
8801 * spu-low.c (spu_wait): Adjust.
8802 * win32-low.c (enum target_waitkind, struct target_waitstatus):
8803 Delete.
8804 (win32_wait): Adjust.
8805
2bd7c093
PA
88062009-04-01 Pedro Alves <pedro@codesourcery.com>
8807
8808 * target.h (struct thread_resume): Delete leave_stopped member.
8809 (struct target_ops): Add a `n' argument to the `resume' callback.
8810 * server.c (start_inferior): Adjust.
8811 (handle_v_cont, myresume): Adjust.
8812 * linux-low.c (check_removed_breakpoint): Adjust to resume
8813 interface change, and to removed leave_stopped field.
8814 (resume_ptr): Delete.
8815 (struct thread_resume_array): New.
8816 (linux_set_resume_request): Add new `arg' parameter. Adjust to
8817 resume interface change.
8818 (linux_continue_one_thread, linux_queue_one_thread)
8819 (resume_status_pending_p): Check if the resume field is NULL
8820 instead of checking the leave_stopped member.
8821 (linux_resume): Adjust to the target resume interface change.
8822 * spu-low.c (spu_resume): Adjust to the target resume interface
8823 change.
8824 * win32-low.c (win32_detach, win32_resume): Ditto.
8825
c35fafde
PA
88262009-04-01 Pedro Alves <pedro@codesourcery.com>
8827
8828 * linux-low.c (linux_wait_for_event): Don't clear the `stepping'
8829 flag.
8830 (wait_for_sigstop): Don't leave a finished single-step SIGTRAP
8831 pending.
8832 (linux_continue_one_thread): Only preserve the stepping flag if
8833 there's a pending breakpoint.
8834
0a59d50b
PA
88352009-03-31 Pedro Alves <pedro@codesourcery.com>
8836
8837 * server.c (main): After the inferior having exited, call
8838 remote_close before exiting gdbserver.
8839
f04c6d38
TJB
88402009-03-25 Thiago Jung Bauermann <bauerman@br.ibm.com>
8841
8842 Fix size of FPSCR in Power 7 processors.
8843 * linux-ppc-low.c (PPC_FEATURE_ARCH_2_05): Remove #define.
8844 (PPC_FEATURE_HAS_DFP): New #define.
8845 (ppc_arch_setup): Check for DFP feature instead of ISA 2.05 to decide on
8846 size of the FPSCR.
8847
78e5cee6
PA
88482009-03-23 Pedro Alves <pedro@codesourcery.com>
8849
8850 * server.c (handle_query) Whitespace and formatting.
8851
1b3f6016
PA
88522009-03-22 Pedro Alves <pedro@codesourcery.com>
8853
8854 * i387-fp.c, linux-arm-low.c, linux-cris-low.c,
8855 linux-crisv32-low.c, linux-i386-low.c, linux-low.c,
8856 linux-mips-low.c, linux-s390-low.c, linux-sparc-low.c,
8857 linux-x86-64-low.c, linux-xtensa-low.c, proc-service.c,
8858 regcache.c, remote-utils.c, server.c, spu-low.c, target.h,
8859 thread-db.c, win32-low.c, xtensa-xtregs.c, gdbreplay.c,
8860 Makefile.in, configure.ac: Fix whitespace throughout.
8861 * configure: Regenerate.
8862
a07b2135
PA
88632009-03-22 Pedro Alves <pedro@codesourcery.com>
8864
8865 * inferiors.c (find_inferior): Make it safe for the callback
8866 function to delete the currently iterated inferior.
8867
67cc2626
PA
88682009-03-22 Pedro Alves <pedro@codesourcery.com>
8869
8870 * Makefile.in (linuw_low_h): Move higher.
8871 (thread-db.o): Depend on $(linux_low_h).
8872
54a0b537
PA
88732009-03-17 Pedro Alves <pedro@codesourcery.com>
8874
8875 Rename "process" to "lwp" throughout.
8876
8877 * linux-low.c (all_processes): Rename to...
8878 (all_lwps): ... this.
8879 (inferior_pid, handle_extended_wait, get_stop_pc): Adjust.
8880 (add_process): Rename to ...
8881 (add_lwp): ... this. Adjust.
8882 (linux_create_inferior): Adjust.
8883 (linux_attach_lwp): Adjust.
8884 (linux_attach): Adjust.
8885 (linux_kill_one_process): Rename to ...
8886 (linux_kill_one_lwp): ... this. Adjust.
8887 (linux_kill): Adjust.
8888 (linux_detach_one_process): Rename to ...
8889 (linux_detach_one_lwp): ... this. Adjust.
8890 (linux_detach): Adjust.
8891 (check_removed_breakpoint): Adjust.
8892 (status_pending_p): Adjust.
8893 (linux_wait_for_process): Rename to ...
8894 (linux_wait_for_lwp): ... this. Adjust.
8895 (linux_wait_for_event): Adjust.
8896 (send_sigstop): Adjust.
8897 (wait_for_sigstop): Adjust.
8898 (stop_all_processes): Rename to ...
8899 (stop_all_lwps): ... this.
8900 (linux_resume_one_process): Rename to ...
8901 (linux_resume_one_lwp): ... this. Adjust.
8902 (linux_set_resume_request, linux_continue_one_thread)
8903 (linux_queue_one_thread, resume_status_pending_p)
8904 (usr_store_inferior_registers, regsets_store_inferior_registers)
8905 (linux_request_interrupt, linux_read_offsets, linux_xfer_siginfo):
8906 Adjust.
8907 * linux-low.h (get_process): Rename to ...
8908 (get_lwp): ... this. Adjust.
8909 (get_thread_process): Rename to ...
8910 (get_thread_lwp): ... this. Adjust.
8911 (get_process_thread): Rename to ...
8912 (get_lwp_thread): ... this. Adjust.
8913 (struct process_info): Rename to ...
8914 (struct lwp_info): ... this.
8915 (all_processes): Rename to ...
8916 (all_lwps): ... this.
8917 * proc-service.c (ps_lgetregs): Adjust.
8918 * thread-db.c (thread_db_create_event, find_one_thread)
8919 (maybe_attach_thread, thread_db_get_tls_address): Adjust.
8920
0b16c5cf
PA
89212009-03-14 Pedro Alves <pedro@codesourcery.com>
8922
8923 * server.c (handle_query): Handle "qAttached".
8924
32de4b9d
NS
89252009-03-13 Nathan Sidwell <nathan@codesourcery.com>
8926
8927 * Makefile.in, hostio-errno.c, errno.c, xtensa-xtregs.c: Change to
8928 GPLv3, update license URL.
8929
2aecd87f
DE
89302009-03-01 Doug Evans <dje@google.com>
8931
93efd302 8932 * Makefile.in (INCLUDE_CFLAGS): Add -I$(srcdir)/../common.
2aecd87f
DE
8933 (server_h): Add gdb_signals.h.
8934 (signals.o): Update.
8935 * server.h (target_signal_from_host,target_signal_to_host_p)
8936 (target_signal_to_host,target_signal_to_name): Moved to gdb_signals.h.
8937
86b1f9c5
PM
89382009-02-14 Pierre Muller <muller@ics.u-strasbg.fr>
8939
8940 * remote-utils.c (getpkt): Also generate remote-debug
8941 information if noack_mode is set.
8942
4aa995e1
PA
89432009-02-06 Pedro Alves <pedro@codesourcery.com>
8944
8945 * server.c (handle_query): Report qXfer:siginfo:read and
8946 qXfer:siginfo:write as supported and handle them.
8947 * target.h (struct target_ops) <qxfer_siginfo>: New field.
8948 * linux-low.c (linux_xfer_siginfo): New.
8949 (linux_target_ops): Set it.
8950
62709adf
PA
89512009-01-26 Pedro Alves <pedro@codesourcery.com>
8952
8953 * server.c (gdbserver_usage): Mention --remote-debug.
8954 (main): Accept '--remote-debug' switch.
8955
aef93bd7
DE
89562009-01-18 Doug Evans <dje@google.com>
8957
8958 * regcache.c (new_register_cache): No need to check result of xcalloc.
8959 * server.c (handle_search_memory): Back out calls to xmalloc,
8960 result is checked and error is returned to user upon failure.
8961 (handle_query): Ditto. Add more checks for result of malloc.
8962 (handle_v_cont): Check result of malloc, report error back to
8963 user upon failure.
8964 (handle_v_run): Ditto. Call freeargv.
8965 * server.h (freeargv): Declare.
8966 * utils.c (freeargv): New fn.
8967
54363045
DE
89682009-01-15 Doug Evans <dje@google.com>
8969
f626972c
DE
8970 * gdbreplay.c (perror_with_name): Make arg const char *.
8971 * server.h (target_signal_to_name): Make return type const char *.
0842e787 8972 * thread-db.c (thread_db_err_str): Make return type const char *.
f626972c 8973 * utils.c (perror_with_name): Make arg const char *.
54363045 8974
18aae699
PA
89752009-01-14 Pedro Alves <pedro@codesourcery.com>
8976
8977 * win32-low.c (get_child_debug_event): Issue a final DBG_CONTINUE
8978 when handling a EXIT_PROCESS_DEBUG_EVENT.
8979
ff703abe
JB
89802009-01-06 Joel Brobecker <brobecker@adacore.com>
8981
8982 * gdbreplay.c (gdbreplay_version): Update copyright year.
8983 * server.c (gdbserver_version): Likewise.
8984
f21cc1a2 89852009-01-05 Doug Evans <dje@google.com>
0e21c1ec
DE
8986
8987 * linux-low.c (linux_attach_lwp): Add some comments/fixmes.
f21cc1a2 8988 (handle_extended_wait): Improve comment.
0e21c1ec 8989
bca929d3
DE
89902008-12-13 Doug Evans <dje@google.com>
8991
8992 * utils.c (xmalloc,xcalloc,xstrdup): New fns.
8993 * server.h (ATTR_MALLOC): New macro.
8994 (xmalloc,xcalloc,xstrdup): Declare.
8995 * hostio.c: Replace malloc,calloc,strdup with xmalloc,xcalloc,xstrdup.
8996 * inferiors.c: Ditto.
8997 * linux-low.c: Ditto.
8998 * mem-break.c: Ditto.
8999 * regcache.c: Ditto.
9000 * remote-utils.c: Ditto.
9001 * server.c: Ditto.
9002 * target.c: Ditto.
9003 * win32-low.c: Ditto.
9004
97438e3f
DE
90052008-12-12 Doug Evans <dje@google.com>
9006
896c7fbb
DE
9007 * linux-low.c (linux_wait_for_process): Don't clobber current_inferior
9008 in debugging printf.
9009
97438e3f
DE
9010 * linux-low.c (handle_extended_wait): Simplify, use my_waitpid.
9011
e3b886f8
DE
90122008-12-09 Doug Evans <dje@google.com>
9013
9014 * linux-low.h (struct process_info): Delete member tid, unused.
9015 * thread-db.c (find_one_thread): Update.
9016 (maybe_attach_thread): Update.
9017
07e059b5
VP
90182008-12-02 Pedro Alves <pedro@codesourcery.com>
9019
889bf7c5
PA
9020 * target.h (struct target_ops): Add qxfer_osdata member.
9021 * linux-low.c: Include ctype.h and pwd.h and sys/types.h
9022 and dirent.h.
9023 (linux_qxfer_osdata): New functions.
9024 (linux_target_ops): Register linux_qxfer_osdata as qxfer_osdata
9025 callback.
9026 * server.c (handle_query): Handle "qXfer:osdata:read:".
9027 * remote-utils.c (buffer_grow, buffer_free, buffer_init, buffer_finish)
9028 (buffer_xml_printf): New functions.
9029 * server.h (struct buffer): New.
9030 (buffer_grow_str, buffer_grow_str0): New macros.
9031 (buffer_grow, buffer_free, buffer_init, buffer_finish)
9032 (buffer_xml_printf): Declare.
07e059b5 9033
4cab47ab
DE
90342008-11-24 Doug Evans <dje@google.com>
9035
9036 * Makefile.in (VERSION,DIST,LINT,LINTFLAGS): Delete, unused.
9037
f142445f
DJ
90382008-11-24 Daniel Jacobowitz <dan@codesourcery.com>
9039
9040 * server.c (handle_v_run): Always use the supplied argument list.
9041
d0107bb6 90422008-11-19 Bob Wilson <bob.wilson@acm.org>
889bf7c5 9043
d0107bb6
BW
9044 * xtensa-xtregs.c (XTENSA_ELF_XTREG_SIZE): Change to 4.
9045 (xtensa_regmap_table): Add entry for scompare1.
889bf7c5 9046
2c4ad781
TJB
90472008-11-18 Thiago Jung Bauermann <bauerman@br.ibm.com>
9048
9049 * Makefile.in (powerpc-isa205-32l.o, powerpc-isa205-32l.c,
9050 powerpc-isa205-altivec32l.o, powerpc-isa205-altivec32l.c,
9051 powerpc-isa205-vsx32l.o, powerpc-isa205-vsx32l.c,
9052 powerpc-isa205-64l.o, powerpc-isa205-64l.c,
9053 powerpc-isa205-altivec64l.o, powerpc-isa205-altivec64l.c,
9054 powerpc-isa205-vsx64l.o, powerpc-isa205-vsx64l.c): New targets.
9055 * configure.srv (powerpc*-*-linux*): Add ISA 2.05 object files and
9056 XML target descriptions.
9057 * linux-ppc-low.c (ppc_arch_setup): Init registers with 64-bit FPSCR
9058 when inferior is running on an ISA 2.05 or later processor. Add
9059 special case to return offset for full 64-bit slot of FPSCR when
9060 in 32-bits.
9061
dfb64f85
DJ
90622008-11-14 Daniel Gutson <dgutson@codesourcery.com>
9063
9064 * Makefile.in (SFILES, clean): Added sparc64 files.
9065 (reg-sparc64.o, reg-sparc64.c): New.
9066 * configure.srv (sparc*-*-linux*): New configuration.
9067 * linux-low.c (regsets_fetch_inferior_registers): Swap ptrace
9068 syscall arguments for SPARC.
9069 (regsets_store_inferior_registers): Likewise.
9070 * linux-sparc-low.c: New file.
9071
66b6e1dd
DE
90722008-10-21 Doug Evans <dje@google.com>
9073
9074 * Makefile.in (BFD_DIR,BFD,BFD_SRC,BFD_CFLAGS): Delete.
9075 (READLINE_DIR,READLINE_DEP): Delete.
9076 (INTERNAL_CFLAGS): Update.
9077 (LINTFLAGS): Update.
9078
9b710a42
PA
90792008-10-10 Pedro Alves <pedro@codesourcery.com>
9080
9081 * server.c (handle_v_run): If GDB didn't specify an argv, use the
9082 whole argv from the last run, not just argv[0].
9083
5822d809
PA
90842008-09-08 Pedro Alves <pedro@codesourcery.com>
9085
9086 * regcache.c (new_register_cache): Return NULL if the register
9087 cache size isn't known yet.
9088 (free_register_cache): Avoid dereferencing a NULL regcache.
9089
74aac56f
DJ
90902008-09-04 Daniel Jacobowitz <dan@codesourcery.com>
9091
9092 * configure.srv: Merge MIPS and MIPS64.
9093
400b20f5
MR
90942008-08-24 Maciej W. Rozycki <macro@linux-mips.org>
9095
9096 * Makefile.in (uninstall): Apply $(EXEEXT) too.
9097
677c5bb1
LM
90982008-08-18 Luis Machado <luisgpm@br.ibm.com>
9099
9100 * Makefile.in: Add required vsx dependencies.
9101
9102 * linux-ppc-low: Define PPC_FEATURE_HAS_VSX.
9103 Declare init_registers_powerpc_vsx32l.
9104 Declare init_registers_powerpc_vsx64l.
9105 Define PTRACE_GETVSXREGS and PTRACE_SETVSXREGS.
9106 (ppc_arch_setup): Check for VSX in hwcap.
9107 (ppc_fill_vsxregset): New function.
9108 (ppc_store_vsxregset): New function.
9109 Add new VSX entry in regset_info target_regsets.
9110
9111 * configure.srv: Add new VSX dependencies.
9112
a6f3e723
SL
91132008-08-12 Pedro Alves <pedro@codesourcery.com>
9114
9115 * remote-utils.c (noack_mode, transport_is_reliable): New globals.
9116 (remote_open): Set or clear transport_is_reliable.
9117 (putpkt_binary): Don't expect acks in noack mode.
9118 (getpkt): Don't send ack/nac in noack mode.
9119 * server.c (handle_general_set): Handle QStartNoAckMode.
9120 (handle_query): If connected by tcp pass QStartNoAckMode+ in
9121 qSupported.
9122 (main): Reset noack_mode on every connection.
9123 * server.h (noack_mode): Declare.
9124
a417dc56
RW
91252008-08-07 Ralf Wildenhues <Ralf.Wildenhues@gmx.de>
9126
9127 * Makefile.in (GDBREPLAY_OBS): New variable.
9128 (gdbreplay$(EXEEXT)): Use it to avoid unportable $^.
9129
3221518c
UW
91302008-08-05 Ulrich Weigand <uweigand@de.ibm.com>
9131 Daniel Jacobowitz <dan@codesourcery.com>
9132
9133 * linux-low.c (linux_resume_one_process): Ignore ESRCH.
9134 (usr_store_inferior_registers): Likewise.
9135 (regsets_store_inferior_registers): Likewise.
9136
ec56be1b
PA
91372008-07-31 Rolf Jansen <rj@surtec.com>
9138 Pedro Alves <pedro@codesourcery.com>
9139
9140 * configure.ac: Check for memmem declaration.
9141 * server.c [HAVE_MALLOC_H]: Include malloc.h.
9142 (disable_packet_vCont, disable_packet_Tthread, disable_packet_qC)
9143 (disable_packet_qfThreadInfo): Unconditionally compile.
9144 * server.h [!HAVE_DECL_MEMMEM]: Declare memmem.
9145 * configure, config.in: Regenerate.
9146
2fe5e3ff
DE
91472008-07-28 Doug Kwan <dougkwan@google.com>
9148
9149 * linux-low.c (sys/dir.h, sys/user.h): Remove includes.
9150 (linux_write_memory): Remove declaration of errno.
9151
836acd6d
UW
91522008-07-12 Ulrich Weigand <uweigand@de.ibm.com>
9153
9154 * linux-low.c (handle_extended_wait): Do not use "status"
9155 variable uninitialized.
9156
aeba519e
PA
91572008-07-07 Pedro Alves <pedro@codesourcery.com>
9158
9159 * server.c (handle_v_attach): Inhibit reporting dll changes.
9160
db42f210
PA
91612008-06-27 Pedro Alves <pedro@codesourcery.com>
9162
9163 * remote-utils.c (prepare_resume_reply): If requested, don't
9164 output "thread:TID" in the T stop reply.
9165
9166 * server.c (disable_packet_vCont, disable_packet_Tthread)
9167 (disable_packet_qC, disable_packet_qfThreadInfo): New globals.
9168 (handle_query): If requested, disable support for qC, qfThreadInfo
9169 and qsThreadInfo.
9170 (handle_v_requests): If requested, disable support for vCont.
9171 (gdbserver_show_disableable): New.
9172 (main): Handle --disable-packet and --disable-packet=LIST.
9173
9174 * server.h (disable_packet_vCont, disable_packet_Tthread)
9175 (disable_packet_qC, disable_packet_qfThreadInfo): Declare.
9176
8e4c5421
CD
91772008-06-20 Carlos O'Donell <carlos@codesourcery.com>
9178
9179 * server.c (gdbserver_usage): Mention --version.
9180
6e23a804
DJ
91812008-06-06 Daniel Jacobowitz <dan@codesourcery.com>
9182
9183 * Makefile.in (gdbreplay.o): New rule.
9184
90aa6a40
JM
91852008-06-06 Joseph Myers <joseph@codesourcery.com>
9186
9187 * gdbreplay.c (gdbreplay_version): Say gdbreplay in version
9188 message, not gdbserver.
9189
c16158bc 91902008-06-05 Vladimir Prus <vladimir@codesourcery.com>
889bf7c5
PA
9191 Nathan Sidwell <nathan@codesourcery.com>
9192 Joseph Myers <joseph@codesourcery.com>
c16158bc
JM
9193
9194 * acinclude.m4: Include ../../config/acx.m4.
9195 * configure.ac: Use ACX_PKGVERSION and ACX_BUGURL.
9196 * configure, config.in: Regenerate.
9197 * Makefile.in (gdbreplay$(EXEEXT)): Add version.o.
9198 * server.c (gdbserver_version): Print PKGVERSION.
9199 (gdbsrever_usage): Add stream parameter. Print REPORT_BUGS_TO.
9200 (main): Adjust gdbserver_usage calls.
9201 * gdbreplay.c (version, host_name): Add declarations.
9202 (gdbreplay_version, gdbreplay_usage): New.
9203 (main): Accept --version and --help options.
9204
aeb75bf5
DJ
92052008-06-04 Daniel Jacobowitz <dan@codesourcery.com>
9206
9207 * linux-arm-low.c (thumb_breakpoint, thumb_breakpoint_len): New.
9208 (arm_breakpoint_at): Handle Thumb.
9209 (the_low_target): Add comment.
9210
76b233dd
UW
92112008-05-29 Ulrich Weigand <uweigand@de.ibm.com>
9212
9213 * linux-ppc-low.c (ppc_collect_ptrace_register): Clear buffer.
9214
08388c79
DE
92152008-05-09 Doug Evans <dje@google.com>
9216
a3c83fae
DE
9217 * server.h (decode_search_memory_packet): Declare.
9218 * remote-utils.c (decode_search_memory_packet): New fn.
9219 * server.c (handle_search_memory_1): New fn.
08388c79
DE
9220 (handle_search_memory): New fn.
9221 (handle_query): Process qSearch:memory packets.
9222
bb9c3d36
UW
92232008-05-08 Ulrich Weigand <uweigand@de.ibm.com>
9224
9225 * regcache.c (registers_length): Remove.
9226 (set_register_cache): Verify that PBUFSIZ is large enough to hold a
9227 full register packet.
9228 * regcache.h (registers_length): Remove prototype.
9229 * server.h (PBUFSIZ): Define to 16384.
9230
7284e1be
UW
92312008-05-03 Ulrich Weigand <uweigand@de.ibm.com>
9232
9233 * configure.srv (powerpc*-*-linux*): Set srv_regobj to
9234 powerpc-32l.o, powerpc-altivec32l.o, powerpc-e500l.o,
9235 powerpc-64l.o, and powerpc-altivec64l.o.
9236 Remove rs6000/powerpc-32.xml, rs6000/powerpc-64.xml, and
9237 rs6000/powerpc-e500.xml; add rs6000/powerpc-32l.xml,
9238 rs6000/powerpc-altivec32l.xml, rs6000/powerpc-e500l.xml,
9239 rs6000/powerpc-64l.xml, rs6000/powerpc-altivec64l.xml,
9240 rs6000/power-linux.xml, and rs6000/power64-linux.xml
9241 to srv_xmlfiles.
9242
9243 * Makefile.in (reg-ppc.o, reg-ppc.c): Remove, replace by ...
9244 (powerpc-32l.o, powerpc-32l.c): ... these new rules.
9245 (powerpc-32.o, powerpc-32.c): Remove, replace by ...
9246 (powerpc-altivec32l.o, powerpc-altivec32l.c): ... these new rules.
9247 (powerpc-e500.o, powerpc-e500.c): Remove, replace by ...
9248 (powerpc-e500l.o, powerpc-e500l.c): ... these new rules.
9249 (reg-ppc64.o, reg-ppc64.c): Remove, replace by ...
9250 (powerpc-64l.o, powerpc-64l.c): ... these new rules.
9251 (powerpc-64.o, powerpc-64.c): Remove, replace by ...
9252 (powerpc-altivec64l.o, powerpc-altivec64l.c): ... these new rules.
9253 (clean): Update.
9254
9255 * linux-ppc-low.c (init_registers_ppc): Remove, replace by ...
9256 (init_registers_powerpc_32l): ... this new prototype.
9257 (init_registers_powerpc_32): Remove, replace by ...
9258 (init_registers_powerpc_altivec32l): ... this new prototype.
9259 (init_registers_powerpc_e500): Remove, replace by ...
9260 (init_registers_powerpc_e500l): ... this new prototype.
9261 (init_registers_ppc64): Remove, replace by ...
9262 (init_registers_powerpc_64l): ... this new prototype.
9263 (init_registers_powerpc_64): Remove, replace by ...
9264 (init_registers_powerpc_altivec64l): ... this new prototype.
9265 (ppc_num_regs): Set to 73.
9266 (PT_ORIG_R3, PT_TRAP): Define if necessary.
9267 (ppc_regmap, ppc_regmap_e500): Add values for orig_r3 and trap.
9268 (ppc_cannot_store_register): Handle orig_r3 and trap.
9269 (ppc_arch_setup): Update init_registers_... calls.
9270 (ppc_fill_gregset): Handle orig_r3 and trap.
9271
9272 * inferiors.c (clear_inferiors): Reset current_inferior.
9273
fdc59709
PB
92742008-04-23 Paolo Bonzini <bonzini@gnu.org>
9275
889bf7c5
PA
9276 * acinclude.m4: Add override.m4.
9277 * configure: Regenerate.
fdc59709 9278
c9b2f845
UW
92792008-04-21 Ulrich Weigand <uweigand@de.ibm.com>
9280
9281 * linux-ppc-low.c (ppc_arch_setup): Reset ppc_hwcap after the
9282 initial call to init_register_ppc64.
9283
550512b8
UW
92842008-04-21 Ulrich Weigand <uweigand@de.ibm.com>
9285
43aaf8b6
PA
9286 * configure.srv (powerpc64-*-linux*, powerpc-*-linux*): Merge into
9287 single powerpc*-*-linux* case.
550512b8
UW
9288 (s390-*-linux*, s390x-*-linux*): Merge into single s390*-*-linux* case.
9289
b6430ec3
UW
92902008-04-17 Ulrich Weigand <uweigand@de.ibm.com>
9291
9292 * configure.srv [powerpc64-*-linux*]: Remove powerpc-e500.o from
889bf7c5 9293 srv_regobj. Remove rs6000/powerpc-e500.xml and rs6000/power-spe.xml
b6430ec3
UW
9294 from reg_xmlfiles.
9295 * linux-ppc-low.c: Include <elf.h>.
9296 (PPC_FEATURE_HAS_ALTIVEC, PPC_FEATURE_HAS_SPE): Define.
9297 (ppc_hwcap): New global variable.
9298 (ppc_regmap): Remove __SPE__ #ifdef sections.
9299 (ppc_regmap_e500): New global variable.
9300 (ppc_cannot_store_register): Update __SPE__ special case.
9301 (ppc_get_hwcap): New function.
9302 (ppc_arch_setup): Use it to determine whether inferior supports
9303 AltiVec or SPE registers. Set the_low_target.regmap if appropriate.
9304 (ppc_fill_vrregset, ppc_store_vrregset): Define unconditionally.
9305 Do not access registers if target does not support AltiVec.
9306 (ppc_fill_evrregset, ppc_store_evrregset): Define unconditionally.
9307 Do not access registers if target does not support SPE.
9308 (target_regsets): Unconditionally include AltiVec and SPE regsets.
9309
52fa2412
UW
93102008-04-17 Daniel Jacobowitz <dan@codesourcery.com>
9311
9312 * linux-low.c (disabled_regsets, num_regsets): New.
9313 (use_regsets_p): Delete.
9314 (linux_wait_for_process): Clear disabled_regsets.
9315 (regsets_fetch_inferior_registers): Check and set it.
9316 (regsets_store_inferior_registers): Likewise.
9317 (linux_fetch_registers, linux_store_registers): Do not use
9318 use_regsets_p.
9319 (initialize_low): Allocate disabled_regsets.
9320
e28b3332
DJ
93212008-04-14 Daniel Jacobowitz <dan@codesourcery.com>
9322
9323 * Makefile.in (LIBOBJS): New.
9324 (OBS): Use LIBOBJS.
9325 (memmem.o): New rule.
9326 * configure.ac: Use AC_CONFIG_LIBOBJ_DIR and check for memmem.
9327 * configure: Regenerated.
9328
4536995d
UW
93292008-04-04 Ulrich Weigand <uweigand@de.ibm.com>
9330
9331 * server.c (handle_query): Never return "unsupported" for
9332 qXfer:features:read queries.
9333
221c031f
UW
93342008-03-27 Ulrich Weigand <uweigand@de.ibm.com>
9335
9336 * server.c (get_features_xml): Fix inverted condition.
9337 (handle_query): Always support qXfer:feature:read.
9338
ccd213ac
DJ
93392008-03-10 Daniel Jacobowitz <dan@codesourcery.com>
9340
9341 * server.c (wrapper_argv): New.
9342 (start_inferior): Handle wrapper_argv. If set, expect an extra
9343 trap.
9344 (gdbserver_usage): Document --wrapper.
9345 (main): Parse --wrapper.
9346
6fe305f7
UW
93472008-02-28 Ulrich Weigand <uweigand@de.ibm.com>
9348
9349 * configure.srv [powerpc64-*-linux*]: Add all files mentioned for
9350 powerpc-*-linux* to srv_regobj and reg_xmlfiles.
9351 * linux-ppc-low.c (ppc_get_pc): Support bi-arch operation.
9352 (ppc_set_pc): Likewise.
9353 (ppc_arch_setup): New function.
9354 (ppc_fill_gregset): Call ppc_collect_ptrace_register instead
9355 of collect_register.
889bf7c5 9356 (the_low_target): Use ppc_arch_setup as arch_setup initializer.
6fe305f7 9357
5b0a002e
UW
93582008-02-28 Ulrich Weigand <uweigand@de.ibm.com>
9359
9360 * configure.srv [powerpc64-*-linux*]: Use linux-ppc-low.o
9361 instead of linux-ppc64-low.o.
9362 * linux-ppc64-low.c: Remove file.
9363 * Makefile.in (SFILES): Remove linux-ppc64-low.c.
9364 (linux-ppc64-low.o): Remove rule.
9365
9366 * linux-ppc-low.c (init_registers_ppc64): Add prototype.
9367 (init_registers_powerpc_64): Likewise.
9368 (ppc_regmap): Conditionally define depending on __powerpc64__.
9369 (ppc_cannot_store_register): Do not special-case "fpscr" when
9370 compiled on __powerpc64__.
9371 (ppc_collect_ptrace_register): New function.
9372 (ppc_supply_ptrace_register): New function.
9373 (ppc_breakpoint): Change type to "unsigned int".
9374 (ppc_breakpoint_at): Change type of "insn" to "unsigned int".
9375 (the_low_target): Conditionally provide initializers for the
889bf7c5 9376 arch_setup member depending on __powerpc64__. Install
5b0a002e
UW
9377 collect_ptrace_register and supply_ptrace_register members.
9378
9b4b61c8
UW
93792008-02-28 Ulrich Weigand <uweigand@de.ibm.com>
9380
9381 * regcache.h (gdbserver_xmltarget): Add extern declaration.
9382 * server.c (gdbserver_xmltarget): Define.
9383 (get_features_xml): Use it to replace "target.xml" and arch_string.
9384
9385 * configure.srv: Remove srv_xmltarget. Add XML files that were
9386 mentioned there to srv_xmlfiles instead. Remove conditional tests
9387 on gdb_cv_arm_iwmmxt, gdb_cv_ppc_altivec, gdb_cv_ppc_spe; set
9388 srv_xmlfiles and srv_regobj to include all possible choices.
9389 * configure.ac (srv_xmltarget): Remove.
9390 (srv_xmlfiles): Do not add "target.xml".
9391 (gdb_cv_arm_iwmmxt, gdb_cv_ppc_altivec, gdb_cv_ppc_spe): Remove
9392 checks for supplementary target information.
9393 * configure: Regenerate.
9394 * Makefile.in (XML_TARGET): Remove.
9395 (target.xml): Remove rule.
9396 (clean): Do not clean up target.xml.
9397 (.PRECIOUS): Do not mention target.xml.
9398
9399 * target.h (struct target_ops): Remove arch_string member.
9400 * linux-low.c (linux_arch_string): Remove.
9401 (linux_target_ops): Remove arch_string initializer.
9402 * linux-low.h (struct linux_target_ops): Remove arch_string member.
9403 * linux-i386-low.c (the_low_target): Remove arch_string initializer.
9404 * linux-x86-64-low.c (the_low_target): Remove arch_string initializer.
9405 * spu-low.c (spu_arch_string): Remove.
9406 (spu_target_ops): Remove arch_string initializer.
9407 * win32-low.c (win32_arch_string): Remove.
9408 (win32_target_ops): Remove arch_string initializer.
9409 * win32-low.h (struct win32_target_ops): Remove arch_string member.
9410 * win32-arm-low.c (the_low_target): Remove arch_string initializer.
9411 * win32-i368-low.c (the_low_target): Remove arch_string initializer.
9412
ee1a7ae4
UW
94132008-02-27 Ulrich Weigand <uweigand@de.ibm.com>
9414
9415 * linux-low.h (struct linux_target_ops): Replace left_pad_xfer field
9416 by collect_ptrace_register and supply_ptrace_register hooks.
9417 * linux-low.c (fetch_register): Use supply_ptrace_register callback
9418 instead of checking for the_low_target.left_pad_xfer.
9419 (usr_store_inferior_registers): Use collect_ptrace_register callback
9420 instead of checking for the_low_target.left_pad_xfer.
9421
9422 * linux-s390-low.c (s390_collect_ptrace_register): New function.
9423 (s390_supply_ptrace_register): Likewise.
9424 (s390_fill_gregset): Call s390_collect_ptrace_register.
9425 (the_low_target): Update.
9426
9427 * linux-ppc64-low.c (ppc_collect_ptrace_register): New function.
9428 (ppc_supply_ptrace_register): Likewise.
9429 (the_low_target): Update.
9430
9431 * linux-i386-low.c (the_low_target): Update.
9432 * linux-x86-64-low.c (the_low_target): Update.
9433
d61ddec4
UW
94342008-02-27 Ulrich Weigand <uweigand@de.ibm.com>
9435
9436 * configure.srv [s390x-*-linux*]: Set srv_regobj to include both
9437 reg-s390.o and reg-s390x.o.
9438
9439 * linux-low.c (new_inferior): New global variable.
9440 (linux_create_inferior, linux_attach): Set it.
9441 (linux_wait_for_process): Call the_low_target.arch_setup after the
9442 target has stopped for the first time.
9443 (initialize_low): Do not call the_low_target.arch_setup.
9444
9445 * linux-s390-low.c (s390_get_pc): Support bi-arch operation.
9446 (s390_set_pc): Likewise.
9447 (s390_arch_setup): New function.
9448 (the_low_target): Use s390_arch_setup as arch_setup routine.
9449
9450 * regcache.c (realloc_register_cache): New function.
9451 (set_register_cache): Call it for each existing regcache.
9452
d05b4ac3
UW
94532008-02-27 Ulrich Weigand <uweigand@de.ibm.com>
9454
9455 * server.h (init_registers): Remove prototype.
9456
9457 * linux-low.h (struct linux_target_ops): Add arch_setup field.
9458 * linux-low.c (initialize_low): Call the_low_target.arch_setup ()
9459 instead of init_registers ().
9460 * linux-arm-low.c (init_registers_arm): Add prototype.
9461 (init_registers_arm_with_iwmmxt): Likewise.
9462 (the_low_target): Add initializer for arch_setup field.
9463 * linux-cris-low.c (init_registers_cris): Add prototype.
9464 (the_low_target): Add initializer for arch_setup field.
9465 * linux-crisv32-low.c (init_registers_crisv32): Add prototype.
9466 (the_low_target): Add initializer for arch_setup field.
9467 * linux-i386-low.c (init_registers_i386_linux): Add prototype.
9468 (the_low_target): Add initializer for arch_setup field.
9469 * linux-ia64-low.c (init_registers_ia64): Add prototype.
9470 (the_low_target): Add initializer for arch_setup field.
9471 * linux-m32r-low.c (init_registers_m32r): Add prototype.
9472 (the_low_target): Add initializer for arch_setup field.
9473 * linux-m68k-low.c (init_registers_m68k): Add prototype.
9474 (the_low_target): Add initializer for arch_setup field.
9475 * linux-mips-low.c (init_registers_mips_linux): Add prototype.
9476 (init_registers_mips64_linux): Likewise.
9477 (the_low_target): Add initializer for arch_setup field.
9478 * linux-ppc-low.c (init_registers_ppc): Add prototype.
9479 (init_registers_powerpc_32, init_registers_powerpc_e500): Likewise.
9480 (the_low_target): Add initializer for arch_setup field.
9481 * linux-ppc64-low.c (init_registers_ppc64): Add prototype.
9482 (init_registers_powerpc_64): Likewise.
9483 (the_low_target): Add initializer for arch_setup field.
9484 * linux-s390-low.c (init_registers_s390): Add prototype.
9485 (init_registers_s390x): Likewise.
9486 (the_low_target): Add initializer for arch_setup field.
9487 * linux-sh-low.c (init_registers_sh): Add prototype.
9488 (the_low_target): Add initializer for arch_setup field.
9489 * linux-x86-64-low.c (init_registers_x86_64_linux): Add prototype.
9490 (the_low_target): Add initializer for arch_setup field.
9491 * linux-xtensa-low.c (init_registers_xtensa): Add prototype.
9492 (the_low_target): Add initializer for arch_setup field.
9493
9494 * win32-low.h (struct win32_target_ops): Add arch_setup field.
9495 * win32-low.c (initialize_low): Call the_low_target.arch_setup ()
9496 instead of init_registers ().
9497 * win32-arm-low.c (init_registers_arm): Add prototype.
9498 (the_low_target): Add initializer for arch_setup field.
9499 * win32-i386-low.c (init_registers_i386): Add prototype.
9500 (the_low_target): Add initializer for arch_setup field.
9501
9502 * spu-low.c (init_registers_spu): Add prototype.
9503 (initialize_low): Call initialie_registers_spu () instead of
9504 initialize_registers ().
9505
fd96d250
PA
95062008-02-19 Pedro Alves <pedro@codesourcery.com>
9507
9508 * server.c (handle_v_requests): When handling the vRun and vAttach
9509 packets, if already debugging a process, don't kill it. Return an
9510 error instead.
9511
d41b6bb4
DJ
95122008-02-17 Daniel Jacobowitz <dan@codesourcery.com>
9513
9514 * server.c (handle_query): Correct length check.
9515
5ac588cf
PA
95162008-02-14 Pedro Alves <pedro_alves@portugalmail.pt>
9517
9518 * win32-low.c (do_initial_child_stuff): Add process handle
9519 parameter. Set current_process_handle and current_process_id from the
9520 parameters. Clear globals.
9521 (win32_create_inferior): Don't set current_process_handle and
9522 current_process_id here. Instead pass them on the call to
9523 do_initial_child_stuff.
9524 (win32_attach): Likewise.
9525 (win32_clear_inferiors): New.
9526 (win32_kill): Don't close the current process handle or the
9527 current thread handle here. Instead call win32_clear_inferiors.
9528 (win32_detach): Don't open a new handle to the process. Call
9529 win32_clear_inferiors.
9530 (win32_join): Don't rely on current_process_handle; open a new
9531 handle using the process id.
9532 (win32_wait): Call win32_clear_inferiors when the inferior process
9533 has exited.
9534
ecd7ecbc
DJ
95352008-02-14 Daniel Jacobowitz <dan@codesourcery.com>
9536
9537 * server.c (monitor_show_help): Add "exit".
9538
1525d545
MG
95392008-02-11 Maxim Grigoriev <maxim2405@gmail.com>
9540
ecd7ecbc 9541 * Makefile.in (SFILES): Add linux-xtensa-low.c.
1525d545
MG
9542 (clean): Add reg-xtensa.c.
9543 (linux-xtensa-low.o, reg-xtensa.o, reg-xtensa.c): New dependencies.
ecd7ecbc
DJ
9544 * configure.srv (xtensa*-*-linux*) New target.
9545 * linux-xtensa-low.c: New.
9546 * xtensa-xtregs.c: New.
1525d545 9547
59a016f0
PA
95482008-02-01 Pedro Alves <pedro_alves@portugalmail.pt>
9549
9550 * hostio.c: Don't include errno.h.
9551 (errno_to_fileio_errno): Move to hostio-errno.
9552 * hostio.c: (hostio_error): Remove the error parameter. Defer the
9553 error number outputting to the target->hostio_last_error callback.
9554 (hostio_packet_error): Use FILEIO_EINVAL directly.
9555 (handle_open, handle_pread, hostio_error, handle_unlink): Update
9556 calls to hostio_error.
9557 * hostio-errno.c: New.
9558 * server.h (hostio_last_error_from_errno): Declare.
9559 * target.h (target_ops): Add hostio_last_error member.
9560 * linux-low.c (linux_target_op): Register hostio_last_error_from_errno
9561 as hostio_last_error handler.
889bf7c5 9562 * spu-low.c (spu_target_ops): Likewise.
59a016f0
PA
9563 * win32-low.c [_WIN32_WCE] (win32_error_to_fileio_error)
9564 (wince_hostio_last_error): New functions.
9565 (win32_target_ops) [_WIN32_WCE]: Register wince_hostio_last_error
9566 as hostio_last_error handler.
9567 (win32_target_ops) [!_WIN32_WCE]: Register
9568 hostio_last_error_from_errno as hostio_last_error handler.
9569 * Makefile.in (SFILES): Add hostio.c and hostio-errno.c.
9570 (hostio-errno.o): New rule.
9571 * configure.ac (GDBSERVER_DEPFILES): Add $srv_hostio_err_objs.
9572 * configure.srv (srv_hostio_err_objs): New variable. Default to
9573 hostio-errno.o.
9574 (arm*-*-mingw32ce*): Set srv_hostio_err_objs to "".
9575 * configure: Regenerate.
9576
2d717e4f
DJ
95772008-01-29 Daniel Jacobowitz <dan@codesourcery.com>
9578
9579 * linux-low.c (linux_attach_lwp): Do not _exit after errors.
9580 (linux_kill, linux_detach): Clean up the process list.
9581 * remote-utils.c (remote_open): Improve port number parsing.
9582 (putpkt_binary, input_interrupt): Only send interrupts if the target
9583 is running.
9584 * server.c (extended_protocol): Make static.
9585 (attached): Define earlier.
9586 (exit_requested, response_needed, program_argv): New variables.
9587 (target_running): New.
9588 (start_inferior): Clear attached here.
9589 (attach_inferior): Set attached here.
9590 (require_running): Define.
9591 (handle_query): Use require_running and target_running. Implement
9592 "monitor exit".
9593 (handle_v_attach, handle_v_run): New.
9594 (handle_v_requests): Use require_running. Handle vAttach and vRun.
9595 (gdbserver_usage): Update.
9596 (main): Redo argument parsing. Handle --debug and --multi. Handle
9597 --attach along with other options or after the port. Save
9598 program_argv. Support no initial program. Resynchronize
9599 communication with GDB after an error. Handle "monitor exit".
9600 Use require_running and target_running. Always allow the extended
9601 protocol. Do not error out for Hc0 or Hc-1. Do not automatically
9602 restart in extended mode.
9603 * README: Refer to the GDB manual. Update --attach usage.
9604
7407e2de
AS
96052007-12-20 Andreas Schwab <schwab@suse.de>
9606
9607 * linux-low.c (STACK_SIZE): Define.
9608 (linux_tracefork_child): Use it. Use __clone2 on ia64.
9609 (linux_test_for_tracefork): Likewise.
9610
b65d95c5
DJ
96112007-12-18 Daniel Jacobowitz <dan@codesourcery.com>
9612
9613 * linux-low.c (linux_wait_for_event): Update messages. Do not
9614 reinsert auto-delete breakpoints.
9615 * mem-break.c (struct breakpoint): Change return type of handler to
9616 int.
9617 (set_breakpoint_at): Update handler type.
9618 (reinsert_breakpoint_handler): Return 1 instead of calling
9619 delete_breakpoint.
9620 (reinsert_breakpoint_by_bp): Check for the original breakpoint before
9621 setting a new one.
9622 (check_breakpoints): Delete auto-delete breakpoints and return 2.
9623 * mem-break.h (set_breakpoint_at): Update handler type.
9624 * thread-db.c (thread_db_create_event, thread_db_create_event): Update.
9625 * win32-low.c (auto_delete_breakpoint): New.
9626 (get_child_debug_event): Use it.
9627
4e799345
DJ
96282007-12-16 Daniel Jacobowitz <dan@codesourcery.com>
9629
9630 * configure.ac: Check for pread and pwrite.
9631 * hostio.c (handle_pread): Fall back to lseek and read.
9632 (handle_pwrite): Fall back to lseek and write.
9633 * config.in, configure: Regenerated.
9634
27524b67
DJ
96352007-12-07 Daniel Jacobowitz <dan@codesourcery.com>
9636
9637 * server.c (myresume): Add own_buf argument.
9638 (main): Update calls.
9639
a20d5e98
DJ
96402007-12-06 Daniel Jacobowitz <dan@codesourcery.com>
9641
9642 * linux-low.c (linux_wait, linux_resume): Do not handle async I/O.
9643 * remote-utils.c (remote_open): Do not call disable_async_io.
9644 (block_async_io): Delete.
9645 (unblock_async_io): Make static.
9646 (initialize_async_io): New.
9647 * server.c (handle_v_cont): Handle async I/O here.
9648 (myresume): Likewise. Move other common resume tasks here...
9649 (main): ... from here. Call initialize_async_io. Disable async
9650 I/O before the main loop.
9651 * server.h (initialize_async_io): Declare.
9652 (block_async_io, unblock_async_io): Delete prototypes.
9653 * spu-low.c (spu_resume, spu_wait): Do not handle async I/O here.
9654
b79d787e
DJ
96552007-12-06 Mick Davis <mickd@goanna.iinet.net.au>
9656
9657 * remote-utils.c (readchar): Allow binary data in received messages.
9658
d97903b2
PA
96592007-12-03 Pedro Alves <pedro_alves@portugalmail.pt>
9660
9661 * win32-low.c (attaching): New global.
9662 (win32_create_inferior): Clear the `attaching' global.
9663 (win32_attach): Set the `attaching' global.
9664 (get_child_debug_event) [_WIN32_WCE]: Stop the inferior when
9665 attaching. Only set a breakpoint at the entry point if not
9666 attaching.
9667
311de423
PA
96682007-12-03 Pedro Alves <pedro_alves@portugalmail.pt>
9669
9670 * server.c (main): Don't report dll events on the initial
9671 connection on attaches.
9672
6c2d16d2
PA
96732007-12-03 Pedro Alves <pedro_alves@portugalmail.pt>
9674
9675 * server.c (main): Relax numerical bases supported for the pid of
9676 the --attach command line argument.
9677
5ca906e6
PA
96782007-12-03 Pedro Alves <pedro_alves@portugalmail.pt>
9679
9680 * win32-low.c (win32_attach): Call OpenProcess before
9681 DebugActiveProcess, not after. Add last error output to error
9682 call.
9683
9c6c8194
PA
96842007-12-03 Pedro Alves <pedro_alves@portugalmail.pt>
9685
9686 * win32-low.c (win32_get_thread_context)
9687 (win32_set_thread_context): New functions.
9688 (thread_rec): Use win32_get_thread_context.
9689 (continue_one_thread, win32_resume): Use win32_set_thread_context.
9690 * win32-low.h (win32_thread_info) [_WIN32_WCE]: Add `base_context'
9691 field.
9692
4d5d1aaa
PA
96932007-12-03 Leo Zayas
9694 Pedro Alves <pedro_alves@portugalmail.pt>
9695
9696 * win32-low.c (soft_interrupt_requested, faked_breakpoint): New
9697 global variables.
9698 (child_add_thread): Minor cleanup.
9699 (child_continue): Resume artificially suspended threads before
9700 calling ContinueDebugEvent.
9701 (suspend_one_thread): New.
9702 (fake_breakpoint_event): New.
9703 (get_child_debug_event): Change return type to int. Check here if
9704 gdb sent an interrupt request. If a soft interrupt was requested,
9705 fake a breakpoint event. Return 0 if there is no event to handle,
9706 and 1 otherwise.
9707 (win32_wait): Don't check here if gdb sent an interrupt request.
9708 Ensure there is a valid event to handle.
9709 (win32_request_interrupt): Add soft interruption method as last
9710 resort.
9711
c436e841
PA
97122007-12-03 Leo Zayas
9713 Pedro Alves <pedro_alves@portugalmail.pt>
9714
9715 * win32-low.h (win32_thread_info): Add descriptions to the
9716 structure members. Replace `suspend_count' counter by a
9717 `suspended' flag.
9718 * win32-low.c (thread_rec): Update condition of when to get the
9719 context from the inferior. Rely on ContextFlags being set if it
9720 has already been retrieved. Only suspend the inferior thread if
9721 we haven't already. Warn if that fails.
9722 (continue_one_thread): s/suspend_count/suspended/. Only call
9723 ResumeThread once. Warn if that fails.
9724
e7b5fa67
PA
97252007-12-02 Pedro Alves <pedro_alves@portugalmail.pt>
9726
9727 * win32-low.c (win32_wait): Don't read from the inferior when it
9728 has already exited.
9729
a385171d
PA
97302007-12-02 Pedro Alves <pedro_alves@portugalmail.pt>
9731
9732 * Makefile.in (win32_low_h): New variable.
9733 (win32-low.o): Add dependency on $(win32_low_h).
9734 (win32-arm-low.o, win32-i386-low.o): New rules.
9735
f80c84b3
DJ
97362007-11-30 Daniel Jacobowitz <dan@codesourcery.com>
9737
9738 * hostio.c: Correct copyright year.
9739
a6b151f1
DJ
97402007-11-30 Daniel Jacobowitz <dan@codesourcery.com>
9741
9742 * Makefile.in (OBS): Add hostio.o.
9743 (hostio.o): New rule.
9744 * server.h (handle_vFile): Declare.
9745 * hostio.c: New file.
9746 * server.c (handle_v_requests): Take packet_len and new_packet_len
9747 for binary packets. Call handle_vFile.
9748 (main): Update call to handle_v_requests.
9749
f9387fc3
DJ
97502007-11-05 Daniel Jacobowitz <dan@codesourcery.com>
9751
9752 * linux-low.c: Include <sched.h>.
9753
51c2684e
DJ
97542007-11-01 Daniel Jacobowitz <dan@codesourcery.com>
9755
9756 * linux-low.c (linux_tracefork_grandchild): New.
9757 (linux_tracefork_child): Use clone.
9758 (linux_test_for_tracefork): Use clone; allocate and free a stack.
9759
75f83163
JB
97602007-10-31 Joel Brobecker <brobecker@adacore.com>
9761
9762 * Makefile.in: Use $(SHELL) instead of "sh" to call regdat.sh.
9763
da5898ce
DJ
97642007-10-24 Daniel Jacobowitz <dan@codesourcery.com>
9765
9766 * linux-low.c (handle_extended_wait): Handle unexpected signals.
9767
24a09b5f
DJ
97682007-10-23 Daniel Jacobowitz <dan@codesourcery.com>
9769
9770 * inferiors.c (change_inferior_id): Delete.
9771 (add_pid_to_list, pull_pid_from_list): New.
9772 * linux-low.c (PTRACE_SETOPTIONS, PTRACE_GETEVENTMSG)
9773 (PTRACE_O_TRACESYSGOOD, PTRACE_O_TRACEFORK, PTRACE_O_TRACEVFORK)
9774 (PTRACE_O_TRACECLONE, PTRACE_O_TRACEEXEC, PTRACE_O_TRACEVFORKDONE)
9775 (PTRACE_O_TRACEEXIT, PTRACE_EVENT_FORK, PTRACE_EVENT_VFORK)
9776 (PTRACE_EVENT_CLONE, PTRACE_EVENT_EXEC, PTRACE_EVENT_VFORK_DONE)
9777 (PTRACE_EVENT_EXIT, __WALL): Provide default definitions.
9778 (stopped_pids, thread_db_active, must_set_ptrace_flags): New variables.
9779 (using_threads): Always set to 1.
9780 (handle_extended_wait): New.
9781 (add_process): Do not set TID.
9782 (linux_create_inferior): Set must_set_ptrace_flags.
9783 (linux_attach_lwp): Remove TID argument. Do not check using_threads.
9784 Use PTRACE_SETOPTIONS. Call new_thread_notify. Update all callers.
9785 (linux_thread_alive): Rename TID argument to LWPID.
9786 (linux_wait_for_process): Handle unknown processes. Do not use TID.
9787 (linux_wait_for_event): Do not use TID or check using_threads. Update
9788 call to dead_thread_notify. Call handle_extended_wait.
9789 (linux_create_inferior): Use PTRACE_SETOPTIONS.
9790 (send_sigstop): Delete sigstop_sent.
9791 (wait_for_sigstop): Avoid TID.
9792 (linux_supports_tracefork_flag, linux_tracefork_child, my_waitpid)
9793 (linux_test_for_tracefork): New.
9794 (linux_lookup_signals): Use thread_db_active and
9795 linux_supports_tracefork_flag.
9796 (initialize_low): Use thread_db_active and linux_test_for_tracefork.
9797 * linux-low.h (get_process_thread): Avoid TID.
9798 (struct process_ifo): Move thread_known and tid to the end. Remove
9799 sigstop_sent.
9800 (linux_attach_lwp, thread_db_init): Update prototypes.
9801 * server.h (change_inferior_id): Delete prototype.
9802 (add_pid_to_list, pull_pid_from_list): New prototypes.
9803 * thread-db.c (thread_db_use_events): New.
9804 (find_first_thread): Rename to...
9805 (find_one_thread): ...this. Update callers and messages. Do not
9806 call fatal. Check thread_db_use_events. Do not call
9807 change_inferior_id or new_thread_notify.
9808 (maybe_attach_thread): Update. Do not call new_thread_notify.
9809 (thread_db_init): Set thread_db_use_events. Check use_events.
9810 * utils.c (fatal, warning): Correct message prefix.
9811
30ed0a8f
DJ
98122007-10-15 Daniel Jacobowitz <dan@codesourcery.com>
9813
9814 * Makefile.in (clean): Remove new files.
9815 (powerpc-32.o, powerpc-32.c, powerpc-e500.o, powerpc-e500.c)
9816 (powerpc-64.o, powerpc-64.c): New rules.
9817 * configure.srv: Use alternate register sets for powerpc64-*-linux*
9818 with AltiVec, powerpc-*-linux* with AltiVec, and powerpc-*-linux*
9819 with SPE.
9820 * linux-ppc-low.c (ppc_regmap): Do not fetch the FP registers for
9821 SPE targets.
9822 (ppc_cannot_store_register): Do not check for FPSCR for SPE targets.
9823 (PTRACE_GETVRREGS, PTRACE_SETVRREGS, SIZEOF_VRREGS, ppc_fill_vrregset)
9824 (ppc_store_vrregset, PTRACE_GETEVRREGS, PTRACE_SETEVRREGS)
9825 (struct gdb_evrregset_t, ppc_fill_evrregset, ppc_store_evrregset): New.
9826 (target_regsets): Add AltiVec and SPE register sets.
9827 * configure.ac: Check for AltiVec and SPE.
9828 * linux-ppc64-low.c (PTRACE_GETVRREGS, PTRACE_SETVRREGS, SIZEOF_VRREGS)
9829 (ppc_fill_vrregset, ppc_store_vrregset): New.
9830 (target_regsets): Add AltiVec register set.
9831 * configure: Regenerated.
9832
fd462a61
DJ
98332007-09-19 Daniel Jacobowitz <dan@codesourcery.com>
9834
9835 * linux-low.c (O_LARGEFILE): Define.
9836 (linux_read_memory): Use /proc/PID/mem.
9837 * configure.ac: Use AC_GNU_SOURCE. Check for pread64.
9838 * configure, config.in: Regenerated.
9839
69f223ed
DJ
98402007-09-04 Daniel Jacobowitz <dan@codesourcery.com>
9841
9842 * linux-low.c (linux_wait_for_event): Do not pass signals while
9843 single-stepping.
9844
aec18585
PA
98452007-09-03 Pedro Alves <pedro_alves@portugalmail.pt>
9846
9847 * win32-low.c (create_process): New.
9848 (win32_create_inferior): Use create_process instead of
9849 CreateProcess. If create_process failed retry appending an ".exe"
9850 suffix. Store the GetLastError result immediatelly after
9851 create_process calls and use it on the call to error.
9852
34d86ddd
PA
98532007-09-03 Pedro Alves <pedro_alves@portugalmail.pt>
9854
9855 * win32-low.c (handle_load_dll): Don't use toolhelp when waiting.
9856
5a0e3bd0
JB
98572007-08-23 Joel Brobecker <brobecker@adacore.com>
9858
9859 * configure.ac: Switch license to GPLv3.
9860
f88c79e6
MS
98612007-08-01 Michael Snyder <msnyder@access-company.com>
9862
9863 * remote-utils.c (putpkt_binary): Memory leak, free buf2.
9864
6b3d9b83
PA
98652007-07-31 Pedro Alves <pedro_alves@portugalmail.pt>
9866
9867 * win32-low.c (winapi_CloseToolhelp32Snapshot) [_WIN32_WCE]: New
9868 typedef.
9869 (win32_CloseToolhelp32Snapshot) [_WIN32_WCE]: New global var.
9870 (load_toolhelp) [_WIN32_WCE]: Load TOOLHELP.DLL. Get
9871 CloseToolhelp32Snapshot.
9872 (toolhelp_get_dll_name) [_WIN32_WCE]: Close the snapshot with
9873 CloseToolhelp32Snapshot.
9874
c588c53c
MS
98752007-07-27 Michael Snyder <michael.snyder@access-company.com>
9876
9877 * server.c (main): Check for inferior exit before main loop.
9878
aa0403d9
PA
98792007-07-18 Pedro Alves <pedro_alves@portugalmail.pt>
9880
9881 * remote-utils.c (remote_open): Set SO_KEEPALIVE on remote_desc
9882 instead of on tmp_desc.
9883
255e7678
DJ
98842007-07-17 Pedro Alves <pedro_alves@portugalmail.pt>
9885 Daniel Jacobowitz <dan@codesourcery.com>
9886
9887 * inferiors.c (all_dlls, dlls_changed, get_dll): New.
9888 (add_thread): Minor cleanups.
9889 (clear_inferiors): Move lower in the file. Clear the DLL
9890 list.
9891 (free_one_dll, match_dll, loaded_dll, unloaded_dll, clear_list): New.
9892 * remote-utils.c (prepare_resume_reply): Check dlls_changed.
9893 (xml_escape_text): New.
9894 * server.c (handle_query): Handle qXfer:libraries:read. Report it
9895 for qSupported.
9896 (handle_v_cont): Report errors.
9897 (gdbserver_version): Update.
9898 (main): Correct size of own_buf. Do not report initial DLL events.
9899 * server.h (struct dll_info, all_dlls, dlls_changed, loaded_dll)
9900 (unloaded_dll, xml_escape_text): New.
9901 * win32-low.c (enum target_waitkind): Update comments.
9902 (win32_add_one_solib, get_image_name, winapi_EnumProcessModules)
9903 (winapi_GetModuleInformation, winapi_GetModuleFileNameExA)
9904 (win32_EnumProcessModules, win32_GetModuleInformation)
9905 (win32_GetModuleFileNameExA, load_psapi, psapi_get_dll_name)
9906 (winapi_CreateToolhelp32Snapshot, winapi_Module32First)
9907 (winapi_Module32Next, win32_CreateToolhelp32Snapshot)
9908 (win32_Module32First, win32_Module32Next, load_toolhelp)
9909 (toolhelp_get_dll_name, handle_load_dll, handle_unload_dll): New.
9910 (get_child_debug_event): Handle DLL events.
9911 (win32_wait): Likewise.
9912
0d37add9
DJ
99132007-07-12 Daniel Jacobowitz <dan@codesourcery.com>
9914
9915 * configure.srv: Set srv_linux_regsets for sh*-*-linux*.
9916 * linux-sh-low.c (sh_fill_gregset, target_regsets): New.
9917
45e2715e
PA
99182007-07-08 Pedro Alves <pedro_alves@portugalmail.pt>
9919
9920 * win32-low.c (handle_output_debug_string): Ignore event if not
9921 waiting.
9922
c5674cf1
PA
99232007-07-08 Pedro Alves <pedro_alves@portugalmail.pt>
9924
9925 * win32-arm-low.c (arm_wince_breakpoint): Fix typo.
9926
2bbe3cc1
DJ
99272007-07-03 Daniel Jacobowitz <dan@codesourcery.com>
9928
9929 * remote-utils.c (look_up_one_symbol): Handle 'm' packets.
9930
ae13219e
DJ
99312007-07-02 Daniel Jacobowitz <dan@codesourcery.com>
9932
9933 * inferiors.c (change_inferior_id): Add comment.
9934 * linux-low.c (check_removed_breakpoint): Add an early
9935 prototype. Improve debug output.
9936 (linux_attach): Doc update.
9937 (linux_detach_one_process, linux_detach): Clean up before releasing
9938 each process.
9939 (send_sigstop, wait_for_sigstop): Improve comments and debug output.
9940 * linux-low.h (struct process_info): Doc improvement.
9941 * mem-break.c (delete_all_breakpoints): New.
9942 * mem-break.h (delete_all_breakpoints): New prototype.
9943 * thread-db.c (find_first_thread): New.
9944 (thread_db_create_event): Call it instead of
9945 thread_db_find_new_threads. Clean up unused variables.
9946 (maybe_attach_thread): Remove first thread handling.
9947 (thread_db_find_new_threads): Use find_first_thread.
9948 (thread_db_get_tls_address): Likewise.
9949
4105de34
DJ
99502007-06-27 Daniel Jacobowitz <dan@codesourcery.com>
9951
9952 * thread-db.c (thread_db_find_new_threads): Add prototype.
9953 (thread_db_create_event): Check for the main thread before adding
9954 a new thread.
9955 (maybe_attach_thread): Only enable event reporting if TID == 0.
9956 (thread_db_get_tls_address): Check for new threads.
9957
2b876972
DJ
99582007-06-20 Daniel Jacobowitz <dan@codesourcery.com>
9959
9960 * linux-low.c (linux_create_inferior): Try execv before execvp.
9961 * spu-low.c (spu_create_inferior): Likewise.
9962
7a245884
DJ
99632007-06-13 Mike Frysinger <vapier@gentoo.org>
9964
9965 * linux-low.c (linux_create_inferior): Change execv to execvp.
9966 * spu-low.c (spu_create_inferior): Likewies.
9967
117ce543
DJ
99682007-06-13 Daniel Jacobowitz <dan@codesourcery.com>
9969
9970 * Makefile.in (clean): Clean new files instead of deleted ones.
9971 (reg-mips.o, reg-mips.c, reg-mips64.o, reg-mips64.c): Delete.
9972 (mips-linux.o, mips-linux.c, mips64-linux.o, mips64-linux.c): New
9973 rules.
9974 * configure.srv: Specify XML files and new regformats for MIPS and
9975 MIPS64 GNU/Linux.
9976 * linux-mips-low.c (mips_num_regs): Set to only used registers.
9977 (mips_regmap): Do not fetch $0. Remove unused registers. Add
9978 an entry for the restart register.
9979 (mips_cannot_fetch_register, mips_cannot_store_register)
9980 (mips_reinsert_addr, mips_fill_fpregset, mips_store_fpregset): Update
9981 register names to match the XML descriptions.
9982 (mips_fill_gregset, mips_store_gregset): Likewise. Handle the
9983 restart register instead of $0.
9984
0e7f50da
UW
99852007-06-12 Ulrich Weigand <uweigand@de.ibm.com>
9986 Markus Deuling <deuling@de.ibm.com>
9987
9988 * remote-utils.c (decode_xfer_write): New function.
9989 * server.h (decode_xfer_write): Add prototype.
9990 * server.c (handle_query): Add PACKET_LEN argument. Support
9991 qXfer:spu:read and qXfer:spu:write packets.
9992 (main): Pass packet_len to handle_query.
9993 * spu-low.c (spu_target_ops): Add spu_proc_xfer_spu.
9994 * target.h (target_ops): Add qxfer_spu.
9995
374c1d38
UW
99962007-06-12 Ulrich Weigand <uweigand@de.ibm.com>
9997
9998 * spu-low.c (spu_proc_xfer_spu): Do not return failure when
9999 accessing non-seekable spufs files.
10000
bb63802a
UW
100012007-05-16 Markus Deuling <deuling@de.ibm.com>
10002
889bf7c5 10003 * server.c (handle_query): Add reply for qC packet.
bb63802a 10004
7390519e
PA
100052007-05-10 Pedro Alves <pedro_alves@portugalmail.pt>
10006 Leo Zayas <lerele@champenstudios@com>
10007
10008 * server.h (check_remote_input_interrupt_request): New function.
10009 * remote_utils.c (INVALID_DESCRIPTOR): New define.
10010 (remote_desc): Initialize with INVALID_DESCRIPTOR.
10011 (input_interrupt): Expose on USE_WIN32API too. Fix whitespace.
10012 (check_remote_input_interrupt_request): New function.
10013 * server.h (check_remote_input_interrupt_request): Declare.
3ecf0694 10014 * win32-low.c (winapi_DebugBreakProcess,
7390519e
PA
10015 winapi_GenerateConsoleCtrlEvent): New typedefs.
10016 (get_child_debug_event): Lower Win32 debug event polling from 1 sec
10017 to 250 ms.
10018 (win32_wait): Check for remote interrupt request
10019 with check_remote_input_interrupt_request.
10020 (win32_request_interrupt): New function.
10021 (win32_target_op): Set request_interrupt to win32_request_interrupt.
10022
34b34921
PA
100232007-05-10 Pedro Alves <pedro_alves@portugalmail.pt>
10024
10025 * win32-low.c (debug_registers_changed,
10026 debug_registers_used, CONTEXT_EXTENDED_REGISTERS,
10027 CONTEXT_FLOATING_POINT, CONTEXT_DEBUG_REGISTERS,
10028 CONTEXT_DEBUGGER, CONTEXT_DEBUGGER_DR): Delete.
10029 (thread_rec): Get context using the low target.
10030 (child_add_thread): Call thread_added on the low target,
10031 which does the same thing.
10032 (regptr): Delete.
10033 (do_initial_child_stuff): Remove debug registers references.
10034 Set context using the low target. Resume threads after
10035 setting the contexts.
10036 (child_continue): Remove dead variable. Remove debug
10037 registers references.
10038 (child_fetch_inferior_registers): Go through the low target.
10039 (do_child_store_inferior_registers): Remove.
10040 (child_store_inferior_registers): Go through the low target.
10041 (win32_resume): Remove debug registers references.
10042 Set context using the low target.
10043 (handle_exception): Change return type to void. Don't record
10044 context here. Set status to TARGET_WAITKIND_SPURIOUS on a
10045 first chance exception.
889bf7c5 10046 (get_child_debug_event): Change return type to void. Remove
34b34921
PA
10047 goto loop. Always return after waiting for debug event.
10048 (win32_wait): Convert to switch statement. Handle spurious
10049 events.
10050
10051 * win32-i386-low.c (debug_registers_changed,
10052 debug_registers_used): New.
10053 (initial_stuff): Rename to ...
10054 (i386_initial_stuff): ... this. Clear debug registers
10055 state variables.
10056 (store_debug_registers): Delete.
10057 (i386_get_thread_context): New.
10058 (load_debug_registers): Delete.
10059 (i386_set_thread_context): New.
10060 (i386_thread_added): New.
10061 (single_step): Rename to ...
10062 (i386_single_step): ... this.
10063 (do_fetch_inferior_registers): Rename to ...
10064 (i386_fetch_inferior_register): ... this.
10065 (i386_store_inferior_register): New.
10066 (the_low_target): Adapt to new interface.
10067
10068 * win32-arm-low.c (CONTEXT_FLOATING_POINT): Define.
10069 (arm_get_thread_context): New.
10070 (arm_set_thread_context): New.
10071 (regptr): New.
10072 (do_fetch_inferior_registers): Rename to ...
10073 (arm_fetch_inferior_register): ... this.
10074 (arm_store_inferior_register): New.
10075 (arm_wince_breakpoint): Reimplement as unsigned long.
10076 (arm_wince_breakpoint_len): Define.
10077 (the_low_target): Adapt to new interface.
10078
10079 * win32-low.h (target_ops): Remove regmap, store_debug_registers and
10080 load_debug_registers. Add get_thread_context, set_thread_context,
10081 thread_added and store_inferior_register. Rename
10082 fetch_inferior_registers to fetch_inferior_register.
10083 (regptr): Remove declaration.
10084
dd6953e1
PA
100852007-05-10 Pedro Alves <pedro_alves@portugalmail.pt>
10086
10087 * linux-low.c (linux_detach): Change return type to int. Return 0.
10088 * spu-low.c (spu_detach): Likewise.
10089
444d6139
PA
100902007-05-10 Pedro Alves <pedro_alves@portugalmail.pt>
10091
10092 * target.h (target_ops): Change return type of detach to int.
10093 Add join.
10094 (join_inferior): New.
10095 * server.c (main): Don't skip detach support on mingw32.
10096 If the inferior doesn't support detaching return error.
10097 Call join_inferior instead of using waitpid.
10098 * linux-low.c (linux_join): New.
10099 (linux_target_op): Add linux_join.
10100 * spu-low.c (spu_join): New.
10101 (spu_target_ops): Add spu_join.
10102 * win32-low.c (win32_detach): Adapt to new interface.
10103 Reopen current_process_handle before detaching. Issue a child
10104 resume before detaching.
10105 (win32_join): New.
10106 (win32_target_op): Add win32_join.
10107
1d5315fe
PA
101082007-05-10 Pedro Alves <pedro_alves@portugalmail.pt>
10109
10110 * win32-low.c (win32-attach): Fix return value.
10111 * target.h (target_ops): Describe ATTACH return values.
10112
bf914831
PA
101132007-05-10 Pedro Alves <pedro_alves@portugalmail.pt>
10114
10115 * win32-low.c (GETPROCADDRESS): Define.
10116 (winapi_DebugActiveProcessStop): Add WINAPI. typedef as pointer.
10117 (winapi_DebugSetProcessKillOnExit): Likewise.
10118 (win32_create_inferior): Force usage of ansi CreateProcessA.
10119 (win32_attach): Use GETPROCADDRESS.
10120 (win32_detach): Likewise.
10121
f72f3e60
PA
101222007-05-10 Pedro Alves <pedro_alves@portugalmail.pt>
10123
10124 * win32-low.c (win32_wait): Don't use WSTOPSIG.
10125
ed50f18f
PA
101262007-03-30 Pedro Alves <pedro_alves@portugalmail.pt>
10127
10128 * win32-low.c: Commit leftover changes from 2007-03-29.
10129
0c2ead7e
DJ
101302007-03-30 Daniel Jacobowitz <dan@codesourcery.com>
10131
10132 * i387-fp.c (struct i387_fsave, struct i387_fxsave): Make 16-bit
10133 fields short instead of int. Add explicit padding.
10134 (i387_cache_to_fsave): Remove unnecessary casts.
10135 (i387_fsave_to_cache): Doc fix.
10136 (i387_cache_to_fxsave): Remove unnecessary casts and masking.
10137
73725ff3
DJ
101382007-03-30 Daniel Jacobowitz <dan@codesourcery.com>
10139
10140 * i387-fp.c (i387_cache_to_fxsave): Reinitialize val2 before use.
10141 (i387_fxsave_to_cache): Check fp->ftag while building ftag value.
10142
d99f33d8
PA
101432007-03-29 Pedro Alves <pedro_alves@portugalmail.pt>
10144
10145 * configure.srv (arm*-*-mingw32ce*): Move near the other
10146 arm targets.
10147
68070c10
PA
101482007-03-29 Pedro Alves <pedro_alves@portugalmail.pt>
10149
2482afc6 10150 * configure.ac: Add errno checking.
68070c10
PA
10151 (AC_CHECK_HEADERS): Add errno.h, fcntl.h, signal.h,
10152 sys/file.h and malloc.h.
10153 (AC_CHECK_DECLS): Add perror.
10154 (srv_mingwce): Handle.
2482afc6 10155 * configure.srv (i[34567]86-*-cygwin*): Add
68070c10
PA
10156 win32-i386-low.o to srv_tgtobj.
10157 (i[34567]86-*-mingw*): Likewise.
10158 (arm*-*-mingw32ce*): Add case.
10159 * gdbreplay.c [HAVE_SYS_FILE_H, HAVE_SIGNAL_H,
10160 HAVE_FCNTL_H, HAVE_ERRNO_H, HAVE_MALLOC_H]: Check.
10161 [__MINGW32CE__] (strerror): New function.
10162 [__MINGW32CE__] (errno): Define to GetLastError.
10163 [__MINGW32CE__] (COUNTOF): New macro.
10164 (remote_open): Remove extra close call.
10165 * mem-break.c (delete_breakpoint_at): New function.
10166 * mem-break.h (delete_breakpoint_at): Declare.
10167 * remote-utils.c [HAVE_SYS_FILE_H, HAVE_SIGNAL_H,
10168 HAVE_FCNTL_H, HAVE_UNISTD_H, HAVE_ERRNO_H]: Check.
10169 [USE_WIN32API] (read, write): Add char* casts.
10170 * server.c [HAVE_UNISTD_H, HAVE_SIGNAL_H]: Check.
10171 * server.h: Include wincecompat.h on Windows CE.
10172 [HAVE_ERRNO_H]: Check.
10173 (perror): Declare if not declared.
10174 * utils.c: Add stdlib.h, errno.h and malloc.h includes.
10175 (perror_with_name): Remove errno declaration.
10176 * wincecompat.h: New.
10177 * wincecompat.c: New.
10178 * win32-low.h: New.
10179 * win32-arm-low.c: New.
10180 * win32-i386-low.c: New.
10181 (win32-low.c): Include mem-break.h and win32-low.h, and winnt.h.
10182 (OUTMSG2): Make it safe.
10183 (_T): New macro.
10184 (COUNTOF): New macro.
10185 (NUM_REGS): Get it from the low target.
10186 (CONTEXT_EXTENDED_REGISTERS, CONTEXT_FLOATING_POINT,
10187 CONTEXT_DEBUG_REGISTERS): Add fallbacks to 0.
10188 (thread_rec): Let low target handle debug registers.
10189 (child_add_thread): Likewise.
10190 (child_init_thread_list): Likewise.
10191 (continue_one_thread): Likewise.
10192 (regptr): New.
10193 (do_child_fetch_inferior_registers): Move to ...
10194 * win32-i386-low.c: ... here, and rename to ...
10195 (do_fetch_inferior_registers): ... this.
889bf7c5 10196 * win32-low.c (child_fetch_inferior_registers):
68070c10
PA
10197 Go through the low target.
10198 (do_child_store_inferior_registers): Use regptr.
10199 (strwinerror): New function.
10200 (win32_create_inferior): Handle Windows CE.
10201 Use strwinerror instead of strerror on Windows error
10202 codes. Add program to the error output.
10203 Don't close the main thread handle on Windows CE.
10204 (win32_attach): Use coredll.dll on Windows CE.
10205 (win32_kill): Close current process and current
10206 thread handles.
10207 (win32_detach): Use coredll.dll on Windows CE.
10208 (win32_resume): Let low target handle debug registers, and
10209 step request.
10210 (handle_exception): Add/Remove initial breakpoint. Avoid
10211 non-existant WSTOPSIG on Windows CE.
10212 (win32_read_inferior_memory): Cast to remove warning.
10213 (win32_arch_string): Go through the low target.
10214 (initialize_low): Call set_breakpoint_data with the low
10215 target's breakpoint.
10216 * win32-low.c (dr, FLAG_TRACE_BIT, FCS_REGNUM,
10217 FOP_REGNUM, mappings): Move to ...
10218 * win32-i386-low.c: ... here.
10219 * win32-low.c (win32_thread_info): Move to ...
10220 * win32-low.h: ... here.
10221 * Makefile.in (SFILES): Add win32-low.c, win32-i386-low.c,
10222 win32-arm-low.c and wincecompat.c.
10223 (all:): Add $EXEEXT.
10224 (install-only:): Likewise.
10225 (gdbserver:): Likewise.
10226 (gdbreplay:): Likewise.
10227 * config.in: Regenerate.
10228 * configure: Regenerate.
10229
41093d81
PA
102302007-03-28 Pedro Alves <pedro_alves@portugalmail.pt>
10231
10232 * win32-low.c: Rename typedef thread_info to
10233 win32_thread_info throughout.
10234
544afa54
PA
102352007-03-28 Pedro Alves <pedro_alves@portugalmail.pt>
10236
10237 * win32-i386-low.c: Rename to ...
10238 * win32-low.c: ... this.
10239 * configure.srv: Replace win32-i386-low.o with win32-low.o.
10240 * Makefile.in: Likewise.
10241
bce7165d
PA
102422007-03-27 Pedro Alves <pedro_alves@portugalmail.pt>
10243
10244 * remote-utils.c (monitor_output): Constify msg parameter.
10245 * server.h (monitor_output): Likewise.
10246 * win32-i386-low.c (handle_output_debug_string): New.
10247 (win32_kill): Handle OUTPUT_DEBUG_STRING_EVENT events using
10248 handle_output_debug_string.
10249 (get_child_debug_event): Likewise.
10250
506c7aa0
DJ
102512007-03-27 Mat Hostetter <mat@lcs.mit.edu>
10252
10253 * server.c (main): Correct strtoul check.
10254
42c81e2a
DJ
102552007-03-27 Jon Ringle <jon@ringle.org>
10256
10257 * linux-low.c: Check __ARCH_HAS_MMU__ also.
10258
9453113a
DJ
102592007-03-27 Brooks Moses <brooks.moses@codesourcery.com>
10260
10261 * Makefile.in: Add dummy "pdf" and "install-pdf" targets.
10262
64a69107
DJ
102632007-02-27 Daniel Jacobowitz <dan@codesourcery.com>
10264
10265 * terminal.h: Check HAVE_SGTTY_H.
10266
102672007-02-27 Mat Hostetter <mat@lcs.mit.edu>
6f8486da
DJ
10268
10269 * remote-utils.c (remote_open): Print out the assigned port number.
10270
c74d0ad8
DJ
102712007-02-26 Daniel Jacobowitz <dan@codesourcery.com>
10272
10273 * remote-utils.c (monitor_output): New function.
10274 * server.c (debug_threads): Define here.
10275 (monitor_show_help): New function.
10276 (handle_query): Handle qRcmd.
10277 (main): Do not handle 'd' packet.
10278 * server.h (debug_threads, remote_debug, monitor_output): Declare.
10279 * linux-low.c, spu-low.c, win32-i386-low.c: Remove definitions
10280 of debug_threads.
10281
de7c3b4a
PA
102822007-02-25 Pedro Alves <pedro_alves@portugalmail.pt>
10283
10284 * Makefile.in (EXEEXT): New.
10285 (clean): Use $(EXEEXT).
10286
ef57601b
PA
102872007-02-25 Pedro Alves <pedro_alves@portugalmail.pt>
10288
10289 * target.h (target_ops): Rename send_signal to request_interrupt,
10290 and remove enum target_signal parameter.
10291 * linux-low.c (linux_request_interrupt): Rename from
10292 linux_send_signal, and always send SIGINT.
10293 * spu-low.c (spu_request_interrupt): Rename from spu_send_signal,
10294 and always send SIGINT.
10295 * remote-utils.c (putpkt_binary): Call request_interrupt, instead
10296 of send_signal.
10297 (input_interrupt): Likewise.
10298
820f2bda
PA
102992007-02-25 Pedro Alves <pedro_alves@portugalmail.pt>
10300
10301 * server.c (get_features_xml): Check if target implemented
10302 arch_string.
10303 * win32-i386-low.c (win32_arch_string): New.
10304 (win32_target_ops): Add win32_arch_string as arch_string member.
10305
ab39bf24
UW
103062007-02-22 Markus Deuling <deuling@de.ibm.com>
10307
10308 * spu-low.c (spu_arch_string): New.
10309 (spu_target_ops): Add spu_arch_string.
10310
61ff6e04
DJ
103112007-02-16 Daniel Jacobowitz <dan@codesourcery.com>
10312
10313 * remote-utils.c: Remove HAVE_TERMINAL_H check.
10314 * configure.ac: Do not check for terminal.h.
10315 * configure, config.in: Regenerated.
10316
fb1e4ffc
DJ
103172007-02-08 Daniel Jacobowitz <dan@codesourcery.com>
10318
10319 * Makefile.in (OBS): Add $(XML_BUILTIN).
10320 (XML_DIR, XML_TARGET, XML_FILES, XML_BUILTIN): New.
10321 (clean): Update.
10322 (target.xml, xml-builtin.c, stamp-xml, arm-with-iwmmxt.o)
10323 (arm-with-iwmmxt.c): New.
10324 * config.in, configure: Regenerate.
10325 * configure.ac: Check for iWMMXt. Handle srv_xmltarget,
10326 srv_xmlbuiltin, and srv_xmlfiles. Define USE_XML.
10327 * configure.srv: Mention srv_xmltarget and srv_xmlfiles.
10328 (arm*-*-linux*): Add iWMMXt and regset support.
10329 * linux-arm-low.c (PTRACE_GETWMMXREGS, PTRACE_SETWMMXREGS): Define.
10330 (arm_fill_gregset, arm_store_gregset, arm_fill_wmmxregset)
10331 (arm_store_wmmxregset, target_regsets): New.
10332 * server.c (get_features_xml): Take annex argument. Check builtin
10333 XML documents.
10334 (handle_query): Handle multiple annexes.
10335
0f48aa01
DJ
103362007-01-29 Daniel Jacobowitz <dan@codesourcery.com>
10337
10338 * remote-utils.c [USE_WIN32API] (read, write): Define.
10339 (putpkt_binary, input_interrupt, readchar, getpkt): Use read and
10340 write.
10341
23181151
DJ
103422007-01-09 Daniel Jacobowitz <dan@codesourcery.com>
10343
10344 * linux-i386-low.c (the_low_target): Set arch_string.
10345 * linux-x86-64-low.c (the_low_target): Likewise.
10346 * linux-low.c (linux_arch_string): New.
10347 (linux_target_ops): Add it.
10348 * linux-low.h (struct linux_target_ops): Add arch_string.
10349 * server.c (write_qxfer_response): Use const void * for DATA.
10350 (get_features_xml): New.
10351 (handle_query): Handle qXfer:features:read. Report it for qSupported.
10352 * target.h (struct target_ops): Add arch_string method.
10353
9d606399
DJ
103542007-01-03 Denis Pilat <denis.pilat@st.com>
10355 Daniel Jacobowitz <dan@codesourcery.com>
10356
10357 * linux-low.c (linux_kill): Handle being called with no threads.
10358 * win32-i386-low.c (win32_kill): Likewise.
10359 (get_child_debug_event): Clear current_process_handle.
10360
103612006-12-30 Denis PILAT <denis.pilat@st.com>
8264bb58
DJ
10362 Daniel Jacobowitz <dan@codesourcery.com>
10363
10364 * remote-utils.c (remote_open): Check the type of specified
10365 serial port devices before opening them.
10366 * server.c (main): Kill the inferior if an error occurs during
10367 the first remote_open.
10368
a5e13d24
DJ
103692006-12-05 Markus Deuling <deuling@de.ibm.com>
10370
10371 * README: Update supported targets.
10372
186947f7
DJ
103732006-11-28 Daniel Jacobowitz <dan@codesourcery.com>
10374
10375 * Makefile.in (clean): Remove reg-mips64.c.
10376 (reg-mips64.c, reg-mips64.o): New rules.
10377 * configure.srv: Handle mips64. Include regset support for mips.
10378 * linux-mips-low.c (union mips_register): New.
10379 (mips_get_pc, mips_set_pc, mips_reinsert_addr): Use it.
10380 (mips_breakpoint, mips_breakpoint_at): Use int.
10381 (mips_collect_register, mips_supply_register)
10382 (mips_collect_register_32bit, mips_supply_register_32bit)
10383 (mips_fill_gregset, mips_store_gregset, mips_fill_fpregset)
10384 (mips_store_fpregset, target_regsets): New.
10385 * thread-db.c (thread_db_get_tls_address): Use uintptr_t.
10386
a13e2c95
UW
103872006-11-22 Ulrich Weigand <uweigand@de.ibm.com>
10388
10389 * configure.srv: Add target "spu*-*-*".
10390 * Makefile.in (clean): Remove reg-spu.c.
10391 (reg-spu.c, reg-spu.o, spu-low.o): Add dependencies.
10392 * spu-low.c: New file.
10393
cb7283db
DJ
103942006-11-16 Daniel Jacobowitz <dan@codesourcery.com>
10395
10396 * configure.ac: Correct td_thr_tls_get_addr test.
10397 * configure: Regenerated.
10398
89be2091
DJ
103992006-11-16 Daniel Jacobowitz <dan@codesourcery.com>
10400
10401 * linux-low.c (linux_wait_for_event): Reformat. Use the
10402 pass_signals array.
10403 * remote-utils.c (decode_address_to_semicolon): New.
10404 * server.c (pass_signals, handle_general_set): New.
10405 (handle_query): Mention QPassSignals for qSupported.
10406 (main): Call handle_general_set.
10407 * server.h (pass_signals, decode_address_to_semicolon): New.
10408
000ef4f0
DJ
104092006-11-06 Daniel Jacobowitz <dan@codesourcery.com>
10410
10411 * server.c (handle_query): Correct error handling for read_auxv.
10412
b7149293
UW
104132005-10-19 Ulrich Weigand <uweigand@de.ibm.com>
10414
10415 * configure.srv [s390-*-linux*, s390x-*-linux*]: Set srv_linux_regsets
10416 and srv_linux_thread_db to yes.
10417 * linux-s390-low.c (s390_fill_gregset): New function.
10418 (target_regsets): Define data structure.
10419
dae5f5cf
DJ
104202006-10-17 Daniel Jacobowitz <dan@codesourcery.com>
10421
10422 * acinclude.m4 (SRV_CHECK_TLS_GET_ADDR): New.
10423 * configure.ac: Use it. Define HAVE_TD_THR_TLS_GET_ADDR.
10424 * config.in, configure: Regenerated.
10425 * inferiors.c (gdb_id_to_thread): New function.
10426 (gdb_id_to_thread_id): Use it.
10427 * linux-low.c (linux_target_ops): Use thread_db_get_tls_address.
10428 * linux-low.h (struct process_info): Add th member.
10429 (thread_db_get_tls_address): New prototype.
10430 * remote-utils.c (decode_address): Make non-static.
10431 * server.c (handle_query): Handle qGetTLSAddr.
10432 * server.h (gdb_id_to_thread, decode_address): New prototypes.
10433 * target.h (struct target_ops): Add get_tls_address.
10434 * thread-db.c (maybe_attach_thread): Save the thread handle.
10435 (thread_db_get_tls_address): New.
10436
32ca6d61
DJ
104372006-09-28 Daniel Jacobowitz <dan@codesourcery.com>
10438
10439 * linux-low.c (PTRACE_GETSIGINFO, PTRACE_SETSIGINFO): Define.
10440 (linux_resume_one_process): Take a siginfo_t *. Update all
10441 callers. Queue it if necessary. Use PTRACE_SETSIGINFO.
10442 (struct pending_signals): Add a siginfo_t.
10443 (linux_wait_for_process): Always set last_status.
10444 (linux_wait_for_event): Use PTRACE_GETSIGINFO.
10445 (linux_queue_one_thread): Use PTRACE_GETSIGINFO.
10446 * linux-low.h (struct process_info): Add last_status.
10447
5ffff7c1
DJ
104482006-09-21 Daniel Jacobowitz <dan@codesourcery.com>
10449
10450 * remote-utils.c (try_rle): New function.
10451 (putpkt_binary): Use it.
10452
8695c747
DJ
104532006-08-19 Daniel Jacobowitz <dan@codesourcery.com>
10454
10455 * Makefile.in (clean): Clean reg-x86-64-linux.c.
10456 (reg-x86-64-linux.o, reg-x86-64-linux.c): New.
10457 * configure.srv (x86_64-*-linux*): Use reg-x86-64-linux.o.
10458 * linux-x86-64-low.c (x86_64_regmap): Include ORIG_RAX.
10459 (x86_64_fill_gregset, x86_64_store_gregset): Skip floating
10460 point registers.
10461
290fadea
RS
104622006-08-08 Richard Sandiford <richard@codesourcery.com>
10463
10464 * server.c (terminal_fd): New variable.
10465 (old_foreground_pgrp): Likewise.
10466 (restore_old_foreground_pgrp): New function.
10467 (start_inferior): Record the terminal file descriptor in terminal_fd
10468 and its original foreground group in old_foreground_pgrp. Register
10469 restore_old_foreground_pgrp with atexit().
10470
9f2e1e63
DJ
104712006-07-26 Daniel Jacobowitz <dan@codesourcery.com>
10472
10473 * server.c (handle_query): Correct qPart to qXfer.
10474
b80864fb
DJ
104752006-07-22 Daniel Jacobowitz <dan@codesourcery.com>
10476
10477 * configure.ac: Check for more headers which are missing on
10478 Windows. Automatically supply -lwsock32 and USE_WIN32API.
10479 * configure.srv: Add Cygwin and mingw32.
10480 * remote-utils.c: Don't include headers unconditionally which
10481 are missing on mingw32. Include <winsock.h> for mingw32.
10482 (remote_open): Adjust for mingw32 support. Flush
10483 standard error after writing to it.
10484 (remote_close, putpkt_binary, input_interrupt, block_async_io)
10485 (unblock_async_io, enable_async_io, disable_async_io)
10486 (readchar, getpkt): Update for Winsock support.
10487 (prepare_resume_reply): Expect a protocol signal number.
10488 * server.c: Disable <sys/wait.h> on mingw32.
10489 (start_inferior): Adjust for mingw32 support. Flush
10490 standard error after writing to it.
10491 (attach_inferior): Likewise. Use protocol signal
10492 numbers.
10493 (main): Skip 'D' packet on mingw32. Use protocol signal numbers
10494 and names.
10495 * win32-i386-low.c: New file.
10496 * Makefile.in (XM_CLIBS): Set.
10497 (gdbserver, gdbreplay): Use $(INTERNAL_CFLAGS).
10498 (win32-i386-low.o): New dependency rule.
10499 * linux-low.c (linux_wait): Use target signal numbers.
10500 * target.h (struct target_ops): Doc fix.
10501 * server.h (target_signal_to_name): New prototype.
10502 * gdbreplay.c: Don't include headers unconditionally which
10503 are missing on mingw32. Include <winsock.h> for mingw32.
10504 (remote_close, remote_open): Adjust for Winsock support.
10505 * configure, config.in: Regenerated.
10506
0876f84a
DJ
105072006-07-12 Daniel Jacobowitz <dan@codesourcery.com>
10508
10509 * server.c (decode_xfer_read, write_qxfer_response): New.
10510 (handle_query): Take a packet length argument. Handle
10511 qXfer:auxv:read instead of qPart:auxv:read. Mention it in
10512 the qSupported response.
10513 (main): Update call to handle_query.
10514
01f9e8fa
DJ
105152006-06-22 Daniel Jacobowitz <dan@codesourcery.com>
10516
10517 * remote-utils.c (remote_escape_output, remote_unescape_input): New.
10518 (putpkt_binary): Renamed from putpkt and adjusted for binary
10519 data.
10520 (putpkt): New wrapper for putpkt_binary.
10521 (readchar): Don't mask off the high bit.
10522 (decode_X_packet): New function.
10523 * server.c (main): Call putpkt_binary if a handler sets the packet
10524 length. Save the length of the incoming packet. Handle 'X'.
10525 * server.h (gdb_byte, remote_escape_output, decode_X_packet): New.
10526
be2a5f71
DJ
105272006-06-21 Daniel Jacobowitz <dan@codesourcery.com>
10528
10529 * server.c (handle_query): Handle qSupported.
10530
ea025f5f
DJ
105312006-05-30 Daniel Jacobowitz <dan@codesourcery.com>
10532
10533 * remote-utils.c (all_symbols_looked_up): New variable.
10534 (look_up_one_symbol): Check it.
10535 * server.h (look_up_one_symbol): New declaration.
10536 * thread-db.c (thread_db_init): Set all_symbols_looked_up.
10537
9308fc88
DJ
105382006-05-30 Daniel Jacobowitz <dan@codesourcery.com>
10539
10540 * Makefile.in (linux-arm-low.o): Update dependencies.
66f338c7 10541 * linux-arm-low.c: Include "gdb_proc_service.h".
9308fc88
DJ
10542 (PTRACE_GET_THREAD_AREA): Define.
10543 (ps_get_thread_area): New function.
10544
52fb6437
NS
105452006-05-09 Nathan Sidwell <nathan@codesourcery.com>
10546
10547 * configure.srv (m68k*-*-uclinux*): New target.
10548 * linux-low.c (linux_create_inferior): Use vfork on mmuless systems.
10549 (linux_resume_one_process): Remove extraneous cast.
10550 (linux_read_offsets): New.
10551 (linux_target_op): Add linux_read_offsets on mmuless systems.
10552 * server.c (handle_query): Add qOffsets logic.
10553 * target.h (struct target_ops): Add read_offsets.
10554
21b0f40c
DJ
105552006-03-15 Daniel Jacobowitz <dan@codesourcery.com>
10556
10557 * linux-mips-low.c: Include <sys/ptrace.h> and "gdb_proc_service.h".
10558 (PTRACE_GET_THREAD_AREA): Define.
10559 (ps_get_thread_area): New function.
10560 * Makefile.in (linux-i386-low.o, linux-mips-low.o)
10561 (linux-x86-64-low.o): Update.
10562
0050a760
DJ
105632006-03-15 Daniel Jacobowitz <dan@codesourcery.com>
10564
10565 * configure.ac: Remove checks for prfpregset_t.
10566 * gdb_proc_service.h: New file.
10567 * linux-i386-low.c, linux-x86-64-low.c, thread-db.c: Use the
10568 new "gdb_proc_service.h".
10569 * proc-service.c: Likewise.
10570 (ps_pglobal_lookup, ps_pdread, ps_pdwrite): Use psaddr_t.
10571 (ps_lgetfpregs, ps_lsetfpregs): Use a void* argument.
10572 * Makefile.in (gdb_proc_service_h): Updated.
10573 * configure, config.in: Regenerated.
10574
b92a518e
DJ
105752006-03-03 Daniel Jacobowitz <dan@codesourcery.com>
10576
10577 * remote-utils.c (prepare_resume_reply): Move declaration
10578 of gdb_id_from_wait to the top of the block.
10579
545587ee
DJ
105802006-02-15 Daniel Jacobowitz <dan@codesourcery.com>
10581
10582 * linux-low.c (regsets_store_inferior_registers): Read the regset
10583 from the target before filling it.
10584
9db87ebd
DJ
105852006-02-08 Daniel Jacobowitz <dan@codesourcery.com>
10586
10587 * server.c (attach_inferior): Return SIGTRAP for a successful
10588 attach.
10589
dd24457d
DJ
105902006-02-01 Daniel Jacobowitz <dan@codesourcery.com>
10591
10592 * Makefile.in (OBS): Add version.o.
10593 (STAGESTUFF): Delete.
10594 (version.o): Add dependencies.
10595 (version.c): Replace rule.
10596 (clean): Remove version.c.
10597 * server.c (gdbserver_version): New.
10598 (gdbserver_usage): Use printf.
10599 (main): Handle --version and --help.
10600 * server.h (version, host_name): Add declarations.
10601
6f0f660e
EZ
106022005-12-23 Eli Zaretskii <eliz@gnu.org>
10603
889bf7c5
PA
10604 * linux-arm-low.c:
10605 * linux-arm-low.c:
10606 * inferiors.c:
10607 * i387-fp.h:
10608 * i387-fp.c:
10609 * gdbreplay.c:
10610 * regcache.c:
10611 * proc-service.c:
10612 * mem-break.h:
10613 * mem-break.c:
10614 * linux-x86-64-low.c:
10615 * linux-sh-low.c:
10616 * linux-s390-low.c:
10617 * linux-ppc64-low.c:
10618 * linux-ppc-low.c:
10619 * linux-mips-low.c:
10620 * linux-m68k-low.c:
10621 * linux-m32r-low.c:
10622 * linux-low.h:
10623 * linux-low.c:
10624 * linux-ia64-low.c:
10625 * linux-i386-low.c:
10626 * linux-crisv32-low.c:
10627 * thread-db.c:
10628 * terminal.h:
10629 * target.h:
10630 * target.c:
10631 * server.h:
10632 * server.c:
10633 * remote-utils.c:
10634 * regcache.h:
10635 * utils.c:
10636 * Makefile.in:
10637 * configure.ac:
6f0f660e
EZ
10638 * gdbserver.1: Add (C) after Copyright. Update the FSF
10639 address.
10640
9d1fb177
DJ
106412005-11-13 Daniel Jacobowitz <dan@codesourcery.com>
10642
10643 * linux-arm-low.c (arm_eabi_breakpoint): New variable.
10644 (arm_breakpoint_at): Recognize both breakpoints.
10645 (the_low_target): Use the correct breakpoint instruction.
10646
011a70c2
DJ
106472005-11-02 Daniel Jacobowitz <dan@codesourcery.com>
10648
10649 * configure.srv (x86_64-*-linux*): Turn on thread_db support.
10650 * linux-x86-64-low.c (x86_64_breakpoint, x86_64_breakpoint_len)
10651 (x86_64_get_pc, x86_64_set_pc, x86_64_breakpoint_at): New.
10652 (the_low_target): Update.
10653
7fb85e41
AS
106542005-10-25 Andreas Schwab <schwab@suse.de>
10655
10656 * server.c (main): Allocate mem_buf with PBUFSIZ bytes.
10657
10658 * linux-ia64-low.c (ia64_regmap): Remove NAT registers.
10659 (ia64_num_regs): Reduce to 462.
10660
3db0444b
DJ
106612005-09-17 Daniel Jacobowitz <dan@codesourcery.com>
10662
10663 * acinclude.m4: Correct quoting.
10664 * aclocal.m4: Regenerated.
10665
10666 Suggested by SZOKOVACS Robert <szo@ies.hu>:
10667 * thread-db.c (thread_db_err_str): Handle TD_VERSION.
10668 (thread_db_init): Call thread_db_err_str.
10669 * configure.ac: Check for TD_VERSION.
10670 * config.in, configure: Regenerated.
10671
bee0189a
DJ
106722005-07-31 Kaveh R. Ghazi <ghazi@caip.rutgers.edu>
10673
10674 * server.h (error, fatal, warning): Add ATTR_FORMAT.
10675
e9d25b98
DJ
106762005-07-13 Daniel Jacobowitz <dan@codesourcery.com>
10677
10678 * configure.ac: Define HAVE_LINUX_REGSETS even if PTRACE_GETREGS
10679 is not available. Define HAVE_PTRACE_GETREGS if it is.
10680 * config.in, configure: Regenerated.
10681 * configure.srv: Set srv_linux_regsets for PowerPC and PowerPC64.
10682 * linux-i386-low.c, linux-m68k-low.c: Update to use
10683 HAVE_PTRACE_GETREGS.
10684 * linux-low.c (regsets_fetch_inferior_registers)
10685 (regsets_store_inferior_registers): Only return 0 if we processed
10686 GENERAL_REGS.
10687 * linux-ppc-low.c (ppc_fill_gregset, target_regsets): New.
10688 * linux-ppc64-low.c (ppc_fill_gregset, target_regsets): New.
10689
a06660f7
DJ
106902005-07-13 Daniel Jacobowitz <dan@codesourcery.com>
10691
10692 * inferiors.c (struct thread_info): Add gdb_id.
10693 (add_thread): Add gdb_id argument.
10694 (thread_id_to_gdb_id, thread_to_gdb_id, gdb_id_to_thread_id): New.
10695 * linux-low.c (linux_create_inferior, linux_attach_lwp): Update
10696 calls to add_thread.
10697 * remote-utils.c (prepare_resume_reply: Use thread_to_gdb_id.
10698 * server.c (handle_query): Use thread_to_gdb_id.
10699 (handle_v_cont, main): Use gdb_id_to_thread_id.
10700 * server.h (add_thread): Update prototype.
10701 (thread_id_to_gdb_id, thread_to_gdb_id, gdb_id_to_thread_id): New
10702 prototypes.
10703
5a1f5858
DJ
107042005-07-13 Daniel Jacobowitz <dan@codesourcery.com>
10705
10706 * linux-low.c (fetch_register, usr_store_inferior_registers): Handle
10707 left-padded registers.
10708 * linux-low.h (struct linux_target_ops): Add left_pad_xfer.
10709 * linux-ppc64-low.c (the_low_target): Set left_pad_xfer.
10710
e122f1f5
SE
107112005-07-01 Steve Ellcey <sje@cup.hp.com>
10712
10713 * configure.ac (BFD_NEED_DECLARATION): Replace with AC_CHECK_DECLS.
10714 * configure: Regenerate.
10715 * config.in: Regenerate.
10716 * server.h (NEED_DECLARATION_STRERROR):
10717 Replace with !HAVE_DECL_STRERROR.
10718
d592fa2f
DJ
107192005-06-16 Daniel Jacobowitz <dan@codesourcery.com>
10720
10721 * linux-low.c (linux_wait, linux_send_signal): Don't test
10722 an unsigned long variable for > 0 if it could be MAX_ULONG.
10723 * server.c (myresume): Likewise.
10724 * target.c (set_desired_inferior): Likewise.
10725
ccbd4912
MK
107262005-06-13 Mark Kettenis <kettenis@gnu.org>
10727
10728 * configure.ac: Simplify and improve check for socklen_t.
10729 * configure, config.in: Regenerate.
10730
f450004a
DJ
107312005-06-12 Daniel Jacobowitz <dan@codesourcery.com>
10732
10733 * acconfig.h: Remove.
10734 * configure.ac: Add a test for socklen_t. Use three-argument
10735 AC_DEFINE throughout.
10736 * config.in: Regenerated using autoheader 2.59.
10737 * configure: Regenerated.
10738
10739 * gdbreplay.c (socklen_t): Provide a default.
10740 (remote_open): Use socklen_t.
10741 * remote-utils.c (socklen_t): Provide a default.
10742 (remote_open): Use socklen_t.
10743 (convert_int_to_ascii, convert_ascii_to_int, decode_M_packet): Use
10744 unsigned char.
10745
10746 * i387-fp.c (struct i387_fsave, struct i387_fxsave): Use unsigned
10747 char for buffers.
10748 * linux-low.c (linux_read_memory, linux_write_memory)
10749 (linux_read_auxv): Likewise.
10750 * mem-break.c (breakpoint_data, set_breakpoint_data, check_mem_read)
10751 (check_mem_write): Likewise.
10752 * mem-break.h (set_breakpoint_data, check_mem_read, check_mem_write):
10753 Likewise.
10754 * regcache.c (struct inferior_rgcache_data, registers_to_string)
10755 (registers_from_string, register_data): Likewise.
10756 * server.c (handle_query, main): Likewise.
10757 * server.h (convert_ascii_to_int, convert_int_to_ascii)
10758 (decode_M_packet): Likewise.
10759 * target.c (read_inferior_memory, write_inferior_memory): Likewise.
10760 * target.h (struct target_ops): Update read_memory, write_memory,
10761 and read_auxv.
10762 (read_inferior_memory, write_inferior_memory): Update.
10763 * linux-low.h (struct linux_target_ops): Change type of breakpoint
10764 to unsigned char *.
10765 * linux-arm-low.c, linux-cris-low.c, linux-crisv32-low.c,
10766 linux-i386-low.c, linux-m32r-low.c, linux-m68k-low.c,
10767 linux-mips-low.c, linux-ppc-low.c, linux-ppc64-low.c,
10768 linux-s390-low.c, linux-sh-low.c: Update for changes in
10769 read_inferior_memory and the_low_target->breakpoint.
10770
eee84df1
DJ
107712005-05-28 Daniel Jacobowitz <dan@codesourcery.com>
10772
10773 * Makefile.in (SFILES): Add linux-ppc64-low.c.
10774 (linux-ppc64-low.o, reg-ppc64.c, reg-ppc64.o): New targets.
10775 * configure.srv: Add powerpc64-*-linux*.
10776 * linux-ppc64-low.c: New file.
10777
45b134e5
OF
107782005-05-23 Orjan Friberg <orjanf@axis.com>
10779
10780 * linux-cris-low.c: New file with support for CRIS.
10781 * linux-crisv32-low.c: Ditto for CRISv32.
10782 * Makefile.in (SFILES): Add linux-cris-low.c, linux-crisv32-low.c.
10783 (clean): Add reg-cris.c and reg-crisv32.c.
889bf7c5 10784 Add linux-cris-low.o, linux-crisv32-low.o, reg-cris.o, reg-cris.c,
45b134e5
OF
10785 reg-crisv32.o, and reg-crisv32.c to make rules.
10786 * configure.srv: Add cris-*-linux* and crisv32-*-linux* to list of
10787 recognized targets.
10788
48d93c75
UW
107892005-05-16 Ulrich Weigand <uweigand@de.ibm.com>
10790
10791 * linux-low.c (fetch_register): Ensure buffer size is a multiple
10792 of sizeof (PTRACE_XFER_TYPE).
10793 (usr_store_inferior_registers): Likewise. Zero out excess bytes.
10794
e013ee27
OF
107952005-05-12 Orjan Friberg <orjanf@axis.com>
10796
889bf7c5 10797 * target.h (struct target_ops): Add insert_watchpoint,
e013ee27
OF
10798 remove_watchpoint, stopped_by_watchpoint, stopped_data_address function
10799 pointers for hardware watchpoint support.
10800 * linux-low.h (struct linux_target_ops): Ditto.
10801 * linux-low.c (linux_insert_watchpoint, linux_remove_watchpoint)
10802 (linux_stopped_by_watchpoint, linux_stopped_data_address): New. Add
10803 to linux_target_ops.
10804 * remote-utils.c (prepare_resume_reply): Add watchpoint information to
10805 reply packet.
10806 * server.c (main): Recognize 'Z' and 'z' packets.
10807
b0ded00b
UW
108082005-05-10 Ulrich Weigand <uweigand@de.ibm.com>
10809
10810 * linux-s390-low.c (s390_breakpoint, s390_breakpoint_len): Define.
10811 (s390_get_pc, s390_set_pc, s390_breakpoint_at): New functions.
10812 (the_low_target): Add new members.
10813
8643e2ad
DJ
108142005-05-04 Daniel Jacobowitz <dan@codesourcery.com>
10815
10816 * proc-service.c (ps_lgetregs): Search all_processes instead of
10817 all_threads.
10818
fc620387
DJ
108192005-05-04 Daniel Jacobowitz <dan@codesourcery.com>
10820
10821 * server.c (start_inferior): Change return type to int.
10822 (attach_inferior): Change sigptr to int *.
10823 (handle_v_cont, handle_v_requests): Change signal to int *.
10824 (main): Change signal to int.
10825
108262005-04-15 Kei Sakamoto <sakamoto.kei@renesas.com>
7cfbc4a0
KI
10827
10828 * Makefile.in: Add linux-m32r-low.o, reg-m32r.c and reg-m32r.o.
10829 * configure.srv: Add m32r*-*-linux*.
10830 * linux-m32r-low.c: New file.
10831
e0e76420
DJ
108322005-03-04 Daniel Jacobowitz <dan@codesourcery.com>
10833
10834 * Makefile.in (stamp-h): Set CONFIG_HEADERS explicitly.
10835
a1928bad
DJ
108362005-03-03 Daniel Jacobowitz <dan@codesourcery.com>
10837
10838 * inferiors.c (change_inferior_id, add_thread, find_inferior_id):
10839 Take unsigned long arguments for PIDs.
10840 * linux-low.c (add_process, linux_attach_lwp, linux_attach)
10841 (linux_thread_alive, linux_wait_for_event, kill_lwp, send_sigstop)
10842 (wait_for_sigstop, linux_resume_one_process)
10843 (regsets_fetch_inferior_registers, linux_send_signal)
10844 (linux_read_auxv): Likewise. Update the types of variables holding
10845 PIDs. Update format string specifiers.
10846 * linux-low.h (struct process_info, linux_attach_lwp): Likewise.
10847 * remote-utils.c (prepare_resume_reply): Likewise.
10848 * server.c (cont_thread, general_thread, step_thread)
10849 (thread_from_wait, old_thread_from_wait, signal_pid): Change type to
10850 unsigned long.
10851 (handle_query): Update format specifiers.
10852 (handle_v_cont, main): Use strtoul for thread IDs.
10853 * server.h (struct inferior_list_entry): Use unsigned long for ID.
10854 (add_thread, find_inferior_id, change_inferior_id, cont_thread)
10855 (general_thread, step_thread, thread_from_wait)
10856 (old_thread_from_wait): Update.
10857 * target.h (struct thread_resume): Use unsigned long for THREAD.
10858 (struct target_ops): Use unsigned long for arguments to attach and
10859 thread_alive.
10860
dcdb98d2
DJ
108612005-02-24 Daniel Jacobowitz <dan@codesourcery.com>
10862
10863 * acinclude.m4: Include bfd/bfd.m4 directly.
10864 * configure.ac: Use AC_ARG_PROGRAM. Suggested by Aron Griffis
10865 <agriffis@toolchain.org>.
10866 * aclocal.m4, configure: Regenerated.
10867
bec39cab
AC
108682005-01-07 Andrew Cagney <cagney@gnu.org>
10869
10870 * configure.ac: Rename configure.in, require autoconf 2.59.
10871 * configure: Re-generate.
10872
434c4c77
DJ
108732004-12-08 Daniel Jacobowitz <dan@debian.org>
10874
10875 * acinclude.m4 (SRV_CHECK_THREAD_DB): Add ps_get_thread_area. Reset
10876 LIBS when finished.
10877 * aclocal.m4: Regenerated.
10878 * configure: Regenerated.
10879
db1d3e1b
AS
108802004-11-21 Andreas Schwab <schwab@suse.de>
10881
10882 * linux-m68k-low.c (m68k_num_gregs): Define.
10883 (m68k_fill_gregset, m68k_store_gregset, m68k_fill_fpregset)
10884 (m68k_store_fpregset, target_regsets) [HAVE_LINUX_REGSETS]: New.
10885 (m68k_breakpoint, m68k_breakpoint_len, m68k_get_pc, m68k_set_pc)
10886 (m68k_breakpoint_at): New. Add to the_low_target.
10887
10888 * configure.srv (m68*-*-linux*): Set srv_linux_regsets and
10889 srv_linux_thread_db to yes.
10890
43360365
JB
108912004-10-20 Joel Brobecker <brobecker@gnat.com>
10892
10893 * linux-x86-64-low.c (ARCH_SET_GS): Add definition if missing.
10894 (ARCH_SET_FS): Likewise.
10895 (ARCH_GET_FS): Likewise.
10896 (ARCH_GET_GS): Likewise.
10897
fd500816
DJ
108982004-10-16 Daniel Jacobowitz <dan@debian.org>
10899
10900 * linux-i386-low.c (ps_get_thread_area): New.
10901 * linux-x86-64-low.c (ps_get_thread_area): New.
10902 * linux-low.c: Include <sys/syscall.h>.
10903 (linux_kill_one_process): Don't kill the first thread here.
10904 (linux_kill): Kill the first thread here.
10905 (kill_lwp): New function.
10906 (send_sigstop, linux_send_signal): Use it.
10907 * proc-service.c: Clean up #ifdefs.
10908 (fpregset_info): Delete.
10909 (ps_lgetregs): Update and enable implementation.
10910 (ps_lsetregs, ps_lgetfpregs, ps_lsetfpregs): Remove disabled
10911 implementations.
10912 * remote-utils.c (struct sym_cache, symbol_cache): New.
10913 (input_interrupt): Print a clearer message.
10914 (async_io_enabled): New variable.
10915 (enable_async_io, disable_async_io): Use it. Update comments.
10916 (look_up_one_symbol): Use the symbol cache.
10917 * thread-db.c (thread_db_look_up_symbols): New function.
10918 (thread_db_init): Update comments. Call thread_db_look_up_symbols.
10919
f6de3c42
DJ
109202004-10-16 Daniel Jacobowitz <dan@debian.org>
10921
10922 * configure.in: Test for -rdynamic.
10923 * configure: Regenerated.
10924 * Makefile (INTERNAL_LDFLAGS): New.
10925 (gdbserver, gdbreplay): Use it.
10926
2c0fc042
AC
109272004-09-02 Andrew Cagney <cagney@gnu.org>
10928
10929 * Makefile.in (TAGS): Replace TM_FILE with DEPRECATED_TM_FILE.
10930
075b3282
DJ
109312004-03-23 Daniel Jacobowitz <drow@mvista.com>
10932
10933 * linux-low.c (linux_wait): Clear all_processes list also.
10934
fa6a77dc
DJ
109352004-03-12 Daniel Jacobowitz <drow@mvista.com>
10936
10937 * linux-low.c: Include <errno.h>. Remove extern declaration of
10938 errno.
10939
6d782a97
DJ
109402004-03-12 Daniel Jacobowitz <drow@mvista.com>
10941
10942 * gdbreplay.c, server.h, utils.c: Update copyright years.
10943
3a7fb99b
DJ
109442004-03-04 Nathan J. Williams <nathanw@wasabisystems.com>
10945
10946 * server.c (main): Print child status or termination signal from
10947 variable 'signal', not 'sig'.
10948
c3e735a6
DJ
109492004-03-04 Nathan J. Williams <nathanw@wasabisystems.com>
10950
10951 * linux-low.c (linux_read_memory): Change return type to
10952 int. Check for and return error from ptrace().
10953 * target.c (read_inferior_memory): Change return type to int. Pass
10954 back return status from the_target->read_memory().
10955 * target.h (struct target_ops): Adapt *read_memory() prototype.
10956 Update comment.
10957 (read_inferior_memory): Adapt prototype.
10958 * server.c (main): Return an error packet if
10959 read_inferior_memory() returns an error.
10960
a59d1c82
DJ
109612004-03-04 Daniel Jacobowitz <drow@mvista.com>
10962
10963 * Makefile.in (distclean): Remove config.h, stamp-h, and config.log.
10964 Unify with other clean targets.
10965
dc3f8883
DJ
109662004-02-29 Daniel Jacobowitz <drow@mvista.com>
10967
10968 * server.c (handle_v_cont): Call set_desired_inferior.
10969
89a208da
DJ
109702004-02-29 Daniel Jacobowitz <drow@mvista.com>
10971
10972 * remote-utils.c (prepare_resume_reply): Always supply "thread:".
10973
62ea82f5
DJ
109742004-02-29 Daniel Jacobowitz <drow@mvista.com>
10975
10976 * linux-low.c (linux_wait): Unblock async I/O.
10977 (linux_resume): Block and enable async I/O.
10978 * remote-utils.c (block_async_io, unblock_async_io): New functions.
10979 * server.h (block_async_io, unblock_async_io): Add prototypes.
10980
6910d122
DJ
109812004-02-29 Daniel Jacobowitz <drow@mvista.com>
10982
10983 * remote-utils.c (remote_open): Print a status notice after
10984 opening a TCP port.
10985 * server.c (attach_inferior): Print a status notice after
10986 attaching.
10987
109882004-02-29 Daniel Jacobowitz <drow@mvista.com>
d677d77d
DJ
10989
10990 * linux-arm-low.c (arm_get_pc): Print out stop PC in debug mode.
10991
c89dc5d4
DJ
109922004-02-26 Daniel Jacobowitz <drow@mvista.com>
10993
10994 * remote-utils.c (write_enn): Use "E01" instead of "ENN" for the
10995 error packet.
10996 * server.c, target.h: Update copyright years.
10997
4b8dad4a
RM
109982004-02-25 Roland McGrath <roland@redhat.com>
10999
11000 * target.h (struct target_ops): New member `read_auxv'.
11001 * server.c (handle_query): Handle qPart:auxv:read: query using that.
11002 * linux-low.c (linux_read_auxv): New function.
11003 (linux_target_ops): Initialize `read_auxv' member to that.
11004
d7446758
JB
110052004-02-17 Ulrich Weigand <Ulrich.Weigand@de.ibm.com>
11006
11007 Committed by Jim Blandy <jimb@redhat.com>.
11008
11009 * linux-s390-low.c (s390_num_regs): Update.
4b8dad4a 11010 (s390_regmap): Remove control registers. Use __s390x__ predefine
d7446758
JB
11011 instead of GPR_SIZE to distiguish s390 and s390x targets.
11012
5544ad89
DJ
110132004-01-31 Daniel Jacobowitz <drow@mvista.com>
11014
11015 * linux-low.c: Update copyright year.
11016 (check_removed_breakpoint): Clear pending_is_breakpoint.
11017 (linux_set_resume_request, linux_queue_one_thread)
11018 (resume_status_pending_p): New functions.
11019 (linux_continue_one_thread): Use process->resume.
11020 (linux_resume): Only resume threads if there are no pending events.
11021 * linux-low.h (struct process_info): Add resume request
11022 pointer.
11023
2a68b70e
DJ
110242004-01-30 Daniel Jacobowitz <drow@mvista.com>
11025
11026 * regcache.c (new_register_cache): Clear the allocated register
11027 buffer. Suggested by Atsushi Nemoto <anemo@mba.ocn.ne.jp>.
11028
64386c31
DJ
110292003-10-13 Daniel Jacobowitz <drow@mvista.com>
11030
11031 * linux-low.c (linux_resume): Take a struct thread_resume *
11032 argument.
11033 (linux_wait): Update call.
11034 (resume_ptr): New static variable.
11035 (linux_continue_one_thread): Renamed from
11036 linux_continue_one_process. Use resume_ptr.
11037 (linux_resume): Use linux_continue_one_thread.
11038 * server.c (handle_v_cont, handle_v_requests): New functions.
11039 (myresume): New function.
11040 (main): Handle 'v' case.
11041 * target.h (struct thread_resume): New type.
11042 (struct target_ops): Change argument of "resume" to struct
11043 thread_resume *.
11044 (myresume): Delete macro.
11045
c938e9b0
L
110462003-08-08 H.J. Lu <hongjiu.lu@intel.com>
11047
11048 * Makefile.in (install-only): Create dest dir. Support DESTDIR.
11049 (uninstall): Support DESTDIR.
11050
7f313d07
BC
11051Mon Jul 21 20:09:34 UTC 2003 Brendan Conoboy <blc@redhat.com>
11052
11053 * configure.srv: Add xscale*linux copy of arm*linux entry.
11054
3b2fc2ea
DJ
110552003-07-24 Daniel Jacobowitz <drow@mvista.com>
11056
11057 * linux-arm-low.c (arm_reinsert_addr): New function.
11058 (the_low_target): Add arm_reinsert_addr.
11059
1c0a559e
MK
110602003-07-08 Mark Kettenis <kettenis@gnu.org>
11061
11062 * mem-break.c: Remove whitespace at end of file.
11063
43d5792c
DJ
110642003-06-28 Daniel Jacobowitz <drow@mvista.com>
11065
11066 * configure.in: Check whether we need to prototype strerror.
11067 * server.h: Optionally prototype strerror.
11068 * gdbreplay.c (perror_with_name): Use strerror.
11069 * linux-low.c (linux_attach_lwp): Use strerror.
11070 * utils.c (perror_with_name): Use strerror.
11071 * config.in, configure: Regenerated.
11072
c8a86edf
DJ
110732003-06-28 Daniel Jacobowitz <drow@mvista.com>
11074
11075 * linux-sh-low.c (sh_regmap): Fix FP register offsets, reported by
11076 SUGIOKA Toshinobu <sugioka@itonet.co.jp>.
11077
73d37363
DJ
110782003-06-20 Daniel Jacobowitz <drow@mvista.com>
11079
11080 * Makefile.in (SFILES): Update.
11081 * low-hppabsd.c, low-lynx.c, low-nbsd.c, low-sim.c, low-sparc.c,
11082 low-sun3.c: Remove files.
11083
6ad8ae5c
DJ
110842003-06-17 Daniel Jacobowitz <drow@mvista.com>
11085
11086 * linux-low.c: Move comment to linux_thread_alive where it belonged.
11087 (linux_detach_one_process, linux_detach): New functions.
11088 (linux_target_ops): Add linux_detach.
11089 * server.c (main): Handle 'D' packet.
11090 * target.h (struct target_ops): Add "detach" member.
11091 (detach_inferior): Define.
11092
1581182a
MK
110932003-06-13 Mark Kettenis <kettenis@gnu.org>
11094
11095 From Kelley Cook <kelleycook@wideopenwest.com>:
11096 * configure.srv: Accept i[34567]86 variants.
11097
e5379b03
DJ
110982003-06-05 Daniel Jacobowitz <drow@mvista.com>
11099
11100 * linux-low.c (linux_wait_for_event): Correct comment typos.
11101 (linux_resume_one_process): Call check_removed_breakpoint.
11102 (linux_send_signal): New function.
11103 (linux_target_ops): Add linux_send_signal.
11104 * remote-utils.c (putpkt, input_interrupt): Use send_signal instead
11105 of kill.
11106 * target.h (struct target_ops): Add send_signal.
11107
2ff29de4
JB
111082003-05-29 Jim Blandy <jimb@redhat.com>
11109
11110 * linux-low.c (usr_store_inferior_registers): Transfer buf in
11111 PTRACE_XFER_TYPE-sized chunks, not int-sized chunks. Otherwise,
11112 if 'int' is smaller than PTRACE_XFER_TYPE, you end up throwing
11113 away part of the register's value.
11114
254787d4
DJ
111152003-03-26 Daniel Jacobowitz <drow@mvista.com>
11116
11117 * linux-low.c (linux_create_inferior): Use __SIGRTMIN.
11118 (linux_wait_for_event, linux_init_signals): Likewise.
11119
94e10508
DJ
111202003-03-17 Daniel Jacobowitz <drow@mvista.com>
11121
11122 * configure.in: Check for stdlib.h.
11123 * configure: Regenerated.
11124 * config.in: Regenerated.
11125
4c0711e0
DJ
111262003-01-04 Andreas Schwab <schwab@suse.de>
11127
11128 * linux-m68k-low.c (m68k_num_regs): Define to 29 instead of 31.
11129
ef66e766
AC
111302003-01-02 Andrew Cagney <ac131313@redhat.com>
11131
11132 * Makefile.in: Remove obsolete code.
11133
a1358604
DJ
111342002-11-20 Daniel Jacobowitz <drow@mvista.com>
11135
11136 * linux-s390-low.c (s390_regmap): Check GPR_SIZE instead of
11137 defined(PT_FPR0_HI).
11138
23ce3b1c
DJ
111392002-11-17 Stuart Hughes <seh@zee2.com>
11140
11141 * linux-arm-low.c (arm_num_regs): Increase.
11142 (arm_regmap): Include status register.
11143
111442002-11-17 Daniel Jacobowitz <drow@mvista.com>
11145
11146 * linux-low.c (register_addr): Remove incorrect -1 check.
11147
a9fa9f7d
DJ
111482002-08-29 Daniel Jacobowitz <drow@mvista.com>
11149
11150 * linux-low.c (linux_create_inferior): Call setpgid. Return
11151 the new PID.
11152 (unstopped_p, linux_signal_pid): Remove.
11153 (linux_target_ops): Remove linux_signal_pid.
11154 * remote-utils.c (putpkt, input_interrupt): Use signal_pid
11155 global instead of target method.
11156 * target.h (struct target_ops): Remove signal_pid. Update comment
11157 for create_inferior.
11158 * server.c (signal_pid): New variable.
11159 (create_inferior): Set signal_pid. Block SIGTTOU and SIGTTIN in
4b8dad4a 11160 gdbserver. Set the child to be the foreground process group.
a9fa9f7d
DJ
11161 (attach_inferior): Set signal_pid.
11162
17574093
DJ
111632002-08-23 Daniel Jacobowitz <drow@mvista.com>
11164
11165 * ChangeLog: New file, with entries from gdb/ChangeLog after GDB 5.2.
11166
111672002-08-20 Jim Blandy <jimb@redhat.com>
11168
11169 * Makefile.in (LDFLAGS): Allow the configure script to establish a
11170 default for this.
11171
111722002-08-01 Andrew Cagney <cagney@redhat.com>
11173
11174 * Makefile.in: Make chill references obsolete.
11175
111762002-07-24 Kevin Buettner <kevinb@redhat.com>
11177
11178 * configure.in (unistd.h): Add to AC_CHECK_HEADERS list.
11179 * configure: Regenerate.
11180 * config.in: Regenerate.
11181
111822002-07-09 David O'Brien <obrien@FreeBSD.org>
11183
11184 * gdbreplay.c (stdlib.h, unistd.h): Conditionaly include.
11185 (perror_with_name, remote_close, remote_open, expect, play): Static.
11186
111872002-07-04 Michal Ludvig <mludvig@suse.cz>
11188
4b8dad4a 11189 * linux-x86-64-low.c (x86_64_regmap): Make it an array of
17574093
DJ
11190 byte offsets instead of an array of indexes.
11191 (x86_64_store_gregset, x86_64_store_fpregset): Parameter made const.
11192
111932002-06-13 Daniel Jacobowitz <drow@mvista.com>
11194
11195 * regcache.c: Add comment.
11196
111972002-06-11 Daniel Jacobowitz <drow@mvista.com>
11198
11199 * thread-db.c: New file.
11200 * proc-service.c: New file.
11201 * acinclude.m4: New file.
11202 * Makefile.in: Add GDBSERVER_LIBS, gdb_proc_service_h,
11203 proc-service.o, and thread-db.o.
11204 (linux-low.o): Add USE_THREAD_DB.
11205 * acconfig.h: Add HAVE_PRGREGSET_T, HAVE_PRFPREGSET_T,
11206 HAVE_LWPID_T, HAVE_PSADDR_T, and PRFPREGSET_T_BROKEN.
11207 * aclocal.m4: Regenerated.
11208 * config.in: Regenerated.
11209 * configure: Regenerated.
11210 * configure.in: Check for proc_service.h, sys/procfs.h,
11211 thread_db.h, and linux/elf.h headrs.
11212 Check for lwpid_t, psaddr_t, prgregset_t, prfpregset_t, and
11213 PRFPREGSET_T_BROKEN. Introduce srv_thread_depfiles and USE_THREAD_DB.
11214 Check for -lthread_db and thread support.
11215 * configure.srv: Enable thread_db support for ARM, i386, MIPS,
11216 PowerPC, and SuperH.
11217 * i387-fp.c: Constify arguments.
11218 * i387-fp.h: Likewise.
11219 * inferiors.c: (struct thread_info): Renamed from
11220 `struct inferior_info'. Remove PID member. Use generic inferior
11221 list header. All uses updated.
11222 (inferiors, signal_pid): Removed.
11223 (all_threads): New variable.
11224 (get_thread): Define.
11225 (add_inferior_to_list): New function.
11226 (for_each_inferior): New function.
11227 (change_inferior_id): New function.
11228 (add_inferior): Removed.
11229 (remove_inferior): New function.
11230 (add_thread): New function.
11231 (free_one_thread): New function.
11232 (remove_thread): New function.
11233 (clear_inferiors): Use for_each_inferior and free_one_thread.
11234 (find_inferior): New function.
11235 (find_inferior_id): New function.
11236 (inferior_target_data): Update argument type.
11237 (set_inferior_target_data): Likewise.
11238 (inferior_regcache_data): Likewise.
11239 (set_inferior_regcache_data): Likewise.
11240 * linux-low.c (linux_bp_reinsert): Remove.
11241 (all_processes, stopping_threads, using_thrads)
11242 (struct pending_signals, debug_threads, pid_of): New.
11243 (inferior_pid): Replace with macro.
11244 (struct inferior_linux_data): Remove.
11245 (get_stop_pc, add_process): New functions.
11246 (linux_create_inferior): Restore SIGRTMIN+1 before calling exec.
11247 Use add_process and add_thread.
11248 (linux_attach_lwp): New function, based on old linux_attach. Use
11249 add_process and add_thread. Set stop_expected for new threads.
11250 (linux_attach): New function.
11251 (linux_kill_one_process): New function.
11252 (linux_kill): Kill all LWPs.
11253 (linux_thread_alive): Use find_inferior_id.
11254 (check_removed_breakpoints, status_pending_p): New functions.
11255 (linux_wait_for_process): Renamed from linux_wait_for_one_inferior.
11256 Update. Use WNOHANG. Wait for cloned processes also. Update process
11257 struct for the found process.
11258 (linux_wait_for_event): New function.
11259 (linux_wait): Use it. Support LWPs.
11260 (send_sigstop, wait_for_sigstop, stop_all_processes)
11261 (linux_resume_one_process, linux_continue_one_process): New functions.
11262 (linux_resume): Support LWPs.
11263 (REGISTER_RAW_SIZE): Remove.
11264 (fetch_register): Use register_size instead. Call supply_register.
11265 (usr_store_inferior_registers): Likewise. Call collect_register.
11266 Fix recursive case.
11267 (regsets_fetch_inferior_registers): Improve error message.
11268 (regsets_store_inferior_registers): Add debugging.
11269 (linux_look_up_symbols): Call thread_db_init if USE_THREAD_DB.
11270 (unstopped_p, linux_signal_pid): New functions.
11271 (linux_target_ops): Add linux_signal_pid.
11272 (linux_init_signals): New function.
11273 (initialize_low): Call it. Initialize using_threads.
11274 * regcache.c (inferior_regcache_data): Add valid
11275 flag.
11276 (get_regcache): Fetch registers lazily. Add fetch argument
11277 and update all callers.
11278 (regcache_invalidate_one, regcache_invalidate): New
11279 functions.
11280 (new_register_cache): Renamed from create_register_cache.
11281 Return the new regcache.
11282 (free_register_cache): Change argument to a void *.
11283 (registers_to_string, registers_from_string): Call get_regcache
11284 with fetch flag set.
11285 (register_data): Make static. Pass fetch flag to get_regcache.
11286 (supply_register): Call get_regcache with fetch flag clear.
11287 (collect_register): Call get_regcache with fetch flag set.
11288 (collect_register_as_string): New function.
11289 * regcache.h: Update.
11290 * remote-utils.c (putpkt): Flush after debug output and use
11291 stderr.
11292 Handle input interrupts while waiting for an ACK.
11293 (input_interrupt): Use signal_pid method.
11294 (getpkt): Flush after debug output and use stderr.
11295 (outreg): Use collect_register_as_string.
11296 (new_thread_notify, dead_thread_notify): New functions.
11297 (prepare_resume_reply): Check using_threads. Set thread_from_wait
11298 and general_thread.
11299 (look_up_one_symbol): Flush after debug output.
11300 * server.c (step_thread, server_waiting): New variables.
11301 (start_inferior): Don't use signal_pid. Update call to mywait.
11302 (attach_inferior): Update call to mywait.
11303 (handle_query): Handle qfThreadInfo and qsThreadInfo.
11304 (main): Don't fetch/store registers explicitly. Use
11305 set_desired_inferior. Support proposed ``Hs'' packet. Update
11306 calls to mywait.
11307 * server.h: Update.
11308 (struct inferior_list, struct_inferior_list_entry): New.
11309 * target.c (set_desired_inferior): New.
11310 (write_inferior_memory): Constify.
11311 (mywait): New function.
11312 * target.h: Update.
11313 (struct target_ops): New signal_pid method.
11314 (mywait): Removed macro, added prototype.
11315
11316 * linux-low.h (regset_func): Removed.
11317 (regset_fill_func, regset_store_func): New.
11318 (enum regset_type): New.
11319 (struct regset_info): Add type field. Use new operation types.
11320 (struct linux_target_ops): stop_pc renamed to get_pc.
11321 Add decr_pc_after_break and breakpoint_at.
11322 (get_process, get_thread_proess, get_process_thread)
11323 (strut process_info, all_processes, linux_attach_lwp)
11324 (thread_db_init): New.
11325
11326 * linux-arm-low.c (arm_get_pc, arm_set_pc,
11327 arm_breakpoint, arm_breakpoint_len, arm_breakpoint_at): New.
11328 (the_low_target): Add new members.
11329 * linux-i386-low.c (i386_store_gregset, i386_store_fpregset)
11330 (i386_store_fpxregset): Constify.
11331 (target_regsets): Add new kind identifier.
11332 (i386_get_pc): Renamed from i386_stop_pc. Simplify.
11333 (i386_set_pc): Add debugging.
11334 (i386_breakpoint_at): New function.
11335 (the_low_target): Add new members.
11336 * linux-mips-low.c (mips_get_pc, mips_set_pc)
11337 (mips_breakpoint, mips_breakpoint_len, mips_reinsert_addr)
11338 (mips_breakpoint_at): New.
11339 (the_low_target): Add new members.
11340 * linux-ppc-low.c (ppc_get_pc, ppc_set_pc)
11341 (ppc_breakpoint, ppc_breakpoint_len, ppc_breakpoint_at): New.
11342 (the_low_target): Add new members.
11343 * linux-sh-low.c (sh_get_pc, sh_set_pc)
11344 (sh_breakpoint, sh_breakpoint_len, sh_breakpoint_at): New.
11345 (the_low_target): Add new members.
11346 * linux-x86-64-low.c (target_regsets): Add new kind
11347 identifier.
11348
113492002-05-15 Daniel Jacobowitz <drow@mvista.com>
11350
11351 From Martin Pool <mbp@samba.org>:
11352 * server.c (gdbserver_usage): New function.
11353 (main): Call it.
11354
113552002-05-14 Daniel Jacobowitz <drow@mvista.com>
11356
11357 * mem-break.c (reinsert_breakpoint_by_bp): Correct typo
11358 stop_at -> stop_pc.
11359
113602002-05-04 Andrew Cagney <ac131313@redhat.com>
11361
11362 * Makefile.in: Remove obsolete code.
11363
113642002-04-24 Michal Ludvig <mludvig@suse.cz>
11365
11366 * linux-low.c (regsets_fetch_inferior_registers),
11367 (regsets_store_inferior_registers): Removed cast to int from
11368 ptrace() calls.
11369 * regcache.h: Added declaration of struct inferior_info.
11370
113712002-04-20 Daniel Jacobowitz <drow@mvista.com>
11372
11373 * inferiors.c (struct inferior_info): Add regcache_data.
11374 (add_inferior): Call create_register_cache.
11375 (clear_inferiors): Call free_register_cache.
11376 (inferior_regcache_data, set_inferior_regcache_data): New functions.
11377 * regcache.c (struct inferior_regcache_data): New.
11378 (registers): Remove.
11379 (get_regcache): New function.
11380 (create_register_cache, free_register_cache): New functions.
11381 (set_register_cache): Don't initialize the register cache here.
11382 (registers_to_string, registers_from_string, register_data): Call
11383 get_regcache.
11384 * regcache.h: Add prototypes.
11385 * server.h: Likewise.
11386
113872002-04-20 Daniel Jacobowitz <drow@mvista.com>
11388
11389 * mem-break.c: New file.
11390 * mem-break.h: New file.
11391 * Makefile.in: Add mem-break.o rule; update server.h
11392 dependencies.
11393 * inferiors.c (struct inferior_info): Add target_data
11394 member.
11395 (clear_inferiors): Free target_data member if set.
11396 (inferior_target_data, set_inferior_target_data): New functions.
11397 * linux-i386-low.c (i386_breakpoint, i386_breakpoint_len)
11398 (i386_stop_pc, i386_set_pc): New. Add to the_low_target.
11399 * linux-low.c (linux_bp_reinsert): New variable.
11400 (struct inferior_linux_data): New.
11401 (linux_create_inferior): Use set_inferior_target_data.
11402 (linux_attach): Likewise. Call add_inferior.
11403 (linux_wait_for_one_inferior): New function.
11404 (linux_wait): Call it.
11405 (linux_write_memory): Add const.
11406 (initialize_low): Call set_breakpoint_data.
11407 * linux-low.h (struct linux_target_ops): Add breakpoint
11408 handling members.
11409 * server.c (attach_inferior): Remove extra add_inferior
11410 call.
11411 * server.h: Include mem-break.h. Update inferior.c
11412 prototypes.
11413 * target.c (read_inferior_memory)
11414 (write_inferior_memory): New functions.
11415 * target.h (read_inferior_memory)
11416 (write_inferior_memory): Change macros to prototypes.
11417 (struct target_ops): Update comments. Add const to write_memory
11418 definition.
11419
114202002-04-11 Daniel Jacobowitz <drow@mvista.com>
11421
11422 * linux-low.c (usr_store_inferior_registers): Support
11423 registers which are allowed to fail to store.
11424 * linux-low.h (linux_target_ops): Likewise.
11425 * linux-ppc-low.c (ppc_regmap): Support FPSCR.
11426 (ppc_cannot_store_register): FPSCR may not be storable.
11427
114282002-04-09 Daniel Jacobowitz <drow@mvista.com>
11429
11430 * server.h: Include <string.h> if HAVE_STRING_H.
11431 * ChangeLog: Correct paths in last ChangeLog entry.
11432
114332002-04-09 Daniel Jacobowitz <drow@mvista.com>
11434
11435 * linux-low.h: Remove obsolete prototypes.
11436 (struct linux_target_ops): New.
11437 (extern the_low_target): New.
11438 * linux-low.c (num_regs, regmap): Remove declarations.
11439 (register_addr): Use the_low_target explicitly.
11440 (fetch_register): Likewise.
11441 (usr_fetch_inferior_registers): Likewise.
11442 (usr_store_inferior_registers): Likewise.
11443 * linux-arm-low.c (num_regs): Remove.
11444 (arm_num_regs): Define.
11445 (arm_regmap): Renamed from regmap, made static.
11446 (arm_cannot_fetch_register): Renamed from cannot_fetch_register,
11447 made static.
11448 (arm_cannot_store_register): Renamed from cannot_store_register,
11449 made static.
11450 (the_low_target): New.
11451 * linux-i386-low.c (num_regs): Remove.
11452 (i386_num_regs): Define.
11453 (i386_regmap): Renamed from regmap, made static.
11454 (i386_cannot_fetch_register): Renamed from cannot_fetch_register,
11455 made static.
11456 (i386_cannot_store_register): Renamed from cannot_store_register,
11457 made static.
11458 (the_low_target): New.
11459 * linux-ia64-low.c (num_regs): Remove.
11460 (ia64_num_regs): Define.
11461 (ia64_regmap): Renamed from regmap, made static.
11462 (ia64_cannot_fetch_register): Renamed from cannot_fetch_register,
11463 made static.
11464 (ia64_cannot_store_register): Renamed from cannot_store_register,
11465 made static.
11466 (the_low_target): New.
11467 * linux-m68k-low.c (num_regs): Remove.
11468 (m68k_num_regs): Define.
11469 (m68k_regmap): Renamed from regmap, made static.
11470 (m68k_cannot_fetch_register): Renamed from cannot_fetch_register,
11471 made static.
11472 (m68k_cannot_store_register): Renamed from cannot_store_register,
11473 made static.
11474 (the_low_target): New.
11475 * linux-mips-low.c (num_regs): Remove.
11476 (mips_num_regs): Define.
11477 (mips_regmap): Renamed from regmap, made static.
11478 (mips_cannot_fetch_register): Renamed from cannot_fetch_register,
11479 made static.
11480 (mips_cannot_store_register): Renamed from cannot_store_register,
11481 made static.
11482 (the_low_target): New.
11483 * linux-ppc-low.c (num_regs): Remove.
11484 (ppc_num_regs): Define.
11485 (ppc_regmap): Renamed from regmap, made static.
11486 (ppc_cannot_fetch_register): Renamed from cannot_fetch_register,
11487 made static.
11488 (ppc_cannot_store_register): Renamed from cannot_store_register,
11489 made static.
11490 (the_low_target): New.
11491 * linux-s390-low.c (num_regs): Remove.
11492 (s390_num_regs): Define.
11493 (s390_regmap): Renamed from regmap, made static.
11494 (s390_cannot_fetch_register): Renamed from cannot_fetch_register,
11495 made static.
11496 (s390_cannot_store_register): Renamed from cannot_store_register,
11497 made static.
11498 (the_low_target): New.
11499 * linux-sh-low.c (num_regs): Remove.
11500 (sh_num_regs): Define.
11501 (sh_regmap): Renamed from regmap, made static.
11502 (sh_cannot_fetch_register): Renamed from cannot_fetch_register,
11503 made static.
11504 (sh_cannot_store_register): Renamed from cannot_store_register,
11505 made static.
11506 (the_low_target): New.
11507 * linux-x86-64-low.c (x86_64_regmap): Renamed from regmap.
11508 (the_low_target): New.
11509
115102002-04-09 Daniel Jacobowitz <drow@mvista.com>
11511
11512 * Makefile.in: Add stamp-h target.
11513 * configure.in: Create stamp-h.
11514 * configure: Regenerated.
11515
115162002-04-09 Daniel Jacobowitz <drow@mvista.com>
11517
11518 * inferiors.c: New file.
11519 * target.c: New file.
11520 * target.h: New file.
11521 * Makefile.in: Add target.o and inferiors.o. Update
11522 dependencies.
11523 * linux-low.c (inferior_pid): New static variable,
11524 moved from server.c.
11525 (linux_create_inferior): Renamed from create_inferior.
11526 Call add_inferior. Return 0 on success instead of a PID.
11527 (linux_attach): Renamed from myattach.
11528 (linux_kill): Renamed from kill_inferior. Call clear_inferiors ().
11529 (linux_thread_alive): Renamed from mythread_alive.
11530 (linux_wait): Renamed from mywait. Call clear_inferiors () if the
11531 child dies.
11532 (linux_resume): Renamed from myresume. Add missing ``return 0''.
11533 (regsets_store_inferior_registers): Correct error message.
11534 Add missing ``return 0''.
11535 (linux_fetch_registers): Renamed from fetch_inferior_registers.
11536 (linux_store_registers): Renamed from store_inferior_registers.
11537 (linux_read_memory): Renamed from read_inferior_memory.
11538 (linux_write_memory): Renamed from write_inferior_memory.
11539 (linux_target_ops): New structure.
11540 (initialize_low): Call set_target_ops ().
11541 * remote-utils.c (unhexify): New function.
11542 (hexify): New function.
11543 (input_interrupt): Send signals to ``signal_pid''.
11544 * server.c (inferior_pid): Remove.
11545 (start_inferior): Update create_inferior call.
11546 (attach_inferior): Call add_inferior.
11547 (handle_query): New function.
11548 (main): Call handle_query for `q' packets.
11549 * server.h: Include "target.h". Remove obsolete prototypes.
11550 Add prototypes for "inferiors.c", "target.c", hexify, and unhexify.
11551
115522002-04-09 Daniel Jacobowitz <drow@mvista.com>
11553
11554 * Makefile.in: Add WARN_CFLAGS. Update configury
11555 dependencies.
11556 * configure.in: Check for <string.h>
11557 * configure: Regenerate.
11558 * config.in: Regenerate.
11559 * gdbreplay.c: Include needed system headers.
11560 (remote_open): Remove strchr prototype.
11561 * linux-low.h: Correct #ifdef to HAVE_LINUX_USRREGS.
11562 * regcache.c (supply_register): Change buf argument to const void *.
11563 (supply_register_by_name): Likewise.
11564 (collect_register): Change buf argument to void *.
11565 (collect_register_by_name): Likewise.
11566 * regcache.h: Add missing prototypes.
11567 * remote-utils.c: Include <arpa/inet.h> for inet_ntoa.
11568 * server.c (handle_query): New function.
11569 (attached): New static variable, moved out of main.
11570 (main): Quiet longjmp clobber warnings.
11571 * server.h: Add ATTR_NORETURN and ATTR_FORMAT. Update prototypes.
11572 * utils.c (error): Remove NORETURN.
11573 (fatal): Likewise.
This page took 1.550307 seconds and 4 git commands to generate.