]> git.ipfire.org Git - thirdparty/binutils-gdb.git/blame - gdb/gdbserver/ChangeLog
Don't use arm_regmap and arm_num_regs in arm_fill_gregset and arm_store_gregset
[thirdparty/binutils-gdb.git] / gdb / gdbserver / ChangeLog
CommitLineData
deca266c
YQ
12015-07-30 Yao Qi <yao.qi@linaro.org>
2
3 * linux-arm-low.c: Include arch/arm.h.
4 (arm_fill_gregset): Don't use arm_num_regs and arm_regmap.
5 (arm_store_gregset): Likewise.
6
aa58a496
SM
72015-07-29 Simon Marchi <simon.marchi@ericsson.com>
8
9 * linux-mips-low.c (mips_linux_prepare_to_resume): Add NULL as
10 ptrace's 4th parameter.
11
50904b25
YQ
122015-07-27 Yao Qi <yao.qi@linaro.org>
13
14 * configure.srv (case aarch64*-*-linux*): Don't set
15 srv_linux_usrregs.
16
5826e159
PA
172015-07-24 Pedro Alves <palves@redhat.c: Likewise.om>
18
19 * linux-aarch64-low.c: Include nat/gdb_ptrace.h instead of
20 sys/ptrace.h.
21 * linux-arm-low.c: Likewise.
22 * linux-cris-low.c: Likewise.
23 * linux-crisv32-low.c: Likewise.
24 * linux-low.c: Likewise.
25 * linux-m68k-low.c: Likewise.
26 * linux-mips-low.c: Likewise.
27 * linux-nios2-low.c: Likewise.
28 * linux-s390-low.c: Likewise.
29 * linux-sparc-low.c: Likewise.
30 * linux-tic6x-low.c: Likewise.
31 * linux-tile-low.c: Likewise.
32 * linux-x86-low.c: Likewise.
33
54019719
PA
342015-07-24 Pedro Alves <palves@redhat.com>
35
36 * config.in: Regenerate.
37 * configure: Regenerate.
38
eb7aa561
PA
392015-07-24 Pedro Alves <palves@redhat.com>
40
41 * acinclude.m4: Include ../ptrace.m4.
42 * configure.ac: Call GDB_AC_PTRACE.
43 * config.in, configure: Regenerate.
44
55d7b841
YQ
452015-07-24 Yao Qi <yao.qi@linaro.org>
46
47 * linux-low.c (linux_create_inferior): Remove setting to
48 proc->priv->new_inferior.
49 (linux_attach): Likewise.
50 (linux_low_filter_event): Likewise.
51 * linux-low.h (struct process_info_private) <new_inferior>: Remove.
52
c06cbd92
YQ
532015-07-24 Yao Qi <yao.qi@linaro.org>
54
55 * linux-low.c (linux_arch_setup): New function.
56 (linux_low_filter_event): If proc->tdesc is NULL and
57 proc->attached is true, call the_low_target.arch_setup.
58 Otherwise, keep status pending, and return.
59 (linux_resume_one_lwp_throw): Don't call get_pc if
60 thread->while_stepping isn't NULL. Don't call
61 get_thread_regcache if proc->tdesc is NULL.
62 (need_step_over_p): Return 0 if proc->tdesc is NULL.
63 (linux_target_ops): Install arch_setup.
64 * server.c (start_inferior): Call the_target->arch_setup.
65 * target.h (struct target_ops) <arch_setup>: New field.
66 (target_arch_setup): New marco.
67 * lynx-low.c (lynx_target_ops): Update.
68 * nto-low.c (nto_target_ops): Update.
69 * spu-low.c (spu_target_ops): Update.
70 * win32-low.c (win32_target_ops): Update.
71
5ae3ebba
YQ
722015-07-24 Yao Qi <yao.qi@linaro.org>
73
74 * linux-low.c (linux_add_process): Don't set
75 proc->priv->new_inferior.
76 (linux_create_inferior): Set proc->priv->new_inferior to 1.
77 (linux_attach): Likewise.
78
eb97750b
YQ
792015-07-24 Yao Qi <yao.qi@linaro.org>
80
81 * server.c (start_inferior): Code refactor.
82
51aee833
YQ
832015-07-24 Yao Qi <yao.qi@linaro.org>
84
85 * server.c (process_serial_event): Set general_thread.
86
af1b22f3
YQ
872015-07-21 Yao Qi <yao.qi@linaro.org>
88
89 * linux-aarch64-low.c (aarch64_arch_setup): Remove code and call
90 aarch64_linux_get_debug_reg_capacity.
91
554717a3
YQ
922015-07-17 Yao Qi <yao.qi@linaro.org>
93
94 * Makefile.in (aarch64-linux-hw-point.o): New rule.
95 * configure.srv (srv_tgtobj): Append aarch64-linux-hw-point.o.
96 * linux-aarch64-low.c: Include nat/aarch64-linux-hw-point.h.
97 (AARCH64_HBP_MAX_NUM): Move to nat/aarch64-linux-hw-point.h.
98 (AARCH64_HWP_MAX_NUM, AARCH64_HBP_ALIGNMENT): Likewise.
99 (AARCH64_HWP_ALIGNMENT): Likewise.
100 (AARCH64_HWP_MAX_LEN_PER_REG): Likewise.
101 (AARCH64_DEBUG_NUM_SLOTS, AARCH64_DEBUG_ARCH): Likewise.
102 (aarch64_num_bp_regs, aarch64_num_wp_regs): Likewise.
103 (AARCH64_DEBUG_ARCH_V8, DR_MARK_ALL_CHANGED): Likewise.
104 (DR_MARK_N_CHANGED, DR_CLEAR_CHANGED): Likewise.
105 (DR_HAS_CHANGED, DR_N_HAS_CHANGE): Likewise.
106 (struct aarch64_debug_reg_state): Likewise.
107 (struct arch_lwp_info): Likewise.
108 (aarch64_align_watchpoint): Likewise.
109 (DR_CONTROL_ENABLED, DR_CONTROL_LENGTH): Likewise.
110 (aarch64_watchpoint_length): Likewise.
111 (aarch64_point_encode_ctrl_reg): Likewise
112 (aarch64_point_is_aligned): Likewise.
113 (aarch64_align_watchpoint): Likewise.
114 (aarch64_linux_set_debug_regs):
115 (aarch64_dr_state_insert_one_point): Likewise.
116 (aarch64_dr_state_remove_one_point): Likewise.
117 (aarch64_handle_breakpoint): Likewise.
118 (aarch64_handle_aligned_watchpoint): Likewise.
119 (aarch64_handle_unaligned_watchpoint): Likewise.
120 (aarch64_handle_watchpoint): Likewise.
121
c67ca4de
YQ
1222015-07-17 Yao Qi <yao.qi@linaro.org>
123
124 * linux-aarch64-low.c (aarch64_handle_breakpoint): Add argument state
125 and don't aarch64_get_debug_reg_state. All callers update.
126 (aarch64_handle_aligned_watchpoint): Likewise.
127 (aarch64_handle_unaligned_watchpoint): Likewise.
128 (aarch64_handle_watchpoint): Likewise.
129 (aarch64_insert_point): Call aarch64_get_debug_reg_state earlier.
130 (aarch64_remove_point): Likewise.
131
25abf979
YQ
1322015-07-17 Yao Qi <yao.qi@linaro.org>
133
134 * linux-aarch64-low.c (aarch64_show_debug_reg_state): Use
135 debug_printf.
136 (aarch64_handle_unaligned_watchpoint): Likewise.
137
db1ff28b
JK
1382015-07-15 Jan Kratochvil <jan.kratochvil@redhat.com>
139
140 Revert the previous 3 commits:
141 Move gdb_regex* to common/
142 Move linux_find_memory_regions_full & co.
143 gdbserver build-id attribute generator
144
700ca40f
JK
1452015-07-15 Aleksandar Ristovski <aristovski@qnx.com
146 Jan Kratochvil <jan.kratochvil@redhat.com>
147
148 gdbserver build-id attribute generator.
149 * linux-low.c (nat/linux-maps.h, search.h, rsp-low.h): Include.
150 (ElfXX_Ehdr, ElfXX_Phdr, ElfXX_Nhdr): New.
151 (ELFXX_FLD, ELFXX_SIZEOF, ELFXX_ROUNDUP, BUILD_ID_INVALID): New.
152 (find_phdr): New.
153 (get_dynamic): Use find_pdhr to traverse program headers.
154 (struct mapping_entry, mapping_entry_s, free_mapping_entry_vec)
155 (compare_mapping_entry_range, struct find_memory_region_callback_data)
156 (read_build_id, find_memory_region_callback, lrfind_mapping_entry)
157 (get_hex_build_id): New.
158 (linux_qxfer_libraries_svr4): Add optional build-id attribute
159 to reply XML document.
160
9904185c
JK
1612015-07-15 Aleksandar Ristovski <aristovski@qnx.com
162 Jan Kratochvil <jan.kratochvil@redhat.com>
163
164 * target.c: Include target/target-utils.h and fcntl.h.
165 (target_fileio_read_stralloc_1_pread, target_fileio_read_stralloc_1)
166 (target_fileio_read_stralloc): New functions.
167
6e5b4429
JK
1682015-07-15 Jan Kratochvil <jan.kratochvil@redhat.com>
169
170 * Makefile.in (OBS): Add gdb_regex.o.
171 (gdb_regex.o): New.
172 * config.in: Rebuilt.
173 * configure: Rebuilt.
174
ddc98fbf
JK
1752015-07-15 Aleksandar Ristovski <aristovski@qnx.com
176 Jan Kratochvil <jan.kratochvil@redhat.com>
177
178 Create empty nat/linux-maps.[ch] and common/target-utils.[ch].
179 * Makefile.in (OBS): Add target-utils.o.
180 (linux-maps.o, target-utils.o): New.
181 * configure.srv (srv_linux_obj): Add linux-maps.o.
182
e57bb7a0
PL
1832015-07-15 Pierre Langlois <pierre.langlois@arm.com>
184
185 * linux-aarch64-low.c (aarch64_supports_range_stepping): New
186 function, return 1.
187 (the_low_target): Install it.
188
586b02a9
PA
1892015-07-14 Pedro Alves <palves@redhat.com>
190
191 * linux-low.c (kill_wait_lwp): Don't assert if waitpid fails.
192 Instead, ignore ECHILD, and throw an error for other errnos.
193
58c1b36c
PA
1942015-07-10 Pedro Alves <palves@redhat.com>
195
196 * event-loop.c (struct callback_event) <data>: Change type to
197 gdb_client_data instance instead of gdb_client_data pointer.
198 (append_callback_event): Adjust.
199
421530db
PL
2002015-07-10 Pierre Langlois <pierre.langlois@arm.com>
201
202 * linux-aarch64-low.c: Add comments for each linux_target_ops
203 method. Remove comments already covered in target_ops and
204 linux_target_ops definitions.
205 (the_low_target): Add comments for each unimplemented method.
206
c2d65f38
YQ
2072015-07-09 Yao Qi <yao.qi@linaro.org>
208
209 * linux-aarch64-low.c (aarch64_regmap): Remove.
210 (aarch64_usrregs_info): Remove.
211 (regs_info): Set field usrregs to NULL.
212
b20a6524
MM
2132015-07-02 Markus Metzger <markus.t.metzger@intel.com>
214
215 * linux-low.c: Include "rsp-low.h"
216 (linux_low_encode_pt_config, linux_low_encode_raw): New.
217 (linux_low_read_btrace): Support BTRACE_FORMAT_PT.
218 (linux_low_btrace_conf): Support BTRACE_FORMAT_PT.
219 (handle_btrace_enable_pt): New.
220 (handle_btrace_general_set): Support "pt".
221 (handle_btrace_conf_general_set): Support "pt:size".
222
96c97461
PL
2232015-06-29 Pierre Langlois <pierre.langlois@arm.com>
224
225 * linux-aarch64-low.c (aarch64_supports_z_point_type): Enable for
226 Z_PACKET_SW_BP.
227
37d66942
PL
2282015-06-29 Pierre Langlois <pierre.langlois@arm.com>
229
230 * linux-aarch64-low.c: Remove comment about endianness.
231 (aarch64_breakpoint): Change type to gdb_byte[]. Set to "brk #0".
232 (aarch64_breakpoint_at): Change type of insn to gdb_byte[]. Use
233 memcmp.
234
dc06243f
GB
2352015-06-24 Gary Benson <gbenson@redhat.com>
236
237 * linux-i386-ipa.c (stdint.h): Do not include.
238 * lynx-i386-low.c (stdint.h): Likewise.
239 * lynx-ppc-low.c (stdint.h): Likewise.
240 * mem-break.c (stdint.h): Likewise.
241 * thread-db.c (stdint.h): Likewise.
242 * tracepoint.c (stdint.h): Likewise.
243 * win32-low.c (stdint.h): Likewise.
244
124e13d9
SM
2452015-06-18 Simon Marchi <simon.marchi@ericsson.com>
246
247 * server.c (write_qxfer_response): Update call to
248 remote_escape_output.
249
909c2cda
JK
2502015-06-15 Aleksandar Ristovski <aristovski@qnx.com
251 Jan Kratochvil <jan.kratochvil@redhat.com>
252
253 Merge multiple hex conversions.
254 * gdbreplay.c (tohex): Rename to 'fromhex'.
255 (logchar): Use fromhex.
256
24c05f46
JK
2572015-06-10 Jan Kratochvil <jan.kratochvil@redhat.com>
258
259 * server.c (handle_qxfer_libraries): Set `version' attribute for
260 <library-list>.
261
14d2069a
GB
2622015-06-10 Gary Benson <gbenson@redhat.com>
263
264 * target.h (struct target_ops) <multifs_open>: New field.
265 <multifs_unlink>: Likewise.
266 <multifs_readlink>: Likewise.
267 * linux-low.c (nat/linux-namespaces.h): New include.
268 (linux_target_ops): Initialize the_target->multifs_open,
269 the_target->multifs_unlink and the_target->multifs_readlink.
270 * hostio.h (hostio_handle_new_gdb_connection): New declaration.
271 * hostio.c (hostio_fs_pid): New static variable.
272 (hostio_handle_new_gdb_connection): New function.
273 (handle_setfs): Likewise.
274 (handle_open): Use the_target->multifs_open as appropriate.
275 (handle_unlink): Use the_target->multifs_unlink as appropriate.
276 (handle_readlink): Use the_target->multifs_readlink as
277 appropriate.
278 (handle_vFile): Handle vFile:setfs packets.
279 * server.c (handle_query): Call hostio_handle_new_gdb_connection
280 after target_handle_new_gdb_connection.
281
4b8b5e72
GB
2822015-06-10 Gary Benson <gbenson@redhat.com>
283
284 * configure.ac (AC_CHECK_FUNCS): Add setns.
285 * config.in: Regenerate.
286 * configure: Likewise.
287 * Makefile.in (SFILES): Add nat/linux-namespaces.c.
288 (linux-namespaces.o): New rule.
289 * configure.srv (srv_linux_obj): Add linux-namespaces.o.
290
3ac2e371
GB
2912015-06-09 Gary Benson <gbenson@redhat.com>
292
293 * hostio.c (handle_open): Process mode argument with
294 fileio_to_host_mode.
295
ca9b78ce
YQ
2962015-06-01 Yao Qi <yao.qi@linaro.org>
297
298 * linux-s390-low.c (PTRACE_GETREGSET, PTRACE_SETREGSET): Remove.
299 * linux-x86-low.c: Likewise.
300
bfacd19d
DB
3012015-05-28 Don Breazeal <donb@codesourcery.com>
302
303 * linux-low.c (handle_extended_wait): Initialize
304 thread_info.last_resume_kind for new fork children.
305
452003ef
PA
3062015-05-15 Pedro Alves <palves@redhat.com>
307
308 * target.h (target_handle_new_gdb_connection): Rewrite using if
309 wrapped in do/while.
310
1041a03c
JB
3112015-05-14 Joel Brobecker <brobecker@adacore.com>
312
313 * configure.ac: Add prfpregset_t BFD_HAVE_SYS_PROCFS_TYPE check.
314 * configure, config.in: Regenerate.
315 * gdb_proc_service.h [HAVE_PRFPREGSET_T] (prfpregset_t):
316 Declare typedef.
317
c269dbdb
DB
3182015-05-12 Don Breazeal <donb@codesourcery.com>
319
320 * linux-low.c (handle_extended_wait): Handle PTRACE_EVENT_FORK and
321 PTRACE_EVENT_VFORK_DONE.
322 (linux_low_ptrace_options, extended_event_reported): Add vfork
323 events.
324 * remote-utils.c (prepare_resume_reply): New stop reasons "vfork"
325 and "vforkdone" for RSP 'T' Stop Reply Packet.
326 * server.h (report_vfork_events): Declare
327 global variable.
328
3a8a0396
DB
3292015-05-12 Don Breazeal <donb@codesourcery.com>
330
331 * linux-aarch64-low.c (aarch64_linux_new_fork): New function.
332 (the_low_target) <new_fork>: Initialize new member.
333 * linux-arm-low.c (arm_new_fork): New function.
334 (the_low_target) <new_fork>: Initialize new member.
335 * linux-low.c (handle_extended_wait): Call new target function
336 new_fork.
337 * linux-low.h (struct linux_target_ops) <new_fork>: New member.
338 * linux-mips-low.c (mips_add_watchpoint): New function
339 extracted from mips_insert_point.
340 (the_low_target) <new_fork>: Initialize new member.
341 (mips_linux_new_fork): New function.
342 (mips_insert_point): Call mips_add_watchpoint.
343 * linux-x86-low.c (x86_linux_new_fork): New function.
344 (the_low_target) <new_fork>: Initialize new member.
345
de0d863e
DB
3462015-05-12 Don Breazeal <donb@codesourcery.com>
347
348 * linux-low.c (handle_extended_wait): Implement return value,
349 rename argument 'event_child' to 'event_lwp', handle
350 PTRACE_EVENT_FORK, call internal_error for unrecognized event.
351 (linux_low_ptrace_options): New function.
352 (linux_low_filter_event): Call linux_low_ptrace_options,
353 use different argument fo linux_enable_event_reporting,
354 use return value from handle_extended_wait.
355 (extended_event_reported): New function.
356 (linux_wait_1): Call extended_event_reported and set
357 status to report fork events.
358 (linux_write_memory): Add pid to debug message.
359 (reset_lwp_ptrace_options_callback): New function.
360 (linux_handle_new_gdb_connection): New function.
361 (linux_target_ops): Initialize new structure member.
362 * linux-low.h (struct lwp_info) <waitstatus>: New member.
363 * lynx-low.c: Initialize new structure member.
364 * remote-utils.c (prepare_resume_reply): Implement stop reason
365 "fork" for "T" stop message.
366 * server.c (handle_query): Call handle_new_gdb_connection.
367 * server.h (report_fork_events): Declare global flag.
368 * target.h (struct target_ops) <handle_new_gdb_connection>:
369 New member.
370 (target_handle_new_gdb_connection): New macro.
371 * win32-low.c: Initialize new structure member.
372
ddcbc397
DB
3732015-05-12 Don Breazeal <donb@codesourcery.com>
374
375 * mem-break.c (APPEND_TO_LIST): Define macro.
376 (clone_agent_expr): New function.
377 (clone_one_breakpoint): New function.
378 (clone_all_breakpoints): New function.
379 * mem-break.h: Declare new functions.
380
89245bc0
DB
3812015-05-12 Don Breazeal <donb@codesourcery.com>
382
383 * linux-low.c (linux_supports_fork_events): New function.
384 (linux_supports_vfork_events): New function.
385 (linux_target_ops): Initialize new structure members.
386 (initialize_low): Call linux_check_ptrace_features.
387 * lynx-low.c (lynx_target_ops): Initialize new structure
388 members.
389 * server.c (report_fork_events, report_vfork_events):
390 New global flags.
391 (handle_query): Add new features to qSupported packet and
392 response.
393 (captured_main): Initialize new global variables.
394 * target.h (struct target_ops) <supports_fork_events>:
395 New member.
396 <supports_vfork_events>: New member.
397 (target_supports_fork_events): New macro.
398 (target_supports_vfork_events): New macro.
399 * win32-low.c (win32_target_ops): Initialize new structure
400 members.
401
835205d0
GB
4022015-05-12 Gary Benson <gbenson@redhat.com>
403
404 * server.c (handle_qxfer_exec_file): Use current process
405 if annex is empty.
406
21e94bd9
SL
4072015-05-08 Sandra Loosemore <sandra@codesourcery.com>
408
409 * linux-nios2-low.c: Include elf/common.h. Adjust comments.
410 Remove HAVE_PTRACE_GETREGS conditionals.
411 (nios2_regsets): Use PTRACE_GETREGSET and PTRACE_SETREGSET
412 instead of PTRACE_GETREGS and PTRACE_SETREGS.
413
45614f15
YQ
4142015-05-08 Yao Qi <yao.qi@linaro.org>
415
416 * linux-low.c (linux_supports_conditional_breakpoints): New
417 function.
418 (linux_target_ops): Install new target method.
419 * lynx-low.c (lynx_target_ops): Install NULL hook for
420 supports_conditional_breakpoints.
421 * nto-low.c (nto_target_ops): Likewise.
422 * spu-low.c (spu_target_ops): Likewise.
423 * win32-low.c (win32_target_ops): Likewise.
424 * server.c (handle_query): Check
425 target_supports_conditional_breakpoints.
426 * target.h (struct target_ops) <supports_conditional_breakpoints>:
427 New field.
428 (target_supports_conditional_breakpoints): New macro.
429
80ad801e
PA
4302015-05-06 Pedro Alves <palves@redhat.com>
431
432 PR server/18081
433 * server.c (start_inferior): If the process exits, mourn it.
434
819843c7
GB
4352015-04-21 Gary Benson <gbenson@redhat.com>
436
437 * hostio.c (fileio_open_flags_to_host): Factored out to
438 fileio_to_host_openflags in common/fileio.c. Single use
439 updated.
440
a2d5a9d7
MF
4412015-04-17 Max Filippov <jcmvbkbc@gmail.com>
442
443 * linux-xtensa-low.c (xtensa_fill_gregset)
444 (xtensa_store_gregset): Check XCHAL_HAVE_LOOPS instead of
445 XCHAL_HAVE_LOOP.
446
deb44829
MF
4472015-04-17 Max Filippov <jcmvbkbc@gmail.com>
448
449 * linux-xtensa-low.c (xtensa_usrregs_info): Remove.
450 (regs_info): Replace usrregs pointer with NULL.
451
e57f1de3
GB
4522015-04-17 Gary Benson <gbenson@redhat.com>
453
454 * target.h (struct target_ops) <pid_to_exec_file>: New field.
455 * linux-low.c (linux_target_ops): Initialize pid_to_exec_file.
456 * server.c (handle_qxfer_exec_file): New function.
457 (qxfer_packets): Add exec-file entry.
458 (handle_query): Report qXfer:exec-file:read as supported packet.
459
62828379
RN
4602015-04-14 Romain Naour <romain.naour@openwide.fr> (tiny change)
461
462 * linux-low.c (linux_read_offsets): Remove get_thread_lwp.
463
b88bb450
GB
4642015-04-09 Gary Benson <gbenson@redhat.com>
465
466 * hostio-errno.c (errno_to_fileio_error): Remove function.
467 Update caller to use remote_fileio_to_fio_error.
468
c8f4bfdd
YQ
4692015-04-09 Yao Qi <yao.qi@linaro.org>
470
471 * linux-low.c (linux_insert_point): Call
472 insert_memory_breakpoint if TYPE is raw_bkpt_type_sw.
473 (linux_remove_point): Call remove_memory_breakpoint if type is
474 raw_bkpt_type_sw.
475 * linux-x86-low.c (x86_insert_point): Don't call
476 insert_memory_breakpoint.
477 (x86_remove_point): Don't call remove_memory_breakpoint.
478
41f98f02
PA
4792015-04-01 Pedro Alves <palves@redhat.com>
480 Cleber Rosa <crosa@redhat.com>
481
482 * server.c (gdbserver_usage): Reorganize and extend the usage
483 message.
484
2bf6fb9d
PA
4852015-03-24 Pedro Alves <palves@redhat.com>
486
487 * linux-low.c (check_stopped_by_breakpoint): Tweak debug log
488 output. Also dump TRAP_TRACE.
489 (linux_low_filter_event): In debug output, distinguish a
490 resume_stop SIGSTOP from a delayed SIGSTOP.
491
369f6daa
GB
4922015-03-24 Gary Benson <gbenson@redhat.com>
493
494 * linux-x86-low.c (x86_linux_new_thread): Moved to
495 nat/x86-linux.c.
496 (x86_linux_prepare_to_resume): Likewise.
497
8e5d4070
GB
4982015-03-24 Gary Benson <gbenson@redhat.com>
499
500 * Makefile.in (x86-linux-dregs.o): New rule.
501 * configure.srv: Add x86-linux-dregs.o to relevant targets.
502 * linux-x86-low.c: Include nat/x86-linux-dregs.h.
503 (u_debugreg_offset): Moved to nat/x86-linux-dregs.c.
504 (x86_linux_dr_get): Likewise.
505 (x86_linux_dr_set): Likewise.
506 (update_debug_registers_callback): Likewise.
507 (x86_linux_dr_set_addr): Likewise.
508 (x86_linux_dr_get_addr): Likewise.
509 (x86_linux_dr_set_control): Likewise.
510 (x86_linux_dr_get_control): Likewise.
511 (x86_linux_dr_get_status): Likewise.
512 (x86_linux_update_debug_registers): Likewise.
513
2b95d440
GB
5142015-03-24 Gary Benson <gbenson@redhat.com>
515
516 * linux-x86-low.c (x86_linux_update_debug_registers):
517 New function, factored out from...
518 (x86_linux_prepare_to_resume): ...this.
519
14b0bc68
GB
5202015-03-24 Gary Benson <gbenson@redhat.com>
521
522 * linux-x86-low.c (x86_linux_dr_get): Update comments.
523 (x86_linux_dr_set): Likewise.
524 (update_debug_registers_callback): Likewise.
525 (x86_linux_dr_set_addr): Likewise.
526 (x86_linux_dr_get_addr): Likewise.
527 (x86_linux_dr_set_control): Likewise.
528 (x86_linux_dr_get_control): Likewise.
529 (x86_linux_dr_get_status): Likewise.
530 (x86_linux_prepare_to_resume): Likewise.
531
5dfe6ca8
GB
5322015-03-24 Gary Benson <gbenson@redhat.com>
533
534 * linux-x86-low.c (x86_linux_dr_get): Add assertion.
535 Use perror_with_name. Pass string through gettext.
536 (x86_linux_dr_set): Likewise.
537
d33472ad
GB
5382015-03-24 Gary Benson <gbenson@redhat.com>
539
540 * linux-x86-low.c (x86_dr_low_set_addr): Rename to...
541 (x86_linux_dr_set_addr): ...this.
542 (x86_dr_low_get_addr): Rename to...
543 (x86_linux_dr_get_addr): ...this.
544 (x86_dr_low_set_control): Rename to...
545 (x86_linux_dr_set_control): ...this.
546 (x86_dr_low_get_control): Rename to...
547 (x86_linux_dr_get_control): ...this.
548 (x86_dr_low_get_status): Rename to...
549 (x86_linux_dr_get_status): ...this.
550 (x86_dr_low): Update with new function names.
551
4b134ca1
GB
5522015-03-24 Gary Benson <gbenson@redhat.com>
553
554 * Makefile.in (x86-linux.o): New rule.
555 * configure.srv: Add x86-linux.o to relevant targets.
556 * linux-low.c (lwp_set_arch_private_info): New function.
557 (lwp_arch_private_info): Likewise.
558 * linux-x86-low.c: Include nat/x86-linux.h.
559 (arch_lwp_info): Removed structure.
560 (update_debug_registers_callback):
561 Use lwp_set_debug_registers_changed.
562 (x86_linux_prepare_to_resume): Use lwp_debug_registers_changed
563 and lwp_set_debug_registers_changed.
564 (x86_linux_new_thread): Use lwp_set_debug_registers_changed.
565
34c703da
GB
5662015-03-24 Gary Benson <gbenson@redhat.com>
567
568 * linux-low.h (linux_target_ops) <new_thread>: Changed signature.
569 * linux-arm-low.c (arm_new_thread): Likewise.
570 * linux-aarch64-low.c (aarch64_linux_new_thread): Likewise.
571 * linux-mips-low.c (mips_linux_new_thread): Likewise.
572 * linux-x86-low.c (x86_linux_new_thread): Likewise.
573 * linux-low.c (add_lwp): Update the_low_target.new_thread call.
574
cff068da
GB
5752015-03-24 Gary Benson <gbenson@redhat.com>
576
577 * linux-low.c (ptid_of_lwp): New function.
578 (lwp_is_stopped): Likewise.
579 (lwp_stop_reason): Likewise.
580 * linux-x86-low.c (update_debug_registers_callback):
581 Use lwp_is_stopped.
582 (x86_linux_prepare_to_resume): Use ptid_of_lwp and
583 lwp_stop_reason.
584
b2f7c7e8
GB
5852015-03-24 Gary Benson <gbenson@redhat.com>
586
587 * linux-low.h (linux_stop_lwp): Remove declaration.
588
6d4ee8c6
GB
5892015-03-24 Gary Benson <gbenson@redhat.com>
590
591 * linux-low.h: Include nat/linux-nat.h.
592 * linux-low.c (iterate_over_lwps_args): New structure.
593 (iterate_over_lwps_filter): New function.
594 (iterate_over_lwps): Likewise.
595 * linux-x86-low.c (update_debug_registers_callback):
596 Update signature to what iterate_over_lwps expects.
597 Remove PID check that iterate_over_lwps now performs.
598 (x86_dr_low_set_addr): Use iterate_over_lwps.
599 (x86_dr_low_set_control): Likewise.
600
70a0bb6b
GB
6012015-03-24 Gary Benson <gbenson@redhat.com>
602
603 * linux-x86-low.c (x86_debug_reg_state): New function.
604 (x86_linux_prepare_to_resume): Use the above.
605
7b669087
GB
6062015-03-24 Gary Benson <gbenson@redhat.com>
607
608 * linux-low.c (current_lwp_ptid): New function.
609 * linux-x86-low.c: Include nat/linux-nat.h.
610 (x86_dr_low_get_addr): Use current_lwp_ptid.
611 (x86_dr_low_get_control): Likewise.
612 (x86_dr_low_get_status): Likewise.
613
eef49a3d
PA
6142015-03-20 Pedro Alves <palves@redhat.com>
615
616 * tracepoint.c (cmd_qtstatus): Make "str" const.
617
b2333d22
PA
6182015-03-20 Pedro Alves <palves@redhat.com>
619
620 * server.c (handle_general_set): Make "req_str" const.
621
23f238d3
PA
6222015-03-19 Pedro Alves <palves@redhat.com>
623
624 * linux-low.c (linux_resume_one_lwp): Rename to ...
625 (linux_resume_one_lwp_throw): ... this. Don't handle ESRCH here,
626 instead call perror_with_name.
627 (check_ptrace_stopped_lwp_gone): New function.
628 (linux_resume_one_lwp): Reimplement as wrapper around
629 linux_resume_one_lwp_throw that swallows errors if the LWP is
630 gone.
631
91baf43f
PA
6322015-03-19 Pedro Alves <palves@redhat.com>
633
634 * linux-low.c (count_events_callback, select_event_lwp_callback):
635 No longer check whether the thread has resume_stop as last resume
636 kind.
637
8bf3b159
PA
6382015-03-19 Pedro Alves <palves@redhat.com>
639
640 * linux-low.c (count_events_callback, select_event_lwp_callback):
641 Use the lwp's status_pending_p field, not the thread's.
642
b90fc188
PA
6432015-03-19 Pedro Alves <palves@redhat.com>
644
645 * linux-low.c (select_event_lwp_callback): Update comments to
646 no longer mention SIGTRAP.
647
464b0089
GB
6482015-03-18 Gary Benson <gbenson@redhat.com>
649
650 * server.c (handle_query): Do not report vFile:fstat as supported.
651
aa9e327f
GB
6522015-03-11 Gary Benson <gbenson@redhat.com>
653
654 * hostio.c (sys/types.h): New include.
655 (sys/stat.h): Likewise.
656 (common-remote-fileio.h): Likewise.
657 (handle_fstat): New function.
658 (handle_vFile): Handle vFile:fstat packets.
aa9e327f 659
791c0056
GB
6602015-03-11 Gary Benson <gbenson@redhat.com>
661
662 * configure.ac (AC_CHECK_MEMBERS): Add checks for
663 struct stat.st_blocks and struct stat.st_blksize.
664 * configure: Regenerate.
665 * config.in: Likewise.
666 * Makefile.in (SFILES): Add common/common-remote-fileio.c.
667 (OBS): Add common-remote-fileio.o.
668 (common-remote-fileio.o): New rule.
669
9a9df970
PA
6702015-03-09 Pedro Alves <palves@redhat.com>
671
672 * tracepoint.c (gdb_agent_helper_thread): Cast '&sockaddr' to
673 'struct sockaddr' pointer in 'accept' call.
674
9eb1356e
PA
6752015-03-09 Pedro Alves <palves@redhat.com>
676
677 Revert:
678 2015-03-07 Pedro Alves <palves@redhat.com>
679 * gdbreplay.c: No longer include <netinet/in.h>, <sys/socket.h>,
680 or <winsock2.h> here. Instead include "gdb_socket.h".
681 (remote_open): Use union gdb_sockaddr_u.
682 * remote-utils.c: No longer include <netinet/in.h>, <sys/socket.h>
683 or <winsock2.h> here. Instead include "gdb_socket.h".
684 (handle_accept_event, remote_prepare): Use union gdb_sockaddr_u.
685 * tracepoint.c: Include "gdb_socket.h" instead of <sys/socket.h>
686 or <sys/un.h>.
687 (init_named_socket, gdb_agent_helper_thread): Use union
688 gdb_sockaddr_u.
689
aac331e4
PA
6902015-03-07 Pedro Alves <palves@redhat.com>
691
692 * configure.ac (build_warnings): Move
693 -Wdeclaration-after-statement to the C-specific set.
694 * configure: Regenerate.
695
366c75fc
PA
6962015-03-07 Pedro Alves <palves@redhat.com>
697
698 * gdbreplay.c: No longer include <netinet/in.h>, <sys/socket.h>,
699 or <winsock2.h> here. Instead include "gdb_socket.h".
700 (remote_open): Use union gdb_sockaddr_u.
701 * remote-utils.c: No longer include <netinet/in.h>, <sys/socket.h>
702 or <winsock2.h> here. Instead include "gdb_socket.h".
703 (handle_accept_event, remote_prepare): Use union gdb_sockaddr_u.
704 * tracepoint.c: Include "gdb_socket.h" instead of <sys/socket.h>
705 or <sys/un.h>.
706 (init_named_socket, gdb_agent_helper_thread): Use union
707 gdb_sockaddr_u.
708
492d29ea
PA
7092015-03-07 Pedro Alves <palves@redhat.com>
710
711 Adjust all callers of TRY_CATCH to use TRY/CATCH/END_CATCH
712 instead.
713
60a191ed
YQ
7142015-03-06 Yao Qi <yao.qi@linaro.org>
715
716 * linux-aarch64-low.c (aarch64_insert_point): Use
717 show_debug_regs as a boolean.
718 (aarch64_remove_point): Likewise.
719
f5771b1d
PA
7202015-03-05 Pedro Alves <palves@redhat.com>
721
722 * lynx-low.c (lynx_target_ops): Install NULL hooks for
723 stopped_by_sw_breakpoint, supports_stopped_by_sw_breakpoint,
724 stopped_by_hw_breakpoint, supports_stopped_by_hw_breakpoint.
725 * nto-low.c (nto_target_ops): Likewise.
726 * spu-low.c (spu_target_ops): Likewise.
727 * win32-low.c (win32_target_ops): Likewise.
728
3e572f71
PA
7292015-03-04 Pedro Alves <palves@redhat.com>
730
72f4393d 731 * linux-low.c (check_stopped_by_breakpoint) [USE_SIGTRAP_SIGINFO]:
3e572f71
PA
732 Decide whether a breakpoint triggered based on the SIGTRAP's
733 siginfo.si_code.
72f4393d
L
734 (thread_still_has_status_pending_p) [USE_SIGTRAP_SIGINFO]: Don't check whether a
735 breakpoint is inserted if relying on SIGTRAP's siginfo.si_code.
3e572f71
PA
736 (linux_low_filter_event): Check for breakpoints before checking
737 watchpoints.
738 (linux_wait_1): Don't re-increment the PC if relying on SIGTRAP's
739 siginfo.si_code.
72f4393d
L
740 (linux_stopped_by_sw_breakpoint)
741 (linux_supports_stopped_by_sw_breakpoint)
742 (linux_stopped_by_hw_breakpoint)
743 (linux_supports_stopped_by_hw_breakpoint): New functions.
744 (linux_target_ops): Install new target methods.
3e572f71 745
1ec68e26
PA
7462015-03-04 Pedro Alves <palves@redhat.com>
747
748 * remote-utils.c (prepare_resume_reply): Report swbreak/hbreak.
749 * server.c (swbreak_feature, hwbreak_feature): New globals.
750 (handle_query) <qSupported>: Handle "swbreak+" and "hwbreak+".
751 (captured_main): Clear swbreak_feature and hwbreak_feature.
752 * server.h (swbreak_feature, hwbreak_feature): Declare.
753 * target.h (struct target_ops) <stopped_by_sw_breakpoint,
754 supports_stopped_by_sw_breakpoint, stopped_by_hw_breakpoint,
755 supports_stopped_by_hw_breakpoint>: New fields.
756 (target_supports_stopped_by_sw_breakpoint)
757 (target_stopped_by_sw_breakpoint)
758 (target_supports_stopped_by_hw_breakpoint)
759 (target_stopped_by_hw_breakpoint): Declare.
760
15c66dd6
PA
7612015-03-04 Pedro Alves <palves@redhat.com>
762
763 enum lwp_stop_reason -> enum target_stop_reason
764 * linux-low.c (check_stopped_by_breakpoint): Adjust.
765 (thread_still_has_status_pending_p, check_stopped_by_watchpoint)
766 (linux_wait_1, stuck_in_jump_pad_callback)
767 (move_out_of_jump_pad_callback, linux_resume_one_lwp)
768 (linux_stopped_by_watchpoint):
769 * linux-low.h (enum lwp_stop_reason): Delete.
770 (struct lwp_info) <stop_reason>: Now an enum target_stop_reason.
771 * linux-x86-low.c (x86_linux_prepare_to_resume): Adjust.
772
98fc70d6
YQ
7732015-03-04 Yao Qi <yao.qi@linaro.org>
774
775 * Makefile.in (SFILES): Add linux-aarch64-low.c.
776
dd2ac174
GB
7772015-03-03 Gary Benson <gbenson@redhat.com>
778
779 * hostio.c (handle_vFile): Fix prefix lengths.
780
d68e53f4
MM
7812015-03-03 Markus Metzger <markus.t.metzger@intel.com>
782
783 * linux-low.c (linux_low_enable_btrace): Do not overwrite non-zero
784 ptr_bits.
785
bf2d68ab
AA
7862015-03-02 Andreas Arnez <arnez@linux.vnet.ibm.com>
787
788 * Makefile.in (s390-vx-linux64.c, s390-tevx-linux64.c)
789 (s390x-vx-linux64.c, s390x-tevx-linux64.c): New rules.
790 (clean): Add "rm -f" for above C files.
791 * configure.srv (srv_regobj): Add s390-vx-linux64.o,
792 s390-tevx-linux64.o, s390x-vx-linux64.o, and s390x-tevx-linux64.o.
793 (srv_xmlfiles): Add s390-vx-linux64.xml, s390-tevx-linux64.xml,
794 s390x-vx-linux64.xml, s390x-tevx-linux64.xml, and s390-vx.xml.
795 * linux-s390-low.c (HWCAP_S390_VX): New macro.
796 (init_registers_s390_vx_linux64, init_registers_s390_tevx_linux64)
797 (init_registers_s390x_vx_linux64)
798 (init_registers_s390x_tevx_linux64)
799 (tdesc_s390_vx_linux64, tdesc_s390_tevx_linux64)
800 (tdesc_s390x_vx_linux64, tdesc_s390x_tevx_linux64): New extern
801 declarations.
802 (s390_fill_vxrs_low, s390_store_vxrs_low, s390_fill_vxrs_high)
803 (s390_store_vxrs_high): New functions.
804 (s390_regsets): Add entries for NT_S390_VXRS_LOW and
805 NT_S390_VXRS_HIGH.
806 (s390_arch_setup): Add logic for selecting one of the new target
807 descriptions. Activate the new vector regsets if applicable.
808 (initialize_low_arch): Also invoke init_registers_s390_vx_linux64,
809 init_registers_s390_tevx_linux64, init_registers_s390x_vx_linux64,
810 and init_registers_s390x_tevx_linux64.
811
c966a859
PA
8122015-03-01 Pedro Alves <palves@redhat.com>
813
814 * linux-i386-ipa.c (gdb_agent_get_raw_reg): Constify 'raw_regs'
815 parameter.
816
4180215b
PA
8172015-02-27 Pedro Alves <palves@redhat.com>
818
819 * linux-x86-low.c (u_debugreg_offset): New function.
820 (x86_linux_dr_get, x86_linux_dr_set): Use it.
821
749bab01
PA
8222015-02-27 Pedro Alves <palves@redhat.com>
823
824 * gdb_proc_service.h: Wrap with EXTERN_C_PUSH/EXTERN_C_POP.
825 [!HAVE_PROC_SERVICE_H] (struct ps_prochandle): Forward declare.
826 [!HAVE_PROC_SERVICE_H] (ps_pdread, ps_pdwrite, ps_ptread)
827 ps_ptwrite, ps_lgetregs, ps_lsetregs, ps_lgetfpregs)
828 (ps_lsetfpregs, ps_getpid)
829 (ps_get_thread_area, ps_pglobal_lookup, ps_pstop, ps_pcontinue)
830 (ps_lstop, ps_lcontinue, ps_lgetxregsize, ps_lgetxregs)
831 (ps_lsetxregs, ps_plog): Declare.
832
3c14e5a3
PA
8332015-02-27 Pedro Alves <palves@redhat.com>
834
835 * linux-amd64-ipa.c (gdb_agent_get_raw_reg): Use
836 IP_AGENT_EXPORT_FUNC.
837 * linux-i386-ipa.c (gdb_agent_get_raw_reg): Use
838 IP_AGENT_EXPORT_FUNC.
839 * tracepoint.c (ATTR_USED, ATTR_NOINLINE, ATTR_CONSTRUCTOR)
840 (IP_AGENT_EXPORT): Delete.
841 (gdb_tp_heap_buffer, gdb_jump_pad_buffer, gdb_jump_pad_buffer_end)
842 (gdb_trampoline_buffer, gdb_trampoline_buffer_end)
843 (gdb_trampoline_buffer_error, collecting, gdb_collect)
844 (stop_tracing, flush_trace_buffer, about_to_request_buffer_space)
845 (trace_buffer_is_full, stopping_tracepoint, expr_eval_result)
846 (error_tracepoint, tracepoints, tracing, trace_buffer_ctrl)
847 (trace_buffer_ctrl_curr, trace_buffer_lo, trace_buffer_hi)
848 (traceframe_read_count, traceframe_write_count)
849 (traceframes_created, trace_state_variables, get_raw_reg)
850 (get_trace_state_variable_value, set_trace_state_variable_value)
851 (ust_loaded, helper_thread_id, cmd_buf): Use
852 IPA_SYM_EXPORTED_NAME.
853 (stop_tracing, flush_trace_buffer): Use IP_AGENT_EXPORT_FUNC.
854 (tracepoints) Use IP_AGENT_EXPORT_VAR.
855 (stopping_tracepoint, trace_buffer_is_full, expr_eval_result): Use
856 IP_AGENT_EXPORT_VAR and wrap in EXTERN_C_PUSH/EXTERN_C_POP.
857 (last_tracepoint): Move into !IN_PROCESS_AGENT block.
858 (error_tracepoint): Use IP_AGENT_EXPORT_VAR and wrap in
859 EXTERN_C_PUSH/EXTERN_C_POP.
860 (trace_state_variables): Use IP_AGENT_EXPORT_VAR.
861 (trace_buffer_lo, trace_buffer_hi): Use IP_AGENT_EXPORT_VAR and
862 wrap in EXTERN_C_PUSH/EXTERN_C_POP.
863 (trace_buffer_ctrl, trace_buffer_ctrl_curr)
864 (traceframe_write_count, traceframe_read_count)
865 (traceframes_created, tracing): Use IP_AGENT_EXPORT_VAR.
866 (about_to_request_buffer_space, get_trace_state_variable_value)
867 (set_trace_state_variable_value): Use IP_AGENT_EXPORT_FUNC.
868 (collecting): Use IP_AGENT_EXPORT_VAR and wrap in
869 EXTERN_C_PUSH/EXTERN_C_POP.
870 (gdb_collect): Use IP_AGENT_EXPORT_FUNC.
871 (ust_loaded, cmd_buf): Use IP_AGENT_EXPORT_VAR.
872 (helper_thread_id, gdb_agent_capability): Use IP_AGENT_EXPORT_VAR
873 and wrap in EXTERN_C_PUSH/EXTERN_C_POP.
874 (gdb_tp_heap_buffer, gdb_jump_pad_buffer, gdb_jump_pad_buffer_end)
875 (gdb_trampoline_buffer, gdb_trampoline_buffer_end)
876 (gdb_trampoline_buffer_error): Use IP_AGENT_EXPORT_VAR.
877 * tracepoint.h (ATTR_USED, ATTR_NOINLINE, EXPORTED_SYMBOL):
878 Define.
879 (IP_AGENT_EXPORT_FUNC, IP_AGENT_EXPORT_VAR)
880 (IP_AGENT_EXPORT_VAR_DECL): Define.
881 (tracing): Declare.
882 (gdb_agent_get_raw_reg): Declare.
883
fe978cb0
PA
8842015-02-27 Tom Tromey <tromey@redhat.com>
885 Pedro Alves <palves@redhat.com>
886
887 Rename symbols whose names are reserved C++ keywords throughout.
888
3bc3d82a
PA
8892015-02-27 Pedro Alves <palves@redhat.com>
890
891 * Makefile.in (COMPILER): New, get it from autoconf.
892 (CXX): Get from autoconf instead.
893 (COMPILE.pre): Use COMPILER.
894 (CC-LD): Rename to ...
895 (CC_LD): ... this. Use COMPILER.
896 (gdbserver$(EXEEXT), gdbreplay$(EXEEXT), $(IPA_LIB)): Adjust.
897 (CXX_FOR_TARGET): Default to g++ instead of gcc.
898 * acinclude.m4: Include build-with-cxx.m4.
899 * configure.ac: Call AC_PROG_CXX and GDB_AC_BUILD_WITH_CXX.
900 Disable -Werror by default if building in C++ mode.
901 (build_warnings): Add -Wno-sign-compare, -Wno-write-strings and
902 -Wno-narrowing in C++ mode. Run supported-warning-flags tests with
903 the C++ compiler. Save/restore CXXFLAGS too.
904 * configure: Regenerate.
905
07697489
PA
9062015-02-27 Pedro Alves <palves@redhat.com>
907
908 * acinclude.m4: Include libiberty.m4.
909 * configure.ac: Call libiberty_INIT.
910 * config.in, configure: Regenerate.
911
9beb7c4e
PA
9122015-02-26 Pedro Alves <palves@redhat.com>
913
914 * linux-low.c (linux_wait_1): When incrementing the PC past a
915 program breakpoint always use the_low_target.breakpoint_len as
916 increment, rather than the maximum between that and
917 the_low_target.decr_pc_after_break.
918
8090aef2
PA
9192015-02-23 Pedro Alves <palves@redhat.com>
920
921 * linux-low.c (check_stopped_by_breakpoint): Don't check if the
922 thread was doing a step-over; always adjust the PC if
923 we stepped over a permanent breakpoint.
924 (linux_wait_1): If we stepped over breakpoint that was on top of a
925 permanent breakpoint, manually advance the PC past it.
926
bc9540e8
PA
9272015-02-23 Pedro Alves <palves@redhat.com>
928
929 * linux-x86-low.c (REGSIZE): Define in both 32-bit and 64-bit
930 modes.
931 (x86_fill_gregset, x86_store_gregset): Use it when handling
932 $orig_eax.
933
2db9a427
PA
9342015-02-20 Pedro Alves <palves@redhat.com>
935
936 * thread-db.c: Include "nat/linux-procfs.h".
937 (thread_db_init): Skip listing new threads if the kernel supports
938 PTRACE_EVENT_CLONE and /proc/PID/task/ is accessible.
939
afa8d396
PA
9402015-02-20 Pedro Alves <palves@redhat.com>
941
942 * linux-low.c (status_pending_p_callback): Use ptid_match.
943
c9587f88
AT
9442015-02-19 Antoine Tremblay <antoine.tremblay@ericsson.com>
945
946 PR breakpoints/16812
947 * linux-low.c (wstatus_maybe_breakpoint): Remove.
948 (linux_low_filter_event): Update wstatus_maybe_breakpoint name.
949 (linux_wait_1): Report SIGTRAP,SIGILL,SIGSEGV.
950
b05ec7a5
AT
9512015-02-10 Antoine Tremblay <antoine.tremblay@ericsson.com>
952
953 PR breakpoints/15956
954 * tracepoint.c (cmd_qtinit): Add check for current_thread.
955
d33501a5
MM
9562015-02-09 Markus Metzger <markus.t.metzger@intel.com>
957
958 * linux-low.c (linux_low_btrace_conf): Print size.
959 * server.c (handle_btrace_conf_general_set): New.
960 (hanle_general_set): Call handle_btrace_conf_general_set.
961 (handle_query): Report Qbtrace-conf:bts:size as supported.
962
f4abbc16
MM
9632015-02-09 Markus Metzger <markus.t.metzger@intel.com>
964
965 * linux-low.c (linux_low_enable_btrace): Update parameters.
966 (linux_low_btrace_conf): New.
967 (linux_target_ops)<to_btrace_conf>: Initialize.
968 * server.c (current_btrace_conf): New.
969 (handle_btrace_enable): Rename to ...
970 (handle_btrace_enable_bts): ... this. Pass &current_btrace_conf
971 to target_enable_btrace. Update comment. Update users.
972 (handle_qxfer_btrace_conf): New.
973 (qxfer_packets): Add btrace-conf entry.
974 (handle_query): Report qXfer:btrace-conf:read as supported packet.
975 * target.h (target_ops)<enable_btrace>: Update parameters and comment.
976 (target_ops)<read_btrace_conf>: New.
977 (target_enable_btrace): Update parameters.
978 (target_read_btrace_conf): New.
979
043c3577
MM
9802015-02-09 Markus Metzger <markus.t.metzger@intel.com>
981
982 * server.c (handle_btrace_general_set): Remove call to
983 target_supports_btrace.
984 (supported_btrace_packets): New.
985 (handle_query): Call supported_btrace_packets.
986 * target.h: include btrace-common.h.
987 (btrace_target_info): Removed.
988 (supports_btrace, target_supports_btrace): Update parameters.
989
734b0e4b
MM
9902015-02-09 Markus Metzger <markus.t.metzger@intel.com>
991
992 * Makefile.in (SFILES): Add common/btrace-common.c.
993 (OBS): Add common/btrace-common.o.
994 (btrace-common.o): Add build rules.
995 * linux-low: Include btrace-common.h.
996 (linux_low_read_btrace): Use struct btrace_data. Call
997 btrace_data_init and btrace_data_fini.
998
d6c146e9
PA
9992015-02-06 Pedro Alves <palves@redhat.com>
1000
1001 * thread-db.c (find_new_threads_callback): Add debug output.
1002
20ba1ce6
PA
10032015-02-04 Pedro Alves <palves@redhat.com>
1004
1005 * linux-low.c (handle_extended_wait): Don't resume LWPs here.
1006 (resume_stopped_resumed_lwps): New function.
1007 (linux_wait_for_event_filtered): Use it.
1008
8cc73a39
SDJ
10092015-01-15 Sergio Durigan Junior <sergiodj@redhat.com>
1010
1011 * Makefile.in (SFILES): Add linux-personality.c.
1012 (linux-personality.o): New rule.
1013 * configure.srv (srv_linux_obj): Add linux-personality.o to the
1014 list of objects to be built.
1015 * linux-low.c: Include nat/linux-personality.h.
1016 (linux_create_inferior): Remove code to disable address space
1017 randomization (moved to ../nat/linux-personality.c). Create
1018 cleanup to disable address space randomization.
1019
fb23d554
SDJ
10202015-01-15 Sergio Durigan Junior <sergiodj@redhat.com>
1021
1022 * Makefile.in (posix-strerror.o): New rule.
1023 (mingw-strerror.o): Likewise.
1024 * configure: Regenerated.
1025 * configure.ac: Source file ../common/common.host. Initialize new
1026 variable srv_host_obs. Add srv_host_obs to GDBSERVER_DEPFILES.
1027
cdf43629
YQ
10282015-01-14 Yao Qi <yao@codesourcery.com>
1029
1030 * Makefile.in (SFILES): Add nat/ppc-linux.c.
1031 (ppc-linux.o): New rule.
1032 * configure.srv (powerpc*-*-linux*): Add ppc-linux.o.
1033 * configure.ac: AC_CHECK_FUNCS(getauxval).
1034 * config.in: Re-generated.
1035 * configure: Re-generated.
1036 * linux-ppc-low.c (ppc_arch_setup) [__powerpc64__]: Call
1037 ppc64_64bit_inferior_p
1038
514c5338
YQ
10392015-01-14 Yao Qi <yao@codesourcery.com>
1040
1041 * linux-ppc-low.c: Include "nat/ppc-linux.h".
1042 (PPC_FEATURE_HAS_VSX): Move to nat/ppc-linux.h.
1043 (PPC_FEATURE_HAS_ALTIVEC, PPC_FEATURE_HAS_SPE): Likewise.
1044 (PT_ORIG_R3, PT_TRAP): Likewise.
1045 (PTRACE_GETVSXREGS, PTRACE_SETVSXREGS): Likewise.
1046 (PTRACE_GETVRREGS, PTRACE_SETVRREGS): Likewise.
1047 (PTRACE_GETEVRREGS, PTRACE_SETEVRREGS): Likewise.
1048
3368c1e5
JB
10492015-01-10 Joel Brobecker <brobecker@adacore.com>
1050
1051 * i387-fp.c (i387_cache_to_xsave): In look over
1052 num_avx512_zmmh_high_registers, replace use of struct i387_xsave
1053 zmmh_low_space field by use of zmmh_high_space.
1054
582511be
PA
10552015-01-09 Pedro Alves <palves@redhat.com>
1056
1057 * linux-low.c (step_over_bkpt): Move higher up in the file.
1058 (handle_extended_wait): Don't store the stop_pc here.
1059 (get_stop_pc): Adjust comments and rename to ...
1060 (check_stopped_by_breakpoint): ... this. Record whether the LWP
1061 stopped for a software breakpoint or hardware breakpoint.
1062 (thread_still_has_status_pending_p): New function.
1063 (status_pending_p_callback): Use
1064 thread_still_has_status_pending_p. If the event is no longer
1065 interesting, resume the LWP.
1066 (handle_tracepoints): Add assert.
1067 (maybe_move_out_of_jump_pad): Remove cancel_breakpoints call.
1068 (wstatus_maybe_breakpoint): New function.
1069 (cancel_breakpoint): Delete function.
1070 (check_stopped_by_watchpoint): New function, factored out from
1071 linux_low_filter_event.
1072 (lp_status_maybe_breakpoint): Delete function.
1073 (linux_low_filter_event): Remove filter_ptid argument.
1074 Leave thread group exits pending here. Store the LWP's stop PC.
1075 Always leave events pending.
1076 (linux_wait_for_event_filtered): Pull all events out of the
1077 kernel, and leave them all pending.
1078 (count_events_callback, select_event_lwp_callback): Consider all
1079 events.
1080 (cancel_breakpoints_callback, linux_cancel_breakpoints): Delete.
1081 (select_event_lwp): Only give preference to the stepping LWP in
1082 all-stop mode. Adjust comments.
1083 (ignore_event): New function.
1084 (linux_wait_1): Delete 'retry' label. Use ignore_event. Remove
1085 references to cancel_breakpoints. Adjust to renames. Also give
1086 equal priority to all LWPs that have had events in non-stop mode.
1087 If reporting a software breakpoint event, unadjust the LWP's PC.
1088 (linux_wait): If linux_wait_1 returned an ignored event, retry.
1089 (stuck_in_jump_pad_callback, move_out_of_jump_pad_callback):
1090 Adjust.
1091 (linux_resume_one_lwp): Store the LWP's PC. Adjust.
1092 (resume_status_pending_p): Use thread_still_has_status_pending_p.
1093 (linux_stopped_by_watchpoint): Adjust.
1094 (linux_target_ops): Remove reference to linux_cancel_breakpoints.
1095 * linux-low.h (enum lwp_stop_reason): New.
1096 (struct lwp_info) <stop_pc>: Adjust comment.
1097 <stopped_by_watchpoint>: Delete field.
1098 <stop_reason>: New field.
1099 * linux-x86-low.c (x86_linux_prepare_to_resume): Adjust.
1100 * mem-break.c (software_breakpoint_inserted_here)
1101 (hardware_breakpoint_inserted_here): New function.
1102 * mem-break.h (software_breakpoint_inserted_here)
1103 (hardware_breakpoint_inserted_here): Declare.
1104 * target.h (struct target_ops) <cancel_breakpoints>: Remove field.
1105 (cancel_breakpoints): Delete.
1106 * tracepoint.c (clear_installed_tracepoints, stop_tracing)
1107 (upload_fast_traceframes): Remove references to
1108 cancel_breakpoints.
1109
a33e3959
PA
11102015-01-09 Pedro Alves <palves@redhat.com>
1111
1112 * thread-db.c (find_new_threads_callback): Ignore thread if the
1113 kernel thread ID is -1.
1114
8784d563
PA
11152015-01-09 Pedro Alves <palves@redhat.com>
1116
1117 * linux-low.c (linux_attach_fail_reason_string): Move to
1118 nat/linux-ptrace.c, and rename.
1119 (linux_attach_lwp): Update comment.
1120 (attach_proc_task_lwp_callback): New function.
1121 (linux_attach): Adjust to rename and use
1122 linux_proc_attach_tgid_threads.
1123 (linux_attach_fail_reason_string): Delete declaration.
1124
76f2b779
JB
11252015-01-01 Joel Brobecker <brobecker@adacore.com>
1126
1127 * gdbreplay.c (gdbreplay_version): Update copyright year to 2015.
1128 * server.c (gdbserver_version): Likewise.
1129
fafcc06a
SDJ
11302014-12-29 Sergio Durigan Junior <sergiodj@redhat.com>
1131
1132 * remote-utils.c: Include ctype.h.
1133 (input_interrupt): Explicitly handle the case when the char
1134 received is the NUL byte. Improve the printing of non-ASCII
1135 characters.
1136
beed38b8
JB
11372014-12-16 Joel Brobecker <brobecker@adacore.com>
1138
1139 * linux-low.c (linux_low_filter_event): Update call to
1140 linux_enable_event_reporting following the addition of
1141 a new parameter to that function.
1142
bf330350
CU
11432014-12-16 Catalin Udma <catalin.udma@freescale.com>
1144
1145 PR server/17457
1146 * linux-aarch64-low.c (AARCH64_FPSR_REGNO): New define.
1147 (AARCH64_FPCR_REGNO): Likewise.
1148 (AARCH64_NUM_REGS): Update to include fpsr/fpcr registers.
1149 (aarch64_fill_fpregset): Add missing fpsr/fpcr registers.
1150 (aarch64_store_fpregset): Likewise.
1151
5227d625
JB
11522014-12-15 Joel Brobecker <brobecker@adacore.com>
1153
1154 * lynx-low.c (lynx_resume): Use PTRACE_SINGLESTEP_ONE if N == 1.
1155 Remove FIXME comment about assumption about N.
1156
f93b65a0
JB
11572014-12-13 Joel Brobecker <brobecker@adacore.com>
1158
1159 * configure.ac: If large-file support is disabled in GDBserver,
1160 pass --disable-largefile to ACX_CONFIGURE_DIR call for "gnulib".
1161 * configure: Regenerate.
1162
e5a9158d
AA
11632014-12-12 Andreas Arnez <arnez@linux.vnet.ibm.com>
1164
1165 * linux-low.c (regsets_fetch_inferior_registers): Suppress the
1166 warning upon ENODATA from ptrace.
1167 * linux-s390-low.c (s390_store_tdb): New.
1168 (s390_regsets): Add regset for NT_S390_TDB.
1169
feea5f36
AA
11702014-12-12 Andreas Arnez <arnez@linux.vnet.ibm.com>
1171
1172 * linux-low.c (regsets_store_inferior_registers): Skip regsets
1173 without a fill_function.
1174 * linux-s390-low.c (s390_fill_last_break): Remove.
1175 (s390_regsets): Set fill_function to NULL for NT_S390_LAST_BREAK.
1176 (s390_arch_setup): Use regset's size instead of fill_function for
1177 loop end condition.
1178
098dbe61
AA
11792014-12-12 Andreas Arnez <arnez@linux.vnet.ibm.com>
1180
1181 * linux-low.c (regsets_fetch_inferior_registers): Do not invoke
1182 the regset's store function when ptrace returned an error.
1183 * regcache.c (get_thread_regcache): Invalidate register cache
1184 before fetching inferior's registers.
1185
28eef672
AA
11862014-12-12 Andreas Arnez <arnez@linux.vnet.ibm.com>
1187
1188 * linux-low.c (regsets_fetch_inferior_registers): Rephrase
1189 while-loop as for-loop.
1190 (regsets_store_inferior_registers): Likewise.
1191
bdca27a2
YQ
11922014-11-28 Yao Qi <yao@codesourcery.com>
1193
1194 * configure.ac(AC_CHECK_FUNCS): Remove readlink.
1195 * config.in, configure: Re-generate.
1196 * hostio.c (handle_unlink): Remove code checking HAVE_READLINK
1197 is defined.
1198
9c232dda
YQ
11992014-11-21 Yao Qi <yao@codesourcery.com>
1200
1201 * configure.ac: Don't invoke AC_FUNC_ALLOCA.
1202 (AC_CHECK_HEADERS): Remove malloc.h.
1203 * configure: Re-generated.
1204 * config.in: Re-generated.
1205 * server.h: Don't include alloca.h and malloc.h.
1206 * gdbreplay.c: Don't check HAVE_ALLOCA_H is defined.
1207 Don't include malloc.h.
1208
43968415
JB
12092014-11-17 Joel Brobecker <brobecker@adacore.com>
1210
1211 * lynx-low.c (lynx_write_memory): Put lynx_read_memory and
1212 corresponding ERRNO check in same block.
1213
40e91bc7
PA
12142014-11-12 Pedro Alves <palves@redhat.com>
1215
1216 * server.c (cont_thread): Update comment.
1217 (start_inferior, attach_inferior): No longer clear cont_thread.
1218 (handle_v_cont): No longer set cont_thread.
1219 (captured_main): Clear cont_thread each time a GDB connects.
1220
c2c118cf
PA
12212014-11-12 Pedro Alves <palves@redhat.com>
1222
1223 * linux-low.c (linux_wait_1): Don't force a wait for the Hc
1224 thread, and don't resume all threads if the Hc thread has exited.
1225
78708b7c
PA
12262014-11-12 Pedro Alves <palves@redhat.com>
1227
1228 * linux-low.c (linux_request_interrupt): Always send a SIGINT to
1229 the process group instead of to a specific LWP.
1230
a2abc7de
PA
12312014-10-15 Pedro Alves <palves@redhat.com>
1232
1233 PR server/17487
1234 * win32-arm-low.c (arm_set_thread_context): Remove current_event
1235 parameter.
1236 (arm_set_thread_context): Delete.
1237 (the_low_target): Adjust.
1238 * win32-i386-low.c (debug_registers_changed)
1239 (debug_registers_used): Delete.
1240 (update_debug_registers_callback): New function.
1241 (x86_dr_low_set_addr, x86_dr_low_set_control): Mark all threads as
1242 needing to update their debug registers.
1243 (win32_get_current_dr): New function.
1244 (x86_dr_low_get_addr, x86_dr_low_get_control)
1245 (x86_dr_low_get_status): Fetch the debug register from the thread
1246 record's context.
1247 (i386_initial_stuff): Adjust.
1248 (i386_get_thread_context): Remove current_event parameter. Don't
1249 clear debug_registers_changed nor copy DR values to
1250 debug_reg_state.
1251 (i386_set_thread_context): Delete.
1252 (i386_prepare_to_resume): New function.
1253 (i386_thread_added): Mark the thread as needing to update irs
1254 debug registers.
1255 (the_low_target): Remove i386_set_thread_context and install
1256 i386_prepare_to_resume.
1257 * win32-low.c (win32_get_thread_context): Adjust.
1258 (win32_set_thread_context): Use SetThreadContext
1259 directly.
1260 (win32_prepare_to_resume): New function.
1261 (win32_require_context): New function, factored out from ...
1262 (thread_rec): ... this.
1263 (continue_one_thread): Call win32_prepare_to_resume on each thread
1264 we're about to continue.
1265 (win32_resume): Call win32_prepare_to_resume on the event thread.
1266 * win32-low.h (struct win32_thread_info)
1267 <debug_registers_changed>: New field.
1268 (struct win32_target_ops): Change prototype of set_thread_context,
1269 delete set_thread_context and add prepare_to_resume.
1270 (win32_require_context): New declaration.
1271
a442d071
GB
12722014-10-08 Gary Benson <gbenson@redhat.com>
1273
1274 * server.h: Do not include common-exceptions.h.
1275
6f1947e8
GB
12762014-10-08 Gary Benson <gbenson@redhat.com>
1277
1278 * server.h: Do not include cleanups.h.
1279
63b434a4
JH
12802014-09-30 James Hogan <james.hogan@imgtec.com>
1281
1282 * Makefile.in (clean): Add rm -f commands for mips-dsp-linux.c and
1283 mips64-dsp-linux.c.
1284
c4d9ceb6
YQ
12852014-09-23 Yao Qi <yao@codesourcery.com>
1286
1287 * linux-low.c (lp_status_maybe_breakpoint): New function.
1288 (linux_low_filter_event): Call lp_status_maybe_breakpoint.
1289 (count_events_callback): Likewise.
1290 (select_event_lwp_callback): Likewise.
1291 (cancel_breakpoints_callback): Likewise.
1292
89a5711c
DB
12932014-09-19 Don Breazeal <donb@codesourcery.com>
1294
1295 * linux-low.c (handle_extended_wait): Call
1296 linux_ptrace_get_extended_event.
1297 (get_stop_pc, get_detach_signal, linux_low_filter_event): Call
1298 linux_is_extended_waitstatus.
1299
bffc0964
JB
13002014-09-16 Joel Brobecker <brobecker@adacore.com>
1301
1302 * Makefile.in (CPPFLAGS): Define.
1303 (INTERNAL_CFLAGS_BASE): Add ${CPPFLAGS}.
1304 (IPAGENT_CFLAGS): Remove ${CPPFLAGS}.
1305
0bfdf32f
GB
13062014-09-16 Gary Benson <gbenson@redhat.com>
1307
1308 * inferiors.h (current_inferior): Renamed as...
1309 (current_thread): New variable. All uses updated.
1310 * linux-low.c (get_pc): Renamed saved_inferior as saved_thread.
1311 (maybe_move_out_of_jump_pad): Likewise.
1312 (cancel_breakpoint): Likewise.
1313 (linux_low_filter_event): Likewise.
1314 (wait_for_sigstop): Likewise.
1315 (linux_resume_one_lwp): Likewise.
1316 (need_step_over_p): Likewise.
1317 (start_step_over): Likewise.
1318 (linux_stabilize_threads): Renamed save_inferior as saved_thread.
1319 * linux-x86-low.c (x86_linux_update_xmltarget): Likewise.
1320 * proc-service.c (ps_lgetregs): Renamed reg_inferior as reg_thread
1321 and save_inferior as saved_thread.
1322 * regcache.c (get_thread_regcache): Renamed saved_inferior as
1323 saved_thread.
1324 (regcache_invalidate_thread): Likewise.
1325 * remote-utils.c (prepare_resume_reply): Likewise.
1326 * thread-db.c (thread_db_get_tls_address): Likewise.
1327 (disable_thread_event_reporting): Likewise.
1328 (remove_thread_event_breakpoints): Likewise.
1329 * tracepoint.c (gdb_agent_about_to_close): Renamed save_inferior
1330 as saved_thread.
1331 * target.h (set_desired_inferior): Renamed as...
1332 (set_desired_thread): New declaration. All uses updated.
1333 * server.c (myresume): Updated comment to reference thread instead
1334 of inferior.
1335 (handle_serial_event): Likewise.
1336 (handle_target_event): Likewise.
1337
361c8ade
GB
13382014-09-12 Tom Tromey <tromey@redhat.com>
1339 Gary Benson <gbenson@redhat.com>
1340
1341 * regcache.h: Include common-regcache.h.
1342 (regcache_read_pc): Don't declare.
1343 * regcache.c (get_thread_regcache_for_ptid): New function.
1344
bd9269f7
GB
13452014-09-11 Tom Tromey <tromey@redhat.com>
1346 Gary Benson <gbenson@redhat.com>
1347
1348 * symbol.c: New file.
1349 * Makefile.in (SFILES): Add symbol.c.
1350 (OBS): Add symbol.o.
1351
f8c1d06b
GB
13522014-09-11 Gary Benson <gbenson@redhat.com>
1353
1354 * target.c (target_stop_ptid, target_continue_ptid): New
1355 functions.
1356
721ec300
GB
13572014-09-11 Tom Tromey <tromey@redhat.com>
1358 Gary Benson <gbenson@redhat.com>
1359
1360 * target.h: Include target/target.h.
1361 * target.c (target_read_memory, target_read_uint32)
1362 (target_write_memory): New functions.
1363
c5e92cca
GB
13642014-09-11 Gary Benson <gbenson@redhat.com>
1365
1366 * server.h (debug_hw_points): Don't declare.
1367 * server.c (debug_hw_points): Don't define. Replace all uses
1368 with show_debug_regs.
1369 * linux-aarch64-low.c (debug_hw_points): Don't define. Replace
1370 all uses with show_debug_regs.
1371
2e4bb98a
EBM
13722014-09-08 Edjunior Barbosa Machado <emachado@linux.vnet.ibm.com>
1373
1374 * linux-ppc-low.c (ppc_collect_ptrace_register): Adjust routine to take
1375 endianness into account.
1376 (ppc_supply_ptrace_register): Likewise.
1377
ac740bc7
JH
13782014-09-03 James Hogan <james.hogan@imgtec.com>
1379
1380 * linux-mips-low.c (mips_read_description): Reset errno to 0 prior
1381 to reading DSP_CONTROL with PTRACE_PEEKUSER ptrace call.
1382
97ea6506
GB
13832014-09-03 Gary Benson <gbenson@redhat.com>
1384
1385 * linux-x86-low.c (x86_linux_prepare_to_resume): Use
1386 ALL_DEBUG_ADDRESS_REGISTERS.
1387
df7e5265
GB
13882014-09-02 Gary Benson <gbenson@redhat.com>
1389
1390 * i386-low.h: Renamed as...
1391 * x86-low.h: New file. All type, function and variable name
1392 prefixes changed from "i386_" to "x86_". All references updated.
1393 * i386-low.c: Renamed as...
1394 * x86-low.c: New file. All type, function and variable name
1395 prefixes changed from "i386_" to "x86_". All references updated.
1396
ed859da7
GB
13972014-09-02 Gary Benson <gbenson@redhat.com>
1398
1399 * linux-x86-low.c (x86_linux_new_process): Use XCNEW.
1400 (x86_linux_new_thread): Likewise.
1401
860789c7
GB
14022014-08-29 Gary Benson <gbenson@redhat.com>
1403
1404 * server.h (setjmp.h): Do not include.
1405 (toplevel): Do not declare.
1406 (common-exceptions.h): Include.
1407 (cleanups.h): Likewise.
1408 * server.c (toplevel): Do not define.
1409 (exit_code): New static global.
1410 (detach_or_kill_for_exit_cleanup): New function.
1411 (main): New function. Original main renamed to...
1412 (captured_main): New function.
1413 * utils.c (verror) [!IN_PROCESS_AGENT]: Use throw_verror.
1414
ff55e1b5
GB
14152014-08-29 Gary Benson <gbenson@redhat.com>
1416
1417 * Makefile.in (SFILES): Add common/common-exceptions.c.
1418 (OBS): Add common-exceptions.o.
1419 (common-exceptions.o): New rule.
1420 * utils.c (prepare_to_throw_exception): New function.
1421
e9bcb658
GB
14222014-08-29 Gary Benson <gbenson@redhat.com>
1423
1424 * config.in: Regenerate.
1425 * configure: Likewise.
1426
e3180625
GB
14272014-08-29 Gary Benson <gbenson@redhat.com>
1428
1429 * Makefile.in (SFILES): Add common/cleanups.c.
1430 (OBS): cleanups.o.
1431 (cleanups.o): New rule.
1432
e3d6ba5d
GB
14332014-08-29 Gary Benson <gbenson@redhat.com>
1434
1435 * utils.c (internal_vwarning): New function.
1436
7096e886
GB
14372014-08-28 Gary Benson <gbenson@redhat.com>
1438
1439 * utils.h (fatal): Remove declaration.
1440 * utils.c (fatal): Remove function.
1441
14ce3192
GB
14422014-08-28 Gary Benson <gbenson@redhat.com>
1443
1444 * tracepoint.c (gdb_agent_init): Replace fatal with
1445 perror_with_name.
1446 (initialize_tracepoint): Likewise.
1447
50278d59
GB
14482014-08-28 Gary Benson <gbenson@redhat.com>
1449
1450 * remote-utils.c (remote_prepare): Replace fatal with error.
1451
aa96c426
GB
14522014-08-28 Gary Benson <gbenson@redhat.com>
1453
1454 * linux-low.c (linux_async): Replace fatal with warning.
1455 Tidy up and return.
1456 (linux_start_non_stop): Return -1 if linux_async failed.
1457
f7160e97
GB
14582014-08-28 Gary Benson <gbenson@redhat.com>
1459
1460 * linux-x86-low.c (i386_dr_low_set_addr): Replace check with
1461 gdb_assert.
1462 (i386_dr_low_get_addr): Remove vague comment.
1463 * win32-i386-low.c (i386_dr_low_set_addr): Replace check with
1464 gdb_assert.
1465
38e08fca
GB
14662014-08-28 Gary Benson <gbenson@redhat.com>
1467
1468 * inferiors.c (get_thread_process): Replace check with gdb_assert.
1469 * linux-low.c (linux_wait_for_event_filtered): Replace fatal with
1470 internal_error.
1471 (linux_resume_one_lwp): Likewise.
1472 * linux-x86-low.c (x86_siginfo_fixup): Replace checks with
1473 gdb_assert.
1474 * mem-break.c (raw_bkpt_type_to_target_hw_bp_type): Replace fatal
1475 with internal_error.
1476 * regcache.c (get_thread_regcache): Replace check with gdb_assert.
1477 (init_register_cache): Replace fatal with gdb_assert_not_reached.
1478 (find_register_by_name): Replace fatal with internal_error.
1479 (find_regno): Likewise.
1480 * tdesc.c (init_target_desc): Replace check with gdb_assert.
1481 * thread-db.c (thread_db_create_event): Likewise.
1482 (thread_db_load_search): Likewise.
1483 (try_thread_db_load_1): Likewise.
1484 * tracepoint.c (get_jump_space_head): Replace fatal with
1485 internal_error.
1486 (claim_trampoline_space): Likewise.
1487 (have_fast_tracepoint_trampoline_buffer): Likewise.
1488 (cmd_qtstart): Likewise.
1489 (stop_tracing): Likewise.
1490 (fast_tracepoint_collecting): Likewise.
1491 (target_malloc): Likewise.
1492 (download_tracepoint): Likewise.
1493 (download_trace_state_variables): Replace check with gdb_assert.
1494 (upload_fast_traceframes): Replace fatal with internal_error.
1495
34abf635
GB
14962014-08-19 Tom Tromey <tromey@redhat.com>
1497 Gary Benson <gbenson@redhat.com>
1498
1499 * Makefile.in (SFILES): Add common/common-debug.c.
1500 (OBS): Add common-debug.o.
1501 (common-debug.o): New rule.
1502 * debug.h (debug_printf): Don't declare.
1503 * debug.c (debug_printf): Renamed and rewritten as...
1504 (debug_vprintf): New function.
1505
f6e94d78
GB
15062014-08-19 Gary Benson <gbenson@redhat.com>
1507
1508 * utils.h: Do not include print-utils.h.
1509
9239eeab
GB
15102014-08-19 Tom Tromey <tromey@redhat.com>
1511 Gary Benson <gbenson@redhat.com>
1512
1513 * server.h: Add static assertion.
1514 (gdb_byte, CORE_ADDR, LONGEST, ULONGEST): Remove.
1515
ef87c8bb
GB
15162014-08-19 Tom Tromey <tromey@redhat.com>
1517 Gary Benson <gbenson@redhat.com>
1518
1519 * Makefile.in (SFILES): Add common/errors.c.
1520 (OBS): Add errors.o.
1521 (IPA_OBS): Add errors-ipa.o.
1522 (errors.o): New rule.
1523 (errors-ipa.o): Likewise.
1524 * utils.h (perror_with_name, error, warning): Don't declare.
1525 * utils.c (warning): Renamed and rewritten as...
1526 (vwarning): New function.
1527 (error): Renamed and rewritten as...
1528 (verror): New function.
1529 (internal_error): Renamed and rewritten as...
1530 (internal_verror): New function.
1531
bb974a24
GB
15322014-08-07 Gary Benson <gbenson@redhat.com>
1533
1534 * configure.ac (AC_CHECK_HEADERS): Remove errno.h.
1535 * configure: Regenerate.
1536 * config.in: Likewise.
1537 * server.h: Do not include errno.h.
1538 * event-loop.c: Likewise.
1539 * hostio-errno.c: Likewise.
1540 * linux-low.c: Likewise.
1541 * remote-utils.c: Likewise.
1542 * spu-low.c: Likewise.
1543 * utils.c: Likewise.
1544 * gdbreplay.c: Unconditionally include errno.h.
1545
6d3d12eb
GB
15462014-08-07 Gary Benson <gbenson@redhat.com>
1547
1548 * server.h: Do not include string.h.
1549 * event-loop.c: Likewise.
1550 * linux-low.c: Likewise.
1551 * regcache.c: Likewise.
1552 * remote-utils.c: Likewise.
1553 * spu-low.c: Likewise.
1554 * utils.c: Likewise.
1555
dccbb609
GB
15562014-08-07 Gary Benson <gbenson@redhat.com>
1557
1558 * server.h: Do not include gdb_assert.h.
1559
e76df0d0
GB
15602014-08-07 Gary Benson <gbenson@redhat.com>
1561
1562 * server.h: Do not include common-utils.h.
1563
4cb9c816
GB
15642014-08-07 Gary Benson <gbenson@redhat.com>
1565
1566 * server.h: Do not include ptid.h.
1567 * notif.h: Likewise.
1568
3995eeee
GB
15692014-08-07 Gary Benson <gbenson@redhat.com>
1570
1571 * server.h: Do not include gdb_locale.h.
1572
cb9f1a9b
GB
15732014-08-07 Gary Benson <gbenson@redhat.com>
1574
1575 * server.h: Do not include gdb/signals.h.
1576 * win32-low.c: Likewise.
1577
a5fceff8
GB
15782014-08-07 Gary Benson <gbenson@redhat.com>
1579
1580 * server.h: Do not include pathmax.h.
1581
b9391142
GB
15822014-08-07 Gary Benson <gbenson@redhat.com>
1583
1584 * server.h: Do not include libiberty.h.
1585 * linux-bfin-low.c: Likewise.
1586
0e443c87
GB
15872014-08-07 Gary Benson <gbenson@redhat.com>
1588
1589 * server.h: Do not include ansidecl.h.
1590
8ebb3f56
GB
15912014-08-07 Gary Benson <gbenson@redhat.com>
1592
1593 * linux-x86-low.c: Do not include stddef.h.
1594 * lynx-ppc-low.c: Likewise.
1595 * tracepoint.c: Likewise.
1596
8980bdf6
GB
15972014-08-07 Gary Benson <gbenson@redhat.com>
1598
1599 * server.h: Do not include stdarg.h.
1600 * nto-low.c: Likewise.
1601
d7096f71
GB
16022014-08-07 Gary Benson <gbenson@redhat.com>
1603
1604 * server.h: Do not include stdlib.h.
1605 * inferiors.c: Likewise.
1606 * linux-low.c: Likewise.
1607 * regcache.c: Likewise.
1608 * spu-low.c: Likewise.
1609 * tracepoint.c: Likewise.
1610 * utils.c: Likewise.
1611
d02f550d
GB
16122014-08-07 Gary Benson <gbenson@redhat.com>
1613
1614 * server.h: Do not include stdio.h.
1615 * linux-low.c: Likewise.
1616 * remote-utils.c: Likewise.
1617 * spu-low.c: Likewise.
1618 * utils.c: Likewise.
1619 * wincecompat.c: Likewise.
1620
87f6c4e3
GB
16212014-08-06 Gary Benson <gbenson@redhat.com>
1622
1623 * regcache.c (init_register_cache): Move conditionals inside if.
1624
7089dca4
GB
16252014-08-06 Gary Benson <gbenson@redhat.com>
1626
1627 * linux-low.c (linux_supports_non_stop): Use target_is_async_p.
1628
462f517e
GB
16292014-07-31 Gary Benson <gbenson@redhat.com>
1630
1631 * ax.h: Do not include server.h.
1632 * gdbthread.h: Likewise.
1633 * lynx-low.h: Likewise.
1634 * notif.h: Likewise.
1635
976411d6
GB
16362014-07-30 Gary Benson <gbenson@redhat.com>
1637
1638 * server.h: Include common-defs.h.
1639 Do not include config.h or build-gnulib-gdbserver/config.h.
1640
d41f6d8e
GB
16412014-07-30 Gary Benson <gbenson@redhat.com>
1642
1643 * hostio-errno.c: Move server.h to top of includes list.
1644 * inferiors.c: Likewise.
1645 * linux-x86-low.c: Likewise.
1646 * notif.c: Include server.h.
1647
314c6a35
TT
16482014-07-24 Tom Tromey <tromey@redhat.com>
1649 Gary Benson <gbenson@redhat.com>
1650
1651 * server.h (CORE_ADDR): Now unsigned.
1652
69ff6be5
PA
16532014-07-16 Pedro Alves <palves@redhat.com>
1654
1655 * linux-low.c (linux_kill_one_lwp): Use kill_lwp, not kill.
1656
ce9e3fe7
PA
16572014-07-15 Pedro Alves <palves@redhat.com>
1658
1659 * linux-low.c (linux_kill_one_lwp): Save errno and work with saved
1660 copy.
1661
e76126e8
PA
16622014-07-11 Pedro Alves <palves@redhat.com>
1663
1664 * linux-low.c (kill_wait_lwp): New function, based on
1665 kill_one_lwp_callback, but use my_waitpid directly.
1666 (kill_one_lwp_callback, linux_kill): Use it.
1667
8e9db26e
PA
16682014-06-23 Pedro Alves <palves@redhat.com>
1669
1670 * linux-x86-low.c (x86_linux_prepare_to_resume): Clear DR_CONTROL
1671 before setting DR0..DR3.
1672
698b3e08
GB
16732014-06-20 Gary Benson <gbenson@redhat.com>
1674
1675 * configure.ac (AC_REPLACE_FUNCS) <vasprintf, vsnprintf>: Removed.
1676 * configure: Regenerated.
1677 * config.in: Likewise.
1678
125f8a3d
GB
16792014-06-20 Gary Benson <gbenson@redhat.com>
1680
1681 * Makefile.in (SFILES): Update locations for files moved
1682 from common to nat.
1683 (object file files): Reordered.
1684
42995dbd
GB
16852014-06-20 Gary Benson <gbenson@redhat.com>
1686
1687 * i386-low.h (i386_dr_low_can_set_addr): Removed.
1688 (i386_dr_low_set_addr): Likewise.
1689 (i386_dr_low_get_addr): Likewise.
1690 (i386_dr_low_can_set_control): Likewise.
1691 (i386_dr_low_set_control): Likewise.
1692 (i386_dr_low_get_control): Likewise.
1693 (i386_dr_low_get_status): Likewise.
1694 (i386_get_debug_register_length): Likewise.
1695 * linux-x86-low.c (i386_dr_low_set_addr):
1696 Changed signature. Made static.
1697 (i386_dr_low_get_addr): Likewise.
1698 (i386_dr_low_set_control): Likewise.
1699 (i386_dr_low_get_control): Likewise.
1700 (i386_dr_low_get_status): Likewise.
1701 (i386_dr_low): New global variable.
1702 * win32-i386-low.c (i386_dr_low_set_addr):
1703 Changed signature. Made static.
1704 (i386_dr_low_get_addr): Likewise.
1705 (i386_dr_low_set_control): Likewise.
1706 (i386_dr_low_get_control): Likewise.
1707 (i386_dr_low_get_status): Likewise.
1708 (i386_dr_low): New global variable.
1709
e1d2394b
MS
17102014-06-20 Marcus Shawcroft <marcus.shawcroft@arm.com>
1711
1712 * configure.ac: Invoke. AC_CHECK_TOOL(AR, ar).
1713 * Makefile.in (AR, AR_FLAGS): Define.
1714 * configure: Regenerate.
1715
3a8ee006
GB
17162014-06-19 Gary Benson <gbenson@redhat.com>
1717
1718 * Makefile.in (i386-dregs.o): New rule.
1719 * configure.srv: Add i386-dregs.o to all targets using i386-low.o.
1720 * i386-low.c (target.h): Remove include.
1721 (TARGET_HAS_DR_LEN_8): Now in i386-dregs.c.
1722 (DR_CONTROL_SHIFT): Likewise.
1723 (DR_CONTROL_SIZE): Likewise.
1724 (DR_RW_EXECUTE): Likewise.
1725 (DR_RW_WRITE): Likewise.
1726 (DR_RW_READ): Likewise.
1727 (DR_RW_IORW): Likewise.
1728 (DR_LEN_1): Likewise.
1729 (DR_LEN_2): Likewise.
1730 (DR_LEN_4): Likewise.
1731 (DR_LEN_8): Likewise.
1732 (DR_LOCAL_ENABLE_SHIFT): Likewise.
1733 (DR_GLOBAL_ENABLE_SHIFT): Likewise.
1734 (DR_ENABLE_SIZE): Likewise.
1735 (DR_LOCAL_SLOWDOWN): Likewise.
1736 (DR_GLOBAL_SLOWDOWN): Likewise.
1737 (DR_CONTROL_RESERVED): Likewise.
1738 (I386_DR_CONTROL_MASK): Likewise.
1739 (I386_DR_VACANT): Likewise.
1740 (I386_DR_LOCAL_ENABLE): Likewise.
1741 (I386_DR_GLOBAL_ENABLE): Likewise.
1742 (I386_DR_DISABLE): Likewise.
1743 (I386_DR_SET_RW_LEN): Likewise.
1744 (I386_DR_GET_RW_LEN): Likewise.
1745 (I386_DR_WATCH_HIT): Likewise.
1746 (i386_wp_op_t): Likewise.
1747 (i386_show_dr): Likewise.
1748 (i386_length_and_rw_bits): Likewise.
1749 (i386_insert_aligned_watchpoint): Likewise.
1750 (i386_remove_aligned_watchpoint): Likewise.
1751 (i386_handle_nonaligned_watchpoint): Likewise.
1752 i386_update_inferior_debug_regs(): Likewise.
1753 (i386_dr_insert_watchpoint): Likewise.
1754 (i386_dr_remove_watchpoint): Likewise.
1755 (i386_dr_region_ok_for_watchpoint): Likewise.
1756 (i386_dr_stopped_data_address): Likewise.
1757 (i386_dr_stopped_by_watchpoint): Likewise.
1758
8f26655c
GB
17592014-06-19 Gary Benson <gbenson@redhat.com>
1760
1761 * i386-low.c (i386_dr_show): Renamed to
1762 i386_show_dr and made static. All uses updated.
1763 (i386_dr_length_and_rw_bits): Renamed to
1764 i386_length_and_rw_bits and made static.
1765 All uses updated.
1766 (i386_dr_insert_aligned_watchpoint): Renamed to
1767 i386_insert_aligned_watchpoint and made static.
1768 All uses updated.
1769 (i386_dr_remove_aligned_watchpoint): Renamed to
1770 i386_remove_aligned_watchpoint and made static.
1771 All uses updated.
1772 (i386_dr_update_inferior_debug_regs): Renamed to
1773 i386_update_inferior_debug_regs and made static.
1774 All uses updated.
1775
b9228891
GB
17762014-06-18 Gary Benson <gbenson@redhat.com>
1777
5171def3
GB
1778 * i386-low.h (i386_dr_low_can_set_addr): New macro.
1779 (i386_dr_low_can_set_control): Likewise.
1780 (i386_get_debug_register_length): Likewise.
1781 * i386-low.c (i386_dr_low_can_set_addr): Now in i386-low.h.
1782 (i386_dr_low_can_set_control): Likewise.
1783 (i386_get_debug_register_length): Likewise.
1784
17852014-06-17 Gary Benson <gbenson@redhat.com>
1786
b9228891
GB
1787 * i386-low.h (i386-dregs.h): New include.
1788 (DR_FIRSTADDR): Now in i386-dregs.h.
1789 (DR_LASTADDR): Likewise.
1790 (DR_NADDR): Likewise.
1791 (DR_STATUS): Likewise.
1792 (DR_CONTROL): Likewise.
1793 (i386_debug_reg_state): Likewise.
1794 (i386_dr_insert_watchpoint): Likewise.
1795 (i386_dr_remove_watchpoint): Likewise.
1796 (i386_dr_region_ok_for_watchpoint): Likewise.
1797 (i386_dr_stopped_data_address): Likewise.
1798 (i386_dr_stopped_by_watchpoint): Likewise.
1799 * i386-low.c (ALL_DEBUG_REGISTERS): Likewise.
1800
4be83cc2
GB
18012014-06-18 Gary Benson <gbenson@redhat.com>
1802
1803 * i386-low.h (i386_low_insert_watchpoint): Renamed to
1804 i386_dr_insert_watchpoint.
1805 (i386_low_remove_watchpoint): Renamed to
1806 i386_dr_remove_watchpoint.
1807 (i386_low_region_ok_for_watchpoint): Renamed to
1808 i386_dr_region_ok_for_watchpoint.
1809 (i386_low_stopped_data_address): Renamed to
1810 i386_dr_stopped_data_address.
1811 (i386_low_stopped_by_watchpoint): Renamed to
1812 i386_dr_stopped_by_watchpoint.
1813 * i386-low.c (i386_show_dr): Renamed to
1814 i386_dr_show and made nonstatic. All uses updated.
1815 (i386_length_and_rw_bits): Renamed to
1816 i386_dr_length_and_rw_bits and made nonstatic.
1817 All uses updated.
1818 (i386_insert_aligned_watchpoint): Renamed to
1819 i386_dr_insert_aligned_watchpoint and made nonstatic.
1820 All uses updated.
1821 (i386_remove_aligned_watchpoint): Renamed to
1822 i386_dr_remove_aligned_watchpoint and made nonstatic.
1823 All uses updated.
1824 (i386_update_inferior_debug_regs): Renamed to
1825 i386_dr_update_inferior_debug_regs and made nonstatic.
1826 All uses updated.
1827 (i386_low_insert_watchpoint): Renamed to
1828 i386_dr_insert_watchpoint. All uses updated.
1829 (i386_low_remove_watchpoint): Renamed to
1830 i386_dr_remove_watchpoint. All uses updated.
1831 (i386_low_region_ok_for_watchpoint): Renamed to
1832 i386_dr_region_ok_for_watchpoint. All uses updated.
1833 (i386_low_stopped_data_address): Renamed to
1834 i386_dr_stopped_data_address. All uses updated.
1835 (i386_low_stopped_by_watchpoint): Renamed to
1836 i386_dr_stopped_by_watchpoint. All uses updated.
1837
131aa0d4
GB
18382014-06-18 Gary Benson <gbenson@redhat.com>
1839
1840 * i386-low.c (i386_dr_low_can_set_addr): New macro.
1841 (i386_dr_low_can_set_control): Likewise.
1842 (i386_insert_aligned_watchpoint): New check.
1843
d9305f7f
GB
18442014-06-18 Gary Benson <gbenson@redhat.com>
1845
1846 * i386-low.c (i386_update_inferior_debug_regs) <inf_state>:
1847 Renamed to state.
1848
e927c9fc
GB
18492014-06-18 Gary Benson <gbenson@redhat.com>
1850
1851 * i386-low.c (i386_length_and_rw_bits): Use internal_error
1852 instead of fatal and error.
1853 (i386_handle_nonaligned_watchpoint): Likewise.
1854
1b6d4134
GB
18552014-06-18 Gary Benson <gbenson@redhat.com>
1856
1857 * i386-low.c (i386_get_debug_register_length): New macro.
1858 (TARGET_HAS_DR_LEN_8): Remove conditional. Use above macro.
1859 (i386_show_dr): Use debug_printf instead of fprintf. Use
1860 phex to format values.
1861
6e62758f
GB
18622014-06-18 Gary Benson <gbenson@redhat.com>
1863
1864 * i386-low.h: Comment changes.
1865 * i386-low.c: Likewise.
1866
fc6e2f03
GB
18672014-06-18 Gary Benson <gbenson@redhat.com>
1868
1869 * i386-low.c: Whitespace changes.
1870
f9d1eeed
TT
18712014-06-12 Tom Tromey <tromey@redhat.com>
1872
1873 * utils.c (freeargv): Remove.
1874
0b04e523
TT
18752014-06-12 Tom Tromey <tromey@redhat.com>
1876
1877 * debug.c (debug_printf): Remove HAVE_GETTIMEOFDAY checks.
1878 * server.c (monitor_show_help): Remove HAVE_GETTIMEOFDAY check.
1879 (parse_debug_format_options): Likewise.
1880 (gdbserver_usage): Likewise.
1881 * Makefile.in (LIBIBERTY_BUILDDIR, LIBIBERTY): New variables.
1882 (SUBDIRS, REQUIRED_SUBDIRS): Add libiberty.
1883 (gdbserver$(EXEEXT), gdbreplay$(EXEEXT)): Depend on and link
1884 against libiberty.
1885 ($(LIBGNU)): Depend on libiberty.
1886 (all-lib): Recurse into all subdirs.
1887 (install-only): Invoke "install" target in subdirs.
1888 (vasprintf.o, vsnprintf.o, safe-ctype.o, lbasename.o): Remove
1889 targets.
1890 * configure: Rebuild.
1891 * configure.ac: Add ACX_CONFIGURE_DIR for libiberty. Don't check
1892 for vasprintf, vsnprintf, or gettimeofday.
1893 * configure.srv: Don't add safe-ctype.o or lbasename.o to
1894 srv_tgtobj.
1895
270c9937
JB
18962014-06-05 Joel Brobecker <brobecker@adacore.com>
1897
1898 * development.sh: Delete.
1899 * Makefile.in (config.status): Adjust dependency on development.sh.
1900 * configure.ac: Adjust development.sh source call.
1901 * configure: Regenerate.
1902
0a261ed8
PA
19032014-06-02 Pedro Alves <palves@redhat.com>
1904
1905 * ax.c (gdb_free_agent_expr): New function.
1906 * ax.h (gdb_free_agent_expr): New declaration.
1907 * mem-break.c (delete_gdb_breakpoint_1): Also clear the commands
1908 list.
1909 (clear_breakpoint_conditions, clear_breakpoint_commands): Make
1910 static.
1911 (clear_breakpoint_conditions_and_commands): New function.
1912 * mem-break.h (clear_breakpoint_conditions): Delete declaration.
1913 (clear_breakpoint_conditions_and_commands): New declaration.
1914
e9dae05e
RR
19152014-05-23 Ramana Radhakrishnan <ramana.radhakrishnan@arm.com>
1916
1917 * linux-aarch64-low.c (asm/ptrace.h): Include.
1918
5876f503
JK
19192014-05-21 Jan Kratochvil <jan.kratochvil@redhat.com>
1920
1921 Fix TLS access for -static -pthread.
1922 * gdbserver/thread-db.c (struct thread_db): Add td_thr_tlsbase_p.
1923 (thread_db_get_tls_address): Call it if LOAD_MODULE is zero.
1924 (thread_db_load_search, try_thread_db_load_1): Initialize it.
1925
802e8e6d
PA
19262014-05-20 Pedro Alves <palves@redhat.com>
1927
1928 * linux-aarch64-low.c (aarch64_insert_point)
1929 (aarch64_remove_point): No longer check whether the type is
1930 supported here. Adjust to new interface.
1931 (the_low_target): Install aarch64_supports_z_point_type as
1932 supports_z_point_type method.
1933 * linux-arm-low.c (raw_bkpt_type_to_arm_hwbp_type): New function.
1934 (arm_linux_hw_point_initialize): Take an enum raw_bkpt_type
1935 instead of a Z packet char. Adjust.
1936 (arm_supports_z_point_type): New function.
1937 (arm_insert_point, arm_remove_point): Adjust to new interface.
1938 (the_low_target): Install arm_supports_z_point_type.
1939 * linux-crisv32-low.c (cris_supports_z_point_type): New function.
1940 (cris_insert_point, cris_remove_point): Adjust to new interface.
1941 Don't check whether the type is supported here.
1942 (the_low_target): Install cris_supports_z_point_type.
1943 * linux-low.c (linux_supports_z_point_type): New function.
1944 (linux_insert_point, linux_remove_point): Adjust to new interface.
1945 * linux-low.h (struct linux_target_ops) <insert_point,
1946 remove_point>: Take an enum raw_bkpt_type instead of a char. Add
1947 raw_breakpoint pointer parameter.
1948 <supports_z_point_type>: New method.
1949 * linux-mips-low.c (mips_supports_z_point_type): New function.
1950 (mips_insert_point, mips_remove_point): Adjust to new interface.
1951 Use mips_supports_z_point_type.
1952 (the_low_target): Install mips_supports_z_point_type.
1953 * linux-ppc-low.c (the_low_target): Install NULL as
1954 supports_z_point_type method.
1955 * linux-s390-low.c (the_low_target): Install NULL as
1956 supports_z_point_type method.
1957 * linux-sparc-low.c (the_low_target): Install NULL as
1958 supports_z_point_type method.
1959 * linux-x86-low.c (x86_supports_z_point_type): New function.
1960 (x86_insert_point): Adjust to new insert_point interface. Use
1961 insert_memory_breakpoint. Adjust to new
1962 i386_low_insert_watchpoint interface.
1963 (x86_remove_point): Adjust to remove_point interface. Use
1964 remove_memory_breakpoint. Adjust to new
1965 i386_low_remove_watchpoint interface.
1966 (the_low_target): Install x86_supports_z_point_type.
1967 * lynx-low.c (lynx_target_ops): Install NULL as
1968 supports_z_point_type callback.
1969 * nto-low.c (nto_supports_z_point_type): New.
1970 (nto_insert_point, nto_remove_point): Adjust to new interface.
1971 (nto_target_ops): Install nto_supports_z_point_type.
1972 * mem-break.c: Adjust intro comment.
1973 (struct raw_breakpoint) <raw_type, size>: New fields.
1974 <inserted>: Update comment.
1975 <shlib_disabled>: Delete field.
1976 (enum bkpt_type) <gdb_breakpoint>: Delete value.
1977 <gdb_breakpoint_Z0, gdb_breakpoint_Z1, gdb_breakpoint_Z2,
1978 gdb_breakpoint_Z3, gdb_breakpoint_Z4>: New values.
1979 (raw_bkpt_type_to_target_hw_bp_type): New function.
1980 (find_enabled_raw_code_breakpoint_at): New function.
1981 (find_raw_breakpoint_at): New type and size parameters. Use them.
1982 (insert_memory_breakpoint): New function, based off
1983 set_raw_breakpoint_at.
1984 (remove_memory_breakpoint): New function.
1985 (set_raw_breakpoint_at): Reimplement.
1986 (set_breakpoint): New, based on set_breakpoint_at.
1987 (set_breakpoint_at): Reimplement.
1988 (delete_raw_breakpoint): Go through the_target->remove_point
1989 instead of assuming memory breakpoints.
1990 (find_gdb_breakpoint_at): Delete.
1991 (Z_packet_to_bkpt_type, Z_packet_to_raw_bkpt_type): New functions.
1992 (find_gdb_breakpoint): New function.
1993 (set_gdb_breakpoint_at): Delete.
1994 (z_type_supported): New function.
1995 (set_gdb_breakpoint_1): New function, loosely based off
1996 set_gdb_breakpoint_at.
1997 (check_gdb_bp_preconditions, set_gdb_breakpoint): New functions.
1998 (delete_gdb_breakpoint_at): Delete.
1999 (delete_gdb_breakpoint_1): New function, loosely based off
2000 delete_gdb_breakpoint_at.
2001 (delete_gdb_breakpoint): New function.
2002 (clear_gdb_breakpoint_conditions): Rename to ...
2003 (clear_breakpoint_conditions): ... this. Don't handle a NULL
2004 breakpoint.
2005 (add_condition_to_breakpoint): Make static.
2006 (add_breakpoint_condition): Take a struct breakpoint pointer
2007 instead of an address. Adjust.
2008 (gdb_condition_true_at_breakpoint): Rename to ...
2009 (gdb_condition_true_at_breakpoint_z_type): ... this, and add
2010 z_type parameter.
2011 (gdb_condition_true_at_breakpoint): Reimplement.
2012 (add_breakpoint_commands): Take a struct breakpoint pointer
2013 instead of an address. Adjust.
2014 (gdb_no_commands_at_breakpoint): Rename to ...
2015 (gdb_no_commands_at_breakpoint_z_type): ... this. Add z_type
2016 parameter. Return true if no breakpoint was found. Change debug
2017 output.
2018 (gdb_no_commands_at_breakpoint): Reimplement.
2019 (run_breakpoint_commands): Rename to ...
2020 (run_breakpoint_commands_z_type): ... this. Add z_type parameter,
2021 and change return type to boolean.
2022 (run_breakpoint_commands): New function.
2023 (gdb_breakpoint_here): Also check for Z1 breakpoints.
2024 (uninsert_raw_breakpoint): Don't try to reinsert a disabled
2025 breakpoint. Go through the_target->remove_point instead of
2026 assuming memory breakpoint.
2027 (uninsert_breakpoints_at, uninsert_all_breakpoints): Uninsert
2028 software and hardware breakpoints.
2029 (reinsert_raw_breakpoint): Go through the_target->insert_point
2030 instead of assuming memory breakpoint.
2031 (reinsert_breakpoints_at, reinsert_all_breakpoints): Reinsert
2032 software and hardware breakpoints.
2033 (check_breakpoints, breakpoint_here, breakpoint_inserted_here):
2034 Check both software and hardware breakpoints.
2035 (validate_inserted_breakpoint): Assert the breakpoint is a
2036 software breakpoint. Set the inserted flag to -1 instead of
2037 setting shlib_disabled.
2038 (delete_disabled_breakpoints): Adjust.
2039 (validate_breakpoints): Only validate software breakpoints.
2040 Adjust to inserted flag change.
2041 (check_mem_read, check_mem_write): Skip breakpoint types other
2042 than software breakpoints. Adjust to inserted flag change.
2043 * mem-break.h (enum raw_bkpt_type): New enum.
2044 (raw_breakpoint, struct process_info): Forward declare.
2045 (Z_packet_to_target_hw_bp_type): Delete declaration.
2046 (raw_bkpt_type_to_target_hw_bp_type, Z_packet_to_raw_bkpt_type)
2047 (set_gdb_breakpoint, delete_gdb_breakpoint)
2048 (clear_breakpoint_conditions): New declarations.
2049 (set_gdb_breakpoint_at, clear_gdb_breakpoint_conditions): Delete.
2050 (breakpoint_inserted_here): Update comment.
2051 (add_breakpoint_condition, add_breakpoint_commands): Replace
2052 address parameter with a breakpoint pointer parameter.
2053 (gdb_breakpoint_here): Update comment.
2054 (delete_gdb_breakpoint_at): Delete.
2055 (insert_memory_breakpoint, remove_memory_breakpoint): Declare.
2056 * server.c (process_point_options): Take a struct breakpoint
2057 pointer instead of an address. Adjust.
2058 (process_serial_event) <Z/z packets>: Use set_gdb_breakpoint and
2059 delete_gdb_breakpoint.
2060 * spu-low.c (spu_target_ops): Install NULL as
2061 supports_z_point_type method.
2062 * target.h: Include mem-break.h.
2063 (struct target_ops) <prepare_to_access_memory>: Update comment.
2064 <supports_z_point_type>: New field.
2065 <insert_point, remove_point>: Take an enum raw_bkpt_type argument
2066 instead of a char. Also take a raw breakpoint pointer.
2067 * win32-arm-low.c (the_low_target): Install NULL as
2068 supports_z_point_type.
2069 * win32-i386-low.c (i386_supports_z_point_type): New function.
2070 (i386_insert_point, i386_remove_point): Adjust to new interface.
2071 (the_low_target): Install i386_supports_z_point_type.
2072 * win32-low.c (win32_supports_z_point_type): New function.
2073 (win32_insert_point, win32_remove_point): Adjust to new interface.
2074 (win32_target_ops): Install win32_supports_z_point_type.
2075 * win32-low.h (struct win32_target_ops):
2076 <supports_z_point_type>: New method.
2077 <insert_point, remove_point>: Take an enum raw_bkpt_type argument
2078 instead of a char. Also take a raw breakpoint pointer.
2079
932539e3
PA
20802014-05-20 Pedro Alves <palves@redhat.com>
2081
2082 * mem-break.h: Include break-common.h.
2083 (Z_PACKET_SW_BP, Z_PACKET_HW_BP, Z_PACKET_WRITE_WP)
2084 (Z_PACKET_READ_WP, Z_PACKET_ACCESS_WP): New defines.
2085 (Z_packet_to_target_hw_bp_type): New declaration.
2086 * mem-break.c (Z_packet_to_target_hw_bp_type): New function.
2087 * i386-low.c (Z_PACKET_HW_BP, Z_PACKET_WRITE_WP, Z_PACKET_READ_WP)
2088 (Z_PACKET_ACCESS_WP): Delete macros.
2089 (Z_packet_to_hw_type): Delete function.
2090 * i386-low.h: Don't include break-common.h here.
2091 (Z_packet_to_hw_type): Delete declaration.
2092 * linux-x86-low.c (x86_insert_point, x86_insert_point): Call
2093 Z_packet_to_target_hw_bp_type instead of Z_packet_to_hw_type.
2094 * win32-i386-low.c (i386_insert_point, i386_remove_point): Call
2095 Z_packet_to_target_hw_bp_type instead of Z_packet_to_hw_type.
2096 * linux-aarch64-low.c: Don't include break-common.h here.
2097 (Z_PACKET_SW_BP, Z_PACKET_HW_BP, Z_PACKET_WRITE_WP)
2098 (Z_PACKET_READ_WP, Z_PACKET_ACCESS_WP): Delete macros.
2099 (Z_packet_to_target_hw_bp_type): Delete function.
2100 * linux-mips-low.c (rsp_bp_type_to_target_hw_bp_type): Delete
2101 function.
2102 (mips_insert_point, mips_remove_point): Use
2103 Z_packet_to_target_hw_bp_type.
2104
4ff0d3d8
PA
21052014-05-20 Pedro Alves <palves@redhat.com>
2106
2107 * linux-aarch64-low.c: Include break-common.h.
2108 (enum target_point_type): Delete.
2109 (Z_packet_to_point_type): Rename to ...
2110 (Z_packet_to_target_hw_bp_type): ... this, and return a
2111 target_hw_bp_type instead.
2112 (aarch64_show_debug_reg_state): Take an enum target_hw_bp_type
2113 instead of an enum target_point_type.
2114 (aarch64_point_encode_ctrl_reg): Likewise. Compute type mask from
2115 breakpoint type.
2116 (aarch64_dr_state_insert_one_point)
2117 (aarch64_dr_state_remove_one_point, aarch64_handle_breakpoint)
2118 (aarch64_handle_aligned_watchpoint)
2119 (aarch64_handle_unaligned_watchpoint, aarch64_handle_watchpoint):
2120 Take an enum target_hw_bp_type instead of an enum
2121 target_point_type.
2122 (aarch64_supports_z_point_type): New function.
2123 (aarch64_insert_point, aarch64_remove_point): Use it. Adjust to
2124 use Z_packet_to_target_hw_bp_type.
2125
786dc519
JB
21262014-05-20 Joel Brobecker <brobecker@adacore.com>
2127
2128 * configure.ac: Only use -Werror by default when DEVELOPMENT
2129 is true.
2130 * configure: Regenerate.
2131
9e0aa64f
JK
21322014-05-19 Jan Kratochvil <jan.kratochvil@redhat.com>
2133
2134 Fix gdbserver qGetTLSAddr for x86_64 -m32.
2135 * linux-x86-low.c (X86_64_USER_REGS): New.
2136 (x86_fill_gregset): Call memset for BUF first in x86_64 -m32 case.
2137
2b577b92
YQ
21382014-04-28 Yao Qi <yao@codesourcery.com>
2139
2140 * Makefile.in (i386-avx512.c): Fix the typo of generated file
2141 name.
2142
94611da2
PA
21432014-04-25 Pedro Alves <palves@redhat.com>
2144
2145 PR server/16255
2146 * linux-low.c (linux_attach_fail_reason_string): New function.
2147 (linux_attach_lwp): Delete.
2148 (linux_attach_lwp_1): Rename to ...
2149 (linux_attach_lwp): ... this. Take a ptid instead of a pid as
2150 argument. Remove "initial" parameter. Return int instead of
2151 void. Don't error or warn here.
2152 (linux_attach): Adjust to call linux_attach_lwp. Call error on
2153 failure to attach to the tgid. Call warning when failing to
2154 attach to an lwp.
2155 * linux-low.h (linux_attach_lwp): Take a ptid instead of a pid as
2156 argument. Remove "initial" parameter. Return int instead of
2157 void. Don't error or warn here.
2158 (linux_attach_fail_reason_string): New declaration.
2159 * thread-db.c (attach_thread): Adjust to linux_attach_lwp's
2160 interface change. Use linux_attach_fail_reason_string.
2161
01f9f808
MS
21622014-04-24 Michael Sturm <michael.sturm@mintel.com>
2163 Walfred Tedeschi <walfred.tedeschi@intel.com>
2164
2165 * Makefile.in: Added rules to handle new files
2166 i386-avx512.c i386-avx512-linux.c amd64-avx512.c
2167 amd64-avx512-linux.c x32-avx512.c x32-avx512-linux.c.
2168 * configure.srv (srv_i386_regobj): Add i386-avx512.o.
2169 (srv_i386_linux_regobj): Add i386-avx512-linux.o.
2170 (srv_amd64_regobj): Add amd64-avx512.o and x32-avx512.o.
2171 (srv_amd64_linux_regobj): Add amd64-avx512-linux.o and
2172 x32-avx512-linux.o.
2173 (srv_i386_32bit_xmlfiles): Add i386/32bit-avx512.xml.
2174 (srv_i386_64bit_xmlfiles): Add i386/64bit-avx512.xml.
2175 (srv_amd64_xmlfiles): Add i386/amd64-avx512.xml and
2176 i386/x32-avx512.xml.
2177 (srv_i386_linux_xmlfiles): Add i386/i386-avx512-linux.xml.
2178 (srv_amd64_linux_xmlfiles): Add i386/amd64-avx512-linux.xml and
2179 i386/x32-avx512-linux.xml.
2180 * i387-fp.c (num_avx512_k_registers): New constant for number
2181 of K registers.
2182 (num_avx512_zmmh_low_registers): New constant for number of
2183 lower ZMM registers (0-15).
2184 (num_avx512_zmmh_high_registers): New constant for number of
2185 higher ZMM registers (16-31).
2186 (num_avx512_ymmh_registers): New contant for number of higher
2187 YMM registers (ymm16-31 added by avx521 on x86_64).
2188 (num_avx512_xmm_registers): New constant for number of higher
2189 XMM registers (xmm16-31 added by AVX512 on x86_64).
2190 (struct i387_xsave): Add space for AVX512 registers.
2191 (i387_cache_to_xsave): Change raw buffer size to 64 characters.
2192 Add code to handle AVX512 registers.
2193 (i387_xsave_to_cache): Add code to handle AVX512 registers.
2194 * linux-x86-low.c (init_registers_amd64_avx512_linux): New
2195 prototypei from generated file.
2196 (tdesc_amd64_avx512_linux): Likewise.
2197 (init_registers_x32_avx512_linux): Likewise.
2198 (tdesc_x32_avx512_linux): Likewise.
2199 (init_registers_i386_avx512_linux): Likewise.
2200 (tdesc_i386_avx512_linux): Likewise.
2201 (x86_64_regmap): Add AVX512 registers.
2202 (x86_linux_read_description): Add code to handle AVX512 XSTATE
2203 mask.
2204 (initialize_low_arch): Add code to initialize AVX512 registers.
2205
51aa91f9
PA
22062014-04-23 Pedro Alves <palves@redhat.com>
2207
2208 * mem-break.c (find_gdb_breakpoint_at): Make static.
2209 * mem-break.h (find_gdb_breakpoint_at): Delete declaration.
2210
a4165e94
PA
22112014-04-23 Pedro Alves <palves@redhat.com>
2212
2213 * i386-low.c: Don't include break-common.h here.
2214 (i386_low_insert_watchpoint, i386_low_remove_watchpoint): Change
2215 prototype to take target_hw_bp_type as argument instead of a Z
2216 packet char.
2217 * i386-low.h: Include break-common.h here.
2218 (Z_packet_to_hw_type): Declare.
2219 (i386_low_insert_watchpoint, i386_low_remove_watchpoint): Change
2220 prototypes.
2221 * linux-x86-low.c (x86_insert_point): Convert the packet number to
2222 a target_hw_bp_type before calling i386_low_insert_watchpoint.
2223 (x86_remove_point): Convert the packet number to a
2224 target_hw_bp_type before calling i386_low_remove_watchpoint.
2225 * win32-i386-low.c (i386_insert_point): Convert the packet number
2226 to a target_hw_bp_type before calling i386_low_insert_watchpoint.
2227 (i386_remove_point): Convert the packet number to a
2228 target_hw_bp_type before calling i386_low_remove_watchpoint.
2229
b8acf843
PA
22302014-04-23 Pedro Alves <palves@redhat.com>
2231
2232 * utils.h (perror_with_name): Add ATTRIBUTE_NORETURN.
2233
d708bcd1
PA
22342014-04-10 Pedro Alves <palves@redhat.com>
2235
2236 * mem-break.c (add_breakpoint_condition, add_breakpoint_commands):
2237 Check if the condition or command is NULL before checking if the
2238 breakpoint is known. On success, return true.
2239 * mem-break.h (add_breakpoint_condition): Document return.
2240 (add_breakpoint_commands): Add describing comment.
2241 * server.c (skip_to_semicolon): New function.
2242 (process_point_options): Use it.
2243
2eec7d5b
PA
22442014-04-09 Pedro Alves <palves@redhat.com>
2245
2246 * linux-low.c (linux_read_loadmap): Pass current_inferior directly
2247 to lwpid_of.
2248
fa96cb38
PA
22492014-02-27 Pedro Alves <palves@redhat.com>
2250
2251 PR 12702
2252 * inferiors.h (A_I_NEXT, ALL_INFERIORS_TYPE, ALL_PROCESSES): New
2253 macros.
2254 * linux-low.c (delete_lwp, handle_extended_wait): Add debug
2255 output.
2256 (last_thread_of_process_p): Take a PID argument instead of a
2257 thread pointer.
2258 (linux_wait_for_lwp): Delete.
2259 (num_lwps, check_zombie_leaders, not_stopped_callback): New
2260 functions.
2261 (linux_low_filter_event): New function, party factored out from
2262 linux_wait_for_event.
2263 (linux_wait_for_event): Rename to ...
2264 (linux_wait_for_event_filtered): ... this. Add new filter ptid
2265 argument. Partly rewrite. Always use waitpid(-1, WNOHANG) and
2266 sigsuspend. Check for zombie leaders.
2267 (linux_wait_for_event): Reimplement as wrapper around
2268 linux_wait_for_event_filtered.
2269 (linux_wait_1): Handle TARGET_WAITKIND_NO_RESUMED. Assume that if
2270 a normal or signal exit is seen, it's the whole process exiting.
2271 (wait_for_sigstop): No longer a for_each_inferior callback.
2272 Rewrite on top of linux_wait_for_event_filtered.
2273 (stop_all_lwps): Call wait_for_sigstop directly.
2274 * server.c (resume, handle_target_event): Handle
2275 TARGET_WAITKIND_NO_RESUMED.
2276
d763de10
JB
22772014-02-26 Joel Brobecker <brobecker@adacore.com>
2278
2279 * win32-low.c (psapi_get_dll_name,
2280 * win32_CreateToolhelp32Snapshot): Delete.
2281 (win32_CreateToolhelp32Snapshot, win32_Module32First)
2282 (win32_Module32Next, load_toolhelp, toolhelp_get_dll_name):
2283 Delete.
2284 (handle_load_dll): Add function description.
2285 Remove code using psapi_get_dll_name and toolhelp_get_dll_name.
2286
850a0f76
JB
22872014-02-26 Joel Brobecker <brobecker@adacore.com>
2288
2289 * win32-low.c (win32_add_one_solib): Add 0x1000 to load_addr.
2290 Add comment.
2291 (win32_add_all_dlls): Remove 0x1000 offset applied to DLL
2292 base address when calling win32_add_one_solib.
2293 (handle_load_dll): Delete local variable load_addr.
2294 Remove 0x1000 offset applied to DLL base address when calling
2295 win32_add_one_solib.
2296 (handle_unload_dll): Add comment.
2297
f25b3fc3
JB
22982014-02-26 Joel Brobecker <brobecker@adacore.com>
2299
2300 * win32-low.c (win32_add_all_dlls): Renames
2301 win32_ensure_ntdll_loaded. Rewrite function documentation.
2302 Adjust implementation to always load all DLLs.
2303 Add 0x1000 offset to DLL base address when calling
2304 win32_add_one_solib.
2305 (child_initialization_done): New static global.
2306 (do_initial_child_stuff): Set child_initialization_done to
2307 zero during child initialization, and 1 after. Replace call
2308 to win32_ensure_ntdll_loaded by call to win32_add_all_dlls.
2309 Add comment.
2310 (match_dll_by_basename, dll_is_loaded_by_basename): Delete.
2311 (handle_unload_dll): Add function documentation.
2312 (get_child_debug_event): Ignore load and unload DLL events
2313 during child initialization.
2314
d86d4aaf
DE
23152014-02-20 Doug Evans <dje@google.com>
2316
3bc32da3 2317 Remove global all_lwps.
d86d4aaf
DE
2318 * inferiors.h (ptid_of): Move here from linux-low.h.
2319 (pid_of, lwpid_of): Ditto.
2320 * linux-aarch64-low.c (debug_reg_change_callback): Update, "entry"
2321 parameter is a struct thread_info * now.
2322 (aarch64_notify_debug_reg_change): Fetch pid from current_inferior
2323 directly. Pass &all_threads to find_inferior instead of &all_lwps.
2324 (aarch64_stopped_data_address): Fetch lwpid from current_inferior
2325 directly.
2326 (aarch64_linux_prepare_to_resume): Fetch ptid from thread.
2327 (aarch64_arch_setup): Fetch lwpid from current_inferior directly.
2328 * linux-arm-low.c (update_registers_callback): Update, "entry"
2329 parameter is a struct thread_info * now.
2330 Fetch lwpid from current_inferior directly.
2331 (arm_insert_point): Pass &all_threads to find_inferior instead of
2332 &all_lwps.
2333 (arm_remove_point): Ditto.
2334 (arm_stopped_by_watchpoint): Fetch lwp from current_inferior.
2335 (arm_prepare_to_resume): Fetch pid from thread.
2336 (arm_read_description): Fetch lwpid from current_inferior directly.
2337 * linux-low.c (all_lwps): Delete.
2338 (delete_lwp): Delete call to remove_inferior.
2339 (handle_extended_wait): Fetch lwpid from thread.
2340 (add_lwp): Don't set lwp->entry.id. Remove call to
2341 add_inferior_to_list.
2342 (linux_attach_lwp_1): Fetch pid from current_inferior directly.
2343 (linux_kill_one_lwp): Fetch ptid,lwpid from thread.
2344 (kill_one_lwp_callback): Ditto.
2345 (linux_kill): Don't dereference NULL pointer.
2346 Fetch ptid,lwpid from thread.
2347 (get_detach_signal): Fetch ptid from thread.
2348 (linux_detach_one_lwp): Fetch ptid,lwpid from thread.
2349 Simplify call to regcache_invalidate_thread.
2350 (delete_lwp_callback): Update, "entry" parameter is a
2351 struct thread_info * now. Fetch pid from thread.
2352 (linux_mourn): Pass &all_threads to find_inferior instead of &all_lwps.
2353 (status_pending_p_callback): Update, "entry" parameter is a
2354 struct thread_info * now. Fetch ptid from thread.
2355 (find_lwp_pid): Update, "entry" parameter is a
2356 struct thread_info * now.
2357 (linux_wait_for_lwp): Fetch pid from thread.
2358 (linux_fast_tracepoint_collecting): Fetch lwpid from thread.
2359 (maybe_move_out_of_jump_pad): Fetch lwpid from current_inferior.
2360 (enqueue_one_deferred_signal): Fetch lwpid from thread.
2361 (dequeue_one_deferred_signal): Ditto.
2362 (cancel_breakpoint): Fetch ptid from current_inferior.
2363 (linux_wait_for_event): Pass &all_threads to find_inferior,
2364 not &all_lwps. Fetch ptid, lwpid from thread.
2365 (count_events_callback): Update, "entry" parameter is a
2366 struct thread_info * now.
2367 (select_singlestep_lwp_callback): Ditto.
2368 (select_event_lwp_callback): Ditto.
2369 (cancel_breakpoints_callback): Ditto.
2370 (linux_cancel_breakpoints): Pass &all_threads to find_inferior,
2371 not &all_lwps.
2372 (select_event_lwp): Ditto. Fetch ptid from event_thread.
2373 (unsuspend_one_lwp): Update, "entry" parameter is a
2374 struct thread_info * now.
2375 (unsuspend_all_lwps): Pass &all_threads to find_inferior,
2376 not &all_lwps.
2377 (linux_stabilize_threads): Ditto. And for for_each_inferior.
2378 Fetch lwpid from thread, not lwp.
2379 (linux_wait_1): Fetch ptid, lwpid from current_inferior.
2380 Pass &all_threads to find_inferior, not &all_lwps.
2381 (send_sigstop): Fetch lwpid from thread, not lwp.
2382 (send_sigstop_callback): Update, "entry" parameter is a
2383 struct thread_info * now.
2384 (suspend_and_send_sigstop_callback): Ditto.
2385 (wait_for_sigstop): Ditto. Fetch ptid, lwpid from thread, lwp.
2386 (stuck_in_jump_pad_callback): Update, "entry" parameter is a
2387 struct thread_info * now.
2388 (move_out_of_jump_pad_callback): Ditto. Fetch ptid, lwpid
2389 from thread, lwp.
2390 (lwp_running): Update, "entry" parameter is a
2391 struct thread_info * now.
2392 (stop_all_lwps): Fetch ptid from thread.
2393 Pass &all_threads to find_inferior, for_each_inferior, not &all_lwps.
2394 (linux_resume_one_lwp): Fetch lwpid from thread.
2395 (linux_set_resume_request): Update, "entry" parameter is a
2396 struct thread_info * now. Fetch pid, lwpid from thread.
2397 (resume_status_pending_p): Update, "entry" parameter is a
2398 struct thread_info * now.
2399 (need_step_over_p): Ditto. Fetch lwpid from thread.
2400 (start_step_over): Fetch lwpid from thread.
2401 (linux_resume_one_thread): Update, "entry" parameter is a
2402 struct thread_info * now. Fetch lwpid from thread.
2403 (linux_resume): Pass &all_threads to find_inferior, not &all_lwps.
2404 (proceed_one_lwp): Update, "entry" parameter is a
2405 struct thread_info * now. Fetch lwpid from thread.
2406 (unsuspend_and_proceed_one_lwp): Update, "entry" parameter is a
2407 struct thread_info * now.
2408 (proceed_all_lwps): Pass &all_threads to find_inferior, not &all_lwps.
2409 (unstop_all_lwps): Ditto. Fetch lwpid from thread.
2410 (regsets_fetch_inferior_registers): Fetch lwpid from current_inferior
2411 directly.
2412 (regsets_store_inferior_registers): Ditto.
2413 (fetch_register, store_register): Ditto.
2414 (linux_read_memory, linux_write_memory): Ditto.
2415 (linux_request_interrupt): Ditto.
2416 (linux_read_auxv): Ditto.
2417 (linux_xfer_siginfo): Ditto.
2418 (linux_qxfer_spu): Ditto.
2419 (linux_qxfer_libraries_svr4): Ditto.
2420 * linux-low.h (ptid_of, pid_of, lwpid_of): Delete,
2421 moved to inferiors.h.
2422 (get_lwp): Delete.
2423 (get_thread_lwp): Update.
2424 (struct lwp_info): Delete member "entry". Simplify comment for
2425 member "thread".
2426 (all_lwps): Delete.
2427 * linux-mips-low.c (mips_read_description): Fetch lwpid from
2428 current_inferior directly.
2429 (update_watch_registers_callback): Update, "entry" parameter is a
2430 struct thread_info * now. Fetch pid from thread.
2431 (mips_linux_prepare_to_resume): Fetch ptid from thread.
2432 (mips_insert_point): Fetch lwpid from current_inferior.
2433 Pass &all_threads to find_inferior, not &all_lwps.
2434 (mips_remove_point): Pass &all_threads to find_inferior, not &all_lwps.
2435 (mips_stopped_by_watchpoint): Fetch lwpid from current_inferior
2436 directly.
2437 (mips_stopped_data_address): Ditto.
2438 * linux-s390-low.c (s390_arch_setup): Fetch pid from current_inferior
2439 directly.
2440 * linux-tile-low.c (tile_arch_setup): Ditto.
2441 * linux-x86-low.c (x86_get_thread_area): Fetch lwpid from thread.
2442 (update_debug_registers_callback): Update, "entry" parameter is a
2443 struct thread_info * now. Fetch pid from thread.
2444 (i386_dr_low_set_addr): Fetch pid from current_inferior directly.
2445 Pass &all_threads to find_inferior, not &all_lwps.
2446 (i386_dr_low_get_addr): Fetch ptid from current_inferior directly.
2447 (i386_dr_low_set_control): Fetch pid from current_inferior directly.
2448 Pass &all_threads to find_inferior, not &all_lwps.
2449 (i386_dr_low_get_control): Fetch ptid from current_inferior directly.
2450 (i386_dr_low_get_status): Ditto.
2451 (x86_linux_prepare_to_resume): Fetch ptid from thread.
2452 (x86_siginfo_fixup): Fetch lwpid from current_inferior directly.
2453 (x86_linux_read_description): Ditto.
2454 * proc-service.c (ps_getpid): Fetch pid from current_inferior directly.
2455
3b8361aa
DE
24562014-02-20 Doug Evans <dje@google.com>
2457
2458 * inferiors.c (get_first_inferior): Fix buglet.
2459
f7667f0d
DE
24602014-02-19 Doug Evans <dje@google.com>
2461
2462 * gdbthread.h (add_thread): Change result type to struct thread_info *.
2463 * inferiors.c (add_thread): Change result type to struct thread_info *.
2464 All callers updated.
2465 (add_lwp): Call add_thread here instead of in callers.
2466 All callers updated.
2467 * linux-low.h (get_lwp_thread): Rewrite.
2468 (struct lwp_info): New member "thread".
2469
b3312d80
DE
24702014-02-19 Doug Evans <dje@google.com>
2471
2472 * linux-low.c (add_lwp): Change result to struct lwp_info *.
2473 All callers updated.
2474
ecc6f45c
DE
24752014-02-19 Doug Evans <dje@google.com>
2476
2477 * inferiors.c (add_thread): Fix whitespace.
2478
649ebbca
DE
24792014-02-19 Doug Evans <dje@google.com>
2480
2481 * dll.c (clear_dlls): Replace accessing list implemention details
2482 with API function.
2483 * gdbthread.h (get_first_thread): Declare.
2484 * inferiors.c (for_each_inferior_with_data): New function.
2485 (get_first_thread): New function.
2486 (find_thread_ptid): Simplify.
2487 (get_first_inferior): New function.
2488 (clear_list): Delete.
2489 (one_inferior_p): New function.
2490 (clear_inferior_list): New function.
2491 (clear_inferiors): Update.
2492 * inferiors.h (for_each_inferior_with_data): Declare.
2493 (clear_inferior_list): Declare.
2494 (one_inferior_p): Declare.
2495 (get_first_inferior): Declare.
2496 * linux-low.c (linux_wait_for_event): Replace accessing list
2497 implemention details with API function.
2498 * server.c (target_running): Ditto.
2499 (accumulate_file_name_length): New function.
2500 (emit_dll_description): New function.
2501 (handle_qxfer_libraries): Replace accessing list implemention
2502 details with API function.
2503 (handle_qxfer_threads_worker): New function.
2504 (handle_qxfer_threads_proper): Replace accessing list implemention
2505 details with API function.
2506 (handle_query): Ditto.
2507 (visit_actioned_threads_callback_ftype): New typedef.
2508 (visit_actioned_threads_data): New struct.
2509 (visit_actioned_threads): Rewrite to be find_inferior callback.
2510 (resume): Call find_inferior.
2511 (handle_status): Replace accessing list implemention
2512 details with API function.
2513 (process_serial_event): Replace accessing list implemention details
2514 with API function.
2515 * target.c (set_desired_inferior): Replace accessing list implemention
2516 details with API function.
2517 * tracepoint.c (same_process_p): New function.
2518 (gdb_agent_about_to_close): Replace accessing list implemention
2519 details with API function.
2520 * win32-low.c (child_delete_thread): Replace accessing list
2521 implemention details with API function.
2522 (match_dll_by_basename): New function.
2523 (dll_is_loaded_by_basename): New function.
2524 (win32_ensure_ntdll_loaded): Replace accessing list implemention
2525 details call to dll_is_loaded_by_basename.
2526
80894984
DE
25272014-02-19 Doug Evans <dje@google.com>
2528
2529 * dll.h (struct dll_info): Add comment.
2530 * gdbthread.h (struct thread_info): Add comment.
2531 (current_ptid): Simplify.
2532 * inferiors.c (add_process): Update.
2533 (remove_process): Update.
2534 * inferiors.h (struct process_info): Rename member "head" to "entry".
2535 * linux-low.c (delete_lwp): Update.
2536 (add_lwp): Update.
2537 (last_thread_of_process_p): Update.
2538 (kill_one_lwp_callback, linux_kill): Update.
2539 (status_pending_p_callback): Update.
2540 (wait_for_sigstop): Update. Simplify read of ptid.
2541 (start_step_over): Update.
2542 * linux-low.h (ptid_of, pid_of, lwpid_of): Update.
2543 (get_lwp_thread): Update.
2544 (struct lwp_info): Rename member "head" to "entry".
2545 * regcache.h (inferior_list_entry): Delete.
2546 * server.c (kill_inferior_callback): Update.
2547 (detach_or_kill_inferior_callback): Update.
2548 (print_started_pid): Update.
2549 (print_attached_pid): Update.
2550 (process_serial_event): Simplify read of ptid.
2551 * thread-db.c (thread_db_create_event): Update.
2552 (thread_db_get_tls_address): Update.
2553 * win32-low.c (current_inferior_ptid): Simplify.
2554
46917d26
TT
25552014-02-19 Tom Tromey <tromey@redhat.com>
2556
2557 * target.h (struct target_ops) <supports_btrace>: Add target_ops
2558 argument.
2559 (target_supports_btrace): Update.
2560
0759a81e
YQ
25612014-02-14 Yao Qi <yao@codesourcery.com>
2562
2563 * Makefile.in (IPA_OBJS): Append rsp-low-ipa.o.
2564 (rsp-low-ipa.o): New target.
2565
a7191e8b
TT
25662014-02-12 Tom Tromey <tromey@redhat.com>
2567
2568 * ax.c (gdb_parse_agent_expr): Use hex2bin, not
2569 convert_ascii_to_int.
2570 * regcache.c (registers_to_string): Likewise.
2571 * remote-utils.c (decode_M_packet): Likewise.
2572 * server.c (process_serial_event): Likewise.
2573
ff0e980e
TT
25742014-02-12 Tom Tromey <tromey@redhat.com>
2575
2576 * server.c (handle_query, handle_v_run): Use hex2bin, not
2577 unhexify.
2578 * tracepoint.c (cmd_qtdpsrc, cmd_qtdv, cmd_qtnotes): Likewise.
2579
e9371aff
TT
25802014-02-12 Tom Tromey <tromey@redhat.com>
2581
2582 * ax.c (gdb_unparse_agent_expr): Use bin2hex, not
2583 convert_int_to_ascii.
2584 * regcache.c (registers_to_string, collect_register_as_string):
2585 Likewise.
2586 * remote-utils.c (look_up_one_symbol, relocate_instruction):
2587 Likewise.
2588 * server.c (process_serial_event): Likewise.
2589 * tracepoint.c (cmd_qtstatus, response_source, response_tsv)
2590 (cmd_qtbuffer, cstr_to_hexstr): Likewise.
2591
971dc0b8
TT
25922014-02-12 Tom Tromey <tromey@redhat.com>
2593
2594 * remote-utils.c (look_up_one_symbol, monitor_output): Use
2595 bin2hex, not hexify.
2596 * tracepoint.c (cmd_qtstatus): Likewise.
2597
0a822afb
TT
25982014-02-12 Tom Tromey <tromey@redhat.com>
2599
2600 * remote-utils.c (monitor_output): Pass explicit length to
2601 hexify.
2602
9c3d6531
TT
26032014-02-12 Tom Tromey <tromey@redhat.com>
2604
2605 * tracepoint.c: Include rsp-low.h.
2606 * server.c: Include rsp-low.h.
2607 * remote-utils.h (convert_ascii_to_int, convert_int_to_ascii)
2608 (unhexify, hexify, remote_escape_output, unpack_varlen_hex): Don't
2609 declare.
2610 * remote-utils.c: Include rsp-low.h.
2611 (fromhex, hexchars, ishex, unhexify, tohex, hexify)
2612 (remote_escape_output, remote_unescape_input, unpack_varlen_hex)
2613 (convert_int_to_ascii, convert_ascii_to_int): Move to
2614 common/rsp-low.c.
2615 * regcache.c: Include rsp-low.h.
2616 * ax.c: Include rsp-low.h.
2617 * Makefile.in (SFILES): Add common/rsp-low.c.
2618 (OBS): Add rsp-low.o.
2619 (rsp-low.o): New target.
2620
01fd3ea5
TT
26212014-02-12 Tom Tromey <tromey@redhat.com>
2622
2623 * utils.h (pulongest, plongest, phex_nz): Don't declare.
2624 Include print-utils.h.
2625 * utils.c (NUMCELLS, CELLSIZE, get_cell, decimal2str, pulongest)
2626 (plongest, thirty_two, phex_nz): Remove.
2627 * Makefile.in (SFILES): Add common/print-utils.c.
2628 (OBS): Add print-utils.o.
2629 (print-utils-ipa.o): New target.
2630 (print-utils.o): New target.
2631 (IPA_OBJS): Add print-utils-ipa.o.
2632
e99dc820
TT
26332014-02-06 Tom Tromey <tromey@redhat.com>
2634
2635 * Makefile.in (SFILES): Fix indentation.
2636
ee1e2d4f
DE
26372014-02-05 Doug Evans <dje@google.com>
2638
2639 * linux-low.c (linux_wait_for_event): Improve comment.
2640 (linux_wait_1): Keep current_inferior in sync with event_child.
2641
f5a02773
DE
26422014-01-22 Doug Evans <dje@google.com>
2643
2644 * gdbthread.h (gdb_id_to_thread): Delete, unused.
2645
87ce2a04
DE
26462014-01-22 Doug Evans <dje@google.com>
2647
2648 * configure.ac (AC_CHECK_FUNCS): Add test for gettimeofday.
2649 * configure: Regenerate.
2650 * config.in: Regenerate.
2651 * Makefile.in (SFILES): Add debug.c.
2652 (OBS): Add debug.o.
2653 * debug.c: New file.
2654 * debug.h: New file.
2655 * linux-aarch64-low.c (*): Update all debugging printfs to use
2656 debug_printf instead of fprintf.
2657 * linux-arm-low.c (*): Ditto.
2658 * linux-cris-low.c (*): Ditto.
2659 * linux-crisv32-low.c (*): Ditto.
2660 * linux-m32r-low.c (*): Ditto.
2661 * linux-sparc-low.c (*): Ditto.
2662 * linux-x86.c (*): Ditto.
2663 * linux-low.c (*): Ditto.
2664 (linux_wait_1): Add calls to debug_enter, debug_exit.
2665 (linux_wait): Remove redundant debugging printf.
2666 (stop_all_lwps): Add calls to debug_enter, debug_exit.
2667 (linux_resume, unstop_all_lwps): Ditto.
2668 * mem-break.c (*): Update all debugging printfs to use
2669 debug_printf instead of fprintf.
2670 * remote-utils.c (*): Ditto.
2671 * thread-db.c (*): Ditto.
2672 * server.c #include <ctype.h>, "gdb_vecs.h".
2673 (debug_threads): Moved to debug.c.
2674 (*): Update all debugging printfs to use debug_printf instead of
2675 fprintf.
2676 (start_inferior): Replace call to fflush with call to debug_flush.
2677 (monitor_show_help): Mention set debug-format.
2678 (parse_debug_format_options): New function.
2679 (handle_monitor_command): Handle "monitor set debug-format".
2680 (gdbserver_usage): Mention --debug-format.
2681 (main): Parse --debug-format.
2682 * server.h (debug_threads): Declaration moved to debug.h.
2683 #include "debug.h".
2684 * tracepoint.c (trace_debug_1) [!IN_PROCESS_AGENT]: Add version of
2685 trace_debug_1 that uses debug_printf.
2686 (tracepoint_look_up_symbols): Update all debugging printfs to use
2687 debug_printf instead of fprintf.
2688
e671835b
BS
26892014-01-20 Baruch Siach <baruch@tkos.co.il>
2690
2691 * linux-xtensa-low.c: Include asm/ptrace.h instead of
2692 sys/ptrace.h.
2693
b5737fa9
PA
26942014-01-17 Pedro Alves <palves@redhat.com>
2695
ea38d2a9 2696 PR build/16445
c7faa97a
PA
2697 * linux-x86-low.c: Don't include elf/common.h if ELFMAG0 is
2698 defined after including gdb_proc_service.h.
b5737fa9 2699
40ed484e
DE
27002014-01-16 Doug Evans <dje@google.com>
2701
2702 * dll.c (UNSPECIFIED_CORE_ADDR): New macro.
2703 (match_dll): Use it.
2704
969c39fb
MM
27052014-01-16 Markus Metzger <markus.t.metzger@intel.com>
2706
2707 * target.h (target_ops) <read_btrace>: Change parameters and
2708 return type to allow error reporting.
2709 * server.c (handle_qxfer_btrace): Support delta reads. Pass
2710 trace reading errors on.
2711 * linux-low.c (linux_low_read_btrace): Pass trace reading
2712 errors on.
2713 (linux_low_disable_btrace): New.
2714
ab7f45ba
DE
27152014-01-15 Doug Evans <dje@google.com>
2716
2717 * inferiors.c (thread_id_to_gdb_id): Delete.
2718 * inferiors.h (thread_id_to_gdb_id): Delete.
2719
66af0f44
EZ
27202014-01-13 Eli Zaretskii <eliz@gnu.org>
2721
2722 * Makefile.in (INCLUDE_CFLAGS): Remove trailing slash from
2723 "-I$(srcdir)/../". Fixes MinGW compilation errors with old GCC
2724 versions.
2725
9939e131
PA
27262014-01-08 Pedro Alves <palves@redhat.com>
2727
2728 * server.c (handle_status): Don't discard previous queued stop
2729 replies or thread's pending status here.
2730 (main) <disconnection>: Do it here instead.
2731
b7ea362b
PA
27322014-01-08 Pedro Alves <palves@redhat.com>
2733
2734 * gdbthread.h (struct thread_info) <status_pending_p>: New field.
2735 * server.c (visit_actioned_threads, handle_pending_status): New
2736 function.
2737 (handle_v_cont): Factor out parts to ...
2738 (resume): ... this new function. If in all-stop, and a thread
2739 being resumed has a pending status, report it without actually
2740 resuming.
2741 (myresume): Adjust to use the new 'resume' function.
2742 (clear_pending_status_callback, set_pending_status_callback)
2743 (find_status_pending_thread_callback): New functions.
2744 (handle_status): Handle the case of multiple threads having
2745 interesting statuses to report. Report threads' real last signal
2746 instead of always reporting GDB_SIGNAL_TRAP. Look for a thread
2747 with an interesting thread to report the status for, instead of
2748 always reporting the status of the first thread.
2749
28498c42
JB
27502014-01-01 Joel Brobecker <brobecker@adacore.com>
2751
2752 * gdbserver.c (gdbserver_version): Set copyright year to 2014.
2753 * gdbreplay.c (gdbreplay_version): Likewise.
2754
f45c82da
YZ
27552013-12-18 Yufeng Zhang <yufeng.zhang@arm.com>
2756
2757 * linux-aarch64-low.c (aarch64_linux_set_debug_regs): Set
2758 iov.iov_len with the real length in use.
2759
379a5e2d
JB
27602013-12-13 Joel Brobecker <brobecker@adacore.com>
2761
2762 * Makefile.in (safe-ctype.o, lbasename.o): New rules.
2763 * configure.srv: Add safe-ctype.o and lbasename.o to srv_tgtobj
2764 for all targets that use win32-low.c.
2765 * win32-low.c (win32_ensure_ntdll_loaded): New function.
2766 (do_initial_child_stuff): Add call to win32_ensure_ntdll_loaded.
2767
4210d83e
PA
27682013-12-13 Pedro Alves <palves@redhat.com>
2769
2770 * target.c (mywait): Set OURSTATUS->KIND to TARGET_WAITKIND_STOPPED
2771 if equal to TARGET_WAITKIND_LOADED.
2772 * win32-low.c (cached_status): New static global.
2773 (win32_wait): Add declaration.
2774 (do_initial_child_stuff): Flush all initial pending debug events
2775 up to the initial breakpoint.
2776 (win32_wait): If CACHED_STATUS was set, return that instead
2777 of doing a real wait. Remove the code resuming the execution
2778 of the inferior after receiving a TARGET_WAITKIND_LOADED event
2779 during the initial phase. Also remove the code changing
2780 OURSTATUS->KIND from TARGET_WAITKIND_LOADED to
2781 TARGET_WAITKIND_STOPPED.
2782
e7f0d979
YQ
27832013-12-11 Yao Qi <yao@codesourcery.com>
2784
2785 * notif.c (handle_notif_ack): Return 0 if no notification
2786 matches.
2787
ebcf782c
DE
27882013-11-20 Doug Evans <dje@google.com>
2789
2790 * linux-low.c (linux_set_resume_request): Fix comment.
2791
20ad9378
DE
27922013-11-20 Doug Evans <dje@google.com>
2793
2794 * linux-low.c (resume_status_pending_p): Tweak comment.
2795
a196ebeb
WT
27962013-11-20 Walfred Tedeschi <walfred.tedeschi@intel.com>
2797
2798 * Makefile.in: Add i386-mpx.c, i386-mpx-linux.c, amd64-mpx.c,
2799 amd64-mpx-linux.c, x32-mpx.c and x32-mpx-linux.c generation.
2800 * configure.srv (srv_i386_regobj): Add i386-mpx.o.
2801 (srv_i386_linux_regobj): Add i386-mpx-linux.o.
2802 (srv_amd64_regobj): Add amd64-mpx.o.
2803 (srv_amd64_linux_regobj): Add amd64-mpx-linux.o.
2804 (srv_i386_32bit_xmlfiles): Add i386/32bit-mpx.xml.
2805 (srv_i386_64bit_xmlfiles): Add i386/64bit-mpx.xml.
2806 * i387-fp.c (num_pl_bnd_register) Added constant.
2807 (num_pl_bnd_cfg_registers) Added constant.
2808 (struct i387_xsave) Added reserved area and MPX fields.
2809 (i387_cache_to_xsave, i387_xsave_to_cache) Add MPX.
2810 * linux-x86-low.c (init_registers_i386_mpx_linux): Declare new
2811 function.
2812 (tdesc_i386_mpx_linux): Add MPX amd64 target.
2813 (init_registers_amd64_mpx_linux): Declare new function.
2814 (tdesc_amd64_mpx_linux): Add MPX amd64 target.
2815 (x86_64_regmap): Add MPX registers.
2816 (x86_linux_read_description): Add MPX case.
2817 (initialize_low_arch): Initialize MPX targets.
2818
0080a2f6
TT
28192013-11-18 Tom Tromey <tromey@redhat.com>
2820
2821 * configure: Rebuild.
2822 * configure.ac: Don't check for stdlib.h.
2823 * gdbreplay.c: Unconditionally include stdlib.h.
2824
2978b111
TT
28252013-11-18 Tom Tromey <tromey@redhat.com>
2826
2827 * config.in: Rebuild.
2828 * configure: Rebuild.
2829 * configure.ac: Don't use AC_HEADER_DIRENT.
2830
a3d08894
TT
28312013-11-18 Tom Tromey <tromey@redhat.com>
2832
2833 * server.h: Don't check HAVE_STRING_H.
2834 * gdbreplay.c: Don't check HAVE_STRING_H.
2835 * configure: Rebuild.
2836
0a5dd17d
TT
28372013-11-18 Tom Tromey <tromey@redhat.com>
2838
2839 * Makefile.in (gdbreplay$(EXEEXT)): Depend on and link against
2840 LIBGNU.
2841
1bd2f0ba
TT
28422013-11-08 Tom Tromey <tromey@redhat.com>
2843
2844 * configure, config.in: Rebuild.
2845 * configure.ac: Remove unused configury.
2846
3266f10b
TT
28472013-11-08 Tom Tromey <tromey@redhat.com>
2848
2849 * acinclude.m4: Include common.m4, codeset.m4.
2850 * configure, config.in: Rebuild.
2851 * configure.ac: Use GDB_AC_COMMON.
2852
6682d959
AA
28532013-11-06 Andreas Arnez <arnez@linux.vnet.ibm.com>
2854
2855 * linux-s390-low.c (HWCAP_S390_TE): New define.
2856 (s390_arch_setup): Consider the TE field in the HWCAP for
2857 determining 'have_regset_tdb'.
2858
fd0a4d76
SDJ
28592013-10-16 Sergio Durigan Junior <sergiodj@redhat.com>
2860
2861 PR gdb/16014
2862 * tracepoint.c (download_tracepoint_1): Remove unnecessary double
2863 call to sizeof.
2864
1a3d890b
PA
28652013-10-02 Pedro Alves <palves@redhat.com>
2866
2867 * server.c (process_serial_event): Don't output "GDBserver
2868 exiting" if GDB is connected through stdio.
2869 * target.c (mywait): Likewise, be silent if GDB is connected
2870 through stdio.
2871
97ad4581
JB
28722013-10-01 Joel Brobecker <brobecker@adacore.com>
2873
2874 * lynx-low.c (lynx_add_threads_after_attach): New function.
2875 (lynx_attach): Remove call to add_thread. Add call to
2876 lynx_add_threads_after_attach instead.
2877
5b4e221c
MF
28782013-09-28 Mike Frysinger <vapier@gentoo.org>
2879
2880 * configure.ac (AC_CHECK_HEADERS): Add sys/syscall.h
2881 * config.in, configure: Regenerated.
2882
ee47b2f8
YQ
28832013-09-18 Yao Qi <yao@codesourcery.com>
2884
2885 PR server/15959
2886 * server.c (start_inferior): Clear 'resume_info'.
2887
d6707650 28882013-09-16 Jiong Wang <jiwang@tilera.com>
0f63d4db 2889
d6707650
JW
2890 * linux-tile-low.c (tile_regsets): Modify the size field to 64-bit
2891 for each register.
2892
9243dd0e 28932013-09-16 Jiong Wang <jiwang@tilera.com>
0f63d4db 2894
9243dd0e
JW
2895 * configure.srv <tilegx*-*-linux*>: Remove linux-osdata.o from and add
2896 linux-tile-low.o to srv_tgtobj.
2897
c623a6ef
WN
28982013-09-16 Will Newton <will.newton@linaro.org>
2899
2900 * linux-aarch64-low.c (aarch64_linux_set_debug_regs): Zero
2901 out regs.
2902
fb71d39e
PA
29032013-09-06 Pedro Alves <palves@redhat.com>
2904
2905 * Makefile.in (gdb_proc_service_h, regdef_h, regcache_h)
2906 (signals_def, signals_h, ptid_h, ax_h, agent_h, linux_btrace_h)
2907 (linux_osdata_h, vec_h, gdb_vecs_h, host_defs_h, libiberty_h)
2908 (server_h, gdbthread_h, linux_low_h, linux_ptrace_h)
2909 (gdb_thread_db_h, linux_procfs_h, lynx_low_h, nto_low_h)
2910 (mips_linux_watch_h, i386_low_h, win32_low_h): Delete.
2911
8e7e9910
PA
29122013-09-06 Pedro Alves <palves@redhat.com>
2913
2914 * Makefile.in (linux-btrace.o, mips-linux-watch.o): Remove
2915 explicit header dependencies and use $COMPILE/$POSTCOMPILE.
2916
7c3a12ca
PA
29172013-09-06 Pedro Alves <palves@redhat.com>
2918
2919 * linux-amd64-ipa.c: Include tracepoint.h.
2920 * linux-i386-ipa.c: Include tracepoint.h.
2921
8eb3d7b6
RW
29222013-09-06 Ricard Wanderlof <ricardw@axis.com>
2923
2924 * linux-crisv32-low.c (PTRACE_GET_THREAD_AREA): New macro.
2925 (ps_get_thread_area): New function.
2926
eddddb9d
RW
29272013-09-06 Ricard Wanderlof <ricardw@axis.com>
2928
2929 * linux-crisv32-low.c (elf_gregset_t): Delete typedef.
2930 (initialize_low_arch): Call init_registers_crisv32 rather than
2931 init_register_crisv32.
2932
533b0600
PA
29332013-09-05 Pedro Alves <palves@redhat.com>
2934
2935 * server.h (handle_vFile, hostio_last_error_from_errno): Move
2936 to ...
2937 * hostio.h: ... this new file.
2938 * hostio.c, server.c, linux-low.c, nto-low.c, spu-low,
2939 win32-low.c: Include hostio.h.
2940
0ce3d3b5
PA
29412013-09-05 Pedro Alves <palves@redhat.com>
2942
2943 * server.h (gdb_client_data, handler_func, callback_handler_func)
2944 (delete_file_handler, add_file_handler, append_callback_event)
2945 (delete_callback_event, start_event_loop, initialize_event_loop):
2946 Move to event-loop.h and include it.
2947 * event-loop.h: New file.
2948
799cdc37
PA
29492013-09-05 Pedro Alves <palves@redhat.com>
2950
2951 * dll.c, inferiors.c, remote-utils.c, server.c: Include "dll.h".
2952 * server.h (struct dll_info, all_dlls, dlls_changed, clear_dlls)
2953 (loaded_dll, unloaded_dll): Move to ...
2954 * dll.h: ... this new file.
2955 * inferiors.c, remote-utils.c, win32-low.c: Include "dll.h".
2956
6a6bbd9d
PA
29572013-09-05 Pedro Alves <palves@redhat.com>
2958
2959 * server.h (current_process, get_thread_process, all_processes)
2960 (add_inferior_to_list, for_each_inferior, current_inferior)
2961 (remove_inferior, add_process, remove_process, find_process_pid)
2962 (have_started_inferiors_p, have_attached_inferiors_p)
2963 (thread_id_to_gdb_id, thread_to_gdb_id, gdb_id_to_thread_id)
2964 (clear_inferiors, find_inferior, find_inferior_id)
2965 (inferior_target_data, set_inferior_target_data)
2966 (inferior_regcache_data, set_inferior_regcache_data): Move to
2967 inferiors.h, and include it.
2968 * inferiors.h: New file.
2969
f699aaba
PA
29702013-09-05 Pedro Alves <palves@redhat.com>
2971
2972 * server.h (struct emit_ops, current_insn_ptr, emit_error):
2973 Move ...
72f4393d 2974 * ax.h: ... here.
f699aaba 2975
c144c7a0
PA
29762013-09-05 Pedro Alves <palves@redhat.com>
2977
2978 * ax.c, linux-low.c, linux-x86-low.c, server.c: Include
2979 tracepoint.h.
2980 * server.h (IPA_BUFSIZ, initialize_tracepoint, tracing)
2981 (disconnected_tracing, tracepoint_look_up_symbols, stop_tracing
2982 (handle_tracepoint_general_set, handle_tracepoint_query)
2983 (tracepoint_finished_step, tracepoint_was_hit)
2984 (release_while_stepping_state_list, current_traceframe)
2985 (in_readonly_region, traceframe_read_mem)
2986 (fetch_traceframe_registers, traceframe_read_sdata)
2987 (traceframe_read_info, struct fast_tpoint_collect_status)
2988 (fast_tracepoint_collecting, force_unlock_trace_buffer)
2989 (handle_tracepoit_bkpts, initialize_low_tracepoint)
2990 (supply_fast_tracepoint_registers)
2991 (supply_static_tracepoint_registers, set_trampoline_buffer_space)
2992 (ipa_tdesc, claim_trampoline_space)
2993 (have_fast_tracepoint_trampoline_buffer, gdb_agent_about_to_close)
2994 (agent_mem_read, agent_get_trace_state_variable_value)
2995 (agent_set_trace_state_variable_value, agent_tsv_read)
2996 (agent_mem_read_string, get_raw_reg_func_addr)
2997 (get_get_tsv_func_addr, get_set_tsv_func_addr): Move to ...
2998 * tracepoint.h: ... this new file.
2999
ff42e6ab
PA
30002013-09-05 Pedro Alves <palves@redhat.com>
3001
3002 * server.h (perror_with_name, error, fatal, warning, paddress)
3003 (pulongest, plongest, phex_nz, pfildes): Move to utils.h, and
3004 include it.
3005 * utils.h: New file.
3006
541af0f4
PA
30072013-09-05 Pedro Alves <palves@redhat.com>
3008
3009 * server.h (remote_debug, noack_mode, transport_is_reliable)
3010 (gdb_connected, STDIO_CONNECTION_NAME, remote_connection_is_stdio)
3011 (read_ptid, write_ptid, putpkt, putpkt_binary, putpkt_notif)
3012 (getpkt, remote_prepare, remote_open, remote_close, write_ok)
3013 (write_enn, initialize_async_io, enable_async_io)
3014 (disable_async_io, check_remote_input_interrupt_request)
3015 (convert_ascii_to_int, convert_int_to_ascii, new_thread_notify)
3016 (dead_thread_notify, prepare_resume_reply)
3017 (decode_address_to_semicolon, decode_address, decode_m_packet)
3018 (decode_M_packet, decode_X_packet, decode_xfer_write)
3019 (decode_search_memory_packet, unhexify, hexify)
3020 (remote_escape_output, unpack_varlen_hex, clear_symbol_cache)
3021 (look_up_one_symbol, relocate_instruction)
3022 (monitor_output): Move to remote-utils.h, and include it.
3023 * remote-utils.h: New file.
3024
eebdf26b
PA
30252013-09-05 Pedro Alves <palves@redhat.com>
3026
3027 * server.h (_): Delete.
3028
3aafd2ff
PA
30292013-09-02 Pedro Alves <palves@redhat.com>
3030
3031 * tracepoint.c (TRACEFRAME_EOB_MARKER_SIZE): New macro.
3032 (init_trace_buffer): Ensure at least TRACEFRAME_EOB_MARKER_SIZE is
3033 allocated.
3034 (trace_buffer_alloc): Use TRACEFRAME_EOB_MARKER_SIZE.
3035
cee83bcb
PM
30362013-09-02 Pierre Muller <muller@sourceware.org>
3037
3038 * win32-low.c (child_xfer_memory): Check if ReadProcessMemory
3039 or WriteProcessMemory complete successfully and handle
3040 ERROR_PARTIAL_COPY error.
3041
9a13b2fa
PA
30422013-09-02 Pedro Alves <palves@redhat.com>
3043
3044 * server.c (gdb_read_memory): Return -1 on traceframe memory read
3045 error instead of EIO.
3046
602e3198
JK
30472013-08-28 Jan Kratochvil <jan.kratochvil@redhat.com>
3048
3049 PR server/15604
3050 * linux-low.c: Include filestuff.h.
3051 (linux_create_inferior) <pid == 0>: Call close_most_fds.
3052 * lynx-low.c: Include filestuff.h.
3053 (lynx_create_inferior) <pid == 0>: Call close_most_fds.
3054 * server.c: Include filestuff.h.
3055 (main): Call notice_open_fds.
3056 * spu-low.c: Include filestuff.h.
3057 (spu_create_inferior) <pid == 0>: Call close_most_fds.
3058
96d7229d
LM
30592013-08-22 Luis Machado <lgustavo@codesourcery.com>
3060
3061 * Makefile.in: Explain why ../target and ../nat are not
3062 listed as include file search paths.
3063 (linux-waitpid.o): New object file rule.
3064 * configure.srv (srv_native_linux_obj): New variable.
3065 Replace all occurrences of linux native object files with
3066 $srv_native_linux_obj.
3067 * linux-low.c: Include nat/linux-nat.h and nat/linux-waitpid.h.
3068 (HAS_NOMMU): Move defining logic to common/linux-ptrace.c.
3069 (linux_enable_event_reporting): Remove declaration.
3070 (my_waitpid): Moved to common/linux-waitpid.c.
3071 (linux_wait_for_event): Pass ptid when calling
3072 linux_enable_event_reporting.
3073 (linux_supports_tracefork_flag): Remove.
3074 (linux_enable_event_reporting): Likewise.
3075 (linux_tracefork_grandchild): Remove.
3076 (STACK_SIZE): Moved to common/linux-ptrace.c.
3077 (linux_tracefork_child): Remove.
3078 (linux_test_for_tracefork): Remove.
3079 (linux_look_up_symbols): Call linux_supports_traceclone.
3080 (initialize_low): Remove call to linux_test_for_tracefork.
3081 * linux-low.h (PTRACE_TYPE_ARG3): Move to
3082 common/linux-ptrace.h.
3083 (PTRACE_TYPE_ARG4): Likewise.
3084 Include linux-ptrace.h.
3085
32940073
PA
30862013-08-21 Pedro Alves <palves@redhat.com>
3087
3088 * config.in: Renegerate.
3089
33b60d58 30902013-08-19 Luis Machado <lgustavo@codesourcery.com>
a261b8f5 3091
33b60d58
LM
3092 * Makefile.in (INCLUDE_CFLAGS): Include -I$(srcdir)/../.
3093 (SFILES): Remove $(srcdir)/common/target-common.c and
3094 add $(srcdir)/target/waitstatus.c.
3095 (OBS): Remove target-common.o and add waitstatus.o.
3096 (server_h): Remove $(srcdir)/../common/target-common.h and
3097 add $(srcdir)/../target/resume.h, $(srcdir)/../target/wait.h
3098 and $(srcdir)/../target/waitstatus.h.
3099 (target-common.o): Remove.
3100 (waitstatus.o): New target object file.
3101 * target.h: Do not include target-common.h and
3102 include target/resume.h, target/wait.h and
3103 target/waitstatus.h.
3104
b8e1b30e
LM
31052013-08-13 Luis Machado <lgustavo@codesourcery.com>
3106
3107 * linux-arm-low.c: Rename all occurrences of PTRACE_ARG3_TYPE
3108 to PTRACE_TYPE_ARG3.
3109 * linux-low.c: Rename all occurrences of PTRACE_ARG3_TYPE
3110 to PTRACE_TYPE_ARG3 and PTRACE_ARG4_TYPE to
3111 PTRACE_TYPE_ARG4.
3112 * linux-low.h (PTRACE_ARG3_TYPE): Rename to PTRACE_TYPE_ARG3.
3113 (PTRACE_ARG4_TYPE): Rename to PTRACE_TYPE_ARG4.
3114
7a60ad40
YQ
31152013-07-27 Jie Zhang <jie@codesourcery.com>
3116 Daniel Jacobowitz <dan@codesourcery.com>
3117 Yao Qi <yao@codesourcery.com>
3118
3119 * Makefile.in (SFILES): Add common/mips-linux-watch.c.
3120 (mips-linux-watch.o): New rule.
3121 (mips_linux_watch_h): New variable.
3122 * configure.srv <mips*-*-linux*>: Add mips-linux-watch.o to
3123 srv_tgtobj.
3124 * linux-mips-low.c: Include mips-linux-watch.h.
3125 (struct arch_process_info, struct arch_lwp_info): New.
3126 (update_watch_registers_callback): New function.
3127 (mips_linux_new_process, mips_linux_new_thread) New functions.
3128 (mips_linux_prepare_to_resume, mips_insert_point): New
3129 functions.
3130 (mips_remove_point, mips_stopped_by_watchpoint): New
3131 functions.
3132 (rsp_bp_type_to_target_hw_bp_type): New function.
3133 (mips_stopped_data_address): New function.
3134 (the_low_target): Add watchpoint support functions.
3135
de6f69ad
YQ
31362013-07-27 Yao Qi <yao@codesourcery.com>
3137
3138 * i386-low.c: Include break-common.h.
3139 (enum target_hw_bp_type): Remove.
3140
3360c0bf
LM
31412013-07-24 Luis Machado <lgustavo@codesourcery.com>
3142
3143 * Makefile.in (SFILES): /common/target-common.c.
3144 (OBS): Add target-common.o.
3145 (server_h): Add $(srcdir)/../common/target-common.h.
3146 (target-common.o): New target.
3147 * server.c (queue_stop_reply_callback): Free
3148 status string after use.
3149 * target.c (target_waitstatus_to_string): Remove.
3150 * target.h: Include target-common.h.
3151 (resume_kind): Likewise.
3152 (target_waitkind): Likewise.
3153 (target_waitstatus): Likewise.
3154 (TARGET_WNOHANG): Likewise.
3155
bd885420
YQ
31562013-07-04 Yao Qi <yao@codesourcery.com>
3157
3158 * Makefile.in (host_alias): Use @host_noncanonical@.
3159 (target_alias): Use @target_noncanonical@.
3160 * configure.ac: Use ACX_NONCANONICAL_TARGET and
3161 ACX_NONCANONICAL_HOST.
3162 * configure: Regenerated.
3163
3164 Revert:
3165 2013-06-28 Mircea Gherzan <mircea.gherzan@intel.com>
3166
3167 * configure.ac (version_host, version_target): Set and AC_SUBST them.
3168 * configure: Rebuild.
3169 * Makefile.in (version_host, version_target): Get from configure.
3170 (version.c): Use $(version_host) and $(version_target).
3171
17ef446e
PA
31722013-07-03 Pedro Alves <palves@redhat.com>
3173
3174 * Makefile.in (config.status): Depend on development.sh.
3175 * acinclude.m4: Include libmcheck.m4.
3176 * configure: Regenerate.
3177
7a9a7487
MG
31782013-07-02 Mircea Gherzan <mircea.gherzan@intel.com>
3179
3180 * win32-low.c (winapi_DebugActiveProcessStop): Move the WINAPI
3181 attribute inside the parentheses.
3182 (winapi_DebugSetProcessKillOnExit): Ditto.
3183 (winapi_DebugBreakProcess): Ditto.
3184 (winapi_GenerateConsoleCtrlEvent): Ditto.
a261b8f5 3185
49b64de6
MG
31862013-07-02 Mircea Gherzan <mircea.gherzan@intel.com>
3187
3188 * notif.h (notif_event): Add a dummy member to avoid compiler
3189 errors.
3190
d5749ee7
PA
31912013-07-01 Pedro Alves <palves@redhat.com>
3192
3193 * hostio.c (HOSTIO_PATH_MAX): Define.
3194 (require_filename, handle_open, handle_unlink, handle_readlink):
3195 Use it.
3196
d8d2a3ee
PA
31972013-07-01 Pedro Alves <palves@redhat.com>
3198
3199 * server.h: Include "pathmax.h".
3200 * linux-low.c: Don't include sys/param.h.
3201 (linux_pid_exe_is_elf_64_file): Use PATH_MAX instead of
3202 MAXPATHLEN.
3203 * win32-low.c: Don't include sys/param.h.
3204 (win32_create_inferior): Use PATH_MAX instead of MAXPATHLEN.
3205
bc7dea8d
PA
32062013-07-01 Pedro Alves <palves@redhat.com>
3207
3208 * event-loop.c: Don't check HAVE_UNISTD_H before including
3209 <unistd.h>.
3210 * gdbreplay.c: Likewise.
3211 * remote-utils.c: Likewise.
3212 * server.c: Likewise.
3213 * configure.ac: Don't check for unistd.h.
3214 * configure: Regenerate.
3215
d6c2da54
TT
32162013-06-28 Tom Tromey <tromey@redhat.com>
3217
3218 * Makefile.in (version.c): Use version.in, not
3219 common/version.in.
3220
257b6bec
MG
32212013-06-28 Mircea Gherzan <mircea.gherzan@intel.com>
3222
3223 * configure.ac (version_host, version_target): Set and AC_SUBST them.
3224 * configure: Rebuild.
3225 * Makefile.in (version_host, version_target): Get from configure.
3226 (version.c): Use $(version_host) and $(version_target).
3227
86ebe149
DK
32282013-06-10 Dmitry Kozlov <ddk@codesourcery.com>
3229
3230 Fix trace-status to output user name without trailing colon.
3231 * tracepoint.c (cmd_qtstatus): Remove unnecessary colon from user name.
3232
f30aa5af
DK
32332013-06-10 Dmitry Kozlov <ddk@codesourcery.com>
3234
3235 Fix trace-status to output proper start-time and stop-time.
3236 * tracepoint.c (cmd_qtstatus): Modify trace-status output to
3237 output start time and stop time in hex as gdb expects.
3238
28a93511
YQ
32392013-06-26 Pedro Alves <pedro@codesourcery.com>
3240
3241 * tracepoint.c (build_traceframe_info_xml): Output trace state
3242 variables present in the trace buffer.
3243
01208463
TT
32442013-06-24 Tom Tromey <tromey@redhat.com>
3245
3246 * Makefile.in (version.c): Use bfd/version.h, common/version.in,
3247 create-version.sh.
3248 (version.o): Remove.
3249 * gdbreplay.c: Include version.h.
3250 (version, host_name): Don't declare.
3251 * server.h: Include version.h.
3252 (version, host_name): Don't declare.
3253
760256f9
PA
32542013-06-12 Pedro Alves <palves@redhat.com>
3255
3256 * linux-x86-low.c (linux_is_elf64): Delete global.
3257 (x86_siginfo_fixup): Replace reference to `linux_is_elf64' global
3258 with local linux_pid_exe_is_elf_64_file use.
3259
030031ee
PA
32602013-06-11 Pedro Alves <palves@redhat.com>
3261
3262 * linux-low.c (regset_disabled, disable_regset): New functions.
3263 (regsets_fetch_inferior_registers)
3264 (regsets_store_inferior_registers): Use them.
3265 (initialize_regsets_info); Don't allocate the disabled_regsets
3266 array here.
3267 * linux-low.h (struct regsets_info) <disabled_regsets>: Extend
3268 comment.
3269
5da6eb0a
PA
32702013-06-11 Pedro Alves <palves@redhat.com>
3271
3272 * linux-low.c (initialize_regsets_info): Use xcalloc instead of
3273 xmalloc.
3274
7e5aaa09
PA
32752013-06-11 Pedro Alves <palves@redhat.com>
3276
3277 * linux-x86-low.c (initialize_low_arch): Call
3278 init_registers_x32_avx_linux.
3279
d878444c
JK
32802013-06-09 Jan Kratochvil <jan.kratochvil@redhat.com>
3281
3282 Fix compatibility with Android Bionic.
3283 * linux-low.c (linux_qxfer_libraries_svr4): Ignore first entry even if
3284 it is not empty.
3285
3aee8918
PA
32862013-06-07 Pedro Alves <palves@redhat.com>
3287
5f2b57b5 3288 PR server/14823
3aee8918
PA
3289 * Makefile.in (OBS): Add tdesc.o.
3290 (IPA_OBJS): Add tdesc-ipa.o.
3291 (tdesc-ipa.o): New rule.
3292 * ax.c (gdb_eval_agent_expr): Adjust register_size call to new
3293 interface.
3294 * linux-low.c (new_inferior): Delete.
3295 (disabled_regsets, num_regsets): Delete.
3296 (linux_add_process): Adjust to set the new per-process
3297 new_inferior flag.
3298 (linux_detach_one_lwp): Adjust to call regcache_invalidate_thread.
3299 (linux_wait_for_lwp): Adjust. Only call arch_setup if the event
3300 was a stop. When calling arch_setup, switch the current inferior
3301 to the thread that got an event.
3302 (linux_resume_one_lwp): Adjust to call regcache_invalidate_thread.
3303 (regsets_fetch_inferior_registers)
3304 (regsets_store_inferior_registers): New regsets_info parameter.
3305 Adjust to use it.
3306 (linux_register_in_regsets): New regs_info parameter. Adjust to
3307 use it.
3308 (register_addr, fetch_register, store_register): New usrregs_info
3309 parameter. Adjust to use it.
3310 (usr_fetch_inferior_registers, usr_store_inferior_registers): New
3311 parameter regs_info. Adjust to use it.
3312 (linux_fetch_registers): Get the current inferior's regs_info, and
3313 adjust to use it.
3314 (linux_store_registers): Ditto.
3315 [HAVE_LINUX_REGSETS] (initialize_regsets_info): New.
3316 (initialize_low): Don't initialize the target_regsets here. Call
3317 initialize_low_arch.
3318 * linux-low.h (target_regsets): Delete declaration.
3319 (struct regsets_info): New.
3320 (struct usrregs_info): New.
3321 (struct regs_info): New.
3322 (struct process_info_private) <new_inferior>: New field.
3323 (struct linux_target_ops): Delete the num_regs, regmap, and
3324 regset_bitmap fields. New field regs_info.
3325 [HAVE_LINUX_REGSETS] (initialize_regsets_info): Declare.
3326 * i387-fp.c (num_xmm_registers): Delete.
3327 (i387_cache_to_fsave, i387_fsave_to_cache): Adjust find_regno
3328 calls to new interface.
3329 (i387_cache_to_fxsave, i387_cache_to_xsave, i387_fxsave_to_cache)
3330 (i387_xsave_to_cache): Adjust find_regno calls to new interface.
3331 Infer the number of xmm registers from the regcache's target
3332 description.
3333 * i387-fp.h (num_xmm_registers): Delete.
3334 * inferiors.c (add_thread): Don't install the thread's regcache
3335 here.
3336 * proc-service.c (gregset_info): Fetch the current inferior's
3337 regs_info. Adjust to use it.
3338 * regcache.c: Include tdesc.h.
3339 (register_bytes, reg_defs, num_registers)
3340 (gdbserver_expedite_regs): Delete.
3341 (get_thread_regcache): If the thread doesn't have a regcache yet,
3342 create one, instead of aborting gdbserver.
3343 (regcache_invalidate_one): Rename to ...
3344 (regcache_invalidate_thread): ... this.
3345 (regcache_invalidate_one): New.
3346 (regcache_invalidate): Only invalidate registers of the current
3347 process.
3348 (init_register_cache): Add target_desc parameter, and use it.
3349 (new_register_cache): Ditto. Assert the target description has a
3350 non zero registers_size.
3351 (regcache_cpy): Add assertions. Adjust.
3352 (realloc_register_cache, set_register_cache): Delete.
3353 (registers_to_string, registers_from_string): Adjust.
3354 (find_register_by_name, find_regno, find_register_by_number)
3355 (register_cache_size): Add target_desc parameter, and use it.
3356 (free_register_cache_thread, free_register_cache_thread_one)
3357 (regcache_release, register_cache_size): New.
3358 (register_size): Add target_desc parameter, and use it.
3359 (register_data, supply_register, supply_register_zeroed)
3360 (supply_regblock, supply_register_by_name, collect_register)
3361 (collect_register_as_string, collect_register_by_name): Adjust.
3362 * regcache.h (struct target_desc): Forward declare.
3363 (struct regcache) <tdesc>: New field.
3364 (init_register_cache, new_register_cache): Add target_desc
3365 parameter.
3366 (regcache_invalidate_thread): Declare.
3367 (regcache_invalidate_one): Delete declaration.
3368 (regcache_release): Declare.
3369 (find_register_by_number, register_cache_size, register_size)
3370 (find_regno): Add target_desc parameter.
3371 (gdbserver_expedite_regs, gdbserver_xmltarget): Delete
3372 declarations.
3373 * remote-utils.c: Include tdesc.h.
3374 (outreg, prepare_resume_reply): Adjust.
3375 * server.c: Include tdesc.h.
3376 (gdbserver_xmltarget): Delete declaration.
3377 (get_features_xml, process_serial_event): Adjust.
3378 * server.h [IN_PROCESS_AGENT] (struct target_desc): Forward
3379 declare.
3380 (struct process_info) <tdesc>: New field.
3381 (ipa_tdesc): Declare.
3382 * tdesc.c: New file.
3383 * tdesc.h: New file.
3384 * tracepoint.c: Include tdesc.h.
3385 [IN_PROCESS_AGENT] (ipa_tdesc): Define.
3386 (get_context_regcache): Adjust to pass ipa_tdesc down.
3387 (do_action_at_tracepoint): Adjust to get the register cache size
3388 from the context regcache's description.
3389 (traceframe_walk_blocks): Adjust to get the register cache size
3390 from the current trace frame's description.
3391 (traceframe_get_pc): Adjust to get current trace frame's
3392 description and pass it down.
3393 (gdb_collect): Adjust to get the register cache size from the
3394 IPA's description.
3395 * linux-amd64-ipa.c (tdesc_amd64_linux): Declare.
3396 (gdbserver_xmltarget): Delete.
3397 (initialize_low_tracepoint): Set the ipa's target description.
3398 * linux-i386-ipa.c (tdesc_i386_linux): Declare.
3399 (initialize_low_tracepoint): Set the ipa's target description.
3400 * linux-x86-low.c: Include tdesc.h.
3401 [__x86_64__] (is_64bit_tdesc): New.
3402 (ps_get_thread_area, x86_get_thread_area): Use it.
3403 (i386_cannot_store_register): Rename to ...
3404 (x86_cannot_store_register): ... this. Use is_64bit_tdesc.
3405 (i386_cannot_fetch_register): Rename to ...
3406 (x86_cannot_fetch_register): ... this. Use is_64bit_tdesc.
3407 (x86_fill_gregset, x86_store_gregset): Adjust register_size calls
3408 to new interface.
3409 (target_regsets): Rename to ...
3410 (x86_regsets): ... this.
3411 (x86_get_pc, x86_set_pc): Adjust register_size calls to new
3412 interface.
3413 (x86_siginfo_fixup): Use is_64bit_tdesc.
3414 [__x86_64__] (tdesc_amd64_linux, tdesc_amd64_avx_linux)
3415 (tdesc_x32_avx_linux, tdesc_x32_linux)
3416 (tdesc_i386_linux, tdesc_i386_mmx_linux, tdesc_i386_avx_linux):
3417 Declare.
3418 (x86_linux_update_xmltarget): Delete.
3419 (I386_LINUX_XSAVE_XCR0_OFFSET): Define.
3420 (have_ptrace_getfpxregs, have_ptrace_getregset): New.
3421 (AMD64_LINUX_USER64_CS): New.
3422 (x86_linux_read_description): New, based on
3423 x86_linux_update_xmltarget.
3424 (same_process_callback): New.
3425 (x86_arch_setup_process_callback): New.
3426 (x86_linux_update_xmltarget): New.
3427 (x86_regsets_info): New.
3428 (amd64_linux_regs_info): New.
3429 (i386_linux_usrregs_info): New.
3430 (i386_linux_regs_info): New.
3431 (x86_linux_regs_info): New.
3432 (x86_arch_setup): Reimplement.
3433 (x86_install_fast_tracepoint_jump_pad): Use is_64bit_tdesc.
3434 (x86_emit_ops): Ditto.
3435 (the_low_target): Adjust. Install x86_linux_regs_info,
3436 x86_cannot_fetch_register, and x86_cannot_store_register.
3437 (initialize_low_arch): New.
3438 * linux-ia64-low.c (tdesc_ia64): Declare.
3439 (ia64_fetch_register): Adjust.
3440 (ia64_usrregs_info, regs_info): New globals.
3441 (ia64_regs_info): New function.
3442 (the_low_target): Adjust.
3443 (initialize_low_arch): New function.
3444 * linux-sparc-low.c (tdesc_sparc64): Declare.
3445 (sparc_fill_gregset_to_stack, sparc_store_gregset_from_stack):
3446 Adjust.
3447 (sparc_arch_setup): New function.
3448 (sparc_regsets_info, sparc_usrregs_info, regs_info): New globals.
3449 (the_low_target): Adjust.
3450 (initialize_low_arch): New function.
3451 * linux-ppc-low.c (tdesc_powerpc_32l, tdesc_powerpc_altivec32l)
3452 (tdesc_powerpc_cell32l, tdesc_powerpc_vsx32l)
3453 (tdesc_powerpc_isa205_32l, tdesc_powerpc_isa205_altivec32l)
3454 (tdesc_powerpc_isa205_vsx32l, tdesc_powerpc_e500l)
3455 (tdesc_powerpc_64l, tdesc_powerpc_altivec64l)
3456 (tdesc_powerpc_cell64l, tdesc_powerpc_vsx64l)
3457 (tdesc_powerpc_isa205_64l, tdesc_powerpc_isa205_altivec64l)
3458 (tdesc_powerpc_isa205_vsx64l): Declare.
3459 (ppc_cannot_store_register, ppc_collect_ptrace_register)
3460 (ppc_supply_ptrace_register, parse_spufs_run, ppc_get_pc)
3461 (ppc_set_pc, ppc_get_hwcap): Adjust.
3462 (ppc_usrregs_info): Forward declare.
3463 (!__powerpc64__) ppc_regmap_adjusted: New global.
3464 (ppc_arch_setup): Adjust to the current process'es target
3465 description.
3466 (ppc_fill_vsxregset, ppc_store_vsxregset, ppc_fill_vrregset)
3467 (ppc_store_vrregset, ppc_fill_evrregset, ppc_store_evrregse)
3468 (ppc_store_evrregset): Adjust.
3469 (target_regsets): Rename to ...
3470 (ppc_regsets): ... this, and make static.
3471 (ppc_usrregs_info, ppc_regsets_info, regs_info): New globals.
3472 (ppc_regs_info): New function.
3473 (the_low_target): Adjust.
3474 (initialize_low_arch): New function.
3475 * linux-s390-low.c (tdesc_s390_linux32, tdesc_s390_linux32v1)
3476 (tdesc_s390_linux32v2, tdesc_s390_linux64, tdesc_s390_linux64v1)
3477 (tdesc_s390_linux64v2, tdesc_s390x_linux64, tdesc_s390x_linux64v1)
3478 (tdesc_s390x_linux64v2): Declare.
3479 (s390_collect_ptrace_register, s390_supply_ptrace_register)
3480 (s390_fill_gregset, s390_store_last_break): Adjust.
3481 (target_regsets): Rename to ...
3482 (s390_regsets): ... this, and make static.
3483 (s390_get_pc, s390_set_pc): Adjust.
3484 (s390_get_hwcap): New target_desc parameter, and use it.
3485 [__s390x__] (have_hwcap_s390_high_gprs): New global.
3486 (s390_arch_setup): Adjust to set the current process'es target
3487 description. Don't adjust the regmap.
3488 (s390_usrregs_info, s390_regsets_info, regs_info): New globals.
3489 [__s390x__] (s390_usrregs_info_3264, s390_regsets_info_3264)
3490 (regs_info_3264): New globals.
3491 (s390_regs_info): New function.
3492 (the_low_target): Adjust.
3493 (initialize_low_arch): New function.
3494 * linux-mips-low.c (tdesc_mips_linux, tdesc_mips_dsp_linux)
3495 (tdesc_mips64_linux, tdesc_mips64_dsp_linux): Declare.
3496 [__mips64] (init_registers_mips_linux)
3497 (init_registers_mips_dsp_linux): Delete defines.
3498 [__mips64] (tdesc_mips_linux, tdesc_mips_dsp_linux): New defines.
3499 (have_dsp): New global.
3500 (mips_read_description): New, based on mips_arch_setup.
3501 (mips_arch_setup): Reimplement.
3502 (get_usrregs_info): New function.
3503 (mips_cannot_fetch_register, mips_cannot_store_register)
3504 (mips_get_pc, mips_set_pc, mips_fill_gregset, mips_store_gregset)
3505 (mips_fill_fpregset, mips_store_fpregset): Adjust.
3506 (target_regsets): Rename to ...
3507 (mips_regsets): ... this, and make static.
3508 (mips_regsets_info, mips_dsp_usrregs_info, mips_usrregs_info)
3509 (dsp_regs_info, regs_info): New globals.
3510 (mips_regs_info): New function.
3511 (the_low_target): Adjust.
3512 (initialize_low_arch): New function.
3513 * linux-arm-low.c (tdesc_arm, tdesc_arm_with_iwmmxt)
3514 (tdesc_arm_with_vfpv2, tdesc_arm_with_vfpv3, tdesc_arm_with_neon):
3515 Declare.
3516 (arm_fill_vfpregset, arm_store_vfpregset): Adjust.
3517 (arm_read_description): New, with bits factored from
3518 arm_arch_setup.
3519 (arm_arch_setup): Reimplement.
3520 (target_regsets): Rename to ...
3521 (arm_regsets): ... this, and make static.
3522 (arm_regsets_info, arm_usrregs_info, regs_info): New globals.
3523 (arm_regs_info): New function.
3524 (the_low_target): Adjust.
3525 (initialize_low_arch): New function.
3526 * linux-m68k-low.c (tdesc_m68k): Declare.
3527 (target_regsets): Rename to ...
3528 (m68k_regsets): ... this, and make static.
3529 (m68k_regsets_info, m68k_usrregs_info, regs_info): New globals.
3530 (m68k_regs_info): New function.
3531 (m68k_arch_setup): New function.
3532 (the_low_target): Adjust.
3533 (initialize_low_arch): New function.
3534 * linux-sh-low.c (tdesc_sharch): Declare.
3535 (target_regsets): Rename to ...
3536 (sh_regsets): ... this, and make static.
3537 (sh_regsets_info, sh_usrregs_info, regs_info): New globals.
3538 (sh_regs_info, sh_arch_setup): New functions.
3539 (the_low_target): Adjust.
3540 (initialize_low_arch): New function.
3541 * linux-bfin-low.c (tdesc_bfin): Declare.
3542 (bfin_arch_setup): New function.
3543 (bfin_usrregs_info, regs_info): New globals.
3544 (bfin_regs_info): New function.
3545 (the_low_target): Adjust.
3546 (initialize_low_arch): New function.
3547 * linux-cris-low.c (tdesc_cris): Declare.
3548 (cris_arch_setup): New function.
3549 (cris_usrregs_info, regs_info): New globals.
3550 (cris_regs_info): New function.
3551 (the_low_target): Adjust.
3552 (initialize_low_arch): New function.
3553 * linux-cris-low.c (tdesc_crisv32): Declare.
3554 (cris_arch_setup): New function.
3555 (cris_regsets_info, cris_usrregs_info, regs_info): New globals.
3556 (cris_regs_info): New function.
3557 (the_low_target): Adjust.
3558 (initialize_low_arch): New function.
3559 * linux-m32r-low.c (tdesc_m32r): Declare.
3560 (m32r_arch_setup): New function.
3561 (m32r_usrregs_info, regs_info): New globals.
3562 (m32r_regs_info): Adjust.
3563 (initialize_low_arch): New function.
3564 * linux-tic6x-low.c (tdesc_tic6x_c64xp_linux)
3565 (tdesc_tic6x_c64x_linux, tdesc_tic6x_c62x_linux): Declare.
3566 (tic6x_usrregs_info): Forward declare.
3567 (tic6x_read_description): New function, based on ...
3568 (tic6x_arch_setup): ... this. Reimplement.
3569 (target_regsets): Rename to ...
3570 (tic6x_regsets): ... this, and make static.
3571 (tic6x_regsets_info, tic6x_usrregs_info, regs_info): New globals.
3572 (tic6x_regs_info): New function.
3573 (the_low_target): Adjust.
3574 (initialize_low_arch): New function.
3575 * linux-xtensa-low.c (tdesc_xtensa): Declare.
3576 (xtensa_fill_gregset, xtensa_store_gregset): Adjust.
3577 (target_regsets): Rename to ...
3578 (xtensa_regsets): ... this, and make static.
3579 (xtensa_regsets_info, xtensa_usrregs_info, regs_info): New
3580 globals.
3581 (xtensa_arch_setup, xtensa_regs_info): New functions.
3582 (the_low_target): Adjust.
3583 (initialize_low_arch): New function.
3584 * linux-nios2-low.c (tdesc_nios2_linux): Declare.
3585 (nios2_arch_setup): Set the current process'es tdesc.
3586 (target_regsets): Rename to ...
3587 (nios2_regsets): ... this.
3588 (nios2_regsets_info, nios2_usrregs_info, regs_info): New globals.
3589 (nios2_regs_info): New function.
3590 (the_low_target): Adjust.
3591 (initialize_low_arch): New function.
a261b8f5
PA
3592 * linux-aarch64-low.c (tdesc_aarch64): Declare.
3593 (aarch64_arch_setup): Set the current process'es tdesc.
3594 (target_regsets): Rename to ...
3595 (aarch64_regsets): ... this.
3596 (aarch64_regsets_info, aarch64_usrregs_info, regs_info): New globals.
3597 (aarch64_regs_info): New function.
3598 (the_low_target): Adjust.
3599 (initialize_low_arch): New function.
3aee8918
PA
3600 * linux-tile-low.c (tdesc_tilegx, tdesc_tilegx32): Declare
3601 globals.
3602 (target_regsets): Rename to ...
3603 (tile_regsets): ... this.
3604 (tile_regsets_info, tile_usrregs_info, regs_info): New globals.
3605 (tile_regs_info): New function.
3606 (tile_arch_setup): Set the current process'es tdesc.
3607 (the_low_target): Adjust.
3608 (initialize_low_arch): New function.
3609 * spu-low.c (tdesc_spu): Declare.
3610 (spu_create_inferior, spu_attach): Set the new process'es tdesc.
3611 * win32-arm-low.c (tdesc_arm): Declare.
3612 (arm_arch_setup): New function.
3613 (the_low_target): Install arm_arch_setup instead of
3614 init_registers_arm.
3615 * win32-i386-low.c (tdesc_i386, tdesc_amd64): Declare.
3616 (init_windows_x86): Rename to ...
3617 (i386_arch_setup): ... this. Set `win32_tdesc'.
3618 (the_low_target): Adjust.
3619 * win32-low.c (win32_tdesc): New global.
3620 (child_add_thread): Don't create the thread cache here.
3621 (do_initial_child_stuff): Set the new process'es tdesc.
3622 * win32-low.h (struct target_desc): Forward declare.
3623 (win32_tdesc): Declare.
3624 * lynx-i386-low.c (tdesc_i386): Declare global.
3625 (lynx_i386_arch_setup): Set `lynx_tdesc'.
3626 * lynx-low.c (lynx_tdesc): New global.
3627 (lynx_add_process): Set the new process'es tdesc.
3628 * lynx-low.h (struct target_desc): Forward declare.
3629 (lynx_tdesc): Declare global.
3630 * lynx-ppc-low.c (tdesc_powerpc_32): Declare global.
3631 (lynx_ppc_arch_setup): Set `lynx_tdesc'.
3632 * nto-low.c (nto_tdesc): New global.
3633 (do_attach): Set the new process'es tdesc.
3634 * nto-low.h (struct target_desc): Forward declare.
3635 (nto_tdesc): Declare.
3636 * nto-x86-low.c (tdesc_i386): Declare.
3637 (nto_x86_arch_setup): Set `nto_tdesc'.
3638
b1fbec62
GB
36392013-06-04 Gary Benson <gbenson@redhat.com>
3640
3641 * server.c (handle_query): Add "augmented-libraries-svr4-read+"
3642 to qSupported response when appropriate.
3643 (handle_qxfer_libraries_svr4): Allow qXfer:libraries-svr4:read
3644 with nonzero-length annex.
3645 * linux-low.c (linux_qxfer_libraries_svr4): Parse and handle
3646 arguments supplied in annex.
3647
d1ec4ce7
DE
36482013-05-31 Doug Evans <dje@google.com>
3649
ac44adcb 3650 PR server/15594
d1ec4ce7
DE
3651 * linux-x86-low.c (ps_get_thread_area): Properly extend address to
3652 64 bits in 64-cross-32 environment.
3653
9b25f2d3
PA
36542013-05-28 Pedro Alves <palves@redhat.com>
3655
3656 * Makefile.in (clean): Remove reference to aarch64-without-fpu.c.
3657 (aarch64-without-fpu.c): Delete rule.
3658 * configure.srv (aarch64*-*-linux*): Remove references to
3659 aarch64-without-fpu.o and aarch64-without-fpu.xml.
3660 * linux-aarch64-low.c (init_registers_aarch64_without_fpu): Remove
3661 declaration.
3662
6740dc9c
PA
36632013-05-24 Pedro Alves <palves@redhat.com>
3664
3665 * server.c (handle_v_cont) <vCont;r>: Use unpack_varlen_hex
3666 instead of strchr/decode_address. Error if the range isn't split
3667 with a ','. Don't assume there's be a ':' in the action.
3668
c2d6af84
PA
36692013-05-23 Yao Qi <yao@codesourcery.com>
3670 Pedro Alves <palves@redhat.com>
3671
3672 * linux-low.c (lwp_in_step_range): New function.
3673 (linux_wait_1): If the thread was range stepping and stopped
3674 outside the stepping range, report the stop to GDB. Otherwise,
3675 continue stepping. Add range stepping debug output.
3676 (linux_set_resume_request): Copy the step range from the resume
3677 request to the lwp.
3678 (linux_supports_range_stepping): New.
3679 (linux_target_ops) <supports_range_stepping>: Set to
3680 linux_supports_range_stepping.
3681 * linux-low.h (struct linux_target_ops)
3682 <supports_range_stepping>: New field.
3683 (struct lwp_info) <step_range_start, step_range_end>: New fields.
3684 * linux-x86-low.c (x86_supports_range_stepping): New.
3685 (the_low_target) <supports_range_stepping>: Set to
3686 x86_supports_range_stepping.
3687 * server.c (handle_v_cont): Handle 'r' action.
3688 (handle_v_requests): Append ";r" if the target supports range
3689 stepping.
3690 * target.h (struct thread_resume) <step_range_start,
3691 step_range_end>: New fields.
3692 (struct target_ops) <supports_range_stepping>:
3693 New field.
3694 (target_supports_range_stepping): New macro.
3695
58794e1a
JB
36962013-05-17 Joel Brobecker <brobecker@adacore.com>
3697
3698 * lynx-low.c (lynx_resume): Fix null_ptid/minus_one_ptid
3699 confusion in comment.
3700
d631c5a7
JB
37012013-05-17 Joel Brobecker <brobecker@adacore.com>
3702
3703 * lynx-low.c (struct process_info_private): New type.
3704 (lynx_add_process): New function.
3705 (lynx_create_inferior, lynx_attach): Replace calls to
3706 add_process by calls to lynx_add_process.
3707 (lynx_resume): If PTID is null, then try using
3708 current_process()->private->last_wait_event_ptid.
3709 Add comments.
3710 (lynx_clear_inferiors): Delete. The contents of that function
3711 has been inlined in lynx_mourn;
3712 (lynx_wait_1): Save the ptid in the process's private data.
3713 (lynx_mourn): Free the process' private data. Replace call
3714 to lynx_clear_inferiors by call to clear_inferiors.
3715
96f7a20f
YQ
37162013-05-17 Yao Qi <yao@codesourcery.com>
3717
3718 * i386-low.c (i386_length_and_rw_bits): Move the comment to
3719 the right place.
3720
db0dfaa0
LM
37212013-05-16 Luis Machado <lgustavo@codesourcery.com>
3722
3723 * linux-low.c: Move definition checks upwards for PT_TEXT_ADDR,
3724 PT_DATA_ADDR and PT_TEXT_END_ADDR. Update comments.
3725 (linux_read_offsets): Remove PT_TEXT_ADDR, PT_DATA_ADDR and
3726 PT_TEXT_END_ADDR guards. Update comments.
3727 (linux_target_op) <read_offsets>: Conditionally define to
3728 linux_read_offsets if the target is UCLIBC and if it defines
3729 PT_TEXT_ADDR, PT_DATA_ADDR and PT_TEXT_END_ADDR.
3730
68f5f838
SL
37312013-05-06 Sandra Loosemore <sandra@codesourcery.com>
3732 Andrew Jenner <andrew@codesourcery.com>
3733
3734 * Makefile.in (SFILES): Add linux-nios2-low.c.
3735 (clean): Add action to delete nios2-linux.c.
3736 (nios2-linux.c): New rule.
3737 * configure.srv: Add nios2*-*-linux*.
3738 * linux-nios2-low.c: New.
3739
1ebff1fd
HAQ
37402013-05-03 Hafiz Abid Qadeer <abidh@codesourcery.com>
3741
3742 * tracepoint.c (cmd_qtinit): Call 'stop_tracing'.
3743
f6150862
HZ
37442013-04-25 Hui Zhu <hui@codesourcery.com>
3745
3746 PR gdb/15186
f6150862
HZ
3747 * ax.c (ax_printf): Add fflush.
3748
614c279d
TT
37492013-04-22 Tom Tromey <tromey@redhat.com>
3750
3751 * Makefile.in (SFILES): Add filestuff.c.
3752 (OBS): Add filestuff.o.
3753 (filestuff.o): New target.
3754 * config.in, configure: Rebuild.
3755 * configure.ac: Check for fdwalk, pipe2.
3756
7d4e5717
PA
37572013-04-17 Pedro Alves <palves@redhat.com>
3758
3759 * configure.ac (USE_THREAD_DB): Delete variable.
3760 (if test "$srv_linux_thread_db" = "yes"): AC_DEFINE USE_THREAD_DB.
3761 Don't AC_SUBST USE_THREAD_DB.
3762 * Makefile.in (INTERNAL_CFLAGS): Remove @USE_THREAD_DB@.
3763 * config.in, configure: Regenerate.
3764
d5c93e41
PA
37652013-04-16 Pedro Alves <palves@redhat.com>
3766
3767 * linux-low.h (struct lwp_info) <thread_known>: Move under
3768 the USE_THREAD_DB #ifdef.
3769
04f5fe89
PA
37702013-04-16 Pedro Alves <palves@redhat.com>
3771
3772 * Makefile.in (INTERNAL_CFLAGS): Add @USE_THREAD_DB@.
3773 (linux-low.o): Delete rule.
3774 * linux-low.h: Always include "gdb_thread_db.h" instead of
3775 conditionally including thread_db.h.
3776 (struct lwp_info) <th>: Guard with #ifdef USE_THREAD_DB instead of
3777 HAVE_THREAD_DB_H.
3778
480b27bf
JK
37792013-04-07 Jan Kratochvil <jan.kratochvil@redhat.com>
3780
3781 * Makefile.in (install-only): Fix make install regression.
3782
43662968
JK
37832013-04-05 Jan Kratochvil <jan.kratochvil@redhat.com>
3784
3785 Convert man pages to texinfo, new gdbinit.5 texinfo page.
3786 * Makefile.in (install-only): Remove $(man1dir) and gdbserver.1
3787 installation.
3788 * gdbserver.1: Remove.
3789
3e74e146
PA
37902013-03-22 Pedro Alves <palves@redhat.com>
3791
3792 * linux-low.c (handle_extended_wait): Don't call
3793 linux_enable_event_reporting.
3794
a8347a2a
TT
37952013-03-15 Tony Theodore <tonyt@logyst.com>
3796
3797 PR build/9098:
3798 * Makefile.in (SHELL): Use @SHELL@.
3799
eeb56fa7
SDJ
38002013-03-14 Sergio Durigan Junior <sergiodj@redhat.com>
3801
3802 * tracepoint.c (cmd_qtv): Initialize `val' with zero, silencing
3803 compiler warning.
3804
4fa7e2ff
JB
38052013-03-13 Joel Brobecker <brobecker@adacore.com>
3806
3807 * linux-low.c (linux_target_ops) [!HAVE_LINUX_BTRACE]:
3808 Remove extraneous NULL element.
3809
8ddb1965
YQ
38102013-03-13 Yao Qi <yao@codesourcery.com>
3811
3812 * tracepoint.c (traceframe_read_tsv): Look for the last matched
3813 'V' block in trace frame.
3814
9accd112
MM
38152013-03-11 Markus Metzger <markus.t.metzger@intel.com>
3816
3817 * target.h (struct target_ops): Add btrace ops.
3818 (target_supports_btrace): New macro.
3819 (target_enable_btrace): New macro.
3820 (target_disable_btrace): New macro.
3821 (target_read_btrace): New macro.
3822 * gdbthread.h (struct thread_info): Add btrace field.
3823 * server.c: Include btrace-common.h.
3824 (handle_btrace_general_set): New function.
3825 (handle_btrace_enable): New function.
3826 (handle_btrace_disable): New function.
3827 (handle_general_set): Call handle_btrace_general_set.
3828 (handle_qxfer_btrace): New function.
3829 (struct qxfer qxfer_packets[]): Add btrace entry.
3830 * inferiors.c (remove_thread): Disable btrace.
3831 * linux-low: Include linux-btrace.h.
3832 (linux_low_enable_btrace): New function.
3833 (linux_low_read_btrace): New function.
3834 (linux_target_ops): Add btrace ops.
3835 * configure.srv (i[34567]86-*-linux*): Add linux-btrace.o.
3836 Add srv_linux_btrace=yes.
3837 (x86_64-*-linux*): Add linux-btrace.o.
3838 Add srv_linux_btrace=yes.
3839 * configure.ac: Define HAVE_LINUX_BTRACE.
3840 * config.in: Regenerated.
3841 * configure: Regenerated.
3842
5cc22e4c
MM
38432013-03-11 Markus Metzger <markus.t.metzger@intel.com>
3844
3845 * server.c (handle_qxfer): Preserve error message if -3 is
3846 returned.
3847 (qxfer): Document the -3 return value.
3848
7c97f91e
MM
38492013-03-11 Markus Metzger <markus.t.metzger@intel.com>
3850
3851 * Makefile.in (SFILES): Add $(srcdir)/common/linux-btrace.c.
3852 (linux_btrace_h): New variable.
3853 (linux-btrace.o): New rule.
3854
be9a119c 38552013-03-08 Stan Shebs <stan@codesourcery.com>
f6f899bf
HAQ
3856 Hafiz Abid Qadeer <abidh@codesourcery.com>
3857
3858 * tracepoint.c (trace_buffer_size): New global.
3859 (DEFAULT_TRACE_BUFFER_SIZE): New define.
3860 (init_trace_buffer): Change to one-argument function. Allocate
3861 trace buffer memory.
3862 (handle_tracepoint_general_set): Call cmd_bigqtbuffer_size to
3863 handle QTBuffer:size packet.
3864 (cmd_bigqtbuffer_size): New function.
3865 (initialize_tracepoint): Call init_trace_buffer with
3866 DEFAULT_TRACE_BUFFER_SIZE.
3867 * server.c (handle_query): Add QTBuffer:size in the
3868 supported packets.
3869
e64f7499
YQ
38702013-03-07 Yao Qi <yao@codesourcery.com>
3871
3872 * tracepoint.c (cur_action, cur_step_action): Make them unsigned.
3873 (cmd_qtfp): Initialize cur_action and cur_step_action 0 instead
3874 of -1.
3875 (cmd_qtsp): Adjust condition. Do post increment.
3876 Set cur_action and cur_step_action back to 0.
3877
f0ae6fc3
PA
38782013-03-07 Jeremy Bennett <jeremy.bennett@embecosm.com>
3879
3880 PR server/15236
3881 * linux-low.c (linux_write_memory): Return early success if LEN is
3882 zero.
3883
b5b0b0af
CV
38842013-03-05 Corinna Vinschen <vinschen@redhat.de>
3885
334ad4a8 3886 * configure.srv: Add x86_64-*-cygwin* as target.
b5b0b0af 3887
589bc927
TT
38882013-02-28 Tom Tromey <tromey@redhat.com>
3889
3890 * configure.ac: Invoke AC_SYS_LARGEFILE.
3891 * configure, config.in: Rebuild.
3892
dfe07582
CV
38932013-02-28 Corinna Vinschen <vinschen@redhat.com>
3894
3895 * win32-low.c: Throughout, fix format strings and casts of
3896 printf-like functions to avoid type related warnings on all
3897 platforms.
3898 (get_child_debug_event): Print dwDebugEventCode as hex since
3899 that's how it's usually documented.
3900
736cd585
YQ
39012013-02-28 Yao Qi <yao@codesourcery.com>
3902
3903 * tracepoint.c (cmd_qtbuffer): Call phex_nz instead of
3904 pulongest.
3905
e1f58301
JW
39062013-02-27 Jiong Wang <jiwang@tilera.com>
3907
3908 * Makefile.in (clean): Remove reg-tilegx.c, reg-tilegx32.c.
3909 (reg-tilegx32.c): New rule.
3910 * configure.srv (tilegx-*-linux*): Add reg-tilegx32.o to srv_regobj.
3911 * linux-tile-low.c (tile_arch_setup): New function. Invoke
3912 different register info initializer according to elf class.
3913 (init_registers_tilgx32): New function. The tilegx32 register info
3914 initializer.
3915 (tile_fill_gregset): Use "uint_reg_t" to represent register size.
3916 (tile_store_gregset): Likewise.
3917
d171ca78
YQ
39182013-02-27 Yao Qi <yao@codesourcery.com>
3919
3920 * server.c (process_point_options): Print debug message when
3921 debug_threads is true.
3922
282bbdf3
YQ
39232013-02-26 Yao Qi <yao@codesourcery.com>
3924
3925 * tracepoint.c (cmd_qtbuffer): Don't set '\0' in OWN_BUF.
3926
aca22551
PA
39272013-02-19 Pedro Alves <palves@redhat.com>
3928 Kai Tietz <ktietz@redhat.com>
3929
3930 PR gdb/15161
3931
3932 * server.c (handle_query) <CRC check>: Use unpack_varlen_hex
3933 instead of strtoul to extract address from packet.
3934 (process_serial_event) <'z'>: Likewise.
3935
4f3cee1c
YQ
39362013-02-18 Yao Qi <yao@codesourcery.com>
3937
3938 * linux-bfin-low.c (the_low_target): Use NULL instead of 0.
3939
8e1d55a3
PA
39402013-02-14 Pedro Alves <palves@redhat.com>
3941
3942 Plug memory leak.
3943
3944 * tracepoint.c (cmd_qtnotes): Free TRACING_USER_NAME,
3945 TRACING_NOTES and TRACING_STOP_NOTE before clobbering.
3946
458820da
PA
39472013-02-14 Pedro Alves <palves@redhat.com>
3948
3949 * tracepoint.c (cmd_qtdpsrc): Use savestring.
3950
baea0dae
PA
39512013-02-14 Pedro Alves <palves@redhat.com>
3952
3953 * tracepoint.c (save_string): Delete.
3954 (add_tracepoint_action): Use savestring instead of save_string.
3955
0b1afbb3
PA
39562013-02-12 Pedro Alves <palves@redhat.com>
3957
3958 * linux-xtensa-low.c: Ditto.
3959 * xtensa-xtregs.c: Ditto.
3960
8a4ac37e
PA
39612013-02-12 Sanimir Agovic <sanimir.agovic@intel.com>
3962
3963 * thread-db.c (thread_db_get_tls_address): NULL pointer check
3964 thread_db.
3965
148de6bb
MS
39662013-02-07 Marcus Shawcroft <marcus.shawcroft@arm.com>
3967
3968 * linux-aarch64-low.c (aarch64_arch_setup): Clamp
3969 aarch64_num_wp_regs and aarch64_num_bp_regs to
3970 AARCH64_HWP_MAX_NUM and AARCH64_HBP_MAX_NUM respectively.
3971
55fac6e0
MS
39722013-02-07 Marcus Shawcroft <marcus.shawcroft@arm.com>
3973
3974 * linux-aarch64-low.c (ps_get_thread_area): Replace
3975 PTRACE_GET_THREAD_AREA with PTRACE_GETREGSET.
3976
176eb98c
MS
39772013-02-04 Jim MacArthur <jim.macarthur@arm.com>
3978 Marcus Shawcroft <marcus.shawcroft@arm.com>
3979 Nigel Stephens <nigel.stephens@arm.com>
3980 Yufeng Zhang <yufeng.zhang@arm.com>
3981
3982 * Makefile.in (clean): Remove aarch64.c and aarch64-without-fpu.c.
3983 (aarch64.c, aarch64-without-fpu.c): New targets.
3984 * configure.srv (aarch64*-*-linux*): New.
3985 * linux-aarch64-low.c: New file.
3986
56f7af9c
MS
39872013-02-04 Marcus Shawcroft <marcus.shawcroft@arm.com>
3988
43aaf8b6 3989 * linux-low.c (handle_extended_wait, linux_create_inferior)
56f7af9c
MS
3990 (linux_attach_lwp_1, linux_kill_one_lwp, linux_attach_one_lwp)
3991 (dequeue_one_deferred_signal, linux_resume_one_thread)
3992 (fetch_register, linux_write_memory, linux_enable_event_reporting)
3993 (linux_tracefork_grandchild, linux_test_for_tracefork)
3994 (linux_read_offsets, linux_xfer_siginfo, linux_xfer_siginfo): Add
3995 PTRACE_ARG3_TYPE and PTRACE_ARG4_TYPE cast to ptrace arguments
3996 where the argument is 0.
3997
60f662b0
YQ
39982013-01-25 Yao Qi <yao@codesourcery.com>
3999
4000 * event-loop.c: Include "queue.h".
4001 (gdb_event_p): New typedef.
4002 (struct gdb_event) <next_event>: Remove.
4003 (event_queue): Change to QUEUE(gdb_event_p).
4004 (async_queue_event): Remove.
4005 (gdb_event_xfree): New.
4006 (initialize_event_loop): New.
4007 (process_event): Use API from QUEUE.
4008 (wait_for_event): Likewise.
4009 * server.c (main): Call initialize_event_loop.
4010 * server.h (initialize_event_loop): Declare.
4011
5ae4861a
YQ
40122013-01-18 Yao Qi <yao@codesourcery.com>
4013
4014 * ax.h (struct eval_agent_expr_context): New.
4015 (gdb_eval_agent_expr): Update declaration.
4016 * ax.c (gdb_eval_agent_expr): Remove argument REGCACHE and
4017 TFRAME. Add new argument CTX.
4018 * server.h (struct eval_agent_expr_context): Declare.
4019 (agent_mem_read, agent_tsv_read): Update declaration.
4020 (agent_mem_read_string): Likewise.
4021 * tracepoint.c (eval_tracepoint_agent_expr): Remove.
4022 (add_traceframe_block): Add new argument TPOINT.
4023 Increase TPOINT->traceframe_usage.
4024 (do_action_at_tracepoint): Call gdb_eval_agent_expr instead of
4025 eval_tracepoint_agent_expr.
4026 (condition_true_at_tracepoint): Likewise.
4027 (agent_mem_read): Remove argument TFRAME. Add argument CTX.
4028 (agent_mem_read_string, agent_tsv_read): Likewise.
4029
85e00e85
YQ
40302013-01-16 Yao Qi <yao@codesourcery.com>
4031
4032 * linux-low.c (linux_resume_one_lwp): Don't check
4033 'lwp->bp_reinsert != 0'.
4034
4039cf45
JB
40352013-01-07 Joel Brobecker <brobecker@adacore.com>
4036 Pedro Alves <palves@redhat.com>
4037
4038 * lynx-low.c (ptrace_request_to_str): Define a temporary
4039 macro and use it to simplify this function's implementation.
4040
9044dee2
JB
40412013-01-07 Joel Brobecker <brobecker@adacore.com>
4042
4043 * lynx-low.c (lynx_resume): Call perror_with_name if lynx_ptrace
4044 sets errno.
4045
e6352c8f
JB
40462013-01-07 Joel Brobecker <brobecker@adacore.com>
4047
4048 * configure.srv (i[34567]86-*-lynxos*): Set srv_xmlfiles.
4049
50681a27
JB
40502013-01-07 Joel Brobecker <brobecker@adacore.com>
4051
4052 * configure.srv (powerpc-*-lynxos*): Set srv_xmlfiles.
4053
3f6e77ef
JB
40542013-01-07 Joel Brobecker <brobecker@adacore.com>
4055
4056 * lynx-low.c (lynx_resume): Use the resume_info parameter
4057 to determine the ptid for the lynx_ptrace call, unless
4058 it is equal to minus_one_ptid, in which case we use the
4059 ptid of the current_inferior.
4060 (lynx_wait_1): After having received a thread create/exit
4061 event, resume the inferior's execution using the signaling
4062 thread's ptid, rather than the old ptid.
4063
7fda33ae
JB
40642013-01-07 Joel Brobecker <brobecker@adacore.com>
4065
4066 * lynx-low.c (lynx_resume): Delete variable ret.
4067
b9786c74
JB
40682013-01-01 Joel Brobecker <brobecker@adacore.com>
4069
4070 * gdbreplay.c (gdbreplay_version): Update copyright year.
4071 * server.c (gdbserver_version): Likewise.
4072
8b93d60f
JB
40732012-12-17 Joel Brobecker <brobecker@adacore.com>
4074
4075 * lynx-low.c (lynx_wait_1): Add debug trace before adding
4076 new thread.
4077
037335a7
JB
40782012-12-17 Joel Brobecker <brobecker@adacore.com>
4079
4080 * lynx-low.c (ptrace_request_to_str): Add handling for
4081 PTRACE_GETTRACESIG.
4082
52d4cbd8
JB
40832012-12-17 Joel Brobecker <brobecker@adacore.com>
4084
4085 * lynx-low.c (lynx_attach): Delete variable new_process.
4086
ab8f6ca9
JB
40872012-12-17 Joel Brobecker <brobecker@adacore.com>
4088
4089 * lynx-low.c (lynx_create_inferior): Delete variable
4090 new_process.
4091
78cbc024
JB
40922012-12-17 Joel Brobecker <brobecker@adacore.com>
4093
4094 * lynx-low.c (ptrace_request_to_str): Do not handle
4095 PTRACE_GETTHREADLIST if this macro does not exist.
4096
14a00470
YQ
40972012-12-15 Yao Qi <yao@codesourcery.com>
4098
4099 * Makefile.in (OBS): Add notif.o.
4100 * notif.c, notif.h: New.
4101 * server.c: Include "notif.h".
4102 (struct vstop_notif) <next>: Remove.
4103 <base>: New field.
4104 (queue_stop_reply): Update.
4105 (push_event, send_next_stop_reply): Remove.
4106 (discard_queued_stop_replies): Update.
4107 (notif_stop): New variable.
4108 (handle_v_stopped): Remove.
4109 (handle_v_requests): Don't call handle_v_stopped. Call
4110 handle_ack_notif instead.
4111 (queue_stop_reply_callback): Call notif_event_enque instead
4112 of queue_stop_reply.
4113 (handle_status): Don't call send_next_stop_reply, call
4114 notif_write_event instead.
4115 (kill_inferior_callback): Likewise.
4116 (detach_or_kill_inferior_callback): Likewise.
4117 (main): Call initialize_notif.
4118 (process_serial_event): Call QUEUE_is_empty.
4119 (handle_target_event): Call notif_push instead of push event.
4120 * server.h (push_event): Remove declaration.
4121
61c125b9
TT
41222012-12-10 Tom Tromey <tromey@redhat.com>
4123
4124 * Makefile.in (DEPMODE, DEPDIR, depcomp, COMPILE.pre)
4125 (COMPILE.post, COMPILE, POSTCOMPILE, IPAGENT_COMPILE): New
4126 macros.
4127 (.c.o): Rewrite.
4128 (ax-ipa.o, tracepoint-ipa.o, utils-ipa.o, format-ipa.o)
4129 (common-utils-ipa.o, remote-utils-ipa.o, regcache-ipa.o)
4130 (i386-linux-ipa.o, linux-i386-ipa.o, linux-amd64-ipa.o)
4131 (amd64-linux-ipa.o, ax.o): Rewrite.
4132 (event-loop.o, hostio.o, hostio-errno.o, inferiors.o, mem-break.o)
4133 (proc-service.o, regcache.o, remote-utils.o, server.o, target.o)
4134 (thread-db.o, tracepoint.o, utils.o, gdbreplay.o, dll.o): Remove.
4135 (signals.o, linux-procfs.o, linux-ptrace.o, common-utils.o, vec.o)
4136 (gdb_vecs.o, xml-utils.o, linux-osdata.o, ptid.o, buffer.o)
4137 (format.o, agent.o, vasprintf.o, vsnprintf.o): Rewrite.
4138 (i386-low.o, i387-fp.o, linux-low.o, linux-arm-low.o)
4139 (linux-bfin-low.o, linux-cris-low.o, linux-crisv32-low.o)
4140 (linux-ia64-low.o, linux-m32r-low.o, linux-mips-low.o)
4141 (linux-ppc-low.o, linux-s390-low.o, linux-sh-low.o)
4142 (linux-tic6x-low.o, linux-x86-low.o, linux-xtensa-low.o)
4143 (linux-tile-low.o, lynx-low.o, lynx-ppc-low.o, nto-low.o)
4144 (nto-x86-low.o, linux-low.o, win32-low.o, win32-arm-low.o)
4145 (win32-i386-low.o, spu-low.o, reg-arm.o, arm-with-iwmmxt.o)
4146 (arm-with-vfpv2.o, arm-with-vfpv3.o, arm-with-neon.o, reg-bfin.o)
4147 (reg-cris.o, reg-crisv32.o, i386.o, i386-linux.o, i386-avx.o)
4148 (i386-avx-linux.o, i386-mmx.o, i386-mmx-linux.o, reg-ia64.o)
4149 (reg-m32r.o, reg-m68k.o, reg-cf.o, mips-linux.o, mips-dsp-linux.o)
4150 (mips64-linux.o, mips64-dsp-linux.o, powerpc-32.o, powerpc-32l.o)
4151 (powerpc-altivec32l.o, powerpc-cell32l.o, powerpc-vsx32l.o)
4152 (powerpc-isa205-32l.o, powerpc-isa205-altivec32l.o)
4153 (powerpc-isa205-vsx32l.o, powerpc-e500l.o, powerpc-64l.o)
4154 (powerpc-altivec64l.o, powerpc-cell64l.o, powerpc-vsx64l.o)
4155 (powerpc-isa205-64l.o, powerpc-isa205-altivec64l.o)
4156 (powerpc-isa205-vsx64l.o, s390-linux32.o, s390-linux32v1.o)
4157 (s390-linux32v2.o, s390-linux64.o, s390-linux64v1.o)
4158 (s390-linux64v2.o, s390x-linux64.o, s390x-linux64v1.o)
4159 (s390x-linux64v2.o, tic6x-c64xp-linux.o, tic6x-c64x-linux.o)
4160 (tic6x-c62x-linux.o, reg-sh.o, reg-sparc64.o, reg-spu.o, amd64.o)
4161 (amd64-linux.o, amd64-avx.o, amd64-avx-linux.o, x32.o)
4162 (x32-linux.o, x32-avx.o, x32-avx-linux.o, reg-xtensa.o)
4163 (reg-tilegx.o): Remove.
4164 (all_object_files): New macro.
4165 Include .deps files.
4166 * aclocal.m4, configure: Rebuild.
4167 * acinclude.m4: Include depstand.m4, lead-dot.m4.
4168 * configure.ac: Invoke ZW_CREATE_DEPDIR,
4169 ZW_PROG_COMPILER_DEPENDENCIES. Compute GMAKE condition.
4170
e90e9ad9
TT
41712012-12-05 Tom Tromey <tromey@redhat.com>
4172
4173 PR gdb/14917:
4174 * server.h (current_insn_ptr, emit_error): Declare 'extern'.
4175
02d403bf 41762012-11-28 Markus Metzger <markus.t.metzger@intel.com>
945bf713
MM
4177
4178 * configure.ac: Check for linux/perf_event.h.
4179 * config.in: Regenerated.
4180 * configure: Regenerated.
4181
0270a750
PA
41822012-11-26 Maxime Villard <rustyBSD@gmx.fr>
4183
4184 * hostio.c (handle_readlink): Decrease buffer size
4185 parameter passed to readlink by one byte.
4186
8c29b58e
YQ
41872012-11-26 Yao Qi <yao@codesourcery.com>
4188
4189 * configure.ac (build_warnings): Append '-Wempty-body'.
4190 * configure: Regenerated.
4191 * linux-low.c (linux_create_inferior): Use braces for empty 'if'
4192 body.
4193
8bdce1ff
PM
41942012-11-15 Pierre Muller <muller@sourceware.org>
4195
4196 * configure.ac (AC_CHECK_HEADERS): Add wait.h header.
4197 * config.in: Regenerate.
4198 * configure: Regenerate.
4199 * linux-low.c: Use "gdb_stat.h" header instead of <sys/stat.h> header.
4200 Use "gdb_wait.h" header instead of <sys/wait.h> header.
4201 * lynx-low.c: Use "gdb_wait.h" header instead of <sys/wait.h> header.
4202 * remote-utils.c: Use "gdb_stat.h" header instead of <sys/stat.h>
4203 header.
4204 * server.c: Remove HAVE_WAIT_H conditional. Use "gdb_wait.h" header
4205 instead of <sys/wait.h> header.
4206 * spu-low.c: Use "gdb_wait.h" header instead of <sys/wait.h> header.
4207
02d403bf 42082012-11-13 Markus Metzger <markus.t.metzger@intel.com>
3ba6ad0f
MM
4209
4210 * Makefile.in: (INTERNAL_CFLAGS): Add -DGDBSERVER
4211 (various make rules): Remove -DGDBSERVER
4212
fbd5db48
YQ
42132012-11-09 Yao Qi <yao@codesourcery.com>
4214
4215 * spu-low.c (current_ptid): Move it to ..
4216 * gdbthread.h: ... here. New.
4217 * remote-utils.c (read_ptid): Use macro 'current_ptid'.
4218 * server.c (myresume, process_serial_event): Likewise.
4219 * thread-db.c (thread_db_find_new_threads): Likewise.
4220 * tracepoint.c (run_inferior_command): Likewise.
4221
b3dc46ff
AB
42222012-10-01 Andrew Burgess <aburgess@broadcom.com>
4223
4224 * server.c (handle_search_memory_1): Include access length in
4225 warning message.
4226
07c04788
HPN
42272012-09-05 Michael Brandt <michael.brandt@axis.com>
4228
4229 * linux-crisv32-low.c: Fix compile errors.
4230
918d227b
YQ
42312012-09-04 Yao Qi <yao@codesourcery.com>
4232
4233 * tracepoint.c (cmd_qtsv): Adjust debug message.
4234 Don't check CUR_TPOINT.
4235
18c1b81a
YQ
42362012-08-28 Yao Qi <yao@codesourcery.com>
4237
4238 * ax.c, tracepoint.c: Replace ATTR_FORMAT with ATTRIBUTE_PRINTF.
4239 * server.h: Include 'libiberty.h' and 'ansidecl.h'.
4240 (ATTR_NORETURN, ATTR_FORMAT, ATTR_MALLOC): Remove.
4241 Remove declarations of xmalloc, xreallloc, xstrdup and
4242 freeargv.
4243 * Makefile.in (libiberty_h): New.
4244 (server_h): Append dependencies 'libiberty.h' and 'ansidecl.h'.
4245 (linux-bfin-low.o): Append dependency 'libiberty.h'.
4246
dc82f37b
YQ
42472012-08-23 Yao Qi <yao@codesourcery.com>
4248
4249 * server.h: Remove declaration of 'xsnprintf'.
4250
406b1477
KS
42512012-08-22 Keith Seitz <keiths@redhat.com>
4252
4253 * server.h: Include build-gnulib-gbserver/config.h.
4254 * gdbreplay.c: Likewise.
4255
e6712ff1
DE
42562012-08-08 Doug Evans <dje@google.com>
4257
4258 * Makefile.in (SFILES): Add gdb_vecs.c.
4259 (OBS): Add gdb_vecs.o.
4260 (gdb_vecs_h, host_defs_h): New variables.
4261 (thread-db.o): Add $(gdb_vecs_h) dependency.
4262 (gdb_vecs.o): New rule.
4263 * thread-db.c: #include "gdb_vecs.h".
4264 (thread_db_load_search): Use a vector to iterate over path elements.
4265 Handle text appearing after "$pdir".
4266
4267 * configure.ac: Add check for strstr.
4268 * config.in: Regenerate.
4269 * configure: Regenerate.
4270
7c3270ae
UW
42712012-08-02 Ulrich Weigand <ulrich.weigand@linaro.org>
4272
4273 * hostio.c (handle_pread): If pread fails, fall back to attempting
4274 lseek/read.
4275 (handle_pwrite): Likewise for pwrite.
4276
b62e2b27
UW
42772012-08-01 Ulrich Weigand <ulrich.weigand@linaro.org>
4278
4279 * linux-arm-low.c (arm_linux_hw_point_initialize): Distinguish
4280 between unsupported TYPE and unimplementable ADDR/LEN combination.
4281 (arm_insert_point): Act on new return value.
4282
78a99e91
PA
42832012-07-31 Pedro Alves <palves@redhat.com>
4284
4285 * server.c (process_point_options): Only skip tokens if we find
4286 one that is unrecognized. Don't treat 'X' specially while
4287 skipping unrecognized tokens.
4288
fcf303ab
UW
42892012-07-30 Ulrich Weigand <ulrich.weigand@linaro.org>
4290
4291 * linux-arm-low.c (arm_linux_hw_point_initialize): Do not attempt
4292 to 4-byte-align HW breakpoint addresses for Thumb.
4293
7255706c
YQ
42942012-07-27 Yao Qi <yao@codesourcery.com>
4295
4296 PR remote/14161.
4297
4298 * server.h: Declare gdb_agent_about_to_close.
4299 * target.c (kill_inferior): Include "agent.h".
4300 New. Send command 'kill'.
4301 * target.h (kill_inferior): Removed macro.
4302 * tracepoint.c (gdb_agent_about_to_close): New.
4303 (gdb_agent_helper_thread): Handle command 'close'.
4304 Wait endlessly until the inferior stops.
4305 Install gdb_agent_remove_socket to atexit hook.
4306 (agent_socket_name): New static variable.
4307 (gdb_agent_socket_init): Replace local variable 'name' with
4308 'agent_socket_name'.
4309 (gdb_agent_remove_socket): New.
4310
5a3f286f
YQ
43112012-07-27 Yao Qi <yao@codesourcery.com>
4312
4313 * server.c (process_point_options): Stop at 'X' when parsing.
4314
961bd387
ME
43152012-07-19 Michael Eager <eager@eagercon.com>
4316
a261b8f5 4317 * i386-low.c (Z_packet_to_hw_type): Add Z_PACKET_HW_BP, translate
961bd387
ME
4318 to hw_execute.
4319 * linux-x86-low.c (x86_insert_point, x86_remove_point):
4320 Call i386_low_insert_watchpoint, i386_low_remove_watchpoint to add/del
4321 hardware breakpoint.
4322
aa7c7447
JK
43232012-07-07 Jan Kratochvil <jan.kratochvil@redhat.com>
4324
4325 * gdbserver/linux-low.c (initialize_low): Call
4326 linux_ptrace_init_warnings.
4327
7f216e7c
DE
43282012-07-02 Doug Evans <dje@google.com>
4329
4330 * mem-break.c (gdb_no_commands_at_breakpoint): Fix cast from
4331 pointer to int.
4332
d3ce09f5
SS
43332012-07-02 Stan Shebs <stan@codesourcery.com>
4334
4335 * Makefile.in (WARN_CFLAGS_NO_FORMAT): Define.
4336 (ax.o): Add it to build rule.
4337 (ax-ipa.o): Ditto.
4338 (OBS): Add format.o.
4339 (IPA_OBS): Add format.o.
4340 * server.c (handle_query): Claim support for breakpoint commands.
4341 (process_point_options): Add command case.
4342 (process_serial_event): Leave running if there are printfs in
4343 effect.
4344 * mem-break.h (any_persistent_commands): Declare.
4345 (add_breakpoint_commands): Declare.
4346 (gdb_no_commands_at_breakpoint): Declare.
4347 (run_breakpoint_commands): Declare.
4348 * mem-break.c (struct point_command_list): New struct.
4349 (struct breakpoint): New field command_list.
4350 (any_persistent_commands): New function.
4351 (add_commands_to_breakpoint): New function.
4352 (add_breakpoint_commands): New function.
4353 (gdb_no_commands_at_breakpoint): New function.
4354 (run_breakpoint_commands): New function.
4355 * linux-low.c (linux_wait_1): Test for and run breakpoint commands
4356 locally.
4357 * ax.c: Include format.h.
4358 (ax_printf): New function.
4359 (gdb_eval_agent_expr): Add printf opcode.
4360
2f8f6aed
YQ
43612012-06-13 Yao Qi <yao@codesourcery.com>
4362
4363 * server.c (start_inferior): Remove duplicated writes to fields
4364 'last_resume_kind' and 'last_status' of 'current_inferior'.
4365
0c9070b3
YQ
43662012-06-12 Yao Qi <yao@codesourcery.com>
4367 Pedro Alves <palves@redhat.com>
4368
4369 * linux-low.c (linux_set_resume_request): Simplify predicate. Add
4370 comment.
4371 * server.c (handle_v_cont): Extend comment.
4372
c52daf70
YQ
43732012-06-11 Yao Qi <yao@codesourcery.com>
4374
4375 * linux-low.c (linux_attach): Add 'static'.
4376
d38bbb0a
YQ
43772012-06-06 Yao Qi <yao@codesourcery.com>
4378
4379 * ax.c (gdb_eval_agent_expr): Print `top' in hex.
4380
89dc0afd
JK
43812012-06-01 Jan Kratochvil <jan.kratochvil@redhat.com>
4382
4383 Fix gcc -flto compilation warning.
4384 * server.c (main): Make variable multi_mode and attach volatile.
4385
75f62ce7
TJB
43862012-05-30 Thiago Jung Bauermann <thiago.bauermann@linaro.org>
4387
4388 * linux-low.c (get_r_debug): Disable code using DT_MIPS_RLD_MAP
4389 if the platform doesn't know about it.
4390
65f479b6
PA
43912012-05-30 Jeff Kenton <jkenton@tilera.com>
4392
4393 * Makefile.in (SFILES): Add linux-tile-low.c.
4394 (linux-tile-low.o, reg-tilegx.o, reg-tilegx.c): New rules.
4395 * configure.srv: Handle tilegx-*-linux*.
4396 * linux-tile-low.c: New file.
4397
0c5bf5a9
JK
43982012-05-28 Jan Kratochvil <jan.kratochvil@redhat.com>
4399
4400 * linux-low.c (linux_qxfer_libraries_svr4): Return -1 if R_DEBUG is -1.
4401
a493e3e2
PA
44022012-05-24 Pedro Alves <palves@redhat.com>
4403
4404 PR gdb/7205
4405
43aaf8b6 4406 Replace TARGET_SIGNAL_ with GDB_SIGNAL_ throughout.
a493e3e2 4407
2ea28649
PA
44082012-05-24 Pedro Alves <palves@redhat.com>
4409
4410 PR gdb/7205
4411
4412 Replace target_signal with gdb_signal throughout.
4413
8d409d16
MR
44142012-05-22 Maciej W. Rozycki <macro@codesourcery.com>
4415
4416 * linux-low.c (linux_store_registers): Avoid the copying sequence
4417 when no data has been retrieved by ptrace.
4418
23512c01
MGD
44192012-05-22 Will Deacon <will.deacon@arm.com>
4420
4421 * linux-low (__UCLIBC__ && !(__UCLIBC_HAS_MMU__ || __ARCH_HAS_MMU__)):
4422 Include asm/ptrace.h.
4423 (PT_TEXT_ADDR, PT_DATA_ADDR, PT_TEXT_END_ADDR): Define only if not
4424 already defined.
4425
4934b29e
MR
44262012-05-21 Maciej W. Rozycki <macro@codesourcery.com>
4427
4428 * linux-low.c (linux_store_registers): Don't re-retrieve data
4429 with ptrace that has already been obtained from /proc. Always
4430 copy any data retrieved with ptrace to the buffer supplied.
4431
bde24c0a
PA
44322012-05-11 Yao Qi <yao@codesourcery.com>
4433 Pedro Alves <palves@redhat.com>
4434
4435 * linux-low.c (enum stopping_threads_kind): New.
4436 (stopping_threads): Change type to `enum stopping_threads_kind'.
4437 (handle_extended_wait): If stopping and suspending threads, leave
4438 the new_lwp suspended too.
4439 (linux_wait_for_event): Adjust.
4440 (stop_all_lwps): Set `stopping_threads' to
4441 STOPPING_AND_SUSPENDING_THREADS or STOPPING_THREADS depending on
4442 whether we're suspending threads or just stopping them. Assert no
4443 recursion happens.
4444
623b6bdf
YQ
44452012-04-29 Yao Qi <yao@codesourcery.com>
4446
4447 * server.h: Move some code to ...
4448 * gdbthread.h: ... here. New.
4449 * Makefile.in (inferiors.o, regcache.o): Depends on gdbthread.h
4450 (remote-utils.o, server.o, target.o tracepoint.o): Likewise.
4451 (nto-low.o, win32-low.o): Likewise.
4452 * inferiors.c, linux-low.h, nto-low.c: Include gdbthread.h.
4453 * regcache.c, remote-utils.c, server.c: Likewise.
4454 * target.c, tracepoint.c, win32-low.c: Likewise.
4455
f15f9948
TJB
44562012-04-24 Thiago Jung Bauermann <thiago.bauermann@linaro.org>
4457
4458 * linux-low.h (PTRACE_ARG3_TYPE): Move macro from linux-low.c.
4459 (PTRACE_ARG4_TYPE): Likewise.
4460 (PTRACE_XFER_TYPE): Likewise.
4461 * linux-arm-low.c (arm_prepare_to_resume): Cast third argument of
4462 ptrace to PTRACE_ARG3_TYPE.
4463 * linux-low.c (PTRACE_ARG3_TYPE): Move macro to linux-low.h.
4464 (PTRACE_ARG4_TYPE): Likewise.
4465 (PTRACE_XFER_TYPE): Likewise.
4466 (linux_detach_one_lwp): Cast fourth argument of
4467 ptrace to long then PTRACE_ARG4_TYPE.
4468 (regsets_fetch_inferior_registers): Cast third argument of
4469 ptrace to long then PTRACE_ARG3_TYPE.
4470 (regsets_store_inferior_registers): Likewise.
4471
38ea300a
PA
44722012-04-20 Pedro Alves <palves@redhat.com>
4473
4474 * configure: Regenerate.
4475
c971b7fa
PA
44762012-04-19 Pedro Alves <palves@redhat.com>
4477
43aaf8b6 4478 * Makefile.in (GNULIB_BUILDDIR): New.
c971b7fa 4479 (LIBGNU, INCGNU, GNULIB_H): Adjust.
43aaf8b6
PA
4480 (SUBDIRS, CLEANDIRS, REQUIRED_SUBDIRS): New.
4481 (all, install-only, uninstall, clean-info, all-lib, clean): No
4482 longer pass GNULIB_FLAGS_TO_PASS. Use subdir_do.
4483 (maintainer-clean realclean distclean): Use subdir_do.
4484 (subdir_do): New.
4485 (gnulib/import/Makefile): Adjust. Replace gnulib/import with
c971b7fa 4486 $(GNULIB_BUILDDIR). Don't pass argument to config.status.
43aaf8b6
PA
4487 * acinclude.m4: Include acx_configure_dir.m4.
4488 * configure.ac: Remove gl_EARLY, gl_INIT, and AM_INIT_AUTOMAKE
4489 calls. Call AC_PROG_RANLIB. Configure gnulib using
4490 ACX_CONFIGURE_DIR.
4491 (GNULIB): New.
4492 (GNULIB_STDINT_H): Adjust.
4493 (AC_OUTPUT): Don't output gnulib/Makefile anymore.
4494 * gdbreplay.c: Include build-gnulib/config.h.
4495 * server.h: Likewise.
4496 * aclocal.m4: Regenerate.
4497 * config.in: Regenerate.
4498 * configure: Regenerate.
c971b7fa 4499
809277f8
PA
45002012-04-19 Pedro Alves <palves@redhat.com>
4501
4502 * Makefile.in (LIBGNU, INCGNU): Adjust.
4503 (GNULIB_FLAGS_TO_PASS, GNULIB_H): Adjust.
4504 (all, install-only, uninstall, clean-info, all-lib, clean)
4505 (maintainer-clean, Makefile, gnulib/Makefile): Adjust.
4506 * configure.ac: Adjust AC_OUTPUT output.
4507 * aclocal.m4: Regenerate.
4508 * configure: Regenerate.
4509
fd9bb8b8
PA
45102012-04-19 Pedro Alves <palves@redhat.com>
4511
4512 * Makefile.in (generated_files): New.
4513 (server_h): Remove the explicit dependency on config.h, and depend
4514 on $generated_files.
4515
1c298c66
PA
45162012-04-19 Pedro Alves <palves@redhat.com>
4517
4518 * Makefile.in (INCGNU): Add -Ignulib.
4519
57c4b50b
PA
45202012-04-19 Pedro Alves <palves@redhat.com>
4521
4522 * Makefile.in (GNULIB_INCLUDE_DIR): Rename to ...
4523 (INCGNU): ... this, and spell out -I here.
4524 (GNULIB_LIB): Rename to ...
4525 (LIBGNU): ... this.
4526 (INCLUDE_CFLAGS, gdbserver$(EXEEXT), $(GNULIB_LIB) rule): Adjust.
4527
1030e047
PA
45282012-04-19 Pedro Alves <palves@redhat.com>
4529
4530 * config.in: Regenerate.
4531
447d4319
PA
45322012-04-19 Pedro Alves <palves@redhat.com>
4533
4534 * configure.ac: Remove AC_CHECK_DECLS check for memmem.
4535 * server.h (memmem): Remove declaration.
4536 * config.in: Regenerate.
4537 * configure: Regenerate.
4538
aad9eab9
YQ
45392012-04-19 Yao Qi <yao@codesourcery.com>
4540
4541 * Makefile.in (SFILES): Add common/vec.c.
4542 (OBS): Add vec.o.
4543 (vec.o): New rule.
4544
3e10640f
YQ
45452012-04-19 Yao Qi <yao@codesourcery.com>
4546
4547 * remote-utils.c (prepare_resume_reply): Replace with macro
4548 target_core_of_thread.
4549 * server.c (handle_qxfer_threads_proper): Likewise.
4550 * target.h (traget_core_of_thread): New macro.
4551
71622373
PA
45522012-04-18 Pedro Alves <palves@redhat.com>
4553
4554 * aclocal.m4: Regenerate.
4555 * configure: Regenerate.
4556
80d26939
YQ
45572012-04-16 Yao Qi <yao@codesourcery.com>
4558
4559 * tracepoint.c (cmd_qtstart): Download tracepoints even when they are
4560 duplicated on address.
4561
42476b70
YQ
45622012-04-16 Yao Qi <yao@codesourcery.com>
4563
4564 * tracepoint.c (COPY_FIELD_TO_BUF): New macro.
4565 (struct tracepoint_action_ops) <send>: New field.
4566 (m_tracepoint_action_send, r_tracepoint_action_send): New.
4567 (agent_expr_send, x_tracepoint_action_send): New.
4568 (l_tracepoint_action_send): New.
4569 (cmd_qtdp): Download and install tracepoint
4570 according to `use_agent'.
4571 (run_inferior_command): Add one more parameter `len'.
4572 Update callers.
4573 (tracepoint_send_agent): New.
4574 (cmd_qtdp, cmd_qtstart): Call tracepoint_send_agent.
4575
7bc83639
YQ
45762012-04-16 Yao Qi <yao@codesourcery.com>
4577
4578 * tracepoint.c (download_tracepoints): Moved to ...
4579 (cmd_qtstart): ... here.
4580
5f18041e
YQ
45812012-04-14 Yao Qi <yao@codesourcery.com>
4582
4583 * tracepoint.c: Include inttypes.h.
4584 (struct collect_memory_action): Use sized types.
4585 (struct tracepoint): Likewise.
4586 (cmd_qtdp, stop_tracing): Update print specifiers.
4587 (cmd_qtp, response_tracepoint): Likewise.
4588 (collect_data_at_tracepoint): Likewise.
4589 (collect_data_at_step): Likewise.
4590
55a8c076
YQ
45912012-04-14 Yao Qi <yao@codesourcery.com>
4592
4593 Import gnulib module inttypes.
4594 * aclocal.m4, config.in, configure: Regenerated.
4595
dc750257
YQ
45962012-04-14 Yao Qi <yao@codesourcery.com>
4597
4598 * Makefile.in (maintainer-clean, realclean, distclean): Remove
4599 Makefile and config.status at last.
4600
0ab5faf9
YQ
46012012-04-13 Yao Qi <yao@codesourcery.com>
4602
4603 * tracepoint.c: Include stdint.h unconditionally.
4604
18f5fd81
TJB
46052012-04-13 Thiago Jung Bauermann <thiago.bauermann@linaro.org>
4606
4607 * acinclude.m4 (GDBSERVER_HAVE_THREAD_DB_TYPE): New macro based
4608 on BFD_HAVE_SYS_PROCFS_TYPE.
4609 * configure.ac: Look for lwpid_t and psaddr_t in libthread_db.h.
4610 * configure: Regenerate.
4611 * config.in: Likewise.
4612
4d47af5c
L
46132012-04-13 H.J. Lu <hongjiu.lu@intel.com>
4614
4615 * Makefile.in (clean): Also remove x32.c x32-linux.c
4616 x32-avx.c x32-avx-linux.c.
4617 (x32.o): New target.
4618 (x32.c): Likewise.
4619 (x32-linux.o): Likewise.
4620 (x32-linux.c): Likewise.
4621 (x32-avx.o): Likewise.
4622 (x32-avx.c): Likewise.
4623 (x32-avx-linux.o): Likewise.
4624 (x32-avx-linux.c): Likewise.
4625
4626 * configure.srv (srv_amd64_regobj): Add x32.o x32-avx.o.
4627 (srv_amd64_linux_regobj): Add x32-linux.o x32-avx-linux.o.
4628 (srv_i386_64bit_xmlfiles): Add i386/x32-core.xml.
4629 (srv_amd64_xmlfiles): Add i386/x32.xml i386/x32-avx.xml.
4630 (srv_amd64_linux_xmlfiles): Add i386/x32-linux.xml
4631 i386/x32-avx-linux.xml.
4632
4633 * linux-x86-low.c (init_registers_x32_linux): New prototype.
4634 (init_registers_x32_avx_linux): Likwise.
4635 (x86_linux_update_xmltarget): Call init_registers_x32_linux
4636 or init_registers_x32_avx_linux if linux_is_elf64 is false.
4637
ecedbe58
PA
46382012-04-13 Pedro Alves <palves@redhat.com>
4639
4640 * Makefile.in (GNULIB_FLAGS_TO_PASS): New.
4641 (FLAGS_TO_PASS): Don't change or set $top_srcdir, $srcdir and VPATH.
4642 (all, uninstall, clean-info, all-lib, clean, maintainer-clean)
4643 (realclean, distclean): Explicitly pass $GNULIB_FLAGS_TO_PASS to
4644 the sub-make.
4645
c92b5177
L
46462012-04-12 H.J. Lu <hongjiu.lu@intel.com>
4647
4648 * linux-x86-low.c (compat_x32_clock_t): New.
4649 (compat_x32_siginfo_t): Likewise.
4650 (compat_x32_siginfo_from_siginfo): Likewise.
4651 (siginfo_from_compat_x32_siginfo): Likewise.
4652 (linux_is_elf64): Likewise.
4653 (x86_siginfo_fixup): Call compat_x32_siginfo_from_siginfo
4654 and siginfo_from_compat_x32_siginfo for x32.
4655 (x86_arch_setup): Set linux_is_elf64.
4656
214d508e
L
46572012-04-12 H.J. Lu <hongjiu.lu@intel.com>
4658
4659 PR gdb/13969
4660 * linux-low.c (linux_pid_exe_is_elf_64_file): Also return the
4661 e_machine field.
4662 (linux_qxfer_libraries_svr4): Update call to elf_64_file_p.
4663 * linux-low.h (linux_pid_exe_is_elf_64_file): Updated.
4664 * linux-x86-low.c (x86_arch_setup): Check if GDBserver is
4665 compatible with process.
4666
c9a1864a
YQ
46672012-04-12 Yao Qi <yao@codesourcery.com>
4668
4669 * Makefile.in: Define abs_top_srcdir and abs_srcdir.
4670 (INCLUDE_CFLAGS): Append GNULIB_INCLUDE_DIR.
4671 (install-only, install-info, clean): Handle sub dir gnulib.
4672 (all-lib, am--refresh): New targets.
4673 (memmem.o): Remove target.
4674 * configure.ac: Remove AC_CONFIG_LIBOBJ_DIR.
4675 Invoke gl_EARLY. Invoke AC_CHECK_PROGS for make.
4676 (AC_REPLACE_FUNCS): Remove memmem.
4677 Invoke gl_INIT and AM_INIT_AUTOMAKE.
4678 (AC_OUTPUT): Generate Makefile in gnulib/.
4679 * aclocal.m4, config.in, configure: Regenerated.
4680
367ba2c2
MR
46812012-04-10 Maciej W. Rozycki <macro@codesourcery.com>
4682
4683 * linux-low.c (get_r_debug): Handle DT_MIPS_RLD_MAP.
4684
9d236627
PA
46852012-04-05 Pedro Alves <palves@redhat.com>
4686
4687 -Werror=strict-aliasing
4688
4689 * spu-low.c (parse_spufs_run): Avoid dereferencing type-punned
4690 pointer.
4691
111217b3
PA
46922012-04-04 Pedro Alves <palves@redhat.com>
4693
4694 * linux-sparc-low.c (sparc_fill_gregset_to_stack)
4695 (sparc_store_gregset_from_stack, sparc_store_gregset)
4696 (sparc_breakpoint_at): Fix formatting.
4697
8365dcf5
TJB
46982012-03-30 Thiago Jung Bauermann <thiago.bauermann@linaro.org>
4699
4700 * configure.ac: Check whether Elf32_auxv_t and Elf64_auxv_t
4701 are available.
4702 * linux-low.c [HAVE_ELF32_AUXV_T] (Elf32_auxv_t): Add typedef.
4703 [HAVE_ELF64_AUXV_T] (Elf64_auxv_t): Likewise.
4704 * config.in: Regenerate.
4705 * configure: Likewise.
4706
689cc2ae
PA
47072012-03-29 Pedro Alves <palves@redhat.com>
4708
4709 * linux-low.c (regsets_store_inferior_registers) [__sparc__]:
4710 Correct ptrace arguments.
4711
c14dfd32
PA
47122012-03-28 Pedro Alves <palves@redhat.com>
4713
4714 * linux-ia64-low.c (ia64_regmap): Map IA64_EC_REGNUM to PT_AR_EC.
4715 (IA64_GR0_REGNUM, IA64_FR0_REGNUM)
4716 (IA64_FR1_REGNUM): New defines.
4717 (ia64_fetch_register): New.
4718 (the_low_target): Install it.
4719 * linux-low.h (struct linux_target_ops) <fetch_register>: New
4720 field.
4721 * linux-low.c (linux_fetch_registers): Try the
4722 the_low_target.fetch_register hook first.
4723
4724 * linux-arm-low.c (the_low_target): Adjust.
4725 * linux-bfin-low.c (the_low_target): Adjust.
4726 * linux-cris-low.c (the_low_target): Adjust.
4727 * linux-crisv32-low.c (the_low_target): Adjust.
4728 * linux-m32r-low.c (the_low_target): Adjust.
4729 * linux-m68k-low.c (the_low_target): Adjust.
4730 * linux-mips-low.c (the_low_target): Adjust.
4731 * linux-ppc-low.c (the_low_target): Adjust.
4732 * linux-s390-low.c (the_low_target): Adjust.
4733 * linux-sh-low.c (the_low_target): Adjust.
4734 * linux-sparc-low.c (the_low_target): Adjust.
4735 * linux-tic6x-low.c (the_low_target): Adjust.
4736 * linux-x86-low.c (the_low_target): Adjust.
4737 * linux-xtensa-low.c (the_low_target): Adjust.
4738
63c88e13
PA
47392012-03-26 Pedro Alves <palves@redhat.com>
4740
4741 * server.c (handle_qxfer_libraries): Don't bail early if
4742 the_target->qxfer_libraries_svr4 is not NULL.
4743
fb723180
PA
47442012-03-26 Pedro Alves <palves@redhat.com>
4745
4746 * linux-low.c (linux_qxfer_libraries_svr4): Fix pasto in comment.
4747
0afae3cf
PA
47482012-03-23 Pedro Alves <palves@redhat.com>
4749
4750 * linux-low.c (linux_qxfer_libraries_svr4): Terminate the
4751 "library-list-svr4" element's start tag when the the DSO list is
4752 empty.
4753
485f1ee4
PA
47542012-03-23 Pedro Alves <palves@redhat.com>
4755
4756 * linux-low.c (read_one_ptr): Read the inferior's pointer through
4757 a variable whose type size is the same as the inferior's pointer
4758 size.
4759
a5362b9a
TS
47602012-03-21 Thomas Schwinge <thomas@codesourcery.com>
4761
4762 * linux-arm-low.c (arm_stopped_by_watchpoint): Use siginfo_t instead of
4763 struct siginfo.
4764 * linux-low.c (siginfo_fixup, linux_xfer_siginfo): Likewise.
4765 * linux-x86-low.c (x86_siginfo_fixup): Likewise.
4766 * linux-low.h: Include <signal.h>.
4767 (struct siginfo): Remove forward declaration.
4768 (struct linux_target_ops) <siginfo_fixup>: Use siginfo_t instead of
4769 struct siginfo.
4770
d226c142
MF
47712012-03-21 Mike Frysinger <vapier@gentoo.org>
4772
4773 * .gitignore: Ignore more files.
4774
122f36ef
PA
47752012-03-19 Pedro Alves <palves@redhat.com>
4776 Jan Kratochvil <jan.kratochvil@redhat.com>
4777
4778 * server.c (cont_thread, general_thread): Add describing comments.
4779 (start_inferior): Clear `cont_thread'.
4780 (handle_v_cont): Don't set `cont_thread' if resuming all threads
4781 of a process.
4782
fc3e5175
YQ
47832012-03-15 Yao Qi <yao@codesourcery.com>
4784
4785 * tracepoint.c (install_tracepoint): Move duplicated tracepoint
4786 handling to ...
4787 (cmd_qtdp): ... here.
4788
8d0d92cd
YQ
47892012-03-15 Yao Qi <yao@codesourcery.com>
4790
4791 * tracepoint.c (struct tracepoint_action_ops): New.
4792 (struct tracepoint_action) [!IN_PROCESS_AGENT] <ops>: New field.
4793 (m_tracepoint_action_download): New.
4794 (r_tracepoint_action_download): New.
4795 (x_tracepoint_action_download): New.
4796 (l_tracepoint_action_download): New.
4797 (add_tracepoint_action): Install `action->ops' according type.
4798 (download_tracepoint_1): Move code `download' function pointer
4799 of various tracepoint_action_ops.
4800
87b0bb13
JK
48012012-03-13 Jan Kratochvil <jan.kratochvil@redhat.com>
4802
4803 * linux-low.c (linux_attach_lwp_1): New variable buffer. Call
4804 linux_ptrace_attach_warnings.
4805
5f572dec
JK
48062012-03-13 Jan Kratochvil <jan.kratochvil@redhat.com>
4807
4808 * Makefile.in (linux-ptrace.o): New.
4809 * configure.srv (arm*-*-linux*, bfin-*-*linux*, crisv32-*-linux*)
4810 (cris-*-linux*, i[34567]86-*-linux*, ia64-*-linux*, m32r*-*-linux*)
4811 (m68*-*-linux*, m68*-*-uclinux*, mips*-*-linux*, powerpc*-*-linux*)
4812 (s390*-*-linux*, sh*-*-linux*, sparc*-*-linux*, tic6x-*-uclinux)
4813 (x86_64-*-linux*, xtensa*-*-linux*): Add linux-ptrace.o to SRV_TGTOBJ
4814 of these targets.
4815 * linux-low.c (linux_attach_lwp_1): Remove redundent else clause.
4816
f4647387
YQ
48172012-03-08 Yao Qi <yao@codesourcery.com>
4818 Pedro Alves <palves@redhat.com>
4819
4820 Fix PR server/13392.
4821 * linux-x86-low.c (amd64_install_fast_tracepoint_jump_pad): Check
4822 offset of JMP insn.
4823 * tracepoint.c (remove_tracepoint): New.
4824 (cmd_qtdp): Call remove_tracepoint when failed to install.
4825
9b224c5e
PA
48262012-03-07 Pedro Alves <palves@redhat.com>
4827
4828 * linux-low.c (get_detach_signal): New.
4829 (linux_detach_one_lwp): Get rid of a pending SIGSTOP with SIGCONT.
4830 Pass on pending signals to PTRACE_DETACH. Check the result of the
4831 ptrace call.
4832 * server.c (program_signals, program_signals_p): New.
4833 (handle_general_set): Handle QProgramSignals.
4834 * server.h (program_signals, program_signals_p): Declare.
4835
e237a7e2
JK
48362012-03-05 Pedro Alves <palves@redhat.com>
4837 Jan Kratochvil <jan.kratochvil@redhat.com>
4838
4839 * linux-low.c (get_dynamic): Don't warn when PT_PHDR isn't found.
4840 New comment why.
4841
5808517f
YQ
48422012-03-03 Yao Qi <yao@codesourcery.com>
4843
4844 * tracepoint.c (tracepoint_look_up_symbols): Update call to
4845 agent_look_up_symbols.
4846
58b4daa5
YQ
48472012-03-03 Yao Qi <yao@codesourcery.com>
4848
4849 * Makefile.in (linux-low.o): Keep dependence on agent.h.
4850 (linux-x86-low.o): Likewise.
4851 * server.h: Remove in_process_agent_loaded.
4852 * tracepoint.c (in_process_agent_loaded): Removed. Moved it
4853 common/agent.c.
4854 Update callers.
4855
8ffcbaaf
YQ
48562012-03-03 Yao Qi <yao@codesourcery.com>
4857
4858 * tracepoint.c (gdb_agent_capability): New global.
4859 (in_process_agent_loaded_ust): Renamed to
4860 `in_process_agent_supports_ust'.
4861 Update callers.
4862 (in_process_agent_supports_ust): Call agent_capability_check.
4863 (clear_installed_tracepoints): Assert that agent supports
4864 agent.
4865
d1feda86
YQ
48662012-03-03 Yao Qi <yao@codesourcery.com>
4867
4868 * linux-low.c (linux_supports_agent): New.
4869 (linux_target_ops): Initialize field `supports_agent' with
4870 linux_supports_agent.
4871 * target.h (struct target_ops) <supports_agent>: New.
4872 (target_supports_agent): New macro.
4873 * server.c (handle_general_set): Handle packet 'QAgent'.
4874 (handle_query): Send `QAgent+'.
4875 * Makefile.in (server.o): Depends on agent.h.
4876
2fa291ac
YQ
48772012-03-03 Yao Qi <yao@codesourcery.com>
4878
4879 * Makefile.in (OBS): Add agent.o.
4880 Add new rule for agent.o.
4881 Track dependence of tracepoint.c on agent.h.
4882 * tracepoint.c (run_inferior_command_1):
4883 (run_inferior_command): Call agent_run_command.
4884 (gdb_ust_connect_sync_socket): Deleted. Move it to
4885 common/agent.c.
4886 (resume_thread, stop_thread): Likewise.
4887 (gdb_ust_socket_init): Renamed to ...
4888 (gdb_agent_socket_init): ... New.
4889 (gdb_ust_thread): Renamed to ...
4890 (gdb_agent_helper_thread): ... New.
4891 (gdb_ust_init): Move some code to ...
4892 (gdb_agent_init): ... here. New.
4893 [HAVE_UST]: Call gdb_ust_init.
4894 (initialize_tracepoint_ftlib): Call gdb_agent_init.
4895 * configure.ac: Add `sys/un.h' to AC_CHECK_HEADERS.
4896 * config.in, configure: Regenerated.
4897
05044653
PA
48982012-03-02 Pedro Alves <palves@redhat.com>
4899
4900 * inferiors.c (add_pid_to_list, pull_pid_from_list): Delete.
4901 * linux-low.c (struct simple_pid_list): New.
4902 (stopped_pids): New a struct simple_pid_list pointer.
4903 (add_to_pid_list, pull_pid_from_list): New.
4904 (handle_extended_wait): Don't assume the first signal new children
4905 report is SIGSTOP. Adjust call to pull_pid_from_list.
4906 (linux_wait_for_lwp): Adjust.
4907
8d00225b
YQ
49082012-03-02 Yao Qi <yao@codesourcery.com>
4909
4910 * tracepoint.c (do_action_at_tracepoint): Write `stop_pc' in
4911 debug log.
4912
19560ba5
YQ
49132012-03-02 Yao Qi <yao@codesourcery.com>
4914
4915 * tracepoint.c (collect_ust_data_at_tracepoint): Remove parameters
4916 `stop_pc' and `tpoint'. Update caller.
4917
1faeff08
MR
49182012-03-01 Maciej W. Rozycki <macro@codesourcery.com>
4919
4920 * linux-low.h (linux_target_ops): Add regset_bitmap member.
4921 * linux-low.c (use_linux_regsets): New macro.
4922 [!HAVE_LINUX_REGSETS] (regsets_fetch_inferior_registers): Likewise.
4923 [!HAVE_LINUX_REGSETS] (regsets_store_inferior_registers): Likewise.
4924 (linux_register_in_regsets): New function.
4925 (usr_fetch_inferior_registers): Skip registers covered by
4926 regsets.
4927 (usr_store_inferior_registers): Likewise.
4928 (usr_fetch_inferior_registers): New macro.
4929 (usr_store_inferior_registers): Likewise.
4930 (linux_fetch_registers): Handle mixed regset/non-regset targets.
4931 (linux_store_registers): Likewise.
4932 * linux-mips-low.c (init_registers_mips_dsp_linux): New
4933 prototype.
4934 (init_registers_mips64_dsp_linux): Likewise.
4935 (init_registers_mips_linux): New macro.
4936 (init_registers_mips_dsp_linux): Likewise.
4937 (mips_dsp_num_regs): Likewise.
4938 (DSP_BASE, DSP_CONTROL): New fallback macros.
4939 (mips_base_regs): New macro.
4940 (mips_regmap): Use it. Fix the size.
4941 (mips_dsp_regmap): New variable.
4942 (mips_dsp_regset_bitmap): Likewise.
4943 (mips_arch_setup): New function.
4944 (mips_cannot_fetch_register): Use the_low_target.regmap rather
4945 than mips_regmap.
4946 (mips_cannot_store_register): Likewise.
4947 (the_low_target): Update .arch_setup, .num_regs and .regmap
4948 initializers. Add .regset_bitmap initializer.
4949 * linux-arm-low.c (the_low_target): Add .regset_bitmap
4950 initializer.
4951 * linux-bfin-low.c (the_low_target): Likewise.
4952 * linux-cris-low.c (the_low_target): Likewise.
4953 * linux-crisv32-low.c (the_low_target): Likewise.
4954 * linux-ia64-low.c (the_low_target): Likewise.
4955 * linux-m32r-low.c (the_low_target): Likewise.
4956 * linux-m68k-low.c (the_low_target): Likewise.
4957 * linux-ppc-low.c (the_low_target): Likewise.
4958 * linux-s390-low.c (the_low_target): Likewise.
4959 * linux-sh-low.c (the_low_target): Likewise.
4960 * linux-sparc-low.c (the_low_target): Likewise.
4961 * linux-tic6x-low.c (the_low_target): Likewise.
4962 * linux-x86-low.c (the_low_target): Likewise.
4963 * linux-xtensa-low.c (the_low_target): Likewise.
4964 * configure.srv <mips*-*-linux*>: Add mips-dsp-linux.o and
4965 mips64-dsp-linux.o to srv_regobj. Add mips-dsp-linux.xml,
4966 mips64-dsp-linux.xml, mips-dsp.xml and mips64-dsp.xml to
4967 srv_xmlfiles.
4968 * Makefile.in (mips-dsp-linux.o, mips-dsp-linux.c): New targets.
4969 (mips64-dsp-linux.o, mips64-dsp-linux.c): Likewise.
4970
c03e6ccc
YQ
49712012-02-29 Yao Qi <yao@codesourcery.com>
4972 Pedro Alves <palves@redhat.com>
4973
4974 * linux-low.c: (linux_wait_1): Call unsuspend_all_lwps when
4975 `step_over_finished' is true.
4976
644cebc9
PA
49772012-02-27 Pedro Alves <palves@redhat.com>
4978
4979 * linux-low.c (pid_is_stopped): Delete, moved to common/.
4980 (linux_attach_lwp_1): Adjust to use linux_proc_pid_is_stopped.
4981
c14d7ab2
PA
49822012-02-27 Pedro Alves <palves@redhat.com>
4983
4984 PR server/9684
4985 * linux-low.c (pid_is_stopped): New.
4986 (linux_attach_lwp_1): Handle attaching to 'T (stopped)' processes.
4987
412c89dd
LM
49882012-02-25 Luis Machado <lgustavo@codesourcery.com>
4989
4990 * mem-break.c (clear_gdb_breakpoint_conditions): Fix de-allocation
4991 of conditions.
4992
b745defe
MR
49932012-02-24 Maciej W. Rozycki <macro@codesourcery.com>
4994
4995 * linux-mips-low.c (mips_regmap): Correct the index of $f9.
4996
9f3a5c85
LM
49972012-02-24 Luis Machado <lgustavo@codesourcery>
4998
4999 * server.c (handle_query): Advertise support for target-side
5000 breakpoint condition evaluation.
5001 (process_point_options): New function.
5002 (process_serial_event): When inserting a breakpoint, check for
5003 a target-side condition that should be evaluated.
5004
5005 * mem-break.c: Include regcache.h and ax.h.
5006 (point_cond_list_t): New data structure.
5007 (breakpoint) <cond_list>: New field.
5008 (find_gdb_breakpoint_at): Make non-static.
5009 (delete_gdb_breakpoint_at): Clear any target-side
5010 conditions.
5011 (clear_gdb_breakpoint_conditions): New function.
5012 (add_condition_to_breakpoint): Likewise.
5013 (add_breakpoint_condition): Likewise.
5014 (gdb_condition_true_at_breakpoint): Likewise.
5015 (gdb_breakpoint_here): Return result directly instead
5016 of going through a local variable.
5017
5018 * mem-break.h (find_gdb_breakpoint_at): New prototype.
5019 (clear_gdb_breakpoint_conditions): Likewise.
5020 (add_breakpoint_condition): Likewise.
5021 (gdb_condition_true_at_breakpoint): Likewise.
5022
5023 * linux-low.c (linux_wait_1): Evaluate target-side breakpoint condition.
5024 (need_step_over_p): Take target-side breakpoint condition into
5025 consideration.
5026
5e1dc496
LM
50272012-02-24 Luis Machado <lgustavo@codesourcery>
5028
5029 * server.h: Include tracepoint.h.
5030 (agent_mem_read, agent_get_trace_state_variable_value,
5031 agent_set_trace_state_variable_value,
5032 agent_tsv_read, agent_mem_read_string, get_get_tsv_func_addr,
5033 get_set_tsv_func_addr): New prototypes.
5034
5035 * ax.h: New include file.
5036 * ax.c: New source file.
5037
5038 * tracepoint.c: Include ax.h.
5039 (gdb_agent_op, gdb_agent_op_names, gdb_agent_op_sizes,
5040 agent_expr, eval_result_type): Move to ax.h.
5041 (parse_agent_expr): Rename to ...
5042 (gdb_parse_agent_expr): ... this, make it non-static and move
5043 to ax.h.
5044 (unparse_agent_expr) Rename to ...
5045 (gdb_unparse_agent_expr): ... this, make it non-static and move
5046 to ax.h.
5047 (eval_agent_expr): Rename to ...
5048 (eval_tracepoint_agent_expr): ... this.
5049 (agent_mem_read, agent_mem_read_string, agent_tsv_read): Remove
5050 forward declarations.
5051 (add_tracepoint_action): Call gdb_parse_agent_expr (...).
5052 (agent_get_trace_state_variable_value): New function.
5053 (agent_set_trace_state_variable_value): New function.
5054 (cmd_qtdp): Call gdb_parse_agent_expr (...).
5055 (response_tracepoint): Call gdb_unparse_agent_expr (...).
5056 (do_action_at_tracepoint): Call eval_tracepoint_agent_expr (...).
5057 (condition_true_at_tracepoint): Likewise.
5058 (parse_agent_expr): Rename to ...
5059 (gdb_parse_agent_expr): ... this and move to ax.c.
5060 (unparse_agent_expr): Rename to ...
5061 (gdb_unparse_agent_expr): ... this and move to ax.c.
5062 (gdb_agent_op_name): Move to ax.c.
5063 (eval_agent_expr): Rename to ...
5064 (gdb_eval_agent_expr): ... this, use regcache passed as parameter
5065 and move to ax.c.
5066 (eval_tracepoint_agent_expr): New function.
5067 (agent_mem_read, agent_mem_read_string, agent_tsv_read): Make
43aaf8b6 5068 non-static.
5e1dc496
LM
5069 (current_insn_ptr, emit_error, struct bytecode_address): Move to
5070 ax.c.
5071 (emit_prologue, emit_epilogue, emit_add, emit_sub, emit_mul, emit_lsh,
5072 emit_rsh_signed, emit_rsh_unsigned, emit_ext, emit_log_not,
5073 emit_bit_and, emit_bit_or, emit_bit_xor, emit_bit_not, emit_equal,
5074 emit_less_signed, emit_less_unsigned, emit_ref, emit_if_goto,
5075 emit_goto, write_goto_address, emit_const, emit_reg, emit_pop,
5076 emit_stack, emit_zero_ext, emit_swap, emit_stack_adjust,
5077 emit_int_call_1, emit_void_call_2, emit_eq_goto, emit_ne_goto,
5078 emit_lt_goto, emit_ge_goto, emit_gt_goto, emit_le_goto): Move to ax.c.
5079 (get_get_tsv_func_addr, get_set_tsv_func_addr): New functions.
5080 (compile_bytecodes): Remove forward declaration.
5081 (is_goto_target): Move to ax.c.
5082 (compile_bytecodes): Move to ax.c and call
5083 agent_get_trace_state_variable_value (...) and
5084 agent_set_trace_state_variable_value (...).
5085
5086 * Makefile.in: Update ax.c and IPA dependencies.
5087
277e4e52
PA
50882012-02-24 Pedro Alves <palves@redhat.com>
5089
5090 * tracepoint.c (cmd_bigqtbuffer): Rename as ...
5091 (cmd_bigqtbuffer_circular): ... this. Only handle
5092 'QTBuffer:circular:'.
5093 (handle_tracepoint_general_set): Adjust.
5094
bf4c19f7
YQ
50952012-02-16 Yao Qi <yao@codesourcery.com>
5096
5097 * inferiors.c: Move code to ...
5098 * dll.c: .... here. New.
5099 * server.h: Declare clear_dlls.
5100 * Makefile.in (SFILES): Add dll.c.
5101 (OBS): Add dll.o
5102 (dll.o): New rule.
5103
d73f2619
YQ
51042012-02-11 Yao Qi <yao@codesourcery.com>
5105
5106 * server.c: (handle_monitor_command): Add a new parameter
5107 `own_buf'.
5108 (handle_query): Update caller.
5109
f8255c2a
JB
51102012-02-09 Joel Brobecker <brobecker@adacore.com>
5111
5112 * configure.ac: Add readlink to AC_CHECK_FUNCS list.
5113 * configure, config.in: Regenerate.
5114 * hostio.c: Provide an alternate implementation if HAVE_READLINK
5115 is not defined.
5116
da84f473
PA
51172012-02-02 Pedro Alves <palves@redhat.com>
5118
5119 Try SIGKILL first, then PTRACE_KILL.
5120 * linux-low.c (linux_kill_one_lwp): New.
5121 (linux_kill_one_lwp): Rename to ...
5122 (kill_one_lwp_callback): ... this. Use the new
5123 linux_kill_one_lwp.
5124
e886a173
PA
51252012-02-02 Pedro Alves <palves@redhat.com>
5126
5127 * tracepoint.c (cmd_qtminftpilen): Return 0 if there's no current
5128 inferior.
5129
be07f1a2
PA
51302012-01-27 Pedro Alves <palves@redhat.com>
5131
5132 * linux-low.c (linux_child_pid_to_exec_file): Delete.
5133 (elf_64_file_p): Make static.
5134 (linux_pid_exe_is_elf_64_file): New.
5135 * linux-low.h (linux_child_pid_to_exec_file, elf_64_file_p):
5136 Delete declarations.
5137 (linux_pid_exe_is_elf_64_file): Declare.
5138 * linux-x86-low.c (x86_arch_setup): Use
5139 linux_pid_exe_is_elf_64_file.
5140
d8301ad1
JK
51412012-01-25 Jan Kratochvil <jan.kratochvil@redhat.com>
5142
5143 * linux-low.c (linux_wait_for_event_1): Rename to ...
5144 (linux_wait_for_event): ... here and merge it with former
5145 linux_wait_for_event - new variable wait_ptid, use it.
5146 (linux_wait_for_event): Remove - merge it to linux_wait_for_event_1.
5147
01b17894
PA
51482012-01-23 Pedro Alves <palves@redhat.com>
5149
5150 * server.c (main): Avoid yet another case of infinite loop while
5151 detaching/killing after a longjmp.
5152
e825046f
JK
51532012-01-20 Jan Kratochvil <jan.kratochvil@redhat.com>
5154
5155 Code cleanup.
5156 * linux-low.c (linux_wait_for_event_1): Use ptid_is_pid.
5157
b9e7b9c3
UW
51582012-01-20 Ulrich Weigand <ulrich.weigand@linaro.org>
5159
5160 * hostio.c (handle_readlink): New function.
5161 (handle_vFile): Call it to handle "vFile:readlink" packets.
5162
901f9912
UW
51632012-01-20 Pedro Alves <palves@redhat.com>
5164 Ulrich Weigand <ulrich.weigand@linaro.org>
5165
5166 * server.c (handle_v_requests): Only support vAttach and vRun to
5167 start multiple processes when in extended protocol mode.
5168
fc1ab1a0
PA
51692012-01-17 Pedro Alves <palves@redhat.com>
5170
5171 * tracepoint.c (initialize_tracepoint): Use mmap instead of
5172 memalign plus mprotect to allocate the scratch buffer.
5173
7d5d4e98
PA
51742012-01-13 Pedro Alves <palves@redhat.com>
5175
5176 * server.c (attach_inferior): Clear `cont_thread'.
5177
f128d5e9
PA
51782012-01-13 Pedro Alves <palves@redhat.com>
5179
5180 * server.c (main): Avoid infinite loop while detaching/killing
5181 after a longjmp.
5182
06db92f0
DE
51832012-01-09 Doug Evans <dje@google.com>
5184
5185 * server.c (start_inferior): Set last_ptid in --wrapper case.
5186
32d92999
YQ
51872012-01-06 Yao Qi <yao@codesourcery.com>
5188
5189 * tracepoint.c [IN_PROCESS_AGENT] (debug_threads): Macro
5190 defined.
5191 [IN_PROCESS_AGENT] (debug_agent): New global variable.
5192
5e0a92a9
YQ
51932012-01-04 Yao Qi <yao@codesourcery.com>
5194
5195 * tracepoint.c (cmd_qtdp): Print debug message
5196 for static tracepoint.
5197
ae639e8c
YQ
51982012-01-04 Yao Qi <yao@codesourcery.com>
5199
5200 * tracepoint.c (trace_vdebug): Differentiate debug message
5201 between gdbserver and IPA.
5202
f72429c5
YQ
52032012-01-03 Yao Qi <yao@codesourcery.com>
5204
5205 * tracepoint.c (tracepoint_was_hit): Don't collect for
5206 static tracepoint.
5207
12c3e59c
JB
52082012-01-02 Joel Brobecker <brobecker@adacore.com>
5209
5210 * terminal.h: Reformat copyright header.
5211
67827812
JB
52122012-01-02 Joel Brobecker <brobecker@adacore.com>
5213
5214 * server.c (gdbserver_version): Update copyright year.
5215 * gdbreplay.c (gdbreplay_version): Likewise.
5216
3e52c33d
JK
52172011-12-18 Jan Kratochvil <jan.kratochvil@redhat.com>
5218
5219 * linux-low.c (linux_create_inferior): Put empty if clause for write.
5220
5221 Revert:
5222 2011-12-18 Hui Zhu <teawater@gmail.com>
5223 * linux-low.c (linux_create_inferior): Save return value to ret.
5224
66f1260e
HZ
52252011-12-18 Hui Zhu <teawater@gmail.com>
5226
5227 * linux-low.c (linux_create_inferior): Save return value to ret.
5228
e77616d7
DE
52292011-12-16 Doug Evans <dje@google.com>
5230
e7b06c57
DE
5231 * linux-low.c (linux_create_inferior): If stdio connection,
5232 redirect stdin from /dev/null, stdout to stderr.
5233 * remote-utils.c (remote_is_stdio): New static global.
5234 (remote_connection_is_stdio): New function.
5235 (remote_prepare): Handle stdio connection.
5236 (remote_open): Ditto.
5237 (remote_close): Don't close stdin for stdio connections.
5238 (read_prim,write_prim): New functions. Replace all calls to
5239 read/write to these.
5240 * server.c (main): Watch for "-" argument. Move call to
5241 remote_prepare before start_inferior.
5242 * server.h (STDIO_CONNECTION_NAME): New macro.
5243 (remote_connection_is_stdio): Declare.
5244
e77616d7
DE
5245 * remote-utils.c (prepare_resume_reply): Remove extraneous \n
5246 in debugging output.
5247
82067193
YQ
52482011-12-15 Yao Qi <yao@codesourcery.com>
5249
5250 * tracepoint.c: Include sys/syscall.h.
5251 (gdb_ust_thread): Remove preprocessor conditional.
5252
82bfbe7e
PA
52532011-12-14 Pedro Alves <pedro@codesourcery.com>
5254
5255 * linux-low.c (linux_detach_one_lwp): Call
5256 the_low_target.prepare_to_resume before detaching.
5257
712c6575
YQ
52582011-12-14 Yao Qi <yao@codesourcery.com>
5259
5260 * tracepoint.c (gdb_ust_thread): Don't ignore return value
5261 of write.
5262
d54d1edf
YQ
52632011-12-14 Yao Qi <yao@codesourcery.com>
5264
5265 * i386-low.c (i386_low_stopped_data_address): Initialize local
5266 variable `control'.
5267
6210a125
PA
52682011-12-13 Pedro Alves <pedro@codesourcery.com>
5269
5270 PR remote/13492
5271
5272 * i386-low.c (i386_low_stopped_data_address): Avoid fetching
5273 DR_CONTROL unless necessary. Extend comments.
5274 * linux-x86-low.c (x86_linux_prepare_to_resume): Don't write to
5275 DR0-3 if not used. If any watchpoint was set, clear DR_STATUS.
5276
2ece8244
YQ
52772011-12-13 Yao Qi <yao@codesourcery.com>
5278
5279 * tracepoint.c (trace_buffer_alloc): Replace magic numbers with
5280 macros.
5281 (upload_fast_traceframes, upload_fast_traceframes): Likewise.
5282
784867a5
JK
52832011-12-08 Jan Kratochvil <jan.kratochvil@redhat.com>
5284
5285 * linux-low.c (linux_kill): Skip PTRACE_KILL if LWP does not exist.
5286 Print new debug message for such case.
5287
6bf36717
JK
52882011-12-06 Jan Kratochvil <jan.kratochvil@redhat.com>
5289
5290 Fix overlapping memcpy.
5291 * mem-break.c (set_raw_breakpoint_at): New variable buf. Use it for
5292 the read_inferior_memory transfer.
5293 (delete_fast_tracepoint_jump): New variable buf. Use it for the
5294 write_inferior_memory transfer.
5295 (set_fast_tracepoint_jump): New variable buf. Use it for the
5296 read_inferior_memory and write_inferior_memory transfers.
5297 (uninsert_fast_tracepoint_jumps_at, reinsert_fast_tracepoint_jumps_at)
5298 (delete_raw_breakpoint, uninsert_raw_breakpoint): New variable buf.
5299 Use it for the write_inferior_memory transfer.
5300 (check_mem_read, check_mem_write): New gdb_asserts for overlapping
5301 buffers.
5302
50275556
MR
53032011-12-06 Maciej W. Rozycki <macro@codesourcery.com>
5304
5305 * linux-low.c (fetch_register, store_register): Make code
5306 consistent, fix formatting.
5307
7325beb4
MR
53082011-12-06 Maciej W. Rozycki <macro@codesourcery.com>
5309
5310 * linux-low.c (usr_store_inferior_registers): Factor out code
5311 to handle individual registers into...
5312 (store_register): ... this new function.
5313
c642a434
UW
53142011-12-06 Ulrich Weigand <uweigand@de.ibm.com>
5315
5316 * Makefile.in (s390-linux32v1.o, s390-linux32v1.c): New rules.
5317 (s390-linux32v2.o, s390-linux32v2.c): Likewise.
5318 (s390-linux64v1.o, s390-linux64v1.c): Likewise.
5319 (s390-linux64v2.o, s390-linux64v2.c): Likewise.
5320 (s390x-linux64v1.o, s390x-linux64v1.c): Likewise.
5321 (s390x-linux64v2.o, s390x-linux64v2.c): Likewise.
5322 * configure.srv [s390*-*-linux*] (srv_regobj): Add new objects.
5323 (srv_xmlfiles): Add new XML files.
5324
5325 * linux-s390-low.c: Include "elf/common.h", <sys/ptrace.h>,
5326 and <sys/uio.h>.
5327 (PTRACE_GETREGSET, PTRACE_SETREGSET): Define if undefined.
5328 (init_registers_s390_linux32v1): Add prototype.
5329 (init_registers_s390_linux32v2): Likewise.
5330 (init_registers_s390_linux64v1): Likewise.
5331 (init_registers_s390_linux64v2): Likewise.
5332 (init_registers_s390x_linux64v1): Likewise.
5333 (init_registers_s390x_linux64v2): Likewise.
5334 (s390_num_regs): Increment to 52.
5335 (s390_regmap): Add orig_r2 register.
5336 (s390_num_regs_3264): Increment to 68.
5337 (s390_regmap_3264): Add orig_r2 register.
5338 (s390_collect_ptrace_register): Handle orig_r2 register.
5339 (s390_supply_ptrace_register): Likewise.
5340 (s390_fill_last_break): New function.
5341 (s390_store_last_break): Likewise.
5342 (s390_fill_system_call): New function.
5343 (s390_store_system_call): Likewise.
5344 (target_regsets): Handle NT_S390_LAST_BREAK and NT_S390_SYSTEM_CALL
5345 register sets.
5346 (s390_check_regset): New function.
5347 (s390_arch_setup): Check for presence of NT_S390_LAST_BREAK and
5348 NT_S390_SYSTEM_CALL regsets and use appropriate description.
5349 Update target_regsets for available register sets.
5350
2268b414
JK
53512011-12-02 Paul Pluzhnikov <ppluzhnikov@google.com>
5352 Jan Kratochvil <jan.kratochvil@redhat.com>
5353
5354 * linux-low.c (get_phdr_phnum_from_proc_auxv, get_dynamic, get_r_debug)
5355 (read_one_ptr, struct link_map_offsets, linux_qxfer_libraries_svr4):
5356 New.
5357 (struct linux_target_ops): Install linux_qxfer_libraries_svr4.
5358 * linux-low.h (struct process_info_private): New member r_debug.
5359 * server.c (handle_qxfer_libraries): Call
5360 the_target->qxfer_libraries_svr4.
5361 (handle_qxfer_libraries_svr4): New function.
5362 (qxfer_packets): New entry "libraries-svr4".
5363 (handle_query): Check QXFER_LIBRARIES_SVR4 and report libraries-svr4.
5364 * target.h (struct target_ops): New member qxfer_libraries_svr4.
5365 * remote.c (remote_xfer_partial): Call add_packet_config_cmd for
5366 PACKET_qXfer_libraries_svr4.
5367
d6db1fab
UW
53682011-11-30 Ulrich Weigand <uweigand@de.ibm.com>
5369
5370 * linux-s390-low.c (s390_collect_ptrace_register): Fully convert
5371 PSW address/mask between 8-byte and 16-byte formats.
5372 (s390_supply_ptrace_register): Likewise.
5373 (s390_get_pc, s390_set_pc): 4-byte PSW address always includes
5374 basic addressing mode bit.
5375
242f5f1c
SS
53762011-11-24 Stan Shebs <stan@codesourcery.com>
5377
5378 * tracepoint.c (cmd_qtstatus): Use plongest instead of %llx.
5379
f196051f
SS
53802011-11-17 Stan Shebs <stan@codesourcery.com>
5381
5382 * tracepoint.c (struct tracepoint): New field traceframe_usage.
5383 (tracing_start_time): New global.
5384 (tracing_stop_time): New global.
5385 (tracing_user_name): New global.
5386 (tracing_notes): New global.
5387 (tracing_stop_note): New global.
5388 (cmd_qtstart): Set traceframe_usage, start_time.
5389 (stop_tracing): Set stop_time.
5390 (cmd_qtstatus): Report additional status.
5391 (cmd_qtp): New function.
5392 (handle_tracepoint_query): Call it.
5393 (cmd_qtnotes): New function.
5394 (handle_tracepoint_general_set): Call it.
5395 (get_timestamp): Rename from tsv_get_timestamp.
5396
405f8e94
SS
53972011-11-14 Stan Shebs <stan@codesourcery.com>
5398 Kwok Cheung Yeung <kcy@codesourcery.com>
5399
5400 * linux-x86-low.c (small_jump_insn): New.
5401 (i386_install_fast_tracepoint_jump_pad): Add arguments for
5402 trampoline and error message, build a trampoline and issue a small
5403 jump instruction to it.
5404 (x86_install_fast_tracepoint_jump_pad): Add arguments for
5405 trampoline and error message.
5406 (x86_get_min_fast_tracepoint_insn_len): New.
5407 (the_low_target): Add call to x86_get_min_fast_tracepoint_insn_len.
5408 * linux-low.h (struct linux_target_ops): Add arguments to
5409 install_fast_tracepoint_jump_pad operation, add new operation.
5410 * linux-low.c (linux_install_fast_tracepoint_jump_pad): Add
5411 arguments.
5412 (linux_get_min_fast_tracepoint_insn_len): New function.
5413 (linux_target_op): Add new operation.
5414 * tracepoint.c (gdb_trampoline_buffer): New IPA variable.
5415 (gdb_trampoline_buffer_end): Ditto.
5416 (gdb_trampoline_buffer_error): Ditto.
5417 (struct ipa_sym_addresses): Add fields for new IPA variables.
5418 (symbol_list): Add entries for new IPA variables.
5419 (struct tracepoint): Add fields to hold the address range of the
5420 trampoline used by the tracepoint.
5421 (trampoline_buffer_head): New static variable.
5422 (trampoline_buffer_tail): Ditto.
5423 (claim_trampoline_space): New function.
5424 (have_fast_tracepoint_trampoline_buffer): New function.
5425 (clone_fast_tracepoint): Fill in trampoline fields of tracepoint
5426 structure.
5427 (install_fast_tracepoint): Ditto, also add error buffer argument.
5428 (cmd_qtminftpilen): New function.
5429 (handle_tracepoint_query): Add response to qTMinFTPILen packet.
5430 (fast_tracepoint_from_trampoline_address): New function.
5431 (fast_tracepoint_collecting): Handle trampoline as part of jump
5432 pad space.
5433 (set_trampoline_buffer_space): New function.
5434 (initialize_tracepoint): Initialize new IPA variables.
5435 * target.h (struct target_ops): Add arguments to
5436 install_fast_tracepoint_jump_pad operation, add new
5437 get_min_fast_tracepoint_insn_len operation.
5438 (target_get_min_fast_tracepoint_insn_len): New.
5439 (install_fast_tracepoint_jump_pad): Add arguments.
5440 * server.h (IPA_BUFSIZ): Define.
5441 * linux-i386-ipa.c: Include extra header files.
5442 (initialize_fast_tracepoint_trampoline_buffer): New function.
5443 (initialize_low_tracepoint): Call it.
5444 * server.h (set_trampoline_buffer_space): Declare.
5445 (claim_trampoline_space): Ditto.
5446 (have_fast_tracepoint_trampoline_buffer): Ditto.
5447
1e4d1764
YQ
54482011-11-14 Yao Qi <yao@codesourcery.com>
5449
5450 * server.c (handle_query): Handle InstallInTrace for qSupported.
5451 * tracepoint.c (add_tracepoint): Sort list.
5452 (install_tracepoint, download_tracepoint): New.
5453 (cmd_qtdp): Call them to install and download tracepoints.
5454 (sort_tracepoints): Removed.
5455 (cmd_qtstart): Update.
5456
5c73ff4e
YQ
54572011-11-14 Yao Qi <yao@codesourcery.com>
5458
5459 * mem-break.c (inc_ref_fast_tracepoint_jump): New.
5460 * mem-break.h: Declare.
5461 * tracepoint.c (cmd_qtstart): Move some code to ...
5462 (clone_fast_tracepoint, install_fast_tracepoint): ... here.
5463 New.
5464 (download_tracepoints): Move some code to ...
5465 (download_tracepoint_1): ... here. New.
5466
86a30030
YQ
54672011-11-08 Yao Qi <yao@codesourcery.com>
5468
5469 * remote-utils.c (relocate_instruction): A comment fix.
5470
8d26e50c
JB
54712011-11-07 Joel Brobecker <brobecker@adacore.com>
5472
5473 * win32-i386-low.c (dr_status_mirror, dr_control_mirror): Delete.
5474 (i386_dr_low_get_control, i386_dr_low_get_status): Use
5475 dr_status_mirror and dr_control_mirror from debug_reg_state.
5476 (i386_dr_low_get_status): Use debug_reg_state.dr_status_mirror
5477 (i386_initial_stuff): Remove use of deleted globals.
5478 (i386_get_thread_context, i386_set_thread_context,
5479 i386_thread_added): Use dr_status_mirror and dr_control_mirror
5480 from debug_reg_state.
5481
a59306a3
YQ
54822011-11-05 Yao Qi <yao@codesourcery.com>
5483
5484 * tracepoint.c (gdb_collect): Loop over tracepoints of same
5485 address as TPOINT's.
5486
3065dfb6
SS
54872011-11-02 Stan Shebs <stan@codesourcery.com>
5488
5489 * tracepoint.c (agent_mem_read_string): New function.
5490 (eval_agent_expr): Call it for tracenz.
5491 * server.c (handle_query): Report support for tracenz.
5492
fd0d8c7c
YQ
54932011-11-02 Yao Qi <yao@codesourcery.com>
5494
5495 * tracepoint.c (cmd_qtstart): Remove unused local variables.
5496
609086b1
YQ
54972011-11-02 Yao Qi <yao@codesourcery.com>
5498
5499 * target.h: Fix a typo in comment.
5500
b9fd1791
PA
55012011-10-31 Pedro Alves <pedro@codesourcery.com>
5502
5503 * mem-break.c (check_mem_write): Add `myaddr' parameter. Don't
5504 clobber the breakpoints' shadows with fast tracepoint jumps.
5505 * mem-break.h (check_mem_write): Add `myaddr' parameter.
5506 * target.c (write_inferior_memory): Also pass MYADDR down to
5507 check_mem_write.
5508
03583c20
UW
55092011-10-07 Ulrich Weigand <ulrich.weigand@linaro.org>
5510
5511 * configure.ac: Check support for personality routine.
5512 * configure: Regenerate.
5513 * config.in: Likewise.
5514 * linux-low.c: Include <sys/personality.h>.
5515 Define ADDR_NO_RANDOMIZE if necessary.
5516 (linux_create_inferior): Disable address space randomization when
5517 forking inferior, if requested.
5518 (linux_supports_disable_randomization): New function.
5519 (linux_target_ops): Install it.
5520 * server.h (disable_randomization): Declare.
5521 * server.c (disable_randomization): New global variable.
5522 (handle_general_set): Handle QDisableRandomization.
5523 (handle_query): Likewise for qSupported.
5524 (main): Support --disable-randomization and --no-disable-randomization
5525 command line arguments.
5526 * target.h (struct target_ops): Add supports_disable_randomization.
5527 (target_supports_disable_randomization): New macro.
5528
723b724b
MF
55292011-09-29 Mike Frysinger <vapier@gentoo.org>
5530
5531 * linux-low.c (target_loadseg): Add defined PTRACE_GETFDPIC to the
5532 ifdef check.
5533 [PT_GETDSBT] (target_loadmap): Wrap in a defined PT_GETDSBT check.
5534 [!PT_GETDSBT] (target_loadmap): New definition.
5535 (LINUX_LOADMAP, LINUX_LOADMAP_EXEC, LINUX_LOADMAP_INTERP): Define.
5536 (linux_read_loadmap): Change PTRACE_GETDSBT_EXEC to
5537 LINUX_LOADMAP_EXEC, PTRACE_GETDSBT_INTERP to LINUX_LOADMAP_INTERP,
5538 and PT_GETDSBT to LINUX_LOADMAP.
5539 [!PT_GETDSBT] (linux_read_loadmap): Define to NULL.
5540 (linux_target_ops): Delete unnecessary ifdef PT_GETDSBT check.
5541
55329a5c 55422011-09-21 Ulrich Weigand <ulrich.weigand@linaro.org>
71487fd7
UW
5543
5544 * linux-arm-low.c (struct arm_linux_hwbp_cap): Remove.
5545 (arm_linux_hwbp_cap): New static variable.
5546 (arm_linux_get_hwbp_cap): Replace by ...
5547 (arm_linux_init_hwbp_cap): ... this new function.
5548 (arm_linux_get_hw_breakpoint_count): Use arm_linux_hwbp_cap.
5549 (arm_linux_get_hw_watchpoint_count): Likewise.
5550 (arm_linux_get_hw_watchpoint_max_length): Likewise.
5551 (arm_arch_setup): Call arm_linux_init_hwbp_cap.
5552 (arm_prepare_to_resume): Use perror_with_name instead of error.
5553
55329a5c 55542011-09-21 Ulrich Weigand <ulrich.weigand@linaro.org>
09b4ad9f
UW
5555
5556 * linux-arm-low.c: Include <signal.h>.
5557 (PTRACE_GETHBPREGS, PTRACE_SETHBPREGS): Define if necessary.
5558 (struct arm_linux_hwbp_cap): New data type.
5559 (arm_hwbp_type, arm_hwbp_control_t): New typedefs.
5560 (struct arm_linux_hw_breakpoint): New data type.
5561 (MAX_BPTS, MAX_WPTS): Define.
5562 (struct arch_process_info, struct arch_lwp_info): New data types.
5563 (arm_linux_get_hwbp_cap): New function.
5564 (arm_linux_get_hw_breakpoint_count): Likewise.
5565 (arm_linux_get_hw_watchpoint_count): Likewise.
5566 (arm_linux_get_hw_watchpoint_max_length): Likewise.
5567 (arm_hwbp_control_initialize): Likewise.
5568 (arm_hwbp_control_is_enabled): Likewise.
5569 (arm_hwbp_control_is_initialized): Likewise.
5570 (arm_hwbp_control_disable): Likewise.
5571 (arm_linux_hw_breakpoint_equal): Likewise.
5572 (arm_linux_hw_point_initialize): Likewise.
5573 (struct update_registers_data): New data structure.
5574 (update_registers_callback: New function.
5575 (arm_insert_point): Likewise.
5576 (arm_remove_point): Likewise.
5577 (arm_stopped_by_watchpoint): Likewise.
5578 (arm_stopped_data_address): Likewise.
5579 (arm_new_process): Likewise.
5580 (arm_new_thread): Likewise.
5581 (arm_prepare_to_resume): Likewise.
5582 (the_low_target): Register arm_insert_point, arm_remove_point,
5583 arm_stopped_by_watchpoint, arm_stopped_data_address, arm_new_process,
5584 arm_new_thread, and arm_prepare_to_resume.
5585
6b9801d4
SS
55862011-09-15 Stan Shebs <stan@codesourcery.com>
5587
5588 * server.h (struct emit_ops): Add compare-goto fields.
5589 * tracepoint.c (gdb_agent_op_sizes): New table.
5590 (emit_eq_goto): New function.
5591 (emit_ne_goto): New function.
5592 (emit_lt_goto): New function.
5593 (emit_le_goto): New function.
5594 (emit_gt_goto): New function.
5595 (emit_ge_goto): New function.
5596 (is_goto_target): New function.
5597 (compile_bytecodes): Recognize special cases of compare-goto
5598 combinations and call specialized emitters for them.
5599 * linux-x86-low.c (amd64_emit_eq_goto): New function.
5600 (amd64_emit_ne_goto): New function.
5601 (amd64_emit_lt_goto): New function.
5602 (amd64_emit_le_goto): New function.
5603 (amd64_emit_gt_goto): New function.
5604 (amd64_emit_ge_goto): New function.
5605 (amd64_emit_ops): Add the new functions.
5606 (i386_emit_eq_goto): New function.
5607 (i386_emit_ne_goto): New function.
5608 (i386_emit_lt_goto): New function.
5609 (i386_emit_le_goto): New function.
5610 (i386_emit_gt_goto): New function.
5611 (i386_emit_ge_goto): New function.
5612 (i386_emit_ops): Add the new functions.
5613
bf15cbda
SS
56142011-09-08 Stan Shebs <stan@codesourcery.com>
5615
5616 * linux-x86-low.c (i386_emit_prologue): Save %ebx.
5617 (i386_emit_epilogue): Restore %ebx.
5618
943ca1dd
JZ
56192011-08-31 Jie Zhang <jzhang918@gmail.com>
5620
5621 * server.c (step_thread): Remove definition.
5622 (process_serial_event): Don't handle Hs.
5623 * server.h (step_thread): Remove declaration.
5624 * target.c (set_desired_inferior): Remove use of step_thread.
5625
e3deef73
LM
56262011-08-24 Luis Machado <lgustavo@codesourcery.com>
5627
5628 * linux-low.c: Include linux-procfs.h.
5629 (linux_attach_lwp_1): Update comments.
5630 (linux_attach): Scan for existing threads when attaching to a
5631 process that is the tgid.
5632 * Makefile.in: Update dependencies.
5633
13da1c97
LM
56342011-08-24 Luis Machado <lgustavo@codesourcery.com>
5635
5636 * configure.srv: Add linux-procfs.o dependencies.
5637
881127c9
YQ
56382011-08-14 Yao Qi <yao@codesourcery.com>
5639
5640 * target.h (struct target_ops): Fix indent.
5641 * win32-low.c (win32_target_ops): Fix comment.
5642
58dbd541
YQ
56432011-08-14 Andrew Jenner <andrew@codesourcery.com>
5644 Yao Qi <yao@codesourcery.com>
5645
5646 * Makefile.in (clean): Remove tic6x-*.c files.
5647 (linux-tic6x-low.o, tic6x-c62x-linux.o, tic6x-c64x-linux.o): New rules.
5648 (tic6x-c64xp-linux.o, tic6x-c62x-linux.c, tic6x-c64x-linux.c): Likewise.
5649 (tic6x-c64xp-linux.c): Likewise.
5650 * configure.srv: Add support for tic6x-*-uclinux.
5651 * linux-tic6x-low.c: New.
5652 * linux-low.c (PT_TEXT_ADDR, PT_DATA_ADDR, PT_TEXT_END_ADDR): Define.
5653
78d85199
YQ
56542011-08-14 Andrew Stubbs <ams@codesourcery.com>
5655 Yao Qi <yao@codesourcery.com>
5656
5657 * target.h (struct target_ops): Add read_loadmap.
5658 * linux-low.c (struct target_loadseg): New type.
5659 (struct target_loadmap): New type.
5660 (linux_read_loadmap): New function.
5661 (linux_target_ops): Add linux_read_loadmap.
5662 * server.c (handle_query): Support qXfer:fdpic:read packet.
43aaf8b6
PA
5663 * win32-low.c (win32_target_ops): Initialize field `read_loadmap'
5664 to NULL.
78d85199 5665
a959a88d
EZ
56662011-08-05 Eli Zaretskii <eliz@gnu.org>
5667
5668 * win32-low.c: Include <stdint.h>.
5669
1ced966e
PA
56702011-07-22 Pedro Alves <pedro@codesourcery.com>
5671
5672 * i386-low.c (i386_insert_aligned_watchpoint): Don't pass the info
5673 to the inferior here.
5674 (i386_remove_aligned_watchpoint): Ditto.
5675 (i386_handle_nonaligned_watchpoint): Return immediate on fail to
5676 fit part of the watchpoint in the debug registers.
5677 (i386_update_inferior_debug_regs): New.
5678 (i386_low_insert_watchpoint): Work on a local mirror of the debug
5679 registers, and only update the inferior on success.
5680 (i386_low_remove_watchpoint): Ditto.
5681
d26e3629
KY
56822011-07-22 Kwok Cheung Yeung <kcy@codesourcery.com>
5683
5684 * linux-low.c (compare_ints, unique, list_threads, show_process,
5685 linux_core_of_thread): Delete.
5686 (linux_target_ops): Change linux_core_of_thread to
5687 linux_common_core_of_thread.
5688 (linux_qxfer_osdata): Defer to linux_common_xfer_osdata.
5689 * utils.c (malloc_failure): Change type of argument.
5690 (xmalloc, xrealloc, xcalloc, xsnprintf): Delete.
5691 * Makefile.in (SFILES): Add common/common-utils.c, common/xml-utils.c,
5692 common/linux-osdata.c, common/ptid.c and common/buffer.c.
5693 (OBS): Add xml-utils.o, common-utils.o, ptid.o and buffer.o.
5694 (IPA_OBJS): Add common-utils-ipa.o.
5695 (ptid_h, linux_osdata_h): New macros.
5696 (server_h): Add common/common-utils.h, common/xml-utils.h,
5697 common/buffer.h, common/gdb_assert.h, common/gdb_locale.h and
5698 common/ptid.h.
5699 (common-utils-ipa.o, common-utils.o, xml-utils.o, linux-osdata.o,
5700 ptid.o, buffer.o): New rules.
5701 (linux-low.o): Add common/linux-osdata.h as a dependency.
5702 * configure.srv (srv_tgtobj): Add linux-osdata.o to Linux targets.
5703 * configure.ac: Add AC_HEADER_DIRENT check.
5704 * config.in: Regenerate.
5705 * configure: Regenerate.
5706 * remote-utils.c (xml_escape_text): Delete.
5707 (buffer_grow, buffer_free, buffer_init, buffer_finish,
5708 buffer_xml_printf): Move to common/buffer.c.
5709 * server.c (main): Remove call to initialize_inferiors.
5710 * server.h (struct ptid, ptid_t, minus_one_ptid, null_ptid,
5711 ptid_build, pid_to_ptid, ptid_get_pid, ptid_get_lwp, ptid_get_tid,
5712 ptid_equal, ptid_is_pid, initialize_inferiors, xml_escape_text,
5713 internal_error, gdb_assert, gdb_assert_fail): Delete.
5714 (struct buffer, buffer_grow, buffer_free, buffer_init, buffer_finish,
5715 buffer_xml_printf, buffer_grow_str, buffer_grow_str0): Move to
5716 common/buffer.h.
5717 * inferiors.c (null_ptid, minus_one_ptid, ptid_build, pid_to_ptid,
5718 ptid_get_pid, ptid_get_lwp, ptid_get_tid, ptid_equal, ptid_is_pid,
5719 initialize_inferiors): Delete.
5720
2275a1a7
PA
57212011-07-20 Pedro Alves <pedro@codesourcery.com>
5722
5723 * tracepoint.c (tracepoint_look_up_symbols): Return upon the first
5724 symbol error.
5725
0a5b1e09
PA
57262011-05-31 Pedro Alves <pedro@codesourcery.com>
5727
5728 * linux-x86-low.c (i386_dr_low_get_addr): Fix off by one in
5729 assertion.
5730 * win32-i386-low.c (i386_dr_low_get_addr): Ditto.
5731
6938fd34
YQ
57322011-05-26 Yao Qi <yao@codesourcery.com>
5733
5734 * Makefile.in (thread-db.o): Track dependence to
5735 common/gdb_thread_db.h.
5736 * thread-db.c: include gdb_thread_db.h from right place.
5737
b481f9e0
TT
57382011-05-16 Adrian Cornish <gnu@bluedreamer.com>
5739
5740 * linux-i386-ipa.c (supply_static_tracepoint_registers): Pass
5741 __FILE__ and __LINE__ to internal_error.
5742
98a5dd13
DE
57432011-05-13 Doug Evans <dje@google.com>
5744
5745 * thread-db.c (try_thread_db_load_from_sdir): New function.
5746 (try_thread_db_load_from_dir): New function.
5747 (thread_db_load_search): Handle $sdir, ignore $pdir.
5748 Remove trying of system directories if search of
5749 libthread-db-search-path fails, that is now done via $sdir.
5750
d248b706
KY
57512011-05-12 Kwok Cheung Yeung <kcy@codesourcery.com>
5752
5753 * server.c (handle_query): Add EnableDisableTracepoints to the list
5754 of supported features.
43aaf8b6 5755 * tracepoint.c (clear_installed_tracepoints): Uninstall disabled
d248b706 5756 tracepoints.
43aaf8b6
PA
5757 (cmd_qtenable_disable): New.
5758 (cmd_qtstart): Install tracepoints even if disabled.
5759 (handle_tracepoint_general_set): Add call to cmd_qtenable_disable on
5760 receiving a QTEnable or QTDisable packet.
5761 (gdb_collect): Skip data collection if fast tracepoint is disabled.
5762 (ust_marker_to_static_tracepoint): Do not ignore disabled static
5763 tracepoints.
5764 (gdb_probe): Skip data collection if static tracepoint is disabled.
d248b706 5765
84e578fb
DE
57662011-05-10 Doug Evans <dje@google.com>
5767
5768 * thread-db.c (thread_db_handle_monitor_command): Handle elided path.
5769
71f55dd8
DE
57702011-05-04 Doug Evans <dje@google.com>
5771
5772 * linux-low.c (linux_join): Skip process lookup.
5773 * spu-low.c (spu_join): Ditto.
5774 * server.c (join_inferiors_callback): Delete.
5775 (process_serial_event): For 'D' packet (detach) call join_inferior
5776 directly.
5777
4d393d60
JM
57782011-05-04 Joseph Myers <joseph@codesourcery.com>
5779
5780 * README: Don't mention xscale*-*-linux*.
5781 * configure.srv (xscale*-*-linux*): Don't handle target.
5782
b00ad6ff
NF
57832011-04-27 Nathan Froyd <froydnj@codesourcery.com>
5784
5785 * linux-x86-low.c (amd64_emit_const): Call memcpy instead of
5786 casting pointers.
5787 (amd64_emit_reg, amd64_emit_int_call_1, amd64_emit_void_call_2):
5788 (i386_emit_const, i386_emit_reg, i386_emit_int_call_1):
5789 (i386_emit_void_call_2): Likewise.
5790
af96c192
YQ
57912011-04-26 Yao Qi <yao@codesourcery.com>
5792
43aaf8b6
PA
5793 * linux-low.c: Move common macros to linux-ptrace.h.
5794 Include linux-ptrace.h.
af96c192
YQ
5795 * Makefile.in (linux_ptrace_h): New.
5796 (linux-low.o): Depends on linux-ptrace.h.
5797
03f2bd59
JK
57982011-04-24 Jan Kratochvil <jan.kratochvil@redhat.com>
5799
5800 * remote-utils.c (handle_accept_event): Close LISTEN_DESC only if
5801 RUN_ONCE. Comment for the LISTEN_DESC delete_file_handler call.
5802 (remote_prepare): New function with most of the TCP code from ...
5803 (remote_open): ... here. Detect PORT here unconditionally. Move also
5804 setting transport_is_reliable.
5805 * server.c (run_once): New variable.
5806 (gdbserver_usage): Document it.
5807 (main): Set run_once for `--once'. Call remote_prepare. Exit after
5808 the first run if RUN_ONCE.
5809 * server.h (run_once, remote_prepare): New declarations.
5810
7a9dd1b2
TT
58112011-04-19 Tom Tromey <tromey@redhat.com>
5812
5813 * win32-low.c (handle_load_dll): Remove duplicate "the".
5814
81239425
PM
58152011-04-07 Pierre Muller <muller@ics.u-strasbg.fr>
5816
5817 Remove support for old Cygwin 1.5 versions.
5818 * win32-low.c (win32_create_inferior): Use new cygwin_path_list
5819 function to avoid warning.
5820 (win32_add_one_solib): Use cygwin_conv_path function to avoid
5821 warning.
5822
9e0627f1
PM
58232011-03-18 Pierre Muller <muller@ics.u-strasbg.fr>
5824
5825 * gdbserver/server.h (Macro _): Define it if not available.
5826
588eebee
MS
58272011-03-14 Michael Snyder <msnyder@vmware.com>
5828
348af9f7 5829 * hostio.c (handle_close): Remove unnecessary null test.
588eebee 5830
43f70d4c
JB
58312011-03-10 Joel Brobecker <brobecker@adacore.com>
5832
5833 * Makefile.in (maintainer-clean realclean distclean): Remove
5834 "make ... subdir_do" command.
5835
348af9f7
MS
58362011-03-10 Michael Snyder <msnyder@vmware.com>
5837
5838 * tracepoint.c (tracepoint_finish_step): Fix loop variable.
5839
5840 * server.c (handle_v_run): Free alloced buffer on early return.
5841
e637a4f5
YQ
58422011-03-09 Yao Qi <yao@codesourcery.com>
5843
5844 Revert:
5845 2011-03-04 Yao Qi <yao@codesourcery.com>
5846
5847 * Makefile.in: Remove GNU make feature --directory.
5848
5849 2011-03-05 Yao Qi <yao@codesourcery.com>
5850
5851 * Makefile.in (CLEANDIRS, REQUIRED_SUBDIRS): New variable.
5852 (subdir_do): New make target. Copied from gdb/Makefile.
5853 (maintainer-clean, realclean, distclean, clean): Call corresponding
5854 make targets in common/Makefile.
5855
5856 2011-02-11 Yao Qi <yao@codesourcery.com>
5857
5858 * configure.ac: Call AC_PROG_RANLIB.
5859 * Makefile.in: Remove signals.o from OBS. Link libcommon.a.
5860 * configure: Regenerate.
5861
e6edda56
JK
58622011-03-07 Jan Kratochvil <jan.kratochvil@redhat.com>
5863
5864 * remote-utils.c (putpkt_binary_1): Calculate BUF2 size dynamically.
5865
e5141119
JB
58662011-03-06 Yao Qi <yao@codesourcery.com>
5867
5868 * Makefile.in (REQUIRED_SUBDIRS): Remove $(LIBCOMMON_DIR).
5869
64794aa4
JB
58702011-03-05 Yao Qi <yao@codesourcery.com>
5871
5872 * Makefile.in (CLEANDIRS, REQUIRED_SUBDIRS): New variable.
5873 (subdir_do): New make target. Copied from gdb/Makefile.
5874 (maintainer-clean, realclean, distclean, clean): Call corresponding
5875 make targets in common/Makefile.
5876
7a762829
YQ
58772011-03-04 Yao Qi <yao@codesourcery.com>
5878
5879 * Makefile.in: Remove GNU make feature --directory.
5880
348af9f7
MS
58812011-03-04 Michael Snyder <msnyder@vmware.com>
5882
5883 * server.c (queue_stop_reply): Call xmalloc not malloc.
5884
58852011-03-02 Michael Snyder <msnyder@vmware.com>
5886
5887 * linux-arm-low.c (arm_arch_setup): Replace malloc with xmalloc.
5888
9f72fee2
MS
58892011-02-28 Michael Snyder <msnyder@vmware.com>
5890
588eebee
MS
5891 * tracepoint.c (cmd_qtv): Discard unused value 'packet'.
5892 (cmd_qtframe): Ditto.
5893 (cmd_qtbuffer): Ditto.
5894 (cmd_bigqtbuffer): Ditto.
5895
9f72fee2
MS
5896 * utils.c (decimal2str): Initialize 'width' to nine, then
5897 don't mess with it.
5898
8040bd49
UW
58992011-02-28 Ulrich Weigand <uweigand@de.ibm.com>
5900
5901 * hostio.c (require_data): Free *data, not data.
5902
7e52cbd0
JK
59032011-02-28 Jan Kratochvil <jan.kratochvil@redhat.com>
5904
5905 * hostio.c (require_data): Use free, not xfree.
5906
9130f83e
MS
59072011-02-27 Michael Snyder <msnyder@vmware.com>
5908
4b812f4e
MS
5909 * server.c (handle_query): Discard unused value.
5910
9130f83e
MS
5911 * hostio.c (require_data): Free malloc memory before returning
5912 error.
5913
69d37113
MS
59142011-02-26 Michael Snyder <msnyder@vmware.com>
5915
5916 * linux-low.c (list_threads): Call closedir for dirent.
5917
35f5825a
MS
59182011-02-27 Michael Snyder <msnyder@vmware.com>
5919
2a589cef
MS
5920 * i386-low.c (i386-length_and_rw_bits): Comment the fact that
5921 a case statement falls through.
5922
0adea5f7
MS
5923 * linux-low.c (linux_xfer_siginfo): Fix fencepost error.
5924
35f5825a
MS
5925 * linux-amd64-ipa.c (gdb_agent_get_raw_reg): Fix fencepost error
5926 in comparison.
5927
238f1c74
MS
59282011-02-26 Michael Snyder <msnyder@vmware.com>
5929
5930 * utils.c (decimal2str): Eliminate dead code and dead param.
5931 (pulongest): Drop dead param from call to decimal2str.
5932 (plongest): Ditto.
5933
633ff500
JB
59342011-02-24 Joel Brobecker <brobecker@adacore.com>
5935
5936 Revert the following patch (not approved yet):
5937 2011-02-21 Hui Zhu <teawater@gmail.com>
5938 * tracepoint.c (tp_printf): New function.
5939 (eval_agent_expr): Handle gdb_agent_op_printf.
5940
f9c6ff72
HZ
59412011-02-21 Hui Zhu <teawater@gmail.com>
5942
5943 * tracepoint.c (tp_printf): New function.
5944 (eval_agent_expr): Handle gdb_agent_op_printf.
5945
94d5e490
TT
59462011-02-18 Tom Tromey <tromey@redhat.com>
5947
5948 * Makefile.in (tracepoint-ipa.o): Depend on ax.def.
5949 (tracepoint.o): Likewise.
5950 * tracepoint.c (enum gdb_agent_op): Use ax.def.
5951 (gdb_agent_op_names): Likewise.
5952
c7f96d2b
TT
59532011-02-18 Tom Tromey <tromey@redhat.com>
5954
5955 * tracepoint.c (enum gdb_agent_op) <gdb_agent_op_pick,
5956 gdb_agent_op_rot>: New constants.
5957 (gdb_agent_op_names): Add pick and roll.
5958 (eval_agent_expr) <gdb_agent_op_pick, gdb_agent_op_rot>: New
5959 cases.
5960
0feedb2c
JK
59612011-02-15 Jan Kratochvil <jan.kratochvil@redhat.com>
5962
5963 * aclocal.m4: Regenerated with aclocal-1.11.1.
5964
b3b9301e
PA
59652011-02-14 Pedro Alves <pedro@codesourcery.com>
5966
5967 * server.c (handle_qxfer_traceframe_info): New.
5968 (qxfer_packets): Register "traceframe-info".
5969 (handle_query): Report support for qXfer:traceframe-info:read+.
5970 * tracepoint.c (match_blocktype): New.
5971 (traceframe_find_block_type): Rename to ...
5972 (traceframe_walk_blocks): ... this. Add callback filter argument,
5973 and use it.
5974 (traceframe_find_block_type): New, reimplemented on top of
5975 traceframe_walk_blocks.
5976 (build_traceframe_info_xml): New.
5977 (traceframe_read_info): New.
5978 * server.h (traceframe_read_info): Declare.
5979
4f3e6fb7
YQ
59802011-02-11 Yao Qi <yao@codesourcery.com>
5981
5982 * configure.ac: Call AC_PROG_RANLIB.
5983 * Makefile.in: Remove signals.o from OBS. Link libcommon.a.
5984 * configure: Regenerate.
5985
764880b7
PA
59862011-02-07 Pedro Alves <pedro@codesourcery.com>
5987
5988 * server.c (gdb_read_memory): Change return semantics to allow
5989 partial transfers.
5990 (handle_search_memory_1): Adjust.
5991 (process_serial_event) <'m' packet>: Handle partial transfers.
5992 * tracepoint.c (traceframe_read_mem): Handle partial transfers.
5993
1c79eb8a
PA
59942011-01-28 Pedro Alves <pedro@codesourcery.com>
5995
5996 * regcache.c (init_register_cache): Initialize
5997 regcache->register_status.
5998 (free_register_cache): Release regcache->register_status.
5999 (regcache_cpy): Copy register_status.
6000 (registers_to_string): Print 'x's for unavailable registers.
6001 (supply_register): Mark the register's status valid or
6002 unavailable, depending on whether a buffer was passed in or not.
6003 (supply_register_zeroed): New.
6004 (supply_regblock): Mark the registers' status valid or
6005 unavailable, depending on whether a buffer was passed in or not.
6006 * regcache.h (REG_UNAVAILABLE, REG_VALID): New defines.
6007 (struct regcache): New `register_status' field.
6008 (supply_register_zeroed): Declare.
6009 * i387-fp.c (i387_xsave_to_cache): Zero out registers using
6010 supply_register_zeroed, rather than passing a NULL buffer to
6011 supply_register.
6012 * tracepoint.c (fetch_traceframe_registers): Update comment.
6013
85724a0e
PA
60142011-01-28 Pedro Alves <pedro@codesourcery.com>
6015
6016 * i387-fp.c (i387_xsave_to_cache): Make passing NULL as register
6017 buffer explicit.
6018
d08aafef
PA
60192011-01-25 Pedro Alves <pedro@codesourcery.com>
6020
6021 * server.h (decode_xfer_write): Change prototype.
6022 * remote-utils.c (decode_xfer_write): Remove `annex' parameter,
6023 and don't extract the annex here.
6024 * server.c (decode_xfer_read): Remove `annex' parameter,
6025 and don't extract the annex here.
6026 (decode_xfer): New.
6027 (struct qxfer): New.
6028 (handle_qxfer_auxv, handle_qxfer_features, handle_qxfer_libraries)
6029 (handle_qxfer_osdata, handle_qxfer_siginfo, handle_qxfer_spu)
6030 (handle_qxfer_statictrace): New functions, abstracted out from
6031 handle_query, and made to use the struct qxfer interface.
6032 (handle_threads_qxfer_proper): Rename to ...
6033 (handle_qxfer_threads_proper): ... this.
6034 (handle_threads_qxfer): Rename to ...
6035 (handle_qxfer_threads): ... this. Adjust.
6036 (qxfer_packets): New array.
6037 (handle_qxfer): New function.
6038 (handle_query): Use handle_qxfer.
6039
493e2a69
MS
60402011-01-05 Michael Snyder <msnyder@msnyder-server.eng.vmware.com>
6041
6042 * gdbreplay.c: Shorten lines of >= 80 columns.
6043 * linux-low.c: Ditto.
6044 * linux-ppc-low.c: Ditto.
6045 * linux-s390-low.c: Ditto.
6046 * linux-sparc-low.c: Ditto.
6047 * linux-x86-low.c: Ditto.
6048 * linux-xtensa-low.c: Ditto.
6049 * mem-break.c: Ditto.
6050 * nto-low.c: Ditto.
6051 * regcache.h: Ditto.
6052 * remote-utils.c: Ditto.
6053 * server.c: Ditto.
6054 * server.h: Ditto.
6055 * thread-db.c: Ditto.
6056 * tracepoint.c: Ditto.
6057 * utils.c: Ditto.
6058 * win32-low.h: Ditto.
6059
44944448
JB
60602011-01-05 Joel Brobecker <brobecker@adacore.com>
6061
6062 * gdbserver/configure.ac, gdbserver/gdbserver.1: Copyright year
6063 update.
6064
71ce852c
JB
60652011-01-01 Joel Brobecker <brobecker@adacore.com>
6066
6067 * server.c (gdbserver_version): Update copyright year in version
6068 output.
6069 * gdbreplay.c (gdbreplay_version): Ditto.
6070
eb826dc6
MF
60712010-12-29 Jie Zhang <jie.zhang@analog.com>
6072
6073 * configure.srv (bfin-*-*linux*): Handle Blackfin/Linux targets.
6074 * linux-bfin-low.c: New file.
6075 * linux-low.c: Define PT_TEXT_ADDR, PT_TEXT_END_ADDR, and
6076 PT_DATA_ADDR for BFIN targets.
6077 * Makefile.in (SFILES): Add linux-bfin-low.c.
6078 (clean): Remove reg-bfin.c.
6079 (linux-bfin-low.o, reg-bfin.o, reg-bfin.c): New targets.
6080 * README: Mention supported Blackfin targets.
6081
39ab222a
MF
60822010-12-23 Mike Frysinger <vapier@gentoo.org>
6083
6084 * .gitignore: New file.
6085
a1f2ce7d
MF
60862010-11-16 Mike Frysinger <vapier@gentoo.org>
6087
6088 * linux-low.c (linux_tracefork_child): Add char* cast to arg.
6089
f474844c
JZ
60902010-10-22 Jie Zhang <jie@codesourcery.com>
6091
6092 * Makefile.in: Add FLAGS_TO_PASS variable.
6093 (install): Remove dependency of install-only and recursively
6094 invoke make for install-only.
6095
f1048712
DE
60962010-10-04 Doug Evans <dje@google.com>
6097
6098 * Makefile.in (uninstall): Use $(DESTDIR).
6099
b53a1623
PA
61002010-09-24 Pedro Alves <pedro@codesourcery.com>
6101
e6ee044d
PA
6102 PR gdb/11842
6103
b53a1623
PA
6104 * linux-x86-low.c (compat_siginfo_from_siginfo)
6105 (siginfo_from_compat_siginfo): Also copy si_pid and si_uid when
6106 si_code is < 0. Check for si_code == SI_TIMER before checking for
6107 si_code < 0.
6108
fa1bd1e4
JB
61092010-09-13 Joel Brobecker <brobecker@adacore.com>
6110
6111 * lynx-i386-low.c: New file.
6112 * configure.srv: Add handling of i[34567]86-*-lynxos* targets.
6113
47fac8f8
JB
61142010-09-13 Joel Brobecker <brobecker@adacore.com>
6115
6116 * lynx-low.c (ptrace_request_to_str): Remove handling for
6117 request values that have been removed in LynxOS 5.x.
6118
1adfc54d
JB
61192010-09-13 Joel Brobecker <brobecker@adacore.com>
6120
6121 * lynx-low.c, lynx-ppc-loc.c: Include <sys/ptrace.h> instead of
6122 <ptrace.h>
6123
c2a66c29
NS
61242010-09-09 Nathan Sidwell <nathan@codesourcery.com>
6125
6126 * configure.ac: Add --enable-inprocess-agent option.
6127 * configure: Rebuilt.
6128
32fcada3
YQ
61292010-09-06 Yao Qi <yao@codesourcery.com>
6130
6131 * linux-low.c (linux_kill): Remove unused variable.
6132 (linux_stabilize_threads): Likewise.
6133 * server.c (start_inferior): Likewise.
6134 (queue_stop_reply_callback): Likewise.
6135 * tracepoint.c (do_action_at_tracepoint): Likewise.
6136
0cccb683
YQ
61372010-09-06 Yao Qi <yao@codesourcery.com>
6138
6139 * linux-low.c (maybe_move_out_of_jump_pad): Restore current_inferior
6140 on return.
6141
423ec54c
JK
61422010-09-06 Jan Kratochvil <jan.kratochvil@redhat.com>
6143
6144 * target.c (mywait) <TARGET_WAITKIND_EXITED>: Fix to use INTEGER.
6145
12ac6819
PA
61462010-09-06 Pedro Alves <pedro@codesourcery.com>
6147
6148 * Makefile.in (install-only): Replace $IPA_DEPFILES with
6149 "$(IPA_DEPFILES)".
6150
8ed54b31
JB
61512010-09-01 Joel Brobecker <brobecker@adacore.com>
6152
6153 * gdbserver/lynx-low.c, gdbserver/lynx-low.h,
6154 gdbserver/lynx-ppc-low.c: New files.
6155 * Makefile.in (lynx_low_h): New variable.
6156 (lynx-low.o, lynx-ppc-low.o): New rules.
6157 * configure.ac: On LynxOS, link with -lnetinet.
6158 * configure.srv: Add handling of powerpc-*-lynxos* targets.
6159 * configure: regenerate.
6160
bb0116a4
JB
61612010-09-01 Joel Brobecker <brobecker@adacore.com>
6162
6163 * Makefile.in (vasprintf.o, vsnprintf.o): New rules.
6164 * configure.ac: Add check for vasprintf and vsnprintf.
6165 * configure, config.in: Regenerate.
6166 * server.h (vasprintf, vsnprintf): Add conditional declarations.
6167
a778ab81 61682010-09-01 Joel Brobecker <brobecker@adacore.com>
6169
6170 * gdbreplay.c: Move include of alloca.h up, next to include of
6171 malloc.h.
6172 * server.h: Add include of malloc.h.
6173 * mem-break.c: Remove include of malloc.h.
6174 * server.c, tracepoint.c, utils.c, win32-low.c: Likewise.
6175
8b034a19 61762010-09-01 Joel Brobecker <brobecker@adacore.com>
6177
6178 * Makefile.in (memmem.o): Build with -Wno-error.
6179
61802010-09-01 Joel Brobecker <brobecker@adacore.com>
6181
6182 * utils.c (xsnprintf): Make non-static.
6183 * server.h: Add xsnprintf declaration.
6184 * linux-low.c, nto-low.c, target.c, thread-db.c, tracepoint.c:
6185 replace calls to snprintf by calls to xsnprintf throughout.
6186
61872010-09-01 Joel Brobecker <brobecker@adacore.com>
6188
6189 * configure.ac: Add configure check for alloca.
6190 * configure, config.in: Regenerate.
6191 * server.h: Include alloca.h if it exists.
6192 * gdbreplay.c: Include alloca.h if it exists.
6193
1a981360
PA
61942010-08-28 Pedro Alves <pedro@codesourcery.com>
6195
6196 * linux-low.c (__SIGRTMIN): Define if not already defined.
6197 (linux_create_inferior): Check for __ANDROID__ rather than
6198 __SIGRTMIN.
6199 (enqueue_one_deferred_signal): Don't requeue non-RT signals that
6200 are already deferred.
6201 (linux_wait_1): Check for __ANDROID__ rather than __SIGRTMIN.
6202 (linux_resume_one_thread): Don't queue a SIGSTOP if the lwp is
6203 stopped and already has a pending signal to report.
6204 (proceed_one_lwp): : Don't queue a SIGSTOP if the lwp already has
6205 a pending signal to report or is moving out of a jump pad.
6206 (linux_init_signals): Check for __ANDROID__ rather than
6207 __SIGRTMIN.
6208
b4d51a55
PA
62092010-08-28 Pedro Alves <pedro@codesourcery.com>
6210
6211 * linux-low.c (linux_stabilize_threads): Wrap debug output in a
6212 debug_threads check. Avoid a linear search when not doing debug
6213 output.
6214
ec48365d
PA
62152010-08-27 Pedro Alves <pedro@codesourcery.com>
6216
6217 * event-loop.c (event_handle_func): Adjust to use gdb_fildes_t.
6218 (struct gdb_event) <fd>: Change type to gdb_fildes_t.
6219 (struct file_handler) <fd>: Change type to gdb_fildes_t.
6220 (process_event): Change local fd's type to gdb_fildes_t.
6221 (create_file_handler): Adjust prototype.
6222 (delete_file_handler): Adjust prototype.
6223 (handle_file_event): Adjust prototype. Use pfildes.
6224 (create_file_event): Adjsut prototype.
6225 * remote-utils.c (remote_desc, listen_desc): Change type to
6226 gdb_fildes_t.
6227 * server.h: New gdb_fildes_t typedef.
6228 [USE_WIN32API]: Include winsock2.h.
6229 (delete_file_handler, add_file_handler): Adjust prototypes.
6230 (pfildes): Declare.
6231 * utils.c (pfildes): New.
6232
854d88f0
PA
62332010-08-27 Pedro Alves <pedro@codesourcery.com>
6234
6235 * configure.ac (build_warnings): Add -Wno-char-subscripts.
6236 * configure: Regenerate.
6237
0146f85b
PA
62382010-08-27 Pedro Alves <pedro@codesourcery.com>
6239
6240 * linux-low.c (linux_unprepare_to_access_memory): Rename to ...
6241 (linux_done_accessing_memory): ... this.
6242 (linux_target_ops): Adjust.
6243 * linux-x86-low.c (x86_insert_point, x86_remove_point): Adjust.
6244 * nto-low.c (nto_target_ops): Adjust comment.
6245 * server.c (gdb_read_memory, gdb_write_memory): Adjust.
6246 * spu-low.c (spu_target_ops): Adjust comment.
6247 * target.h (target_ops): Rename unprepare_to_access_memory field
6248 to done_accessing_memory.
6249 (unprepare_to_access_memory): Rename to ...
6250 (done_accessing_memory): ... this.
6251
90d74c30
PA
62522010-08-26 Pedro Alves <pedro@codesourcery.com>
6253
6254 * linux-low.c (linux_prepare_to_access_memory): New.
6255 (linux_unprepare_to_access_memory): New.
6256 (linux_target_ops): Install them.
6257 * server.c (read_memory): Rename to ...
6258 (gdb_read_memory): ... this. Use
6259 prepare_to_access_memory/prepare_to_access_memory.
6260 (write_memory): Rename to ...
6261 (gdb_write_memory): ... this. Use
6262 prepare_to_access_memory/prepare_to_access_memory.
6263 (handle_search_memory_1): Adjust.
6264 (process_serial_event): Adjust.
6265 * target.h (struct target_ops): New fields
6266 prepare_to_access_memory and unprepare_to_access_memory.
6267 (prepare_to_access_memory, unprepare_to_access_memory): New.
6268 * linux-x86-low.c (x86_insert_point, x86_remove_point): Use
6269 prepare_to_access_memory/prepare_to_access_memory.
6270 * nto-low.c (nto_target_ops): Adjust.
6271 * spu-low.c (spu_target_ops): Adjust.
6272 * win32-low.c (win32_target_ops): Adjust.
6273
fd467969
PA
62742010-08-26 Pedro Alves <pedro@codesourcery.com>
6275
6276 * Makefile.in (WARN_CFLAGS): Get it from configure.
6277 (WERROR_CFLAGS): New.
6278 (INTERNAL_CFLAGS): Add WERROR_CFLAGS.
6279 * configure.ac: Introduce --enable-werror, which adds -Werror to
6280 the compiler command line. Enabled by default. Disable with
6281 --disable-werror. Add -Wdeclaration-after-statement
6282 Wpointer-arith and -Wformat-nonliteral to warning flags.
6283 * configure: Regenerate.
6284
331e2f5f
PA
62852010-08-26 Pedro Alves <pedro@codesourcery.com>
6286
6287 * mem-break.c [HAVE_MALLOC_H]: Include malloc.h.
6288
e581f2b4
PA
62892010-08-26 Pedro Alves <pedro@codesourcery.com>
6290
6291 * gdbreplay.c (remote_error): New.
6292 (gdbchar): New.
6293 (expect): Use gdbchar. Check for error reading from GDB.
6294 Clarify sync error output.
6295 (play): Check for errors writing to GDB.
6296 * linux-low.c (sigchld_handler): Really ignore `write' errors.
6297 * remote-utils.c (getpkt): Check for errors writing to the remote
6298 descriptor.
6299
3c11dd79
PA
63002010-08-25 Pedro Alves <pedro@codesourcery.com>
6301
6302 * linux-low.c (linux_wait_1): Move non-debugging code out of
6303 `debug_threads' control.
6304
d20a8ad9
PA
63052010-08-25 Pedro Alves <pedro@codesourcery.com>
6306
6307 * linux-low.c (linux_wait_1): Don't set last_status here.
6308 * server.c (push_event, queue_stop_reply_callback): Assert we're
6309 not pushing a TARGET_WAITKIND_IGNORE event.
6310 (start_inferior, start_inferior, attach_inferior, handle_v_cont)
6311 (myresume, handle_target_event): Set the thread's last_resume_kind
6312 and last_status from the target returned status.
6313
964e4306
PA
63142010-08-25 Pedro Alves <pedro@codesourcery.com>
6315
6316 PR threads/10729
6317
6318 * linux-x86-low.c (update_debug_registers_callback): New.
6319 (i386_dr_low_set_addr): Use it.
6320 (i386_dr_low_get_addr): New.
6321 (i386_dr_low_set_control): Use update_debug_registers_callback.
6322 (i386_dr_low_get_control): New.
6323 (i386_dr_low_get_status): Adjust.
6324 * linux-low.c (linux_stop_lwp): New.
6325 * linux-low.h (linux_stop_lwp): Declare.
6326
6327 * i386-low.c (I386_DR_GET_RW_LEN): Take the dr7 contents as
6328 argument instead of a i386_debug_reg_state.
6329 (I386_DR_WATCH_HIT): Take the dr6 contents as argument instead of
6330 a i386_debug_reg_state.
6331 (i386_insert_aligned_watchpoint): Adjust.
6332 (i386_remove_aligned_watchpoint): Adjust.
6333 (i386_low_stopped_data_address): Read the debug registers from the
6334 inferior instead of from the mirrors.
6335 * i386-low.h (struct i386_debug_reg_state): Extend comment.
6336 (i386_dr_low_get_addr): Declare.
6337 (i386_dr_low_get_control): Declare.
6338 (i386_dr_low_get_status): Change prototype.
6339
6340 * win32-i386-low.c (dr_status_mirror, dr_control_mirror): New globals.
6341 (i386_dr_low_get_addr): New.
6342 (i386_dr_low_get_control): New.
6343 (i386_dr_low_get_status): Adjust prototype. Return
6344 dr_status_mirror.
6345 (i386_initial_stuff): Clear dr_status_mirror and
6346 dr_control_mirror.
6347 (i386_get_thread_context): Adjust.
6348 (i386_set_thread_context): Adjust.
6349 (i386_thread_added): Adjust.
6350
5f21a75b
PA
63512010-08-24 Pedro Alves <pedro@codesourcery.com>
6352
6353 * linux-low.h (linux_thread_area): Delete declaration.
6354
3e4c1235
TS
63552010-08-11 Thomas Schwinge <thomas@codesourcery.com>
6356
6357 * linux-low.c (linux_wait_1): Correctly return the ptid of the child
6358 after its termination.
6359
1971b033
PA
63602010-08-09 Pedro Alves <pedro@codesourcery.com>
6361
6362 * linux-low.c (gdb_wants_lwp_stopped): Delete.
6363 (gdb_wants_all_stopped): Delete.
6364 (linux_wait_1): Don't call them.
6365 * server.c (handle_v_cont): Tag all threads as want-stopped.
6366 (gdb_wants_thread_stopped): Fix comments. Tag the thread that
6367 stopped as "client-wants-stopped".
6368
310444ac
PA
63692010-07-31 Pedro Alves <pedro@codesourcery.com>
6370
6371 * Makefile.in (signals_h): New.
6372 (server_h): Depend on it.
6373 (server.o): Don't depend on $(signals_def).
6374 (signals.o): Depend on $(signals_def).
6375
a19cae16
JK
63762010-07-31 Jan Kratochvil <jan.kratochvil@redhat.com>
6377
6378 * Makefile.in (signals_def): New.
6379 (server_h): Append include/gdb/signals.h and signals_def.
6380 (server.o): Append signals_def.
6381
30d50328
JK
63822010-07-25 Jan Kratochvil <jan.kratochvil@redhat.com>
6383
6384 * server.c (handle_target_event): Use target_signal_to_host for
6385 resume_info.sig initialization.
6386 * target.h (struct thread_resume) <sig>: New comment.
6387
5c3216e2
OS
63882010-07-20 Ozkan Sezer <sezeroz@gmail.com>
6389
c6f46ca0
OS
6390 * server.c (handle_query): strcpy() the returned string from paddress()
6391 instead of sprintf().
5c3216e2
OS
6392 * utils.c (paddress): Return phex_nz().
6393
6bd31874
JB
63942010-07-07 Joel Brobecker <brobecker@adacore.com>
6395
6396 * server.c (handle_v_cont): Call mourn_inferior if process
6397 just exited.
6398 (myresume): Likewise.
6399
0fb4aa4b
PA
64002010-07-01 Pedro Alves <pedro@codesourcery.com>
6401
6402 Static tracepoints, and integration with UST.
6403
6404 * configure.ac: Handle --with-ust. substitute ustlibs and ustinc.
6405 * mem-break.c (uninsert_all_breakpoints)
6406 (reinsert_all_breakpoints): New.
6407 * mem-break.h (reinsert_all_breakpoints, uninsert_all_breakpoints):
6408 * tracepoint.c (ust_loaded, helper_thread_id, cmd_buf): New.
6409 (gdb_agent_ust_loaded, helper_thread_id)
6410 (gdb_agent_helper_thread_id): New macros.
6411 (struct ipa_sym_addresses): Add addr_ust_loaded,
6412 addr_helper_thread_id, addr_cmd_buf.
6413 (symbol_list): Add ust_loaded, helper_thread_id, cmd_buf.
6414 (in_process_agent_loaded_ust): New.
6415 (write_e_ust_not_loaded): New.
6416 (maybe_write_ipa_ust_not_loaded): New.
6417 (struct collect_static_trace_data_action): New.
6418 (enum tracepoint_type) <static_tracepoint>: New.
6419 (struct tracepoint) <handle>: Mention static tracepoints.
6420 (struct static_tracepoint_ctx): New.
6421 (CMD_BUF_SIZE): New.
6422 (add_tracepoint_action): Handle static tracepoint actions.
6423 (unprobe_marker_at): New.
6424 (clear_installed_tracepoints): Handle static tracepoints.
6425 (cmd_qtdp): Handle static tracepoints.
6426 (probe_marker_at): New.
6427 (cmd_qtstart): Handle static tracepoints.
6428 (response_tracepoint): Handle static tracepoints.
6429 (cmd_qtfstm, cmd_qtsstm, cmd_qtstmat): New.
6430 (handle_tracepoint_query): Handle qTfSTM, qTsSTM and qTSTMat.
6431 (get_context_regcache): Handle static tracepoints.
6432 (do_action_at_tracepoint): Handle static tracepoint actions.
6433 (traceframe_find_block_type): Handle static trace data blocks.
6434 (traceframe_read_sdata): New.
6435 (download_tracepoints): Download static tracepoint actions.
6436 [HAVE_UST] Include ust/ust.h, dlfcn.h, sys/socket.h, and sys/un.h.
6437 (GDB_PROBE_NAME): New.
6438 (ust_ops): New.
6439 (GET_UST_SYM): New.
6440 (USTF): New.
6441 (dlsym_ust): New.
6442 (ust_marker_to_static_tracepoint): New.
6443 (gdb_probe): New.
6444 (collect_ust_data_at_tracepoint): New.
6445 (gdb_ust_probe): New.
6446 (UNIX_PATH_MAX, SOCK_DIR): New.
6447 (gdb_ust_connect_sync_socket): New.
6448 (resume_thread, stop_thread): New.
6449 (run_inferior_command): New.
6450 (init_named_socket): New.
6451 (gdb_ust_socket_init): New.
6452 (cstr_to_hexstr): New.
6453 (next_st): New.
6454 (first_marker, next_marker): New.
6455 (response_ust_marker): New.
6456 (cmd_qtfstm, cmd_qtsstm): New.
6457 (unprobe_marker_at, probe_marker_at): New.
6458 (cmd_qtstmat, gdb_ust_thread): New.
6459 (gdb_ust_init): New.
6460 (initialize_tracepoint_ftlib): Call gdb_ust_init.
6461 * linux-amd64-ipa.c [HAVE_UST]: Include ust/processor.h
6462 (ST_REGENTRY): New.
6463 (x86_64_st_collect_regmap): New.
6464 (X86_64_NUM_ST_COLLECT_GREGS): New.
6465 (AMD64_RIP_REGNUM): New.
6466 (supply_static_tracepoint_registers): New.
6467 * linux-i386-ipa.c [HAVE_UST]: Include ust/processor.h
6468 (ST_REGENTRY): New.
6469 (i386_st_collect_regmap): New.
6470 (i386_NUM_ST_COLLECT_GREGS): New.
6471 (supply_static_tracepoint_registers): New.
6472 * server.c (handle_query): Handle qXfer:statictrace:read.
6473 <qSupported>: Report support for StaticTracepoints, and
6474 qXfer:statictrace:read features.
6475 * server.h (traceframe_read_sdata)
6476 (supply_static_tracepoint_registers): Declare.
6477 * remote-utils.c (convert_int_to_ascii, hexchars, ishex, tohex)
6478 (unpack_varlen_hex): Include in IPA build.
6479 * Makefile.in (ustlibs, ustinc): New.
6480 (IPA_OBJS): Add remote-utils-ipa.o.
6481 ($(IPA_LIB)): Link -ldl and -lpthread.
6482 (UST_CFLAGS): New.
6483 (IPAGENT_CFLAGS): Add UST_CFLAGS.
6484 * config.in, configure: Regenerate.
6485
9e4344e5
PA
64862010-06-20 Ian Lance Taylor <iant@google.com>
6487 Pedro Alves <pedro@codesourcery.com>
6488
6489 * linux-x86-low.c (always_true): Delete.
6490 (EMIT_ASM, EMIT_ASM32): Use an uncondition asm jmp instead of
6491 trying to fool the compiler with always_true.
6492
c6beb2cb
PA
64932010-06-20 Pedro Alves <pedro@codesourcery.com>
6494
6495 * tracepoint.c (condition_true_at_tracepoint): Don't run compiled
6496 conditions in gdbserver.
6497
d2ed6730
UW
64982010-06-19 Ulrich Weigand <uweigand@de.ibm.com>
6499
6500 * spu-low.c (spu_read_memory): Wrap around local store limit.
6501 (spu_write_memory): Likewise.
6502
4e29fb54
PA
65032010-06-15 Pedro Alves <pedro@codesourcery.com>
6504
6505 * linux-x86-low.c (amd64_emit_const, amd64_emit_void_call_2)
6506 (i386_emit_const, i386_emit_void_call_2): Replace int64_t uses with
6507 LONGEST uses.
6508 * server.h (struct emit_ops): Replace int64_t uses with LONGEST
6509 uses.
6510 * tracepoint.c (emit_const, emit_void_call_2): Replace int64_t
6511 uses with LONGEST uses.
6512
6a271cae
PA
65132010-06-14 Stan Shebs <stan@codesourcery.com>
6514 Pedro Alves <pedro@codesourcery.com>
6515
6516 Bytecode compiler.
6517
6518 * linux-x86-low.c: Include limits.h.
6519 (add_insns): New.
6520 (always_true): New.
6521 (EMIT_ASM): New.
6522 (EMIT_ASM32): New.
6523 (amd64_emit_prologue, amd64_emit_epilogue, amd64_emit_add)
6524 (amd64_emit_sub, amd64_emit_mul, amd64_emit_lsh)
6525 (amd64_emit_rsh_signed, amd64_emit_rsh_unsigned, amd64_emit_ext,
6526 (amd64_emit_log_not, amd64_emit_bit_and, amd64_emit_bit_or)
6527 (amd64_emit_bit_xor, amd64_emit_bit_not, amd64_emit_equal,
6528 (amd64_emit_less_signed, amd64_emit_less_unsigned, amd64_emit_ref,
6529 (amd64_emit_if_goto, amd64_emit_goto, amd64_write_goto_address)
6530 (amd64_emit_const, amd64_emit_call, amd64_emit_reg)
6531 (amd64_emit_pop, amd64_emit_stack_flush, amd64_emit_zero_ext)
6532 (amd64_emit_swap, amd64_emit_stack_adjust, amd64_emit_int_call_1)
6533 (amd64_emit_void_call_2): New.
6534 (amd64_emit_ops): New.
6535 (i386_emit_prologue, i386_emit_epilogue, i386_emit_add)
6536 (i386_emit_sub,i386_emit_mul, i386_emit_lsh, i386_emit_rsh_signed)
6537 (i386_emit_rsh_unsigned, i386_emit_ext, i386_emit_log_not)
6538 (i386_emit_bit_and, i386_emit_bit_or, i386_emit_bit_xor)
6539 (i386_emit_bit_not, i386_emit_equal, i386_emit_less_signed)
6540 (i386_emit_less_unsigned, i386_emit_ref, i386_emit_if_goto)
6541 (i386_emit_goto, i386_write_goto_address, i386_emit_const)
6542 (i386_emit_call, i386_emit_reg, i386_emit_pop)
6543 (i386_emit_stack_flush, i386_emit_zero_ext, i386_emit_swap)
6544 (i386_emit_stack_adjust, i386_emit_int_call_1)
6545 (i386_emit_void_call_2): New.
6546 (i386_emit_ops): New.
6547 (x86_emit_ops): New.
6548 (the_low_target): Install x86_emit_ops.
6549 * server.h (struct emit_ops): New.
6550 (get_raw_reg_func_addr): Declare.
6551 (current_insn_ptr, emit_error): Declare.
6552 * tracepoint.c (get_raw_reg, get_trace_state_variable_value)
6553 (set_trace_state_variable_value): New defines.
6554 (struct ipa_sym_addresses): New fields addr_get_raw_reg,
6555 addr_get_trace_state_variable_value and
6556 addr_set_trace_state_variable_value.
6557 (symbol_list): New fields for get_raw_reg,
6558 get_trace_state_variable_value and set_trace_state_variable_value.
6559 (condfn): New typedef.
6560 (struct tracepoint): New field `compiled_cond'.
6561 (do_action_at_tracepoint): Clear compiled_cond.
6562 (get_trace_state_variable_value, set_trace_state_variable_value):
6563 Export in the IPA.
6564 (condition_true_at_tracepoint): If there's a compiled condition,
6565 run that.
6566 (current_insn_ptr, emit_error): New globals.
6567 (struct bytecode_address): New.
6568 (get_raw_reg_func_addr): New.
6569 (emit_prologue, emit_epilogue, emit_add, emit_sub, emit_mul)
6570 (emit_lsh, emit_rsh_signed, emit_rsh_unsigned, emit_ext)
6571 (emit_log_not, emit_bit_and, emit_bit_or, emit_bit_xor)
6572 (emit_bit_not, emit_equal, emit_less_signed, emit_less_unsigned)
6573 (emit_ref, emit_if_goto, emit_goto, write_goto_address, emit_const)
6574 (emit_reg, emit_pop, emit_stack_flush, emit_zero_ext, emit_swap)
6575 (emit_stack_adjust, emit_int_call_1, emit_void_call_2): New.
6576 (compile_tracepoint_condition, compile_bytecodes): New.
6577 * target.h (emit_ops): Forward declare.
6578 (struct target_ops): New field emit_ops.
6579 (target_emit_ops): New.
6580 * linux-amd64-ipa.c (gdb_agent_get_raw_reg): New.
6581 * linux-i386-ipa.c (gdb_agent_get_raw_reg): New.
6582 * linux-low.c (linux_emit_ops): New.
6583 (linux_target_ops): Install it.
6584 * linux-low.h (struct linux_target_ops): New field emit_ops.
6585
92b72907
UW
65862010-06-14 Ulrich Weigand <uweigand@de.ibm.com>
6587
6588 * linux-ppc-low.c (ppc_arch_setup): Use private regcache to test MSR.
6589 * linux-s390-low.c (ppc_arch_setup): Use private regcache to test PSW.
6590
fa593d66
PA
65912010-06-01 Pedro Alves <pedro@codesourcery.com>
6592 Stan Shebs <stan@codesourcery.com>
6593
6594 * Makefile.in (IPA_DEPFILES, extra_libraries): New.
6595 (all): Depend on $(extra_libraries).
6596 (install-only): Install the IPA.
6597 (IPA_OBJS, IPA_LIB): New.
6598 (clean): Remove the IPA lib.
6599 (IPAGENT_CFLAGS): New.
6600 (tracepoint-ipa.o, utils-ipa.o, remote-utils-ipa.o)
6601 (regcache-ipa.o, i386-linux-ipa.o, linux-i386-ipa.o)
6602 (linux-amd64-ipa.o, amd64-linux-ipa.o): New rules.
6603 * linux-amd64-ipa.c, linux-i386-ipa.c: New files.
6604 * configure.ac: Check for atomic builtins support in the compiler.
6605 (IPA_DEPFILES, extra_libraries): Define.
6606 * configure.srv (ipa_obj): Add description.
6607 (ipa_i386_linux_regobj, ipa_amd64_linux_regobj): Define.
6608 (i[34567]86-*-linux*): Set ipa_obj.
6609 (x86_64-*-linux*): Set ipa_obj.
6610 * linux-low.c (stabilizing_threads): New.
6611 (supports_fast_tracepoints): New.
6612 (linux_detach): Stabilize threads before detaching.
6613 (handle_tracepoints): Handle internal tracing breakpoints. Assert
6614 the lwp is either not stabilizing, or is moving out of a jump pad.
6615 (linux_fast_tracepoint_collecting): New.
6616 (maybe_move_out_of_jump_pad): New.
6617 (enqueue_one_deferred_signal): New.
6618 (dequeue_one_deferred_signal): New.
6619 (linux_wait_for_event_1): If moving out of a jump pad, defer
6620 pending signals to later.
6621 (linux_stabilize_threads): New.
6622 (linux_wait_1): Check if threads need moving out of jump pads, and
6623 do it if so.
6624 (stuck_in_jump_pad_callback): New.
6625 (move_out_of_jump_pad_callback): New.
6626 (lwp_running): New.
6627 (linux_resume_one_lwp): Handle moving out of jump pads.
6628 (linux_set_resume_request): Dequeue deferred signals.
6629 (need_step_over_p): Also step over fast tracepoint jumps.
6630 (start_step_over): Also uninsert fast tracepoint jumps.
6631 (finish_step_over): Also reinsert fast tracepoint jumps.
6632 (linux_install_fast_tracepoint_jump): New.
6633 (linux_target_ops): Install linux_stabilize_threads and
6634 linux_install_fast_tracepoint_jump_pad.
6635 * linux-low.h (linux_target_ops) <get_thread_area,
6636 install_fast_tracepoint_jump_pad>: New fields.
6637 (struct lwp_info) <collecting_fast_tracepoint,
6638 pending_signals_to_report, exit_jump_pad_bkpt>: New fields.
6639 (linux_get_thread_area): Declare.
6640 * linux-x86-low.c (jump_insn): New.
6641 (x86_get_thread_area): New.
6642 (append_insns): New.
6643 (push_opcode): New.
6644 (amd64_install_fast_tracepoint_jump_pad): New.
6645 (i386_install_fast_tracepoint_jump_pad): New.
6646 (x86_install_fast_tracepoint_jump_pad): New.
6647 (the_low_target): Install x86_get_thread_area and
6648 x86_install_fast_tracepoint_jump_pad.
6649 * mem-break.c (set_raw_breakpoint_at): Use read_inferior_memory.
6650 (struct fast_tracepoint_jump): New.
6651 (fast_tracepoint_jump_insn): New.
6652 (fast_tracepoint_jump_shadow): New.
6653 (find_fast_tracepoint_jump_at): New.
6654 (fast_tracepoint_jump_here): New.
6655 (delete_fast_tracepoint_jump): New.
6656 (set_fast_tracepoint_jump): New.
6657 (uninsert_fast_tracepoint_jumps_at): New.
6658 (reinsert_fast_tracepoint_jumps_at): New.
6659 (set_breakpoint_at): Use write_inferior_memory.
6660 (uninsert_raw_breakpoint): Use write_inferior_memory.
6661 (check_mem_read): Mask out fast tracepoint jumps.
6662 (check_mem_write): Mask out fast tracepoint jumps.
6663 * mem-break.h (struct fast_tracepoint_jump): Forward declare.
6664 (set_fast_tracepoint_jump): Declare.
6665 (delete_fast_tracepoint_jump)
6666 (fast_tracepoint_jump_here, uninsert_fast_tracepoint_jumps_at)
6667 (reinsert_fast_tracepoint_jumps_at): Declare.
6668 * regcache.c: Don't compile many functions when building the
6669 in-process agent library.
6670 (init_register_cache) [IN_PROCESS_AGENT]: Don't allow allocating
6671 the register buffer in the heap.
6672 (free_register_cache): If the register buffer isn't owned by the
6673 regcache, don't free it.
6674 (set_register_cache) [IN_PROCESS_AGENT]: Don't re-alocate
6675 pre-existing register caches.
6676 * remote-utils.c (convert_int_to_ascii): Constify `from' parameter
6677 type.
6678 (convert_ascii_to_int): : Constify `from' parameter type.
6679 (decode_M_packet, decode_X_packet): Replace the `to' parameter by
6680 a `to_p' pointer to pointer parameter. If TO_P is NULL, malloc
6681 the needed buffer in-place.
6682 (relocate_instruction): New.
6683 * server.c (handle_query) <qSymbols>: If the target supports
6684 tracepoints, give it a chance of looking up symbols. Report
6685 support for fast tracepoints.
6686 (handle_status): Stabilize threads.
6687 (process_serial_event): Adjust.
6688 * server.h (struct fast_tracepoint_jump): Forward declare.
6689 (struct process_info) <fast_tracepoint_jumps>: New field.
6690 (convert_ascii_to_int, convert_int_to_ascii): Adjust.
6691 (decode_X_packet, decode_M_packet): Adjust.
6692 (relocate_instruction): Declare.
6693 (in_process_agent_loaded): Declare.
6694 (tracepoint_look_up_symbols): Declare.
6695 (struct fast_tpoint_collect_status): Declare.
6696 (fast_tracepoint_collecting): Declare.
6697 (force_unlock_trace_buffer): Declare.
6698 (handle_tracepoint_bkpts): Declare.
6699 (initialize_low_tracepoint)
6700 (supply_fast_tracepoint_registers) [IN_PROCESS_AGENT]: Declare.
6701 * target.h (struct target_ops) <stabilize_threads,
6702 install_fast_tracepoint_jump_pad>: New fields.
6703 (stabilize_threads, install_fast_tracepoint_jump_pad): New.
6704 * tracepoint.c [HAVE_MALLOC_H]: Include malloc.h.
6705 [HAVE_STDINT_H]: Include stdint.h.
6706 (trace_debug_1): Rename to ...
6707 (trace_vdebug): ... this.
6708 (trace_debug): Rename to ...
6709 (trace_debug_1): ... this. Add `level' parameter.
6710 (trace_debug): New.
6711 (ATTR_USED, ATTR_NOINLINE): New.
6712 (IP_AGENT_EXPORT): New.
6713 (gdb_tp_heap_buffer, gdb_jump_pad_buffer, gdb_jump_pad_buffer_end)
6714 (collecting, gdb_collect, stop_tracing, flush_trace_buffer)
6715 (about_to_request_buffer_space, trace_buffer_is_full)
6716 (stopping_tracepoint, expr_eval_result, error_tracepoint)
6717 (tracepoints, tracing, trace_buffer_ctrl, trace_buffer_ctrl_curr)
6718 (trace_buffer_lo, trace_buffer_hi, traceframe_read_count)
6719 (traceframe_write_count, traceframes_created)
6720 (trace_state_variables)
6721 New renaming defines.
6722 (struct ipa_sym_addresses): New.
6723 (STRINGIZE_1, STRINGIZE, IPA_SYM): New.
6724 (symbol_list): New.
6725 (ipa_sym_addrs): New.
6726 (all_tracepoint_symbols_looked_up): New.
6727 (in_process_agent_loaded): New.
6728 (write_e_ipa_not_loaded): New.
6729 (maybe_write_ipa_not_loaded): New.
6730 (tracepoint_look_up_symbols): New.
6731 (debug_threads) [IN_PROCESS_AGENT]: New.
6732 (read_inferior_memory) [IN_PROCESS_AGENT]: New.
6733 (UNKNOWN_SIDE_EFFECTS): New.
6734 (stop_tracing): New.
6735 (flush_trace_buffer): New.
6736 (stop_tracing_bkpt): New.
6737 (flush_trace_buffer_bkpt): New.
6738 (read_inferior_integer): New.
6739 (read_inferior_uinteger): New.
6740 (read_inferior_data_pointer): New.
6741 (write_inferior_data_pointer): New.
6742 (write_inferior_integer): New.
6743 (write_inferior_uinteger): New.
6744 (struct collect_static_trace_data_action): Delete.
6745 (enum tracepoint_type): New.
6746 (struct tracepoint) <type>: New field `type'.
43aaf8b6
PA
6747 <actions_str, step_actions, step_actions_str>: Only include in
6748 GDBserver.
fa593d66
PA
6749 <orig_size, obj_addr_on_target, adjusted_insn_addr>
6750 <adjusted_insn_addr_end, jump_pad, jump_pad_end>: New fields.
6751 (tracepoints): Use IP_AGENT_EXPORT.
6752 (last_tracepoint): Don't include in the IPA.
6753 (stopping_tracepoint): Use IP_AGENT_EXPORT.
6754 (trace_buffer_is_full): Use IP_AGENT_EXPORT.
6755 (alloced_trace_state_variables): New.
6756 (trace_state_variables): Use IP_AGENT_EXPORT.
6757 (traceframe_t): Delete unused variable.
6758 (circular_trace_buffer): Don't include in the IPA.
6759 (trace_buffer_start): Delete.
6760 (struct trace_buffer_control): New.
6761 (trace_buffer_free): Delete.
6762 (struct ipa_trace_buffer_control): New.
6763 (GDBSERVER_FLUSH_COUNT_MASK, GDBSERVER_FLUSH_COUNT_MASK_PREV)
6764 (GDBSERVER_FLUSH_COUNT_MASK_CURR, GDBSERVER_UPDATED_FLUSH_COUNT_BIT):
6765 New.
6766 (trace_buffer_ctrl): New.
6767 (TRACE_BUFFER_CTRL_CURR): New.
6768 (trace_buffer_start, trace_buffer_free, trace_buffer_end_free):
6769 Reimplement as macros.
6770 (trace_buffer_wrap): Delete.
6771 (traceframe_write_count, traceframe_read_count)
6772 (traceframes_created, tracing): Use IP_AGENT_EXPORT.
6773 (struct tracepoint_hit_ctx) <type>: New field.
6774 (struct fast_tracepoint_ctx): New.
6775 (memory_barrier): New.
6776 (cmpxchg): New.
6777 (record_tracepoint_error): Update atomically in the IPA.
6778 (clear_inferior_trace_buffer): New.
6779 (about_to_request_buffer_space): New.
6780 (trace_buffer_alloc): Handle GDBserver and inferior simulatenous
6781 updating the same buffer.
6782 (add_tracepoint): Default the tracepoint's type to trap
6783 tracepoint, and orig_size to -1.
6784 (get_trace_state_variable) [IN_PROCESS_AGENT]: Handle allocated
6785 internal variables.
6786 (create_trace_state_variable): New parameter `gdb'. Handle it.
6787 (clear_installed_tracepoints): Clear fast tracepoint jumps.
6788 (cmd_qtdp): Handle fast tracepoints.
6789 (cmd_qtdv): Adjust.
6790 (max_jump_pad_size): New.
6791 (gdb_jump_pad_head): New.
6792 (get_jump_space_head): New.
6793 (claim_jump_space): New.
6794 (sort_tracepoints): New.
6795 (MAX_JUMP_SIZE): New.
6796 (cmd_qtstart): Handle fast tracepoints. Sync tracepoints with the
6797 IPA.
6798 (stop_tracing) [IN_PROCESS_AGENT]: Don't include the tdisconnected
6799 support. Upload fast traceframes, and delete internal IPA
6800 breakpoints.
6801 (stop_tracing_handler): New.
6802 (flush_trace_buffer_handler): New.
6803 (cmd_qtstop): Upload fast tracepoints.
6804 (response_tracepoint): Handle fast tracepoints.
6805 (tracepoint_finished_step): Upload fast traceframes. Set the
6806 tracepoint hit context's tracepoint type.
6807 (handle_tracepoint_bkpts): New.
6808 (tracepoint_was_hit): Set the tracepoint hit context's tracepoint
6809 type. Add comment about fast tracepoints.
6810 (collect_data_at_tracepoint) [IN_PROCESS_AGENT]: Don't access the
6811 non-existing action_str field.
6812 (get_context_regcache): Handle fast tracepoints.
6813 (do_action_at_tracepoint) [!IN_PROCESS_AGENT]: Don't write the PC
6814 to the regcache.
6815 (fast_tracepoint_from_jump_pad_address): New.
6816 (fast_tracepoint_from_ipa_tpoint_address): New.
6817 (collecting_t): New.
6818 (force_unlock_trace_buffer): New.
6819 (fast_tracepoint_collecting): New.
6820 (collecting): New.
6821 (gdb_collect): New.
6822 (write_inferior_data_ptr): New.
6823 (target_tp_heap): New.
6824 (target_malloc): New.
6825 (download_agent_expr): New.
6826 (UALIGN): New.
6827 (download_tracepoints): New.
6828 (download_trace_state_variables): New.
6829 (upload_fast_traceframes): New.
6830 (IPA_FIRST_TRACEFRAME): New.
6831 (IPA_NEXT_TRACEFRAME_1): New.
6832 (IPA_NEXT_TRACEFRAME): New.
6833 [IN_PROCESS_AGENT]: Include sys/mman.h and fcntl.h.
6834 [IN_PROCESS_AGENT] (gdb_tp_heap_buffer, gdb_jump_pad_buffer)
6835 (gdb_jump_pad_buffer_end): New.
6836 [IN_PROCESS_AGENT] (initialize_tracepoint_ftlib): New.
6837 (initialize_tracepoint): Adjust.
6838 [IN_PROCESS_AGENT]: Allocate the IPA heap, and jump pad scratch
6839 buffer. Initialize the low module.
6840 * utils.c (PREFIX, TOOLNAME): New.
6841 (malloc_failure): Use PREFIX.
6842 (error): In the IPA, an error causes an exit.
6843 (fatal, warning): Use PREFIX.
6844 (internal_error): Use TOOLNAME.
6845 (NUMCELLS): Increase to 10.
6846 * configure, config.in: Regenerate.
6847
d149dd1d
PA
68482010-06-01 Pedro Alves <pedro@codesourcery.com>
6849
6850 * server.c (handle_query) <qSupported>: Do two passes over the
6851 qSupported string to avoid nesting strtok.
6852
f6528abd
JK
68532010-05-28 Jan Kratochvil <jan.kratochvil@redhat.com>
6854
6855 * Makefile.in (SFILES): Add $(srcdir)/proc-service.list.
6856 (CDEPS): New.
6857 * configure.ac (RDYNAMIC): New AC_MSG_CHECKING wrapping. Test also
6858 -Wl,--dynamic-list.
6859 * configure: Regenerate.
6860 * proc-service.list: New.
6861
ca2a87a0
JK
68622010-05-28 Jan Kratochvil <jan.kratochvil@redhat.com>
6863
6864 * linux-low.c (linux_core_of_thread): Fix crash on invalid CONTENT.
6865 New comment.
6866
363a6e9f
OS
68672010-05-26 Ozkan Sezer <sezeroz@gmail.com>
6868
6869 * gdbreplay.c (remote_open): Check error return from socket() call by
6870 its equality to -1 not by it being negative.
6871 * remote-utils.c (remote_open): Likewise.
6872
d23b6cb1
PA
68732010-05-23 Pedro Alves <pedro@codesourcery.com>
6874
6875 * config.h: Regenerate.
6876
28d3cf85
MK
68772010-05-19 Maxim Kuvyrkov <maxim@codesourcery.com>
6878
6879 * linux-m68k-low.c (ps_get_thread_area): Don't define if kernel
6880 doesn't provide PTRACE_GET_THREAD_AREA.
6881
fea36a59
MK
68822010-05-19 Maxim Kuvyrkov <maxim@codesourcery.com>
6883
6884 * linux-m68k-low.c: Include <asm/ptrace.h>
6885 (ps_get_thread_area): Implement.
6886
24b066ba
DE
68872010-05-03 Doug Evans <dje@google.com>
6888
6889 * event-loop.c (struct callback_event): New struct.
6890 (callback_list): New global.
6891 (append_callback_event, delete_callback_event): New functions.
6892 (process_callback): New function.
6893 (start_event_loop): Call it.
6894 * remote-utils.c (NOT_SCHEDULED): Define.
6895 (readchar_buf, readchar_bufcnt, readchar_bufp): New static globals,
6896 moved out of readchar.
6897 (readchar): Rewrite. Call reschedule before returning.
6898 (reset_readchar): New function.
6899 (remote_close): Call it.
6900 (process_remaining, reschedule): New functions.
6901 * server.h (callback_handler_func): New typedef.
6902 (append_callback_event, delete_callback_event): Declare.
6903
9836d6ea
PA
69042010-05-03 Pedro Alves <pedro@codesourcery.com>
6905
6906 * proc-service.c (ps_pglobal_lookup): Use
6907 thread_db_look_up_one_symbol.
6908 * remote-utils.c (look_up_one_symbol): Add new `may_ask_gdb'
6909 parameter. Use it instead of all_symbols_looked_up.
6910 * server.h (struct process_info) <all_symbols_looked_up>: Delete
6911 field.
6912 (all_symbols_looked_up): Don't declare.
6913 (look_up_one_symbol): Add new `may_ask_gdb' parameter.
6914 * thread-db.c (struct thread_db) <all_symbols_looked_up>: New
6915 field.
6916 (thread_db_look_up_symbols): Adjust call to look_up_one_symbol.
6917 Set all_symbols_looked_up here.
6918 (thread_db_look_up_one_symbol): New.
6919 (thread_db_get_tls_address): Adjust.
6920 (thread_db_load_search, try_thread_db_load_1): Always allocate the
6921 thread_db object on the heap, and tentatively set it in the
6922 process structure.
6923 (thread_db_init): Don't set all_symbols_looked_up here.
6924 * linux-low.h (thread_db_look_up_one_symbol): Declare.
6925
7984d532
PA
69262010-05-03 Pedro Alves <pedro@codesourcery.com>
6927
6928 * linux-low.c (linux_kill, linux_detach): Adjust.
6929 (status_pending_p_callback): Remove redundant statement. Check
6930 for !TARGET_WAITIKIND_IGNORE, instead of
6931 TARGET_WAITKIND_STOPPED.
6932 (handle_tracepoints): Make sure LWP is locked. Adjust.
6933 (linux_wait_for_event_1): Adjust.
6934 (linux_cancel_breakpoints): New.
6935 (unsuspend_one_lwp): New.
6936 (unsuspend_all_lwps): New.
6937 (linux_wait_1): If finishing a step-over, unsuspend all lwps.
6938 (send_sigstop_callback): Change return type to int, add new
6939 `except' parameter and handle it.
6940 (suspend_and_send_sigstop_callback): New.
6941 (stop_all_lwps): Add new `suspend' and `expect' parameters, and
6942 pass them down. If SUSPEND, also increment the lwp's suspend
6943 count.
6944 (linux_resume_one_lwp): Add notice about resuming a suspended LWP.
6945 (need_step_over_p): Don't consider suspended LWPs.
6946 (start_step_over): Adjust.
6947 (proceed_one_lwp): Change return type to int, add new `except'
6948 parameter and handle it.
6949 (unsuspend_and_proceed_one_lwp): New.
6950 (proceed_all_lwps): Use find_inferior instead of
6951 for_each_inferior.
6952 (unstop_all_lwps): Add `unsuspend' parameter. If UNSUSPEND, them
6953 also decrement the suspend count of LWPs. Pass `except' down,
6954 instead of hacking its suspend count.
6955 (linux_pause_all): Add `freeze' parameter. Adjust.
6956 (linux_unpause_all): New.
6957 (linux_target_ops): Install linux_unpause_all.
6958 * server.c (handle_status): Adjust.
6959 * target.h (struct target_ops): New fields `unpause_all' and
6960 `cancel_breakpoints'. Add new parameter to `pause_all'.
6961 (pause_all): Add new `freeze' parameter.
6962 (unpause_all): New.
6963 (cancel_breakpoints): New.
6964 * tracepoint.c (clear_installed_tracepoints): Pause threads, and
6965 cancel breakpoints.
6966 (cmd_qtstart): Pause threads.
6967 (stop_tracing): Pause threads, and cancel breakpoints.
6968 * win32-low.c (win32_target_ops): Adjust.
6969
e471f25b
PA
69702010-05-03 Pedro Alves <pedro@codesourcery.com>
6971
6972 * linux-low.c (linux_wait_for_event_1): Move passing the signal to
6973 the inferior right away from here...
6974 (linux_wait_1): ... to here, and adjust to check the thread's
6975 last_resume_kind instead of the lwp's step or stop_expected flags.
6976
1915ef4f
PA
69772010-05-02 Pedro Alves <pedro@codesourcery.com>
6978
6979 * README: Use consistent `GDB' and `GDBserver' spellings.
6980
f9e39928
PA
69812010-05-02 Pedro Alves <pedro@codesourcery.com>
6982
6983 * linux-low.c (linux_kill_one_lwp): Assume the lwp is stopped.
6984 (linux_kill): Stop all lwps here. Don't delete the main lwp here.
6985 (linux_detach_one_lwp): Assume the lwp is stopped.
6986 (any_thread_of): Delete.
6987 (linux_detach): Stop all lwps here. Don't blindly delete all
6988 breakpoints.
6989 (delete_lwp_callback): New.
6990 (linux_mourn): Delete all lwps of the process that is gone.
6991 (linux_wait_1): Don't delete the last lwp of the process here.
6992 * mem-break.h (mark_breakpoints_out): Declare.
6993 * mem-break.c (mark_breakpoints_out): New.
6994 (free_all_breakpoints): Use it.
6995 * server.c (handle_target_event): If the process is gone, mark
6996 breakpoints out.
6997 * thread-db.c (struct thread_db) <create_bp>: New field.
6998 (thread_db_enable_reporting): Fix prototype. Store a thread event
6999 breakpoint reference in the thread_db struct.
7000 (thread_db_load_search): Clear the thread_db object.
7001 (try_thread_db_load_1): Ditto.
7002 (switch_to_process): New.
7003 (disable_thread_event_reporting): Use it.
7004 (remove_thread_event_breakpoints): New.
7005 (thread_db_detach, thread_db_mourn): Use it.
7006
1e7fc18c
PA
70072010-05-01 Pedro Alves <pedro@codesourcery.com>
7008
7009 * linux-low.c (linux_enable_event_reporting): New.
7010 (linux_wait_for_event_1, handle_extended_wait): Use it.
7011
02fc4de7
PA
70122010-04-30 Pedro Alves <pedro@codesourcery.com>
7013
7014 * linux-low.c (linux_kill_one_lwp, linux_kill)
7015 (linux_detach_one_lwp): Adjust to send_sigstop interface change.
7016 (send_sigstop): Take an lwp_info as parameter instead. Queue a
7017 SIGSTOP even if the LWP is stopped.
7018 (send_sigstop_callback): New.
7019 (stop_all_lwps): Use send_sigstop_callback instead.
7020 (linux_resume_one_thread): Adjust.
7021 (proceed_one_lwp): Still proceed an LWP that the client has
7022 requested to stop, if we haven't reported it as stopped yet. Make
7023 sure that LWPs the client want stopped, have a pending SIGSTOP.
7024
bc3b5632
DE
70252010-04-26 Doug Evans <dje@google.com>
7026
ae1ada35
DE
7027 * server.c (handle_general_set): Make static.
7028
bc3b5632
DE
7029 * remote-utils.c (putpkt_binary_1): Call readchar instead of read.
7030 Print received char after testing for error/eof instead of before.
7031 (input_interrupt): Tweak comment.
7032
65730243
DE
70332010-04-23 Doug Evans <dje@google.com>
7034
7035 * server.c (start_inferior): Print inferior argv if --debug.
7036
a8ae7dc0
AR
70372010-04-21 Aleksandar Ristovski <aristovski@qnx.com>
7038
7039 * Makefile.in (nto_low_h nto-low.o nto-x86-low.o): New dependency lists.
7040 * nto-x86-low.c: Include server.h
7041
1c07cc19
PM
70422010-04-20 Pierre Muller <muller@ics.u-strasbg.fr>
7043
7044 * win32-i386-low.c: Use __x86_64__ macro instead of __x86_64 to
7045 be consistent with other sources of this directory.
7046 (init_registers_amd64): Correct name of source file of this function
7047 in the comment.
7048
e0a61e09
PM
70492010-04-19 Pierre Muller <muller@ics.u-strasbg.fr>
7050
7051 * configure.srv (x86_64-*-mingw*): New configuration for Windows
7052 64-bit executables.
7053
54709339
PM
70542010-04-19 Pierre Muller <muller@ics.u-strasbg.fr>
7055
7056 * win32-i386-low.c: Add 64-bit support.
7057 (CONTEXT_EXTENDED_REGISTERS): Set macro to zero if not exisiting.
7058 (init_registers_amd64): Declare.
7059 (mappings): Add 64-bit version of array.
7060 (init_windows_x86): New function.
7061 (the_low_target): Change init_arch field to init_windows_x86.
7062
e8f0053d
PM
70632010-04-19 Pierre Muller <muller@ics.u-strasbg.fr>
7064
7065 * win32-low.c: Adapt to support also 64-bit architecture.
7066 (child_xfer_memory): Use uintptr_t type for local variable `addr'.
7067 (get_image_name): Use SIZE_T type for local variable `done'.
7068 (psapi_get_dll_name): Use LPVOID type for parameter `BaseAddress'.
7069 (toolhelp_get_dll_name): Idem.
7070 (handle_load_dll): Use CORE_ADDR type for local variable `load_addr'.
7071 Use uintptr_t typecast to avoid warning.
7072 (handle_unload_dll): Use uintptr_t typecast to avoid warning.
7073 (handle_exception): Use phex_nz to avoid warning.
7074 (win32_wait): Remove unused local variable `process'.
7075
c481e77e
PM
70762010-04-19 Pierre Muller <muller@ics.u-strasbg.fr>
7077
7078 * configure.srv (srv_amd64_regobj): Replace `x86-64-avx.o' by
7079 `amd64-avx.o'.
7080
12ea4b69
PM
70812010-04-17 Pierre Muller <muller@ics.u-strasbg.fr>
7082
7083 * configure.ac: Use `ws2_32' library for srv_mingw.
7084 * configure: Regenerate.
7085 * gdbreplay.c: Include winsock2.h instead of winsock.h.
7086 * remote-utils.c: Likewise.
7087
f6d1620c
L
70882010-04-17 H.J. Lu <hongjiu.lu@intel.com>
7089
7090 * linux-x86-low.c (xmltarget_amd64_linux_no_xml): Define only
7091 if __x86_64__ is defined.
7092
8e642873
PM
70932010-04-16 Pierre Muller <muller@ics.u-strasbg.fr>
7094
7095 * configure: Regenerate.
7096
711e434b
PM
70972010-04-16 Pierre Muller <muller@ics.u-strasbg.fr>
7098
7099 * server.c (handle_query): Handle 'qGetTIBAddr' query.
7100 * target.h (target_ops): New get_tib_address field.
7101 * win32-low.h (win32_thread_info): Add thread_local_base field.
7102 * win32-low.c (child_add_thread): Add tlb argument.
7103 Set thread_local_base field to TLB.
7104 (get_child_debug_event): Adapt to child_add_thread change.
7105 (win32_get_tib_address): New function.
7106 (win32_target_ops): Set get_tib_address field to
7107 win32_get_tib_address.
7108 * linux-low.c (linux_target_ops): Set get_tib_address field to NULL.
7109
505106cd
PA
71102010-04-12 Pedro Alves <pedro@codesourcery.com>
7111
505106cd
PA
7112 * linux-low.c (linux_mourn): Also remove the process.
7113 * server.c (handle_target_event): Don't remove the process here.
7114 * nto-low.c (nto_mourn): New.
7115 (nto_target_ops): Install it.
7116 * spu-low.c (spu_mourn): New.
7117 (spu_target_ops): Install it.
7118 * win32-low.c (win32_mourn): New.
7119 (win32_target_ops): Install it.
7120
e8470a06
PA
71212010-04-12 Pedro Alves <pedro@codesourcery.com>
7122
7123 * server.h (buffer_xml_printf): Remove redundant `;'.
7124
45ba0d02
PA
71252010-04-12 Pedro Alves <pedro@codesourcery.com>
7126
7127 * regcache.c (set_register_cache): Invalidate regcaches before
7128 changing the register cache layout.
7129 (regcache_invalidate_one): Allow a NULL regcache.
7130 * linux-x86-low.c (x86_linux_update_xmltarget): Invalidate
7131 regcaches before changing the register cache layout or the target
7132 regsets.
7133
59e04013
L
71342010-04-12 H.J. Lu <hongjiu.lu@intel.com>
7135
7136 * linux-x86-low.c (x86_linux_update_xmltarget): Avoid unused
7137 variable warning on Linux/x86-64.
7138
8336d594
PA
71392010-04-11 Pedro Alves <pedro@codesourcery.com>
7140
7141 GDBserver disconnected tracing support.
7142
7143 * linux-low.c (linux_remove_process): Delete.
7144 (add_lwp): Don't set last_resume_kind here.
7145 (linux_kill): Use `mourn'.
7146 (linux_detach): Use `thread_db_detach', and `mourn'.
7147 (linux_mourn): New.
7148 (linux_attach_lwp_1): Adjust comment.
7149 (linux_attach): last_resume_kind moved the thread_info; adjust.
7150 (status_pending_p_callback): Adjust.
7151 (linux_wait_for_event_1): Adjust.
7152 (count_events_callback, select_singlestep_lwp_callback)
7153 (select_event_lwp_callback, cancel_breakpoints_callback)
7154 (db_wants_lwp_stopped, linux_wait_1, need_step_over_p)
7155 (proceed_one_lwp): Adjust.
7156 (linux_async): Add debug output.
7157 (linux_thread_stopped): New.
7158 (linux_pause_all): New.
7159 (linux_target_ops): Install linux_mourn, linux_thread_stopped and
7160 linux_pause_all.
7161 * linux-low.h (struct lwp_info): Delete last_resume_kind field.
7162 (thread_db_free): Delete declaration.
7163 (thread_db_detach, thread_db_mourn): Declare.
7164 * thread-db.c (thread_db_init): Use thread_db_mourn.
7165 (thread_db_free): Delete, split in two.
7166 (disable_thread_event_reporting): New.
7167 (thread_db_detach): New.
7168 (thread_db_mourn): New.
7169
7170 * server.h (struct thread_info) <last_resume_kind>: New field.
7171 <attached>: Add comment.
7172 <gdb_detached>: New field.
7173 (handler_func): Change return type to int.
7174 (handle_serial_event, handle_target_event): Ditto.
7175 (gdb_connected): Declare.
7176 (tracing): Delete.
7177 (disconnected_tracing): Declare.
7178 (stop_tracing): Declare.
7179
7180 * server.c (handle_query) <qSupported>: Report support for
7181 disconnected tracing.
7182 (queue_stop_reply_callback): Account for running threads.
7183 (gdb_wants_thread_stopped): New.
7184 (gdb_wants_all_threads_stopped): New.
7185 (gdb_reattached_process): New.
7186 (handle_status): Clear the `gdb_detached' flag of all processes.
7187 In all-stop, stop all threads.
7188 (main): Be sure to leave tfind mode. Handle disconnected tracing.
7189 (process_serial_event): If the remote connection breaks, or if an
7190 exit was forced with "monitor exit", force an event loop exit.
7191 Handle disconnected tracing on detach.
7192 (handle_serial_event): Adjust.
7193 (handle_target_event): If GDB isn't connected, forward events back
7194 to the inferior, unless the last process exited, in which case,
7195 exit gdbserver. Adjust interface.
7196
7197 * remote-utils.c (remote_open): Don't block in accept. Instead
7198 register an event loop source on the listen socket file
7199 descriptor. Refactor bits into ...
7200 (listen_desc): ... this new global.
7201 (gdb_connected): ... this new function.
7202 (enable_async_notification): ... this new function.
7203 (handle_accept_event): ... this new function.
7204 (remote_close): Clear remote_desc.
7205
7206 * inferiors.c (add_thread): Set the new thread's last_resume_kind.
7207
7208 * target.h (struct target_ops) <mourn, thread_stopped, pause_all>:
7209 New fields.
7210 (mourn_inferior): Define.
7211 (target_process_qsupported): Avoid the dangling else problem.
7212 (thread_stopped): Define.
7213 (pause_all): Define.
7214 (target_waitstatus_to_string): Declare.
7215 * target.c (target_waitstatus_to_string): New.
7216
7217 * tracepoint.c (tracing): Make extern.
7218 (disconnected_tracing): New.
7219 (stop_tracing): Make extern. Handle tracing stops due to GDB
7220 disconnecting.
7221 (cmd_qtdisconnected): New.
7222 (cmd_qtstatus): Report disconnected tracing status in trace reply.
7223 (handle_tracepoint_general_set): Handle QTDisconnected.
7224
7225 * event-loop.c (event_handler_func): Change return type to int.
7226 (process_event): Bail out if the event handler wants the event
7227 loop to stop.
7228 (handle_file_event): Ditto.
7229 (start_event_loop): Bail out if the event handler wants the event
7230 loop to stop.
7231
7232 * nto-low.c (nto_target_ops): Adjust.
7233 * spu-low.c (spu_wait): Don't remove the process here.
7234 (spu_target_ops): Adjust.
7235 * win32-low.c (win32_wait): Don't remove the process here.
7236 (win32_target_ops): Adjust.
7237
5d267c4c
PA
72382010-04-11 Pedro Alves <pedro@codesourcery.com>
7239
7240 * regcache.c (realloc_register_cache): Invalidate inferior's
7241 regcache before recreating it.
7242
623ccd72
PA
72432010-04-09 Pedro Alves <pedro@codesourcery.com>
7244
7245 * tracepoint.c (cmd_qtstatus): Report trace buffer circularity.
7246
219f2f23
PA
72472010-04-09 Stan Shebs <stan@codesourcery.com>
7248 Pedro Alves <pedro@codesourcery.com>
7249
7250 * server.h (LONGEST): New.
7251 (struct thread_info) <while_stepping>: New field.
7252 (unpack_varlen_hex, xrealloc, pulongest, plongest, phex_nz):
7253 Declare.
7254 (initialize_tracepoint, handle_tracepoint_general_set)
7255 (handle_tracepoint_query, tracepoint_finished_step)
7256 (tracepoint_was_hit, release_while_stepping_state_list):
7257 (current_traceframe): Declare.
7258 * server.c (handle_general_set): Handle tracepoint packets.
7259 (read_memory): New.
7260 (write_memory): New.
7261 (handle_search_memory_1): Use read_memory.
7262 (handle_query): Report support for conditional tracepoints, trace
7263 state variables, and tracepoint sources. Handle tracepoint
7264 queries.
7265 (main): Initialize the tracepoints module.
7266 (process_serial_event): Handle traceframe reads/writes.
7267
7268 * linux-low.c (handle_tracepoints): New.
7269 (linux_wait_1): Call it.
7270 (linux_resume_one_lwp): Handle while-stepping.
7271 (linux_supports_tracepoints, linux_read_pc, linux_write_pc): New.
7272 (linux_target_ops): Install them.
7273 * linux-low.h (struct linux_target_ops) <supports_tracepoints>:
7274 New field.
7275 * linux-x86-low.c (x86_supports_tracepoints): New.
7276 (the_low_target). Install it.
7277
7278 * mem-break.h (delete_breakpoint): Declare.
7279 * mem-break.c (delete_breakpoint): Make external.
7280
7281 * target.h (struct target_ops): Add `supports_tracepoints',
7282 `read_pc', and `write_pc' fields.
7283 (target_supports_tracepoints): Define.
7284 * utils.c (xrealloc, decimal2str, pulongest, plongest, thirty_two)
7285 (phex_nz): New.
7286
7287 * regcache.h (struct regcache) <registers_owned>: New field.
7288 (init_register_cache, regcache_cpy): Declare.
7289 (regcache_read_pc, regcache_write_pc): Declare.
7290 (register_cache_size): Declare.
7291 (supply_regblock): Declare.
7292 * regcache.c (init_register_cache): New.
7293 (new_register_cache): Use it.
7294 (regcache_cpy): New.
7295 (register_cache_size): New.
7296 (supply_regblock): New.
7297 (regcache_read_pc, regcache_write_pc): New.
889bf7c5 7298
219f2f23
PA
7299 * tracepoint.c: New.
7300
7301 * Makefile.in (OBS): Add tracepoint.o.
7302 (tracepoint.o): New rule.
7303
3a13a53b
L
73042010-04-08 H.J. Lu <hongjiu.lu@intel.com>
7305
7306 * Makefile.in (clean): Also remove i386-mmx.c i386-mmx-linux.c.
7307 (i386-mmx.o): New.
7308 (i386-mmx.c): Likewise.
7309 (i386-mmx-linux.o): Likewise.
7310 (i386-mmx-linux.c): Likewise.
7311
7312 * configure.srv (srv_i386_regobj): Add i386-mmx.o.
7313 (srv_i386_linux_regobj): Add i386-mmx-linux.o.
7314 (srv_i386_xmlfiles): Add i386/i386-mmx.xml.
7315 (srv_i386_linux_xmlfiles): Add i386/i386-mmx-linux.xml.
7316
7317 * linux-x86-low.c (init_registers_i386_mmx_linux): New.
7318 (x86_linux_update_xmltarget): Call init_registers_i386_mmx_linux
7319 and return if ptrace PTRACE_GETFPXREGS failed in 32bit.
7320
1570b33e
L
73212010-04-07 H.J. Lu <hongjiu.lu@intel.com>
7322
7323 * Makefile.in (clean): Updated.
7324 (i386-avx.o): New.
7325 (i386-avx.c): Likewise.
7326 (i386-avx-linux.o): Likewise.
7327 (i386-avx-linux.c): Likewise.
7328 (amd64-avx.o): Likewise.
7329 (amd64-avx.c): Likewise.
7330 (amd64-avx-linux.o): Likewise.
7331 (amd64-avx-linux.c): Likewise.
7332
7333 * configure.srv (srv_i386_regobj): Add i386-avx.o.
7334 (srv_i386_linux_regobj): Add i386-avx-linux.o.
7335 (srv_amd64_regobj): Add amd64-avx.o.
7336 (srv_amd64_linux_regobj): Add amd64-avx-linux.o.
7337 (srv_i386_32bit_xmlfiles): Add i386/32bit-avx.xml.
7338 (srv_i386_64bit_xmlfiles): Add i386/64bit-avx.xml.
7339 (srv_i386_xmlfiles): Add i386/i386-avx.xml.
7340 (srv_amd64_xmlfiles): Add i386/amd64-avx.xml.
7341 (srv_i386_linux_xmlfiles): Add i386/i386-avx-linux.xml.
7342 (srv_amd64_linux_xmlfiles): Add i386/amd64-avx-linux.xml.
7343
7344 * i387-fp.c: Include "i386-xstate.h".
7345 (i387_xsave): New.
7346 (i387_cache_to_xsave): Likewise.
7347 (i387_xsave_to_cache): Likewise.
7348 (x86_xcr0): Likewise.
7349
7350 * i387-fp.h (i387_cache_to_xsave): Likewise.
7351 (i387_xsave_to_cache): Likewise.
7352 (x86_xcr0): Likewise.
7353
7354 * linux-arm-low.c (target_regsets): Initialize nt_type to 0.
7355 * linux-crisv32-low.c (target_regsets): Likewise.
7356 * linux-m68k-low.c (target_regsets): Likewise.
7357 * linux-mips-low.c (target_regsets): Likewise.
7358 * linux-ppc-low.c (target_regsets): Likewise.
7359 * linux-s390-low.c (target_regsets): Likewise.
7360 * linux-sh-low.c (target_regsets): Likewise.
7361 * linux-sparc-low.c (target_regsets): Likewise.
7362 * linux-xtensa-low.c (target_regsets): Likewise.
7363
7364 * linux-low.c: Include <sys/uio.h>.
7365 (regsets_fetch_inferior_registers): Support nt_type.
7366 (regsets_store_inferior_registers): Likewise.
7367 (linux_process_qsupported): New.
7368 (linux_target_ops): Add linux_process_qsupported.
7369
7370 * linux-low.h (regset_info): Add nt_type.
7371 (linux_target_ops): Add process_qsupported.
7372
7373 * linux-x86-low.c: Include "i386-xstate.h", "elf/common.h"
7374 and <sys/uio.h>.
7375 (init_registers_i386_avx_linux): New.
7376 (init_registers_amd64_avx_linux): Likewise.
7377 (xmltarget_i386_linux_no_xml): Likewise.
7378 (xmltarget_amd64_linux_no_xml): Likewise.
7379 (PTRACE_GETREGSET): Likewise.
7380 (PTRACE_SETREGSET): Likewise.
7381 (x86_fill_xstateregset): Likewise.
7382 (x86_store_xstateregset): Likewise.
7383 (use_xml): Likewise.
7384 (x86_linux_update_xmltarget): Likewise.
7385 (x86_linux_process_qsupported): Likewise.
7386 (target_regsets): Add NT_X86_XSTATE entry and Initialize nt_type.
7387 (x86_arch_setup): Don't call init_registers_amd64_linux nor
7388 init_registers_i386_linux here. Call
7389 x86_linux_update_xmltarget.
7390 (the_low_target): Add x86_linux_process_qsupported.
7391
7392 * server.c (handle_query): Call target_process_qsupported.
7393
7394 * target.h (target_ops): Add process_qsupported.
7395 (target_process_qsupported): New.
7396
fc7238bb
PA
73972010-04-03 Pedro Alves <pedro@codesourcery.com>
7398
7399 * inferiors.c (add_thread): Set last_status kind to
7400 TARGET_WAITKIND_IGNORE.
7401 * linux-low.c (cancel_breakpoint): Remove unnecessary regcache
7402 fetch. Use ptid_of. Avoid unnecessary get_lwp_thread calls.
7403 (linux_wait_1): Move `thread' local definition to block that uses
7404 it. Don't NULL initialize `event_child'.
7405 (linux_resume_one_thread): Avoid unnecessary get_lwp_thread calls.
7406 Alway set the thread's last_status to TARGET_WAITKIND_IGNORE.
7407 * linux-x86-low.c (x86_breakpoint_at): Read raw memory.
7408
bdabb078
PA
74092010-04-01 Pedro Alves <pedro@codesourcery.com>
7410
7411 * linux-low.c (get_stop_pc): Don't adjust the PC if stopped with
7412 an extended waitstatus, or by a watchpoint.
7413 (cancel_breakpoints_callback): Don't cancel a breakpoint if the
7414 thread was stepping or has been stopped by a watchpoint.
7415
d3bbe7a0
PA
74162010-04-01 Pedro Alves <pedro@codesourcery.com>
7417
7418 * mem-break.c (struct raw_breakpoint): New field shlib_disabled.
7419 (set_gdb_breakpoint_at): If GDB is inserting a breakpoint on top
7420 of another, then delete the previous, and validate all
7421 breakpoints.
7422 (validate_inserted_breakpoint): New.
7423 (delete_disabled_breakpoints): New.
7424 (validate_breakpoints): New.
7425 (check_mem_read): Validate breakpoints before trusting their
7426 shadow. Delete disabled breakpoints.
7427 (check_mem_write): Validate breakpoints before trusting they
7428 should be inserted. Delete disabled breakpoints.
7429 * mem-break.h (validate_breakpoints):
7430 * server.c (handle_query): Validate breakpoints when we see a
7431 qSymbol query.
7432
8b07ae33
PA
74332010-04-01 Pedro Alves <pedro@codesourcery.com>
7434
7435 * linux-low.c (linux_wait_1): Avoid setting need_step_over is
7436 there's a GDB breakpoint at stop_pc. Always report a trap to GDB
7437 if we could tell there's a GDB breakpoint at stop_pc.
7438 (need_step_over_p): Don't do a step over if we find a GDB
7439 breakpoint at the resume PC.
7440
7441 * mem-break.c (struct raw_breakpoint): New.
7442 (enum bkpt_type): New type `gdb_breakpoint'.
7443 (struct breakpoint): Delete the `PC', `old_data' and `inserted'
7444 fields. New field `raw'.
7445 (find_raw_breakpoint_at): New.
7446 (set_raw_breakpoint_at): Handle refcounting. Create a raw
7447 breakpoint instead.
7448 (set_breakpoint_at): Adjust.
7449 (delete_raw_breakpoint): New.
7450 (release_breakpoint): New.
7451 (delete_breakpoint): Rename to...
7452 (delete_breakpoint_1): ... this. Add proc parameter. Use
7453 release_breakpoint. Return ENOENT.
7454 (delete_breakpoint): Reimplement.
7455 (find_breakpoint_at): Delete.
7456 (find_gdb_breakpoint_at): New.
7457 (delete_breakpoint_at): Delete.
7458 (set_gdb_breakpoint_at): New.
7459 (delete_gdb_breakpoint_at): New.
7460 (gdb_breakpoint_here): New.
7461 (set_reinsert_breakpoint): Use release_breakpoint.
7462 (uninsert_breakpoint): Rename to ...
7463 (uninsert_raw_breakpoint): ... this.
7464 (uninsert_breakpoints_at): Adjust to handle raw breakpoints.
7465 (reinsert_raw_breakpoint): Change parameter type to
7466 raw_breakpoint.
7467 (reinsert_breakpoints_at): Adjust to handle raw breakpoints
7468 instead.
7469 (check_breakpoints): Adjust. Use release_breakpoint.
7470 (breakpoint_here): Rewrite using find_raw_breakpoint_at.
7471 (breakpoint_inserted_here): Ditto.
7472 (check_mem_read): Adjust to iterate over raw breakpoints instead.
7473 Don't trust the breakpoint's shadow if it is not inserted.
7474 (check_mem_write): Adjust to iterate over raw breakpoints instead.
7475 (delete_all_breakpoints): Adjust.
7476 (free_all_breakpoints): Mark all breakpoints as uninserted, and
7477 use delete_breakpoint_1.
7478
7479 * mem-break.h (breakpoints_supported): Delete declaration.
7480 (set_gdb_breakpoint_at): Declare.
7481 (gdb_breakpoint_here): Declare.
7482 (delete_breakpoint_at): Delete.
7483 (delete_gdb_breakpoint_at): Declare.
7484
7485 * server.h (struct raw_breakpoint): Forward declare.
7486 (struct process_info): New field `raw_breakpoints'.
7487
7488 * linux-x86-low.c (x86_insert_point, x86_remote_point): Handle Z0
7489 breakpoints.
7490
6bf5e0ba
PA
74912010-03-24 Pedro Alves <pedro@codesourcery.com>
7492
7493 * linux-low.c (status_pending_p_callback): Fix comment.
7494 (linux_wait_for_event_1): Move most of the internal breakpoint
7495 handling from here...
7496 (linux_wait_1): ... to here.
7497 (count_events_callback): New.
7498 (select_singlestep_lwp_callback): New.
7499 (select_event_lwp_callback): New.
7500 (cancel_breakpoints_callback): New.
7501 (select_event_lwp): New.
7502 (linux_wait_1): Simplify internal breakpoint handling. Give equal
7503 priority to all LWPs that have had events that should be reported
7504 to the client. Cancel breakpoints when about to reporting the
7505 event to the client, not while stopping lwps. No longer cancel
7506 finished single-steps here.
7507 (cancel_finished_single_step): Delete.
7508 (cancel_finished_single_steps): Delete.
7509
414a389f
PA
75102010-03-24 Pedro Alves <pedro@codesourcery.com>
7511
7512 * mem-break.c (enum bkpt_type): New.
7513 (struct breakpoint): New field `type'.
7514 (set_breakpoint_at): Change return type to struct breakpoint
7515 pointer. Set type to `other_breakpoint' by default.
7516 (delete_breakpoint): Rewrite, supporting more than one breakpoint
7517 in the breakpoint list.
7518 (delete_reinsert_breakpoints): Only delete reinsert breakpoints.
7519 (reinsert_breakpoint): Rename to ...
7520 (reinsert_raw_breakpoint): ... this.
7521 (reinsert_breakpoints_at): Adjust.
7522 * mem-break.h (struct breakpoint): Declare.
7523 (set_breakpoint_at): Change return type to struct breakpoint
7524 pointer.
7525
2280c721
PA
75262010-03-24 Pedro Alves <pedro@codesourcery.com>
7527
7528 * server.c (handle_query): Assign, not compare.
7529
d50171e4
PA
75302010-03-24 Pedro Alves <pedro@codesourcery.com>
7531
7532 Teach linux gdbserver to step-over-breakpoints.
7533
7534 * linux-low.c (can_hardware_single_step): New.
7535 (supports_breakpoints): New.
7536 (handle_extended_wait): If stopping threads, read the stop pc of
7537 the new cloned LWP.
7538 (get_pc): New.
7539 (get_stop_pc): Add `lwp' parameter. Handle it. Bail out if the
7540 low target doesn't support retrieving the PC.
7541 (add_lwp): Set last_resume_kind to resume_continue.
7542 (linux_attach_lwp_1): Adjust comments. Always set stop_expected.
7543 (linux_attach): Don't clear stop_expected. Set the lwp's
7544 last_resume_kind to resume_stop.
7545 (linux_detach_one_lwp): Don't check for removed breakpoints.
7546 (check_removed_breakpoint): Delete.
7547 (status_pending_p): Rename to ...
7548 (status_pending_p_callback): ... this. Don't check for removed
7549 breakpoints. Don't consider threads that are stopped from GDB's
7550 perspective.
7551 (linux_wait_for_lwp): Always read the stop_pc here.
7552 (cancel_breakpoint): New.
7553 (step_over_bkpt): New global.
7554 (linux_wait_for_event_1): Implement stepping over breakpoints.
7555 (gdb_wants_lwp_stopped): New.
7556 (gdb_wants_all_stopped): New.
7557 (linux_wait_1): Tag threads as gdb-wants-stopped. Cancel finished
7558 single-step traps here. Store the thread's last reported target
7559 wait status.
7560 (send_sigstop): Don't clear stop_expected. Always set it,
7561 instead.
7562 (mark_lwp_dead): Remove reference to pending_is_breakpoint.
7563 (cancel_finished_single_step): New.
7564 (cancel_finished_single_steps): New.
7565 (wait_for_sigstop): Don't cancel finished single-step traps here.
7566 (linux_resume_one_lwp): Don't check for removed breakpoints.
7567 Don't set `step' on non-hardware step archs.
7568 (linux_set_resume_request): Ignore resume_stop requests if already
7569 stopping or stopped. Set the lwp's last_resume_kind.
7570 (resume_status_pending_p): Don't check for removed breakpoints.
7571 (need_step_over_p): New.
7572 (start_step_over): New.
7573 (finish_step_over): New.
7574 (linux_resume_one_thread): Always queue a sigstop for resume_stop
7575 requests. Clear the thread's last reported target waitstatus.
7576 Don't use the `suspended' flag. Don't consider pending breakpoints.
7577 (linux_resume): Start a step-over if necessary.
7578 (proceed_one_lwp): New.
7579 (proceed_all_lwps): New.
7580 (unstop_all_lwps): New.
7581 * linux-low.h (struct lwp_info): Rewrite comment for the
7582 `suspended' flag. Add the `stop_pc' field. Delete the
7583 `pending_stop_pc' field. Tweak the `stepping' flag's comment.
7584 Add `'last_resume_kind' and `need_step_over' fields.
7585 * inferiors.c (struct thread_info): Delete, moved elsewhere.
7586 * mem-break.c (struct breakpoint): Delete `reinserting' flag.
7587 Delete `breakpoint_to_reinsert' field. New flag `inserted'.
7588 (set_raw_breakpoint_at): New.
7589 (set_breakpoint_at): Rewrite to use it.
7590 (reinsert_breakpoint_handler): Delete.
7591 (set_reinsert_breakpoint): New.
7592 (reinsert_breakpoint_by_bp): Delete.
7593 (delete_reinsert_breakpoints): New.
7594 (uninsert_breakpoint): Rewrite.
7595 (uninsert_breakpoints_at): New.
7596 (reinsert_breakpoint): Rewrite.
7597 (reinsert_breakpoints_at): New.
7598 (check_breakpoints): Rewrite.
7599 (breakpoint_here): New.
7600 (breakpoint_inserted_here): New.
7601 (check_mem_read): Adjust.
7602 * mem-break.h (breakpoints_supported, breakpoint_here)
7603 (breakpoint_inserted_here, set_reinsert_breakpoint): Declare.
7604 (reinsert_breakpoint_by_bp): Delete declaration.
7605 (delete_reinsert_breakpoints): Declare.
7606 (reinsert_breakpoint): Delete declaration.
7607 (reinsert_breakpoints_at): Declare.
7608 (uninsert_breakpoint): Delete declaration.
7609 (uninsert_breakpoints_at): Declare.
7610 (check_breakpoints): Adjust prototype.
7611 * server.h: Adjust include order.
7612 (struct thread_info): Declare here. Add a `last_status' field.
7613
30ba68cb
MS
76142010-03-23 Michael Snyder <msnyder@vmware.com>
7615
7616 * server.c (crc32): New function.
7617 (handle_query): Add handling for 'qCRC:' request.
7618
b9a881c2
PA
76192010-03-23 Pedro Alves <pedro@codesourcery.com>
7620
7621 * linux-x86-low.c (x86_linux_prepare_to_resume): Clear DR6 if the
7622 lwp had been stopped by a watchpoint.
7623
e92d13d5
PA
76242010-03-16 Pedro Alves <pedro@codesourcery.com>
7625
7626 * server.h (internal_error): Declare.
7627 (gdb_assert, ASSERT_FUNCTION, gdb_assert_fail): Define.
7628 * utils.c (internal_error): New function.
7629
64daa791
AS
76302010-03-15 Andreas Schwab <schwab@redhat.com>
7631
7632 * configure.srv: Fix typo setting srv_regobj.
7633
f52cd8cd
PA
76342010-03-15 Pedro Alves <pedro@codesourcery.com>
7635
7636 * linux-low.c (fetch_register): Avoid passing a non string literal
7637 format to `error'.
7638 (usr_store_inferior_registers): Ditto.
7639
93ae6fdc
PA
76402010-03-14 Pedro Alves <pedro@codesourcery.com>
7641
7642 * linux-low.c (linux_write_memory): Bail out early if peeking
7643 memory failed.
7644
c3adc08c
PA
76452010-03-14 Pedro Alves <pedro@codesourcery.com>
7646
7647 * linux-low.h (struct lwp_info): New fields
7648 `stopped_by_watchpoint' and `stopped_data_address'.
7649 * linux-low.c (linux_wait_for_lwp): Check for watchpoint triggers
7650 here, and cache them in the lwp object.
7651 (wait_for_sigstop): Check stopped_by_watchpoint lwp field
7652 directly.
7653 (linux_resume_one_lwp): Clear the lwp's stopped_by_watchpoint
7654 field.
7655 (linux_stopped_by_watchpoint): Rewrite.
7656 (linux_stopped_data_address): Rewrite.
7657
bce522a2
PA
76582010-03-06 Simo Melenius <simo.melenius@iki.fi>
7659
7660 * linux-low.c (linux_wait_for_lwp): Fetch the regcache after
7661 switching the current inferior, not before.
7662
90884b2b
L
76632010-03-01 H.J. Lu <hongjiu.lu@intel.com>
7664
7665 * Makefile.in (clean): Replace reg-i386.c, reg-x86-64.c,
7666 reg-i386-linux.c and reg-x86-64-linux.c with i386.c, amd64.c,
7667 i386-linux.c and amd64-linux.c.
7668 (reg-i386.o): Removed.
7669 (reg-i386.c): Likewise.
7670 (reg-i386-linux.o): Likewise.
7671 (reg-i386-linux.c): Likewise.
7672 (reg-x86-64.o): Likewise.
7673 (reg-x86-64.c): Likewise.
7674 (reg-x86-64-linux.o): Likewise.
7675 (reg-x86-64-linux.c): Likewise.
7676 (i386.o): New.
7677 (i386.c): Likewise.
7678 (i386-linux.o): Likewise.
7679 (i386-linux.c): Likewise.
7680 (amd64.o): Likewise.
7681 (amd64.c): Likewise.
7682 (amd64-linux.o): Likewise.
7683 (amd64-linux.c): Likewise.
7684
7685 * configure.srv (srv_i386_regobj): New.
7686 (srv_i386_linux_regobj): Likewise.
7687 (srv_amd64_regobj): Likewise.
7688 (srv_amd64_linux_regobj): Likewise.
7689 (srv_i386_32bit_xmlfiles): Likewise.
7690 (srv_i386_64bit_xmlfiles): Likewise.
7691 (srv_i386_xmlfiles): Likewise.
7692 (srv_amd64_xmlfiles): Likewise.
7693 (srv_i386_linux_xmlfiles): Likewise.
7694 (srv_amd64_linux_xmlfiles): Likewise.
7695 (i[34567]86-*-cygwin*): Set srv_regobj to $srv_i386_regobj. Set
7696 srv_xmlfiles to $srv_i386_xmlfiles.
7697 (i[34567]86-*-mingw32ce*): Likewise.
7698 (i[34567]86-*-mingw*): Likewise.
7699 (i[34567]86-*-nto*): Likewise.
7700 (i[34567]86-*-linux*): Set srv_regobj to $srv_i386_linux_regobj
7701 and $srv_amd64_linux_regobj. Set srv_xmlfiles to
7702 $srv_i386_linux_xmlfiles and $srv_amd64_linux_xmlfiles.
7703 (x86_64-*-linux*): Likewise.
7704
7705 * linux-x86-low.c (init_registers_x86_64_linux): Removed.
7706 (init_registers_amd64_linux): New.
7707 (x86_arch_setup): Replace init_registers_x86_64_linux with
7708 init_registers_amd64_linux.
7709
193f13e6
MK
77102010-02-23 Maxim Kuvyrkov <maxim@codesourcery.com>
7711
7712 * configure.ac: Check for libdl. If it is not available link against
7713 static libthread_db.
7714 * configure: Regenerate.
7715
85d721b8
PA
77162010-02-22 Pedro Alves <pedro@codesourcery.com>
7717
7718 PR9605
7719
7720 * i386-low.c (i386_length_and_rw_bits): Throw a fatal error if
7721 handing a read watchpoint.
7722 (i386_low_insert_watchpoint): Read watchpoints aren't supported.
7723
6076632b
DE
77242010-02-12 Doug Evans <dje@google.com>
7725
7726 * linux-low.c (linux_supports_tracefork_flag): Document.
7727 (linux_look_up_symbols): Add comment.
7728
3327ccf7
L
77292010-02-03 H.J. Lu <hongjiu.lu@intel.com>
7730
7731 * regcache.c (supply_register): Clear regcache if buf is NULL.
7732
0718675c 77332010-02-02 Nicolas Roche <roche@sourceware.org>
3327ccf7 7734 Joel Brobecker <brobecker@adacore.com>
0718675c
JB
7735
7736 * inferiors.c (find_inferior): Add function documentation.
7737 (unloaded_dll): Handle the case where the unloaded dll has not
7738 been previously registered in the dll list.
7739
177321bd
DJ
77402010-02-01 Daniel Jacobowitz <dan@codesourcery.com>
7741
7742 * linux-arm-low.c (thumb_breakpoint_len): Delete.
7743 (thumb2_breakpoint): New.
7744 (arm_breakpoint_at): Check for Thumb-2 breakpoints.
7745
2b009048
DJ
77462010-01-29 Daniel Jacobowitz <dan@codesourcery.com>
7747
7748 * linux-low.c (get_stop_pc): Check for SIGTRAP.
7749 (linux_wait_for_event_1): Handle SIGILL and SIGSEGV as possible
7750 breakpoints.
7751
3be029c7
PA
77522010-01-21 Pedro Alves <pedro@codesourcery.com>
7753
7754 * linux-ppc-low.c (ppc_arch_setup): Adjust to regcache changes.
7755
18f5de3b
JK
77562010-01-21 Jan Kratochvil <jan.kratochvil@redhat.com>
7757
7758 * linux-s390-low.c (s390_collect_ptrace_register)
7759 (s390_supply_ptrace_register): Adjust it for the new regcache parameter.
7760
3743bb4f
DE
77612010-01-21 Doug Evans <dje@google.com>
7762
14ce3065
DE
7763 * linux-low.c (PTRACE_ARG3_TYPE): Change from long to void*.
7764 (PTRACE_ARG4_TYPE): New macro.
7765 (handle_extended_wait): Cast ptrace arg4 to PTRACE_ARG4_TYPE.
7766 (linux_wait_for_event_1, linux_resume_one_lwp): Ditto.
7767 (fetch_register): Cast to uintptr_t before casting to PTRACE_ARG3_TYPE.
7768 (usr_store_inferior_registers): Ditto.
7769 (linux_read_memory, linux_write_memory): Ditto.
7770 (linux_test_for_tracefork): Ditto.
7771
3743bb4f
DE
7772 * linux-arm-low.c: Remove redundant include of gdb_proc_service.h.
7773 Only include elf.h if gdb_proc_service.h didn't include linux/elf.h.
7774
8b315be5
PA
77752010-01-21 Pedro Alves <pedro@codesourcery.com>
7776
7777 * proc-service.c (ps_lgetregs): Don't refetch registers from the
7778 target.
7779
85492558
PA
77802010-01-21 Pedro Alves <pedro@codesourcery.com>
7781
7782 * spu-low.c (spu_fetch_registers, spu_store_registers): Change
7783 prototype to take a regcache. Adjust.
7784
442ea881
PA
77852010-01-20 Pedro Alves <pedro@codesourcery.com>
7786
7787 * regcache.h (struct thread_info): Forward declare.
7788 (struct regcache): New.
7789 (new_register_cache): Adjust prototype.
7790 (get_thread_regcache): Declare.
7791 (free_register_cache): Adjust prototype.
7792 (registers_to_string, registers_from_string): Ditto.
7793 (supply_register, supply_register_by_name, collect_register)
7794 (collect_register_as_string, collect_register_by_name): Ditto.
7795 * regcache.c (struct inferior_regcache_data): Delete.
7796 (get_regcache): Rename to ...
7797 (get_thread_regcache): ... this. Adjust. Switch inferior before
7798 fetching registers.
7799 (regcache_invalidate_one): Adjust.
7800 (regcache_invalidate): Fix prototype.
7801 (new_register_cache): Return the new register cache.
7802 (free_register_cache): Change prototype.
7803 (realloc_register_cache): Adjust.
7804 (registers_to_string): Change prototype to take a regcache. Adjust.
7805 (registers_from_string): Ditto.
7806 (register_data): Ditto.
7807 (supply_register): Ditto.
7808 (supply_register_by_name): Ditto.
7809 (collect_register): Ditto.
7810 (collect_register_as_string): Ditto.
7811 (collect_register_by_name): Ditto.
7812 * server.c (process_serial_event): Adjust.
7813 * linux-low.h (regset_fill_func, regset_store_func): Change
7814 prototype.
7815 (get_pc, set_pc, collect_ptrace_register, supply_ptrace_register):
7816 Change prototype.
7817 * linux-low.c (get_stop_pc): Adjust.
7818 (check_removed_breakpoint): Adjust.
7819 (linux_wait_for_event): Adjust.
7820 (linux_resume_one_lwp): Adjust.
7821 (fetch_register): Add regcache parameter. Adjust.
7822 (usr_store_inferior_registers): Ditto.
7823 (regsets_fetch_inferior_registers): Ditto.
7824 (regsets_store_inferior_registers): Ditto.
7825 (linux_fetch_registers, linux_store_registers): Ditto.
7826 * i387-fp.c (i387_cache_to_fsave): Change prototype to take a
7827 regcache. Adjust.
43aaf8b6
PA
7828 (i387_fsave_to_cache, i387_cache_to_fxsave, i387_fxsave_to_cache):
7829 Ditto.
442ea881
PA
7830 * i387-fp.h (i387_cache_to_fsave, i387_fsave_to_cache): Change
7831 prototype to take a regcache.
7832 (i387_cache_to_fxsave, i387_fxsave_to_cache): Ditto.
7833 * remote-utils.c (convert_ascii_to_int, outreg)
7834 (prepare_resume_reply): Change prototype to take a regcache.
7835 Adjust.
7836 * target.h (struct target_ops) <fetch_registers, store_registers>:
7837 Change prototype to take a regcache.
7838 (fetch_inferior_registers, store_inferior_registers): Change
7839 prototype to take a regcache. Adjust.
7840 * proc-service.c (ps_lgetregs): Adjust.
7841 * linux-x86-low.c (x86_fill_gregset, x86_store_gregset)
7842 (x86_fill_fpregset, x86_store_fpregset, x86_fill_fpxregset)
7843 (x86_store_fpxregset, x86_get_pc, x86_set_pc): Change prototype to
7844 take a regcache. Adjust.
7845 * linux-arm-low.c (arm_fill_gregset, arm_store_gregset)
7846 (arm_fill_wmmxregset, arm_store_wmmxregset, arm_fill_vfpregset)
7847 (arm_store_vfpregset, arm_get_pc, arm_set_pc):
7848 (arm_breakpoint_at): Change prototype to take a regcache. Adjust.
7849 * linux-cris-low.c (cris_get_pc, cris_set_pc)
7850 (cris_cannot_fetch_register):
7851 (cris_breakpoint_at): Change prototype to take a regcache.
7852 Adjust.
7853 * linux-crisv32-low.c (cris_get_pc, cris_set_pc,
7854 cris_reinsert_addr, cris_write_data_breakpoint): Change prototype
7855 to take a regcache. Adjust.
7856 (cris_breakpoint_at, cris_insert_point, cris_remove_point):
7857 Adjust.
7858 * linux-m32r-low.c (m32r_get_pc, m32r_set_pc): Change prototype to
7859 take a regcache. Adjust.
7860 * linux-m68k-low.c (m68k_fill_gregset, m68k_store_gregset)
7861 (m68k_fill_fpregset, m68k_store_fpregset, m68k_get_pc,
7862 (m68k_set_pc): Change prototype to take a regcache. Adjust.
7863 * linux-mips-low.c (mips_get_pc):
7864 (mips_set_pc): Change prototype to take a regcache. Adjust.
7865 (mips_reinsert_addr): Adjust.
7866 (mips_collect_register): Change prototype to take a regcache.
7867 Adjust.
7868 (mips_supply_register):
7869 (mips_collect_register_32bit, mips_supply_register_32bit)
7870 (mips_fill_gregset, mips_store_gregset, mips_fill_fpregset)
7871 (mips_store_fpregset): Ditto.
43aaf8b6
PA
7872 * linux-ppc-low.c (ppc_supply_ptrace_register)
7873 (ppc_supply_ptrace_register): Ditto.
442ea881
PA
7874 (parse_spufs_run): Adjust.
7875 (ppc_get_pc, ppc_set_pc, ppc_fill_gregset, ppc_fill_vsxregset)
7876 (ppc_store_vsxregset, ppc_fill_vrregset, ppc_store_vrregset)
7877 (ppc_fill_evrregset, ppc_store_evrregset): Change prototype to
7878 take a regcache. Adjust.
7879 * linux-s390-low.c (s390_collect_ptrace_register)
7880 (s390_supply_ptrace_register, s390_fill_gregset, s390_get_pc)
7881 (s390_set_pc): Change prototype to take a regcache. Adjust.
7882 (s390_arch_setup): Adjust.
7883 * linux-sh-low.c (sh_get_pc, sh_breakpoint_at)
7884 (sh_fill_gregset): Change prototype to take a regcache. Adjust.
7885 * linux-sparc-low.c (sparc_fill_gregset_to_stack)
7886 (sparc_fill_gregset, sparc_store_gregset_from_stack)
7887 (sparc_store_gregset, sparc_get_pc): Change prototype to take a
7888 regcache. Adjust.
7889 (sparc_breakpoint_at): Adjust.
7890 * linux-xtensa-low.c (xtensa_fill_gregset):
7891 (xtensa_store_gregset):
7892 (xtensa_fill_xtregset, xtensa_store_xtregset, xtensa_get_pc)
7893 (xtensa_set_pc): Change prototype to take a regcache. Adjust.
7894 * nto-low.c (nto_fetch_registers, nto_store_registers): Change
7895 prototype to take a regcache. Adjust.
7896 * win32-arm-low.c (arm_fetch_inferior_register)
7897 (arm_store_inferior_register): Change prototype to take a
7898 regcache. Adjust.
7899 * win32-i386-low.c (i386_fetch_inferior_register)
7900 (i386_store_inferior_register): Change prototype to take a
7901 regcache. Adjust.
7902 * win32-low.c (child_fetch_inferior_registers)
7903 (child_store_inferior_registers): Change prototype to take a
7904 regcache. Adjust.
7905 (win32_wait): Adjust.
7906 (win32_fetch_inferior_registers): Change prototype to take a
7907 regcache. Adjust.
7908 (win32_store_inferior_registers): Adjust.
7909 * win32-low.h (struct win32_target_ops) <fetch_inferior_register,
7910 store_inferior_register>: Change prototype to take a regcache.
7911
60c3d7b0
DE
79122010-01-20 Doug Evans <dje@google.com>
7913
7914 * linux-low.c (linux_create_inferior): Wrap use of __SIGRTMIN in
7915 #ifdef.
7916 (linux_wait_for_event1, linux_init_signals): Ditto.
ec8ebe72 7917 (W_STOPCODE): Provide definition if missing.
60c3d7b0 7918
dc146f7c
VP
79192010-01-13 Vladimir Prus <vladimir@codesourcery.com>
7920
7921 * linux-low.c (linux_core_of_thread): New.
7922 (compare_ints, show_process, list_threads): New.
7923 (linux_qxfer_osdata): Report threads and cores.
7924 (linux_target_op): Register linux_core_of_thread.
7925 * remote-utils.c (prepare_resume_reply): Report the core.
7926 (buffer_xml_printf): Support %d specifier.
7927 * server.c (handle_threads_qxfer_proper, handle_threads_qxfer):
7928 New.
7929 (handle_query): Handle qXfer:threads. Announce availability
7930 thereof.
7931 * target.h (struct target_ops): New field core_of_thread.
7932
7803799a
UW
79332010-01-04 Ulrich Weigand <uweigand@de.ibm.com>
7934
7935 * Makefile.in (clean): Remove new generated files.
7936 (reg-s390.o, reg-s390.c): Remove rules.
7937 (reg-s390x.o, reg-s390x.c): Likewise.
7938 (s390-linux32.o, s390-linux32.c): Add rules.
7939 (s390-linux64.o, s390-linux64.c): Likewise.
7940 (s390x-linux64.o, s390x-linux64.c): Likewise.
7941 * configure.srv (s390*-*-linux*): Update srv_regobj and srv_xmlfiles.
7942 * linux-s390-low.c: Include <elf.h>.
7943 (HWCAP_S390_HIGH_GPRS): Define if undefined.
7944 (init_registers_s390): Remove prototype.
7945 (init_registers_s390x): Likewise.
7946 (init_registers_s390_linux32): Add prototype.
7947 (init_registers_s390_linux64): Likewise.
7948 (init_registers_s390x_linux64): Likewise.
7949 (s390_num_regs_3264): New define.
7950 (s390_regmap_3264): New global variable.
7951 (s390_cannot_fetch_register): Remove obsolete check.
7952 (s390_cannot_store_register): Likewise.
7953 (s390_collect_ptrace_register): Handle upper/lower register halves.
7954 (s390_supply_ptrace_register): Likewise.
7955 (s390_fill_gregset): Update to register number changes.
7956 (s390_get_hwcap): New routine.
7957 (s390_arch_setup): Detect 32-bit process running on 64-bit system.
7958 Install appropriate regmap and register set.
7959
6e7ffa39
JB
79602010-01-01 Joel Brobecker <brobecker@adacore.com>
7961
7962 * server.c (gdbserver_version): Update copyright year to 2010.
7963 * gdbreplay.c (gdbreplay_version): Likewise.
7964
957f3f49
DE
79652009-12-28 Doug Evans <dje@google.com>
7966
7967 * linux-low.c: Delete inclusion of ansidecl.h, elf/common.h,
7968 elf/external.h. Include <elf.h> instead but only if necessary.
7969
ca5c370d
PA
79702009-12-28 Pedro Alves <pedro@codesourcery.com>
7971
7972 * linux-low.c (linux_remove_process): Remove `detaching'
7973 parameter. Don't release/detach from thread_db here.
7974 (linux_kill): Release/detach from thread_db here, ...
7975 (linux_detach): ... and here, before actually detaching.
7976 (linux_wait_1): ... and here, when a process exits.
7977 * thread-db.c (any_thread_of): New.
7978 (thread_db_free): Switch the current inferior to a thread of the
7979 passed in process.
7980
4ee62156
DE
79812009-12-21 Doug Evans <dje@google.com>
7982
d90e6a88
DE
7983 * linux-x86-low.c: Delete outdated comment about Elf32_Phdr.
7984
c5f62d5f
DE
7985 * linux-low.c (kill_lwp): Use __NR_tkill instead of SYS_tkill.
7986 Move definition of tkill_failed to ifdef __NR_tkill to avoid gcc
7987 warning ifndef __NR_tkill. Move setting of errno there too.
7988 Delete unnecessary resetting of errno after syscall.
7989 Minor comment changes to match gdb/linux-nat.c:kill_lwp.
7990
10e86dd7
DE
7991 * configure.ac: Check for dladdr.
7992 * config.in: Regenerate.
7993 * configure: Regenerate.
7994 * thread-db.c (dladdr_to_soname): Only define ifdef HAVE_DLADDR.
7995 (try_thread_db_load): Update.
7996
4ee62156
DE
7997 * linux-low.c (my_waitpid): Delete unnecessary prototype.
7998
00f515da
DE
79992009-12-18 Doug Evans <dje@google.com>
8000
e9464885
DE
8001 * event-loop.c: Include unistd.h if it exists.
8002
07d4f67e
DE
8003 * linux-low.c (my_waitpid): Move definition away from being in
8004 between linux_tracefork_child/linux_test_for_tracefork.
8005
00f515da
DE
8006 * gdb_proc_service.h (psaddr_t): Fix type.
8007 * thread-db.c (thread_db_info.td_thr_tls_get_addr_p): Fix
8008 signature to match glibc.
8009
1de1badb
DE
80102009-12-16 Doug Evans <dje@google.com>
8011
8012 * linux-low.c (linux_read_memory): Fix argument to read.
8013
aeeb81d1
PA
80142009-11-26 Pedro Alves <pedro@codesourcery.com>
8015
8016 * win32-low.c (get_child_debug_event): On EXIT_THREAD_DEBUG_EVENT
8017 events, don't leave current_inferior pointing at null.
8018
10357975
PA
80192009-11-26 Pedro Alves <pedro@codesourcery.com>
8020
8021 * win32-low.c (LOG): Delete.
8022 (OUTMSG): Output to stderr.
8023 (OUTMSG2): Conditionalize on `debug_threads' variable, instead of
8024 on compile time LOG macro.
8025 (win32_wait): Fix debug output.
8026
cf6e3471
PA
80272009-11-26 Pedro Alves <pedro@codesourcery.com>
8028
8029 * win32-low.c (win32_add_one_solib): If the dll name is
8030 "ntdll.dll", prepend the system directory to the dll path.
8031
0c85e18e
MK
80322009-11-17 Daniel Jacobowitz <dan@codesourcery.com>
8033
8034 * m68k-tdep.c (m68k_gdbarch_init): Reuse previous initialization.
8035
9ac544ce 80362009-11-17 Nathan Sidwell <nathan@codesourcery.com>
889bf7c5 8037 Vladimir Prus <vladimir@codesourcery.com>
9ac544ce
MK
8038
8039 * Makefile.in (reg-cf.o, reg-cf.c): New targets.
8040 * configure.ac: Check for __mcoldfire__ and set
8041 gdb_cv_m68k_is_coldfire.
8042 * configure.srv: Use gdb_cv_m68k_is_coldfire to select between
8043 reg-cf.o and reg-m68k.o.
8044 * configure: Regenerated.
8045
fd7dd3e6
PA
80462009-11-16 Pedro Alves <pedro@codesourcery.com>
8047
8048 * linux-low.c (linux_remove_process): Add `detaching' parameter.
8049 Pass it to thread_db_free.
8050 (linux_kill, linux_detach, linux_wait_1): Adjust to pass the
8051 proper `detaching' argument to linux_remove_process.
8052 * linux-low.h (thread_db_free): Add `detaching' parameter.
8053 * thread-db.c (thread_db_init): Pass false as `detaching' argument
8054 to thread_db_free.
8055 (thread_db_free): Add `detaching' parameter. Only
8056 call td_ta_clear_event if detaching from process.
8057
75aa492e
MK
80582009-11-12 Maxim Kuvyrkov <maxim@codesourcery.com>
8059
8060 * thread-db.c (thread_db_free): Fix typo.
8061
21e1bee4
PP
80622009-11-11 Paul Pluzhnikov <ppluzhnikov@google.com>
8063
8064 PR gdb/10838
8065 * thread-db.c (thread_db_free): Call td_ta_clear_event.
8066
8838b45e
NS
80672009-11-03 Nathan Sidwell <nathan@codesourcery.com>
8068
8069 * configure.ac (i[34567]86-*): Check if we're targetting x86-64
8070 with an i686 compiler.
8071 * configure.srv (i[34567]86-*-linux*): Pull in x86-64 handling if
8072 needed.
8073 * configure: Rebuilt.
8074
8a35fb51
SL
80752009-10-29 Sandra Loosemore <sandra@codesourcery.com>
8076
8077 PR gdb/10783
8078
8079 * server.c (handle_search_memory_1): Correct read_addr initialization
8080 in loop for searching subsequent chunks.
8081
96f15937
PP
80822009-10-29 Paul Pluzhnikov <ppluzhnikov@google.com>
8083
8084 * configure.ac: New --with-libthread-db option.
8085 * thread-db.c: Allow direct dependence on libthread_db.
8086 (thread_db_free): Adjust.
8087 * config.in: Regenerate.
8088 * configure: Likewise.
889bf7c5 8089
5f7d1694
PP
80902009-10-28 Paul Pluzhnikov <ppluzhnikov@google.com>
8091
8092 PR gdb/10757
8093 * thread-db.c (attach_thread): New function.
8094 (maybe_attach_thread): Return success/failure.
8095 (find_new_threads_callback): Adjust.
889bf7c5
PA
8096 (thread_db_find_new_threads): Loop until no new threads.
8097
88e3b899
PA
80982009-10-13 Pedro Alves <pedro@codesourcery.com>
8099
8100 * proc-service.c (ps_lgetregs): Formatting.
8101
cdbfd419
PP
81022009-10-08 Paul Pluzhnikov <ppluzhnikov@google.com>
8103
8104 * acinclude.m4: (SRV_CHECK_THREAD_DB, SRV_CHECK_TLS_GET_ADDR): Remove.
8105 * configure.ac: Adjust.
8106 * linux-low.h (struct process_info_private): Move members to struct
8107 thread_db.
8108 (thread_db_free, thread_db_handle_monitor_command): New prototype.
8109 * linux-low.c (linux_remove_process): Adjust.
8110 (linux_wait_for_event_1, linux_look_up_symbols): Likewise.
8111 * server.c (handle_query): Move code ...
8112 (handle_monitor_command): ... here. New function.
8113 * target.h (struct target_ops): New member.
8114 * thread-db.c (struct thread_db): New.
8115 (libthread_db_search_path): New variable.
8116 (thread_db_create_event, thread_db_enable_reporting)
8117 (find_one_thread, maybe_attach_thread, find_new_threads_callback)
8118 (thread_db_find_new_threads, (thread_db_get_tls_address): Adjust.
8119 (try_thread_db_load_1, dladdr_to_soname): New functions.
8120 (try_thread_db_load, thread_db_load_search): New functions.
8121 (thread_db_init): Search for libthread_db.
8122 (thread_db_free): New function.
8123 (thread_db_handle_monitor_command): Likewise.
8124 * config.in: Regenerate.
8125 * configure: Regenerate.
889bf7c5 8126
4168d2d6
UW
81272009-09-27 Ulrich Weigand <uweigand@de.ibm.com>
8128
8129 * spu-low.c (spu_kill): Wait for inferior to terminate.
8130 Call clear_inferiors.
8131 (spu_detach): Call clear_inferiors.
8132
81ecdfbb
RW
81332009-08-22 Ralf Wildenhues <Ralf.Wildenhues@gmx.de>
8134
8135 * aclocal.m4: Regenerate.
8136 * config.in: Likewise.
8137 * configure: Likewise.
8138
0b9ff2c0
UW
81392009-07-31 Ulrich Weigand <uweigand@de.ibm.com>
8140
8141 * linux-ppc-low.c (INSTR_SC, NR_spu_run): Define.
8142 (parse_spufs_run): New function.
8143 (ppc_get_pc, ppc_set_pc): Detect and handle SPU PC.
8144 (ppc_breakpoint_at): Handle SPU breakpoints.
8145
efcbbd14
UW
81462009-07-31 Ulrich Weigand <uweigand@de.ibm.com>
8147
8148 * linux-low.c: Include <sys/stat.h> and <sys/vfs.h>.
8149 (SPUFS_MAGIC): Define.
8150 (spu_enumerate_spu_ids): New function.
8151 (linux_qxfer_spu): New function.
8152 (linux_target_ops): Install linux_qxfer_spu.
8153
f4d9bade
UW
81542009-07-31 Ulrich Weigand <uweigand@de.ibm.com>
8155
8156 * configure.srv (powerpc*-*-linux*): Add powerpc-cell32l.o
8157 and powerpc-cell64l.o to srv_regobj. Add rs6000/powerpc-cell32l.xml
8158 and rs6000/powerpc-cell64l.xml to srv_xmlfiles.
8159 * Makefile.in (powerpc-cell32l.o, powerpc-cell32l.c): New rules.
8160 (powerpc-cell64l.o, powerpc-cell64l.c): Likewise.
8161 (clean): Handle powerpc-cell32l.c and powerpc-cell64l.c.
8162 * linux-ppc-low.c (PPC_FEATURE_CELL): Define.
8163 (init_registers_powerpc_cell32l): Add prototype.
8164 (init_registers_powerpc_cell64l): Likewise.
8165 (ppc_arch_setup): Detect Cell/B.E. architecture.
8166
96e946ca
RW
81672009-07-30 Ralf Wildenhues <Ralf.Wildenhues@gmx.de>
8168
8169 * Makefile.in (datarootdir): New variable.
8170
58d6951d
DJ
81712009-07-28 Daniel Jacobowitz <dan@codesourcery.com>
8172
8173 * linux-low.c (linux_write_memory): Update debugging output.
8174 * Makefile.in (clean): Add new descriptions.
8175 (arm-with-vfpv2.o, arm-with-vfpv2.c, arm-with-vfpv3.o)
8176 (arm-with-vfpv3.c, arm-with-neon.o, arm-with-neon.c): New rules.
8177 * configure.srv: Add new files for arm*-*-linux*.
8178 * linux-arm-low.c: Add new declarations.
8179 (PTRACE_GETVFPREGS, PTRACE_SETVFPREGS): Define if undefined.
8180 (arm_hwcap, HWCAP_VFP, HWCAP_IWMMXT, HWCAP_NEON, HWCAP_VFPv3)
8181 (HWCAP_VFPv3D16): New.
8182 (arm_fill_wmmxregset, arm_store_wmmxregset): Check HWCAP_IWMMXT
8183 instead of __IWMMXT__.
8184 (arm_fill_vfpregset, arm_store_vfpregset, arm_get_hwcap)
8185 (arm_arch_setup): New.
8186 (target_regsets): Remove #ifdef. Add VFP regset.
8187 (the_low_target): Use arm_arch_setup.
8188
12b42a12
DJ
81892009-07-28 Daniel Jacobowitz <dan@codesourcery.com>
8190
8191 * linux-low.c (linux_kill_one_lwp): Adjust kernel workaround to skip
8192 the main thread again.
8193
ac8c974e
AR
81942009-07-06 Aleksandar Ristovski <aristovski@qnx.com>
8195
8196 Adding Neutrino gdbserver.
8197 * configure: Regenerated.
8198 * configure.ac: Add case for srv_qnx and set LIBS accordingly.
8199 * configure.srv (i[34567]86-*-nto*): New target.
8200 * nto-low.c, nto-low.h, nto-x86-low.c: New files.
8201 * remote-utils.c [__QNX__]: Include sys/iomgr.h
8202 (nto_comctrl) [__QNX__]: New function.
8203 (enable_async_io, disable_async_io) [__QNX__]: Call nto_comctrl.
8204
4424e0c3 82052009-07-05 Danny Backx <dannybackx@users.sourceforge.net>
7437790a
PA
8206
8207 * configure.srv (i[34567]86-*-mingw32ce*): Add i386-low.o to
8208 srv_tgtobj.
8209
912cf4ba
PA
82102009-07-04 Danny Backx <dannybackx@users.sourceforge.net>
8211 Pedro Alves <pedro@codesourcery.com>
8212
8213 * win32-i386-low.c (i386_get_thread_context): Handle systems that
8214 don't support CONTEXT_EXTENDED_REGISTERS.
8215 (i386_win32_breakpoint, i386_win32_breakpoint_len): New.
8216 (the_low_target): Install them.
8217 * win32-low.c (get_child_debug_event): Handle WaitForDebugEvent
8218 failing with ERROR_PIPE_NOT_CONNECTED.
8219
aa5ca48f
DE
82202009-06-30 Doug Evans <dje@google.com>
8221 Pierre Muller <muller@ics.u-strasbg.fr>
8222
8223 Add h/w watchpoint support to x86-linux, win32-i386.
8224 * Makefile.in (SFILES): Add i386-low.c
8225 (i386_low_h): Define.
8226 (i386-low.o): Add dependencies.
8227 (linux-x86-low.o): Add i386-low.h dependency.
8228 (win32-i386-low.o): Ditto.
8229 * i386-low.c: New file.
8230 * i386-low.h: New file.
8231 * configure.srv (i[34567]86-*-cygwin*): Add i386-low.o to srv_tgtobj.
8232 (i[34567]86-*-linux*, i[34567]86-*-mingw*, x86_64-*-linux*): Ditto.
8233 * linux-low.c (linux_add_process): Initialize arch_private.
8234 (linux_remove_process): Free arch_private.
8235 (add_lwp): Initialize arch_private.
8236 (delete_lwp): Free arch_private.
8237 (linux_resume_one_lwp): Call the_low_target.prepare_to_resume if
8238 provided.
8239 * linux-low.h (process_info_private): New member arch_private.
8240 (lwp_info): New member arch_private.
8241 (linux_target_ops): New members new_process, new_thread,
8242 prepare_to_resume.
8243 (ptid_of): New macro.
8244 * linux-x86-low.c: Include stddef.h, i386-low.h.
8245 (arch_process_info): New struct.
8246 (arch_lwp_info): New struct.
8247 (x86_linux_dr_get, x86_linux_dr_set): New functions.
8248 (i386_dr_low_set_addr, i386_dr_low_set_control): New functions.
8249 (i386_dr_low_get_status): New function.
8250 (x86_insert_point, x86_remove_point): New functions.
8251 (x86_stopped_by_watchpoint): New function.
8252 (x86_stopped_data_address): New function.
8253 (x86_linux_new_process, x86_linux_new_thread): New functions.
8254 (x86_linux_prepare_to_resume): New function.
8255 (the_low_target): Add entries for insert_point, remove_point,
8256 stopped_by_watchpoint, stopped_data_address, new_process, new_thread,
8257 prepare_to_resume.
8258 * server.c (debug_hw_points): New global.
8259 (monitor_show_help): Document set debug-hw-points.
8260 (handle_query): Process "set debug-hw-points".
8261 * server.h (debug_hw_points): Declare.
8262 (paddress): Declare.
8263 * utils.c (NUMCELLS, CELLSIZE): New macros.
8264 (get_sell, xsnprintf, paddress): New functions.
8265 * win32-arm-low.c (the_low_target): Add entries for insert_point,
8266 remove_point, stopped_by_watchpoint, stopped_data_address.
8267 * win32-i386-low.c: Include i386-low.h.
8268 (debug_reg_state): Replaces dr.
8269 (i386_dr_low_set_addr, i386_dr_low_set_control): New functions.
8270 (i386_dr_low_get_status): New function.
8271 (i386_insert_point, i386_remove_point): New functions.
8272 (i386_stopped_by_watchpoint): New function.
8273 (i386_stopped_data_address): New function.
8274 (i386_initial_stuff): Update.
8275 (get_thread_context,set_thread_context,i386_thread_added): Update.
8276 (the_low_target): Add entries for insert_point,
8277 remove_point, stopped_by_watchpoint, stopped_data_address.
8278 * win32-low.c (win32_insert_watchpoint): New function.
8279 (win32_remove_watchpoint): New function.
8280 (win32_stopped_by_watchpoint): New function.
8281 (win32_stopped_data_address): New function.
8282 (win32_target_ops): Add entries for insert_watchpoint,
8283 remove_watchpoint, stopped_by_watchpoint, stopped_data_address.
8284 * win32-low.h (win32_target_ops): New members insert_point,
8285 remove_point, stopped_by_watchpoint, stopped_data_address.
8286
d993e290
PA
82872009-06-25 Pedro Alves <pedro@codesourcery.com>
8288
8289 * server.c (process_serial_event): Re-return unsupported, not
8290 error, if the type isn't recognized. Re-allow supporting only
8291 insert or remove packets. Also call require_running for
8292 breakpoints. Add missing break statement to default case. Tidy.
8293 * target.h (struct target_ops): Rename insert_watchpoint to
8294 insert_point, and remove_watchpoint to remove_point.
8295
8296 * linux-low.h (struct linux_target_ops): Likewise.
8297 * linux-low.c (linux_insert_watchpoint): Rename to ...
8298 (linux_insert_point): ... this. Adjust.
8299 (linux_remove_watchpoint): Rename to ...
8300 (linux_remove_point): ... this. Adjust.
8301 (linux_target_ops): Adjust.
8302 * linux-crisv32-low.c (cris_insert_watchpoint): Rename to ...
8303 (cris_insert_point): ... this.
8304 (cris_remove_watchpoint): Rename to ...
8305 (cris_remove_point): ... this.
8306 (the_low_target): Adjust.
8307
0f54c268
PM
83082009-06-24 Pierre Muller <muller@ics.u-strasbg.fr>
8309
8310 * server.c (handle_v_kill): Pass signal_pid to
8311 kill_inferior if multi_process is zero.
8312
c6314022
AR
83132009-06-23 Aleksandar Ristovski <aristovski@qnx.com>
8314
8315 * server.c (process_serial_event): Add support for Z0 and Z1 packet.
8316 * target.h (target_ops): Comment for *_watchpoint to make it clear
8317 the functions can get types '0' and '1'.
8318
4463ce24
AR
83192009-06-22 Aleksandar Ristovski <aristovski@qnx.com>
8320
8321 * linux-low.c (usr_fetch_inferior_registers): Remove check for regno 0.
8322 * proc-service.c (ps_lgetregs): Pass -1 to fetch all registers.
8323 * regcache.c (get_regcache): Likewise.
8324 * spu-low.c (spu_fetch_registers): Remove 0 to -1 conversion.
8325 * win32-low.c (child_fetch_inferior_registers): Remove check for
8326 regno 0.
8327
cf8fd78b
PA
83282009-06-19 Aleksandar Ristovski <aristovski@qnx.com>
8329 Pedro Alves <pedro@codesourcery.com>
8330
8331 * target.h (struct target_ops) <supports_multi_process>: New
8332 callback.
8333 (target_supports_multi_process): New.
8334 * server.c (handle_query): Even if GDB reports support, only
8335 enable multi-process if the target also supports it. Report
8336 multi-process support only if the target backend supports it.
8337 * linux-low.c (linux_supports_multi_process): New function.
8338 (linux_target_ops): Install it as target_supports_multi_process
8339 callback.
8340
47c0c975
DE
83412009-05-24 Doug Evans <dje@google.com>
8342
e09875d4
DE
8343 Global renaming of find_thread_pid to find_thread_ptid.
8344 * server.h (find_thread_ptid): Renamed from find_thread_pid.
8345 * inferiors.c (find_thread_ptid): Renamed from find_thread_pid.
8346 All callers updated.
8347
e27d73f6
DE
8348 * linux-low.c (handle_extended_wait): Use linux_resume_one_lwp
8349 to resume the newly created thread, don't call ptrace (PTRACE_CONT)
8350 directly.
8351
47c0c975
DE
8352 * linux-low.c (get_stop_pc): Print pc if debug_threads.
8353 (check_removed_breakpoint, linux_wait_for_lwp): Ditto.
8354 (linux_resume_one_lwp): Ditto.
8355
2acc282a
DE
83562009-05-23 Doug Evans <dje@google.com>
8357
8358 * linux-low.c (linux_resume_one_lwp): Change type of first arg
8359 from struct inferior_list_entry * to struct lwp_info *.
8360 All callers updated.
8361
9f1036c1
DE
83622009-05-13 Doug Evans <dje@google.com>
8363
8364 * linux-x86-low.c: Don't include assert.h.
8365 (x86_siginfo_fixup): Use fatal, not assert.
8366 (x86_arch_setup): Fix comment.
8367
d0722149
DE
83682009-05-12 Doug Evans <dje@google.com>
8369
8370 Biarch support for i386/amd64 gdbserver.
8371 * Makefile.in (SFILES): Remove linux-i386-low.c, linux-x86-64-low.c.
8372 Add linux-x86-low.c.
8373 (linux-i386-low.o, linux-x86-64-low.o): Delete.
8374 (linux-x86-low.o): Add.
8375 * linux-x86-64-low.c: Delete.
8376 * linux-i386-low.c: Delete.
8377 * linux-x86-low.c: New file.
8378 * configure.srv (i?86-linux srv_tgtobj): Replace linux-i386-low.o with
8379 linux-x86-low.o.
8380 (x86_64-linux srv_tgtobj): Replace linux-x86-64-low.o with
8381 linux-x86-low.o.
8382 (x86_64-linux srv_regobj): Add reg-i386-linux.o.
8383 * linux-low.c: Include ansidecl.h, elf/common.h, elf/external.h.
8384 (linux_child_pid_to_exec_file): New function.
8385 (elf_64_header_p, elf_64_file_p): New functions.
8386 (siginfo_fixup): New function.
8387 (linux_xfer_siginfo): New local inf_siginfo. Call siginfo_fixup to
8388 give target a chance to convert layout.
8389 * linux-low.h (linux_target_ops): New member siginfo_fixup.
8390 (linux_child_pid_to_exec_file, elf_64_file_p): Declare.
8391
fdeb2a12
DE
83922009-05-07 Doug Evans <dje@google.com>
8393
8394 * linux-low.c (regsets_fetch_inferior_registers): Fix memory leak.
8395 (regsets_store_inferior_registers): Ditto.
8396
a6dbe5df
PA
83972009-05-06 Pedro Alves <pedro@codesourcery.com>
8398
8399 PR server/10048
8400
8401 * linux-low.c (must_set_ptrace_flags): Delete.
8402 (linux_create_inferior): Set `lwp->must_set_ptrace_flags' instead
8403 of the global.
8404 (linux_attach_lwp_1): Don't set PTRACE_SETOPTIONS here. Set
8405 `lwp->must_set_ptrace_flags' instead.
ba42693b 8406 (linux_wait_for_event_1): Set ptrace options here.
a6dbe5df
PA
8407 (linux_wait_1): ... not here.
8408
5091eb23
DE
84092009-04-30 Doug Evans <dje@google.com>
8410
9f767825
DE
8411 * inferiors.c (started_inferior_callback): New function.
8412 (attached_inferior_callback): New function.
8413 (have_started_inferiors_p, have_attached_inferiors_p): New functions.
8414 * server.c (print_started_pid, print_attached_pid): New functions.
8415 (detach_or_kill_for_exit): New function.
8416 (main): Call it instead of for_each_inferior (kill_inferior_callback).
8417 * server.h (have_started_inferiors_p): Declare.
8418 (have_attached_inferiors_p): Declare.
8419
5091eb23
DE
8420 * inferiors.c (remove_process): Fix memory leak, free process.
8421 * linux-low.c (linux_remove_process): New function.
8422 (linux_kill): Call it instead of remove_process.
8423 (linux_detach, linux_wait_1): Ditto.
8424
155c8968
PA
84252009-04-19 Danny Backx <dannybackx@users.sourceforge.net>
8426
8427 * configure.srv: Add x86 Windows CE target.
8428
7fe519cb
UW
84292009-04-03 Ulrich Weigand <uweigand@de.ibm.com>
8430
8431 * inferiors.c (get_thread_process): Make global.
8432 * server.h (get_thread_process): Add prototype.
8433 * thread-db.c (find_one_thread): Use get_thread_process
8434 instead of current_process.
8435 (thread_db_get_tls_address): Do not crash if called when
8436 thread layer is not yet initialized.
8437
5472f405
UW
84382009-04-03 Ulrich Weigand <uweigand@de.ibm.com>
8439
8440 * remote-utils.c (prepare_resume_reply): Null-terminate packet.
8441 * spu-low.c (current_tid): Rename to ...
8442 (current_ptid): ... this.
8443 (fetch_ppc_register, fetch_ppc_memory, store_ppc_memory,
8444 spu_proc_xfer_spu, spu_resume, spu_request_interrupt): Use
8445 ptid_get_lwp (current_ptid) instead of current_tid.
8446 (spu_kill, spu_detach, spu_join, spu_wait): Use pid argument
8447 instead of current_tid. Use find_process_pid to verify pid
8448 argument is valid. Pass proper argument to remove_process.
8449 (spu_thread_alive): Compare current_ptid instead of current_tid.
8450 (spu_resume): Likewise.
8451
55ac2b99
PA
84522009-04-02 Pedro Alves <pedro@codesourcery.com>
8453
8454 * linux-low.c (usr_store_inferior_registers): Declare local `pid'
8455 variable.
8456
95954743
PA
84572009-04-01 Pedro Alves <pedro@codesourcery.com>
8458
8459 Implement the multiprocess extensions, and add linux multiprocess
8460 support.
8461
8462 * server.h (ULONGEST): Declare.
8463 (struct ptid, ptid_t): New.
8464 (minus_one_ptid, null_ptid): Declare.
8465 (ptid_build, pid_to_ptid, ptid_get_pid, ptid_get_lwp)
8466 (ptid_get_tid, ptid_equal, ptid_is_pid): Declare.
8467 (struct inferior_list_entry): Change `id' type from unsigned from
8468 to ptid_t.
8469 (struct sym_cache, struct breakpoint, struct
8470 process_info_private): Forward declare.
8471 (struct process_info): Declare.
8472 (current_process): Declare.
8473 (all_processes): Declare.
8474 (initialize_inferiors): Declare.
8475 (add_thread): Adjust to use ptid_t.
8476 (thread_id_to_gdb_id, thread_to_gdb_id, gdb_id_to_thread_id): Ditto.
8477 (add_process, remove_process, find_thread_pid): Declare.
8478 (find_inferior_id): Adjust to use ptid_t.
8479 (cont_thread, general_thread, step_thread): Change type to ptid_t.
8480 (multi_process): Declare.
8481 (push_event): Adjust to use ptid_t.
8482 (read_ptid, write_ptid): Declare.
8483 (prepare_resume_reply): Adjust to use ptid_t.
8484 (clear_symbol_cache): Declare.
8485 * inferiors.c (all_processes): New.
8486 (null_ptid, minus_one_ptid): New.
8487 (ptid_build, pid_to_ptid, ptid_get_pid, ptid_get_lwp)
8488 (ptid_get_tid, ptid_equal, ptid_is_pid): New.
8489 (add_thread): Change unsigned long to ptid. Remove gdb_id
8490 parameter. Adjust.
8491 (thread_id_to_gdb_id, thread_to_gdb_id): Change unsigned long to ptid.
8492 (gdb_id_to_thread): Rename to ...
8493 (find_thread_pid): ... this. Change unsigned long to ptid.
8494 (gdb_id_to_thread_id, find_inferior_id): Change unsigned long to ptid.
8495 (loaded_dll, pull_pid_from_list): Adjust.
8496 (add_process, remove_process, find_process_pid)
8497 (get_thread_process, current_process, initialize_inferiors): New.
8498 * target.h (struct thread_resume) <thread>: Change type to ptid_t.
8499 (struct target_waitstatus) <related_pid>: Ditto.
8500 (struct target_ops) <kill, detach>: Add `pid' argument. Change
8501 return type to int.
8502 (struct target_ops) <join>: Add `pid' argument.
8503 (struct target_ops) <thread_alive>: Change pid's type to ptid_t.
8504 (struct target_ops) <wait>: Add `ptid' field. Change return type
8505 to ptid.
8506 (kill_inferior, detach_inferior, join_inferior): Add `pid' argument.
8507 (mywait): Add `ptid' argument. Change return type to ptid_t.
8508 (target_pid_to_str): Declare.
8509 * target.c (set_desired_inferior): Adjust to use ptids.
8510 (mywait): Add new `ptid' argument. Adjust.
8511 (target_pid_to_str): New.
8512 * mem-break.h (free_all_breakpoints): Declare.
8513 * mem-break.c (breakpoints): Delelete.
8514 (set_breakpoint_at, delete_breakpoint, find_breakpoint_at)
8515 (check_mem_read, check_mem_write, delete_all_breakpoints): Adjust
8516 to use per-process breakpoint list.
8517 (free_all_breakpoints): New.
8518 * remote-utils.c (struct sym_cache) <name>: Drop `const'.
8519 (symbol_cache, all_symbols_looked_up): Delete.
8520 (hexchars): New.
8521 (ishex, unpack_varlen_hex, write_ptid, hex_or_minus_one,
8522 read_ptid): New.
8523 (prepare_resume_reply): Change ptid argument's type from unsigned
8524 long to ptid_t. Adjust. Implement W;process and X;process.
8525 (free_sym_cache, clear_symbol_cache): New.
8526 (look_up_one_symbol): Adjust to per-process symbol cache. *
8527 * server.c (cont_thread, general_thread, step_thread): Change type
8528 to ptid_t.
8529 (attached): Delete.
8530 (multi_process): New.
8531 (last_ptid): Change type to ptid_t.
8532 (struct vstop_notif) <ptid>: Change type to ptid_t.
8533 (queue_stop_reply, push_event): Change `ptid' argument's type to
8534 ptid_t.
8535 (discard_queued_stop_replies): Add `pid' argument.
8536 (start_inferior): Adjust to use ptids. Adjust to mywait interface
8537 changes. Don't reference the `attached' global.
8538 (attach_inferior): Adjust to mywait interface changes.
8539 (handle_query): Adjust to use ptids. Parse GDB's qSupported
8540 features. Handle and report "multiprocess+". Handle
8541 "qAttached:PID".
8542 (handle_v_cont): Adjust to use ptids. Adjust to mywait interface
8543 changes.
8544 (handle_v_kill): New.
8545 (handle_v_stopped): Adjust to use target_pid_to_str.
8546 (handle_v_requests): Allow multiple attaches and runs when
8547 multiprocess extensions are in effect. Handle "vKill".
8548 (myresume): Adjust to use ptids.
8549 (queue_stop_reply_callback): Add `arg' parameter. Handle it.
8550 (handle_status): Adjust to discard_queued_stop_replies interface
8551 change.
8552 (first_thread_of, kill_inferior_callback)
8553 (detach_or_kill_inferior_callback, join_inferiors_callback): New.
8554 (main): Call initialize_inferiors. Adjust to use ptids, killing
8555 and detaching from all inferiors. Handle multiprocess packet
8556 variants.
8557 * linux-low.h: Include gdb_proc_service.h.
8558 (struct process_info_private): New.
8559 (struct linux_target_ops) <pid_of>: Use ptid_get_pid.
8560 <lwpid_of>: Use ptid_get_lwp.
8561 (get_lwp_thread): Adjust.
8562 (struct lwp_info): Add `dead' member.
8563 (find_lwp_pid): Declare.
8564 * linux-low.c (thread_db_active): Delete.
8565 (new_inferior): Adjust comment.
8566 (inferior_pid): Delete.
8567 (linux_add_process): New.
8568 (handle_extended_wait): Adjust.
8569 (add_lwp): Change unsigned long to ptid.
8570 (linux_create_inferior): Add process to processes table. Adjust
8571 to use ptids. Don't set new_inferior here.
8572 (linux_attach_lwp): Rename to ...
8573 (linux_attach_lwp_1): ... this. Add `initial' argument. Handle
8574 it. Adjust to use ptids.
8575 (linux_attach_lwp): New.
8576 (linux_attach): Add process to processes table. Don't set
8577 new_inferior here.
8578 (struct counter): New.
8579 (second_thread_of_pid_p, last_thread_of_process_p): New.
8580 (linux_kill_one_lwp): Add `args' parameter. Handle it. Adjust to
8581 multiple processes.
8582 (linux_kill): Add `pid' argument. Handle it. Adjust to multiple
8583 processes. Remove process from process table.
8584 (linux_detach_one_lwp): Add `args' parameter. Handle it. Adjust
8585 to multiple processes.
8586 (any_thread_of): New.
8587 (linux_detach): Add `pid' argument, and handle it. Remove process
8588 from processes table.
8589 (linux_join): Add `pid' argument. Handle it.
8590 (linux_thread_alive): Change unsighed long argument to ptid_t.
8591 Consider dead lwps as not being alive.
8592 (status_pending_p): Rename `dummy' argument to `arg'. Filter out
8593 threads we're not interested in.
8594 (same_lwp, find_lwp_pid): New.
8595 (linux_wait_for_lwp): Change `pid' argument's type from int to
8596 ptid_t. Adjust.
8597 (linux_wait_for_event): Rename to ...
8598 (linux_wait_for_event_1): ... this. Change `pid' argument's type
8599 from int to ptid_t. Adjust.
8600 (linux_wait_for_event): New.
8601 (linux_wait_1): Add `ptid' argument. Change return type to
8602 ptid_t. Adjust. Use last_thread_of_process_p. Remove processes
8603 that exit from the process table.
8604 (linux_wait): Add `ptid' argument. Change return type to ptid_t.
8605 Adjust.
8606 (mark_lwp_dead): New.
8607 (wait_for_sigstop): Adjust to use ptids. If a process exits while
8608 stopping all threads, mark its main lwp as dead.
8609 (linux_set_resume_request, linux_resume_one_thread): Adjust to use
8610 ptids.
8611 (fetch_register, usr_store_inferior_registers)
8612 (regsets_fetch_inferior_registers)
8613 (regsets_store_inferior_registers, linux_read_memory)
8614 (linux_write_memory): Inline `inferior_pid'.
8615 (linux_look_up_symbols): Adjust to use per-process
8616 `thread_db_active'.
8617 (linux_request_interrupt): Adjust to use ptids.
8618 (linux_read_auxv): Inline `inferior_pid'.
8619 (initialize_low): Don't reference thread_db_active.
8620 * gdb_proc_service.h (struct ps_prochandle) <pid>: Remove.
8621 * proc-service.c (ps_lgetregs): Use find_lwp_pid.
8622 (ps_getpid): Return the pid of the current inferior.
8623 * thread-db.c (proc_handle, thread_agent): Delete.
8624 (thread_db_create_event, thread_db_enable_reporting): Adjust to
8625 per-process data.
8626 (find_one_thread): Change argument type to ptid_t. Adjust to
8627 per-process data.
8628 (maybe_attach_thread): Adjust to per-process data and ptids.
8629 (thread_db_find_new_threads): Ditto.
8630 (thread_db_init): Ditto.
8631 * spu-low.c (spu_create_inferior, spu_attach): Add process to
8632 processes table. Adjust to use ptids.
8633 (spu_kill, spu_detach): Adjust interface. Remove process from
8634 processes table.
8635 (spu_join, spu_thread_alive): Adjust interface.
8636 (spu_wait): Adjust interface. Remove process from processes
8637 table. Adjust to use ptids.
8638 * win32-low.c (current_inferior_tid): Delete.
8639 (current_inferior_ptid): New.
8640 (debug_event_ptid): New.
8641 (thread_rec): Take a ptid. Adjust.
8642 (child_add_thread): Add `pid' argument. Adjust to use ptids.
8643 (child_delete_thread): Ditto.
8644 (do_initial_child_stuff): Add `attached' argument. Add process to
8645 processes table.
8646 (child_fetch_inferior_registers, child_store_inferior_registers):
8647 Adjust.
8648 (win32_create_inferior): Pass 0 to do_initial_child_stuff.
8649 (win32_attach): Pass 1 to do_initial_child_stuff.
8650 (win32_kill): Adjust interface. Remove process from processes
8651 table.
8652 (win32_detach): Ditto.
8653 (win32_join): Adjust interface.
8654 (win32_thread_alive): Take a ptid.
8655 (win32_resume): Adjust to use ptids.
8656 (get_child_debug_event): Ditto.
8657 (win32_wait): Adjust interface. Remove exiting process from
8658 processes table.
8659
bd99dc85
PA
86602009-04-01 Pedro Alves <pedro@codesourcery.com>
8661
8662 Non-stop mode support.
8663
8664 * server.h (non_stop): Declare.
8665 (gdb_client_data, handler_func): Declare.
8666 (delete_file_handler, add_file_handler, start_event_loop):
8667 Declare.
8668 (handle_serial_event, handle_target_event, push_event)
8669 (putpkt_notif): Declare.
8670 * target.h (enum resume_kind): New.
8671 (struct thread_resume): Replace `step' field by `kind' field.
8672 (TARGET_WNOHANG): Define.
8673 (struct target_ops) <wait>: Add `options' argument.
8674 <supports_non_stop, async, start_non_stop>: New fields.
8675 (target_supports_non_stop, target_async): New.
8676 (start_non_stop): Declare.
8677 (mywait): Add `options' argument.
8678 * target.c (mywait): Add `options' argument. Print child exit
8679 notifications here.
8680 (start_non_stop): New.
8681 * server.c (non_stop, own_buf, mem_buf): New globals.
8682 (struct vstop_notif): New.
8683 (notif_queue): New global.
8684 (queue_stop_reply, push_event, discard_queued_stop_replies)
8685 (send_next_stop_reply): New.
8686 (start_inferior): Adjust to use resume_kind. Adjust to mywait
8687 interface changes.
8688 (attach_inferior): In non-stop mode, don't wait for the target
8689 here.
8690 (handle_general_set): Handle QNonStop.
8691 (handle_query): When handling qC, return the current general
8692 thread, instead of the first thread of the list.
8693 (handle_query): If the backend supports non-stop mode, include
8694 QNonStop+ in the qSupported query response.
8695 (handle_v_cont): Adjust to use resume_kind. Handle resume_stop
8696 and non-stop mode.
8697 (handle_v_attach, handle_v_run): Handle non-stop mode.
8698 (handle_v_stopped): New.
8699 (handle_v_requests): Report support for vCont;t. Handle vStopped.
8700 (myresume): Adjust to use resume_kind. Handle non-stop.
8701 (queue_stop_reply_callback): New.
8702 (handle_status): Handle non-stop mode.
8703 (main): Clear non_stop flag on reconnection. Use the event-loop.
8704 Refactor serial protocol handling from here ...
8705 (process_serial_event): ... to this new function. When GDB
8706 selects any thread, select one here. In non-stop mode, wait until
8707 GDB acks all pending events before exiting.
8708 (handle_serial_event, handle_target_event): New.
8709 * remote-utils.c (remote_open): Install remote_desc in the event
8710 loop.
8711 (remote_close): Remove remote_desc from the event loop.
8712 (putpkt_binary): Rename to...
8713 (putpkt_binary_1): ... this. Add `is_notic' argument. Handle it.
8714 (putpkt_binary): New as wrapper around putpkt_binary_1.
8715 (putpkt_notif): New.
8716 (prepare_resume_reply): In non-stop mode, don't change the
8717 general_thread.
8718 * event-loop.c: New.
8719 * Makefile.in (OBJ): Add event-loop.o.
8720 (event-loop.o): New rule.
8721
8722 * linux-low.h (pid_of): Moved here.
8723 (lwpid_of): New.
8724 (get_lwp_thread): Use lwpid_of.
8725 (struct lwp_info): Delete `lwpid' field. Add `suspended' field.
8726 * linux-low.c (pid_of): Delete.
8727 (inferior_pid): Use lwpid_of.
8728 (linux_event_pipe): New.
8729 (target_is_async_p): New.
8730 (delete_lwp): New.
8731 (handle_extended_wait): Use lwpid_of.
8732 (add_lwp): Don't set lwpid field.
8733 (linux_attach_lwp): Adjust debug output. Use lwpid_of.
8734 (linux_kill_one_lwp): If killing a running lwp, stop it first.
8735 Use lwpid_of. Adjust to linux_wait_for_event interface changes.
8736 (linux_detach_one_lwp): If detaching from a running lwp, stop it
8737 first. Adjust to linux_wait_for_event interface changes. Use
8738 lwpid_of.
8739 (linux_detach): Don't delete the main lwp here.
8740 (linux_join): Use my_waitpid. Avoid signal_pid. Use lwpid_of.
8741 (status_pending_p): Don't consider explicitly suspended lwps.
8742 (linux_wait_for_lwp): Take an integer pid instead of a lwp_info
8743 pointer. Add OPTIONS argument. Change return type to int. Use
8744 my_waitpid instead of sleeping. Handle WNOHANG. Use lwpid_of.
8745 (linux_wait_for_event): Take an integer pid instead of a lwp_info
8746 pointer. Add status pointer argument. Return a pid instead of a
8747 status. Use lwpid_of. Adjust to linux_wait_for_lwp interface
8748 changes. In non-stop mode, don't switch to a random thread.
8749 (linux_wait): Rename to...
8750 (linux_wait_1): ... this. Add target_options argument, and handle
8751 it. Adjust to use resume_kind. Use lwpid_of. In non-stop mode,
8752 don't handle the continue thread. Handle TARGET_WNOHANG. Merge
8753 clean exit and signal exit code. Don't stop all threads in
8754 non-stop mode. In all-stop mode, only stop all threads when
8755 reporting a stop to GDB. Handle explicit thread stop requests.
8756 (async_file_flush, async_file_mark): New.
8757 (linux_wait): New.
8758 (send_sigstop): Use lwpid_of.
8759 (wait_for_sigstop): Use lwpid_of. Adjust to linux_wait_for_event
8760 interface changes. In non-stop mode, don't switch to a random
8761 thread.
8762 (linux_resume_one_lwp): Use lwpid_of.
8763 (linux_continue_one_thread, linux_queue_one_thread): Merge into ...
8764 (linux_resume_one_thread): ... this. Handle resume_stop. In
8765 non-stop mode, don't look for pending flag in all threads.
8766 (resume_status_pending_p): Don't consider explicitly suspended
8767 threads.
8768 (my_waitpid): Reimplement. Emulate __WALL.
8769 (linux_request_interrupt, linux_read_offsets, linux_xfer_siginfo):
8770 Use lwpid_of.
8771 (sigchld_handler, linux_supports_non_stop, linux_async)
8772 (linux_start_non_stop): New.
8773 (linux_target_ops): Register linux_supports_non_stop, linux_async
8774 and linux_start_non_stop.
8775 (initialize_low): Install SIGCHLD handler.
8776 * thread-db.c (thread_db_create_event, find_one_thread)
8777 (thread_db_get_tls_address): Use lwpid_of.
8778 * win32-low.c (win32_detach): Adjust to use resume_kind.
8779 (win32_wait): Add `options' argument.
8780 * spu-low.c (spu_resume): Adjust to use resume_kind.
8781 (spu_wait): Add `options' argument.
8782
5b1c542e
PA
87832009-04-01 Pedro Alves <pedro@codesourcery.com>
8784
8785 Decouple target code from remote protocol.
8786
8787 * target.h (enum target_waitkind): New.
8788 (struct target_waitstatus): New.
8789 (struct target_ops) <wait>: Return an unsigned long. Take a
8790 target_waitstatus pointer instead of a char pointer.
8791 (mywait): Likewise.
8792 * target.c (mywait): Change prototype to return an unsigned long.
8793 Take a target_waitstatus pointer instead of a char pointer. Adjust.
8794 * server.h (thread_from_wait, old_thread_from_wait): Delete
8795 declarations.
8796 (prepare_resume_reply): Change prototype to take a
8797 target_waitstatus.
8798 * server.c (thread_from_wait, old_thread_from_wait): Delete.
8799 (last_status, last_ptid): New.
8800 (start_inferior): Remove "statusptr" argument. Adjust. Return a
8801 pid instead of a signal.
8802 (attach_inferior): Remove "status" and "signal" parameters.
8803 Adjust.
8804 (handle_query): For qGetTLSAddr, parse the thread id with strtol,
8805 not as an address.
8806 (handle_v_cont, handle_v_attach, handle_v_run, handle_v_kill)
8807 (handle_v_requests, myresume): Remove "status" and "signal"
8808 parameters. Adjust.
8809 (handle_status): New.
8810 (main): Delete local `status'. Adjust.
8811 * remote-utils.c: Include target.h.
8812 (prepare_resume_reply): Change prototype to take a
8813 target_waitstatus. Adjust.
8814
8815 * linux-low.c (linux_wait): Adjust to new target_ops->wait
8816 interface.
8817 * spu-low.c (spu_wait): Adjust.
8818 * win32-low.c (enum target_waitkind, struct target_waitstatus):
8819 Delete.
8820 (win32_wait): Adjust.
8821
2bd7c093
PA
88222009-04-01 Pedro Alves <pedro@codesourcery.com>
8823
8824 * target.h (struct thread_resume): Delete leave_stopped member.
8825 (struct target_ops): Add a `n' argument to the `resume' callback.
8826 * server.c (start_inferior): Adjust.
8827 (handle_v_cont, myresume): Adjust.
8828 * linux-low.c (check_removed_breakpoint): Adjust to resume
8829 interface change, and to removed leave_stopped field.
8830 (resume_ptr): Delete.
8831 (struct thread_resume_array): New.
8832 (linux_set_resume_request): Add new `arg' parameter. Adjust to
8833 resume interface change.
8834 (linux_continue_one_thread, linux_queue_one_thread)
8835 (resume_status_pending_p): Check if the resume field is NULL
8836 instead of checking the leave_stopped member.
8837 (linux_resume): Adjust to the target resume interface change.
8838 * spu-low.c (spu_resume): Adjust to the target resume interface
8839 change.
8840 * win32-low.c (win32_detach, win32_resume): Ditto.
8841
c35fafde
PA
88422009-04-01 Pedro Alves <pedro@codesourcery.com>
8843
8844 * linux-low.c (linux_wait_for_event): Don't clear the `stepping'
8845 flag.
8846 (wait_for_sigstop): Don't leave a finished single-step SIGTRAP
8847 pending.
8848 (linux_continue_one_thread): Only preserve the stepping flag if
8849 there's a pending breakpoint.
8850
0a59d50b
PA
88512009-03-31 Pedro Alves <pedro@codesourcery.com>
8852
8853 * server.c (main): After the inferior having exited, call
8854 remote_close before exiting gdbserver.
8855
f04c6d38
TJB
88562009-03-25 Thiago Jung Bauermann <bauerman@br.ibm.com>
8857
8858 Fix size of FPSCR in Power 7 processors.
8859 * linux-ppc-low.c (PPC_FEATURE_ARCH_2_05): Remove #define.
8860 (PPC_FEATURE_HAS_DFP): New #define.
8861 (ppc_arch_setup): Check for DFP feature instead of ISA 2.05 to decide on
8862 size of the FPSCR.
8863
78e5cee6
PA
88642009-03-23 Pedro Alves <pedro@codesourcery.com>
8865
8866 * server.c (handle_query) Whitespace and formatting.
8867
1b3f6016
PA
88682009-03-22 Pedro Alves <pedro@codesourcery.com>
8869
8870 * i387-fp.c, linux-arm-low.c, linux-cris-low.c,
8871 linux-crisv32-low.c, linux-i386-low.c, linux-low.c,
8872 linux-mips-low.c, linux-s390-low.c, linux-sparc-low.c,
8873 linux-x86-64-low.c, linux-xtensa-low.c, proc-service.c,
8874 regcache.c, remote-utils.c, server.c, spu-low.c, target.h,
8875 thread-db.c, win32-low.c, xtensa-xtregs.c, gdbreplay.c,
8876 Makefile.in, configure.ac: Fix whitespace throughout.
8877 * configure: Regenerate.
8878
a07b2135
PA
88792009-03-22 Pedro Alves <pedro@codesourcery.com>
8880
8881 * inferiors.c (find_inferior): Make it safe for the callback
8882 function to delete the currently iterated inferior.
8883
67cc2626
PA
88842009-03-22 Pedro Alves <pedro@codesourcery.com>
8885
8886 * Makefile.in (linuw_low_h): Move higher.
8887 (thread-db.o): Depend on $(linux_low_h).
8888
54a0b537
PA
88892009-03-17 Pedro Alves <pedro@codesourcery.com>
8890
8891 Rename "process" to "lwp" throughout.
8892
8893 * linux-low.c (all_processes): Rename to...
8894 (all_lwps): ... this.
8895 (inferior_pid, handle_extended_wait, get_stop_pc): Adjust.
8896 (add_process): Rename to ...
8897 (add_lwp): ... this. Adjust.
8898 (linux_create_inferior): Adjust.
8899 (linux_attach_lwp): Adjust.
8900 (linux_attach): Adjust.
8901 (linux_kill_one_process): Rename to ...
8902 (linux_kill_one_lwp): ... this. Adjust.
8903 (linux_kill): Adjust.
8904 (linux_detach_one_process): Rename to ...
8905 (linux_detach_one_lwp): ... this. Adjust.
8906 (linux_detach): Adjust.
8907 (check_removed_breakpoint): Adjust.
8908 (status_pending_p): Adjust.
8909 (linux_wait_for_process): Rename to ...
8910 (linux_wait_for_lwp): ... this. Adjust.
8911 (linux_wait_for_event): Adjust.
8912 (send_sigstop): Adjust.
8913 (wait_for_sigstop): Adjust.
8914 (stop_all_processes): Rename to ...
8915 (stop_all_lwps): ... this.
8916 (linux_resume_one_process): Rename to ...
8917 (linux_resume_one_lwp): ... this. Adjust.
8918 (linux_set_resume_request, linux_continue_one_thread)
8919 (linux_queue_one_thread, resume_status_pending_p)
8920 (usr_store_inferior_registers, regsets_store_inferior_registers)
8921 (linux_request_interrupt, linux_read_offsets, linux_xfer_siginfo):
8922 Adjust.
8923 * linux-low.h (get_process): Rename to ...
8924 (get_lwp): ... this. Adjust.
8925 (get_thread_process): Rename to ...
8926 (get_thread_lwp): ... this. Adjust.
8927 (get_process_thread): Rename to ...
8928 (get_lwp_thread): ... this. Adjust.
8929 (struct process_info): Rename to ...
8930 (struct lwp_info): ... this.
8931 (all_processes): Rename to ...
8932 (all_lwps): ... this.
8933 * proc-service.c (ps_lgetregs): Adjust.
8934 * thread-db.c (thread_db_create_event, find_one_thread)
8935 (maybe_attach_thread, thread_db_get_tls_address): Adjust.
8936
0b16c5cf
PA
89372009-03-14 Pedro Alves <pedro@codesourcery.com>
8938
8939 * server.c (handle_query): Handle "qAttached".
8940
32de4b9d
NS
89412009-03-13 Nathan Sidwell <nathan@codesourcery.com>
8942
8943 * Makefile.in, hostio-errno.c, errno.c, xtensa-xtregs.c: Change to
8944 GPLv3, update license URL.
8945
2aecd87f
DE
89462009-03-01 Doug Evans <dje@google.com>
8947
93efd302 8948 * Makefile.in (INCLUDE_CFLAGS): Add -I$(srcdir)/../common.
2aecd87f
DE
8949 (server_h): Add gdb_signals.h.
8950 (signals.o): Update.
8951 * server.h (target_signal_from_host,target_signal_to_host_p)
8952 (target_signal_to_host,target_signal_to_name): Moved to gdb_signals.h.
8953
86b1f9c5
PM
89542009-02-14 Pierre Muller <muller@ics.u-strasbg.fr>
8955
8956 * remote-utils.c (getpkt): Also generate remote-debug
8957 information if noack_mode is set.
8958
4aa995e1
PA
89592009-02-06 Pedro Alves <pedro@codesourcery.com>
8960
8961 * server.c (handle_query): Report qXfer:siginfo:read and
8962 qXfer:siginfo:write as supported and handle them.
8963 * target.h (struct target_ops) <qxfer_siginfo>: New field.
8964 * linux-low.c (linux_xfer_siginfo): New.
8965 (linux_target_ops): Set it.
8966
62709adf
PA
89672009-01-26 Pedro Alves <pedro@codesourcery.com>
8968
8969 * server.c (gdbserver_usage): Mention --remote-debug.
8970 (main): Accept '--remote-debug' switch.
8971
aef93bd7
DE
89722009-01-18 Doug Evans <dje@google.com>
8973
8974 * regcache.c (new_register_cache): No need to check result of xcalloc.
8975 * server.c (handle_search_memory): Back out calls to xmalloc,
8976 result is checked and error is returned to user upon failure.
8977 (handle_query): Ditto. Add more checks for result of malloc.
8978 (handle_v_cont): Check result of malloc, report error back to
8979 user upon failure.
8980 (handle_v_run): Ditto. Call freeargv.
8981 * server.h (freeargv): Declare.
8982 * utils.c (freeargv): New fn.
8983
54363045
DE
89842009-01-15 Doug Evans <dje@google.com>
8985
f626972c
DE
8986 * gdbreplay.c (perror_with_name): Make arg const char *.
8987 * server.h (target_signal_to_name): Make return type const char *.
0842e787 8988 * thread-db.c (thread_db_err_str): Make return type const char *.
f626972c 8989 * utils.c (perror_with_name): Make arg const char *.
54363045 8990
18aae699
PA
89912009-01-14 Pedro Alves <pedro@codesourcery.com>
8992
8993 * win32-low.c (get_child_debug_event): Issue a final DBG_CONTINUE
8994 when handling a EXIT_PROCESS_DEBUG_EVENT.
8995
ff703abe
JB
89962009-01-06 Joel Brobecker <brobecker@adacore.com>
8997
8998 * gdbreplay.c (gdbreplay_version): Update copyright year.
8999 * server.c (gdbserver_version): Likewise.
9000
f21cc1a2 90012009-01-05 Doug Evans <dje@google.com>
0e21c1ec
DE
9002
9003 * linux-low.c (linux_attach_lwp): Add some comments/fixmes.
f21cc1a2 9004 (handle_extended_wait): Improve comment.
0e21c1ec 9005
bca929d3
DE
90062008-12-13 Doug Evans <dje@google.com>
9007
9008 * utils.c (xmalloc,xcalloc,xstrdup): New fns.
9009 * server.h (ATTR_MALLOC): New macro.
9010 (xmalloc,xcalloc,xstrdup): Declare.
9011 * hostio.c: Replace malloc,calloc,strdup with xmalloc,xcalloc,xstrdup.
9012 * inferiors.c: Ditto.
9013 * linux-low.c: Ditto.
9014 * mem-break.c: Ditto.
9015 * regcache.c: Ditto.
9016 * remote-utils.c: Ditto.
9017 * server.c: Ditto.
9018 * target.c: Ditto.
9019 * win32-low.c: Ditto.
9020
97438e3f
DE
90212008-12-12 Doug Evans <dje@google.com>
9022
896c7fbb
DE
9023 * linux-low.c (linux_wait_for_process): Don't clobber current_inferior
9024 in debugging printf.
9025
97438e3f
DE
9026 * linux-low.c (handle_extended_wait): Simplify, use my_waitpid.
9027
e3b886f8
DE
90282008-12-09 Doug Evans <dje@google.com>
9029
9030 * linux-low.h (struct process_info): Delete member tid, unused.
9031 * thread-db.c (find_one_thread): Update.
9032 (maybe_attach_thread): Update.
9033
07e059b5
VP
90342008-12-02 Pedro Alves <pedro@codesourcery.com>
9035
889bf7c5
PA
9036 * target.h (struct target_ops): Add qxfer_osdata member.
9037 * linux-low.c: Include ctype.h and pwd.h and sys/types.h
9038 and dirent.h.
9039 (linux_qxfer_osdata): New functions.
9040 (linux_target_ops): Register linux_qxfer_osdata as qxfer_osdata
9041 callback.
9042 * server.c (handle_query): Handle "qXfer:osdata:read:".
9043 * remote-utils.c (buffer_grow, buffer_free, buffer_init, buffer_finish)
9044 (buffer_xml_printf): New functions.
9045 * server.h (struct buffer): New.
9046 (buffer_grow_str, buffer_grow_str0): New macros.
9047 (buffer_grow, buffer_free, buffer_init, buffer_finish)
9048 (buffer_xml_printf): Declare.
07e059b5 9049
4cab47ab
DE
90502008-11-24 Doug Evans <dje@google.com>
9051
9052 * Makefile.in (VERSION,DIST,LINT,LINTFLAGS): Delete, unused.
9053
f142445f
DJ
90542008-11-24 Daniel Jacobowitz <dan@codesourcery.com>
9055
9056 * server.c (handle_v_run): Always use the supplied argument list.
9057
d0107bb6 90582008-11-19 Bob Wilson <bob.wilson@acm.org>
889bf7c5 9059
d0107bb6
BW
9060 * xtensa-xtregs.c (XTENSA_ELF_XTREG_SIZE): Change to 4.
9061 (xtensa_regmap_table): Add entry for scompare1.
889bf7c5 9062
2c4ad781
TJB
90632008-11-18 Thiago Jung Bauermann <bauerman@br.ibm.com>
9064
9065 * Makefile.in (powerpc-isa205-32l.o, powerpc-isa205-32l.c,
9066 powerpc-isa205-altivec32l.o, powerpc-isa205-altivec32l.c,
9067 powerpc-isa205-vsx32l.o, powerpc-isa205-vsx32l.c,
9068 powerpc-isa205-64l.o, powerpc-isa205-64l.c,
9069 powerpc-isa205-altivec64l.o, powerpc-isa205-altivec64l.c,
9070 powerpc-isa205-vsx64l.o, powerpc-isa205-vsx64l.c): New targets.
9071 * configure.srv (powerpc*-*-linux*): Add ISA 2.05 object files and
9072 XML target descriptions.
9073 * linux-ppc-low.c (ppc_arch_setup): Init registers with 64-bit FPSCR
9074 when inferior is running on an ISA 2.05 or later processor. Add
9075 special case to return offset for full 64-bit slot of FPSCR when
9076 in 32-bits.
9077
dfb64f85
DJ
90782008-11-14 Daniel Gutson <dgutson@codesourcery.com>
9079
9080 * Makefile.in (SFILES, clean): Added sparc64 files.
9081 (reg-sparc64.o, reg-sparc64.c): New.
9082 * configure.srv (sparc*-*-linux*): New configuration.
9083 * linux-low.c (regsets_fetch_inferior_registers): Swap ptrace
9084 syscall arguments for SPARC.
9085 (regsets_store_inferior_registers): Likewise.
9086 * linux-sparc-low.c: New file.
9087
66b6e1dd
DE
90882008-10-21 Doug Evans <dje@google.com>
9089
9090 * Makefile.in (BFD_DIR,BFD,BFD_SRC,BFD_CFLAGS): Delete.
9091 (READLINE_DIR,READLINE_DEP): Delete.
9092 (INTERNAL_CFLAGS): Update.
9093 (LINTFLAGS): Update.
9094
9b710a42
PA
90952008-10-10 Pedro Alves <pedro@codesourcery.com>
9096
9097 * server.c (handle_v_run): If GDB didn't specify an argv, use the
9098 whole argv from the last run, not just argv[0].
9099
5822d809
PA
91002008-09-08 Pedro Alves <pedro@codesourcery.com>
9101
9102 * regcache.c (new_register_cache): Return NULL if the register
9103 cache size isn't known yet.
9104 (free_register_cache): Avoid dereferencing a NULL regcache.
9105
74aac56f
DJ
91062008-09-04 Daniel Jacobowitz <dan@codesourcery.com>
9107
9108 * configure.srv: Merge MIPS and MIPS64.
9109
400b20f5
MR
91102008-08-24 Maciej W. Rozycki <macro@linux-mips.org>
9111
9112 * Makefile.in (uninstall): Apply $(EXEEXT) too.
9113
677c5bb1
LM
91142008-08-18 Luis Machado <luisgpm@br.ibm.com>
9115
9116 * Makefile.in: Add required vsx dependencies.
9117
9118 * linux-ppc-low: Define PPC_FEATURE_HAS_VSX.
9119 Declare init_registers_powerpc_vsx32l.
9120 Declare init_registers_powerpc_vsx64l.
9121 Define PTRACE_GETVSXREGS and PTRACE_SETVSXREGS.
9122 (ppc_arch_setup): Check for VSX in hwcap.
9123 (ppc_fill_vsxregset): New function.
9124 (ppc_store_vsxregset): New function.
9125 Add new VSX entry in regset_info target_regsets.
9126
9127 * configure.srv: Add new VSX dependencies.
9128
a6f3e723
SL
91292008-08-12 Pedro Alves <pedro@codesourcery.com>
9130
9131 * remote-utils.c (noack_mode, transport_is_reliable): New globals.
9132 (remote_open): Set or clear transport_is_reliable.
9133 (putpkt_binary): Don't expect acks in noack mode.
9134 (getpkt): Don't send ack/nac in noack mode.
9135 * server.c (handle_general_set): Handle QStartNoAckMode.
9136 (handle_query): If connected by tcp pass QStartNoAckMode+ in
9137 qSupported.
9138 (main): Reset noack_mode on every connection.
9139 * server.h (noack_mode): Declare.
9140
a417dc56
RW
91412008-08-07 Ralf Wildenhues <Ralf.Wildenhues@gmx.de>
9142
9143 * Makefile.in (GDBREPLAY_OBS): New variable.
9144 (gdbreplay$(EXEEXT)): Use it to avoid unportable $^.
9145
3221518c
UW
91462008-08-05 Ulrich Weigand <uweigand@de.ibm.com>
9147 Daniel Jacobowitz <dan@codesourcery.com>
9148
9149 * linux-low.c (linux_resume_one_process): Ignore ESRCH.
9150 (usr_store_inferior_registers): Likewise.
9151 (regsets_store_inferior_registers): Likewise.
9152
ec56be1b
PA
91532008-07-31 Rolf Jansen <rj@surtec.com>
9154 Pedro Alves <pedro@codesourcery.com>
9155
9156 * configure.ac: Check for memmem declaration.
9157 * server.c [HAVE_MALLOC_H]: Include malloc.h.
9158 (disable_packet_vCont, disable_packet_Tthread, disable_packet_qC)
9159 (disable_packet_qfThreadInfo): Unconditionally compile.
9160 * server.h [!HAVE_DECL_MEMMEM]: Declare memmem.
9161 * configure, config.in: Regenerate.
9162
2fe5e3ff
DE
91632008-07-28 Doug Kwan <dougkwan@google.com>
9164
9165 * linux-low.c (sys/dir.h, sys/user.h): Remove includes.
9166 (linux_write_memory): Remove declaration of errno.
9167
836acd6d
UW
91682008-07-12 Ulrich Weigand <uweigand@de.ibm.com>
9169
9170 * linux-low.c (handle_extended_wait): Do not use "status"
9171 variable uninitialized.
9172
aeba519e
PA
91732008-07-07 Pedro Alves <pedro@codesourcery.com>
9174
9175 * server.c (handle_v_attach): Inhibit reporting dll changes.
9176
db42f210
PA
91772008-06-27 Pedro Alves <pedro@codesourcery.com>
9178
9179 * remote-utils.c (prepare_resume_reply): If requested, don't
9180 output "thread:TID" in the T stop reply.
9181
9182 * server.c (disable_packet_vCont, disable_packet_Tthread)
9183 (disable_packet_qC, disable_packet_qfThreadInfo): New globals.
9184 (handle_query): If requested, disable support for qC, qfThreadInfo
9185 and qsThreadInfo.
9186 (handle_v_requests): If requested, disable support for vCont.
9187 (gdbserver_show_disableable): New.
9188 (main): Handle --disable-packet and --disable-packet=LIST.
9189
9190 * server.h (disable_packet_vCont, disable_packet_Tthread)
9191 (disable_packet_qC, disable_packet_qfThreadInfo): Declare.
9192
8e4c5421
CD
91932008-06-20 Carlos O'Donell <carlos@codesourcery.com>
9194
9195 * server.c (gdbserver_usage): Mention --version.
9196
6e23a804
DJ
91972008-06-06 Daniel Jacobowitz <dan@codesourcery.com>
9198
9199 * Makefile.in (gdbreplay.o): New rule.
9200
90aa6a40
JM
92012008-06-06 Joseph Myers <joseph@codesourcery.com>
9202
9203 * gdbreplay.c (gdbreplay_version): Say gdbreplay in version
9204 message, not gdbserver.
9205
c16158bc 92062008-06-05 Vladimir Prus <vladimir@codesourcery.com>
889bf7c5
PA
9207 Nathan Sidwell <nathan@codesourcery.com>
9208 Joseph Myers <joseph@codesourcery.com>
c16158bc
JM
9209
9210 * acinclude.m4: Include ../../config/acx.m4.
9211 * configure.ac: Use ACX_PKGVERSION and ACX_BUGURL.
9212 * configure, config.in: Regenerate.
9213 * Makefile.in (gdbreplay$(EXEEXT)): Add version.o.
9214 * server.c (gdbserver_version): Print PKGVERSION.
9215 (gdbsrever_usage): Add stream parameter. Print REPORT_BUGS_TO.
9216 (main): Adjust gdbserver_usage calls.
9217 * gdbreplay.c (version, host_name): Add declarations.
9218 (gdbreplay_version, gdbreplay_usage): New.
9219 (main): Accept --version and --help options.
9220
aeb75bf5
DJ
92212008-06-04 Daniel Jacobowitz <dan@codesourcery.com>
9222
9223 * linux-arm-low.c (thumb_breakpoint, thumb_breakpoint_len): New.
9224 (arm_breakpoint_at): Handle Thumb.
9225 (the_low_target): Add comment.
9226
76b233dd
UW
92272008-05-29 Ulrich Weigand <uweigand@de.ibm.com>
9228
9229 * linux-ppc-low.c (ppc_collect_ptrace_register): Clear buffer.
9230
08388c79
DE
92312008-05-09 Doug Evans <dje@google.com>
9232
a3c83fae
DE
9233 * server.h (decode_search_memory_packet): Declare.
9234 * remote-utils.c (decode_search_memory_packet): New fn.
9235 * server.c (handle_search_memory_1): New fn.
08388c79
DE
9236 (handle_search_memory): New fn.
9237 (handle_query): Process qSearch:memory packets.
9238
bb9c3d36
UW
92392008-05-08 Ulrich Weigand <uweigand@de.ibm.com>
9240
9241 * regcache.c (registers_length): Remove.
9242 (set_register_cache): Verify that PBUFSIZ is large enough to hold a
9243 full register packet.
9244 * regcache.h (registers_length): Remove prototype.
9245 * server.h (PBUFSIZ): Define to 16384.
9246
7284e1be
UW
92472008-05-03 Ulrich Weigand <uweigand@de.ibm.com>
9248
9249 * configure.srv (powerpc*-*-linux*): Set srv_regobj to
9250 powerpc-32l.o, powerpc-altivec32l.o, powerpc-e500l.o,
9251 powerpc-64l.o, and powerpc-altivec64l.o.
9252 Remove rs6000/powerpc-32.xml, rs6000/powerpc-64.xml, and
9253 rs6000/powerpc-e500.xml; add rs6000/powerpc-32l.xml,
9254 rs6000/powerpc-altivec32l.xml, rs6000/powerpc-e500l.xml,
9255 rs6000/powerpc-64l.xml, rs6000/powerpc-altivec64l.xml,
9256 rs6000/power-linux.xml, and rs6000/power64-linux.xml
9257 to srv_xmlfiles.
9258
9259 * Makefile.in (reg-ppc.o, reg-ppc.c): Remove, replace by ...
9260 (powerpc-32l.o, powerpc-32l.c): ... these new rules.
9261 (powerpc-32.o, powerpc-32.c): Remove, replace by ...
9262 (powerpc-altivec32l.o, powerpc-altivec32l.c): ... these new rules.
9263 (powerpc-e500.o, powerpc-e500.c): Remove, replace by ...
9264 (powerpc-e500l.o, powerpc-e500l.c): ... these new rules.
9265 (reg-ppc64.o, reg-ppc64.c): Remove, replace by ...
9266 (powerpc-64l.o, powerpc-64l.c): ... these new rules.
9267 (powerpc-64.o, powerpc-64.c): Remove, replace by ...
9268 (powerpc-altivec64l.o, powerpc-altivec64l.c): ... these new rules.
9269 (clean): Update.
9270
9271 * linux-ppc-low.c (init_registers_ppc): Remove, replace by ...
9272 (init_registers_powerpc_32l): ... this new prototype.
9273 (init_registers_powerpc_32): Remove, replace by ...
9274 (init_registers_powerpc_altivec32l): ... this new prototype.
9275 (init_registers_powerpc_e500): Remove, replace by ...
9276 (init_registers_powerpc_e500l): ... this new prototype.
9277 (init_registers_ppc64): Remove, replace by ...
9278 (init_registers_powerpc_64l): ... this new prototype.
9279 (init_registers_powerpc_64): Remove, replace by ...
9280 (init_registers_powerpc_altivec64l): ... this new prototype.
9281 (ppc_num_regs): Set to 73.
9282 (PT_ORIG_R3, PT_TRAP): Define if necessary.
9283 (ppc_regmap, ppc_regmap_e500): Add values for orig_r3 and trap.
9284 (ppc_cannot_store_register): Handle orig_r3 and trap.
9285 (ppc_arch_setup): Update init_registers_... calls.
9286 (ppc_fill_gregset): Handle orig_r3 and trap.
9287
9288 * inferiors.c (clear_inferiors): Reset current_inferior.
9289
fdc59709
PB
92902008-04-23 Paolo Bonzini <bonzini@gnu.org>
9291
889bf7c5
PA
9292 * acinclude.m4: Add override.m4.
9293 * configure: Regenerate.
fdc59709 9294
c9b2f845
UW
92952008-04-21 Ulrich Weigand <uweigand@de.ibm.com>
9296
9297 * linux-ppc-low.c (ppc_arch_setup): Reset ppc_hwcap after the
9298 initial call to init_register_ppc64.
9299
550512b8
UW
93002008-04-21 Ulrich Weigand <uweigand@de.ibm.com>
9301
43aaf8b6
PA
9302 * configure.srv (powerpc64-*-linux*, powerpc-*-linux*): Merge into
9303 single powerpc*-*-linux* case.
550512b8
UW
9304 (s390-*-linux*, s390x-*-linux*): Merge into single s390*-*-linux* case.
9305
b6430ec3
UW
93062008-04-17 Ulrich Weigand <uweigand@de.ibm.com>
9307
9308 * configure.srv [powerpc64-*-linux*]: Remove powerpc-e500.o from
889bf7c5 9309 srv_regobj. Remove rs6000/powerpc-e500.xml and rs6000/power-spe.xml
b6430ec3
UW
9310 from reg_xmlfiles.
9311 * linux-ppc-low.c: Include <elf.h>.
9312 (PPC_FEATURE_HAS_ALTIVEC, PPC_FEATURE_HAS_SPE): Define.
9313 (ppc_hwcap): New global variable.
9314 (ppc_regmap): Remove __SPE__ #ifdef sections.
9315 (ppc_regmap_e500): New global variable.
9316 (ppc_cannot_store_register): Update __SPE__ special case.
9317 (ppc_get_hwcap): New function.
9318 (ppc_arch_setup): Use it to determine whether inferior supports
9319 AltiVec or SPE registers. Set the_low_target.regmap if appropriate.
9320 (ppc_fill_vrregset, ppc_store_vrregset): Define unconditionally.
9321 Do not access registers if target does not support AltiVec.
9322 (ppc_fill_evrregset, ppc_store_evrregset): Define unconditionally.
9323 Do not access registers if target does not support SPE.
9324 (target_regsets): Unconditionally include AltiVec and SPE regsets.
9325
52fa2412
UW
93262008-04-17 Daniel Jacobowitz <dan@codesourcery.com>
9327
9328 * linux-low.c (disabled_regsets, num_regsets): New.
9329 (use_regsets_p): Delete.
9330 (linux_wait_for_process): Clear disabled_regsets.
9331 (regsets_fetch_inferior_registers): Check and set it.
9332 (regsets_store_inferior_registers): Likewise.
9333 (linux_fetch_registers, linux_store_registers): Do not use
9334 use_regsets_p.
9335 (initialize_low): Allocate disabled_regsets.
9336
e28b3332
DJ
93372008-04-14 Daniel Jacobowitz <dan@codesourcery.com>
9338
9339 * Makefile.in (LIBOBJS): New.
9340 (OBS): Use LIBOBJS.
9341 (memmem.o): New rule.
9342 * configure.ac: Use AC_CONFIG_LIBOBJ_DIR and check for memmem.
9343 * configure: Regenerated.
9344
4536995d
UW
93452008-04-04 Ulrich Weigand <uweigand@de.ibm.com>
9346
9347 * server.c (handle_query): Never return "unsupported" for
9348 qXfer:features:read queries.
9349
221c031f
UW
93502008-03-27 Ulrich Weigand <uweigand@de.ibm.com>
9351
9352 * server.c (get_features_xml): Fix inverted condition.
9353 (handle_query): Always support qXfer:feature:read.
9354
ccd213ac
DJ
93552008-03-10 Daniel Jacobowitz <dan@codesourcery.com>
9356
9357 * server.c (wrapper_argv): New.
9358 (start_inferior): Handle wrapper_argv. If set, expect an extra
9359 trap.
9360 (gdbserver_usage): Document --wrapper.
9361 (main): Parse --wrapper.
9362
6fe305f7
UW
93632008-02-28 Ulrich Weigand <uweigand@de.ibm.com>
9364
9365 * configure.srv [powerpc64-*-linux*]: Add all files mentioned for
9366 powerpc-*-linux* to srv_regobj and reg_xmlfiles.
9367 * linux-ppc-low.c (ppc_get_pc): Support bi-arch operation.
9368 (ppc_set_pc): Likewise.
9369 (ppc_arch_setup): New function.
9370 (ppc_fill_gregset): Call ppc_collect_ptrace_register instead
9371 of collect_register.
889bf7c5 9372 (the_low_target): Use ppc_arch_setup as arch_setup initializer.
6fe305f7 9373
5b0a002e
UW
93742008-02-28 Ulrich Weigand <uweigand@de.ibm.com>
9375
9376 * configure.srv [powerpc64-*-linux*]: Use linux-ppc-low.o
9377 instead of linux-ppc64-low.o.
9378 * linux-ppc64-low.c: Remove file.
9379 * Makefile.in (SFILES): Remove linux-ppc64-low.c.
9380 (linux-ppc64-low.o): Remove rule.
9381
9382 * linux-ppc-low.c (init_registers_ppc64): Add prototype.
9383 (init_registers_powerpc_64): Likewise.
9384 (ppc_regmap): Conditionally define depending on __powerpc64__.
9385 (ppc_cannot_store_register): Do not special-case "fpscr" when
9386 compiled on __powerpc64__.
9387 (ppc_collect_ptrace_register): New function.
9388 (ppc_supply_ptrace_register): New function.
9389 (ppc_breakpoint): Change type to "unsigned int".
9390 (ppc_breakpoint_at): Change type of "insn" to "unsigned int".
9391 (the_low_target): Conditionally provide initializers for the
889bf7c5 9392 arch_setup member depending on __powerpc64__. Install
5b0a002e
UW
9393 collect_ptrace_register and supply_ptrace_register members.
9394
9b4b61c8
UW
93952008-02-28 Ulrich Weigand <uweigand@de.ibm.com>
9396
9397 * regcache.h (gdbserver_xmltarget): Add extern declaration.
9398 * server.c (gdbserver_xmltarget): Define.
9399 (get_features_xml): Use it to replace "target.xml" and arch_string.
9400
9401 * configure.srv: Remove srv_xmltarget. Add XML files that were
9402 mentioned there to srv_xmlfiles instead. Remove conditional tests
9403 on gdb_cv_arm_iwmmxt, gdb_cv_ppc_altivec, gdb_cv_ppc_spe; set
9404 srv_xmlfiles and srv_regobj to include all possible choices.
9405 * configure.ac (srv_xmltarget): Remove.
9406 (srv_xmlfiles): Do not add "target.xml".
9407 (gdb_cv_arm_iwmmxt, gdb_cv_ppc_altivec, gdb_cv_ppc_spe): Remove
9408 checks for supplementary target information.
9409 * configure: Regenerate.
9410 * Makefile.in (XML_TARGET): Remove.
9411 (target.xml): Remove rule.
9412 (clean): Do not clean up target.xml.
9413 (.PRECIOUS): Do not mention target.xml.
9414
9415 * target.h (struct target_ops): Remove arch_string member.
9416 * linux-low.c (linux_arch_string): Remove.
9417 (linux_target_ops): Remove arch_string initializer.
9418 * linux-low.h (struct linux_target_ops): Remove arch_string member.
9419 * linux-i386-low.c (the_low_target): Remove arch_string initializer.
9420 * linux-x86-64-low.c (the_low_target): Remove arch_string initializer.
9421 * spu-low.c (spu_arch_string): Remove.
9422 (spu_target_ops): Remove arch_string initializer.
9423 * win32-low.c (win32_arch_string): Remove.
9424 (win32_target_ops): Remove arch_string initializer.
9425 * win32-low.h (struct win32_target_ops): Remove arch_string member.
9426 * win32-arm-low.c (the_low_target): Remove arch_string initializer.
9427 * win32-i368-low.c (the_low_target): Remove arch_string initializer.
9428
ee1a7ae4
UW
94292008-02-27 Ulrich Weigand <uweigand@de.ibm.com>
9430
9431 * linux-low.h (struct linux_target_ops): Replace left_pad_xfer field
9432 by collect_ptrace_register and supply_ptrace_register hooks.
9433 * linux-low.c (fetch_register): Use supply_ptrace_register callback
9434 instead of checking for the_low_target.left_pad_xfer.
9435 (usr_store_inferior_registers): Use collect_ptrace_register callback
9436 instead of checking for the_low_target.left_pad_xfer.
9437
9438 * linux-s390-low.c (s390_collect_ptrace_register): New function.
9439 (s390_supply_ptrace_register): Likewise.
9440 (s390_fill_gregset): Call s390_collect_ptrace_register.
9441 (the_low_target): Update.
9442
9443 * linux-ppc64-low.c (ppc_collect_ptrace_register): New function.
9444 (ppc_supply_ptrace_register): Likewise.
9445 (the_low_target): Update.
9446
9447 * linux-i386-low.c (the_low_target): Update.
9448 * linux-x86-64-low.c (the_low_target): Update.
9449
d61ddec4
UW
94502008-02-27 Ulrich Weigand <uweigand@de.ibm.com>
9451
9452 * configure.srv [s390x-*-linux*]: Set srv_regobj to include both
9453 reg-s390.o and reg-s390x.o.
9454
9455 * linux-low.c (new_inferior): New global variable.
9456 (linux_create_inferior, linux_attach): Set it.
9457 (linux_wait_for_process): Call the_low_target.arch_setup after the
9458 target has stopped for the first time.
9459 (initialize_low): Do not call the_low_target.arch_setup.
9460
9461 * linux-s390-low.c (s390_get_pc): Support bi-arch operation.
9462 (s390_set_pc): Likewise.
9463 (s390_arch_setup): New function.
9464 (the_low_target): Use s390_arch_setup as arch_setup routine.
9465
9466 * regcache.c (realloc_register_cache): New function.
9467 (set_register_cache): Call it for each existing regcache.
9468
d05b4ac3
UW
94692008-02-27 Ulrich Weigand <uweigand@de.ibm.com>
9470
9471 * server.h (init_registers): Remove prototype.
9472
9473 * linux-low.h (struct linux_target_ops): Add arch_setup field.
9474 * linux-low.c (initialize_low): Call the_low_target.arch_setup ()
9475 instead of init_registers ().
9476 * linux-arm-low.c (init_registers_arm): Add prototype.
9477 (init_registers_arm_with_iwmmxt): Likewise.
9478 (the_low_target): Add initializer for arch_setup field.
9479 * linux-cris-low.c (init_registers_cris): Add prototype.
9480 (the_low_target): Add initializer for arch_setup field.
9481 * linux-crisv32-low.c (init_registers_crisv32): Add prototype.
9482 (the_low_target): Add initializer for arch_setup field.
9483 * linux-i386-low.c (init_registers_i386_linux): Add prototype.
9484 (the_low_target): Add initializer for arch_setup field.
9485 * linux-ia64-low.c (init_registers_ia64): Add prototype.
9486 (the_low_target): Add initializer for arch_setup field.
9487 * linux-m32r-low.c (init_registers_m32r): Add prototype.
9488 (the_low_target): Add initializer for arch_setup field.
9489 * linux-m68k-low.c (init_registers_m68k): Add prototype.
9490 (the_low_target): Add initializer for arch_setup field.
9491 * linux-mips-low.c (init_registers_mips_linux): Add prototype.
9492 (init_registers_mips64_linux): Likewise.
9493 (the_low_target): Add initializer for arch_setup field.
9494 * linux-ppc-low.c (init_registers_ppc): Add prototype.
9495 (init_registers_powerpc_32, init_registers_powerpc_e500): Likewise.
9496 (the_low_target): Add initializer for arch_setup field.
9497 * linux-ppc64-low.c (init_registers_ppc64): Add prototype.
9498 (init_registers_powerpc_64): Likewise.
9499 (the_low_target): Add initializer for arch_setup field.
9500 * linux-s390-low.c (init_registers_s390): Add prototype.
9501 (init_registers_s390x): Likewise.
9502 (the_low_target): Add initializer for arch_setup field.
9503 * linux-sh-low.c (init_registers_sh): Add prototype.
9504 (the_low_target): Add initializer for arch_setup field.
9505 * linux-x86-64-low.c (init_registers_x86_64_linux): Add prototype.
9506 (the_low_target): Add initializer for arch_setup field.
9507 * linux-xtensa-low.c (init_registers_xtensa): Add prototype.
9508 (the_low_target): Add initializer for arch_setup field.
9509
9510 * win32-low.h (struct win32_target_ops): Add arch_setup field.
9511 * win32-low.c (initialize_low): Call the_low_target.arch_setup ()
9512 instead of init_registers ().
9513 * win32-arm-low.c (init_registers_arm): Add prototype.
9514 (the_low_target): Add initializer for arch_setup field.
9515 * win32-i386-low.c (init_registers_i386): Add prototype.
9516 (the_low_target): Add initializer for arch_setup field.
9517
9518 * spu-low.c (init_registers_spu): Add prototype.
9519 (initialize_low): Call initialie_registers_spu () instead of
9520 initialize_registers ().
9521
fd96d250
PA
95222008-02-19 Pedro Alves <pedro@codesourcery.com>
9523
9524 * server.c (handle_v_requests): When handling the vRun and vAttach
9525 packets, if already debugging a process, don't kill it. Return an
9526 error instead.
9527
d41b6bb4
DJ
95282008-02-17 Daniel Jacobowitz <dan@codesourcery.com>
9529
9530 * server.c (handle_query): Correct length check.
9531
5ac588cf
PA
95322008-02-14 Pedro Alves <pedro_alves@portugalmail.pt>
9533
9534 * win32-low.c (do_initial_child_stuff): Add process handle
9535 parameter. Set current_process_handle and current_process_id from the
9536 parameters. Clear globals.
9537 (win32_create_inferior): Don't set current_process_handle and
9538 current_process_id here. Instead pass them on the call to
9539 do_initial_child_stuff.
9540 (win32_attach): Likewise.
9541 (win32_clear_inferiors): New.
9542 (win32_kill): Don't close the current process handle or the
9543 current thread handle here. Instead call win32_clear_inferiors.
9544 (win32_detach): Don't open a new handle to the process. Call
9545 win32_clear_inferiors.
9546 (win32_join): Don't rely on current_process_handle; open a new
9547 handle using the process id.
9548 (win32_wait): Call win32_clear_inferiors when the inferior process
9549 has exited.
9550
ecd7ecbc
DJ
95512008-02-14 Daniel Jacobowitz <dan@codesourcery.com>
9552
9553 * server.c (monitor_show_help): Add "exit".
9554
1525d545
MG
95552008-02-11 Maxim Grigoriev <maxim2405@gmail.com>
9556
ecd7ecbc 9557 * Makefile.in (SFILES): Add linux-xtensa-low.c.
1525d545
MG
9558 (clean): Add reg-xtensa.c.
9559 (linux-xtensa-low.o, reg-xtensa.o, reg-xtensa.c): New dependencies.
ecd7ecbc
DJ
9560 * configure.srv (xtensa*-*-linux*) New target.
9561 * linux-xtensa-low.c: New.
9562 * xtensa-xtregs.c: New.
1525d545 9563
59a016f0
PA
95642008-02-01 Pedro Alves <pedro_alves@portugalmail.pt>
9565
9566 * hostio.c: Don't include errno.h.
9567 (errno_to_fileio_errno): Move to hostio-errno.
9568 * hostio.c: (hostio_error): Remove the error parameter. Defer the
9569 error number outputting to the target->hostio_last_error callback.
9570 (hostio_packet_error): Use FILEIO_EINVAL directly.
9571 (handle_open, handle_pread, hostio_error, handle_unlink): Update
9572 calls to hostio_error.
9573 * hostio-errno.c: New.
9574 * server.h (hostio_last_error_from_errno): Declare.
9575 * target.h (target_ops): Add hostio_last_error member.
9576 * linux-low.c (linux_target_op): Register hostio_last_error_from_errno
9577 as hostio_last_error handler.
889bf7c5 9578 * spu-low.c (spu_target_ops): Likewise.
59a016f0
PA
9579 * win32-low.c [_WIN32_WCE] (win32_error_to_fileio_error)
9580 (wince_hostio_last_error): New functions.
9581 (win32_target_ops) [_WIN32_WCE]: Register wince_hostio_last_error
9582 as hostio_last_error handler.
9583 (win32_target_ops) [!_WIN32_WCE]: Register
9584 hostio_last_error_from_errno as hostio_last_error handler.
9585 * Makefile.in (SFILES): Add hostio.c and hostio-errno.c.
9586 (hostio-errno.o): New rule.
9587 * configure.ac (GDBSERVER_DEPFILES): Add $srv_hostio_err_objs.
9588 * configure.srv (srv_hostio_err_objs): New variable. Default to
9589 hostio-errno.o.
9590 (arm*-*-mingw32ce*): Set srv_hostio_err_objs to "".
9591 * configure: Regenerate.
9592
2d717e4f
DJ
95932008-01-29 Daniel Jacobowitz <dan@codesourcery.com>
9594
9595 * linux-low.c (linux_attach_lwp): Do not _exit after errors.
9596 (linux_kill, linux_detach): Clean up the process list.
9597 * remote-utils.c (remote_open): Improve port number parsing.
9598 (putpkt_binary, input_interrupt): Only send interrupts if the target
9599 is running.
9600 * server.c (extended_protocol): Make static.
9601 (attached): Define earlier.
9602 (exit_requested, response_needed, program_argv): New variables.
9603 (target_running): New.
9604 (start_inferior): Clear attached here.
9605 (attach_inferior): Set attached here.
9606 (require_running): Define.
9607 (handle_query): Use require_running and target_running. Implement
9608 "monitor exit".
9609 (handle_v_attach, handle_v_run): New.
9610 (handle_v_requests): Use require_running. Handle vAttach and vRun.
9611 (gdbserver_usage): Update.
9612 (main): Redo argument parsing. Handle --debug and --multi. Handle
9613 --attach along with other options or after the port. Save
9614 program_argv. Support no initial program. Resynchronize
9615 communication with GDB after an error. Handle "monitor exit".
9616 Use require_running and target_running. Always allow the extended
9617 protocol. Do not error out for Hc0 or Hc-1. Do not automatically
9618 restart in extended mode.
9619 * README: Refer to the GDB manual. Update --attach usage.
9620
7407e2de
AS
96212007-12-20 Andreas Schwab <schwab@suse.de>
9622
9623 * linux-low.c (STACK_SIZE): Define.
9624 (linux_tracefork_child): Use it. Use __clone2 on ia64.
9625 (linux_test_for_tracefork): Likewise.
9626
b65d95c5
DJ
96272007-12-18 Daniel Jacobowitz <dan@codesourcery.com>
9628
9629 * linux-low.c (linux_wait_for_event): Update messages. Do not
9630 reinsert auto-delete breakpoints.
9631 * mem-break.c (struct breakpoint): Change return type of handler to
9632 int.
9633 (set_breakpoint_at): Update handler type.
9634 (reinsert_breakpoint_handler): Return 1 instead of calling
9635 delete_breakpoint.
9636 (reinsert_breakpoint_by_bp): Check for the original breakpoint before
9637 setting a new one.
9638 (check_breakpoints): Delete auto-delete breakpoints and return 2.
9639 * mem-break.h (set_breakpoint_at): Update handler type.
9640 * thread-db.c (thread_db_create_event, thread_db_create_event): Update.
9641 * win32-low.c (auto_delete_breakpoint): New.
9642 (get_child_debug_event): Use it.
9643
4e799345
DJ
96442007-12-16 Daniel Jacobowitz <dan@codesourcery.com>
9645
9646 * configure.ac: Check for pread and pwrite.
9647 * hostio.c (handle_pread): Fall back to lseek and read.
9648 (handle_pwrite): Fall back to lseek and write.
9649 * config.in, configure: Regenerated.
9650
27524b67
DJ
96512007-12-07 Daniel Jacobowitz <dan@codesourcery.com>
9652
9653 * server.c (myresume): Add own_buf argument.
9654 (main): Update calls.
9655
a20d5e98
DJ
96562007-12-06 Daniel Jacobowitz <dan@codesourcery.com>
9657
9658 * linux-low.c (linux_wait, linux_resume): Do not handle async I/O.
9659 * remote-utils.c (remote_open): Do not call disable_async_io.
9660 (block_async_io): Delete.
9661 (unblock_async_io): Make static.
9662 (initialize_async_io): New.
9663 * server.c (handle_v_cont): Handle async I/O here.
9664 (myresume): Likewise. Move other common resume tasks here...
9665 (main): ... from here. Call initialize_async_io. Disable async
9666 I/O before the main loop.
9667 * server.h (initialize_async_io): Declare.
9668 (block_async_io, unblock_async_io): Delete prototypes.
9669 * spu-low.c (spu_resume, spu_wait): Do not handle async I/O here.
9670
b79d787e
DJ
96712007-12-06 Mick Davis <mickd@goanna.iinet.net.au>
9672
9673 * remote-utils.c (readchar): Allow binary data in received messages.
9674
d97903b2
PA
96752007-12-03 Pedro Alves <pedro_alves@portugalmail.pt>
9676
9677 * win32-low.c (attaching): New global.
9678 (win32_create_inferior): Clear the `attaching' global.
9679 (win32_attach): Set the `attaching' global.
9680 (get_child_debug_event) [_WIN32_WCE]: Stop the inferior when
9681 attaching. Only set a breakpoint at the entry point if not
9682 attaching.
9683
311de423
PA
96842007-12-03 Pedro Alves <pedro_alves@portugalmail.pt>
9685
9686 * server.c (main): Don't report dll events on the initial
9687 connection on attaches.
9688
6c2d16d2
PA
96892007-12-03 Pedro Alves <pedro_alves@portugalmail.pt>
9690
9691 * server.c (main): Relax numerical bases supported for the pid of
9692 the --attach command line argument.
9693
5ca906e6
PA
96942007-12-03 Pedro Alves <pedro_alves@portugalmail.pt>
9695
9696 * win32-low.c (win32_attach): Call OpenProcess before
9697 DebugActiveProcess, not after. Add last error output to error
9698 call.
9699
9c6c8194
PA
97002007-12-03 Pedro Alves <pedro_alves@portugalmail.pt>
9701
9702 * win32-low.c (win32_get_thread_context)
9703 (win32_set_thread_context): New functions.
9704 (thread_rec): Use win32_get_thread_context.
9705 (continue_one_thread, win32_resume): Use win32_set_thread_context.
9706 * win32-low.h (win32_thread_info) [_WIN32_WCE]: Add `base_context'
9707 field.
9708
4d5d1aaa
PA
97092007-12-03 Leo Zayas
9710 Pedro Alves <pedro_alves@portugalmail.pt>
9711
9712 * win32-low.c (soft_interrupt_requested, faked_breakpoint): New
9713 global variables.
9714 (child_add_thread): Minor cleanup.
9715 (child_continue): Resume artificially suspended threads before
9716 calling ContinueDebugEvent.
9717 (suspend_one_thread): New.
9718 (fake_breakpoint_event): New.
9719 (get_child_debug_event): Change return type to int. Check here if
9720 gdb sent an interrupt request. If a soft interrupt was requested,
9721 fake a breakpoint event. Return 0 if there is no event to handle,
9722 and 1 otherwise.
9723 (win32_wait): Don't check here if gdb sent an interrupt request.
9724 Ensure there is a valid event to handle.
9725 (win32_request_interrupt): Add soft interruption method as last
9726 resort.
9727
c436e841
PA
97282007-12-03 Leo Zayas
9729 Pedro Alves <pedro_alves@portugalmail.pt>
9730
9731 * win32-low.h (win32_thread_info): Add descriptions to the
9732 structure members. Replace `suspend_count' counter by a
9733 `suspended' flag.
9734 * win32-low.c (thread_rec): Update condition of when to get the
9735 context from the inferior. Rely on ContextFlags being set if it
9736 has already been retrieved. Only suspend the inferior thread if
9737 we haven't already. Warn if that fails.
9738 (continue_one_thread): s/suspend_count/suspended/. Only call
9739 ResumeThread once. Warn if that fails.
9740
e7b5fa67
PA
97412007-12-02 Pedro Alves <pedro_alves@portugalmail.pt>
9742
9743 * win32-low.c (win32_wait): Don't read from the inferior when it
9744 has already exited.
9745
a385171d
PA
97462007-12-02 Pedro Alves <pedro_alves@portugalmail.pt>
9747
9748 * Makefile.in (win32_low_h): New variable.
9749 (win32-low.o): Add dependency on $(win32_low_h).
9750 (win32-arm-low.o, win32-i386-low.o): New rules.
9751
f80c84b3
DJ
97522007-11-30 Daniel Jacobowitz <dan@codesourcery.com>
9753
9754 * hostio.c: Correct copyright year.
9755
a6b151f1
DJ
97562007-11-30 Daniel Jacobowitz <dan@codesourcery.com>
9757
9758 * Makefile.in (OBS): Add hostio.o.
9759 (hostio.o): New rule.
9760 * server.h (handle_vFile): Declare.
9761 * hostio.c: New file.
9762 * server.c (handle_v_requests): Take packet_len and new_packet_len
9763 for binary packets. Call handle_vFile.
9764 (main): Update call to handle_v_requests.
9765
f9387fc3
DJ
97662007-11-05 Daniel Jacobowitz <dan@codesourcery.com>
9767
9768 * linux-low.c: Include <sched.h>.
9769
51c2684e
DJ
97702007-11-01 Daniel Jacobowitz <dan@codesourcery.com>
9771
9772 * linux-low.c (linux_tracefork_grandchild): New.
9773 (linux_tracefork_child): Use clone.
9774 (linux_test_for_tracefork): Use clone; allocate and free a stack.
9775
75f83163
JB
97762007-10-31 Joel Brobecker <brobecker@adacore.com>
9777
9778 * Makefile.in: Use $(SHELL) instead of "sh" to call regdat.sh.
9779
da5898ce
DJ
97802007-10-24 Daniel Jacobowitz <dan@codesourcery.com>
9781
9782 * linux-low.c (handle_extended_wait): Handle unexpected signals.
9783
24a09b5f
DJ
97842007-10-23 Daniel Jacobowitz <dan@codesourcery.com>
9785
9786 * inferiors.c (change_inferior_id): Delete.
9787 (add_pid_to_list, pull_pid_from_list): New.
9788 * linux-low.c (PTRACE_SETOPTIONS, PTRACE_GETEVENTMSG)
9789 (PTRACE_O_TRACESYSGOOD, PTRACE_O_TRACEFORK, PTRACE_O_TRACEVFORK)
9790 (PTRACE_O_TRACECLONE, PTRACE_O_TRACEEXEC, PTRACE_O_TRACEVFORKDONE)
9791 (PTRACE_O_TRACEEXIT, PTRACE_EVENT_FORK, PTRACE_EVENT_VFORK)
9792 (PTRACE_EVENT_CLONE, PTRACE_EVENT_EXEC, PTRACE_EVENT_VFORK_DONE)
9793 (PTRACE_EVENT_EXIT, __WALL): Provide default definitions.
9794 (stopped_pids, thread_db_active, must_set_ptrace_flags): New variables.
9795 (using_threads): Always set to 1.
9796 (handle_extended_wait): New.
9797 (add_process): Do not set TID.
9798 (linux_create_inferior): Set must_set_ptrace_flags.
9799 (linux_attach_lwp): Remove TID argument. Do not check using_threads.
9800 Use PTRACE_SETOPTIONS. Call new_thread_notify. Update all callers.
9801 (linux_thread_alive): Rename TID argument to LWPID.
9802 (linux_wait_for_process): Handle unknown processes. Do not use TID.
9803 (linux_wait_for_event): Do not use TID or check using_threads. Update
9804 call to dead_thread_notify. Call handle_extended_wait.
9805 (linux_create_inferior): Use PTRACE_SETOPTIONS.
9806 (send_sigstop): Delete sigstop_sent.
9807 (wait_for_sigstop): Avoid TID.
9808 (linux_supports_tracefork_flag, linux_tracefork_child, my_waitpid)
9809 (linux_test_for_tracefork): New.
9810 (linux_lookup_signals): Use thread_db_active and
9811 linux_supports_tracefork_flag.
9812 (initialize_low): Use thread_db_active and linux_test_for_tracefork.
9813 * linux-low.h (get_process_thread): Avoid TID.
9814 (struct process_ifo): Move thread_known and tid to the end. Remove
9815 sigstop_sent.
9816 (linux_attach_lwp, thread_db_init): Update prototypes.
9817 * server.h (change_inferior_id): Delete prototype.
9818 (add_pid_to_list, pull_pid_from_list): New prototypes.
9819 * thread-db.c (thread_db_use_events): New.
9820 (find_first_thread): Rename to...
9821 (find_one_thread): ...this. Update callers and messages. Do not
9822 call fatal. Check thread_db_use_events. Do not call
9823 change_inferior_id or new_thread_notify.
9824 (maybe_attach_thread): Update. Do not call new_thread_notify.
9825 (thread_db_init): Set thread_db_use_events. Check use_events.
9826 * utils.c (fatal, warning): Correct message prefix.
9827
30ed0a8f
DJ
98282007-10-15 Daniel Jacobowitz <dan@codesourcery.com>
9829
9830 * Makefile.in (clean): Remove new files.
9831 (powerpc-32.o, powerpc-32.c, powerpc-e500.o, powerpc-e500.c)
9832 (powerpc-64.o, powerpc-64.c): New rules.
9833 * configure.srv: Use alternate register sets for powerpc64-*-linux*
9834 with AltiVec, powerpc-*-linux* with AltiVec, and powerpc-*-linux*
9835 with SPE.
9836 * linux-ppc-low.c (ppc_regmap): Do not fetch the FP registers for
9837 SPE targets.
9838 (ppc_cannot_store_register): Do not check for FPSCR for SPE targets.
9839 (PTRACE_GETVRREGS, PTRACE_SETVRREGS, SIZEOF_VRREGS, ppc_fill_vrregset)
9840 (ppc_store_vrregset, PTRACE_GETEVRREGS, PTRACE_SETEVRREGS)
9841 (struct gdb_evrregset_t, ppc_fill_evrregset, ppc_store_evrregset): New.
9842 (target_regsets): Add AltiVec and SPE register sets.
9843 * configure.ac: Check for AltiVec and SPE.
9844 * linux-ppc64-low.c (PTRACE_GETVRREGS, PTRACE_SETVRREGS, SIZEOF_VRREGS)
9845 (ppc_fill_vrregset, ppc_store_vrregset): New.
9846 (target_regsets): Add AltiVec register set.
9847 * configure: Regenerated.
9848
fd462a61
DJ
98492007-09-19 Daniel Jacobowitz <dan@codesourcery.com>
9850
9851 * linux-low.c (O_LARGEFILE): Define.
9852 (linux_read_memory): Use /proc/PID/mem.
9853 * configure.ac: Use AC_GNU_SOURCE. Check for pread64.
9854 * configure, config.in: Regenerated.
9855
69f223ed
DJ
98562007-09-04 Daniel Jacobowitz <dan@codesourcery.com>
9857
9858 * linux-low.c (linux_wait_for_event): Do not pass signals while
9859 single-stepping.
9860
aec18585
PA
98612007-09-03 Pedro Alves <pedro_alves@portugalmail.pt>
9862
9863 * win32-low.c (create_process): New.
9864 (win32_create_inferior): Use create_process instead of
9865 CreateProcess. If create_process failed retry appending an ".exe"
9866 suffix. Store the GetLastError result immediatelly after
9867 create_process calls and use it on the call to error.
9868
34d86ddd
PA
98692007-09-03 Pedro Alves <pedro_alves@portugalmail.pt>
9870
9871 * win32-low.c (handle_load_dll): Don't use toolhelp when waiting.
9872
5a0e3bd0
JB
98732007-08-23 Joel Brobecker <brobecker@adacore.com>
9874
9875 * configure.ac: Switch license to GPLv3.
9876
f88c79e6
MS
98772007-08-01 Michael Snyder <msnyder@access-company.com>
9878
9879 * remote-utils.c (putpkt_binary): Memory leak, free buf2.
9880
6b3d9b83
PA
98812007-07-31 Pedro Alves <pedro_alves@portugalmail.pt>
9882
9883 * win32-low.c (winapi_CloseToolhelp32Snapshot) [_WIN32_WCE]: New
9884 typedef.
9885 (win32_CloseToolhelp32Snapshot) [_WIN32_WCE]: New global var.
9886 (load_toolhelp) [_WIN32_WCE]: Load TOOLHELP.DLL. Get
9887 CloseToolhelp32Snapshot.
9888 (toolhelp_get_dll_name) [_WIN32_WCE]: Close the snapshot with
9889 CloseToolhelp32Snapshot.
9890
c588c53c
MS
98912007-07-27 Michael Snyder <michael.snyder@access-company.com>
9892
9893 * server.c (main): Check for inferior exit before main loop.
9894
aa0403d9
PA
98952007-07-18 Pedro Alves <pedro_alves@portugalmail.pt>
9896
9897 * remote-utils.c (remote_open): Set SO_KEEPALIVE on remote_desc
9898 instead of on tmp_desc.
9899
255e7678
DJ
99002007-07-17 Pedro Alves <pedro_alves@portugalmail.pt>
9901 Daniel Jacobowitz <dan@codesourcery.com>
9902
9903 * inferiors.c (all_dlls, dlls_changed, get_dll): New.
9904 (add_thread): Minor cleanups.
9905 (clear_inferiors): Move lower in the file. Clear the DLL
9906 list.
9907 (free_one_dll, match_dll, loaded_dll, unloaded_dll, clear_list): New.
9908 * remote-utils.c (prepare_resume_reply): Check dlls_changed.
9909 (xml_escape_text): New.
9910 * server.c (handle_query): Handle qXfer:libraries:read. Report it
9911 for qSupported.
9912 (handle_v_cont): Report errors.
9913 (gdbserver_version): Update.
9914 (main): Correct size of own_buf. Do not report initial DLL events.
9915 * server.h (struct dll_info, all_dlls, dlls_changed, loaded_dll)
9916 (unloaded_dll, xml_escape_text): New.
9917 * win32-low.c (enum target_waitkind): Update comments.
9918 (win32_add_one_solib, get_image_name, winapi_EnumProcessModules)
9919 (winapi_GetModuleInformation, winapi_GetModuleFileNameExA)
9920 (win32_EnumProcessModules, win32_GetModuleInformation)
9921 (win32_GetModuleFileNameExA, load_psapi, psapi_get_dll_name)
9922 (winapi_CreateToolhelp32Snapshot, winapi_Module32First)
9923 (winapi_Module32Next, win32_CreateToolhelp32Snapshot)
9924 (win32_Module32First, win32_Module32Next, load_toolhelp)
9925 (toolhelp_get_dll_name, handle_load_dll, handle_unload_dll): New.
9926 (get_child_debug_event): Handle DLL events.
9927 (win32_wait): Likewise.
9928
0d37add9
DJ
99292007-07-12 Daniel Jacobowitz <dan@codesourcery.com>
9930
9931 * configure.srv: Set srv_linux_regsets for sh*-*-linux*.
9932 * linux-sh-low.c (sh_fill_gregset, target_regsets): New.
9933
45e2715e
PA
99342007-07-08 Pedro Alves <pedro_alves@portugalmail.pt>
9935
9936 * win32-low.c (handle_output_debug_string): Ignore event if not
9937 waiting.
9938
c5674cf1
PA
99392007-07-08 Pedro Alves <pedro_alves@portugalmail.pt>
9940
9941 * win32-arm-low.c (arm_wince_breakpoint): Fix typo.
9942
2bbe3cc1
DJ
99432007-07-03 Daniel Jacobowitz <dan@codesourcery.com>
9944
9945 * remote-utils.c (look_up_one_symbol): Handle 'm' packets.
9946
ae13219e
DJ
99472007-07-02 Daniel Jacobowitz <dan@codesourcery.com>
9948
9949 * inferiors.c (change_inferior_id): Add comment.
9950 * linux-low.c (check_removed_breakpoint): Add an early
9951 prototype. Improve debug output.
9952 (linux_attach): Doc update.
9953 (linux_detach_one_process, linux_detach): Clean up before releasing
9954 each process.
9955 (send_sigstop, wait_for_sigstop): Improve comments and debug output.
9956 * linux-low.h (struct process_info): Doc improvement.
9957 * mem-break.c (delete_all_breakpoints): New.
9958 * mem-break.h (delete_all_breakpoints): New prototype.
9959 * thread-db.c (find_first_thread): New.
9960 (thread_db_create_event): Call it instead of
9961 thread_db_find_new_threads. Clean up unused variables.
9962 (maybe_attach_thread): Remove first thread handling.
9963 (thread_db_find_new_threads): Use find_first_thread.
9964 (thread_db_get_tls_address): Likewise.
9965
4105de34
DJ
99662007-06-27 Daniel Jacobowitz <dan@codesourcery.com>
9967
9968 * thread-db.c (thread_db_find_new_threads): Add prototype.
9969 (thread_db_create_event): Check for the main thread before adding
9970 a new thread.
9971 (maybe_attach_thread): Only enable event reporting if TID == 0.
9972 (thread_db_get_tls_address): Check for new threads.
9973
2b876972
DJ
99742007-06-20 Daniel Jacobowitz <dan@codesourcery.com>
9975
9976 * linux-low.c (linux_create_inferior): Try execv before execvp.
9977 * spu-low.c (spu_create_inferior): Likewise.
9978
7a245884
DJ
99792007-06-13 Mike Frysinger <vapier@gentoo.org>
9980
9981 * linux-low.c (linux_create_inferior): Change execv to execvp.
9982 * spu-low.c (spu_create_inferior): Likewies.
9983
117ce543
DJ
99842007-06-13 Daniel Jacobowitz <dan@codesourcery.com>
9985
9986 * Makefile.in (clean): Clean new files instead of deleted ones.
9987 (reg-mips.o, reg-mips.c, reg-mips64.o, reg-mips64.c): Delete.
9988 (mips-linux.o, mips-linux.c, mips64-linux.o, mips64-linux.c): New
9989 rules.
9990 * configure.srv: Specify XML files and new regformats for MIPS and
9991 MIPS64 GNU/Linux.
9992 * linux-mips-low.c (mips_num_regs): Set to only used registers.
9993 (mips_regmap): Do not fetch $0. Remove unused registers. Add
9994 an entry for the restart register.
9995 (mips_cannot_fetch_register, mips_cannot_store_register)
9996 (mips_reinsert_addr, mips_fill_fpregset, mips_store_fpregset): Update
9997 register names to match the XML descriptions.
9998 (mips_fill_gregset, mips_store_gregset): Likewise. Handle the
9999 restart register instead of $0.
10000
0e7f50da
UW
100012007-06-12 Ulrich Weigand <uweigand@de.ibm.com>
10002 Markus Deuling <deuling@de.ibm.com>
10003
10004 * remote-utils.c (decode_xfer_write): New function.
10005 * server.h (decode_xfer_write): Add prototype.
10006 * server.c (handle_query): Add PACKET_LEN argument. Support
10007 qXfer:spu:read and qXfer:spu:write packets.
10008 (main): Pass packet_len to handle_query.
10009 * spu-low.c (spu_target_ops): Add spu_proc_xfer_spu.
10010 * target.h (target_ops): Add qxfer_spu.
10011
374c1d38
UW
100122007-06-12 Ulrich Weigand <uweigand@de.ibm.com>
10013
10014 * spu-low.c (spu_proc_xfer_spu): Do not return failure when
10015 accessing non-seekable spufs files.
10016
bb63802a
UW
100172007-05-16 Markus Deuling <deuling@de.ibm.com>
10018
889bf7c5 10019 * server.c (handle_query): Add reply for qC packet.
bb63802a 10020
7390519e
PA
100212007-05-10 Pedro Alves <pedro_alves@portugalmail.pt>
10022 Leo Zayas <lerele@champenstudios@com>
10023
10024 * server.h (check_remote_input_interrupt_request): New function.
10025 * remote_utils.c (INVALID_DESCRIPTOR): New define.
10026 (remote_desc): Initialize with INVALID_DESCRIPTOR.
10027 (input_interrupt): Expose on USE_WIN32API too. Fix whitespace.
10028 (check_remote_input_interrupt_request): New function.
10029 * server.h (check_remote_input_interrupt_request): Declare.
3ecf0694 10030 * win32-low.c (winapi_DebugBreakProcess,
7390519e
PA
10031 winapi_GenerateConsoleCtrlEvent): New typedefs.
10032 (get_child_debug_event): Lower Win32 debug event polling from 1 sec
10033 to 250 ms.
10034 (win32_wait): Check for remote interrupt request
10035 with check_remote_input_interrupt_request.
10036 (win32_request_interrupt): New function.
10037 (win32_target_op): Set request_interrupt to win32_request_interrupt.
10038
34b34921
PA
100392007-05-10 Pedro Alves <pedro_alves@portugalmail.pt>
10040
10041 * win32-low.c (debug_registers_changed,
10042 debug_registers_used, CONTEXT_EXTENDED_REGISTERS,
10043 CONTEXT_FLOATING_POINT, CONTEXT_DEBUG_REGISTERS,
10044 CONTEXT_DEBUGGER, CONTEXT_DEBUGGER_DR): Delete.
10045 (thread_rec): Get context using the low target.
10046 (child_add_thread): Call thread_added on the low target,
10047 which does the same thing.
10048 (regptr): Delete.
10049 (do_initial_child_stuff): Remove debug registers references.
10050 Set context using the low target. Resume threads after
10051 setting the contexts.
10052 (child_continue): Remove dead variable. Remove debug
10053 registers references.
10054 (child_fetch_inferior_registers): Go through the low target.
10055 (do_child_store_inferior_registers): Remove.
10056 (child_store_inferior_registers): Go through the low target.
10057 (win32_resume): Remove debug registers references.
10058 Set context using the low target.
10059 (handle_exception): Change return type to void. Don't record
10060 context here. Set status to TARGET_WAITKIND_SPURIOUS on a
10061 first chance exception.
889bf7c5 10062 (get_child_debug_event): Change return type to void. Remove
34b34921
PA
10063 goto loop. Always return after waiting for debug event.
10064 (win32_wait): Convert to switch statement. Handle spurious
10065 events.
10066
10067 * win32-i386-low.c (debug_registers_changed,
10068 debug_registers_used): New.
10069 (initial_stuff): Rename to ...
10070 (i386_initial_stuff): ... this. Clear debug registers
10071 state variables.
10072 (store_debug_registers): Delete.
10073 (i386_get_thread_context): New.
10074 (load_debug_registers): Delete.
10075 (i386_set_thread_context): New.
10076 (i386_thread_added): New.
10077 (single_step): Rename to ...
10078 (i386_single_step): ... this.
10079 (do_fetch_inferior_registers): Rename to ...
10080 (i386_fetch_inferior_register): ... this.
10081 (i386_store_inferior_register): New.
10082 (the_low_target): Adapt to new interface.
10083
10084 * win32-arm-low.c (CONTEXT_FLOATING_POINT): Define.
10085 (arm_get_thread_context): New.
10086 (arm_set_thread_context): New.
10087 (regptr): New.
10088 (do_fetch_inferior_registers): Rename to ...
10089 (arm_fetch_inferior_register): ... this.
10090 (arm_store_inferior_register): New.
10091 (arm_wince_breakpoint): Reimplement as unsigned long.
10092 (arm_wince_breakpoint_len): Define.
10093 (the_low_target): Adapt to new interface.
10094
10095 * win32-low.h (target_ops): Remove regmap, store_debug_registers and
10096 load_debug_registers. Add get_thread_context, set_thread_context,
10097 thread_added and store_inferior_register. Rename
10098 fetch_inferior_registers to fetch_inferior_register.
10099 (regptr): Remove declaration.
10100
dd6953e1
PA
101012007-05-10 Pedro Alves <pedro_alves@portugalmail.pt>
10102
10103 * linux-low.c (linux_detach): Change return type to int. Return 0.
10104 * spu-low.c (spu_detach): Likewise.
10105
444d6139
PA
101062007-05-10 Pedro Alves <pedro_alves@portugalmail.pt>
10107
10108 * target.h (target_ops): Change return type of detach to int.
10109 Add join.
10110 (join_inferior): New.
10111 * server.c (main): Don't skip detach support on mingw32.
10112 If the inferior doesn't support detaching return error.
10113 Call join_inferior instead of using waitpid.
10114 * linux-low.c (linux_join): New.
10115 (linux_target_op): Add linux_join.
10116 * spu-low.c (spu_join): New.
10117 (spu_target_ops): Add spu_join.
10118 * win32-low.c (win32_detach): Adapt to new interface.
10119 Reopen current_process_handle before detaching. Issue a child
10120 resume before detaching.
10121 (win32_join): New.
10122 (win32_target_op): Add win32_join.
10123
1d5315fe
PA
101242007-05-10 Pedro Alves <pedro_alves@portugalmail.pt>
10125
10126 * win32-low.c (win32-attach): Fix return value.
10127 * target.h (target_ops): Describe ATTACH return values.
10128
bf914831
PA
101292007-05-10 Pedro Alves <pedro_alves@portugalmail.pt>
10130
10131 * win32-low.c (GETPROCADDRESS): Define.
10132 (winapi_DebugActiveProcessStop): Add WINAPI. typedef as pointer.
10133 (winapi_DebugSetProcessKillOnExit): Likewise.
10134 (win32_create_inferior): Force usage of ansi CreateProcessA.
10135 (win32_attach): Use GETPROCADDRESS.
10136 (win32_detach): Likewise.
10137
f72f3e60
PA
101382007-05-10 Pedro Alves <pedro_alves@portugalmail.pt>
10139
10140 * win32-low.c (win32_wait): Don't use WSTOPSIG.
10141
ed50f18f
PA
101422007-03-30 Pedro Alves <pedro_alves@portugalmail.pt>
10143
10144 * win32-low.c: Commit leftover changes from 2007-03-29.
10145
0c2ead7e
DJ
101462007-03-30 Daniel Jacobowitz <dan@codesourcery.com>
10147
10148 * i387-fp.c (struct i387_fsave, struct i387_fxsave): Make 16-bit
10149 fields short instead of int. Add explicit padding.
10150 (i387_cache_to_fsave): Remove unnecessary casts.
10151 (i387_fsave_to_cache): Doc fix.
10152 (i387_cache_to_fxsave): Remove unnecessary casts and masking.
10153
73725ff3
DJ
101542007-03-30 Daniel Jacobowitz <dan@codesourcery.com>
10155
10156 * i387-fp.c (i387_cache_to_fxsave): Reinitialize val2 before use.
10157 (i387_fxsave_to_cache): Check fp->ftag while building ftag value.
10158
d99f33d8
PA
101592007-03-29 Pedro Alves <pedro_alves@portugalmail.pt>
10160
10161 * configure.srv (arm*-*-mingw32ce*): Move near the other
10162 arm targets.
10163
68070c10
PA
101642007-03-29 Pedro Alves <pedro_alves@portugalmail.pt>
10165
2482afc6 10166 * configure.ac: Add errno checking.
68070c10
PA
10167 (AC_CHECK_HEADERS): Add errno.h, fcntl.h, signal.h,
10168 sys/file.h and malloc.h.
10169 (AC_CHECK_DECLS): Add perror.
10170 (srv_mingwce): Handle.
2482afc6 10171 * configure.srv (i[34567]86-*-cygwin*): Add
68070c10
PA
10172 win32-i386-low.o to srv_tgtobj.
10173 (i[34567]86-*-mingw*): Likewise.
10174 (arm*-*-mingw32ce*): Add case.
10175 * gdbreplay.c [HAVE_SYS_FILE_H, HAVE_SIGNAL_H,
10176 HAVE_FCNTL_H, HAVE_ERRNO_H, HAVE_MALLOC_H]: Check.
10177 [__MINGW32CE__] (strerror): New function.
10178 [__MINGW32CE__] (errno): Define to GetLastError.
10179 [__MINGW32CE__] (COUNTOF): New macro.
10180 (remote_open): Remove extra close call.
10181 * mem-break.c (delete_breakpoint_at): New function.
10182 * mem-break.h (delete_breakpoint_at): Declare.
10183 * remote-utils.c [HAVE_SYS_FILE_H, HAVE_SIGNAL_H,
10184 HAVE_FCNTL_H, HAVE_UNISTD_H, HAVE_ERRNO_H]: Check.
10185 [USE_WIN32API] (read, write): Add char* casts.
10186 * server.c [HAVE_UNISTD_H, HAVE_SIGNAL_H]: Check.
10187 * server.h: Include wincecompat.h on Windows CE.
10188 [HAVE_ERRNO_H]: Check.
10189 (perror): Declare if not declared.
10190 * utils.c: Add stdlib.h, errno.h and malloc.h includes.
10191 (perror_with_name): Remove errno declaration.
10192 * wincecompat.h: New.
10193 * wincecompat.c: New.
10194 * win32-low.h: New.
10195 * win32-arm-low.c: New.
10196 * win32-i386-low.c: New.
10197 (win32-low.c): Include mem-break.h and win32-low.h, and winnt.h.
10198 (OUTMSG2): Make it safe.
10199 (_T): New macro.
10200 (COUNTOF): New macro.
10201 (NUM_REGS): Get it from the low target.
10202 (CONTEXT_EXTENDED_REGISTERS, CONTEXT_FLOATING_POINT,
10203 CONTEXT_DEBUG_REGISTERS): Add fallbacks to 0.
10204 (thread_rec): Let low target handle debug registers.
10205 (child_add_thread): Likewise.
10206 (child_init_thread_list): Likewise.
10207 (continue_one_thread): Likewise.
10208 (regptr): New.
10209 (do_child_fetch_inferior_registers): Move to ...
10210 * win32-i386-low.c: ... here, and rename to ...
10211 (do_fetch_inferior_registers): ... this.
889bf7c5 10212 * win32-low.c (child_fetch_inferior_registers):
68070c10
PA
10213 Go through the low target.
10214 (do_child_store_inferior_registers): Use regptr.
10215 (strwinerror): New function.
10216 (win32_create_inferior): Handle Windows CE.
10217 Use strwinerror instead of strerror on Windows error
10218 codes. Add program to the error output.
10219 Don't close the main thread handle on Windows CE.
10220 (win32_attach): Use coredll.dll on Windows CE.
10221 (win32_kill): Close current process and current
10222 thread handles.
10223 (win32_detach): Use coredll.dll on Windows CE.
10224 (win32_resume): Let low target handle debug registers, and
10225 step request.
10226 (handle_exception): Add/Remove initial breakpoint. Avoid
10227 non-existant WSTOPSIG on Windows CE.
10228 (win32_read_inferior_memory): Cast to remove warning.
10229 (win32_arch_string): Go through the low target.
10230 (initialize_low): Call set_breakpoint_data with the low
10231 target's breakpoint.
10232 * win32-low.c (dr, FLAG_TRACE_BIT, FCS_REGNUM,
10233 FOP_REGNUM, mappings): Move to ...
10234 * win32-i386-low.c: ... here.
10235 * win32-low.c (win32_thread_info): Move to ...
10236 * win32-low.h: ... here.
10237 * Makefile.in (SFILES): Add win32-low.c, win32-i386-low.c,
10238 win32-arm-low.c and wincecompat.c.
10239 (all:): Add $EXEEXT.
10240 (install-only:): Likewise.
10241 (gdbserver:): Likewise.
10242 (gdbreplay:): Likewise.
10243 * config.in: Regenerate.
10244 * configure: Regenerate.
10245
41093d81
PA
102462007-03-28 Pedro Alves <pedro_alves@portugalmail.pt>
10247
10248 * win32-low.c: Rename typedef thread_info to
10249 win32_thread_info throughout.
10250
544afa54
PA
102512007-03-28 Pedro Alves <pedro_alves@portugalmail.pt>
10252
10253 * win32-i386-low.c: Rename to ...
10254 * win32-low.c: ... this.
10255 * configure.srv: Replace win32-i386-low.o with win32-low.o.
10256 * Makefile.in: Likewise.
10257
bce7165d
PA
102582007-03-27 Pedro Alves <pedro_alves@portugalmail.pt>
10259
10260 * remote-utils.c (monitor_output): Constify msg parameter.
10261 * server.h (monitor_output): Likewise.
10262 * win32-i386-low.c (handle_output_debug_string): New.
10263 (win32_kill): Handle OUTPUT_DEBUG_STRING_EVENT events using
10264 handle_output_debug_string.
10265 (get_child_debug_event): Likewise.
10266
506c7aa0
DJ
102672007-03-27 Mat Hostetter <mat@lcs.mit.edu>
10268
10269 * server.c (main): Correct strtoul check.
10270
42c81e2a
DJ
102712007-03-27 Jon Ringle <jon@ringle.org>
10272
10273 * linux-low.c: Check __ARCH_HAS_MMU__ also.
10274
9453113a
DJ
102752007-03-27 Brooks Moses <brooks.moses@codesourcery.com>
10276
10277 * Makefile.in: Add dummy "pdf" and "install-pdf" targets.
10278
64a69107
DJ
102792007-02-27 Daniel Jacobowitz <dan@codesourcery.com>
10280
10281 * terminal.h: Check HAVE_SGTTY_H.
10282
102832007-02-27 Mat Hostetter <mat@lcs.mit.edu>
6f8486da
DJ
10284
10285 * remote-utils.c (remote_open): Print out the assigned port number.
10286
c74d0ad8
DJ
102872007-02-26 Daniel Jacobowitz <dan@codesourcery.com>
10288
10289 * remote-utils.c (monitor_output): New function.
10290 * server.c (debug_threads): Define here.
10291 (monitor_show_help): New function.
10292 (handle_query): Handle qRcmd.
10293 (main): Do not handle 'd' packet.
10294 * server.h (debug_threads, remote_debug, monitor_output): Declare.
10295 * linux-low.c, spu-low.c, win32-i386-low.c: Remove definitions
10296 of debug_threads.
10297
de7c3b4a
PA
102982007-02-25 Pedro Alves <pedro_alves@portugalmail.pt>
10299
10300 * Makefile.in (EXEEXT): New.
10301 (clean): Use $(EXEEXT).
10302
ef57601b
PA
103032007-02-25 Pedro Alves <pedro_alves@portugalmail.pt>
10304
10305 * target.h (target_ops): Rename send_signal to request_interrupt,
10306 and remove enum target_signal parameter.
10307 * linux-low.c (linux_request_interrupt): Rename from
10308 linux_send_signal, and always send SIGINT.
10309 * spu-low.c (spu_request_interrupt): Rename from spu_send_signal,
10310 and always send SIGINT.
10311 * remote-utils.c (putpkt_binary): Call request_interrupt, instead
10312 of send_signal.
10313 (input_interrupt): Likewise.
10314
820f2bda
PA
103152007-02-25 Pedro Alves <pedro_alves@portugalmail.pt>
10316
10317 * server.c (get_features_xml): Check if target implemented
10318 arch_string.
10319 * win32-i386-low.c (win32_arch_string): New.
10320 (win32_target_ops): Add win32_arch_string as arch_string member.
10321
ab39bf24
UW
103222007-02-22 Markus Deuling <deuling@de.ibm.com>
10323
10324 * spu-low.c (spu_arch_string): New.
10325 (spu_target_ops): Add spu_arch_string.
10326
61ff6e04
DJ
103272007-02-16 Daniel Jacobowitz <dan@codesourcery.com>
10328
10329 * remote-utils.c: Remove HAVE_TERMINAL_H check.
10330 * configure.ac: Do not check for terminal.h.
10331 * configure, config.in: Regenerated.
10332
fb1e4ffc
DJ
103332007-02-08 Daniel Jacobowitz <dan@codesourcery.com>
10334
10335 * Makefile.in (OBS): Add $(XML_BUILTIN).
10336 (XML_DIR, XML_TARGET, XML_FILES, XML_BUILTIN): New.
10337 (clean): Update.
10338 (target.xml, xml-builtin.c, stamp-xml, arm-with-iwmmxt.o)
10339 (arm-with-iwmmxt.c): New.
10340 * config.in, configure: Regenerate.
10341 * configure.ac: Check for iWMMXt. Handle srv_xmltarget,
10342 srv_xmlbuiltin, and srv_xmlfiles. Define USE_XML.
10343 * configure.srv: Mention srv_xmltarget and srv_xmlfiles.
10344 (arm*-*-linux*): Add iWMMXt and regset support.
10345 * linux-arm-low.c (PTRACE_GETWMMXREGS, PTRACE_SETWMMXREGS): Define.
10346 (arm_fill_gregset, arm_store_gregset, arm_fill_wmmxregset)
10347 (arm_store_wmmxregset, target_regsets): New.
10348 * server.c (get_features_xml): Take annex argument. Check builtin
10349 XML documents.
10350 (handle_query): Handle multiple annexes.
10351
0f48aa01
DJ
103522007-01-29 Daniel Jacobowitz <dan@codesourcery.com>
10353
10354 * remote-utils.c [USE_WIN32API] (read, write): Define.
10355 (putpkt_binary, input_interrupt, readchar, getpkt): Use read and
10356 write.
10357
23181151
DJ
103582007-01-09 Daniel Jacobowitz <dan@codesourcery.com>
10359
10360 * linux-i386-low.c (the_low_target): Set arch_string.
10361 * linux-x86-64-low.c (the_low_target): Likewise.
10362 * linux-low.c (linux_arch_string): New.
10363 (linux_target_ops): Add it.
10364 * linux-low.h (struct linux_target_ops): Add arch_string.
10365 * server.c (write_qxfer_response): Use const void * for DATA.
10366 (get_features_xml): New.
10367 (handle_query): Handle qXfer:features:read. Report it for qSupported.
10368 * target.h (struct target_ops): Add arch_string method.
10369
9d606399
DJ
103702007-01-03 Denis Pilat <denis.pilat@st.com>
10371 Daniel Jacobowitz <dan@codesourcery.com>
10372
10373 * linux-low.c (linux_kill): Handle being called with no threads.
10374 * win32-i386-low.c (win32_kill): Likewise.
10375 (get_child_debug_event): Clear current_process_handle.
10376
103772006-12-30 Denis PILAT <denis.pilat@st.com>
8264bb58
DJ
10378 Daniel Jacobowitz <dan@codesourcery.com>
10379
10380 * remote-utils.c (remote_open): Check the type of specified
10381 serial port devices before opening them.
10382 * server.c (main): Kill the inferior if an error occurs during
10383 the first remote_open.
10384
a5e13d24
DJ
103852006-12-05 Markus Deuling <deuling@de.ibm.com>
10386
10387 * README: Update supported targets.
10388
186947f7
DJ
103892006-11-28 Daniel Jacobowitz <dan@codesourcery.com>
10390
10391 * Makefile.in (clean): Remove reg-mips64.c.
10392 (reg-mips64.c, reg-mips64.o): New rules.
10393 * configure.srv: Handle mips64. Include regset support for mips.
10394 * linux-mips-low.c (union mips_register): New.
10395 (mips_get_pc, mips_set_pc, mips_reinsert_addr): Use it.
10396 (mips_breakpoint, mips_breakpoint_at): Use int.
10397 (mips_collect_register, mips_supply_register)
10398 (mips_collect_register_32bit, mips_supply_register_32bit)
10399 (mips_fill_gregset, mips_store_gregset, mips_fill_fpregset)
10400 (mips_store_fpregset, target_regsets): New.
10401 * thread-db.c (thread_db_get_tls_address): Use uintptr_t.
10402
a13e2c95
UW
104032006-11-22 Ulrich Weigand <uweigand@de.ibm.com>
10404
10405 * configure.srv: Add target "spu*-*-*".
10406 * Makefile.in (clean): Remove reg-spu.c.
10407 (reg-spu.c, reg-spu.o, spu-low.o): Add dependencies.
10408 * spu-low.c: New file.
10409
cb7283db
DJ
104102006-11-16 Daniel Jacobowitz <dan@codesourcery.com>
10411
10412 * configure.ac: Correct td_thr_tls_get_addr test.
10413 * configure: Regenerated.
10414
89be2091
DJ
104152006-11-16 Daniel Jacobowitz <dan@codesourcery.com>
10416
10417 * linux-low.c (linux_wait_for_event): Reformat. Use the
10418 pass_signals array.
10419 * remote-utils.c (decode_address_to_semicolon): New.
10420 * server.c (pass_signals, handle_general_set): New.
10421 (handle_query): Mention QPassSignals for qSupported.
10422 (main): Call handle_general_set.
10423 * server.h (pass_signals, decode_address_to_semicolon): New.
10424
000ef4f0
DJ
104252006-11-06 Daniel Jacobowitz <dan@codesourcery.com>
10426
10427 * server.c (handle_query): Correct error handling for read_auxv.
10428
b7149293
UW
104292005-10-19 Ulrich Weigand <uweigand@de.ibm.com>
10430
10431 * configure.srv [s390-*-linux*, s390x-*-linux*]: Set srv_linux_regsets
10432 and srv_linux_thread_db to yes.
10433 * linux-s390-low.c (s390_fill_gregset): New function.
10434 (target_regsets): Define data structure.
10435
dae5f5cf
DJ
104362006-10-17 Daniel Jacobowitz <dan@codesourcery.com>
10437
10438 * acinclude.m4 (SRV_CHECK_TLS_GET_ADDR): New.
10439 * configure.ac: Use it. Define HAVE_TD_THR_TLS_GET_ADDR.
10440 * config.in, configure: Regenerated.
10441 * inferiors.c (gdb_id_to_thread): New function.
10442 (gdb_id_to_thread_id): Use it.
10443 * linux-low.c (linux_target_ops): Use thread_db_get_tls_address.
10444 * linux-low.h (struct process_info): Add th member.
10445 (thread_db_get_tls_address): New prototype.
10446 * remote-utils.c (decode_address): Make non-static.
10447 * server.c (handle_query): Handle qGetTLSAddr.
10448 * server.h (gdb_id_to_thread, decode_address): New prototypes.
10449 * target.h (struct target_ops): Add get_tls_address.
10450 * thread-db.c (maybe_attach_thread): Save the thread handle.
10451 (thread_db_get_tls_address): New.
10452
32ca6d61
DJ
104532006-09-28 Daniel Jacobowitz <dan@codesourcery.com>
10454
10455 * linux-low.c (PTRACE_GETSIGINFO, PTRACE_SETSIGINFO): Define.
10456 (linux_resume_one_process): Take a siginfo_t *. Update all
10457 callers. Queue it if necessary. Use PTRACE_SETSIGINFO.
10458 (struct pending_signals): Add a siginfo_t.
10459 (linux_wait_for_process): Always set last_status.
10460 (linux_wait_for_event): Use PTRACE_GETSIGINFO.
10461 (linux_queue_one_thread): Use PTRACE_GETSIGINFO.
10462 * linux-low.h (struct process_info): Add last_status.
10463
5ffff7c1
DJ
104642006-09-21 Daniel Jacobowitz <dan@codesourcery.com>
10465
10466 * remote-utils.c (try_rle): New function.
10467 (putpkt_binary): Use it.
10468
8695c747
DJ
104692006-08-19 Daniel Jacobowitz <dan@codesourcery.com>
10470
10471 * Makefile.in (clean): Clean reg-x86-64-linux.c.
10472 (reg-x86-64-linux.o, reg-x86-64-linux.c): New.
10473 * configure.srv (x86_64-*-linux*): Use reg-x86-64-linux.o.
10474 * linux-x86-64-low.c (x86_64_regmap): Include ORIG_RAX.
10475 (x86_64_fill_gregset, x86_64_store_gregset): Skip floating
10476 point registers.
10477
290fadea
RS
104782006-08-08 Richard Sandiford <richard@codesourcery.com>
10479
10480 * server.c (terminal_fd): New variable.
10481 (old_foreground_pgrp): Likewise.
10482 (restore_old_foreground_pgrp): New function.
10483 (start_inferior): Record the terminal file descriptor in terminal_fd
10484 and its original foreground group in old_foreground_pgrp. Register
10485 restore_old_foreground_pgrp with atexit().
10486
9f2e1e63
DJ
104872006-07-26 Daniel Jacobowitz <dan@codesourcery.com>
10488
10489 * server.c (handle_query): Correct qPart to qXfer.
10490
b80864fb
DJ
104912006-07-22 Daniel Jacobowitz <dan@codesourcery.com>
10492
10493 * configure.ac: Check for more headers which are missing on
10494 Windows. Automatically supply -lwsock32 and USE_WIN32API.
10495 * configure.srv: Add Cygwin and mingw32.
10496 * remote-utils.c: Don't include headers unconditionally which
10497 are missing on mingw32. Include <winsock.h> for mingw32.
10498 (remote_open): Adjust for mingw32 support. Flush
10499 standard error after writing to it.
10500 (remote_close, putpkt_binary, input_interrupt, block_async_io)
10501 (unblock_async_io, enable_async_io, disable_async_io)
10502 (readchar, getpkt): Update for Winsock support.
10503 (prepare_resume_reply): Expect a protocol signal number.
10504 * server.c: Disable <sys/wait.h> on mingw32.
10505 (start_inferior): Adjust for mingw32 support. Flush
10506 standard error after writing to it.
10507 (attach_inferior): Likewise. Use protocol signal
10508 numbers.
10509 (main): Skip 'D' packet on mingw32. Use protocol signal numbers
10510 and names.
10511 * win32-i386-low.c: New file.
10512 * Makefile.in (XM_CLIBS): Set.
10513 (gdbserver, gdbreplay): Use $(INTERNAL_CFLAGS).
10514 (win32-i386-low.o): New dependency rule.
10515 * linux-low.c (linux_wait): Use target signal numbers.
10516 * target.h (struct target_ops): Doc fix.
10517 * server.h (target_signal_to_name): New prototype.
10518 * gdbreplay.c: Don't include headers unconditionally which
10519 are missing on mingw32. Include <winsock.h> for mingw32.
10520 (remote_close, remote_open): Adjust for Winsock support.
10521 * configure, config.in: Regenerated.
10522
0876f84a
DJ
105232006-07-12 Daniel Jacobowitz <dan@codesourcery.com>
10524
10525 * server.c (decode_xfer_read, write_qxfer_response): New.
10526 (handle_query): Take a packet length argument. Handle
10527 qXfer:auxv:read instead of qPart:auxv:read. Mention it in
10528 the qSupported response.
10529 (main): Update call to handle_query.
10530
01f9e8fa
DJ
105312006-06-22 Daniel Jacobowitz <dan@codesourcery.com>
10532
10533 * remote-utils.c (remote_escape_output, remote_unescape_input): New.
10534 (putpkt_binary): Renamed from putpkt and adjusted for binary
10535 data.
10536 (putpkt): New wrapper for putpkt_binary.
10537 (readchar): Don't mask off the high bit.
10538 (decode_X_packet): New function.
10539 * server.c (main): Call putpkt_binary if a handler sets the packet
10540 length. Save the length of the incoming packet. Handle 'X'.
10541 * server.h (gdb_byte, remote_escape_output, decode_X_packet): New.
10542
be2a5f71
DJ
105432006-06-21 Daniel Jacobowitz <dan@codesourcery.com>
10544
10545 * server.c (handle_query): Handle qSupported.
10546
ea025f5f
DJ
105472006-05-30 Daniel Jacobowitz <dan@codesourcery.com>
10548
10549 * remote-utils.c (all_symbols_looked_up): New variable.
10550 (look_up_one_symbol): Check it.
10551 * server.h (look_up_one_symbol): New declaration.
10552 * thread-db.c (thread_db_init): Set all_symbols_looked_up.
10553
9308fc88
DJ
105542006-05-30 Daniel Jacobowitz <dan@codesourcery.com>
10555
10556 * Makefile.in (linux-arm-low.o): Update dependencies.
66f338c7 10557 * linux-arm-low.c: Include "gdb_proc_service.h".
9308fc88
DJ
10558 (PTRACE_GET_THREAD_AREA): Define.
10559 (ps_get_thread_area): New function.
10560
52fb6437
NS
105612006-05-09 Nathan Sidwell <nathan@codesourcery.com>
10562
10563 * configure.srv (m68k*-*-uclinux*): New target.
10564 * linux-low.c (linux_create_inferior): Use vfork on mmuless systems.
10565 (linux_resume_one_process): Remove extraneous cast.
10566 (linux_read_offsets): New.
10567 (linux_target_op): Add linux_read_offsets on mmuless systems.
10568 * server.c (handle_query): Add qOffsets logic.
10569 * target.h (struct target_ops): Add read_offsets.
10570
21b0f40c
DJ
105712006-03-15 Daniel Jacobowitz <dan@codesourcery.com>
10572
10573 * linux-mips-low.c: Include <sys/ptrace.h> and "gdb_proc_service.h".
10574 (PTRACE_GET_THREAD_AREA): Define.
10575 (ps_get_thread_area): New function.
10576 * Makefile.in (linux-i386-low.o, linux-mips-low.o)
10577 (linux-x86-64-low.o): Update.
10578
0050a760
DJ
105792006-03-15 Daniel Jacobowitz <dan@codesourcery.com>
10580
10581 * configure.ac: Remove checks for prfpregset_t.
10582 * gdb_proc_service.h: New file.
10583 * linux-i386-low.c, linux-x86-64-low.c, thread-db.c: Use the
10584 new "gdb_proc_service.h".
10585 * proc-service.c: Likewise.
10586 (ps_pglobal_lookup, ps_pdread, ps_pdwrite): Use psaddr_t.
10587 (ps_lgetfpregs, ps_lsetfpregs): Use a void* argument.
10588 * Makefile.in (gdb_proc_service_h): Updated.
10589 * configure, config.in: Regenerated.
10590
b92a518e
DJ
105912006-03-03 Daniel Jacobowitz <dan@codesourcery.com>
10592
10593 * remote-utils.c (prepare_resume_reply): Move declaration
10594 of gdb_id_from_wait to the top of the block.
10595
545587ee
DJ
105962006-02-15 Daniel Jacobowitz <dan@codesourcery.com>
10597
10598 * linux-low.c (regsets_store_inferior_registers): Read the regset
10599 from the target before filling it.
10600
9db87ebd
DJ
106012006-02-08 Daniel Jacobowitz <dan@codesourcery.com>
10602
10603 * server.c (attach_inferior): Return SIGTRAP for a successful
10604 attach.
10605
dd24457d
DJ
106062006-02-01 Daniel Jacobowitz <dan@codesourcery.com>
10607
10608 * Makefile.in (OBS): Add version.o.
10609 (STAGESTUFF): Delete.
10610 (version.o): Add dependencies.
10611 (version.c): Replace rule.
10612 (clean): Remove version.c.
10613 * server.c (gdbserver_version): New.
10614 (gdbserver_usage): Use printf.
10615 (main): Handle --version and --help.
10616 * server.h (version, host_name): Add declarations.
10617
6f0f660e
EZ
106182005-12-23 Eli Zaretskii <eliz@gnu.org>
10619
889bf7c5
PA
10620 * linux-arm-low.c:
10621 * linux-arm-low.c:
10622 * inferiors.c:
10623 * i387-fp.h:
10624 * i387-fp.c:
10625 * gdbreplay.c:
10626 * regcache.c:
10627 * proc-service.c:
10628 * mem-break.h:
10629 * mem-break.c:
10630 * linux-x86-64-low.c:
10631 * linux-sh-low.c:
10632 * linux-s390-low.c:
10633 * linux-ppc64-low.c:
10634 * linux-ppc-low.c:
10635 * linux-mips-low.c:
10636 * linux-m68k-low.c:
10637 * linux-m32r-low.c:
10638 * linux-low.h:
10639 * linux-low.c:
10640 * linux-ia64-low.c:
10641 * linux-i386-low.c:
10642 * linux-crisv32-low.c:
10643 * thread-db.c:
10644 * terminal.h:
10645 * target.h:
10646 * target.c:
10647 * server.h:
10648 * server.c:
10649 * remote-utils.c:
10650 * regcache.h:
10651 * utils.c:
10652 * Makefile.in:
10653 * configure.ac:
6f0f660e
EZ
10654 * gdbserver.1: Add (C) after Copyright. Update the FSF
10655 address.
10656
9d1fb177
DJ
106572005-11-13 Daniel Jacobowitz <dan@codesourcery.com>
10658
10659 * linux-arm-low.c (arm_eabi_breakpoint): New variable.
10660 (arm_breakpoint_at): Recognize both breakpoints.
10661 (the_low_target): Use the correct breakpoint instruction.
10662
011a70c2
DJ
106632005-11-02 Daniel Jacobowitz <dan@codesourcery.com>
10664
10665 * configure.srv (x86_64-*-linux*): Turn on thread_db support.
10666 * linux-x86-64-low.c (x86_64_breakpoint, x86_64_breakpoint_len)
10667 (x86_64_get_pc, x86_64_set_pc, x86_64_breakpoint_at): New.
10668 (the_low_target): Update.
10669
7fb85e41
AS
106702005-10-25 Andreas Schwab <schwab@suse.de>
10671
10672 * server.c (main): Allocate mem_buf with PBUFSIZ bytes.
10673
10674 * linux-ia64-low.c (ia64_regmap): Remove NAT registers.
10675 (ia64_num_regs): Reduce to 462.
10676
3db0444b
DJ
106772005-09-17 Daniel Jacobowitz <dan@codesourcery.com>
10678
10679 * acinclude.m4: Correct quoting.
10680 * aclocal.m4: Regenerated.
10681
10682 Suggested by SZOKOVACS Robert <szo@ies.hu>:
10683 * thread-db.c (thread_db_err_str): Handle TD_VERSION.
10684 (thread_db_init): Call thread_db_err_str.
10685 * configure.ac: Check for TD_VERSION.
10686 * config.in, configure: Regenerated.
10687
bee0189a
DJ
106882005-07-31 Kaveh R. Ghazi <ghazi@caip.rutgers.edu>
10689
10690 * server.h (error, fatal, warning): Add ATTR_FORMAT.
10691
e9d25b98
DJ
106922005-07-13 Daniel Jacobowitz <dan@codesourcery.com>
10693
10694 * configure.ac: Define HAVE_LINUX_REGSETS even if PTRACE_GETREGS
10695 is not available. Define HAVE_PTRACE_GETREGS if it is.
10696 * config.in, configure: Regenerated.
10697 * configure.srv: Set srv_linux_regsets for PowerPC and PowerPC64.
10698 * linux-i386-low.c, linux-m68k-low.c: Update to use
10699 HAVE_PTRACE_GETREGS.
10700 * linux-low.c (regsets_fetch_inferior_registers)
10701 (regsets_store_inferior_registers): Only return 0 if we processed
10702 GENERAL_REGS.
10703 * linux-ppc-low.c (ppc_fill_gregset, target_regsets): New.
10704 * linux-ppc64-low.c (ppc_fill_gregset, target_regsets): New.
10705
a06660f7
DJ
107062005-07-13 Daniel Jacobowitz <dan@codesourcery.com>
10707
10708 * inferiors.c (struct thread_info): Add gdb_id.
10709 (add_thread): Add gdb_id argument.
10710 (thread_id_to_gdb_id, thread_to_gdb_id, gdb_id_to_thread_id): New.
10711 * linux-low.c (linux_create_inferior, linux_attach_lwp): Update
10712 calls to add_thread.
10713 * remote-utils.c (prepare_resume_reply: Use thread_to_gdb_id.
10714 * server.c (handle_query): Use thread_to_gdb_id.
10715 (handle_v_cont, main): Use gdb_id_to_thread_id.
10716 * server.h (add_thread): Update prototype.
10717 (thread_id_to_gdb_id, thread_to_gdb_id, gdb_id_to_thread_id): New
10718 prototypes.
10719
5a1f5858
DJ
107202005-07-13 Daniel Jacobowitz <dan@codesourcery.com>
10721
10722 * linux-low.c (fetch_register, usr_store_inferior_registers): Handle
10723 left-padded registers.
10724 * linux-low.h (struct linux_target_ops): Add left_pad_xfer.
10725 * linux-ppc64-low.c (the_low_target): Set left_pad_xfer.
10726
e122f1f5
SE
107272005-07-01 Steve Ellcey <sje@cup.hp.com>
10728
10729 * configure.ac (BFD_NEED_DECLARATION): Replace with AC_CHECK_DECLS.
10730 * configure: Regenerate.
10731 * config.in: Regenerate.
10732 * server.h (NEED_DECLARATION_STRERROR):
10733 Replace with !HAVE_DECL_STRERROR.
10734
d592fa2f
DJ
107352005-06-16 Daniel Jacobowitz <dan@codesourcery.com>
10736
10737 * linux-low.c (linux_wait, linux_send_signal): Don't test
10738 an unsigned long variable for > 0 if it could be MAX_ULONG.
10739 * server.c (myresume): Likewise.
10740 * target.c (set_desired_inferior): Likewise.
10741
ccbd4912
MK
107422005-06-13 Mark Kettenis <kettenis@gnu.org>
10743
10744 * configure.ac: Simplify and improve check for socklen_t.
10745 * configure, config.in: Regenerate.
10746
f450004a
DJ
107472005-06-12 Daniel Jacobowitz <dan@codesourcery.com>
10748
10749 * acconfig.h: Remove.
10750 * configure.ac: Add a test for socklen_t. Use three-argument
10751 AC_DEFINE throughout.
10752 * config.in: Regenerated using autoheader 2.59.
10753 * configure: Regenerated.
10754
10755 * gdbreplay.c (socklen_t): Provide a default.
10756 (remote_open): Use socklen_t.
10757 * remote-utils.c (socklen_t): Provide a default.
10758 (remote_open): Use socklen_t.
10759 (convert_int_to_ascii, convert_ascii_to_int, decode_M_packet): Use
10760 unsigned char.
10761
10762 * i387-fp.c (struct i387_fsave, struct i387_fxsave): Use unsigned
10763 char for buffers.
10764 * linux-low.c (linux_read_memory, linux_write_memory)
10765 (linux_read_auxv): Likewise.
10766 * mem-break.c (breakpoint_data, set_breakpoint_data, check_mem_read)
10767 (check_mem_write): Likewise.
10768 * mem-break.h (set_breakpoint_data, check_mem_read, check_mem_write):
10769 Likewise.
10770 * regcache.c (struct inferior_rgcache_data, registers_to_string)
10771 (registers_from_string, register_data): Likewise.
10772 * server.c (handle_query, main): Likewise.
10773 * server.h (convert_ascii_to_int, convert_int_to_ascii)
10774 (decode_M_packet): Likewise.
10775 * target.c (read_inferior_memory, write_inferior_memory): Likewise.
10776 * target.h (struct target_ops): Update read_memory, write_memory,
10777 and read_auxv.
10778 (read_inferior_memory, write_inferior_memory): Update.
10779 * linux-low.h (struct linux_target_ops): Change type of breakpoint
10780 to unsigned char *.
10781 * linux-arm-low.c, linux-cris-low.c, linux-crisv32-low.c,
10782 linux-i386-low.c, linux-m32r-low.c, linux-m68k-low.c,
10783 linux-mips-low.c, linux-ppc-low.c, linux-ppc64-low.c,
10784 linux-s390-low.c, linux-sh-low.c: Update for changes in
10785 read_inferior_memory and the_low_target->breakpoint.
10786
eee84df1
DJ
107872005-05-28 Daniel Jacobowitz <dan@codesourcery.com>
10788
10789 * Makefile.in (SFILES): Add linux-ppc64-low.c.
10790 (linux-ppc64-low.o, reg-ppc64.c, reg-ppc64.o): New targets.
10791 * configure.srv: Add powerpc64-*-linux*.
10792 * linux-ppc64-low.c: New file.
10793
45b134e5
OF
107942005-05-23 Orjan Friberg <orjanf@axis.com>
10795
10796 * linux-cris-low.c: New file with support for CRIS.
10797 * linux-crisv32-low.c: Ditto for CRISv32.
10798 * Makefile.in (SFILES): Add linux-cris-low.c, linux-crisv32-low.c.
10799 (clean): Add reg-cris.c and reg-crisv32.c.
889bf7c5 10800 Add linux-cris-low.o, linux-crisv32-low.o, reg-cris.o, reg-cris.c,
45b134e5
OF
10801 reg-crisv32.o, and reg-crisv32.c to make rules.
10802 * configure.srv: Add cris-*-linux* and crisv32-*-linux* to list of
10803 recognized targets.
10804
48d93c75
UW
108052005-05-16 Ulrich Weigand <uweigand@de.ibm.com>
10806
10807 * linux-low.c (fetch_register): Ensure buffer size is a multiple
10808 of sizeof (PTRACE_XFER_TYPE).
10809 (usr_store_inferior_registers): Likewise. Zero out excess bytes.
10810
e013ee27
OF
108112005-05-12 Orjan Friberg <orjanf@axis.com>
10812
889bf7c5 10813 * target.h (struct target_ops): Add insert_watchpoint,
e013ee27
OF
10814 remove_watchpoint, stopped_by_watchpoint, stopped_data_address function
10815 pointers for hardware watchpoint support.
10816 * linux-low.h (struct linux_target_ops): Ditto.
10817 * linux-low.c (linux_insert_watchpoint, linux_remove_watchpoint)
10818 (linux_stopped_by_watchpoint, linux_stopped_data_address): New. Add
10819 to linux_target_ops.
10820 * remote-utils.c (prepare_resume_reply): Add watchpoint information to
10821 reply packet.
10822 * server.c (main): Recognize 'Z' and 'z' packets.
10823
b0ded00b
UW
108242005-05-10 Ulrich Weigand <uweigand@de.ibm.com>
10825
10826 * linux-s390-low.c (s390_breakpoint, s390_breakpoint_len): Define.
10827 (s390_get_pc, s390_set_pc, s390_breakpoint_at): New functions.
10828 (the_low_target): Add new members.
10829
8643e2ad
DJ
108302005-05-04 Daniel Jacobowitz <dan@codesourcery.com>
10831
10832 * proc-service.c (ps_lgetregs): Search all_processes instead of
10833 all_threads.
10834
fc620387
DJ
108352005-05-04 Daniel Jacobowitz <dan@codesourcery.com>
10836
10837 * server.c (start_inferior): Change return type to int.
10838 (attach_inferior): Change sigptr to int *.
10839 (handle_v_cont, handle_v_requests): Change signal to int *.
10840 (main): Change signal to int.
10841
108422005-04-15 Kei Sakamoto <sakamoto.kei@renesas.com>
7cfbc4a0
KI
10843
10844 * Makefile.in: Add linux-m32r-low.o, reg-m32r.c and reg-m32r.o.
10845 * configure.srv: Add m32r*-*-linux*.
10846 * linux-m32r-low.c: New file.
10847
e0e76420
DJ
108482005-03-04 Daniel Jacobowitz <dan@codesourcery.com>
10849
10850 * Makefile.in (stamp-h): Set CONFIG_HEADERS explicitly.
10851
a1928bad
DJ
108522005-03-03 Daniel Jacobowitz <dan@codesourcery.com>
10853
10854 * inferiors.c (change_inferior_id, add_thread, find_inferior_id):
10855 Take unsigned long arguments for PIDs.
10856 * linux-low.c (add_process, linux_attach_lwp, linux_attach)
10857 (linux_thread_alive, linux_wait_for_event, kill_lwp, send_sigstop)
10858 (wait_for_sigstop, linux_resume_one_process)
10859 (regsets_fetch_inferior_registers, linux_send_signal)
10860 (linux_read_auxv): Likewise. Update the types of variables holding
10861 PIDs. Update format string specifiers.
10862 * linux-low.h (struct process_info, linux_attach_lwp): Likewise.
10863 * remote-utils.c (prepare_resume_reply): Likewise.
10864 * server.c (cont_thread, general_thread, step_thread)
10865 (thread_from_wait, old_thread_from_wait, signal_pid): Change type to
10866 unsigned long.
10867 (handle_query): Update format specifiers.
10868 (handle_v_cont, main): Use strtoul for thread IDs.
10869 * server.h (struct inferior_list_entry): Use unsigned long for ID.
10870 (add_thread, find_inferior_id, change_inferior_id, cont_thread)
10871 (general_thread, step_thread, thread_from_wait)
10872 (old_thread_from_wait): Update.
10873 * target.h (struct thread_resume): Use unsigned long for THREAD.
10874 (struct target_ops): Use unsigned long for arguments to attach and
10875 thread_alive.
10876
dcdb98d2
DJ
108772005-02-24 Daniel Jacobowitz <dan@codesourcery.com>
10878
10879 * acinclude.m4: Include bfd/bfd.m4 directly.
10880 * configure.ac: Use AC_ARG_PROGRAM. Suggested by Aron Griffis
10881 <agriffis@toolchain.org>.
10882 * aclocal.m4, configure: Regenerated.
10883
bec39cab
AC
108842005-01-07 Andrew Cagney <cagney@gnu.org>
10885
10886 * configure.ac: Rename configure.in, require autoconf 2.59.
10887 * configure: Re-generate.
10888
434c4c77
DJ
108892004-12-08 Daniel Jacobowitz <dan@debian.org>
10890
10891 * acinclude.m4 (SRV_CHECK_THREAD_DB): Add ps_get_thread_area. Reset
10892 LIBS when finished.
10893 * aclocal.m4: Regenerated.
10894 * configure: Regenerated.
10895
db1d3e1b
AS
108962004-11-21 Andreas Schwab <schwab@suse.de>
10897
10898 * linux-m68k-low.c (m68k_num_gregs): Define.
10899 (m68k_fill_gregset, m68k_store_gregset, m68k_fill_fpregset)
10900 (m68k_store_fpregset, target_regsets) [HAVE_LINUX_REGSETS]: New.
10901 (m68k_breakpoint, m68k_breakpoint_len, m68k_get_pc, m68k_set_pc)
10902 (m68k_breakpoint_at): New. Add to the_low_target.
10903
10904 * configure.srv (m68*-*-linux*): Set srv_linux_regsets and
10905 srv_linux_thread_db to yes.
10906
43360365
JB
109072004-10-20 Joel Brobecker <brobecker@gnat.com>
10908
10909 * linux-x86-64-low.c (ARCH_SET_GS): Add definition if missing.
10910 (ARCH_SET_FS): Likewise.
10911 (ARCH_GET_FS): Likewise.
10912 (ARCH_GET_GS): Likewise.
10913
fd500816
DJ
109142004-10-16 Daniel Jacobowitz <dan@debian.org>
10915
10916 * linux-i386-low.c (ps_get_thread_area): New.
10917 * linux-x86-64-low.c (ps_get_thread_area): New.
10918 * linux-low.c: Include <sys/syscall.h>.
10919 (linux_kill_one_process): Don't kill the first thread here.
10920 (linux_kill): Kill the first thread here.
10921 (kill_lwp): New function.
10922 (send_sigstop, linux_send_signal): Use it.
10923 * proc-service.c: Clean up #ifdefs.
10924 (fpregset_info): Delete.
10925 (ps_lgetregs): Update and enable implementation.
10926 (ps_lsetregs, ps_lgetfpregs, ps_lsetfpregs): Remove disabled
10927 implementations.
10928 * remote-utils.c (struct sym_cache, symbol_cache): New.
10929 (input_interrupt): Print a clearer message.
10930 (async_io_enabled): New variable.
10931 (enable_async_io, disable_async_io): Use it. Update comments.
10932 (look_up_one_symbol): Use the symbol cache.
10933 * thread-db.c (thread_db_look_up_symbols): New function.
10934 (thread_db_init): Update comments. Call thread_db_look_up_symbols.
10935
f6de3c42
DJ
109362004-10-16 Daniel Jacobowitz <dan@debian.org>
10937
10938 * configure.in: Test for -rdynamic.
10939 * configure: Regenerated.
10940 * Makefile (INTERNAL_LDFLAGS): New.
10941 (gdbserver, gdbreplay): Use it.
10942
2c0fc042
AC
109432004-09-02 Andrew Cagney <cagney@gnu.org>
10944
10945 * Makefile.in (TAGS): Replace TM_FILE with DEPRECATED_TM_FILE.
10946
075b3282
DJ
109472004-03-23 Daniel Jacobowitz <drow@mvista.com>
10948
10949 * linux-low.c (linux_wait): Clear all_processes list also.
10950
fa6a77dc
DJ
109512004-03-12 Daniel Jacobowitz <drow@mvista.com>
10952
10953 * linux-low.c: Include <errno.h>. Remove extern declaration of
10954 errno.
10955
6d782a97
DJ
109562004-03-12 Daniel Jacobowitz <drow@mvista.com>
10957
10958 * gdbreplay.c, server.h, utils.c: Update copyright years.
10959
3a7fb99b
DJ
109602004-03-04 Nathan J. Williams <nathanw@wasabisystems.com>
10961
10962 * server.c (main): Print child status or termination signal from
10963 variable 'signal', not 'sig'.
10964
c3e735a6
DJ
109652004-03-04 Nathan J. Williams <nathanw@wasabisystems.com>
10966
10967 * linux-low.c (linux_read_memory): Change return type to
10968 int. Check for and return error from ptrace().
10969 * target.c (read_inferior_memory): Change return type to int. Pass
10970 back return status from the_target->read_memory().
10971 * target.h (struct target_ops): Adapt *read_memory() prototype.
10972 Update comment.
10973 (read_inferior_memory): Adapt prototype.
10974 * server.c (main): Return an error packet if
10975 read_inferior_memory() returns an error.
10976
a59d1c82
DJ
109772004-03-04 Daniel Jacobowitz <drow@mvista.com>
10978
10979 * Makefile.in (distclean): Remove config.h, stamp-h, and config.log.
10980 Unify with other clean targets.
10981
dc3f8883
DJ
109822004-02-29 Daniel Jacobowitz <drow@mvista.com>
10983
10984 * server.c (handle_v_cont): Call set_desired_inferior.
10985
89a208da
DJ
109862004-02-29 Daniel Jacobowitz <drow@mvista.com>
10987
10988 * remote-utils.c (prepare_resume_reply): Always supply "thread:".
10989
62ea82f5
DJ
109902004-02-29 Daniel Jacobowitz <drow@mvista.com>
10991
10992 * linux-low.c (linux_wait): Unblock async I/O.
10993 (linux_resume): Block and enable async I/O.
10994 * remote-utils.c (block_async_io, unblock_async_io): New functions.
10995 * server.h (block_async_io, unblock_async_io): Add prototypes.
10996
6910d122
DJ
109972004-02-29 Daniel Jacobowitz <drow@mvista.com>
10998
10999 * remote-utils.c (remote_open): Print a status notice after
11000 opening a TCP port.
11001 * server.c (attach_inferior): Print a status notice after
11002 attaching.
11003
110042004-02-29 Daniel Jacobowitz <drow@mvista.com>
d677d77d
DJ
11005
11006 * linux-arm-low.c (arm_get_pc): Print out stop PC in debug mode.
11007
c89dc5d4
DJ
110082004-02-26 Daniel Jacobowitz <drow@mvista.com>
11009
11010 * remote-utils.c (write_enn): Use "E01" instead of "ENN" for the
11011 error packet.
11012 * server.c, target.h: Update copyright years.
11013
4b8dad4a
RM
110142004-02-25 Roland McGrath <roland@redhat.com>
11015
11016 * target.h (struct target_ops): New member `read_auxv'.
11017 * server.c (handle_query): Handle qPart:auxv:read: query using that.
11018 * linux-low.c (linux_read_auxv): New function.
11019 (linux_target_ops): Initialize `read_auxv' member to that.
11020
d7446758
JB
110212004-02-17 Ulrich Weigand <Ulrich.Weigand@de.ibm.com>
11022
11023 Committed by Jim Blandy <jimb@redhat.com>.
11024
11025 * linux-s390-low.c (s390_num_regs): Update.
4b8dad4a 11026 (s390_regmap): Remove control registers. Use __s390x__ predefine
d7446758
JB
11027 instead of GPR_SIZE to distiguish s390 and s390x targets.
11028
5544ad89
DJ
110292004-01-31 Daniel Jacobowitz <drow@mvista.com>
11030
11031 * linux-low.c: Update copyright year.
11032 (check_removed_breakpoint): Clear pending_is_breakpoint.
11033 (linux_set_resume_request, linux_queue_one_thread)
11034 (resume_status_pending_p): New functions.
11035 (linux_continue_one_thread): Use process->resume.
11036 (linux_resume): Only resume threads if there are no pending events.
11037 * linux-low.h (struct process_info): Add resume request
11038 pointer.
11039
2a68b70e
DJ
110402004-01-30 Daniel Jacobowitz <drow@mvista.com>
11041
11042 * regcache.c (new_register_cache): Clear the allocated register
11043 buffer. Suggested by Atsushi Nemoto <anemo@mba.ocn.ne.jp>.
11044
64386c31
DJ
110452003-10-13 Daniel Jacobowitz <drow@mvista.com>
11046
11047 * linux-low.c (linux_resume): Take a struct thread_resume *
11048 argument.
11049 (linux_wait): Update call.
11050 (resume_ptr): New static variable.
11051 (linux_continue_one_thread): Renamed from
11052 linux_continue_one_process. Use resume_ptr.
11053 (linux_resume): Use linux_continue_one_thread.
11054 * server.c (handle_v_cont, handle_v_requests): New functions.
11055 (myresume): New function.
11056 (main): Handle 'v' case.
11057 * target.h (struct thread_resume): New type.
11058 (struct target_ops): Change argument of "resume" to struct
11059 thread_resume *.
11060 (myresume): Delete macro.
11061
c938e9b0
L
110622003-08-08 H.J. Lu <hongjiu.lu@intel.com>
11063
11064 * Makefile.in (install-only): Create dest dir. Support DESTDIR.
11065 (uninstall): Support DESTDIR.
11066
7f313d07
BC
11067Mon Jul 21 20:09:34 UTC 2003 Brendan Conoboy <blc@redhat.com>
11068
11069 * configure.srv: Add xscale*linux copy of arm*linux entry.
11070
3b2fc2ea
DJ
110712003-07-24 Daniel Jacobowitz <drow@mvista.com>
11072
11073 * linux-arm-low.c (arm_reinsert_addr): New function.
11074 (the_low_target): Add arm_reinsert_addr.
11075
1c0a559e
MK
110762003-07-08 Mark Kettenis <kettenis@gnu.org>
11077
11078 * mem-break.c: Remove whitespace at end of file.
11079
43d5792c
DJ
110802003-06-28 Daniel Jacobowitz <drow@mvista.com>
11081
11082 * configure.in: Check whether we need to prototype strerror.
11083 * server.h: Optionally prototype strerror.
11084 * gdbreplay.c (perror_with_name): Use strerror.
11085 * linux-low.c (linux_attach_lwp): Use strerror.
11086 * utils.c (perror_with_name): Use strerror.
11087 * config.in, configure: Regenerated.
11088
c8a86edf
DJ
110892003-06-28 Daniel Jacobowitz <drow@mvista.com>
11090
11091 * linux-sh-low.c (sh_regmap): Fix FP register offsets, reported by
11092 SUGIOKA Toshinobu <sugioka@itonet.co.jp>.
11093
73d37363
DJ
110942003-06-20 Daniel Jacobowitz <drow@mvista.com>
11095
11096 * Makefile.in (SFILES): Update.
11097 * low-hppabsd.c, low-lynx.c, low-nbsd.c, low-sim.c, low-sparc.c,
11098 low-sun3.c: Remove files.
11099
6ad8ae5c
DJ
111002003-06-17 Daniel Jacobowitz <drow@mvista.com>
11101
11102 * linux-low.c: Move comment to linux_thread_alive where it belonged.
11103 (linux_detach_one_process, linux_detach): New functions.
11104 (linux_target_ops): Add linux_detach.
11105 * server.c (main): Handle 'D' packet.
11106 * target.h (struct target_ops): Add "detach" member.
11107 (detach_inferior): Define.
11108
1581182a
MK
111092003-06-13 Mark Kettenis <kettenis@gnu.org>
11110
11111 From Kelley Cook <kelleycook@wideopenwest.com>:
11112 * configure.srv: Accept i[34567]86 variants.
11113
e5379b03
DJ
111142003-06-05 Daniel Jacobowitz <drow@mvista.com>
11115
11116 * linux-low.c (linux_wait_for_event): Correct comment typos.
11117 (linux_resume_one_process): Call check_removed_breakpoint.
11118 (linux_send_signal): New function.
11119 (linux_target_ops): Add linux_send_signal.
11120 * remote-utils.c (putpkt, input_interrupt): Use send_signal instead
11121 of kill.
11122 * target.h (struct target_ops): Add send_signal.
11123
2ff29de4
JB
111242003-05-29 Jim Blandy <jimb@redhat.com>
11125
11126 * linux-low.c (usr_store_inferior_registers): Transfer buf in
11127 PTRACE_XFER_TYPE-sized chunks, not int-sized chunks. Otherwise,
11128 if 'int' is smaller than PTRACE_XFER_TYPE, you end up throwing
11129 away part of the register's value.
11130
254787d4
DJ
111312003-03-26 Daniel Jacobowitz <drow@mvista.com>
11132
11133 * linux-low.c (linux_create_inferior): Use __SIGRTMIN.
11134 (linux_wait_for_event, linux_init_signals): Likewise.
11135
94e10508
DJ
111362003-03-17 Daniel Jacobowitz <drow@mvista.com>
11137
11138 * configure.in: Check for stdlib.h.
11139 * configure: Regenerated.
11140 * config.in: Regenerated.
11141
4c0711e0
DJ
111422003-01-04 Andreas Schwab <schwab@suse.de>
11143
11144 * linux-m68k-low.c (m68k_num_regs): Define to 29 instead of 31.
11145
ef66e766
AC
111462003-01-02 Andrew Cagney <ac131313@redhat.com>
11147
11148 * Makefile.in: Remove obsolete code.
11149
a1358604
DJ
111502002-11-20 Daniel Jacobowitz <drow@mvista.com>
11151
11152 * linux-s390-low.c (s390_regmap): Check GPR_SIZE instead of
11153 defined(PT_FPR0_HI).
11154
23ce3b1c
DJ
111552002-11-17 Stuart Hughes <seh@zee2.com>
11156
11157 * linux-arm-low.c (arm_num_regs): Increase.
11158 (arm_regmap): Include status register.
11159
111602002-11-17 Daniel Jacobowitz <drow@mvista.com>
11161
11162 * linux-low.c (register_addr): Remove incorrect -1 check.
11163
a9fa9f7d
DJ
111642002-08-29 Daniel Jacobowitz <drow@mvista.com>
11165
11166 * linux-low.c (linux_create_inferior): Call setpgid. Return
11167 the new PID.
11168 (unstopped_p, linux_signal_pid): Remove.
11169 (linux_target_ops): Remove linux_signal_pid.
11170 * remote-utils.c (putpkt, input_interrupt): Use signal_pid
11171 global instead of target method.
11172 * target.h (struct target_ops): Remove signal_pid. Update comment
11173 for create_inferior.
11174 * server.c (signal_pid): New variable.
11175 (create_inferior): Set signal_pid. Block SIGTTOU and SIGTTIN in
4b8dad4a 11176 gdbserver. Set the child to be the foreground process group.
a9fa9f7d
DJ
11177 (attach_inferior): Set signal_pid.
11178
17574093
DJ
111792002-08-23 Daniel Jacobowitz <drow@mvista.com>
11180
11181 * ChangeLog: New file, with entries from gdb/ChangeLog after GDB 5.2.
11182
111832002-08-20 Jim Blandy <jimb@redhat.com>
11184
11185 * Makefile.in (LDFLAGS): Allow the configure script to establish a
11186 default for this.
11187
111882002-08-01 Andrew Cagney <cagney@redhat.com>
11189
11190 * Makefile.in: Make chill references obsolete.
11191
111922002-07-24 Kevin Buettner <kevinb@redhat.com>
11193
11194 * configure.in (unistd.h): Add to AC_CHECK_HEADERS list.
11195 * configure: Regenerate.
11196 * config.in: Regenerate.
11197
111982002-07-09 David O'Brien <obrien@FreeBSD.org>
11199
11200 * gdbreplay.c (stdlib.h, unistd.h): Conditionaly include.
11201 (perror_with_name, remote_close, remote_open, expect, play): Static.
11202
112032002-07-04 Michal Ludvig <mludvig@suse.cz>
11204
4b8dad4a 11205 * linux-x86-64-low.c (x86_64_regmap): Make it an array of
17574093
DJ
11206 byte offsets instead of an array of indexes.
11207 (x86_64_store_gregset, x86_64_store_fpregset): Parameter made const.
11208
112092002-06-13 Daniel Jacobowitz <drow@mvista.com>
11210
11211 * regcache.c: Add comment.
11212
112132002-06-11 Daniel Jacobowitz <drow@mvista.com>
11214
11215 * thread-db.c: New file.
11216 * proc-service.c: New file.
11217 * acinclude.m4: New file.
11218 * Makefile.in: Add GDBSERVER_LIBS, gdb_proc_service_h,
11219 proc-service.o, and thread-db.o.
11220 (linux-low.o): Add USE_THREAD_DB.
11221 * acconfig.h: Add HAVE_PRGREGSET_T, HAVE_PRFPREGSET_T,
11222 HAVE_LWPID_T, HAVE_PSADDR_T, and PRFPREGSET_T_BROKEN.
11223 * aclocal.m4: Regenerated.
11224 * config.in: Regenerated.
11225 * configure: Regenerated.
11226 * configure.in: Check for proc_service.h, sys/procfs.h,
11227 thread_db.h, and linux/elf.h headrs.
11228 Check for lwpid_t, psaddr_t, prgregset_t, prfpregset_t, and
11229 PRFPREGSET_T_BROKEN. Introduce srv_thread_depfiles and USE_THREAD_DB.
11230 Check for -lthread_db and thread support.
11231 * configure.srv: Enable thread_db support for ARM, i386, MIPS,
11232 PowerPC, and SuperH.
11233 * i387-fp.c: Constify arguments.
11234 * i387-fp.h: Likewise.
11235 * inferiors.c: (struct thread_info): Renamed from
11236 `struct inferior_info'. Remove PID member. Use generic inferior
11237 list header. All uses updated.
11238 (inferiors, signal_pid): Removed.
11239 (all_threads): New variable.
11240 (get_thread): Define.
11241 (add_inferior_to_list): New function.
11242 (for_each_inferior): New function.
11243 (change_inferior_id): New function.
11244 (add_inferior): Removed.
11245 (remove_inferior): New function.
11246 (add_thread): New function.
11247 (free_one_thread): New function.
11248 (remove_thread): New function.
11249 (clear_inferiors): Use for_each_inferior and free_one_thread.
11250 (find_inferior): New function.
11251 (find_inferior_id): New function.
11252 (inferior_target_data): Update argument type.
11253 (set_inferior_target_data): Likewise.
11254 (inferior_regcache_data): Likewise.
11255 (set_inferior_regcache_data): Likewise.
11256 * linux-low.c (linux_bp_reinsert): Remove.
11257 (all_processes, stopping_threads, using_thrads)
11258 (struct pending_signals, debug_threads, pid_of): New.
11259 (inferior_pid): Replace with macro.
11260 (struct inferior_linux_data): Remove.
11261 (get_stop_pc, add_process): New functions.
11262 (linux_create_inferior): Restore SIGRTMIN+1 before calling exec.
11263 Use add_process and add_thread.
11264 (linux_attach_lwp): New function, based on old linux_attach. Use
11265 add_process and add_thread. Set stop_expected for new threads.
11266 (linux_attach): New function.
11267 (linux_kill_one_process): New function.
11268 (linux_kill): Kill all LWPs.
11269 (linux_thread_alive): Use find_inferior_id.
11270 (check_removed_breakpoints, status_pending_p): New functions.
11271 (linux_wait_for_process): Renamed from linux_wait_for_one_inferior.
11272 Update. Use WNOHANG. Wait for cloned processes also. Update process
11273 struct for the found process.
11274 (linux_wait_for_event): New function.
11275 (linux_wait): Use it. Support LWPs.
11276 (send_sigstop, wait_for_sigstop, stop_all_processes)
11277 (linux_resume_one_process, linux_continue_one_process): New functions.
11278 (linux_resume): Support LWPs.
11279 (REGISTER_RAW_SIZE): Remove.
11280 (fetch_register): Use register_size instead. Call supply_register.
11281 (usr_store_inferior_registers): Likewise. Call collect_register.
11282 Fix recursive case.
11283 (regsets_fetch_inferior_registers): Improve error message.
11284 (regsets_store_inferior_registers): Add debugging.
11285 (linux_look_up_symbols): Call thread_db_init if USE_THREAD_DB.
11286 (unstopped_p, linux_signal_pid): New functions.
11287 (linux_target_ops): Add linux_signal_pid.
11288 (linux_init_signals): New function.
11289 (initialize_low): Call it. Initialize using_threads.
11290 * regcache.c (inferior_regcache_data): Add valid
11291 flag.
11292 (get_regcache): Fetch registers lazily. Add fetch argument
11293 and update all callers.
11294 (regcache_invalidate_one, regcache_invalidate): New
11295 functions.
11296 (new_register_cache): Renamed from create_register_cache.
11297 Return the new regcache.
11298 (free_register_cache): Change argument to a void *.
11299 (registers_to_string, registers_from_string): Call get_regcache
11300 with fetch flag set.
11301 (register_data): Make static. Pass fetch flag to get_regcache.
11302 (supply_register): Call get_regcache with fetch flag clear.
11303 (collect_register): Call get_regcache with fetch flag set.
11304 (collect_register_as_string): New function.
11305 * regcache.h: Update.
11306 * remote-utils.c (putpkt): Flush after debug output and use
11307 stderr.
11308 Handle input interrupts while waiting for an ACK.
11309 (input_interrupt): Use signal_pid method.
11310 (getpkt): Flush after debug output and use stderr.
11311 (outreg): Use collect_register_as_string.
11312 (new_thread_notify, dead_thread_notify): New functions.
11313 (prepare_resume_reply): Check using_threads. Set thread_from_wait
11314 and general_thread.
11315 (look_up_one_symbol): Flush after debug output.
11316 * server.c (step_thread, server_waiting): New variables.
11317 (start_inferior): Don't use signal_pid. Update call to mywait.
11318 (attach_inferior): Update call to mywait.
11319 (handle_query): Handle qfThreadInfo and qsThreadInfo.
11320 (main): Don't fetch/store registers explicitly. Use
11321 set_desired_inferior. Support proposed ``Hs'' packet. Update
11322 calls to mywait.
11323 * server.h: Update.
11324 (struct inferior_list, struct_inferior_list_entry): New.
11325 * target.c (set_desired_inferior): New.
11326 (write_inferior_memory): Constify.
11327 (mywait): New function.
11328 * target.h: Update.
11329 (struct target_ops): New signal_pid method.
11330 (mywait): Removed macro, added prototype.
11331
11332 * linux-low.h (regset_func): Removed.
11333 (regset_fill_func, regset_store_func): New.
11334 (enum regset_type): New.
11335 (struct regset_info): Add type field. Use new operation types.
11336 (struct linux_target_ops): stop_pc renamed to get_pc.
11337 Add decr_pc_after_break and breakpoint_at.
11338 (get_process, get_thread_proess, get_process_thread)
11339 (strut process_info, all_processes, linux_attach_lwp)
11340 (thread_db_init): New.
11341
11342 * linux-arm-low.c (arm_get_pc, arm_set_pc,
11343 arm_breakpoint, arm_breakpoint_len, arm_breakpoint_at): New.
11344 (the_low_target): Add new members.
11345 * linux-i386-low.c (i386_store_gregset, i386_store_fpregset)
11346 (i386_store_fpxregset): Constify.
11347 (target_regsets): Add new kind identifier.
11348 (i386_get_pc): Renamed from i386_stop_pc. Simplify.
11349 (i386_set_pc): Add debugging.
11350 (i386_breakpoint_at): New function.
11351 (the_low_target): Add new members.
11352 * linux-mips-low.c (mips_get_pc, mips_set_pc)
11353 (mips_breakpoint, mips_breakpoint_len, mips_reinsert_addr)
11354 (mips_breakpoint_at): New.
11355 (the_low_target): Add new members.
11356 * linux-ppc-low.c (ppc_get_pc, ppc_set_pc)
11357 (ppc_breakpoint, ppc_breakpoint_len, ppc_breakpoint_at): New.
11358 (the_low_target): Add new members.
11359 * linux-sh-low.c (sh_get_pc, sh_set_pc)
11360 (sh_breakpoint, sh_breakpoint_len, sh_breakpoint_at): New.
11361 (the_low_target): Add new members.
11362 * linux-x86-64-low.c (target_regsets): Add new kind
11363 identifier.
11364
113652002-05-15 Daniel Jacobowitz <drow@mvista.com>
11366
11367 From Martin Pool <mbp@samba.org>:
11368 * server.c (gdbserver_usage): New function.
11369 (main): Call it.
11370
113712002-05-14 Daniel Jacobowitz <drow@mvista.com>
11372
11373 * mem-break.c (reinsert_breakpoint_by_bp): Correct typo
11374 stop_at -> stop_pc.
11375
113762002-05-04 Andrew Cagney <ac131313@redhat.com>
11377
11378 * Makefile.in: Remove obsolete code.
11379
113802002-04-24 Michal Ludvig <mludvig@suse.cz>
11381
11382 * linux-low.c (regsets_fetch_inferior_registers),
11383 (regsets_store_inferior_registers): Removed cast to int from
11384 ptrace() calls.
11385 * regcache.h: Added declaration of struct inferior_info.
11386
113872002-04-20 Daniel Jacobowitz <drow@mvista.com>
11388
11389 * inferiors.c (struct inferior_info): Add regcache_data.
11390 (add_inferior): Call create_register_cache.
11391 (clear_inferiors): Call free_register_cache.
11392 (inferior_regcache_data, set_inferior_regcache_data): New functions.
11393 * regcache.c (struct inferior_regcache_data): New.
11394 (registers): Remove.
11395 (get_regcache): New function.
11396 (create_register_cache, free_register_cache): New functions.
11397 (set_register_cache): Don't initialize the register cache here.
11398 (registers_to_string, registers_from_string, register_data): Call
11399 get_regcache.
11400 * regcache.h: Add prototypes.
11401 * server.h: Likewise.
11402
114032002-04-20 Daniel Jacobowitz <drow@mvista.com>
11404
11405 * mem-break.c: New file.
11406 * mem-break.h: New file.
11407 * Makefile.in: Add mem-break.o rule; update server.h
11408 dependencies.
11409 * inferiors.c (struct inferior_info): Add target_data
11410 member.
11411 (clear_inferiors): Free target_data member if set.
11412 (inferior_target_data, set_inferior_target_data): New functions.
11413 * linux-i386-low.c (i386_breakpoint, i386_breakpoint_len)
11414 (i386_stop_pc, i386_set_pc): New. Add to the_low_target.
11415 * linux-low.c (linux_bp_reinsert): New variable.
11416 (struct inferior_linux_data): New.
11417 (linux_create_inferior): Use set_inferior_target_data.
11418 (linux_attach): Likewise. Call add_inferior.
11419 (linux_wait_for_one_inferior): New function.
11420 (linux_wait): Call it.
11421 (linux_write_memory): Add const.
11422 (initialize_low): Call set_breakpoint_data.
11423 * linux-low.h (struct linux_target_ops): Add breakpoint
11424 handling members.
11425 * server.c (attach_inferior): Remove extra add_inferior
11426 call.
11427 * server.h: Include mem-break.h. Update inferior.c
11428 prototypes.
11429 * target.c (read_inferior_memory)
11430 (write_inferior_memory): New functions.
11431 * target.h (read_inferior_memory)
11432 (write_inferior_memory): Change macros to prototypes.
11433 (struct target_ops): Update comments. Add const to write_memory
11434 definition.
11435
114362002-04-11 Daniel Jacobowitz <drow@mvista.com>
11437
11438 * linux-low.c (usr_store_inferior_registers): Support
11439 registers which are allowed to fail to store.
11440 * linux-low.h (linux_target_ops): Likewise.
11441 * linux-ppc-low.c (ppc_regmap): Support FPSCR.
11442 (ppc_cannot_store_register): FPSCR may not be storable.
11443
114442002-04-09 Daniel Jacobowitz <drow@mvista.com>
11445
11446 * server.h: Include <string.h> if HAVE_STRING_H.
11447 * ChangeLog: Correct paths in last ChangeLog entry.
11448
114492002-04-09 Daniel Jacobowitz <drow@mvista.com>
11450
11451 * linux-low.h: Remove obsolete prototypes.
11452 (struct linux_target_ops): New.
11453 (extern the_low_target): New.
11454 * linux-low.c (num_regs, regmap): Remove declarations.
11455 (register_addr): Use the_low_target explicitly.
11456 (fetch_register): Likewise.
11457 (usr_fetch_inferior_registers): Likewise.
11458 (usr_store_inferior_registers): Likewise.
11459 * linux-arm-low.c (num_regs): Remove.
11460 (arm_num_regs): Define.
11461 (arm_regmap): Renamed from regmap, made static.
11462 (arm_cannot_fetch_register): Renamed from cannot_fetch_register,
11463 made static.
11464 (arm_cannot_store_register): Renamed from cannot_store_register,
11465 made static.
11466 (the_low_target): New.
11467 * linux-i386-low.c (num_regs): Remove.
11468 (i386_num_regs): Define.
11469 (i386_regmap): Renamed from regmap, made static.
11470 (i386_cannot_fetch_register): Renamed from cannot_fetch_register,
11471 made static.
11472 (i386_cannot_store_register): Renamed from cannot_store_register,
11473 made static.
11474 (the_low_target): New.
11475 * linux-ia64-low.c (num_regs): Remove.
11476 (ia64_num_regs): Define.
11477 (ia64_regmap): Renamed from regmap, made static.
11478 (ia64_cannot_fetch_register): Renamed from cannot_fetch_register,
11479 made static.
11480 (ia64_cannot_store_register): Renamed from cannot_store_register,
11481 made static.
11482 (the_low_target): New.
11483 * linux-m68k-low.c (num_regs): Remove.
11484 (m68k_num_regs): Define.
11485 (m68k_regmap): Renamed from regmap, made static.
11486 (m68k_cannot_fetch_register): Renamed from cannot_fetch_register,
11487 made static.
11488 (m68k_cannot_store_register): Renamed from cannot_store_register,
11489 made static.
11490 (the_low_target): New.
11491 * linux-mips-low.c (num_regs): Remove.
11492 (mips_num_regs): Define.
11493 (mips_regmap): Renamed from regmap, made static.
11494 (mips_cannot_fetch_register): Renamed from cannot_fetch_register,
11495 made static.
11496 (mips_cannot_store_register): Renamed from cannot_store_register,
11497 made static.
11498 (the_low_target): New.
11499 * linux-ppc-low.c (num_regs): Remove.
11500 (ppc_num_regs): Define.
11501 (ppc_regmap): Renamed from regmap, made static.
11502 (ppc_cannot_fetch_register): Renamed from cannot_fetch_register,
11503 made static.
11504 (ppc_cannot_store_register): Renamed from cannot_store_register,
11505 made static.
11506 (the_low_target): New.
11507 * linux-s390-low.c (num_regs): Remove.
11508 (s390_num_regs): Define.
11509 (s390_regmap): Renamed from regmap, made static.
11510 (s390_cannot_fetch_register): Renamed from cannot_fetch_register,
11511 made static.
11512 (s390_cannot_store_register): Renamed from cannot_store_register,
11513 made static.
11514 (the_low_target): New.
11515 * linux-sh-low.c (num_regs): Remove.
11516 (sh_num_regs): Define.
11517 (sh_regmap): Renamed from regmap, made static.
11518 (sh_cannot_fetch_register): Renamed from cannot_fetch_register,
11519 made static.
11520 (sh_cannot_store_register): Renamed from cannot_store_register,
11521 made static.
11522 (the_low_target): New.
11523 * linux-x86-64-low.c (x86_64_regmap): Renamed from regmap.
11524 (the_low_target): New.
11525
115262002-04-09 Daniel Jacobowitz <drow@mvista.com>
11527
11528 * Makefile.in: Add stamp-h target.
11529 * configure.in: Create stamp-h.
11530 * configure: Regenerated.
11531
115322002-04-09 Daniel Jacobowitz <drow@mvista.com>
11533
11534 * inferiors.c: New file.
11535 * target.c: New file.
11536 * target.h: New file.
11537 * Makefile.in: Add target.o and inferiors.o. Update
11538 dependencies.
11539 * linux-low.c (inferior_pid): New static variable,
11540 moved from server.c.
11541 (linux_create_inferior): Renamed from create_inferior.
11542 Call add_inferior. Return 0 on success instead of a PID.
11543 (linux_attach): Renamed from myattach.
11544 (linux_kill): Renamed from kill_inferior. Call clear_inferiors ().
11545 (linux_thread_alive): Renamed from mythread_alive.
11546 (linux_wait): Renamed from mywait. Call clear_inferiors () if the
11547 child dies.
11548 (linux_resume): Renamed from myresume. Add missing ``return 0''.
11549 (regsets_store_inferior_registers): Correct error message.
11550 Add missing ``return 0''.
11551 (linux_fetch_registers): Renamed from fetch_inferior_registers.
11552 (linux_store_registers): Renamed from store_inferior_registers.
11553 (linux_read_memory): Renamed from read_inferior_memory.
11554 (linux_write_memory): Renamed from write_inferior_memory.
11555 (linux_target_ops): New structure.
11556 (initialize_low): Call set_target_ops ().
11557 * remote-utils.c (unhexify): New function.
11558 (hexify): New function.
11559 (input_interrupt): Send signals to ``signal_pid''.
11560 * server.c (inferior_pid): Remove.
11561 (start_inferior): Update create_inferior call.
11562 (attach_inferior): Call add_inferior.
11563 (handle_query): New function.
11564 (main): Call handle_query for `q' packets.
11565 * server.h: Include "target.h". Remove obsolete prototypes.
11566 Add prototypes for "inferiors.c", "target.c", hexify, and unhexify.
11567
115682002-04-09 Daniel Jacobowitz <drow@mvista.com>
11569
11570 * Makefile.in: Add WARN_CFLAGS. Update configury
11571 dependencies.
11572 * configure.in: Check for <string.h>
11573 * configure: Regenerate.
11574 * config.in: Regenerate.
11575 * gdbreplay.c: Include needed system headers.
11576 (remote_open): Remove strchr prototype.
11577 * linux-low.h: Correct #ifdef to HAVE_LINUX_USRREGS.
11578 * regcache.c (supply_register): Change buf argument to const void *.
11579 (supply_register_by_name): Likewise.
11580 (collect_register): Change buf argument to void *.
11581 (collect_register_by_name): Likewise.
11582 * regcache.h: Add missing prototypes.
11583 * remote-utils.c: Include <arpa/inet.h> for inet_ntoa.
11584 * server.c (handle_query): New function.
11585 (attached): New static variable, moved out of main.
11586 (main): Quiet longjmp clobber warnings.
11587 * server.h: Add ATTR_NORETURN and ATTR_FORMAT. Update prototypes.
11588 * utils.c (error): Remove NORETURN.
11589 (fatal): Likewise.