]> git.ipfire.org Git - thirdparty/binutils-gdb.git/blame - gdb/gdbserver/ChangeLog
signal_command: Leftover cleanup chain regression
[thirdparty/binutils-gdb.git] / gdb / gdbserver / ChangeLog
CommitLineData
96e9210f
PA
12015-08-04 Pedro Alves <palves@redhat.com>
2
3 * thread-db.c (struct thread_db): Use new typedefs.
4 (try_thread_db_load_1): Define local TDB_DLSYM macro and use it in
5 CHK calls.
6 (disable_thread_event_reporting): Cast result of dlsym to
7 destination function pointer type.
8 (thread_db_mourn): Use td_ta_delete_ftype.
9
af60a1ef
SL
102015-08-03 Sandra Loosemore <sandra@codesourcery.com>
11
12 * linux-nios2-low.c (NIOS2_BREAKPOINT): Conditionalize for
13 arch variant.
14 (CDX_BREAKPOINT): Define for R2.
15 (nios2_breakpoint_at): Check for CDX_BREAKPOINT when R2.
16 (the_low_target): Add comments.
17
e8b41681
YQ
182015-07-30 Yao Qi <yao.qi@linaro.org>
19
20 * linux-arm-low.c (arm_hwcap): Remove it.
21 (arm_read_description): New local variable arm_hwcap. Don't
22 set arm_hwcap to zero.
23
89abb039
YQ
242015-07-30 Yao Qi <yao.qi@linaro.org>
25
26 * linux-arm-low.c (arm_fill_wmmxregset): Don't use arm_hwcap.
27 Use regcache->tdesc instead.
28 (arm_store_wmmxregset): Likewise.
29 (arm_fill_vfpregset): Likewise.
30 (arm_store_vfpregset): Likewise.
31
deca266c
YQ
322015-07-30 Yao Qi <yao.qi@linaro.org>
33
34 * linux-arm-low.c: Include arch/arm.h.
35 (arm_fill_gregset): Don't use arm_num_regs and arm_regmap.
36 (arm_store_gregset): Likewise.
37
aa58a496
SM
382015-07-29 Simon Marchi <simon.marchi@ericsson.com>
39
40 * linux-mips-low.c (mips_linux_prepare_to_resume): Add NULL as
41 ptrace's 4th parameter.
42
50904b25
YQ
432015-07-27 Yao Qi <yao.qi@linaro.org>
44
45 * configure.srv (case aarch64*-*-linux*): Don't set
46 srv_linux_usrregs.
47
5826e159
PA
482015-07-24 Pedro Alves <palves@redhat.c: Likewise.om>
49
50 * linux-aarch64-low.c: Include nat/gdb_ptrace.h instead of
51 sys/ptrace.h.
52 * linux-arm-low.c: Likewise.
53 * linux-cris-low.c: Likewise.
54 * linux-crisv32-low.c: Likewise.
55 * linux-low.c: Likewise.
56 * linux-m68k-low.c: Likewise.
57 * linux-mips-low.c: Likewise.
58 * linux-nios2-low.c: Likewise.
59 * linux-s390-low.c: Likewise.
60 * linux-sparc-low.c: Likewise.
61 * linux-tic6x-low.c: Likewise.
62 * linux-tile-low.c: Likewise.
63 * linux-x86-low.c: Likewise.
64
54019719
PA
652015-07-24 Pedro Alves <palves@redhat.com>
66
67 * config.in: Regenerate.
68 * configure: Regenerate.
69
eb7aa561
PA
702015-07-24 Pedro Alves <palves@redhat.com>
71
72 * acinclude.m4: Include ../ptrace.m4.
73 * configure.ac: Call GDB_AC_PTRACE.
74 * config.in, configure: Regenerate.
75
55d7b841
YQ
762015-07-24 Yao Qi <yao.qi@linaro.org>
77
78 * linux-low.c (linux_create_inferior): Remove setting to
79 proc->priv->new_inferior.
80 (linux_attach): Likewise.
81 (linux_low_filter_event): Likewise.
82 * linux-low.h (struct process_info_private) <new_inferior>: Remove.
83
c06cbd92
YQ
842015-07-24 Yao Qi <yao.qi@linaro.org>
85
86 * linux-low.c (linux_arch_setup): New function.
87 (linux_low_filter_event): If proc->tdesc is NULL and
88 proc->attached is true, call the_low_target.arch_setup.
89 Otherwise, keep status pending, and return.
90 (linux_resume_one_lwp_throw): Don't call get_pc if
91 thread->while_stepping isn't NULL. Don't call
92 get_thread_regcache if proc->tdesc is NULL.
93 (need_step_over_p): Return 0 if proc->tdesc is NULL.
94 (linux_target_ops): Install arch_setup.
95 * server.c (start_inferior): Call the_target->arch_setup.
96 * target.h (struct target_ops) <arch_setup>: New field.
97 (target_arch_setup): New marco.
98 * lynx-low.c (lynx_target_ops): Update.
99 * nto-low.c (nto_target_ops): Update.
100 * spu-low.c (spu_target_ops): Update.
101 * win32-low.c (win32_target_ops): Update.
102
5ae3ebba
YQ
1032015-07-24 Yao Qi <yao.qi@linaro.org>
104
105 * linux-low.c (linux_add_process): Don't set
106 proc->priv->new_inferior.
107 (linux_create_inferior): Set proc->priv->new_inferior to 1.
108 (linux_attach): Likewise.
109
eb97750b
YQ
1102015-07-24 Yao Qi <yao.qi@linaro.org>
111
112 * server.c (start_inferior): Code refactor.
113
51aee833
YQ
1142015-07-24 Yao Qi <yao.qi@linaro.org>
115
116 * server.c (process_serial_event): Set general_thread.
117
af1b22f3
YQ
1182015-07-21 Yao Qi <yao.qi@linaro.org>
119
120 * linux-aarch64-low.c (aarch64_arch_setup): Remove code and call
121 aarch64_linux_get_debug_reg_capacity.
122
554717a3
YQ
1232015-07-17 Yao Qi <yao.qi@linaro.org>
124
125 * Makefile.in (aarch64-linux-hw-point.o): New rule.
126 * configure.srv (srv_tgtobj): Append aarch64-linux-hw-point.o.
127 * linux-aarch64-low.c: Include nat/aarch64-linux-hw-point.h.
128 (AARCH64_HBP_MAX_NUM): Move to nat/aarch64-linux-hw-point.h.
129 (AARCH64_HWP_MAX_NUM, AARCH64_HBP_ALIGNMENT): Likewise.
130 (AARCH64_HWP_ALIGNMENT): Likewise.
131 (AARCH64_HWP_MAX_LEN_PER_REG): Likewise.
132 (AARCH64_DEBUG_NUM_SLOTS, AARCH64_DEBUG_ARCH): Likewise.
133 (aarch64_num_bp_regs, aarch64_num_wp_regs): Likewise.
134 (AARCH64_DEBUG_ARCH_V8, DR_MARK_ALL_CHANGED): Likewise.
135 (DR_MARK_N_CHANGED, DR_CLEAR_CHANGED): Likewise.
136 (DR_HAS_CHANGED, DR_N_HAS_CHANGE): Likewise.
137 (struct aarch64_debug_reg_state): Likewise.
138 (struct arch_lwp_info): Likewise.
139 (aarch64_align_watchpoint): Likewise.
140 (DR_CONTROL_ENABLED, DR_CONTROL_LENGTH): Likewise.
141 (aarch64_watchpoint_length): Likewise.
142 (aarch64_point_encode_ctrl_reg): Likewise
143 (aarch64_point_is_aligned): Likewise.
144 (aarch64_align_watchpoint): Likewise.
145 (aarch64_linux_set_debug_regs):
146 (aarch64_dr_state_insert_one_point): Likewise.
147 (aarch64_dr_state_remove_one_point): Likewise.
148 (aarch64_handle_breakpoint): Likewise.
149 (aarch64_handle_aligned_watchpoint): Likewise.
150 (aarch64_handle_unaligned_watchpoint): Likewise.
151 (aarch64_handle_watchpoint): Likewise.
152
c67ca4de
YQ
1532015-07-17 Yao Qi <yao.qi@linaro.org>
154
155 * linux-aarch64-low.c (aarch64_handle_breakpoint): Add argument state
156 and don't aarch64_get_debug_reg_state. All callers update.
157 (aarch64_handle_aligned_watchpoint): Likewise.
158 (aarch64_handle_unaligned_watchpoint): Likewise.
159 (aarch64_handle_watchpoint): Likewise.
160 (aarch64_insert_point): Call aarch64_get_debug_reg_state earlier.
161 (aarch64_remove_point): Likewise.
162
25abf979
YQ
1632015-07-17 Yao Qi <yao.qi@linaro.org>
164
165 * linux-aarch64-low.c (aarch64_show_debug_reg_state): Use
166 debug_printf.
167 (aarch64_handle_unaligned_watchpoint): Likewise.
168
db1ff28b
JK
1692015-07-15 Jan Kratochvil <jan.kratochvil@redhat.com>
170
171 Revert the previous 3 commits:
172 Move gdb_regex* to common/
173 Move linux_find_memory_regions_full & co.
174 gdbserver build-id attribute generator
175
700ca40f
JK
1762015-07-15 Aleksandar Ristovski <aristovski@qnx.com
177 Jan Kratochvil <jan.kratochvil@redhat.com>
178
179 gdbserver build-id attribute generator.
180 * linux-low.c (nat/linux-maps.h, search.h, rsp-low.h): Include.
181 (ElfXX_Ehdr, ElfXX_Phdr, ElfXX_Nhdr): New.
182 (ELFXX_FLD, ELFXX_SIZEOF, ELFXX_ROUNDUP, BUILD_ID_INVALID): New.
183 (find_phdr): New.
184 (get_dynamic): Use find_pdhr to traverse program headers.
185 (struct mapping_entry, mapping_entry_s, free_mapping_entry_vec)
186 (compare_mapping_entry_range, struct find_memory_region_callback_data)
187 (read_build_id, find_memory_region_callback, lrfind_mapping_entry)
188 (get_hex_build_id): New.
189 (linux_qxfer_libraries_svr4): Add optional build-id attribute
190 to reply XML document.
191
9904185c
JK
1922015-07-15 Aleksandar Ristovski <aristovski@qnx.com
193 Jan Kratochvil <jan.kratochvil@redhat.com>
194
195 * target.c: Include target/target-utils.h and fcntl.h.
196 (target_fileio_read_stralloc_1_pread, target_fileio_read_stralloc_1)
197 (target_fileio_read_stralloc): New functions.
198
6e5b4429
JK
1992015-07-15 Jan Kratochvil <jan.kratochvil@redhat.com>
200
201 * Makefile.in (OBS): Add gdb_regex.o.
202 (gdb_regex.o): New.
203 * config.in: Rebuilt.
204 * configure: Rebuilt.
205
ddc98fbf
JK
2062015-07-15 Aleksandar Ristovski <aristovski@qnx.com
207 Jan Kratochvil <jan.kratochvil@redhat.com>
208
209 Create empty nat/linux-maps.[ch] and common/target-utils.[ch].
210 * Makefile.in (OBS): Add target-utils.o.
211 (linux-maps.o, target-utils.o): New.
212 * configure.srv (srv_linux_obj): Add linux-maps.o.
213
e57bb7a0
PL
2142015-07-15 Pierre Langlois <pierre.langlois@arm.com>
215
216 * linux-aarch64-low.c (aarch64_supports_range_stepping): New
217 function, return 1.
218 (the_low_target): Install it.
219
586b02a9
PA
2202015-07-14 Pedro Alves <palves@redhat.com>
221
222 * linux-low.c (kill_wait_lwp): Don't assert if waitpid fails.
223 Instead, ignore ECHILD, and throw an error for other errnos.
224
58c1b36c
PA
2252015-07-10 Pedro Alves <palves@redhat.com>
226
227 * event-loop.c (struct callback_event) <data>: Change type to
228 gdb_client_data instance instead of gdb_client_data pointer.
229 (append_callback_event): Adjust.
230
421530db
PL
2312015-07-10 Pierre Langlois <pierre.langlois@arm.com>
232
233 * linux-aarch64-low.c: Add comments for each linux_target_ops
234 method. Remove comments already covered in target_ops and
235 linux_target_ops definitions.
236 (the_low_target): Add comments for each unimplemented method.
237
c2d65f38
YQ
2382015-07-09 Yao Qi <yao.qi@linaro.org>
239
240 * linux-aarch64-low.c (aarch64_regmap): Remove.
241 (aarch64_usrregs_info): Remove.
242 (regs_info): Set field usrregs to NULL.
243
b20a6524
MM
2442015-07-02 Markus Metzger <markus.t.metzger@intel.com>
245
246 * linux-low.c: Include "rsp-low.h"
247 (linux_low_encode_pt_config, linux_low_encode_raw): New.
248 (linux_low_read_btrace): Support BTRACE_FORMAT_PT.
249 (linux_low_btrace_conf): Support BTRACE_FORMAT_PT.
250 (handle_btrace_enable_pt): New.
251 (handle_btrace_general_set): Support "pt".
252 (handle_btrace_conf_general_set): Support "pt:size".
253
96c97461
PL
2542015-06-29 Pierre Langlois <pierre.langlois@arm.com>
255
256 * linux-aarch64-low.c (aarch64_supports_z_point_type): Enable for
257 Z_PACKET_SW_BP.
258
37d66942
PL
2592015-06-29 Pierre Langlois <pierre.langlois@arm.com>
260
261 * linux-aarch64-low.c: Remove comment about endianness.
262 (aarch64_breakpoint): Change type to gdb_byte[]. Set to "brk #0".
263 (aarch64_breakpoint_at): Change type of insn to gdb_byte[]. Use
264 memcmp.
265
dc06243f
GB
2662015-06-24 Gary Benson <gbenson@redhat.com>
267
268 * linux-i386-ipa.c (stdint.h): Do not include.
269 * lynx-i386-low.c (stdint.h): Likewise.
270 * lynx-ppc-low.c (stdint.h): Likewise.
271 * mem-break.c (stdint.h): Likewise.
272 * thread-db.c (stdint.h): Likewise.
273 * tracepoint.c (stdint.h): Likewise.
274 * win32-low.c (stdint.h): Likewise.
275
124e13d9
SM
2762015-06-18 Simon Marchi <simon.marchi@ericsson.com>
277
278 * server.c (write_qxfer_response): Update call to
279 remote_escape_output.
280
909c2cda
JK
2812015-06-15 Aleksandar Ristovski <aristovski@qnx.com
282 Jan Kratochvil <jan.kratochvil@redhat.com>
283
284 Merge multiple hex conversions.
285 * gdbreplay.c (tohex): Rename to 'fromhex'.
286 (logchar): Use fromhex.
287
24c05f46
JK
2882015-06-10 Jan Kratochvil <jan.kratochvil@redhat.com>
289
290 * server.c (handle_qxfer_libraries): Set `version' attribute for
291 <library-list>.
292
14d2069a
GB
2932015-06-10 Gary Benson <gbenson@redhat.com>
294
295 * target.h (struct target_ops) <multifs_open>: New field.
296 <multifs_unlink>: Likewise.
297 <multifs_readlink>: Likewise.
298 * linux-low.c (nat/linux-namespaces.h): New include.
299 (linux_target_ops): Initialize the_target->multifs_open,
300 the_target->multifs_unlink and the_target->multifs_readlink.
301 * hostio.h (hostio_handle_new_gdb_connection): New declaration.
302 * hostio.c (hostio_fs_pid): New static variable.
303 (hostio_handle_new_gdb_connection): New function.
304 (handle_setfs): Likewise.
305 (handle_open): Use the_target->multifs_open as appropriate.
306 (handle_unlink): Use the_target->multifs_unlink as appropriate.
307 (handle_readlink): Use the_target->multifs_readlink as
308 appropriate.
309 (handle_vFile): Handle vFile:setfs packets.
310 * server.c (handle_query): Call hostio_handle_new_gdb_connection
311 after target_handle_new_gdb_connection.
312
4b8b5e72
GB
3132015-06-10 Gary Benson <gbenson@redhat.com>
314
315 * configure.ac (AC_CHECK_FUNCS): Add setns.
316 * config.in: Regenerate.
317 * configure: Likewise.
318 * Makefile.in (SFILES): Add nat/linux-namespaces.c.
319 (linux-namespaces.o): New rule.
320 * configure.srv (srv_linux_obj): Add linux-namespaces.o.
321
3ac2e371
GB
3222015-06-09 Gary Benson <gbenson@redhat.com>
323
324 * hostio.c (handle_open): Process mode argument with
325 fileio_to_host_mode.
326
ca9b78ce
YQ
3272015-06-01 Yao Qi <yao.qi@linaro.org>
328
329 * linux-s390-low.c (PTRACE_GETREGSET, PTRACE_SETREGSET): Remove.
330 * linux-x86-low.c: Likewise.
331
bfacd19d
DB
3322015-05-28 Don Breazeal <donb@codesourcery.com>
333
334 * linux-low.c (handle_extended_wait): Initialize
335 thread_info.last_resume_kind for new fork children.
336
452003ef
PA
3372015-05-15 Pedro Alves <palves@redhat.com>
338
339 * target.h (target_handle_new_gdb_connection): Rewrite using if
340 wrapped in do/while.
341
1041a03c
JB
3422015-05-14 Joel Brobecker <brobecker@adacore.com>
343
344 * configure.ac: Add prfpregset_t BFD_HAVE_SYS_PROCFS_TYPE check.
345 * configure, config.in: Regenerate.
346 * gdb_proc_service.h [HAVE_PRFPREGSET_T] (prfpregset_t):
347 Declare typedef.
348
c269dbdb
DB
3492015-05-12 Don Breazeal <donb@codesourcery.com>
350
351 * linux-low.c (handle_extended_wait): Handle PTRACE_EVENT_FORK and
352 PTRACE_EVENT_VFORK_DONE.
353 (linux_low_ptrace_options, extended_event_reported): Add vfork
354 events.
355 * remote-utils.c (prepare_resume_reply): New stop reasons "vfork"
356 and "vforkdone" for RSP 'T' Stop Reply Packet.
357 * server.h (report_vfork_events): Declare
358 global variable.
359
3a8a0396
DB
3602015-05-12 Don Breazeal <donb@codesourcery.com>
361
362 * linux-aarch64-low.c (aarch64_linux_new_fork): New function.
363 (the_low_target) <new_fork>: Initialize new member.
364 * linux-arm-low.c (arm_new_fork): New function.
365 (the_low_target) <new_fork>: Initialize new member.
366 * linux-low.c (handle_extended_wait): Call new target function
367 new_fork.
368 * linux-low.h (struct linux_target_ops) <new_fork>: New member.
369 * linux-mips-low.c (mips_add_watchpoint): New function
370 extracted from mips_insert_point.
371 (the_low_target) <new_fork>: Initialize new member.
372 (mips_linux_new_fork): New function.
373 (mips_insert_point): Call mips_add_watchpoint.
374 * linux-x86-low.c (x86_linux_new_fork): New function.
375 (the_low_target) <new_fork>: Initialize new member.
376
de0d863e
DB
3772015-05-12 Don Breazeal <donb@codesourcery.com>
378
379 * linux-low.c (handle_extended_wait): Implement return value,
380 rename argument 'event_child' to 'event_lwp', handle
381 PTRACE_EVENT_FORK, call internal_error for unrecognized event.
382 (linux_low_ptrace_options): New function.
383 (linux_low_filter_event): Call linux_low_ptrace_options,
384 use different argument fo linux_enable_event_reporting,
385 use return value from handle_extended_wait.
386 (extended_event_reported): New function.
387 (linux_wait_1): Call extended_event_reported and set
388 status to report fork events.
389 (linux_write_memory): Add pid to debug message.
390 (reset_lwp_ptrace_options_callback): New function.
391 (linux_handle_new_gdb_connection): New function.
392 (linux_target_ops): Initialize new structure member.
393 * linux-low.h (struct lwp_info) <waitstatus>: New member.
394 * lynx-low.c: Initialize new structure member.
395 * remote-utils.c (prepare_resume_reply): Implement stop reason
396 "fork" for "T" stop message.
397 * server.c (handle_query): Call handle_new_gdb_connection.
398 * server.h (report_fork_events): Declare global flag.
399 * target.h (struct target_ops) <handle_new_gdb_connection>:
400 New member.
401 (target_handle_new_gdb_connection): New macro.
402 * win32-low.c: Initialize new structure member.
403
ddcbc397
DB
4042015-05-12 Don Breazeal <donb@codesourcery.com>
405
406 * mem-break.c (APPEND_TO_LIST): Define macro.
407 (clone_agent_expr): New function.
408 (clone_one_breakpoint): New function.
409 (clone_all_breakpoints): New function.
410 * mem-break.h: Declare new functions.
411
89245bc0
DB
4122015-05-12 Don Breazeal <donb@codesourcery.com>
413
414 * linux-low.c (linux_supports_fork_events): New function.
415 (linux_supports_vfork_events): New function.
416 (linux_target_ops): Initialize new structure members.
417 (initialize_low): Call linux_check_ptrace_features.
418 * lynx-low.c (lynx_target_ops): Initialize new structure
419 members.
420 * server.c (report_fork_events, report_vfork_events):
421 New global flags.
422 (handle_query): Add new features to qSupported packet and
423 response.
424 (captured_main): Initialize new global variables.
425 * target.h (struct target_ops) <supports_fork_events>:
426 New member.
427 <supports_vfork_events>: New member.
428 (target_supports_fork_events): New macro.
429 (target_supports_vfork_events): New macro.
430 * win32-low.c (win32_target_ops): Initialize new structure
431 members.
432
835205d0
GB
4332015-05-12 Gary Benson <gbenson@redhat.com>
434
435 * server.c (handle_qxfer_exec_file): Use current process
436 if annex is empty.
437
21e94bd9
SL
4382015-05-08 Sandra Loosemore <sandra@codesourcery.com>
439
440 * linux-nios2-low.c: Include elf/common.h. Adjust comments.
441 Remove HAVE_PTRACE_GETREGS conditionals.
442 (nios2_regsets): Use PTRACE_GETREGSET and PTRACE_SETREGSET
443 instead of PTRACE_GETREGS and PTRACE_SETREGS.
444
45614f15
YQ
4452015-05-08 Yao Qi <yao.qi@linaro.org>
446
447 * linux-low.c (linux_supports_conditional_breakpoints): New
448 function.
449 (linux_target_ops): Install new target method.
450 * lynx-low.c (lynx_target_ops): Install NULL hook for
451 supports_conditional_breakpoints.
452 * nto-low.c (nto_target_ops): Likewise.
453 * spu-low.c (spu_target_ops): Likewise.
454 * win32-low.c (win32_target_ops): Likewise.
455 * server.c (handle_query): Check
456 target_supports_conditional_breakpoints.
457 * target.h (struct target_ops) <supports_conditional_breakpoints>:
458 New field.
459 (target_supports_conditional_breakpoints): New macro.
460
80ad801e
PA
4612015-05-06 Pedro Alves <palves@redhat.com>
462
463 PR server/18081
464 * server.c (start_inferior): If the process exits, mourn it.
465
819843c7
GB
4662015-04-21 Gary Benson <gbenson@redhat.com>
467
468 * hostio.c (fileio_open_flags_to_host): Factored out to
469 fileio_to_host_openflags in common/fileio.c. Single use
470 updated.
471
a2d5a9d7
MF
4722015-04-17 Max Filippov <jcmvbkbc@gmail.com>
473
474 * linux-xtensa-low.c (xtensa_fill_gregset)
475 (xtensa_store_gregset): Check XCHAL_HAVE_LOOPS instead of
476 XCHAL_HAVE_LOOP.
477
deb44829
MF
4782015-04-17 Max Filippov <jcmvbkbc@gmail.com>
479
480 * linux-xtensa-low.c (xtensa_usrregs_info): Remove.
481 (regs_info): Replace usrregs pointer with NULL.
482
e57f1de3
GB
4832015-04-17 Gary Benson <gbenson@redhat.com>
484
485 * target.h (struct target_ops) <pid_to_exec_file>: New field.
486 * linux-low.c (linux_target_ops): Initialize pid_to_exec_file.
487 * server.c (handle_qxfer_exec_file): New function.
488 (qxfer_packets): Add exec-file entry.
489 (handle_query): Report qXfer:exec-file:read as supported packet.
490
62828379
RN
4912015-04-14 Romain Naour <romain.naour@openwide.fr> (tiny change)
492
493 * linux-low.c (linux_read_offsets): Remove get_thread_lwp.
494
b88bb450
GB
4952015-04-09 Gary Benson <gbenson@redhat.com>
496
497 * hostio-errno.c (errno_to_fileio_error): Remove function.
498 Update caller to use remote_fileio_to_fio_error.
499
c8f4bfdd
YQ
5002015-04-09 Yao Qi <yao.qi@linaro.org>
501
502 * linux-low.c (linux_insert_point): Call
503 insert_memory_breakpoint if TYPE is raw_bkpt_type_sw.
504 (linux_remove_point): Call remove_memory_breakpoint if type is
505 raw_bkpt_type_sw.
506 * linux-x86-low.c (x86_insert_point): Don't call
507 insert_memory_breakpoint.
508 (x86_remove_point): Don't call remove_memory_breakpoint.
509
41f98f02
PA
5102015-04-01 Pedro Alves <palves@redhat.com>
511 Cleber Rosa <crosa@redhat.com>
512
513 * server.c (gdbserver_usage): Reorganize and extend the usage
514 message.
515
2bf6fb9d
PA
5162015-03-24 Pedro Alves <palves@redhat.com>
517
518 * linux-low.c (check_stopped_by_breakpoint): Tweak debug log
519 output. Also dump TRAP_TRACE.
520 (linux_low_filter_event): In debug output, distinguish a
521 resume_stop SIGSTOP from a delayed SIGSTOP.
522
369f6daa
GB
5232015-03-24 Gary Benson <gbenson@redhat.com>
524
525 * linux-x86-low.c (x86_linux_new_thread): Moved to
526 nat/x86-linux.c.
527 (x86_linux_prepare_to_resume): Likewise.
528
8e5d4070
GB
5292015-03-24 Gary Benson <gbenson@redhat.com>
530
531 * Makefile.in (x86-linux-dregs.o): New rule.
532 * configure.srv: Add x86-linux-dregs.o to relevant targets.
533 * linux-x86-low.c: Include nat/x86-linux-dregs.h.
534 (u_debugreg_offset): Moved to nat/x86-linux-dregs.c.
535 (x86_linux_dr_get): Likewise.
536 (x86_linux_dr_set): Likewise.
537 (update_debug_registers_callback): Likewise.
538 (x86_linux_dr_set_addr): Likewise.
539 (x86_linux_dr_get_addr): Likewise.
540 (x86_linux_dr_set_control): Likewise.
541 (x86_linux_dr_get_control): Likewise.
542 (x86_linux_dr_get_status): Likewise.
543 (x86_linux_update_debug_registers): Likewise.
544
2b95d440
GB
5452015-03-24 Gary Benson <gbenson@redhat.com>
546
547 * linux-x86-low.c (x86_linux_update_debug_registers):
548 New function, factored out from...
549 (x86_linux_prepare_to_resume): ...this.
550
14b0bc68
GB
5512015-03-24 Gary Benson <gbenson@redhat.com>
552
553 * linux-x86-low.c (x86_linux_dr_get): Update comments.
554 (x86_linux_dr_set): Likewise.
555 (update_debug_registers_callback): Likewise.
556 (x86_linux_dr_set_addr): Likewise.
557 (x86_linux_dr_get_addr): Likewise.
558 (x86_linux_dr_set_control): Likewise.
559 (x86_linux_dr_get_control): Likewise.
560 (x86_linux_dr_get_status): Likewise.
561 (x86_linux_prepare_to_resume): Likewise.
562
5dfe6ca8
GB
5632015-03-24 Gary Benson <gbenson@redhat.com>
564
565 * linux-x86-low.c (x86_linux_dr_get): Add assertion.
566 Use perror_with_name. Pass string through gettext.
567 (x86_linux_dr_set): Likewise.
568
d33472ad
GB
5692015-03-24 Gary Benson <gbenson@redhat.com>
570
571 * linux-x86-low.c (x86_dr_low_set_addr): Rename to...
572 (x86_linux_dr_set_addr): ...this.
573 (x86_dr_low_get_addr): Rename to...
574 (x86_linux_dr_get_addr): ...this.
575 (x86_dr_low_set_control): Rename to...
576 (x86_linux_dr_set_control): ...this.
577 (x86_dr_low_get_control): Rename to...
578 (x86_linux_dr_get_control): ...this.
579 (x86_dr_low_get_status): Rename to...
580 (x86_linux_dr_get_status): ...this.
581 (x86_dr_low): Update with new function names.
582
4b134ca1
GB
5832015-03-24 Gary Benson <gbenson@redhat.com>
584
585 * Makefile.in (x86-linux.o): New rule.
586 * configure.srv: Add x86-linux.o to relevant targets.
587 * linux-low.c (lwp_set_arch_private_info): New function.
588 (lwp_arch_private_info): Likewise.
589 * linux-x86-low.c: Include nat/x86-linux.h.
590 (arch_lwp_info): Removed structure.
591 (update_debug_registers_callback):
592 Use lwp_set_debug_registers_changed.
593 (x86_linux_prepare_to_resume): Use lwp_debug_registers_changed
594 and lwp_set_debug_registers_changed.
595 (x86_linux_new_thread): Use lwp_set_debug_registers_changed.
596
34c703da
GB
5972015-03-24 Gary Benson <gbenson@redhat.com>
598
599 * linux-low.h (linux_target_ops) <new_thread>: Changed signature.
600 * linux-arm-low.c (arm_new_thread): Likewise.
601 * linux-aarch64-low.c (aarch64_linux_new_thread): Likewise.
602 * linux-mips-low.c (mips_linux_new_thread): Likewise.
603 * linux-x86-low.c (x86_linux_new_thread): Likewise.
604 * linux-low.c (add_lwp): Update the_low_target.new_thread call.
605
cff068da
GB
6062015-03-24 Gary Benson <gbenson@redhat.com>
607
608 * linux-low.c (ptid_of_lwp): New function.
609 (lwp_is_stopped): Likewise.
610 (lwp_stop_reason): Likewise.
611 * linux-x86-low.c (update_debug_registers_callback):
612 Use lwp_is_stopped.
613 (x86_linux_prepare_to_resume): Use ptid_of_lwp and
614 lwp_stop_reason.
615
b2f7c7e8
GB
6162015-03-24 Gary Benson <gbenson@redhat.com>
617
618 * linux-low.h (linux_stop_lwp): Remove declaration.
619
6d4ee8c6
GB
6202015-03-24 Gary Benson <gbenson@redhat.com>
621
622 * linux-low.h: Include nat/linux-nat.h.
623 * linux-low.c (iterate_over_lwps_args): New structure.
624 (iterate_over_lwps_filter): New function.
625 (iterate_over_lwps): Likewise.
626 * linux-x86-low.c (update_debug_registers_callback):
627 Update signature to what iterate_over_lwps expects.
628 Remove PID check that iterate_over_lwps now performs.
629 (x86_dr_low_set_addr): Use iterate_over_lwps.
630 (x86_dr_low_set_control): Likewise.
631
70a0bb6b
GB
6322015-03-24 Gary Benson <gbenson@redhat.com>
633
634 * linux-x86-low.c (x86_debug_reg_state): New function.
635 (x86_linux_prepare_to_resume): Use the above.
636
7b669087
GB
6372015-03-24 Gary Benson <gbenson@redhat.com>
638
639 * linux-low.c (current_lwp_ptid): New function.
640 * linux-x86-low.c: Include nat/linux-nat.h.
641 (x86_dr_low_get_addr): Use current_lwp_ptid.
642 (x86_dr_low_get_control): Likewise.
643 (x86_dr_low_get_status): Likewise.
644
eef49a3d
PA
6452015-03-20 Pedro Alves <palves@redhat.com>
646
647 * tracepoint.c (cmd_qtstatus): Make "str" const.
648
b2333d22
PA
6492015-03-20 Pedro Alves <palves@redhat.com>
650
651 * server.c (handle_general_set): Make "req_str" const.
652
23f238d3
PA
6532015-03-19 Pedro Alves <palves@redhat.com>
654
655 * linux-low.c (linux_resume_one_lwp): Rename to ...
656 (linux_resume_one_lwp_throw): ... this. Don't handle ESRCH here,
657 instead call perror_with_name.
658 (check_ptrace_stopped_lwp_gone): New function.
659 (linux_resume_one_lwp): Reimplement as wrapper around
660 linux_resume_one_lwp_throw that swallows errors if the LWP is
661 gone.
662
91baf43f
PA
6632015-03-19 Pedro Alves <palves@redhat.com>
664
665 * linux-low.c (count_events_callback, select_event_lwp_callback):
666 No longer check whether the thread has resume_stop as last resume
667 kind.
668
8bf3b159
PA
6692015-03-19 Pedro Alves <palves@redhat.com>
670
671 * linux-low.c (count_events_callback, select_event_lwp_callback):
672 Use the lwp's status_pending_p field, not the thread's.
673
b90fc188
PA
6742015-03-19 Pedro Alves <palves@redhat.com>
675
676 * linux-low.c (select_event_lwp_callback): Update comments to
677 no longer mention SIGTRAP.
678
464b0089
GB
6792015-03-18 Gary Benson <gbenson@redhat.com>
680
681 * server.c (handle_query): Do not report vFile:fstat as supported.
682
aa9e327f
GB
6832015-03-11 Gary Benson <gbenson@redhat.com>
684
685 * hostio.c (sys/types.h): New include.
686 (sys/stat.h): Likewise.
687 (common-remote-fileio.h): Likewise.
688 (handle_fstat): New function.
689 (handle_vFile): Handle vFile:fstat packets.
aa9e327f 690
791c0056
GB
6912015-03-11 Gary Benson <gbenson@redhat.com>
692
693 * configure.ac (AC_CHECK_MEMBERS): Add checks for
694 struct stat.st_blocks and struct stat.st_blksize.
695 * configure: Regenerate.
696 * config.in: Likewise.
697 * Makefile.in (SFILES): Add common/common-remote-fileio.c.
698 (OBS): Add common-remote-fileio.o.
699 (common-remote-fileio.o): New rule.
700
9a9df970
PA
7012015-03-09 Pedro Alves <palves@redhat.com>
702
703 * tracepoint.c (gdb_agent_helper_thread): Cast '&sockaddr' to
704 'struct sockaddr' pointer in 'accept' call.
705
9eb1356e
PA
7062015-03-09 Pedro Alves <palves@redhat.com>
707
708 Revert:
709 2015-03-07 Pedro Alves <palves@redhat.com>
710 * gdbreplay.c: No longer include <netinet/in.h>, <sys/socket.h>,
711 or <winsock2.h> here. Instead include "gdb_socket.h".
712 (remote_open): Use union gdb_sockaddr_u.
713 * remote-utils.c: No longer include <netinet/in.h>, <sys/socket.h>
714 or <winsock2.h> here. Instead include "gdb_socket.h".
715 (handle_accept_event, remote_prepare): Use union gdb_sockaddr_u.
716 * tracepoint.c: Include "gdb_socket.h" instead of <sys/socket.h>
717 or <sys/un.h>.
718 (init_named_socket, gdb_agent_helper_thread): Use union
719 gdb_sockaddr_u.
720
aac331e4
PA
7212015-03-07 Pedro Alves <palves@redhat.com>
722
723 * configure.ac (build_warnings): Move
724 -Wdeclaration-after-statement to the C-specific set.
725 * configure: Regenerate.
726
366c75fc
PA
7272015-03-07 Pedro Alves <palves@redhat.com>
728
729 * gdbreplay.c: No longer include <netinet/in.h>, <sys/socket.h>,
730 or <winsock2.h> here. Instead include "gdb_socket.h".
731 (remote_open): Use union gdb_sockaddr_u.
732 * remote-utils.c: No longer include <netinet/in.h>, <sys/socket.h>
733 or <winsock2.h> here. Instead include "gdb_socket.h".
734 (handle_accept_event, remote_prepare): Use union gdb_sockaddr_u.
735 * tracepoint.c: Include "gdb_socket.h" instead of <sys/socket.h>
736 or <sys/un.h>.
737 (init_named_socket, gdb_agent_helper_thread): Use union
738 gdb_sockaddr_u.
739
492d29ea
PA
7402015-03-07 Pedro Alves <palves@redhat.com>
741
742 Adjust all callers of TRY_CATCH to use TRY/CATCH/END_CATCH
743 instead.
744
60a191ed
YQ
7452015-03-06 Yao Qi <yao.qi@linaro.org>
746
747 * linux-aarch64-low.c (aarch64_insert_point): Use
748 show_debug_regs as a boolean.
749 (aarch64_remove_point): Likewise.
750
f5771b1d
PA
7512015-03-05 Pedro Alves <palves@redhat.com>
752
753 * lynx-low.c (lynx_target_ops): Install NULL hooks for
754 stopped_by_sw_breakpoint, supports_stopped_by_sw_breakpoint,
755 stopped_by_hw_breakpoint, supports_stopped_by_hw_breakpoint.
756 * nto-low.c (nto_target_ops): Likewise.
757 * spu-low.c (spu_target_ops): Likewise.
758 * win32-low.c (win32_target_ops): Likewise.
759
3e572f71
PA
7602015-03-04 Pedro Alves <palves@redhat.com>
761
72f4393d 762 * linux-low.c (check_stopped_by_breakpoint) [USE_SIGTRAP_SIGINFO]:
3e572f71
PA
763 Decide whether a breakpoint triggered based on the SIGTRAP's
764 siginfo.si_code.
72f4393d
L
765 (thread_still_has_status_pending_p) [USE_SIGTRAP_SIGINFO]: Don't check whether a
766 breakpoint is inserted if relying on SIGTRAP's siginfo.si_code.
3e572f71
PA
767 (linux_low_filter_event): Check for breakpoints before checking
768 watchpoints.
769 (linux_wait_1): Don't re-increment the PC if relying on SIGTRAP's
770 siginfo.si_code.
72f4393d
L
771 (linux_stopped_by_sw_breakpoint)
772 (linux_supports_stopped_by_sw_breakpoint)
773 (linux_stopped_by_hw_breakpoint)
774 (linux_supports_stopped_by_hw_breakpoint): New functions.
775 (linux_target_ops): Install new target methods.
3e572f71 776
1ec68e26
PA
7772015-03-04 Pedro Alves <palves@redhat.com>
778
779 * remote-utils.c (prepare_resume_reply): Report swbreak/hbreak.
780 * server.c (swbreak_feature, hwbreak_feature): New globals.
781 (handle_query) <qSupported>: Handle "swbreak+" and "hwbreak+".
782 (captured_main): Clear swbreak_feature and hwbreak_feature.
783 * server.h (swbreak_feature, hwbreak_feature): Declare.
784 * target.h (struct target_ops) <stopped_by_sw_breakpoint,
785 supports_stopped_by_sw_breakpoint, stopped_by_hw_breakpoint,
786 supports_stopped_by_hw_breakpoint>: New fields.
787 (target_supports_stopped_by_sw_breakpoint)
788 (target_stopped_by_sw_breakpoint)
789 (target_supports_stopped_by_hw_breakpoint)
790 (target_stopped_by_hw_breakpoint): Declare.
791
15c66dd6
PA
7922015-03-04 Pedro Alves <palves@redhat.com>
793
794 enum lwp_stop_reason -> enum target_stop_reason
795 * linux-low.c (check_stopped_by_breakpoint): Adjust.
796 (thread_still_has_status_pending_p, check_stopped_by_watchpoint)
797 (linux_wait_1, stuck_in_jump_pad_callback)
798 (move_out_of_jump_pad_callback, linux_resume_one_lwp)
799 (linux_stopped_by_watchpoint):
800 * linux-low.h (enum lwp_stop_reason): Delete.
801 (struct lwp_info) <stop_reason>: Now an enum target_stop_reason.
802 * linux-x86-low.c (x86_linux_prepare_to_resume): Adjust.
803
98fc70d6
YQ
8042015-03-04 Yao Qi <yao.qi@linaro.org>
805
806 * Makefile.in (SFILES): Add linux-aarch64-low.c.
807
dd2ac174
GB
8082015-03-03 Gary Benson <gbenson@redhat.com>
809
810 * hostio.c (handle_vFile): Fix prefix lengths.
811
d68e53f4
MM
8122015-03-03 Markus Metzger <markus.t.metzger@intel.com>
813
814 * linux-low.c (linux_low_enable_btrace): Do not overwrite non-zero
815 ptr_bits.
816
bf2d68ab
AA
8172015-03-02 Andreas Arnez <arnez@linux.vnet.ibm.com>
818
819 * Makefile.in (s390-vx-linux64.c, s390-tevx-linux64.c)
820 (s390x-vx-linux64.c, s390x-tevx-linux64.c): New rules.
821 (clean): Add "rm -f" for above C files.
822 * configure.srv (srv_regobj): Add s390-vx-linux64.o,
823 s390-tevx-linux64.o, s390x-vx-linux64.o, and s390x-tevx-linux64.o.
824 (srv_xmlfiles): Add s390-vx-linux64.xml, s390-tevx-linux64.xml,
825 s390x-vx-linux64.xml, s390x-tevx-linux64.xml, and s390-vx.xml.
826 * linux-s390-low.c (HWCAP_S390_VX): New macro.
827 (init_registers_s390_vx_linux64, init_registers_s390_tevx_linux64)
828 (init_registers_s390x_vx_linux64)
829 (init_registers_s390x_tevx_linux64)
830 (tdesc_s390_vx_linux64, tdesc_s390_tevx_linux64)
831 (tdesc_s390x_vx_linux64, tdesc_s390x_tevx_linux64): New extern
832 declarations.
833 (s390_fill_vxrs_low, s390_store_vxrs_low, s390_fill_vxrs_high)
834 (s390_store_vxrs_high): New functions.
835 (s390_regsets): Add entries for NT_S390_VXRS_LOW and
836 NT_S390_VXRS_HIGH.
837 (s390_arch_setup): Add logic for selecting one of the new target
838 descriptions. Activate the new vector regsets if applicable.
839 (initialize_low_arch): Also invoke init_registers_s390_vx_linux64,
840 init_registers_s390_tevx_linux64, init_registers_s390x_vx_linux64,
841 and init_registers_s390x_tevx_linux64.
842
c966a859
PA
8432015-03-01 Pedro Alves <palves@redhat.com>
844
845 * linux-i386-ipa.c (gdb_agent_get_raw_reg): Constify 'raw_regs'
846 parameter.
847
4180215b
PA
8482015-02-27 Pedro Alves <palves@redhat.com>
849
850 * linux-x86-low.c (u_debugreg_offset): New function.
851 (x86_linux_dr_get, x86_linux_dr_set): Use it.
852
749bab01
PA
8532015-02-27 Pedro Alves <palves@redhat.com>
854
855 * gdb_proc_service.h: Wrap with EXTERN_C_PUSH/EXTERN_C_POP.
856 [!HAVE_PROC_SERVICE_H] (struct ps_prochandle): Forward declare.
857 [!HAVE_PROC_SERVICE_H] (ps_pdread, ps_pdwrite, ps_ptread)
858 ps_ptwrite, ps_lgetregs, ps_lsetregs, ps_lgetfpregs)
859 (ps_lsetfpregs, ps_getpid)
860 (ps_get_thread_area, ps_pglobal_lookup, ps_pstop, ps_pcontinue)
861 (ps_lstop, ps_lcontinue, ps_lgetxregsize, ps_lgetxregs)
862 (ps_lsetxregs, ps_plog): Declare.
863
3c14e5a3
PA
8642015-02-27 Pedro Alves <palves@redhat.com>
865
866 * linux-amd64-ipa.c (gdb_agent_get_raw_reg): Use
867 IP_AGENT_EXPORT_FUNC.
868 * linux-i386-ipa.c (gdb_agent_get_raw_reg): Use
869 IP_AGENT_EXPORT_FUNC.
870 * tracepoint.c (ATTR_USED, ATTR_NOINLINE, ATTR_CONSTRUCTOR)
871 (IP_AGENT_EXPORT): Delete.
872 (gdb_tp_heap_buffer, gdb_jump_pad_buffer, gdb_jump_pad_buffer_end)
873 (gdb_trampoline_buffer, gdb_trampoline_buffer_end)
874 (gdb_trampoline_buffer_error, collecting, gdb_collect)
875 (stop_tracing, flush_trace_buffer, about_to_request_buffer_space)
876 (trace_buffer_is_full, stopping_tracepoint, expr_eval_result)
877 (error_tracepoint, tracepoints, tracing, trace_buffer_ctrl)
878 (trace_buffer_ctrl_curr, trace_buffer_lo, trace_buffer_hi)
879 (traceframe_read_count, traceframe_write_count)
880 (traceframes_created, trace_state_variables, get_raw_reg)
881 (get_trace_state_variable_value, set_trace_state_variable_value)
882 (ust_loaded, helper_thread_id, cmd_buf): Use
883 IPA_SYM_EXPORTED_NAME.
884 (stop_tracing, flush_trace_buffer): Use IP_AGENT_EXPORT_FUNC.
885 (tracepoints) Use IP_AGENT_EXPORT_VAR.
886 (stopping_tracepoint, trace_buffer_is_full, expr_eval_result): Use
887 IP_AGENT_EXPORT_VAR and wrap in EXTERN_C_PUSH/EXTERN_C_POP.
888 (last_tracepoint): Move into !IN_PROCESS_AGENT block.
889 (error_tracepoint): Use IP_AGENT_EXPORT_VAR and wrap in
890 EXTERN_C_PUSH/EXTERN_C_POP.
891 (trace_state_variables): Use IP_AGENT_EXPORT_VAR.
892 (trace_buffer_lo, trace_buffer_hi): Use IP_AGENT_EXPORT_VAR and
893 wrap in EXTERN_C_PUSH/EXTERN_C_POP.
894 (trace_buffer_ctrl, trace_buffer_ctrl_curr)
895 (traceframe_write_count, traceframe_read_count)
896 (traceframes_created, tracing): Use IP_AGENT_EXPORT_VAR.
897 (about_to_request_buffer_space, get_trace_state_variable_value)
898 (set_trace_state_variable_value): Use IP_AGENT_EXPORT_FUNC.
899 (collecting): Use IP_AGENT_EXPORT_VAR and wrap in
900 EXTERN_C_PUSH/EXTERN_C_POP.
901 (gdb_collect): Use IP_AGENT_EXPORT_FUNC.
902 (ust_loaded, cmd_buf): Use IP_AGENT_EXPORT_VAR.
903 (helper_thread_id, gdb_agent_capability): Use IP_AGENT_EXPORT_VAR
904 and wrap in EXTERN_C_PUSH/EXTERN_C_POP.
905 (gdb_tp_heap_buffer, gdb_jump_pad_buffer, gdb_jump_pad_buffer_end)
906 (gdb_trampoline_buffer, gdb_trampoline_buffer_end)
907 (gdb_trampoline_buffer_error): Use IP_AGENT_EXPORT_VAR.
908 * tracepoint.h (ATTR_USED, ATTR_NOINLINE, EXPORTED_SYMBOL):
909 Define.
910 (IP_AGENT_EXPORT_FUNC, IP_AGENT_EXPORT_VAR)
911 (IP_AGENT_EXPORT_VAR_DECL): Define.
912 (tracing): Declare.
913 (gdb_agent_get_raw_reg): Declare.
914
fe978cb0
PA
9152015-02-27 Tom Tromey <tromey@redhat.com>
916 Pedro Alves <palves@redhat.com>
917
918 Rename symbols whose names are reserved C++ keywords throughout.
919
3bc3d82a
PA
9202015-02-27 Pedro Alves <palves@redhat.com>
921
922 * Makefile.in (COMPILER): New, get it from autoconf.
923 (CXX): Get from autoconf instead.
924 (COMPILE.pre): Use COMPILER.
925 (CC-LD): Rename to ...
926 (CC_LD): ... this. Use COMPILER.
927 (gdbserver$(EXEEXT), gdbreplay$(EXEEXT), $(IPA_LIB)): Adjust.
928 (CXX_FOR_TARGET): Default to g++ instead of gcc.
929 * acinclude.m4: Include build-with-cxx.m4.
930 * configure.ac: Call AC_PROG_CXX and GDB_AC_BUILD_WITH_CXX.
931 Disable -Werror by default if building in C++ mode.
932 (build_warnings): Add -Wno-sign-compare, -Wno-write-strings and
933 -Wno-narrowing in C++ mode. Run supported-warning-flags tests with
934 the C++ compiler. Save/restore CXXFLAGS too.
935 * configure: Regenerate.
936
07697489
PA
9372015-02-27 Pedro Alves <palves@redhat.com>
938
939 * acinclude.m4: Include libiberty.m4.
940 * configure.ac: Call libiberty_INIT.
941 * config.in, configure: Regenerate.
942
9beb7c4e
PA
9432015-02-26 Pedro Alves <palves@redhat.com>
944
945 * linux-low.c (linux_wait_1): When incrementing the PC past a
946 program breakpoint always use the_low_target.breakpoint_len as
947 increment, rather than the maximum between that and
948 the_low_target.decr_pc_after_break.
949
8090aef2
PA
9502015-02-23 Pedro Alves <palves@redhat.com>
951
952 * linux-low.c (check_stopped_by_breakpoint): Don't check if the
953 thread was doing a step-over; always adjust the PC if
954 we stepped over a permanent breakpoint.
955 (linux_wait_1): If we stepped over breakpoint that was on top of a
956 permanent breakpoint, manually advance the PC past it.
957
bc9540e8
PA
9582015-02-23 Pedro Alves <palves@redhat.com>
959
960 * linux-x86-low.c (REGSIZE): Define in both 32-bit and 64-bit
961 modes.
962 (x86_fill_gregset, x86_store_gregset): Use it when handling
963 $orig_eax.
964
2db9a427
PA
9652015-02-20 Pedro Alves <palves@redhat.com>
966
967 * thread-db.c: Include "nat/linux-procfs.h".
968 (thread_db_init): Skip listing new threads if the kernel supports
969 PTRACE_EVENT_CLONE and /proc/PID/task/ is accessible.
970
afa8d396
PA
9712015-02-20 Pedro Alves <palves@redhat.com>
972
973 * linux-low.c (status_pending_p_callback): Use ptid_match.
974
c9587f88
AT
9752015-02-19 Antoine Tremblay <antoine.tremblay@ericsson.com>
976
977 PR breakpoints/16812
978 * linux-low.c (wstatus_maybe_breakpoint): Remove.
979 (linux_low_filter_event): Update wstatus_maybe_breakpoint name.
980 (linux_wait_1): Report SIGTRAP,SIGILL,SIGSEGV.
981
b05ec7a5
AT
9822015-02-10 Antoine Tremblay <antoine.tremblay@ericsson.com>
983
984 PR breakpoints/15956
985 * tracepoint.c (cmd_qtinit): Add check for current_thread.
986
d33501a5
MM
9872015-02-09 Markus Metzger <markus.t.metzger@intel.com>
988
989 * linux-low.c (linux_low_btrace_conf): Print size.
990 * server.c (handle_btrace_conf_general_set): New.
991 (hanle_general_set): Call handle_btrace_conf_general_set.
992 (handle_query): Report Qbtrace-conf:bts:size as supported.
993
f4abbc16
MM
9942015-02-09 Markus Metzger <markus.t.metzger@intel.com>
995
996 * linux-low.c (linux_low_enable_btrace): Update parameters.
997 (linux_low_btrace_conf): New.
998 (linux_target_ops)<to_btrace_conf>: Initialize.
999 * server.c (current_btrace_conf): New.
1000 (handle_btrace_enable): Rename to ...
1001 (handle_btrace_enable_bts): ... this. Pass &current_btrace_conf
1002 to target_enable_btrace. Update comment. Update users.
1003 (handle_qxfer_btrace_conf): New.
1004 (qxfer_packets): Add btrace-conf entry.
1005 (handle_query): Report qXfer:btrace-conf:read as supported packet.
1006 * target.h (target_ops)<enable_btrace>: Update parameters and comment.
1007 (target_ops)<read_btrace_conf>: New.
1008 (target_enable_btrace): Update parameters.
1009 (target_read_btrace_conf): New.
1010
043c3577
MM
10112015-02-09 Markus Metzger <markus.t.metzger@intel.com>
1012
1013 * server.c (handle_btrace_general_set): Remove call to
1014 target_supports_btrace.
1015 (supported_btrace_packets): New.
1016 (handle_query): Call supported_btrace_packets.
1017 * target.h: include btrace-common.h.
1018 (btrace_target_info): Removed.
1019 (supports_btrace, target_supports_btrace): Update parameters.
1020
734b0e4b
MM
10212015-02-09 Markus Metzger <markus.t.metzger@intel.com>
1022
1023 * Makefile.in (SFILES): Add common/btrace-common.c.
1024 (OBS): Add common/btrace-common.o.
1025 (btrace-common.o): Add build rules.
1026 * linux-low: Include btrace-common.h.
1027 (linux_low_read_btrace): Use struct btrace_data. Call
1028 btrace_data_init and btrace_data_fini.
1029
d6c146e9
PA
10302015-02-06 Pedro Alves <palves@redhat.com>
1031
1032 * thread-db.c (find_new_threads_callback): Add debug output.
1033
20ba1ce6
PA
10342015-02-04 Pedro Alves <palves@redhat.com>
1035
1036 * linux-low.c (handle_extended_wait): Don't resume LWPs here.
1037 (resume_stopped_resumed_lwps): New function.
1038 (linux_wait_for_event_filtered): Use it.
1039
8cc73a39
SDJ
10402015-01-15 Sergio Durigan Junior <sergiodj@redhat.com>
1041
1042 * Makefile.in (SFILES): Add linux-personality.c.
1043 (linux-personality.o): New rule.
1044 * configure.srv (srv_linux_obj): Add linux-personality.o to the
1045 list of objects to be built.
1046 * linux-low.c: Include nat/linux-personality.h.
1047 (linux_create_inferior): Remove code to disable address space
1048 randomization (moved to ../nat/linux-personality.c). Create
1049 cleanup to disable address space randomization.
1050
fb23d554
SDJ
10512015-01-15 Sergio Durigan Junior <sergiodj@redhat.com>
1052
1053 * Makefile.in (posix-strerror.o): New rule.
1054 (mingw-strerror.o): Likewise.
1055 * configure: Regenerated.
1056 * configure.ac: Source file ../common/common.host. Initialize new
1057 variable srv_host_obs. Add srv_host_obs to GDBSERVER_DEPFILES.
1058
cdf43629
YQ
10592015-01-14 Yao Qi <yao@codesourcery.com>
1060
1061 * Makefile.in (SFILES): Add nat/ppc-linux.c.
1062 (ppc-linux.o): New rule.
1063 * configure.srv (powerpc*-*-linux*): Add ppc-linux.o.
1064 * configure.ac: AC_CHECK_FUNCS(getauxval).
1065 * config.in: Re-generated.
1066 * configure: Re-generated.
1067 * linux-ppc-low.c (ppc_arch_setup) [__powerpc64__]: Call
1068 ppc64_64bit_inferior_p
1069
514c5338
YQ
10702015-01-14 Yao Qi <yao@codesourcery.com>
1071
1072 * linux-ppc-low.c: Include "nat/ppc-linux.h".
1073 (PPC_FEATURE_HAS_VSX): Move to nat/ppc-linux.h.
1074 (PPC_FEATURE_HAS_ALTIVEC, PPC_FEATURE_HAS_SPE): Likewise.
1075 (PT_ORIG_R3, PT_TRAP): Likewise.
1076 (PTRACE_GETVSXREGS, PTRACE_SETVSXREGS): Likewise.
1077 (PTRACE_GETVRREGS, PTRACE_SETVRREGS): Likewise.
1078 (PTRACE_GETEVRREGS, PTRACE_SETEVRREGS): Likewise.
1079
3368c1e5
JB
10802015-01-10 Joel Brobecker <brobecker@adacore.com>
1081
1082 * i387-fp.c (i387_cache_to_xsave): In look over
1083 num_avx512_zmmh_high_registers, replace use of struct i387_xsave
1084 zmmh_low_space field by use of zmmh_high_space.
1085
582511be
PA
10862015-01-09 Pedro Alves <palves@redhat.com>
1087
1088 * linux-low.c (step_over_bkpt): Move higher up in the file.
1089 (handle_extended_wait): Don't store the stop_pc here.
1090 (get_stop_pc): Adjust comments and rename to ...
1091 (check_stopped_by_breakpoint): ... this. Record whether the LWP
1092 stopped for a software breakpoint or hardware breakpoint.
1093 (thread_still_has_status_pending_p): New function.
1094 (status_pending_p_callback): Use
1095 thread_still_has_status_pending_p. If the event is no longer
1096 interesting, resume the LWP.
1097 (handle_tracepoints): Add assert.
1098 (maybe_move_out_of_jump_pad): Remove cancel_breakpoints call.
1099 (wstatus_maybe_breakpoint): New function.
1100 (cancel_breakpoint): Delete function.
1101 (check_stopped_by_watchpoint): New function, factored out from
1102 linux_low_filter_event.
1103 (lp_status_maybe_breakpoint): Delete function.
1104 (linux_low_filter_event): Remove filter_ptid argument.
1105 Leave thread group exits pending here. Store the LWP's stop PC.
1106 Always leave events pending.
1107 (linux_wait_for_event_filtered): Pull all events out of the
1108 kernel, and leave them all pending.
1109 (count_events_callback, select_event_lwp_callback): Consider all
1110 events.
1111 (cancel_breakpoints_callback, linux_cancel_breakpoints): Delete.
1112 (select_event_lwp): Only give preference to the stepping LWP in
1113 all-stop mode. Adjust comments.
1114 (ignore_event): New function.
1115 (linux_wait_1): Delete 'retry' label. Use ignore_event. Remove
1116 references to cancel_breakpoints. Adjust to renames. Also give
1117 equal priority to all LWPs that have had events in non-stop mode.
1118 If reporting a software breakpoint event, unadjust the LWP's PC.
1119 (linux_wait): If linux_wait_1 returned an ignored event, retry.
1120 (stuck_in_jump_pad_callback, move_out_of_jump_pad_callback):
1121 Adjust.
1122 (linux_resume_one_lwp): Store the LWP's PC. Adjust.
1123 (resume_status_pending_p): Use thread_still_has_status_pending_p.
1124 (linux_stopped_by_watchpoint): Adjust.
1125 (linux_target_ops): Remove reference to linux_cancel_breakpoints.
1126 * linux-low.h (enum lwp_stop_reason): New.
1127 (struct lwp_info) <stop_pc>: Adjust comment.
1128 <stopped_by_watchpoint>: Delete field.
1129 <stop_reason>: New field.
1130 * linux-x86-low.c (x86_linux_prepare_to_resume): Adjust.
1131 * mem-break.c (software_breakpoint_inserted_here)
1132 (hardware_breakpoint_inserted_here): New function.
1133 * mem-break.h (software_breakpoint_inserted_here)
1134 (hardware_breakpoint_inserted_here): Declare.
1135 * target.h (struct target_ops) <cancel_breakpoints>: Remove field.
1136 (cancel_breakpoints): Delete.
1137 * tracepoint.c (clear_installed_tracepoints, stop_tracing)
1138 (upload_fast_traceframes): Remove references to
1139 cancel_breakpoints.
1140
a33e3959
PA
11412015-01-09 Pedro Alves <palves@redhat.com>
1142
1143 * thread-db.c (find_new_threads_callback): Ignore thread if the
1144 kernel thread ID is -1.
1145
8784d563
PA
11462015-01-09 Pedro Alves <palves@redhat.com>
1147
1148 * linux-low.c (linux_attach_fail_reason_string): Move to
1149 nat/linux-ptrace.c, and rename.
1150 (linux_attach_lwp): Update comment.
1151 (attach_proc_task_lwp_callback): New function.
1152 (linux_attach): Adjust to rename and use
1153 linux_proc_attach_tgid_threads.
1154 (linux_attach_fail_reason_string): Delete declaration.
1155
76f2b779
JB
11562015-01-01 Joel Brobecker <brobecker@adacore.com>
1157
1158 * gdbreplay.c (gdbreplay_version): Update copyright year to 2015.
1159 * server.c (gdbserver_version): Likewise.
1160
fafcc06a
SDJ
11612014-12-29 Sergio Durigan Junior <sergiodj@redhat.com>
1162
1163 * remote-utils.c: Include ctype.h.
1164 (input_interrupt): Explicitly handle the case when the char
1165 received is the NUL byte. Improve the printing of non-ASCII
1166 characters.
1167
beed38b8
JB
11682014-12-16 Joel Brobecker <brobecker@adacore.com>
1169
1170 * linux-low.c (linux_low_filter_event): Update call to
1171 linux_enable_event_reporting following the addition of
1172 a new parameter to that function.
1173
bf330350
CU
11742014-12-16 Catalin Udma <catalin.udma@freescale.com>
1175
1176 PR server/17457
1177 * linux-aarch64-low.c (AARCH64_FPSR_REGNO): New define.
1178 (AARCH64_FPCR_REGNO): Likewise.
1179 (AARCH64_NUM_REGS): Update to include fpsr/fpcr registers.
1180 (aarch64_fill_fpregset): Add missing fpsr/fpcr registers.
1181 (aarch64_store_fpregset): Likewise.
1182
5227d625
JB
11832014-12-15 Joel Brobecker <brobecker@adacore.com>
1184
1185 * lynx-low.c (lynx_resume): Use PTRACE_SINGLESTEP_ONE if N == 1.
1186 Remove FIXME comment about assumption about N.
1187
f93b65a0
JB
11882014-12-13 Joel Brobecker <brobecker@adacore.com>
1189
1190 * configure.ac: If large-file support is disabled in GDBserver,
1191 pass --disable-largefile to ACX_CONFIGURE_DIR call for "gnulib".
1192 * configure: Regenerate.
1193
e5a9158d
AA
11942014-12-12 Andreas Arnez <arnez@linux.vnet.ibm.com>
1195
1196 * linux-low.c (regsets_fetch_inferior_registers): Suppress the
1197 warning upon ENODATA from ptrace.
1198 * linux-s390-low.c (s390_store_tdb): New.
1199 (s390_regsets): Add regset for NT_S390_TDB.
1200
feea5f36
AA
12012014-12-12 Andreas Arnez <arnez@linux.vnet.ibm.com>
1202
1203 * linux-low.c (regsets_store_inferior_registers): Skip regsets
1204 without a fill_function.
1205 * linux-s390-low.c (s390_fill_last_break): Remove.
1206 (s390_regsets): Set fill_function to NULL for NT_S390_LAST_BREAK.
1207 (s390_arch_setup): Use regset's size instead of fill_function for
1208 loop end condition.
1209
098dbe61
AA
12102014-12-12 Andreas Arnez <arnez@linux.vnet.ibm.com>
1211
1212 * linux-low.c (regsets_fetch_inferior_registers): Do not invoke
1213 the regset's store function when ptrace returned an error.
1214 * regcache.c (get_thread_regcache): Invalidate register cache
1215 before fetching inferior's registers.
1216
28eef672
AA
12172014-12-12 Andreas Arnez <arnez@linux.vnet.ibm.com>
1218
1219 * linux-low.c (regsets_fetch_inferior_registers): Rephrase
1220 while-loop as for-loop.
1221 (regsets_store_inferior_registers): Likewise.
1222
bdca27a2
YQ
12232014-11-28 Yao Qi <yao@codesourcery.com>
1224
1225 * configure.ac(AC_CHECK_FUNCS): Remove readlink.
1226 * config.in, configure: Re-generate.
1227 * hostio.c (handle_unlink): Remove code checking HAVE_READLINK
1228 is defined.
1229
9c232dda
YQ
12302014-11-21 Yao Qi <yao@codesourcery.com>
1231
1232 * configure.ac: Don't invoke AC_FUNC_ALLOCA.
1233 (AC_CHECK_HEADERS): Remove malloc.h.
1234 * configure: Re-generated.
1235 * config.in: Re-generated.
1236 * server.h: Don't include alloca.h and malloc.h.
1237 * gdbreplay.c: Don't check HAVE_ALLOCA_H is defined.
1238 Don't include malloc.h.
1239
43968415
JB
12402014-11-17 Joel Brobecker <brobecker@adacore.com>
1241
1242 * lynx-low.c (lynx_write_memory): Put lynx_read_memory and
1243 corresponding ERRNO check in same block.
1244
40e91bc7
PA
12452014-11-12 Pedro Alves <palves@redhat.com>
1246
1247 * server.c (cont_thread): Update comment.
1248 (start_inferior, attach_inferior): No longer clear cont_thread.
1249 (handle_v_cont): No longer set cont_thread.
1250 (captured_main): Clear cont_thread each time a GDB connects.
1251
c2c118cf
PA
12522014-11-12 Pedro Alves <palves@redhat.com>
1253
1254 * linux-low.c (linux_wait_1): Don't force a wait for the Hc
1255 thread, and don't resume all threads if the Hc thread has exited.
1256
78708b7c
PA
12572014-11-12 Pedro Alves <palves@redhat.com>
1258
1259 * linux-low.c (linux_request_interrupt): Always send a SIGINT to
1260 the process group instead of to a specific LWP.
1261
a2abc7de
PA
12622014-10-15 Pedro Alves <palves@redhat.com>
1263
1264 PR server/17487
1265 * win32-arm-low.c (arm_set_thread_context): Remove current_event
1266 parameter.
1267 (arm_set_thread_context): Delete.
1268 (the_low_target): Adjust.
1269 * win32-i386-low.c (debug_registers_changed)
1270 (debug_registers_used): Delete.
1271 (update_debug_registers_callback): New function.
1272 (x86_dr_low_set_addr, x86_dr_low_set_control): Mark all threads as
1273 needing to update their debug registers.
1274 (win32_get_current_dr): New function.
1275 (x86_dr_low_get_addr, x86_dr_low_get_control)
1276 (x86_dr_low_get_status): Fetch the debug register from the thread
1277 record's context.
1278 (i386_initial_stuff): Adjust.
1279 (i386_get_thread_context): Remove current_event parameter. Don't
1280 clear debug_registers_changed nor copy DR values to
1281 debug_reg_state.
1282 (i386_set_thread_context): Delete.
1283 (i386_prepare_to_resume): New function.
1284 (i386_thread_added): Mark the thread as needing to update irs
1285 debug registers.
1286 (the_low_target): Remove i386_set_thread_context and install
1287 i386_prepare_to_resume.
1288 * win32-low.c (win32_get_thread_context): Adjust.
1289 (win32_set_thread_context): Use SetThreadContext
1290 directly.
1291 (win32_prepare_to_resume): New function.
1292 (win32_require_context): New function, factored out from ...
1293 (thread_rec): ... this.
1294 (continue_one_thread): Call win32_prepare_to_resume on each thread
1295 we're about to continue.
1296 (win32_resume): Call win32_prepare_to_resume on the event thread.
1297 * win32-low.h (struct win32_thread_info)
1298 <debug_registers_changed>: New field.
1299 (struct win32_target_ops): Change prototype of set_thread_context,
1300 delete set_thread_context and add prepare_to_resume.
1301 (win32_require_context): New declaration.
1302
a442d071
GB
13032014-10-08 Gary Benson <gbenson@redhat.com>
1304
1305 * server.h: Do not include common-exceptions.h.
1306
6f1947e8
GB
13072014-10-08 Gary Benson <gbenson@redhat.com>
1308
1309 * server.h: Do not include cleanups.h.
1310
63b434a4
JH
13112014-09-30 James Hogan <james.hogan@imgtec.com>
1312
1313 * Makefile.in (clean): Add rm -f commands for mips-dsp-linux.c and
1314 mips64-dsp-linux.c.
1315
c4d9ceb6
YQ
13162014-09-23 Yao Qi <yao@codesourcery.com>
1317
1318 * linux-low.c (lp_status_maybe_breakpoint): New function.
1319 (linux_low_filter_event): Call lp_status_maybe_breakpoint.
1320 (count_events_callback): Likewise.
1321 (select_event_lwp_callback): Likewise.
1322 (cancel_breakpoints_callback): Likewise.
1323
89a5711c
DB
13242014-09-19 Don Breazeal <donb@codesourcery.com>
1325
1326 * linux-low.c (handle_extended_wait): Call
1327 linux_ptrace_get_extended_event.
1328 (get_stop_pc, get_detach_signal, linux_low_filter_event): Call
1329 linux_is_extended_waitstatus.
1330
bffc0964
JB
13312014-09-16 Joel Brobecker <brobecker@adacore.com>
1332
1333 * Makefile.in (CPPFLAGS): Define.
1334 (INTERNAL_CFLAGS_BASE): Add ${CPPFLAGS}.
1335 (IPAGENT_CFLAGS): Remove ${CPPFLAGS}.
1336
0bfdf32f
GB
13372014-09-16 Gary Benson <gbenson@redhat.com>
1338
1339 * inferiors.h (current_inferior): Renamed as...
1340 (current_thread): New variable. All uses updated.
1341 * linux-low.c (get_pc): Renamed saved_inferior as saved_thread.
1342 (maybe_move_out_of_jump_pad): Likewise.
1343 (cancel_breakpoint): Likewise.
1344 (linux_low_filter_event): Likewise.
1345 (wait_for_sigstop): Likewise.
1346 (linux_resume_one_lwp): Likewise.
1347 (need_step_over_p): Likewise.
1348 (start_step_over): Likewise.
1349 (linux_stabilize_threads): Renamed save_inferior as saved_thread.
1350 * linux-x86-low.c (x86_linux_update_xmltarget): Likewise.
1351 * proc-service.c (ps_lgetregs): Renamed reg_inferior as reg_thread
1352 and save_inferior as saved_thread.
1353 * regcache.c (get_thread_regcache): Renamed saved_inferior as
1354 saved_thread.
1355 (regcache_invalidate_thread): Likewise.
1356 * remote-utils.c (prepare_resume_reply): Likewise.
1357 * thread-db.c (thread_db_get_tls_address): Likewise.
1358 (disable_thread_event_reporting): Likewise.
1359 (remove_thread_event_breakpoints): Likewise.
1360 * tracepoint.c (gdb_agent_about_to_close): Renamed save_inferior
1361 as saved_thread.
1362 * target.h (set_desired_inferior): Renamed as...
1363 (set_desired_thread): New declaration. All uses updated.
1364 * server.c (myresume): Updated comment to reference thread instead
1365 of inferior.
1366 (handle_serial_event): Likewise.
1367 (handle_target_event): Likewise.
1368
361c8ade
GB
13692014-09-12 Tom Tromey <tromey@redhat.com>
1370 Gary Benson <gbenson@redhat.com>
1371
1372 * regcache.h: Include common-regcache.h.
1373 (regcache_read_pc): Don't declare.
1374 * regcache.c (get_thread_regcache_for_ptid): New function.
1375
bd9269f7
GB
13762014-09-11 Tom Tromey <tromey@redhat.com>
1377 Gary Benson <gbenson@redhat.com>
1378
1379 * symbol.c: New file.
1380 * Makefile.in (SFILES): Add symbol.c.
1381 (OBS): Add symbol.o.
1382
f8c1d06b
GB
13832014-09-11 Gary Benson <gbenson@redhat.com>
1384
1385 * target.c (target_stop_ptid, target_continue_ptid): New
1386 functions.
1387
721ec300
GB
13882014-09-11 Tom Tromey <tromey@redhat.com>
1389 Gary Benson <gbenson@redhat.com>
1390
1391 * target.h: Include target/target.h.
1392 * target.c (target_read_memory, target_read_uint32)
1393 (target_write_memory): New functions.
1394
c5e92cca
GB
13952014-09-11 Gary Benson <gbenson@redhat.com>
1396
1397 * server.h (debug_hw_points): Don't declare.
1398 * server.c (debug_hw_points): Don't define. Replace all uses
1399 with show_debug_regs.
1400 * linux-aarch64-low.c (debug_hw_points): Don't define. Replace
1401 all uses with show_debug_regs.
1402
2e4bb98a
EBM
14032014-09-08 Edjunior Barbosa Machado <emachado@linux.vnet.ibm.com>
1404
1405 * linux-ppc-low.c (ppc_collect_ptrace_register): Adjust routine to take
1406 endianness into account.
1407 (ppc_supply_ptrace_register): Likewise.
1408
ac740bc7
JH
14092014-09-03 James Hogan <james.hogan@imgtec.com>
1410
1411 * linux-mips-low.c (mips_read_description): Reset errno to 0 prior
1412 to reading DSP_CONTROL with PTRACE_PEEKUSER ptrace call.
1413
97ea6506
GB
14142014-09-03 Gary Benson <gbenson@redhat.com>
1415
1416 * linux-x86-low.c (x86_linux_prepare_to_resume): Use
1417 ALL_DEBUG_ADDRESS_REGISTERS.
1418
df7e5265
GB
14192014-09-02 Gary Benson <gbenson@redhat.com>
1420
1421 * i386-low.h: Renamed as...
1422 * x86-low.h: New file. All type, function and variable name
1423 prefixes changed from "i386_" to "x86_". All references updated.
1424 * i386-low.c: Renamed as...
1425 * x86-low.c: New file. All type, function and variable name
1426 prefixes changed from "i386_" to "x86_". All references updated.
1427
ed859da7
GB
14282014-09-02 Gary Benson <gbenson@redhat.com>
1429
1430 * linux-x86-low.c (x86_linux_new_process): Use XCNEW.
1431 (x86_linux_new_thread): Likewise.
1432
860789c7
GB
14332014-08-29 Gary Benson <gbenson@redhat.com>
1434
1435 * server.h (setjmp.h): Do not include.
1436 (toplevel): Do not declare.
1437 (common-exceptions.h): Include.
1438 (cleanups.h): Likewise.
1439 * server.c (toplevel): Do not define.
1440 (exit_code): New static global.
1441 (detach_or_kill_for_exit_cleanup): New function.
1442 (main): New function. Original main renamed to...
1443 (captured_main): New function.
1444 * utils.c (verror) [!IN_PROCESS_AGENT]: Use throw_verror.
1445
ff55e1b5
GB
14462014-08-29 Gary Benson <gbenson@redhat.com>
1447
1448 * Makefile.in (SFILES): Add common/common-exceptions.c.
1449 (OBS): Add common-exceptions.o.
1450 (common-exceptions.o): New rule.
1451 * utils.c (prepare_to_throw_exception): New function.
1452
e9bcb658
GB
14532014-08-29 Gary Benson <gbenson@redhat.com>
1454
1455 * config.in: Regenerate.
1456 * configure: Likewise.
1457
e3180625
GB
14582014-08-29 Gary Benson <gbenson@redhat.com>
1459
1460 * Makefile.in (SFILES): Add common/cleanups.c.
1461 (OBS): cleanups.o.
1462 (cleanups.o): New rule.
1463
e3d6ba5d
GB
14642014-08-29 Gary Benson <gbenson@redhat.com>
1465
1466 * utils.c (internal_vwarning): New function.
1467
7096e886
GB
14682014-08-28 Gary Benson <gbenson@redhat.com>
1469
1470 * utils.h (fatal): Remove declaration.
1471 * utils.c (fatal): Remove function.
1472
14ce3192
GB
14732014-08-28 Gary Benson <gbenson@redhat.com>
1474
1475 * tracepoint.c (gdb_agent_init): Replace fatal with
1476 perror_with_name.
1477 (initialize_tracepoint): Likewise.
1478
50278d59
GB
14792014-08-28 Gary Benson <gbenson@redhat.com>
1480
1481 * remote-utils.c (remote_prepare): Replace fatal with error.
1482
aa96c426
GB
14832014-08-28 Gary Benson <gbenson@redhat.com>
1484
1485 * linux-low.c (linux_async): Replace fatal with warning.
1486 Tidy up and return.
1487 (linux_start_non_stop): Return -1 if linux_async failed.
1488
f7160e97
GB
14892014-08-28 Gary Benson <gbenson@redhat.com>
1490
1491 * linux-x86-low.c (i386_dr_low_set_addr): Replace check with
1492 gdb_assert.
1493 (i386_dr_low_get_addr): Remove vague comment.
1494 * win32-i386-low.c (i386_dr_low_set_addr): Replace check with
1495 gdb_assert.
1496
38e08fca
GB
14972014-08-28 Gary Benson <gbenson@redhat.com>
1498
1499 * inferiors.c (get_thread_process): Replace check with gdb_assert.
1500 * linux-low.c (linux_wait_for_event_filtered): Replace fatal with
1501 internal_error.
1502 (linux_resume_one_lwp): Likewise.
1503 * linux-x86-low.c (x86_siginfo_fixup): Replace checks with
1504 gdb_assert.
1505 * mem-break.c (raw_bkpt_type_to_target_hw_bp_type): Replace fatal
1506 with internal_error.
1507 * regcache.c (get_thread_regcache): Replace check with gdb_assert.
1508 (init_register_cache): Replace fatal with gdb_assert_not_reached.
1509 (find_register_by_name): Replace fatal with internal_error.
1510 (find_regno): Likewise.
1511 * tdesc.c (init_target_desc): Replace check with gdb_assert.
1512 * thread-db.c (thread_db_create_event): Likewise.
1513 (thread_db_load_search): Likewise.
1514 (try_thread_db_load_1): Likewise.
1515 * tracepoint.c (get_jump_space_head): Replace fatal with
1516 internal_error.
1517 (claim_trampoline_space): Likewise.
1518 (have_fast_tracepoint_trampoline_buffer): Likewise.
1519 (cmd_qtstart): Likewise.
1520 (stop_tracing): Likewise.
1521 (fast_tracepoint_collecting): Likewise.
1522 (target_malloc): Likewise.
1523 (download_tracepoint): Likewise.
1524 (download_trace_state_variables): Replace check with gdb_assert.
1525 (upload_fast_traceframes): Replace fatal with internal_error.
1526
34abf635
GB
15272014-08-19 Tom Tromey <tromey@redhat.com>
1528 Gary Benson <gbenson@redhat.com>
1529
1530 * Makefile.in (SFILES): Add common/common-debug.c.
1531 (OBS): Add common-debug.o.
1532 (common-debug.o): New rule.
1533 * debug.h (debug_printf): Don't declare.
1534 * debug.c (debug_printf): Renamed and rewritten as...
1535 (debug_vprintf): New function.
1536
f6e94d78
GB
15372014-08-19 Gary Benson <gbenson@redhat.com>
1538
1539 * utils.h: Do not include print-utils.h.
1540
9239eeab
GB
15412014-08-19 Tom Tromey <tromey@redhat.com>
1542 Gary Benson <gbenson@redhat.com>
1543
1544 * server.h: Add static assertion.
1545 (gdb_byte, CORE_ADDR, LONGEST, ULONGEST): Remove.
1546
ef87c8bb
GB
15472014-08-19 Tom Tromey <tromey@redhat.com>
1548 Gary Benson <gbenson@redhat.com>
1549
1550 * Makefile.in (SFILES): Add common/errors.c.
1551 (OBS): Add errors.o.
1552 (IPA_OBS): Add errors-ipa.o.
1553 (errors.o): New rule.
1554 (errors-ipa.o): Likewise.
1555 * utils.h (perror_with_name, error, warning): Don't declare.
1556 * utils.c (warning): Renamed and rewritten as...
1557 (vwarning): New function.
1558 (error): Renamed and rewritten as...
1559 (verror): New function.
1560 (internal_error): Renamed and rewritten as...
1561 (internal_verror): New function.
1562
bb974a24
GB
15632014-08-07 Gary Benson <gbenson@redhat.com>
1564
1565 * configure.ac (AC_CHECK_HEADERS): Remove errno.h.
1566 * configure: Regenerate.
1567 * config.in: Likewise.
1568 * server.h: Do not include errno.h.
1569 * event-loop.c: Likewise.
1570 * hostio-errno.c: Likewise.
1571 * linux-low.c: Likewise.
1572 * remote-utils.c: Likewise.
1573 * spu-low.c: Likewise.
1574 * utils.c: Likewise.
1575 * gdbreplay.c: Unconditionally include errno.h.
1576
6d3d12eb
GB
15772014-08-07 Gary Benson <gbenson@redhat.com>
1578
1579 * server.h: Do not include string.h.
1580 * event-loop.c: Likewise.
1581 * linux-low.c: Likewise.
1582 * regcache.c: Likewise.
1583 * remote-utils.c: Likewise.
1584 * spu-low.c: Likewise.
1585 * utils.c: Likewise.
1586
dccbb609
GB
15872014-08-07 Gary Benson <gbenson@redhat.com>
1588
1589 * server.h: Do not include gdb_assert.h.
1590
e76df0d0
GB
15912014-08-07 Gary Benson <gbenson@redhat.com>
1592
1593 * server.h: Do not include common-utils.h.
1594
4cb9c816
GB
15952014-08-07 Gary Benson <gbenson@redhat.com>
1596
1597 * server.h: Do not include ptid.h.
1598 * notif.h: Likewise.
1599
3995eeee
GB
16002014-08-07 Gary Benson <gbenson@redhat.com>
1601
1602 * server.h: Do not include gdb_locale.h.
1603
cb9f1a9b
GB
16042014-08-07 Gary Benson <gbenson@redhat.com>
1605
1606 * server.h: Do not include gdb/signals.h.
1607 * win32-low.c: Likewise.
1608
a5fceff8
GB
16092014-08-07 Gary Benson <gbenson@redhat.com>
1610
1611 * server.h: Do not include pathmax.h.
1612
b9391142
GB
16132014-08-07 Gary Benson <gbenson@redhat.com>
1614
1615 * server.h: Do not include libiberty.h.
1616 * linux-bfin-low.c: Likewise.
1617
0e443c87
GB
16182014-08-07 Gary Benson <gbenson@redhat.com>
1619
1620 * server.h: Do not include ansidecl.h.
1621
8ebb3f56
GB
16222014-08-07 Gary Benson <gbenson@redhat.com>
1623
1624 * linux-x86-low.c: Do not include stddef.h.
1625 * lynx-ppc-low.c: Likewise.
1626 * tracepoint.c: Likewise.
1627
8980bdf6
GB
16282014-08-07 Gary Benson <gbenson@redhat.com>
1629
1630 * server.h: Do not include stdarg.h.
1631 * nto-low.c: Likewise.
1632
d7096f71
GB
16332014-08-07 Gary Benson <gbenson@redhat.com>
1634
1635 * server.h: Do not include stdlib.h.
1636 * inferiors.c: Likewise.
1637 * linux-low.c: Likewise.
1638 * regcache.c: Likewise.
1639 * spu-low.c: Likewise.
1640 * tracepoint.c: Likewise.
1641 * utils.c: Likewise.
1642
d02f550d
GB
16432014-08-07 Gary Benson <gbenson@redhat.com>
1644
1645 * server.h: Do not include stdio.h.
1646 * linux-low.c: Likewise.
1647 * remote-utils.c: Likewise.
1648 * spu-low.c: Likewise.
1649 * utils.c: Likewise.
1650 * wincecompat.c: Likewise.
1651
87f6c4e3
GB
16522014-08-06 Gary Benson <gbenson@redhat.com>
1653
1654 * regcache.c (init_register_cache): Move conditionals inside if.
1655
7089dca4
GB
16562014-08-06 Gary Benson <gbenson@redhat.com>
1657
1658 * linux-low.c (linux_supports_non_stop): Use target_is_async_p.
1659
462f517e
GB
16602014-07-31 Gary Benson <gbenson@redhat.com>
1661
1662 * ax.h: Do not include server.h.
1663 * gdbthread.h: Likewise.
1664 * lynx-low.h: Likewise.
1665 * notif.h: Likewise.
1666
976411d6
GB
16672014-07-30 Gary Benson <gbenson@redhat.com>
1668
1669 * server.h: Include common-defs.h.
1670 Do not include config.h or build-gnulib-gdbserver/config.h.
1671
d41f6d8e
GB
16722014-07-30 Gary Benson <gbenson@redhat.com>
1673
1674 * hostio-errno.c: Move server.h to top of includes list.
1675 * inferiors.c: Likewise.
1676 * linux-x86-low.c: Likewise.
1677 * notif.c: Include server.h.
1678
314c6a35
TT
16792014-07-24 Tom Tromey <tromey@redhat.com>
1680 Gary Benson <gbenson@redhat.com>
1681
1682 * server.h (CORE_ADDR): Now unsigned.
1683
69ff6be5
PA
16842014-07-16 Pedro Alves <palves@redhat.com>
1685
1686 * linux-low.c (linux_kill_one_lwp): Use kill_lwp, not kill.
1687
ce9e3fe7
PA
16882014-07-15 Pedro Alves <palves@redhat.com>
1689
1690 * linux-low.c (linux_kill_one_lwp): Save errno and work with saved
1691 copy.
1692
e76126e8
PA
16932014-07-11 Pedro Alves <palves@redhat.com>
1694
1695 * linux-low.c (kill_wait_lwp): New function, based on
1696 kill_one_lwp_callback, but use my_waitpid directly.
1697 (kill_one_lwp_callback, linux_kill): Use it.
1698
8e9db26e
PA
16992014-06-23 Pedro Alves <palves@redhat.com>
1700
1701 * linux-x86-low.c (x86_linux_prepare_to_resume): Clear DR_CONTROL
1702 before setting DR0..DR3.
1703
698b3e08
GB
17042014-06-20 Gary Benson <gbenson@redhat.com>
1705
1706 * configure.ac (AC_REPLACE_FUNCS) <vasprintf, vsnprintf>: Removed.
1707 * configure: Regenerated.
1708 * config.in: Likewise.
1709
125f8a3d
GB
17102014-06-20 Gary Benson <gbenson@redhat.com>
1711
1712 * Makefile.in (SFILES): Update locations for files moved
1713 from common to nat.
1714 (object file files): Reordered.
1715
42995dbd
GB
17162014-06-20 Gary Benson <gbenson@redhat.com>
1717
1718 * i386-low.h (i386_dr_low_can_set_addr): Removed.
1719 (i386_dr_low_set_addr): Likewise.
1720 (i386_dr_low_get_addr): Likewise.
1721 (i386_dr_low_can_set_control): Likewise.
1722 (i386_dr_low_set_control): Likewise.
1723 (i386_dr_low_get_control): Likewise.
1724 (i386_dr_low_get_status): Likewise.
1725 (i386_get_debug_register_length): Likewise.
1726 * linux-x86-low.c (i386_dr_low_set_addr):
1727 Changed signature. Made static.
1728 (i386_dr_low_get_addr): Likewise.
1729 (i386_dr_low_set_control): Likewise.
1730 (i386_dr_low_get_control): Likewise.
1731 (i386_dr_low_get_status): Likewise.
1732 (i386_dr_low): New global variable.
1733 * win32-i386-low.c (i386_dr_low_set_addr):
1734 Changed signature. Made static.
1735 (i386_dr_low_get_addr): Likewise.
1736 (i386_dr_low_set_control): Likewise.
1737 (i386_dr_low_get_control): Likewise.
1738 (i386_dr_low_get_status): Likewise.
1739 (i386_dr_low): New global variable.
1740
e1d2394b
MS
17412014-06-20 Marcus Shawcroft <marcus.shawcroft@arm.com>
1742
1743 * configure.ac: Invoke. AC_CHECK_TOOL(AR, ar).
1744 * Makefile.in (AR, AR_FLAGS): Define.
1745 * configure: Regenerate.
1746
3a8ee006
GB
17472014-06-19 Gary Benson <gbenson@redhat.com>
1748
1749 * Makefile.in (i386-dregs.o): New rule.
1750 * configure.srv: Add i386-dregs.o to all targets using i386-low.o.
1751 * i386-low.c (target.h): Remove include.
1752 (TARGET_HAS_DR_LEN_8): Now in i386-dregs.c.
1753 (DR_CONTROL_SHIFT): Likewise.
1754 (DR_CONTROL_SIZE): Likewise.
1755 (DR_RW_EXECUTE): Likewise.
1756 (DR_RW_WRITE): Likewise.
1757 (DR_RW_READ): Likewise.
1758 (DR_RW_IORW): Likewise.
1759 (DR_LEN_1): Likewise.
1760 (DR_LEN_2): Likewise.
1761 (DR_LEN_4): Likewise.
1762 (DR_LEN_8): Likewise.
1763 (DR_LOCAL_ENABLE_SHIFT): Likewise.
1764 (DR_GLOBAL_ENABLE_SHIFT): Likewise.
1765 (DR_ENABLE_SIZE): Likewise.
1766 (DR_LOCAL_SLOWDOWN): Likewise.
1767 (DR_GLOBAL_SLOWDOWN): Likewise.
1768 (DR_CONTROL_RESERVED): Likewise.
1769 (I386_DR_CONTROL_MASK): Likewise.
1770 (I386_DR_VACANT): Likewise.
1771 (I386_DR_LOCAL_ENABLE): Likewise.
1772 (I386_DR_GLOBAL_ENABLE): Likewise.
1773 (I386_DR_DISABLE): Likewise.
1774 (I386_DR_SET_RW_LEN): Likewise.
1775 (I386_DR_GET_RW_LEN): Likewise.
1776 (I386_DR_WATCH_HIT): Likewise.
1777 (i386_wp_op_t): Likewise.
1778 (i386_show_dr): Likewise.
1779 (i386_length_and_rw_bits): Likewise.
1780 (i386_insert_aligned_watchpoint): Likewise.
1781 (i386_remove_aligned_watchpoint): Likewise.
1782 (i386_handle_nonaligned_watchpoint): Likewise.
1783 i386_update_inferior_debug_regs(): Likewise.
1784 (i386_dr_insert_watchpoint): Likewise.
1785 (i386_dr_remove_watchpoint): Likewise.
1786 (i386_dr_region_ok_for_watchpoint): Likewise.
1787 (i386_dr_stopped_data_address): Likewise.
1788 (i386_dr_stopped_by_watchpoint): Likewise.
1789
8f26655c
GB
17902014-06-19 Gary Benson <gbenson@redhat.com>
1791
1792 * i386-low.c (i386_dr_show): Renamed to
1793 i386_show_dr and made static. All uses updated.
1794 (i386_dr_length_and_rw_bits): Renamed to
1795 i386_length_and_rw_bits and made static.
1796 All uses updated.
1797 (i386_dr_insert_aligned_watchpoint): Renamed to
1798 i386_insert_aligned_watchpoint and made static.
1799 All uses updated.
1800 (i386_dr_remove_aligned_watchpoint): Renamed to
1801 i386_remove_aligned_watchpoint and made static.
1802 All uses updated.
1803 (i386_dr_update_inferior_debug_regs): Renamed to
1804 i386_update_inferior_debug_regs and made static.
1805 All uses updated.
1806
b9228891
GB
18072014-06-18 Gary Benson <gbenson@redhat.com>
1808
5171def3
GB
1809 * i386-low.h (i386_dr_low_can_set_addr): New macro.
1810 (i386_dr_low_can_set_control): Likewise.
1811 (i386_get_debug_register_length): Likewise.
1812 * i386-low.c (i386_dr_low_can_set_addr): Now in i386-low.h.
1813 (i386_dr_low_can_set_control): Likewise.
1814 (i386_get_debug_register_length): Likewise.
1815
18162014-06-17 Gary Benson <gbenson@redhat.com>
1817
b9228891
GB
1818 * i386-low.h (i386-dregs.h): New include.
1819 (DR_FIRSTADDR): Now in i386-dregs.h.
1820 (DR_LASTADDR): Likewise.
1821 (DR_NADDR): Likewise.
1822 (DR_STATUS): Likewise.
1823 (DR_CONTROL): Likewise.
1824 (i386_debug_reg_state): Likewise.
1825 (i386_dr_insert_watchpoint): Likewise.
1826 (i386_dr_remove_watchpoint): Likewise.
1827 (i386_dr_region_ok_for_watchpoint): Likewise.
1828 (i386_dr_stopped_data_address): Likewise.
1829 (i386_dr_stopped_by_watchpoint): Likewise.
1830 * i386-low.c (ALL_DEBUG_REGISTERS): Likewise.
1831
4be83cc2
GB
18322014-06-18 Gary Benson <gbenson@redhat.com>
1833
1834 * i386-low.h (i386_low_insert_watchpoint): Renamed to
1835 i386_dr_insert_watchpoint.
1836 (i386_low_remove_watchpoint): Renamed to
1837 i386_dr_remove_watchpoint.
1838 (i386_low_region_ok_for_watchpoint): Renamed to
1839 i386_dr_region_ok_for_watchpoint.
1840 (i386_low_stopped_data_address): Renamed to
1841 i386_dr_stopped_data_address.
1842 (i386_low_stopped_by_watchpoint): Renamed to
1843 i386_dr_stopped_by_watchpoint.
1844 * i386-low.c (i386_show_dr): Renamed to
1845 i386_dr_show and made nonstatic. All uses updated.
1846 (i386_length_and_rw_bits): Renamed to
1847 i386_dr_length_and_rw_bits and made nonstatic.
1848 All uses updated.
1849 (i386_insert_aligned_watchpoint): Renamed to
1850 i386_dr_insert_aligned_watchpoint and made nonstatic.
1851 All uses updated.
1852 (i386_remove_aligned_watchpoint): Renamed to
1853 i386_dr_remove_aligned_watchpoint and made nonstatic.
1854 All uses updated.
1855 (i386_update_inferior_debug_regs): Renamed to
1856 i386_dr_update_inferior_debug_regs and made nonstatic.
1857 All uses updated.
1858 (i386_low_insert_watchpoint): Renamed to
1859 i386_dr_insert_watchpoint. All uses updated.
1860 (i386_low_remove_watchpoint): Renamed to
1861 i386_dr_remove_watchpoint. All uses updated.
1862 (i386_low_region_ok_for_watchpoint): Renamed to
1863 i386_dr_region_ok_for_watchpoint. All uses updated.
1864 (i386_low_stopped_data_address): Renamed to
1865 i386_dr_stopped_data_address. All uses updated.
1866 (i386_low_stopped_by_watchpoint): Renamed to
1867 i386_dr_stopped_by_watchpoint. All uses updated.
1868
131aa0d4
GB
18692014-06-18 Gary Benson <gbenson@redhat.com>
1870
1871 * i386-low.c (i386_dr_low_can_set_addr): New macro.
1872 (i386_dr_low_can_set_control): Likewise.
1873 (i386_insert_aligned_watchpoint): New check.
1874
d9305f7f
GB
18752014-06-18 Gary Benson <gbenson@redhat.com>
1876
1877 * i386-low.c (i386_update_inferior_debug_regs) <inf_state>:
1878 Renamed to state.
1879
e927c9fc
GB
18802014-06-18 Gary Benson <gbenson@redhat.com>
1881
1882 * i386-low.c (i386_length_and_rw_bits): Use internal_error
1883 instead of fatal and error.
1884 (i386_handle_nonaligned_watchpoint): Likewise.
1885
1b6d4134
GB
18862014-06-18 Gary Benson <gbenson@redhat.com>
1887
1888 * i386-low.c (i386_get_debug_register_length): New macro.
1889 (TARGET_HAS_DR_LEN_8): Remove conditional. Use above macro.
1890 (i386_show_dr): Use debug_printf instead of fprintf. Use
1891 phex to format values.
1892
6e62758f
GB
18932014-06-18 Gary Benson <gbenson@redhat.com>
1894
1895 * i386-low.h: Comment changes.
1896 * i386-low.c: Likewise.
1897
fc6e2f03
GB
18982014-06-18 Gary Benson <gbenson@redhat.com>
1899
1900 * i386-low.c: Whitespace changes.
1901
f9d1eeed
TT
19022014-06-12 Tom Tromey <tromey@redhat.com>
1903
1904 * utils.c (freeargv): Remove.
1905
0b04e523
TT
19062014-06-12 Tom Tromey <tromey@redhat.com>
1907
1908 * debug.c (debug_printf): Remove HAVE_GETTIMEOFDAY checks.
1909 * server.c (monitor_show_help): Remove HAVE_GETTIMEOFDAY check.
1910 (parse_debug_format_options): Likewise.
1911 (gdbserver_usage): Likewise.
1912 * Makefile.in (LIBIBERTY_BUILDDIR, LIBIBERTY): New variables.
1913 (SUBDIRS, REQUIRED_SUBDIRS): Add libiberty.
1914 (gdbserver$(EXEEXT), gdbreplay$(EXEEXT)): Depend on and link
1915 against libiberty.
1916 ($(LIBGNU)): Depend on libiberty.
1917 (all-lib): Recurse into all subdirs.
1918 (install-only): Invoke "install" target in subdirs.
1919 (vasprintf.o, vsnprintf.o, safe-ctype.o, lbasename.o): Remove
1920 targets.
1921 * configure: Rebuild.
1922 * configure.ac: Add ACX_CONFIGURE_DIR for libiberty. Don't check
1923 for vasprintf, vsnprintf, or gettimeofday.
1924 * configure.srv: Don't add safe-ctype.o or lbasename.o to
1925 srv_tgtobj.
1926
270c9937
JB
19272014-06-05 Joel Brobecker <brobecker@adacore.com>
1928
1929 * development.sh: Delete.
1930 * Makefile.in (config.status): Adjust dependency on development.sh.
1931 * configure.ac: Adjust development.sh source call.
1932 * configure: Regenerate.
1933
0a261ed8
PA
19342014-06-02 Pedro Alves <palves@redhat.com>
1935
1936 * ax.c (gdb_free_agent_expr): New function.
1937 * ax.h (gdb_free_agent_expr): New declaration.
1938 * mem-break.c (delete_gdb_breakpoint_1): Also clear the commands
1939 list.
1940 (clear_breakpoint_conditions, clear_breakpoint_commands): Make
1941 static.
1942 (clear_breakpoint_conditions_and_commands): New function.
1943 * mem-break.h (clear_breakpoint_conditions): Delete declaration.
1944 (clear_breakpoint_conditions_and_commands): New declaration.
1945
e9dae05e
RR
19462014-05-23 Ramana Radhakrishnan <ramana.radhakrishnan@arm.com>
1947
1948 * linux-aarch64-low.c (asm/ptrace.h): Include.
1949
5876f503
JK
19502014-05-21 Jan Kratochvil <jan.kratochvil@redhat.com>
1951
1952 Fix TLS access for -static -pthread.
1953 * gdbserver/thread-db.c (struct thread_db): Add td_thr_tlsbase_p.
1954 (thread_db_get_tls_address): Call it if LOAD_MODULE is zero.
1955 (thread_db_load_search, try_thread_db_load_1): Initialize it.
1956
802e8e6d
PA
19572014-05-20 Pedro Alves <palves@redhat.com>
1958
1959 * linux-aarch64-low.c (aarch64_insert_point)
1960 (aarch64_remove_point): No longer check whether the type is
1961 supported here. Adjust to new interface.
1962 (the_low_target): Install aarch64_supports_z_point_type as
1963 supports_z_point_type method.
1964 * linux-arm-low.c (raw_bkpt_type_to_arm_hwbp_type): New function.
1965 (arm_linux_hw_point_initialize): Take an enum raw_bkpt_type
1966 instead of a Z packet char. Adjust.
1967 (arm_supports_z_point_type): New function.
1968 (arm_insert_point, arm_remove_point): Adjust to new interface.
1969 (the_low_target): Install arm_supports_z_point_type.
1970 * linux-crisv32-low.c (cris_supports_z_point_type): New function.
1971 (cris_insert_point, cris_remove_point): Adjust to new interface.
1972 Don't check whether the type is supported here.
1973 (the_low_target): Install cris_supports_z_point_type.
1974 * linux-low.c (linux_supports_z_point_type): New function.
1975 (linux_insert_point, linux_remove_point): Adjust to new interface.
1976 * linux-low.h (struct linux_target_ops) <insert_point,
1977 remove_point>: Take an enum raw_bkpt_type instead of a char. Add
1978 raw_breakpoint pointer parameter.
1979 <supports_z_point_type>: New method.
1980 * linux-mips-low.c (mips_supports_z_point_type): New function.
1981 (mips_insert_point, mips_remove_point): Adjust to new interface.
1982 Use mips_supports_z_point_type.
1983 (the_low_target): Install mips_supports_z_point_type.
1984 * linux-ppc-low.c (the_low_target): Install NULL as
1985 supports_z_point_type method.
1986 * linux-s390-low.c (the_low_target): Install NULL as
1987 supports_z_point_type method.
1988 * linux-sparc-low.c (the_low_target): Install NULL as
1989 supports_z_point_type method.
1990 * linux-x86-low.c (x86_supports_z_point_type): New function.
1991 (x86_insert_point): Adjust to new insert_point interface. Use
1992 insert_memory_breakpoint. Adjust to new
1993 i386_low_insert_watchpoint interface.
1994 (x86_remove_point): Adjust to remove_point interface. Use
1995 remove_memory_breakpoint. Adjust to new
1996 i386_low_remove_watchpoint interface.
1997 (the_low_target): Install x86_supports_z_point_type.
1998 * lynx-low.c (lynx_target_ops): Install NULL as
1999 supports_z_point_type callback.
2000 * nto-low.c (nto_supports_z_point_type): New.
2001 (nto_insert_point, nto_remove_point): Adjust to new interface.
2002 (nto_target_ops): Install nto_supports_z_point_type.
2003 * mem-break.c: Adjust intro comment.
2004 (struct raw_breakpoint) <raw_type, size>: New fields.
2005 <inserted>: Update comment.
2006 <shlib_disabled>: Delete field.
2007 (enum bkpt_type) <gdb_breakpoint>: Delete value.
2008 <gdb_breakpoint_Z0, gdb_breakpoint_Z1, gdb_breakpoint_Z2,
2009 gdb_breakpoint_Z3, gdb_breakpoint_Z4>: New values.
2010 (raw_bkpt_type_to_target_hw_bp_type): New function.
2011 (find_enabled_raw_code_breakpoint_at): New function.
2012 (find_raw_breakpoint_at): New type and size parameters. Use them.
2013 (insert_memory_breakpoint): New function, based off
2014 set_raw_breakpoint_at.
2015 (remove_memory_breakpoint): New function.
2016 (set_raw_breakpoint_at): Reimplement.
2017 (set_breakpoint): New, based on set_breakpoint_at.
2018 (set_breakpoint_at): Reimplement.
2019 (delete_raw_breakpoint): Go through the_target->remove_point
2020 instead of assuming memory breakpoints.
2021 (find_gdb_breakpoint_at): Delete.
2022 (Z_packet_to_bkpt_type, Z_packet_to_raw_bkpt_type): New functions.
2023 (find_gdb_breakpoint): New function.
2024 (set_gdb_breakpoint_at): Delete.
2025 (z_type_supported): New function.
2026 (set_gdb_breakpoint_1): New function, loosely based off
2027 set_gdb_breakpoint_at.
2028 (check_gdb_bp_preconditions, set_gdb_breakpoint): New functions.
2029 (delete_gdb_breakpoint_at): Delete.
2030 (delete_gdb_breakpoint_1): New function, loosely based off
2031 delete_gdb_breakpoint_at.
2032 (delete_gdb_breakpoint): New function.
2033 (clear_gdb_breakpoint_conditions): Rename to ...
2034 (clear_breakpoint_conditions): ... this. Don't handle a NULL
2035 breakpoint.
2036 (add_condition_to_breakpoint): Make static.
2037 (add_breakpoint_condition): Take a struct breakpoint pointer
2038 instead of an address. Adjust.
2039 (gdb_condition_true_at_breakpoint): Rename to ...
2040 (gdb_condition_true_at_breakpoint_z_type): ... this, and add
2041 z_type parameter.
2042 (gdb_condition_true_at_breakpoint): Reimplement.
2043 (add_breakpoint_commands): Take a struct breakpoint pointer
2044 instead of an address. Adjust.
2045 (gdb_no_commands_at_breakpoint): Rename to ...
2046 (gdb_no_commands_at_breakpoint_z_type): ... this. Add z_type
2047 parameter. Return true if no breakpoint was found. Change debug
2048 output.
2049 (gdb_no_commands_at_breakpoint): Reimplement.
2050 (run_breakpoint_commands): Rename to ...
2051 (run_breakpoint_commands_z_type): ... this. Add z_type parameter,
2052 and change return type to boolean.
2053 (run_breakpoint_commands): New function.
2054 (gdb_breakpoint_here): Also check for Z1 breakpoints.
2055 (uninsert_raw_breakpoint): Don't try to reinsert a disabled
2056 breakpoint. Go through the_target->remove_point instead of
2057 assuming memory breakpoint.
2058 (uninsert_breakpoints_at, uninsert_all_breakpoints): Uninsert
2059 software and hardware breakpoints.
2060 (reinsert_raw_breakpoint): Go through the_target->insert_point
2061 instead of assuming memory breakpoint.
2062 (reinsert_breakpoints_at, reinsert_all_breakpoints): Reinsert
2063 software and hardware breakpoints.
2064 (check_breakpoints, breakpoint_here, breakpoint_inserted_here):
2065 Check both software and hardware breakpoints.
2066 (validate_inserted_breakpoint): Assert the breakpoint is a
2067 software breakpoint. Set the inserted flag to -1 instead of
2068 setting shlib_disabled.
2069 (delete_disabled_breakpoints): Adjust.
2070 (validate_breakpoints): Only validate software breakpoints.
2071 Adjust to inserted flag change.
2072 (check_mem_read, check_mem_write): Skip breakpoint types other
2073 than software breakpoints. Adjust to inserted flag change.
2074 * mem-break.h (enum raw_bkpt_type): New enum.
2075 (raw_breakpoint, struct process_info): Forward declare.
2076 (Z_packet_to_target_hw_bp_type): Delete declaration.
2077 (raw_bkpt_type_to_target_hw_bp_type, Z_packet_to_raw_bkpt_type)
2078 (set_gdb_breakpoint, delete_gdb_breakpoint)
2079 (clear_breakpoint_conditions): New declarations.
2080 (set_gdb_breakpoint_at, clear_gdb_breakpoint_conditions): Delete.
2081 (breakpoint_inserted_here): Update comment.
2082 (add_breakpoint_condition, add_breakpoint_commands): Replace
2083 address parameter with a breakpoint pointer parameter.
2084 (gdb_breakpoint_here): Update comment.
2085 (delete_gdb_breakpoint_at): Delete.
2086 (insert_memory_breakpoint, remove_memory_breakpoint): Declare.
2087 * server.c (process_point_options): Take a struct breakpoint
2088 pointer instead of an address. Adjust.
2089 (process_serial_event) <Z/z packets>: Use set_gdb_breakpoint and
2090 delete_gdb_breakpoint.
2091 * spu-low.c (spu_target_ops): Install NULL as
2092 supports_z_point_type method.
2093 * target.h: Include mem-break.h.
2094 (struct target_ops) <prepare_to_access_memory>: Update comment.
2095 <supports_z_point_type>: New field.
2096 <insert_point, remove_point>: Take an enum raw_bkpt_type argument
2097 instead of a char. Also take a raw breakpoint pointer.
2098 * win32-arm-low.c (the_low_target): Install NULL as
2099 supports_z_point_type.
2100 * win32-i386-low.c (i386_supports_z_point_type): New function.
2101 (i386_insert_point, i386_remove_point): Adjust to new interface.
2102 (the_low_target): Install i386_supports_z_point_type.
2103 * win32-low.c (win32_supports_z_point_type): New function.
2104 (win32_insert_point, win32_remove_point): Adjust to new interface.
2105 (win32_target_ops): Install win32_supports_z_point_type.
2106 * win32-low.h (struct win32_target_ops):
2107 <supports_z_point_type>: New method.
2108 <insert_point, remove_point>: Take an enum raw_bkpt_type argument
2109 instead of a char. Also take a raw breakpoint pointer.
2110
932539e3
PA
21112014-05-20 Pedro Alves <palves@redhat.com>
2112
2113 * mem-break.h: Include break-common.h.
2114 (Z_PACKET_SW_BP, Z_PACKET_HW_BP, Z_PACKET_WRITE_WP)
2115 (Z_PACKET_READ_WP, Z_PACKET_ACCESS_WP): New defines.
2116 (Z_packet_to_target_hw_bp_type): New declaration.
2117 * mem-break.c (Z_packet_to_target_hw_bp_type): New function.
2118 * i386-low.c (Z_PACKET_HW_BP, Z_PACKET_WRITE_WP, Z_PACKET_READ_WP)
2119 (Z_PACKET_ACCESS_WP): Delete macros.
2120 (Z_packet_to_hw_type): Delete function.
2121 * i386-low.h: Don't include break-common.h here.
2122 (Z_packet_to_hw_type): Delete declaration.
2123 * linux-x86-low.c (x86_insert_point, x86_insert_point): Call
2124 Z_packet_to_target_hw_bp_type instead of Z_packet_to_hw_type.
2125 * win32-i386-low.c (i386_insert_point, i386_remove_point): Call
2126 Z_packet_to_target_hw_bp_type instead of Z_packet_to_hw_type.
2127 * linux-aarch64-low.c: Don't include break-common.h here.
2128 (Z_PACKET_SW_BP, Z_PACKET_HW_BP, Z_PACKET_WRITE_WP)
2129 (Z_PACKET_READ_WP, Z_PACKET_ACCESS_WP): Delete macros.
2130 (Z_packet_to_target_hw_bp_type): Delete function.
2131 * linux-mips-low.c (rsp_bp_type_to_target_hw_bp_type): Delete
2132 function.
2133 (mips_insert_point, mips_remove_point): Use
2134 Z_packet_to_target_hw_bp_type.
2135
4ff0d3d8
PA
21362014-05-20 Pedro Alves <palves@redhat.com>
2137
2138 * linux-aarch64-low.c: Include break-common.h.
2139 (enum target_point_type): Delete.
2140 (Z_packet_to_point_type): Rename to ...
2141 (Z_packet_to_target_hw_bp_type): ... this, and return a
2142 target_hw_bp_type instead.
2143 (aarch64_show_debug_reg_state): Take an enum target_hw_bp_type
2144 instead of an enum target_point_type.
2145 (aarch64_point_encode_ctrl_reg): Likewise. Compute type mask from
2146 breakpoint type.
2147 (aarch64_dr_state_insert_one_point)
2148 (aarch64_dr_state_remove_one_point, aarch64_handle_breakpoint)
2149 (aarch64_handle_aligned_watchpoint)
2150 (aarch64_handle_unaligned_watchpoint, aarch64_handle_watchpoint):
2151 Take an enum target_hw_bp_type instead of an enum
2152 target_point_type.
2153 (aarch64_supports_z_point_type): New function.
2154 (aarch64_insert_point, aarch64_remove_point): Use it. Adjust to
2155 use Z_packet_to_target_hw_bp_type.
2156
786dc519
JB
21572014-05-20 Joel Brobecker <brobecker@adacore.com>
2158
2159 * configure.ac: Only use -Werror by default when DEVELOPMENT
2160 is true.
2161 * configure: Regenerate.
2162
9e0aa64f
JK
21632014-05-19 Jan Kratochvil <jan.kratochvil@redhat.com>
2164
2165 Fix gdbserver qGetTLSAddr for x86_64 -m32.
2166 * linux-x86-low.c (X86_64_USER_REGS): New.
2167 (x86_fill_gregset): Call memset for BUF first in x86_64 -m32 case.
2168
2b577b92
YQ
21692014-04-28 Yao Qi <yao@codesourcery.com>
2170
2171 * Makefile.in (i386-avx512.c): Fix the typo of generated file
2172 name.
2173
94611da2
PA
21742014-04-25 Pedro Alves <palves@redhat.com>
2175
2176 PR server/16255
2177 * linux-low.c (linux_attach_fail_reason_string): New function.
2178 (linux_attach_lwp): Delete.
2179 (linux_attach_lwp_1): Rename to ...
2180 (linux_attach_lwp): ... this. Take a ptid instead of a pid as
2181 argument. Remove "initial" parameter. Return int instead of
2182 void. Don't error or warn here.
2183 (linux_attach): Adjust to call linux_attach_lwp. Call error on
2184 failure to attach to the tgid. Call warning when failing to
2185 attach to an lwp.
2186 * linux-low.h (linux_attach_lwp): Take a ptid instead of a pid as
2187 argument. Remove "initial" parameter. Return int instead of
2188 void. Don't error or warn here.
2189 (linux_attach_fail_reason_string): New declaration.
2190 * thread-db.c (attach_thread): Adjust to linux_attach_lwp's
2191 interface change. Use linux_attach_fail_reason_string.
2192
01f9f808
MS
21932014-04-24 Michael Sturm <michael.sturm@mintel.com>
2194 Walfred Tedeschi <walfred.tedeschi@intel.com>
2195
2196 * Makefile.in: Added rules to handle new files
2197 i386-avx512.c i386-avx512-linux.c amd64-avx512.c
2198 amd64-avx512-linux.c x32-avx512.c x32-avx512-linux.c.
2199 * configure.srv (srv_i386_regobj): Add i386-avx512.o.
2200 (srv_i386_linux_regobj): Add i386-avx512-linux.o.
2201 (srv_amd64_regobj): Add amd64-avx512.o and x32-avx512.o.
2202 (srv_amd64_linux_regobj): Add amd64-avx512-linux.o and
2203 x32-avx512-linux.o.
2204 (srv_i386_32bit_xmlfiles): Add i386/32bit-avx512.xml.
2205 (srv_i386_64bit_xmlfiles): Add i386/64bit-avx512.xml.
2206 (srv_amd64_xmlfiles): Add i386/amd64-avx512.xml and
2207 i386/x32-avx512.xml.
2208 (srv_i386_linux_xmlfiles): Add i386/i386-avx512-linux.xml.
2209 (srv_amd64_linux_xmlfiles): Add i386/amd64-avx512-linux.xml and
2210 i386/x32-avx512-linux.xml.
2211 * i387-fp.c (num_avx512_k_registers): New constant for number
2212 of K registers.
2213 (num_avx512_zmmh_low_registers): New constant for number of
2214 lower ZMM registers (0-15).
2215 (num_avx512_zmmh_high_registers): New constant for number of
2216 higher ZMM registers (16-31).
2217 (num_avx512_ymmh_registers): New contant for number of higher
2218 YMM registers (ymm16-31 added by avx521 on x86_64).
2219 (num_avx512_xmm_registers): New constant for number of higher
2220 XMM registers (xmm16-31 added by AVX512 on x86_64).
2221 (struct i387_xsave): Add space for AVX512 registers.
2222 (i387_cache_to_xsave): Change raw buffer size to 64 characters.
2223 Add code to handle AVX512 registers.
2224 (i387_xsave_to_cache): Add code to handle AVX512 registers.
2225 * linux-x86-low.c (init_registers_amd64_avx512_linux): New
2226 prototypei from generated file.
2227 (tdesc_amd64_avx512_linux): Likewise.
2228 (init_registers_x32_avx512_linux): Likewise.
2229 (tdesc_x32_avx512_linux): Likewise.
2230 (init_registers_i386_avx512_linux): Likewise.
2231 (tdesc_i386_avx512_linux): Likewise.
2232 (x86_64_regmap): Add AVX512 registers.
2233 (x86_linux_read_description): Add code to handle AVX512 XSTATE
2234 mask.
2235 (initialize_low_arch): Add code to initialize AVX512 registers.
2236
51aa91f9
PA
22372014-04-23 Pedro Alves <palves@redhat.com>
2238
2239 * mem-break.c (find_gdb_breakpoint_at): Make static.
2240 * mem-break.h (find_gdb_breakpoint_at): Delete declaration.
2241
a4165e94
PA
22422014-04-23 Pedro Alves <palves@redhat.com>
2243
2244 * i386-low.c: Don't include break-common.h here.
2245 (i386_low_insert_watchpoint, i386_low_remove_watchpoint): Change
2246 prototype to take target_hw_bp_type as argument instead of a Z
2247 packet char.
2248 * i386-low.h: Include break-common.h here.
2249 (Z_packet_to_hw_type): Declare.
2250 (i386_low_insert_watchpoint, i386_low_remove_watchpoint): Change
2251 prototypes.
2252 * linux-x86-low.c (x86_insert_point): Convert the packet number to
2253 a target_hw_bp_type before calling i386_low_insert_watchpoint.
2254 (x86_remove_point): Convert the packet number to a
2255 target_hw_bp_type before calling i386_low_remove_watchpoint.
2256 * win32-i386-low.c (i386_insert_point): Convert the packet number
2257 to a target_hw_bp_type before calling i386_low_insert_watchpoint.
2258 (i386_remove_point): Convert the packet number to a
2259 target_hw_bp_type before calling i386_low_remove_watchpoint.
2260
b8acf843
PA
22612014-04-23 Pedro Alves <palves@redhat.com>
2262
2263 * utils.h (perror_with_name): Add ATTRIBUTE_NORETURN.
2264
d708bcd1
PA
22652014-04-10 Pedro Alves <palves@redhat.com>
2266
2267 * mem-break.c (add_breakpoint_condition, add_breakpoint_commands):
2268 Check if the condition or command is NULL before checking if the
2269 breakpoint is known. On success, return true.
2270 * mem-break.h (add_breakpoint_condition): Document return.
2271 (add_breakpoint_commands): Add describing comment.
2272 * server.c (skip_to_semicolon): New function.
2273 (process_point_options): Use it.
2274
2eec7d5b
PA
22752014-04-09 Pedro Alves <palves@redhat.com>
2276
2277 * linux-low.c (linux_read_loadmap): Pass current_inferior directly
2278 to lwpid_of.
2279
fa96cb38
PA
22802014-02-27 Pedro Alves <palves@redhat.com>
2281
2282 PR 12702
2283 * inferiors.h (A_I_NEXT, ALL_INFERIORS_TYPE, ALL_PROCESSES): New
2284 macros.
2285 * linux-low.c (delete_lwp, handle_extended_wait): Add debug
2286 output.
2287 (last_thread_of_process_p): Take a PID argument instead of a
2288 thread pointer.
2289 (linux_wait_for_lwp): Delete.
2290 (num_lwps, check_zombie_leaders, not_stopped_callback): New
2291 functions.
2292 (linux_low_filter_event): New function, party factored out from
2293 linux_wait_for_event.
2294 (linux_wait_for_event): Rename to ...
2295 (linux_wait_for_event_filtered): ... this. Add new filter ptid
2296 argument. Partly rewrite. Always use waitpid(-1, WNOHANG) and
2297 sigsuspend. Check for zombie leaders.
2298 (linux_wait_for_event): Reimplement as wrapper around
2299 linux_wait_for_event_filtered.
2300 (linux_wait_1): Handle TARGET_WAITKIND_NO_RESUMED. Assume that if
2301 a normal or signal exit is seen, it's the whole process exiting.
2302 (wait_for_sigstop): No longer a for_each_inferior callback.
2303 Rewrite on top of linux_wait_for_event_filtered.
2304 (stop_all_lwps): Call wait_for_sigstop directly.
2305 * server.c (resume, handle_target_event): Handle
2306 TARGET_WAITKIND_NO_RESUMED.
2307
d763de10
JB
23082014-02-26 Joel Brobecker <brobecker@adacore.com>
2309
2310 * win32-low.c (psapi_get_dll_name,
2311 * win32_CreateToolhelp32Snapshot): Delete.
2312 (win32_CreateToolhelp32Snapshot, win32_Module32First)
2313 (win32_Module32Next, load_toolhelp, toolhelp_get_dll_name):
2314 Delete.
2315 (handle_load_dll): Add function description.
2316 Remove code using psapi_get_dll_name and toolhelp_get_dll_name.
2317
850a0f76
JB
23182014-02-26 Joel Brobecker <brobecker@adacore.com>
2319
2320 * win32-low.c (win32_add_one_solib): Add 0x1000 to load_addr.
2321 Add comment.
2322 (win32_add_all_dlls): Remove 0x1000 offset applied to DLL
2323 base address when calling win32_add_one_solib.
2324 (handle_load_dll): Delete local variable load_addr.
2325 Remove 0x1000 offset applied to DLL base address when calling
2326 win32_add_one_solib.
2327 (handle_unload_dll): Add comment.
2328
f25b3fc3
JB
23292014-02-26 Joel Brobecker <brobecker@adacore.com>
2330
2331 * win32-low.c (win32_add_all_dlls): Renames
2332 win32_ensure_ntdll_loaded. Rewrite function documentation.
2333 Adjust implementation to always load all DLLs.
2334 Add 0x1000 offset to DLL base address when calling
2335 win32_add_one_solib.
2336 (child_initialization_done): New static global.
2337 (do_initial_child_stuff): Set child_initialization_done to
2338 zero during child initialization, and 1 after. Replace call
2339 to win32_ensure_ntdll_loaded by call to win32_add_all_dlls.
2340 Add comment.
2341 (match_dll_by_basename, dll_is_loaded_by_basename): Delete.
2342 (handle_unload_dll): Add function documentation.
2343 (get_child_debug_event): Ignore load and unload DLL events
2344 during child initialization.
2345
d86d4aaf
DE
23462014-02-20 Doug Evans <dje@google.com>
2347
3bc32da3 2348 Remove global all_lwps.
d86d4aaf
DE
2349 * inferiors.h (ptid_of): Move here from linux-low.h.
2350 (pid_of, lwpid_of): Ditto.
2351 * linux-aarch64-low.c (debug_reg_change_callback): Update, "entry"
2352 parameter is a struct thread_info * now.
2353 (aarch64_notify_debug_reg_change): Fetch pid from current_inferior
2354 directly. Pass &all_threads to find_inferior instead of &all_lwps.
2355 (aarch64_stopped_data_address): Fetch lwpid from current_inferior
2356 directly.
2357 (aarch64_linux_prepare_to_resume): Fetch ptid from thread.
2358 (aarch64_arch_setup): Fetch lwpid from current_inferior directly.
2359 * linux-arm-low.c (update_registers_callback): Update, "entry"
2360 parameter is a struct thread_info * now.
2361 Fetch lwpid from current_inferior directly.
2362 (arm_insert_point): Pass &all_threads to find_inferior instead of
2363 &all_lwps.
2364 (arm_remove_point): Ditto.
2365 (arm_stopped_by_watchpoint): Fetch lwp from current_inferior.
2366 (arm_prepare_to_resume): Fetch pid from thread.
2367 (arm_read_description): Fetch lwpid from current_inferior directly.
2368 * linux-low.c (all_lwps): Delete.
2369 (delete_lwp): Delete call to remove_inferior.
2370 (handle_extended_wait): Fetch lwpid from thread.
2371 (add_lwp): Don't set lwp->entry.id. Remove call to
2372 add_inferior_to_list.
2373 (linux_attach_lwp_1): Fetch pid from current_inferior directly.
2374 (linux_kill_one_lwp): Fetch ptid,lwpid from thread.
2375 (kill_one_lwp_callback): Ditto.
2376 (linux_kill): Don't dereference NULL pointer.
2377 Fetch ptid,lwpid from thread.
2378 (get_detach_signal): Fetch ptid from thread.
2379 (linux_detach_one_lwp): Fetch ptid,lwpid from thread.
2380 Simplify call to regcache_invalidate_thread.
2381 (delete_lwp_callback): Update, "entry" parameter is a
2382 struct thread_info * now. Fetch pid from thread.
2383 (linux_mourn): Pass &all_threads to find_inferior instead of &all_lwps.
2384 (status_pending_p_callback): Update, "entry" parameter is a
2385 struct thread_info * now. Fetch ptid from thread.
2386 (find_lwp_pid): Update, "entry" parameter is a
2387 struct thread_info * now.
2388 (linux_wait_for_lwp): Fetch pid from thread.
2389 (linux_fast_tracepoint_collecting): Fetch lwpid from thread.
2390 (maybe_move_out_of_jump_pad): Fetch lwpid from current_inferior.
2391 (enqueue_one_deferred_signal): Fetch lwpid from thread.
2392 (dequeue_one_deferred_signal): Ditto.
2393 (cancel_breakpoint): Fetch ptid from current_inferior.
2394 (linux_wait_for_event): Pass &all_threads to find_inferior,
2395 not &all_lwps. Fetch ptid, lwpid from thread.
2396 (count_events_callback): Update, "entry" parameter is a
2397 struct thread_info * now.
2398 (select_singlestep_lwp_callback): Ditto.
2399 (select_event_lwp_callback): Ditto.
2400 (cancel_breakpoints_callback): Ditto.
2401 (linux_cancel_breakpoints): Pass &all_threads to find_inferior,
2402 not &all_lwps.
2403 (select_event_lwp): Ditto. Fetch ptid from event_thread.
2404 (unsuspend_one_lwp): Update, "entry" parameter is a
2405 struct thread_info * now.
2406 (unsuspend_all_lwps): Pass &all_threads to find_inferior,
2407 not &all_lwps.
2408 (linux_stabilize_threads): Ditto. And for for_each_inferior.
2409 Fetch lwpid from thread, not lwp.
2410 (linux_wait_1): Fetch ptid, lwpid from current_inferior.
2411 Pass &all_threads to find_inferior, not &all_lwps.
2412 (send_sigstop): Fetch lwpid from thread, not lwp.
2413 (send_sigstop_callback): Update, "entry" parameter is a
2414 struct thread_info * now.
2415 (suspend_and_send_sigstop_callback): Ditto.
2416 (wait_for_sigstop): Ditto. Fetch ptid, lwpid from thread, lwp.
2417 (stuck_in_jump_pad_callback): Update, "entry" parameter is a
2418 struct thread_info * now.
2419 (move_out_of_jump_pad_callback): Ditto. Fetch ptid, lwpid
2420 from thread, lwp.
2421 (lwp_running): Update, "entry" parameter is a
2422 struct thread_info * now.
2423 (stop_all_lwps): Fetch ptid from thread.
2424 Pass &all_threads to find_inferior, for_each_inferior, not &all_lwps.
2425 (linux_resume_one_lwp): Fetch lwpid from thread.
2426 (linux_set_resume_request): Update, "entry" parameter is a
2427 struct thread_info * now. Fetch pid, lwpid from thread.
2428 (resume_status_pending_p): Update, "entry" parameter is a
2429 struct thread_info * now.
2430 (need_step_over_p): Ditto. Fetch lwpid from thread.
2431 (start_step_over): Fetch lwpid from thread.
2432 (linux_resume_one_thread): Update, "entry" parameter is a
2433 struct thread_info * now. Fetch lwpid from thread.
2434 (linux_resume): Pass &all_threads to find_inferior, not &all_lwps.
2435 (proceed_one_lwp): Update, "entry" parameter is a
2436 struct thread_info * now. Fetch lwpid from thread.
2437 (unsuspend_and_proceed_one_lwp): Update, "entry" parameter is a
2438 struct thread_info * now.
2439 (proceed_all_lwps): Pass &all_threads to find_inferior, not &all_lwps.
2440 (unstop_all_lwps): Ditto. Fetch lwpid from thread.
2441 (regsets_fetch_inferior_registers): Fetch lwpid from current_inferior
2442 directly.
2443 (regsets_store_inferior_registers): Ditto.
2444 (fetch_register, store_register): Ditto.
2445 (linux_read_memory, linux_write_memory): Ditto.
2446 (linux_request_interrupt): Ditto.
2447 (linux_read_auxv): Ditto.
2448 (linux_xfer_siginfo): Ditto.
2449 (linux_qxfer_spu): Ditto.
2450 (linux_qxfer_libraries_svr4): Ditto.
2451 * linux-low.h (ptid_of, pid_of, lwpid_of): Delete,
2452 moved to inferiors.h.
2453 (get_lwp): Delete.
2454 (get_thread_lwp): Update.
2455 (struct lwp_info): Delete member "entry". Simplify comment for
2456 member "thread".
2457 (all_lwps): Delete.
2458 * linux-mips-low.c (mips_read_description): Fetch lwpid from
2459 current_inferior directly.
2460 (update_watch_registers_callback): Update, "entry" parameter is a
2461 struct thread_info * now. Fetch pid from thread.
2462 (mips_linux_prepare_to_resume): Fetch ptid from thread.
2463 (mips_insert_point): Fetch lwpid from current_inferior.
2464 Pass &all_threads to find_inferior, not &all_lwps.
2465 (mips_remove_point): Pass &all_threads to find_inferior, not &all_lwps.
2466 (mips_stopped_by_watchpoint): Fetch lwpid from current_inferior
2467 directly.
2468 (mips_stopped_data_address): Ditto.
2469 * linux-s390-low.c (s390_arch_setup): Fetch pid from current_inferior
2470 directly.
2471 * linux-tile-low.c (tile_arch_setup): Ditto.
2472 * linux-x86-low.c (x86_get_thread_area): Fetch lwpid from thread.
2473 (update_debug_registers_callback): Update, "entry" parameter is a
2474 struct thread_info * now. Fetch pid from thread.
2475 (i386_dr_low_set_addr): Fetch pid from current_inferior directly.
2476 Pass &all_threads to find_inferior, not &all_lwps.
2477 (i386_dr_low_get_addr): Fetch ptid from current_inferior directly.
2478 (i386_dr_low_set_control): Fetch pid from current_inferior directly.
2479 Pass &all_threads to find_inferior, not &all_lwps.
2480 (i386_dr_low_get_control): Fetch ptid from current_inferior directly.
2481 (i386_dr_low_get_status): Ditto.
2482 (x86_linux_prepare_to_resume): Fetch ptid from thread.
2483 (x86_siginfo_fixup): Fetch lwpid from current_inferior directly.
2484 (x86_linux_read_description): Ditto.
2485 * proc-service.c (ps_getpid): Fetch pid from current_inferior directly.
2486
3b8361aa
DE
24872014-02-20 Doug Evans <dje@google.com>
2488
2489 * inferiors.c (get_first_inferior): Fix buglet.
2490
f7667f0d
DE
24912014-02-19 Doug Evans <dje@google.com>
2492
2493 * gdbthread.h (add_thread): Change result type to struct thread_info *.
2494 * inferiors.c (add_thread): Change result type to struct thread_info *.
2495 All callers updated.
2496 (add_lwp): Call add_thread here instead of in callers.
2497 All callers updated.
2498 * linux-low.h (get_lwp_thread): Rewrite.
2499 (struct lwp_info): New member "thread".
2500
b3312d80
DE
25012014-02-19 Doug Evans <dje@google.com>
2502
2503 * linux-low.c (add_lwp): Change result to struct lwp_info *.
2504 All callers updated.
2505
ecc6f45c
DE
25062014-02-19 Doug Evans <dje@google.com>
2507
2508 * inferiors.c (add_thread): Fix whitespace.
2509
649ebbca
DE
25102014-02-19 Doug Evans <dje@google.com>
2511
2512 * dll.c (clear_dlls): Replace accessing list implemention details
2513 with API function.
2514 * gdbthread.h (get_first_thread): Declare.
2515 * inferiors.c (for_each_inferior_with_data): New function.
2516 (get_first_thread): New function.
2517 (find_thread_ptid): Simplify.
2518 (get_first_inferior): New function.
2519 (clear_list): Delete.
2520 (one_inferior_p): New function.
2521 (clear_inferior_list): New function.
2522 (clear_inferiors): Update.
2523 * inferiors.h (for_each_inferior_with_data): Declare.
2524 (clear_inferior_list): Declare.
2525 (one_inferior_p): Declare.
2526 (get_first_inferior): Declare.
2527 * linux-low.c (linux_wait_for_event): Replace accessing list
2528 implemention details with API function.
2529 * server.c (target_running): Ditto.
2530 (accumulate_file_name_length): New function.
2531 (emit_dll_description): New function.
2532 (handle_qxfer_libraries): Replace accessing list implemention
2533 details with API function.
2534 (handle_qxfer_threads_worker): New function.
2535 (handle_qxfer_threads_proper): Replace accessing list implemention
2536 details with API function.
2537 (handle_query): Ditto.
2538 (visit_actioned_threads_callback_ftype): New typedef.
2539 (visit_actioned_threads_data): New struct.
2540 (visit_actioned_threads): Rewrite to be find_inferior callback.
2541 (resume): Call find_inferior.
2542 (handle_status): Replace accessing list implemention
2543 details with API function.
2544 (process_serial_event): Replace accessing list implemention details
2545 with API function.
2546 * target.c (set_desired_inferior): Replace accessing list implemention
2547 details with API function.
2548 * tracepoint.c (same_process_p): New function.
2549 (gdb_agent_about_to_close): Replace accessing list implemention
2550 details with API function.
2551 * win32-low.c (child_delete_thread): Replace accessing list
2552 implemention details with API function.
2553 (match_dll_by_basename): New function.
2554 (dll_is_loaded_by_basename): New function.
2555 (win32_ensure_ntdll_loaded): Replace accessing list implemention
2556 details call to dll_is_loaded_by_basename.
2557
80894984
DE
25582014-02-19 Doug Evans <dje@google.com>
2559
2560 * dll.h (struct dll_info): Add comment.
2561 * gdbthread.h (struct thread_info): Add comment.
2562 (current_ptid): Simplify.
2563 * inferiors.c (add_process): Update.
2564 (remove_process): Update.
2565 * inferiors.h (struct process_info): Rename member "head" to "entry".
2566 * linux-low.c (delete_lwp): Update.
2567 (add_lwp): Update.
2568 (last_thread_of_process_p): Update.
2569 (kill_one_lwp_callback, linux_kill): Update.
2570 (status_pending_p_callback): Update.
2571 (wait_for_sigstop): Update. Simplify read of ptid.
2572 (start_step_over): Update.
2573 * linux-low.h (ptid_of, pid_of, lwpid_of): Update.
2574 (get_lwp_thread): Update.
2575 (struct lwp_info): Rename member "head" to "entry".
2576 * regcache.h (inferior_list_entry): Delete.
2577 * server.c (kill_inferior_callback): Update.
2578 (detach_or_kill_inferior_callback): Update.
2579 (print_started_pid): Update.
2580 (print_attached_pid): Update.
2581 (process_serial_event): Simplify read of ptid.
2582 * thread-db.c (thread_db_create_event): Update.
2583 (thread_db_get_tls_address): Update.
2584 * win32-low.c (current_inferior_ptid): Simplify.
2585
46917d26
TT
25862014-02-19 Tom Tromey <tromey@redhat.com>
2587
2588 * target.h (struct target_ops) <supports_btrace>: Add target_ops
2589 argument.
2590 (target_supports_btrace): Update.
2591
0759a81e
YQ
25922014-02-14 Yao Qi <yao@codesourcery.com>
2593
2594 * Makefile.in (IPA_OBJS): Append rsp-low-ipa.o.
2595 (rsp-low-ipa.o): New target.
2596
a7191e8b
TT
25972014-02-12 Tom Tromey <tromey@redhat.com>
2598
2599 * ax.c (gdb_parse_agent_expr): Use hex2bin, not
2600 convert_ascii_to_int.
2601 * regcache.c (registers_to_string): Likewise.
2602 * remote-utils.c (decode_M_packet): Likewise.
2603 * server.c (process_serial_event): Likewise.
2604
ff0e980e
TT
26052014-02-12 Tom Tromey <tromey@redhat.com>
2606
2607 * server.c (handle_query, handle_v_run): Use hex2bin, not
2608 unhexify.
2609 * tracepoint.c (cmd_qtdpsrc, cmd_qtdv, cmd_qtnotes): Likewise.
2610
e9371aff
TT
26112014-02-12 Tom Tromey <tromey@redhat.com>
2612
2613 * ax.c (gdb_unparse_agent_expr): Use bin2hex, not
2614 convert_int_to_ascii.
2615 * regcache.c (registers_to_string, collect_register_as_string):
2616 Likewise.
2617 * remote-utils.c (look_up_one_symbol, relocate_instruction):
2618 Likewise.
2619 * server.c (process_serial_event): Likewise.
2620 * tracepoint.c (cmd_qtstatus, response_source, response_tsv)
2621 (cmd_qtbuffer, cstr_to_hexstr): Likewise.
2622
971dc0b8
TT
26232014-02-12 Tom Tromey <tromey@redhat.com>
2624
2625 * remote-utils.c (look_up_one_symbol, monitor_output): Use
2626 bin2hex, not hexify.
2627 * tracepoint.c (cmd_qtstatus): Likewise.
2628
0a822afb
TT
26292014-02-12 Tom Tromey <tromey@redhat.com>
2630
2631 * remote-utils.c (monitor_output): Pass explicit length to
2632 hexify.
2633
9c3d6531
TT
26342014-02-12 Tom Tromey <tromey@redhat.com>
2635
2636 * tracepoint.c: Include rsp-low.h.
2637 * server.c: Include rsp-low.h.
2638 * remote-utils.h (convert_ascii_to_int, convert_int_to_ascii)
2639 (unhexify, hexify, remote_escape_output, unpack_varlen_hex): Don't
2640 declare.
2641 * remote-utils.c: Include rsp-low.h.
2642 (fromhex, hexchars, ishex, unhexify, tohex, hexify)
2643 (remote_escape_output, remote_unescape_input, unpack_varlen_hex)
2644 (convert_int_to_ascii, convert_ascii_to_int): Move to
2645 common/rsp-low.c.
2646 * regcache.c: Include rsp-low.h.
2647 * ax.c: Include rsp-low.h.
2648 * Makefile.in (SFILES): Add common/rsp-low.c.
2649 (OBS): Add rsp-low.o.
2650 (rsp-low.o): New target.
2651
01fd3ea5
TT
26522014-02-12 Tom Tromey <tromey@redhat.com>
2653
2654 * utils.h (pulongest, plongest, phex_nz): Don't declare.
2655 Include print-utils.h.
2656 * utils.c (NUMCELLS, CELLSIZE, get_cell, decimal2str, pulongest)
2657 (plongest, thirty_two, phex_nz): Remove.
2658 * Makefile.in (SFILES): Add common/print-utils.c.
2659 (OBS): Add print-utils.o.
2660 (print-utils-ipa.o): New target.
2661 (print-utils.o): New target.
2662 (IPA_OBJS): Add print-utils-ipa.o.
2663
e99dc820
TT
26642014-02-06 Tom Tromey <tromey@redhat.com>
2665
2666 * Makefile.in (SFILES): Fix indentation.
2667
ee1e2d4f
DE
26682014-02-05 Doug Evans <dje@google.com>
2669
2670 * linux-low.c (linux_wait_for_event): Improve comment.
2671 (linux_wait_1): Keep current_inferior in sync with event_child.
2672
f5a02773
DE
26732014-01-22 Doug Evans <dje@google.com>
2674
2675 * gdbthread.h (gdb_id_to_thread): Delete, unused.
2676
87ce2a04
DE
26772014-01-22 Doug Evans <dje@google.com>
2678
2679 * configure.ac (AC_CHECK_FUNCS): Add test for gettimeofday.
2680 * configure: Regenerate.
2681 * config.in: Regenerate.
2682 * Makefile.in (SFILES): Add debug.c.
2683 (OBS): Add debug.o.
2684 * debug.c: New file.
2685 * debug.h: New file.
2686 * linux-aarch64-low.c (*): Update all debugging printfs to use
2687 debug_printf instead of fprintf.
2688 * linux-arm-low.c (*): Ditto.
2689 * linux-cris-low.c (*): Ditto.
2690 * linux-crisv32-low.c (*): Ditto.
2691 * linux-m32r-low.c (*): Ditto.
2692 * linux-sparc-low.c (*): Ditto.
2693 * linux-x86.c (*): Ditto.
2694 * linux-low.c (*): Ditto.
2695 (linux_wait_1): Add calls to debug_enter, debug_exit.
2696 (linux_wait): Remove redundant debugging printf.
2697 (stop_all_lwps): Add calls to debug_enter, debug_exit.
2698 (linux_resume, unstop_all_lwps): Ditto.
2699 * mem-break.c (*): Update all debugging printfs to use
2700 debug_printf instead of fprintf.
2701 * remote-utils.c (*): Ditto.
2702 * thread-db.c (*): Ditto.
2703 * server.c #include <ctype.h>, "gdb_vecs.h".
2704 (debug_threads): Moved to debug.c.
2705 (*): Update all debugging printfs to use debug_printf instead of
2706 fprintf.
2707 (start_inferior): Replace call to fflush with call to debug_flush.
2708 (monitor_show_help): Mention set debug-format.
2709 (parse_debug_format_options): New function.
2710 (handle_monitor_command): Handle "monitor set debug-format".
2711 (gdbserver_usage): Mention --debug-format.
2712 (main): Parse --debug-format.
2713 * server.h (debug_threads): Declaration moved to debug.h.
2714 #include "debug.h".
2715 * tracepoint.c (trace_debug_1) [!IN_PROCESS_AGENT]: Add version of
2716 trace_debug_1 that uses debug_printf.
2717 (tracepoint_look_up_symbols): Update all debugging printfs to use
2718 debug_printf instead of fprintf.
2719
e671835b
BS
27202014-01-20 Baruch Siach <baruch@tkos.co.il>
2721
2722 * linux-xtensa-low.c: Include asm/ptrace.h instead of
2723 sys/ptrace.h.
2724
b5737fa9
PA
27252014-01-17 Pedro Alves <palves@redhat.com>
2726
ea38d2a9 2727 PR build/16445
c7faa97a
PA
2728 * linux-x86-low.c: Don't include elf/common.h if ELFMAG0 is
2729 defined after including gdb_proc_service.h.
b5737fa9 2730
40ed484e
DE
27312014-01-16 Doug Evans <dje@google.com>
2732
2733 * dll.c (UNSPECIFIED_CORE_ADDR): New macro.
2734 (match_dll): Use it.
2735
969c39fb
MM
27362014-01-16 Markus Metzger <markus.t.metzger@intel.com>
2737
2738 * target.h (target_ops) <read_btrace>: Change parameters and
2739 return type to allow error reporting.
2740 * server.c (handle_qxfer_btrace): Support delta reads. Pass
2741 trace reading errors on.
2742 * linux-low.c (linux_low_read_btrace): Pass trace reading
2743 errors on.
2744 (linux_low_disable_btrace): New.
2745
ab7f45ba
DE
27462014-01-15 Doug Evans <dje@google.com>
2747
2748 * inferiors.c (thread_id_to_gdb_id): Delete.
2749 * inferiors.h (thread_id_to_gdb_id): Delete.
2750
66af0f44
EZ
27512014-01-13 Eli Zaretskii <eliz@gnu.org>
2752
2753 * Makefile.in (INCLUDE_CFLAGS): Remove trailing slash from
2754 "-I$(srcdir)/../". Fixes MinGW compilation errors with old GCC
2755 versions.
2756
9939e131
PA
27572014-01-08 Pedro Alves <palves@redhat.com>
2758
2759 * server.c (handle_status): Don't discard previous queued stop
2760 replies or thread's pending status here.
2761 (main) <disconnection>: Do it here instead.
2762
b7ea362b
PA
27632014-01-08 Pedro Alves <palves@redhat.com>
2764
2765 * gdbthread.h (struct thread_info) <status_pending_p>: New field.
2766 * server.c (visit_actioned_threads, handle_pending_status): New
2767 function.
2768 (handle_v_cont): Factor out parts to ...
2769 (resume): ... this new function. If in all-stop, and a thread
2770 being resumed has a pending status, report it without actually
2771 resuming.
2772 (myresume): Adjust to use the new 'resume' function.
2773 (clear_pending_status_callback, set_pending_status_callback)
2774 (find_status_pending_thread_callback): New functions.
2775 (handle_status): Handle the case of multiple threads having
2776 interesting statuses to report. Report threads' real last signal
2777 instead of always reporting GDB_SIGNAL_TRAP. Look for a thread
2778 with an interesting thread to report the status for, instead of
2779 always reporting the status of the first thread.
2780
28498c42
JB
27812014-01-01 Joel Brobecker <brobecker@adacore.com>
2782
2783 * gdbserver.c (gdbserver_version): Set copyright year to 2014.
2784 * gdbreplay.c (gdbreplay_version): Likewise.
2785
f45c82da
YZ
27862013-12-18 Yufeng Zhang <yufeng.zhang@arm.com>
2787
2788 * linux-aarch64-low.c (aarch64_linux_set_debug_regs): Set
2789 iov.iov_len with the real length in use.
2790
379a5e2d
JB
27912013-12-13 Joel Brobecker <brobecker@adacore.com>
2792
2793 * Makefile.in (safe-ctype.o, lbasename.o): New rules.
2794 * configure.srv: Add safe-ctype.o and lbasename.o to srv_tgtobj
2795 for all targets that use win32-low.c.
2796 * win32-low.c (win32_ensure_ntdll_loaded): New function.
2797 (do_initial_child_stuff): Add call to win32_ensure_ntdll_loaded.
2798
4210d83e
PA
27992013-12-13 Pedro Alves <palves@redhat.com>
2800
2801 * target.c (mywait): Set OURSTATUS->KIND to TARGET_WAITKIND_STOPPED
2802 if equal to TARGET_WAITKIND_LOADED.
2803 * win32-low.c (cached_status): New static global.
2804 (win32_wait): Add declaration.
2805 (do_initial_child_stuff): Flush all initial pending debug events
2806 up to the initial breakpoint.
2807 (win32_wait): If CACHED_STATUS was set, return that instead
2808 of doing a real wait. Remove the code resuming the execution
2809 of the inferior after receiving a TARGET_WAITKIND_LOADED event
2810 during the initial phase. Also remove the code changing
2811 OURSTATUS->KIND from TARGET_WAITKIND_LOADED to
2812 TARGET_WAITKIND_STOPPED.
2813
e7f0d979
YQ
28142013-12-11 Yao Qi <yao@codesourcery.com>
2815
2816 * notif.c (handle_notif_ack): Return 0 if no notification
2817 matches.
2818
ebcf782c
DE
28192013-11-20 Doug Evans <dje@google.com>
2820
2821 * linux-low.c (linux_set_resume_request): Fix comment.
2822
20ad9378
DE
28232013-11-20 Doug Evans <dje@google.com>
2824
2825 * linux-low.c (resume_status_pending_p): Tweak comment.
2826
a196ebeb
WT
28272013-11-20 Walfred Tedeschi <walfred.tedeschi@intel.com>
2828
2829 * Makefile.in: Add i386-mpx.c, i386-mpx-linux.c, amd64-mpx.c,
2830 amd64-mpx-linux.c, x32-mpx.c and x32-mpx-linux.c generation.
2831 * configure.srv (srv_i386_regobj): Add i386-mpx.o.
2832 (srv_i386_linux_regobj): Add i386-mpx-linux.o.
2833 (srv_amd64_regobj): Add amd64-mpx.o.
2834 (srv_amd64_linux_regobj): Add amd64-mpx-linux.o.
2835 (srv_i386_32bit_xmlfiles): Add i386/32bit-mpx.xml.
2836 (srv_i386_64bit_xmlfiles): Add i386/64bit-mpx.xml.
2837 * i387-fp.c (num_pl_bnd_register) Added constant.
2838 (num_pl_bnd_cfg_registers) Added constant.
2839 (struct i387_xsave) Added reserved area and MPX fields.
2840 (i387_cache_to_xsave, i387_xsave_to_cache) Add MPX.
2841 * linux-x86-low.c (init_registers_i386_mpx_linux): Declare new
2842 function.
2843 (tdesc_i386_mpx_linux): Add MPX amd64 target.
2844 (init_registers_amd64_mpx_linux): Declare new function.
2845 (tdesc_amd64_mpx_linux): Add MPX amd64 target.
2846 (x86_64_regmap): Add MPX registers.
2847 (x86_linux_read_description): Add MPX case.
2848 (initialize_low_arch): Initialize MPX targets.
2849
0080a2f6
TT
28502013-11-18 Tom Tromey <tromey@redhat.com>
2851
2852 * configure: Rebuild.
2853 * configure.ac: Don't check for stdlib.h.
2854 * gdbreplay.c: Unconditionally include stdlib.h.
2855
2978b111
TT
28562013-11-18 Tom Tromey <tromey@redhat.com>
2857
2858 * config.in: Rebuild.
2859 * configure: Rebuild.
2860 * configure.ac: Don't use AC_HEADER_DIRENT.
2861
a3d08894
TT
28622013-11-18 Tom Tromey <tromey@redhat.com>
2863
2864 * server.h: Don't check HAVE_STRING_H.
2865 * gdbreplay.c: Don't check HAVE_STRING_H.
2866 * configure: Rebuild.
2867
0a5dd17d
TT
28682013-11-18 Tom Tromey <tromey@redhat.com>
2869
2870 * Makefile.in (gdbreplay$(EXEEXT)): Depend on and link against
2871 LIBGNU.
2872
1bd2f0ba
TT
28732013-11-08 Tom Tromey <tromey@redhat.com>
2874
2875 * configure, config.in: Rebuild.
2876 * configure.ac: Remove unused configury.
2877
3266f10b
TT
28782013-11-08 Tom Tromey <tromey@redhat.com>
2879
2880 * acinclude.m4: Include common.m4, codeset.m4.
2881 * configure, config.in: Rebuild.
2882 * configure.ac: Use GDB_AC_COMMON.
2883
6682d959
AA
28842013-11-06 Andreas Arnez <arnez@linux.vnet.ibm.com>
2885
2886 * linux-s390-low.c (HWCAP_S390_TE): New define.
2887 (s390_arch_setup): Consider the TE field in the HWCAP for
2888 determining 'have_regset_tdb'.
2889
fd0a4d76
SDJ
28902013-10-16 Sergio Durigan Junior <sergiodj@redhat.com>
2891
2892 PR gdb/16014
2893 * tracepoint.c (download_tracepoint_1): Remove unnecessary double
2894 call to sizeof.
2895
1a3d890b
PA
28962013-10-02 Pedro Alves <palves@redhat.com>
2897
2898 * server.c (process_serial_event): Don't output "GDBserver
2899 exiting" if GDB is connected through stdio.
2900 * target.c (mywait): Likewise, be silent if GDB is connected
2901 through stdio.
2902
97ad4581
JB
29032013-10-01 Joel Brobecker <brobecker@adacore.com>
2904
2905 * lynx-low.c (lynx_add_threads_after_attach): New function.
2906 (lynx_attach): Remove call to add_thread. Add call to
2907 lynx_add_threads_after_attach instead.
2908
5b4e221c
MF
29092013-09-28 Mike Frysinger <vapier@gentoo.org>
2910
2911 * configure.ac (AC_CHECK_HEADERS): Add sys/syscall.h
2912 * config.in, configure: Regenerated.
2913
ee47b2f8
YQ
29142013-09-18 Yao Qi <yao@codesourcery.com>
2915
2916 PR server/15959
2917 * server.c (start_inferior): Clear 'resume_info'.
2918
d6707650 29192013-09-16 Jiong Wang <jiwang@tilera.com>
0f63d4db 2920
d6707650
JW
2921 * linux-tile-low.c (tile_regsets): Modify the size field to 64-bit
2922 for each register.
2923
9243dd0e 29242013-09-16 Jiong Wang <jiwang@tilera.com>
0f63d4db 2925
9243dd0e
JW
2926 * configure.srv <tilegx*-*-linux*>: Remove linux-osdata.o from and add
2927 linux-tile-low.o to srv_tgtobj.
2928
c623a6ef
WN
29292013-09-16 Will Newton <will.newton@linaro.org>
2930
2931 * linux-aarch64-low.c (aarch64_linux_set_debug_regs): Zero
2932 out regs.
2933
fb71d39e
PA
29342013-09-06 Pedro Alves <palves@redhat.com>
2935
2936 * Makefile.in (gdb_proc_service_h, regdef_h, regcache_h)
2937 (signals_def, signals_h, ptid_h, ax_h, agent_h, linux_btrace_h)
2938 (linux_osdata_h, vec_h, gdb_vecs_h, host_defs_h, libiberty_h)
2939 (server_h, gdbthread_h, linux_low_h, linux_ptrace_h)
2940 (gdb_thread_db_h, linux_procfs_h, lynx_low_h, nto_low_h)
2941 (mips_linux_watch_h, i386_low_h, win32_low_h): Delete.
2942
8e7e9910
PA
29432013-09-06 Pedro Alves <palves@redhat.com>
2944
2945 * Makefile.in (linux-btrace.o, mips-linux-watch.o): Remove
2946 explicit header dependencies and use $COMPILE/$POSTCOMPILE.
2947
7c3a12ca
PA
29482013-09-06 Pedro Alves <palves@redhat.com>
2949
2950 * linux-amd64-ipa.c: Include tracepoint.h.
2951 * linux-i386-ipa.c: Include tracepoint.h.
2952
8eb3d7b6
RW
29532013-09-06 Ricard Wanderlof <ricardw@axis.com>
2954
2955 * linux-crisv32-low.c (PTRACE_GET_THREAD_AREA): New macro.
2956 (ps_get_thread_area): New function.
2957
eddddb9d
RW
29582013-09-06 Ricard Wanderlof <ricardw@axis.com>
2959
2960 * linux-crisv32-low.c (elf_gregset_t): Delete typedef.
2961 (initialize_low_arch): Call init_registers_crisv32 rather than
2962 init_register_crisv32.
2963
533b0600
PA
29642013-09-05 Pedro Alves <palves@redhat.com>
2965
2966 * server.h (handle_vFile, hostio_last_error_from_errno): Move
2967 to ...
2968 * hostio.h: ... this new file.
2969 * hostio.c, server.c, linux-low.c, nto-low.c, spu-low,
2970 win32-low.c: Include hostio.h.
2971
0ce3d3b5
PA
29722013-09-05 Pedro Alves <palves@redhat.com>
2973
2974 * server.h (gdb_client_data, handler_func, callback_handler_func)
2975 (delete_file_handler, add_file_handler, append_callback_event)
2976 (delete_callback_event, start_event_loop, initialize_event_loop):
2977 Move to event-loop.h and include it.
2978 * event-loop.h: New file.
2979
799cdc37
PA
29802013-09-05 Pedro Alves <palves@redhat.com>
2981
2982 * dll.c, inferiors.c, remote-utils.c, server.c: Include "dll.h".
2983 * server.h (struct dll_info, all_dlls, dlls_changed, clear_dlls)
2984 (loaded_dll, unloaded_dll): Move to ...
2985 * dll.h: ... this new file.
2986 * inferiors.c, remote-utils.c, win32-low.c: Include "dll.h".
2987
6a6bbd9d
PA
29882013-09-05 Pedro Alves <palves@redhat.com>
2989
2990 * server.h (current_process, get_thread_process, all_processes)
2991 (add_inferior_to_list, for_each_inferior, current_inferior)
2992 (remove_inferior, add_process, remove_process, find_process_pid)
2993 (have_started_inferiors_p, have_attached_inferiors_p)
2994 (thread_id_to_gdb_id, thread_to_gdb_id, gdb_id_to_thread_id)
2995 (clear_inferiors, find_inferior, find_inferior_id)
2996 (inferior_target_data, set_inferior_target_data)
2997 (inferior_regcache_data, set_inferior_regcache_data): Move to
2998 inferiors.h, and include it.
2999 * inferiors.h: New file.
3000
f699aaba
PA
30012013-09-05 Pedro Alves <palves@redhat.com>
3002
3003 * server.h (struct emit_ops, current_insn_ptr, emit_error):
3004 Move ...
72f4393d 3005 * ax.h: ... here.
f699aaba 3006
c144c7a0
PA
30072013-09-05 Pedro Alves <palves@redhat.com>
3008
3009 * ax.c, linux-low.c, linux-x86-low.c, server.c: Include
3010 tracepoint.h.
3011 * server.h (IPA_BUFSIZ, initialize_tracepoint, tracing)
3012 (disconnected_tracing, tracepoint_look_up_symbols, stop_tracing
3013 (handle_tracepoint_general_set, handle_tracepoint_query)
3014 (tracepoint_finished_step, tracepoint_was_hit)
3015 (release_while_stepping_state_list, current_traceframe)
3016 (in_readonly_region, traceframe_read_mem)
3017 (fetch_traceframe_registers, traceframe_read_sdata)
3018 (traceframe_read_info, struct fast_tpoint_collect_status)
3019 (fast_tracepoint_collecting, force_unlock_trace_buffer)
3020 (handle_tracepoit_bkpts, initialize_low_tracepoint)
3021 (supply_fast_tracepoint_registers)
3022 (supply_static_tracepoint_registers, set_trampoline_buffer_space)
3023 (ipa_tdesc, claim_trampoline_space)
3024 (have_fast_tracepoint_trampoline_buffer, gdb_agent_about_to_close)
3025 (agent_mem_read, agent_get_trace_state_variable_value)
3026 (agent_set_trace_state_variable_value, agent_tsv_read)
3027 (agent_mem_read_string, get_raw_reg_func_addr)
3028 (get_get_tsv_func_addr, get_set_tsv_func_addr): Move to ...
3029 * tracepoint.h: ... this new file.
3030
ff42e6ab
PA
30312013-09-05 Pedro Alves <palves@redhat.com>
3032
3033 * server.h (perror_with_name, error, fatal, warning, paddress)
3034 (pulongest, plongest, phex_nz, pfildes): Move to utils.h, and
3035 include it.
3036 * utils.h: New file.
3037
541af0f4
PA
30382013-09-05 Pedro Alves <palves@redhat.com>
3039
3040 * server.h (remote_debug, noack_mode, transport_is_reliable)
3041 (gdb_connected, STDIO_CONNECTION_NAME, remote_connection_is_stdio)
3042 (read_ptid, write_ptid, putpkt, putpkt_binary, putpkt_notif)
3043 (getpkt, remote_prepare, remote_open, remote_close, write_ok)
3044 (write_enn, initialize_async_io, enable_async_io)
3045 (disable_async_io, check_remote_input_interrupt_request)
3046 (convert_ascii_to_int, convert_int_to_ascii, new_thread_notify)
3047 (dead_thread_notify, prepare_resume_reply)
3048 (decode_address_to_semicolon, decode_address, decode_m_packet)
3049 (decode_M_packet, decode_X_packet, decode_xfer_write)
3050 (decode_search_memory_packet, unhexify, hexify)
3051 (remote_escape_output, unpack_varlen_hex, clear_symbol_cache)
3052 (look_up_one_symbol, relocate_instruction)
3053 (monitor_output): Move to remote-utils.h, and include it.
3054 * remote-utils.h: New file.
3055
eebdf26b
PA
30562013-09-05 Pedro Alves <palves@redhat.com>
3057
3058 * server.h (_): Delete.
3059
3aafd2ff
PA
30602013-09-02 Pedro Alves <palves@redhat.com>
3061
3062 * tracepoint.c (TRACEFRAME_EOB_MARKER_SIZE): New macro.
3063 (init_trace_buffer): Ensure at least TRACEFRAME_EOB_MARKER_SIZE is
3064 allocated.
3065 (trace_buffer_alloc): Use TRACEFRAME_EOB_MARKER_SIZE.
3066
cee83bcb
PM
30672013-09-02 Pierre Muller <muller@sourceware.org>
3068
3069 * win32-low.c (child_xfer_memory): Check if ReadProcessMemory
3070 or WriteProcessMemory complete successfully and handle
3071 ERROR_PARTIAL_COPY error.
3072
9a13b2fa
PA
30732013-09-02 Pedro Alves <palves@redhat.com>
3074
3075 * server.c (gdb_read_memory): Return -1 on traceframe memory read
3076 error instead of EIO.
3077
602e3198
JK
30782013-08-28 Jan Kratochvil <jan.kratochvil@redhat.com>
3079
3080 PR server/15604
3081 * linux-low.c: Include filestuff.h.
3082 (linux_create_inferior) <pid == 0>: Call close_most_fds.
3083 * lynx-low.c: Include filestuff.h.
3084 (lynx_create_inferior) <pid == 0>: Call close_most_fds.
3085 * server.c: Include filestuff.h.
3086 (main): Call notice_open_fds.
3087 * spu-low.c: Include filestuff.h.
3088 (spu_create_inferior) <pid == 0>: Call close_most_fds.
3089
96d7229d
LM
30902013-08-22 Luis Machado <lgustavo@codesourcery.com>
3091
3092 * Makefile.in: Explain why ../target and ../nat are not
3093 listed as include file search paths.
3094 (linux-waitpid.o): New object file rule.
3095 * configure.srv (srv_native_linux_obj): New variable.
3096 Replace all occurrences of linux native object files with
3097 $srv_native_linux_obj.
3098 * linux-low.c: Include nat/linux-nat.h and nat/linux-waitpid.h.
3099 (HAS_NOMMU): Move defining logic to common/linux-ptrace.c.
3100 (linux_enable_event_reporting): Remove declaration.
3101 (my_waitpid): Moved to common/linux-waitpid.c.
3102 (linux_wait_for_event): Pass ptid when calling
3103 linux_enable_event_reporting.
3104 (linux_supports_tracefork_flag): Remove.
3105 (linux_enable_event_reporting): Likewise.
3106 (linux_tracefork_grandchild): Remove.
3107 (STACK_SIZE): Moved to common/linux-ptrace.c.
3108 (linux_tracefork_child): Remove.
3109 (linux_test_for_tracefork): Remove.
3110 (linux_look_up_symbols): Call linux_supports_traceclone.
3111 (initialize_low): Remove call to linux_test_for_tracefork.
3112 * linux-low.h (PTRACE_TYPE_ARG3): Move to
3113 common/linux-ptrace.h.
3114 (PTRACE_TYPE_ARG4): Likewise.
3115 Include linux-ptrace.h.
3116
32940073
PA
31172013-08-21 Pedro Alves <palves@redhat.com>
3118
3119 * config.in: Renegerate.
3120
33b60d58 31212013-08-19 Luis Machado <lgustavo@codesourcery.com>
a261b8f5 3122
33b60d58
LM
3123 * Makefile.in (INCLUDE_CFLAGS): Include -I$(srcdir)/../.
3124 (SFILES): Remove $(srcdir)/common/target-common.c and
3125 add $(srcdir)/target/waitstatus.c.
3126 (OBS): Remove target-common.o and add waitstatus.o.
3127 (server_h): Remove $(srcdir)/../common/target-common.h and
3128 add $(srcdir)/../target/resume.h, $(srcdir)/../target/wait.h
3129 and $(srcdir)/../target/waitstatus.h.
3130 (target-common.o): Remove.
3131 (waitstatus.o): New target object file.
3132 * target.h: Do not include target-common.h and
3133 include target/resume.h, target/wait.h and
3134 target/waitstatus.h.
3135
b8e1b30e
LM
31362013-08-13 Luis Machado <lgustavo@codesourcery.com>
3137
3138 * linux-arm-low.c: Rename all occurrences of PTRACE_ARG3_TYPE
3139 to PTRACE_TYPE_ARG3.
3140 * linux-low.c: Rename all occurrences of PTRACE_ARG3_TYPE
3141 to PTRACE_TYPE_ARG3 and PTRACE_ARG4_TYPE to
3142 PTRACE_TYPE_ARG4.
3143 * linux-low.h (PTRACE_ARG3_TYPE): Rename to PTRACE_TYPE_ARG3.
3144 (PTRACE_ARG4_TYPE): Rename to PTRACE_TYPE_ARG4.
3145
7a60ad40
YQ
31462013-07-27 Jie Zhang <jie@codesourcery.com>
3147 Daniel Jacobowitz <dan@codesourcery.com>
3148 Yao Qi <yao@codesourcery.com>
3149
3150 * Makefile.in (SFILES): Add common/mips-linux-watch.c.
3151 (mips-linux-watch.o): New rule.
3152 (mips_linux_watch_h): New variable.
3153 * configure.srv <mips*-*-linux*>: Add mips-linux-watch.o to
3154 srv_tgtobj.
3155 * linux-mips-low.c: Include mips-linux-watch.h.
3156 (struct arch_process_info, struct arch_lwp_info): New.
3157 (update_watch_registers_callback): New function.
3158 (mips_linux_new_process, mips_linux_new_thread) New functions.
3159 (mips_linux_prepare_to_resume, mips_insert_point): New
3160 functions.
3161 (mips_remove_point, mips_stopped_by_watchpoint): New
3162 functions.
3163 (rsp_bp_type_to_target_hw_bp_type): New function.
3164 (mips_stopped_data_address): New function.
3165 (the_low_target): Add watchpoint support functions.
3166
de6f69ad
YQ
31672013-07-27 Yao Qi <yao@codesourcery.com>
3168
3169 * i386-low.c: Include break-common.h.
3170 (enum target_hw_bp_type): Remove.
3171
3360c0bf
LM
31722013-07-24 Luis Machado <lgustavo@codesourcery.com>
3173
3174 * Makefile.in (SFILES): /common/target-common.c.
3175 (OBS): Add target-common.o.
3176 (server_h): Add $(srcdir)/../common/target-common.h.
3177 (target-common.o): New target.
3178 * server.c (queue_stop_reply_callback): Free
3179 status string after use.
3180 * target.c (target_waitstatus_to_string): Remove.
3181 * target.h: Include target-common.h.
3182 (resume_kind): Likewise.
3183 (target_waitkind): Likewise.
3184 (target_waitstatus): Likewise.
3185 (TARGET_WNOHANG): Likewise.
3186
bd885420
YQ
31872013-07-04 Yao Qi <yao@codesourcery.com>
3188
3189 * Makefile.in (host_alias): Use @host_noncanonical@.
3190 (target_alias): Use @target_noncanonical@.
3191 * configure.ac: Use ACX_NONCANONICAL_TARGET and
3192 ACX_NONCANONICAL_HOST.
3193 * configure: Regenerated.
3194
3195 Revert:
3196 2013-06-28 Mircea Gherzan <mircea.gherzan@intel.com>
3197
3198 * configure.ac (version_host, version_target): Set and AC_SUBST them.
3199 * configure: Rebuild.
3200 * Makefile.in (version_host, version_target): Get from configure.
3201 (version.c): Use $(version_host) and $(version_target).
3202
17ef446e
PA
32032013-07-03 Pedro Alves <palves@redhat.com>
3204
3205 * Makefile.in (config.status): Depend on development.sh.
3206 * acinclude.m4: Include libmcheck.m4.
3207 * configure: Regenerate.
3208
7a9a7487
MG
32092013-07-02 Mircea Gherzan <mircea.gherzan@intel.com>
3210
3211 * win32-low.c (winapi_DebugActiveProcessStop): Move the WINAPI
3212 attribute inside the parentheses.
3213 (winapi_DebugSetProcessKillOnExit): Ditto.
3214 (winapi_DebugBreakProcess): Ditto.
3215 (winapi_GenerateConsoleCtrlEvent): Ditto.
a261b8f5 3216
49b64de6
MG
32172013-07-02 Mircea Gherzan <mircea.gherzan@intel.com>
3218
3219 * notif.h (notif_event): Add a dummy member to avoid compiler
3220 errors.
3221
d5749ee7
PA
32222013-07-01 Pedro Alves <palves@redhat.com>
3223
3224 * hostio.c (HOSTIO_PATH_MAX): Define.
3225 (require_filename, handle_open, handle_unlink, handle_readlink):
3226 Use it.
3227
d8d2a3ee
PA
32282013-07-01 Pedro Alves <palves@redhat.com>
3229
3230 * server.h: Include "pathmax.h".
3231 * linux-low.c: Don't include sys/param.h.
3232 (linux_pid_exe_is_elf_64_file): Use PATH_MAX instead of
3233 MAXPATHLEN.
3234 * win32-low.c: Don't include sys/param.h.
3235 (win32_create_inferior): Use PATH_MAX instead of MAXPATHLEN.
3236
bc7dea8d
PA
32372013-07-01 Pedro Alves <palves@redhat.com>
3238
3239 * event-loop.c: Don't check HAVE_UNISTD_H before including
3240 <unistd.h>.
3241 * gdbreplay.c: Likewise.
3242 * remote-utils.c: Likewise.
3243 * server.c: Likewise.
3244 * configure.ac: Don't check for unistd.h.
3245 * configure: Regenerate.
3246
d6c2da54
TT
32472013-06-28 Tom Tromey <tromey@redhat.com>
3248
3249 * Makefile.in (version.c): Use version.in, not
3250 common/version.in.
3251
257b6bec
MG
32522013-06-28 Mircea Gherzan <mircea.gherzan@intel.com>
3253
3254 * configure.ac (version_host, version_target): Set and AC_SUBST them.
3255 * configure: Rebuild.
3256 * Makefile.in (version_host, version_target): Get from configure.
3257 (version.c): Use $(version_host) and $(version_target).
3258
86ebe149
DK
32592013-06-10 Dmitry Kozlov <ddk@codesourcery.com>
3260
3261 Fix trace-status to output user name without trailing colon.
3262 * tracepoint.c (cmd_qtstatus): Remove unnecessary colon from user name.
3263
f30aa5af
DK
32642013-06-10 Dmitry Kozlov <ddk@codesourcery.com>
3265
3266 Fix trace-status to output proper start-time and stop-time.
3267 * tracepoint.c (cmd_qtstatus): Modify trace-status output to
3268 output start time and stop time in hex as gdb expects.
3269
28a93511
YQ
32702013-06-26 Pedro Alves <pedro@codesourcery.com>
3271
3272 * tracepoint.c (build_traceframe_info_xml): Output trace state
3273 variables present in the trace buffer.
3274
01208463
TT
32752013-06-24 Tom Tromey <tromey@redhat.com>
3276
3277 * Makefile.in (version.c): Use bfd/version.h, common/version.in,
3278 create-version.sh.
3279 (version.o): Remove.
3280 * gdbreplay.c: Include version.h.
3281 (version, host_name): Don't declare.
3282 * server.h: Include version.h.
3283 (version, host_name): Don't declare.
3284
760256f9
PA
32852013-06-12 Pedro Alves <palves@redhat.com>
3286
3287 * linux-x86-low.c (linux_is_elf64): Delete global.
3288 (x86_siginfo_fixup): Replace reference to `linux_is_elf64' global
3289 with local linux_pid_exe_is_elf_64_file use.
3290
030031ee
PA
32912013-06-11 Pedro Alves <palves@redhat.com>
3292
3293 * linux-low.c (regset_disabled, disable_regset): New functions.
3294 (regsets_fetch_inferior_registers)
3295 (regsets_store_inferior_registers): Use them.
3296 (initialize_regsets_info); Don't allocate the disabled_regsets
3297 array here.
3298 * linux-low.h (struct regsets_info) <disabled_regsets>: Extend
3299 comment.
3300
5da6eb0a
PA
33012013-06-11 Pedro Alves <palves@redhat.com>
3302
3303 * linux-low.c (initialize_regsets_info): Use xcalloc instead of
3304 xmalloc.
3305
7e5aaa09
PA
33062013-06-11 Pedro Alves <palves@redhat.com>
3307
3308 * linux-x86-low.c (initialize_low_arch): Call
3309 init_registers_x32_avx_linux.
3310
d878444c
JK
33112013-06-09 Jan Kratochvil <jan.kratochvil@redhat.com>
3312
3313 Fix compatibility with Android Bionic.
3314 * linux-low.c (linux_qxfer_libraries_svr4): Ignore first entry even if
3315 it is not empty.
3316
3aee8918
PA
33172013-06-07 Pedro Alves <palves@redhat.com>
3318
5f2b57b5 3319 PR server/14823
3aee8918
PA
3320 * Makefile.in (OBS): Add tdesc.o.
3321 (IPA_OBJS): Add tdesc-ipa.o.
3322 (tdesc-ipa.o): New rule.
3323 * ax.c (gdb_eval_agent_expr): Adjust register_size call to new
3324 interface.
3325 * linux-low.c (new_inferior): Delete.
3326 (disabled_regsets, num_regsets): Delete.
3327 (linux_add_process): Adjust to set the new per-process
3328 new_inferior flag.
3329 (linux_detach_one_lwp): Adjust to call regcache_invalidate_thread.
3330 (linux_wait_for_lwp): Adjust. Only call arch_setup if the event
3331 was a stop. When calling arch_setup, switch the current inferior
3332 to the thread that got an event.
3333 (linux_resume_one_lwp): Adjust to call regcache_invalidate_thread.
3334 (regsets_fetch_inferior_registers)
3335 (regsets_store_inferior_registers): New regsets_info parameter.
3336 Adjust to use it.
3337 (linux_register_in_regsets): New regs_info parameter. Adjust to
3338 use it.
3339 (register_addr, fetch_register, store_register): New usrregs_info
3340 parameter. Adjust to use it.
3341 (usr_fetch_inferior_registers, usr_store_inferior_registers): New
3342 parameter regs_info. Adjust to use it.
3343 (linux_fetch_registers): Get the current inferior's regs_info, and
3344 adjust to use it.
3345 (linux_store_registers): Ditto.
3346 [HAVE_LINUX_REGSETS] (initialize_regsets_info): New.
3347 (initialize_low): Don't initialize the target_regsets here. Call
3348 initialize_low_arch.
3349 * linux-low.h (target_regsets): Delete declaration.
3350 (struct regsets_info): New.
3351 (struct usrregs_info): New.
3352 (struct regs_info): New.
3353 (struct process_info_private) <new_inferior>: New field.
3354 (struct linux_target_ops): Delete the num_regs, regmap, and
3355 regset_bitmap fields. New field regs_info.
3356 [HAVE_LINUX_REGSETS] (initialize_regsets_info): Declare.
3357 * i387-fp.c (num_xmm_registers): Delete.
3358 (i387_cache_to_fsave, i387_fsave_to_cache): Adjust find_regno
3359 calls to new interface.
3360 (i387_cache_to_fxsave, i387_cache_to_xsave, i387_fxsave_to_cache)
3361 (i387_xsave_to_cache): Adjust find_regno calls to new interface.
3362 Infer the number of xmm registers from the regcache's target
3363 description.
3364 * i387-fp.h (num_xmm_registers): Delete.
3365 * inferiors.c (add_thread): Don't install the thread's regcache
3366 here.
3367 * proc-service.c (gregset_info): Fetch the current inferior's
3368 regs_info. Adjust to use it.
3369 * regcache.c: Include tdesc.h.
3370 (register_bytes, reg_defs, num_registers)
3371 (gdbserver_expedite_regs): Delete.
3372 (get_thread_regcache): If the thread doesn't have a regcache yet,
3373 create one, instead of aborting gdbserver.
3374 (regcache_invalidate_one): Rename to ...
3375 (regcache_invalidate_thread): ... this.
3376 (regcache_invalidate_one): New.
3377 (regcache_invalidate): Only invalidate registers of the current
3378 process.
3379 (init_register_cache): Add target_desc parameter, and use it.
3380 (new_register_cache): Ditto. Assert the target description has a
3381 non zero registers_size.
3382 (regcache_cpy): Add assertions. Adjust.
3383 (realloc_register_cache, set_register_cache): Delete.
3384 (registers_to_string, registers_from_string): Adjust.
3385 (find_register_by_name, find_regno, find_register_by_number)
3386 (register_cache_size): Add target_desc parameter, and use it.
3387 (free_register_cache_thread, free_register_cache_thread_one)
3388 (regcache_release, register_cache_size): New.
3389 (register_size): Add target_desc parameter, and use it.
3390 (register_data, supply_register, supply_register_zeroed)
3391 (supply_regblock, supply_register_by_name, collect_register)
3392 (collect_register_as_string, collect_register_by_name): Adjust.
3393 * regcache.h (struct target_desc): Forward declare.
3394 (struct regcache) <tdesc>: New field.
3395 (init_register_cache, new_register_cache): Add target_desc
3396 parameter.
3397 (regcache_invalidate_thread): Declare.
3398 (regcache_invalidate_one): Delete declaration.
3399 (regcache_release): Declare.
3400 (find_register_by_number, register_cache_size, register_size)
3401 (find_regno): Add target_desc parameter.
3402 (gdbserver_expedite_regs, gdbserver_xmltarget): Delete
3403 declarations.
3404 * remote-utils.c: Include tdesc.h.
3405 (outreg, prepare_resume_reply): Adjust.
3406 * server.c: Include tdesc.h.
3407 (gdbserver_xmltarget): Delete declaration.
3408 (get_features_xml, process_serial_event): Adjust.
3409 * server.h [IN_PROCESS_AGENT] (struct target_desc): Forward
3410 declare.
3411 (struct process_info) <tdesc>: New field.
3412 (ipa_tdesc): Declare.
3413 * tdesc.c: New file.
3414 * tdesc.h: New file.
3415 * tracepoint.c: Include tdesc.h.
3416 [IN_PROCESS_AGENT] (ipa_tdesc): Define.
3417 (get_context_regcache): Adjust to pass ipa_tdesc down.
3418 (do_action_at_tracepoint): Adjust to get the register cache size
3419 from the context regcache's description.
3420 (traceframe_walk_blocks): Adjust to get the register cache size
3421 from the current trace frame's description.
3422 (traceframe_get_pc): Adjust to get current trace frame's
3423 description and pass it down.
3424 (gdb_collect): Adjust to get the register cache size from the
3425 IPA's description.
3426 * linux-amd64-ipa.c (tdesc_amd64_linux): Declare.
3427 (gdbserver_xmltarget): Delete.
3428 (initialize_low_tracepoint): Set the ipa's target description.
3429 * linux-i386-ipa.c (tdesc_i386_linux): Declare.
3430 (initialize_low_tracepoint): Set the ipa's target description.
3431 * linux-x86-low.c: Include tdesc.h.
3432 [__x86_64__] (is_64bit_tdesc): New.
3433 (ps_get_thread_area, x86_get_thread_area): Use it.
3434 (i386_cannot_store_register): Rename to ...
3435 (x86_cannot_store_register): ... this. Use is_64bit_tdesc.
3436 (i386_cannot_fetch_register): Rename to ...
3437 (x86_cannot_fetch_register): ... this. Use is_64bit_tdesc.
3438 (x86_fill_gregset, x86_store_gregset): Adjust register_size calls
3439 to new interface.
3440 (target_regsets): Rename to ...
3441 (x86_regsets): ... this.
3442 (x86_get_pc, x86_set_pc): Adjust register_size calls to new
3443 interface.
3444 (x86_siginfo_fixup): Use is_64bit_tdesc.
3445 [__x86_64__] (tdesc_amd64_linux, tdesc_amd64_avx_linux)
3446 (tdesc_x32_avx_linux, tdesc_x32_linux)
3447 (tdesc_i386_linux, tdesc_i386_mmx_linux, tdesc_i386_avx_linux):
3448 Declare.
3449 (x86_linux_update_xmltarget): Delete.
3450 (I386_LINUX_XSAVE_XCR0_OFFSET): Define.
3451 (have_ptrace_getfpxregs, have_ptrace_getregset): New.
3452 (AMD64_LINUX_USER64_CS): New.
3453 (x86_linux_read_description): New, based on
3454 x86_linux_update_xmltarget.
3455 (same_process_callback): New.
3456 (x86_arch_setup_process_callback): New.
3457 (x86_linux_update_xmltarget): New.
3458 (x86_regsets_info): New.
3459 (amd64_linux_regs_info): New.
3460 (i386_linux_usrregs_info): New.
3461 (i386_linux_regs_info): New.
3462 (x86_linux_regs_info): New.
3463 (x86_arch_setup): Reimplement.
3464 (x86_install_fast_tracepoint_jump_pad): Use is_64bit_tdesc.
3465 (x86_emit_ops): Ditto.
3466 (the_low_target): Adjust. Install x86_linux_regs_info,
3467 x86_cannot_fetch_register, and x86_cannot_store_register.
3468 (initialize_low_arch): New.
3469 * linux-ia64-low.c (tdesc_ia64): Declare.
3470 (ia64_fetch_register): Adjust.
3471 (ia64_usrregs_info, regs_info): New globals.
3472 (ia64_regs_info): New function.
3473 (the_low_target): Adjust.
3474 (initialize_low_arch): New function.
3475 * linux-sparc-low.c (tdesc_sparc64): Declare.
3476 (sparc_fill_gregset_to_stack, sparc_store_gregset_from_stack):
3477 Adjust.
3478 (sparc_arch_setup): New function.
3479 (sparc_regsets_info, sparc_usrregs_info, regs_info): New globals.
3480 (the_low_target): Adjust.
3481 (initialize_low_arch): New function.
3482 * linux-ppc-low.c (tdesc_powerpc_32l, tdesc_powerpc_altivec32l)
3483 (tdesc_powerpc_cell32l, tdesc_powerpc_vsx32l)
3484 (tdesc_powerpc_isa205_32l, tdesc_powerpc_isa205_altivec32l)
3485 (tdesc_powerpc_isa205_vsx32l, tdesc_powerpc_e500l)
3486 (tdesc_powerpc_64l, tdesc_powerpc_altivec64l)
3487 (tdesc_powerpc_cell64l, tdesc_powerpc_vsx64l)
3488 (tdesc_powerpc_isa205_64l, tdesc_powerpc_isa205_altivec64l)
3489 (tdesc_powerpc_isa205_vsx64l): Declare.
3490 (ppc_cannot_store_register, ppc_collect_ptrace_register)
3491 (ppc_supply_ptrace_register, parse_spufs_run, ppc_get_pc)
3492 (ppc_set_pc, ppc_get_hwcap): Adjust.
3493 (ppc_usrregs_info): Forward declare.
3494 (!__powerpc64__) ppc_regmap_adjusted: New global.
3495 (ppc_arch_setup): Adjust to the current process'es target
3496 description.
3497 (ppc_fill_vsxregset, ppc_store_vsxregset, ppc_fill_vrregset)
3498 (ppc_store_vrregset, ppc_fill_evrregset, ppc_store_evrregse)
3499 (ppc_store_evrregset): Adjust.
3500 (target_regsets): Rename to ...
3501 (ppc_regsets): ... this, and make static.
3502 (ppc_usrregs_info, ppc_regsets_info, regs_info): New globals.
3503 (ppc_regs_info): New function.
3504 (the_low_target): Adjust.
3505 (initialize_low_arch): New function.
3506 * linux-s390-low.c (tdesc_s390_linux32, tdesc_s390_linux32v1)
3507 (tdesc_s390_linux32v2, tdesc_s390_linux64, tdesc_s390_linux64v1)
3508 (tdesc_s390_linux64v2, tdesc_s390x_linux64, tdesc_s390x_linux64v1)
3509 (tdesc_s390x_linux64v2): Declare.
3510 (s390_collect_ptrace_register, s390_supply_ptrace_register)
3511 (s390_fill_gregset, s390_store_last_break): Adjust.
3512 (target_regsets): Rename to ...
3513 (s390_regsets): ... this, and make static.
3514 (s390_get_pc, s390_set_pc): Adjust.
3515 (s390_get_hwcap): New target_desc parameter, and use it.
3516 [__s390x__] (have_hwcap_s390_high_gprs): New global.
3517 (s390_arch_setup): Adjust to set the current process'es target
3518 description. Don't adjust the regmap.
3519 (s390_usrregs_info, s390_regsets_info, regs_info): New globals.
3520 [__s390x__] (s390_usrregs_info_3264, s390_regsets_info_3264)
3521 (regs_info_3264): New globals.
3522 (s390_regs_info): New function.
3523 (the_low_target): Adjust.
3524 (initialize_low_arch): New function.
3525 * linux-mips-low.c (tdesc_mips_linux, tdesc_mips_dsp_linux)
3526 (tdesc_mips64_linux, tdesc_mips64_dsp_linux): Declare.
3527 [__mips64] (init_registers_mips_linux)
3528 (init_registers_mips_dsp_linux): Delete defines.
3529 [__mips64] (tdesc_mips_linux, tdesc_mips_dsp_linux): New defines.
3530 (have_dsp): New global.
3531 (mips_read_description): New, based on mips_arch_setup.
3532 (mips_arch_setup): Reimplement.
3533 (get_usrregs_info): New function.
3534 (mips_cannot_fetch_register, mips_cannot_store_register)
3535 (mips_get_pc, mips_set_pc, mips_fill_gregset, mips_store_gregset)
3536 (mips_fill_fpregset, mips_store_fpregset): Adjust.
3537 (target_regsets): Rename to ...
3538 (mips_regsets): ... this, and make static.
3539 (mips_regsets_info, mips_dsp_usrregs_info, mips_usrregs_info)
3540 (dsp_regs_info, regs_info): New globals.
3541 (mips_regs_info): New function.
3542 (the_low_target): Adjust.
3543 (initialize_low_arch): New function.
3544 * linux-arm-low.c (tdesc_arm, tdesc_arm_with_iwmmxt)
3545 (tdesc_arm_with_vfpv2, tdesc_arm_with_vfpv3, tdesc_arm_with_neon):
3546 Declare.
3547 (arm_fill_vfpregset, arm_store_vfpregset): Adjust.
3548 (arm_read_description): New, with bits factored from
3549 arm_arch_setup.
3550 (arm_arch_setup): Reimplement.
3551 (target_regsets): Rename to ...
3552 (arm_regsets): ... this, and make static.
3553 (arm_regsets_info, arm_usrregs_info, regs_info): New globals.
3554 (arm_regs_info): New function.
3555 (the_low_target): Adjust.
3556 (initialize_low_arch): New function.
3557 * linux-m68k-low.c (tdesc_m68k): Declare.
3558 (target_regsets): Rename to ...
3559 (m68k_regsets): ... this, and make static.
3560 (m68k_regsets_info, m68k_usrregs_info, regs_info): New globals.
3561 (m68k_regs_info): New function.
3562 (m68k_arch_setup): New function.
3563 (the_low_target): Adjust.
3564 (initialize_low_arch): New function.
3565 * linux-sh-low.c (tdesc_sharch): Declare.
3566 (target_regsets): Rename to ...
3567 (sh_regsets): ... this, and make static.
3568 (sh_regsets_info, sh_usrregs_info, regs_info): New globals.
3569 (sh_regs_info, sh_arch_setup): New functions.
3570 (the_low_target): Adjust.
3571 (initialize_low_arch): New function.
3572 * linux-bfin-low.c (tdesc_bfin): Declare.
3573 (bfin_arch_setup): New function.
3574 (bfin_usrregs_info, regs_info): New globals.
3575 (bfin_regs_info): New function.
3576 (the_low_target): Adjust.
3577 (initialize_low_arch): New function.
3578 * linux-cris-low.c (tdesc_cris): Declare.
3579 (cris_arch_setup): New function.
3580 (cris_usrregs_info, regs_info): New globals.
3581 (cris_regs_info): New function.
3582 (the_low_target): Adjust.
3583 (initialize_low_arch): New function.
3584 * linux-cris-low.c (tdesc_crisv32): Declare.
3585 (cris_arch_setup): New function.
3586 (cris_regsets_info, cris_usrregs_info, regs_info): New globals.
3587 (cris_regs_info): New function.
3588 (the_low_target): Adjust.
3589 (initialize_low_arch): New function.
3590 * linux-m32r-low.c (tdesc_m32r): Declare.
3591 (m32r_arch_setup): New function.
3592 (m32r_usrregs_info, regs_info): New globals.
3593 (m32r_regs_info): Adjust.
3594 (initialize_low_arch): New function.
3595 * linux-tic6x-low.c (tdesc_tic6x_c64xp_linux)
3596 (tdesc_tic6x_c64x_linux, tdesc_tic6x_c62x_linux): Declare.
3597 (tic6x_usrregs_info): Forward declare.
3598 (tic6x_read_description): New function, based on ...
3599 (tic6x_arch_setup): ... this. Reimplement.
3600 (target_regsets): Rename to ...
3601 (tic6x_regsets): ... this, and make static.
3602 (tic6x_regsets_info, tic6x_usrregs_info, regs_info): New globals.
3603 (tic6x_regs_info): New function.
3604 (the_low_target): Adjust.
3605 (initialize_low_arch): New function.
3606 * linux-xtensa-low.c (tdesc_xtensa): Declare.
3607 (xtensa_fill_gregset, xtensa_store_gregset): Adjust.
3608 (target_regsets): Rename to ...
3609 (xtensa_regsets): ... this, and make static.
3610 (xtensa_regsets_info, xtensa_usrregs_info, regs_info): New
3611 globals.
3612 (xtensa_arch_setup, xtensa_regs_info): New functions.
3613 (the_low_target): Adjust.
3614 (initialize_low_arch): New function.
3615 * linux-nios2-low.c (tdesc_nios2_linux): Declare.
3616 (nios2_arch_setup): Set the current process'es tdesc.
3617 (target_regsets): Rename to ...
3618 (nios2_regsets): ... this.
3619 (nios2_regsets_info, nios2_usrregs_info, regs_info): New globals.
3620 (nios2_regs_info): New function.
3621 (the_low_target): Adjust.
3622 (initialize_low_arch): New function.
a261b8f5
PA
3623 * linux-aarch64-low.c (tdesc_aarch64): Declare.
3624 (aarch64_arch_setup): Set the current process'es tdesc.
3625 (target_regsets): Rename to ...
3626 (aarch64_regsets): ... this.
3627 (aarch64_regsets_info, aarch64_usrregs_info, regs_info): New globals.
3628 (aarch64_regs_info): New function.
3629 (the_low_target): Adjust.
3630 (initialize_low_arch): New function.
3aee8918
PA
3631 * linux-tile-low.c (tdesc_tilegx, tdesc_tilegx32): Declare
3632 globals.
3633 (target_regsets): Rename to ...
3634 (tile_regsets): ... this.
3635 (tile_regsets_info, tile_usrregs_info, regs_info): New globals.
3636 (tile_regs_info): New function.
3637 (tile_arch_setup): Set the current process'es tdesc.
3638 (the_low_target): Adjust.
3639 (initialize_low_arch): New function.
3640 * spu-low.c (tdesc_spu): Declare.
3641 (spu_create_inferior, spu_attach): Set the new process'es tdesc.
3642 * win32-arm-low.c (tdesc_arm): Declare.
3643 (arm_arch_setup): New function.
3644 (the_low_target): Install arm_arch_setup instead of
3645 init_registers_arm.
3646 * win32-i386-low.c (tdesc_i386, tdesc_amd64): Declare.
3647 (init_windows_x86): Rename to ...
3648 (i386_arch_setup): ... this. Set `win32_tdesc'.
3649 (the_low_target): Adjust.
3650 * win32-low.c (win32_tdesc): New global.
3651 (child_add_thread): Don't create the thread cache here.
3652 (do_initial_child_stuff): Set the new process'es tdesc.
3653 * win32-low.h (struct target_desc): Forward declare.
3654 (win32_tdesc): Declare.
3655 * lynx-i386-low.c (tdesc_i386): Declare global.
3656 (lynx_i386_arch_setup): Set `lynx_tdesc'.
3657 * lynx-low.c (lynx_tdesc): New global.
3658 (lynx_add_process): Set the new process'es tdesc.
3659 * lynx-low.h (struct target_desc): Forward declare.
3660 (lynx_tdesc): Declare global.
3661 * lynx-ppc-low.c (tdesc_powerpc_32): Declare global.
3662 (lynx_ppc_arch_setup): Set `lynx_tdesc'.
3663 * nto-low.c (nto_tdesc): New global.
3664 (do_attach): Set the new process'es tdesc.
3665 * nto-low.h (struct target_desc): Forward declare.
3666 (nto_tdesc): Declare.
3667 * nto-x86-low.c (tdesc_i386): Declare.
3668 (nto_x86_arch_setup): Set `nto_tdesc'.
3669
b1fbec62
GB
36702013-06-04 Gary Benson <gbenson@redhat.com>
3671
3672 * server.c (handle_query): Add "augmented-libraries-svr4-read+"
3673 to qSupported response when appropriate.
3674 (handle_qxfer_libraries_svr4): Allow qXfer:libraries-svr4:read
3675 with nonzero-length annex.
3676 * linux-low.c (linux_qxfer_libraries_svr4): Parse and handle
3677 arguments supplied in annex.
3678
d1ec4ce7
DE
36792013-05-31 Doug Evans <dje@google.com>
3680
ac44adcb 3681 PR server/15594
d1ec4ce7
DE
3682 * linux-x86-low.c (ps_get_thread_area): Properly extend address to
3683 64 bits in 64-cross-32 environment.
3684
9b25f2d3
PA
36852013-05-28 Pedro Alves <palves@redhat.com>
3686
3687 * Makefile.in (clean): Remove reference to aarch64-without-fpu.c.
3688 (aarch64-without-fpu.c): Delete rule.
3689 * configure.srv (aarch64*-*-linux*): Remove references to
3690 aarch64-without-fpu.o and aarch64-without-fpu.xml.
3691 * linux-aarch64-low.c (init_registers_aarch64_without_fpu): Remove
3692 declaration.
3693
6740dc9c
PA
36942013-05-24 Pedro Alves <palves@redhat.com>
3695
3696 * server.c (handle_v_cont) <vCont;r>: Use unpack_varlen_hex
3697 instead of strchr/decode_address. Error if the range isn't split
3698 with a ','. Don't assume there's be a ':' in the action.
3699
c2d6af84
PA
37002013-05-23 Yao Qi <yao@codesourcery.com>
3701 Pedro Alves <palves@redhat.com>
3702
3703 * linux-low.c (lwp_in_step_range): New function.
3704 (linux_wait_1): If the thread was range stepping and stopped
3705 outside the stepping range, report the stop to GDB. Otherwise,
3706 continue stepping. Add range stepping debug output.
3707 (linux_set_resume_request): Copy the step range from the resume
3708 request to the lwp.
3709 (linux_supports_range_stepping): New.
3710 (linux_target_ops) <supports_range_stepping>: Set to
3711 linux_supports_range_stepping.
3712 * linux-low.h (struct linux_target_ops)
3713 <supports_range_stepping>: New field.
3714 (struct lwp_info) <step_range_start, step_range_end>: New fields.
3715 * linux-x86-low.c (x86_supports_range_stepping): New.
3716 (the_low_target) <supports_range_stepping>: Set to
3717 x86_supports_range_stepping.
3718 * server.c (handle_v_cont): Handle 'r' action.
3719 (handle_v_requests): Append ";r" if the target supports range
3720 stepping.
3721 * target.h (struct thread_resume) <step_range_start,
3722 step_range_end>: New fields.
3723 (struct target_ops) <supports_range_stepping>:
3724 New field.
3725 (target_supports_range_stepping): New macro.
3726
58794e1a
JB
37272013-05-17 Joel Brobecker <brobecker@adacore.com>
3728
3729 * lynx-low.c (lynx_resume): Fix null_ptid/minus_one_ptid
3730 confusion in comment.
3731
d631c5a7
JB
37322013-05-17 Joel Brobecker <brobecker@adacore.com>
3733
3734 * lynx-low.c (struct process_info_private): New type.
3735 (lynx_add_process): New function.
3736 (lynx_create_inferior, lynx_attach): Replace calls to
3737 add_process by calls to lynx_add_process.
3738 (lynx_resume): If PTID is null, then try using
3739 current_process()->private->last_wait_event_ptid.
3740 Add comments.
3741 (lynx_clear_inferiors): Delete. The contents of that function
3742 has been inlined in lynx_mourn;
3743 (lynx_wait_1): Save the ptid in the process's private data.
3744 (lynx_mourn): Free the process' private data. Replace call
3745 to lynx_clear_inferiors by call to clear_inferiors.
3746
96f7a20f
YQ
37472013-05-17 Yao Qi <yao@codesourcery.com>
3748
3749 * i386-low.c (i386_length_and_rw_bits): Move the comment to
3750 the right place.
3751
db0dfaa0
LM
37522013-05-16 Luis Machado <lgustavo@codesourcery.com>
3753
3754 * linux-low.c: Move definition checks upwards for PT_TEXT_ADDR,
3755 PT_DATA_ADDR and PT_TEXT_END_ADDR. Update comments.
3756 (linux_read_offsets): Remove PT_TEXT_ADDR, PT_DATA_ADDR and
3757 PT_TEXT_END_ADDR guards. Update comments.
3758 (linux_target_op) <read_offsets>: Conditionally define to
3759 linux_read_offsets if the target is UCLIBC and if it defines
3760 PT_TEXT_ADDR, PT_DATA_ADDR and PT_TEXT_END_ADDR.
3761
68f5f838
SL
37622013-05-06 Sandra Loosemore <sandra@codesourcery.com>
3763 Andrew Jenner <andrew@codesourcery.com>
3764
3765 * Makefile.in (SFILES): Add linux-nios2-low.c.
3766 (clean): Add action to delete nios2-linux.c.
3767 (nios2-linux.c): New rule.
3768 * configure.srv: Add nios2*-*-linux*.
3769 * linux-nios2-low.c: New.
3770
1ebff1fd
HAQ
37712013-05-03 Hafiz Abid Qadeer <abidh@codesourcery.com>
3772
3773 * tracepoint.c (cmd_qtinit): Call 'stop_tracing'.
3774
f6150862
HZ
37752013-04-25 Hui Zhu <hui@codesourcery.com>
3776
3777 PR gdb/15186
f6150862
HZ
3778 * ax.c (ax_printf): Add fflush.
3779
614c279d
TT
37802013-04-22 Tom Tromey <tromey@redhat.com>
3781
3782 * Makefile.in (SFILES): Add filestuff.c.
3783 (OBS): Add filestuff.o.
3784 (filestuff.o): New target.
3785 * config.in, configure: Rebuild.
3786 * configure.ac: Check for fdwalk, pipe2.
3787
7d4e5717
PA
37882013-04-17 Pedro Alves <palves@redhat.com>
3789
3790 * configure.ac (USE_THREAD_DB): Delete variable.
3791 (if test "$srv_linux_thread_db" = "yes"): AC_DEFINE USE_THREAD_DB.
3792 Don't AC_SUBST USE_THREAD_DB.
3793 * Makefile.in (INTERNAL_CFLAGS): Remove @USE_THREAD_DB@.
3794 * config.in, configure: Regenerate.
3795
d5c93e41
PA
37962013-04-16 Pedro Alves <palves@redhat.com>
3797
3798 * linux-low.h (struct lwp_info) <thread_known>: Move under
3799 the USE_THREAD_DB #ifdef.
3800
04f5fe89
PA
38012013-04-16 Pedro Alves <palves@redhat.com>
3802
3803 * Makefile.in (INTERNAL_CFLAGS): Add @USE_THREAD_DB@.
3804 (linux-low.o): Delete rule.
3805 * linux-low.h: Always include "gdb_thread_db.h" instead of
3806 conditionally including thread_db.h.
3807 (struct lwp_info) <th>: Guard with #ifdef USE_THREAD_DB instead of
3808 HAVE_THREAD_DB_H.
3809
480b27bf
JK
38102013-04-07 Jan Kratochvil <jan.kratochvil@redhat.com>
3811
3812 * Makefile.in (install-only): Fix make install regression.
3813
43662968
JK
38142013-04-05 Jan Kratochvil <jan.kratochvil@redhat.com>
3815
3816 Convert man pages to texinfo, new gdbinit.5 texinfo page.
3817 * Makefile.in (install-only): Remove $(man1dir) and gdbserver.1
3818 installation.
3819 * gdbserver.1: Remove.
3820
3e74e146
PA
38212013-03-22 Pedro Alves <palves@redhat.com>
3822
3823 * linux-low.c (handle_extended_wait): Don't call
3824 linux_enable_event_reporting.
3825
a8347a2a
TT
38262013-03-15 Tony Theodore <tonyt@logyst.com>
3827
3828 PR build/9098:
3829 * Makefile.in (SHELL): Use @SHELL@.
3830
eeb56fa7
SDJ
38312013-03-14 Sergio Durigan Junior <sergiodj@redhat.com>
3832
3833 * tracepoint.c (cmd_qtv): Initialize `val' with zero, silencing
3834 compiler warning.
3835
4fa7e2ff
JB
38362013-03-13 Joel Brobecker <brobecker@adacore.com>
3837
3838 * linux-low.c (linux_target_ops) [!HAVE_LINUX_BTRACE]:
3839 Remove extraneous NULL element.
3840
8ddb1965
YQ
38412013-03-13 Yao Qi <yao@codesourcery.com>
3842
3843 * tracepoint.c (traceframe_read_tsv): Look for the last matched
3844 'V' block in trace frame.
3845
9accd112
MM
38462013-03-11 Markus Metzger <markus.t.metzger@intel.com>
3847
3848 * target.h (struct target_ops): Add btrace ops.
3849 (target_supports_btrace): New macro.
3850 (target_enable_btrace): New macro.
3851 (target_disable_btrace): New macro.
3852 (target_read_btrace): New macro.
3853 * gdbthread.h (struct thread_info): Add btrace field.
3854 * server.c: Include btrace-common.h.
3855 (handle_btrace_general_set): New function.
3856 (handle_btrace_enable): New function.
3857 (handle_btrace_disable): New function.
3858 (handle_general_set): Call handle_btrace_general_set.
3859 (handle_qxfer_btrace): New function.
3860 (struct qxfer qxfer_packets[]): Add btrace entry.
3861 * inferiors.c (remove_thread): Disable btrace.
3862 * linux-low: Include linux-btrace.h.
3863 (linux_low_enable_btrace): New function.
3864 (linux_low_read_btrace): New function.
3865 (linux_target_ops): Add btrace ops.
3866 * configure.srv (i[34567]86-*-linux*): Add linux-btrace.o.
3867 Add srv_linux_btrace=yes.
3868 (x86_64-*-linux*): Add linux-btrace.o.
3869 Add srv_linux_btrace=yes.
3870 * configure.ac: Define HAVE_LINUX_BTRACE.
3871 * config.in: Regenerated.
3872 * configure: Regenerated.
3873
5cc22e4c
MM
38742013-03-11 Markus Metzger <markus.t.metzger@intel.com>
3875
3876 * server.c (handle_qxfer): Preserve error message if -3 is
3877 returned.
3878 (qxfer): Document the -3 return value.
3879
7c97f91e
MM
38802013-03-11 Markus Metzger <markus.t.metzger@intel.com>
3881
3882 * Makefile.in (SFILES): Add $(srcdir)/common/linux-btrace.c.
3883 (linux_btrace_h): New variable.
3884 (linux-btrace.o): New rule.
3885
be9a119c 38862013-03-08 Stan Shebs <stan@codesourcery.com>
f6f899bf
HAQ
3887 Hafiz Abid Qadeer <abidh@codesourcery.com>
3888
3889 * tracepoint.c (trace_buffer_size): New global.
3890 (DEFAULT_TRACE_BUFFER_SIZE): New define.
3891 (init_trace_buffer): Change to one-argument function. Allocate
3892 trace buffer memory.
3893 (handle_tracepoint_general_set): Call cmd_bigqtbuffer_size to
3894 handle QTBuffer:size packet.
3895 (cmd_bigqtbuffer_size): New function.
3896 (initialize_tracepoint): Call init_trace_buffer with
3897 DEFAULT_TRACE_BUFFER_SIZE.
3898 * server.c (handle_query): Add QTBuffer:size in the
3899 supported packets.
3900
e64f7499
YQ
39012013-03-07 Yao Qi <yao@codesourcery.com>
3902
3903 * tracepoint.c (cur_action, cur_step_action): Make them unsigned.
3904 (cmd_qtfp): Initialize cur_action and cur_step_action 0 instead
3905 of -1.
3906 (cmd_qtsp): Adjust condition. Do post increment.
3907 Set cur_action and cur_step_action back to 0.
3908
f0ae6fc3
PA
39092013-03-07 Jeremy Bennett <jeremy.bennett@embecosm.com>
3910
3911 PR server/15236
3912 * linux-low.c (linux_write_memory): Return early success if LEN is
3913 zero.
3914
b5b0b0af
CV
39152013-03-05 Corinna Vinschen <vinschen@redhat.de>
3916
334ad4a8 3917 * configure.srv: Add x86_64-*-cygwin* as target.
b5b0b0af 3918
589bc927
TT
39192013-02-28 Tom Tromey <tromey@redhat.com>
3920
3921 * configure.ac: Invoke AC_SYS_LARGEFILE.
3922 * configure, config.in: Rebuild.
3923
dfe07582
CV
39242013-02-28 Corinna Vinschen <vinschen@redhat.com>
3925
3926 * win32-low.c: Throughout, fix format strings and casts of
3927 printf-like functions to avoid type related warnings on all
3928 platforms.
3929 (get_child_debug_event): Print dwDebugEventCode as hex since
3930 that's how it's usually documented.
3931
736cd585
YQ
39322013-02-28 Yao Qi <yao@codesourcery.com>
3933
3934 * tracepoint.c (cmd_qtbuffer): Call phex_nz instead of
3935 pulongest.
3936
e1f58301
JW
39372013-02-27 Jiong Wang <jiwang@tilera.com>
3938
3939 * Makefile.in (clean): Remove reg-tilegx.c, reg-tilegx32.c.
3940 (reg-tilegx32.c): New rule.
3941 * configure.srv (tilegx-*-linux*): Add reg-tilegx32.o to srv_regobj.
3942 * linux-tile-low.c (tile_arch_setup): New function. Invoke
3943 different register info initializer according to elf class.
3944 (init_registers_tilgx32): New function. The tilegx32 register info
3945 initializer.
3946 (tile_fill_gregset): Use "uint_reg_t" to represent register size.
3947 (tile_store_gregset): Likewise.
3948
d171ca78
YQ
39492013-02-27 Yao Qi <yao@codesourcery.com>
3950
3951 * server.c (process_point_options): Print debug message when
3952 debug_threads is true.
3953
282bbdf3
YQ
39542013-02-26 Yao Qi <yao@codesourcery.com>
3955
3956 * tracepoint.c (cmd_qtbuffer): Don't set '\0' in OWN_BUF.
3957
aca22551
PA
39582013-02-19 Pedro Alves <palves@redhat.com>
3959 Kai Tietz <ktietz@redhat.com>
3960
3961 PR gdb/15161
3962
3963 * server.c (handle_query) <CRC check>: Use unpack_varlen_hex
3964 instead of strtoul to extract address from packet.
3965 (process_serial_event) <'z'>: Likewise.
3966
4f3cee1c
YQ
39672013-02-18 Yao Qi <yao@codesourcery.com>
3968
3969 * linux-bfin-low.c (the_low_target): Use NULL instead of 0.
3970
8e1d55a3
PA
39712013-02-14 Pedro Alves <palves@redhat.com>
3972
3973 Plug memory leak.
3974
3975 * tracepoint.c (cmd_qtnotes): Free TRACING_USER_NAME,
3976 TRACING_NOTES and TRACING_STOP_NOTE before clobbering.
3977
458820da
PA
39782013-02-14 Pedro Alves <palves@redhat.com>
3979
3980 * tracepoint.c (cmd_qtdpsrc): Use savestring.
3981
baea0dae
PA
39822013-02-14 Pedro Alves <palves@redhat.com>
3983
3984 * tracepoint.c (save_string): Delete.
3985 (add_tracepoint_action): Use savestring instead of save_string.
3986
0b1afbb3
PA
39872013-02-12 Pedro Alves <palves@redhat.com>
3988
3989 * linux-xtensa-low.c: Ditto.
3990 * xtensa-xtregs.c: Ditto.
3991
8a4ac37e
PA
39922013-02-12 Sanimir Agovic <sanimir.agovic@intel.com>
3993
3994 * thread-db.c (thread_db_get_tls_address): NULL pointer check
3995 thread_db.
3996
148de6bb
MS
39972013-02-07 Marcus Shawcroft <marcus.shawcroft@arm.com>
3998
3999 * linux-aarch64-low.c (aarch64_arch_setup): Clamp
4000 aarch64_num_wp_regs and aarch64_num_bp_regs to
4001 AARCH64_HWP_MAX_NUM and AARCH64_HBP_MAX_NUM respectively.
4002
55fac6e0
MS
40032013-02-07 Marcus Shawcroft <marcus.shawcroft@arm.com>
4004
4005 * linux-aarch64-low.c (ps_get_thread_area): Replace
4006 PTRACE_GET_THREAD_AREA with PTRACE_GETREGSET.
4007
176eb98c
MS
40082013-02-04 Jim MacArthur <jim.macarthur@arm.com>
4009 Marcus Shawcroft <marcus.shawcroft@arm.com>
4010 Nigel Stephens <nigel.stephens@arm.com>
4011 Yufeng Zhang <yufeng.zhang@arm.com>
4012
4013 * Makefile.in (clean): Remove aarch64.c and aarch64-without-fpu.c.
4014 (aarch64.c, aarch64-without-fpu.c): New targets.
4015 * configure.srv (aarch64*-*-linux*): New.
4016 * linux-aarch64-low.c: New file.
4017
56f7af9c
MS
40182013-02-04 Marcus Shawcroft <marcus.shawcroft@arm.com>
4019
43aaf8b6 4020 * linux-low.c (handle_extended_wait, linux_create_inferior)
56f7af9c
MS
4021 (linux_attach_lwp_1, linux_kill_one_lwp, linux_attach_one_lwp)
4022 (dequeue_one_deferred_signal, linux_resume_one_thread)
4023 (fetch_register, linux_write_memory, linux_enable_event_reporting)
4024 (linux_tracefork_grandchild, linux_test_for_tracefork)
4025 (linux_read_offsets, linux_xfer_siginfo, linux_xfer_siginfo): Add
4026 PTRACE_ARG3_TYPE and PTRACE_ARG4_TYPE cast to ptrace arguments
4027 where the argument is 0.
4028
60f662b0
YQ
40292013-01-25 Yao Qi <yao@codesourcery.com>
4030
4031 * event-loop.c: Include "queue.h".
4032 (gdb_event_p): New typedef.
4033 (struct gdb_event) <next_event>: Remove.
4034 (event_queue): Change to QUEUE(gdb_event_p).
4035 (async_queue_event): Remove.
4036 (gdb_event_xfree): New.
4037 (initialize_event_loop): New.
4038 (process_event): Use API from QUEUE.
4039 (wait_for_event): Likewise.
4040 * server.c (main): Call initialize_event_loop.
4041 * server.h (initialize_event_loop): Declare.
4042
5ae4861a
YQ
40432013-01-18 Yao Qi <yao@codesourcery.com>
4044
4045 * ax.h (struct eval_agent_expr_context): New.
4046 (gdb_eval_agent_expr): Update declaration.
4047 * ax.c (gdb_eval_agent_expr): Remove argument REGCACHE and
4048 TFRAME. Add new argument CTX.
4049 * server.h (struct eval_agent_expr_context): Declare.
4050 (agent_mem_read, agent_tsv_read): Update declaration.
4051 (agent_mem_read_string): Likewise.
4052 * tracepoint.c (eval_tracepoint_agent_expr): Remove.
4053 (add_traceframe_block): Add new argument TPOINT.
4054 Increase TPOINT->traceframe_usage.
4055 (do_action_at_tracepoint): Call gdb_eval_agent_expr instead of
4056 eval_tracepoint_agent_expr.
4057 (condition_true_at_tracepoint): Likewise.
4058 (agent_mem_read): Remove argument TFRAME. Add argument CTX.
4059 (agent_mem_read_string, agent_tsv_read): Likewise.
4060
85e00e85
YQ
40612013-01-16 Yao Qi <yao@codesourcery.com>
4062
4063 * linux-low.c (linux_resume_one_lwp): Don't check
4064 'lwp->bp_reinsert != 0'.
4065
4039cf45
JB
40662013-01-07 Joel Brobecker <brobecker@adacore.com>
4067 Pedro Alves <palves@redhat.com>
4068
4069 * lynx-low.c (ptrace_request_to_str): Define a temporary
4070 macro and use it to simplify this function's implementation.
4071
9044dee2
JB
40722013-01-07 Joel Brobecker <brobecker@adacore.com>
4073
4074 * lynx-low.c (lynx_resume): Call perror_with_name if lynx_ptrace
4075 sets errno.
4076
e6352c8f
JB
40772013-01-07 Joel Brobecker <brobecker@adacore.com>
4078
4079 * configure.srv (i[34567]86-*-lynxos*): Set srv_xmlfiles.
4080
50681a27
JB
40812013-01-07 Joel Brobecker <brobecker@adacore.com>
4082
4083 * configure.srv (powerpc-*-lynxos*): Set srv_xmlfiles.
4084
3f6e77ef
JB
40852013-01-07 Joel Brobecker <brobecker@adacore.com>
4086
4087 * lynx-low.c (lynx_resume): Use the resume_info parameter
4088 to determine the ptid for the lynx_ptrace call, unless
4089 it is equal to minus_one_ptid, in which case we use the
4090 ptid of the current_inferior.
4091 (lynx_wait_1): After having received a thread create/exit
4092 event, resume the inferior's execution using the signaling
4093 thread's ptid, rather than the old ptid.
4094
7fda33ae
JB
40952013-01-07 Joel Brobecker <brobecker@adacore.com>
4096
4097 * lynx-low.c (lynx_resume): Delete variable ret.
4098
b9786c74
JB
40992013-01-01 Joel Brobecker <brobecker@adacore.com>
4100
4101 * gdbreplay.c (gdbreplay_version): Update copyright year.
4102 * server.c (gdbserver_version): Likewise.
4103
8b93d60f
JB
41042012-12-17 Joel Brobecker <brobecker@adacore.com>
4105
4106 * lynx-low.c (lynx_wait_1): Add debug trace before adding
4107 new thread.
4108
037335a7
JB
41092012-12-17 Joel Brobecker <brobecker@adacore.com>
4110
4111 * lynx-low.c (ptrace_request_to_str): Add handling for
4112 PTRACE_GETTRACESIG.
4113
52d4cbd8
JB
41142012-12-17 Joel Brobecker <brobecker@adacore.com>
4115
4116 * lynx-low.c (lynx_attach): Delete variable new_process.
4117
ab8f6ca9
JB
41182012-12-17 Joel Brobecker <brobecker@adacore.com>
4119
4120 * lynx-low.c (lynx_create_inferior): Delete variable
4121 new_process.
4122
78cbc024
JB
41232012-12-17 Joel Brobecker <brobecker@adacore.com>
4124
4125 * lynx-low.c (ptrace_request_to_str): Do not handle
4126 PTRACE_GETTHREADLIST if this macro does not exist.
4127
14a00470
YQ
41282012-12-15 Yao Qi <yao@codesourcery.com>
4129
4130 * Makefile.in (OBS): Add notif.o.
4131 * notif.c, notif.h: New.
4132 * server.c: Include "notif.h".
4133 (struct vstop_notif) <next>: Remove.
4134 <base>: New field.
4135 (queue_stop_reply): Update.
4136 (push_event, send_next_stop_reply): Remove.
4137 (discard_queued_stop_replies): Update.
4138 (notif_stop): New variable.
4139 (handle_v_stopped): Remove.
4140 (handle_v_requests): Don't call handle_v_stopped. Call
4141 handle_ack_notif instead.
4142 (queue_stop_reply_callback): Call notif_event_enque instead
4143 of queue_stop_reply.
4144 (handle_status): Don't call send_next_stop_reply, call
4145 notif_write_event instead.
4146 (kill_inferior_callback): Likewise.
4147 (detach_or_kill_inferior_callback): Likewise.
4148 (main): Call initialize_notif.
4149 (process_serial_event): Call QUEUE_is_empty.
4150 (handle_target_event): Call notif_push instead of push event.
4151 * server.h (push_event): Remove declaration.
4152
61c125b9
TT
41532012-12-10 Tom Tromey <tromey@redhat.com>
4154
4155 * Makefile.in (DEPMODE, DEPDIR, depcomp, COMPILE.pre)
4156 (COMPILE.post, COMPILE, POSTCOMPILE, IPAGENT_COMPILE): New
4157 macros.
4158 (.c.o): Rewrite.
4159 (ax-ipa.o, tracepoint-ipa.o, utils-ipa.o, format-ipa.o)
4160 (common-utils-ipa.o, remote-utils-ipa.o, regcache-ipa.o)
4161 (i386-linux-ipa.o, linux-i386-ipa.o, linux-amd64-ipa.o)
4162 (amd64-linux-ipa.o, ax.o): Rewrite.
4163 (event-loop.o, hostio.o, hostio-errno.o, inferiors.o, mem-break.o)
4164 (proc-service.o, regcache.o, remote-utils.o, server.o, target.o)
4165 (thread-db.o, tracepoint.o, utils.o, gdbreplay.o, dll.o): Remove.
4166 (signals.o, linux-procfs.o, linux-ptrace.o, common-utils.o, vec.o)
4167 (gdb_vecs.o, xml-utils.o, linux-osdata.o, ptid.o, buffer.o)
4168 (format.o, agent.o, vasprintf.o, vsnprintf.o): Rewrite.
4169 (i386-low.o, i387-fp.o, linux-low.o, linux-arm-low.o)
4170 (linux-bfin-low.o, linux-cris-low.o, linux-crisv32-low.o)
4171 (linux-ia64-low.o, linux-m32r-low.o, linux-mips-low.o)
4172 (linux-ppc-low.o, linux-s390-low.o, linux-sh-low.o)
4173 (linux-tic6x-low.o, linux-x86-low.o, linux-xtensa-low.o)
4174 (linux-tile-low.o, lynx-low.o, lynx-ppc-low.o, nto-low.o)
4175 (nto-x86-low.o, linux-low.o, win32-low.o, win32-arm-low.o)
4176 (win32-i386-low.o, spu-low.o, reg-arm.o, arm-with-iwmmxt.o)
4177 (arm-with-vfpv2.o, arm-with-vfpv3.o, arm-with-neon.o, reg-bfin.o)
4178 (reg-cris.o, reg-crisv32.o, i386.o, i386-linux.o, i386-avx.o)
4179 (i386-avx-linux.o, i386-mmx.o, i386-mmx-linux.o, reg-ia64.o)
4180 (reg-m32r.o, reg-m68k.o, reg-cf.o, mips-linux.o, mips-dsp-linux.o)
4181 (mips64-linux.o, mips64-dsp-linux.o, powerpc-32.o, powerpc-32l.o)
4182 (powerpc-altivec32l.o, powerpc-cell32l.o, powerpc-vsx32l.o)
4183 (powerpc-isa205-32l.o, powerpc-isa205-altivec32l.o)
4184 (powerpc-isa205-vsx32l.o, powerpc-e500l.o, powerpc-64l.o)
4185 (powerpc-altivec64l.o, powerpc-cell64l.o, powerpc-vsx64l.o)
4186 (powerpc-isa205-64l.o, powerpc-isa205-altivec64l.o)
4187 (powerpc-isa205-vsx64l.o, s390-linux32.o, s390-linux32v1.o)
4188 (s390-linux32v2.o, s390-linux64.o, s390-linux64v1.o)
4189 (s390-linux64v2.o, s390x-linux64.o, s390x-linux64v1.o)
4190 (s390x-linux64v2.o, tic6x-c64xp-linux.o, tic6x-c64x-linux.o)
4191 (tic6x-c62x-linux.o, reg-sh.o, reg-sparc64.o, reg-spu.o, amd64.o)
4192 (amd64-linux.o, amd64-avx.o, amd64-avx-linux.o, x32.o)
4193 (x32-linux.o, x32-avx.o, x32-avx-linux.o, reg-xtensa.o)
4194 (reg-tilegx.o): Remove.
4195 (all_object_files): New macro.
4196 Include .deps files.
4197 * aclocal.m4, configure: Rebuild.
4198 * acinclude.m4: Include depstand.m4, lead-dot.m4.
4199 * configure.ac: Invoke ZW_CREATE_DEPDIR,
4200 ZW_PROG_COMPILER_DEPENDENCIES. Compute GMAKE condition.
4201
e90e9ad9
TT
42022012-12-05 Tom Tromey <tromey@redhat.com>
4203
4204 PR gdb/14917:
4205 * server.h (current_insn_ptr, emit_error): Declare 'extern'.
4206
02d403bf 42072012-11-28 Markus Metzger <markus.t.metzger@intel.com>
945bf713
MM
4208
4209 * configure.ac: Check for linux/perf_event.h.
4210 * config.in: Regenerated.
4211 * configure: Regenerated.
4212
0270a750
PA
42132012-11-26 Maxime Villard <rustyBSD@gmx.fr>
4214
4215 * hostio.c (handle_readlink): Decrease buffer size
4216 parameter passed to readlink by one byte.
4217
8c29b58e
YQ
42182012-11-26 Yao Qi <yao@codesourcery.com>
4219
4220 * configure.ac (build_warnings): Append '-Wempty-body'.
4221 * configure: Regenerated.
4222 * linux-low.c (linux_create_inferior): Use braces for empty 'if'
4223 body.
4224
8bdce1ff
PM
42252012-11-15 Pierre Muller <muller@sourceware.org>
4226
4227 * configure.ac (AC_CHECK_HEADERS): Add wait.h header.
4228 * config.in: Regenerate.
4229 * configure: Regenerate.
4230 * linux-low.c: Use "gdb_stat.h" header instead of <sys/stat.h> header.
4231 Use "gdb_wait.h" header instead of <sys/wait.h> header.
4232 * lynx-low.c: Use "gdb_wait.h" header instead of <sys/wait.h> header.
4233 * remote-utils.c: Use "gdb_stat.h" header instead of <sys/stat.h>
4234 header.
4235 * server.c: Remove HAVE_WAIT_H conditional. Use "gdb_wait.h" header
4236 instead of <sys/wait.h> header.
4237 * spu-low.c: Use "gdb_wait.h" header instead of <sys/wait.h> header.
4238
02d403bf 42392012-11-13 Markus Metzger <markus.t.metzger@intel.com>
3ba6ad0f
MM
4240
4241 * Makefile.in: (INTERNAL_CFLAGS): Add -DGDBSERVER
4242 (various make rules): Remove -DGDBSERVER
4243
fbd5db48
YQ
42442012-11-09 Yao Qi <yao@codesourcery.com>
4245
4246 * spu-low.c (current_ptid): Move it to ..
4247 * gdbthread.h: ... here. New.
4248 * remote-utils.c (read_ptid): Use macro 'current_ptid'.
4249 * server.c (myresume, process_serial_event): Likewise.
4250 * thread-db.c (thread_db_find_new_threads): Likewise.
4251 * tracepoint.c (run_inferior_command): Likewise.
4252
b3dc46ff
AB
42532012-10-01 Andrew Burgess <aburgess@broadcom.com>
4254
4255 * server.c (handle_search_memory_1): Include access length in
4256 warning message.
4257
07c04788
HPN
42582012-09-05 Michael Brandt <michael.brandt@axis.com>
4259
4260 * linux-crisv32-low.c: Fix compile errors.
4261
918d227b
YQ
42622012-09-04 Yao Qi <yao@codesourcery.com>
4263
4264 * tracepoint.c (cmd_qtsv): Adjust debug message.
4265 Don't check CUR_TPOINT.
4266
18c1b81a
YQ
42672012-08-28 Yao Qi <yao@codesourcery.com>
4268
4269 * ax.c, tracepoint.c: Replace ATTR_FORMAT with ATTRIBUTE_PRINTF.
4270 * server.h: Include 'libiberty.h' and 'ansidecl.h'.
4271 (ATTR_NORETURN, ATTR_FORMAT, ATTR_MALLOC): Remove.
4272 Remove declarations of xmalloc, xreallloc, xstrdup and
4273 freeargv.
4274 * Makefile.in (libiberty_h): New.
4275 (server_h): Append dependencies 'libiberty.h' and 'ansidecl.h'.
4276 (linux-bfin-low.o): Append dependency 'libiberty.h'.
4277
dc82f37b
YQ
42782012-08-23 Yao Qi <yao@codesourcery.com>
4279
4280 * server.h: Remove declaration of 'xsnprintf'.
4281
406b1477
KS
42822012-08-22 Keith Seitz <keiths@redhat.com>
4283
4284 * server.h: Include build-gnulib-gbserver/config.h.
4285 * gdbreplay.c: Likewise.
4286
e6712ff1
DE
42872012-08-08 Doug Evans <dje@google.com>
4288
4289 * Makefile.in (SFILES): Add gdb_vecs.c.
4290 (OBS): Add gdb_vecs.o.
4291 (gdb_vecs_h, host_defs_h): New variables.
4292 (thread-db.o): Add $(gdb_vecs_h) dependency.
4293 (gdb_vecs.o): New rule.
4294 * thread-db.c: #include "gdb_vecs.h".
4295 (thread_db_load_search): Use a vector to iterate over path elements.
4296 Handle text appearing after "$pdir".
4297
4298 * configure.ac: Add check for strstr.
4299 * config.in: Regenerate.
4300 * configure: Regenerate.
4301
7c3270ae
UW
43022012-08-02 Ulrich Weigand <ulrich.weigand@linaro.org>
4303
4304 * hostio.c (handle_pread): If pread fails, fall back to attempting
4305 lseek/read.
4306 (handle_pwrite): Likewise for pwrite.
4307
b62e2b27
UW
43082012-08-01 Ulrich Weigand <ulrich.weigand@linaro.org>
4309
4310 * linux-arm-low.c (arm_linux_hw_point_initialize): Distinguish
4311 between unsupported TYPE and unimplementable ADDR/LEN combination.
4312 (arm_insert_point): Act on new return value.
4313
78a99e91
PA
43142012-07-31 Pedro Alves <palves@redhat.com>
4315
4316 * server.c (process_point_options): Only skip tokens if we find
4317 one that is unrecognized. Don't treat 'X' specially while
4318 skipping unrecognized tokens.
4319
fcf303ab
UW
43202012-07-30 Ulrich Weigand <ulrich.weigand@linaro.org>
4321
4322 * linux-arm-low.c (arm_linux_hw_point_initialize): Do not attempt
4323 to 4-byte-align HW breakpoint addresses for Thumb.
4324
7255706c
YQ
43252012-07-27 Yao Qi <yao@codesourcery.com>
4326
4327 PR remote/14161.
4328
4329 * server.h: Declare gdb_agent_about_to_close.
4330 * target.c (kill_inferior): Include "agent.h".
4331 New. Send command 'kill'.
4332 * target.h (kill_inferior): Removed macro.
4333 * tracepoint.c (gdb_agent_about_to_close): New.
4334 (gdb_agent_helper_thread): Handle command 'close'.
4335 Wait endlessly until the inferior stops.
4336 Install gdb_agent_remove_socket to atexit hook.
4337 (agent_socket_name): New static variable.
4338 (gdb_agent_socket_init): Replace local variable 'name' with
4339 'agent_socket_name'.
4340 (gdb_agent_remove_socket): New.
4341
5a3f286f
YQ
43422012-07-27 Yao Qi <yao@codesourcery.com>
4343
4344 * server.c (process_point_options): Stop at 'X' when parsing.
4345
961bd387
ME
43462012-07-19 Michael Eager <eager@eagercon.com>
4347
a261b8f5 4348 * i386-low.c (Z_packet_to_hw_type): Add Z_PACKET_HW_BP, translate
961bd387
ME
4349 to hw_execute.
4350 * linux-x86-low.c (x86_insert_point, x86_remove_point):
4351 Call i386_low_insert_watchpoint, i386_low_remove_watchpoint to add/del
4352 hardware breakpoint.
4353
aa7c7447
JK
43542012-07-07 Jan Kratochvil <jan.kratochvil@redhat.com>
4355
4356 * gdbserver/linux-low.c (initialize_low): Call
4357 linux_ptrace_init_warnings.
4358
7f216e7c
DE
43592012-07-02 Doug Evans <dje@google.com>
4360
4361 * mem-break.c (gdb_no_commands_at_breakpoint): Fix cast from
4362 pointer to int.
4363
d3ce09f5
SS
43642012-07-02 Stan Shebs <stan@codesourcery.com>
4365
4366 * Makefile.in (WARN_CFLAGS_NO_FORMAT): Define.
4367 (ax.o): Add it to build rule.
4368 (ax-ipa.o): Ditto.
4369 (OBS): Add format.o.
4370 (IPA_OBS): Add format.o.
4371 * server.c (handle_query): Claim support for breakpoint commands.
4372 (process_point_options): Add command case.
4373 (process_serial_event): Leave running if there are printfs in
4374 effect.
4375 * mem-break.h (any_persistent_commands): Declare.
4376 (add_breakpoint_commands): Declare.
4377 (gdb_no_commands_at_breakpoint): Declare.
4378 (run_breakpoint_commands): Declare.
4379 * mem-break.c (struct point_command_list): New struct.
4380 (struct breakpoint): New field command_list.
4381 (any_persistent_commands): New function.
4382 (add_commands_to_breakpoint): New function.
4383 (add_breakpoint_commands): New function.
4384 (gdb_no_commands_at_breakpoint): New function.
4385 (run_breakpoint_commands): New function.
4386 * linux-low.c (linux_wait_1): Test for and run breakpoint commands
4387 locally.
4388 * ax.c: Include format.h.
4389 (ax_printf): New function.
4390 (gdb_eval_agent_expr): Add printf opcode.
4391
2f8f6aed
YQ
43922012-06-13 Yao Qi <yao@codesourcery.com>
4393
4394 * server.c (start_inferior): Remove duplicated writes to fields
4395 'last_resume_kind' and 'last_status' of 'current_inferior'.
4396
0c9070b3
YQ
43972012-06-12 Yao Qi <yao@codesourcery.com>
4398 Pedro Alves <palves@redhat.com>
4399
4400 * linux-low.c (linux_set_resume_request): Simplify predicate. Add
4401 comment.
4402 * server.c (handle_v_cont): Extend comment.
4403
c52daf70
YQ
44042012-06-11 Yao Qi <yao@codesourcery.com>
4405
4406 * linux-low.c (linux_attach): Add 'static'.
4407
d38bbb0a
YQ
44082012-06-06 Yao Qi <yao@codesourcery.com>
4409
4410 * ax.c (gdb_eval_agent_expr): Print `top' in hex.
4411
89dc0afd
JK
44122012-06-01 Jan Kratochvil <jan.kratochvil@redhat.com>
4413
4414 Fix gcc -flto compilation warning.
4415 * server.c (main): Make variable multi_mode and attach volatile.
4416
75f62ce7
TJB
44172012-05-30 Thiago Jung Bauermann <thiago.bauermann@linaro.org>
4418
4419 * linux-low.c (get_r_debug): Disable code using DT_MIPS_RLD_MAP
4420 if the platform doesn't know about it.
4421
65f479b6
PA
44222012-05-30 Jeff Kenton <jkenton@tilera.com>
4423
4424 * Makefile.in (SFILES): Add linux-tile-low.c.
4425 (linux-tile-low.o, reg-tilegx.o, reg-tilegx.c): New rules.
4426 * configure.srv: Handle tilegx-*-linux*.
4427 * linux-tile-low.c: New file.
4428
0c5bf5a9
JK
44292012-05-28 Jan Kratochvil <jan.kratochvil@redhat.com>
4430
4431 * linux-low.c (linux_qxfer_libraries_svr4): Return -1 if R_DEBUG is -1.
4432
a493e3e2
PA
44332012-05-24 Pedro Alves <palves@redhat.com>
4434
4435 PR gdb/7205
4436
43aaf8b6 4437 Replace TARGET_SIGNAL_ with GDB_SIGNAL_ throughout.
a493e3e2 4438
2ea28649
PA
44392012-05-24 Pedro Alves <palves@redhat.com>
4440
4441 PR gdb/7205
4442
4443 Replace target_signal with gdb_signal throughout.
4444
8d409d16
MR
44452012-05-22 Maciej W. Rozycki <macro@codesourcery.com>
4446
4447 * linux-low.c (linux_store_registers): Avoid the copying sequence
4448 when no data has been retrieved by ptrace.
4449
23512c01
MGD
44502012-05-22 Will Deacon <will.deacon@arm.com>
4451
4452 * linux-low (__UCLIBC__ && !(__UCLIBC_HAS_MMU__ || __ARCH_HAS_MMU__)):
4453 Include asm/ptrace.h.
4454 (PT_TEXT_ADDR, PT_DATA_ADDR, PT_TEXT_END_ADDR): Define only if not
4455 already defined.
4456
4934b29e
MR
44572012-05-21 Maciej W. Rozycki <macro@codesourcery.com>
4458
4459 * linux-low.c (linux_store_registers): Don't re-retrieve data
4460 with ptrace that has already been obtained from /proc. Always
4461 copy any data retrieved with ptrace to the buffer supplied.
4462
bde24c0a
PA
44632012-05-11 Yao Qi <yao@codesourcery.com>
4464 Pedro Alves <palves@redhat.com>
4465
4466 * linux-low.c (enum stopping_threads_kind): New.
4467 (stopping_threads): Change type to `enum stopping_threads_kind'.
4468 (handle_extended_wait): If stopping and suspending threads, leave
4469 the new_lwp suspended too.
4470 (linux_wait_for_event): Adjust.
4471 (stop_all_lwps): Set `stopping_threads' to
4472 STOPPING_AND_SUSPENDING_THREADS or STOPPING_THREADS depending on
4473 whether we're suspending threads or just stopping them. Assert no
4474 recursion happens.
4475
623b6bdf
YQ
44762012-04-29 Yao Qi <yao@codesourcery.com>
4477
4478 * server.h: Move some code to ...
4479 * gdbthread.h: ... here. New.
4480 * Makefile.in (inferiors.o, regcache.o): Depends on gdbthread.h
4481 (remote-utils.o, server.o, target.o tracepoint.o): Likewise.
4482 (nto-low.o, win32-low.o): Likewise.
4483 * inferiors.c, linux-low.h, nto-low.c: Include gdbthread.h.
4484 * regcache.c, remote-utils.c, server.c: Likewise.
4485 * target.c, tracepoint.c, win32-low.c: Likewise.
4486
f15f9948
TJB
44872012-04-24 Thiago Jung Bauermann <thiago.bauermann@linaro.org>
4488
4489 * linux-low.h (PTRACE_ARG3_TYPE): Move macro from linux-low.c.
4490 (PTRACE_ARG4_TYPE): Likewise.
4491 (PTRACE_XFER_TYPE): Likewise.
4492 * linux-arm-low.c (arm_prepare_to_resume): Cast third argument of
4493 ptrace to PTRACE_ARG3_TYPE.
4494 * linux-low.c (PTRACE_ARG3_TYPE): Move macro to linux-low.h.
4495 (PTRACE_ARG4_TYPE): Likewise.
4496 (PTRACE_XFER_TYPE): Likewise.
4497 (linux_detach_one_lwp): Cast fourth argument of
4498 ptrace to long then PTRACE_ARG4_TYPE.
4499 (regsets_fetch_inferior_registers): Cast third argument of
4500 ptrace to long then PTRACE_ARG3_TYPE.
4501 (regsets_store_inferior_registers): Likewise.
4502
38ea300a
PA
45032012-04-20 Pedro Alves <palves@redhat.com>
4504
4505 * configure: Regenerate.
4506
c971b7fa
PA
45072012-04-19 Pedro Alves <palves@redhat.com>
4508
43aaf8b6 4509 * Makefile.in (GNULIB_BUILDDIR): New.
c971b7fa 4510 (LIBGNU, INCGNU, GNULIB_H): Adjust.
43aaf8b6
PA
4511 (SUBDIRS, CLEANDIRS, REQUIRED_SUBDIRS): New.
4512 (all, install-only, uninstall, clean-info, all-lib, clean): No
4513 longer pass GNULIB_FLAGS_TO_PASS. Use subdir_do.
4514 (maintainer-clean realclean distclean): Use subdir_do.
4515 (subdir_do): New.
4516 (gnulib/import/Makefile): Adjust. Replace gnulib/import with
c971b7fa 4517 $(GNULIB_BUILDDIR). Don't pass argument to config.status.
43aaf8b6
PA
4518 * acinclude.m4: Include acx_configure_dir.m4.
4519 * configure.ac: Remove gl_EARLY, gl_INIT, and AM_INIT_AUTOMAKE
4520 calls. Call AC_PROG_RANLIB. Configure gnulib using
4521 ACX_CONFIGURE_DIR.
4522 (GNULIB): New.
4523 (GNULIB_STDINT_H): Adjust.
4524 (AC_OUTPUT): Don't output gnulib/Makefile anymore.
4525 * gdbreplay.c: Include build-gnulib/config.h.
4526 * server.h: Likewise.
4527 * aclocal.m4: Regenerate.
4528 * config.in: Regenerate.
4529 * configure: Regenerate.
c971b7fa 4530
809277f8
PA
45312012-04-19 Pedro Alves <palves@redhat.com>
4532
4533 * Makefile.in (LIBGNU, INCGNU): Adjust.
4534 (GNULIB_FLAGS_TO_PASS, GNULIB_H): Adjust.
4535 (all, install-only, uninstall, clean-info, all-lib, clean)
4536 (maintainer-clean, Makefile, gnulib/Makefile): Adjust.
4537 * configure.ac: Adjust AC_OUTPUT output.
4538 * aclocal.m4: Regenerate.
4539 * configure: Regenerate.
4540
fd9bb8b8
PA
45412012-04-19 Pedro Alves <palves@redhat.com>
4542
4543 * Makefile.in (generated_files): New.
4544 (server_h): Remove the explicit dependency on config.h, and depend
4545 on $generated_files.
4546
1c298c66
PA
45472012-04-19 Pedro Alves <palves@redhat.com>
4548
4549 * Makefile.in (INCGNU): Add -Ignulib.
4550
57c4b50b
PA
45512012-04-19 Pedro Alves <palves@redhat.com>
4552
4553 * Makefile.in (GNULIB_INCLUDE_DIR): Rename to ...
4554 (INCGNU): ... this, and spell out -I here.
4555 (GNULIB_LIB): Rename to ...
4556 (LIBGNU): ... this.
4557 (INCLUDE_CFLAGS, gdbserver$(EXEEXT), $(GNULIB_LIB) rule): Adjust.
4558
1030e047
PA
45592012-04-19 Pedro Alves <palves@redhat.com>
4560
4561 * config.in: Regenerate.
4562
447d4319
PA
45632012-04-19 Pedro Alves <palves@redhat.com>
4564
4565 * configure.ac: Remove AC_CHECK_DECLS check for memmem.
4566 * server.h (memmem): Remove declaration.
4567 * config.in: Regenerate.
4568 * configure: Regenerate.
4569
aad9eab9
YQ
45702012-04-19 Yao Qi <yao@codesourcery.com>
4571
4572 * Makefile.in (SFILES): Add common/vec.c.
4573 (OBS): Add vec.o.
4574 (vec.o): New rule.
4575
3e10640f
YQ
45762012-04-19 Yao Qi <yao@codesourcery.com>
4577
4578 * remote-utils.c (prepare_resume_reply): Replace with macro
4579 target_core_of_thread.
4580 * server.c (handle_qxfer_threads_proper): Likewise.
4581 * target.h (traget_core_of_thread): New macro.
4582
71622373
PA
45832012-04-18 Pedro Alves <palves@redhat.com>
4584
4585 * aclocal.m4: Regenerate.
4586 * configure: Regenerate.
4587
80d26939
YQ
45882012-04-16 Yao Qi <yao@codesourcery.com>
4589
4590 * tracepoint.c (cmd_qtstart): Download tracepoints even when they are
4591 duplicated on address.
4592
42476b70
YQ
45932012-04-16 Yao Qi <yao@codesourcery.com>
4594
4595 * tracepoint.c (COPY_FIELD_TO_BUF): New macro.
4596 (struct tracepoint_action_ops) <send>: New field.
4597 (m_tracepoint_action_send, r_tracepoint_action_send): New.
4598 (agent_expr_send, x_tracepoint_action_send): New.
4599 (l_tracepoint_action_send): New.
4600 (cmd_qtdp): Download and install tracepoint
4601 according to `use_agent'.
4602 (run_inferior_command): Add one more parameter `len'.
4603 Update callers.
4604 (tracepoint_send_agent): New.
4605 (cmd_qtdp, cmd_qtstart): Call tracepoint_send_agent.
4606
7bc83639
YQ
46072012-04-16 Yao Qi <yao@codesourcery.com>
4608
4609 * tracepoint.c (download_tracepoints): Moved to ...
4610 (cmd_qtstart): ... here.
4611
5f18041e
YQ
46122012-04-14 Yao Qi <yao@codesourcery.com>
4613
4614 * tracepoint.c: Include inttypes.h.
4615 (struct collect_memory_action): Use sized types.
4616 (struct tracepoint): Likewise.
4617 (cmd_qtdp, stop_tracing): Update print specifiers.
4618 (cmd_qtp, response_tracepoint): Likewise.
4619 (collect_data_at_tracepoint): Likewise.
4620 (collect_data_at_step): Likewise.
4621
55a8c076
YQ
46222012-04-14 Yao Qi <yao@codesourcery.com>
4623
4624 Import gnulib module inttypes.
4625 * aclocal.m4, config.in, configure: Regenerated.
4626
dc750257
YQ
46272012-04-14 Yao Qi <yao@codesourcery.com>
4628
4629 * Makefile.in (maintainer-clean, realclean, distclean): Remove
4630 Makefile and config.status at last.
4631
0ab5faf9
YQ
46322012-04-13 Yao Qi <yao@codesourcery.com>
4633
4634 * tracepoint.c: Include stdint.h unconditionally.
4635
18f5fd81
TJB
46362012-04-13 Thiago Jung Bauermann <thiago.bauermann@linaro.org>
4637
4638 * acinclude.m4 (GDBSERVER_HAVE_THREAD_DB_TYPE): New macro based
4639 on BFD_HAVE_SYS_PROCFS_TYPE.
4640 * configure.ac: Look for lwpid_t and psaddr_t in libthread_db.h.
4641 * configure: Regenerate.
4642 * config.in: Likewise.
4643
4d47af5c
L
46442012-04-13 H.J. Lu <hongjiu.lu@intel.com>
4645
4646 * Makefile.in (clean): Also remove x32.c x32-linux.c
4647 x32-avx.c x32-avx-linux.c.
4648 (x32.o): New target.
4649 (x32.c): Likewise.
4650 (x32-linux.o): Likewise.
4651 (x32-linux.c): Likewise.
4652 (x32-avx.o): Likewise.
4653 (x32-avx.c): Likewise.
4654 (x32-avx-linux.o): Likewise.
4655 (x32-avx-linux.c): Likewise.
4656
4657 * configure.srv (srv_amd64_regobj): Add x32.o x32-avx.o.
4658 (srv_amd64_linux_regobj): Add x32-linux.o x32-avx-linux.o.
4659 (srv_i386_64bit_xmlfiles): Add i386/x32-core.xml.
4660 (srv_amd64_xmlfiles): Add i386/x32.xml i386/x32-avx.xml.
4661 (srv_amd64_linux_xmlfiles): Add i386/x32-linux.xml
4662 i386/x32-avx-linux.xml.
4663
4664 * linux-x86-low.c (init_registers_x32_linux): New prototype.
4665 (init_registers_x32_avx_linux): Likwise.
4666 (x86_linux_update_xmltarget): Call init_registers_x32_linux
4667 or init_registers_x32_avx_linux if linux_is_elf64 is false.
4668
ecedbe58
PA
46692012-04-13 Pedro Alves <palves@redhat.com>
4670
4671 * Makefile.in (GNULIB_FLAGS_TO_PASS): New.
4672 (FLAGS_TO_PASS): Don't change or set $top_srcdir, $srcdir and VPATH.
4673 (all, uninstall, clean-info, all-lib, clean, maintainer-clean)
4674 (realclean, distclean): Explicitly pass $GNULIB_FLAGS_TO_PASS to
4675 the sub-make.
4676
c92b5177
L
46772012-04-12 H.J. Lu <hongjiu.lu@intel.com>
4678
4679 * linux-x86-low.c (compat_x32_clock_t): New.
4680 (compat_x32_siginfo_t): Likewise.
4681 (compat_x32_siginfo_from_siginfo): Likewise.
4682 (siginfo_from_compat_x32_siginfo): Likewise.
4683 (linux_is_elf64): Likewise.
4684 (x86_siginfo_fixup): Call compat_x32_siginfo_from_siginfo
4685 and siginfo_from_compat_x32_siginfo for x32.
4686 (x86_arch_setup): Set linux_is_elf64.
4687
214d508e
L
46882012-04-12 H.J. Lu <hongjiu.lu@intel.com>
4689
4690 PR gdb/13969
4691 * linux-low.c (linux_pid_exe_is_elf_64_file): Also return the
4692 e_machine field.
4693 (linux_qxfer_libraries_svr4): Update call to elf_64_file_p.
4694 * linux-low.h (linux_pid_exe_is_elf_64_file): Updated.
4695 * linux-x86-low.c (x86_arch_setup): Check if GDBserver is
4696 compatible with process.
4697
c9a1864a
YQ
46982012-04-12 Yao Qi <yao@codesourcery.com>
4699
4700 * Makefile.in: Define abs_top_srcdir and abs_srcdir.
4701 (INCLUDE_CFLAGS): Append GNULIB_INCLUDE_DIR.
4702 (install-only, install-info, clean): Handle sub dir gnulib.
4703 (all-lib, am--refresh): New targets.
4704 (memmem.o): Remove target.
4705 * configure.ac: Remove AC_CONFIG_LIBOBJ_DIR.
4706 Invoke gl_EARLY. Invoke AC_CHECK_PROGS for make.
4707 (AC_REPLACE_FUNCS): Remove memmem.
4708 Invoke gl_INIT and AM_INIT_AUTOMAKE.
4709 (AC_OUTPUT): Generate Makefile in gnulib/.
4710 * aclocal.m4, config.in, configure: Regenerated.
4711
367ba2c2
MR
47122012-04-10 Maciej W. Rozycki <macro@codesourcery.com>
4713
4714 * linux-low.c (get_r_debug): Handle DT_MIPS_RLD_MAP.
4715
9d236627
PA
47162012-04-05 Pedro Alves <palves@redhat.com>
4717
4718 -Werror=strict-aliasing
4719
4720 * spu-low.c (parse_spufs_run): Avoid dereferencing type-punned
4721 pointer.
4722
111217b3
PA
47232012-04-04 Pedro Alves <palves@redhat.com>
4724
4725 * linux-sparc-low.c (sparc_fill_gregset_to_stack)
4726 (sparc_store_gregset_from_stack, sparc_store_gregset)
4727 (sparc_breakpoint_at): Fix formatting.
4728
8365dcf5
TJB
47292012-03-30 Thiago Jung Bauermann <thiago.bauermann@linaro.org>
4730
4731 * configure.ac: Check whether Elf32_auxv_t and Elf64_auxv_t
4732 are available.
4733 * linux-low.c [HAVE_ELF32_AUXV_T] (Elf32_auxv_t): Add typedef.
4734 [HAVE_ELF64_AUXV_T] (Elf64_auxv_t): Likewise.
4735 * config.in: Regenerate.
4736 * configure: Likewise.
4737
689cc2ae
PA
47382012-03-29 Pedro Alves <palves@redhat.com>
4739
4740 * linux-low.c (regsets_store_inferior_registers) [__sparc__]:
4741 Correct ptrace arguments.
4742
c14dfd32
PA
47432012-03-28 Pedro Alves <palves@redhat.com>
4744
4745 * linux-ia64-low.c (ia64_regmap): Map IA64_EC_REGNUM to PT_AR_EC.
4746 (IA64_GR0_REGNUM, IA64_FR0_REGNUM)
4747 (IA64_FR1_REGNUM): New defines.
4748 (ia64_fetch_register): New.
4749 (the_low_target): Install it.
4750 * linux-low.h (struct linux_target_ops) <fetch_register>: New
4751 field.
4752 * linux-low.c (linux_fetch_registers): Try the
4753 the_low_target.fetch_register hook first.
4754
4755 * linux-arm-low.c (the_low_target): Adjust.
4756 * linux-bfin-low.c (the_low_target): Adjust.
4757 * linux-cris-low.c (the_low_target): Adjust.
4758 * linux-crisv32-low.c (the_low_target): Adjust.
4759 * linux-m32r-low.c (the_low_target): Adjust.
4760 * linux-m68k-low.c (the_low_target): Adjust.
4761 * linux-mips-low.c (the_low_target): Adjust.
4762 * linux-ppc-low.c (the_low_target): Adjust.
4763 * linux-s390-low.c (the_low_target): Adjust.
4764 * linux-sh-low.c (the_low_target): Adjust.
4765 * linux-sparc-low.c (the_low_target): Adjust.
4766 * linux-tic6x-low.c (the_low_target): Adjust.
4767 * linux-x86-low.c (the_low_target): Adjust.
4768 * linux-xtensa-low.c (the_low_target): Adjust.
4769
63c88e13
PA
47702012-03-26 Pedro Alves <palves@redhat.com>
4771
4772 * server.c (handle_qxfer_libraries): Don't bail early if
4773 the_target->qxfer_libraries_svr4 is not NULL.
4774
fb723180
PA
47752012-03-26 Pedro Alves <palves@redhat.com>
4776
4777 * linux-low.c (linux_qxfer_libraries_svr4): Fix pasto in comment.
4778
0afae3cf
PA
47792012-03-23 Pedro Alves <palves@redhat.com>
4780
4781 * linux-low.c (linux_qxfer_libraries_svr4): Terminate the
4782 "library-list-svr4" element's start tag when the the DSO list is
4783 empty.
4784
485f1ee4
PA
47852012-03-23 Pedro Alves <palves@redhat.com>
4786
4787 * linux-low.c (read_one_ptr): Read the inferior's pointer through
4788 a variable whose type size is the same as the inferior's pointer
4789 size.
4790
a5362b9a
TS
47912012-03-21 Thomas Schwinge <thomas@codesourcery.com>
4792
4793 * linux-arm-low.c (arm_stopped_by_watchpoint): Use siginfo_t instead of
4794 struct siginfo.
4795 * linux-low.c (siginfo_fixup, linux_xfer_siginfo): Likewise.
4796 * linux-x86-low.c (x86_siginfo_fixup): Likewise.
4797 * linux-low.h: Include <signal.h>.
4798 (struct siginfo): Remove forward declaration.
4799 (struct linux_target_ops) <siginfo_fixup>: Use siginfo_t instead of
4800 struct siginfo.
4801
d226c142
MF
48022012-03-21 Mike Frysinger <vapier@gentoo.org>
4803
4804 * .gitignore: Ignore more files.
4805
122f36ef
PA
48062012-03-19 Pedro Alves <palves@redhat.com>
4807 Jan Kratochvil <jan.kratochvil@redhat.com>
4808
4809 * server.c (cont_thread, general_thread): Add describing comments.
4810 (start_inferior): Clear `cont_thread'.
4811 (handle_v_cont): Don't set `cont_thread' if resuming all threads
4812 of a process.
4813
fc3e5175
YQ
48142012-03-15 Yao Qi <yao@codesourcery.com>
4815
4816 * tracepoint.c (install_tracepoint): Move duplicated tracepoint
4817 handling to ...
4818 (cmd_qtdp): ... here.
4819
8d0d92cd
YQ
48202012-03-15 Yao Qi <yao@codesourcery.com>
4821
4822 * tracepoint.c (struct tracepoint_action_ops): New.
4823 (struct tracepoint_action) [!IN_PROCESS_AGENT] <ops>: New field.
4824 (m_tracepoint_action_download): New.
4825 (r_tracepoint_action_download): New.
4826 (x_tracepoint_action_download): New.
4827 (l_tracepoint_action_download): New.
4828 (add_tracepoint_action): Install `action->ops' according type.
4829 (download_tracepoint_1): Move code `download' function pointer
4830 of various tracepoint_action_ops.
4831
87b0bb13
JK
48322012-03-13 Jan Kratochvil <jan.kratochvil@redhat.com>
4833
4834 * linux-low.c (linux_attach_lwp_1): New variable buffer. Call
4835 linux_ptrace_attach_warnings.
4836
5f572dec
JK
48372012-03-13 Jan Kratochvil <jan.kratochvil@redhat.com>
4838
4839 * Makefile.in (linux-ptrace.o): New.
4840 * configure.srv (arm*-*-linux*, bfin-*-*linux*, crisv32-*-linux*)
4841 (cris-*-linux*, i[34567]86-*-linux*, ia64-*-linux*, m32r*-*-linux*)
4842 (m68*-*-linux*, m68*-*-uclinux*, mips*-*-linux*, powerpc*-*-linux*)
4843 (s390*-*-linux*, sh*-*-linux*, sparc*-*-linux*, tic6x-*-uclinux)
4844 (x86_64-*-linux*, xtensa*-*-linux*): Add linux-ptrace.o to SRV_TGTOBJ
4845 of these targets.
4846 * linux-low.c (linux_attach_lwp_1): Remove redundent else clause.
4847
f4647387
YQ
48482012-03-08 Yao Qi <yao@codesourcery.com>
4849 Pedro Alves <palves@redhat.com>
4850
4851 Fix PR server/13392.
4852 * linux-x86-low.c (amd64_install_fast_tracepoint_jump_pad): Check
4853 offset of JMP insn.
4854 * tracepoint.c (remove_tracepoint): New.
4855 (cmd_qtdp): Call remove_tracepoint when failed to install.
4856
9b224c5e
PA
48572012-03-07 Pedro Alves <palves@redhat.com>
4858
4859 * linux-low.c (get_detach_signal): New.
4860 (linux_detach_one_lwp): Get rid of a pending SIGSTOP with SIGCONT.
4861 Pass on pending signals to PTRACE_DETACH. Check the result of the
4862 ptrace call.
4863 * server.c (program_signals, program_signals_p): New.
4864 (handle_general_set): Handle QProgramSignals.
4865 * server.h (program_signals, program_signals_p): Declare.
4866
e237a7e2
JK
48672012-03-05 Pedro Alves <palves@redhat.com>
4868 Jan Kratochvil <jan.kratochvil@redhat.com>
4869
4870 * linux-low.c (get_dynamic): Don't warn when PT_PHDR isn't found.
4871 New comment why.
4872
5808517f
YQ
48732012-03-03 Yao Qi <yao@codesourcery.com>
4874
4875 * tracepoint.c (tracepoint_look_up_symbols): Update call to
4876 agent_look_up_symbols.
4877
58b4daa5
YQ
48782012-03-03 Yao Qi <yao@codesourcery.com>
4879
4880 * Makefile.in (linux-low.o): Keep dependence on agent.h.
4881 (linux-x86-low.o): Likewise.
4882 * server.h: Remove in_process_agent_loaded.
4883 * tracepoint.c (in_process_agent_loaded): Removed. Moved it
4884 common/agent.c.
4885 Update callers.
4886
8ffcbaaf
YQ
48872012-03-03 Yao Qi <yao@codesourcery.com>
4888
4889 * tracepoint.c (gdb_agent_capability): New global.
4890 (in_process_agent_loaded_ust): Renamed to
4891 `in_process_agent_supports_ust'.
4892 Update callers.
4893 (in_process_agent_supports_ust): Call agent_capability_check.
4894 (clear_installed_tracepoints): Assert that agent supports
4895 agent.
4896
d1feda86
YQ
48972012-03-03 Yao Qi <yao@codesourcery.com>
4898
4899 * linux-low.c (linux_supports_agent): New.
4900 (linux_target_ops): Initialize field `supports_agent' with
4901 linux_supports_agent.
4902 * target.h (struct target_ops) <supports_agent>: New.
4903 (target_supports_agent): New macro.
4904 * server.c (handle_general_set): Handle packet 'QAgent'.
4905 (handle_query): Send `QAgent+'.
4906 * Makefile.in (server.o): Depends on agent.h.
4907
2fa291ac
YQ
49082012-03-03 Yao Qi <yao@codesourcery.com>
4909
4910 * Makefile.in (OBS): Add agent.o.
4911 Add new rule for agent.o.
4912 Track dependence of tracepoint.c on agent.h.
4913 * tracepoint.c (run_inferior_command_1):
4914 (run_inferior_command): Call agent_run_command.
4915 (gdb_ust_connect_sync_socket): Deleted. Move it to
4916 common/agent.c.
4917 (resume_thread, stop_thread): Likewise.
4918 (gdb_ust_socket_init): Renamed to ...
4919 (gdb_agent_socket_init): ... New.
4920 (gdb_ust_thread): Renamed to ...
4921 (gdb_agent_helper_thread): ... New.
4922 (gdb_ust_init): Move some code to ...
4923 (gdb_agent_init): ... here. New.
4924 [HAVE_UST]: Call gdb_ust_init.
4925 (initialize_tracepoint_ftlib): Call gdb_agent_init.
4926 * configure.ac: Add `sys/un.h' to AC_CHECK_HEADERS.
4927 * config.in, configure: Regenerated.
4928
05044653
PA
49292012-03-02 Pedro Alves <palves@redhat.com>
4930
4931 * inferiors.c (add_pid_to_list, pull_pid_from_list): Delete.
4932 * linux-low.c (struct simple_pid_list): New.
4933 (stopped_pids): New a struct simple_pid_list pointer.
4934 (add_to_pid_list, pull_pid_from_list): New.
4935 (handle_extended_wait): Don't assume the first signal new children
4936 report is SIGSTOP. Adjust call to pull_pid_from_list.
4937 (linux_wait_for_lwp): Adjust.
4938
8d00225b
YQ
49392012-03-02 Yao Qi <yao@codesourcery.com>
4940
4941 * tracepoint.c (do_action_at_tracepoint): Write `stop_pc' in
4942 debug log.
4943
19560ba5
YQ
49442012-03-02 Yao Qi <yao@codesourcery.com>
4945
4946 * tracepoint.c (collect_ust_data_at_tracepoint): Remove parameters
4947 `stop_pc' and `tpoint'. Update caller.
4948
1faeff08
MR
49492012-03-01 Maciej W. Rozycki <macro@codesourcery.com>
4950
4951 * linux-low.h (linux_target_ops): Add regset_bitmap member.
4952 * linux-low.c (use_linux_regsets): New macro.
4953 [!HAVE_LINUX_REGSETS] (regsets_fetch_inferior_registers): Likewise.
4954 [!HAVE_LINUX_REGSETS] (regsets_store_inferior_registers): Likewise.
4955 (linux_register_in_regsets): New function.
4956 (usr_fetch_inferior_registers): Skip registers covered by
4957 regsets.
4958 (usr_store_inferior_registers): Likewise.
4959 (usr_fetch_inferior_registers): New macro.
4960 (usr_store_inferior_registers): Likewise.
4961 (linux_fetch_registers): Handle mixed regset/non-regset targets.
4962 (linux_store_registers): Likewise.
4963 * linux-mips-low.c (init_registers_mips_dsp_linux): New
4964 prototype.
4965 (init_registers_mips64_dsp_linux): Likewise.
4966 (init_registers_mips_linux): New macro.
4967 (init_registers_mips_dsp_linux): Likewise.
4968 (mips_dsp_num_regs): Likewise.
4969 (DSP_BASE, DSP_CONTROL): New fallback macros.
4970 (mips_base_regs): New macro.
4971 (mips_regmap): Use it. Fix the size.
4972 (mips_dsp_regmap): New variable.
4973 (mips_dsp_regset_bitmap): Likewise.
4974 (mips_arch_setup): New function.
4975 (mips_cannot_fetch_register): Use the_low_target.regmap rather
4976 than mips_regmap.
4977 (mips_cannot_store_register): Likewise.
4978 (the_low_target): Update .arch_setup, .num_regs and .regmap
4979 initializers. Add .regset_bitmap initializer.
4980 * linux-arm-low.c (the_low_target): Add .regset_bitmap
4981 initializer.
4982 * linux-bfin-low.c (the_low_target): Likewise.
4983 * linux-cris-low.c (the_low_target): Likewise.
4984 * linux-crisv32-low.c (the_low_target): Likewise.
4985 * linux-ia64-low.c (the_low_target): Likewise.
4986 * linux-m32r-low.c (the_low_target): Likewise.
4987 * linux-m68k-low.c (the_low_target): Likewise.
4988 * linux-ppc-low.c (the_low_target): Likewise.
4989 * linux-s390-low.c (the_low_target): Likewise.
4990 * linux-sh-low.c (the_low_target): Likewise.
4991 * linux-sparc-low.c (the_low_target): Likewise.
4992 * linux-tic6x-low.c (the_low_target): Likewise.
4993 * linux-x86-low.c (the_low_target): Likewise.
4994 * linux-xtensa-low.c (the_low_target): Likewise.
4995 * configure.srv <mips*-*-linux*>: Add mips-dsp-linux.o and
4996 mips64-dsp-linux.o to srv_regobj. Add mips-dsp-linux.xml,
4997 mips64-dsp-linux.xml, mips-dsp.xml and mips64-dsp.xml to
4998 srv_xmlfiles.
4999 * Makefile.in (mips-dsp-linux.o, mips-dsp-linux.c): New targets.
5000 (mips64-dsp-linux.o, mips64-dsp-linux.c): Likewise.
5001
c03e6ccc
YQ
50022012-02-29 Yao Qi <yao@codesourcery.com>
5003 Pedro Alves <palves@redhat.com>
5004
5005 * linux-low.c: (linux_wait_1): Call unsuspend_all_lwps when
5006 `step_over_finished' is true.
5007
644cebc9
PA
50082012-02-27 Pedro Alves <palves@redhat.com>
5009
5010 * linux-low.c (pid_is_stopped): Delete, moved to common/.
5011 (linux_attach_lwp_1): Adjust to use linux_proc_pid_is_stopped.
5012
c14d7ab2
PA
50132012-02-27 Pedro Alves <palves@redhat.com>
5014
5015 PR server/9684
5016 * linux-low.c (pid_is_stopped): New.
5017 (linux_attach_lwp_1): Handle attaching to 'T (stopped)' processes.
5018
412c89dd
LM
50192012-02-25 Luis Machado <lgustavo@codesourcery.com>
5020
5021 * mem-break.c (clear_gdb_breakpoint_conditions): Fix de-allocation
5022 of conditions.
5023
b745defe
MR
50242012-02-24 Maciej W. Rozycki <macro@codesourcery.com>
5025
5026 * linux-mips-low.c (mips_regmap): Correct the index of $f9.
5027
9f3a5c85
LM
50282012-02-24 Luis Machado <lgustavo@codesourcery>
5029
5030 * server.c (handle_query): Advertise support for target-side
5031 breakpoint condition evaluation.
5032 (process_point_options): New function.
5033 (process_serial_event): When inserting a breakpoint, check for
5034 a target-side condition that should be evaluated.
5035
5036 * mem-break.c: Include regcache.h and ax.h.
5037 (point_cond_list_t): New data structure.
5038 (breakpoint) <cond_list>: New field.
5039 (find_gdb_breakpoint_at): Make non-static.
5040 (delete_gdb_breakpoint_at): Clear any target-side
5041 conditions.
5042 (clear_gdb_breakpoint_conditions): New function.
5043 (add_condition_to_breakpoint): Likewise.
5044 (add_breakpoint_condition): Likewise.
5045 (gdb_condition_true_at_breakpoint): Likewise.
5046 (gdb_breakpoint_here): Return result directly instead
5047 of going through a local variable.
5048
5049 * mem-break.h (find_gdb_breakpoint_at): New prototype.
5050 (clear_gdb_breakpoint_conditions): Likewise.
5051 (add_breakpoint_condition): Likewise.
5052 (gdb_condition_true_at_breakpoint): Likewise.
5053
5054 * linux-low.c (linux_wait_1): Evaluate target-side breakpoint condition.
5055 (need_step_over_p): Take target-side breakpoint condition into
5056 consideration.
5057
5e1dc496
LM
50582012-02-24 Luis Machado <lgustavo@codesourcery>
5059
5060 * server.h: Include tracepoint.h.
5061 (agent_mem_read, agent_get_trace_state_variable_value,
5062 agent_set_trace_state_variable_value,
5063 agent_tsv_read, agent_mem_read_string, get_get_tsv_func_addr,
5064 get_set_tsv_func_addr): New prototypes.
5065
5066 * ax.h: New include file.
5067 * ax.c: New source file.
5068
5069 * tracepoint.c: Include ax.h.
5070 (gdb_agent_op, gdb_agent_op_names, gdb_agent_op_sizes,
5071 agent_expr, eval_result_type): Move to ax.h.
5072 (parse_agent_expr): Rename to ...
5073 (gdb_parse_agent_expr): ... this, make it non-static and move
5074 to ax.h.
5075 (unparse_agent_expr) Rename to ...
5076 (gdb_unparse_agent_expr): ... this, make it non-static and move
5077 to ax.h.
5078 (eval_agent_expr): Rename to ...
5079 (eval_tracepoint_agent_expr): ... this.
5080 (agent_mem_read, agent_mem_read_string, agent_tsv_read): Remove
5081 forward declarations.
5082 (add_tracepoint_action): Call gdb_parse_agent_expr (...).
5083 (agent_get_trace_state_variable_value): New function.
5084 (agent_set_trace_state_variable_value): New function.
5085 (cmd_qtdp): Call gdb_parse_agent_expr (...).
5086 (response_tracepoint): Call gdb_unparse_agent_expr (...).
5087 (do_action_at_tracepoint): Call eval_tracepoint_agent_expr (...).
5088 (condition_true_at_tracepoint): Likewise.
5089 (parse_agent_expr): Rename to ...
5090 (gdb_parse_agent_expr): ... this and move to ax.c.
5091 (unparse_agent_expr): Rename to ...
5092 (gdb_unparse_agent_expr): ... this and move to ax.c.
5093 (gdb_agent_op_name): Move to ax.c.
5094 (eval_agent_expr): Rename to ...
5095 (gdb_eval_agent_expr): ... this, use regcache passed as parameter
5096 and move to ax.c.
5097 (eval_tracepoint_agent_expr): New function.
5098 (agent_mem_read, agent_mem_read_string, agent_tsv_read): Make
43aaf8b6 5099 non-static.
5e1dc496
LM
5100 (current_insn_ptr, emit_error, struct bytecode_address): Move to
5101 ax.c.
5102 (emit_prologue, emit_epilogue, emit_add, emit_sub, emit_mul, emit_lsh,
5103 emit_rsh_signed, emit_rsh_unsigned, emit_ext, emit_log_not,
5104 emit_bit_and, emit_bit_or, emit_bit_xor, emit_bit_not, emit_equal,
5105 emit_less_signed, emit_less_unsigned, emit_ref, emit_if_goto,
5106 emit_goto, write_goto_address, emit_const, emit_reg, emit_pop,
5107 emit_stack, emit_zero_ext, emit_swap, emit_stack_adjust,
5108 emit_int_call_1, emit_void_call_2, emit_eq_goto, emit_ne_goto,
5109 emit_lt_goto, emit_ge_goto, emit_gt_goto, emit_le_goto): Move to ax.c.
5110 (get_get_tsv_func_addr, get_set_tsv_func_addr): New functions.
5111 (compile_bytecodes): Remove forward declaration.
5112 (is_goto_target): Move to ax.c.
5113 (compile_bytecodes): Move to ax.c and call
5114 agent_get_trace_state_variable_value (...) and
5115 agent_set_trace_state_variable_value (...).
5116
5117 * Makefile.in: Update ax.c and IPA dependencies.
5118
277e4e52
PA
51192012-02-24 Pedro Alves <palves@redhat.com>
5120
5121 * tracepoint.c (cmd_bigqtbuffer): Rename as ...
5122 (cmd_bigqtbuffer_circular): ... this. Only handle
5123 'QTBuffer:circular:'.
5124 (handle_tracepoint_general_set): Adjust.
5125
bf4c19f7
YQ
51262012-02-16 Yao Qi <yao@codesourcery.com>
5127
5128 * inferiors.c: Move code to ...
5129 * dll.c: .... here. New.
5130 * server.h: Declare clear_dlls.
5131 * Makefile.in (SFILES): Add dll.c.
5132 (OBS): Add dll.o
5133 (dll.o): New rule.
5134
d73f2619
YQ
51352012-02-11 Yao Qi <yao@codesourcery.com>
5136
5137 * server.c: (handle_monitor_command): Add a new parameter
5138 `own_buf'.
5139 (handle_query): Update caller.
5140
f8255c2a
JB
51412012-02-09 Joel Brobecker <brobecker@adacore.com>
5142
5143 * configure.ac: Add readlink to AC_CHECK_FUNCS list.
5144 * configure, config.in: Regenerate.
5145 * hostio.c: Provide an alternate implementation if HAVE_READLINK
5146 is not defined.
5147
da84f473
PA
51482012-02-02 Pedro Alves <palves@redhat.com>
5149
5150 Try SIGKILL first, then PTRACE_KILL.
5151 * linux-low.c (linux_kill_one_lwp): New.
5152 (linux_kill_one_lwp): Rename to ...
5153 (kill_one_lwp_callback): ... this. Use the new
5154 linux_kill_one_lwp.
5155
e886a173
PA
51562012-02-02 Pedro Alves <palves@redhat.com>
5157
5158 * tracepoint.c (cmd_qtminftpilen): Return 0 if there's no current
5159 inferior.
5160
be07f1a2
PA
51612012-01-27 Pedro Alves <palves@redhat.com>
5162
5163 * linux-low.c (linux_child_pid_to_exec_file): Delete.
5164 (elf_64_file_p): Make static.
5165 (linux_pid_exe_is_elf_64_file): New.
5166 * linux-low.h (linux_child_pid_to_exec_file, elf_64_file_p):
5167 Delete declarations.
5168 (linux_pid_exe_is_elf_64_file): Declare.
5169 * linux-x86-low.c (x86_arch_setup): Use
5170 linux_pid_exe_is_elf_64_file.
5171
d8301ad1
JK
51722012-01-25 Jan Kratochvil <jan.kratochvil@redhat.com>
5173
5174 * linux-low.c (linux_wait_for_event_1): Rename to ...
5175 (linux_wait_for_event): ... here and merge it with former
5176 linux_wait_for_event - new variable wait_ptid, use it.
5177 (linux_wait_for_event): Remove - merge it to linux_wait_for_event_1.
5178
01b17894
PA
51792012-01-23 Pedro Alves <palves@redhat.com>
5180
5181 * server.c (main): Avoid yet another case of infinite loop while
5182 detaching/killing after a longjmp.
5183
e825046f
JK
51842012-01-20 Jan Kratochvil <jan.kratochvil@redhat.com>
5185
5186 Code cleanup.
5187 * linux-low.c (linux_wait_for_event_1): Use ptid_is_pid.
5188
b9e7b9c3
UW
51892012-01-20 Ulrich Weigand <ulrich.weigand@linaro.org>
5190
5191 * hostio.c (handle_readlink): New function.
5192 (handle_vFile): Call it to handle "vFile:readlink" packets.
5193
901f9912
UW
51942012-01-20 Pedro Alves <palves@redhat.com>
5195 Ulrich Weigand <ulrich.weigand@linaro.org>
5196
5197 * server.c (handle_v_requests): Only support vAttach and vRun to
5198 start multiple processes when in extended protocol mode.
5199
fc1ab1a0
PA
52002012-01-17 Pedro Alves <palves@redhat.com>
5201
5202 * tracepoint.c (initialize_tracepoint): Use mmap instead of
5203 memalign plus mprotect to allocate the scratch buffer.
5204
7d5d4e98
PA
52052012-01-13 Pedro Alves <palves@redhat.com>
5206
5207 * server.c (attach_inferior): Clear `cont_thread'.
5208
f128d5e9
PA
52092012-01-13 Pedro Alves <palves@redhat.com>
5210
5211 * server.c (main): Avoid infinite loop while detaching/killing
5212 after a longjmp.
5213
06db92f0
DE
52142012-01-09 Doug Evans <dje@google.com>
5215
5216 * server.c (start_inferior): Set last_ptid in --wrapper case.
5217
32d92999
YQ
52182012-01-06 Yao Qi <yao@codesourcery.com>
5219
5220 * tracepoint.c [IN_PROCESS_AGENT] (debug_threads): Macro
5221 defined.
5222 [IN_PROCESS_AGENT] (debug_agent): New global variable.
5223
5e0a92a9
YQ
52242012-01-04 Yao Qi <yao@codesourcery.com>
5225
5226 * tracepoint.c (cmd_qtdp): Print debug message
5227 for static tracepoint.
5228
ae639e8c
YQ
52292012-01-04 Yao Qi <yao@codesourcery.com>
5230
5231 * tracepoint.c (trace_vdebug): Differentiate debug message
5232 between gdbserver and IPA.
5233
f72429c5
YQ
52342012-01-03 Yao Qi <yao@codesourcery.com>
5235
5236 * tracepoint.c (tracepoint_was_hit): Don't collect for
5237 static tracepoint.
5238
12c3e59c
JB
52392012-01-02 Joel Brobecker <brobecker@adacore.com>
5240
5241 * terminal.h: Reformat copyright header.
5242
67827812
JB
52432012-01-02 Joel Brobecker <brobecker@adacore.com>
5244
5245 * server.c (gdbserver_version): Update copyright year.
5246 * gdbreplay.c (gdbreplay_version): Likewise.
5247
3e52c33d
JK
52482011-12-18 Jan Kratochvil <jan.kratochvil@redhat.com>
5249
5250 * linux-low.c (linux_create_inferior): Put empty if clause for write.
5251
5252 Revert:
5253 2011-12-18 Hui Zhu <teawater@gmail.com>
5254 * linux-low.c (linux_create_inferior): Save return value to ret.
5255
66f1260e
HZ
52562011-12-18 Hui Zhu <teawater@gmail.com>
5257
5258 * linux-low.c (linux_create_inferior): Save return value to ret.
5259
e77616d7
DE
52602011-12-16 Doug Evans <dje@google.com>
5261
e7b06c57
DE
5262 * linux-low.c (linux_create_inferior): If stdio connection,
5263 redirect stdin from /dev/null, stdout to stderr.
5264 * remote-utils.c (remote_is_stdio): New static global.
5265 (remote_connection_is_stdio): New function.
5266 (remote_prepare): Handle stdio connection.
5267 (remote_open): Ditto.
5268 (remote_close): Don't close stdin for stdio connections.
5269 (read_prim,write_prim): New functions. Replace all calls to
5270 read/write to these.
5271 * server.c (main): Watch for "-" argument. Move call to
5272 remote_prepare before start_inferior.
5273 * server.h (STDIO_CONNECTION_NAME): New macro.
5274 (remote_connection_is_stdio): Declare.
5275
e77616d7
DE
5276 * remote-utils.c (prepare_resume_reply): Remove extraneous \n
5277 in debugging output.
5278
82067193
YQ
52792011-12-15 Yao Qi <yao@codesourcery.com>
5280
5281 * tracepoint.c: Include sys/syscall.h.
5282 (gdb_ust_thread): Remove preprocessor conditional.
5283
82bfbe7e
PA
52842011-12-14 Pedro Alves <pedro@codesourcery.com>
5285
5286 * linux-low.c (linux_detach_one_lwp): Call
5287 the_low_target.prepare_to_resume before detaching.
5288
712c6575
YQ
52892011-12-14 Yao Qi <yao@codesourcery.com>
5290
5291 * tracepoint.c (gdb_ust_thread): Don't ignore return value
5292 of write.
5293
d54d1edf
YQ
52942011-12-14 Yao Qi <yao@codesourcery.com>
5295
5296 * i386-low.c (i386_low_stopped_data_address): Initialize local
5297 variable `control'.
5298
6210a125
PA
52992011-12-13 Pedro Alves <pedro@codesourcery.com>
5300
5301 PR remote/13492
5302
5303 * i386-low.c (i386_low_stopped_data_address): Avoid fetching
5304 DR_CONTROL unless necessary. Extend comments.
5305 * linux-x86-low.c (x86_linux_prepare_to_resume): Don't write to
5306 DR0-3 if not used. If any watchpoint was set, clear DR_STATUS.
5307
2ece8244
YQ
53082011-12-13 Yao Qi <yao@codesourcery.com>
5309
5310 * tracepoint.c (trace_buffer_alloc): Replace magic numbers with
5311 macros.
5312 (upload_fast_traceframes, upload_fast_traceframes): Likewise.
5313
784867a5
JK
53142011-12-08 Jan Kratochvil <jan.kratochvil@redhat.com>
5315
5316 * linux-low.c (linux_kill): Skip PTRACE_KILL if LWP does not exist.
5317 Print new debug message for such case.
5318
6bf36717
JK
53192011-12-06 Jan Kratochvil <jan.kratochvil@redhat.com>
5320
5321 Fix overlapping memcpy.
5322 * mem-break.c (set_raw_breakpoint_at): New variable buf. Use it for
5323 the read_inferior_memory transfer.
5324 (delete_fast_tracepoint_jump): New variable buf. Use it for the
5325 write_inferior_memory transfer.
5326 (set_fast_tracepoint_jump): New variable buf. Use it for the
5327 read_inferior_memory and write_inferior_memory transfers.
5328 (uninsert_fast_tracepoint_jumps_at, reinsert_fast_tracepoint_jumps_at)
5329 (delete_raw_breakpoint, uninsert_raw_breakpoint): New variable buf.
5330 Use it for the write_inferior_memory transfer.
5331 (check_mem_read, check_mem_write): New gdb_asserts for overlapping
5332 buffers.
5333
50275556
MR
53342011-12-06 Maciej W. Rozycki <macro@codesourcery.com>
5335
5336 * linux-low.c (fetch_register, store_register): Make code
5337 consistent, fix formatting.
5338
7325beb4
MR
53392011-12-06 Maciej W. Rozycki <macro@codesourcery.com>
5340
5341 * linux-low.c (usr_store_inferior_registers): Factor out code
5342 to handle individual registers into...
5343 (store_register): ... this new function.
5344
c642a434
UW
53452011-12-06 Ulrich Weigand <uweigand@de.ibm.com>
5346
5347 * Makefile.in (s390-linux32v1.o, s390-linux32v1.c): New rules.
5348 (s390-linux32v2.o, s390-linux32v2.c): Likewise.
5349 (s390-linux64v1.o, s390-linux64v1.c): Likewise.
5350 (s390-linux64v2.o, s390-linux64v2.c): Likewise.
5351 (s390x-linux64v1.o, s390x-linux64v1.c): Likewise.
5352 (s390x-linux64v2.o, s390x-linux64v2.c): Likewise.
5353 * configure.srv [s390*-*-linux*] (srv_regobj): Add new objects.
5354 (srv_xmlfiles): Add new XML files.
5355
5356 * linux-s390-low.c: Include "elf/common.h", <sys/ptrace.h>,
5357 and <sys/uio.h>.
5358 (PTRACE_GETREGSET, PTRACE_SETREGSET): Define if undefined.
5359 (init_registers_s390_linux32v1): Add prototype.
5360 (init_registers_s390_linux32v2): Likewise.
5361 (init_registers_s390_linux64v1): Likewise.
5362 (init_registers_s390_linux64v2): Likewise.
5363 (init_registers_s390x_linux64v1): Likewise.
5364 (init_registers_s390x_linux64v2): Likewise.
5365 (s390_num_regs): Increment to 52.
5366 (s390_regmap): Add orig_r2 register.
5367 (s390_num_regs_3264): Increment to 68.
5368 (s390_regmap_3264): Add orig_r2 register.
5369 (s390_collect_ptrace_register): Handle orig_r2 register.
5370 (s390_supply_ptrace_register): Likewise.
5371 (s390_fill_last_break): New function.
5372 (s390_store_last_break): Likewise.
5373 (s390_fill_system_call): New function.
5374 (s390_store_system_call): Likewise.
5375 (target_regsets): Handle NT_S390_LAST_BREAK and NT_S390_SYSTEM_CALL
5376 register sets.
5377 (s390_check_regset): New function.
5378 (s390_arch_setup): Check for presence of NT_S390_LAST_BREAK and
5379 NT_S390_SYSTEM_CALL regsets and use appropriate description.
5380 Update target_regsets for available register sets.
5381
2268b414
JK
53822011-12-02 Paul Pluzhnikov <ppluzhnikov@google.com>
5383 Jan Kratochvil <jan.kratochvil@redhat.com>
5384
5385 * linux-low.c (get_phdr_phnum_from_proc_auxv, get_dynamic, get_r_debug)
5386 (read_one_ptr, struct link_map_offsets, linux_qxfer_libraries_svr4):
5387 New.
5388 (struct linux_target_ops): Install linux_qxfer_libraries_svr4.
5389 * linux-low.h (struct process_info_private): New member r_debug.
5390 * server.c (handle_qxfer_libraries): Call
5391 the_target->qxfer_libraries_svr4.
5392 (handle_qxfer_libraries_svr4): New function.
5393 (qxfer_packets): New entry "libraries-svr4".
5394 (handle_query): Check QXFER_LIBRARIES_SVR4 and report libraries-svr4.
5395 * target.h (struct target_ops): New member qxfer_libraries_svr4.
5396 * remote.c (remote_xfer_partial): Call add_packet_config_cmd for
5397 PACKET_qXfer_libraries_svr4.
5398
d6db1fab
UW
53992011-11-30 Ulrich Weigand <uweigand@de.ibm.com>
5400
5401 * linux-s390-low.c (s390_collect_ptrace_register): Fully convert
5402 PSW address/mask between 8-byte and 16-byte formats.
5403 (s390_supply_ptrace_register): Likewise.
5404 (s390_get_pc, s390_set_pc): 4-byte PSW address always includes
5405 basic addressing mode bit.
5406
242f5f1c
SS
54072011-11-24 Stan Shebs <stan@codesourcery.com>
5408
5409 * tracepoint.c (cmd_qtstatus): Use plongest instead of %llx.
5410
f196051f
SS
54112011-11-17 Stan Shebs <stan@codesourcery.com>
5412
5413 * tracepoint.c (struct tracepoint): New field traceframe_usage.
5414 (tracing_start_time): New global.
5415 (tracing_stop_time): New global.
5416 (tracing_user_name): New global.
5417 (tracing_notes): New global.
5418 (tracing_stop_note): New global.
5419 (cmd_qtstart): Set traceframe_usage, start_time.
5420 (stop_tracing): Set stop_time.
5421 (cmd_qtstatus): Report additional status.
5422 (cmd_qtp): New function.
5423 (handle_tracepoint_query): Call it.
5424 (cmd_qtnotes): New function.
5425 (handle_tracepoint_general_set): Call it.
5426 (get_timestamp): Rename from tsv_get_timestamp.
5427
405f8e94
SS
54282011-11-14 Stan Shebs <stan@codesourcery.com>
5429 Kwok Cheung Yeung <kcy@codesourcery.com>
5430
5431 * linux-x86-low.c (small_jump_insn): New.
5432 (i386_install_fast_tracepoint_jump_pad): Add arguments for
5433 trampoline and error message, build a trampoline and issue a small
5434 jump instruction to it.
5435 (x86_install_fast_tracepoint_jump_pad): Add arguments for
5436 trampoline and error message.
5437 (x86_get_min_fast_tracepoint_insn_len): New.
5438 (the_low_target): Add call to x86_get_min_fast_tracepoint_insn_len.
5439 * linux-low.h (struct linux_target_ops): Add arguments to
5440 install_fast_tracepoint_jump_pad operation, add new operation.
5441 * linux-low.c (linux_install_fast_tracepoint_jump_pad): Add
5442 arguments.
5443 (linux_get_min_fast_tracepoint_insn_len): New function.
5444 (linux_target_op): Add new operation.
5445 * tracepoint.c (gdb_trampoline_buffer): New IPA variable.
5446 (gdb_trampoline_buffer_end): Ditto.
5447 (gdb_trampoline_buffer_error): Ditto.
5448 (struct ipa_sym_addresses): Add fields for new IPA variables.
5449 (symbol_list): Add entries for new IPA variables.
5450 (struct tracepoint): Add fields to hold the address range of the
5451 trampoline used by the tracepoint.
5452 (trampoline_buffer_head): New static variable.
5453 (trampoline_buffer_tail): Ditto.
5454 (claim_trampoline_space): New function.
5455 (have_fast_tracepoint_trampoline_buffer): New function.
5456 (clone_fast_tracepoint): Fill in trampoline fields of tracepoint
5457 structure.
5458 (install_fast_tracepoint): Ditto, also add error buffer argument.
5459 (cmd_qtminftpilen): New function.
5460 (handle_tracepoint_query): Add response to qTMinFTPILen packet.
5461 (fast_tracepoint_from_trampoline_address): New function.
5462 (fast_tracepoint_collecting): Handle trampoline as part of jump
5463 pad space.
5464 (set_trampoline_buffer_space): New function.
5465 (initialize_tracepoint): Initialize new IPA variables.
5466 * target.h (struct target_ops): Add arguments to
5467 install_fast_tracepoint_jump_pad operation, add new
5468 get_min_fast_tracepoint_insn_len operation.
5469 (target_get_min_fast_tracepoint_insn_len): New.
5470 (install_fast_tracepoint_jump_pad): Add arguments.
5471 * server.h (IPA_BUFSIZ): Define.
5472 * linux-i386-ipa.c: Include extra header files.
5473 (initialize_fast_tracepoint_trampoline_buffer): New function.
5474 (initialize_low_tracepoint): Call it.
5475 * server.h (set_trampoline_buffer_space): Declare.
5476 (claim_trampoline_space): Ditto.
5477 (have_fast_tracepoint_trampoline_buffer): Ditto.
5478
1e4d1764
YQ
54792011-11-14 Yao Qi <yao@codesourcery.com>
5480
5481 * server.c (handle_query): Handle InstallInTrace for qSupported.
5482 * tracepoint.c (add_tracepoint): Sort list.
5483 (install_tracepoint, download_tracepoint): New.
5484 (cmd_qtdp): Call them to install and download tracepoints.
5485 (sort_tracepoints): Removed.
5486 (cmd_qtstart): Update.
5487
5c73ff4e
YQ
54882011-11-14 Yao Qi <yao@codesourcery.com>
5489
5490 * mem-break.c (inc_ref_fast_tracepoint_jump): New.
5491 * mem-break.h: Declare.
5492 * tracepoint.c (cmd_qtstart): Move some code to ...
5493 (clone_fast_tracepoint, install_fast_tracepoint): ... here.
5494 New.
5495 (download_tracepoints): Move some code to ...
5496 (download_tracepoint_1): ... here. New.
5497
86a30030
YQ
54982011-11-08 Yao Qi <yao@codesourcery.com>
5499
5500 * remote-utils.c (relocate_instruction): A comment fix.
5501
8d26e50c
JB
55022011-11-07 Joel Brobecker <brobecker@adacore.com>
5503
5504 * win32-i386-low.c (dr_status_mirror, dr_control_mirror): Delete.
5505 (i386_dr_low_get_control, i386_dr_low_get_status): Use
5506 dr_status_mirror and dr_control_mirror from debug_reg_state.
5507 (i386_dr_low_get_status): Use debug_reg_state.dr_status_mirror
5508 (i386_initial_stuff): Remove use of deleted globals.
5509 (i386_get_thread_context, i386_set_thread_context,
5510 i386_thread_added): Use dr_status_mirror and dr_control_mirror
5511 from debug_reg_state.
5512
a59306a3
YQ
55132011-11-05 Yao Qi <yao@codesourcery.com>
5514
5515 * tracepoint.c (gdb_collect): Loop over tracepoints of same
5516 address as TPOINT's.
5517
3065dfb6
SS
55182011-11-02 Stan Shebs <stan@codesourcery.com>
5519
5520 * tracepoint.c (agent_mem_read_string): New function.
5521 (eval_agent_expr): Call it for tracenz.
5522 * server.c (handle_query): Report support for tracenz.
5523
fd0d8c7c
YQ
55242011-11-02 Yao Qi <yao@codesourcery.com>
5525
5526 * tracepoint.c (cmd_qtstart): Remove unused local variables.
5527
609086b1
YQ
55282011-11-02 Yao Qi <yao@codesourcery.com>
5529
5530 * target.h: Fix a typo in comment.
5531
b9fd1791
PA
55322011-10-31 Pedro Alves <pedro@codesourcery.com>
5533
5534 * mem-break.c (check_mem_write): Add `myaddr' parameter. Don't
5535 clobber the breakpoints' shadows with fast tracepoint jumps.
5536 * mem-break.h (check_mem_write): Add `myaddr' parameter.
5537 * target.c (write_inferior_memory): Also pass MYADDR down to
5538 check_mem_write.
5539
03583c20
UW
55402011-10-07 Ulrich Weigand <ulrich.weigand@linaro.org>
5541
5542 * configure.ac: Check support for personality routine.
5543 * configure: Regenerate.
5544 * config.in: Likewise.
5545 * linux-low.c: Include <sys/personality.h>.
5546 Define ADDR_NO_RANDOMIZE if necessary.
5547 (linux_create_inferior): Disable address space randomization when
5548 forking inferior, if requested.
5549 (linux_supports_disable_randomization): New function.
5550 (linux_target_ops): Install it.
5551 * server.h (disable_randomization): Declare.
5552 * server.c (disable_randomization): New global variable.
5553 (handle_general_set): Handle QDisableRandomization.
5554 (handle_query): Likewise for qSupported.
5555 (main): Support --disable-randomization and --no-disable-randomization
5556 command line arguments.
5557 * target.h (struct target_ops): Add supports_disable_randomization.
5558 (target_supports_disable_randomization): New macro.
5559
723b724b
MF
55602011-09-29 Mike Frysinger <vapier@gentoo.org>
5561
5562 * linux-low.c (target_loadseg): Add defined PTRACE_GETFDPIC to the
5563 ifdef check.
5564 [PT_GETDSBT] (target_loadmap): Wrap in a defined PT_GETDSBT check.
5565 [!PT_GETDSBT] (target_loadmap): New definition.
5566 (LINUX_LOADMAP, LINUX_LOADMAP_EXEC, LINUX_LOADMAP_INTERP): Define.
5567 (linux_read_loadmap): Change PTRACE_GETDSBT_EXEC to
5568 LINUX_LOADMAP_EXEC, PTRACE_GETDSBT_INTERP to LINUX_LOADMAP_INTERP,
5569 and PT_GETDSBT to LINUX_LOADMAP.
5570 [!PT_GETDSBT] (linux_read_loadmap): Define to NULL.
5571 (linux_target_ops): Delete unnecessary ifdef PT_GETDSBT check.
5572
55329a5c 55732011-09-21 Ulrich Weigand <ulrich.weigand@linaro.org>
71487fd7
UW
5574
5575 * linux-arm-low.c (struct arm_linux_hwbp_cap): Remove.
5576 (arm_linux_hwbp_cap): New static variable.
5577 (arm_linux_get_hwbp_cap): Replace by ...
5578 (arm_linux_init_hwbp_cap): ... this new function.
5579 (arm_linux_get_hw_breakpoint_count): Use arm_linux_hwbp_cap.
5580 (arm_linux_get_hw_watchpoint_count): Likewise.
5581 (arm_linux_get_hw_watchpoint_max_length): Likewise.
5582 (arm_arch_setup): Call arm_linux_init_hwbp_cap.
5583 (arm_prepare_to_resume): Use perror_with_name instead of error.
5584
55329a5c 55852011-09-21 Ulrich Weigand <ulrich.weigand@linaro.org>
09b4ad9f
UW
5586
5587 * linux-arm-low.c: Include <signal.h>.
5588 (PTRACE_GETHBPREGS, PTRACE_SETHBPREGS): Define if necessary.
5589 (struct arm_linux_hwbp_cap): New data type.
5590 (arm_hwbp_type, arm_hwbp_control_t): New typedefs.
5591 (struct arm_linux_hw_breakpoint): New data type.
5592 (MAX_BPTS, MAX_WPTS): Define.
5593 (struct arch_process_info, struct arch_lwp_info): New data types.
5594 (arm_linux_get_hwbp_cap): New function.
5595 (arm_linux_get_hw_breakpoint_count): Likewise.
5596 (arm_linux_get_hw_watchpoint_count): Likewise.
5597 (arm_linux_get_hw_watchpoint_max_length): Likewise.
5598 (arm_hwbp_control_initialize): Likewise.
5599 (arm_hwbp_control_is_enabled): Likewise.
5600 (arm_hwbp_control_is_initialized): Likewise.
5601 (arm_hwbp_control_disable): Likewise.
5602 (arm_linux_hw_breakpoint_equal): Likewise.
5603 (arm_linux_hw_point_initialize): Likewise.
5604 (struct update_registers_data): New data structure.
5605 (update_registers_callback: New function.
5606 (arm_insert_point): Likewise.
5607 (arm_remove_point): Likewise.
5608 (arm_stopped_by_watchpoint): Likewise.
5609 (arm_stopped_data_address): Likewise.
5610 (arm_new_process): Likewise.
5611 (arm_new_thread): Likewise.
5612 (arm_prepare_to_resume): Likewise.
5613 (the_low_target): Register arm_insert_point, arm_remove_point,
5614 arm_stopped_by_watchpoint, arm_stopped_data_address, arm_new_process,
5615 arm_new_thread, and arm_prepare_to_resume.
5616
6b9801d4
SS
56172011-09-15 Stan Shebs <stan@codesourcery.com>
5618
5619 * server.h (struct emit_ops): Add compare-goto fields.
5620 * tracepoint.c (gdb_agent_op_sizes): New table.
5621 (emit_eq_goto): New function.
5622 (emit_ne_goto): New function.
5623 (emit_lt_goto): New function.
5624 (emit_le_goto): New function.
5625 (emit_gt_goto): New function.
5626 (emit_ge_goto): New function.
5627 (is_goto_target): New function.
5628 (compile_bytecodes): Recognize special cases of compare-goto
5629 combinations and call specialized emitters for them.
5630 * linux-x86-low.c (amd64_emit_eq_goto): New function.
5631 (amd64_emit_ne_goto): New function.
5632 (amd64_emit_lt_goto): New function.
5633 (amd64_emit_le_goto): New function.
5634 (amd64_emit_gt_goto): New function.
5635 (amd64_emit_ge_goto): New function.
5636 (amd64_emit_ops): Add the new functions.
5637 (i386_emit_eq_goto): New function.
5638 (i386_emit_ne_goto): New function.
5639 (i386_emit_lt_goto): New function.
5640 (i386_emit_le_goto): New function.
5641 (i386_emit_gt_goto): New function.
5642 (i386_emit_ge_goto): New function.
5643 (i386_emit_ops): Add the new functions.
5644
bf15cbda
SS
56452011-09-08 Stan Shebs <stan@codesourcery.com>
5646
5647 * linux-x86-low.c (i386_emit_prologue): Save %ebx.
5648 (i386_emit_epilogue): Restore %ebx.
5649
943ca1dd
JZ
56502011-08-31 Jie Zhang <jzhang918@gmail.com>
5651
5652 * server.c (step_thread): Remove definition.
5653 (process_serial_event): Don't handle Hs.
5654 * server.h (step_thread): Remove declaration.
5655 * target.c (set_desired_inferior): Remove use of step_thread.
5656
e3deef73
LM
56572011-08-24 Luis Machado <lgustavo@codesourcery.com>
5658
5659 * linux-low.c: Include linux-procfs.h.
5660 (linux_attach_lwp_1): Update comments.
5661 (linux_attach): Scan for existing threads when attaching to a
5662 process that is the tgid.
5663 * Makefile.in: Update dependencies.
5664
13da1c97
LM
56652011-08-24 Luis Machado <lgustavo@codesourcery.com>
5666
5667 * configure.srv: Add linux-procfs.o dependencies.
5668
881127c9
YQ
56692011-08-14 Yao Qi <yao@codesourcery.com>
5670
5671 * target.h (struct target_ops): Fix indent.
5672 * win32-low.c (win32_target_ops): Fix comment.
5673
58dbd541
YQ
56742011-08-14 Andrew Jenner <andrew@codesourcery.com>
5675 Yao Qi <yao@codesourcery.com>
5676
5677 * Makefile.in (clean): Remove tic6x-*.c files.
5678 (linux-tic6x-low.o, tic6x-c62x-linux.o, tic6x-c64x-linux.o): New rules.
5679 (tic6x-c64xp-linux.o, tic6x-c62x-linux.c, tic6x-c64x-linux.c): Likewise.
5680 (tic6x-c64xp-linux.c): Likewise.
5681 * configure.srv: Add support for tic6x-*-uclinux.
5682 * linux-tic6x-low.c: New.
5683 * linux-low.c (PT_TEXT_ADDR, PT_DATA_ADDR, PT_TEXT_END_ADDR): Define.
5684
78d85199
YQ
56852011-08-14 Andrew Stubbs <ams@codesourcery.com>
5686 Yao Qi <yao@codesourcery.com>
5687
5688 * target.h (struct target_ops): Add read_loadmap.
5689 * linux-low.c (struct target_loadseg): New type.
5690 (struct target_loadmap): New type.
5691 (linux_read_loadmap): New function.
5692 (linux_target_ops): Add linux_read_loadmap.
5693 * server.c (handle_query): Support qXfer:fdpic:read packet.
43aaf8b6
PA
5694 * win32-low.c (win32_target_ops): Initialize field `read_loadmap'
5695 to NULL.
78d85199 5696
a959a88d
EZ
56972011-08-05 Eli Zaretskii <eliz@gnu.org>
5698
5699 * win32-low.c: Include <stdint.h>.
5700
1ced966e
PA
57012011-07-22 Pedro Alves <pedro@codesourcery.com>
5702
5703 * i386-low.c (i386_insert_aligned_watchpoint): Don't pass the info
5704 to the inferior here.
5705 (i386_remove_aligned_watchpoint): Ditto.
5706 (i386_handle_nonaligned_watchpoint): Return immediate on fail to
5707 fit part of the watchpoint in the debug registers.
5708 (i386_update_inferior_debug_regs): New.
5709 (i386_low_insert_watchpoint): Work on a local mirror of the debug
5710 registers, and only update the inferior on success.
5711 (i386_low_remove_watchpoint): Ditto.
5712
d26e3629
KY
57132011-07-22 Kwok Cheung Yeung <kcy@codesourcery.com>
5714
5715 * linux-low.c (compare_ints, unique, list_threads, show_process,
5716 linux_core_of_thread): Delete.
5717 (linux_target_ops): Change linux_core_of_thread to
5718 linux_common_core_of_thread.
5719 (linux_qxfer_osdata): Defer to linux_common_xfer_osdata.
5720 * utils.c (malloc_failure): Change type of argument.
5721 (xmalloc, xrealloc, xcalloc, xsnprintf): Delete.
5722 * Makefile.in (SFILES): Add common/common-utils.c, common/xml-utils.c,
5723 common/linux-osdata.c, common/ptid.c and common/buffer.c.
5724 (OBS): Add xml-utils.o, common-utils.o, ptid.o and buffer.o.
5725 (IPA_OBJS): Add common-utils-ipa.o.
5726 (ptid_h, linux_osdata_h): New macros.
5727 (server_h): Add common/common-utils.h, common/xml-utils.h,
5728 common/buffer.h, common/gdb_assert.h, common/gdb_locale.h and
5729 common/ptid.h.
5730 (common-utils-ipa.o, common-utils.o, xml-utils.o, linux-osdata.o,
5731 ptid.o, buffer.o): New rules.
5732 (linux-low.o): Add common/linux-osdata.h as a dependency.
5733 * configure.srv (srv_tgtobj): Add linux-osdata.o to Linux targets.
5734 * configure.ac: Add AC_HEADER_DIRENT check.
5735 * config.in: Regenerate.
5736 * configure: Regenerate.
5737 * remote-utils.c (xml_escape_text): Delete.
5738 (buffer_grow, buffer_free, buffer_init, buffer_finish,
5739 buffer_xml_printf): Move to common/buffer.c.
5740 * server.c (main): Remove call to initialize_inferiors.
5741 * server.h (struct ptid, ptid_t, minus_one_ptid, null_ptid,
5742 ptid_build, pid_to_ptid, ptid_get_pid, ptid_get_lwp, ptid_get_tid,
5743 ptid_equal, ptid_is_pid, initialize_inferiors, xml_escape_text,
5744 internal_error, gdb_assert, gdb_assert_fail): Delete.
5745 (struct buffer, buffer_grow, buffer_free, buffer_init, buffer_finish,
5746 buffer_xml_printf, buffer_grow_str, buffer_grow_str0): Move to
5747 common/buffer.h.
5748 * inferiors.c (null_ptid, minus_one_ptid, ptid_build, pid_to_ptid,
5749 ptid_get_pid, ptid_get_lwp, ptid_get_tid, ptid_equal, ptid_is_pid,
5750 initialize_inferiors): Delete.
5751
2275a1a7
PA
57522011-07-20 Pedro Alves <pedro@codesourcery.com>
5753
5754 * tracepoint.c (tracepoint_look_up_symbols): Return upon the first
5755 symbol error.
5756
0a5b1e09
PA
57572011-05-31 Pedro Alves <pedro@codesourcery.com>
5758
5759 * linux-x86-low.c (i386_dr_low_get_addr): Fix off by one in
5760 assertion.
5761 * win32-i386-low.c (i386_dr_low_get_addr): Ditto.
5762
6938fd34
YQ
57632011-05-26 Yao Qi <yao@codesourcery.com>
5764
5765 * Makefile.in (thread-db.o): Track dependence to
5766 common/gdb_thread_db.h.
5767 * thread-db.c: include gdb_thread_db.h from right place.
5768
b481f9e0
TT
57692011-05-16 Adrian Cornish <gnu@bluedreamer.com>
5770
5771 * linux-i386-ipa.c (supply_static_tracepoint_registers): Pass
5772 __FILE__ and __LINE__ to internal_error.
5773
98a5dd13
DE
57742011-05-13 Doug Evans <dje@google.com>
5775
5776 * thread-db.c (try_thread_db_load_from_sdir): New function.
5777 (try_thread_db_load_from_dir): New function.
5778 (thread_db_load_search): Handle $sdir, ignore $pdir.
5779 Remove trying of system directories if search of
5780 libthread-db-search-path fails, that is now done via $sdir.
5781
d248b706
KY
57822011-05-12 Kwok Cheung Yeung <kcy@codesourcery.com>
5783
5784 * server.c (handle_query): Add EnableDisableTracepoints to the list
5785 of supported features.
43aaf8b6 5786 * tracepoint.c (clear_installed_tracepoints): Uninstall disabled
d248b706 5787 tracepoints.
43aaf8b6
PA
5788 (cmd_qtenable_disable): New.
5789 (cmd_qtstart): Install tracepoints even if disabled.
5790 (handle_tracepoint_general_set): Add call to cmd_qtenable_disable on
5791 receiving a QTEnable or QTDisable packet.
5792 (gdb_collect): Skip data collection if fast tracepoint is disabled.
5793 (ust_marker_to_static_tracepoint): Do not ignore disabled static
5794 tracepoints.
5795 (gdb_probe): Skip data collection if static tracepoint is disabled.
d248b706 5796
84e578fb
DE
57972011-05-10 Doug Evans <dje@google.com>
5798
5799 * thread-db.c (thread_db_handle_monitor_command): Handle elided path.
5800
71f55dd8
DE
58012011-05-04 Doug Evans <dje@google.com>
5802
5803 * linux-low.c (linux_join): Skip process lookup.
5804 * spu-low.c (spu_join): Ditto.
5805 * server.c (join_inferiors_callback): Delete.
5806 (process_serial_event): For 'D' packet (detach) call join_inferior
5807 directly.
5808
4d393d60
JM
58092011-05-04 Joseph Myers <joseph@codesourcery.com>
5810
5811 * README: Don't mention xscale*-*-linux*.
5812 * configure.srv (xscale*-*-linux*): Don't handle target.
5813
b00ad6ff
NF
58142011-04-27 Nathan Froyd <froydnj@codesourcery.com>
5815
5816 * linux-x86-low.c (amd64_emit_const): Call memcpy instead of
5817 casting pointers.
5818 (amd64_emit_reg, amd64_emit_int_call_1, amd64_emit_void_call_2):
5819 (i386_emit_const, i386_emit_reg, i386_emit_int_call_1):
5820 (i386_emit_void_call_2): Likewise.
5821
af96c192
YQ
58222011-04-26 Yao Qi <yao@codesourcery.com>
5823
43aaf8b6
PA
5824 * linux-low.c: Move common macros to linux-ptrace.h.
5825 Include linux-ptrace.h.
af96c192
YQ
5826 * Makefile.in (linux_ptrace_h): New.
5827 (linux-low.o): Depends on linux-ptrace.h.
5828
03f2bd59
JK
58292011-04-24 Jan Kratochvil <jan.kratochvil@redhat.com>
5830
5831 * remote-utils.c (handle_accept_event): Close LISTEN_DESC only if
5832 RUN_ONCE. Comment for the LISTEN_DESC delete_file_handler call.
5833 (remote_prepare): New function with most of the TCP code from ...
5834 (remote_open): ... here. Detect PORT here unconditionally. Move also
5835 setting transport_is_reliable.
5836 * server.c (run_once): New variable.
5837 (gdbserver_usage): Document it.
5838 (main): Set run_once for `--once'. Call remote_prepare. Exit after
5839 the first run if RUN_ONCE.
5840 * server.h (run_once, remote_prepare): New declarations.
5841
7a9dd1b2
TT
58422011-04-19 Tom Tromey <tromey@redhat.com>
5843
5844 * win32-low.c (handle_load_dll): Remove duplicate "the".
5845
81239425
PM
58462011-04-07 Pierre Muller <muller@ics.u-strasbg.fr>
5847
5848 Remove support for old Cygwin 1.5 versions.
5849 * win32-low.c (win32_create_inferior): Use new cygwin_path_list
5850 function to avoid warning.
5851 (win32_add_one_solib): Use cygwin_conv_path function to avoid
5852 warning.
5853
9e0627f1
PM
58542011-03-18 Pierre Muller <muller@ics.u-strasbg.fr>
5855
5856 * gdbserver/server.h (Macro _): Define it if not available.
5857
588eebee
MS
58582011-03-14 Michael Snyder <msnyder@vmware.com>
5859
348af9f7 5860 * hostio.c (handle_close): Remove unnecessary null test.
588eebee 5861
43f70d4c
JB
58622011-03-10 Joel Brobecker <brobecker@adacore.com>
5863
5864 * Makefile.in (maintainer-clean realclean distclean): Remove
5865 "make ... subdir_do" command.
5866
348af9f7
MS
58672011-03-10 Michael Snyder <msnyder@vmware.com>
5868
5869 * tracepoint.c (tracepoint_finish_step): Fix loop variable.
5870
5871 * server.c (handle_v_run): Free alloced buffer on early return.
5872
e637a4f5
YQ
58732011-03-09 Yao Qi <yao@codesourcery.com>
5874
5875 Revert:
5876 2011-03-04 Yao Qi <yao@codesourcery.com>
5877
5878 * Makefile.in: Remove GNU make feature --directory.
5879
5880 2011-03-05 Yao Qi <yao@codesourcery.com>
5881
5882 * Makefile.in (CLEANDIRS, REQUIRED_SUBDIRS): New variable.
5883 (subdir_do): New make target. Copied from gdb/Makefile.
5884 (maintainer-clean, realclean, distclean, clean): Call corresponding
5885 make targets in common/Makefile.
5886
5887 2011-02-11 Yao Qi <yao@codesourcery.com>
5888
5889 * configure.ac: Call AC_PROG_RANLIB.
5890 * Makefile.in: Remove signals.o from OBS. Link libcommon.a.
5891 * configure: Regenerate.
5892
e6edda56
JK
58932011-03-07 Jan Kratochvil <jan.kratochvil@redhat.com>
5894
5895 * remote-utils.c (putpkt_binary_1): Calculate BUF2 size dynamically.
5896
e5141119
JB
58972011-03-06 Yao Qi <yao@codesourcery.com>
5898
5899 * Makefile.in (REQUIRED_SUBDIRS): Remove $(LIBCOMMON_DIR).
5900
64794aa4
JB
59012011-03-05 Yao Qi <yao@codesourcery.com>
5902
5903 * Makefile.in (CLEANDIRS, REQUIRED_SUBDIRS): New variable.
5904 (subdir_do): New make target. Copied from gdb/Makefile.
5905 (maintainer-clean, realclean, distclean, clean): Call corresponding
5906 make targets in common/Makefile.
5907
7a762829
YQ
59082011-03-04 Yao Qi <yao@codesourcery.com>
5909
5910 * Makefile.in: Remove GNU make feature --directory.
5911
348af9f7
MS
59122011-03-04 Michael Snyder <msnyder@vmware.com>
5913
5914 * server.c (queue_stop_reply): Call xmalloc not malloc.
5915
59162011-03-02 Michael Snyder <msnyder@vmware.com>
5917
5918 * linux-arm-low.c (arm_arch_setup): Replace malloc with xmalloc.
5919
9f72fee2
MS
59202011-02-28 Michael Snyder <msnyder@vmware.com>
5921
588eebee
MS
5922 * tracepoint.c (cmd_qtv): Discard unused value 'packet'.
5923 (cmd_qtframe): Ditto.
5924 (cmd_qtbuffer): Ditto.
5925 (cmd_bigqtbuffer): Ditto.
5926
9f72fee2
MS
5927 * utils.c (decimal2str): Initialize 'width' to nine, then
5928 don't mess with it.
5929
8040bd49
UW
59302011-02-28 Ulrich Weigand <uweigand@de.ibm.com>
5931
5932 * hostio.c (require_data): Free *data, not data.
5933
7e52cbd0
JK
59342011-02-28 Jan Kratochvil <jan.kratochvil@redhat.com>
5935
5936 * hostio.c (require_data): Use free, not xfree.
5937
9130f83e
MS
59382011-02-27 Michael Snyder <msnyder@vmware.com>
5939
4b812f4e
MS
5940 * server.c (handle_query): Discard unused value.
5941
9130f83e
MS
5942 * hostio.c (require_data): Free malloc memory before returning
5943 error.
5944
69d37113
MS
59452011-02-26 Michael Snyder <msnyder@vmware.com>
5946
5947 * linux-low.c (list_threads): Call closedir for dirent.
5948
35f5825a
MS
59492011-02-27 Michael Snyder <msnyder@vmware.com>
5950
2a589cef
MS
5951 * i386-low.c (i386-length_and_rw_bits): Comment the fact that
5952 a case statement falls through.
5953
0adea5f7
MS
5954 * linux-low.c (linux_xfer_siginfo): Fix fencepost error.
5955
35f5825a
MS
5956 * linux-amd64-ipa.c (gdb_agent_get_raw_reg): Fix fencepost error
5957 in comparison.
5958
238f1c74
MS
59592011-02-26 Michael Snyder <msnyder@vmware.com>
5960
5961 * utils.c (decimal2str): Eliminate dead code and dead param.
5962 (pulongest): Drop dead param from call to decimal2str.
5963 (plongest): Ditto.
5964
633ff500
JB
59652011-02-24 Joel Brobecker <brobecker@adacore.com>
5966
5967 Revert the following patch (not approved yet):
5968 2011-02-21 Hui Zhu <teawater@gmail.com>
5969 * tracepoint.c (tp_printf): New function.
5970 (eval_agent_expr): Handle gdb_agent_op_printf.
5971
f9c6ff72
HZ
59722011-02-21 Hui Zhu <teawater@gmail.com>
5973
5974 * tracepoint.c (tp_printf): New function.
5975 (eval_agent_expr): Handle gdb_agent_op_printf.
5976
94d5e490
TT
59772011-02-18 Tom Tromey <tromey@redhat.com>
5978
5979 * Makefile.in (tracepoint-ipa.o): Depend on ax.def.
5980 (tracepoint.o): Likewise.
5981 * tracepoint.c (enum gdb_agent_op): Use ax.def.
5982 (gdb_agent_op_names): Likewise.
5983
c7f96d2b
TT
59842011-02-18 Tom Tromey <tromey@redhat.com>
5985
5986 * tracepoint.c (enum gdb_agent_op) <gdb_agent_op_pick,
5987 gdb_agent_op_rot>: New constants.
5988 (gdb_agent_op_names): Add pick and roll.
5989 (eval_agent_expr) <gdb_agent_op_pick, gdb_agent_op_rot>: New
5990 cases.
5991
0feedb2c
JK
59922011-02-15 Jan Kratochvil <jan.kratochvil@redhat.com>
5993
5994 * aclocal.m4: Regenerated with aclocal-1.11.1.
5995
b3b9301e
PA
59962011-02-14 Pedro Alves <pedro@codesourcery.com>
5997
5998 * server.c (handle_qxfer_traceframe_info): New.
5999 (qxfer_packets): Register "traceframe-info".
6000 (handle_query): Report support for qXfer:traceframe-info:read+.
6001 * tracepoint.c (match_blocktype): New.
6002 (traceframe_find_block_type): Rename to ...
6003 (traceframe_walk_blocks): ... this. Add callback filter argument,
6004 and use it.
6005 (traceframe_find_block_type): New, reimplemented on top of
6006 traceframe_walk_blocks.
6007 (build_traceframe_info_xml): New.
6008 (traceframe_read_info): New.
6009 * server.h (traceframe_read_info): Declare.
6010
4f3e6fb7
YQ
60112011-02-11 Yao Qi <yao@codesourcery.com>
6012
6013 * configure.ac: Call AC_PROG_RANLIB.
6014 * Makefile.in: Remove signals.o from OBS. Link libcommon.a.
6015 * configure: Regenerate.
6016
764880b7
PA
60172011-02-07 Pedro Alves <pedro@codesourcery.com>
6018
6019 * server.c (gdb_read_memory): Change return semantics to allow
6020 partial transfers.
6021 (handle_search_memory_1): Adjust.
6022 (process_serial_event) <'m' packet>: Handle partial transfers.
6023 * tracepoint.c (traceframe_read_mem): Handle partial transfers.
6024
1c79eb8a
PA
60252011-01-28 Pedro Alves <pedro@codesourcery.com>
6026
6027 * regcache.c (init_register_cache): Initialize
6028 regcache->register_status.
6029 (free_register_cache): Release regcache->register_status.
6030 (regcache_cpy): Copy register_status.
6031 (registers_to_string): Print 'x's for unavailable registers.
6032 (supply_register): Mark the register's status valid or
6033 unavailable, depending on whether a buffer was passed in or not.
6034 (supply_register_zeroed): New.
6035 (supply_regblock): Mark the registers' status valid or
6036 unavailable, depending on whether a buffer was passed in or not.
6037 * regcache.h (REG_UNAVAILABLE, REG_VALID): New defines.
6038 (struct regcache): New `register_status' field.
6039 (supply_register_zeroed): Declare.
6040 * i387-fp.c (i387_xsave_to_cache): Zero out registers using
6041 supply_register_zeroed, rather than passing a NULL buffer to
6042 supply_register.
6043 * tracepoint.c (fetch_traceframe_registers): Update comment.
6044
85724a0e
PA
60452011-01-28 Pedro Alves <pedro@codesourcery.com>
6046
6047 * i387-fp.c (i387_xsave_to_cache): Make passing NULL as register
6048 buffer explicit.
6049
d08aafef
PA
60502011-01-25 Pedro Alves <pedro@codesourcery.com>
6051
6052 * server.h (decode_xfer_write): Change prototype.
6053 * remote-utils.c (decode_xfer_write): Remove `annex' parameter,
6054 and don't extract the annex here.
6055 * server.c (decode_xfer_read): Remove `annex' parameter,
6056 and don't extract the annex here.
6057 (decode_xfer): New.
6058 (struct qxfer): New.
6059 (handle_qxfer_auxv, handle_qxfer_features, handle_qxfer_libraries)
6060 (handle_qxfer_osdata, handle_qxfer_siginfo, handle_qxfer_spu)
6061 (handle_qxfer_statictrace): New functions, abstracted out from
6062 handle_query, and made to use the struct qxfer interface.
6063 (handle_threads_qxfer_proper): Rename to ...
6064 (handle_qxfer_threads_proper): ... this.
6065 (handle_threads_qxfer): Rename to ...
6066 (handle_qxfer_threads): ... this. Adjust.
6067 (qxfer_packets): New array.
6068 (handle_qxfer): New function.
6069 (handle_query): Use handle_qxfer.
6070
493e2a69
MS
60712011-01-05 Michael Snyder <msnyder@msnyder-server.eng.vmware.com>
6072
6073 * gdbreplay.c: Shorten lines of >= 80 columns.
6074 * linux-low.c: Ditto.
6075 * linux-ppc-low.c: Ditto.
6076 * linux-s390-low.c: Ditto.
6077 * linux-sparc-low.c: Ditto.
6078 * linux-x86-low.c: Ditto.
6079 * linux-xtensa-low.c: Ditto.
6080 * mem-break.c: Ditto.
6081 * nto-low.c: Ditto.
6082 * regcache.h: Ditto.
6083 * remote-utils.c: Ditto.
6084 * server.c: Ditto.
6085 * server.h: Ditto.
6086 * thread-db.c: Ditto.
6087 * tracepoint.c: Ditto.
6088 * utils.c: Ditto.
6089 * win32-low.h: Ditto.
6090
44944448
JB
60912011-01-05 Joel Brobecker <brobecker@adacore.com>
6092
6093 * gdbserver/configure.ac, gdbserver/gdbserver.1: Copyright year
6094 update.
6095
71ce852c
JB
60962011-01-01 Joel Brobecker <brobecker@adacore.com>
6097
6098 * server.c (gdbserver_version): Update copyright year in version
6099 output.
6100 * gdbreplay.c (gdbreplay_version): Ditto.
6101
eb826dc6
MF
61022010-12-29 Jie Zhang <jie.zhang@analog.com>
6103
6104 * configure.srv (bfin-*-*linux*): Handle Blackfin/Linux targets.
6105 * linux-bfin-low.c: New file.
6106 * linux-low.c: Define PT_TEXT_ADDR, PT_TEXT_END_ADDR, and
6107 PT_DATA_ADDR for BFIN targets.
6108 * Makefile.in (SFILES): Add linux-bfin-low.c.
6109 (clean): Remove reg-bfin.c.
6110 (linux-bfin-low.o, reg-bfin.o, reg-bfin.c): New targets.
6111 * README: Mention supported Blackfin targets.
6112
39ab222a
MF
61132010-12-23 Mike Frysinger <vapier@gentoo.org>
6114
6115 * .gitignore: New file.
6116
a1f2ce7d
MF
61172010-11-16 Mike Frysinger <vapier@gentoo.org>
6118
6119 * linux-low.c (linux_tracefork_child): Add char* cast to arg.
6120
f474844c
JZ
61212010-10-22 Jie Zhang <jie@codesourcery.com>
6122
6123 * Makefile.in: Add FLAGS_TO_PASS variable.
6124 (install): Remove dependency of install-only and recursively
6125 invoke make for install-only.
6126
f1048712
DE
61272010-10-04 Doug Evans <dje@google.com>
6128
6129 * Makefile.in (uninstall): Use $(DESTDIR).
6130
b53a1623
PA
61312010-09-24 Pedro Alves <pedro@codesourcery.com>
6132
e6ee044d
PA
6133 PR gdb/11842
6134
b53a1623
PA
6135 * linux-x86-low.c (compat_siginfo_from_siginfo)
6136 (siginfo_from_compat_siginfo): Also copy si_pid and si_uid when
6137 si_code is < 0. Check for si_code == SI_TIMER before checking for
6138 si_code < 0.
6139
fa1bd1e4
JB
61402010-09-13 Joel Brobecker <brobecker@adacore.com>
6141
6142 * lynx-i386-low.c: New file.
6143 * configure.srv: Add handling of i[34567]86-*-lynxos* targets.
6144
47fac8f8
JB
61452010-09-13 Joel Brobecker <brobecker@adacore.com>
6146
6147 * lynx-low.c (ptrace_request_to_str): Remove handling for
6148 request values that have been removed in LynxOS 5.x.
6149
1adfc54d
JB
61502010-09-13 Joel Brobecker <brobecker@adacore.com>
6151
6152 * lynx-low.c, lynx-ppc-loc.c: Include <sys/ptrace.h> instead of
6153 <ptrace.h>
6154
c2a66c29
NS
61552010-09-09 Nathan Sidwell <nathan@codesourcery.com>
6156
6157 * configure.ac: Add --enable-inprocess-agent option.
6158 * configure: Rebuilt.
6159
32fcada3
YQ
61602010-09-06 Yao Qi <yao@codesourcery.com>
6161
6162 * linux-low.c (linux_kill): Remove unused variable.
6163 (linux_stabilize_threads): Likewise.
6164 * server.c (start_inferior): Likewise.
6165 (queue_stop_reply_callback): Likewise.
6166 * tracepoint.c (do_action_at_tracepoint): Likewise.
6167
0cccb683
YQ
61682010-09-06 Yao Qi <yao@codesourcery.com>
6169
6170 * linux-low.c (maybe_move_out_of_jump_pad): Restore current_inferior
6171 on return.
6172
423ec54c
JK
61732010-09-06 Jan Kratochvil <jan.kratochvil@redhat.com>
6174
6175 * target.c (mywait) <TARGET_WAITKIND_EXITED>: Fix to use INTEGER.
6176
12ac6819
PA
61772010-09-06 Pedro Alves <pedro@codesourcery.com>
6178
6179 * Makefile.in (install-only): Replace $IPA_DEPFILES with
6180 "$(IPA_DEPFILES)".
6181
8ed54b31
JB
61822010-09-01 Joel Brobecker <brobecker@adacore.com>
6183
6184 * gdbserver/lynx-low.c, gdbserver/lynx-low.h,
6185 gdbserver/lynx-ppc-low.c: New files.
6186 * Makefile.in (lynx_low_h): New variable.
6187 (lynx-low.o, lynx-ppc-low.o): New rules.
6188 * configure.ac: On LynxOS, link with -lnetinet.
6189 * configure.srv: Add handling of powerpc-*-lynxos* targets.
6190 * configure: regenerate.
6191
bb0116a4
JB
61922010-09-01 Joel Brobecker <brobecker@adacore.com>
6193
6194 * Makefile.in (vasprintf.o, vsnprintf.o): New rules.
6195 * configure.ac: Add check for vasprintf and vsnprintf.
6196 * configure, config.in: Regenerate.
6197 * server.h (vasprintf, vsnprintf): Add conditional declarations.
6198
a778ab81 61992010-09-01 Joel Brobecker <brobecker@adacore.com>
6200
6201 * gdbreplay.c: Move include of alloca.h up, next to include of
6202 malloc.h.
6203 * server.h: Add include of malloc.h.
6204 * mem-break.c: Remove include of malloc.h.
6205 * server.c, tracepoint.c, utils.c, win32-low.c: Likewise.
6206
8b034a19 62072010-09-01 Joel Brobecker <brobecker@adacore.com>
6208
6209 * Makefile.in (memmem.o): Build with -Wno-error.
6210
62112010-09-01 Joel Brobecker <brobecker@adacore.com>
6212
6213 * utils.c (xsnprintf): Make non-static.
6214 * server.h: Add xsnprintf declaration.
6215 * linux-low.c, nto-low.c, target.c, thread-db.c, tracepoint.c:
6216 replace calls to snprintf by calls to xsnprintf throughout.
6217
62182010-09-01 Joel Brobecker <brobecker@adacore.com>
6219
6220 * configure.ac: Add configure check for alloca.
6221 * configure, config.in: Regenerate.
6222 * server.h: Include alloca.h if it exists.
6223 * gdbreplay.c: Include alloca.h if it exists.
6224
1a981360
PA
62252010-08-28 Pedro Alves <pedro@codesourcery.com>
6226
6227 * linux-low.c (__SIGRTMIN): Define if not already defined.
6228 (linux_create_inferior): Check for __ANDROID__ rather than
6229 __SIGRTMIN.
6230 (enqueue_one_deferred_signal): Don't requeue non-RT signals that
6231 are already deferred.
6232 (linux_wait_1): Check for __ANDROID__ rather than __SIGRTMIN.
6233 (linux_resume_one_thread): Don't queue a SIGSTOP if the lwp is
6234 stopped and already has a pending signal to report.
6235 (proceed_one_lwp): : Don't queue a SIGSTOP if the lwp already has
6236 a pending signal to report or is moving out of a jump pad.
6237 (linux_init_signals): Check for __ANDROID__ rather than
6238 __SIGRTMIN.
6239
b4d51a55
PA
62402010-08-28 Pedro Alves <pedro@codesourcery.com>
6241
6242 * linux-low.c (linux_stabilize_threads): Wrap debug output in a
6243 debug_threads check. Avoid a linear search when not doing debug
6244 output.
6245
ec48365d
PA
62462010-08-27 Pedro Alves <pedro@codesourcery.com>
6247
6248 * event-loop.c (event_handle_func): Adjust to use gdb_fildes_t.
6249 (struct gdb_event) <fd>: Change type to gdb_fildes_t.
6250 (struct file_handler) <fd>: Change type to gdb_fildes_t.
6251 (process_event): Change local fd's type to gdb_fildes_t.
6252 (create_file_handler): Adjust prototype.
6253 (delete_file_handler): Adjust prototype.
6254 (handle_file_event): Adjust prototype. Use pfildes.
6255 (create_file_event): Adjsut prototype.
6256 * remote-utils.c (remote_desc, listen_desc): Change type to
6257 gdb_fildes_t.
6258 * server.h: New gdb_fildes_t typedef.
6259 [USE_WIN32API]: Include winsock2.h.
6260 (delete_file_handler, add_file_handler): Adjust prototypes.
6261 (pfildes): Declare.
6262 * utils.c (pfildes): New.
6263
854d88f0
PA
62642010-08-27 Pedro Alves <pedro@codesourcery.com>
6265
6266 * configure.ac (build_warnings): Add -Wno-char-subscripts.
6267 * configure: Regenerate.
6268
0146f85b
PA
62692010-08-27 Pedro Alves <pedro@codesourcery.com>
6270
6271 * linux-low.c (linux_unprepare_to_access_memory): Rename to ...
6272 (linux_done_accessing_memory): ... this.
6273 (linux_target_ops): Adjust.
6274 * linux-x86-low.c (x86_insert_point, x86_remove_point): Adjust.
6275 * nto-low.c (nto_target_ops): Adjust comment.
6276 * server.c (gdb_read_memory, gdb_write_memory): Adjust.
6277 * spu-low.c (spu_target_ops): Adjust comment.
6278 * target.h (target_ops): Rename unprepare_to_access_memory field
6279 to done_accessing_memory.
6280 (unprepare_to_access_memory): Rename to ...
6281 (done_accessing_memory): ... this.
6282
90d74c30
PA
62832010-08-26 Pedro Alves <pedro@codesourcery.com>
6284
6285 * linux-low.c (linux_prepare_to_access_memory): New.
6286 (linux_unprepare_to_access_memory): New.
6287 (linux_target_ops): Install them.
6288 * server.c (read_memory): Rename to ...
6289 (gdb_read_memory): ... this. Use
6290 prepare_to_access_memory/prepare_to_access_memory.
6291 (write_memory): Rename to ...
6292 (gdb_write_memory): ... this. Use
6293 prepare_to_access_memory/prepare_to_access_memory.
6294 (handle_search_memory_1): Adjust.
6295 (process_serial_event): Adjust.
6296 * target.h (struct target_ops): New fields
6297 prepare_to_access_memory and unprepare_to_access_memory.
6298 (prepare_to_access_memory, unprepare_to_access_memory): New.
6299 * linux-x86-low.c (x86_insert_point, x86_remove_point): Use
6300 prepare_to_access_memory/prepare_to_access_memory.
6301 * nto-low.c (nto_target_ops): Adjust.
6302 * spu-low.c (spu_target_ops): Adjust.
6303 * win32-low.c (win32_target_ops): Adjust.
6304
fd467969
PA
63052010-08-26 Pedro Alves <pedro@codesourcery.com>
6306
6307 * Makefile.in (WARN_CFLAGS): Get it from configure.
6308 (WERROR_CFLAGS): New.
6309 (INTERNAL_CFLAGS): Add WERROR_CFLAGS.
6310 * configure.ac: Introduce --enable-werror, which adds -Werror to
6311 the compiler command line. Enabled by default. Disable with
6312 --disable-werror. Add -Wdeclaration-after-statement
6313 Wpointer-arith and -Wformat-nonliteral to warning flags.
6314 * configure: Regenerate.
6315
331e2f5f
PA
63162010-08-26 Pedro Alves <pedro@codesourcery.com>
6317
6318 * mem-break.c [HAVE_MALLOC_H]: Include malloc.h.
6319
e581f2b4
PA
63202010-08-26 Pedro Alves <pedro@codesourcery.com>
6321
6322 * gdbreplay.c (remote_error): New.
6323 (gdbchar): New.
6324 (expect): Use gdbchar. Check for error reading from GDB.
6325 Clarify sync error output.
6326 (play): Check for errors writing to GDB.
6327 * linux-low.c (sigchld_handler): Really ignore `write' errors.
6328 * remote-utils.c (getpkt): Check for errors writing to the remote
6329 descriptor.
6330
3c11dd79
PA
63312010-08-25 Pedro Alves <pedro@codesourcery.com>
6332
6333 * linux-low.c (linux_wait_1): Move non-debugging code out of
6334 `debug_threads' control.
6335
d20a8ad9
PA
63362010-08-25 Pedro Alves <pedro@codesourcery.com>
6337
6338 * linux-low.c (linux_wait_1): Don't set last_status here.
6339 * server.c (push_event, queue_stop_reply_callback): Assert we're
6340 not pushing a TARGET_WAITKIND_IGNORE event.
6341 (start_inferior, start_inferior, attach_inferior, handle_v_cont)
6342 (myresume, handle_target_event): Set the thread's last_resume_kind
6343 and last_status from the target returned status.
6344
964e4306
PA
63452010-08-25 Pedro Alves <pedro@codesourcery.com>
6346
6347 PR threads/10729
6348
6349 * linux-x86-low.c (update_debug_registers_callback): New.
6350 (i386_dr_low_set_addr): Use it.
6351 (i386_dr_low_get_addr): New.
6352 (i386_dr_low_set_control): Use update_debug_registers_callback.
6353 (i386_dr_low_get_control): New.
6354 (i386_dr_low_get_status): Adjust.
6355 * linux-low.c (linux_stop_lwp): New.
6356 * linux-low.h (linux_stop_lwp): Declare.
6357
6358 * i386-low.c (I386_DR_GET_RW_LEN): Take the dr7 contents as
6359 argument instead of a i386_debug_reg_state.
6360 (I386_DR_WATCH_HIT): Take the dr6 contents as argument instead of
6361 a i386_debug_reg_state.
6362 (i386_insert_aligned_watchpoint): Adjust.
6363 (i386_remove_aligned_watchpoint): Adjust.
6364 (i386_low_stopped_data_address): Read the debug registers from the
6365 inferior instead of from the mirrors.
6366 * i386-low.h (struct i386_debug_reg_state): Extend comment.
6367 (i386_dr_low_get_addr): Declare.
6368 (i386_dr_low_get_control): Declare.
6369 (i386_dr_low_get_status): Change prototype.
6370
6371 * win32-i386-low.c (dr_status_mirror, dr_control_mirror): New globals.
6372 (i386_dr_low_get_addr): New.
6373 (i386_dr_low_get_control): New.
6374 (i386_dr_low_get_status): Adjust prototype. Return
6375 dr_status_mirror.
6376 (i386_initial_stuff): Clear dr_status_mirror and
6377 dr_control_mirror.
6378 (i386_get_thread_context): Adjust.
6379 (i386_set_thread_context): Adjust.
6380 (i386_thread_added): Adjust.
6381
5f21a75b
PA
63822010-08-24 Pedro Alves <pedro@codesourcery.com>
6383
6384 * linux-low.h (linux_thread_area): Delete declaration.
6385
3e4c1235
TS
63862010-08-11 Thomas Schwinge <thomas@codesourcery.com>
6387
6388 * linux-low.c (linux_wait_1): Correctly return the ptid of the child
6389 after its termination.
6390
1971b033
PA
63912010-08-09 Pedro Alves <pedro@codesourcery.com>
6392
6393 * linux-low.c (gdb_wants_lwp_stopped): Delete.
6394 (gdb_wants_all_stopped): Delete.
6395 (linux_wait_1): Don't call them.
6396 * server.c (handle_v_cont): Tag all threads as want-stopped.
6397 (gdb_wants_thread_stopped): Fix comments. Tag the thread that
6398 stopped as "client-wants-stopped".
6399
310444ac
PA
64002010-07-31 Pedro Alves <pedro@codesourcery.com>
6401
6402 * Makefile.in (signals_h): New.
6403 (server_h): Depend on it.
6404 (server.o): Don't depend on $(signals_def).
6405 (signals.o): Depend on $(signals_def).
6406
a19cae16
JK
64072010-07-31 Jan Kratochvil <jan.kratochvil@redhat.com>
6408
6409 * Makefile.in (signals_def): New.
6410 (server_h): Append include/gdb/signals.h and signals_def.
6411 (server.o): Append signals_def.
6412
30d50328
JK
64132010-07-25 Jan Kratochvil <jan.kratochvil@redhat.com>
6414
6415 * server.c (handle_target_event): Use target_signal_to_host for
6416 resume_info.sig initialization.
6417 * target.h (struct thread_resume) <sig>: New comment.
6418
5c3216e2
OS
64192010-07-20 Ozkan Sezer <sezeroz@gmail.com>
6420
c6f46ca0
OS
6421 * server.c (handle_query): strcpy() the returned string from paddress()
6422 instead of sprintf().
5c3216e2
OS
6423 * utils.c (paddress): Return phex_nz().
6424
6bd31874
JB
64252010-07-07 Joel Brobecker <brobecker@adacore.com>
6426
6427 * server.c (handle_v_cont): Call mourn_inferior if process
6428 just exited.
6429 (myresume): Likewise.
6430
0fb4aa4b
PA
64312010-07-01 Pedro Alves <pedro@codesourcery.com>
6432
6433 Static tracepoints, and integration with UST.
6434
6435 * configure.ac: Handle --with-ust. substitute ustlibs and ustinc.
6436 * mem-break.c (uninsert_all_breakpoints)
6437 (reinsert_all_breakpoints): New.
6438 * mem-break.h (reinsert_all_breakpoints, uninsert_all_breakpoints):
6439 * tracepoint.c (ust_loaded, helper_thread_id, cmd_buf): New.
6440 (gdb_agent_ust_loaded, helper_thread_id)
6441 (gdb_agent_helper_thread_id): New macros.
6442 (struct ipa_sym_addresses): Add addr_ust_loaded,
6443 addr_helper_thread_id, addr_cmd_buf.
6444 (symbol_list): Add ust_loaded, helper_thread_id, cmd_buf.
6445 (in_process_agent_loaded_ust): New.
6446 (write_e_ust_not_loaded): New.
6447 (maybe_write_ipa_ust_not_loaded): New.
6448 (struct collect_static_trace_data_action): New.
6449 (enum tracepoint_type) <static_tracepoint>: New.
6450 (struct tracepoint) <handle>: Mention static tracepoints.
6451 (struct static_tracepoint_ctx): New.
6452 (CMD_BUF_SIZE): New.
6453 (add_tracepoint_action): Handle static tracepoint actions.
6454 (unprobe_marker_at): New.
6455 (clear_installed_tracepoints): Handle static tracepoints.
6456 (cmd_qtdp): Handle static tracepoints.
6457 (probe_marker_at): New.
6458 (cmd_qtstart): Handle static tracepoints.
6459 (response_tracepoint): Handle static tracepoints.
6460 (cmd_qtfstm, cmd_qtsstm, cmd_qtstmat): New.
6461 (handle_tracepoint_query): Handle qTfSTM, qTsSTM and qTSTMat.
6462 (get_context_regcache): Handle static tracepoints.
6463 (do_action_at_tracepoint): Handle static tracepoint actions.
6464 (traceframe_find_block_type): Handle static trace data blocks.
6465 (traceframe_read_sdata): New.
6466 (download_tracepoints): Download static tracepoint actions.
6467 [HAVE_UST] Include ust/ust.h, dlfcn.h, sys/socket.h, and sys/un.h.
6468 (GDB_PROBE_NAME): New.
6469 (ust_ops): New.
6470 (GET_UST_SYM): New.
6471 (USTF): New.
6472 (dlsym_ust): New.
6473 (ust_marker_to_static_tracepoint): New.
6474 (gdb_probe): New.
6475 (collect_ust_data_at_tracepoint): New.
6476 (gdb_ust_probe): New.
6477 (UNIX_PATH_MAX, SOCK_DIR): New.
6478 (gdb_ust_connect_sync_socket): New.
6479 (resume_thread, stop_thread): New.
6480 (run_inferior_command): New.
6481 (init_named_socket): New.
6482 (gdb_ust_socket_init): New.
6483 (cstr_to_hexstr): New.
6484 (next_st): New.
6485 (first_marker, next_marker): New.
6486 (response_ust_marker): New.
6487 (cmd_qtfstm, cmd_qtsstm): New.
6488 (unprobe_marker_at, probe_marker_at): New.
6489 (cmd_qtstmat, gdb_ust_thread): New.
6490 (gdb_ust_init): New.
6491 (initialize_tracepoint_ftlib): Call gdb_ust_init.
6492 * linux-amd64-ipa.c [HAVE_UST]: Include ust/processor.h
6493 (ST_REGENTRY): New.
6494 (x86_64_st_collect_regmap): New.
6495 (X86_64_NUM_ST_COLLECT_GREGS): New.
6496 (AMD64_RIP_REGNUM): New.
6497 (supply_static_tracepoint_registers): New.
6498 * linux-i386-ipa.c [HAVE_UST]: Include ust/processor.h
6499 (ST_REGENTRY): New.
6500 (i386_st_collect_regmap): New.
6501 (i386_NUM_ST_COLLECT_GREGS): New.
6502 (supply_static_tracepoint_registers): New.
6503 * server.c (handle_query): Handle qXfer:statictrace:read.
6504 <qSupported>: Report support for StaticTracepoints, and
6505 qXfer:statictrace:read features.
6506 * server.h (traceframe_read_sdata)
6507 (supply_static_tracepoint_registers): Declare.
6508 * remote-utils.c (convert_int_to_ascii, hexchars, ishex, tohex)
6509 (unpack_varlen_hex): Include in IPA build.
6510 * Makefile.in (ustlibs, ustinc): New.
6511 (IPA_OBJS): Add remote-utils-ipa.o.
6512 ($(IPA_LIB)): Link -ldl and -lpthread.
6513 (UST_CFLAGS): New.
6514 (IPAGENT_CFLAGS): Add UST_CFLAGS.
6515 * config.in, configure: Regenerate.
6516
9e4344e5
PA
65172010-06-20 Ian Lance Taylor <iant@google.com>
6518 Pedro Alves <pedro@codesourcery.com>
6519
6520 * linux-x86-low.c (always_true): Delete.
6521 (EMIT_ASM, EMIT_ASM32): Use an uncondition asm jmp instead of
6522 trying to fool the compiler with always_true.
6523
c6beb2cb
PA
65242010-06-20 Pedro Alves <pedro@codesourcery.com>
6525
6526 * tracepoint.c (condition_true_at_tracepoint): Don't run compiled
6527 conditions in gdbserver.
6528
d2ed6730
UW
65292010-06-19 Ulrich Weigand <uweigand@de.ibm.com>
6530
6531 * spu-low.c (spu_read_memory): Wrap around local store limit.
6532 (spu_write_memory): Likewise.
6533
4e29fb54
PA
65342010-06-15 Pedro Alves <pedro@codesourcery.com>
6535
6536 * linux-x86-low.c (amd64_emit_const, amd64_emit_void_call_2)
6537 (i386_emit_const, i386_emit_void_call_2): Replace int64_t uses with
6538 LONGEST uses.
6539 * server.h (struct emit_ops): Replace int64_t uses with LONGEST
6540 uses.
6541 * tracepoint.c (emit_const, emit_void_call_2): Replace int64_t
6542 uses with LONGEST uses.
6543
6a271cae
PA
65442010-06-14 Stan Shebs <stan@codesourcery.com>
6545 Pedro Alves <pedro@codesourcery.com>
6546
6547 Bytecode compiler.
6548
6549 * linux-x86-low.c: Include limits.h.
6550 (add_insns): New.
6551 (always_true): New.
6552 (EMIT_ASM): New.
6553 (EMIT_ASM32): New.
6554 (amd64_emit_prologue, amd64_emit_epilogue, amd64_emit_add)
6555 (amd64_emit_sub, amd64_emit_mul, amd64_emit_lsh)
6556 (amd64_emit_rsh_signed, amd64_emit_rsh_unsigned, amd64_emit_ext,
6557 (amd64_emit_log_not, amd64_emit_bit_and, amd64_emit_bit_or)
6558 (amd64_emit_bit_xor, amd64_emit_bit_not, amd64_emit_equal,
6559 (amd64_emit_less_signed, amd64_emit_less_unsigned, amd64_emit_ref,
6560 (amd64_emit_if_goto, amd64_emit_goto, amd64_write_goto_address)
6561 (amd64_emit_const, amd64_emit_call, amd64_emit_reg)
6562 (amd64_emit_pop, amd64_emit_stack_flush, amd64_emit_zero_ext)
6563 (amd64_emit_swap, amd64_emit_stack_adjust, amd64_emit_int_call_1)
6564 (amd64_emit_void_call_2): New.
6565 (amd64_emit_ops): New.
6566 (i386_emit_prologue, i386_emit_epilogue, i386_emit_add)
6567 (i386_emit_sub,i386_emit_mul, i386_emit_lsh, i386_emit_rsh_signed)
6568 (i386_emit_rsh_unsigned, i386_emit_ext, i386_emit_log_not)
6569 (i386_emit_bit_and, i386_emit_bit_or, i386_emit_bit_xor)
6570 (i386_emit_bit_not, i386_emit_equal, i386_emit_less_signed)
6571 (i386_emit_less_unsigned, i386_emit_ref, i386_emit_if_goto)
6572 (i386_emit_goto, i386_write_goto_address, i386_emit_const)
6573 (i386_emit_call, i386_emit_reg, i386_emit_pop)
6574 (i386_emit_stack_flush, i386_emit_zero_ext, i386_emit_swap)
6575 (i386_emit_stack_adjust, i386_emit_int_call_1)
6576 (i386_emit_void_call_2): New.
6577 (i386_emit_ops): New.
6578 (x86_emit_ops): New.
6579 (the_low_target): Install x86_emit_ops.
6580 * server.h (struct emit_ops): New.
6581 (get_raw_reg_func_addr): Declare.
6582 (current_insn_ptr, emit_error): Declare.
6583 * tracepoint.c (get_raw_reg, get_trace_state_variable_value)
6584 (set_trace_state_variable_value): New defines.
6585 (struct ipa_sym_addresses): New fields addr_get_raw_reg,
6586 addr_get_trace_state_variable_value and
6587 addr_set_trace_state_variable_value.
6588 (symbol_list): New fields for get_raw_reg,
6589 get_trace_state_variable_value and set_trace_state_variable_value.
6590 (condfn): New typedef.
6591 (struct tracepoint): New field `compiled_cond'.
6592 (do_action_at_tracepoint): Clear compiled_cond.
6593 (get_trace_state_variable_value, set_trace_state_variable_value):
6594 Export in the IPA.
6595 (condition_true_at_tracepoint): If there's a compiled condition,
6596 run that.
6597 (current_insn_ptr, emit_error): New globals.
6598 (struct bytecode_address): New.
6599 (get_raw_reg_func_addr): New.
6600 (emit_prologue, emit_epilogue, emit_add, emit_sub, emit_mul)
6601 (emit_lsh, emit_rsh_signed, emit_rsh_unsigned, emit_ext)
6602 (emit_log_not, emit_bit_and, emit_bit_or, emit_bit_xor)
6603 (emit_bit_not, emit_equal, emit_less_signed, emit_less_unsigned)
6604 (emit_ref, emit_if_goto, emit_goto, write_goto_address, emit_const)
6605 (emit_reg, emit_pop, emit_stack_flush, emit_zero_ext, emit_swap)
6606 (emit_stack_adjust, emit_int_call_1, emit_void_call_2): New.
6607 (compile_tracepoint_condition, compile_bytecodes): New.
6608 * target.h (emit_ops): Forward declare.
6609 (struct target_ops): New field emit_ops.
6610 (target_emit_ops): New.
6611 * linux-amd64-ipa.c (gdb_agent_get_raw_reg): New.
6612 * linux-i386-ipa.c (gdb_agent_get_raw_reg): New.
6613 * linux-low.c (linux_emit_ops): New.
6614 (linux_target_ops): Install it.
6615 * linux-low.h (struct linux_target_ops): New field emit_ops.
6616
92b72907
UW
66172010-06-14 Ulrich Weigand <uweigand@de.ibm.com>
6618
6619 * linux-ppc-low.c (ppc_arch_setup): Use private regcache to test MSR.
6620 * linux-s390-low.c (ppc_arch_setup): Use private regcache to test PSW.
6621
fa593d66
PA
66222010-06-01 Pedro Alves <pedro@codesourcery.com>
6623 Stan Shebs <stan@codesourcery.com>
6624
6625 * Makefile.in (IPA_DEPFILES, extra_libraries): New.
6626 (all): Depend on $(extra_libraries).
6627 (install-only): Install the IPA.
6628 (IPA_OBJS, IPA_LIB): New.
6629 (clean): Remove the IPA lib.
6630 (IPAGENT_CFLAGS): New.
6631 (tracepoint-ipa.o, utils-ipa.o, remote-utils-ipa.o)
6632 (regcache-ipa.o, i386-linux-ipa.o, linux-i386-ipa.o)
6633 (linux-amd64-ipa.o, amd64-linux-ipa.o): New rules.
6634 * linux-amd64-ipa.c, linux-i386-ipa.c: New files.
6635 * configure.ac: Check for atomic builtins support in the compiler.
6636 (IPA_DEPFILES, extra_libraries): Define.
6637 * configure.srv (ipa_obj): Add description.
6638 (ipa_i386_linux_regobj, ipa_amd64_linux_regobj): Define.
6639 (i[34567]86-*-linux*): Set ipa_obj.
6640 (x86_64-*-linux*): Set ipa_obj.
6641 * linux-low.c (stabilizing_threads): New.
6642 (supports_fast_tracepoints): New.
6643 (linux_detach): Stabilize threads before detaching.
6644 (handle_tracepoints): Handle internal tracing breakpoints. Assert
6645 the lwp is either not stabilizing, or is moving out of a jump pad.
6646 (linux_fast_tracepoint_collecting): New.
6647 (maybe_move_out_of_jump_pad): New.
6648 (enqueue_one_deferred_signal): New.
6649 (dequeue_one_deferred_signal): New.
6650 (linux_wait_for_event_1): If moving out of a jump pad, defer
6651 pending signals to later.
6652 (linux_stabilize_threads): New.
6653 (linux_wait_1): Check if threads need moving out of jump pads, and
6654 do it if so.
6655 (stuck_in_jump_pad_callback): New.
6656 (move_out_of_jump_pad_callback): New.
6657 (lwp_running): New.
6658 (linux_resume_one_lwp): Handle moving out of jump pads.
6659 (linux_set_resume_request): Dequeue deferred signals.
6660 (need_step_over_p): Also step over fast tracepoint jumps.
6661 (start_step_over): Also uninsert fast tracepoint jumps.
6662 (finish_step_over): Also reinsert fast tracepoint jumps.
6663 (linux_install_fast_tracepoint_jump): New.
6664 (linux_target_ops): Install linux_stabilize_threads and
6665 linux_install_fast_tracepoint_jump_pad.
6666 * linux-low.h (linux_target_ops) <get_thread_area,
6667 install_fast_tracepoint_jump_pad>: New fields.
6668 (struct lwp_info) <collecting_fast_tracepoint,
6669 pending_signals_to_report, exit_jump_pad_bkpt>: New fields.
6670 (linux_get_thread_area): Declare.
6671 * linux-x86-low.c (jump_insn): New.
6672 (x86_get_thread_area): New.
6673 (append_insns): New.
6674 (push_opcode): New.
6675 (amd64_install_fast_tracepoint_jump_pad): New.
6676 (i386_install_fast_tracepoint_jump_pad): New.
6677 (x86_install_fast_tracepoint_jump_pad): New.
6678 (the_low_target): Install x86_get_thread_area and
6679 x86_install_fast_tracepoint_jump_pad.
6680 * mem-break.c (set_raw_breakpoint_at): Use read_inferior_memory.
6681 (struct fast_tracepoint_jump): New.
6682 (fast_tracepoint_jump_insn): New.
6683 (fast_tracepoint_jump_shadow): New.
6684 (find_fast_tracepoint_jump_at): New.
6685 (fast_tracepoint_jump_here): New.
6686 (delete_fast_tracepoint_jump): New.
6687 (set_fast_tracepoint_jump): New.
6688 (uninsert_fast_tracepoint_jumps_at): New.
6689 (reinsert_fast_tracepoint_jumps_at): New.
6690 (set_breakpoint_at): Use write_inferior_memory.
6691 (uninsert_raw_breakpoint): Use write_inferior_memory.
6692 (check_mem_read): Mask out fast tracepoint jumps.
6693 (check_mem_write): Mask out fast tracepoint jumps.
6694 * mem-break.h (struct fast_tracepoint_jump): Forward declare.
6695 (set_fast_tracepoint_jump): Declare.
6696 (delete_fast_tracepoint_jump)
6697 (fast_tracepoint_jump_here, uninsert_fast_tracepoint_jumps_at)
6698 (reinsert_fast_tracepoint_jumps_at): Declare.
6699 * regcache.c: Don't compile many functions when building the
6700 in-process agent library.
6701 (init_register_cache) [IN_PROCESS_AGENT]: Don't allow allocating
6702 the register buffer in the heap.
6703 (free_register_cache): If the register buffer isn't owned by the
6704 regcache, don't free it.
6705 (set_register_cache) [IN_PROCESS_AGENT]: Don't re-alocate
6706 pre-existing register caches.
6707 * remote-utils.c (convert_int_to_ascii): Constify `from' parameter
6708 type.
6709 (convert_ascii_to_int): : Constify `from' parameter type.
6710 (decode_M_packet, decode_X_packet): Replace the `to' parameter by
6711 a `to_p' pointer to pointer parameter. If TO_P is NULL, malloc
6712 the needed buffer in-place.
6713 (relocate_instruction): New.
6714 * server.c (handle_query) <qSymbols>: If the target supports
6715 tracepoints, give it a chance of looking up symbols. Report
6716 support for fast tracepoints.
6717 (handle_status): Stabilize threads.
6718 (process_serial_event): Adjust.
6719 * server.h (struct fast_tracepoint_jump): Forward declare.
6720 (struct process_info) <fast_tracepoint_jumps>: New field.
6721 (convert_ascii_to_int, convert_int_to_ascii): Adjust.
6722 (decode_X_packet, decode_M_packet): Adjust.
6723 (relocate_instruction): Declare.
6724 (in_process_agent_loaded): Declare.
6725 (tracepoint_look_up_symbols): Declare.
6726 (struct fast_tpoint_collect_status): Declare.
6727 (fast_tracepoint_collecting): Declare.
6728 (force_unlock_trace_buffer): Declare.
6729 (handle_tracepoint_bkpts): Declare.
6730 (initialize_low_tracepoint)
6731 (supply_fast_tracepoint_registers) [IN_PROCESS_AGENT]: Declare.
6732 * target.h (struct target_ops) <stabilize_threads,
6733 install_fast_tracepoint_jump_pad>: New fields.
6734 (stabilize_threads, install_fast_tracepoint_jump_pad): New.
6735 * tracepoint.c [HAVE_MALLOC_H]: Include malloc.h.
6736 [HAVE_STDINT_H]: Include stdint.h.
6737 (trace_debug_1): Rename to ...
6738 (trace_vdebug): ... this.
6739 (trace_debug): Rename to ...
6740 (trace_debug_1): ... this. Add `level' parameter.
6741 (trace_debug): New.
6742 (ATTR_USED, ATTR_NOINLINE): New.
6743 (IP_AGENT_EXPORT): New.
6744 (gdb_tp_heap_buffer, gdb_jump_pad_buffer, gdb_jump_pad_buffer_end)
6745 (collecting, gdb_collect, stop_tracing, flush_trace_buffer)
6746 (about_to_request_buffer_space, trace_buffer_is_full)
6747 (stopping_tracepoint, expr_eval_result, error_tracepoint)
6748 (tracepoints, tracing, trace_buffer_ctrl, trace_buffer_ctrl_curr)
6749 (trace_buffer_lo, trace_buffer_hi, traceframe_read_count)
6750 (traceframe_write_count, traceframes_created)
6751 (trace_state_variables)
6752 New renaming defines.
6753 (struct ipa_sym_addresses): New.
6754 (STRINGIZE_1, STRINGIZE, IPA_SYM): New.
6755 (symbol_list): New.
6756 (ipa_sym_addrs): New.
6757 (all_tracepoint_symbols_looked_up): New.
6758 (in_process_agent_loaded): New.
6759 (write_e_ipa_not_loaded): New.
6760 (maybe_write_ipa_not_loaded): New.
6761 (tracepoint_look_up_symbols): New.
6762 (debug_threads) [IN_PROCESS_AGENT]: New.
6763 (read_inferior_memory) [IN_PROCESS_AGENT]: New.
6764 (UNKNOWN_SIDE_EFFECTS): New.
6765 (stop_tracing): New.
6766 (flush_trace_buffer): New.
6767 (stop_tracing_bkpt): New.
6768 (flush_trace_buffer_bkpt): New.
6769 (read_inferior_integer): New.
6770 (read_inferior_uinteger): New.
6771 (read_inferior_data_pointer): New.
6772 (write_inferior_data_pointer): New.
6773 (write_inferior_integer): New.
6774 (write_inferior_uinteger): New.
6775 (struct collect_static_trace_data_action): Delete.
6776 (enum tracepoint_type): New.
6777 (struct tracepoint) <type>: New field `type'.
43aaf8b6
PA
6778 <actions_str, step_actions, step_actions_str>: Only include in
6779 GDBserver.
fa593d66
PA
6780 <orig_size, obj_addr_on_target, adjusted_insn_addr>
6781 <adjusted_insn_addr_end, jump_pad, jump_pad_end>: New fields.
6782 (tracepoints): Use IP_AGENT_EXPORT.
6783 (last_tracepoint): Don't include in the IPA.
6784 (stopping_tracepoint): Use IP_AGENT_EXPORT.
6785 (trace_buffer_is_full): Use IP_AGENT_EXPORT.
6786 (alloced_trace_state_variables): New.
6787 (trace_state_variables): Use IP_AGENT_EXPORT.
6788 (traceframe_t): Delete unused variable.
6789 (circular_trace_buffer): Don't include in the IPA.
6790 (trace_buffer_start): Delete.
6791 (struct trace_buffer_control): New.
6792 (trace_buffer_free): Delete.
6793 (struct ipa_trace_buffer_control): New.
6794 (GDBSERVER_FLUSH_COUNT_MASK, GDBSERVER_FLUSH_COUNT_MASK_PREV)
6795 (GDBSERVER_FLUSH_COUNT_MASK_CURR, GDBSERVER_UPDATED_FLUSH_COUNT_BIT):
6796 New.
6797 (trace_buffer_ctrl): New.
6798 (TRACE_BUFFER_CTRL_CURR): New.
6799 (trace_buffer_start, trace_buffer_free, trace_buffer_end_free):
6800 Reimplement as macros.
6801 (trace_buffer_wrap): Delete.
6802 (traceframe_write_count, traceframe_read_count)
6803 (traceframes_created, tracing): Use IP_AGENT_EXPORT.
6804 (struct tracepoint_hit_ctx) <type>: New field.
6805 (struct fast_tracepoint_ctx): New.
6806 (memory_barrier): New.
6807 (cmpxchg): New.
6808 (record_tracepoint_error): Update atomically in the IPA.
6809 (clear_inferior_trace_buffer): New.
6810 (about_to_request_buffer_space): New.
6811 (trace_buffer_alloc): Handle GDBserver and inferior simulatenous
6812 updating the same buffer.
6813 (add_tracepoint): Default the tracepoint's type to trap
6814 tracepoint, and orig_size to -1.
6815 (get_trace_state_variable) [IN_PROCESS_AGENT]: Handle allocated
6816 internal variables.
6817 (create_trace_state_variable): New parameter `gdb'. Handle it.
6818 (clear_installed_tracepoints): Clear fast tracepoint jumps.
6819 (cmd_qtdp): Handle fast tracepoints.
6820 (cmd_qtdv): Adjust.
6821 (max_jump_pad_size): New.
6822 (gdb_jump_pad_head): New.
6823 (get_jump_space_head): New.
6824 (claim_jump_space): New.
6825 (sort_tracepoints): New.
6826 (MAX_JUMP_SIZE): New.
6827 (cmd_qtstart): Handle fast tracepoints. Sync tracepoints with the
6828 IPA.
6829 (stop_tracing) [IN_PROCESS_AGENT]: Don't include the tdisconnected
6830 support. Upload fast traceframes, and delete internal IPA
6831 breakpoints.
6832 (stop_tracing_handler): New.
6833 (flush_trace_buffer_handler): New.
6834 (cmd_qtstop): Upload fast tracepoints.
6835 (response_tracepoint): Handle fast tracepoints.
6836 (tracepoint_finished_step): Upload fast traceframes. Set the
6837 tracepoint hit context's tracepoint type.
6838 (handle_tracepoint_bkpts): New.
6839 (tracepoint_was_hit): Set the tracepoint hit context's tracepoint
6840 type. Add comment about fast tracepoints.
6841 (collect_data_at_tracepoint) [IN_PROCESS_AGENT]: Don't access the
6842 non-existing action_str field.
6843 (get_context_regcache): Handle fast tracepoints.
6844 (do_action_at_tracepoint) [!IN_PROCESS_AGENT]: Don't write the PC
6845 to the regcache.
6846 (fast_tracepoint_from_jump_pad_address): New.
6847 (fast_tracepoint_from_ipa_tpoint_address): New.
6848 (collecting_t): New.
6849 (force_unlock_trace_buffer): New.
6850 (fast_tracepoint_collecting): New.
6851 (collecting): New.
6852 (gdb_collect): New.
6853 (write_inferior_data_ptr): New.
6854 (target_tp_heap): New.
6855 (target_malloc): New.
6856 (download_agent_expr): New.
6857 (UALIGN): New.
6858 (download_tracepoints): New.
6859 (download_trace_state_variables): New.
6860 (upload_fast_traceframes): New.
6861 (IPA_FIRST_TRACEFRAME): New.
6862 (IPA_NEXT_TRACEFRAME_1): New.
6863 (IPA_NEXT_TRACEFRAME): New.
6864 [IN_PROCESS_AGENT]: Include sys/mman.h and fcntl.h.
6865 [IN_PROCESS_AGENT] (gdb_tp_heap_buffer, gdb_jump_pad_buffer)
6866 (gdb_jump_pad_buffer_end): New.
6867 [IN_PROCESS_AGENT] (initialize_tracepoint_ftlib): New.
6868 (initialize_tracepoint): Adjust.
6869 [IN_PROCESS_AGENT]: Allocate the IPA heap, and jump pad scratch
6870 buffer. Initialize the low module.
6871 * utils.c (PREFIX, TOOLNAME): New.
6872 (malloc_failure): Use PREFIX.
6873 (error): In the IPA, an error causes an exit.
6874 (fatal, warning): Use PREFIX.
6875 (internal_error): Use TOOLNAME.
6876 (NUMCELLS): Increase to 10.
6877 * configure, config.in: Regenerate.
6878
d149dd1d
PA
68792010-06-01 Pedro Alves <pedro@codesourcery.com>
6880
6881 * server.c (handle_query) <qSupported>: Do two passes over the
6882 qSupported string to avoid nesting strtok.
6883
f6528abd
JK
68842010-05-28 Jan Kratochvil <jan.kratochvil@redhat.com>
6885
6886 * Makefile.in (SFILES): Add $(srcdir)/proc-service.list.
6887 (CDEPS): New.
6888 * configure.ac (RDYNAMIC): New AC_MSG_CHECKING wrapping. Test also
6889 -Wl,--dynamic-list.
6890 * configure: Regenerate.
6891 * proc-service.list: New.
6892
ca2a87a0
JK
68932010-05-28 Jan Kratochvil <jan.kratochvil@redhat.com>
6894
6895 * linux-low.c (linux_core_of_thread): Fix crash on invalid CONTENT.
6896 New comment.
6897
363a6e9f
OS
68982010-05-26 Ozkan Sezer <sezeroz@gmail.com>
6899
6900 * gdbreplay.c (remote_open): Check error return from socket() call by
6901 its equality to -1 not by it being negative.
6902 * remote-utils.c (remote_open): Likewise.
6903
d23b6cb1
PA
69042010-05-23 Pedro Alves <pedro@codesourcery.com>
6905
6906 * config.h: Regenerate.
6907
28d3cf85
MK
69082010-05-19 Maxim Kuvyrkov <maxim@codesourcery.com>
6909
6910 * linux-m68k-low.c (ps_get_thread_area): Don't define if kernel
6911 doesn't provide PTRACE_GET_THREAD_AREA.
6912
fea36a59
MK
69132010-05-19 Maxim Kuvyrkov <maxim@codesourcery.com>
6914
6915 * linux-m68k-low.c: Include <asm/ptrace.h>
6916 (ps_get_thread_area): Implement.
6917
24b066ba
DE
69182010-05-03 Doug Evans <dje@google.com>
6919
6920 * event-loop.c (struct callback_event): New struct.
6921 (callback_list): New global.
6922 (append_callback_event, delete_callback_event): New functions.
6923 (process_callback): New function.
6924 (start_event_loop): Call it.
6925 * remote-utils.c (NOT_SCHEDULED): Define.
6926 (readchar_buf, readchar_bufcnt, readchar_bufp): New static globals,
6927 moved out of readchar.
6928 (readchar): Rewrite. Call reschedule before returning.
6929 (reset_readchar): New function.
6930 (remote_close): Call it.
6931 (process_remaining, reschedule): New functions.
6932 * server.h (callback_handler_func): New typedef.
6933 (append_callback_event, delete_callback_event): Declare.
6934
9836d6ea
PA
69352010-05-03 Pedro Alves <pedro@codesourcery.com>
6936
6937 * proc-service.c (ps_pglobal_lookup): Use
6938 thread_db_look_up_one_symbol.
6939 * remote-utils.c (look_up_one_symbol): Add new `may_ask_gdb'
6940 parameter. Use it instead of all_symbols_looked_up.
6941 * server.h (struct process_info) <all_symbols_looked_up>: Delete
6942 field.
6943 (all_symbols_looked_up): Don't declare.
6944 (look_up_one_symbol): Add new `may_ask_gdb' parameter.
6945 * thread-db.c (struct thread_db) <all_symbols_looked_up>: New
6946 field.
6947 (thread_db_look_up_symbols): Adjust call to look_up_one_symbol.
6948 Set all_symbols_looked_up here.
6949 (thread_db_look_up_one_symbol): New.
6950 (thread_db_get_tls_address): Adjust.
6951 (thread_db_load_search, try_thread_db_load_1): Always allocate the
6952 thread_db object on the heap, and tentatively set it in the
6953 process structure.
6954 (thread_db_init): Don't set all_symbols_looked_up here.
6955 * linux-low.h (thread_db_look_up_one_symbol): Declare.
6956
7984d532
PA
69572010-05-03 Pedro Alves <pedro@codesourcery.com>
6958
6959 * linux-low.c (linux_kill, linux_detach): Adjust.
6960 (status_pending_p_callback): Remove redundant statement. Check
6961 for !TARGET_WAITIKIND_IGNORE, instead of
6962 TARGET_WAITKIND_STOPPED.
6963 (handle_tracepoints): Make sure LWP is locked. Adjust.
6964 (linux_wait_for_event_1): Adjust.
6965 (linux_cancel_breakpoints): New.
6966 (unsuspend_one_lwp): New.
6967 (unsuspend_all_lwps): New.
6968 (linux_wait_1): If finishing a step-over, unsuspend all lwps.
6969 (send_sigstop_callback): Change return type to int, add new
6970 `except' parameter and handle it.
6971 (suspend_and_send_sigstop_callback): New.
6972 (stop_all_lwps): Add new `suspend' and `expect' parameters, and
6973 pass them down. If SUSPEND, also increment the lwp's suspend
6974 count.
6975 (linux_resume_one_lwp): Add notice about resuming a suspended LWP.
6976 (need_step_over_p): Don't consider suspended LWPs.
6977 (start_step_over): Adjust.
6978 (proceed_one_lwp): Change return type to int, add new `except'
6979 parameter and handle it.
6980 (unsuspend_and_proceed_one_lwp): New.
6981 (proceed_all_lwps): Use find_inferior instead of
6982 for_each_inferior.
6983 (unstop_all_lwps): Add `unsuspend' parameter. If UNSUSPEND, them
6984 also decrement the suspend count of LWPs. Pass `except' down,
6985 instead of hacking its suspend count.
6986 (linux_pause_all): Add `freeze' parameter. Adjust.
6987 (linux_unpause_all): New.
6988 (linux_target_ops): Install linux_unpause_all.
6989 * server.c (handle_status): Adjust.
6990 * target.h (struct target_ops): New fields `unpause_all' and
6991 `cancel_breakpoints'. Add new parameter to `pause_all'.
6992 (pause_all): Add new `freeze' parameter.
6993 (unpause_all): New.
6994 (cancel_breakpoints): New.
6995 * tracepoint.c (clear_installed_tracepoints): Pause threads, and
6996 cancel breakpoints.
6997 (cmd_qtstart): Pause threads.
6998 (stop_tracing): Pause threads, and cancel breakpoints.
6999 * win32-low.c (win32_target_ops): Adjust.
7000
e471f25b
PA
70012010-05-03 Pedro Alves <pedro@codesourcery.com>
7002
7003 * linux-low.c (linux_wait_for_event_1): Move passing the signal to
7004 the inferior right away from here...
7005 (linux_wait_1): ... to here, and adjust to check the thread's
7006 last_resume_kind instead of the lwp's step or stop_expected flags.
7007
1915ef4f
PA
70082010-05-02 Pedro Alves <pedro@codesourcery.com>
7009
7010 * README: Use consistent `GDB' and `GDBserver' spellings.
7011
f9e39928
PA
70122010-05-02 Pedro Alves <pedro@codesourcery.com>
7013
7014 * linux-low.c (linux_kill_one_lwp): Assume the lwp is stopped.
7015 (linux_kill): Stop all lwps here. Don't delete the main lwp here.
7016 (linux_detach_one_lwp): Assume the lwp is stopped.
7017 (any_thread_of): Delete.
7018 (linux_detach): Stop all lwps here. Don't blindly delete all
7019 breakpoints.
7020 (delete_lwp_callback): New.
7021 (linux_mourn): Delete all lwps of the process that is gone.
7022 (linux_wait_1): Don't delete the last lwp of the process here.
7023 * mem-break.h (mark_breakpoints_out): Declare.
7024 * mem-break.c (mark_breakpoints_out): New.
7025 (free_all_breakpoints): Use it.
7026 * server.c (handle_target_event): If the process is gone, mark
7027 breakpoints out.
7028 * thread-db.c (struct thread_db) <create_bp>: New field.
7029 (thread_db_enable_reporting): Fix prototype. Store a thread event
7030 breakpoint reference in the thread_db struct.
7031 (thread_db_load_search): Clear the thread_db object.
7032 (try_thread_db_load_1): Ditto.
7033 (switch_to_process): New.
7034 (disable_thread_event_reporting): Use it.
7035 (remove_thread_event_breakpoints): New.
7036 (thread_db_detach, thread_db_mourn): Use it.
7037
1e7fc18c
PA
70382010-05-01 Pedro Alves <pedro@codesourcery.com>
7039
7040 * linux-low.c (linux_enable_event_reporting): New.
7041 (linux_wait_for_event_1, handle_extended_wait): Use it.
7042
02fc4de7
PA
70432010-04-30 Pedro Alves <pedro@codesourcery.com>
7044
7045 * linux-low.c (linux_kill_one_lwp, linux_kill)
7046 (linux_detach_one_lwp): Adjust to send_sigstop interface change.
7047 (send_sigstop): Take an lwp_info as parameter instead. Queue a
7048 SIGSTOP even if the LWP is stopped.
7049 (send_sigstop_callback): New.
7050 (stop_all_lwps): Use send_sigstop_callback instead.
7051 (linux_resume_one_thread): Adjust.
7052 (proceed_one_lwp): Still proceed an LWP that the client has
7053 requested to stop, if we haven't reported it as stopped yet. Make
7054 sure that LWPs the client want stopped, have a pending SIGSTOP.
7055
bc3b5632
DE
70562010-04-26 Doug Evans <dje@google.com>
7057
ae1ada35
DE
7058 * server.c (handle_general_set): Make static.
7059
bc3b5632
DE
7060 * remote-utils.c (putpkt_binary_1): Call readchar instead of read.
7061 Print received char after testing for error/eof instead of before.
7062 (input_interrupt): Tweak comment.
7063
65730243
DE
70642010-04-23 Doug Evans <dje@google.com>
7065
7066 * server.c (start_inferior): Print inferior argv if --debug.
7067
a8ae7dc0
AR
70682010-04-21 Aleksandar Ristovski <aristovski@qnx.com>
7069
7070 * Makefile.in (nto_low_h nto-low.o nto-x86-low.o): New dependency lists.
7071 * nto-x86-low.c: Include server.h
7072
1c07cc19
PM
70732010-04-20 Pierre Muller <muller@ics.u-strasbg.fr>
7074
7075 * win32-i386-low.c: Use __x86_64__ macro instead of __x86_64 to
7076 be consistent with other sources of this directory.
7077 (init_registers_amd64): Correct name of source file of this function
7078 in the comment.
7079
e0a61e09
PM
70802010-04-19 Pierre Muller <muller@ics.u-strasbg.fr>
7081
7082 * configure.srv (x86_64-*-mingw*): New configuration for Windows
7083 64-bit executables.
7084
54709339
PM
70852010-04-19 Pierre Muller <muller@ics.u-strasbg.fr>
7086
7087 * win32-i386-low.c: Add 64-bit support.
7088 (CONTEXT_EXTENDED_REGISTERS): Set macro to zero if not exisiting.
7089 (init_registers_amd64): Declare.
7090 (mappings): Add 64-bit version of array.
7091 (init_windows_x86): New function.
7092 (the_low_target): Change init_arch field to init_windows_x86.
7093
e8f0053d
PM
70942010-04-19 Pierre Muller <muller@ics.u-strasbg.fr>
7095
7096 * win32-low.c: Adapt to support also 64-bit architecture.
7097 (child_xfer_memory): Use uintptr_t type for local variable `addr'.
7098 (get_image_name): Use SIZE_T type for local variable `done'.
7099 (psapi_get_dll_name): Use LPVOID type for parameter `BaseAddress'.
7100 (toolhelp_get_dll_name): Idem.
7101 (handle_load_dll): Use CORE_ADDR type for local variable `load_addr'.
7102 Use uintptr_t typecast to avoid warning.
7103 (handle_unload_dll): Use uintptr_t typecast to avoid warning.
7104 (handle_exception): Use phex_nz to avoid warning.
7105 (win32_wait): Remove unused local variable `process'.
7106
c481e77e
PM
71072010-04-19 Pierre Muller <muller@ics.u-strasbg.fr>
7108
7109 * configure.srv (srv_amd64_regobj): Replace `x86-64-avx.o' by
7110 `amd64-avx.o'.
7111
12ea4b69
PM
71122010-04-17 Pierre Muller <muller@ics.u-strasbg.fr>
7113
7114 * configure.ac: Use `ws2_32' library for srv_mingw.
7115 * configure: Regenerate.
7116 * gdbreplay.c: Include winsock2.h instead of winsock.h.
7117 * remote-utils.c: Likewise.
7118
f6d1620c
L
71192010-04-17 H.J. Lu <hongjiu.lu@intel.com>
7120
7121 * linux-x86-low.c (xmltarget_amd64_linux_no_xml): Define only
7122 if __x86_64__ is defined.
7123
8e642873
PM
71242010-04-16 Pierre Muller <muller@ics.u-strasbg.fr>
7125
7126 * configure: Regenerate.
7127
711e434b
PM
71282010-04-16 Pierre Muller <muller@ics.u-strasbg.fr>
7129
7130 * server.c (handle_query): Handle 'qGetTIBAddr' query.
7131 * target.h (target_ops): New get_tib_address field.
7132 * win32-low.h (win32_thread_info): Add thread_local_base field.
7133 * win32-low.c (child_add_thread): Add tlb argument.
7134 Set thread_local_base field to TLB.
7135 (get_child_debug_event): Adapt to child_add_thread change.
7136 (win32_get_tib_address): New function.
7137 (win32_target_ops): Set get_tib_address field to
7138 win32_get_tib_address.
7139 * linux-low.c (linux_target_ops): Set get_tib_address field to NULL.
7140
505106cd
PA
71412010-04-12 Pedro Alves <pedro@codesourcery.com>
7142
505106cd
PA
7143 * linux-low.c (linux_mourn): Also remove the process.
7144 * server.c (handle_target_event): Don't remove the process here.
7145 * nto-low.c (nto_mourn): New.
7146 (nto_target_ops): Install it.
7147 * spu-low.c (spu_mourn): New.
7148 (spu_target_ops): Install it.
7149 * win32-low.c (win32_mourn): New.
7150 (win32_target_ops): Install it.
7151
e8470a06
PA
71522010-04-12 Pedro Alves <pedro@codesourcery.com>
7153
7154 * server.h (buffer_xml_printf): Remove redundant `;'.
7155
45ba0d02
PA
71562010-04-12 Pedro Alves <pedro@codesourcery.com>
7157
7158 * regcache.c (set_register_cache): Invalidate regcaches before
7159 changing the register cache layout.
7160 (regcache_invalidate_one): Allow a NULL regcache.
7161 * linux-x86-low.c (x86_linux_update_xmltarget): Invalidate
7162 regcaches before changing the register cache layout or the target
7163 regsets.
7164
59e04013
L
71652010-04-12 H.J. Lu <hongjiu.lu@intel.com>
7166
7167 * linux-x86-low.c (x86_linux_update_xmltarget): Avoid unused
7168 variable warning on Linux/x86-64.
7169
8336d594
PA
71702010-04-11 Pedro Alves <pedro@codesourcery.com>
7171
7172 GDBserver disconnected tracing support.
7173
7174 * linux-low.c (linux_remove_process): Delete.
7175 (add_lwp): Don't set last_resume_kind here.
7176 (linux_kill): Use `mourn'.
7177 (linux_detach): Use `thread_db_detach', and `mourn'.
7178 (linux_mourn): New.
7179 (linux_attach_lwp_1): Adjust comment.
7180 (linux_attach): last_resume_kind moved the thread_info; adjust.
7181 (status_pending_p_callback): Adjust.
7182 (linux_wait_for_event_1): Adjust.
7183 (count_events_callback, select_singlestep_lwp_callback)
7184 (select_event_lwp_callback, cancel_breakpoints_callback)
7185 (db_wants_lwp_stopped, linux_wait_1, need_step_over_p)
7186 (proceed_one_lwp): Adjust.
7187 (linux_async): Add debug output.
7188 (linux_thread_stopped): New.
7189 (linux_pause_all): New.
7190 (linux_target_ops): Install linux_mourn, linux_thread_stopped and
7191 linux_pause_all.
7192 * linux-low.h (struct lwp_info): Delete last_resume_kind field.
7193 (thread_db_free): Delete declaration.
7194 (thread_db_detach, thread_db_mourn): Declare.
7195 * thread-db.c (thread_db_init): Use thread_db_mourn.
7196 (thread_db_free): Delete, split in two.
7197 (disable_thread_event_reporting): New.
7198 (thread_db_detach): New.
7199 (thread_db_mourn): New.
7200
7201 * server.h (struct thread_info) <last_resume_kind>: New field.
7202 <attached>: Add comment.
7203 <gdb_detached>: New field.
7204 (handler_func): Change return type to int.
7205 (handle_serial_event, handle_target_event): Ditto.
7206 (gdb_connected): Declare.
7207 (tracing): Delete.
7208 (disconnected_tracing): Declare.
7209 (stop_tracing): Declare.
7210
7211 * server.c (handle_query) <qSupported>: Report support for
7212 disconnected tracing.
7213 (queue_stop_reply_callback): Account for running threads.
7214 (gdb_wants_thread_stopped): New.
7215 (gdb_wants_all_threads_stopped): New.
7216 (gdb_reattached_process): New.
7217 (handle_status): Clear the `gdb_detached' flag of all processes.
7218 In all-stop, stop all threads.
7219 (main): Be sure to leave tfind mode. Handle disconnected tracing.
7220 (process_serial_event): If the remote connection breaks, or if an
7221 exit was forced with "monitor exit", force an event loop exit.
7222 Handle disconnected tracing on detach.
7223 (handle_serial_event): Adjust.
7224 (handle_target_event): If GDB isn't connected, forward events back
7225 to the inferior, unless the last process exited, in which case,
7226 exit gdbserver. Adjust interface.
7227
7228 * remote-utils.c (remote_open): Don't block in accept. Instead
7229 register an event loop source on the listen socket file
7230 descriptor. Refactor bits into ...
7231 (listen_desc): ... this new global.
7232 (gdb_connected): ... this new function.
7233 (enable_async_notification): ... this new function.
7234 (handle_accept_event): ... this new function.
7235 (remote_close): Clear remote_desc.
7236
7237 * inferiors.c (add_thread): Set the new thread's last_resume_kind.
7238
7239 * target.h (struct target_ops) <mourn, thread_stopped, pause_all>:
7240 New fields.
7241 (mourn_inferior): Define.
7242 (target_process_qsupported): Avoid the dangling else problem.
7243 (thread_stopped): Define.
7244 (pause_all): Define.
7245 (target_waitstatus_to_string): Declare.
7246 * target.c (target_waitstatus_to_string): New.
7247
7248 * tracepoint.c (tracing): Make extern.
7249 (disconnected_tracing): New.
7250 (stop_tracing): Make extern. Handle tracing stops due to GDB
7251 disconnecting.
7252 (cmd_qtdisconnected): New.
7253 (cmd_qtstatus): Report disconnected tracing status in trace reply.
7254 (handle_tracepoint_general_set): Handle QTDisconnected.
7255
7256 * event-loop.c (event_handler_func): Change return type to int.
7257 (process_event): Bail out if the event handler wants the event
7258 loop to stop.
7259 (handle_file_event): Ditto.
7260 (start_event_loop): Bail out if the event handler wants the event
7261 loop to stop.
7262
7263 * nto-low.c (nto_target_ops): Adjust.
7264 * spu-low.c (spu_wait): Don't remove the process here.
7265 (spu_target_ops): Adjust.
7266 * win32-low.c (win32_wait): Don't remove the process here.
7267 (win32_target_ops): Adjust.
7268
5d267c4c
PA
72692010-04-11 Pedro Alves <pedro@codesourcery.com>
7270
7271 * regcache.c (realloc_register_cache): Invalidate inferior's
7272 regcache before recreating it.
7273
623ccd72
PA
72742010-04-09 Pedro Alves <pedro@codesourcery.com>
7275
7276 * tracepoint.c (cmd_qtstatus): Report trace buffer circularity.
7277
219f2f23
PA
72782010-04-09 Stan Shebs <stan@codesourcery.com>
7279 Pedro Alves <pedro@codesourcery.com>
7280
7281 * server.h (LONGEST): New.
7282 (struct thread_info) <while_stepping>: New field.
7283 (unpack_varlen_hex, xrealloc, pulongest, plongest, phex_nz):
7284 Declare.
7285 (initialize_tracepoint, handle_tracepoint_general_set)
7286 (handle_tracepoint_query, tracepoint_finished_step)
7287 (tracepoint_was_hit, release_while_stepping_state_list):
7288 (current_traceframe): Declare.
7289 * server.c (handle_general_set): Handle tracepoint packets.
7290 (read_memory): New.
7291 (write_memory): New.
7292 (handle_search_memory_1): Use read_memory.
7293 (handle_query): Report support for conditional tracepoints, trace
7294 state variables, and tracepoint sources. Handle tracepoint
7295 queries.
7296 (main): Initialize the tracepoints module.
7297 (process_serial_event): Handle traceframe reads/writes.
7298
7299 * linux-low.c (handle_tracepoints): New.
7300 (linux_wait_1): Call it.
7301 (linux_resume_one_lwp): Handle while-stepping.
7302 (linux_supports_tracepoints, linux_read_pc, linux_write_pc): New.
7303 (linux_target_ops): Install them.
7304 * linux-low.h (struct linux_target_ops) <supports_tracepoints>:
7305 New field.
7306 * linux-x86-low.c (x86_supports_tracepoints): New.
7307 (the_low_target). Install it.
7308
7309 * mem-break.h (delete_breakpoint): Declare.
7310 * mem-break.c (delete_breakpoint): Make external.
7311
7312 * target.h (struct target_ops): Add `supports_tracepoints',
7313 `read_pc', and `write_pc' fields.
7314 (target_supports_tracepoints): Define.
7315 * utils.c (xrealloc, decimal2str, pulongest, plongest, thirty_two)
7316 (phex_nz): New.
7317
7318 * regcache.h (struct regcache) <registers_owned>: New field.
7319 (init_register_cache, regcache_cpy): Declare.
7320 (regcache_read_pc, regcache_write_pc): Declare.
7321 (register_cache_size): Declare.
7322 (supply_regblock): Declare.
7323 * regcache.c (init_register_cache): New.
7324 (new_register_cache): Use it.
7325 (regcache_cpy): New.
7326 (register_cache_size): New.
7327 (supply_regblock): New.
7328 (regcache_read_pc, regcache_write_pc): New.
889bf7c5 7329
219f2f23
PA
7330 * tracepoint.c: New.
7331
7332 * Makefile.in (OBS): Add tracepoint.o.
7333 (tracepoint.o): New rule.
7334
3a13a53b
L
73352010-04-08 H.J. Lu <hongjiu.lu@intel.com>
7336
7337 * Makefile.in (clean): Also remove i386-mmx.c i386-mmx-linux.c.
7338 (i386-mmx.o): New.
7339 (i386-mmx.c): Likewise.
7340 (i386-mmx-linux.o): Likewise.
7341 (i386-mmx-linux.c): Likewise.
7342
7343 * configure.srv (srv_i386_regobj): Add i386-mmx.o.
7344 (srv_i386_linux_regobj): Add i386-mmx-linux.o.
7345 (srv_i386_xmlfiles): Add i386/i386-mmx.xml.
7346 (srv_i386_linux_xmlfiles): Add i386/i386-mmx-linux.xml.
7347
7348 * linux-x86-low.c (init_registers_i386_mmx_linux): New.
7349 (x86_linux_update_xmltarget): Call init_registers_i386_mmx_linux
7350 and return if ptrace PTRACE_GETFPXREGS failed in 32bit.
7351
1570b33e
L
73522010-04-07 H.J. Lu <hongjiu.lu@intel.com>
7353
7354 * Makefile.in (clean): Updated.
7355 (i386-avx.o): New.
7356 (i386-avx.c): Likewise.
7357 (i386-avx-linux.o): Likewise.
7358 (i386-avx-linux.c): Likewise.
7359 (amd64-avx.o): Likewise.
7360 (amd64-avx.c): Likewise.
7361 (amd64-avx-linux.o): Likewise.
7362 (amd64-avx-linux.c): Likewise.
7363
7364 * configure.srv (srv_i386_regobj): Add i386-avx.o.
7365 (srv_i386_linux_regobj): Add i386-avx-linux.o.
7366 (srv_amd64_regobj): Add amd64-avx.o.
7367 (srv_amd64_linux_regobj): Add amd64-avx-linux.o.
7368 (srv_i386_32bit_xmlfiles): Add i386/32bit-avx.xml.
7369 (srv_i386_64bit_xmlfiles): Add i386/64bit-avx.xml.
7370 (srv_i386_xmlfiles): Add i386/i386-avx.xml.
7371 (srv_amd64_xmlfiles): Add i386/amd64-avx.xml.
7372 (srv_i386_linux_xmlfiles): Add i386/i386-avx-linux.xml.
7373 (srv_amd64_linux_xmlfiles): Add i386/amd64-avx-linux.xml.
7374
7375 * i387-fp.c: Include "i386-xstate.h".
7376 (i387_xsave): New.
7377 (i387_cache_to_xsave): Likewise.
7378 (i387_xsave_to_cache): Likewise.
7379 (x86_xcr0): Likewise.
7380
7381 * i387-fp.h (i387_cache_to_xsave): Likewise.
7382 (i387_xsave_to_cache): Likewise.
7383 (x86_xcr0): Likewise.
7384
7385 * linux-arm-low.c (target_regsets): Initialize nt_type to 0.
7386 * linux-crisv32-low.c (target_regsets): Likewise.
7387 * linux-m68k-low.c (target_regsets): Likewise.
7388 * linux-mips-low.c (target_regsets): Likewise.
7389 * linux-ppc-low.c (target_regsets): Likewise.
7390 * linux-s390-low.c (target_regsets): Likewise.
7391 * linux-sh-low.c (target_regsets): Likewise.
7392 * linux-sparc-low.c (target_regsets): Likewise.
7393 * linux-xtensa-low.c (target_regsets): Likewise.
7394
7395 * linux-low.c: Include <sys/uio.h>.
7396 (regsets_fetch_inferior_registers): Support nt_type.
7397 (regsets_store_inferior_registers): Likewise.
7398 (linux_process_qsupported): New.
7399 (linux_target_ops): Add linux_process_qsupported.
7400
7401 * linux-low.h (regset_info): Add nt_type.
7402 (linux_target_ops): Add process_qsupported.
7403
7404 * linux-x86-low.c: Include "i386-xstate.h", "elf/common.h"
7405 and <sys/uio.h>.
7406 (init_registers_i386_avx_linux): New.
7407 (init_registers_amd64_avx_linux): Likewise.
7408 (xmltarget_i386_linux_no_xml): Likewise.
7409 (xmltarget_amd64_linux_no_xml): Likewise.
7410 (PTRACE_GETREGSET): Likewise.
7411 (PTRACE_SETREGSET): Likewise.
7412 (x86_fill_xstateregset): Likewise.
7413 (x86_store_xstateregset): Likewise.
7414 (use_xml): Likewise.
7415 (x86_linux_update_xmltarget): Likewise.
7416 (x86_linux_process_qsupported): Likewise.
7417 (target_regsets): Add NT_X86_XSTATE entry and Initialize nt_type.
7418 (x86_arch_setup): Don't call init_registers_amd64_linux nor
7419 init_registers_i386_linux here. Call
7420 x86_linux_update_xmltarget.
7421 (the_low_target): Add x86_linux_process_qsupported.
7422
7423 * server.c (handle_query): Call target_process_qsupported.
7424
7425 * target.h (target_ops): Add process_qsupported.
7426 (target_process_qsupported): New.
7427
fc7238bb
PA
74282010-04-03 Pedro Alves <pedro@codesourcery.com>
7429
7430 * inferiors.c (add_thread): Set last_status kind to
7431 TARGET_WAITKIND_IGNORE.
7432 * linux-low.c (cancel_breakpoint): Remove unnecessary regcache
7433 fetch. Use ptid_of. Avoid unnecessary get_lwp_thread calls.
7434 (linux_wait_1): Move `thread' local definition to block that uses
7435 it. Don't NULL initialize `event_child'.
7436 (linux_resume_one_thread): Avoid unnecessary get_lwp_thread calls.
7437 Alway set the thread's last_status to TARGET_WAITKIND_IGNORE.
7438 * linux-x86-low.c (x86_breakpoint_at): Read raw memory.
7439
bdabb078
PA
74402010-04-01 Pedro Alves <pedro@codesourcery.com>
7441
7442 * linux-low.c (get_stop_pc): Don't adjust the PC if stopped with
7443 an extended waitstatus, or by a watchpoint.
7444 (cancel_breakpoints_callback): Don't cancel a breakpoint if the
7445 thread was stepping or has been stopped by a watchpoint.
7446
d3bbe7a0
PA
74472010-04-01 Pedro Alves <pedro@codesourcery.com>
7448
7449 * mem-break.c (struct raw_breakpoint): New field shlib_disabled.
7450 (set_gdb_breakpoint_at): If GDB is inserting a breakpoint on top
7451 of another, then delete the previous, and validate all
7452 breakpoints.
7453 (validate_inserted_breakpoint): New.
7454 (delete_disabled_breakpoints): New.
7455 (validate_breakpoints): New.
7456 (check_mem_read): Validate breakpoints before trusting their
7457 shadow. Delete disabled breakpoints.
7458 (check_mem_write): Validate breakpoints before trusting they
7459 should be inserted. Delete disabled breakpoints.
7460 * mem-break.h (validate_breakpoints):
7461 * server.c (handle_query): Validate breakpoints when we see a
7462 qSymbol query.
7463
8b07ae33
PA
74642010-04-01 Pedro Alves <pedro@codesourcery.com>
7465
7466 * linux-low.c (linux_wait_1): Avoid setting need_step_over is
7467 there's a GDB breakpoint at stop_pc. Always report a trap to GDB
7468 if we could tell there's a GDB breakpoint at stop_pc.
7469 (need_step_over_p): Don't do a step over if we find a GDB
7470 breakpoint at the resume PC.
7471
7472 * mem-break.c (struct raw_breakpoint): New.
7473 (enum bkpt_type): New type `gdb_breakpoint'.
7474 (struct breakpoint): Delete the `PC', `old_data' and `inserted'
7475 fields. New field `raw'.
7476 (find_raw_breakpoint_at): New.
7477 (set_raw_breakpoint_at): Handle refcounting. Create a raw
7478 breakpoint instead.
7479 (set_breakpoint_at): Adjust.
7480 (delete_raw_breakpoint): New.
7481 (release_breakpoint): New.
7482 (delete_breakpoint): Rename to...
7483 (delete_breakpoint_1): ... this. Add proc parameter. Use
7484 release_breakpoint. Return ENOENT.
7485 (delete_breakpoint): Reimplement.
7486 (find_breakpoint_at): Delete.
7487 (find_gdb_breakpoint_at): New.
7488 (delete_breakpoint_at): Delete.
7489 (set_gdb_breakpoint_at): New.
7490 (delete_gdb_breakpoint_at): New.
7491 (gdb_breakpoint_here): New.
7492 (set_reinsert_breakpoint): Use release_breakpoint.
7493 (uninsert_breakpoint): Rename to ...
7494 (uninsert_raw_breakpoint): ... this.
7495 (uninsert_breakpoints_at): Adjust to handle raw breakpoints.
7496 (reinsert_raw_breakpoint): Change parameter type to
7497 raw_breakpoint.
7498 (reinsert_breakpoints_at): Adjust to handle raw breakpoints
7499 instead.
7500 (check_breakpoints): Adjust. Use release_breakpoint.
7501 (breakpoint_here): Rewrite using find_raw_breakpoint_at.
7502 (breakpoint_inserted_here): Ditto.
7503 (check_mem_read): Adjust to iterate over raw breakpoints instead.
7504 Don't trust the breakpoint's shadow if it is not inserted.
7505 (check_mem_write): Adjust to iterate over raw breakpoints instead.
7506 (delete_all_breakpoints): Adjust.
7507 (free_all_breakpoints): Mark all breakpoints as uninserted, and
7508 use delete_breakpoint_1.
7509
7510 * mem-break.h (breakpoints_supported): Delete declaration.
7511 (set_gdb_breakpoint_at): Declare.
7512 (gdb_breakpoint_here): Declare.
7513 (delete_breakpoint_at): Delete.
7514 (delete_gdb_breakpoint_at): Declare.
7515
7516 * server.h (struct raw_breakpoint): Forward declare.
7517 (struct process_info): New field `raw_breakpoints'.
7518
7519 * linux-x86-low.c (x86_insert_point, x86_remote_point): Handle Z0
7520 breakpoints.
7521
6bf5e0ba
PA
75222010-03-24 Pedro Alves <pedro@codesourcery.com>
7523
7524 * linux-low.c (status_pending_p_callback): Fix comment.
7525 (linux_wait_for_event_1): Move most of the internal breakpoint
7526 handling from here...
7527 (linux_wait_1): ... to here.
7528 (count_events_callback): New.
7529 (select_singlestep_lwp_callback): New.
7530 (select_event_lwp_callback): New.
7531 (cancel_breakpoints_callback): New.
7532 (select_event_lwp): New.
7533 (linux_wait_1): Simplify internal breakpoint handling. Give equal
7534 priority to all LWPs that have had events that should be reported
7535 to the client. Cancel breakpoints when about to reporting the
7536 event to the client, not while stopping lwps. No longer cancel
7537 finished single-steps here.
7538 (cancel_finished_single_step): Delete.
7539 (cancel_finished_single_steps): Delete.
7540
414a389f
PA
75412010-03-24 Pedro Alves <pedro@codesourcery.com>
7542
7543 * mem-break.c (enum bkpt_type): New.
7544 (struct breakpoint): New field `type'.
7545 (set_breakpoint_at): Change return type to struct breakpoint
7546 pointer. Set type to `other_breakpoint' by default.
7547 (delete_breakpoint): Rewrite, supporting more than one breakpoint
7548 in the breakpoint list.
7549 (delete_reinsert_breakpoints): Only delete reinsert breakpoints.
7550 (reinsert_breakpoint): Rename to ...
7551 (reinsert_raw_breakpoint): ... this.
7552 (reinsert_breakpoints_at): Adjust.
7553 * mem-break.h (struct breakpoint): Declare.
7554 (set_breakpoint_at): Change return type to struct breakpoint
7555 pointer.
7556
2280c721
PA
75572010-03-24 Pedro Alves <pedro@codesourcery.com>
7558
7559 * server.c (handle_query): Assign, not compare.
7560
d50171e4
PA
75612010-03-24 Pedro Alves <pedro@codesourcery.com>
7562
7563 Teach linux gdbserver to step-over-breakpoints.
7564
7565 * linux-low.c (can_hardware_single_step): New.
7566 (supports_breakpoints): New.
7567 (handle_extended_wait): If stopping threads, read the stop pc of
7568 the new cloned LWP.
7569 (get_pc): New.
7570 (get_stop_pc): Add `lwp' parameter. Handle it. Bail out if the
7571 low target doesn't support retrieving the PC.
7572 (add_lwp): Set last_resume_kind to resume_continue.
7573 (linux_attach_lwp_1): Adjust comments. Always set stop_expected.
7574 (linux_attach): Don't clear stop_expected. Set the lwp's
7575 last_resume_kind to resume_stop.
7576 (linux_detach_one_lwp): Don't check for removed breakpoints.
7577 (check_removed_breakpoint): Delete.
7578 (status_pending_p): Rename to ...
7579 (status_pending_p_callback): ... this. Don't check for removed
7580 breakpoints. Don't consider threads that are stopped from GDB's
7581 perspective.
7582 (linux_wait_for_lwp): Always read the stop_pc here.
7583 (cancel_breakpoint): New.
7584 (step_over_bkpt): New global.
7585 (linux_wait_for_event_1): Implement stepping over breakpoints.
7586 (gdb_wants_lwp_stopped): New.
7587 (gdb_wants_all_stopped): New.
7588 (linux_wait_1): Tag threads as gdb-wants-stopped. Cancel finished
7589 single-step traps here. Store the thread's last reported target
7590 wait status.
7591 (send_sigstop): Don't clear stop_expected. Always set it,
7592 instead.
7593 (mark_lwp_dead): Remove reference to pending_is_breakpoint.
7594 (cancel_finished_single_step): New.
7595 (cancel_finished_single_steps): New.
7596 (wait_for_sigstop): Don't cancel finished single-step traps here.
7597 (linux_resume_one_lwp): Don't check for removed breakpoints.
7598 Don't set `step' on non-hardware step archs.
7599 (linux_set_resume_request): Ignore resume_stop requests if already
7600 stopping or stopped. Set the lwp's last_resume_kind.
7601 (resume_status_pending_p): Don't check for removed breakpoints.
7602 (need_step_over_p): New.
7603 (start_step_over): New.
7604 (finish_step_over): New.
7605 (linux_resume_one_thread): Always queue a sigstop for resume_stop
7606 requests. Clear the thread's last reported target waitstatus.
7607 Don't use the `suspended' flag. Don't consider pending breakpoints.
7608 (linux_resume): Start a step-over if necessary.
7609 (proceed_one_lwp): New.
7610 (proceed_all_lwps): New.
7611 (unstop_all_lwps): New.
7612 * linux-low.h (struct lwp_info): Rewrite comment for the
7613 `suspended' flag. Add the `stop_pc' field. Delete the
7614 `pending_stop_pc' field. Tweak the `stepping' flag's comment.
7615 Add `'last_resume_kind' and `need_step_over' fields.
7616 * inferiors.c (struct thread_info): Delete, moved elsewhere.
7617 * mem-break.c (struct breakpoint): Delete `reinserting' flag.
7618 Delete `breakpoint_to_reinsert' field. New flag `inserted'.
7619 (set_raw_breakpoint_at): New.
7620 (set_breakpoint_at): Rewrite to use it.
7621 (reinsert_breakpoint_handler): Delete.
7622 (set_reinsert_breakpoint): New.
7623 (reinsert_breakpoint_by_bp): Delete.
7624 (delete_reinsert_breakpoints): New.
7625 (uninsert_breakpoint): Rewrite.
7626 (uninsert_breakpoints_at): New.
7627 (reinsert_breakpoint): Rewrite.
7628 (reinsert_breakpoints_at): New.
7629 (check_breakpoints): Rewrite.
7630 (breakpoint_here): New.
7631 (breakpoint_inserted_here): New.
7632 (check_mem_read): Adjust.
7633 * mem-break.h (breakpoints_supported, breakpoint_here)
7634 (breakpoint_inserted_here, set_reinsert_breakpoint): Declare.
7635 (reinsert_breakpoint_by_bp): Delete declaration.
7636 (delete_reinsert_breakpoints): Declare.
7637 (reinsert_breakpoint): Delete declaration.
7638 (reinsert_breakpoints_at): Declare.
7639 (uninsert_breakpoint): Delete declaration.
7640 (uninsert_breakpoints_at): Declare.
7641 (check_breakpoints): Adjust prototype.
7642 * server.h: Adjust include order.
7643 (struct thread_info): Declare here. Add a `last_status' field.
7644
30ba68cb
MS
76452010-03-23 Michael Snyder <msnyder@vmware.com>
7646
7647 * server.c (crc32): New function.
7648 (handle_query): Add handling for 'qCRC:' request.
7649
b9a881c2
PA
76502010-03-23 Pedro Alves <pedro@codesourcery.com>
7651
7652 * linux-x86-low.c (x86_linux_prepare_to_resume): Clear DR6 if the
7653 lwp had been stopped by a watchpoint.
7654
e92d13d5
PA
76552010-03-16 Pedro Alves <pedro@codesourcery.com>
7656
7657 * server.h (internal_error): Declare.
7658 (gdb_assert, ASSERT_FUNCTION, gdb_assert_fail): Define.
7659 * utils.c (internal_error): New function.
7660
64daa791
AS
76612010-03-15 Andreas Schwab <schwab@redhat.com>
7662
7663 * configure.srv: Fix typo setting srv_regobj.
7664
f52cd8cd
PA
76652010-03-15 Pedro Alves <pedro@codesourcery.com>
7666
7667 * linux-low.c (fetch_register): Avoid passing a non string literal
7668 format to `error'.
7669 (usr_store_inferior_registers): Ditto.
7670
93ae6fdc
PA
76712010-03-14 Pedro Alves <pedro@codesourcery.com>
7672
7673 * linux-low.c (linux_write_memory): Bail out early if peeking
7674 memory failed.
7675
c3adc08c
PA
76762010-03-14 Pedro Alves <pedro@codesourcery.com>
7677
7678 * linux-low.h (struct lwp_info): New fields
7679 `stopped_by_watchpoint' and `stopped_data_address'.
7680 * linux-low.c (linux_wait_for_lwp): Check for watchpoint triggers
7681 here, and cache them in the lwp object.
7682 (wait_for_sigstop): Check stopped_by_watchpoint lwp field
7683 directly.
7684 (linux_resume_one_lwp): Clear the lwp's stopped_by_watchpoint
7685 field.
7686 (linux_stopped_by_watchpoint): Rewrite.
7687 (linux_stopped_data_address): Rewrite.
7688
bce522a2
PA
76892010-03-06 Simo Melenius <simo.melenius@iki.fi>
7690
7691 * linux-low.c (linux_wait_for_lwp): Fetch the regcache after
7692 switching the current inferior, not before.
7693
90884b2b
L
76942010-03-01 H.J. Lu <hongjiu.lu@intel.com>
7695
7696 * Makefile.in (clean): Replace reg-i386.c, reg-x86-64.c,
7697 reg-i386-linux.c and reg-x86-64-linux.c with i386.c, amd64.c,
7698 i386-linux.c and amd64-linux.c.
7699 (reg-i386.o): Removed.
7700 (reg-i386.c): Likewise.
7701 (reg-i386-linux.o): Likewise.
7702 (reg-i386-linux.c): Likewise.
7703 (reg-x86-64.o): Likewise.
7704 (reg-x86-64.c): Likewise.
7705 (reg-x86-64-linux.o): Likewise.
7706 (reg-x86-64-linux.c): Likewise.
7707 (i386.o): New.
7708 (i386.c): Likewise.
7709 (i386-linux.o): Likewise.
7710 (i386-linux.c): Likewise.
7711 (amd64.o): Likewise.
7712 (amd64.c): Likewise.
7713 (amd64-linux.o): Likewise.
7714 (amd64-linux.c): Likewise.
7715
7716 * configure.srv (srv_i386_regobj): New.
7717 (srv_i386_linux_regobj): Likewise.
7718 (srv_amd64_regobj): Likewise.
7719 (srv_amd64_linux_regobj): Likewise.
7720 (srv_i386_32bit_xmlfiles): Likewise.
7721 (srv_i386_64bit_xmlfiles): Likewise.
7722 (srv_i386_xmlfiles): Likewise.
7723 (srv_amd64_xmlfiles): Likewise.
7724 (srv_i386_linux_xmlfiles): Likewise.
7725 (srv_amd64_linux_xmlfiles): Likewise.
7726 (i[34567]86-*-cygwin*): Set srv_regobj to $srv_i386_regobj. Set
7727 srv_xmlfiles to $srv_i386_xmlfiles.
7728 (i[34567]86-*-mingw32ce*): Likewise.
7729 (i[34567]86-*-mingw*): Likewise.
7730 (i[34567]86-*-nto*): Likewise.
7731 (i[34567]86-*-linux*): Set srv_regobj to $srv_i386_linux_regobj
7732 and $srv_amd64_linux_regobj. Set srv_xmlfiles to
7733 $srv_i386_linux_xmlfiles and $srv_amd64_linux_xmlfiles.
7734 (x86_64-*-linux*): Likewise.
7735
7736 * linux-x86-low.c (init_registers_x86_64_linux): Removed.
7737 (init_registers_amd64_linux): New.
7738 (x86_arch_setup): Replace init_registers_x86_64_linux with
7739 init_registers_amd64_linux.
7740
193f13e6
MK
77412010-02-23 Maxim Kuvyrkov <maxim@codesourcery.com>
7742
7743 * configure.ac: Check for libdl. If it is not available link against
7744 static libthread_db.
7745 * configure: Regenerate.
7746
85d721b8
PA
77472010-02-22 Pedro Alves <pedro@codesourcery.com>
7748
7749 PR9605
7750
7751 * i386-low.c (i386_length_and_rw_bits): Throw a fatal error if
7752 handing a read watchpoint.
7753 (i386_low_insert_watchpoint): Read watchpoints aren't supported.
7754
6076632b
DE
77552010-02-12 Doug Evans <dje@google.com>
7756
7757 * linux-low.c (linux_supports_tracefork_flag): Document.
7758 (linux_look_up_symbols): Add comment.
7759
3327ccf7
L
77602010-02-03 H.J. Lu <hongjiu.lu@intel.com>
7761
7762 * regcache.c (supply_register): Clear regcache if buf is NULL.
7763
0718675c 77642010-02-02 Nicolas Roche <roche@sourceware.org>
3327ccf7 7765 Joel Brobecker <brobecker@adacore.com>
0718675c
JB
7766
7767 * inferiors.c (find_inferior): Add function documentation.
7768 (unloaded_dll): Handle the case where the unloaded dll has not
7769 been previously registered in the dll list.
7770
177321bd
DJ
77712010-02-01 Daniel Jacobowitz <dan@codesourcery.com>
7772
7773 * linux-arm-low.c (thumb_breakpoint_len): Delete.
7774 (thumb2_breakpoint): New.
7775 (arm_breakpoint_at): Check for Thumb-2 breakpoints.
7776
2b009048
DJ
77772010-01-29 Daniel Jacobowitz <dan@codesourcery.com>
7778
7779 * linux-low.c (get_stop_pc): Check for SIGTRAP.
7780 (linux_wait_for_event_1): Handle SIGILL and SIGSEGV as possible
7781 breakpoints.
7782
3be029c7
PA
77832010-01-21 Pedro Alves <pedro@codesourcery.com>
7784
7785 * linux-ppc-low.c (ppc_arch_setup): Adjust to regcache changes.
7786
18f5de3b
JK
77872010-01-21 Jan Kratochvil <jan.kratochvil@redhat.com>
7788
7789 * linux-s390-low.c (s390_collect_ptrace_register)
7790 (s390_supply_ptrace_register): Adjust it for the new regcache parameter.
7791
3743bb4f
DE
77922010-01-21 Doug Evans <dje@google.com>
7793
14ce3065
DE
7794 * linux-low.c (PTRACE_ARG3_TYPE): Change from long to void*.
7795 (PTRACE_ARG4_TYPE): New macro.
7796 (handle_extended_wait): Cast ptrace arg4 to PTRACE_ARG4_TYPE.
7797 (linux_wait_for_event_1, linux_resume_one_lwp): Ditto.
7798 (fetch_register): Cast to uintptr_t before casting to PTRACE_ARG3_TYPE.
7799 (usr_store_inferior_registers): Ditto.
7800 (linux_read_memory, linux_write_memory): Ditto.
7801 (linux_test_for_tracefork): Ditto.
7802
3743bb4f
DE
7803 * linux-arm-low.c: Remove redundant include of gdb_proc_service.h.
7804 Only include elf.h if gdb_proc_service.h didn't include linux/elf.h.
7805
8b315be5
PA
78062010-01-21 Pedro Alves <pedro@codesourcery.com>
7807
7808 * proc-service.c (ps_lgetregs): Don't refetch registers from the
7809 target.
7810
85492558
PA
78112010-01-21 Pedro Alves <pedro@codesourcery.com>
7812
7813 * spu-low.c (spu_fetch_registers, spu_store_registers): Change
7814 prototype to take a regcache. Adjust.
7815
442ea881
PA
78162010-01-20 Pedro Alves <pedro@codesourcery.com>
7817
7818 * regcache.h (struct thread_info): Forward declare.
7819 (struct regcache): New.
7820 (new_register_cache): Adjust prototype.
7821 (get_thread_regcache): Declare.
7822 (free_register_cache): Adjust prototype.
7823 (registers_to_string, registers_from_string): Ditto.
7824 (supply_register, supply_register_by_name, collect_register)
7825 (collect_register_as_string, collect_register_by_name): Ditto.
7826 * regcache.c (struct inferior_regcache_data): Delete.
7827 (get_regcache): Rename to ...
7828 (get_thread_regcache): ... this. Adjust. Switch inferior before
7829 fetching registers.
7830 (regcache_invalidate_one): Adjust.
7831 (regcache_invalidate): Fix prototype.
7832 (new_register_cache): Return the new register cache.
7833 (free_register_cache): Change prototype.
7834 (realloc_register_cache): Adjust.
7835 (registers_to_string): Change prototype to take a regcache. Adjust.
7836 (registers_from_string): Ditto.
7837 (register_data): Ditto.
7838 (supply_register): Ditto.
7839 (supply_register_by_name): Ditto.
7840 (collect_register): Ditto.
7841 (collect_register_as_string): Ditto.
7842 (collect_register_by_name): Ditto.
7843 * server.c (process_serial_event): Adjust.
7844 * linux-low.h (regset_fill_func, regset_store_func): Change
7845 prototype.
7846 (get_pc, set_pc, collect_ptrace_register, supply_ptrace_register):
7847 Change prototype.
7848 * linux-low.c (get_stop_pc): Adjust.
7849 (check_removed_breakpoint): Adjust.
7850 (linux_wait_for_event): Adjust.
7851 (linux_resume_one_lwp): Adjust.
7852 (fetch_register): Add regcache parameter. Adjust.
7853 (usr_store_inferior_registers): Ditto.
7854 (regsets_fetch_inferior_registers): Ditto.
7855 (regsets_store_inferior_registers): Ditto.
7856 (linux_fetch_registers, linux_store_registers): Ditto.
7857 * i387-fp.c (i387_cache_to_fsave): Change prototype to take a
7858 regcache. Adjust.
43aaf8b6
PA
7859 (i387_fsave_to_cache, i387_cache_to_fxsave, i387_fxsave_to_cache):
7860 Ditto.
442ea881
PA
7861 * i387-fp.h (i387_cache_to_fsave, i387_fsave_to_cache): Change
7862 prototype to take a regcache.
7863 (i387_cache_to_fxsave, i387_fxsave_to_cache): Ditto.
7864 * remote-utils.c (convert_ascii_to_int, outreg)
7865 (prepare_resume_reply): Change prototype to take a regcache.
7866 Adjust.
7867 * target.h (struct target_ops) <fetch_registers, store_registers>:
7868 Change prototype to take a regcache.
7869 (fetch_inferior_registers, store_inferior_registers): Change
7870 prototype to take a regcache. Adjust.
7871 * proc-service.c (ps_lgetregs): Adjust.
7872 * linux-x86-low.c (x86_fill_gregset, x86_store_gregset)
7873 (x86_fill_fpregset, x86_store_fpregset, x86_fill_fpxregset)
7874 (x86_store_fpxregset, x86_get_pc, x86_set_pc): Change prototype to
7875 take a regcache. Adjust.
7876 * linux-arm-low.c (arm_fill_gregset, arm_store_gregset)
7877 (arm_fill_wmmxregset, arm_store_wmmxregset, arm_fill_vfpregset)
7878 (arm_store_vfpregset, arm_get_pc, arm_set_pc):
7879 (arm_breakpoint_at): Change prototype to take a regcache. Adjust.
7880 * linux-cris-low.c (cris_get_pc, cris_set_pc)
7881 (cris_cannot_fetch_register):
7882 (cris_breakpoint_at): Change prototype to take a regcache.
7883 Adjust.
7884 * linux-crisv32-low.c (cris_get_pc, cris_set_pc,
7885 cris_reinsert_addr, cris_write_data_breakpoint): Change prototype
7886 to take a regcache. Adjust.
7887 (cris_breakpoint_at, cris_insert_point, cris_remove_point):
7888 Adjust.
7889 * linux-m32r-low.c (m32r_get_pc, m32r_set_pc): Change prototype to
7890 take a regcache. Adjust.
7891 * linux-m68k-low.c (m68k_fill_gregset, m68k_store_gregset)
7892 (m68k_fill_fpregset, m68k_store_fpregset, m68k_get_pc,
7893 (m68k_set_pc): Change prototype to take a regcache. Adjust.
7894 * linux-mips-low.c (mips_get_pc):
7895 (mips_set_pc): Change prototype to take a regcache. Adjust.
7896 (mips_reinsert_addr): Adjust.
7897 (mips_collect_register): Change prototype to take a regcache.
7898 Adjust.
7899 (mips_supply_register):
7900 (mips_collect_register_32bit, mips_supply_register_32bit)
7901 (mips_fill_gregset, mips_store_gregset, mips_fill_fpregset)
7902 (mips_store_fpregset): Ditto.
43aaf8b6
PA
7903 * linux-ppc-low.c (ppc_supply_ptrace_register)
7904 (ppc_supply_ptrace_register): Ditto.
442ea881
PA
7905 (parse_spufs_run): Adjust.
7906 (ppc_get_pc, ppc_set_pc, ppc_fill_gregset, ppc_fill_vsxregset)
7907 (ppc_store_vsxregset, ppc_fill_vrregset, ppc_store_vrregset)
7908 (ppc_fill_evrregset, ppc_store_evrregset): Change prototype to
7909 take a regcache. Adjust.
7910 * linux-s390-low.c (s390_collect_ptrace_register)
7911 (s390_supply_ptrace_register, s390_fill_gregset, s390_get_pc)
7912 (s390_set_pc): Change prototype to take a regcache. Adjust.
7913 (s390_arch_setup): Adjust.
7914 * linux-sh-low.c (sh_get_pc, sh_breakpoint_at)
7915 (sh_fill_gregset): Change prototype to take a regcache. Adjust.
7916 * linux-sparc-low.c (sparc_fill_gregset_to_stack)
7917 (sparc_fill_gregset, sparc_store_gregset_from_stack)
7918 (sparc_store_gregset, sparc_get_pc): Change prototype to take a
7919 regcache. Adjust.
7920 (sparc_breakpoint_at): Adjust.
7921 * linux-xtensa-low.c (xtensa_fill_gregset):
7922 (xtensa_store_gregset):
7923 (xtensa_fill_xtregset, xtensa_store_xtregset, xtensa_get_pc)
7924 (xtensa_set_pc): Change prototype to take a regcache. Adjust.
7925 * nto-low.c (nto_fetch_registers, nto_store_registers): Change
7926 prototype to take a regcache. Adjust.
7927 * win32-arm-low.c (arm_fetch_inferior_register)
7928 (arm_store_inferior_register): Change prototype to take a
7929 regcache. Adjust.
7930 * win32-i386-low.c (i386_fetch_inferior_register)
7931 (i386_store_inferior_register): Change prototype to take a
7932 regcache. Adjust.
7933 * win32-low.c (child_fetch_inferior_registers)
7934 (child_store_inferior_registers): Change prototype to take a
7935 regcache. Adjust.
7936 (win32_wait): Adjust.
7937 (win32_fetch_inferior_registers): Change prototype to take a
7938 regcache. Adjust.
7939 (win32_store_inferior_registers): Adjust.
7940 * win32-low.h (struct win32_target_ops) <fetch_inferior_register,
7941 store_inferior_register>: Change prototype to take a regcache.
7942
60c3d7b0
DE
79432010-01-20 Doug Evans <dje@google.com>
7944
7945 * linux-low.c (linux_create_inferior): Wrap use of __SIGRTMIN in
7946 #ifdef.
7947 (linux_wait_for_event1, linux_init_signals): Ditto.
ec8ebe72 7948 (W_STOPCODE): Provide definition if missing.
60c3d7b0 7949
dc146f7c
VP
79502010-01-13 Vladimir Prus <vladimir@codesourcery.com>
7951
7952 * linux-low.c (linux_core_of_thread): New.
7953 (compare_ints, show_process, list_threads): New.
7954 (linux_qxfer_osdata): Report threads and cores.
7955 (linux_target_op): Register linux_core_of_thread.
7956 * remote-utils.c (prepare_resume_reply): Report the core.
7957 (buffer_xml_printf): Support %d specifier.
7958 * server.c (handle_threads_qxfer_proper, handle_threads_qxfer):
7959 New.
7960 (handle_query): Handle qXfer:threads. Announce availability
7961 thereof.
7962 * target.h (struct target_ops): New field core_of_thread.
7963
7803799a
UW
79642010-01-04 Ulrich Weigand <uweigand@de.ibm.com>
7965
7966 * Makefile.in (clean): Remove new generated files.
7967 (reg-s390.o, reg-s390.c): Remove rules.
7968 (reg-s390x.o, reg-s390x.c): Likewise.
7969 (s390-linux32.o, s390-linux32.c): Add rules.
7970 (s390-linux64.o, s390-linux64.c): Likewise.
7971 (s390x-linux64.o, s390x-linux64.c): Likewise.
7972 * configure.srv (s390*-*-linux*): Update srv_regobj and srv_xmlfiles.
7973 * linux-s390-low.c: Include <elf.h>.
7974 (HWCAP_S390_HIGH_GPRS): Define if undefined.
7975 (init_registers_s390): Remove prototype.
7976 (init_registers_s390x): Likewise.
7977 (init_registers_s390_linux32): Add prototype.
7978 (init_registers_s390_linux64): Likewise.
7979 (init_registers_s390x_linux64): Likewise.
7980 (s390_num_regs_3264): New define.
7981 (s390_regmap_3264): New global variable.
7982 (s390_cannot_fetch_register): Remove obsolete check.
7983 (s390_cannot_store_register): Likewise.
7984 (s390_collect_ptrace_register): Handle upper/lower register halves.
7985 (s390_supply_ptrace_register): Likewise.
7986 (s390_fill_gregset): Update to register number changes.
7987 (s390_get_hwcap): New routine.
7988 (s390_arch_setup): Detect 32-bit process running on 64-bit system.
7989 Install appropriate regmap and register set.
7990
6e7ffa39
JB
79912010-01-01 Joel Brobecker <brobecker@adacore.com>
7992
7993 * server.c (gdbserver_version): Update copyright year to 2010.
7994 * gdbreplay.c (gdbreplay_version): Likewise.
7995
957f3f49
DE
79962009-12-28 Doug Evans <dje@google.com>
7997
7998 * linux-low.c: Delete inclusion of ansidecl.h, elf/common.h,
7999 elf/external.h. Include <elf.h> instead but only if necessary.
8000
ca5c370d
PA
80012009-12-28 Pedro Alves <pedro@codesourcery.com>
8002
8003 * linux-low.c (linux_remove_process): Remove `detaching'
8004 parameter. Don't release/detach from thread_db here.
8005 (linux_kill): Release/detach from thread_db here, ...
8006 (linux_detach): ... and here, before actually detaching.
8007 (linux_wait_1): ... and here, when a process exits.
8008 * thread-db.c (any_thread_of): New.
8009 (thread_db_free): Switch the current inferior to a thread of the
8010 passed in process.
8011
4ee62156
DE
80122009-12-21 Doug Evans <dje@google.com>
8013
d90e6a88
DE
8014 * linux-x86-low.c: Delete outdated comment about Elf32_Phdr.
8015
c5f62d5f
DE
8016 * linux-low.c (kill_lwp): Use __NR_tkill instead of SYS_tkill.
8017 Move definition of tkill_failed to ifdef __NR_tkill to avoid gcc
8018 warning ifndef __NR_tkill. Move setting of errno there too.
8019 Delete unnecessary resetting of errno after syscall.
8020 Minor comment changes to match gdb/linux-nat.c:kill_lwp.
8021
10e86dd7
DE
8022 * configure.ac: Check for dladdr.
8023 * config.in: Regenerate.
8024 * configure: Regenerate.
8025 * thread-db.c (dladdr_to_soname): Only define ifdef HAVE_DLADDR.
8026 (try_thread_db_load): Update.
8027
4ee62156
DE
8028 * linux-low.c (my_waitpid): Delete unnecessary prototype.
8029
00f515da
DE
80302009-12-18 Doug Evans <dje@google.com>
8031
e9464885
DE
8032 * event-loop.c: Include unistd.h if it exists.
8033
07d4f67e
DE
8034 * linux-low.c (my_waitpid): Move definition away from being in
8035 between linux_tracefork_child/linux_test_for_tracefork.
8036
00f515da
DE
8037 * gdb_proc_service.h (psaddr_t): Fix type.
8038 * thread-db.c (thread_db_info.td_thr_tls_get_addr_p): Fix
8039 signature to match glibc.
8040
1de1badb
DE
80412009-12-16 Doug Evans <dje@google.com>
8042
8043 * linux-low.c (linux_read_memory): Fix argument to read.
8044
aeeb81d1
PA
80452009-11-26 Pedro Alves <pedro@codesourcery.com>
8046
8047 * win32-low.c (get_child_debug_event): On EXIT_THREAD_DEBUG_EVENT
8048 events, don't leave current_inferior pointing at null.
8049
10357975
PA
80502009-11-26 Pedro Alves <pedro@codesourcery.com>
8051
8052 * win32-low.c (LOG): Delete.
8053 (OUTMSG): Output to stderr.
8054 (OUTMSG2): Conditionalize on `debug_threads' variable, instead of
8055 on compile time LOG macro.
8056 (win32_wait): Fix debug output.
8057
cf6e3471
PA
80582009-11-26 Pedro Alves <pedro@codesourcery.com>
8059
8060 * win32-low.c (win32_add_one_solib): If the dll name is
8061 "ntdll.dll", prepend the system directory to the dll path.
8062
0c85e18e
MK
80632009-11-17 Daniel Jacobowitz <dan@codesourcery.com>
8064
8065 * m68k-tdep.c (m68k_gdbarch_init): Reuse previous initialization.
8066
9ac544ce 80672009-11-17 Nathan Sidwell <nathan@codesourcery.com>
889bf7c5 8068 Vladimir Prus <vladimir@codesourcery.com>
9ac544ce
MK
8069
8070 * Makefile.in (reg-cf.o, reg-cf.c): New targets.
8071 * configure.ac: Check for __mcoldfire__ and set
8072 gdb_cv_m68k_is_coldfire.
8073 * configure.srv: Use gdb_cv_m68k_is_coldfire to select between
8074 reg-cf.o and reg-m68k.o.
8075 * configure: Regenerated.
8076
fd7dd3e6
PA
80772009-11-16 Pedro Alves <pedro@codesourcery.com>
8078
8079 * linux-low.c (linux_remove_process): Add `detaching' parameter.
8080 Pass it to thread_db_free.
8081 (linux_kill, linux_detach, linux_wait_1): Adjust to pass the
8082 proper `detaching' argument to linux_remove_process.
8083 * linux-low.h (thread_db_free): Add `detaching' parameter.
8084 * thread-db.c (thread_db_init): Pass false as `detaching' argument
8085 to thread_db_free.
8086 (thread_db_free): Add `detaching' parameter. Only
8087 call td_ta_clear_event if detaching from process.
8088
75aa492e
MK
80892009-11-12 Maxim Kuvyrkov <maxim@codesourcery.com>
8090
8091 * thread-db.c (thread_db_free): Fix typo.
8092
21e1bee4
PP
80932009-11-11 Paul Pluzhnikov <ppluzhnikov@google.com>
8094
8095 PR gdb/10838
8096 * thread-db.c (thread_db_free): Call td_ta_clear_event.
8097
8838b45e
NS
80982009-11-03 Nathan Sidwell <nathan@codesourcery.com>
8099
8100 * configure.ac (i[34567]86-*): Check if we're targetting x86-64
8101 with an i686 compiler.
8102 * configure.srv (i[34567]86-*-linux*): Pull in x86-64 handling if
8103 needed.
8104 * configure: Rebuilt.
8105
8a35fb51
SL
81062009-10-29 Sandra Loosemore <sandra@codesourcery.com>
8107
8108 PR gdb/10783
8109
8110 * server.c (handle_search_memory_1): Correct read_addr initialization
8111 in loop for searching subsequent chunks.
8112
96f15937
PP
81132009-10-29 Paul Pluzhnikov <ppluzhnikov@google.com>
8114
8115 * configure.ac: New --with-libthread-db option.
8116 * thread-db.c: Allow direct dependence on libthread_db.
8117 (thread_db_free): Adjust.
8118 * config.in: Regenerate.
8119 * configure: Likewise.
889bf7c5 8120
5f7d1694
PP
81212009-10-28 Paul Pluzhnikov <ppluzhnikov@google.com>
8122
8123 PR gdb/10757
8124 * thread-db.c (attach_thread): New function.
8125 (maybe_attach_thread): Return success/failure.
8126 (find_new_threads_callback): Adjust.
889bf7c5
PA
8127 (thread_db_find_new_threads): Loop until no new threads.
8128
88e3b899
PA
81292009-10-13 Pedro Alves <pedro@codesourcery.com>
8130
8131 * proc-service.c (ps_lgetregs): Formatting.
8132
cdbfd419
PP
81332009-10-08 Paul Pluzhnikov <ppluzhnikov@google.com>
8134
8135 * acinclude.m4: (SRV_CHECK_THREAD_DB, SRV_CHECK_TLS_GET_ADDR): Remove.
8136 * configure.ac: Adjust.
8137 * linux-low.h (struct process_info_private): Move members to struct
8138 thread_db.
8139 (thread_db_free, thread_db_handle_monitor_command): New prototype.
8140 * linux-low.c (linux_remove_process): Adjust.
8141 (linux_wait_for_event_1, linux_look_up_symbols): Likewise.
8142 * server.c (handle_query): Move code ...
8143 (handle_monitor_command): ... here. New function.
8144 * target.h (struct target_ops): New member.
8145 * thread-db.c (struct thread_db): New.
8146 (libthread_db_search_path): New variable.
8147 (thread_db_create_event, thread_db_enable_reporting)
8148 (find_one_thread, maybe_attach_thread, find_new_threads_callback)
8149 (thread_db_find_new_threads, (thread_db_get_tls_address): Adjust.
8150 (try_thread_db_load_1, dladdr_to_soname): New functions.
8151 (try_thread_db_load, thread_db_load_search): New functions.
8152 (thread_db_init): Search for libthread_db.
8153 (thread_db_free): New function.
8154 (thread_db_handle_monitor_command): Likewise.
8155 * config.in: Regenerate.
8156 * configure: Regenerate.
889bf7c5 8157
4168d2d6
UW
81582009-09-27 Ulrich Weigand <uweigand@de.ibm.com>
8159
8160 * spu-low.c (spu_kill): Wait for inferior to terminate.
8161 Call clear_inferiors.
8162 (spu_detach): Call clear_inferiors.
8163
81ecdfbb
RW
81642009-08-22 Ralf Wildenhues <Ralf.Wildenhues@gmx.de>
8165
8166 * aclocal.m4: Regenerate.
8167 * config.in: Likewise.
8168 * configure: Likewise.
8169
0b9ff2c0
UW
81702009-07-31 Ulrich Weigand <uweigand@de.ibm.com>
8171
8172 * linux-ppc-low.c (INSTR_SC, NR_spu_run): Define.
8173 (parse_spufs_run): New function.
8174 (ppc_get_pc, ppc_set_pc): Detect and handle SPU PC.
8175 (ppc_breakpoint_at): Handle SPU breakpoints.
8176
efcbbd14
UW
81772009-07-31 Ulrich Weigand <uweigand@de.ibm.com>
8178
8179 * linux-low.c: Include <sys/stat.h> and <sys/vfs.h>.
8180 (SPUFS_MAGIC): Define.
8181 (spu_enumerate_spu_ids): New function.
8182 (linux_qxfer_spu): New function.
8183 (linux_target_ops): Install linux_qxfer_spu.
8184
f4d9bade
UW
81852009-07-31 Ulrich Weigand <uweigand@de.ibm.com>
8186
8187 * configure.srv (powerpc*-*-linux*): Add powerpc-cell32l.o
8188 and powerpc-cell64l.o to srv_regobj. Add rs6000/powerpc-cell32l.xml
8189 and rs6000/powerpc-cell64l.xml to srv_xmlfiles.
8190 * Makefile.in (powerpc-cell32l.o, powerpc-cell32l.c): New rules.
8191 (powerpc-cell64l.o, powerpc-cell64l.c): Likewise.
8192 (clean): Handle powerpc-cell32l.c and powerpc-cell64l.c.
8193 * linux-ppc-low.c (PPC_FEATURE_CELL): Define.
8194 (init_registers_powerpc_cell32l): Add prototype.
8195 (init_registers_powerpc_cell64l): Likewise.
8196 (ppc_arch_setup): Detect Cell/B.E. architecture.
8197
96e946ca
RW
81982009-07-30 Ralf Wildenhues <Ralf.Wildenhues@gmx.de>
8199
8200 * Makefile.in (datarootdir): New variable.
8201
58d6951d
DJ
82022009-07-28 Daniel Jacobowitz <dan@codesourcery.com>
8203
8204 * linux-low.c (linux_write_memory): Update debugging output.
8205 * Makefile.in (clean): Add new descriptions.
8206 (arm-with-vfpv2.o, arm-with-vfpv2.c, arm-with-vfpv3.o)
8207 (arm-with-vfpv3.c, arm-with-neon.o, arm-with-neon.c): New rules.
8208 * configure.srv: Add new files for arm*-*-linux*.
8209 * linux-arm-low.c: Add new declarations.
8210 (PTRACE_GETVFPREGS, PTRACE_SETVFPREGS): Define if undefined.
8211 (arm_hwcap, HWCAP_VFP, HWCAP_IWMMXT, HWCAP_NEON, HWCAP_VFPv3)
8212 (HWCAP_VFPv3D16): New.
8213 (arm_fill_wmmxregset, arm_store_wmmxregset): Check HWCAP_IWMMXT
8214 instead of __IWMMXT__.
8215 (arm_fill_vfpregset, arm_store_vfpregset, arm_get_hwcap)
8216 (arm_arch_setup): New.
8217 (target_regsets): Remove #ifdef. Add VFP regset.
8218 (the_low_target): Use arm_arch_setup.
8219
12b42a12
DJ
82202009-07-28 Daniel Jacobowitz <dan@codesourcery.com>
8221
8222 * linux-low.c (linux_kill_one_lwp): Adjust kernel workaround to skip
8223 the main thread again.
8224
ac8c974e
AR
82252009-07-06 Aleksandar Ristovski <aristovski@qnx.com>
8226
8227 Adding Neutrino gdbserver.
8228 * configure: Regenerated.
8229 * configure.ac: Add case for srv_qnx and set LIBS accordingly.
8230 * configure.srv (i[34567]86-*-nto*): New target.
8231 * nto-low.c, nto-low.h, nto-x86-low.c: New files.
8232 * remote-utils.c [__QNX__]: Include sys/iomgr.h
8233 (nto_comctrl) [__QNX__]: New function.
8234 (enable_async_io, disable_async_io) [__QNX__]: Call nto_comctrl.
8235
4424e0c3 82362009-07-05 Danny Backx <dannybackx@users.sourceforge.net>
7437790a
PA
8237
8238 * configure.srv (i[34567]86-*-mingw32ce*): Add i386-low.o to
8239 srv_tgtobj.
8240
912cf4ba
PA
82412009-07-04 Danny Backx <dannybackx@users.sourceforge.net>
8242 Pedro Alves <pedro@codesourcery.com>
8243
8244 * win32-i386-low.c (i386_get_thread_context): Handle systems that
8245 don't support CONTEXT_EXTENDED_REGISTERS.
8246 (i386_win32_breakpoint, i386_win32_breakpoint_len): New.
8247 (the_low_target): Install them.
8248 * win32-low.c (get_child_debug_event): Handle WaitForDebugEvent
8249 failing with ERROR_PIPE_NOT_CONNECTED.
8250
aa5ca48f
DE
82512009-06-30 Doug Evans <dje@google.com>
8252 Pierre Muller <muller@ics.u-strasbg.fr>
8253
8254 Add h/w watchpoint support to x86-linux, win32-i386.
8255 * Makefile.in (SFILES): Add i386-low.c
8256 (i386_low_h): Define.
8257 (i386-low.o): Add dependencies.
8258 (linux-x86-low.o): Add i386-low.h dependency.
8259 (win32-i386-low.o): Ditto.
8260 * i386-low.c: New file.
8261 * i386-low.h: New file.
8262 * configure.srv (i[34567]86-*-cygwin*): Add i386-low.o to srv_tgtobj.
8263 (i[34567]86-*-linux*, i[34567]86-*-mingw*, x86_64-*-linux*): Ditto.
8264 * linux-low.c (linux_add_process): Initialize arch_private.
8265 (linux_remove_process): Free arch_private.
8266 (add_lwp): Initialize arch_private.
8267 (delete_lwp): Free arch_private.
8268 (linux_resume_one_lwp): Call the_low_target.prepare_to_resume if
8269 provided.
8270 * linux-low.h (process_info_private): New member arch_private.
8271 (lwp_info): New member arch_private.
8272 (linux_target_ops): New members new_process, new_thread,
8273 prepare_to_resume.
8274 (ptid_of): New macro.
8275 * linux-x86-low.c: Include stddef.h, i386-low.h.
8276 (arch_process_info): New struct.
8277 (arch_lwp_info): New struct.
8278 (x86_linux_dr_get, x86_linux_dr_set): New functions.
8279 (i386_dr_low_set_addr, i386_dr_low_set_control): New functions.
8280 (i386_dr_low_get_status): New function.
8281 (x86_insert_point, x86_remove_point): New functions.
8282 (x86_stopped_by_watchpoint): New function.
8283 (x86_stopped_data_address): New function.
8284 (x86_linux_new_process, x86_linux_new_thread): New functions.
8285 (x86_linux_prepare_to_resume): New function.
8286 (the_low_target): Add entries for insert_point, remove_point,
8287 stopped_by_watchpoint, stopped_data_address, new_process, new_thread,
8288 prepare_to_resume.
8289 * server.c (debug_hw_points): New global.
8290 (monitor_show_help): Document set debug-hw-points.
8291 (handle_query): Process "set debug-hw-points".
8292 * server.h (debug_hw_points): Declare.
8293 (paddress): Declare.
8294 * utils.c (NUMCELLS, CELLSIZE): New macros.
8295 (get_sell, xsnprintf, paddress): New functions.
8296 * win32-arm-low.c (the_low_target): Add entries for insert_point,
8297 remove_point, stopped_by_watchpoint, stopped_data_address.
8298 * win32-i386-low.c: Include i386-low.h.
8299 (debug_reg_state): Replaces dr.
8300 (i386_dr_low_set_addr, i386_dr_low_set_control): New functions.
8301 (i386_dr_low_get_status): New function.
8302 (i386_insert_point, i386_remove_point): New functions.
8303 (i386_stopped_by_watchpoint): New function.
8304 (i386_stopped_data_address): New function.
8305 (i386_initial_stuff): Update.
8306 (get_thread_context,set_thread_context,i386_thread_added): Update.
8307 (the_low_target): Add entries for insert_point,
8308 remove_point, stopped_by_watchpoint, stopped_data_address.
8309 * win32-low.c (win32_insert_watchpoint): New function.
8310 (win32_remove_watchpoint): New function.
8311 (win32_stopped_by_watchpoint): New function.
8312 (win32_stopped_data_address): New function.
8313 (win32_target_ops): Add entries for insert_watchpoint,
8314 remove_watchpoint, stopped_by_watchpoint, stopped_data_address.
8315 * win32-low.h (win32_target_ops): New members insert_point,
8316 remove_point, stopped_by_watchpoint, stopped_data_address.
8317
d993e290
PA
83182009-06-25 Pedro Alves <pedro@codesourcery.com>
8319
8320 * server.c (process_serial_event): Re-return unsupported, not
8321 error, if the type isn't recognized. Re-allow supporting only
8322 insert or remove packets. Also call require_running for
8323 breakpoints. Add missing break statement to default case. Tidy.
8324 * target.h (struct target_ops): Rename insert_watchpoint to
8325 insert_point, and remove_watchpoint to remove_point.
8326
8327 * linux-low.h (struct linux_target_ops): Likewise.
8328 * linux-low.c (linux_insert_watchpoint): Rename to ...
8329 (linux_insert_point): ... this. Adjust.
8330 (linux_remove_watchpoint): Rename to ...
8331 (linux_remove_point): ... this. Adjust.
8332 (linux_target_ops): Adjust.
8333 * linux-crisv32-low.c (cris_insert_watchpoint): Rename to ...
8334 (cris_insert_point): ... this.
8335 (cris_remove_watchpoint): Rename to ...
8336 (cris_remove_point): ... this.
8337 (the_low_target): Adjust.
8338
0f54c268
PM
83392009-06-24 Pierre Muller <muller@ics.u-strasbg.fr>
8340
8341 * server.c (handle_v_kill): Pass signal_pid to
8342 kill_inferior if multi_process is zero.
8343
c6314022
AR
83442009-06-23 Aleksandar Ristovski <aristovski@qnx.com>
8345
8346 * server.c (process_serial_event): Add support for Z0 and Z1 packet.
8347 * target.h (target_ops): Comment for *_watchpoint to make it clear
8348 the functions can get types '0' and '1'.
8349
4463ce24
AR
83502009-06-22 Aleksandar Ristovski <aristovski@qnx.com>
8351
8352 * linux-low.c (usr_fetch_inferior_registers): Remove check for regno 0.
8353 * proc-service.c (ps_lgetregs): Pass -1 to fetch all registers.
8354 * regcache.c (get_regcache): Likewise.
8355 * spu-low.c (spu_fetch_registers): Remove 0 to -1 conversion.
8356 * win32-low.c (child_fetch_inferior_registers): Remove check for
8357 regno 0.
8358
cf8fd78b
PA
83592009-06-19 Aleksandar Ristovski <aristovski@qnx.com>
8360 Pedro Alves <pedro@codesourcery.com>
8361
8362 * target.h (struct target_ops) <supports_multi_process>: New
8363 callback.
8364 (target_supports_multi_process): New.
8365 * server.c (handle_query): Even if GDB reports support, only
8366 enable multi-process if the target also supports it. Report
8367 multi-process support only if the target backend supports it.
8368 * linux-low.c (linux_supports_multi_process): New function.
8369 (linux_target_ops): Install it as target_supports_multi_process
8370 callback.
8371
47c0c975
DE
83722009-05-24 Doug Evans <dje@google.com>
8373
e09875d4
DE
8374 Global renaming of find_thread_pid to find_thread_ptid.
8375 * server.h (find_thread_ptid): Renamed from find_thread_pid.
8376 * inferiors.c (find_thread_ptid): Renamed from find_thread_pid.
8377 All callers updated.
8378
e27d73f6
DE
8379 * linux-low.c (handle_extended_wait): Use linux_resume_one_lwp
8380 to resume the newly created thread, don't call ptrace (PTRACE_CONT)
8381 directly.
8382
47c0c975
DE
8383 * linux-low.c (get_stop_pc): Print pc if debug_threads.
8384 (check_removed_breakpoint, linux_wait_for_lwp): Ditto.
8385 (linux_resume_one_lwp): Ditto.
8386
2acc282a
DE
83872009-05-23 Doug Evans <dje@google.com>
8388
8389 * linux-low.c (linux_resume_one_lwp): Change type of first arg
8390 from struct inferior_list_entry * to struct lwp_info *.
8391 All callers updated.
8392
9f1036c1
DE
83932009-05-13 Doug Evans <dje@google.com>
8394
8395 * linux-x86-low.c: Don't include assert.h.
8396 (x86_siginfo_fixup): Use fatal, not assert.
8397 (x86_arch_setup): Fix comment.
8398
d0722149
DE
83992009-05-12 Doug Evans <dje@google.com>
8400
8401 Biarch support for i386/amd64 gdbserver.
8402 * Makefile.in (SFILES): Remove linux-i386-low.c, linux-x86-64-low.c.
8403 Add linux-x86-low.c.
8404 (linux-i386-low.o, linux-x86-64-low.o): Delete.
8405 (linux-x86-low.o): Add.
8406 * linux-x86-64-low.c: Delete.
8407 * linux-i386-low.c: Delete.
8408 * linux-x86-low.c: New file.
8409 * configure.srv (i?86-linux srv_tgtobj): Replace linux-i386-low.o with
8410 linux-x86-low.o.
8411 (x86_64-linux srv_tgtobj): Replace linux-x86-64-low.o with
8412 linux-x86-low.o.
8413 (x86_64-linux srv_regobj): Add reg-i386-linux.o.
8414 * linux-low.c: Include ansidecl.h, elf/common.h, elf/external.h.
8415 (linux_child_pid_to_exec_file): New function.
8416 (elf_64_header_p, elf_64_file_p): New functions.
8417 (siginfo_fixup): New function.
8418 (linux_xfer_siginfo): New local inf_siginfo. Call siginfo_fixup to
8419 give target a chance to convert layout.
8420 * linux-low.h (linux_target_ops): New member siginfo_fixup.
8421 (linux_child_pid_to_exec_file, elf_64_file_p): Declare.
8422
fdeb2a12
DE
84232009-05-07 Doug Evans <dje@google.com>
8424
8425 * linux-low.c (regsets_fetch_inferior_registers): Fix memory leak.
8426 (regsets_store_inferior_registers): Ditto.
8427
a6dbe5df
PA
84282009-05-06 Pedro Alves <pedro@codesourcery.com>
8429
8430 PR server/10048
8431
8432 * linux-low.c (must_set_ptrace_flags): Delete.
8433 (linux_create_inferior): Set `lwp->must_set_ptrace_flags' instead
8434 of the global.
8435 (linux_attach_lwp_1): Don't set PTRACE_SETOPTIONS here. Set
8436 `lwp->must_set_ptrace_flags' instead.
ba42693b 8437 (linux_wait_for_event_1): Set ptrace options here.
a6dbe5df
PA
8438 (linux_wait_1): ... not here.
8439
5091eb23
DE
84402009-04-30 Doug Evans <dje@google.com>
8441
9f767825
DE
8442 * inferiors.c (started_inferior_callback): New function.
8443 (attached_inferior_callback): New function.
8444 (have_started_inferiors_p, have_attached_inferiors_p): New functions.
8445 * server.c (print_started_pid, print_attached_pid): New functions.
8446 (detach_or_kill_for_exit): New function.
8447 (main): Call it instead of for_each_inferior (kill_inferior_callback).
8448 * server.h (have_started_inferiors_p): Declare.
8449 (have_attached_inferiors_p): Declare.
8450
5091eb23
DE
8451 * inferiors.c (remove_process): Fix memory leak, free process.
8452 * linux-low.c (linux_remove_process): New function.
8453 (linux_kill): Call it instead of remove_process.
8454 (linux_detach, linux_wait_1): Ditto.
8455
155c8968
PA
84562009-04-19 Danny Backx <dannybackx@users.sourceforge.net>
8457
8458 * configure.srv: Add x86 Windows CE target.
8459
7fe519cb
UW
84602009-04-03 Ulrich Weigand <uweigand@de.ibm.com>
8461
8462 * inferiors.c (get_thread_process): Make global.
8463 * server.h (get_thread_process): Add prototype.
8464 * thread-db.c (find_one_thread): Use get_thread_process
8465 instead of current_process.
8466 (thread_db_get_tls_address): Do not crash if called when
8467 thread layer is not yet initialized.
8468
5472f405
UW
84692009-04-03 Ulrich Weigand <uweigand@de.ibm.com>
8470
8471 * remote-utils.c (prepare_resume_reply): Null-terminate packet.
8472 * spu-low.c (current_tid): Rename to ...
8473 (current_ptid): ... this.
8474 (fetch_ppc_register, fetch_ppc_memory, store_ppc_memory,
8475 spu_proc_xfer_spu, spu_resume, spu_request_interrupt): Use
8476 ptid_get_lwp (current_ptid) instead of current_tid.
8477 (spu_kill, spu_detach, spu_join, spu_wait): Use pid argument
8478 instead of current_tid. Use find_process_pid to verify pid
8479 argument is valid. Pass proper argument to remove_process.
8480 (spu_thread_alive): Compare current_ptid instead of current_tid.
8481 (spu_resume): Likewise.
8482
55ac2b99
PA
84832009-04-02 Pedro Alves <pedro@codesourcery.com>
8484
8485 * linux-low.c (usr_store_inferior_registers): Declare local `pid'
8486 variable.
8487
95954743
PA
84882009-04-01 Pedro Alves <pedro@codesourcery.com>
8489
8490 Implement the multiprocess extensions, and add linux multiprocess
8491 support.
8492
8493 * server.h (ULONGEST): Declare.
8494 (struct ptid, ptid_t): New.
8495 (minus_one_ptid, null_ptid): Declare.
8496 (ptid_build, pid_to_ptid, ptid_get_pid, ptid_get_lwp)
8497 (ptid_get_tid, ptid_equal, ptid_is_pid): Declare.
8498 (struct inferior_list_entry): Change `id' type from unsigned from
8499 to ptid_t.
8500 (struct sym_cache, struct breakpoint, struct
8501 process_info_private): Forward declare.
8502 (struct process_info): Declare.
8503 (current_process): Declare.
8504 (all_processes): Declare.
8505 (initialize_inferiors): Declare.
8506 (add_thread): Adjust to use ptid_t.
8507 (thread_id_to_gdb_id, thread_to_gdb_id, gdb_id_to_thread_id): Ditto.
8508 (add_process, remove_process, find_thread_pid): Declare.
8509 (find_inferior_id): Adjust to use ptid_t.
8510 (cont_thread, general_thread, step_thread): Change type to ptid_t.
8511 (multi_process): Declare.
8512 (push_event): Adjust to use ptid_t.
8513 (read_ptid, write_ptid): Declare.
8514 (prepare_resume_reply): Adjust to use ptid_t.
8515 (clear_symbol_cache): Declare.
8516 * inferiors.c (all_processes): New.
8517 (null_ptid, minus_one_ptid): New.
8518 (ptid_build, pid_to_ptid, ptid_get_pid, ptid_get_lwp)
8519 (ptid_get_tid, ptid_equal, ptid_is_pid): New.
8520 (add_thread): Change unsigned long to ptid. Remove gdb_id
8521 parameter. Adjust.
8522 (thread_id_to_gdb_id, thread_to_gdb_id): Change unsigned long to ptid.
8523 (gdb_id_to_thread): Rename to ...
8524 (find_thread_pid): ... this. Change unsigned long to ptid.
8525 (gdb_id_to_thread_id, find_inferior_id): Change unsigned long to ptid.
8526 (loaded_dll, pull_pid_from_list): Adjust.
8527 (add_process, remove_process, find_process_pid)
8528 (get_thread_process, current_process, initialize_inferiors): New.
8529 * target.h (struct thread_resume) <thread>: Change type to ptid_t.
8530 (struct target_waitstatus) <related_pid>: Ditto.
8531 (struct target_ops) <kill, detach>: Add `pid' argument. Change
8532 return type to int.
8533 (struct target_ops) <join>: Add `pid' argument.
8534 (struct target_ops) <thread_alive>: Change pid's type to ptid_t.
8535 (struct target_ops) <wait>: Add `ptid' field. Change return type
8536 to ptid.
8537 (kill_inferior, detach_inferior, join_inferior): Add `pid' argument.
8538 (mywait): Add `ptid' argument. Change return type to ptid_t.
8539 (target_pid_to_str): Declare.
8540 * target.c (set_desired_inferior): Adjust to use ptids.
8541 (mywait): Add new `ptid' argument. Adjust.
8542 (target_pid_to_str): New.
8543 * mem-break.h (free_all_breakpoints): Declare.
8544 * mem-break.c (breakpoints): Delelete.
8545 (set_breakpoint_at, delete_breakpoint, find_breakpoint_at)
8546 (check_mem_read, check_mem_write, delete_all_breakpoints): Adjust
8547 to use per-process breakpoint list.
8548 (free_all_breakpoints): New.
8549 * remote-utils.c (struct sym_cache) <name>: Drop `const'.
8550 (symbol_cache, all_symbols_looked_up): Delete.
8551 (hexchars): New.
8552 (ishex, unpack_varlen_hex, write_ptid, hex_or_minus_one,
8553 read_ptid): New.
8554 (prepare_resume_reply): Change ptid argument's type from unsigned
8555 long to ptid_t. Adjust. Implement W;process and X;process.
8556 (free_sym_cache, clear_symbol_cache): New.
8557 (look_up_one_symbol): Adjust to per-process symbol cache. *
8558 * server.c (cont_thread, general_thread, step_thread): Change type
8559 to ptid_t.
8560 (attached): Delete.
8561 (multi_process): New.
8562 (last_ptid): Change type to ptid_t.
8563 (struct vstop_notif) <ptid>: Change type to ptid_t.
8564 (queue_stop_reply, push_event): Change `ptid' argument's type to
8565 ptid_t.
8566 (discard_queued_stop_replies): Add `pid' argument.
8567 (start_inferior): Adjust to use ptids. Adjust to mywait interface
8568 changes. Don't reference the `attached' global.
8569 (attach_inferior): Adjust to mywait interface changes.
8570 (handle_query): Adjust to use ptids. Parse GDB's qSupported
8571 features. Handle and report "multiprocess+". Handle
8572 "qAttached:PID".
8573 (handle_v_cont): Adjust to use ptids. Adjust to mywait interface
8574 changes.
8575 (handle_v_kill): New.
8576 (handle_v_stopped): Adjust to use target_pid_to_str.
8577 (handle_v_requests): Allow multiple attaches and runs when
8578 multiprocess extensions are in effect. Handle "vKill".
8579 (myresume): Adjust to use ptids.
8580 (queue_stop_reply_callback): Add `arg' parameter. Handle it.
8581 (handle_status): Adjust to discard_queued_stop_replies interface
8582 change.
8583 (first_thread_of, kill_inferior_callback)
8584 (detach_or_kill_inferior_callback, join_inferiors_callback): New.
8585 (main): Call initialize_inferiors. Adjust to use ptids, killing
8586 and detaching from all inferiors. Handle multiprocess packet
8587 variants.
8588 * linux-low.h: Include gdb_proc_service.h.
8589 (struct process_info_private): New.
8590 (struct linux_target_ops) <pid_of>: Use ptid_get_pid.
8591 <lwpid_of>: Use ptid_get_lwp.
8592 (get_lwp_thread): Adjust.
8593 (struct lwp_info): Add `dead' member.
8594 (find_lwp_pid): Declare.
8595 * linux-low.c (thread_db_active): Delete.
8596 (new_inferior): Adjust comment.
8597 (inferior_pid): Delete.
8598 (linux_add_process): New.
8599 (handle_extended_wait): Adjust.
8600 (add_lwp): Change unsigned long to ptid.
8601 (linux_create_inferior): Add process to processes table. Adjust
8602 to use ptids. Don't set new_inferior here.
8603 (linux_attach_lwp): Rename to ...
8604 (linux_attach_lwp_1): ... this. Add `initial' argument. Handle
8605 it. Adjust to use ptids.
8606 (linux_attach_lwp): New.
8607 (linux_attach): Add process to processes table. Don't set
8608 new_inferior here.
8609 (struct counter): New.
8610 (second_thread_of_pid_p, last_thread_of_process_p): New.
8611 (linux_kill_one_lwp): Add `args' parameter. Handle it. Adjust to
8612 multiple processes.
8613 (linux_kill): Add `pid' argument. Handle it. Adjust to multiple
8614 processes. Remove process from process table.
8615 (linux_detach_one_lwp): Add `args' parameter. Handle it. Adjust
8616 to multiple processes.
8617 (any_thread_of): New.
8618 (linux_detach): Add `pid' argument, and handle it. Remove process
8619 from processes table.
8620 (linux_join): Add `pid' argument. Handle it.
8621 (linux_thread_alive): Change unsighed long argument to ptid_t.
8622 Consider dead lwps as not being alive.
8623 (status_pending_p): Rename `dummy' argument to `arg'. Filter out
8624 threads we're not interested in.
8625 (same_lwp, find_lwp_pid): New.
8626 (linux_wait_for_lwp): Change `pid' argument's type from int to
8627 ptid_t. Adjust.
8628 (linux_wait_for_event): Rename to ...
8629 (linux_wait_for_event_1): ... this. Change `pid' argument's type
8630 from int to ptid_t. Adjust.
8631 (linux_wait_for_event): New.
8632 (linux_wait_1): Add `ptid' argument. Change return type to
8633 ptid_t. Adjust. Use last_thread_of_process_p. Remove processes
8634 that exit from the process table.
8635 (linux_wait): Add `ptid' argument. Change return type to ptid_t.
8636 Adjust.
8637 (mark_lwp_dead): New.
8638 (wait_for_sigstop): Adjust to use ptids. If a process exits while
8639 stopping all threads, mark its main lwp as dead.
8640 (linux_set_resume_request, linux_resume_one_thread): Adjust to use
8641 ptids.
8642 (fetch_register, usr_store_inferior_registers)
8643 (regsets_fetch_inferior_registers)
8644 (regsets_store_inferior_registers, linux_read_memory)
8645 (linux_write_memory): Inline `inferior_pid'.
8646 (linux_look_up_symbols): Adjust to use per-process
8647 `thread_db_active'.
8648 (linux_request_interrupt): Adjust to use ptids.
8649 (linux_read_auxv): Inline `inferior_pid'.
8650 (initialize_low): Don't reference thread_db_active.
8651 * gdb_proc_service.h (struct ps_prochandle) <pid>: Remove.
8652 * proc-service.c (ps_lgetregs): Use find_lwp_pid.
8653 (ps_getpid): Return the pid of the current inferior.
8654 * thread-db.c (proc_handle, thread_agent): Delete.
8655 (thread_db_create_event, thread_db_enable_reporting): Adjust to
8656 per-process data.
8657 (find_one_thread): Change argument type to ptid_t. Adjust to
8658 per-process data.
8659 (maybe_attach_thread): Adjust to per-process data and ptids.
8660 (thread_db_find_new_threads): Ditto.
8661 (thread_db_init): Ditto.
8662 * spu-low.c (spu_create_inferior, spu_attach): Add process to
8663 processes table. Adjust to use ptids.
8664 (spu_kill, spu_detach): Adjust interface. Remove process from
8665 processes table.
8666 (spu_join, spu_thread_alive): Adjust interface.
8667 (spu_wait): Adjust interface. Remove process from processes
8668 table. Adjust to use ptids.
8669 * win32-low.c (current_inferior_tid): Delete.
8670 (current_inferior_ptid): New.
8671 (debug_event_ptid): New.
8672 (thread_rec): Take a ptid. Adjust.
8673 (child_add_thread): Add `pid' argument. Adjust to use ptids.
8674 (child_delete_thread): Ditto.
8675 (do_initial_child_stuff): Add `attached' argument. Add process to
8676 processes table.
8677 (child_fetch_inferior_registers, child_store_inferior_registers):
8678 Adjust.
8679 (win32_create_inferior): Pass 0 to do_initial_child_stuff.
8680 (win32_attach): Pass 1 to do_initial_child_stuff.
8681 (win32_kill): Adjust interface. Remove process from processes
8682 table.
8683 (win32_detach): Ditto.
8684 (win32_join): Adjust interface.
8685 (win32_thread_alive): Take a ptid.
8686 (win32_resume): Adjust to use ptids.
8687 (get_child_debug_event): Ditto.
8688 (win32_wait): Adjust interface. Remove exiting process from
8689 processes table.
8690
bd99dc85
PA
86912009-04-01 Pedro Alves <pedro@codesourcery.com>
8692
8693 Non-stop mode support.
8694
8695 * server.h (non_stop): Declare.
8696 (gdb_client_data, handler_func): Declare.
8697 (delete_file_handler, add_file_handler, start_event_loop):
8698 Declare.
8699 (handle_serial_event, handle_target_event, push_event)
8700 (putpkt_notif): Declare.
8701 * target.h (enum resume_kind): New.
8702 (struct thread_resume): Replace `step' field by `kind' field.
8703 (TARGET_WNOHANG): Define.
8704 (struct target_ops) <wait>: Add `options' argument.
8705 <supports_non_stop, async, start_non_stop>: New fields.
8706 (target_supports_non_stop, target_async): New.
8707 (start_non_stop): Declare.
8708 (mywait): Add `options' argument.
8709 * target.c (mywait): Add `options' argument. Print child exit
8710 notifications here.
8711 (start_non_stop): New.
8712 * server.c (non_stop, own_buf, mem_buf): New globals.
8713 (struct vstop_notif): New.
8714 (notif_queue): New global.
8715 (queue_stop_reply, push_event, discard_queued_stop_replies)
8716 (send_next_stop_reply): New.
8717 (start_inferior): Adjust to use resume_kind. Adjust to mywait
8718 interface changes.
8719 (attach_inferior): In non-stop mode, don't wait for the target
8720 here.
8721 (handle_general_set): Handle QNonStop.
8722 (handle_query): When handling qC, return the current general
8723 thread, instead of the first thread of the list.
8724 (handle_query): If the backend supports non-stop mode, include
8725 QNonStop+ in the qSupported query response.
8726 (handle_v_cont): Adjust to use resume_kind. Handle resume_stop
8727 and non-stop mode.
8728 (handle_v_attach, handle_v_run): Handle non-stop mode.
8729 (handle_v_stopped): New.
8730 (handle_v_requests): Report support for vCont;t. Handle vStopped.
8731 (myresume): Adjust to use resume_kind. Handle non-stop.
8732 (queue_stop_reply_callback): New.
8733 (handle_status): Handle non-stop mode.
8734 (main): Clear non_stop flag on reconnection. Use the event-loop.
8735 Refactor serial protocol handling from here ...
8736 (process_serial_event): ... to this new function. When GDB
8737 selects any thread, select one here. In non-stop mode, wait until
8738 GDB acks all pending events before exiting.
8739 (handle_serial_event, handle_target_event): New.
8740 * remote-utils.c (remote_open): Install remote_desc in the event
8741 loop.
8742 (remote_close): Remove remote_desc from the event loop.
8743 (putpkt_binary): Rename to...
8744 (putpkt_binary_1): ... this. Add `is_notic' argument. Handle it.
8745 (putpkt_binary): New as wrapper around putpkt_binary_1.
8746 (putpkt_notif): New.
8747 (prepare_resume_reply): In non-stop mode, don't change the
8748 general_thread.
8749 * event-loop.c: New.
8750 * Makefile.in (OBJ): Add event-loop.o.
8751 (event-loop.o): New rule.
8752
8753 * linux-low.h (pid_of): Moved here.
8754 (lwpid_of): New.
8755 (get_lwp_thread): Use lwpid_of.
8756 (struct lwp_info): Delete `lwpid' field. Add `suspended' field.
8757 * linux-low.c (pid_of): Delete.
8758 (inferior_pid): Use lwpid_of.
8759 (linux_event_pipe): New.
8760 (target_is_async_p): New.
8761 (delete_lwp): New.
8762 (handle_extended_wait): Use lwpid_of.
8763 (add_lwp): Don't set lwpid field.
8764 (linux_attach_lwp): Adjust debug output. Use lwpid_of.
8765 (linux_kill_one_lwp): If killing a running lwp, stop it first.
8766 Use lwpid_of. Adjust to linux_wait_for_event interface changes.
8767 (linux_detach_one_lwp): If detaching from a running lwp, stop it
8768 first. Adjust to linux_wait_for_event interface changes. Use
8769 lwpid_of.
8770 (linux_detach): Don't delete the main lwp here.
8771 (linux_join): Use my_waitpid. Avoid signal_pid. Use lwpid_of.
8772 (status_pending_p): Don't consider explicitly suspended lwps.
8773 (linux_wait_for_lwp): Take an integer pid instead of a lwp_info
8774 pointer. Add OPTIONS argument. Change return type to int. Use
8775 my_waitpid instead of sleeping. Handle WNOHANG. Use lwpid_of.
8776 (linux_wait_for_event): Take an integer pid instead of a lwp_info
8777 pointer. Add status pointer argument. Return a pid instead of a
8778 status. Use lwpid_of. Adjust to linux_wait_for_lwp interface
8779 changes. In non-stop mode, don't switch to a random thread.
8780 (linux_wait): Rename to...
8781 (linux_wait_1): ... this. Add target_options argument, and handle
8782 it. Adjust to use resume_kind. Use lwpid_of. In non-stop mode,
8783 don't handle the continue thread. Handle TARGET_WNOHANG. Merge
8784 clean exit and signal exit code. Don't stop all threads in
8785 non-stop mode. In all-stop mode, only stop all threads when
8786 reporting a stop to GDB. Handle explicit thread stop requests.
8787 (async_file_flush, async_file_mark): New.
8788 (linux_wait): New.
8789 (send_sigstop): Use lwpid_of.
8790 (wait_for_sigstop): Use lwpid_of. Adjust to linux_wait_for_event
8791 interface changes. In non-stop mode, don't switch to a random
8792 thread.
8793 (linux_resume_one_lwp): Use lwpid_of.
8794 (linux_continue_one_thread, linux_queue_one_thread): Merge into ...
8795 (linux_resume_one_thread): ... this. Handle resume_stop. In
8796 non-stop mode, don't look for pending flag in all threads.
8797 (resume_status_pending_p): Don't consider explicitly suspended
8798 threads.
8799 (my_waitpid): Reimplement. Emulate __WALL.
8800 (linux_request_interrupt, linux_read_offsets, linux_xfer_siginfo):
8801 Use lwpid_of.
8802 (sigchld_handler, linux_supports_non_stop, linux_async)
8803 (linux_start_non_stop): New.
8804 (linux_target_ops): Register linux_supports_non_stop, linux_async
8805 and linux_start_non_stop.
8806 (initialize_low): Install SIGCHLD handler.
8807 * thread-db.c (thread_db_create_event, find_one_thread)
8808 (thread_db_get_tls_address): Use lwpid_of.
8809 * win32-low.c (win32_detach): Adjust to use resume_kind.
8810 (win32_wait): Add `options' argument.
8811 * spu-low.c (spu_resume): Adjust to use resume_kind.
8812 (spu_wait): Add `options' argument.
8813
5b1c542e
PA
88142009-04-01 Pedro Alves <pedro@codesourcery.com>
8815
8816 Decouple target code from remote protocol.
8817
8818 * target.h (enum target_waitkind): New.
8819 (struct target_waitstatus): New.
8820 (struct target_ops) <wait>: Return an unsigned long. Take a
8821 target_waitstatus pointer instead of a char pointer.
8822 (mywait): Likewise.
8823 * target.c (mywait): Change prototype to return an unsigned long.
8824 Take a target_waitstatus pointer instead of a char pointer. Adjust.
8825 * server.h (thread_from_wait, old_thread_from_wait): Delete
8826 declarations.
8827 (prepare_resume_reply): Change prototype to take a
8828 target_waitstatus.
8829 * server.c (thread_from_wait, old_thread_from_wait): Delete.
8830 (last_status, last_ptid): New.
8831 (start_inferior): Remove "statusptr" argument. Adjust. Return a
8832 pid instead of a signal.
8833 (attach_inferior): Remove "status" and "signal" parameters.
8834 Adjust.
8835 (handle_query): For qGetTLSAddr, parse the thread id with strtol,
8836 not as an address.
8837 (handle_v_cont, handle_v_attach, handle_v_run, handle_v_kill)
8838 (handle_v_requests, myresume): Remove "status" and "signal"
8839 parameters. Adjust.
8840 (handle_status): New.
8841 (main): Delete local `status'. Adjust.
8842 * remote-utils.c: Include target.h.
8843 (prepare_resume_reply): Change prototype to take a
8844 target_waitstatus. Adjust.
8845
8846 * linux-low.c (linux_wait): Adjust to new target_ops->wait
8847 interface.
8848 * spu-low.c (spu_wait): Adjust.
8849 * win32-low.c (enum target_waitkind, struct target_waitstatus):
8850 Delete.
8851 (win32_wait): Adjust.
8852
2bd7c093
PA
88532009-04-01 Pedro Alves <pedro@codesourcery.com>
8854
8855 * target.h (struct thread_resume): Delete leave_stopped member.
8856 (struct target_ops): Add a `n' argument to the `resume' callback.
8857 * server.c (start_inferior): Adjust.
8858 (handle_v_cont, myresume): Adjust.
8859 * linux-low.c (check_removed_breakpoint): Adjust to resume
8860 interface change, and to removed leave_stopped field.
8861 (resume_ptr): Delete.
8862 (struct thread_resume_array): New.
8863 (linux_set_resume_request): Add new `arg' parameter. Adjust to
8864 resume interface change.
8865 (linux_continue_one_thread, linux_queue_one_thread)
8866 (resume_status_pending_p): Check if the resume field is NULL
8867 instead of checking the leave_stopped member.
8868 (linux_resume): Adjust to the target resume interface change.
8869 * spu-low.c (spu_resume): Adjust to the target resume interface
8870 change.
8871 * win32-low.c (win32_detach, win32_resume): Ditto.
8872
c35fafde
PA
88732009-04-01 Pedro Alves <pedro@codesourcery.com>
8874
8875 * linux-low.c (linux_wait_for_event): Don't clear the `stepping'
8876 flag.
8877 (wait_for_sigstop): Don't leave a finished single-step SIGTRAP
8878 pending.
8879 (linux_continue_one_thread): Only preserve the stepping flag if
8880 there's a pending breakpoint.
8881
0a59d50b
PA
88822009-03-31 Pedro Alves <pedro@codesourcery.com>
8883
8884 * server.c (main): After the inferior having exited, call
8885 remote_close before exiting gdbserver.
8886
f04c6d38
TJB
88872009-03-25 Thiago Jung Bauermann <bauerman@br.ibm.com>
8888
8889 Fix size of FPSCR in Power 7 processors.
8890 * linux-ppc-low.c (PPC_FEATURE_ARCH_2_05): Remove #define.
8891 (PPC_FEATURE_HAS_DFP): New #define.
8892 (ppc_arch_setup): Check for DFP feature instead of ISA 2.05 to decide on
8893 size of the FPSCR.
8894
78e5cee6
PA
88952009-03-23 Pedro Alves <pedro@codesourcery.com>
8896
8897 * server.c (handle_query) Whitespace and formatting.
8898
1b3f6016
PA
88992009-03-22 Pedro Alves <pedro@codesourcery.com>
8900
8901 * i387-fp.c, linux-arm-low.c, linux-cris-low.c,
8902 linux-crisv32-low.c, linux-i386-low.c, linux-low.c,
8903 linux-mips-low.c, linux-s390-low.c, linux-sparc-low.c,
8904 linux-x86-64-low.c, linux-xtensa-low.c, proc-service.c,
8905 regcache.c, remote-utils.c, server.c, spu-low.c, target.h,
8906 thread-db.c, win32-low.c, xtensa-xtregs.c, gdbreplay.c,
8907 Makefile.in, configure.ac: Fix whitespace throughout.
8908 * configure: Regenerate.
8909
a07b2135
PA
89102009-03-22 Pedro Alves <pedro@codesourcery.com>
8911
8912 * inferiors.c (find_inferior): Make it safe for the callback
8913 function to delete the currently iterated inferior.
8914
67cc2626
PA
89152009-03-22 Pedro Alves <pedro@codesourcery.com>
8916
8917 * Makefile.in (linuw_low_h): Move higher.
8918 (thread-db.o): Depend on $(linux_low_h).
8919
54a0b537
PA
89202009-03-17 Pedro Alves <pedro@codesourcery.com>
8921
8922 Rename "process" to "lwp" throughout.
8923
8924 * linux-low.c (all_processes): Rename to...
8925 (all_lwps): ... this.
8926 (inferior_pid, handle_extended_wait, get_stop_pc): Adjust.
8927 (add_process): Rename to ...
8928 (add_lwp): ... this. Adjust.
8929 (linux_create_inferior): Adjust.
8930 (linux_attach_lwp): Adjust.
8931 (linux_attach): Adjust.
8932 (linux_kill_one_process): Rename to ...
8933 (linux_kill_one_lwp): ... this. Adjust.
8934 (linux_kill): Adjust.
8935 (linux_detach_one_process): Rename to ...
8936 (linux_detach_one_lwp): ... this. Adjust.
8937 (linux_detach): Adjust.
8938 (check_removed_breakpoint): Adjust.
8939 (status_pending_p): Adjust.
8940 (linux_wait_for_process): Rename to ...
8941 (linux_wait_for_lwp): ... this. Adjust.
8942 (linux_wait_for_event): Adjust.
8943 (send_sigstop): Adjust.
8944 (wait_for_sigstop): Adjust.
8945 (stop_all_processes): Rename to ...
8946 (stop_all_lwps): ... this.
8947 (linux_resume_one_process): Rename to ...
8948 (linux_resume_one_lwp): ... this. Adjust.
8949 (linux_set_resume_request, linux_continue_one_thread)
8950 (linux_queue_one_thread, resume_status_pending_p)
8951 (usr_store_inferior_registers, regsets_store_inferior_registers)
8952 (linux_request_interrupt, linux_read_offsets, linux_xfer_siginfo):
8953 Adjust.
8954 * linux-low.h (get_process): Rename to ...
8955 (get_lwp): ... this. Adjust.
8956 (get_thread_process): Rename to ...
8957 (get_thread_lwp): ... this. Adjust.
8958 (get_process_thread): Rename to ...
8959 (get_lwp_thread): ... this. Adjust.
8960 (struct process_info): Rename to ...
8961 (struct lwp_info): ... this.
8962 (all_processes): Rename to ...
8963 (all_lwps): ... this.
8964 * proc-service.c (ps_lgetregs): Adjust.
8965 * thread-db.c (thread_db_create_event, find_one_thread)
8966 (maybe_attach_thread, thread_db_get_tls_address): Adjust.
8967
0b16c5cf
PA
89682009-03-14 Pedro Alves <pedro@codesourcery.com>
8969
8970 * server.c (handle_query): Handle "qAttached".
8971
32de4b9d
NS
89722009-03-13 Nathan Sidwell <nathan@codesourcery.com>
8973
8974 * Makefile.in, hostio-errno.c, errno.c, xtensa-xtregs.c: Change to
8975 GPLv3, update license URL.
8976
2aecd87f
DE
89772009-03-01 Doug Evans <dje@google.com>
8978
93efd302 8979 * Makefile.in (INCLUDE_CFLAGS): Add -I$(srcdir)/../common.
2aecd87f
DE
8980 (server_h): Add gdb_signals.h.
8981 (signals.o): Update.
8982 * server.h (target_signal_from_host,target_signal_to_host_p)
8983 (target_signal_to_host,target_signal_to_name): Moved to gdb_signals.h.
8984
86b1f9c5
PM
89852009-02-14 Pierre Muller <muller@ics.u-strasbg.fr>
8986
8987 * remote-utils.c (getpkt): Also generate remote-debug
8988 information if noack_mode is set.
8989
4aa995e1
PA
89902009-02-06 Pedro Alves <pedro@codesourcery.com>
8991
8992 * server.c (handle_query): Report qXfer:siginfo:read and
8993 qXfer:siginfo:write as supported and handle them.
8994 * target.h (struct target_ops) <qxfer_siginfo>: New field.
8995 * linux-low.c (linux_xfer_siginfo): New.
8996 (linux_target_ops): Set it.
8997
62709adf
PA
89982009-01-26 Pedro Alves <pedro@codesourcery.com>
8999
9000 * server.c (gdbserver_usage): Mention --remote-debug.
9001 (main): Accept '--remote-debug' switch.
9002
aef93bd7
DE
90032009-01-18 Doug Evans <dje@google.com>
9004
9005 * regcache.c (new_register_cache): No need to check result of xcalloc.
9006 * server.c (handle_search_memory): Back out calls to xmalloc,
9007 result is checked and error is returned to user upon failure.
9008 (handle_query): Ditto. Add more checks for result of malloc.
9009 (handle_v_cont): Check result of malloc, report error back to
9010 user upon failure.
9011 (handle_v_run): Ditto. Call freeargv.
9012 * server.h (freeargv): Declare.
9013 * utils.c (freeargv): New fn.
9014
54363045
DE
90152009-01-15 Doug Evans <dje@google.com>
9016
f626972c
DE
9017 * gdbreplay.c (perror_with_name): Make arg const char *.
9018 * server.h (target_signal_to_name): Make return type const char *.
0842e787 9019 * thread-db.c (thread_db_err_str): Make return type const char *.
f626972c 9020 * utils.c (perror_with_name): Make arg const char *.
54363045 9021
18aae699
PA
90222009-01-14 Pedro Alves <pedro@codesourcery.com>
9023
9024 * win32-low.c (get_child_debug_event): Issue a final DBG_CONTINUE
9025 when handling a EXIT_PROCESS_DEBUG_EVENT.
9026
ff703abe
JB
90272009-01-06 Joel Brobecker <brobecker@adacore.com>
9028
9029 * gdbreplay.c (gdbreplay_version): Update copyright year.
9030 * server.c (gdbserver_version): Likewise.
9031
f21cc1a2 90322009-01-05 Doug Evans <dje@google.com>
0e21c1ec
DE
9033
9034 * linux-low.c (linux_attach_lwp): Add some comments/fixmes.
f21cc1a2 9035 (handle_extended_wait): Improve comment.
0e21c1ec 9036
bca929d3
DE
90372008-12-13 Doug Evans <dje@google.com>
9038
9039 * utils.c (xmalloc,xcalloc,xstrdup): New fns.
9040 * server.h (ATTR_MALLOC): New macro.
9041 (xmalloc,xcalloc,xstrdup): Declare.
9042 * hostio.c: Replace malloc,calloc,strdup with xmalloc,xcalloc,xstrdup.
9043 * inferiors.c: Ditto.
9044 * linux-low.c: Ditto.
9045 * mem-break.c: Ditto.
9046 * regcache.c: Ditto.
9047 * remote-utils.c: Ditto.
9048 * server.c: Ditto.
9049 * target.c: Ditto.
9050 * win32-low.c: Ditto.
9051
97438e3f
DE
90522008-12-12 Doug Evans <dje@google.com>
9053
896c7fbb
DE
9054 * linux-low.c (linux_wait_for_process): Don't clobber current_inferior
9055 in debugging printf.
9056
97438e3f
DE
9057 * linux-low.c (handle_extended_wait): Simplify, use my_waitpid.
9058
e3b886f8
DE
90592008-12-09 Doug Evans <dje@google.com>
9060
9061 * linux-low.h (struct process_info): Delete member tid, unused.
9062 * thread-db.c (find_one_thread): Update.
9063 (maybe_attach_thread): Update.
9064
07e059b5
VP
90652008-12-02 Pedro Alves <pedro@codesourcery.com>
9066
889bf7c5
PA
9067 * target.h (struct target_ops): Add qxfer_osdata member.
9068 * linux-low.c: Include ctype.h and pwd.h and sys/types.h
9069 and dirent.h.
9070 (linux_qxfer_osdata): New functions.
9071 (linux_target_ops): Register linux_qxfer_osdata as qxfer_osdata
9072 callback.
9073 * server.c (handle_query): Handle "qXfer:osdata:read:".
9074 * remote-utils.c (buffer_grow, buffer_free, buffer_init, buffer_finish)
9075 (buffer_xml_printf): New functions.
9076 * server.h (struct buffer): New.
9077 (buffer_grow_str, buffer_grow_str0): New macros.
9078 (buffer_grow, buffer_free, buffer_init, buffer_finish)
9079 (buffer_xml_printf): Declare.
07e059b5 9080
4cab47ab
DE
90812008-11-24 Doug Evans <dje@google.com>
9082
9083 * Makefile.in (VERSION,DIST,LINT,LINTFLAGS): Delete, unused.
9084
f142445f
DJ
90852008-11-24 Daniel Jacobowitz <dan@codesourcery.com>
9086
9087 * server.c (handle_v_run): Always use the supplied argument list.
9088
d0107bb6 90892008-11-19 Bob Wilson <bob.wilson@acm.org>
889bf7c5 9090
d0107bb6
BW
9091 * xtensa-xtregs.c (XTENSA_ELF_XTREG_SIZE): Change to 4.
9092 (xtensa_regmap_table): Add entry for scompare1.
889bf7c5 9093
2c4ad781
TJB
90942008-11-18 Thiago Jung Bauermann <bauerman@br.ibm.com>
9095
9096 * Makefile.in (powerpc-isa205-32l.o, powerpc-isa205-32l.c,
9097 powerpc-isa205-altivec32l.o, powerpc-isa205-altivec32l.c,
9098 powerpc-isa205-vsx32l.o, powerpc-isa205-vsx32l.c,
9099 powerpc-isa205-64l.o, powerpc-isa205-64l.c,
9100 powerpc-isa205-altivec64l.o, powerpc-isa205-altivec64l.c,
9101 powerpc-isa205-vsx64l.o, powerpc-isa205-vsx64l.c): New targets.
9102 * configure.srv (powerpc*-*-linux*): Add ISA 2.05 object files and
9103 XML target descriptions.
9104 * linux-ppc-low.c (ppc_arch_setup): Init registers with 64-bit FPSCR
9105 when inferior is running on an ISA 2.05 or later processor. Add
9106 special case to return offset for full 64-bit slot of FPSCR when
9107 in 32-bits.
9108
dfb64f85
DJ
91092008-11-14 Daniel Gutson <dgutson@codesourcery.com>
9110
9111 * Makefile.in (SFILES, clean): Added sparc64 files.
9112 (reg-sparc64.o, reg-sparc64.c): New.
9113 * configure.srv (sparc*-*-linux*): New configuration.
9114 * linux-low.c (regsets_fetch_inferior_registers): Swap ptrace
9115 syscall arguments for SPARC.
9116 (regsets_store_inferior_registers): Likewise.
9117 * linux-sparc-low.c: New file.
9118
66b6e1dd
DE
91192008-10-21 Doug Evans <dje@google.com>
9120
9121 * Makefile.in (BFD_DIR,BFD,BFD_SRC,BFD_CFLAGS): Delete.
9122 (READLINE_DIR,READLINE_DEP): Delete.
9123 (INTERNAL_CFLAGS): Update.
9124 (LINTFLAGS): Update.
9125
9b710a42
PA
91262008-10-10 Pedro Alves <pedro@codesourcery.com>
9127
9128 * server.c (handle_v_run): If GDB didn't specify an argv, use the
9129 whole argv from the last run, not just argv[0].
9130
5822d809
PA
91312008-09-08 Pedro Alves <pedro@codesourcery.com>
9132
9133 * regcache.c (new_register_cache): Return NULL if the register
9134 cache size isn't known yet.
9135 (free_register_cache): Avoid dereferencing a NULL regcache.
9136
74aac56f
DJ
91372008-09-04 Daniel Jacobowitz <dan@codesourcery.com>
9138
9139 * configure.srv: Merge MIPS and MIPS64.
9140
400b20f5
MR
91412008-08-24 Maciej W. Rozycki <macro@linux-mips.org>
9142
9143 * Makefile.in (uninstall): Apply $(EXEEXT) too.
9144
677c5bb1
LM
91452008-08-18 Luis Machado <luisgpm@br.ibm.com>
9146
9147 * Makefile.in: Add required vsx dependencies.
9148
9149 * linux-ppc-low: Define PPC_FEATURE_HAS_VSX.
9150 Declare init_registers_powerpc_vsx32l.
9151 Declare init_registers_powerpc_vsx64l.
9152 Define PTRACE_GETVSXREGS and PTRACE_SETVSXREGS.
9153 (ppc_arch_setup): Check for VSX in hwcap.
9154 (ppc_fill_vsxregset): New function.
9155 (ppc_store_vsxregset): New function.
9156 Add new VSX entry in regset_info target_regsets.
9157
9158 * configure.srv: Add new VSX dependencies.
9159
a6f3e723
SL
91602008-08-12 Pedro Alves <pedro@codesourcery.com>
9161
9162 * remote-utils.c (noack_mode, transport_is_reliable): New globals.
9163 (remote_open): Set or clear transport_is_reliable.
9164 (putpkt_binary): Don't expect acks in noack mode.
9165 (getpkt): Don't send ack/nac in noack mode.
9166 * server.c (handle_general_set): Handle QStartNoAckMode.
9167 (handle_query): If connected by tcp pass QStartNoAckMode+ in
9168 qSupported.
9169 (main): Reset noack_mode on every connection.
9170 * server.h (noack_mode): Declare.
9171
a417dc56
RW
91722008-08-07 Ralf Wildenhues <Ralf.Wildenhues@gmx.de>
9173
9174 * Makefile.in (GDBREPLAY_OBS): New variable.
9175 (gdbreplay$(EXEEXT)): Use it to avoid unportable $^.
9176
3221518c
UW
91772008-08-05 Ulrich Weigand <uweigand@de.ibm.com>
9178 Daniel Jacobowitz <dan@codesourcery.com>
9179
9180 * linux-low.c (linux_resume_one_process): Ignore ESRCH.
9181 (usr_store_inferior_registers): Likewise.
9182 (regsets_store_inferior_registers): Likewise.
9183
ec56be1b
PA
91842008-07-31 Rolf Jansen <rj@surtec.com>
9185 Pedro Alves <pedro@codesourcery.com>
9186
9187 * configure.ac: Check for memmem declaration.
9188 * server.c [HAVE_MALLOC_H]: Include malloc.h.
9189 (disable_packet_vCont, disable_packet_Tthread, disable_packet_qC)
9190 (disable_packet_qfThreadInfo): Unconditionally compile.
9191 * server.h [!HAVE_DECL_MEMMEM]: Declare memmem.
9192 * configure, config.in: Regenerate.
9193
2fe5e3ff
DE
91942008-07-28 Doug Kwan <dougkwan@google.com>
9195
9196 * linux-low.c (sys/dir.h, sys/user.h): Remove includes.
9197 (linux_write_memory): Remove declaration of errno.
9198
836acd6d
UW
91992008-07-12 Ulrich Weigand <uweigand@de.ibm.com>
9200
9201 * linux-low.c (handle_extended_wait): Do not use "status"
9202 variable uninitialized.
9203
aeba519e
PA
92042008-07-07 Pedro Alves <pedro@codesourcery.com>
9205
9206 * server.c (handle_v_attach): Inhibit reporting dll changes.
9207
db42f210
PA
92082008-06-27 Pedro Alves <pedro@codesourcery.com>
9209
9210 * remote-utils.c (prepare_resume_reply): If requested, don't
9211 output "thread:TID" in the T stop reply.
9212
9213 * server.c (disable_packet_vCont, disable_packet_Tthread)
9214 (disable_packet_qC, disable_packet_qfThreadInfo): New globals.
9215 (handle_query): If requested, disable support for qC, qfThreadInfo
9216 and qsThreadInfo.
9217 (handle_v_requests): If requested, disable support for vCont.
9218 (gdbserver_show_disableable): New.
9219 (main): Handle --disable-packet and --disable-packet=LIST.
9220
9221 * server.h (disable_packet_vCont, disable_packet_Tthread)
9222 (disable_packet_qC, disable_packet_qfThreadInfo): Declare.
9223
8e4c5421
CD
92242008-06-20 Carlos O'Donell <carlos@codesourcery.com>
9225
9226 * server.c (gdbserver_usage): Mention --version.
9227
6e23a804
DJ
92282008-06-06 Daniel Jacobowitz <dan@codesourcery.com>
9229
9230 * Makefile.in (gdbreplay.o): New rule.
9231
90aa6a40
JM
92322008-06-06 Joseph Myers <joseph@codesourcery.com>
9233
9234 * gdbreplay.c (gdbreplay_version): Say gdbreplay in version
9235 message, not gdbserver.
9236
c16158bc 92372008-06-05 Vladimir Prus <vladimir@codesourcery.com>
889bf7c5
PA
9238 Nathan Sidwell <nathan@codesourcery.com>
9239 Joseph Myers <joseph@codesourcery.com>
c16158bc
JM
9240
9241 * acinclude.m4: Include ../../config/acx.m4.
9242 * configure.ac: Use ACX_PKGVERSION and ACX_BUGURL.
9243 * configure, config.in: Regenerate.
9244 * Makefile.in (gdbreplay$(EXEEXT)): Add version.o.
9245 * server.c (gdbserver_version): Print PKGVERSION.
9246 (gdbsrever_usage): Add stream parameter. Print REPORT_BUGS_TO.
9247 (main): Adjust gdbserver_usage calls.
9248 * gdbreplay.c (version, host_name): Add declarations.
9249 (gdbreplay_version, gdbreplay_usage): New.
9250 (main): Accept --version and --help options.
9251
aeb75bf5
DJ
92522008-06-04 Daniel Jacobowitz <dan@codesourcery.com>
9253
9254 * linux-arm-low.c (thumb_breakpoint, thumb_breakpoint_len): New.
9255 (arm_breakpoint_at): Handle Thumb.
9256 (the_low_target): Add comment.
9257
76b233dd
UW
92582008-05-29 Ulrich Weigand <uweigand@de.ibm.com>
9259
9260 * linux-ppc-low.c (ppc_collect_ptrace_register): Clear buffer.
9261
08388c79
DE
92622008-05-09 Doug Evans <dje@google.com>
9263
a3c83fae
DE
9264 * server.h (decode_search_memory_packet): Declare.
9265 * remote-utils.c (decode_search_memory_packet): New fn.
9266 * server.c (handle_search_memory_1): New fn.
08388c79
DE
9267 (handle_search_memory): New fn.
9268 (handle_query): Process qSearch:memory packets.
9269
bb9c3d36
UW
92702008-05-08 Ulrich Weigand <uweigand@de.ibm.com>
9271
9272 * regcache.c (registers_length): Remove.
9273 (set_register_cache): Verify that PBUFSIZ is large enough to hold a
9274 full register packet.
9275 * regcache.h (registers_length): Remove prototype.
9276 * server.h (PBUFSIZ): Define to 16384.
9277
7284e1be
UW
92782008-05-03 Ulrich Weigand <uweigand@de.ibm.com>
9279
9280 * configure.srv (powerpc*-*-linux*): Set srv_regobj to
9281 powerpc-32l.o, powerpc-altivec32l.o, powerpc-e500l.o,
9282 powerpc-64l.o, and powerpc-altivec64l.o.
9283 Remove rs6000/powerpc-32.xml, rs6000/powerpc-64.xml, and
9284 rs6000/powerpc-e500.xml; add rs6000/powerpc-32l.xml,
9285 rs6000/powerpc-altivec32l.xml, rs6000/powerpc-e500l.xml,
9286 rs6000/powerpc-64l.xml, rs6000/powerpc-altivec64l.xml,
9287 rs6000/power-linux.xml, and rs6000/power64-linux.xml
9288 to srv_xmlfiles.
9289
9290 * Makefile.in (reg-ppc.o, reg-ppc.c): Remove, replace by ...
9291 (powerpc-32l.o, powerpc-32l.c): ... these new rules.
9292 (powerpc-32.o, powerpc-32.c): Remove, replace by ...
9293 (powerpc-altivec32l.o, powerpc-altivec32l.c): ... these new rules.
9294 (powerpc-e500.o, powerpc-e500.c): Remove, replace by ...
9295 (powerpc-e500l.o, powerpc-e500l.c): ... these new rules.
9296 (reg-ppc64.o, reg-ppc64.c): Remove, replace by ...
9297 (powerpc-64l.o, powerpc-64l.c): ... these new rules.
9298 (powerpc-64.o, powerpc-64.c): Remove, replace by ...
9299 (powerpc-altivec64l.o, powerpc-altivec64l.c): ... these new rules.
9300 (clean): Update.
9301
9302 * linux-ppc-low.c (init_registers_ppc): Remove, replace by ...
9303 (init_registers_powerpc_32l): ... this new prototype.
9304 (init_registers_powerpc_32): Remove, replace by ...
9305 (init_registers_powerpc_altivec32l): ... this new prototype.
9306 (init_registers_powerpc_e500): Remove, replace by ...
9307 (init_registers_powerpc_e500l): ... this new prototype.
9308 (init_registers_ppc64): Remove, replace by ...
9309 (init_registers_powerpc_64l): ... this new prototype.
9310 (init_registers_powerpc_64): Remove, replace by ...
9311 (init_registers_powerpc_altivec64l): ... this new prototype.
9312 (ppc_num_regs): Set to 73.
9313 (PT_ORIG_R3, PT_TRAP): Define if necessary.
9314 (ppc_regmap, ppc_regmap_e500): Add values for orig_r3 and trap.
9315 (ppc_cannot_store_register): Handle orig_r3 and trap.
9316 (ppc_arch_setup): Update init_registers_... calls.
9317 (ppc_fill_gregset): Handle orig_r3 and trap.
9318
9319 * inferiors.c (clear_inferiors): Reset current_inferior.
9320
fdc59709
PB
93212008-04-23 Paolo Bonzini <bonzini@gnu.org>
9322
889bf7c5
PA
9323 * acinclude.m4: Add override.m4.
9324 * configure: Regenerate.
fdc59709 9325
c9b2f845
UW
93262008-04-21 Ulrich Weigand <uweigand@de.ibm.com>
9327
9328 * linux-ppc-low.c (ppc_arch_setup): Reset ppc_hwcap after the
9329 initial call to init_register_ppc64.
9330
550512b8
UW
93312008-04-21 Ulrich Weigand <uweigand@de.ibm.com>
9332
43aaf8b6
PA
9333 * configure.srv (powerpc64-*-linux*, powerpc-*-linux*): Merge into
9334 single powerpc*-*-linux* case.
550512b8
UW
9335 (s390-*-linux*, s390x-*-linux*): Merge into single s390*-*-linux* case.
9336
b6430ec3
UW
93372008-04-17 Ulrich Weigand <uweigand@de.ibm.com>
9338
9339 * configure.srv [powerpc64-*-linux*]: Remove powerpc-e500.o from
889bf7c5 9340 srv_regobj. Remove rs6000/powerpc-e500.xml and rs6000/power-spe.xml
b6430ec3
UW
9341 from reg_xmlfiles.
9342 * linux-ppc-low.c: Include <elf.h>.
9343 (PPC_FEATURE_HAS_ALTIVEC, PPC_FEATURE_HAS_SPE): Define.
9344 (ppc_hwcap): New global variable.
9345 (ppc_regmap): Remove __SPE__ #ifdef sections.
9346 (ppc_regmap_e500): New global variable.
9347 (ppc_cannot_store_register): Update __SPE__ special case.
9348 (ppc_get_hwcap): New function.
9349 (ppc_arch_setup): Use it to determine whether inferior supports
9350 AltiVec or SPE registers. Set the_low_target.regmap if appropriate.
9351 (ppc_fill_vrregset, ppc_store_vrregset): Define unconditionally.
9352 Do not access registers if target does not support AltiVec.
9353 (ppc_fill_evrregset, ppc_store_evrregset): Define unconditionally.
9354 Do not access registers if target does not support SPE.
9355 (target_regsets): Unconditionally include AltiVec and SPE regsets.
9356
52fa2412
UW
93572008-04-17 Daniel Jacobowitz <dan@codesourcery.com>
9358
9359 * linux-low.c (disabled_regsets, num_regsets): New.
9360 (use_regsets_p): Delete.
9361 (linux_wait_for_process): Clear disabled_regsets.
9362 (regsets_fetch_inferior_registers): Check and set it.
9363 (regsets_store_inferior_registers): Likewise.
9364 (linux_fetch_registers, linux_store_registers): Do not use
9365 use_regsets_p.
9366 (initialize_low): Allocate disabled_regsets.
9367
e28b3332
DJ
93682008-04-14 Daniel Jacobowitz <dan@codesourcery.com>
9369
9370 * Makefile.in (LIBOBJS): New.
9371 (OBS): Use LIBOBJS.
9372 (memmem.o): New rule.
9373 * configure.ac: Use AC_CONFIG_LIBOBJ_DIR and check for memmem.
9374 * configure: Regenerated.
9375
4536995d
UW
93762008-04-04 Ulrich Weigand <uweigand@de.ibm.com>
9377
9378 * server.c (handle_query): Never return "unsupported" for
9379 qXfer:features:read queries.
9380
221c031f
UW
93812008-03-27 Ulrich Weigand <uweigand@de.ibm.com>
9382
9383 * server.c (get_features_xml): Fix inverted condition.
9384 (handle_query): Always support qXfer:feature:read.
9385
ccd213ac
DJ
93862008-03-10 Daniel Jacobowitz <dan@codesourcery.com>
9387
9388 * server.c (wrapper_argv): New.
9389 (start_inferior): Handle wrapper_argv. If set, expect an extra
9390 trap.
9391 (gdbserver_usage): Document --wrapper.
9392 (main): Parse --wrapper.
9393
6fe305f7
UW
93942008-02-28 Ulrich Weigand <uweigand@de.ibm.com>
9395
9396 * configure.srv [powerpc64-*-linux*]: Add all files mentioned for
9397 powerpc-*-linux* to srv_regobj and reg_xmlfiles.
9398 * linux-ppc-low.c (ppc_get_pc): Support bi-arch operation.
9399 (ppc_set_pc): Likewise.
9400 (ppc_arch_setup): New function.
9401 (ppc_fill_gregset): Call ppc_collect_ptrace_register instead
9402 of collect_register.
889bf7c5 9403 (the_low_target): Use ppc_arch_setup as arch_setup initializer.
6fe305f7 9404
5b0a002e
UW
94052008-02-28 Ulrich Weigand <uweigand@de.ibm.com>
9406
9407 * configure.srv [powerpc64-*-linux*]: Use linux-ppc-low.o
9408 instead of linux-ppc64-low.o.
9409 * linux-ppc64-low.c: Remove file.
9410 * Makefile.in (SFILES): Remove linux-ppc64-low.c.
9411 (linux-ppc64-low.o): Remove rule.
9412
9413 * linux-ppc-low.c (init_registers_ppc64): Add prototype.
9414 (init_registers_powerpc_64): Likewise.
9415 (ppc_regmap): Conditionally define depending on __powerpc64__.
9416 (ppc_cannot_store_register): Do not special-case "fpscr" when
9417 compiled on __powerpc64__.
9418 (ppc_collect_ptrace_register): New function.
9419 (ppc_supply_ptrace_register): New function.
9420 (ppc_breakpoint): Change type to "unsigned int".
9421 (ppc_breakpoint_at): Change type of "insn" to "unsigned int".
9422 (the_low_target): Conditionally provide initializers for the
889bf7c5 9423 arch_setup member depending on __powerpc64__. Install
5b0a002e
UW
9424 collect_ptrace_register and supply_ptrace_register members.
9425
9b4b61c8
UW
94262008-02-28 Ulrich Weigand <uweigand@de.ibm.com>
9427
9428 * regcache.h (gdbserver_xmltarget): Add extern declaration.
9429 * server.c (gdbserver_xmltarget): Define.
9430 (get_features_xml): Use it to replace "target.xml" and arch_string.
9431
9432 * configure.srv: Remove srv_xmltarget. Add XML files that were
9433 mentioned there to srv_xmlfiles instead. Remove conditional tests
9434 on gdb_cv_arm_iwmmxt, gdb_cv_ppc_altivec, gdb_cv_ppc_spe; set
9435 srv_xmlfiles and srv_regobj to include all possible choices.
9436 * configure.ac (srv_xmltarget): Remove.
9437 (srv_xmlfiles): Do not add "target.xml".
9438 (gdb_cv_arm_iwmmxt, gdb_cv_ppc_altivec, gdb_cv_ppc_spe): Remove
9439 checks for supplementary target information.
9440 * configure: Regenerate.
9441 * Makefile.in (XML_TARGET): Remove.
9442 (target.xml): Remove rule.
9443 (clean): Do not clean up target.xml.
9444 (.PRECIOUS): Do not mention target.xml.
9445
9446 * target.h (struct target_ops): Remove arch_string member.
9447 * linux-low.c (linux_arch_string): Remove.
9448 (linux_target_ops): Remove arch_string initializer.
9449 * linux-low.h (struct linux_target_ops): Remove arch_string member.
9450 * linux-i386-low.c (the_low_target): Remove arch_string initializer.
9451 * linux-x86-64-low.c (the_low_target): Remove arch_string initializer.
9452 * spu-low.c (spu_arch_string): Remove.
9453 (spu_target_ops): Remove arch_string initializer.
9454 * win32-low.c (win32_arch_string): Remove.
9455 (win32_target_ops): Remove arch_string initializer.
9456 * win32-low.h (struct win32_target_ops): Remove arch_string member.
9457 * win32-arm-low.c (the_low_target): Remove arch_string initializer.
9458 * win32-i368-low.c (the_low_target): Remove arch_string initializer.
9459
ee1a7ae4
UW
94602008-02-27 Ulrich Weigand <uweigand@de.ibm.com>
9461
9462 * linux-low.h (struct linux_target_ops): Replace left_pad_xfer field
9463 by collect_ptrace_register and supply_ptrace_register hooks.
9464 * linux-low.c (fetch_register): Use supply_ptrace_register callback
9465 instead of checking for the_low_target.left_pad_xfer.
9466 (usr_store_inferior_registers): Use collect_ptrace_register callback
9467 instead of checking for the_low_target.left_pad_xfer.
9468
9469 * linux-s390-low.c (s390_collect_ptrace_register): New function.
9470 (s390_supply_ptrace_register): Likewise.
9471 (s390_fill_gregset): Call s390_collect_ptrace_register.
9472 (the_low_target): Update.
9473
9474 * linux-ppc64-low.c (ppc_collect_ptrace_register): New function.
9475 (ppc_supply_ptrace_register): Likewise.
9476 (the_low_target): Update.
9477
9478 * linux-i386-low.c (the_low_target): Update.
9479 * linux-x86-64-low.c (the_low_target): Update.
9480
d61ddec4
UW
94812008-02-27 Ulrich Weigand <uweigand@de.ibm.com>
9482
9483 * configure.srv [s390x-*-linux*]: Set srv_regobj to include both
9484 reg-s390.o and reg-s390x.o.
9485
9486 * linux-low.c (new_inferior): New global variable.
9487 (linux_create_inferior, linux_attach): Set it.
9488 (linux_wait_for_process): Call the_low_target.arch_setup after the
9489 target has stopped for the first time.
9490 (initialize_low): Do not call the_low_target.arch_setup.
9491
9492 * linux-s390-low.c (s390_get_pc): Support bi-arch operation.
9493 (s390_set_pc): Likewise.
9494 (s390_arch_setup): New function.
9495 (the_low_target): Use s390_arch_setup as arch_setup routine.
9496
9497 * regcache.c (realloc_register_cache): New function.
9498 (set_register_cache): Call it for each existing regcache.
9499
d05b4ac3
UW
95002008-02-27 Ulrich Weigand <uweigand@de.ibm.com>
9501
9502 * server.h (init_registers): Remove prototype.
9503
9504 * linux-low.h (struct linux_target_ops): Add arch_setup field.
9505 * linux-low.c (initialize_low): Call the_low_target.arch_setup ()
9506 instead of init_registers ().
9507 * linux-arm-low.c (init_registers_arm): Add prototype.
9508 (init_registers_arm_with_iwmmxt): Likewise.
9509 (the_low_target): Add initializer for arch_setup field.
9510 * linux-cris-low.c (init_registers_cris): Add prototype.
9511 (the_low_target): Add initializer for arch_setup field.
9512 * linux-crisv32-low.c (init_registers_crisv32): Add prototype.
9513 (the_low_target): Add initializer for arch_setup field.
9514 * linux-i386-low.c (init_registers_i386_linux): Add prototype.
9515 (the_low_target): Add initializer for arch_setup field.
9516 * linux-ia64-low.c (init_registers_ia64): Add prototype.
9517 (the_low_target): Add initializer for arch_setup field.
9518 * linux-m32r-low.c (init_registers_m32r): Add prototype.
9519 (the_low_target): Add initializer for arch_setup field.
9520 * linux-m68k-low.c (init_registers_m68k): Add prototype.
9521 (the_low_target): Add initializer for arch_setup field.
9522 * linux-mips-low.c (init_registers_mips_linux): Add prototype.
9523 (init_registers_mips64_linux): Likewise.
9524 (the_low_target): Add initializer for arch_setup field.
9525 * linux-ppc-low.c (init_registers_ppc): Add prototype.
9526 (init_registers_powerpc_32, init_registers_powerpc_e500): Likewise.
9527 (the_low_target): Add initializer for arch_setup field.
9528 * linux-ppc64-low.c (init_registers_ppc64): Add prototype.
9529 (init_registers_powerpc_64): Likewise.
9530 (the_low_target): Add initializer for arch_setup field.
9531 * linux-s390-low.c (init_registers_s390): Add prototype.
9532 (init_registers_s390x): Likewise.
9533 (the_low_target): Add initializer for arch_setup field.
9534 * linux-sh-low.c (init_registers_sh): Add prototype.
9535 (the_low_target): Add initializer for arch_setup field.
9536 * linux-x86-64-low.c (init_registers_x86_64_linux): Add prototype.
9537 (the_low_target): Add initializer for arch_setup field.
9538 * linux-xtensa-low.c (init_registers_xtensa): Add prototype.
9539 (the_low_target): Add initializer for arch_setup field.
9540
9541 * win32-low.h (struct win32_target_ops): Add arch_setup field.
9542 * win32-low.c (initialize_low): Call the_low_target.arch_setup ()
9543 instead of init_registers ().
9544 * win32-arm-low.c (init_registers_arm): Add prototype.
9545 (the_low_target): Add initializer for arch_setup field.
9546 * win32-i386-low.c (init_registers_i386): Add prototype.
9547 (the_low_target): Add initializer for arch_setup field.
9548
9549 * spu-low.c (init_registers_spu): Add prototype.
9550 (initialize_low): Call initialie_registers_spu () instead of
9551 initialize_registers ().
9552
fd96d250
PA
95532008-02-19 Pedro Alves <pedro@codesourcery.com>
9554
9555 * server.c (handle_v_requests): When handling the vRun and vAttach
9556 packets, if already debugging a process, don't kill it. Return an
9557 error instead.
9558
d41b6bb4
DJ
95592008-02-17 Daniel Jacobowitz <dan@codesourcery.com>
9560
9561 * server.c (handle_query): Correct length check.
9562
5ac588cf
PA
95632008-02-14 Pedro Alves <pedro_alves@portugalmail.pt>
9564
9565 * win32-low.c (do_initial_child_stuff): Add process handle
9566 parameter. Set current_process_handle and current_process_id from the
9567 parameters. Clear globals.
9568 (win32_create_inferior): Don't set current_process_handle and
9569 current_process_id here. Instead pass them on the call to
9570 do_initial_child_stuff.
9571 (win32_attach): Likewise.
9572 (win32_clear_inferiors): New.
9573 (win32_kill): Don't close the current process handle or the
9574 current thread handle here. Instead call win32_clear_inferiors.
9575 (win32_detach): Don't open a new handle to the process. Call
9576 win32_clear_inferiors.
9577 (win32_join): Don't rely on current_process_handle; open a new
9578 handle using the process id.
9579 (win32_wait): Call win32_clear_inferiors when the inferior process
9580 has exited.
9581
ecd7ecbc
DJ
95822008-02-14 Daniel Jacobowitz <dan@codesourcery.com>
9583
9584 * server.c (monitor_show_help): Add "exit".
9585
1525d545
MG
95862008-02-11 Maxim Grigoriev <maxim2405@gmail.com>
9587
ecd7ecbc 9588 * Makefile.in (SFILES): Add linux-xtensa-low.c.
1525d545
MG
9589 (clean): Add reg-xtensa.c.
9590 (linux-xtensa-low.o, reg-xtensa.o, reg-xtensa.c): New dependencies.
ecd7ecbc
DJ
9591 * configure.srv (xtensa*-*-linux*) New target.
9592 * linux-xtensa-low.c: New.
9593 * xtensa-xtregs.c: New.
1525d545 9594
59a016f0
PA
95952008-02-01 Pedro Alves <pedro_alves@portugalmail.pt>
9596
9597 * hostio.c: Don't include errno.h.
9598 (errno_to_fileio_errno): Move to hostio-errno.
9599 * hostio.c: (hostio_error): Remove the error parameter. Defer the
9600 error number outputting to the target->hostio_last_error callback.
9601 (hostio_packet_error): Use FILEIO_EINVAL directly.
9602 (handle_open, handle_pread, hostio_error, handle_unlink): Update
9603 calls to hostio_error.
9604 * hostio-errno.c: New.
9605 * server.h (hostio_last_error_from_errno): Declare.
9606 * target.h (target_ops): Add hostio_last_error member.
9607 * linux-low.c (linux_target_op): Register hostio_last_error_from_errno
9608 as hostio_last_error handler.
889bf7c5 9609 * spu-low.c (spu_target_ops): Likewise.
59a016f0
PA
9610 * win32-low.c [_WIN32_WCE] (win32_error_to_fileio_error)
9611 (wince_hostio_last_error): New functions.
9612 (win32_target_ops) [_WIN32_WCE]: Register wince_hostio_last_error
9613 as hostio_last_error handler.
9614 (win32_target_ops) [!_WIN32_WCE]: Register
9615 hostio_last_error_from_errno as hostio_last_error handler.
9616 * Makefile.in (SFILES): Add hostio.c and hostio-errno.c.
9617 (hostio-errno.o): New rule.
9618 * configure.ac (GDBSERVER_DEPFILES): Add $srv_hostio_err_objs.
9619 * configure.srv (srv_hostio_err_objs): New variable. Default to
9620 hostio-errno.o.
9621 (arm*-*-mingw32ce*): Set srv_hostio_err_objs to "".
9622 * configure: Regenerate.
9623
2d717e4f
DJ
96242008-01-29 Daniel Jacobowitz <dan@codesourcery.com>
9625
9626 * linux-low.c (linux_attach_lwp): Do not _exit after errors.
9627 (linux_kill, linux_detach): Clean up the process list.
9628 * remote-utils.c (remote_open): Improve port number parsing.
9629 (putpkt_binary, input_interrupt): Only send interrupts if the target
9630 is running.
9631 * server.c (extended_protocol): Make static.
9632 (attached): Define earlier.
9633 (exit_requested, response_needed, program_argv): New variables.
9634 (target_running): New.
9635 (start_inferior): Clear attached here.
9636 (attach_inferior): Set attached here.
9637 (require_running): Define.
9638 (handle_query): Use require_running and target_running. Implement
9639 "monitor exit".
9640 (handle_v_attach, handle_v_run): New.
9641 (handle_v_requests): Use require_running. Handle vAttach and vRun.
9642 (gdbserver_usage): Update.
9643 (main): Redo argument parsing. Handle --debug and --multi. Handle
9644 --attach along with other options or after the port. Save
9645 program_argv. Support no initial program. Resynchronize
9646 communication with GDB after an error. Handle "monitor exit".
9647 Use require_running and target_running. Always allow the extended
9648 protocol. Do not error out for Hc0 or Hc-1. Do not automatically
9649 restart in extended mode.
9650 * README: Refer to the GDB manual. Update --attach usage.
9651
7407e2de
AS
96522007-12-20 Andreas Schwab <schwab@suse.de>
9653
9654 * linux-low.c (STACK_SIZE): Define.
9655 (linux_tracefork_child): Use it. Use __clone2 on ia64.
9656 (linux_test_for_tracefork): Likewise.
9657
b65d95c5
DJ
96582007-12-18 Daniel Jacobowitz <dan@codesourcery.com>
9659
9660 * linux-low.c (linux_wait_for_event): Update messages. Do not
9661 reinsert auto-delete breakpoints.
9662 * mem-break.c (struct breakpoint): Change return type of handler to
9663 int.
9664 (set_breakpoint_at): Update handler type.
9665 (reinsert_breakpoint_handler): Return 1 instead of calling
9666 delete_breakpoint.
9667 (reinsert_breakpoint_by_bp): Check for the original breakpoint before
9668 setting a new one.
9669 (check_breakpoints): Delete auto-delete breakpoints and return 2.
9670 * mem-break.h (set_breakpoint_at): Update handler type.
9671 * thread-db.c (thread_db_create_event, thread_db_create_event): Update.
9672 * win32-low.c (auto_delete_breakpoint): New.
9673 (get_child_debug_event): Use it.
9674
4e799345
DJ
96752007-12-16 Daniel Jacobowitz <dan@codesourcery.com>
9676
9677 * configure.ac: Check for pread and pwrite.
9678 * hostio.c (handle_pread): Fall back to lseek and read.
9679 (handle_pwrite): Fall back to lseek and write.
9680 * config.in, configure: Regenerated.
9681
27524b67
DJ
96822007-12-07 Daniel Jacobowitz <dan@codesourcery.com>
9683
9684 * server.c (myresume): Add own_buf argument.
9685 (main): Update calls.
9686
a20d5e98
DJ
96872007-12-06 Daniel Jacobowitz <dan@codesourcery.com>
9688
9689 * linux-low.c (linux_wait, linux_resume): Do not handle async I/O.
9690 * remote-utils.c (remote_open): Do not call disable_async_io.
9691 (block_async_io): Delete.
9692 (unblock_async_io): Make static.
9693 (initialize_async_io): New.
9694 * server.c (handle_v_cont): Handle async I/O here.
9695 (myresume): Likewise. Move other common resume tasks here...
9696 (main): ... from here. Call initialize_async_io. Disable async
9697 I/O before the main loop.
9698 * server.h (initialize_async_io): Declare.
9699 (block_async_io, unblock_async_io): Delete prototypes.
9700 * spu-low.c (spu_resume, spu_wait): Do not handle async I/O here.
9701
b79d787e
DJ
97022007-12-06 Mick Davis <mickd@goanna.iinet.net.au>
9703
9704 * remote-utils.c (readchar): Allow binary data in received messages.
9705
d97903b2
PA
97062007-12-03 Pedro Alves <pedro_alves@portugalmail.pt>
9707
9708 * win32-low.c (attaching): New global.
9709 (win32_create_inferior): Clear the `attaching' global.
9710 (win32_attach): Set the `attaching' global.
9711 (get_child_debug_event) [_WIN32_WCE]: Stop the inferior when
9712 attaching. Only set a breakpoint at the entry point if not
9713 attaching.
9714
311de423
PA
97152007-12-03 Pedro Alves <pedro_alves@portugalmail.pt>
9716
9717 * server.c (main): Don't report dll events on the initial
9718 connection on attaches.
9719
6c2d16d2
PA
97202007-12-03 Pedro Alves <pedro_alves@portugalmail.pt>
9721
9722 * server.c (main): Relax numerical bases supported for the pid of
9723 the --attach command line argument.
9724
5ca906e6
PA
97252007-12-03 Pedro Alves <pedro_alves@portugalmail.pt>
9726
9727 * win32-low.c (win32_attach): Call OpenProcess before
9728 DebugActiveProcess, not after. Add last error output to error
9729 call.
9730
9c6c8194
PA
97312007-12-03 Pedro Alves <pedro_alves@portugalmail.pt>
9732
9733 * win32-low.c (win32_get_thread_context)
9734 (win32_set_thread_context): New functions.
9735 (thread_rec): Use win32_get_thread_context.
9736 (continue_one_thread, win32_resume): Use win32_set_thread_context.
9737 * win32-low.h (win32_thread_info) [_WIN32_WCE]: Add `base_context'
9738 field.
9739
4d5d1aaa
PA
97402007-12-03 Leo Zayas
9741 Pedro Alves <pedro_alves@portugalmail.pt>
9742
9743 * win32-low.c (soft_interrupt_requested, faked_breakpoint): New
9744 global variables.
9745 (child_add_thread): Minor cleanup.
9746 (child_continue): Resume artificially suspended threads before
9747 calling ContinueDebugEvent.
9748 (suspend_one_thread): New.
9749 (fake_breakpoint_event): New.
9750 (get_child_debug_event): Change return type to int. Check here if
9751 gdb sent an interrupt request. If a soft interrupt was requested,
9752 fake a breakpoint event. Return 0 if there is no event to handle,
9753 and 1 otherwise.
9754 (win32_wait): Don't check here if gdb sent an interrupt request.
9755 Ensure there is a valid event to handle.
9756 (win32_request_interrupt): Add soft interruption method as last
9757 resort.
9758
c436e841
PA
97592007-12-03 Leo Zayas
9760 Pedro Alves <pedro_alves@portugalmail.pt>
9761
9762 * win32-low.h (win32_thread_info): Add descriptions to the
9763 structure members. Replace `suspend_count' counter by a
9764 `suspended' flag.
9765 * win32-low.c (thread_rec): Update condition of when to get the
9766 context from the inferior. Rely on ContextFlags being set if it
9767 has already been retrieved. Only suspend the inferior thread if
9768 we haven't already. Warn if that fails.
9769 (continue_one_thread): s/suspend_count/suspended/. Only call
9770 ResumeThread once. Warn if that fails.
9771
e7b5fa67
PA
97722007-12-02 Pedro Alves <pedro_alves@portugalmail.pt>
9773
9774 * win32-low.c (win32_wait): Don't read from the inferior when it
9775 has already exited.
9776
a385171d
PA
97772007-12-02 Pedro Alves <pedro_alves@portugalmail.pt>
9778
9779 * Makefile.in (win32_low_h): New variable.
9780 (win32-low.o): Add dependency on $(win32_low_h).
9781 (win32-arm-low.o, win32-i386-low.o): New rules.
9782
f80c84b3
DJ
97832007-11-30 Daniel Jacobowitz <dan@codesourcery.com>
9784
9785 * hostio.c: Correct copyright year.
9786
a6b151f1
DJ
97872007-11-30 Daniel Jacobowitz <dan@codesourcery.com>
9788
9789 * Makefile.in (OBS): Add hostio.o.
9790 (hostio.o): New rule.
9791 * server.h (handle_vFile): Declare.
9792 * hostio.c: New file.
9793 * server.c (handle_v_requests): Take packet_len and new_packet_len
9794 for binary packets. Call handle_vFile.
9795 (main): Update call to handle_v_requests.
9796
f9387fc3
DJ
97972007-11-05 Daniel Jacobowitz <dan@codesourcery.com>
9798
9799 * linux-low.c: Include <sched.h>.
9800
51c2684e
DJ
98012007-11-01 Daniel Jacobowitz <dan@codesourcery.com>
9802
9803 * linux-low.c (linux_tracefork_grandchild): New.
9804 (linux_tracefork_child): Use clone.
9805 (linux_test_for_tracefork): Use clone; allocate and free a stack.
9806
75f83163
JB
98072007-10-31 Joel Brobecker <brobecker@adacore.com>
9808
9809 * Makefile.in: Use $(SHELL) instead of "sh" to call regdat.sh.
9810
da5898ce
DJ
98112007-10-24 Daniel Jacobowitz <dan@codesourcery.com>
9812
9813 * linux-low.c (handle_extended_wait): Handle unexpected signals.
9814
24a09b5f
DJ
98152007-10-23 Daniel Jacobowitz <dan@codesourcery.com>
9816
9817 * inferiors.c (change_inferior_id): Delete.
9818 (add_pid_to_list, pull_pid_from_list): New.
9819 * linux-low.c (PTRACE_SETOPTIONS, PTRACE_GETEVENTMSG)
9820 (PTRACE_O_TRACESYSGOOD, PTRACE_O_TRACEFORK, PTRACE_O_TRACEVFORK)
9821 (PTRACE_O_TRACECLONE, PTRACE_O_TRACEEXEC, PTRACE_O_TRACEVFORKDONE)
9822 (PTRACE_O_TRACEEXIT, PTRACE_EVENT_FORK, PTRACE_EVENT_VFORK)
9823 (PTRACE_EVENT_CLONE, PTRACE_EVENT_EXEC, PTRACE_EVENT_VFORK_DONE)
9824 (PTRACE_EVENT_EXIT, __WALL): Provide default definitions.
9825 (stopped_pids, thread_db_active, must_set_ptrace_flags): New variables.
9826 (using_threads): Always set to 1.
9827 (handle_extended_wait): New.
9828 (add_process): Do not set TID.
9829 (linux_create_inferior): Set must_set_ptrace_flags.
9830 (linux_attach_lwp): Remove TID argument. Do not check using_threads.
9831 Use PTRACE_SETOPTIONS. Call new_thread_notify. Update all callers.
9832 (linux_thread_alive): Rename TID argument to LWPID.
9833 (linux_wait_for_process): Handle unknown processes. Do not use TID.
9834 (linux_wait_for_event): Do not use TID or check using_threads. Update
9835 call to dead_thread_notify. Call handle_extended_wait.
9836 (linux_create_inferior): Use PTRACE_SETOPTIONS.
9837 (send_sigstop): Delete sigstop_sent.
9838 (wait_for_sigstop): Avoid TID.
9839 (linux_supports_tracefork_flag, linux_tracefork_child, my_waitpid)
9840 (linux_test_for_tracefork): New.
9841 (linux_lookup_signals): Use thread_db_active and
9842 linux_supports_tracefork_flag.
9843 (initialize_low): Use thread_db_active and linux_test_for_tracefork.
9844 * linux-low.h (get_process_thread): Avoid TID.
9845 (struct process_ifo): Move thread_known and tid to the end. Remove
9846 sigstop_sent.
9847 (linux_attach_lwp, thread_db_init): Update prototypes.
9848 * server.h (change_inferior_id): Delete prototype.
9849 (add_pid_to_list, pull_pid_from_list): New prototypes.
9850 * thread-db.c (thread_db_use_events): New.
9851 (find_first_thread): Rename to...
9852 (find_one_thread): ...this. Update callers and messages. Do not
9853 call fatal. Check thread_db_use_events. Do not call
9854 change_inferior_id or new_thread_notify.
9855 (maybe_attach_thread): Update. Do not call new_thread_notify.
9856 (thread_db_init): Set thread_db_use_events. Check use_events.
9857 * utils.c (fatal, warning): Correct message prefix.
9858
30ed0a8f
DJ
98592007-10-15 Daniel Jacobowitz <dan@codesourcery.com>
9860
9861 * Makefile.in (clean): Remove new files.
9862 (powerpc-32.o, powerpc-32.c, powerpc-e500.o, powerpc-e500.c)
9863 (powerpc-64.o, powerpc-64.c): New rules.
9864 * configure.srv: Use alternate register sets for powerpc64-*-linux*
9865 with AltiVec, powerpc-*-linux* with AltiVec, and powerpc-*-linux*
9866 with SPE.
9867 * linux-ppc-low.c (ppc_regmap): Do not fetch the FP registers for
9868 SPE targets.
9869 (ppc_cannot_store_register): Do not check for FPSCR for SPE targets.
9870 (PTRACE_GETVRREGS, PTRACE_SETVRREGS, SIZEOF_VRREGS, ppc_fill_vrregset)
9871 (ppc_store_vrregset, PTRACE_GETEVRREGS, PTRACE_SETEVRREGS)
9872 (struct gdb_evrregset_t, ppc_fill_evrregset, ppc_store_evrregset): New.
9873 (target_regsets): Add AltiVec and SPE register sets.
9874 * configure.ac: Check for AltiVec and SPE.
9875 * linux-ppc64-low.c (PTRACE_GETVRREGS, PTRACE_SETVRREGS, SIZEOF_VRREGS)
9876 (ppc_fill_vrregset, ppc_store_vrregset): New.
9877 (target_regsets): Add AltiVec register set.
9878 * configure: Regenerated.
9879
fd462a61
DJ
98802007-09-19 Daniel Jacobowitz <dan@codesourcery.com>
9881
9882 * linux-low.c (O_LARGEFILE): Define.
9883 (linux_read_memory): Use /proc/PID/mem.
9884 * configure.ac: Use AC_GNU_SOURCE. Check for pread64.
9885 * configure, config.in: Regenerated.
9886
69f223ed
DJ
98872007-09-04 Daniel Jacobowitz <dan@codesourcery.com>
9888
9889 * linux-low.c (linux_wait_for_event): Do not pass signals while
9890 single-stepping.
9891
aec18585
PA
98922007-09-03 Pedro Alves <pedro_alves@portugalmail.pt>
9893
9894 * win32-low.c (create_process): New.
9895 (win32_create_inferior): Use create_process instead of
9896 CreateProcess. If create_process failed retry appending an ".exe"
9897 suffix. Store the GetLastError result immediatelly after
9898 create_process calls and use it on the call to error.
9899
34d86ddd
PA
99002007-09-03 Pedro Alves <pedro_alves@portugalmail.pt>
9901
9902 * win32-low.c (handle_load_dll): Don't use toolhelp when waiting.
9903
5a0e3bd0
JB
99042007-08-23 Joel Brobecker <brobecker@adacore.com>
9905
9906 * configure.ac: Switch license to GPLv3.
9907
f88c79e6
MS
99082007-08-01 Michael Snyder <msnyder@access-company.com>
9909
9910 * remote-utils.c (putpkt_binary): Memory leak, free buf2.
9911
6b3d9b83
PA
99122007-07-31 Pedro Alves <pedro_alves@portugalmail.pt>
9913
9914 * win32-low.c (winapi_CloseToolhelp32Snapshot) [_WIN32_WCE]: New
9915 typedef.
9916 (win32_CloseToolhelp32Snapshot) [_WIN32_WCE]: New global var.
9917 (load_toolhelp) [_WIN32_WCE]: Load TOOLHELP.DLL. Get
9918 CloseToolhelp32Snapshot.
9919 (toolhelp_get_dll_name) [_WIN32_WCE]: Close the snapshot with
9920 CloseToolhelp32Snapshot.
9921
c588c53c
MS
99222007-07-27 Michael Snyder <michael.snyder@access-company.com>
9923
9924 * server.c (main): Check for inferior exit before main loop.
9925
aa0403d9
PA
99262007-07-18 Pedro Alves <pedro_alves@portugalmail.pt>
9927
9928 * remote-utils.c (remote_open): Set SO_KEEPALIVE on remote_desc
9929 instead of on tmp_desc.
9930
255e7678
DJ
99312007-07-17 Pedro Alves <pedro_alves@portugalmail.pt>
9932 Daniel Jacobowitz <dan@codesourcery.com>
9933
9934 * inferiors.c (all_dlls, dlls_changed, get_dll): New.
9935 (add_thread): Minor cleanups.
9936 (clear_inferiors): Move lower in the file. Clear the DLL
9937 list.
9938 (free_one_dll, match_dll, loaded_dll, unloaded_dll, clear_list): New.
9939 * remote-utils.c (prepare_resume_reply): Check dlls_changed.
9940 (xml_escape_text): New.
9941 * server.c (handle_query): Handle qXfer:libraries:read. Report it
9942 for qSupported.
9943 (handle_v_cont): Report errors.
9944 (gdbserver_version): Update.
9945 (main): Correct size of own_buf. Do not report initial DLL events.
9946 * server.h (struct dll_info, all_dlls, dlls_changed, loaded_dll)
9947 (unloaded_dll, xml_escape_text): New.
9948 * win32-low.c (enum target_waitkind): Update comments.
9949 (win32_add_one_solib, get_image_name, winapi_EnumProcessModules)
9950 (winapi_GetModuleInformation, winapi_GetModuleFileNameExA)
9951 (win32_EnumProcessModules, win32_GetModuleInformation)
9952 (win32_GetModuleFileNameExA, load_psapi, psapi_get_dll_name)
9953 (winapi_CreateToolhelp32Snapshot, winapi_Module32First)
9954 (winapi_Module32Next, win32_CreateToolhelp32Snapshot)
9955 (win32_Module32First, win32_Module32Next, load_toolhelp)
9956 (toolhelp_get_dll_name, handle_load_dll, handle_unload_dll): New.
9957 (get_child_debug_event): Handle DLL events.
9958 (win32_wait): Likewise.
9959
0d37add9
DJ
99602007-07-12 Daniel Jacobowitz <dan@codesourcery.com>
9961
9962 * configure.srv: Set srv_linux_regsets for sh*-*-linux*.
9963 * linux-sh-low.c (sh_fill_gregset, target_regsets): New.
9964
45e2715e
PA
99652007-07-08 Pedro Alves <pedro_alves@portugalmail.pt>
9966
9967 * win32-low.c (handle_output_debug_string): Ignore event if not
9968 waiting.
9969
c5674cf1
PA
99702007-07-08 Pedro Alves <pedro_alves@portugalmail.pt>
9971
9972 * win32-arm-low.c (arm_wince_breakpoint): Fix typo.
9973
2bbe3cc1
DJ
99742007-07-03 Daniel Jacobowitz <dan@codesourcery.com>
9975
9976 * remote-utils.c (look_up_one_symbol): Handle 'm' packets.
9977
ae13219e
DJ
99782007-07-02 Daniel Jacobowitz <dan@codesourcery.com>
9979
9980 * inferiors.c (change_inferior_id): Add comment.
9981 * linux-low.c (check_removed_breakpoint): Add an early
9982 prototype. Improve debug output.
9983 (linux_attach): Doc update.
9984 (linux_detach_one_process, linux_detach): Clean up before releasing
9985 each process.
9986 (send_sigstop, wait_for_sigstop): Improve comments and debug output.
9987 * linux-low.h (struct process_info): Doc improvement.
9988 * mem-break.c (delete_all_breakpoints): New.
9989 * mem-break.h (delete_all_breakpoints): New prototype.
9990 * thread-db.c (find_first_thread): New.
9991 (thread_db_create_event): Call it instead of
9992 thread_db_find_new_threads. Clean up unused variables.
9993 (maybe_attach_thread): Remove first thread handling.
9994 (thread_db_find_new_threads): Use find_first_thread.
9995 (thread_db_get_tls_address): Likewise.
9996
4105de34
DJ
99972007-06-27 Daniel Jacobowitz <dan@codesourcery.com>
9998
9999 * thread-db.c (thread_db_find_new_threads): Add prototype.
10000 (thread_db_create_event): Check for the main thread before adding
10001 a new thread.
10002 (maybe_attach_thread): Only enable event reporting if TID == 0.
10003 (thread_db_get_tls_address): Check for new threads.
10004
2b876972
DJ
100052007-06-20 Daniel Jacobowitz <dan@codesourcery.com>
10006
10007 * linux-low.c (linux_create_inferior): Try execv before execvp.
10008 * spu-low.c (spu_create_inferior): Likewise.
10009
7a245884
DJ
100102007-06-13 Mike Frysinger <vapier@gentoo.org>
10011
10012 * linux-low.c (linux_create_inferior): Change execv to execvp.
10013 * spu-low.c (spu_create_inferior): Likewies.
10014
117ce543
DJ
100152007-06-13 Daniel Jacobowitz <dan@codesourcery.com>
10016
10017 * Makefile.in (clean): Clean new files instead of deleted ones.
10018 (reg-mips.o, reg-mips.c, reg-mips64.o, reg-mips64.c): Delete.
10019 (mips-linux.o, mips-linux.c, mips64-linux.o, mips64-linux.c): New
10020 rules.
10021 * configure.srv: Specify XML files and new regformats for MIPS and
10022 MIPS64 GNU/Linux.
10023 * linux-mips-low.c (mips_num_regs): Set to only used registers.
10024 (mips_regmap): Do not fetch $0. Remove unused registers. Add
10025 an entry for the restart register.
10026 (mips_cannot_fetch_register, mips_cannot_store_register)
10027 (mips_reinsert_addr, mips_fill_fpregset, mips_store_fpregset): Update
10028 register names to match the XML descriptions.
10029 (mips_fill_gregset, mips_store_gregset): Likewise. Handle the
10030 restart register instead of $0.
10031
0e7f50da
UW
100322007-06-12 Ulrich Weigand <uweigand@de.ibm.com>
10033 Markus Deuling <deuling@de.ibm.com>
10034
10035 * remote-utils.c (decode_xfer_write): New function.
10036 * server.h (decode_xfer_write): Add prototype.
10037 * server.c (handle_query): Add PACKET_LEN argument. Support
10038 qXfer:spu:read and qXfer:spu:write packets.
10039 (main): Pass packet_len to handle_query.
10040 * spu-low.c (spu_target_ops): Add spu_proc_xfer_spu.
10041 * target.h (target_ops): Add qxfer_spu.
10042
374c1d38
UW
100432007-06-12 Ulrich Weigand <uweigand@de.ibm.com>
10044
10045 * spu-low.c (spu_proc_xfer_spu): Do not return failure when
10046 accessing non-seekable spufs files.
10047
bb63802a
UW
100482007-05-16 Markus Deuling <deuling@de.ibm.com>
10049
889bf7c5 10050 * server.c (handle_query): Add reply for qC packet.
bb63802a 10051
7390519e
PA
100522007-05-10 Pedro Alves <pedro_alves@portugalmail.pt>
10053 Leo Zayas <lerele@champenstudios@com>
10054
10055 * server.h (check_remote_input_interrupt_request): New function.
10056 * remote_utils.c (INVALID_DESCRIPTOR): New define.
10057 (remote_desc): Initialize with INVALID_DESCRIPTOR.
10058 (input_interrupt): Expose on USE_WIN32API too. Fix whitespace.
10059 (check_remote_input_interrupt_request): New function.
10060 * server.h (check_remote_input_interrupt_request): Declare.
3ecf0694 10061 * win32-low.c (winapi_DebugBreakProcess,
7390519e
PA
10062 winapi_GenerateConsoleCtrlEvent): New typedefs.
10063 (get_child_debug_event): Lower Win32 debug event polling from 1 sec
10064 to 250 ms.
10065 (win32_wait): Check for remote interrupt request
10066 with check_remote_input_interrupt_request.
10067 (win32_request_interrupt): New function.
10068 (win32_target_op): Set request_interrupt to win32_request_interrupt.
10069
34b34921
PA
100702007-05-10 Pedro Alves <pedro_alves@portugalmail.pt>
10071
10072 * win32-low.c (debug_registers_changed,
10073 debug_registers_used, CONTEXT_EXTENDED_REGISTERS,
10074 CONTEXT_FLOATING_POINT, CONTEXT_DEBUG_REGISTERS,
10075 CONTEXT_DEBUGGER, CONTEXT_DEBUGGER_DR): Delete.
10076 (thread_rec): Get context using the low target.
10077 (child_add_thread): Call thread_added on the low target,
10078 which does the same thing.
10079 (regptr): Delete.
10080 (do_initial_child_stuff): Remove debug registers references.
10081 Set context using the low target. Resume threads after
10082 setting the contexts.
10083 (child_continue): Remove dead variable. Remove debug
10084 registers references.
10085 (child_fetch_inferior_registers): Go through the low target.
10086 (do_child_store_inferior_registers): Remove.
10087 (child_store_inferior_registers): Go through the low target.
10088 (win32_resume): Remove debug registers references.
10089 Set context using the low target.
10090 (handle_exception): Change return type to void. Don't record
10091 context here. Set status to TARGET_WAITKIND_SPURIOUS on a
10092 first chance exception.
889bf7c5 10093 (get_child_debug_event): Change return type to void. Remove
34b34921
PA
10094 goto loop. Always return after waiting for debug event.
10095 (win32_wait): Convert to switch statement. Handle spurious
10096 events.
10097
10098 * win32-i386-low.c (debug_registers_changed,
10099 debug_registers_used): New.
10100 (initial_stuff): Rename to ...
10101 (i386_initial_stuff): ... this. Clear debug registers
10102 state variables.
10103 (store_debug_registers): Delete.
10104 (i386_get_thread_context): New.
10105 (load_debug_registers): Delete.
10106 (i386_set_thread_context): New.
10107 (i386_thread_added): New.
10108 (single_step): Rename to ...
10109 (i386_single_step): ... this.
10110 (do_fetch_inferior_registers): Rename to ...
10111 (i386_fetch_inferior_register): ... this.
10112 (i386_store_inferior_register): New.
10113 (the_low_target): Adapt to new interface.
10114
10115 * win32-arm-low.c (CONTEXT_FLOATING_POINT): Define.
10116 (arm_get_thread_context): New.
10117 (arm_set_thread_context): New.
10118 (regptr): New.
10119 (do_fetch_inferior_registers): Rename to ...
10120 (arm_fetch_inferior_register): ... this.
10121 (arm_store_inferior_register): New.
10122 (arm_wince_breakpoint): Reimplement as unsigned long.
10123 (arm_wince_breakpoint_len): Define.
10124 (the_low_target): Adapt to new interface.
10125
10126 * win32-low.h (target_ops): Remove regmap, store_debug_registers and
10127 load_debug_registers. Add get_thread_context, set_thread_context,
10128 thread_added and store_inferior_register. Rename
10129 fetch_inferior_registers to fetch_inferior_register.
10130 (regptr): Remove declaration.
10131
dd6953e1
PA
101322007-05-10 Pedro Alves <pedro_alves@portugalmail.pt>
10133
10134 * linux-low.c (linux_detach): Change return type to int. Return 0.
10135 * spu-low.c (spu_detach): Likewise.
10136
444d6139
PA
101372007-05-10 Pedro Alves <pedro_alves@portugalmail.pt>
10138
10139 * target.h (target_ops): Change return type of detach to int.
10140 Add join.
10141 (join_inferior): New.
10142 * server.c (main): Don't skip detach support on mingw32.
10143 If the inferior doesn't support detaching return error.
10144 Call join_inferior instead of using waitpid.
10145 * linux-low.c (linux_join): New.
10146 (linux_target_op): Add linux_join.
10147 * spu-low.c (spu_join): New.
10148 (spu_target_ops): Add spu_join.
10149 * win32-low.c (win32_detach): Adapt to new interface.
10150 Reopen current_process_handle before detaching. Issue a child
10151 resume before detaching.
10152 (win32_join): New.
10153 (win32_target_op): Add win32_join.
10154
1d5315fe
PA
101552007-05-10 Pedro Alves <pedro_alves@portugalmail.pt>
10156
10157 * win32-low.c (win32-attach): Fix return value.
10158 * target.h (target_ops): Describe ATTACH return values.
10159
bf914831
PA
101602007-05-10 Pedro Alves <pedro_alves@portugalmail.pt>
10161
10162 * win32-low.c (GETPROCADDRESS): Define.
10163 (winapi_DebugActiveProcessStop): Add WINAPI. typedef as pointer.
10164 (winapi_DebugSetProcessKillOnExit): Likewise.
10165 (win32_create_inferior): Force usage of ansi CreateProcessA.
10166 (win32_attach): Use GETPROCADDRESS.
10167 (win32_detach): Likewise.
10168
f72f3e60
PA
101692007-05-10 Pedro Alves <pedro_alves@portugalmail.pt>
10170
10171 * win32-low.c (win32_wait): Don't use WSTOPSIG.
10172
ed50f18f
PA
101732007-03-30 Pedro Alves <pedro_alves@portugalmail.pt>
10174
10175 * win32-low.c: Commit leftover changes from 2007-03-29.
10176
0c2ead7e
DJ
101772007-03-30 Daniel Jacobowitz <dan@codesourcery.com>
10178
10179 * i387-fp.c (struct i387_fsave, struct i387_fxsave): Make 16-bit
10180 fields short instead of int. Add explicit padding.
10181 (i387_cache_to_fsave): Remove unnecessary casts.
10182 (i387_fsave_to_cache): Doc fix.
10183 (i387_cache_to_fxsave): Remove unnecessary casts and masking.
10184
73725ff3
DJ
101852007-03-30 Daniel Jacobowitz <dan@codesourcery.com>
10186
10187 * i387-fp.c (i387_cache_to_fxsave): Reinitialize val2 before use.
10188 (i387_fxsave_to_cache): Check fp->ftag while building ftag value.
10189
d99f33d8
PA
101902007-03-29 Pedro Alves <pedro_alves@portugalmail.pt>
10191
10192 * configure.srv (arm*-*-mingw32ce*): Move near the other
10193 arm targets.
10194
68070c10
PA
101952007-03-29 Pedro Alves <pedro_alves@portugalmail.pt>
10196
2482afc6 10197 * configure.ac: Add errno checking.
68070c10
PA
10198 (AC_CHECK_HEADERS): Add errno.h, fcntl.h, signal.h,
10199 sys/file.h and malloc.h.
10200 (AC_CHECK_DECLS): Add perror.
10201 (srv_mingwce): Handle.
2482afc6 10202 * configure.srv (i[34567]86-*-cygwin*): Add
68070c10
PA
10203 win32-i386-low.o to srv_tgtobj.
10204 (i[34567]86-*-mingw*): Likewise.
10205 (arm*-*-mingw32ce*): Add case.
10206 * gdbreplay.c [HAVE_SYS_FILE_H, HAVE_SIGNAL_H,
10207 HAVE_FCNTL_H, HAVE_ERRNO_H, HAVE_MALLOC_H]: Check.
10208 [__MINGW32CE__] (strerror): New function.
10209 [__MINGW32CE__] (errno): Define to GetLastError.
10210 [__MINGW32CE__] (COUNTOF): New macro.
10211 (remote_open): Remove extra close call.
10212 * mem-break.c (delete_breakpoint_at): New function.
10213 * mem-break.h (delete_breakpoint_at): Declare.
10214 * remote-utils.c [HAVE_SYS_FILE_H, HAVE_SIGNAL_H,
10215 HAVE_FCNTL_H, HAVE_UNISTD_H, HAVE_ERRNO_H]: Check.
10216 [USE_WIN32API] (read, write): Add char* casts.
10217 * server.c [HAVE_UNISTD_H, HAVE_SIGNAL_H]: Check.
10218 * server.h: Include wincecompat.h on Windows CE.
10219 [HAVE_ERRNO_H]: Check.
10220 (perror): Declare if not declared.
10221 * utils.c: Add stdlib.h, errno.h and malloc.h includes.
10222 (perror_with_name): Remove errno declaration.
10223 * wincecompat.h: New.
10224 * wincecompat.c: New.
10225 * win32-low.h: New.
10226 * win32-arm-low.c: New.
10227 * win32-i386-low.c: New.
10228 (win32-low.c): Include mem-break.h and win32-low.h, and winnt.h.
10229 (OUTMSG2): Make it safe.
10230 (_T): New macro.
10231 (COUNTOF): New macro.
10232 (NUM_REGS): Get it from the low target.
10233 (CONTEXT_EXTENDED_REGISTERS, CONTEXT_FLOATING_POINT,
10234 CONTEXT_DEBUG_REGISTERS): Add fallbacks to 0.
10235 (thread_rec): Let low target handle debug registers.
10236 (child_add_thread): Likewise.
10237 (child_init_thread_list): Likewise.
10238 (continue_one_thread): Likewise.
10239 (regptr): New.
10240 (do_child_fetch_inferior_registers): Move to ...
10241 * win32-i386-low.c: ... here, and rename to ...
10242 (do_fetch_inferior_registers): ... this.
889bf7c5 10243 * win32-low.c (child_fetch_inferior_registers):
68070c10
PA
10244 Go through the low target.
10245 (do_child_store_inferior_registers): Use regptr.
10246 (strwinerror): New function.
10247 (win32_create_inferior): Handle Windows CE.
10248 Use strwinerror instead of strerror on Windows error
10249 codes. Add program to the error output.
10250 Don't close the main thread handle on Windows CE.
10251 (win32_attach): Use coredll.dll on Windows CE.
10252 (win32_kill): Close current process and current
10253 thread handles.
10254 (win32_detach): Use coredll.dll on Windows CE.
10255 (win32_resume): Let low target handle debug registers, and
10256 step request.
10257 (handle_exception): Add/Remove initial breakpoint. Avoid
10258 non-existant WSTOPSIG on Windows CE.
10259 (win32_read_inferior_memory): Cast to remove warning.
10260 (win32_arch_string): Go through the low target.
10261 (initialize_low): Call set_breakpoint_data with the low
10262 target's breakpoint.
10263 * win32-low.c (dr, FLAG_TRACE_BIT, FCS_REGNUM,
10264 FOP_REGNUM, mappings): Move to ...
10265 * win32-i386-low.c: ... here.
10266 * win32-low.c (win32_thread_info): Move to ...
10267 * win32-low.h: ... here.
10268 * Makefile.in (SFILES): Add win32-low.c, win32-i386-low.c,
10269 win32-arm-low.c and wincecompat.c.
10270 (all:): Add $EXEEXT.
10271 (install-only:): Likewise.
10272 (gdbserver:): Likewise.
10273 (gdbreplay:): Likewise.
10274 * config.in: Regenerate.
10275 * configure: Regenerate.
10276
41093d81
PA
102772007-03-28 Pedro Alves <pedro_alves@portugalmail.pt>
10278
10279 * win32-low.c: Rename typedef thread_info to
10280 win32_thread_info throughout.
10281
544afa54
PA
102822007-03-28 Pedro Alves <pedro_alves@portugalmail.pt>
10283
10284 * win32-i386-low.c: Rename to ...
10285 * win32-low.c: ... this.
10286 * configure.srv: Replace win32-i386-low.o with win32-low.o.
10287 * Makefile.in: Likewise.
10288
bce7165d
PA
102892007-03-27 Pedro Alves <pedro_alves@portugalmail.pt>
10290
10291 * remote-utils.c (monitor_output): Constify msg parameter.
10292 * server.h (monitor_output): Likewise.
10293 * win32-i386-low.c (handle_output_debug_string): New.
10294 (win32_kill): Handle OUTPUT_DEBUG_STRING_EVENT events using
10295 handle_output_debug_string.
10296 (get_child_debug_event): Likewise.
10297
506c7aa0
DJ
102982007-03-27 Mat Hostetter <mat@lcs.mit.edu>
10299
10300 * server.c (main): Correct strtoul check.
10301
42c81e2a
DJ
103022007-03-27 Jon Ringle <jon@ringle.org>
10303
10304 * linux-low.c: Check __ARCH_HAS_MMU__ also.
10305
9453113a
DJ
103062007-03-27 Brooks Moses <brooks.moses@codesourcery.com>
10307
10308 * Makefile.in: Add dummy "pdf" and "install-pdf" targets.
10309
64a69107
DJ
103102007-02-27 Daniel Jacobowitz <dan@codesourcery.com>
10311
10312 * terminal.h: Check HAVE_SGTTY_H.
10313
103142007-02-27 Mat Hostetter <mat@lcs.mit.edu>
6f8486da
DJ
10315
10316 * remote-utils.c (remote_open): Print out the assigned port number.
10317
c74d0ad8
DJ
103182007-02-26 Daniel Jacobowitz <dan@codesourcery.com>
10319
10320 * remote-utils.c (monitor_output): New function.
10321 * server.c (debug_threads): Define here.
10322 (monitor_show_help): New function.
10323 (handle_query): Handle qRcmd.
10324 (main): Do not handle 'd' packet.
10325 * server.h (debug_threads, remote_debug, monitor_output): Declare.
10326 * linux-low.c, spu-low.c, win32-i386-low.c: Remove definitions
10327 of debug_threads.
10328
de7c3b4a
PA
103292007-02-25 Pedro Alves <pedro_alves@portugalmail.pt>
10330
10331 * Makefile.in (EXEEXT): New.
10332 (clean): Use $(EXEEXT).
10333
ef57601b
PA
103342007-02-25 Pedro Alves <pedro_alves@portugalmail.pt>
10335
10336 * target.h (target_ops): Rename send_signal to request_interrupt,
10337 and remove enum target_signal parameter.
10338 * linux-low.c (linux_request_interrupt): Rename from
10339 linux_send_signal, and always send SIGINT.
10340 * spu-low.c (spu_request_interrupt): Rename from spu_send_signal,
10341 and always send SIGINT.
10342 * remote-utils.c (putpkt_binary): Call request_interrupt, instead
10343 of send_signal.
10344 (input_interrupt): Likewise.
10345
820f2bda
PA
103462007-02-25 Pedro Alves <pedro_alves@portugalmail.pt>
10347
10348 * server.c (get_features_xml): Check if target implemented
10349 arch_string.
10350 * win32-i386-low.c (win32_arch_string): New.
10351 (win32_target_ops): Add win32_arch_string as arch_string member.
10352
ab39bf24
UW
103532007-02-22 Markus Deuling <deuling@de.ibm.com>
10354
10355 * spu-low.c (spu_arch_string): New.
10356 (spu_target_ops): Add spu_arch_string.
10357
61ff6e04
DJ
103582007-02-16 Daniel Jacobowitz <dan@codesourcery.com>
10359
10360 * remote-utils.c: Remove HAVE_TERMINAL_H check.
10361 * configure.ac: Do not check for terminal.h.
10362 * configure, config.in: Regenerated.
10363
fb1e4ffc
DJ
103642007-02-08 Daniel Jacobowitz <dan@codesourcery.com>
10365
10366 * Makefile.in (OBS): Add $(XML_BUILTIN).
10367 (XML_DIR, XML_TARGET, XML_FILES, XML_BUILTIN): New.
10368 (clean): Update.
10369 (target.xml, xml-builtin.c, stamp-xml, arm-with-iwmmxt.o)
10370 (arm-with-iwmmxt.c): New.
10371 * config.in, configure: Regenerate.
10372 * configure.ac: Check for iWMMXt. Handle srv_xmltarget,
10373 srv_xmlbuiltin, and srv_xmlfiles. Define USE_XML.
10374 * configure.srv: Mention srv_xmltarget and srv_xmlfiles.
10375 (arm*-*-linux*): Add iWMMXt and regset support.
10376 * linux-arm-low.c (PTRACE_GETWMMXREGS, PTRACE_SETWMMXREGS): Define.
10377 (arm_fill_gregset, arm_store_gregset, arm_fill_wmmxregset)
10378 (arm_store_wmmxregset, target_regsets): New.
10379 * server.c (get_features_xml): Take annex argument. Check builtin
10380 XML documents.
10381 (handle_query): Handle multiple annexes.
10382
0f48aa01
DJ
103832007-01-29 Daniel Jacobowitz <dan@codesourcery.com>
10384
10385 * remote-utils.c [USE_WIN32API] (read, write): Define.
10386 (putpkt_binary, input_interrupt, readchar, getpkt): Use read and
10387 write.
10388
23181151
DJ
103892007-01-09 Daniel Jacobowitz <dan@codesourcery.com>
10390
10391 * linux-i386-low.c (the_low_target): Set arch_string.
10392 * linux-x86-64-low.c (the_low_target): Likewise.
10393 * linux-low.c (linux_arch_string): New.
10394 (linux_target_ops): Add it.
10395 * linux-low.h (struct linux_target_ops): Add arch_string.
10396 * server.c (write_qxfer_response): Use const void * for DATA.
10397 (get_features_xml): New.
10398 (handle_query): Handle qXfer:features:read. Report it for qSupported.
10399 * target.h (struct target_ops): Add arch_string method.
10400
9d606399
DJ
104012007-01-03 Denis Pilat <denis.pilat@st.com>
10402 Daniel Jacobowitz <dan@codesourcery.com>
10403
10404 * linux-low.c (linux_kill): Handle being called with no threads.
10405 * win32-i386-low.c (win32_kill): Likewise.
10406 (get_child_debug_event): Clear current_process_handle.
10407
104082006-12-30 Denis PILAT <denis.pilat@st.com>
8264bb58
DJ
10409 Daniel Jacobowitz <dan@codesourcery.com>
10410
10411 * remote-utils.c (remote_open): Check the type of specified
10412 serial port devices before opening them.
10413 * server.c (main): Kill the inferior if an error occurs during
10414 the first remote_open.
10415
a5e13d24
DJ
104162006-12-05 Markus Deuling <deuling@de.ibm.com>
10417
10418 * README: Update supported targets.
10419
186947f7
DJ
104202006-11-28 Daniel Jacobowitz <dan@codesourcery.com>
10421
10422 * Makefile.in (clean): Remove reg-mips64.c.
10423 (reg-mips64.c, reg-mips64.o): New rules.
10424 * configure.srv: Handle mips64. Include regset support for mips.
10425 * linux-mips-low.c (union mips_register): New.
10426 (mips_get_pc, mips_set_pc, mips_reinsert_addr): Use it.
10427 (mips_breakpoint, mips_breakpoint_at): Use int.
10428 (mips_collect_register, mips_supply_register)
10429 (mips_collect_register_32bit, mips_supply_register_32bit)
10430 (mips_fill_gregset, mips_store_gregset, mips_fill_fpregset)
10431 (mips_store_fpregset, target_regsets): New.
10432 * thread-db.c (thread_db_get_tls_address): Use uintptr_t.
10433
a13e2c95
UW
104342006-11-22 Ulrich Weigand <uweigand@de.ibm.com>
10435
10436 * configure.srv: Add target "spu*-*-*".
10437 * Makefile.in (clean): Remove reg-spu.c.
10438 (reg-spu.c, reg-spu.o, spu-low.o): Add dependencies.
10439 * spu-low.c: New file.
10440
cb7283db
DJ
104412006-11-16 Daniel Jacobowitz <dan@codesourcery.com>
10442
10443 * configure.ac: Correct td_thr_tls_get_addr test.
10444 * configure: Regenerated.
10445
89be2091
DJ
104462006-11-16 Daniel Jacobowitz <dan@codesourcery.com>
10447
10448 * linux-low.c (linux_wait_for_event): Reformat. Use the
10449 pass_signals array.
10450 * remote-utils.c (decode_address_to_semicolon): New.
10451 * server.c (pass_signals, handle_general_set): New.
10452 (handle_query): Mention QPassSignals for qSupported.
10453 (main): Call handle_general_set.
10454 * server.h (pass_signals, decode_address_to_semicolon): New.
10455
000ef4f0
DJ
104562006-11-06 Daniel Jacobowitz <dan@codesourcery.com>
10457
10458 * server.c (handle_query): Correct error handling for read_auxv.
10459
b7149293
UW
104602005-10-19 Ulrich Weigand <uweigand@de.ibm.com>
10461
10462 * configure.srv [s390-*-linux*, s390x-*-linux*]: Set srv_linux_regsets
10463 and srv_linux_thread_db to yes.
10464 * linux-s390-low.c (s390_fill_gregset): New function.
10465 (target_regsets): Define data structure.
10466
dae5f5cf
DJ
104672006-10-17 Daniel Jacobowitz <dan@codesourcery.com>
10468
10469 * acinclude.m4 (SRV_CHECK_TLS_GET_ADDR): New.
10470 * configure.ac: Use it. Define HAVE_TD_THR_TLS_GET_ADDR.
10471 * config.in, configure: Regenerated.
10472 * inferiors.c (gdb_id_to_thread): New function.
10473 (gdb_id_to_thread_id): Use it.
10474 * linux-low.c (linux_target_ops): Use thread_db_get_tls_address.
10475 * linux-low.h (struct process_info): Add th member.
10476 (thread_db_get_tls_address): New prototype.
10477 * remote-utils.c (decode_address): Make non-static.
10478 * server.c (handle_query): Handle qGetTLSAddr.
10479 * server.h (gdb_id_to_thread, decode_address): New prototypes.
10480 * target.h (struct target_ops): Add get_tls_address.
10481 * thread-db.c (maybe_attach_thread): Save the thread handle.
10482 (thread_db_get_tls_address): New.
10483
32ca6d61
DJ
104842006-09-28 Daniel Jacobowitz <dan@codesourcery.com>
10485
10486 * linux-low.c (PTRACE_GETSIGINFO, PTRACE_SETSIGINFO): Define.
10487 (linux_resume_one_process): Take a siginfo_t *. Update all
10488 callers. Queue it if necessary. Use PTRACE_SETSIGINFO.
10489 (struct pending_signals): Add a siginfo_t.
10490 (linux_wait_for_process): Always set last_status.
10491 (linux_wait_for_event): Use PTRACE_GETSIGINFO.
10492 (linux_queue_one_thread): Use PTRACE_GETSIGINFO.
10493 * linux-low.h (struct process_info): Add last_status.
10494
5ffff7c1
DJ
104952006-09-21 Daniel Jacobowitz <dan@codesourcery.com>
10496
10497 * remote-utils.c (try_rle): New function.
10498 (putpkt_binary): Use it.
10499
8695c747
DJ
105002006-08-19 Daniel Jacobowitz <dan@codesourcery.com>
10501
10502 * Makefile.in (clean): Clean reg-x86-64-linux.c.
10503 (reg-x86-64-linux.o, reg-x86-64-linux.c): New.
10504 * configure.srv (x86_64-*-linux*): Use reg-x86-64-linux.o.
10505 * linux-x86-64-low.c (x86_64_regmap): Include ORIG_RAX.
10506 (x86_64_fill_gregset, x86_64_store_gregset): Skip floating
10507 point registers.
10508
290fadea
RS
105092006-08-08 Richard Sandiford <richard@codesourcery.com>
10510
10511 * server.c (terminal_fd): New variable.
10512 (old_foreground_pgrp): Likewise.
10513 (restore_old_foreground_pgrp): New function.
10514 (start_inferior): Record the terminal file descriptor in terminal_fd
10515 and its original foreground group in old_foreground_pgrp. Register
10516 restore_old_foreground_pgrp with atexit().
10517
9f2e1e63
DJ
105182006-07-26 Daniel Jacobowitz <dan@codesourcery.com>
10519
10520 * server.c (handle_query): Correct qPart to qXfer.
10521
b80864fb
DJ
105222006-07-22 Daniel Jacobowitz <dan@codesourcery.com>
10523
10524 * configure.ac: Check for more headers which are missing on
10525 Windows. Automatically supply -lwsock32 and USE_WIN32API.
10526 * configure.srv: Add Cygwin and mingw32.
10527 * remote-utils.c: Don't include headers unconditionally which
10528 are missing on mingw32. Include <winsock.h> for mingw32.
10529 (remote_open): Adjust for mingw32 support. Flush
10530 standard error after writing to it.
10531 (remote_close, putpkt_binary, input_interrupt, block_async_io)
10532 (unblock_async_io, enable_async_io, disable_async_io)
10533 (readchar, getpkt): Update for Winsock support.
10534 (prepare_resume_reply): Expect a protocol signal number.
10535 * server.c: Disable <sys/wait.h> on mingw32.
10536 (start_inferior): Adjust for mingw32 support. Flush
10537 standard error after writing to it.
10538 (attach_inferior): Likewise. Use protocol signal
10539 numbers.
10540 (main): Skip 'D' packet on mingw32. Use protocol signal numbers
10541 and names.
10542 * win32-i386-low.c: New file.
10543 * Makefile.in (XM_CLIBS): Set.
10544 (gdbserver, gdbreplay): Use $(INTERNAL_CFLAGS).
10545 (win32-i386-low.o): New dependency rule.
10546 * linux-low.c (linux_wait): Use target signal numbers.
10547 * target.h (struct target_ops): Doc fix.
10548 * server.h (target_signal_to_name): New prototype.
10549 * gdbreplay.c: Don't include headers unconditionally which
10550 are missing on mingw32. Include <winsock.h> for mingw32.
10551 (remote_close, remote_open): Adjust for Winsock support.
10552 * configure, config.in: Regenerated.
10553
0876f84a
DJ
105542006-07-12 Daniel Jacobowitz <dan@codesourcery.com>
10555
10556 * server.c (decode_xfer_read, write_qxfer_response): New.
10557 (handle_query): Take a packet length argument. Handle
10558 qXfer:auxv:read instead of qPart:auxv:read. Mention it in
10559 the qSupported response.
10560 (main): Update call to handle_query.
10561
01f9e8fa
DJ
105622006-06-22 Daniel Jacobowitz <dan@codesourcery.com>
10563
10564 * remote-utils.c (remote_escape_output, remote_unescape_input): New.
10565 (putpkt_binary): Renamed from putpkt and adjusted for binary
10566 data.
10567 (putpkt): New wrapper for putpkt_binary.
10568 (readchar): Don't mask off the high bit.
10569 (decode_X_packet): New function.
10570 * server.c (main): Call putpkt_binary if a handler sets the packet
10571 length. Save the length of the incoming packet. Handle 'X'.
10572 * server.h (gdb_byte, remote_escape_output, decode_X_packet): New.
10573
be2a5f71
DJ
105742006-06-21 Daniel Jacobowitz <dan@codesourcery.com>
10575
10576 * server.c (handle_query): Handle qSupported.
10577
ea025f5f
DJ
105782006-05-30 Daniel Jacobowitz <dan@codesourcery.com>
10579
10580 * remote-utils.c (all_symbols_looked_up): New variable.
10581 (look_up_one_symbol): Check it.
10582 * server.h (look_up_one_symbol): New declaration.
10583 * thread-db.c (thread_db_init): Set all_symbols_looked_up.
10584
9308fc88
DJ
105852006-05-30 Daniel Jacobowitz <dan@codesourcery.com>
10586
10587 * Makefile.in (linux-arm-low.o): Update dependencies.
66f338c7 10588 * linux-arm-low.c: Include "gdb_proc_service.h".
9308fc88
DJ
10589 (PTRACE_GET_THREAD_AREA): Define.
10590 (ps_get_thread_area): New function.
10591
52fb6437
NS
105922006-05-09 Nathan Sidwell <nathan@codesourcery.com>
10593
10594 * configure.srv (m68k*-*-uclinux*): New target.
10595 * linux-low.c (linux_create_inferior): Use vfork on mmuless systems.
10596 (linux_resume_one_process): Remove extraneous cast.
10597 (linux_read_offsets): New.
10598 (linux_target_op): Add linux_read_offsets on mmuless systems.
10599 * server.c (handle_query): Add qOffsets logic.
10600 * target.h (struct target_ops): Add read_offsets.
10601
21b0f40c
DJ
106022006-03-15 Daniel Jacobowitz <dan@codesourcery.com>
10603
10604 * linux-mips-low.c: Include <sys/ptrace.h> and "gdb_proc_service.h".
10605 (PTRACE_GET_THREAD_AREA): Define.
10606 (ps_get_thread_area): New function.
10607 * Makefile.in (linux-i386-low.o, linux-mips-low.o)
10608 (linux-x86-64-low.o): Update.
10609
0050a760
DJ
106102006-03-15 Daniel Jacobowitz <dan@codesourcery.com>
10611
10612 * configure.ac: Remove checks for prfpregset_t.
10613 * gdb_proc_service.h: New file.
10614 * linux-i386-low.c, linux-x86-64-low.c, thread-db.c: Use the
10615 new "gdb_proc_service.h".
10616 * proc-service.c: Likewise.
10617 (ps_pglobal_lookup, ps_pdread, ps_pdwrite): Use psaddr_t.
10618 (ps_lgetfpregs, ps_lsetfpregs): Use a void* argument.
10619 * Makefile.in (gdb_proc_service_h): Updated.
10620 * configure, config.in: Regenerated.
10621
b92a518e
DJ
106222006-03-03 Daniel Jacobowitz <dan@codesourcery.com>
10623
10624 * remote-utils.c (prepare_resume_reply): Move declaration
10625 of gdb_id_from_wait to the top of the block.
10626
545587ee
DJ
106272006-02-15 Daniel Jacobowitz <dan@codesourcery.com>
10628
10629 * linux-low.c (regsets_store_inferior_registers): Read the regset
10630 from the target before filling it.
10631
9db87ebd
DJ
106322006-02-08 Daniel Jacobowitz <dan@codesourcery.com>
10633
10634 * server.c (attach_inferior): Return SIGTRAP for a successful
10635 attach.
10636
dd24457d
DJ
106372006-02-01 Daniel Jacobowitz <dan@codesourcery.com>
10638
10639 * Makefile.in (OBS): Add version.o.
10640 (STAGESTUFF): Delete.
10641 (version.o): Add dependencies.
10642 (version.c): Replace rule.
10643 (clean): Remove version.c.
10644 * server.c (gdbserver_version): New.
10645 (gdbserver_usage): Use printf.
10646 (main): Handle --version and --help.
10647 * server.h (version, host_name): Add declarations.
10648
6f0f660e
EZ
106492005-12-23 Eli Zaretskii <eliz@gnu.org>
10650
889bf7c5
PA
10651 * linux-arm-low.c:
10652 * linux-arm-low.c:
10653 * inferiors.c:
10654 * i387-fp.h:
10655 * i387-fp.c:
10656 * gdbreplay.c:
10657 * regcache.c:
10658 * proc-service.c:
10659 * mem-break.h:
10660 * mem-break.c:
10661 * linux-x86-64-low.c:
10662 * linux-sh-low.c:
10663 * linux-s390-low.c:
10664 * linux-ppc64-low.c:
10665 * linux-ppc-low.c:
10666 * linux-mips-low.c:
10667 * linux-m68k-low.c:
10668 * linux-m32r-low.c:
10669 * linux-low.h:
10670 * linux-low.c:
10671 * linux-ia64-low.c:
10672 * linux-i386-low.c:
10673 * linux-crisv32-low.c:
10674 * thread-db.c:
10675 * terminal.h:
10676 * target.h:
10677 * target.c:
10678 * server.h:
10679 * server.c:
10680 * remote-utils.c:
10681 * regcache.h:
10682 * utils.c:
10683 * Makefile.in:
10684 * configure.ac:
6f0f660e
EZ
10685 * gdbserver.1: Add (C) after Copyright. Update the FSF
10686 address.
10687
9d1fb177
DJ
106882005-11-13 Daniel Jacobowitz <dan@codesourcery.com>
10689
10690 * linux-arm-low.c (arm_eabi_breakpoint): New variable.
10691 (arm_breakpoint_at): Recognize both breakpoints.
10692 (the_low_target): Use the correct breakpoint instruction.
10693
011a70c2
DJ
106942005-11-02 Daniel Jacobowitz <dan@codesourcery.com>
10695
10696 * configure.srv (x86_64-*-linux*): Turn on thread_db support.
10697 * linux-x86-64-low.c (x86_64_breakpoint, x86_64_breakpoint_len)
10698 (x86_64_get_pc, x86_64_set_pc, x86_64_breakpoint_at): New.
10699 (the_low_target): Update.
10700
7fb85e41
AS
107012005-10-25 Andreas Schwab <schwab@suse.de>
10702
10703 * server.c (main): Allocate mem_buf with PBUFSIZ bytes.
10704
10705 * linux-ia64-low.c (ia64_regmap): Remove NAT registers.
10706 (ia64_num_regs): Reduce to 462.
10707
3db0444b
DJ
107082005-09-17 Daniel Jacobowitz <dan@codesourcery.com>
10709
10710 * acinclude.m4: Correct quoting.
10711 * aclocal.m4: Regenerated.
10712
10713 Suggested by SZOKOVACS Robert <szo@ies.hu>:
10714 * thread-db.c (thread_db_err_str): Handle TD_VERSION.
10715 (thread_db_init): Call thread_db_err_str.
10716 * configure.ac: Check for TD_VERSION.
10717 * config.in, configure: Regenerated.
10718
bee0189a
DJ
107192005-07-31 Kaveh R. Ghazi <ghazi@caip.rutgers.edu>
10720
10721 * server.h (error, fatal, warning): Add ATTR_FORMAT.
10722
e9d25b98
DJ
107232005-07-13 Daniel Jacobowitz <dan@codesourcery.com>
10724
10725 * configure.ac: Define HAVE_LINUX_REGSETS even if PTRACE_GETREGS
10726 is not available. Define HAVE_PTRACE_GETREGS if it is.
10727 * config.in, configure: Regenerated.
10728 * configure.srv: Set srv_linux_regsets for PowerPC and PowerPC64.
10729 * linux-i386-low.c, linux-m68k-low.c: Update to use
10730 HAVE_PTRACE_GETREGS.
10731 * linux-low.c (regsets_fetch_inferior_registers)
10732 (regsets_store_inferior_registers): Only return 0 if we processed
10733 GENERAL_REGS.
10734 * linux-ppc-low.c (ppc_fill_gregset, target_regsets): New.
10735 * linux-ppc64-low.c (ppc_fill_gregset, target_regsets): New.
10736
a06660f7
DJ
107372005-07-13 Daniel Jacobowitz <dan@codesourcery.com>
10738
10739 * inferiors.c (struct thread_info): Add gdb_id.
10740 (add_thread): Add gdb_id argument.
10741 (thread_id_to_gdb_id, thread_to_gdb_id, gdb_id_to_thread_id): New.
10742 * linux-low.c (linux_create_inferior, linux_attach_lwp): Update
10743 calls to add_thread.
10744 * remote-utils.c (prepare_resume_reply: Use thread_to_gdb_id.
10745 * server.c (handle_query): Use thread_to_gdb_id.
10746 (handle_v_cont, main): Use gdb_id_to_thread_id.
10747 * server.h (add_thread): Update prototype.
10748 (thread_id_to_gdb_id, thread_to_gdb_id, gdb_id_to_thread_id): New
10749 prototypes.
10750
5a1f5858
DJ
107512005-07-13 Daniel Jacobowitz <dan@codesourcery.com>
10752
10753 * linux-low.c (fetch_register, usr_store_inferior_registers): Handle
10754 left-padded registers.
10755 * linux-low.h (struct linux_target_ops): Add left_pad_xfer.
10756 * linux-ppc64-low.c (the_low_target): Set left_pad_xfer.
10757
e122f1f5
SE
107582005-07-01 Steve Ellcey <sje@cup.hp.com>
10759
10760 * configure.ac (BFD_NEED_DECLARATION): Replace with AC_CHECK_DECLS.
10761 * configure: Regenerate.
10762 * config.in: Regenerate.
10763 * server.h (NEED_DECLARATION_STRERROR):
10764 Replace with !HAVE_DECL_STRERROR.
10765
d592fa2f
DJ
107662005-06-16 Daniel Jacobowitz <dan@codesourcery.com>
10767
10768 * linux-low.c (linux_wait, linux_send_signal): Don't test
10769 an unsigned long variable for > 0 if it could be MAX_ULONG.
10770 * server.c (myresume): Likewise.
10771 * target.c (set_desired_inferior): Likewise.
10772
ccbd4912
MK
107732005-06-13 Mark Kettenis <kettenis@gnu.org>
10774
10775 * configure.ac: Simplify and improve check for socklen_t.
10776 * configure, config.in: Regenerate.
10777
f450004a
DJ
107782005-06-12 Daniel Jacobowitz <dan@codesourcery.com>
10779
10780 * acconfig.h: Remove.
10781 * configure.ac: Add a test for socklen_t. Use three-argument
10782 AC_DEFINE throughout.
10783 * config.in: Regenerated using autoheader 2.59.
10784 * configure: Regenerated.
10785
10786 * gdbreplay.c (socklen_t): Provide a default.
10787 (remote_open): Use socklen_t.
10788 * remote-utils.c (socklen_t): Provide a default.
10789 (remote_open): Use socklen_t.
10790 (convert_int_to_ascii, convert_ascii_to_int, decode_M_packet): Use
10791 unsigned char.
10792
10793 * i387-fp.c (struct i387_fsave, struct i387_fxsave): Use unsigned
10794 char for buffers.
10795 * linux-low.c (linux_read_memory, linux_write_memory)
10796 (linux_read_auxv): Likewise.
10797 * mem-break.c (breakpoint_data, set_breakpoint_data, check_mem_read)
10798 (check_mem_write): Likewise.
10799 * mem-break.h (set_breakpoint_data, check_mem_read, check_mem_write):
10800 Likewise.
10801 * regcache.c (struct inferior_rgcache_data, registers_to_string)
10802 (registers_from_string, register_data): Likewise.
10803 * server.c (handle_query, main): Likewise.
10804 * server.h (convert_ascii_to_int, convert_int_to_ascii)
10805 (decode_M_packet): Likewise.
10806 * target.c (read_inferior_memory, write_inferior_memory): Likewise.
10807 * target.h (struct target_ops): Update read_memory, write_memory,
10808 and read_auxv.
10809 (read_inferior_memory, write_inferior_memory): Update.
10810 * linux-low.h (struct linux_target_ops): Change type of breakpoint
10811 to unsigned char *.
10812 * linux-arm-low.c, linux-cris-low.c, linux-crisv32-low.c,
10813 linux-i386-low.c, linux-m32r-low.c, linux-m68k-low.c,
10814 linux-mips-low.c, linux-ppc-low.c, linux-ppc64-low.c,
10815 linux-s390-low.c, linux-sh-low.c: Update for changes in
10816 read_inferior_memory and the_low_target->breakpoint.
10817
eee84df1
DJ
108182005-05-28 Daniel Jacobowitz <dan@codesourcery.com>
10819
10820 * Makefile.in (SFILES): Add linux-ppc64-low.c.
10821 (linux-ppc64-low.o, reg-ppc64.c, reg-ppc64.o): New targets.
10822 * configure.srv: Add powerpc64-*-linux*.
10823 * linux-ppc64-low.c: New file.
10824
45b134e5
OF
108252005-05-23 Orjan Friberg <orjanf@axis.com>
10826
10827 * linux-cris-low.c: New file with support for CRIS.
10828 * linux-crisv32-low.c: Ditto for CRISv32.
10829 * Makefile.in (SFILES): Add linux-cris-low.c, linux-crisv32-low.c.
10830 (clean): Add reg-cris.c and reg-crisv32.c.
889bf7c5 10831 Add linux-cris-low.o, linux-crisv32-low.o, reg-cris.o, reg-cris.c,
45b134e5
OF
10832 reg-crisv32.o, and reg-crisv32.c to make rules.
10833 * configure.srv: Add cris-*-linux* and crisv32-*-linux* to list of
10834 recognized targets.
10835
48d93c75
UW
108362005-05-16 Ulrich Weigand <uweigand@de.ibm.com>
10837
10838 * linux-low.c (fetch_register): Ensure buffer size is a multiple
10839 of sizeof (PTRACE_XFER_TYPE).
10840 (usr_store_inferior_registers): Likewise. Zero out excess bytes.
10841
e013ee27
OF
108422005-05-12 Orjan Friberg <orjanf@axis.com>
10843
889bf7c5 10844 * target.h (struct target_ops): Add insert_watchpoint,
e013ee27
OF
10845 remove_watchpoint, stopped_by_watchpoint, stopped_data_address function
10846 pointers for hardware watchpoint support.
10847 * linux-low.h (struct linux_target_ops): Ditto.
10848 * linux-low.c (linux_insert_watchpoint, linux_remove_watchpoint)
10849 (linux_stopped_by_watchpoint, linux_stopped_data_address): New. Add
10850 to linux_target_ops.
10851 * remote-utils.c (prepare_resume_reply): Add watchpoint information to
10852 reply packet.
10853 * server.c (main): Recognize 'Z' and 'z' packets.
10854
b0ded00b
UW
108552005-05-10 Ulrich Weigand <uweigand@de.ibm.com>
10856
10857 * linux-s390-low.c (s390_breakpoint, s390_breakpoint_len): Define.
10858 (s390_get_pc, s390_set_pc, s390_breakpoint_at): New functions.
10859 (the_low_target): Add new members.
10860
8643e2ad
DJ
108612005-05-04 Daniel Jacobowitz <dan@codesourcery.com>
10862
10863 * proc-service.c (ps_lgetregs): Search all_processes instead of
10864 all_threads.
10865
fc620387
DJ
108662005-05-04 Daniel Jacobowitz <dan@codesourcery.com>
10867
10868 * server.c (start_inferior): Change return type to int.
10869 (attach_inferior): Change sigptr to int *.
10870 (handle_v_cont, handle_v_requests): Change signal to int *.
10871 (main): Change signal to int.
10872
108732005-04-15 Kei Sakamoto <sakamoto.kei@renesas.com>
7cfbc4a0
KI
10874
10875 * Makefile.in: Add linux-m32r-low.o, reg-m32r.c and reg-m32r.o.
10876 * configure.srv: Add m32r*-*-linux*.
10877 * linux-m32r-low.c: New file.
10878
e0e76420
DJ
108792005-03-04 Daniel Jacobowitz <dan@codesourcery.com>
10880
10881 * Makefile.in (stamp-h): Set CONFIG_HEADERS explicitly.
10882
a1928bad
DJ
108832005-03-03 Daniel Jacobowitz <dan@codesourcery.com>
10884
10885 * inferiors.c (change_inferior_id, add_thread, find_inferior_id):
10886 Take unsigned long arguments for PIDs.
10887 * linux-low.c (add_process, linux_attach_lwp, linux_attach)
10888 (linux_thread_alive, linux_wait_for_event, kill_lwp, send_sigstop)
10889 (wait_for_sigstop, linux_resume_one_process)
10890 (regsets_fetch_inferior_registers, linux_send_signal)
10891 (linux_read_auxv): Likewise. Update the types of variables holding
10892 PIDs. Update format string specifiers.
10893 * linux-low.h (struct process_info, linux_attach_lwp): Likewise.
10894 * remote-utils.c (prepare_resume_reply): Likewise.
10895 * server.c (cont_thread, general_thread, step_thread)
10896 (thread_from_wait, old_thread_from_wait, signal_pid): Change type to
10897 unsigned long.
10898 (handle_query): Update format specifiers.
10899 (handle_v_cont, main): Use strtoul for thread IDs.
10900 * server.h (struct inferior_list_entry): Use unsigned long for ID.
10901 (add_thread, find_inferior_id, change_inferior_id, cont_thread)
10902 (general_thread, step_thread, thread_from_wait)
10903 (old_thread_from_wait): Update.
10904 * target.h (struct thread_resume): Use unsigned long for THREAD.
10905 (struct target_ops): Use unsigned long for arguments to attach and
10906 thread_alive.
10907
dcdb98d2
DJ
109082005-02-24 Daniel Jacobowitz <dan@codesourcery.com>
10909
10910 * acinclude.m4: Include bfd/bfd.m4 directly.
10911 * configure.ac: Use AC_ARG_PROGRAM. Suggested by Aron Griffis
10912 <agriffis@toolchain.org>.
10913 * aclocal.m4, configure: Regenerated.
10914
bec39cab
AC
109152005-01-07 Andrew Cagney <cagney@gnu.org>
10916
10917 * configure.ac: Rename configure.in, require autoconf 2.59.
10918 * configure: Re-generate.
10919
434c4c77
DJ
109202004-12-08 Daniel Jacobowitz <dan@debian.org>
10921
10922 * acinclude.m4 (SRV_CHECK_THREAD_DB): Add ps_get_thread_area. Reset
10923 LIBS when finished.
10924 * aclocal.m4: Regenerated.
10925 * configure: Regenerated.
10926
db1d3e1b
AS
109272004-11-21 Andreas Schwab <schwab@suse.de>
10928
10929 * linux-m68k-low.c (m68k_num_gregs): Define.
10930 (m68k_fill_gregset, m68k_store_gregset, m68k_fill_fpregset)
10931 (m68k_store_fpregset, target_regsets) [HAVE_LINUX_REGSETS]: New.
10932 (m68k_breakpoint, m68k_breakpoint_len, m68k_get_pc, m68k_set_pc)
10933 (m68k_breakpoint_at): New. Add to the_low_target.
10934
10935 * configure.srv (m68*-*-linux*): Set srv_linux_regsets and
10936 srv_linux_thread_db to yes.
10937
43360365
JB
109382004-10-20 Joel Brobecker <brobecker@gnat.com>
10939
10940 * linux-x86-64-low.c (ARCH_SET_GS): Add definition if missing.
10941 (ARCH_SET_FS): Likewise.
10942 (ARCH_GET_FS): Likewise.
10943 (ARCH_GET_GS): Likewise.
10944
fd500816
DJ
109452004-10-16 Daniel Jacobowitz <dan@debian.org>
10946
10947 * linux-i386-low.c (ps_get_thread_area): New.
10948 * linux-x86-64-low.c (ps_get_thread_area): New.
10949 * linux-low.c: Include <sys/syscall.h>.
10950 (linux_kill_one_process): Don't kill the first thread here.
10951 (linux_kill): Kill the first thread here.
10952 (kill_lwp): New function.
10953 (send_sigstop, linux_send_signal): Use it.
10954 * proc-service.c: Clean up #ifdefs.
10955 (fpregset_info): Delete.
10956 (ps_lgetregs): Update and enable implementation.
10957 (ps_lsetregs, ps_lgetfpregs, ps_lsetfpregs): Remove disabled
10958 implementations.
10959 * remote-utils.c (struct sym_cache, symbol_cache): New.
10960 (input_interrupt): Print a clearer message.
10961 (async_io_enabled): New variable.
10962 (enable_async_io, disable_async_io): Use it. Update comments.
10963 (look_up_one_symbol): Use the symbol cache.
10964 * thread-db.c (thread_db_look_up_symbols): New function.
10965 (thread_db_init): Update comments. Call thread_db_look_up_symbols.
10966
f6de3c42
DJ
109672004-10-16 Daniel Jacobowitz <dan@debian.org>
10968
10969 * configure.in: Test for -rdynamic.
10970 * configure: Regenerated.
10971 * Makefile (INTERNAL_LDFLAGS): New.
10972 (gdbserver, gdbreplay): Use it.
10973
2c0fc042
AC
109742004-09-02 Andrew Cagney <cagney@gnu.org>
10975
10976 * Makefile.in (TAGS): Replace TM_FILE with DEPRECATED_TM_FILE.
10977
075b3282
DJ
109782004-03-23 Daniel Jacobowitz <drow@mvista.com>
10979
10980 * linux-low.c (linux_wait): Clear all_processes list also.
10981
fa6a77dc
DJ
109822004-03-12 Daniel Jacobowitz <drow@mvista.com>
10983
10984 * linux-low.c: Include <errno.h>. Remove extern declaration of
10985 errno.
10986
6d782a97
DJ
109872004-03-12 Daniel Jacobowitz <drow@mvista.com>
10988
10989 * gdbreplay.c, server.h, utils.c: Update copyright years.
10990
3a7fb99b
DJ
109912004-03-04 Nathan J. Williams <nathanw@wasabisystems.com>
10992
10993 * server.c (main): Print child status or termination signal from
10994 variable 'signal', not 'sig'.
10995
c3e735a6
DJ
109962004-03-04 Nathan J. Williams <nathanw@wasabisystems.com>
10997
10998 * linux-low.c (linux_read_memory): Change return type to
10999 int. Check for and return error from ptrace().
11000 * target.c (read_inferior_memory): Change return type to int. Pass
11001 back return status from the_target->read_memory().
11002 * target.h (struct target_ops): Adapt *read_memory() prototype.
11003 Update comment.
11004 (read_inferior_memory): Adapt prototype.
11005 * server.c (main): Return an error packet if
11006 read_inferior_memory() returns an error.
11007
a59d1c82
DJ
110082004-03-04 Daniel Jacobowitz <drow@mvista.com>
11009
11010 * Makefile.in (distclean): Remove config.h, stamp-h, and config.log.
11011 Unify with other clean targets.
11012
dc3f8883
DJ
110132004-02-29 Daniel Jacobowitz <drow@mvista.com>
11014
11015 * server.c (handle_v_cont): Call set_desired_inferior.
11016
89a208da
DJ
110172004-02-29 Daniel Jacobowitz <drow@mvista.com>
11018
11019 * remote-utils.c (prepare_resume_reply): Always supply "thread:".
11020
62ea82f5
DJ
110212004-02-29 Daniel Jacobowitz <drow@mvista.com>
11022
11023 * linux-low.c (linux_wait): Unblock async I/O.
11024 (linux_resume): Block and enable async I/O.
11025 * remote-utils.c (block_async_io, unblock_async_io): New functions.
11026 * server.h (block_async_io, unblock_async_io): Add prototypes.
11027
6910d122
DJ
110282004-02-29 Daniel Jacobowitz <drow@mvista.com>
11029
11030 * remote-utils.c (remote_open): Print a status notice after
11031 opening a TCP port.
11032 * server.c (attach_inferior): Print a status notice after
11033 attaching.
11034
110352004-02-29 Daniel Jacobowitz <drow@mvista.com>
d677d77d
DJ
11036
11037 * linux-arm-low.c (arm_get_pc): Print out stop PC in debug mode.
11038
c89dc5d4
DJ
110392004-02-26 Daniel Jacobowitz <drow@mvista.com>
11040
11041 * remote-utils.c (write_enn): Use "E01" instead of "ENN" for the
11042 error packet.
11043 * server.c, target.h: Update copyright years.
11044
4b8dad4a
RM
110452004-02-25 Roland McGrath <roland@redhat.com>
11046
11047 * target.h (struct target_ops): New member `read_auxv'.
11048 * server.c (handle_query): Handle qPart:auxv:read: query using that.
11049 * linux-low.c (linux_read_auxv): New function.
11050 (linux_target_ops): Initialize `read_auxv' member to that.
11051
d7446758
JB
110522004-02-17 Ulrich Weigand <Ulrich.Weigand@de.ibm.com>
11053
11054 Committed by Jim Blandy <jimb@redhat.com>.
11055
11056 * linux-s390-low.c (s390_num_regs): Update.
4b8dad4a 11057 (s390_regmap): Remove control registers. Use __s390x__ predefine
d7446758
JB
11058 instead of GPR_SIZE to distiguish s390 and s390x targets.
11059
5544ad89
DJ
110602004-01-31 Daniel Jacobowitz <drow@mvista.com>
11061
11062 * linux-low.c: Update copyright year.
11063 (check_removed_breakpoint): Clear pending_is_breakpoint.
11064 (linux_set_resume_request, linux_queue_one_thread)
11065 (resume_status_pending_p): New functions.
11066 (linux_continue_one_thread): Use process->resume.
11067 (linux_resume): Only resume threads if there are no pending events.
11068 * linux-low.h (struct process_info): Add resume request
11069 pointer.
11070
2a68b70e
DJ
110712004-01-30 Daniel Jacobowitz <drow@mvista.com>
11072
11073 * regcache.c (new_register_cache): Clear the allocated register
11074 buffer. Suggested by Atsushi Nemoto <anemo@mba.ocn.ne.jp>.
11075
64386c31
DJ
110762003-10-13 Daniel Jacobowitz <drow@mvista.com>
11077
11078 * linux-low.c (linux_resume): Take a struct thread_resume *
11079 argument.
11080 (linux_wait): Update call.
11081 (resume_ptr): New static variable.
11082 (linux_continue_one_thread): Renamed from
11083 linux_continue_one_process. Use resume_ptr.
11084 (linux_resume): Use linux_continue_one_thread.
11085 * server.c (handle_v_cont, handle_v_requests): New functions.
11086 (myresume): New function.
11087 (main): Handle 'v' case.
11088 * target.h (struct thread_resume): New type.
11089 (struct target_ops): Change argument of "resume" to struct
11090 thread_resume *.
11091 (myresume): Delete macro.
11092
c938e9b0
L
110932003-08-08 H.J. Lu <hongjiu.lu@intel.com>
11094
11095 * Makefile.in (install-only): Create dest dir. Support DESTDIR.
11096 (uninstall): Support DESTDIR.
11097
7f313d07
BC
11098Mon Jul 21 20:09:34 UTC 2003 Brendan Conoboy <blc@redhat.com>
11099
11100 * configure.srv: Add xscale*linux copy of arm*linux entry.
11101
3b2fc2ea
DJ
111022003-07-24 Daniel Jacobowitz <drow@mvista.com>
11103
11104 * linux-arm-low.c (arm_reinsert_addr): New function.
11105 (the_low_target): Add arm_reinsert_addr.
11106
1c0a559e
MK
111072003-07-08 Mark Kettenis <kettenis@gnu.org>
11108
11109 * mem-break.c: Remove whitespace at end of file.
11110
43d5792c
DJ
111112003-06-28 Daniel Jacobowitz <drow@mvista.com>
11112
11113 * configure.in: Check whether we need to prototype strerror.
11114 * server.h: Optionally prototype strerror.
11115 * gdbreplay.c (perror_with_name): Use strerror.
11116 * linux-low.c (linux_attach_lwp): Use strerror.
11117 * utils.c (perror_with_name): Use strerror.
11118 * config.in, configure: Regenerated.
11119
c8a86edf
DJ
111202003-06-28 Daniel Jacobowitz <drow@mvista.com>
11121
11122 * linux-sh-low.c (sh_regmap): Fix FP register offsets, reported by
11123 SUGIOKA Toshinobu <sugioka@itonet.co.jp>.
11124
73d37363
DJ
111252003-06-20 Daniel Jacobowitz <drow@mvista.com>
11126
11127 * Makefile.in (SFILES): Update.
11128 * low-hppabsd.c, low-lynx.c, low-nbsd.c, low-sim.c, low-sparc.c,
11129 low-sun3.c: Remove files.
11130
6ad8ae5c
DJ
111312003-06-17 Daniel Jacobowitz <drow@mvista.com>
11132
11133 * linux-low.c: Move comment to linux_thread_alive where it belonged.
11134 (linux_detach_one_process, linux_detach): New functions.
11135 (linux_target_ops): Add linux_detach.
11136 * server.c (main): Handle 'D' packet.
11137 * target.h (struct target_ops): Add "detach" member.
11138 (detach_inferior): Define.
11139
1581182a
MK
111402003-06-13 Mark Kettenis <kettenis@gnu.org>
11141
11142 From Kelley Cook <kelleycook@wideopenwest.com>:
11143 * configure.srv: Accept i[34567]86 variants.
11144
e5379b03
DJ
111452003-06-05 Daniel Jacobowitz <drow@mvista.com>
11146
11147 * linux-low.c (linux_wait_for_event): Correct comment typos.
11148 (linux_resume_one_process): Call check_removed_breakpoint.
11149 (linux_send_signal): New function.
11150 (linux_target_ops): Add linux_send_signal.
11151 * remote-utils.c (putpkt, input_interrupt): Use send_signal instead
11152 of kill.
11153 * target.h (struct target_ops): Add send_signal.
11154
2ff29de4
JB
111552003-05-29 Jim Blandy <jimb@redhat.com>
11156
11157 * linux-low.c (usr_store_inferior_registers): Transfer buf in
11158 PTRACE_XFER_TYPE-sized chunks, not int-sized chunks. Otherwise,
11159 if 'int' is smaller than PTRACE_XFER_TYPE, you end up throwing
11160 away part of the register's value.
11161
254787d4
DJ
111622003-03-26 Daniel Jacobowitz <drow@mvista.com>
11163
11164 * linux-low.c (linux_create_inferior): Use __SIGRTMIN.
11165 (linux_wait_for_event, linux_init_signals): Likewise.
11166
94e10508
DJ
111672003-03-17 Daniel Jacobowitz <drow@mvista.com>
11168
11169 * configure.in: Check for stdlib.h.
11170 * configure: Regenerated.
11171 * config.in: Regenerated.
11172
4c0711e0
DJ
111732003-01-04 Andreas Schwab <schwab@suse.de>
11174
11175 * linux-m68k-low.c (m68k_num_regs): Define to 29 instead of 31.
11176
ef66e766
AC
111772003-01-02 Andrew Cagney <ac131313@redhat.com>
11178
11179 * Makefile.in: Remove obsolete code.
11180
a1358604
DJ
111812002-11-20 Daniel Jacobowitz <drow@mvista.com>
11182
11183 * linux-s390-low.c (s390_regmap): Check GPR_SIZE instead of
11184 defined(PT_FPR0_HI).
11185
23ce3b1c
DJ
111862002-11-17 Stuart Hughes <seh@zee2.com>
11187
11188 * linux-arm-low.c (arm_num_regs): Increase.
11189 (arm_regmap): Include status register.
11190
111912002-11-17 Daniel Jacobowitz <drow@mvista.com>
11192
11193 * linux-low.c (register_addr): Remove incorrect -1 check.
11194
a9fa9f7d
DJ
111952002-08-29 Daniel Jacobowitz <drow@mvista.com>
11196
11197 * linux-low.c (linux_create_inferior): Call setpgid. Return
11198 the new PID.
11199 (unstopped_p, linux_signal_pid): Remove.
11200 (linux_target_ops): Remove linux_signal_pid.
11201 * remote-utils.c (putpkt, input_interrupt): Use signal_pid
11202 global instead of target method.
11203 * target.h (struct target_ops): Remove signal_pid. Update comment
11204 for create_inferior.
11205 * server.c (signal_pid): New variable.
11206 (create_inferior): Set signal_pid. Block SIGTTOU and SIGTTIN in
4b8dad4a 11207 gdbserver. Set the child to be the foreground process group.
a9fa9f7d
DJ
11208 (attach_inferior): Set signal_pid.
11209
17574093
DJ
112102002-08-23 Daniel Jacobowitz <drow@mvista.com>
11211
11212 * ChangeLog: New file, with entries from gdb/ChangeLog after GDB 5.2.
11213
112142002-08-20 Jim Blandy <jimb@redhat.com>
11215
11216 * Makefile.in (LDFLAGS): Allow the configure script to establish a
11217 default for this.
11218
112192002-08-01 Andrew Cagney <cagney@redhat.com>
11220
11221 * Makefile.in: Make chill references obsolete.
11222
112232002-07-24 Kevin Buettner <kevinb@redhat.com>
11224
11225 * configure.in (unistd.h): Add to AC_CHECK_HEADERS list.
11226 * configure: Regenerate.
11227 * config.in: Regenerate.
11228
112292002-07-09 David O'Brien <obrien@FreeBSD.org>
11230
11231 * gdbreplay.c (stdlib.h, unistd.h): Conditionaly include.
11232 (perror_with_name, remote_close, remote_open, expect, play): Static.
11233
112342002-07-04 Michal Ludvig <mludvig@suse.cz>
11235
4b8dad4a 11236 * linux-x86-64-low.c (x86_64_regmap): Make it an array of
17574093
DJ
11237 byte offsets instead of an array of indexes.
11238 (x86_64_store_gregset, x86_64_store_fpregset): Parameter made const.
11239
112402002-06-13 Daniel Jacobowitz <drow@mvista.com>
11241
11242 * regcache.c: Add comment.
11243
112442002-06-11 Daniel Jacobowitz <drow@mvista.com>
11245
11246 * thread-db.c: New file.
11247 * proc-service.c: New file.
11248 * acinclude.m4: New file.
11249 * Makefile.in: Add GDBSERVER_LIBS, gdb_proc_service_h,
11250 proc-service.o, and thread-db.o.
11251 (linux-low.o): Add USE_THREAD_DB.
11252 * acconfig.h: Add HAVE_PRGREGSET_T, HAVE_PRFPREGSET_T,
11253 HAVE_LWPID_T, HAVE_PSADDR_T, and PRFPREGSET_T_BROKEN.
11254 * aclocal.m4: Regenerated.
11255 * config.in: Regenerated.
11256 * configure: Regenerated.
11257 * configure.in: Check for proc_service.h, sys/procfs.h,
11258 thread_db.h, and linux/elf.h headrs.
11259 Check for lwpid_t, psaddr_t, prgregset_t, prfpregset_t, and
11260 PRFPREGSET_T_BROKEN. Introduce srv_thread_depfiles and USE_THREAD_DB.
11261 Check for -lthread_db and thread support.
11262 * configure.srv: Enable thread_db support for ARM, i386, MIPS,
11263 PowerPC, and SuperH.
11264 * i387-fp.c: Constify arguments.
11265 * i387-fp.h: Likewise.
11266 * inferiors.c: (struct thread_info): Renamed from
11267 `struct inferior_info'. Remove PID member. Use generic inferior
11268 list header. All uses updated.
11269 (inferiors, signal_pid): Removed.
11270 (all_threads): New variable.
11271 (get_thread): Define.
11272 (add_inferior_to_list): New function.
11273 (for_each_inferior): New function.
11274 (change_inferior_id): New function.
11275 (add_inferior): Removed.
11276 (remove_inferior): New function.
11277 (add_thread): New function.
11278 (free_one_thread): New function.
11279 (remove_thread): New function.
11280 (clear_inferiors): Use for_each_inferior and free_one_thread.
11281 (find_inferior): New function.
11282 (find_inferior_id): New function.
11283 (inferior_target_data): Update argument type.
11284 (set_inferior_target_data): Likewise.
11285 (inferior_regcache_data): Likewise.
11286 (set_inferior_regcache_data): Likewise.
11287 * linux-low.c (linux_bp_reinsert): Remove.
11288 (all_processes, stopping_threads, using_thrads)
11289 (struct pending_signals, debug_threads, pid_of): New.
11290 (inferior_pid): Replace with macro.
11291 (struct inferior_linux_data): Remove.
11292 (get_stop_pc, add_process): New functions.
11293 (linux_create_inferior): Restore SIGRTMIN+1 before calling exec.
11294 Use add_process and add_thread.
11295 (linux_attach_lwp): New function, based on old linux_attach. Use
11296 add_process and add_thread. Set stop_expected for new threads.
11297 (linux_attach): New function.
11298 (linux_kill_one_process): New function.
11299 (linux_kill): Kill all LWPs.
11300 (linux_thread_alive): Use find_inferior_id.
11301 (check_removed_breakpoints, status_pending_p): New functions.
11302 (linux_wait_for_process): Renamed from linux_wait_for_one_inferior.
11303 Update. Use WNOHANG. Wait for cloned processes also. Update process
11304 struct for the found process.
11305 (linux_wait_for_event): New function.
11306 (linux_wait): Use it. Support LWPs.
11307 (send_sigstop, wait_for_sigstop, stop_all_processes)
11308 (linux_resume_one_process, linux_continue_one_process): New functions.
11309 (linux_resume): Support LWPs.
11310 (REGISTER_RAW_SIZE): Remove.
11311 (fetch_register): Use register_size instead. Call supply_register.
11312 (usr_store_inferior_registers): Likewise. Call collect_register.
11313 Fix recursive case.
11314 (regsets_fetch_inferior_registers): Improve error message.
11315 (regsets_store_inferior_registers): Add debugging.
11316 (linux_look_up_symbols): Call thread_db_init if USE_THREAD_DB.
11317 (unstopped_p, linux_signal_pid): New functions.
11318 (linux_target_ops): Add linux_signal_pid.
11319 (linux_init_signals): New function.
11320 (initialize_low): Call it. Initialize using_threads.
11321 * regcache.c (inferior_regcache_data): Add valid
11322 flag.
11323 (get_regcache): Fetch registers lazily. Add fetch argument
11324 and update all callers.
11325 (regcache_invalidate_one, regcache_invalidate): New
11326 functions.
11327 (new_register_cache): Renamed from create_register_cache.
11328 Return the new regcache.
11329 (free_register_cache): Change argument to a void *.
11330 (registers_to_string, registers_from_string): Call get_regcache
11331 with fetch flag set.
11332 (register_data): Make static. Pass fetch flag to get_regcache.
11333 (supply_register): Call get_regcache with fetch flag clear.
11334 (collect_register): Call get_regcache with fetch flag set.
11335 (collect_register_as_string): New function.
11336 * regcache.h: Update.
11337 * remote-utils.c (putpkt): Flush after debug output and use
11338 stderr.
11339 Handle input interrupts while waiting for an ACK.
11340 (input_interrupt): Use signal_pid method.
11341 (getpkt): Flush after debug output and use stderr.
11342 (outreg): Use collect_register_as_string.
11343 (new_thread_notify, dead_thread_notify): New functions.
11344 (prepare_resume_reply): Check using_threads. Set thread_from_wait
11345 and general_thread.
11346 (look_up_one_symbol): Flush after debug output.
11347 * server.c (step_thread, server_waiting): New variables.
11348 (start_inferior): Don't use signal_pid. Update call to mywait.
11349 (attach_inferior): Update call to mywait.
11350 (handle_query): Handle qfThreadInfo and qsThreadInfo.
11351 (main): Don't fetch/store registers explicitly. Use
11352 set_desired_inferior. Support proposed ``Hs'' packet. Update
11353 calls to mywait.
11354 * server.h: Update.
11355 (struct inferior_list, struct_inferior_list_entry): New.
11356 * target.c (set_desired_inferior): New.
11357 (write_inferior_memory): Constify.
11358 (mywait): New function.
11359 * target.h: Update.
11360 (struct target_ops): New signal_pid method.
11361 (mywait): Removed macro, added prototype.
11362
11363 * linux-low.h (regset_func): Removed.
11364 (regset_fill_func, regset_store_func): New.
11365 (enum regset_type): New.
11366 (struct regset_info): Add type field. Use new operation types.
11367 (struct linux_target_ops): stop_pc renamed to get_pc.
11368 Add decr_pc_after_break and breakpoint_at.
11369 (get_process, get_thread_proess, get_process_thread)
11370 (strut process_info, all_processes, linux_attach_lwp)
11371 (thread_db_init): New.
11372
11373 * linux-arm-low.c (arm_get_pc, arm_set_pc,
11374 arm_breakpoint, arm_breakpoint_len, arm_breakpoint_at): New.
11375 (the_low_target): Add new members.
11376 * linux-i386-low.c (i386_store_gregset, i386_store_fpregset)
11377 (i386_store_fpxregset): Constify.
11378 (target_regsets): Add new kind identifier.
11379 (i386_get_pc): Renamed from i386_stop_pc. Simplify.
11380 (i386_set_pc): Add debugging.
11381 (i386_breakpoint_at): New function.
11382 (the_low_target): Add new members.
11383 * linux-mips-low.c (mips_get_pc, mips_set_pc)
11384 (mips_breakpoint, mips_breakpoint_len, mips_reinsert_addr)
11385 (mips_breakpoint_at): New.
11386 (the_low_target): Add new members.
11387 * linux-ppc-low.c (ppc_get_pc, ppc_set_pc)
11388 (ppc_breakpoint, ppc_breakpoint_len, ppc_breakpoint_at): New.
11389 (the_low_target): Add new members.
11390 * linux-sh-low.c (sh_get_pc, sh_set_pc)
11391 (sh_breakpoint, sh_breakpoint_len, sh_breakpoint_at): New.
11392 (the_low_target): Add new members.
11393 * linux-x86-64-low.c (target_regsets): Add new kind
11394 identifier.
11395
113962002-05-15 Daniel Jacobowitz <drow@mvista.com>
11397
11398 From Martin Pool <mbp@samba.org>:
11399 * server.c (gdbserver_usage): New function.
11400 (main): Call it.
11401
114022002-05-14 Daniel Jacobowitz <drow@mvista.com>
11403
11404 * mem-break.c (reinsert_breakpoint_by_bp): Correct typo
11405 stop_at -> stop_pc.
11406
114072002-05-04 Andrew Cagney <ac131313@redhat.com>
11408
11409 * Makefile.in: Remove obsolete code.
11410
114112002-04-24 Michal Ludvig <mludvig@suse.cz>
11412
11413 * linux-low.c (regsets_fetch_inferior_registers),
11414 (regsets_store_inferior_registers): Removed cast to int from
11415 ptrace() calls.
11416 * regcache.h: Added declaration of struct inferior_info.
11417
114182002-04-20 Daniel Jacobowitz <drow@mvista.com>
11419
11420 * inferiors.c (struct inferior_info): Add regcache_data.
11421 (add_inferior): Call create_register_cache.
11422 (clear_inferiors): Call free_register_cache.
11423 (inferior_regcache_data, set_inferior_regcache_data): New functions.
11424 * regcache.c (struct inferior_regcache_data): New.
11425 (registers): Remove.
11426 (get_regcache): New function.
11427 (create_register_cache, free_register_cache): New functions.
11428 (set_register_cache): Don't initialize the register cache here.
11429 (registers_to_string, registers_from_string, register_data): Call
11430 get_regcache.
11431 * regcache.h: Add prototypes.
11432 * server.h: Likewise.
11433
114342002-04-20 Daniel Jacobowitz <drow@mvista.com>
11435
11436 * mem-break.c: New file.
11437 * mem-break.h: New file.
11438 * Makefile.in: Add mem-break.o rule; update server.h
11439 dependencies.
11440 * inferiors.c (struct inferior_info): Add target_data
11441 member.
11442 (clear_inferiors): Free target_data member if set.
11443 (inferior_target_data, set_inferior_target_data): New functions.
11444 * linux-i386-low.c (i386_breakpoint, i386_breakpoint_len)
11445 (i386_stop_pc, i386_set_pc): New. Add to the_low_target.
11446 * linux-low.c (linux_bp_reinsert): New variable.
11447 (struct inferior_linux_data): New.
11448 (linux_create_inferior): Use set_inferior_target_data.
11449 (linux_attach): Likewise. Call add_inferior.
11450 (linux_wait_for_one_inferior): New function.
11451 (linux_wait): Call it.
11452 (linux_write_memory): Add const.
11453 (initialize_low): Call set_breakpoint_data.
11454 * linux-low.h (struct linux_target_ops): Add breakpoint
11455 handling members.
11456 * server.c (attach_inferior): Remove extra add_inferior
11457 call.
11458 * server.h: Include mem-break.h. Update inferior.c
11459 prototypes.
11460 * target.c (read_inferior_memory)
11461 (write_inferior_memory): New functions.
11462 * target.h (read_inferior_memory)
11463 (write_inferior_memory): Change macros to prototypes.
11464 (struct target_ops): Update comments. Add const to write_memory
11465 definition.
11466
114672002-04-11 Daniel Jacobowitz <drow@mvista.com>
11468
11469 * linux-low.c (usr_store_inferior_registers): Support
11470 registers which are allowed to fail to store.
11471 * linux-low.h (linux_target_ops): Likewise.
11472 * linux-ppc-low.c (ppc_regmap): Support FPSCR.
11473 (ppc_cannot_store_register): FPSCR may not be storable.
11474
114752002-04-09 Daniel Jacobowitz <drow@mvista.com>
11476
11477 * server.h: Include <string.h> if HAVE_STRING_H.
11478 * ChangeLog: Correct paths in last ChangeLog entry.
11479
114802002-04-09 Daniel Jacobowitz <drow@mvista.com>
11481
11482 * linux-low.h: Remove obsolete prototypes.
11483 (struct linux_target_ops): New.
11484 (extern the_low_target): New.
11485 * linux-low.c (num_regs, regmap): Remove declarations.
11486 (register_addr): Use the_low_target explicitly.
11487 (fetch_register): Likewise.
11488 (usr_fetch_inferior_registers): Likewise.
11489 (usr_store_inferior_registers): Likewise.
11490 * linux-arm-low.c (num_regs): Remove.
11491 (arm_num_regs): Define.
11492 (arm_regmap): Renamed from regmap, made static.
11493 (arm_cannot_fetch_register): Renamed from cannot_fetch_register,
11494 made static.
11495 (arm_cannot_store_register): Renamed from cannot_store_register,
11496 made static.
11497 (the_low_target): New.
11498 * linux-i386-low.c (num_regs): Remove.
11499 (i386_num_regs): Define.
11500 (i386_regmap): Renamed from regmap, made static.
11501 (i386_cannot_fetch_register): Renamed from cannot_fetch_register,
11502 made static.
11503 (i386_cannot_store_register): Renamed from cannot_store_register,
11504 made static.
11505 (the_low_target): New.
11506 * linux-ia64-low.c (num_regs): Remove.
11507 (ia64_num_regs): Define.
11508 (ia64_regmap): Renamed from regmap, made static.
11509 (ia64_cannot_fetch_register): Renamed from cannot_fetch_register,
11510 made static.
11511 (ia64_cannot_store_register): Renamed from cannot_store_register,
11512 made static.
11513 (the_low_target): New.
11514 * linux-m68k-low.c (num_regs): Remove.
11515 (m68k_num_regs): Define.
11516 (m68k_regmap): Renamed from regmap, made static.
11517 (m68k_cannot_fetch_register): Renamed from cannot_fetch_register,
11518 made static.
11519 (m68k_cannot_store_register): Renamed from cannot_store_register,
11520 made static.
11521 (the_low_target): New.
11522 * linux-mips-low.c (num_regs): Remove.
11523 (mips_num_regs): Define.
11524 (mips_regmap): Renamed from regmap, made static.
11525 (mips_cannot_fetch_register): Renamed from cannot_fetch_register,
11526 made static.
11527 (mips_cannot_store_register): Renamed from cannot_store_register,
11528 made static.
11529 (the_low_target): New.
11530 * linux-ppc-low.c (num_regs): Remove.
11531 (ppc_num_regs): Define.
11532 (ppc_regmap): Renamed from regmap, made static.
11533 (ppc_cannot_fetch_register): Renamed from cannot_fetch_register,
11534 made static.
11535 (ppc_cannot_store_register): Renamed from cannot_store_register,
11536 made static.
11537 (the_low_target): New.
11538 * linux-s390-low.c (num_regs): Remove.
11539 (s390_num_regs): Define.
11540 (s390_regmap): Renamed from regmap, made static.
11541 (s390_cannot_fetch_register): Renamed from cannot_fetch_register,
11542 made static.
11543 (s390_cannot_store_register): Renamed from cannot_store_register,
11544 made static.
11545 (the_low_target): New.
11546 * linux-sh-low.c (num_regs): Remove.
11547 (sh_num_regs): Define.
11548 (sh_regmap): Renamed from regmap, made static.
11549 (sh_cannot_fetch_register): Renamed from cannot_fetch_register,
11550 made static.
11551 (sh_cannot_store_register): Renamed from cannot_store_register,
11552 made static.
11553 (the_low_target): New.
11554 * linux-x86-64-low.c (x86_64_regmap): Renamed from regmap.
11555 (the_low_target): New.
11556
115572002-04-09 Daniel Jacobowitz <drow@mvista.com>
11558
11559 * Makefile.in: Add stamp-h target.
11560 * configure.in: Create stamp-h.
11561 * configure: Regenerated.
11562
115632002-04-09 Daniel Jacobowitz <drow@mvista.com>
11564
11565 * inferiors.c: New file.
11566 * target.c: New file.
11567 * target.h: New file.
11568 * Makefile.in: Add target.o and inferiors.o. Update
11569 dependencies.
11570 * linux-low.c (inferior_pid): New static variable,
11571 moved from server.c.
11572 (linux_create_inferior): Renamed from create_inferior.
11573 Call add_inferior. Return 0 on success instead of a PID.
11574 (linux_attach): Renamed from myattach.
11575 (linux_kill): Renamed from kill_inferior. Call clear_inferiors ().
11576 (linux_thread_alive): Renamed from mythread_alive.
11577 (linux_wait): Renamed from mywait. Call clear_inferiors () if the
11578 child dies.
11579 (linux_resume): Renamed from myresume. Add missing ``return 0''.
11580 (regsets_store_inferior_registers): Correct error message.
11581 Add missing ``return 0''.
11582 (linux_fetch_registers): Renamed from fetch_inferior_registers.
11583 (linux_store_registers): Renamed from store_inferior_registers.
11584 (linux_read_memory): Renamed from read_inferior_memory.
11585 (linux_write_memory): Renamed from write_inferior_memory.
11586 (linux_target_ops): New structure.
11587 (initialize_low): Call set_target_ops ().
11588 * remote-utils.c (unhexify): New function.
11589 (hexify): New function.
11590 (input_interrupt): Send signals to ``signal_pid''.
11591 * server.c (inferior_pid): Remove.
11592 (start_inferior): Update create_inferior call.
11593 (attach_inferior): Call add_inferior.
11594 (handle_query): New function.
11595 (main): Call handle_query for `q' packets.
11596 * server.h: Include "target.h". Remove obsolete prototypes.
11597 Add prototypes for "inferiors.c", "target.c", hexify, and unhexify.
11598
115992002-04-09 Daniel Jacobowitz <drow@mvista.com>
11600
11601 * Makefile.in: Add WARN_CFLAGS. Update configury
11602 dependencies.
11603 * configure.in: Check for <string.h>
11604 * configure: Regenerate.
11605 * config.in: Regenerate.
11606 * gdbreplay.c: Include needed system headers.
11607 (remote_open): Remove strchr prototype.
11608 * linux-low.h: Correct #ifdef to HAVE_LINUX_USRREGS.
11609 * regcache.c (supply_register): Change buf argument to const void *.
11610 (supply_register_by_name): Likewise.
11611 (collect_register): Change buf argument to void *.
11612 (collect_register_by_name): Likewise.
11613 * regcache.h: Add missing prototypes.
11614 * remote-utils.c: Include <arpa/inet.h> for inet_ntoa.
11615 * server.c (handle_query): New function.
11616 (attached): New static variable, moved out of main.
11617 (main): Quiet longjmp clobber warnings.
11618 * server.h: Add ATTR_NORETURN and ATTR_FORMAT. Update prototypes.
11619 * utils.c (error): Remove NORETURN.
11620 (fatal): Likewise.