]> git.ipfire.org Git - thirdparty/binutils-gdb.git/blame - gdb/gdbserver/ChangeLog
Get and set PC correctly on aarch64 in multi-arch
[thirdparty/binutils-gdb.git] / gdb / gdbserver / ChangeLog
CommitLineData
8a7e4587
YQ
12015-08-04 Yao Qi <yao.qi@linaro.org>
2
3 * linux-aarch64-low.c (aarch64_get_pc): Get PC register on
4 both aarch64 and aarch32.
5 (aarch64_set_pc): Likewise.
6
3b53ae99
YQ
72015-08-04 Yao Qi <yao.qi@linaro.org>
8
9 * configure.srv (case aarch64*-*-linux*): Append arm-with-neon.o
10 to srv_regobj and append arm-core.xml arm-vfpv3.xml and
11 arm-with-neon.xml to srv_xmlfiles.
12 * linux-aarch64-low.c: Include linux-aarch32-low.h.
13 (is_64bit_tdesc): New function.
14 (aarch64_linux_read_description): New function.
15 (aarch64_arch_setup): Call aarch64_linux_read_description.
16 (regs_info): Rename to regs_info_aarch64.
17 (aarch64_regs_info): Return right regs_info.
18 (initialize_low_arch): Call initialize_low_arch_aarch32.
19
bd9e6534
YQ
202015-08-04 Yao Qi <yao.qi@linaro.org>
21
22 * configure.srv (srv_tgtobj): Add linux-aarch32-low.o.
23 * linux-aarch32-low.c: New file.
24 * linux-aarch32-low.h: New file.
25 * linux-arm-low.c (arm_fill_gregset): Move it to
26 linux-aarch32-low.c.
27 (arm_store_gregset): Likewise.
28 (arm_fill_vfpregset): Call arm_fill_vfpregset_num
29 (arm_store_vfpregset): Call arm_store_vfpregset_num.
30 (arm_arch_setup): Check if PTRACE_GETREGSET works.
31 (regs_info): Rename to regs_info_arm.
32 (arm_regs_info): Return regs_info_aarch32 if
33 have_ptrace_getregset is 1 and target description is
34 arm_with_neon or arm_with_vfpv3.
35 (initialize_low_arch): Don't call init_registers_arm_with_neon.
36 Call initialize_low_arch_aarch32 instead.
37
ded48a5e
YQ
382015-08-04 Yao Qi <yao.qi@linaro.org>
39
40 * linux-x86-low.c (have_ptrace_getregset): Move it to ...
41 * linux-low.c: ... here.
42 * linux-low.h (have_ptrace_getregset): Declare it.
43
96e9210f
PA
442015-08-04 Pedro Alves <palves@redhat.com>
45
46 * thread-db.c (struct thread_db): Use new typedefs.
47 (try_thread_db_load_1): Define local TDB_DLSYM macro and use it in
48 CHK calls.
49 (disable_thread_event_reporting): Cast result of dlsym to
50 destination function pointer type.
51 (thread_db_mourn): Use td_ta_delete_ftype.
52
af60a1ef
SL
532015-08-03 Sandra Loosemore <sandra@codesourcery.com>
54
55 * linux-nios2-low.c (NIOS2_BREAKPOINT): Conditionalize for
56 arch variant.
57 (CDX_BREAKPOINT): Define for R2.
58 (nios2_breakpoint_at): Check for CDX_BREAKPOINT when R2.
59 (the_low_target): Add comments.
60
e8b41681
YQ
612015-07-30 Yao Qi <yao.qi@linaro.org>
62
63 * linux-arm-low.c (arm_hwcap): Remove it.
64 (arm_read_description): New local variable arm_hwcap. Don't
65 set arm_hwcap to zero.
66
89abb039
YQ
672015-07-30 Yao Qi <yao.qi@linaro.org>
68
69 * linux-arm-low.c (arm_fill_wmmxregset): Don't use arm_hwcap.
70 Use regcache->tdesc instead.
71 (arm_store_wmmxregset): Likewise.
72 (arm_fill_vfpregset): Likewise.
73 (arm_store_vfpregset): Likewise.
74
deca266c
YQ
752015-07-30 Yao Qi <yao.qi@linaro.org>
76
77 * linux-arm-low.c: Include arch/arm.h.
78 (arm_fill_gregset): Don't use arm_num_regs and arm_regmap.
79 (arm_store_gregset): Likewise.
80
aa58a496
SM
812015-07-29 Simon Marchi <simon.marchi@ericsson.com>
82
83 * linux-mips-low.c (mips_linux_prepare_to_resume): Add NULL as
84 ptrace's 4th parameter.
85
50904b25
YQ
862015-07-27 Yao Qi <yao.qi@linaro.org>
87
88 * configure.srv (case aarch64*-*-linux*): Don't set
89 srv_linux_usrregs.
90
5826e159
PA
912015-07-24 Pedro Alves <palves@redhat.c: Likewise.om>
92
93 * linux-aarch64-low.c: Include nat/gdb_ptrace.h instead of
94 sys/ptrace.h.
95 * linux-arm-low.c: Likewise.
96 * linux-cris-low.c: Likewise.
97 * linux-crisv32-low.c: Likewise.
98 * linux-low.c: Likewise.
99 * linux-m68k-low.c: Likewise.
100 * linux-mips-low.c: Likewise.
101 * linux-nios2-low.c: Likewise.
102 * linux-s390-low.c: Likewise.
103 * linux-sparc-low.c: Likewise.
104 * linux-tic6x-low.c: Likewise.
105 * linux-tile-low.c: Likewise.
106 * linux-x86-low.c: Likewise.
107
54019719
PA
1082015-07-24 Pedro Alves <palves@redhat.com>
109
110 * config.in: Regenerate.
111 * configure: Regenerate.
112
eb7aa561
PA
1132015-07-24 Pedro Alves <palves@redhat.com>
114
115 * acinclude.m4: Include ../ptrace.m4.
116 * configure.ac: Call GDB_AC_PTRACE.
117 * config.in, configure: Regenerate.
118
55d7b841
YQ
1192015-07-24 Yao Qi <yao.qi@linaro.org>
120
121 * linux-low.c (linux_create_inferior): Remove setting to
122 proc->priv->new_inferior.
123 (linux_attach): Likewise.
124 (linux_low_filter_event): Likewise.
125 * linux-low.h (struct process_info_private) <new_inferior>: Remove.
126
c06cbd92
YQ
1272015-07-24 Yao Qi <yao.qi@linaro.org>
128
129 * linux-low.c (linux_arch_setup): New function.
130 (linux_low_filter_event): If proc->tdesc is NULL and
131 proc->attached is true, call the_low_target.arch_setup.
132 Otherwise, keep status pending, and return.
133 (linux_resume_one_lwp_throw): Don't call get_pc if
134 thread->while_stepping isn't NULL. Don't call
135 get_thread_regcache if proc->tdesc is NULL.
136 (need_step_over_p): Return 0 if proc->tdesc is NULL.
137 (linux_target_ops): Install arch_setup.
138 * server.c (start_inferior): Call the_target->arch_setup.
139 * target.h (struct target_ops) <arch_setup>: New field.
140 (target_arch_setup): New marco.
141 * lynx-low.c (lynx_target_ops): Update.
142 * nto-low.c (nto_target_ops): Update.
143 * spu-low.c (spu_target_ops): Update.
144 * win32-low.c (win32_target_ops): Update.
145
5ae3ebba
YQ
1462015-07-24 Yao Qi <yao.qi@linaro.org>
147
148 * linux-low.c (linux_add_process): Don't set
149 proc->priv->new_inferior.
150 (linux_create_inferior): Set proc->priv->new_inferior to 1.
151 (linux_attach): Likewise.
152
eb97750b
YQ
1532015-07-24 Yao Qi <yao.qi@linaro.org>
154
155 * server.c (start_inferior): Code refactor.
156
51aee833
YQ
1572015-07-24 Yao Qi <yao.qi@linaro.org>
158
159 * server.c (process_serial_event): Set general_thread.
160
af1b22f3
YQ
1612015-07-21 Yao Qi <yao.qi@linaro.org>
162
163 * linux-aarch64-low.c (aarch64_arch_setup): Remove code and call
164 aarch64_linux_get_debug_reg_capacity.
165
554717a3
YQ
1662015-07-17 Yao Qi <yao.qi@linaro.org>
167
168 * Makefile.in (aarch64-linux-hw-point.o): New rule.
169 * configure.srv (srv_tgtobj): Append aarch64-linux-hw-point.o.
170 * linux-aarch64-low.c: Include nat/aarch64-linux-hw-point.h.
171 (AARCH64_HBP_MAX_NUM): Move to nat/aarch64-linux-hw-point.h.
172 (AARCH64_HWP_MAX_NUM, AARCH64_HBP_ALIGNMENT): Likewise.
173 (AARCH64_HWP_ALIGNMENT): Likewise.
174 (AARCH64_HWP_MAX_LEN_PER_REG): Likewise.
175 (AARCH64_DEBUG_NUM_SLOTS, AARCH64_DEBUG_ARCH): Likewise.
176 (aarch64_num_bp_regs, aarch64_num_wp_regs): Likewise.
177 (AARCH64_DEBUG_ARCH_V8, DR_MARK_ALL_CHANGED): Likewise.
178 (DR_MARK_N_CHANGED, DR_CLEAR_CHANGED): Likewise.
179 (DR_HAS_CHANGED, DR_N_HAS_CHANGE): Likewise.
180 (struct aarch64_debug_reg_state): Likewise.
181 (struct arch_lwp_info): Likewise.
182 (aarch64_align_watchpoint): Likewise.
183 (DR_CONTROL_ENABLED, DR_CONTROL_LENGTH): Likewise.
184 (aarch64_watchpoint_length): Likewise.
185 (aarch64_point_encode_ctrl_reg): Likewise
186 (aarch64_point_is_aligned): Likewise.
187 (aarch64_align_watchpoint): Likewise.
188 (aarch64_linux_set_debug_regs):
189 (aarch64_dr_state_insert_one_point): Likewise.
190 (aarch64_dr_state_remove_one_point): Likewise.
191 (aarch64_handle_breakpoint): Likewise.
192 (aarch64_handle_aligned_watchpoint): Likewise.
193 (aarch64_handle_unaligned_watchpoint): Likewise.
194 (aarch64_handle_watchpoint): Likewise.
195
c67ca4de
YQ
1962015-07-17 Yao Qi <yao.qi@linaro.org>
197
198 * linux-aarch64-low.c (aarch64_handle_breakpoint): Add argument state
199 and don't aarch64_get_debug_reg_state. All callers update.
200 (aarch64_handle_aligned_watchpoint): Likewise.
201 (aarch64_handle_unaligned_watchpoint): Likewise.
202 (aarch64_handle_watchpoint): Likewise.
203 (aarch64_insert_point): Call aarch64_get_debug_reg_state earlier.
204 (aarch64_remove_point): Likewise.
205
25abf979
YQ
2062015-07-17 Yao Qi <yao.qi@linaro.org>
207
208 * linux-aarch64-low.c (aarch64_show_debug_reg_state): Use
209 debug_printf.
210 (aarch64_handle_unaligned_watchpoint): Likewise.
211
db1ff28b
JK
2122015-07-15 Jan Kratochvil <jan.kratochvil@redhat.com>
213
214 Revert the previous 3 commits:
215 Move gdb_regex* to common/
216 Move linux_find_memory_regions_full & co.
217 gdbserver build-id attribute generator
218
700ca40f
JK
2192015-07-15 Aleksandar Ristovski <aristovski@qnx.com
220 Jan Kratochvil <jan.kratochvil@redhat.com>
221
222 gdbserver build-id attribute generator.
223 * linux-low.c (nat/linux-maps.h, search.h, rsp-low.h): Include.
224 (ElfXX_Ehdr, ElfXX_Phdr, ElfXX_Nhdr): New.
225 (ELFXX_FLD, ELFXX_SIZEOF, ELFXX_ROUNDUP, BUILD_ID_INVALID): New.
226 (find_phdr): New.
227 (get_dynamic): Use find_pdhr to traverse program headers.
228 (struct mapping_entry, mapping_entry_s, free_mapping_entry_vec)
229 (compare_mapping_entry_range, struct find_memory_region_callback_data)
230 (read_build_id, find_memory_region_callback, lrfind_mapping_entry)
231 (get_hex_build_id): New.
232 (linux_qxfer_libraries_svr4): Add optional build-id attribute
233 to reply XML document.
234
9904185c
JK
2352015-07-15 Aleksandar Ristovski <aristovski@qnx.com
236 Jan Kratochvil <jan.kratochvil@redhat.com>
237
238 * target.c: Include target/target-utils.h and fcntl.h.
239 (target_fileio_read_stralloc_1_pread, target_fileio_read_stralloc_1)
240 (target_fileio_read_stralloc): New functions.
241
6e5b4429
JK
2422015-07-15 Jan Kratochvil <jan.kratochvil@redhat.com>
243
244 * Makefile.in (OBS): Add gdb_regex.o.
245 (gdb_regex.o): New.
246 * config.in: Rebuilt.
247 * configure: Rebuilt.
248
ddc98fbf
JK
2492015-07-15 Aleksandar Ristovski <aristovski@qnx.com
250 Jan Kratochvil <jan.kratochvil@redhat.com>
251
252 Create empty nat/linux-maps.[ch] and common/target-utils.[ch].
253 * Makefile.in (OBS): Add target-utils.o.
254 (linux-maps.o, target-utils.o): New.
255 * configure.srv (srv_linux_obj): Add linux-maps.o.
256
e57bb7a0
PL
2572015-07-15 Pierre Langlois <pierre.langlois@arm.com>
258
259 * linux-aarch64-low.c (aarch64_supports_range_stepping): New
260 function, return 1.
261 (the_low_target): Install it.
262
586b02a9
PA
2632015-07-14 Pedro Alves <palves@redhat.com>
264
265 * linux-low.c (kill_wait_lwp): Don't assert if waitpid fails.
266 Instead, ignore ECHILD, and throw an error for other errnos.
267
58c1b36c
PA
2682015-07-10 Pedro Alves <palves@redhat.com>
269
270 * event-loop.c (struct callback_event) <data>: Change type to
271 gdb_client_data instance instead of gdb_client_data pointer.
272 (append_callback_event): Adjust.
273
421530db
PL
2742015-07-10 Pierre Langlois <pierre.langlois@arm.com>
275
276 * linux-aarch64-low.c: Add comments for each linux_target_ops
277 method. Remove comments already covered in target_ops and
278 linux_target_ops definitions.
279 (the_low_target): Add comments for each unimplemented method.
280
c2d65f38
YQ
2812015-07-09 Yao Qi <yao.qi@linaro.org>
282
283 * linux-aarch64-low.c (aarch64_regmap): Remove.
284 (aarch64_usrregs_info): Remove.
285 (regs_info): Set field usrregs to NULL.
286
b20a6524
MM
2872015-07-02 Markus Metzger <markus.t.metzger@intel.com>
288
289 * linux-low.c: Include "rsp-low.h"
290 (linux_low_encode_pt_config, linux_low_encode_raw): New.
291 (linux_low_read_btrace): Support BTRACE_FORMAT_PT.
292 (linux_low_btrace_conf): Support BTRACE_FORMAT_PT.
293 (handle_btrace_enable_pt): New.
294 (handle_btrace_general_set): Support "pt".
295 (handle_btrace_conf_general_set): Support "pt:size".
296
96c97461
PL
2972015-06-29 Pierre Langlois <pierre.langlois@arm.com>
298
299 * linux-aarch64-low.c (aarch64_supports_z_point_type): Enable for
300 Z_PACKET_SW_BP.
301
37d66942
PL
3022015-06-29 Pierre Langlois <pierre.langlois@arm.com>
303
304 * linux-aarch64-low.c: Remove comment about endianness.
305 (aarch64_breakpoint): Change type to gdb_byte[]. Set to "brk #0".
306 (aarch64_breakpoint_at): Change type of insn to gdb_byte[]. Use
307 memcmp.
308
dc06243f
GB
3092015-06-24 Gary Benson <gbenson@redhat.com>
310
311 * linux-i386-ipa.c (stdint.h): Do not include.
312 * lynx-i386-low.c (stdint.h): Likewise.
313 * lynx-ppc-low.c (stdint.h): Likewise.
314 * mem-break.c (stdint.h): Likewise.
315 * thread-db.c (stdint.h): Likewise.
316 * tracepoint.c (stdint.h): Likewise.
317 * win32-low.c (stdint.h): Likewise.
318
124e13d9
SM
3192015-06-18 Simon Marchi <simon.marchi@ericsson.com>
320
321 * server.c (write_qxfer_response): Update call to
322 remote_escape_output.
323
909c2cda
JK
3242015-06-15 Aleksandar Ristovski <aristovski@qnx.com
325 Jan Kratochvil <jan.kratochvil@redhat.com>
326
327 Merge multiple hex conversions.
328 * gdbreplay.c (tohex): Rename to 'fromhex'.
329 (logchar): Use fromhex.
330
24c05f46
JK
3312015-06-10 Jan Kratochvil <jan.kratochvil@redhat.com>
332
333 * server.c (handle_qxfer_libraries): Set `version' attribute for
334 <library-list>.
335
14d2069a
GB
3362015-06-10 Gary Benson <gbenson@redhat.com>
337
338 * target.h (struct target_ops) <multifs_open>: New field.
339 <multifs_unlink>: Likewise.
340 <multifs_readlink>: Likewise.
341 * linux-low.c (nat/linux-namespaces.h): New include.
342 (linux_target_ops): Initialize the_target->multifs_open,
343 the_target->multifs_unlink and the_target->multifs_readlink.
344 * hostio.h (hostio_handle_new_gdb_connection): New declaration.
345 * hostio.c (hostio_fs_pid): New static variable.
346 (hostio_handle_new_gdb_connection): New function.
347 (handle_setfs): Likewise.
348 (handle_open): Use the_target->multifs_open as appropriate.
349 (handle_unlink): Use the_target->multifs_unlink as appropriate.
350 (handle_readlink): Use the_target->multifs_readlink as
351 appropriate.
352 (handle_vFile): Handle vFile:setfs packets.
353 * server.c (handle_query): Call hostio_handle_new_gdb_connection
354 after target_handle_new_gdb_connection.
355
4b8b5e72
GB
3562015-06-10 Gary Benson <gbenson@redhat.com>
357
358 * configure.ac (AC_CHECK_FUNCS): Add setns.
359 * config.in: Regenerate.
360 * configure: Likewise.
361 * Makefile.in (SFILES): Add nat/linux-namespaces.c.
362 (linux-namespaces.o): New rule.
363 * configure.srv (srv_linux_obj): Add linux-namespaces.o.
364
3ac2e371
GB
3652015-06-09 Gary Benson <gbenson@redhat.com>
366
367 * hostio.c (handle_open): Process mode argument with
368 fileio_to_host_mode.
369
ca9b78ce
YQ
3702015-06-01 Yao Qi <yao.qi@linaro.org>
371
372 * linux-s390-low.c (PTRACE_GETREGSET, PTRACE_SETREGSET): Remove.
373 * linux-x86-low.c: Likewise.
374
bfacd19d
DB
3752015-05-28 Don Breazeal <donb@codesourcery.com>
376
377 * linux-low.c (handle_extended_wait): Initialize
378 thread_info.last_resume_kind for new fork children.
379
452003ef
PA
3802015-05-15 Pedro Alves <palves@redhat.com>
381
382 * target.h (target_handle_new_gdb_connection): Rewrite using if
383 wrapped in do/while.
384
1041a03c
JB
3852015-05-14 Joel Brobecker <brobecker@adacore.com>
386
387 * configure.ac: Add prfpregset_t BFD_HAVE_SYS_PROCFS_TYPE check.
388 * configure, config.in: Regenerate.
389 * gdb_proc_service.h [HAVE_PRFPREGSET_T] (prfpregset_t):
390 Declare typedef.
391
c269dbdb
DB
3922015-05-12 Don Breazeal <donb@codesourcery.com>
393
394 * linux-low.c (handle_extended_wait): Handle PTRACE_EVENT_FORK and
395 PTRACE_EVENT_VFORK_DONE.
396 (linux_low_ptrace_options, extended_event_reported): Add vfork
397 events.
398 * remote-utils.c (prepare_resume_reply): New stop reasons "vfork"
399 and "vforkdone" for RSP 'T' Stop Reply Packet.
400 * server.h (report_vfork_events): Declare
401 global variable.
402
3a8a0396
DB
4032015-05-12 Don Breazeal <donb@codesourcery.com>
404
405 * linux-aarch64-low.c (aarch64_linux_new_fork): New function.
406 (the_low_target) <new_fork>: Initialize new member.
407 * linux-arm-low.c (arm_new_fork): New function.
408 (the_low_target) <new_fork>: Initialize new member.
409 * linux-low.c (handle_extended_wait): Call new target function
410 new_fork.
411 * linux-low.h (struct linux_target_ops) <new_fork>: New member.
412 * linux-mips-low.c (mips_add_watchpoint): New function
413 extracted from mips_insert_point.
414 (the_low_target) <new_fork>: Initialize new member.
415 (mips_linux_new_fork): New function.
416 (mips_insert_point): Call mips_add_watchpoint.
417 * linux-x86-low.c (x86_linux_new_fork): New function.
418 (the_low_target) <new_fork>: Initialize new member.
419
de0d863e
DB
4202015-05-12 Don Breazeal <donb@codesourcery.com>
421
422 * linux-low.c (handle_extended_wait): Implement return value,
423 rename argument 'event_child' to 'event_lwp', handle
424 PTRACE_EVENT_FORK, call internal_error for unrecognized event.
425 (linux_low_ptrace_options): New function.
426 (linux_low_filter_event): Call linux_low_ptrace_options,
427 use different argument fo linux_enable_event_reporting,
428 use return value from handle_extended_wait.
429 (extended_event_reported): New function.
430 (linux_wait_1): Call extended_event_reported and set
431 status to report fork events.
432 (linux_write_memory): Add pid to debug message.
433 (reset_lwp_ptrace_options_callback): New function.
434 (linux_handle_new_gdb_connection): New function.
435 (linux_target_ops): Initialize new structure member.
436 * linux-low.h (struct lwp_info) <waitstatus>: New member.
437 * lynx-low.c: Initialize new structure member.
438 * remote-utils.c (prepare_resume_reply): Implement stop reason
439 "fork" for "T" stop message.
440 * server.c (handle_query): Call handle_new_gdb_connection.
441 * server.h (report_fork_events): Declare global flag.
442 * target.h (struct target_ops) <handle_new_gdb_connection>:
443 New member.
444 (target_handle_new_gdb_connection): New macro.
445 * win32-low.c: Initialize new structure member.
446
ddcbc397
DB
4472015-05-12 Don Breazeal <donb@codesourcery.com>
448
449 * mem-break.c (APPEND_TO_LIST): Define macro.
450 (clone_agent_expr): New function.
451 (clone_one_breakpoint): New function.
452 (clone_all_breakpoints): New function.
453 * mem-break.h: Declare new functions.
454
89245bc0
DB
4552015-05-12 Don Breazeal <donb@codesourcery.com>
456
457 * linux-low.c (linux_supports_fork_events): New function.
458 (linux_supports_vfork_events): New function.
459 (linux_target_ops): Initialize new structure members.
460 (initialize_low): Call linux_check_ptrace_features.
461 * lynx-low.c (lynx_target_ops): Initialize new structure
462 members.
463 * server.c (report_fork_events, report_vfork_events):
464 New global flags.
465 (handle_query): Add new features to qSupported packet and
466 response.
467 (captured_main): Initialize new global variables.
468 * target.h (struct target_ops) <supports_fork_events>:
469 New member.
470 <supports_vfork_events>: New member.
471 (target_supports_fork_events): New macro.
472 (target_supports_vfork_events): New macro.
473 * win32-low.c (win32_target_ops): Initialize new structure
474 members.
475
835205d0
GB
4762015-05-12 Gary Benson <gbenson@redhat.com>
477
478 * server.c (handle_qxfer_exec_file): Use current process
479 if annex is empty.
480
21e94bd9
SL
4812015-05-08 Sandra Loosemore <sandra@codesourcery.com>
482
483 * linux-nios2-low.c: Include elf/common.h. Adjust comments.
484 Remove HAVE_PTRACE_GETREGS conditionals.
485 (nios2_regsets): Use PTRACE_GETREGSET and PTRACE_SETREGSET
486 instead of PTRACE_GETREGS and PTRACE_SETREGS.
487
45614f15
YQ
4882015-05-08 Yao Qi <yao.qi@linaro.org>
489
490 * linux-low.c (linux_supports_conditional_breakpoints): New
491 function.
492 (linux_target_ops): Install new target method.
493 * lynx-low.c (lynx_target_ops): Install NULL hook for
494 supports_conditional_breakpoints.
495 * nto-low.c (nto_target_ops): Likewise.
496 * spu-low.c (spu_target_ops): Likewise.
497 * win32-low.c (win32_target_ops): Likewise.
498 * server.c (handle_query): Check
499 target_supports_conditional_breakpoints.
500 * target.h (struct target_ops) <supports_conditional_breakpoints>:
501 New field.
502 (target_supports_conditional_breakpoints): New macro.
503
80ad801e
PA
5042015-05-06 Pedro Alves <palves@redhat.com>
505
506 PR server/18081
507 * server.c (start_inferior): If the process exits, mourn it.
508
819843c7
GB
5092015-04-21 Gary Benson <gbenson@redhat.com>
510
511 * hostio.c (fileio_open_flags_to_host): Factored out to
512 fileio_to_host_openflags in common/fileio.c. Single use
513 updated.
514
a2d5a9d7
MF
5152015-04-17 Max Filippov <jcmvbkbc@gmail.com>
516
517 * linux-xtensa-low.c (xtensa_fill_gregset)
518 (xtensa_store_gregset): Check XCHAL_HAVE_LOOPS instead of
519 XCHAL_HAVE_LOOP.
520
deb44829
MF
5212015-04-17 Max Filippov <jcmvbkbc@gmail.com>
522
523 * linux-xtensa-low.c (xtensa_usrregs_info): Remove.
524 (regs_info): Replace usrregs pointer with NULL.
525
e57f1de3
GB
5262015-04-17 Gary Benson <gbenson@redhat.com>
527
528 * target.h (struct target_ops) <pid_to_exec_file>: New field.
529 * linux-low.c (linux_target_ops): Initialize pid_to_exec_file.
530 * server.c (handle_qxfer_exec_file): New function.
531 (qxfer_packets): Add exec-file entry.
532 (handle_query): Report qXfer:exec-file:read as supported packet.
533
62828379
RN
5342015-04-14 Romain Naour <romain.naour@openwide.fr> (tiny change)
535
536 * linux-low.c (linux_read_offsets): Remove get_thread_lwp.
537
b88bb450
GB
5382015-04-09 Gary Benson <gbenson@redhat.com>
539
540 * hostio-errno.c (errno_to_fileio_error): Remove function.
541 Update caller to use remote_fileio_to_fio_error.
542
c8f4bfdd
YQ
5432015-04-09 Yao Qi <yao.qi@linaro.org>
544
545 * linux-low.c (linux_insert_point): Call
546 insert_memory_breakpoint if TYPE is raw_bkpt_type_sw.
547 (linux_remove_point): Call remove_memory_breakpoint if type is
548 raw_bkpt_type_sw.
549 * linux-x86-low.c (x86_insert_point): Don't call
550 insert_memory_breakpoint.
551 (x86_remove_point): Don't call remove_memory_breakpoint.
552
41f98f02
PA
5532015-04-01 Pedro Alves <palves@redhat.com>
554 Cleber Rosa <crosa@redhat.com>
555
556 * server.c (gdbserver_usage): Reorganize and extend the usage
557 message.
558
2bf6fb9d
PA
5592015-03-24 Pedro Alves <palves@redhat.com>
560
561 * linux-low.c (check_stopped_by_breakpoint): Tweak debug log
562 output. Also dump TRAP_TRACE.
563 (linux_low_filter_event): In debug output, distinguish a
564 resume_stop SIGSTOP from a delayed SIGSTOP.
565
369f6daa
GB
5662015-03-24 Gary Benson <gbenson@redhat.com>
567
568 * linux-x86-low.c (x86_linux_new_thread): Moved to
569 nat/x86-linux.c.
570 (x86_linux_prepare_to_resume): Likewise.
571
8e5d4070
GB
5722015-03-24 Gary Benson <gbenson@redhat.com>
573
574 * Makefile.in (x86-linux-dregs.o): New rule.
575 * configure.srv: Add x86-linux-dregs.o to relevant targets.
576 * linux-x86-low.c: Include nat/x86-linux-dregs.h.
577 (u_debugreg_offset): Moved to nat/x86-linux-dregs.c.
578 (x86_linux_dr_get): Likewise.
579 (x86_linux_dr_set): Likewise.
580 (update_debug_registers_callback): Likewise.
581 (x86_linux_dr_set_addr): Likewise.
582 (x86_linux_dr_get_addr): Likewise.
583 (x86_linux_dr_set_control): Likewise.
584 (x86_linux_dr_get_control): Likewise.
585 (x86_linux_dr_get_status): Likewise.
586 (x86_linux_update_debug_registers): Likewise.
587
2b95d440
GB
5882015-03-24 Gary Benson <gbenson@redhat.com>
589
590 * linux-x86-low.c (x86_linux_update_debug_registers):
591 New function, factored out from...
592 (x86_linux_prepare_to_resume): ...this.
593
14b0bc68
GB
5942015-03-24 Gary Benson <gbenson@redhat.com>
595
596 * linux-x86-low.c (x86_linux_dr_get): Update comments.
597 (x86_linux_dr_set): Likewise.
598 (update_debug_registers_callback): Likewise.
599 (x86_linux_dr_set_addr): Likewise.
600 (x86_linux_dr_get_addr): Likewise.
601 (x86_linux_dr_set_control): Likewise.
602 (x86_linux_dr_get_control): Likewise.
603 (x86_linux_dr_get_status): Likewise.
604 (x86_linux_prepare_to_resume): Likewise.
605
5dfe6ca8
GB
6062015-03-24 Gary Benson <gbenson@redhat.com>
607
608 * linux-x86-low.c (x86_linux_dr_get): Add assertion.
609 Use perror_with_name. Pass string through gettext.
610 (x86_linux_dr_set): Likewise.
611
d33472ad
GB
6122015-03-24 Gary Benson <gbenson@redhat.com>
613
614 * linux-x86-low.c (x86_dr_low_set_addr): Rename to...
615 (x86_linux_dr_set_addr): ...this.
616 (x86_dr_low_get_addr): Rename to...
617 (x86_linux_dr_get_addr): ...this.
618 (x86_dr_low_set_control): Rename to...
619 (x86_linux_dr_set_control): ...this.
620 (x86_dr_low_get_control): Rename to...
621 (x86_linux_dr_get_control): ...this.
622 (x86_dr_low_get_status): Rename to...
623 (x86_linux_dr_get_status): ...this.
624 (x86_dr_low): Update with new function names.
625
4b134ca1
GB
6262015-03-24 Gary Benson <gbenson@redhat.com>
627
628 * Makefile.in (x86-linux.o): New rule.
629 * configure.srv: Add x86-linux.o to relevant targets.
630 * linux-low.c (lwp_set_arch_private_info): New function.
631 (lwp_arch_private_info): Likewise.
632 * linux-x86-low.c: Include nat/x86-linux.h.
633 (arch_lwp_info): Removed structure.
634 (update_debug_registers_callback):
635 Use lwp_set_debug_registers_changed.
636 (x86_linux_prepare_to_resume): Use lwp_debug_registers_changed
637 and lwp_set_debug_registers_changed.
638 (x86_linux_new_thread): Use lwp_set_debug_registers_changed.
639
34c703da
GB
6402015-03-24 Gary Benson <gbenson@redhat.com>
641
642 * linux-low.h (linux_target_ops) <new_thread>: Changed signature.
643 * linux-arm-low.c (arm_new_thread): Likewise.
644 * linux-aarch64-low.c (aarch64_linux_new_thread): Likewise.
645 * linux-mips-low.c (mips_linux_new_thread): Likewise.
646 * linux-x86-low.c (x86_linux_new_thread): Likewise.
647 * linux-low.c (add_lwp): Update the_low_target.new_thread call.
648
cff068da
GB
6492015-03-24 Gary Benson <gbenson@redhat.com>
650
651 * linux-low.c (ptid_of_lwp): New function.
652 (lwp_is_stopped): Likewise.
653 (lwp_stop_reason): Likewise.
654 * linux-x86-low.c (update_debug_registers_callback):
655 Use lwp_is_stopped.
656 (x86_linux_prepare_to_resume): Use ptid_of_lwp and
657 lwp_stop_reason.
658
b2f7c7e8
GB
6592015-03-24 Gary Benson <gbenson@redhat.com>
660
661 * linux-low.h (linux_stop_lwp): Remove declaration.
662
6d4ee8c6
GB
6632015-03-24 Gary Benson <gbenson@redhat.com>
664
665 * linux-low.h: Include nat/linux-nat.h.
666 * linux-low.c (iterate_over_lwps_args): New structure.
667 (iterate_over_lwps_filter): New function.
668 (iterate_over_lwps): Likewise.
669 * linux-x86-low.c (update_debug_registers_callback):
670 Update signature to what iterate_over_lwps expects.
671 Remove PID check that iterate_over_lwps now performs.
672 (x86_dr_low_set_addr): Use iterate_over_lwps.
673 (x86_dr_low_set_control): Likewise.
674
70a0bb6b
GB
6752015-03-24 Gary Benson <gbenson@redhat.com>
676
677 * linux-x86-low.c (x86_debug_reg_state): New function.
678 (x86_linux_prepare_to_resume): Use the above.
679
7b669087
GB
6802015-03-24 Gary Benson <gbenson@redhat.com>
681
682 * linux-low.c (current_lwp_ptid): New function.
683 * linux-x86-low.c: Include nat/linux-nat.h.
684 (x86_dr_low_get_addr): Use current_lwp_ptid.
685 (x86_dr_low_get_control): Likewise.
686 (x86_dr_low_get_status): Likewise.
687
eef49a3d
PA
6882015-03-20 Pedro Alves <palves@redhat.com>
689
690 * tracepoint.c (cmd_qtstatus): Make "str" const.
691
b2333d22
PA
6922015-03-20 Pedro Alves <palves@redhat.com>
693
694 * server.c (handle_general_set): Make "req_str" const.
695
23f238d3
PA
6962015-03-19 Pedro Alves <palves@redhat.com>
697
698 * linux-low.c (linux_resume_one_lwp): Rename to ...
699 (linux_resume_one_lwp_throw): ... this. Don't handle ESRCH here,
700 instead call perror_with_name.
701 (check_ptrace_stopped_lwp_gone): New function.
702 (linux_resume_one_lwp): Reimplement as wrapper around
703 linux_resume_one_lwp_throw that swallows errors if the LWP is
704 gone.
705
91baf43f
PA
7062015-03-19 Pedro Alves <palves@redhat.com>
707
708 * linux-low.c (count_events_callback, select_event_lwp_callback):
709 No longer check whether the thread has resume_stop as last resume
710 kind.
711
8bf3b159
PA
7122015-03-19 Pedro Alves <palves@redhat.com>
713
714 * linux-low.c (count_events_callback, select_event_lwp_callback):
715 Use the lwp's status_pending_p field, not the thread's.
716
b90fc188
PA
7172015-03-19 Pedro Alves <palves@redhat.com>
718
719 * linux-low.c (select_event_lwp_callback): Update comments to
720 no longer mention SIGTRAP.
721
464b0089
GB
7222015-03-18 Gary Benson <gbenson@redhat.com>
723
724 * server.c (handle_query): Do not report vFile:fstat as supported.
725
aa9e327f
GB
7262015-03-11 Gary Benson <gbenson@redhat.com>
727
728 * hostio.c (sys/types.h): New include.
729 (sys/stat.h): Likewise.
730 (common-remote-fileio.h): Likewise.
731 (handle_fstat): New function.
732 (handle_vFile): Handle vFile:fstat packets.
aa9e327f 733
791c0056
GB
7342015-03-11 Gary Benson <gbenson@redhat.com>
735
736 * configure.ac (AC_CHECK_MEMBERS): Add checks for
737 struct stat.st_blocks and struct stat.st_blksize.
738 * configure: Regenerate.
739 * config.in: Likewise.
740 * Makefile.in (SFILES): Add common/common-remote-fileio.c.
741 (OBS): Add common-remote-fileio.o.
742 (common-remote-fileio.o): New rule.
743
9a9df970
PA
7442015-03-09 Pedro Alves <palves@redhat.com>
745
746 * tracepoint.c (gdb_agent_helper_thread): Cast '&sockaddr' to
747 'struct sockaddr' pointer in 'accept' call.
748
9eb1356e
PA
7492015-03-09 Pedro Alves <palves@redhat.com>
750
751 Revert:
752 2015-03-07 Pedro Alves <palves@redhat.com>
753 * gdbreplay.c: No longer include <netinet/in.h>, <sys/socket.h>,
754 or <winsock2.h> here. Instead include "gdb_socket.h".
755 (remote_open): Use union gdb_sockaddr_u.
756 * remote-utils.c: No longer include <netinet/in.h>, <sys/socket.h>
757 or <winsock2.h> here. Instead include "gdb_socket.h".
758 (handle_accept_event, remote_prepare): Use union gdb_sockaddr_u.
759 * tracepoint.c: Include "gdb_socket.h" instead of <sys/socket.h>
760 or <sys/un.h>.
761 (init_named_socket, gdb_agent_helper_thread): Use union
762 gdb_sockaddr_u.
763
aac331e4
PA
7642015-03-07 Pedro Alves <palves@redhat.com>
765
766 * configure.ac (build_warnings): Move
767 -Wdeclaration-after-statement to the C-specific set.
768 * configure: Regenerate.
769
366c75fc
PA
7702015-03-07 Pedro Alves <palves@redhat.com>
771
772 * gdbreplay.c: No longer include <netinet/in.h>, <sys/socket.h>,
773 or <winsock2.h> here. Instead include "gdb_socket.h".
774 (remote_open): Use union gdb_sockaddr_u.
775 * remote-utils.c: No longer include <netinet/in.h>, <sys/socket.h>
776 or <winsock2.h> here. Instead include "gdb_socket.h".
777 (handle_accept_event, remote_prepare): Use union gdb_sockaddr_u.
778 * tracepoint.c: Include "gdb_socket.h" instead of <sys/socket.h>
779 or <sys/un.h>.
780 (init_named_socket, gdb_agent_helper_thread): Use union
781 gdb_sockaddr_u.
782
492d29ea
PA
7832015-03-07 Pedro Alves <palves@redhat.com>
784
785 Adjust all callers of TRY_CATCH to use TRY/CATCH/END_CATCH
786 instead.
787
60a191ed
YQ
7882015-03-06 Yao Qi <yao.qi@linaro.org>
789
790 * linux-aarch64-low.c (aarch64_insert_point): Use
791 show_debug_regs as a boolean.
792 (aarch64_remove_point): Likewise.
793
f5771b1d
PA
7942015-03-05 Pedro Alves <palves@redhat.com>
795
796 * lynx-low.c (lynx_target_ops): Install NULL hooks for
797 stopped_by_sw_breakpoint, supports_stopped_by_sw_breakpoint,
798 stopped_by_hw_breakpoint, supports_stopped_by_hw_breakpoint.
799 * nto-low.c (nto_target_ops): Likewise.
800 * spu-low.c (spu_target_ops): Likewise.
801 * win32-low.c (win32_target_ops): Likewise.
802
3e572f71
PA
8032015-03-04 Pedro Alves <palves@redhat.com>
804
72f4393d 805 * linux-low.c (check_stopped_by_breakpoint) [USE_SIGTRAP_SIGINFO]:
3e572f71
PA
806 Decide whether a breakpoint triggered based on the SIGTRAP's
807 siginfo.si_code.
72f4393d
L
808 (thread_still_has_status_pending_p) [USE_SIGTRAP_SIGINFO]: Don't check whether a
809 breakpoint is inserted if relying on SIGTRAP's siginfo.si_code.
3e572f71
PA
810 (linux_low_filter_event): Check for breakpoints before checking
811 watchpoints.
812 (linux_wait_1): Don't re-increment the PC if relying on SIGTRAP's
813 siginfo.si_code.
72f4393d
L
814 (linux_stopped_by_sw_breakpoint)
815 (linux_supports_stopped_by_sw_breakpoint)
816 (linux_stopped_by_hw_breakpoint)
817 (linux_supports_stopped_by_hw_breakpoint): New functions.
818 (linux_target_ops): Install new target methods.
3e572f71 819
1ec68e26
PA
8202015-03-04 Pedro Alves <palves@redhat.com>
821
822 * remote-utils.c (prepare_resume_reply): Report swbreak/hbreak.
823 * server.c (swbreak_feature, hwbreak_feature): New globals.
824 (handle_query) <qSupported>: Handle "swbreak+" and "hwbreak+".
825 (captured_main): Clear swbreak_feature and hwbreak_feature.
826 * server.h (swbreak_feature, hwbreak_feature): Declare.
827 * target.h (struct target_ops) <stopped_by_sw_breakpoint,
828 supports_stopped_by_sw_breakpoint, stopped_by_hw_breakpoint,
829 supports_stopped_by_hw_breakpoint>: New fields.
830 (target_supports_stopped_by_sw_breakpoint)
831 (target_stopped_by_sw_breakpoint)
832 (target_supports_stopped_by_hw_breakpoint)
833 (target_stopped_by_hw_breakpoint): Declare.
834
15c66dd6
PA
8352015-03-04 Pedro Alves <palves@redhat.com>
836
837 enum lwp_stop_reason -> enum target_stop_reason
838 * linux-low.c (check_stopped_by_breakpoint): Adjust.
839 (thread_still_has_status_pending_p, check_stopped_by_watchpoint)
840 (linux_wait_1, stuck_in_jump_pad_callback)
841 (move_out_of_jump_pad_callback, linux_resume_one_lwp)
842 (linux_stopped_by_watchpoint):
843 * linux-low.h (enum lwp_stop_reason): Delete.
844 (struct lwp_info) <stop_reason>: Now an enum target_stop_reason.
845 * linux-x86-low.c (x86_linux_prepare_to_resume): Adjust.
846
98fc70d6
YQ
8472015-03-04 Yao Qi <yao.qi@linaro.org>
848
849 * Makefile.in (SFILES): Add linux-aarch64-low.c.
850
dd2ac174
GB
8512015-03-03 Gary Benson <gbenson@redhat.com>
852
853 * hostio.c (handle_vFile): Fix prefix lengths.
854
d68e53f4
MM
8552015-03-03 Markus Metzger <markus.t.metzger@intel.com>
856
857 * linux-low.c (linux_low_enable_btrace): Do not overwrite non-zero
858 ptr_bits.
859
bf2d68ab
AA
8602015-03-02 Andreas Arnez <arnez@linux.vnet.ibm.com>
861
862 * Makefile.in (s390-vx-linux64.c, s390-tevx-linux64.c)
863 (s390x-vx-linux64.c, s390x-tevx-linux64.c): New rules.
864 (clean): Add "rm -f" for above C files.
865 * configure.srv (srv_regobj): Add s390-vx-linux64.o,
866 s390-tevx-linux64.o, s390x-vx-linux64.o, and s390x-tevx-linux64.o.
867 (srv_xmlfiles): Add s390-vx-linux64.xml, s390-tevx-linux64.xml,
868 s390x-vx-linux64.xml, s390x-tevx-linux64.xml, and s390-vx.xml.
869 * linux-s390-low.c (HWCAP_S390_VX): New macro.
870 (init_registers_s390_vx_linux64, init_registers_s390_tevx_linux64)
871 (init_registers_s390x_vx_linux64)
872 (init_registers_s390x_tevx_linux64)
873 (tdesc_s390_vx_linux64, tdesc_s390_tevx_linux64)
874 (tdesc_s390x_vx_linux64, tdesc_s390x_tevx_linux64): New extern
875 declarations.
876 (s390_fill_vxrs_low, s390_store_vxrs_low, s390_fill_vxrs_high)
877 (s390_store_vxrs_high): New functions.
878 (s390_regsets): Add entries for NT_S390_VXRS_LOW and
879 NT_S390_VXRS_HIGH.
880 (s390_arch_setup): Add logic for selecting one of the new target
881 descriptions. Activate the new vector regsets if applicable.
882 (initialize_low_arch): Also invoke init_registers_s390_vx_linux64,
883 init_registers_s390_tevx_linux64, init_registers_s390x_vx_linux64,
884 and init_registers_s390x_tevx_linux64.
885
c966a859
PA
8862015-03-01 Pedro Alves <palves@redhat.com>
887
888 * linux-i386-ipa.c (gdb_agent_get_raw_reg): Constify 'raw_regs'
889 parameter.
890
4180215b
PA
8912015-02-27 Pedro Alves <palves@redhat.com>
892
893 * linux-x86-low.c (u_debugreg_offset): New function.
894 (x86_linux_dr_get, x86_linux_dr_set): Use it.
895
749bab01
PA
8962015-02-27 Pedro Alves <palves@redhat.com>
897
898 * gdb_proc_service.h: Wrap with EXTERN_C_PUSH/EXTERN_C_POP.
899 [!HAVE_PROC_SERVICE_H] (struct ps_prochandle): Forward declare.
900 [!HAVE_PROC_SERVICE_H] (ps_pdread, ps_pdwrite, ps_ptread)
901 ps_ptwrite, ps_lgetregs, ps_lsetregs, ps_lgetfpregs)
902 (ps_lsetfpregs, ps_getpid)
903 (ps_get_thread_area, ps_pglobal_lookup, ps_pstop, ps_pcontinue)
904 (ps_lstop, ps_lcontinue, ps_lgetxregsize, ps_lgetxregs)
905 (ps_lsetxregs, ps_plog): Declare.
906
3c14e5a3
PA
9072015-02-27 Pedro Alves <palves@redhat.com>
908
909 * linux-amd64-ipa.c (gdb_agent_get_raw_reg): Use
910 IP_AGENT_EXPORT_FUNC.
911 * linux-i386-ipa.c (gdb_agent_get_raw_reg): Use
912 IP_AGENT_EXPORT_FUNC.
913 * tracepoint.c (ATTR_USED, ATTR_NOINLINE, ATTR_CONSTRUCTOR)
914 (IP_AGENT_EXPORT): Delete.
915 (gdb_tp_heap_buffer, gdb_jump_pad_buffer, gdb_jump_pad_buffer_end)
916 (gdb_trampoline_buffer, gdb_trampoline_buffer_end)
917 (gdb_trampoline_buffer_error, collecting, gdb_collect)
918 (stop_tracing, flush_trace_buffer, about_to_request_buffer_space)
919 (trace_buffer_is_full, stopping_tracepoint, expr_eval_result)
920 (error_tracepoint, tracepoints, tracing, trace_buffer_ctrl)
921 (trace_buffer_ctrl_curr, trace_buffer_lo, trace_buffer_hi)
922 (traceframe_read_count, traceframe_write_count)
923 (traceframes_created, trace_state_variables, get_raw_reg)
924 (get_trace_state_variable_value, set_trace_state_variable_value)
925 (ust_loaded, helper_thread_id, cmd_buf): Use
926 IPA_SYM_EXPORTED_NAME.
927 (stop_tracing, flush_trace_buffer): Use IP_AGENT_EXPORT_FUNC.
928 (tracepoints) Use IP_AGENT_EXPORT_VAR.
929 (stopping_tracepoint, trace_buffer_is_full, expr_eval_result): Use
930 IP_AGENT_EXPORT_VAR and wrap in EXTERN_C_PUSH/EXTERN_C_POP.
931 (last_tracepoint): Move into !IN_PROCESS_AGENT block.
932 (error_tracepoint): Use IP_AGENT_EXPORT_VAR and wrap in
933 EXTERN_C_PUSH/EXTERN_C_POP.
934 (trace_state_variables): Use IP_AGENT_EXPORT_VAR.
935 (trace_buffer_lo, trace_buffer_hi): Use IP_AGENT_EXPORT_VAR and
936 wrap in EXTERN_C_PUSH/EXTERN_C_POP.
937 (trace_buffer_ctrl, trace_buffer_ctrl_curr)
938 (traceframe_write_count, traceframe_read_count)
939 (traceframes_created, tracing): Use IP_AGENT_EXPORT_VAR.
940 (about_to_request_buffer_space, get_trace_state_variable_value)
941 (set_trace_state_variable_value): Use IP_AGENT_EXPORT_FUNC.
942 (collecting): Use IP_AGENT_EXPORT_VAR and wrap in
943 EXTERN_C_PUSH/EXTERN_C_POP.
944 (gdb_collect): Use IP_AGENT_EXPORT_FUNC.
945 (ust_loaded, cmd_buf): Use IP_AGENT_EXPORT_VAR.
946 (helper_thread_id, gdb_agent_capability): Use IP_AGENT_EXPORT_VAR
947 and wrap in EXTERN_C_PUSH/EXTERN_C_POP.
948 (gdb_tp_heap_buffer, gdb_jump_pad_buffer, gdb_jump_pad_buffer_end)
949 (gdb_trampoline_buffer, gdb_trampoline_buffer_end)
950 (gdb_trampoline_buffer_error): Use IP_AGENT_EXPORT_VAR.
951 * tracepoint.h (ATTR_USED, ATTR_NOINLINE, EXPORTED_SYMBOL):
952 Define.
953 (IP_AGENT_EXPORT_FUNC, IP_AGENT_EXPORT_VAR)
954 (IP_AGENT_EXPORT_VAR_DECL): Define.
955 (tracing): Declare.
956 (gdb_agent_get_raw_reg): Declare.
957
fe978cb0
PA
9582015-02-27 Tom Tromey <tromey@redhat.com>
959 Pedro Alves <palves@redhat.com>
960
961 Rename symbols whose names are reserved C++ keywords throughout.
962
3bc3d82a
PA
9632015-02-27 Pedro Alves <palves@redhat.com>
964
965 * Makefile.in (COMPILER): New, get it from autoconf.
966 (CXX): Get from autoconf instead.
967 (COMPILE.pre): Use COMPILER.
968 (CC-LD): Rename to ...
969 (CC_LD): ... this. Use COMPILER.
970 (gdbserver$(EXEEXT), gdbreplay$(EXEEXT), $(IPA_LIB)): Adjust.
971 (CXX_FOR_TARGET): Default to g++ instead of gcc.
972 * acinclude.m4: Include build-with-cxx.m4.
973 * configure.ac: Call AC_PROG_CXX and GDB_AC_BUILD_WITH_CXX.
974 Disable -Werror by default if building in C++ mode.
975 (build_warnings): Add -Wno-sign-compare, -Wno-write-strings and
976 -Wno-narrowing in C++ mode. Run supported-warning-flags tests with
977 the C++ compiler. Save/restore CXXFLAGS too.
978 * configure: Regenerate.
979
07697489
PA
9802015-02-27 Pedro Alves <palves@redhat.com>
981
982 * acinclude.m4: Include libiberty.m4.
983 * configure.ac: Call libiberty_INIT.
984 * config.in, configure: Regenerate.
985
9beb7c4e
PA
9862015-02-26 Pedro Alves <palves@redhat.com>
987
988 * linux-low.c (linux_wait_1): When incrementing the PC past a
989 program breakpoint always use the_low_target.breakpoint_len as
990 increment, rather than the maximum between that and
991 the_low_target.decr_pc_after_break.
992
8090aef2
PA
9932015-02-23 Pedro Alves <palves@redhat.com>
994
995 * linux-low.c (check_stopped_by_breakpoint): Don't check if the
996 thread was doing a step-over; always adjust the PC if
997 we stepped over a permanent breakpoint.
998 (linux_wait_1): If we stepped over breakpoint that was on top of a
999 permanent breakpoint, manually advance the PC past it.
1000
bc9540e8
PA
10012015-02-23 Pedro Alves <palves@redhat.com>
1002
1003 * linux-x86-low.c (REGSIZE): Define in both 32-bit and 64-bit
1004 modes.
1005 (x86_fill_gregset, x86_store_gregset): Use it when handling
1006 $orig_eax.
1007
2db9a427
PA
10082015-02-20 Pedro Alves <palves@redhat.com>
1009
1010 * thread-db.c: Include "nat/linux-procfs.h".
1011 (thread_db_init): Skip listing new threads if the kernel supports
1012 PTRACE_EVENT_CLONE and /proc/PID/task/ is accessible.
1013
afa8d396
PA
10142015-02-20 Pedro Alves <palves@redhat.com>
1015
1016 * linux-low.c (status_pending_p_callback): Use ptid_match.
1017
c9587f88
AT
10182015-02-19 Antoine Tremblay <antoine.tremblay@ericsson.com>
1019
1020 PR breakpoints/16812
1021 * linux-low.c (wstatus_maybe_breakpoint): Remove.
1022 (linux_low_filter_event): Update wstatus_maybe_breakpoint name.
1023 (linux_wait_1): Report SIGTRAP,SIGILL,SIGSEGV.
1024
b05ec7a5
AT
10252015-02-10 Antoine Tremblay <antoine.tremblay@ericsson.com>
1026
1027 PR breakpoints/15956
1028 * tracepoint.c (cmd_qtinit): Add check for current_thread.
1029
d33501a5
MM
10302015-02-09 Markus Metzger <markus.t.metzger@intel.com>
1031
1032 * linux-low.c (linux_low_btrace_conf): Print size.
1033 * server.c (handle_btrace_conf_general_set): New.
1034 (hanle_general_set): Call handle_btrace_conf_general_set.
1035 (handle_query): Report Qbtrace-conf:bts:size as supported.
1036
f4abbc16
MM
10372015-02-09 Markus Metzger <markus.t.metzger@intel.com>
1038
1039 * linux-low.c (linux_low_enable_btrace): Update parameters.
1040 (linux_low_btrace_conf): New.
1041 (linux_target_ops)<to_btrace_conf>: Initialize.
1042 * server.c (current_btrace_conf): New.
1043 (handle_btrace_enable): Rename to ...
1044 (handle_btrace_enable_bts): ... this. Pass &current_btrace_conf
1045 to target_enable_btrace. Update comment. Update users.
1046 (handle_qxfer_btrace_conf): New.
1047 (qxfer_packets): Add btrace-conf entry.
1048 (handle_query): Report qXfer:btrace-conf:read as supported packet.
1049 * target.h (target_ops)<enable_btrace>: Update parameters and comment.
1050 (target_ops)<read_btrace_conf>: New.
1051 (target_enable_btrace): Update parameters.
1052 (target_read_btrace_conf): New.
1053
043c3577
MM
10542015-02-09 Markus Metzger <markus.t.metzger@intel.com>
1055
1056 * server.c (handle_btrace_general_set): Remove call to
1057 target_supports_btrace.
1058 (supported_btrace_packets): New.
1059 (handle_query): Call supported_btrace_packets.
1060 * target.h: include btrace-common.h.
1061 (btrace_target_info): Removed.
1062 (supports_btrace, target_supports_btrace): Update parameters.
1063
734b0e4b
MM
10642015-02-09 Markus Metzger <markus.t.metzger@intel.com>
1065
1066 * Makefile.in (SFILES): Add common/btrace-common.c.
1067 (OBS): Add common/btrace-common.o.
1068 (btrace-common.o): Add build rules.
1069 * linux-low: Include btrace-common.h.
1070 (linux_low_read_btrace): Use struct btrace_data. Call
1071 btrace_data_init and btrace_data_fini.
1072
d6c146e9
PA
10732015-02-06 Pedro Alves <palves@redhat.com>
1074
1075 * thread-db.c (find_new_threads_callback): Add debug output.
1076
20ba1ce6
PA
10772015-02-04 Pedro Alves <palves@redhat.com>
1078
1079 * linux-low.c (handle_extended_wait): Don't resume LWPs here.
1080 (resume_stopped_resumed_lwps): New function.
1081 (linux_wait_for_event_filtered): Use it.
1082
8cc73a39
SDJ
10832015-01-15 Sergio Durigan Junior <sergiodj@redhat.com>
1084
1085 * Makefile.in (SFILES): Add linux-personality.c.
1086 (linux-personality.o): New rule.
1087 * configure.srv (srv_linux_obj): Add linux-personality.o to the
1088 list of objects to be built.
1089 * linux-low.c: Include nat/linux-personality.h.
1090 (linux_create_inferior): Remove code to disable address space
1091 randomization (moved to ../nat/linux-personality.c). Create
1092 cleanup to disable address space randomization.
1093
fb23d554
SDJ
10942015-01-15 Sergio Durigan Junior <sergiodj@redhat.com>
1095
1096 * Makefile.in (posix-strerror.o): New rule.
1097 (mingw-strerror.o): Likewise.
1098 * configure: Regenerated.
1099 * configure.ac: Source file ../common/common.host. Initialize new
1100 variable srv_host_obs. Add srv_host_obs to GDBSERVER_DEPFILES.
1101
cdf43629
YQ
11022015-01-14 Yao Qi <yao@codesourcery.com>
1103
1104 * Makefile.in (SFILES): Add nat/ppc-linux.c.
1105 (ppc-linux.o): New rule.
1106 * configure.srv (powerpc*-*-linux*): Add ppc-linux.o.
1107 * configure.ac: AC_CHECK_FUNCS(getauxval).
1108 * config.in: Re-generated.
1109 * configure: Re-generated.
1110 * linux-ppc-low.c (ppc_arch_setup) [__powerpc64__]: Call
1111 ppc64_64bit_inferior_p
1112
514c5338
YQ
11132015-01-14 Yao Qi <yao@codesourcery.com>
1114
1115 * linux-ppc-low.c: Include "nat/ppc-linux.h".
1116 (PPC_FEATURE_HAS_VSX): Move to nat/ppc-linux.h.
1117 (PPC_FEATURE_HAS_ALTIVEC, PPC_FEATURE_HAS_SPE): Likewise.
1118 (PT_ORIG_R3, PT_TRAP): Likewise.
1119 (PTRACE_GETVSXREGS, PTRACE_SETVSXREGS): Likewise.
1120 (PTRACE_GETVRREGS, PTRACE_SETVRREGS): Likewise.
1121 (PTRACE_GETEVRREGS, PTRACE_SETEVRREGS): Likewise.
1122
3368c1e5
JB
11232015-01-10 Joel Brobecker <brobecker@adacore.com>
1124
1125 * i387-fp.c (i387_cache_to_xsave): In look over
1126 num_avx512_zmmh_high_registers, replace use of struct i387_xsave
1127 zmmh_low_space field by use of zmmh_high_space.
1128
582511be
PA
11292015-01-09 Pedro Alves <palves@redhat.com>
1130
1131 * linux-low.c (step_over_bkpt): Move higher up in the file.
1132 (handle_extended_wait): Don't store the stop_pc here.
1133 (get_stop_pc): Adjust comments and rename to ...
1134 (check_stopped_by_breakpoint): ... this. Record whether the LWP
1135 stopped for a software breakpoint or hardware breakpoint.
1136 (thread_still_has_status_pending_p): New function.
1137 (status_pending_p_callback): Use
1138 thread_still_has_status_pending_p. If the event is no longer
1139 interesting, resume the LWP.
1140 (handle_tracepoints): Add assert.
1141 (maybe_move_out_of_jump_pad): Remove cancel_breakpoints call.
1142 (wstatus_maybe_breakpoint): New function.
1143 (cancel_breakpoint): Delete function.
1144 (check_stopped_by_watchpoint): New function, factored out from
1145 linux_low_filter_event.
1146 (lp_status_maybe_breakpoint): Delete function.
1147 (linux_low_filter_event): Remove filter_ptid argument.
1148 Leave thread group exits pending here. Store the LWP's stop PC.
1149 Always leave events pending.
1150 (linux_wait_for_event_filtered): Pull all events out of the
1151 kernel, and leave them all pending.
1152 (count_events_callback, select_event_lwp_callback): Consider all
1153 events.
1154 (cancel_breakpoints_callback, linux_cancel_breakpoints): Delete.
1155 (select_event_lwp): Only give preference to the stepping LWP in
1156 all-stop mode. Adjust comments.
1157 (ignore_event): New function.
1158 (linux_wait_1): Delete 'retry' label. Use ignore_event. Remove
1159 references to cancel_breakpoints. Adjust to renames. Also give
1160 equal priority to all LWPs that have had events in non-stop mode.
1161 If reporting a software breakpoint event, unadjust the LWP's PC.
1162 (linux_wait): If linux_wait_1 returned an ignored event, retry.
1163 (stuck_in_jump_pad_callback, move_out_of_jump_pad_callback):
1164 Adjust.
1165 (linux_resume_one_lwp): Store the LWP's PC. Adjust.
1166 (resume_status_pending_p): Use thread_still_has_status_pending_p.
1167 (linux_stopped_by_watchpoint): Adjust.
1168 (linux_target_ops): Remove reference to linux_cancel_breakpoints.
1169 * linux-low.h (enum lwp_stop_reason): New.
1170 (struct lwp_info) <stop_pc>: Adjust comment.
1171 <stopped_by_watchpoint>: Delete field.
1172 <stop_reason>: New field.
1173 * linux-x86-low.c (x86_linux_prepare_to_resume): Adjust.
1174 * mem-break.c (software_breakpoint_inserted_here)
1175 (hardware_breakpoint_inserted_here): New function.
1176 * mem-break.h (software_breakpoint_inserted_here)
1177 (hardware_breakpoint_inserted_here): Declare.
1178 * target.h (struct target_ops) <cancel_breakpoints>: Remove field.
1179 (cancel_breakpoints): Delete.
1180 * tracepoint.c (clear_installed_tracepoints, stop_tracing)
1181 (upload_fast_traceframes): Remove references to
1182 cancel_breakpoints.
1183
a33e3959
PA
11842015-01-09 Pedro Alves <palves@redhat.com>
1185
1186 * thread-db.c (find_new_threads_callback): Ignore thread if the
1187 kernel thread ID is -1.
1188
8784d563
PA
11892015-01-09 Pedro Alves <palves@redhat.com>
1190
1191 * linux-low.c (linux_attach_fail_reason_string): Move to
1192 nat/linux-ptrace.c, and rename.
1193 (linux_attach_lwp): Update comment.
1194 (attach_proc_task_lwp_callback): New function.
1195 (linux_attach): Adjust to rename and use
1196 linux_proc_attach_tgid_threads.
1197 (linux_attach_fail_reason_string): Delete declaration.
1198
76f2b779
JB
11992015-01-01 Joel Brobecker <brobecker@adacore.com>
1200
1201 * gdbreplay.c (gdbreplay_version): Update copyright year to 2015.
1202 * server.c (gdbserver_version): Likewise.
1203
fafcc06a
SDJ
12042014-12-29 Sergio Durigan Junior <sergiodj@redhat.com>
1205
1206 * remote-utils.c: Include ctype.h.
1207 (input_interrupt): Explicitly handle the case when the char
1208 received is the NUL byte. Improve the printing of non-ASCII
1209 characters.
1210
beed38b8
JB
12112014-12-16 Joel Brobecker <brobecker@adacore.com>
1212
1213 * linux-low.c (linux_low_filter_event): Update call to
1214 linux_enable_event_reporting following the addition of
1215 a new parameter to that function.
1216
bf330350
CU
12172014-12-16 Catalin Udma <catalin.udma@freescale.com>
1218
1219 PR server/17457
1220 * linux-aarch64-low.c (AARCH64_FPSR_REGNO): New define.
1221 (AARCH64_FPCR_REGNO): Likewise.
1222 (AARCH64_NUM_REGS): Update to include fpsr/fpcr registers.
1223 (aarch64_fill_fpregset): Add missing fpsr/fpcr registers.
1224 (aarch64_store_fpregset): Likewise.
1225
5227d625
JB
12262014-12-15 Joel Brobecker <brobecker@adacore.com>
1227
1228 * lynx-low.c (lynx_resume): Use PTRACE_SINGLESTEP_ONE if N == 1.
1229 Remove FIXME comment about assumption about N.
1230
f93b65a0
JB
12312014-12-13 Joel Brobecker <brobecker@adacore.com>
1232
1233 * configure.ac: If large-file support is disabled in GDBserver,
1234 pass --disable-largefile to ACX_CONFIGURE_DIR call for "gnulib".
1235 * configure: Regenerate.
1236
e5a9158d
AA
12372014-12-12 Andreas Arnez <arnez@linux.vnet.ibm.com>
1238
1239 * linux-low.c (regsets_fetch_inferior_registers): Suppress the
1240 warning upon ENODATA from ptrace.
1241 * linux-s390-low.c (s390_store_tdb): New.
1242 (s390_regsets): Add regset for NT_S390_TDB.
1243
feea5f36
AA
12442014-12-12 Andreas Arnez <arnez@linux.vnet.ibm.com>
1245
1246 * linux-low.c (regsets_store_inferior_registers): Skip regsets
1247 without a fill_function.
1248 * linux-s390-low.c (s390_fill_last_break): Remove.
1249 (s390_regsets): Set fill_function to NULL for NT_S390_LAST_BREAK.
1250 (s390_arch_setup): Use regset's size instead of fill_function for
1251 loop end condition.
1252
098dbe61
AA
12532014-12-12 Andreas Arnez <arnez@linux.vnet.ibm.com>
1254
1255 * linux-low.c (regsets_fetch_inferior_registers): Do not invoke
1256 the regset's store function when ptrace returned an error.
1257 * regcache.c (get_thread_regcache): Invalidate register cache
1258 before fetching inferior's registers.
1259
28eef672
AA
12602014-12-12 Andreas Arnez <arnez@linux.vnet.ibm.com>
1261
1262 * linux-low.c (regsets_fetch_inferior_registers): Rephrase
1263 while-loop as for-loop.
1264 (regsets_store_inferior_registers): Likewise.
1265
bdca27a2
YQ
12662014-11-28 Yao Qi <yao@codesourcery.com>
1267
1268 * configure.ac(AC_CHECK_FUNCS): Remove readlink.
1269 * config.in, configure: Re-generate.
1270 * hostio.c (handle_unlink): Remove code checking HAVE_READLINK
1271 is defined.
1272
9c232dda
YQ
12732014-11-21 Yao Qi <yao@codesourcery.com>
1274
1275 * configure.ac: Don't invoke AC_FUNC_ALLOCA.
1276 (AC_CHECK_HEADERS): Remove malloc.h.
1277 * configure: Re-generated.
1278 * config.in: Re-generated.
1279 * server.h: Don't include alloca.h and malloc.h.
1280 * gdbreplay.c: Don't check HAVE_ALLOCA_H is defined.
1281 Don't include malloc.h.
1282
43968415
JB
12832014-11-17 Joel Brobecker <brobecker@adacore.com>
1284
1285 * lynx-low.c (lynx_write_memory): Put lynx_read_memory and
1286 corresponding ERRNO check in same block.
1287
40e91bc7
PA
12882014-11-12 Pedro Alves <palves@redhat.com>
1289
1290 * server.c (cont_thread): Update comment.
1291 (start_inferior, attach_inferior): No longer clear cont_thread.
1292 (handle_v_cont): No longer set cont_thread.
1293 (captured_main): Clear cont_thread each time a GDB connects.
1294
c2c118cf
PA
12952014-11-12 Pedro Alves <palves@redhat.com>
1296
1297 * linux-low.c (linux_wait_1): Don't force a wait for the Hc
1298 thread, and don't resume all threads if the Hc thread has exited.
1299
78708b7c
PA
13002014-11-12 Pedro Alves <palves@redhat.com>
1301
1302 * linux-low.c (linux_request_interrupt): Always send a SIGINT to
1303 the process group instead of to a specific LWP.
1304
a2abc7de
PA
13052014-10-15 Pedro Alves <palves@redhat.com>
1306
1307 PR server/17487
1308 * win32-arm-low.c (arm_set_thread_context): Remove current_event
1309 parameter.
1310 (arm_set_thread_context): Delete.
1311 (the_low_target): Adjust.
1312 * win32-i386-low.c (debug_registers_changed)
1313 (debug_registers_used): Delete.
1314 (update_debug_registers_callback): New function.
1315 (x86_dr_low_set_addr, x86_dr_low_set_control): Mark all threads as
1316 needing to update their debug registers.
1317 (win32_get_current_dr): New function.
1318 (x86_dr_low_get_addr, x86_dr_low_get_control)
1319 (x86_dr_low_get_status): Fetch the debug register from the thread
1320 record's context.
1321 (i386_initial_stuff): Adjust.
1322 (i386_get_thread_context): Remove current_event parameter. Don't
1323 clear debug_registers_changed nor copy DR values to
1324 debug_reg_state.
1325 (i386_set_thread_context): Delete.
1326 (i386_prepare_to_resume): New function.
1327 (i386_thread_added): Mark the thread as needing to update irs
1328 debug registers.
1329 (the_low_target): Remove i386_set_thread_context and install
1330 i386_prepare_to_resume.
1331 * win32-low.c (win32_get_thread_context): Adjust.
1332 (win32_set_thread_context): Use SetThreadContext
1333 directly.
1334 (win32_prepare_to_resume): New function.
1335 (win32_require_context): New function, factored out from ...
1336 (thread_rec): ... this.
1337 (continue_one_thread): Call win32_prepare_to_resume on each thread
1338 we're about to continue.
1339 (win32_resume): Call win32_prepare_to_resume on the event thread.
1340 * win32-low.h (struct win32_thread_info)
1341 <debug_registers_changed>: New field.
1342 (struct win32_target_ops): Change prototype of set_thread_context,
1343 delete set_thread_context and add prepare_to_resume.
1344 (win32_require_context): New declaration.
1345
a442d071
GB
13462014-10-08 Gary Benson <gbenson@redhat.com>
1347
1348 * server.h: Do not include common-exceptions.h.
1349
6f1947e8
GB
13502014-10-08 Gary Benson <gbenson@redhat.com>
1351
1352 * server.h: Do not include cleanups.h.
1353
63b434a4
JH
13542014-09-30 James Hogan <james.hogan@imgtec.com>
1355
1356 * Makefile.in (clean): Add rm -f commands for mips-dsp-linux.c and
1357 mips64-dsp-linux.c.
1358
c4d9ceb6
YQ
13592014-09-23 Yao Qi <yao@codesourcery.com>
1360
1361 * linux-low.c (lp_status_maybe_breakpoint): New function.
1362 (linux_low_filter_event): Call lp_status_maybe_breakpoint.
1363 (count_events_callback): Likewise.
1364 (select_event_lwp_callback): Likewise.
1365 (cancel_breakpoints_callback): Likewise.
1366
89a5711c
DB
13672014-09-19 Don Breazeal <donb@codesourcery.com>
1368
1369 * linux-low.c (handle_extended_wait): Call
1370 linux_ptrace_get_extended_event.
1371 (get_stop_pc, get_detach_signal, linux_low_filter_event): Call
1372 linux_is_extended_waitstatus.
1373
bffc0964
JB
13742014-09-16 Joel Brobecker <brobecker@adacore.com>
1375
1376 * Makefile.in (CPPFLAGS): Define.
1377 (INTERNAL_CFLAGS_BASE): Add ${CPPFLAGS}.
1378 (IPAGENT_CFLAGS): Remove ${CPPFLAGS}.
1379
0bfdf32f
GB
13802014-09-16 Gary Benson <gbenson@redhat.com>
1381
1382 * inferiors.h (current_inferior): Renamed as...
1383 (current_thread): New variable. All uses updated.
1384 * linux-low.c (get_pc): Renamed saved_inferior as saved_thread.
1385 (maybe_move_out_of_jump_pad): Likewise.
1386 (cancel_breakpoint): Likewise.
1387 (linux_low_filter_event): Likewise.
1388 (wait_for_sigstop): Likewise.
1389 (linux_resume_one_lwp): Likewise.
1390 (need_step_over_p): Likewise.
1391 (start_step_over): Likewise.
1392 (linux_stabilize_threads): Renamed save_inferior as saved_thread.
1393 * linux-x86-low.c (x86_linux_update_xmltarget): Likewise.
1394 * proc-service.c (ps_lgetregs): Renamed reg_inferior as reg_thread
1395 and save_inferior as saved_thread.
1396 * regcache.c (get_thread_regcache): Renamed saved_inferior as
1397 saved_thread.
1398 (regcache_invalidate_thread): Likewise.
1399 * remote-utils.c (prepare_resume_reply): Likewise.
1400 * thread-db.c (thread_db_get_tls_address): Likewise.
1401 (disable_thread_event_reporting): Likewise.
1402 (remove_thread_event_breakpoints): Likewise.
1403 * tracepoint.c (gdb_agent_about_to_close): Renamed save_inferior
1404 as saved_thread.
1405 * target.h (set_desired_inferior): Renamed as...
1406 (set_desired_thread): New declaration. All uses updated.
1407 * server.c (myresume): Updated comment to reference thread instead
1408 of inferior.
1409 (handle_serial_event): Likewise.
1410 (handle_target_event): Likewise.
1411
361c8ade
GB
14122014-09-12 Tom Tromey <tromey@redhat.com>
1413 Gary Benson <gbenson@redhat.com>
1414
1415 * regcache.h: Include common-regcache.h.
1416 (regcache_read_pc): Don't declare.
1417 * regcache.c (get_thread_regcache_for_ptid): New function.
1418
bd9269f7
GB
14192014-09-11 Tom Tromey <tromey@redhat.com>
1420 Gary Benson <gbenson@redhat.com>
1421
1422 * symbol.c: New file.
1423 * Makefile.in (SFILES): Add symbol.c.
1424 (OBS): Add symbol.o.
1425
f8c1d06b
GB
14262014-09-11 Gary Benson <gbenson@redhat.com>
1427
1428 * target.c (target_stop_ptid, target_continue_ptid): New
1429 functions.
1430
721ec300
GB
14312014-09-11 Tom Tromey <tromey@redhat.com>
1432 Gary Benson <gbenson@redhat.com>
1433
1434 * target.h: Include target/target.h.
1435 * target.c (target_read_memory, target_read_uint32)
1436 (target_write_memory): New functions.
1437
c5e92cca
GB
14382014-09-11 Gary Benson <gbenson@redhat.com>
1439
1440 * server.h (debug_hw_points): Don't declare.
1441 * server.c (debug_hw_points): Don't define. Replace all uses
1442 with show_debug_regs.
1443 * linux-aarch64-low.c (debug_hw_points): Don't define. Replace
1444 all uses with show_debug_regs.
1445
2e4bb98a
EBM
14462014-09-08 Edjunior Barbosa Machado <emachado@linux.vnet.ibm.com>
1447
1448 * linux-ppc-low.c (ppc_collect_ptrace_register): Adjust routine to take
1449 endianness into account.
1450 (ppc_supply_ptrace_register): Likewise.
1451
ac740bc7
JH
14522014-09-03 James Hogan <james.hogan@imgtec.com>
1453
1454 * linux-mips-low.c (mips_read_description): Reset errno to 0 prior
1455 to reading DSP_CONTROL with PTRACE_PEEKUSER ptrace call.
1456
97ea6506
GB
14572014-09-03 Gary Benson <gbenson@redhat.com>
1458
1459 * linux-x86-low.c (x86_linux_prepare_to_resume): Use
1460 ALL_DEBUG_ADDRESS_REGISTERS.
1461
df7e5265
GB
14622014-09-02 Gary Benson <gbenson@redhat.com>
1463
1464 * i386-low.h: Renamed as...
1465 * x86-low.h: New file. All type, function and variable name
1466 prefixes changed from "i386_" to "x86_". All references updated.
1467 * i386-low.c: Renamed as...
1468 * x86-low.c: New file. All type, function and variable name
1469 prefixes changed from "i386_" to "x86_". All references updated.
1470
ed859da7
GB
14712014-09-02 Gary Benson <gbenson@redhat.com>
1472
1473 * linux-x86-low.c (x86_linux_new_process): Use XCNEW.
1474 (x86_linux_new_thread): Likewise.
1475
860789c7
GB
14762014-08-29 Gary Benson <gbenson@redhat.com>
1477
1478 * server.h (setjmp.h): Do not include.
1479 (toplevel): Do not declare.
1480 (common-exceptions.h): Include.
1481 (cleanups.h): Likewise.
1482 * server.c (toplevel): Do not define.
1483 (exit_code): New static global.
1484 (detach_or_kill_for_exit_cleanup): New function.
1485 (main): New function. Original main renamed to...
1486 (captured_main): New function.
1487 * utils.c (verror) [!IN_PROCESS_AGENT]: Use throw_verror.
1488
ff55e1b5
GB
14892014-08-29 Gary Benson <gbenson@redhat.com>
1490
1491 * Makefile.in (SFILES): Add common/common-exceptions.c.
1492 (OBS): Add common-exceptions.o.
1493 (common-exceptions.o): New rule.
1494 * utils.c (prepare_to_throw_exception): New function.
1495
e9bcb658
GB
14962014-08-29 Gary Benson <gbenson@redhat.com>
1497
1498 * config.in: Regenerate.
1499 * configure: Likewise.
1500
e3180625
GB
15012014-08-29 Gary Benson <gbenson@redhat.com>
1502
1503 * Makefile.in (SFILES): Add common/cleanups.c.
1504 (OBS): cleanups.o.
1505 (cleanups.o): New rule.
1506
e3d6ba5d
GB
15072014-08-29 Gary Benson <gbenson@redhat.com>
1508
1509 * utils.c (internal_vwarning): New function.
1510
7096e886
GB
15112014-08-28 Gary Benson <gbenson@redhat.com>
1512
1513 * utils.h (fatal): Remove declaration.
1514 * utils.c (fatal): Remove function.
1515
14ce3192
GB
15162014-08-28 Gary Benson <gbenson@redhat.com>
1517
1518 * tracepoint.c (gdb_agent_init): Replace fatal with
1519 perror_with_name.
1520 (initialize_tracepoint): Likewise.
1521
50278d59
GB
15222014-08-28 Gary Benson <gbenson@redhat.com>
1523
1524 * remote-utils.c (remote_prepare): Replace fatal with error.
1525
aa96c426
GB
15262014-08-28 Gary Benson <gbenson@redhat.com>
1527
1528 * linux-low.c (linux_async): Replace fatal with warning.
1529 Tidy up and return.
1530 (linux_start_non_stop): Return -1 if linux_async failed.
1531
f7160e97
GB
15322014-08-28 Gary Benson <gbenson@redhat.com>
1533
1534 * linux-x86-low.c (i386_dr_low_set_addr): Replace check with
1535 gdb_assert.
1536 (i386_dr_low_get_addr): Remove vague comment.
1537 * win32-i386-low.c (i386_dr_low_set_addr): Replace check with
1538 gdb_assert.
1539
38e08fca
GB
15402014-08-28 Gary Benson <gbenson@redhat.com>
1541
1542 * inferiors.c (get_thread_process): Replace check with gdb_assert.
1543 * linux-low.c (linux_wait_for_event_filtered): Replace fatal with
1544 internal_error.
1545 (linux_resume_one_lwp): Likewise.
1546 * linux-x86-low.c (x86_siginfo_fixup): Replace checks with
1547 gdb_assert.
1548 * mem-break.c (raw_bkpt_type_to_target_hw_bp_type): Replace fatal
1549 with internal_error.
1550 * regcache.c (get_thread_regcache): Replace check with gdb_assert.
1551 (init_register_cache): Replace fatal with gdb_assert_not_reached.
1552 (find_register_by_name): Replace fatal with internal_error.
1553 (find_regno): Likewise.
1554 * tdesc.c (init_target_desc): Replace check with gdb_assert.
1555 * thread-db.c (thread_db_create_event): Likewise.
1556 (thread_db_load_search): Likewise.
1557 (try_thread_db_load_1): Likewise.
1558 * tracepoint.c (get_jump_space_head): Replace fatal with
1559 internal_error.
1560 (claim_trampoline_space): Likewise.
1561 (have_fast_tracepoint_trampoline_buffer): Likewise.
1562 (cmd_qtstart): Likewise.
1563 (stop_tracing): Likewise.
1564 (fast_tracepoint_collecting): Likewise.
1565 (target_malloc): Likewise.
1566 (download_tracepoint): Likewise.
1567 (download_trace_state_variables): Replace check with gdb_assert.
1568 (upload_fast_traceframes): Replace fatal with internal_error.
1569
34abf635
GB
15702014-08-19 Tom Tromey <tromey@redhat.com>
1571 Gary Benson <gbenson@redhat.com>
1572
1573 * Makefile.in (SFILES): Add common/common-debug.c.
1574 (OBS): Add common-debug.o.
1575 (common-debug.o): New rule.
1576 * debug.h (debug_printf): Don't declare.
1577 * debug.c (debug_printf): Renamed and rewritten as...
1578 (debug_vprintf): New function.
1579
f6e94d78
GB
15802014-08-19 Gary Benson <gbenson@redhat.com>
1581
1582 * utils.h: Do not include print-utils.h.
1583
9239eeab
GB
15842014-08-19 Tom Tromey <tromey@redhat.com>
1585 Gary Benson <gbenson@redhat.com>
1586
1587 * server.h: Add static assertion.
1588 (gdb_byte, CORE_ADDR, LONGEST, ULONGEST): Remove.
1589
ef87c8bb
GB
15902014-08-19 Tom Tromey <tromey@redhat.com>
1591 Gary Benson <gbenson@redhat.com>
1592
1593 * Makefile.in (SFILES): Add common/errors.c.
1594 (OBS): Add errors.o.
1595 (IPA_OBS): Add errors-ipa.o.
1596 (errors.o): New rule.
1597 (errors-ipa.o): Likewise.
1598 * utils.h (perror_with_name, error, warning): Don't declare.
1599 * utils.c (warning): Renamed and rewritten as...
1600 (vwarning): New function.
1601 (error): Renamed and rewritten as...
1602 (verror): New function.
1603 (internal_error): Renamed and rewritten as...
1604 (internal_verror): New function.
1605
bb974a24
GB
16062014-08-07 Gary Benson <gbenson@redhat.com>
1607
1608 * configure.ac (AC_CHECK_HEADERS): Remove errno.h.
1609 * configure: Regenerate.
1610 * config.in: Likewise.
1611 * server.h: Do not include errno.h.
1612 * event-loop.c: Likewise.
1613 * hostio-errno.c: Likewise.
1614 * linux-low.c: Likewise.
1615 * remote-utils.c: Likewise.
1616 * spu-low.c: Likewise.
1617 * utils.c: Likewise.
1618 * gdbreplay.c: Unconditionally include errno.h.
1619
6d3d12eb
GB
16202014-08-07 Gary Benson <gbenson@redhat.com>
1621
1622 * server.h: Do not include string.h.
1623 * event-loop.c: Likewise.
1624 * linux-low.c: Likewise.
1625 * regcache.c: Likewise.
1626 * remote-utils.c: Likewise.
1627 * spu-low.c: Likewise.
1628 * utils.c: Likewise.
1629
dccbb609
GB
16302014-08-07 Gary Benson <gbenson@redhat.com>
1631
1632 * server.h: Do not include gdb_assert.h.
1633
e76df0d0
GB
16342014-08-07 Gary Benson <gbenson@redhat.com>
1635
1636 * server.h: Do not include common-utils.h.
1637
4cb9c816
GB
16382014-08-07 Gary Benson <gbenson@redhat.com>
1639
1640 * server.h: Do not include ptid.h.
1641 * notif.h: Likewise.
1642
3995eeee
GB
16432014-08-07 Gary Benson <gbenson@redhat.com>
1644
1645 * server.h: Do not include gdb_locale.h.
1646
cb9f1a9b
GB
16472014-08-07 Gary Benson <gbenson@redhat.com>
1648
1649 * server.h: Do not include gdb/signals.h.
1650 * win32-low.c: Likewise.
1651
a5fceff8
GB
16522014-08-07 Gary Benson <gbenson@redhat.com>
1653
1654 * server.h: Do not include pathmax.h.
1655
b9391142
GB
16562014-08-07 Gary Benson <gbenson@redhat.com>
1657
1658 * server.h: Do not include libiberty.h.
1659 * linux-bfin-low.c: Likewise.
1660
0e443c87
GB
16612014-08-07 Gary Benson <gbenson@redhat.com>
1662
1663 * server.h: Do not include ansidecl.h.
1664
8ebb3f56
GB
16652014-08-07 Gary Benson <gbenson@redhat.com>
1666
1667 * linux-x86-low.c: Do not include stddef.h.
1668 * lynx-ppc-low.c: Likewise.
1669 * tracepoint.c: Likewise.
1670
8980bdf6
GB
16712014-08-07 Gary Benson <gbenson@redhat.com>
1672
1673 * server.h: Do not include stdarg.h.
1674 * nto-low.c: Likewise.
1675
d7096f71
GB
16762014-08-07 Gary Benson <gbenson@redhat.com>
1677
1678 * server.h: Do not include stdlib.h.
1679 * inferiors.c: Likewise.
1680 * linux-low.c: Likewise.
1681 * regcache.c: Likewise.
1682 * spu-low.c: Likewise.
1683 * tracepoint.c: Likewise.
1684 * utils.c: Likewise.
1685
d02f550d
GB
16862014-08-07 Gary Benson <gbenson@redhat.com>
1687
1688 * server.h: Do not include stdio.h.
1689 * linux-low.c: Likewise.
1690 * remote-utils.c: Likewise.
1691 * spu-low.c: Likewise.
1692 * utils.c: Likewise.
1693 * wincecompat.c: Likewise.
1694
87f6c4e3
GB
16952014-08-06 Gary Benson <gbenson@redhat.com>
1696
1697 * regcache.c (init_register_cache): Move conditionals inside if.
1698
7089dca4
GB
16992014-08-06 Gary Benson <gbenson@redhat.com>
1700
1701 * linux-low.c (linux_supports_non_stop): Use target_is_async_p.
1702
462f517e
GB
17032014-07-31 Gary Benson <gbenson@redhat.com>
1704
1705 * ax.h: Do not include server.h.
1706 * gdbthread.h: Likewise.
1707 * lynx-low.h: Likewise.
1708 * notif.h: Likewise.
1709
976411d6
GB
17102014-07-30 Gary Benson <gbenson@redhat.com>
1711
1712 * server.h: Include common-defs.h.
1713 Do not include config.h or build-gnulib-gdbserver/config.h.
1714
d41f6d8e
GB
17152014-07-30 Gary Benson <gbenson@redhat.com>
1716
1717 * hostio-errno.c: Move server.h to top of includes list.
1718 * inferiors.c: Likewise.
1719 * linux-x86-low.c: Likewise.
1720 * notif.c: Include server.h.
1721
314c6a35
TT
17222014-07-24 Tom Tromey <tromey@redhat.com>
1723 Gary Benson <gbenson@redhat.com>
1724
1725 * server.h (CORE_ADDR): Now unsigned.
1726
69ff6be5
PA
17272014-07-16 Pedro Alves <palves@redhat.com>
1728
1729 * linux-low.c (linux_kill_one_lwp): Use kill_lwp, not kill.
1730
ce9e3fe7
PA
17312014-07-15 Pedro Alves <palves@redhat.com>
1732
1733 * linux-low.c (linux_kill_one_lwp): Save errno and work with saved
1734 copy.
1735
e76126e8
PA
17362014-07-11 Pedro Alves <palves@redhat.com>
1737
1738 * linux-low.c (kill_wait_lwp): New function, based on
1739 kill_one_lwp_callback, but use my_waitpid directly.
1740 (kill_one_lwp_callback, linux_kill): Use it.
1741
8e9db26e
PA
17422014-06-23 Pedro Alves <palves@redhat.com>
1743
1744 * linux-x86-low.c (x86_linux_prepare_to_resume): Clear DR_CONTROL
1745 before setting DR0..DR3.
1746
698b3e08
GB
17472014-06-20 Gary Benson <gbenson@redhat.com>
1748
1749 * configure.ac (AC_REPLACE_FUNCS) <vasprintf, vsnprintf>: Removed.
1750 * configure: Regenerated.
1751 * config.in: Likewise.
1752
125f8a3d
GB
17532014-06-20 Gary Benson <gbenson@redhat.com>
1754
1755 * Makefile.in (SFILES): Update locations for files moved
1756 from common to nat.
1757 (object file files): Reordered.
1758
42995dbd
GB
17592014-06-20 Gary Benson <gbenson@redhat.com>
1760
1761 * i386-low.h (i386_dr_low_can_set_addr): Removed.
1762 (i386_dr_low_set_addr): Likewise.
1763 (i386_dr_low_get_addr): Likewise.
1764 (i386_dr_low_can_set_control): Likewise.
1765 (i386_dr_low_set_control): Likewise.
1766 (i386_dr_low_get_control): Likewise.
1767 (i386_dr_low_get_status): Likewise.
1768 (i386_get_debug_register_length): Likewise.
1769 * linux-x86-low.c (i386_dr_low_set_addr):
1770 Changed signature. Made static.
1771 (i386_dr_low_get_addr): Likewise.
1772 (i386_dr_low_set_control): Likewise.
1773 (i386_dr_low_get_control): Likewise.
1774 (i386_dr_low_get_status): Likewise.
1775 (i386_dr_low): New global variable.
1776 * win32-i386-low.c (i386_dr_low_set_addr):
1777 Changed signature. Made static.
1778 (i386_dr_low_get_addr): Likewise.
1779 (i386_dr_low_set_control): Likewise.
1780 (i386_dr_low_get_control): Likewise.
1781 (i386_dr_low_get_status): Likewise.
1782 (i386_dr_low): New global variable.
1783
e1d2394b
MS
17842014-06-20 Marcus Shawcroft <marcus.shawcroft@arm.com>
1785
1786 * configure.ac: Invoke. AC_CHECK_TOOL(AR, ar).
1787 * Makefile.in (AR, AR_FLAGS): Define.
1788 * configure: Regenerate.
1789
3a8ee006
GB
17902014-06-19 Gary Benson <gbenson@redhat.com>
1791
1792 * Makefile.in (i386-dregs.o): New rule.
1793 * configure.srv: Add i386-dregs.o to all targets using i386-low.o.
1794 * i386-low.c (target.h): Remove include.
1795 (TARGET_HAS_DR_LEN_8): Now in i386-dregs.c.
1796 (DR_CONTROL_SHIFT): Likewise.
1797 (DR_CONTROL_SIZE): Likewise.
1798 (DR_RW_EXECUTE): Likewise.
1799 (DR_RW_WRITE): Likewise.
1800 (DR_RW_READ): Likewise.
1801 (DR_RW_IORW): Likewise.
1802 (DR_LEN_1): Likewise.
1803 (DR_LEN_2): Likewise.
1804 (DR_LEN_4): Likewise.
1805 (DR_LEN_8): Likewise.
1806 (DR_LOCAL_ENABLE_SHIFT): Likewise.
1807 (DR_GLOBAL_ENABLE_SHIFT): Likewise.
1808 (DR_ENABLE_SIZE): Likewise.
1809 (DR_LOCAL_SLOWDOWN): Likewise.
1810 (DR_GLOBAL_SLOWDOWN): Likewise.
1811 (DR_CONTROL_RESERVED): Likewise.
1812 (I386_DR_CONTROL_MASK): Likewise.
1813 (I386_DR_VACANT): Likewise.
1814 (I386_DR_LOCAL_ENABLE): Likewise.
1815 (I386_DR_GLOBAL_ENABLE): Likewise.
1816 (I386_DR_DISABLE): Likewise.
1817 (I386_DR_SET_RW_LEN): Likewise.
1818 (I386_DR_GET_RW_LEN): Likewise.
1819 (I386_DR_WATCH_HIT): Likewise.
1820 (i386_wp_op_t): Likewise.
1821 (i386_show_dr): Likewise.
1822 (i386_length_and_rw_bits): Likewise.
1823 (i386_insert_aligned_watchpoint): Likewise.
1824 (i386_remove_aligned_watchpoint): Likewise.
1825 (i386_handle_nonaligned_watchpoint): Likewise.
1826 i386_update_inferior_debug_regs(): Likewise.
1827 (i386_dr_insert_watchpoint): Likewise.
1828 (i386_dr_remove_watchpoint): Likewise.
1829 (i386_dr_region_ok_for_watchpoint): Likewise.
1830 (i386_dr_stopped_data_address): Likewise.
1831 (i386_dr_stopped_by_watchpoint): Likewise.
1832
8f26655c
GB
18332014-06-19 Gary Benson <gbenson@redhat.com>
1834
1835 * i386-low.c (i386_dr_show): Renamed to
1836 i386_show_dr and made static. All uses updated.
1837 (i386_dr_length_and_rw_bits): Renamed to
1838 i386_length_and_rw_bits and made static.
1839 All uses updated.
1840 (i386_dr_insert_aligned_watchpoint): Renamed to
1841 i386_insert_aligned_watchpoint and made static.
1842 All uses updated.
1843 (i386_dr_remove_aligned_watchpoint): Renamed to
1844 i386_remove_aligned_watchpoint and made static.
1845 All uses updated.
1846 (i386_dr_update_inferior_debug_regs): Renamed to
1847 i386_update_inferior_debug_regs and made static.
1848 All uses updated.
1849
b9228891
GB
18502014-06-18 Gary Benson <gbenson@redhat.com>
1851
5171def3
GB
1852 * i386-low.h (i386_dr_low_can_set_addr): New macro.
1853 (i386_dr_low_can_set_control): Likewise.
1854 (i386_get_debug_register_length): Likewise.
1855 * i386-low.c (i386_dr_low_can_set_addr): Now in i386-low.h.
1856 (i386_dr_low_can_set_control): Likewise.
1857 (i386_get_debug_register_length): Likewise.
1858
18592014-06-17 Gary Benson <gbenson@redhat.com>
1860
b9228891
GB
1861 * i386-low.h (i386-dregs.h): New include.
1862 (DR_FIRSTADDR): Now in i386-dregs.h.
1863 (DR_LASTADDR): Likewise.
1864 (DR_NADDR): Likewise.
1865 (DR_STATUS): Likewise.
1866 (DR_CONTROL): Likewise.
1867 (i386_debug_reg_state): Likewise.
1868 (i386_dr_insert_watchpoint): Likewise.
1869 (i386_dr_remove_watchpoint): Likewise.
1870 (i386_dr_region_ok_for_watchpoint): Likewise.
1871 (i386_dr_stopped_data_address): Likewise.
1872 (i386_dr_stopped_by_watchpoint): Likewise.
1873 * i386-low.c (ALL_DEBUG_REGISTERS): Likewise.
1874
4be83cc2
GB
18752014-06-18 Gary Benson <gbenson@redhat.com>
1876
1877 * i386-low.h (i386_low_insert_watchpoint): Renamed to
1878 i386_dr_insert_watchpoint.
1879 (i386_low_remove_watchpoint): Renamed to
1880 i386_dr_remove_watchpoint.
1881 (i386_low_region_ok_for_watchpoint): Renamed to
1882 i386_dr_region_ok_for_watchpoint.
1883 (i386_low_stopped_data_address): Renamed to
1884 i386_dr_stopped_data_address.
1885 (i386_low_stopped_by_watchpoint): Renamed to
1886 i386_dr_stopped_by_watchpoint.
1887 * i386-low.c (i386_show_dr): Renamed to
1888 i386_dr_show and made nonstatic. All uses updated.
1889 (i386_length_and_rw_bits): Renamed to
1890 i386_dr_length_and_rw_bits and made nonstatic.
1891 All uses updated.
1892 (i386_insert_aligned_watchpoint): Renamed to
1893 i386_dr_insert_aligned_watchpoint and made nonstatic.
1894 All uses updated.
1895 (i386_remove_aligned_watchpoint): Renamed to
1896 i386_dr_remove_aligned_watchpoint and made nonstatic.
1897 All uses updated.
1898 (i386_update_inferior_debug_regs): Renamed to
1899 i386_dr_update_inferior_debug_regs and made nonstatic.
1900 All uses updated.
1901 (i386_low_insert_watchpoint): Renamed to
1902 i386_dr_insert_watchpoint. All uses updated.
1903 (i386_low_remove_watchpoint): Renamed to
1904 i386_dr_remove_watchpoint. All uses updated.
1905 (i386_low_region_ok_for_watchpoint): Renamed to
1906 i386_dr_region_ok_for_watchpoint. All uses updated.
1907 (i386_low_stopped_data_address): Renamed to
1908 i386_dr_stopped_data_address. All uses updated.
1909 (i386_low_stopped_by_watchpoint): Renamed to
1910 i386_dr_stopped_by_watchpoint. All uses updated.
1911
131aa0d4
GB
19122014-06-18 Gary Benson <gbenson@redhat.com>
1913
1914 * i386-low.c (i386_dr_low_can_set_addr): New macro.
1915 (i386_dr_low_can_set_control): Likewise.
1916 (i386_insert_aligned_watchpoint): New check.
1917
d9305f7f
GB
19182014-06-18 Gary Benson <gbenson@redhat.com>
1919
1920 * i386-low.c (i386_update_inferior_debug_regs) <inf_state>:
1921 Renamed to state.
1922
e927c9fc
GB
19232014-06-18 Gary Benson <gbenson@redhat.com>
1924
1925 * i386-low.c (i386_length_and_rw_bits): Use internal_error
1926 instead of fatal and error.
1927 (i386_handle_nonaligned_watchpoint): Likewise.
1928
1b6d4134
GB
19292014-06-18 Gary Benson <gbenson@redhat.com>
1930
1931 * i386-low.c (i386_get_debug_register_length): New macro.
1932 (TARGET_HAS_DR_LEN_8): Remove conditional. Use above macro.
1933 (i386_show_dr): Use debug_printf instead of fprintf. Use
1934 phex to format values.
1935
6e62758f
GB
19362014-06-18 Gary Benson <gbenson@redhat.com>
1937
1938 * i386-low.h: Comment changes.
1939 * i386-low.c: Likewise.
1940
fc6e2f03
GB
19412014-06-18 Gary Benson <gbenson@redhat.com>
1942
1943 * i386-low.c: Whitespace changes.
1944
f9d1eeed
TT
19452014-06-12 Tom Tromey <tromey@redhat.com>
1946
1947 * utils.c (freeargv): Remove.
1948
0b04e523
TT
19492014-06-12 Tom Tromey <tromey@redhat.com>
1950
1951 * debug.c (debug_printf): Remove HAVE_GETTIMEOFDAY checks.
1952 * server.c (monitor_show_help): Remove HAVE_GETTIMEOFDAY check.
1953 (parse_debug_format_options): Likewise.
1954 (gdbserver_usage): Likewise.
1955 * Makefile.in (LIBIBERTY_BUILDDIR, LIBIBERTY): New variables.
1956 (SUBDIRS, REQUIRED_SUBDIRS): Add libiberty.
1957 (gdbserver$(EXEEXT), gdbreplay$(EXEEXT)): Depend on and link
1958 against libiberty.
1959 ($(LIBGNU)): Depend on libiberty.
1960 (all-lib): Recurse into all subdirs.
1961 (install-only): Invoke "install" target in subdirs.
1962 (vasprintf.o, vsnprintf.o, safe-ctype.o, lbasename.o): Remove
1963 targets.
1964 * configure: Rebuild.
1965 * configure.ac: Add ACX_CONFIGURE_DIR for libiberty. Don't check
1966 for vasprintf, vsnprintf, or gettimeofday.
1967 * configure.srv: Don't add safe-ctype.o or lbasename.o to
1968 srv_tgtobj.
1969
270c9937
JB
19702014-06-05 Joel Brobecker <brobecker@adacore.com>
1971
1972 * development.sh: Delete.
1973 * Makefile.in (config.status): Adjust dependency on development.sh.
1974 * configure.ac: Adjust development.sh source call.
1975 * configure: Regenerate.
1976
0a261ed8
PA
19772014-06-02 Pedro Alves <palves@redhat.com>
1978
1979 * ax.c (gdb_free_agent_expr): New function.
1980 * ax.h (gdb_free_agent_expr): New declaration.
1981 * mem-break.c (delete_gdb_breakpoint_1): Also clear the commands
1982 list.
1983 (clear_breakpoint_conditions, clear_breakpoint_commands): Make
1984 static.
1985 (clear_breakpoint_conditions_and_commands): New function.
1986 * mem-break.h (clear_breakpoint_conditions): Delete declaration.
1987 (clear_breakpoint_conditions_and_commands): New declaration.
1988
e9dae05e
RR
19892014-05-23 Ramana Radhakrishnan <ramana.radhakrishnan@arm.com>
1990
1991 * linux-aarch64-low.c (asm/ptrace.h): Include.
1992
5876f503
JK
19932014-05-21 Jan Kratochvil <jan.kratochvil@redhat.com>
1994
1995 Fix TLS access for -static -pthread.
1996 * gdbserver/thread-db.c (struct thread_db): Add td_thr_tlsbase_p.
1997 (thread_db_get_tls_address): Call it if LOAD_MODULE is zero.
1998 (thread_db_load_search, try_thread_db_load_1): Initialize it.
1999
802e8e6d
PA
20002014-05-20 Pedro Alves <palves@redhat.com>
2001
2002 * linux-aarch64-low.c (aarch64_insert_point)
2003 (aarch64_remove_point): No longer check whether the type is
2004 supported here. Adjust to new interface.
2005 (the_low_target): Install aarch64_supports_z_point_type as
2006 supports_z_point_type method.
2007 * linux-arm-low.c (raw_bkpt_type_to_arm_hwbp_type): New function.
2008 (arm_linux_hw_point_initialize): Take an enum raw_bkpt_type
2009 instead of a Z packet char. Adjust.
2010 (arm_supports_z_point_type): New function.
2011 (arm_insert_point, arm_remove_point): Adjust to new interface.
2012 (the_low_target): Install arm_supports_z_point_type.
2013 * linux-crisv32-low.c (cris_supports_z_point_type): New function.
2014 (cris_insert_point, cris_remove_point): Adjust to new interface.
2015 Don't check whether the type is supported here.
2016 (the_low_target): Install cris_supports_z_point_type.
2017 * linux-low.c (linux_supports_z_point_type): New function.
2018 (linux_insert_point, linux_remove_point): Adjust to new interface.
2019 * linux-low.h (struct linux_target_ops) <insert_point,
2020 remove_point>: Take an enum raw_bkpt_type instead of a char. Add
2021 raw_breakpoint pointer parameter.
2022 <supports_z_point_type>: New method.
2023 * linux-mips-low.c (mips_supports_z_point_type): New function.
2024 (mips_insert_point, mips_remove_point): Adjust to new interface.
2025 Use mips_supports_z_point_type.
2026 (the_low_target): Install mips_supports_z_point_type.
2027 * linux-ppc-low.c (the_low_target): Install NULL as
2028 supports_z_point_type method.
2029 * linux-s390-low.c (the_low_target): Install NULL as
2030 supports_z_point_type method.
2031 * linux-sparc-low.c (the_low_target): Install NULL as
2032 supports_z_point_type method.
2033 * linux-x86-low.c (x86_supports_z_point_type): New function.
2034 (x86_insert_point): Adjust to new insert_point interface. Use
2035 insert_memory_breakpoint. Adjust to new
2036 i386_low_insert_watchpoint interface.
2037 (x86_remove_point): Adjust to remove_point interface. Use
2038 remove_memory_breakpoint. Adjust to new
2039 i386_low_remove_watchpoint interface.
2040 (the_low_target): Install x86_supports_z_point_type.
2041 * lynx-low.c (lynx_target_ops): Install NULL as
2042 supports_z_point_type callback.
2043 * nto-low.c (nto_supports_z_point_type): New.
2044 (nto_insert_point, nto_remove_point): Adjust to new interface.
2045 (nto_target_ops): Install nto_supports_z_point_type.
2046 * mem-break.c: Adjust intro comment.
2047 (struct raw_breakpoint) <raw_type, size>: New fields.
2048 <inserted>: Update comment.
2049 <shlib_disabled>: Delete field.
2050 (enum bkpt_type) <gdb_breakpoint>: Delete value.
2051 <gdb_breakpoint_Z0, gdb_breakpoint_Z1, gdb_breakpoint_Z2,
2052 gdb_breakpoint_Z3, gdb_breakpoint_Z4>: New values.
2053 (raw_bkpt_type_to_target_hw_bp_type): New function.
2054 (find_enabled_raw_code_breakpoint_at): New function.
2055 (find_raw_breakpoint_at): New type and size parameters. Use them.
2056 (insert_memory_breakpoint): New function, based off
2057 set_raw_breakpoint_at.
2058 (remove_memory_breakpoint): New function.
2059 (set_raw_breakpoint_at): Reimplement.
2060 (set_breakpoint): New, based on set_breakpoint_at.
2061 (set_breakpoint_at): Reimplement.
2062 (delete_raw_breakpoint): Go through the_target->remove_point
2063 instead of assuming memory breakpoints.
2064 (find_gdb_breakpoint_at): Delete.
2065 (Z_packet_to_bkpt_type, Z_packet_to_raw_bkpt_type): New functions.
2066 (find_gdb_breakpoint): New function.
2067 (set_gdb_breakpoint_at): Delete.
2068 (z_type_supported): New function.
2069 (set_gdb_breakpoint_1): New function, loosely based off
2070 set_gdb_breakpoint_at.
2071 (check_gdb_bp_preconditions, set_gdb_breakpoint): New functions.
2072 (delete_gdb_breakpoint_at): Delete.
2073 (delete_gdb_breakpoint_1): New function, loosely based off
2074 delete_gdb_breakpoint_at.
2075 (delete_gdb_breakpoint): New function.
2076 (clear_gdb_breakpoint_conditions): Rename to ...
2077 (clear_breakpoint_conditions): ... this. Don't handle a NULL
2078 breakpoint.
2079 (add_condition_to_breakpoint): Make static.
2080 (add_breakpoint_condition): Take a struct breakpoint pointer
2081 instead of an address. Adjust.
2082 (gdb_condition_true_at_breakpoint): Rename to ...
2083 (gdb_condition_true_at_breakpoint_z_type): ... this, and add
2084 z_type parameter.
2085 (gdb_condition_true_at_breakpoint): Reimplement.
2086 (add_breakpoint_commands): Take a struct breakpoint pointer
2087 instead of an address. Adjust.
2088 (gdb_no_commands_at_breakpoint): Rename to ...
2089 (gdb_no_commands_at_breakpoint_z_type): ... this. Add z_type
2090 parameter. Return true if no breakpoint was found. Change debug
2091 output.
2092 (gdb_no_commands_at_breakpoint): Reimplement.
2093 (run_breakpoint_commands): Rename to ...
2094 (run_breakpoint_commands_z_type): ... this. Add z_type parameter,
2095 and change return type to boolean.
2096 (run_breakpoint_commands): New function.
2097 (gdb_breakpoint_here): Also check for Z1 breakpoints.
2098 (uninsert_raw_breakpoint): Don't try to reinsert a disabled
2099 breakpoint. Go through the_target->remove_point instead of
2100 assuming memory breakpoint.
2101 (uninsert_breakpoints_at, uninsert_all_breakpoints): Uninsert
2102 software and hardware breakpoints.
2103 (reinsert_raw_breakpoint): Go through the_target->insert_point
2104 instead of assuming memory breakpoint.
2105 (reinsert_breakpoints_at, reinsert_all_breakpoints): Reinsert
2106 software and hardware breakpoints.
2107 (check_breakpoints, breakpoint_here, breakpoint_inserted_here):
2108 Check both software and hardware breakpoints.
2109 (validate_inserted_breakpoint): Assert the breakpoint is a
2110 software breakpoint. Set the inserted flag to -1 instead of
2111 setting shlib_disabled.
2112 (delete_disabled_breakpoints): Adjust.
2113 (validate_breakpoints): Only validate software breakpoints.
2114 Adjust to inserted flag change.
2115 (check_mem_read, check_mem_write): Skip breakpoint types other
2116 than software breakpoints. Adjust to inserted flag change.
2117 * mem-break.h (enum raw_bkpt_type): New enum.
2118 (raw_breakpoint, struct process_info): Forward declare.
2119 (Z_packet_to_target_hw_bp_type): Delete declaration.
2120 (raw_bkpt_type_to_target_hw_bp_type, Z_packet_to_raw_bkpt_type)
2121 (set_gdb_breakpoint, delete_gdb_breakpoint)
2122 (clear_breakpoint_conditions): New declarations.
2123 (set_gdb_breakpoint_at, clear_gdb_breakpoint_conditions): Delete.
2124 (breakpoint_inserted_here): Update comment.
2125 (add_breakpoint_condition, add_breakpoint_commands): Replace
2126 address parameter with a breakpoint pointer parameter.
2127 (gdb_breakpoint_here): Update comment.
2128 (delete_gdb_breakpoint_at): Delete.
2129 (insert_memory_breakpoint, remove_memory_breakpoint): Declare.
2130 * server.c (process_point_options): Take a struct breakpoint
2131 pointer instead of an address. Adjust.
2132 (process_serial_event) <Z/z packets>: Use set_gdb_breakpoint and
2133 delete_gdb_breakpoint.
2134 * spu-low.c (spu_target_ops): Install NULL as
2135 supports_z_point_type method.
2136 * target.h: Include mem-break.h.
2137 (struct target_ops) <prepare_to_access_memory>: Update comment.
2138 <supports_z_point_type>: New field.
2139 <insert_point, remove_point>: Take an enum raw_bkpt_type argument
2140 instead of a char. Also take a raw breakpoint pointer.
2141 * win32-arm-low.c (the_low_target): Install NULL as
2142 supports_z_point_type.
2143 * win32-i386-low.c (i386_supports_z_point_type): New function.
2144 (i386_insert_point, i386_remove_point): Adjust to new interface.
2145 (the_low_target): Install i386_supports_z_point_type.
2146 * win32-low.c (win32_supports_z_point_type): New function.
2147 (win32_insert_point, win32_remove_point): Adjust to new interface.
2148 (win32_target_ops): Install win32_supports_z_point_type.
2149 * win32-low.h (struct win32_target_ops):
2150 <supports_z_point_type>: New method.
2151 <insert_point, remove_point>: Take an enum raw_bkpt_type argument
2152 instead of a char. Also take a raw breakpoint pointer.
2153
932539e3
PA
21542014-05-20 Pedro Alves <palves@redhat.com>
2155
2156 * mem-break.h: Include break-common.h.
2157 (Z_PACKET_SW_BP, Z_PACKET_HW_BP, Z_PACKET_WRITE_WP)
2158 (Z_PACKET_READ_WP, Z_PACKET_ACCESS_WP): New defines.
2159 (Z_packet_to_target_hw_bp_type): New declaration.
2160 * mem-break.c (Z_packet_to_target_hw_bp_type): New function.
2161 * i386-low.c (Z_PACKET_HW_BP, Z_PACKET_WRITE_WP, Z_PACKET_READ_WP)
2162 (Z_PACKET_ACCESS_WP): Delete macros.
2163 (Z_packet_to_hw_type): Delete function.
2164 * i386-low.h: Don't include break-common.h here.
2165 (Z_packet_to_hw_type): Delete declaration.
2166 * linux-x86-low.c (x86_insert_point, x86_insert_point): Call
2167 Z_packet_to_target_hw_bp_type instead of Z_packet_to_hw_type.
2168 * win32-i386-low.c (i386_insert_point, i386_remove_point): Call
2169 Z_packet_to_target_hw_bp_type instead of Z_packet_to_hw_type.
2170 * linux-aarch64-low.c: Don't include break-common.h here.
2171 (Z_PACKET_SW_BP, Z_PACKET_HW_BP, Z_PACKET_WRITE_WP)
2172 (Z_PACKET_READ_WP, Z_PACKET_ACCESS_WP): Delete macros.
2173 (Z_packet_to_target_hw_bp_type): Delete function.
2174 * linux-mips-low.c (rsp_bp_type_to_target_hw_bp_type): Delete
2175 function.
2176 (mips_insert_point, mips_remove_point): Use
2177 Z_packet_to_target_hw_bp_type.
2178
4ff0d3d8
PA
21792014-05-20 Pedro Alves <palves@redhat.com>
2180
2181 * linux-aarch64-low.c: Include break-common.h.
2182 (enum target_point_type): Delete.
2183 (Z_packet_to_point_type): Rename to ...
2184 (Z_packet_to_target_hw_bp_type): ... this, and return a
2185 target_hw_bp_type instead.
2186 (aarch64_show_debug_reg_state): Take an enum target_hw_bp_type
2187 instead of an enum target_point_type.
2188 (aarch64_point_encode_ctrl_reg): Likewise. Compute type mask from
2189 breakpoint type.
2190 (aarch64_dr_state_insert_one_point)
2191 (aarch64_dr_state_remove_one_point, aarch64_handle_breakpoint)
2192 (aarch64_handle_aligned_watchpoint)
2193 (aarch64_handle_unaligned_watchpoint, aarch64_handle_watchpoint):
2194 Take an enum target_hw_bp_type instead of an enum
2195 target_point_type.
2196 (aarch64_supports_z_point_type): New function.
2197 (aarch64_insert_point, aarch64_remove_point): Use it. Adjust to
2198 use Z_packet_to_target_hw_bp_type.
2199
786dc519
JB
22002014-05-20 Joel Brobecker <brobecker@adacore.com>
2201
2202 * configure.ac: Only use -Werror by default when DEVELOPMENT
2203 is true.
2204 * configure: Regenerate.
2205
9e0aa64f
JK
22062014-05-19 Jan Kratochvil <jan.kratochvil@redhat.com>
2207
2208 Fix gdbserver qGetTLSAddr for x86_64 -m32.
2209 * linux-x86-low.c (X86_64_USER_REGS): New.
2210 (x86_fill_gregset): Call memset for BUF first in x86_64 -m32 case.
2211
2b577b92
YQ
22122014-04-28 Yao Qi <yao@codesourcery.com>
2213
2214 * Makefile.in (i386-avx512.c): Fix the typo of generated file
2215 name.
2216
94611da2
PA
22172014-04-25 Pedro Alves <palves@redhat.com>
2218
2219 PR server/16255
2220 * linux-low.c (linux_attach_fail_reason_string): New function.
2221 (linux_attach_lwp): Delete.
2222 (linux_attach_lwp_1): Rename to ...
2223 (linux_attach_lwp): ... this. Take a ptid instead of a pid as
2224 argument. Remove "initial" parameter. Return int instead of
2225 void. Don't error or warn here.
2226 (linux_attach): Adjust to call linux_attach_lwp. Call error on
2227 failure to attach to the tgid. Call warning when failing to
2228 attach to an lwp.
2229 * linux-low.h (linux_attach_lwp): Take a ptid instead of a pid as
2230 argument. Remove "initial" parameter. Return int instead of
2231 void. Don't error or warn here.
2232 (linux_attach_fail_reason_string): New declaration.
2233 * thread-db.c (attach_thread): Adjust to linux_attach_lwp's
2234 interface change. Use linux_attach_fail_reason_string.
2235
01f9f808
MS
22362014-04-24 Michael Sturm <michael.sturm@mintel.com>
2237 Walfred Tedeschi <walfred.tedeschi@intel.com>
2238
2239 * Makefile.in: Added rules to handle new files
2240 i386-avx512.c i386-avx512-linux.c amd64-avx512.c
2241 amd64-avx512-linux.c x32-avx512.c x32-avx512-linux.c.
2242 * configure.srv (srv_i386_regobj): Add i386-avx512.o.
2243 (srv_i386_linux_regobj): Add i386-avx512-linux.o.
2244 (srv_amd64_regobj): Add amd64-avx512.o and x32-avx512.o.
2245 (srv_amd64_linux_regobj): Add amd64-avx512-linux.o and
2246 x32-avx512-linux.o.
2247 (srv_i386_32bit_xmlfiles): Add i386/32bit-avx512.xml.
2248 (srv_i386_64bit_xmlfiles): Add i386/64bit-avx512.xml.
2249 (srv_amd64_xmlfiles): Add i386/amd64-avx512.xml and
2250 i386/x32-avx512.xml.
2251 (srv_i386_linux_xmlfiles): Add i386/i386-avx512-linux.xml.
2252 (srv_amd64_linux_xmlfiles): Add i386/amd64-avx512-linux.xml and
2253 i386/x32-avx512-linux.xml.
2254 * i387-fp.c (num_avx512_k_registers): New constant for number
2255 of K registers.
2256 (num_avx512_zmmh_low_registers): New constant for number of
2257 lower ZMM registers (0-15).
2258 (num_avx512_zmmh_high_registers): New constant for number of
2259 higher ZMM registers (16-31).
2260 (num_avx512_ymmh_registers): New contant for number of higher
2261 YMM registers (ymm16-31 added by avx521 on x86_64).
2262 (num_avx512_xmm_registers): New constant for number of higher
2263 XMM registers (xmm16-31 added by AVX512 on x86_64).
2264 (struct i387_xsave): Add space for AVX512 registers.
2265 (i387_cache_to_xsave): Change raw buffer size to 64 characters.
2266 Add code to handle AVX512 registers.
2267 (i387_xsave_to_cache): Add code to handle AVX512 registers.
2268 * linux-x86-low.c (init_registers_amd64_avx512_linux): New
2269 prototypei from generated file.
2270 (tdesc_amd64_avx512_linux): Likewise.
2271 (init_registers_x32_avx512_linux): Likewise.
2272 (tdesc_x32_avx512_linux): Likewise.
2273 (init_registers_i386_avx512_linux): Likewise.
2274 (tdesc_i386_avx512_linux): Likewise.
2275 (x86_64_regmap): Add AVX512 registers.
2276 (x86_linux_read_description): Add code to handle AVX512 XSTATE
2277 mask.
2278 (initialize_low_arch): Add code to initialize AVX512 registers.
2279
51aa91f9
PA
22802014-04-23 Pedro Alves <palves@redhat.com>
2281
2282 * mem-break.c (find_gdb_breakpoint_at): Make static.
2283 * mem-break.h (find_gdb_breakpoint_at): Delete declaration.
2284
a4165e94
PA
22852014-04-23 Pedro Alves <palves@redhat.com>
2286
2287 * i386-low.c: Don't include break-common.h here.
2288 (i386_low_insert_watchpoint, i386_low_remove_watchpoint): Change
2289 prototype to take target_hw_bp_type as argument instead of a Z
2290 packet char.
2291 * i386-low.h: Include break-common.h here.
2292 (Z_packet_to_hw_type): Declare.
2293 (i386_low_insert_watchpoint, i386_low_remove_watchpoint): Change
2294 prototypes.
2295 * linux-x86-low.c (x86_insert_point): Convert the packet number to
2296 a target_hw_bp_type before calling i386_low_insert_watchpoint.
2297 (x86_remove_point): Convert the packet number to a
2298 target_hw_bp_type before calling i386_low_remove_watchpoint.
2299 * win32-i386-low.c (i386_insert_point): Convert the packet number
2300 to a target_hw_bp_type before calling i386_low_insert_watchpoint.
2301 (i386_remove_point): Convert the packet number to a
2302 target_hw_bp_type before calling i386_low_remove_watchpoint.
2303
b8acf843
PA
23042014-04-23 Pedro Alves <palves@redhat.com>
2305
2306 * utils.h (perror_with_name): Add ATTRIBUTE_NORETURN.
2307
d708bcd1
PA
23082014-04-10 Pedro Alves <palves@redhat.com>
2309
2310 * mem-break.c (add_breakpoint_condition, add_breakpoint_commands):
2311 Check if the condition or command is NULL before checking if the
2312 breakpoint is known. On success, return true.
2313 * mem-break.h (add_breakpoint_condition): Document return.
2314 (add_breakpoint_commands): Add describing comment.
2315 * server.c (skip_to_semicolon): New function.
2316 (process_point_options): Use it.
2317
2eec7d5b
PA
23182014-04-09 Pedro Alves <palves@redhat.com>
2319
2320 * linux-low.c (linux_read_loadmap): Pass current_inferior directly
2321 to lwpid_of.
2322
fa96cb38
PA
23232014-02-27 Pedro Alves <palves@redhat.com>
2324
2325 PR 12702
2326 * inferiors.h (A_I_NEXT, ALL_INFERIORS_TYPE, ALL_PROCESSES): New
2327 macros.
2328 * linux-low.c (delete_lwp, handle_extended_wait): Add debug
2329 output.
2330 (last_thread_of_process_p): Take a PID argument instead of a
2331 thread pointer.
2332 (linux_wait_for_lwp): Delete.
2333 (num_lwps, check_zombie_leaders, not_stopped_callback): New
2334 functions.
2335 (linux_low_filter_event): New function, party factored out from
2336 linux_wait_for_event.
2337 (linux_wait_for_event): Rename to ...
2338 (linux_wait_for_event_filtered): ... this. Add new filter ptid
2339 argument. Partly rewrite. Always use waitpid(-1, WNOHANG) and
2340 sigsuspend. Check for zombie leaders.
2341 (linux_wait_for_event): Reimplement as wrapper around
2342 linux_wait_for_event_filtered.
2343 (linux_wait_1): Handle TARGET_WAITKIND_NO_RESUMED. Assume that if
2344 a normal or signal exit is seen, it's the whole process exiting.
2345 (wait_for_sigstop): No longer a for_each_inferior callback.
2346 Rewrite on top of linux_wait_for_event_filtered.
2347 (stop_all_lwps): Call wait_for_sigstop directly.
2348 * server.c (resume, handle_target_event): Handle
2349 TARGET_WAITKIND_NO_RESUMED.
2350
d763de10
JB
23512014-02-26 Joel Brobecker <brobecker@adacore.com>
2352
2353 * win32-low.c (psapi_get_dll_name,
2354 * win32_CreateToolhelp32Snapshot): Delete.
2355 (win32_CreateToolhelp32Snapshot, win32_Module32First)
2356 (win32_Module32Next, load_toolhelp, toolhelp_get_dll_name):
2357 Delete.
2358 (handle_load_dll): Add function description.
2359 Remove code using psapi_get_dll_name and toolhelp_get_dll_name.
2360
850a0f76
JB
23612014-02-26 Joel Brobecker <brobecker@adacore.com>
2362
2363 * win32-low.c (win32_add_one_solib): Add 0x1000 to load_addr.
2364 Add comment.
2365 (win32_add_all_dlls): Remove 0x1000 offset applied to DLL
2366 base address when calling win32_add_one_solib.
2367 (handle_load_dll): Delete local variable load_addr.
2368 Remove 0x1000 offset applied to DLL base address when calling
2369 win32_add_one_solib.
2370 (handle_unload_dll): Add comment.
2371
f25b3fc3
JB
23722014-02-26 Joel Brobecker <brobecker@adacore.com>
2373
2374 * win32-low.c (win32_add_all_dlls): Renames
2375 win32_ensure_ntdll_loaded. Rewrite function documentation.
2376 Adjust implementation to always load all DLLs.
2377 Add 0x1000 offset to DLL base address when calling
2378 win32_add_one_solib.
2379 (child_initialization_done): New static global.
2380 (do_initial_child_stuff): Set child_initialization_done to
2381 zero during child initialization, and 1 after. Replace call
2382 to win32_ensure_ntdll_loaded by call to win32_add_all_dlls.
2383 Add comment.
2384 (match_dll_by_basename, dll_is_loaded_by_basename): Delete.
2385 (handle_unload_dll): Add function documentation.
2386 (get_child_debug_event): Ignore load and unload DLL events
2387 during child initialization.
2388
d86d4aaf
DE
23892014-02-20 Doug Evans <dje@google.com>
2390
3bc32da3 2391 Remove global all_lwps.
d86d4aaf
DE
2392 * inferiors.h (ptid_of): Move here from linux-low.h.
2393 (pid_of, lwpid_of): Ditto.
2394 * linux-aarch64-low.c (debug_reg_change_callback): Update, "entry"
2395 parameter is a struct thread_info * now.
2396 (aarch64_notify_debug_reg_change): Fetch pid from current_inferior
2397 directly. Pass &all_threads to find_inferior instead of &all_lwps.
2398 (aarch64_stopped_data_address): Fetch lwpid from current_inferior
2399 directly.
2400 (aarch64_linux_prepare_to_resume): Fetch ptid from thread.
2401 (aarch64_arch_setup): Fetch lwpid from current_inferior directly.
2402 * linux-arm-low.c (update_registers_callback): Update, "entry"
2403 parameter is a struct thread_info * now.
2404 Fetch lwpid from current_inferior directly.
2405 (arm_insert_point): Pass &all_threads to find_inferior instead of
2406 &all_lwps.
2407 (arm_remove_point): Ditto.
2408 (arm_stopped_by_watchpoint): Fetch lwp from current_inferior.
2409 (arm_prepare_to_resume): Fetch pid from thread.
2410 (arm_read_description): Fetch lwpid from current_inferior directly.
2411 * linux-low.c (all_lwps): Delete.
2412 (delete_lwp): Delete call to remove_inferior.
2413 (handle_extended_wait): Fetch lwpid from thread.
2414 (add_lwp): Don't set lwp->entry.id. Remove call to
2415 add_inferior_to_list.
2416 (linux_attach_lwp_1): Fetch pid from current_inferior directly.
2417 (linux_kill_one_lwp): Fetch ptid,lwpid from thread.
2418 (kill_one_lwp_callback): Ditto.
2419 (linux_kill): Don't dereference NULL pointer.
2420 Fetch ptid,lwpid from thread.
2421 (get_detach_signal): Fetch ptid from thread.
2422 (linux_detach_one_lwp): Fetch ptid,lwpid from thread.
2423 Simplify call to regcache_invalidate_thread.
2424 (delete_lwp_callback): Update, "entry" parameter is a
2425 struct thread_info * now. Fetch pid from thread.
2426 (linux_mourn): Pass &all_threads to find_inferior instead of &all_lwps.
2427 (status_pending_p_callback): Update, "entry" parameter is a
2428 struct thread_info * now. Fetch ptid from thread.
2429 (find_lwp_pid): Update, "entry" parameter is a
2430 struct thread_info * now.
2431 (linux_wait_for_lwp): Fetch pid from thread.
2432 (linux_fast_tracepoint_collecting): Fetch lwpid from thread.
2433 (maybe_move_out_of_jump_pad): Fetch lwpid from current_inferior.
2434 (enqueue_one_deferred_signal): Fetch lwpid from thread.
2435 (dequeue_one_deferred_signal): Ditto.
2436 (cancel_breakpoint): Fetch ptid from current_inferior.
2437 (linux_wait_for_event): Pass &all_threads to find_inferior,
2438 not &all_lwps. Fetch ptid, lwpid from thread.
2439 (count_events_callback): Update, "entry" parameter is a
2440 struct thread_info * now.
2441 (select_singlestep_lwp_callback): Ditto.
2442 (select_event_lwp_callback): Ditto.
2443 (cancel_breakpoints_callback): Ditto.
2444 (linux_cancel_breakpoints): Pass &all_threads to find_inferior,
2445 not &all_lwps.
2446 (select_event_lwp): Ditto. Fetch ptid from event_thread.
2447 (unsuspend_one_lwp): Update, "entry" parameter is a
2448 struct thread_info * now.
2449 (unsuspend_all_lwps): Pass &all_threads to find_inferior,
2450 not &all_lwps.
2451 (linux_stabilize_threads): Ditto. And for for_each_inferior.
2452 Fetch lwpid from thread, not lwp.
2453 (linux_wait_1): Fetch ptid, lwpid from current_inferior.
2454 Pass &all_threads to find_inferior, not &all_lwps.
2455 (send_sigstop): Fetch lwpid from thread, not lwp.
2456 (send_sigstop_callback): Update, "entry" parameter is a
2457 struct thread_info * now.
2458 (suspend_and_send_sigstop_callback): Ditto.
2459 (wait_for_sigstop): Ditto. Fetch ptid, lwpid from thread, lwp.
2460 (stuck_in_jump_pad_callback): Update, "entry" parameter is a
2461 struct thread_info * now.
2462 (move_out_of_jump_pad_callback): Ditto. Fetch ptid, lwpid
2463 from thread, lwp.
2464 (lwp_running): Update, "entry" parameter is a
2465 struct thread_info * now.
2466 (stop_all_lwps): Fetch ptid from thread.
2467 Pass &all_threads to find_inferior, for_each_inferior, not &all_lwps.
2468 (linux_resume_one_lwp): Fetch lwpid from thread.
2469 (linux_set_resume_request): Update, "entry" parameter is a
2470 struct thread_info * now. Fetch pid, lwpid from thread.
2471 (resume_status_pending_p): Update, "entry" parameter is a
2472 struct thread_info * now.
2473 (need_step_over_p): Ditto. Fetch lwpid from thread.
2474 (start_step_over): Fetch lwpid from thread.
2475 (linux_resume_one_thread): Update, "entry" parameter is a
2476 struct thread_info * now. Fetch lwpid from thread.
2477 (linux_resume): Pass &all_threads to find_inferior, not &all_lwps.
2478 (proceed_one_lwp): Update, "entry" parameter is a
2479 struct thread_info * now. Fetch lwpid from thread.
2480 (unsuspend_and_proceed_one_lwp): Update, "entry" parameter is a
2481 struct thread_info * now.
2482 (proceed_all_lwps): Pass &all_threads to find_inferior, not &all_lwps.
2483 (unstop_all_lwps): Ditto. Fetch lwpid from thread.
2484 (regsets_fetch_inferior_registers): Fetch lwpid from current_inferior
2485 directly.
2486 (regsets_store_inferior_registers): Ditto.
2487 (fetch_register, store_register): Ditto.
2488 (linux_read_memory, linux_write_memory): Ditto.
2489 (linux_request_interrupt): Ditto.
2490 (linux_read_auxv): Ditto.
2491 (linux_xfer_siginfo): Ditto.
2492 (linux_qxfer_spu): Ditto.
2493 (linux_qxfer_libraries_svr4): Ditto.
2494 * linux-low.h (ptid_of, pid_of, lwpid_of): Delete,
2495 moved to inferiors.h.
2496 (get_lwp): Delete.
2497 (get_thread_lwp): Update.
2498 (struct lwp_info): Delete member "entry". Simplify comment for
2499 member "thread".
2500 (all_lwps): Delete.
2501 * linux-mips-low.c (mips_read_description): Fetch lwpid from
2502 current_inferior directly.
2503 (update_watch_registers_callback): Update, "entry" parameter is a
2504 struct thread_info * now. Fetch pid from thread.
2505 (mips_linux_prepare_to_resume): Fetch ptid from thread.
2506 (mips_insert_point): Fetch lwpid from current_inferior.
2507 Pass &all_threads to find_inferior, not &all_lwps.
2508 (mips_remove_point): Pass &all_threads to find_inferior, not &all_lwps.
2509 (mips_stopped_by_watchpoint): Fetch lwpid from current_inferior
2510 directly.
2511 (mips_stopped_data_address): Ditto.
2512 * linux-s390-low.c (s390_arch_setup): Fetch pid from current_inferior
2513 directly.
2514 * linux-tile-low.c (tile_arch_setup): Ditto.
2515 * linux-x86-low.c (x86_get_thread_area): Fetch lwpid from thread.
2516 (update_debug_registers_callback): Update, "entry" parameter is a
2517 struct thread_info * now. Fetch pid from thread.
2518 (i386_dr_low_set_addr): Fetch pid from current_inferior directly.
2519 Pass &all_threads to find_inferior, not &all_lwps.
2520 (i386_dr_low_get_addr): Fetch ptid from current_inferior directly.
2521 (i386_dr_low_set_control): Fetch pid from current_inferior directly.
2522 Pass &all_threads to find_inferior, not &all_lwps.
2523 (i386_dr_low_get_control): Fetch ptid from current_inferior directly.
2524 (i386_dr_low_get_status): Ditto.
2525 (x86_linux_prepare_to_resume): Fetch ptid from thread.
2526 (x86_siginfo_fixup): Fetch lwpid from current_inferior directly.
2527 (x86_linux_read_description): Ditto.
2528 * proc-service.c (ps_getpid): Fetch pid from current_inferior directly.
2529
3b8361aa
DE
25302014-02-20 Doug Evans <dje@google.com>
2531
2532 * inferiors.c (get_first_inferior): Fix buglet.
2533
f7667f0d
DE
25342014-02-19 Doug Evans <dje@google.com>
2535
2536 * gdbthread.h (add_thread): Change result type to struct thread_info *.
2537 * inferiors.c (add_thread): Change result type to struct thread_info *.
2538 All callers updated.
2539 (add_lwp): Call add_thread here instead of in callers.
2540 All callers updated.
2541 * linux-low.h (get_lwp_thread): Rewrite.
2542 (struct lwp_info): New member "thread".
2543
b3312d80
DE
25442014-02-19 Doug Evans <dje@google.com>
2545
2546 * linux-low.c (add_lwp): Change result to struct lwp_info *.
2547 All callers updated.
2548
ecc6f45c
DE
25492014-02-19 Doug Evans <dje@google.com>
2550
2551 * inferiors.c (add_thread): Fix whitespace.
2552
649ebbca
DE
25532014-02-19 Doug Evans <dje@google.com>
2554
2555 * dll.c (clear_dlls): Replace accessing list implemention details
2556 with API function.
2557 * gdbthread.h (get_first_thread): Declare.
2558 * inferiors.c (for_each_inferior_with_data): New function.
2559 (get_first_thread): New function.
2560 (find_thread_ptid): Simplify.
2561 (get_first_inferior): New function.
2562 (clear_list): Delete.
2563 (one_inferior_p): New function.
2564 (clear_inferior_list): New function.
2565 (clear_inferiors): Update.
2566 * inferiors.h (for_each_inferior_with_data): Declare.
2567 (clear_inferior_list): Declare.
2568 (one_inferior_p): Declare.
2569 (get_first_inferior): Declare.
2570 * linux-low.c (linux_wait_for_event): Replace accessing list
2571 implemention details with API function.
2572 * server.c (target_running): Ditto.
2573 (accumulate_file_name_length): New function.
2574 (emit_dll_description): New function.
2575 (handle_qxfer_libraries): Replace accessing list implemention
2576 details with API function.
2577 (handle_qxfer_threads_worker): New function.
2578 (handle_qxfer_threads_proper): Replace accessing list implemention
2579 details with API function.
2580 (handle_query): Ditto.
2581 (visit_actioned_threads_callback_ftype): New typedef.
2582 (visit_actioned_threads_data): New struct.
2583 (visit_actioned_threads): Rewrite to be find_inferior callback.
2584 (resume): Call find_inferior.
2585 (handle_status): Replace accessing list implemention
2586 details with API function.
2587 (process_serial_event): Replace accessing list implemention details
2588 with API function.
2589 * target.c (set_desired_inferior): Replace accessing list implemention
2590 details with API function.
2591 * tracepoint.c (same_process_p): New function.
2592 (gdb_agent_about_to_close): Replace accessing list implemention
2593 details with API function.
2594 * win32-low.c (child_delete_thread): Replace accessing list
2595 implemention details with API function.
2596 (match_dll_by_basename): New function.
2597 (dll_is_loaded_by_basename): New function.
2598 (win32_ensure_ntdll_loaded): Replace accessing list implemention
2599 details call to dll_is_loaded_by_basename.
2600
80894984
DE
26012014-02-19 Doug Evans <dje@google.com>
2602
2603 * dll.h (struct dll_info): Add comment.
2604 * gdbthread.h (struct thread_info): Add comment.
2605 (current_ptid): Simplify.
2606 * inferiors.c (add_process): Update.
2607 (remove_process): Update.
2608 * inferiors.h (struct process_info): Rename member "head" to "entry".
2609 * linux-low.c (delete_lwp): Update.
2610 (add_lwp): Update.
2611 (last_thread_of_process_p): Update.
2612 (kill_one_lwp_callback, linux_kill): Update.
2613 (status_pending_p_callback): Update.
2614 (wait_for_sigstop): Update. Simplify read of ptid.
2615 (start_step_over): Update.
2616 * linux-low.h (ptid_of, pid_of, lwpid_of): Update.
2617 (get_lwp_thread): Update.
2618 (struct lwp_info): Rename member "head" to "entry".
2619 * regcache.h (inferior_list_entry): Delete.
2620 * server.c (kill_inferior_callback): Update.
2621 (detach_or_kill_inferior_callback): Update.
2622 (print_started_pid): Update.
2623 (print_attached_pid): Update.
2624 (process_serial_event): Simplify read of ptid.
2625 * thread-db.c (thread_db_create_event): Update.
2626 (thread_db_get_tls_address): Update.
2627 * win32-low.c (current_inferior_ptid): Simplify.
2628
46917d26
TT
26292014-02-19 Tom Tromey <tromey@redhat.com>
2630
2631 * target.h (struct target_ops) <supports_btrace>: Add target_ops
2632 argument.
2633 (target_supports_btrace): Update.
2634
0759a81e
YQ
26352014-02-14 Yao Qi <yao@codesourcery.com>
2636
2637 * Makefile.in (IPA_OBJS): Append rsp-low-ipa.o.
2638 (rsp-low-ipa.o): New target.
2639
a7191e8b
TT
26402014-02-12 Tom Tromey <tromey@redhat.com>
2641
2642 * ax.c (gdb_parse_agent_expr): Use hex2bin, not
2643 convert_ascii_to_int.
2644 * regcache.c (registers_to_string): Likewise.
2645 * remote-utils.c (decode_M_packet): Likewise.
2646 * server.c (process_serial_event): Likewise.
2647
ff0e980e
TT
26482014-02-12 Tom Tromey <tromey@redhat.com>
2649
2650 * server.c (handle_query, handle_v_run): Use hex2bin, not
2651 unhexify.
2652 * tracepoint.c (cmd_qtdpsrc, cmd_qtdv, cmd_qtnotes): Likewise.
2653
e9371aff
TT
26542014-02-12 Tom Tromey <tromey@redhat.com>
2655
2656 * ax.c (gdb_unparse_agent_expr): Use bin2hex, not
2657 convert_int_to_ascii.
2658 * regcache.c (registers_to_string, collect_register_as_string):
2659 Likewise.
2660 * remote-utils.c (look_up_one_symbol, relocate_instruction):
2661 Likewise.
2662 * server.c (process_serial_event): Likewise.
2663 * tracepoint.c (cmd_qtstatus, response_source, response_tsv)
2664 (cmd_qtbuffer, cstr_to_hexstr): Likewise.
2665
971dc0b8
TT
26662014-02-12 Tom Tromey <tromey@redhat.com>
2667
2668 * remote-utils.c (look_up_one_symbol, monitor_output): Use
2669 bin2hex, not hexify.
2670 * tracepoint.c (cmd_qtstatus): Likewise.
2671
0a822afb
TT
26722014-02-12 Tom Tromey <tromey@redhat.com>
2673
2674 * remote-utils.c (monitor_output): Pass explicit length to
2675 hexify.
2676
9c3d6531
TT
26772014-02-12 Tom Tromey <tromey@redhat.com>
2678
2679 * tracepoint.c: Include rsp-low.h.
2680 * server.c: Include rsp-low.h.
2681 * remote-utils.h (convert_ascii_to_int, convert_int_to_ascii)
2682 (unhexify, hexify, remote_escape_output, unpack_varlen_hex): Don't
2683 declare.
2684 * remote-utils.c: Include rsp-low.h.
2685 (fromhex, hexchars, ishex, unhexify, tohex, hexify)
2686 (remote_escape_output, remote_unescape_input, unpack_varlen_hex)
2687 (convert_int_to_ascii, convert_ascii_to_int): Move to
2688 common/rsp-low.c.
2689 * regcache.c: Include rsp-low.h.
2690 * ax.c: Include rsp-low.h.
2691 * Makefile.in (SFILES): Add common/rsp-low.c.
2692 (OBS): Add rsp-low.o.
2693 (rsp-low.o): New target.
2694
01fd3ea5
TT
26952014-02-12 Tom Tromey <tromey@redhat.com>
2696
2697 * utils.h (pulongest, plongest, phex_nz): Don't declare.
2698 Include print-utils.h.
2699 * utils.c (NUMCELLS, CELLSIZE, get_cell, decimal2str, pulongest)
2700 (plongest, thirty_two, phex_nz): Remove.
2701 * Makefile.in (SFILES): Add common/print-utils.c.
2702 (OBS): Add print-utils.o.
2703 (print-utils-ipa.o): New target.
2704 (print-utils.o): New target.
2705 (IPA_OBJS): Add print-utils-ipa.o.
2706
e99dc820
TT
27072014-02-06 Tom Tromey <tromey@redhat.com>
2708
2709 * Makefile.in (SFILES): Fix indentation.
2710
ee1e2d4f
DE
27112014-02-05 Doug Evans <dje@google.com>
2712
2713 * linux-low.c (linux_wait_for_event): Improve comment.
2714 (linux_wait_1): Keep current_inferior in sync with event_child.
2715
f5a02773
DE
27162014-01-22 Doug Evans <dje@google.com>
2717
2718 * gdbthread.h (gdb_id_to_thread): Delete, unused.
2719
87ce2a04
DE
27202014-01-22 Doug Evans <dje@google.com>
2721
2722 * configure.ac (AC_CHECK_FUNCS): Add test for gettimeofday.
2723 * configure: Regenerate.
2724 * config.in: Regenerate.
2725 * Makefile.in (SFILES): Add debug.c.
2726 (OBS): Add debug.o.
2727 * debug.c: New file.
2728 * debug.h: New file.
2729 * linux-aarch64-low.c (*): Update all debugging printfs to use
2730 debug_printf instead of fprintf.
2731 * linux-arm-low.c (*): Ditto.
2732 * linux-cris-low.c (*): Ditto.
2733 * linux-crisv32-low.c (*): Ditto.
2734 * linux-m32r-low.c (*): Ditto.
2735 * linux-sparc-low.c (*): Ditto.
2736 * linux-x86.c (*): Ditto.
2737 * linux-low.c (*): Ditto.
2738 (linux_wait_1): Add calls to debug_enter, debug_exit.
2739 (linux_wait): Remove redundant debugging printf.
2740 (stop_all_lwps): Add calls to debug_enter, debug_exit.
2741 (linux_resume, unstop_all_lwps): Ditto.
2742 * mem-break.c (*): Update all debugging printfs to use
2743 debug_printf instead of fprintf.
2744 * remote-utils.c (*): Ditto.
2745 * thread-db.c (*): Ditto.
2746 * server.c #include <ctype.h>, "gdb_vecs.h".
2747 (debug_threads): Moved to debug.c.
2748 (*): Update all debugging printfs to use debug_printf instead of
2749 fprintf.
2750 (start_inferior): Replace call to fflush with call to debug_flush.
2751 (monitor_show_help): Mention set debug-format.
2752 (parse_debug_format_options): New function.
2753 (handle_monitor_command): Handle "monitor set debug-format".
2754 (gdbserver_usage): Mention --debug-format.
2755 (main): Parse --debug-format.
2756 * server.h (debug_threads): Declaration moved to debug.h.
2757 #include "debug.h".
2758 * tracepoint.c (trace_debug_1) [!IN_PROCESS_AGENT]: Add version of
2759 trace_debug_1 that uses debug_printf.
2760 (tracepoint_look_up_symbols): Update all debugging printfs to use
2761 debug_printf instead of fprintf.
2762
e671835b
BS
27632014-01-20 Baruch Siach <baruch@tkos.co.il>
2764
2765 * linux-xtensa-low.c: Include asm/ptrace.h instead of
2766 sys/ptrace.h.
2767
b5737fa9
PA
27682014-01-17 Pedro Alves <palves@redhat.com>
2769
ea38d2a9 2770 PR build/16445
c7faa97a
PA
2771 * linux-x86-low.c: Don't include elf/common.h if ELFMAG0 is
2772 defined after including gdb_proc_service.h.
b5737fa9 2773
40ed484e
DE
27742014-01-16 Doug Evans <dje@google.com>
2775
2776 * dll.c (UNSPECIFIED_CORE_ADDR): New macro.
2777 (match_dll): Use it.
2778
969c39fb
MM
27792014-01-16 Markus Metzger <markus.t.metzger@intel.com>
2780
2781 * target.h (target_ops) <read_btrace>: Change parameters and
2782 return type to allow error reporting.
2783 * server.c (handle_qxfer_btrace): Support delta reads. Pass
2784 trace reading errors on.
2785 * linux-low.c (linux_low_read_btrace): Pass trace reading
2786 errors on.
2787 (linux_low_disable_btrace): New.
2788
ab7f45ba
DE
27892014-01-15 Doug Evans <dje@google.com>
2790
2791 * inferiors.c (thread_id_to_gdb_id): Delete.
2792 * inferiors.h (thread_id_to_gdb_id): Delete.
2793
66af0f44
EZ
27942014-01-13 Eli Zaretskii <eliz@gnu.org>
2795
2796 * Makefile.in (INCLUDE_CFLAGS): Remove trailing slash from
2797 "-I$(srcdir)/../". Fixes MinGW compilation errors with old GCC
2798 versions.
2799
9939e131
PA
28002014-01-08 Pedro Alves <palves@redhat.com>
2801
2802 * server.c (handle_status): Don't discard previous queued stop
2803 replies or thread's pending status here.
2804 (main) <disconnection>: Do it here instead.
2805
b7ea362b
PA
28062014-01-08 Pedro Alves <palves@redhat.com>
2807
2808 * gdbthread.h (struct thread_info) <status_pending_p>: New field.
2809 * server.c (visit_actioned_threads, handle_pending_status): New
2810 function.
2811 (handle_v_cont): Factor out parts to ...
2812 (resume): ... this new function. If in all-stop, and a thread
2813 being resumed has a pending status, report it without actually
2814 resuming.
2815 (myresume): Adjust to use the new 'resume' function.
2816 (clear_pending_status_callback, set_pending_status_callback)
2817 (find_status_pending_thread_callback): New functions.
2818 (handle_status): Handle the case of multiple threads having
2819 interesting statuses to report. Report threads' real last signal
2820 instead of always reporting GDB_SIGNAL_TRAP. Look for a thread
2821 with an interesting thread to report the status for, instead of
2822 always reporting the status of the first thread.
2823
28498c42
JB
28242014-01-01 Joel Brobecker <brobecker@adacore.com>
2825
2826 * gdbserver.c (gdbserver_version): Set copyright year to 2014.
2827 * gdbreplay.c (gdbreplay_version): Likewise.
2828
f45c82da
YZ
28292013-12-18 Yufeng Zhang <yufeng.zhang@arm.com>
2830
2831 * linux-aarch64-low.c (aarch64_linux_set_debug_regs): Set
2832 iov.iov_len with the real length in use.
2833
379a5e2d
JB
28342013-12-13 Joel Brobecker <brobecker@adacore.com>
2835
2836 * Makefile.in (safe-ctype.o, lbasename.o): New rules.
2837 * configure.srv: Add safe-ctype.o and lbasename.o to srv_tgtobj
2838 for all targets that use win32-low.c.
2839 * win32-low.c (win32_ensure_ntdll_loaded): New function.
2840 (do_initial_child_stuff): Add call to win32_ensure_ntdll_loaded.
2841
4210d83e
PA
28422013-12-13 Pedro Alves <palves@redhat.com>
2843
2844 * target.c (mywait): Set OURSTATUS->KIND to TARGET_WAITKIND_STOPPED
2845 if equal to TARGET_WAITKIND_LOADED.
2846 * win32-low.c (cached_status): New static global.
2847 (win32_wait): Add declaration.
2848 (do_initial_child_stuff): Flush all initial pending debug events
2849 up to the initial breakpoint.
2850 (win32_wait): If CACHED_STATUS was set, return that instead
2851 of doing a real wait. Remove the code resuming the execution
2852 of the inferior after receiving a TARGET_WAITKIND_LOADED event
2853 during the initial phase. Also remove the code changing
2854 OURSTATUS->KIND from TARGET_WAITKIND_LOADED to
2855 TARGET_WAITKIND_STOPPED.
2856
e7f0d979
YQ
28572013-12-11 Yao Qi <yao@codesourcery.com>
2858
2859 * notif.c (handle_notif_ack): Return 0 if no notification
2860 matches.
2861
ebcf782c
DE
28622013-11-20 Doug Evans <dje@google.com>
2863
2864 * linux-low.c (linux_set_resume_request): Fix comment.
2865
20ad9378
DE
28662013-11-20 Doug Evans <dje@google.com>
2867
2868 * linux-low.c (resume_status_pending_p): Tweak comment.
2869
a196ebeb
WT
28702013-11-20 Walfred Tedeschi <walfred.tedeschi@intel.com>
2871
2872 * Makefile.in: Add i386-mpx.c, i386-mpx-linux.c, amd64-mpx.c,
2873 amd64-mpx-linux.c, x32-mpx.c and x32-mpx-linux.c generation.
2874 * configure.srv (srv_i386_regobj): Add i386-mpx.o.
2875 (srv_i386_linux_regobj): Add i386-mpx-linux.o.
2876 (srv_amd64_regobj): Add amd64-mpx.o.
2877 (srv_amd64_linux_regobj): Add amd64-mpx-linux.o.
2878 (srv_i386_32bit_xmlfiles): Add i386/32bit-mpx.xml.
2879 (srv_i386_64bit_xmlfiles): Add i386/64bit-mpx.xml.
2880 * i387-fp.c (num_pl_bnd_register) Added constant.
2881 (num_pl_bnd_cfg_registers) Added constant.
2882 (struct i387_xsave) Added reserved area and MPX fields.
2883 (i387_cache_to_xsave, i387_xsave_to_cache) Add MPX.
2884 * linux-x86-low.c (init_registers_i386_mpx_linux): Declare new
2885 function.
2886 (tdesc_i386_mpx_linux): Add MPX amd64 target.
2887 (init_registers_amd64_mpx_linux): Declare new function.
2888 (tdesc_amd64_mpx_linux): Add MPX amd64 target.
2889 (x86_64_regmap): Add MPX registers.
2890 (x86_linux_read_description): Add MPX case.
2891 (initialize_low_arch): Initialize MPX targets.
2892
0080a2f6
TT
28932013-11-18 Tom Tromey <tromey@redhat.com>
2894
2895 * configure: Rebuild.
2896 * configure.ac: Don't check for stdlib.h.
2897 * gdbreplay.c: Unconditionally include stdlib.h.
2898
2978b111
TT
28992013-11-18 Tom Tromey <tromey@redhat.com>
2900
2901 * config.in: Rebuild.
2902 * configure: Rebuild.
2903 * configure.ac: Don't use AC_HEADER_DIRENT.
2904
a3d08894
TT
29052013-11-18 Tom Tromey <tromey@redhat.com>
2906
2907 * server.h: Don't check HAVE_STRING_H.
2908 * gdbreplay.c: Don't check HAVE_STRING_H.
2909 * configure: Rebuild.
2910
0a5dd17d
TT
29112013-11-18 Tom Tromey <tromey@redhat.com>
2912
2913 * Makefile.in (gdbreplay$(EXEEXT)): Depend on and link against
2914 LIBGNU.
2915
1bd2f0ba
TT
29162013-11-08 Tom Tromey <tromey@redhat.com>
2917
2918 * configure, config.in: Rebuild.
2919 * configure.ac: Remove unused configury.
2920
3266f10b
TT
29212013-11-08 Tom Tromey <tromey@redhat.com>
2922
2923 * acinclude.m4: Include common.m4, codeset.m4.
2924 * configure, config.in: Rebuild.
2925 * configure.ac: Use GDB_AC_COMMON.
2926
6682d959
AA
29272013-11-06 Andreas Arnez <arnez@linux.vnet.ibm.com>
2928
2929 * linux-s390-low.c (HWCAP_S390_TE): New define.
2930 (s390_arch_setup): Consider the TE field in the HWCAP for
2931 determining 'have_regset_tdb'.
2932
fd0a4d76
SDJ
29332013-10-16 Sergio Durigan Junior <sergiodj@redhat.com>
2934
2935 PR gdb/16014
2936 * tracepoint.c (download_tracepoint_1): Remove unnecessary double
2937 call to sizeof.
2938
1a3d890b
PA
29392013-10-02 Pedro Alves <palves@redhat.com>
2940
2941 * server.c (process_serial_event): Don't output "GDBserver
2942 exiting" if GDB is connected through stdio.
2943 * target.c (mywait): Likewise, be silent if GDB is connected
2944 through stdio.
2945
97ad4581
JB
29462013-10-01 Joel Brobecker <brobecker@adacore.com>
2947
2948 * lynx-low.c (lynx_add_threads_after_attach): New function.
2949 (lynx_attach): Remove call to add_thread. Add call to
2950 lynx_add_threads_after_attach instead.
2951
5b4e221c
MF
29522013-09-28 Mike Frysinger <vapier@gentoo.org>
2953
2954 * configure.ac (AC_CHECK_HEADERS): Add sys/syscall.h
2955 * config.in, configure: Regenerated.
2956
ee47b2f8
YQ
29572013-09-18 Yao Qi <yao@codesourcery.com>
2958
2959 PR server/15959
2960 * server.c (start_inferior): Clear 'resume_info'.
2961
d6707650 29622013-09-16 Jiong Wang <jiwang@tilera.com>
0f63d4db 2963
d6707650
JW
2964 * linux-tile-low.c (tile_regsets): Modify the size field to 64-bit
2965 for each register.
2966
9243dd0e 29672013-09-16 Jiong Wang <jiwang@tilera.com>
0f63d4db 2968
9243dd0e
JW
2969 * configure.srv <tilegx*-*-linux*>: Remove linux-osdata.o from and add
2970 linux-tile-low.o to srv_tgtobj.
2971
c623a6ef
WN
29722013-09-16 Will Newton <will.newton@linaro.org>
2973
2974 * linux-aarch64-low.c (aarch64_linux_set_debug_regs): Zero
2975 out regs.
2976
fb71d39e
PA
29772013-09-06 Pedro Alves <palves@redhat.com>
2978
2979 * Makefile.in (gdb_proc_service_h, regdef_h, regcache_h)
2980 (signals_def, signals_h, ptid_h, ax_h, agent_h, linux_btrace_h)
2981 (linux_osdata_h, vec_h, gdb_vecs_h, host_defs_h, libiberty_h)
2982 (server_h, gdbthread_h, linux_low_h, linux_ptrace_h)
2983 (gdb_thread_db_h, linux_procfs_h, lynx_low_h, nto_low_h)
2984 (mips_linux_watch_h, i386_low_h, win32_low_h): Delete.
2985
8e7e9910
PA
29862013-09-06 Pedro Alves <palves@redhat.com>
2987
2988 * Makefile.in (linux-btrace.o, mips-linux-watch.o): Remove
2989 explicit header dependencies and use $COMPILE/$POSTCOMPILE.
2990
7c3a12ca
PA
29912013-09-06 Pedro Alves <palves@redhat.com>
2992
2993 * linux-amd64-ipa.c: Include tracepoint.h.
2994 * linux-i386-ipa.c: Include tracepoint.h.
2995
8eb3d7b6
RW
29962013-09-06 Ricard Wanderlof <ricardw@axis.com>
2997
2998 * linux-crisv32-low.c (PTRACE_GET_THREAD_AREA): New macro.
2999 (ps_get_thread_area): New function.
3000
eddddb9d
RW
30012013-09-06 Ricard Wanderlof <ricardw@axis.com>
3002
3003 * linux-crisv32-low.c (elf_gregset_t): Delete typedef.
3004 (initialize_low_arch): Call init_registers_crisv32 rather than
3005 init_register_crisv32.
3006
533b0600
PA
30072013-09-05 Pedro Alves <palves@redhat.com>
3008
3009 * server.h (handle_vFile, hostio_last_error_from_errno): Move
3010 to ...
3011 * hostio.h: ... this new file.
3012 * hostio.c, server.c, linux-low.c, nto-low.c, spu-low,
3013 win32-low.c: Include hostio.h.
3014
0ce3d3b5
PA
30152013-09-05 Pedro Alves <palves@redhat.com>
3016
3017 * server.h (gdb_client_data, handler_func, callback_handler_func)
3018 (delete_file_handler, add_file_handler, append_callback_event)
3019 (delete_callback_event, start_event_loop, initialize_event_loop):
3020 Move to event-loop.h and include it.
3021 * event-loop.h: New file.
3022
799cdc37
PA
30232013-09-05 Pedro Alves <palves@redhat.com>
3024
3025 * dll.c, inferiors.c, remote-utils.c, server.c: Include "dll.h".
3026 * server.h (struct dll_info, all_dlls, dlls_changed, clear_dlls)
3027 (loaded_dll, unloaded_dll): Move to ...
3028 * dll.h: ... this new file.
3029 * inferiors.c, remote-utils.c, win32-low.c: Include "dll.h".
3030
6a6bbd9d
PA
30312013-09-05 Pedro Alves <palves@redhat.com>
3032
3033 * server.h (current_process, get_thread_process, all_processes)
3034 (add_inferior_to_list, for_each_inferior, current_inferior)
3035 (remove_inferior, add_process, remove_process, find_process_pid)
3036 (have_started_inferiors_p, have_attached_inferiors_p)
3037 (thread_id_to_gdb_id, thread_to_gdb_id, gdb_id_to_thread_id)
3038 (clear_inferiors, find_inferior, find_inferior_id)
3039 (inferior_target_data, set_inferior_target_data)
3040 (inferior_regcache_data, set_inferior_regcache_data): Move to
3041 inferiors.h, and include it.
3042 * inferiors.h: New file.
3043
f699aaba
PA
30442013-09-05 Pedro Alves <palves@redhat.com>
3045
3046 * server.h (struct emit_ops, current_insn_ptr, emit_error):
3047 Move ...
72f4393d 3048 * ax.h: ... here.
f699aaba 3049
c144c7a0
PA
30502013-09-05 Pedro Alves <palves@redhat.com>
3051
3052 * ax.c, linux-low.c, linux-x86-low.c, server.c: Include
3053 tracepoint.h.
3054 * server.h (IPA_BUFSIZ, initialize_tracepoint, tracing)
3055 (disconnected_tracing, tracepoint_look_up_symbols, stop_tracing
3056 (handle_tracepoint_general_set, handle_tracepoint_query)
3057 (tracepoint_finished_step, tracepoint_was_hit)
3058 (release_while_stepping_state_list, current_traceframe)
3059 (in_readonly_region, traceframe_read_mem)
3060 (fetch_traceframe_registers, traceframe_read_sdata)
3061 (traceframe_read_info, struct fast_tpoint_collect_status)
3062 (fast_tracepoint_collecting, force_unlock_trace_buffer)
3063 (handle_tracepoit_bkpts, initialize_low_tracepoint)
3064 (supply_fast_tracepoint_registers)
3065 (supply_static_tracepoint_registers, set_trampoline_buffer_space)
3066 (ipa_tdesc, claim_trampoline_space)
3067 (have_fast_tracepoint_trampoline_buffer, gdb_agent_about_to_close)
3068 (agent_mem_read, agent_get_trace_state_variable_value)
3069 (agent_set_trace_state_variable_value, agent_tsv_read)
3070 (agent_mem_read_string, get_raw_reg_func_addr)
3071 (get_get_tsv_func_addr, get_set_tsv_func_addr): Move to ...
3072 * tracepoint.h: ... this new file.
3073
ff42e6ab
PA
30742013-09-05 Pedro Alves <palves@redhat.com>
3075
3076 * server.h (perror_with_name, error, fatal, warning, paddress)
3077 (pulongest, plongest, phex_nz, pfildes): Move to utils.h, and
3078 include it.
3079 * utils.h: New file.
3080
541af0f4
PA
30812013-09-05 Pedro Alves <palves@redhat.com>
3082
3083 * server.h (remote_debug, noack_mode, transport_is_reliable)
3084 (gdb_connected, STDIO_CONNECTION_NAME, remote_connection_is_stdio)
3085 (read_ptid, write_ptid, putpkt, putpkt_binary, putpkt_notif)
3086 (getpkt, remote_prepare, remote_open, remote_close, write_ok)
3087 (write_enn, initialize_async_io, enable_async_io)
3088 (disable_async_io, check_remote_input_interrupt_request)
3089 (convert_ascii_to_int, convert_int_to_ascii, new_thread_notify)
3090 (dead_thread_notify, prepare_resume_reply)
3091 (decode_address_to_semicolon, decode_address, decode_m_packet)
3092 (decode_M_packet, decode_X_packet, decode_xfer_write)
3093 (decode_search_memory_packet, unhexify, hexify)
3094 (remote_escape_output, unpack_varlen_hex, clear_symbol_cache)
3095 (look_up_one_symbol, relocate_instruction)
3096 (monitor_output): Move to remote-utils.h, and include it.
3097 * remote-utils.h: New file.
3098
eebdf26b
PA
30992013-09-05 Pedro Alves <palves@redhat.com>
3100
3101 * server.h (_): Delete.
3102
3aafd2ff
PA
31032013-09-02 Pedro Alves <palves@redhat.com>
3104
3105 * tracepoint.c (TRACEFRAME_EOB_MARKER_SIZE): New macro.
3106 (init_trace_buffer): Ensure at least TRACEFRAME_EOB_MARKER_SIZE is
3107 allocated.
3108 (trace_buffer_alloc): Use TRACEFRAME_EOB_MARKER_SIZE.
3109
cee83bcb
PM
31102013-09-02 Pierre Muller <muller@sourceware.org>
3111
3112 * win32-low.c (child_xfer_memory): Check if ReadProcessMemory
3113 or WriteProcessMemory complete successfully and handle
3114 ERROR_PARTIAL_COPY error.
3115
9a13b2fa
PA
31162013-09-02 Pedro Alves <palves@redhat.com>
3117
3118 * server.c (gdb_read_memory): Return -1 on traceframe memory read
3119 error instead of EIO.
3120
602e3198
JK
31212013-08-28 Jan Kratochvil <jan.kratochvil@redhat.com>
3122
3123 PR server/15604
3124 * linux-low.c: Include filestuff.h.
3125 (linux_create_inferior) <pid == 0>: Call close_most_fds.
3126 * lynx-low.c: Include filestuff.h.
3127 (lynx_create_inferior) <pid == 0>: Call close_most_fds.
3128 * server.c: Include filestuff.h.
3129 (main): Call notice_open_fds.
3130 * spu-low.c: Include filestuff.h.
3131 (spu_create_inferior) <pid == 0>: Call close_most_fds.
3132
96d7229d
LM
31332013-08-22 Luis Machado <lgustavo@codesourcery.com>
3134
3135 * Makefile.in: Explain why ../target and ../nat are not
3136 listed as include file search paths.
3137 (linux-waitpid.o): New object file rule.
3138 * configure.srv (srv_native_linux_obj): New variable.
3139 Replace all occurrences of linux native object files with
3140 $srv_native_linux_obj.
3141 * linux-low.c: Include nat/linux-nat.h and nat/linux-waitpid.h.
3142 (HAS_NOMMU): Move defining logic to common/linux-ptrace.c.
3143 (linux_enable_event_reporting): Remove declaration.
3144 (my_waitpid): Moved to common/linux-waitpid.c.
3145 (linux_wait_for_event): Pass ptid when calling
3146 linux_enable_event_reporting.
3147 (linux_supports_tracefork_flag): Remove.
3148 (linux_enable_event_reporting): Likewise.
3149 (linux_tracefork_grandchild): Remove.
3150 (STACK_SIZE): Moved to common/linux-ptrace.c.
3151 (linux_tracefork_child): Remove.
3152 (linux_test_for_tracefork): Remove.
3153 (linux_look_up_symbols): Call linux_supports_traceclone.
3154 (initialize_low): Remove call to linux_test_for_tracefork.
3155 * linux-low.h (PTRACE_TYPE_ARG3): Move to
3156 common/linux-ptrace.h.
3157 (PTRACE_TYPE_ARG4): Likewise.
3158 Include linux-ptrace.h.
3159
32940073
PA
31602013-08-21 Pedro Alves <palves@redhat.com>
3161
3162 * config.in: Renegerate.
3163
33b60d58 31642013-08-19 Luis Machado <lgustavo@codesourcery.com>
a261b8f5 3165
33b60d58
LM
3166 * Makefile.in (INCLUDE_CFLAGS): Include -I$(srcdir)/../.
3167 (SFILES): Remove $(srcdir)/common/target-common.c and
3168 add $(srcdir)/target/waitstatus.c.
3169 (OBS): Remove target-common.o and add waitstatus.o.
3170 (server_h): Remove $(srcdir)/../common/target-common.h and
3171 add $(srcdir)/../target/resume.h, $(srcdir)/../target/wait.h
3172 and $(srcdir)/../target/waitstatus.h.
3173 (target-common.o): Remove.
3174 (waitstatus.o): New target object file.
3175 * target.h: Do not include target-common.h and
3176 include target/resume.h, target/wait.h and
3177 target/waitstatus.h.
3178
b8e1b30e
LM
31792013-08-13 Luis Machado <lgustavo@codesourcery.com>
3180
3181 * linux-arm-low.c: Rename all occurrences of PTRACE_ARG3_TYPE
3182 to PTRACE_TYPE_ARG3.
3183 * linux-low.c: Rename all occurrences of PTRACE_ARG3_TYPE
3184 to PTRACE_TYPE_ARG3 and PTRACE_ARG4_TYPE to
3185 PTRACE_TYPE_ARG4.
3186 * linux-low.h (PTRACE_ARG3_TYPE): Rename to PTRACE_TYPE_ARG3.
3187 (PTRACE_ARG4_TYPE): Rename to PTRACE_TYPE_ARG4.
3188
7a60ad40
YQ
31892013-07-27 Jie Zhang <jie@codesourcery.com>
3190 Daniel Jacobowitz <dan@codesourcery.com>
3191 Yao Qi <yao@codesourcery.com>
3192
3193 * Makefile.in (SFILES): Add common/mips-linux-watch.c.
3194 (mips-linux-watch.o): New rule.
3195 (mips_linux_watch_h): New variable.
3196 * configure.srv <mips*-*-linux*>: Add mips-linux-watch.o to
3197 srv_tgtobj.
3198 * linux-mips-low.c: Include mips-linux-watch.h.
3199 (struct arch_process_info, struct arch_lwp_info): New.
3200 (update_watch_registers_callback): New function.
3201 (mips_linux_new_process, mips_linux_new_thread) New functions.
3202 (mips_linux_prepare_to_resume, mips_insert_point): New
3203 functions.
3204 (mips_remove_point, mips_stopped_by_watchpoint): New
3205 functions.
3206 (rsp_bp_type_to_target_hw_bp_type): New function.
3207 (mips_stopped_data_address): New function.
3208 (the_low_target): Add watchpoint support functions.
3209
de6f69ad
YQ
32102013-07-27 Yao Qi <yao@codesourcery.com>
3211
3212 * i386-low.c: Include break-common.h.
3213 (enum target_hw_bp_type): Remove.
3214
3360c0bf
LM
32152013-07-24 Luis Machado <lgustavo@codesourcery.com>
3216
3217 * Makefile.in (SFILES): /common/target-common.c.
3218 (OBS): Add target-common.o.
3219 (server_h): Add $(srcdir)/../common/target-common.h.
3220 (target-common.o): New target.
3221 * server.c (queue_stop_reply_callback): Free
3222 status string after use.
3223 * target.c (target_waitstatus_to_string): Remove.
3224 * target.h: Include target-common.h.
3225 (resume_kind): Likewise.
3226 (target_waitkind): Likewise.
3227 (target_waitstatus): Likewise.
3228 (TARGET_WNOHANG): Likewise.
3229
bd885420
YQ
32302013-07-04 Yao Qi <yao@codesourcery.com>
3231
3232 * Makefile.in (host_alias): Use @host_noncanonical@.
3233 (target_alias): Use @target_noncanonical@.
3234 * configure.ac: Use ACX_NONCANONICAL_TARGET and
3235 ACX_NONCANONICAL_HOST.
3236 * configure: Regenerated.
3237
3238 Revert:
3239 2013-06-28 Mircea Gherzan <mircea.gherzan@intel.com>
3240
3241 * configure.ac (version_host, version_target): Set and AC_SUBST them.
3242 * configure: Rebuild.
3243 * Makefile.in (version_host, version_target): Get from configure.
3244 (version.c): Use $(version_host) and $(version_target).
3245
17ef446e
PA
32462013-07-03 Pedro Alves <palves@redhat.com>
3247
3248 * Makefile.in (config.status): Depend on development.sh.
3249 * acinclude.m4: Include libmcheck.m4.
3250 * configure: Regenerate.
3251
7a9a7487
MG
32522013-07-02 Mircea Gherzan <mircea.gherzan@intel.com>
3253
3254 * win32-low.c (winapi_DebugActiveProcessStop): Move the WINAPI
3255 attribute inside the parentheses.
3256 (winapi_DebugSetProcessKillOnExit): Ditto.
3257 (winapi_DebugBreakProcess): Ditto.
3258 (winapi_GenerateConsoleCtrlEvent): Ditto.
a261b8f5 3259
49b64de6
MG
32602013-07-02 Mircea Gherzan <mircea.gherzan@intel.com>
3261
3262 * notif.h (notif_event): Add a dummy member to avoid compiler
3263 errors.
3264
d5749ee7
PA
32652013-07-01 Pedro Alves <palves@redhat.com>
3266
3267 * hostio.c (HOSTIO_PATH_MAX): Define.
3268 (require_filename, handle_open, handle_unlink, handle_readlink):
3269 Use it.
3270
d8d2a3ee
PA
32712013-07-01 Pedro Alves <palves@redhat.com>
3272
3273 * server.h: Include "pathmax.h".
3274 * linux-low.c: Don't include sys/param.h.
3275 (linux_pid_exe_is_elf_64_file): Use PATH_MAX instead of
3276 MAXPATHLEN.
3277 * win32-low.c: Don't include sys/param.h.
3278 (win32_create_inferior): Use PATH_MAX instead of MAXPATHLEN.
3279
bc7dea8d
PA
32802013-07-01 Pedro Alves <palves@redhat.com>
3281
3282 * event-loop.c: Don't check HAVE_UNISTD_H before including
3283 <unistd.h>.
3284 * gdbreplay.c: Likewise.
3285 * remote-utils.c: Likewise.
3286 * server.c: Likewise.
3287 * configure.ac: Don't check for unistd.h.
3288 * configure: Regenerate.
3289
d6c2da54
TT
32902013-06-28 Tom Tromey <tromey@redhat.com>
3291
3292 * Makefile.in (version.c): Use version.in, not
3293 common/version.in.
3294
257b6bec
MG
32952013-06-28 Mircea Gherzan <mircea.gherzan@intel.com>
3296
3297 * configure.ac (version_host, version_target): Set and AC_SUBST them.
3298 * configure: Rebuild.
3299 * Makefile.in (version_host, version_target): Get from configure.
3300 (version.c): Use $(version_host) and $(version_target).
3301
86ebe149
DK
33022013-06-10 Dmitry Kozlov <ddk@codesourcery.com>
3303
3304 Fix trace-status to output user name without trailing colon.
3305 * tracepoint.c (cmd_qtstatus): Remove unnecessary colon from user name.
3306
f30aa5af
DK
33072013-06-10 Dmitry Kozlov <ddk@codesourcery.com>
3308
3309 Fix trace-status to output proper start-time and stop-time.
3310 * tracepoint.c (cmd_qtstatus): Modify trace-status output to
3311 output start time and stop time in hex as gdb expects.
3312
28a93511
YQ
33132013-06-26 Pedro Alves <pedro@codesourcery.com>
3314
3315 * tracepoint.c (build_traceframe_info_xml): Output trace state
3316 variables present in the trace buffer.
3317
01208463
TT
33182013-06-24 Tom Tromey <tromey@redhat.com>
3319
3320 * Makefile.in (version.c): Use bfd/version.h, common/version.in,
3321 create-version.sh.
3322 (version.o): Remove.
3323 * gdbreplay.c: Include version.h.
3324 (version, host_name): Don't declare.
3325 * server.h: Include version.h.
3326 (version, host_name): Don't declare.
3327
760256f9
PA
33282013-06-12 Pedro Alves <palves@redhat.com>
3329
3330 * linux-x86-low.c (linux_is_elf64): Delete global.
3331 (x86_siginfo_fixup): Replace reference to `linux_is_elf64' global
3332 with local linux_pid_exe_is_elf_64_file use.
3333
030031ee
PA
33342013-06-11 Pedro Alves <palves@redhat.com>
3335
3336 * linux-low.c (regset_disabled, disable_regset): New functions.
3337 (regsets_fetch_inferior_registers)
3338 (regsets_store_inferior_registers): Use them.
3339 (initialize_regsets_info); Don't allocate the disabled_regsets
3340 array here.
3341 * linux-low.h (struct regsets_info) <disabled_regsets>: Extend
3342 comment.
3343
5da6eb0a
PA
33442013-06-11 Pedro Alves <palves@redhat.com>
3345
3346 * linux-low.c (initialize_regsets_info): Use xcalloc instead of
3347 xmalloc.
3348
7e5aaa09
PA
33492013-06-11 Pedro Alves <palves@redhat.com>
3350
3351 * linux-x86-low.c (initialize_low_arch): Call
3352 init_registers_x32_avx_linux.
3353
d878444c
JK
33542013-06-09 Jan Kratochvil <jan.kratochvil@redhat.com>
3355
3356 Fix compatibility with Android Bionic.
3357 * linux-low.c (linux_qxfer_libraries_svr4): Ignore first entry even if
3358 it is not empty.
3359
3aee8918
PA
33602013-06-07 Pedro Alves <palves@redhat.com>
3361
5f2b57b5 3362 PR server/14823
3aee8918
PA
3363 * Makefile.in (OBS): Add tdesc.o.
3364 (IPA_OBJS): Add tdesc-ipa.o.
3365 (tdesc-ipa.o): New rule.
3366 * ax.c (gdb_eval_agent_expr): Adjust register_size call to new
3367 interface.
3368 * linux-low.c (new_inferior): Delete.
3369 (disabled_regsets, num_regsets): Delete.
3370 (linux_add_process): Adjust to set the new per-process
3371 new_inferior flag.
3372 (linux_detach_one_lwp): Adjust to call regcache_invalidate_thread.
3373 (linux_wait_for_lwp): Adjust. Only call arch_setup if the event
3374 was a stop. When calling arch_setup, switch the current inferior
3375 to the thread that got an event.
3376 (linux_resume_one_lwp): Adjust to call regcache_invalidate_thread.
3377 (regsets_fetch_inferior_registers)
3378 (regsets_store_inferior_registers): New regsets_info parameter.
3379 Adjust to use it.
3380 (linux_register_in_regsets): New regs_info parameter. Adjust to
3381 use it.
3382 (register_addr, fetch_register, store_register): New usrregs_info
3383 parameter. Adjust to use it.
3384 (usr_fetch_inferior_registers, usr_store_inferior_registers): New
3385 parameter regs_info. Adjust to use it.
3386 (linux_fetch_registers): Get the current inferior's regs_info, and
3387 adjust to use it.
3388 (linux_store_registers): Ditto.
3389 [HAVE_LINUX_REGSETS] (initialize_regsets_info): New.
3390 (initialize_low): Don't initialize the target_regsets here. Call
3391 initialize_low_arch.
3392 * linux-low.h (target_regsets): Delete declaration.
3393 (struct regsets_info): New.
3394 (struct usrregs_info): New.
3395 (struct regs_info): New.
3396 (struct process_info_private) <new_inferior>: New field.
3397 (struct linux_target_ops): Delete the num_regs, regmap, and
3398 regset_bitmap fields. New field regs_info.
3399 [HAVE_LINUX_REGSETS] (initialize_regsets_info): Declare.
3400 * i387-fp.c (num_xmm_registers): Delete.
3401 (i387_cache_to_fsave, i387_fsave_to_cache): Adjust find_regno
3402 calls to new interface.
3403 (i387_cache_to_fxsave, i387_cache_to_xsave, i387_fxsave_to_cache)
3404 (i387_xsave_to_cache): Adjust find_regno calls to new interface.
3405 Infer the number of xmm registers from the regcache's target
3406 description.
3407 * i387-fp.h (num_xmm_registers): Delete.
3408 * inferiors.c (add_thread): Don't install the thread's regcache
3409 here.
3410 * proc-service.c (gregset_info): Fetch the current inferior's
3411 regs_info. Adjust to use it.
3412 * regcache.c: Include tdesc.h.
3413 (register_bytes, reg_defs, num_registers)
3414 (gdbserver_expedite_regs): Delete.
3415 (get_thread_regcache): If the thread doesn't have a regcache yet,
3416 create one, instead of aborting gdbserver.
3417 (regcache_invalidate_one): Rename to ...
3418 (regcache_invalidate_thread): ... this.
3419 (regcache_invalidate_one): New.
3420 (regcache_invalidate): Only invalidate registers of the current
3421 process.
3422 (init_register_cache): Add target_desc parameter, and use it.
3423 (new_register_cache): Ditto. Assert the target description has a
3424 non zero registers_size.
3425 (regcache_cpy): Add assertions. Adjust.
3426 (realloc_register_cache, set_register_cache): Delete.
3427 (registers_to_string, registers_from_string): Adjust.
3428 (find_register_by_name, find_regno, find_register_by_number)
3429 (register_cache_size): Add target_desc parameter, and use it.
3430 (free_register_cache_thread, free_register_cache_thread_one)
3431 (regcache_release, register_cache_size): New.
3432 (register_size): Add target_desc parameter, and use it.
3433 (register_data, supply_register, supply_register_zeroed)
3434 (supply_regblock, supply_register_by_name, collect_register)
3435 (collect_register_as_string, collect_register_by_name): Adjust.
3436 * regcache.h (struct target_desc): Forward declare.
3437 (struct regcache) <tdesc>: New field.
3438 (init_register_cache, new_register_cache): Add target_desc
3439 parameter.
3440 (regcache_invalidate_thread): Declare.
3441 (regcache_invalidate_one): Delete declaration.
3442 (regcache_release): Declare.
3443 (find_register_by_number, register_cache_size, register_size)
3444 (find_regno): Add target_desc parameter.
3445 (gdbserver_expedite_regs, gdbserver_xmltarget): Delete
3446 declarations.
3447 * remote-utils.c: Include tdesc.h.
3448 (outreg, prepare_resume_reply): Adjust.
3449 * server.c: Include tdesc.h.
3450 (gdbserver_xmltarget): Delete declaration.
3451 (get_features_xml, process_serial_event): Adjust.
3452 * server.h [IN_PROCESS_AGENT] (struct target_desc): Forward
3453 declare.
3454 (struct process_info) <tdesc>: New field.
3455 (ipa_tdesc): Declare.
3456 * tdesc.c: New file.
3457 * tdesc.h: New file.
3458 * tracepoint.c: Include tdesc.h.
3459 [IN_PROCESS_AGENT] (ipa_tdesc): Define.
3460 (get_context_regcache): Adjust to pass ipa_tdesc down.
3461 (do_action_at_tracepoint): Adjust to get the register cache size
3462 from the context regcache's description.
3463 (traceframe_walk_blocks): Adjust to get the register cache size
3464 from the current trace frame's description.
3465 (traceframe_get_pc): Adjust to get current trace frame's
3466 description and pass it down.
3467 (gdb_collect): Adjust to get the register cache size from the
3468 IPA's description.
3469 * linux-amd64-ipa.c (tdesc_amd64_linux): Declare.
3470 (gdbserver_xmltarget): Delete.
3471 (initialize_low_tracepoint): Set the ipa's target description.
3472 * linux-i386-ipa.c (tdesc_i386_linux): Declare.
3473 (initialize_low_tracepoint): Set the ipa's target description.
3474 * linux-x86-low.c: Include tdesc.h.
3475 [__x86_64__] (is_64bit_tdesc): New.
3476 (ps_get_thread_area, x86_get_thread_area): Use it.
3477 (i386_cannot_store_register): Rename to ...
3478 (x86_cannot_store_register): ... this. Use is_64bit_tdesc.
3479 (i386_cannot_fetch_register): Rename to ...
3480 (x86_cannot_fetch_register): ... this. Use is_64bit_tdesc.
3481 (x86_fill_gregset, x86_store_gregset): Adjust register_size calls
3482 to new interface.
3483 (target_regsets): Rename to ...
3484 (x86_regsets): ... this.
3485 (x86_get_pc, x86_set_pc): Adjust register_size calls to new
3486 interface.
3487 (x86_siginfo_fixup): Use is_64bit_tdesc.
3488 [__x86_64__] (tdesc_amd64_linux, tdesc_amd64_avx_linux)
3489 (tdesc_x32_avx_linux, tdesc_x32_linux)
3490 (tdesc_i386_linux, tdesc_i386_mmx_linux, tdesc_i386_avx_linux):
3491 Declare.
3492 (x86_linux_update_xmltarget): Delete.
3493 (I386_LINUX_XSAVE_XCR0_OFFSET): Define.
3494 (have_ptrace_getfpxregs, have_ptrace_getregset): New.
3495 (AMD64_LINUX_USER64_CS): New.
3496 (x86_linux_read_description): New, based on
3497 x86_linux_update_xmltarget.
3498 (same_process_callback): New.
3499 (x86_arch_setup_process_callback): New.
3500 (x86_linux_update_xmltarget): New.
3501 (x86_regsets_info): New.
3502 (amd64_linux_regs_info): New.
3503 (i386_linux_usrregs_info): New.
3504 (i386_linux_regs_info): New.
3505 (x86_linux_regs_info): New.
3506 (x86_arch_setup): Reimplement.
3507 (x86_install_fast_tracepoint_jump_pad): Use is_64bit_tdesc.
3508 (x86_emit_ops): Ditto.
3509 (the_low_target): Adjust. Install x86_linux_regs_info,
3510 x86_cannot_fetch_register, and x86_cannot_store_register.
3511 (initialize_low_arch): New.
3512 * linux-ia64-low.c (tdesc_ia64): Declare.
3513 (ia64_fetch_register): Adjust.
3514 (ia64_usrregs_info, regs_info): New globals.
3515 (ia64_regs_info): New function.
3516 (the_low_target): Adjust.
3517 (initialize_low_arch): New function.
3518 * linux-sparc-low.c (tdesc_sparc64): Declare.
3519 (sparc_fill_gregset_to_stack, sparc_store_gregset_from_stack):
3520 Adjust.
3521 (sparc_arch_setup): New function.
3522 (sparc_regsets_info, sparc_usrregs_info, regs_info): New globals.
3523 (the_low_target): Adjust.
3524 (initialize_low_arch): New function.
3525 * linux-ppc-low.c (tdesc_powerpc_32l, tdesc_powerpc_altivec32l)
3526 (tdesc_powerpc_cell32l, tdesc_powerpc_vsx32l)
3527 (tdesc_powerpc_isa205_32l, tdesc_powerpc_isa205_altivec32l)
3528 (tdesc_powerpc_isa205_vsx32l, tdesc_powerpc_e500l)
3529 (tdesc_powerpc_64l, tdesc_powerpc_altivec64l)
3530 (tdesc_powerpc_cell64l, tdesc_powerpc_vsx64l)
3531 (tdesc_powerpc_isa205_64l, tdesc_powerpc_isa205_altivec64l)
3532 (tdesc_powerpc_isa205_vsx64l): Declare.
3533 (ppc_cannot_store_register, ppc_collect_ptrace_register)
3534 (ppc_supply_ptrace_register, parse_spufs_run, ppc_get_pc)
3535 (ppc_set_pc, ppc_get_hwcap): Adjust.
3536 (ppc_usrregs_info): Forward declare.
3537 (!__powerpc64__) ppc_regmap_adjusted: New global.
3538 (ppc_arch_setup): Adjust to the current process'es target
3539 description.
3540 (ppc_fill_vsxregset, ppc_store_vsxregset, ppc_fill_vrregset)
3541 (ppc_store_vrregset, ppc_fill_evrregset, ppc_store_evrregse)
3542 (ppc_store_evrregset): Adjust.
3543 (target_regsets): Rename to ...
3544 (ppc_regsets): ... this, and make static.
3545 (ppc_usrregs_info, ppc_regsets_info, regs_info): New globals.
3546 (ppc_regs_info): New function.
3547 (the_low_target): Adjust.
3548 (initialize_low_arch): New function.
3549 * linux-s390-low.c (tdesc_s390_linux32, tdesc_s390_linux32v1)
3550 (tdesc_s390_linux32v2, tdesc_s390_linux64, tdesc_s390_linux64v1)
3551 (tdesc_s390_linux64v2, tdesc_s390x_linux64, tdesc_s390x_linux64v1)
3552 (tdesc_s390x_linux64v2): Declare.
3553 (s390_collect_ptrace_register, s390_supply_ptrace_register)
3554 (s390_fill_gregset, s390_store_last_break): Adjust.
3555 (target_regsets): Rename to ...
3556 (s390_regsets): ... this, and make static.
3557 (s390_get_pc, s390_set_pc): Adjust.
3558 (s390_get_hwcap): New target_desc parameter, and use it.
3559 [__s390x__] (have_hwcap_s390_high_gprs): New global.
3560 (s390_arch_setup): Adjust to set the current process'es target
3561 description. Don't adjust the regmap.
3562 (s390_usrregs_info, s390_regsets_info, regs_info): New globals.
3563 [__s390x__] (s390_usrregs_info_3264, s390_regsets_info_3264)
3564 (regs_info_3264): New globals.
3565 (s390_regs_info): New function.
3566 (the_low_target): Adjust.
3567 (initialize_low_arch): New function.
3568 * linux-mips-low.c (tdesc_mips_linux, tdesc_mips_dsp_linux)
3569 (tdesc_mips64_linux, tdesc_mips64_dsp_linux): Declare.
3570 [__mips64] (init_registers_mips_linux)
3571 (init_registers_mips_dsp_linux): Delete defines.
3572 [__mips64] (tdesc_mips_linux, tdesc_mips_dsp_linux): New defines.
3573 (have_dsp): New global.
3574 (mips_read_description): New, based on mips_arch_setup.
3575 (mips_arch_setup): Reimplement.
3576 (get_usrregs_info): New function.
3577 (mips_cannot_fetch_register, mips_cannot_store_register)
3578 (mips_get_pc, mips_set_pc, mips_fill_gregset, mips_store_gregset)
3579 (mips_fill_fpregset, mips_store_fpregset): Adjust.
3580 (target_regsets): Rename to ...
3581 (mips_regsets): ... this, and make static.
3582 (mips_regsets_info, mips_dsp_usrregs_info, mips_usrregs_info)
3583 (dsp_regs_info, regs_info): New globals.
3584 (mips_regs_info): New function.
3585 (the_low_target): Adjust.
3586 (initialize_low_arch): New function.
3587 * linux-arm-low.c (tdesc_arm, tdesc_arm_with_iwmmxt)
3588 (tdesc_arm_with_vfpv2, tdesc_arm_with_vfpv3, tdesc_arm_with_neon):
3589 Declare.
3590 (arm_fill_vfpregset, arm_store_vfpregset): Adjust.
3591 (arm_read_description): New, with bits factored from
3592 arm_arch_setup.
3593 (arm_arch_setup): Reimplement.
3594 (target_regsets): Rename to ...
3595 (arm_regsets): ... this, and make static.
3596 (arm_regsets_info, arm_usrregs_info, regs_info): New globals.
3597 (arm_regs_info): New function.
3598 (the_low_target): Adjust.
3599 (initialize_low_arch): New function.
3600 * linux-m68k-low.c (tdesc_m68k): Declare.
3601 (target_regsets): Rename to ...
3602 (m68k_regsets): ... this, and make static.
3603 (m68k_regsets_info, m68k_usrregs_info, regs_info): New globals.
3604 (m68k_regs_info): New function.
3605 (m68k_arch_setup): New function.
3606 (the_low_target): Adjust.
3607 (initialize_low_arch): New function.
3608 * linux-sh-low.c (tdesc_sharch): Declare.
3609 (target_regsets): Rename to ...
3610 (sh_regsets): ... this, and make static.
3611 (sh_regsets_info, sh_usrregs_info, regs_info): New globals.
3612 (sh_regs_info, sh_arch_setup): New functions.
3613 (the_low_target): Adjust.
3614 (initialize_low_arch): New function.
3615 * linux-bfin-low.c (tdesc_bfin): Declare.
3616 (bfin_arch_setup): New function.
3617 (bfin_usrregs_info, regs_info): New globals.
3618 (bfin_regs_info): New function.
3619 (the_low_target): Adjust.
3620 (initialize_low_arch): New function.
3621 * linux-cris-low.c (tdesc_cris): Declare.
3622 (cris_arch_setup): New function.
3623 (cris_usrregs_info, regs_info): New globals.
3624 (cris_regs_info): New function.
3625 (the_low_target): Adjust.
3626 (initialize_low_arch): New function.
3627 * linux-cris-low.c (tdesc_crisv32): Declare.
3628 (cris_arch_setup): New function.
3629 (cris_regsets_info, cris_usrregs_info, regs_info): New globals.
3630 (cris_regs_info): New function.
3631 (the_low_target): Adjust.
3632 (initialize_low_arch): New function.
3633 * linux-m32r-low.c (tdesc_m32r): Declare.
3634 (m32r_arch_setup): New function.
3635 (m32r_usrregs_info, regs_info): New globals.
3636 (m32r_regs_info): Adjust.
3637 (initialize_low_arch): New function.
3638 * linux-tic6x-low.c (tdesc_tic6x_c64xp_linux)
3639 (tdesc_tic6x_c64x_linux, tdesc_tic6x_c62x_linux): Declare.
3640 (tic6x_usrregs_info): Forward declare.
3641 (tic6x_read_description): New function, based on ...
3642 (tic6x_arch_setup): ... this. Reimplement.
3643 (target_regsets): Rename to ...
3644 (tic6x_regsets): ... this, and make static.
3645 (tic6x_regsets_info, tic6x_usrregs_info, regs_info): New globals.
3646 (tic6x_regs_info): New function.
3647 (the_low_target): Adjust.
3648 (initialize_low_arch): New function.
3649 * linux-xtensa-low.c (tdesc_xtensa): Declare.
3650 (xtensa_fill_gregset, xtensa_store_gregset): Adjust.
3651 (target_regsets): Rename to ...
3652 (xtensa_regsets): ... this, and make static.
3653 (xtensa_regsets_info, xtensa_usrregs_info, regs_info): New
3654 globals.
3655 (xtensa_arch_setup, xtensa_regs_info): New functions.
3656 (the_low_target): Adjust.
3657 (initialize_low_arch): New function.
3658 * linux-nios2-low.c (tdesc_nios2_linux): Declare.
3659 (nios2_arch_setup): Set the current process'es tdesc.
3660 (target_regsets): Rename to ...
3661 (nios2_regsets): ... this.
3662 (nios2_regsets_info, nios2_usrregs_info, regs_info): New globals.
3663 (nios2_regs_info): New function.
3664 (the_low_target): Adjust.
3665 (initialize_low_arch): New function.
a261b8f5
PA
3666 * linux-aarch64-low.c (tdesc_aarch64): Declare.
3667 (aarch64_arch_setup): Set the current process'es tdesc.
3668 (target_regsets): Rename to ...
3669 (aarch64_regsets): ... this.
3670 (aarch64_regsets_info, aarch64_usrregs_info, regs_info): New globals.
3671 (aarch64_regs_info): New function.
3672 (the_low_target): Adjust.
3673 (initialize_low_arch): New function.
3aee8918
PA
3674 * linux-tile-low.c (tdesc_tilegx, tdesc_tilegx32): Declare
3675 globals.
3676 (target_regsets): Rename to ...
3677 (tile_regsets): ... this.
3678 (tile_regsets_info, tile_usrregs_info, regs_info): New globals.
3679 (tile_regs_info): New function.
3680 (tile_arch_setup): Set the current process'es tdesc.
3681 (the_low_target): Adjust.
3682 (initialize_low_arch): New function.
3683 * spu-low.c (tdesc_spu): Declare.
3684 (spu_create_inferior, spu_attach): Set the new process'es tdesc.
3685 * win32-arm-low.c (tdesc_arm): Declare.
3686 (arm_arch_setup): New function.
3687 (the_low_target): Install arm_arch_setup instead of
3688 init_registers_arm.
3689 * win32-i386-low.c (tdesc_i386, tdesc_amd64): Declare.
3690 (init_windows_x86): Rename to ...
3691 (i386_arch_setup): ... this. Set `win32_tdesc'.
3692 (the_low_target): Adjust.
3693 * win32-low.c (win32_tdesc): New global.
3694 (child_add_thread): Don't create the thread cache here.
3695 (do_initial_child_stuff): Set the new process'es tdesc.
3696 * win32-low.h (struct target_desc): Forward declare.
3697 (win32_tdesc): Declare.
3698 * lynx-i386-low.c (tdesc_i386): Declare global.
3699 (lynx_i386_arch_setup): Set `lynx_tdesc'.
3700 * lynx-low.c (lynx_tdesc): New global.
3701 (lynx_add_process): Set the new process'es tdesc.
3702 * lynx-low.h (struct target_desc): Forward declare.
3703 (lynx_tdesc): Declare global.
3704 * lynx-ppc-low.c (tdesc_powerpc_32): Declare global.
3705 (lynx_ppc_arch_setup): Set `lynx_tdesc'.
3706 * nto-low.c (nto_tdesc): New global.
3707 (do_attach): Set the new process'es tdesc.
3708 * nto-low.h (struct target_desc): Forward declare.
3709 (nto_tdesc): Declare.
3710 * nto-x86-low.c (tdesc_i386): Declare.
3711 (nto_x86_arch_setup): Set `nto_tdesc'.
3712
b1fbec62
GB
37132013-06-04 Gary Benson <gbenson@redhat.com>
3714
3715 * server.c (handle_query): Add "augmented-libraries-svr4-read+"
3716 to qSupported response when appropriate.
3717 (handle_qxfer_libraries_svr4): Allow qXfer:libraries-svr4:read
3718 with nonzero-length annex.
3719 * linux-low.c (linux_qxfer_libraries_svr4): Parse and handle
3720 arguments supplied in annex.
3721
d1ec4ce7
DE
37222013-05-31 Doug Evans <dje@google.com>
3723
ac44adcb 3724 PR server/15594
d1ec4ce7
DE
3725 * linux-x86-low.c (ps_get_thread_area): Properly extend address to
3726 64 bits in 64-cross-32 environment.
3727
9b25f2d3
PA
37282013-05-28 Pedro Alves <palves@redhat.com>
3729
3730 * Makefile.in (clean): Remove reference to aarch64-without-fpu.c.
3731 (aarch64-without-fpu.c): Delete rule.
3732 * configure.srv (aarch64*-*-linux*): Remove references to
3733 aarch64-without-fpu.o and aarch64-without-fpu.xml.
3734 * linux-aarch64-low.c (init_registers_aarch64_without_fpu): Remove
3735 declaration.
3736
6740dc9c
PA
37372013-05-24 Pedro Alves <palves@redhat.com>
3738
3739 * server.c (handle_v_cont) <vCont;r>: Use unpack_varlen_hex
3740 instead of strchr/decode_address. Error if the range isn't split
3741 with a ','. Don't assume there's be a ':' in the action.
3742
c2d6af84
PA
37432013-05-23 Yao Qi <yao@codesourcery.com>
3744 Pedro Alves <palves@redhat.com>
3745
3746 * linux-low.c (lwp_in_step_range): New function.
3747 (linux_wait_1): If the thread was range stepping and stopped
3748 outside the stepping range, report the stop to GDB. Otherwise,
3749 continue stepping. Add range stepping debug output.
3750 (linux_set_resume_request): Copy the step range from the resume
3751 request to the lwp.
3752 (linux_supports_range_stepping): New.
3753 (linux_target_ops) <supports_range_stepping>: Set to
3754 linux_supports_range_stepping.
3755 * linux-low.h (struct linux_target_ops)
3756 <supports_range_stepping>: New field.
3757 (struct lwp_info) <step_range_start, step_range_end>: New fields.
3758 * linux-x86-low.c (x86_supports_range_stepping): New.
3759 (the_low_target) <supports_range_stepping>: Set to
3760 x86_supports_range_stepping.
3761 * server.c (handle_v_cont): Handle 'r' action.
3762 (handle_v_requests): Append ";r" if the target supports range
3763 stepping.
3764 * target.h (struct thread_resume) <step_range_start,
3765 step_range_end>: New fields.
3766 (struct target_ops) <supports_range_stepping>:
3767 New field.
3768 (target_supports_range_stepping): New macro.
3769
58794e1a
JB
37702013-05-17 Joel Brobecker <brobecker@adacore.com>
3771
3772 * lynx-low.c (lynx_resume): Fix null_ptid/minus_one_ptid
3773 confusion in comment.
3774
d631c5a7
JB
37752013-05-17 Joel Brobecker <brobecker@adacore.com>
3776
3777 * lynx-low.c (struct process_info_private): New type.
3778 (lynx_add_process): New function.
3779 (lynx_create_inferior, lynx_attach): Replace calls to
3780 add_process by calls to lynx_add_process.
3781 (lynx_resume): If PTID is null, then try using
3782 current_process()->private->last_wait_event_ptid.
3783 Add comments.
3784 (lynx_clear_inferiors): Delete. The contents of that function
3785 has been inlined in lynx_mourn;
3786 (lynx_wait_1): Save the ptid in the process's private data.
3787 (lynx_mourn): Free the process' private data. Replace call
3788 to lynx_clear_inferiors by call to clear_inferiors.
3789
96f7a20f
YQ
37902013-05-17 Yao Qi <yao@codesourcery.com>
3791
3792 * i386-low.c (i386_length_and_rw_bits): Move the comment to
3793 the right place.
3794
db0dfaa0
LM
37952013-05-16 Luis Machado <lgustavo@codesourcery.com>
3796
3797 * linux-low.c: Move definition checks upwards for PT_TEXT_ADDR,
3798 PT_DATA_ADDR and PT_TEXT_END_ADDR. Update comments.
3799 (linux_read_offsets): Remove PT_TEXT_ADDR, PT_DATA_ADDR and
3800 PT_TEXT_END_ADDR guards. Update comments.
3801 (linux_target_op) <read_offsets>: Conditionally define to
3802 linux_read_offsets if the target is UCLIBC and if it defines
3803 PT_TEXT_ADDR, PT_DATA_ADDR and PT_TEXT_END_ADDR.
3804
68f5f838
SL
38052013-05-06 Sandra Loosemore <sandra@codesourcery.com>
3806 Andrew Jenner <andrew@codesourcery.com>
3807
3808 * Makefile.in (SFILES): Add linux-nios2-low.c.
3809 (clean): Add action to delete nios2-linux.c.
3810 (nios2-linux.c): New rule.
3811 * configure.srv: Add nios2*-*-linux*.
3812 * linux-nios2-low.c: New.
3813
1ebff1fd
HAQ
38142013-05-03 Hafiz Abid Qadeer <abidh@codesourcery.com>
3815
3816 * tracepoint.c (cmd_qtinit): Call 'stop_tracing'.
3817
f6150862
HZ
38182013-04-25 Hui Zhu <hui@codesourcery.com>
3819
3820 PR gdb/15186
f6150862
HZ
3821 * ax.c (ax_printf): Add fflush.
3822
614c279d
TT
38232013-04-22 Tom Tromey <tromey@redhat.com>
3824
3825 * Makefile.in (SFILES): Add filestuff.c.
3826 (OBS): Add filestuff.o.
3827 (filestuff.o): New target.
3828 * config.in, configure: Rebuild.
3829 * configure.ac: Check for fdwalk, pipe2.
3830
7d4e5717
PA
38312013-04-17 Pedro Alves <palves@redhat.com>
3832
3833 * configure.ac (USE_THREAD_DB): Delete variable.
3834 (if test "$srv_linux_thread_db" = "yes"): AC_DEFINE USE_THREAD_DB.
3835 Don't AC_SUBST USE_THREAD_DB.
3836 * Makefile.in (INTERNAL_CFLAGS): Remove @USE_THREAD_DB@.
3837 * config.in, configure: Regenerate.
3838
d5c93e41
PA
38392013-04-16 Pedro Alves <palves@redhat.com>
3840
3841 * linux-low.h (struct lwp_info) <thread_known>: Move under
3842 the USE_THREAD_DB #ifdef.
3843
04f5fe89
PA
38442013-04-16 Pedro Alves <palves@redhat.com>
3845
3846 * Makefile.in (INTERNAL_CFLAGS): Add @USE_THREAD_DB@.
3847 (linux-low.o): Delete rule.
3848 * linux-low.h: Always include "gdb_thread_db.h" instead of
3849 conditionally including thread_db.h.
3850 (struct lwp_info) <th>: Guard with #ifdef USE_THREAD_DB instead of
3851 HAVE_THREAD_DB_H.
3852
480b27bf
JK
38532013-04-07 Jan Kratochvil <jan.kratochvil@redhat.com>
3854
3855 * Makefile.in (install-only): Fix make install regression.
3856
43662968
JK
38572013-04-05 Jan Kratochvil <jan.kratochvil@redhat.com>
3858
3859 Convert man pages to texinfo, new gdbinit.5 texinfo page.
3860 * Makefile.in (install-only): Remove $(man1dir) and gdbserver.1
3861 installation.
3862 * gdbserver.1: Remove.
3863
3e74e146
PA
38642013-03-22 Pedro Alves <palves@redhat.com>
3865
3866 * linux-low.c (handle_extended_wait): Don't call
3867 linux_enable_event_reporting.
3868
a8347a2a
TT
38692013-03-15 Tony Theodore <tonyt@logyst.com>
3870
3871 PR build/9098:
3872 * Makefile.in (SHELL): Use @SHELL@.
3873
eeb56fa7
SDJ
38742013-03-14 Sergio Durigan Junior <sergiodj@redhat.com>
3875
3876 * tracepoint.c (cmd_qtv): Initialize `val' with zero, silencing
3877 compiler warning.
3878
4fa7e2ff
JB
38792013-03-13 Joel Brobecker <brobecker@adacore.com>
3880
3881 * linux-low.c (linux_target_ops) [!HAVE_LINUX_BTRACE]:
3882 Remove extraneous NULL element.
3883
8ddb1965
YQ
38842013-03-13 Yao Qi <yao@codesourcery.com>
3885
3886 * tracepoint.c (traceframe_read_tsv): Look for the last matched
3887 'V' block in trace frame.
3888
9accd112
MM
38892013-03-11 Markus Metzger <markus.t.metzger@intel.com>
3890
3891 * target.h (struct target_ops): Add btrace ops.
3892 (target_supports_btrace): New macro.
3893 (target_enable_btrace): New macro.
3894 (target_disable_btrace): New macro.
3895 (target_read_btrace): New macro.
3896 * gdbthread.h (struct thread_info): Add btrace field.
3897 * server.c: Include btrace-common.h.
3898 (handle_btrace_general_set): New function.
3899 (handle_btrace_enable): New function.
3900 (handle_btrace_disable): New function.
3901 (handle_general_set): Call handle_btrace_general_set.
3902 (handle_qxfer_btrace): New function.
3903 (struct qxfer qxfer_packets[]): Add btrace entry.
3904 * inferiors.c (remove_thread): Disable btrace.
3905 * linux-low: Include linux-btrace.h.
3906 (linux_low_enable_btrace): New function.
3907 (linux_low_read_btrace): New function.
3908 (linux_target_ops): Add btrace ops.
3909 * configure.srv (i[34567]86-*-linux*): Add linux-btrace.o.
3910 Add srv_linux_btrace=yes.
3911 (x86_64-*-linux*): Add linux-btrace.o.
3912 Add srv_linux_btrace=yes.
3913 * configure.ac: Define HAVE_LINUX_BTRACE.
3914 * config.in: Regenerated.
3915 * configure: Regenerated.
3916
5cc22e4c
MM
39172013-03-11 Markus Metzger <markus.t.metzger@intel.com>
3918
3919 * server.c (handle_qxfer): Preserve error message if -3 is
3920 returned.
3921 (qxfer): Document the -3 return value.
3922
7c97f91e
MM
39232013-03-11 Markus Metzger <markus.t.metzger@intel.com>
3924
3925 * Makefile.in (SFILES): Add $(srcdir)/common/linux-btrace.c.
3926 (linux_btrace_h): New variable.
3927 (linux-btrace.o): New rule.
3928
be9a119c 39292013-03-08 Stan Shebs <stan@codesourcery.com>
f6f899bf
HAQ
3930 Hafiz Abid Qadeer <abidh@codesourcery.com>
3931
3932 * tracepoint.c (trace_buffer_size): New global.
3933 (DEFAULT_TRACE_BUFFER_SIZE): New define.
3934 (init_trace_buffer): Change to one-argument function. Allocate
3935 trace buffer memory.
3936 (handle_tracepoint_general_set): Call cmd_bigqtbuffer_size to
3937 handle QTBuffer:size packet.
3938 (cmd_bigqtbuffer_size): New function.
3939 (initialize_tracepoint): Call init_trace_buffer with
3940 DEFAULT_TRACE_BUFFER_SIZE.
3941 * server.c (handle_query): Add QTBuffer:size in the
3942 supported packets.
3943
e64f7499
YQ
39442013-03-07 Yao Qi <yao@codesourcery.com>
3945
3946 * tracepoint.c (cur_action, cur_step_action): Make them unsigned.
3947 (cmd_qtfp): Initialize cur_action and cur_step_action 0 instead
3948 of -1.
3949 (cmd_qtsp): Adjust condition. Do post increment.
3950 Set cur_action and cur_step_action back to 0.
3951
f0ae6fc3
PA
39522013-03-07 Jeremy Bennett <jeremy.bennett@embecosm.com>
3953
3954 PR server/15236
3955 * linux-low.c (linux_write_memory): Return early success if LEN is
3956 zero.
3957
b5b0b0af
CV
39582013-03-05 Corinna Vinschen <vinschen@redhat.de>
3959
334ad4a8 3960 * configure.srv: Add x86_64-*-cygwin* as target.
b5b0b0af 3961
589bc927
TT
39622013-02-28 Tom Tromey <tromey@redhat.com>
3963
3964 * configure.ac: Invoke AC_SYS_LARGEFILE.
3965 * configure, config.in: Rebuild.
3966
dfe07582
CV
39672013-02-28 Corinna Vinschen <vinschen@redhat.com>
3968
3969 * win32-low.c: Throughout, fix format strings and casts of
3970 printf-like functions to avoid type related warnings on all
3971 platforms.
3972 (get_child_debug_event): Print dwDebugEventCode as hex since
3973 that's how it's usually documented.
3974
736cd585
YQ
39752013-02-28 Yao Qi <yao@codesourcery.com>
3976
3977 * tracepoint.c (cmd_qtbuffer): Call phex_nz instead of
3978 pulongest.
3979
e1f58301
JW
39802013-02-27 Jiong Wang <jiwang@tilera.com>
3981
3982 * Makefile.in (clean): Remove reg-tilegx.c, reg-tilegx32.c.
3983 (reg-tilegx32.c): New rule.
3984 * configure.srv (tilegx-*-linux*): Add reg-tilegx32.o to srv_regobj.
3985 * linux-tile-low.c (tile_arch_setup): New function. Invoke
3986 different register info initializer according to elf class.
3987 (init_registers_tilgx32): New function. The tilegx32 register info
3988 initializer.
3989 (tile_fill_gregset): Use "uint_reg_t" to represent register size.
3990 (tile_store_gregset): Likewise.
3991
d171ca78
YQ
39922013-02-27 Yao Qi <yao@codesourcery.com>
3993
3994 * server.c (process_point_options): Print debug message when
3995 debug_threads is true.
3996
282bbdf3
YQ
39972013-02-26 Yao Qi <yao@codesourcery.com>
3998
3999 * tracepoint.c (cmd_qtbuffer): Don't set '\0' in OWN_BUF.
4000
aca22551
PA
40012013-02-19 Pedro Alves <palves@redhat.com>
4002 Kai Tietz <ktietz@redhat.com>
4003
4004 PR gdb/15161
4005
4006 * server.c (handle_query) <CRC check>: Use unpack_varlen_hex
4007 instead of strtoul to extract address from packet.
4008 (process_serial_event) <'z'>: Likewise.
4009
4f3cee1c
YQ
40102013-02-18 Yao Qi <yao@codesourcery.com>
4011
4012 * linux-bfin-low.c (the_low_target): Use NULL instead of 0.
4013
8e1d55a3
PA
40142013-02-14 Pedro Alves <palves@redhat.com>
4015
4016 Plug memory leak.
4017
4018 * tracepoint.c (cmd_qtnotes): Free TRACING_USER_NAME,
4019 TRACING_NOTES and TRACING_STOP_NOTE before clobbering.
4020
458820da
PA
40212013-02-14 Pedro Alves <palves@redhat.com>
4022
4023 * tracepoint.c (cmd_qtdpsrc): Use savestring.
4024
baea0dae
PA
40252013-02-14 Pedro Alves <palves@redhat.com>
4026
4027 * tracepoint.c (save_string): Delete.
4028 (add_tracepoint_action): Use savestring instead of save_string.
4029
0b1afbb3
PA
40302013-02-12 Pedro Alves <palves@redhat.com>
4031
4032 * linux-xtensa-low.c: Ditto.
4033 * xtensa-xtregs.c: Ditto.
4034
8a4ac37e
PA
40352013-02-12 Sanimir Agovic <sanimir.agovic@intel.com>
4036
4037 * thread-db.c (thread_db_get_tls_address): NULL pointer check
4038 thread_db.
4039
148de6bb
MS
40402013-02-07 Marcus Shawcroft <marcus.shawcroft@arm.com>
4041
4042 * linux-aarch64-low.c (aarch64_arch_setup): Clamp
4043 aarch64_num_wp_regs and aarch64_num_bp_regs to
4044 AARCH64_HWP_MAX_NUM and AARCH64_HBP_MAX_NUM respectively.
4045
55fac6e0
MS
40462013-02-07 Marcus Shawcroft <marcus.shawcroft@arm.com>
4047
4048 * linux-aarch64-low.c (ps_get_thread_area): Replace
4049 PTRACE_GET_THREAD_AREA with PTRACE_GETREGSET.
4050
176eb98c
MS
40512013-02-04 Jim MacArthur <jim.macarthur@arm.com>
4052 Marcus Shawcroft <marcus.shawcroft@arm.com>
4053 Nigel Stephens <nigel.stephens@arm.com>
4054 Yufeng Zhang <yufeng.zhang@arm.com>
4055
4056 * Makefile.in (clean): Remove aarch64.c and aarch64-without-fpu.c.
4057 (aarch64.c, aarch64-without-fpu.c): New targets.
4058 * configure.srv (aarch64*-*-linux*): New.
4059 * linux-aarch64-low.c: New file.
4060
56f7af9c
MS
40612013-02-04 Marcus Shawcroft <marcus.shawcroft@arm.com>
4062
43aaf8b6 4063 * linux-low.c (handle_extended_wait, linux_create_inferior)
56f7af9c
MS
4064 (linux_attach_lwp_1, linux_kill_one_lwp, linux_attach_one_lwp)
4065 (dequeue_one_deferred_signal, linux_resume_one_thread)
4066 (fetch_register, linux_write_memory, linux_enable_event_reporting)
4067 (linux_tracefork_grandchild, linux_test_for_tracefork)
4068 (linux_read_offsets, linux_xfer_siginfo, linux_xfer_siginfo): Add
4069 PTRACE_ARG3_TYPE and PTRACE_ARG4_TYPE cast to ptrace arguments
4070 where the argument is 0.
4071
60f662b0
YQ
40722013-01-25 Yao Qi <yao@codesourcery.com>
4073
4074 * event-loop.c: Include "queue.h".
4075 (gdb_event_p): New typedef.
4076 (struct gdb_event) <next_event>: Remove.
4077 (event_queue): Change to QUEUE(gdb_event_p).
4078 (async_queue_event): Remove.
4079 (gdb_event_xfree): New.
4080 (initialize_event_loop): New.
4081 (process_event): Use API from QUEUE.
4082 (wait_for_event): Likewise.
4083 * server.c (main): Call initialize_event_loop.
4084 * server.h (initialize_event_loop): Declare.
4085
5ae4861a
YQ
40862013-01-18 Yao Qi <yao@codesourcery.com>
4087
4088 * ax.h (struct eval_agent_expr_context): New.
4089 (gdb_eval_agent_expr): Update declaration.
4090 * ax.c (gdb_eval_agent_expr): Remove argument REGCACHE and
4091 TFRAME. Add new argument CTX.
4092 * server.h (struct eval_agent_expr_context): Declare.
4093 (agent_mem_read, agent_tsv_read): Update declaration.
4094 (agent_mem_read_string): Likewise.
4095 * tracepoint.c (eval_tracepoint_agent_expr): Remove.
4096 (add_traceframe_block): Add new argument TPOINT.
4097 Increase TPOINT->traceframe_usage.
4098 (do_action_at_tracepoint): Call gdb_eval_agent_expr instead of
4099 eval_tracepoint_agent_expr.
4100 (condition_true_at_tracepoint): Likewise.
4101 (agent_mem_read): Remove argument TFRAME. Add argument CTX.
4102 (agent_mem_read_string, agent_tsv_read): Likewise.
4103
85e00e85
YQ
41042013-01-16 Yao Qi <yao@codesourcery.com>
4105
4106 * linux-low.c (linux_resume_one_lwp): Don't check
4107 'lwp->bp_reinsert != 0'.
4108
4039cf45
JB
41092013-01-07 Joel Brobecker <brobecker@adacore.com>
4110 Pedro Alves <palves@redhat.com>
4111
4112 * lynx-low.c (ptrace_request_to_str): Define a temporary
4113 macro and use it to simplify this function's implementation.
4114
9044dee2
JB
41152013-01-07 Joel Brobecker <brobecker@adacore.com>
4116
4117 * lynx-low.c (lynx_resume): Call perror_with_name if lynx_ptrace
4118 sets errno.
4119
e6352c8f
JB
41202013-01-07 Joel Brobecker <brobecker@adacore.com>
4121
4122 * configure.srv (i[34567]86-*-lynxos*): Set srv_xmlfiles.
4123
50681a27
JB
41242013-01-07 Joel Brobecker <brobecker@adacore.com>
4125
4126 * configure.srv (powerpc-*-lynxos*): Set srv_xmlfiles.
4127
3f6e77ef
JB
41282013-01-07 Joel Brobecker <brobecker@adacore.com>
4129
4130 * lynx-low.c (lynx_resume): Use the resume_info parameter
4131 to determine the ptid for the lynx_ptrace call, unless
4132 it is equal to minus_one_ptid, in which case we use the
4133 ptid of the current_inferior.
4134 (lynx_wait_1): After having received a thread create/exit
4135 event, resume the inferior's execution using the signaling
4136 thread's ptid, rather than the old ptid.
4137
7fda33ae
JB
41382013-01-07 Joel Brobecker <brobecker@adacore.com>
4139
4140 * lynx-low.c (lynx_resume): Delete variable ret.
4141
b9786c74
JB
41422013-01-01 Joel Brobecker <brobecker@adacore.com>
4143
4144 * gdbreplay.c (gdbreplay_version): Update copyright year.
4145 * server.c (gdbserver_version): Likewise.
4146
8b93d60f
JB
41472012-12-17 Joel Brobecker <brobecker@adacore.com>
4148
4149 * lynx-low.c (lynx_wait_1): Add debug trace before adding
4150 new thread.
4151
037335a7
JB
41522012-12-17 Joel Brobecker <brobecker@adacore.com>
4153
4154 * lynx-low.c (ptrace_request_to_str): Add handling for
4155 PTRACE_GETTRACESIG.
4156
52d4cbd8
JB
41572012-12-17 Joel Brobecker <brobecker@adacore.com>
4158
4159 * lynx-low.c (lynx_attach): Delete variable new_process.
4160
ab8f6ca9
JB
41612012-12-17 Joel Brobecker <brobecker@adacore.com>
4162
4163 * lynx-low.c (lynx_create_inferior): Delete variable
4164 new_process.
4165
78cbc024
JB
41662012-12-17 Joel Brobecker <brobecker@adacore.com>
4167
4168 * lynx-low.c (ptrace_request_to_str): Do not handle
4169 PTRACE_GETTHREADLIST if this macro does not exist.
4170
14a00470
YQ
41712012-12-15 Yao Qi <yao@codesourcery.com>
4172
4173 * Makefile.in (OBS): Add notif.o.
4174 * notif.c, notif.h: New.
4175 * server.c: Include "notif.h".
4176 (struct vstop_notif) <next>: Remove.
4177 <base>: New field.
4178 (queue_stop_reply): Update.
4179 (push_event, send_next_stop_reply): Remove.
4180 (discard_queued_stop_replies): Update.
4181 (notif_stop): New variable.
4182 (handle_v_stopped): Remove.
4183 (handle_v_requests): Don't call handle_v_stopped. Call
4184 handle_ack_notif instead.
4185 (queue_stop_reply_callback): Call notif_event_enque instead
4186 of queue_stop_reply.
4187 (handle_status): Don't call send_next_stop_reply, call
4188 notif_write_event instead.
4189 (kill_inferior_callback): Likewise.
4190 (detach_or_kill_inferior_callback): Likewise.
4191 (main): Call initialize_notif.
4192 (process_serial_event): Call QUEUE_is_empty.
4193 (handle_target_event): Call notif_push instead of push event.
4194 * server.h (push_event): Remove declaration.
4195
61c125b9
TT
41962012-12-10 Tom Tromey <tromey@redhat.com>
4197
4198 * Makefile.in (DEPMODE, DEPDIR, depcomp, COMPILE.pre)
4199 (COMPILE.post, COMPILE, POSTCOMPILE, IPAGENT_COMPILE): New
4200 macros.
4201 (.c.o): Rewrite.
4202 (ax-ipa.o, tracepoint-ipa.o, utils-ipa.o, format-ipa.o)
4203 (common-utils-ipa.o, remote-utils-ipa.o, regcache-ipa.o)
4204 (i386-linux-ipa.o, linux-i386-ipa.o, linux-amd64-ipa.o)
4205 (amd64-linux-ipa.o, ax.o): Rewrite.
4206 (event-loop.o, hostio.o, hostio-errno.o, inferiors.o, mem-break.o)
4207 (proc-service.o, regcache.o, remote-utils.o, server.o, target.o)
4208 (thread-db.o, tracepoint.o, utils.o, gdbreplay.o, dll.o): Remove.
4209 (signals.o, linux-procfs.o, linux-ptrace.o, common-utils.o, vec.o)
4210 (gdb_vecs.o, xml-utils.o, linux-osdata.o, ptid.o, buffer.o)
4211 (format.o, agent.o, vasprintf.o, vsnprintf.o): Rewrite.
4212 (i386-low.o, i387-fp.o, linux-low.o, linux-arm-low.o)
4213 (linux-bfin-low.o, linux-cris-low.o, linux-crisv32-low.o)
4214 (linux-ia64-low.o, linux-m32r-low.o, linux-mips-low.o)
4215 (linux-ppc-low.o, linux-s390-low.o, linux-sh-low.o)
4216 (linux-tic6x-low.o, linux-x86-low.o, linux-xtensa-low.o)
4217 (linux-tile-low.o, lynx-low.o, lynx-ppc-low.o, nto-low.o)
4218 (nto-x86-low.o, linux-low.o, win32-low.o, win32-arm-low.o)
4219 (win32-i386-low.o, spu-low.o, reg-arm.o, arm-with-iwmmxt.o)
4220 (arm-with-vfpv2.o, arm-with-vfpv3.o, arm-with-neon.o, reg-bfin.o)
4221 (reg-cris.o, reg-crisv32.o, i386.o, i386-linux.o, i386-avx.o)
4222 (i386-avx-linux.o, i386-mmx.o, i386-mmx-linux.o, reg-ia64.o)
4223 (reg-m32r.o, reg-m68k.o, reg-cf.o, mips-linux.o, mips-dsp-linux.o)
4224 (mips64-linux.o, mips64-dsp-linux.o, powerpc-32.o, powerpc-32l.o)
4225 (powerpc-altivec32l.o, powerpc-cell32l.o, powerpc-vsx32l.o)
4226 (powerpc-isa205-32l.o, powerpc-isa205-altivec32l.o)
4227 (powerpc-isa205-vsx32l.o, powerpc-e500l.o, powerpc-64l.o)
4228 (powerpc-altivec64l.o, powerpc-cell64l.o, powerpc-vsx64l.o)
4229 (powerpc-isa205-64l.o, powerpc-isa205-altivec64l.o)
4230 (powerpc-isa205-vsx64l.o, s390-linux32.o, s390-linux32v1.o)
4231 (s390-linux32v2.o, s390-linux64.o, s390-linux64v1.o)
4232 (s390-linux64v2.o, s390x-linux64.o, s390x-linux64v1.o)
4233 (s390x-linux64v2.o, tic6x-c64xp-linux.o, tic6x-c64x-linux.o)
4234 (tic6x-c62x-linux.o, reg-sh.o, reg-sparc64.o, reg-spu.o, amd64.o)
4235 (amd64-linux.o, amd64-avx.o, amd64-avx-linux.o, x32.o)
4236 (x32-linux.o, x32-avx.o, x32-avx-linux.o, reg-xtensa.o)
4237 (reg-tilegx.o): Remove.
4238 (all_object_files): New macro.
4239 Include .deps files.
4240 * aclocal.m4, configure: Rebuild.
4241 * acinclude.m4: Include depstand.m4, lead-dot.m4.
4242 * configure.ac: Invoke ZW_CREATE_DEPDIR,
4243 ZW_PROG_COMPILER_DEPENDENCIES. Compute GMAKE condition.
4244
e90e9ad9
TT
42452012-12-05 Tom Tromey <tromey@redhat.com>
4246
4247 PR gdb/14917:
4248 * server.h (current_insn_ptr, emit_error): Declare 'extern'.
4249
02d403bf 42502012-11-28 Markus Metzger <markus.t.metzger@intel.com>
945bf713
MM
4251
4252 * configure.ac: Check for linux/perf_event.h.
4253 * config.in: Regenerated.
4254 * configure: Regenerated.
4255
0270a750
PA
42562012-11-26 Maxime Villard <rustyBSD@gmx.fr>
4257
4258 * hostio.c (handle_readlink): Decrease buffer size
4259 parameter passed to readlink by one byte.
4260
8c29b58e
YQ
42612012-11-26 Yao Qi <yao@codesourcery.com>
4262
4263 * configure.ac (build_warnings): Append '-Wempty-body'.
4264 * configure: Regenerated.
4265 * linux-low.c (linux_create_inferior): Use braces for empty 'if'
4266 body.
4267
8bdce1ff
PM
42682012-11-15 Pierre Muller <muller@sourceware.org>
4269
4270 * configure.ac (AC_CHECK_HEADERS): Add wait.h header.
4271 * config.in: Regenerate.
4272 * configure: Regenerate.
4273 * linux-low.c: Use "gdb_stat.h" header instead of <sys/stat.h> header.
4274 Use "gdb_wait.h" header instead of <sys/wait.h> header.
4275 * lynx-low.c: Use "gdb_wait.h" header instead of <sys/wait.h> header.
4276 * remote-utils.c: Use "gdb_stat.h" header instead of <sys/stat.h>
4277 header.
4278 * server.c: Remove HAVE_WAIT_H conditional. Use "gdb_wait.h" header
4279 instead of <sys/wait.h> header.
4280 * spu-low.c: Use "gdb_wait.h" header instead of <sys/wait.h> header.
4281
02d403bf 42822012-11-13 Markus Metzger <markus.t.metzger@intel.com>
3ba6ad0f
MM
4283
4284 * Makefile.in: (INTERNAL_CFLAGS): Add -DGDBSERVER
4285 (various make rules): Remove -DGDBSERVER
4286
fbd5db48
YQ
42872012-11-09 Yao Qi <yao@codesourcery.com>
4288
4289 * spu-low.c (current_ptid): Move it to ..
4290 * gdbthread.h: ... here. New.
4291 * remote-utils.c (read_ptid): Use macro 'current_ptid'.
4292 * server.c (myresume, process_serial_event): Likewise.
4293 * thread-db.c (thread_db_find_new_threads): Likewise.
4294 * tracepoint.c (run_inferior_command): Likewise.
4295
b3dc46ff
AB
42962012-10-01 Andrew Burgess <aburgess@broadcom.com>
4297
4298 * server.c (handle_search_memory_1): Include access length in
4299 warning message.
4300
07c04788
HPN
43012012-09-05 Michael Brandt <michael.brandt@axis.com>
4302
4303 * linux-crisv32-low.c: Fix compile errors.
4304
918d227b
YQ
43052012-09-04 Yao Qi <yao@codesourcery.com>
4306
4307 * tracepoint.c (cmd_qtsv): Adjust debug message.
4308 Don't check CUR_TPOINT.
4309
18c1b81a
YQ
43102012-08-28 Yao Qi <yao@codesourcery.com>
4311
4312 * ax.c, tracepoint.c: Replace ATTR_FORMAT with ATTRIBUTE_PRINTF.
4313 * server.h: Include 'libiberty.h' and 'ansidecl.h'.
4314 (ATTR_NORETURN, ATTR_FORMAT, ATTR_MALLOC): Remove.
4315 Remove declarations of xmalloc, xreallloc, xstrdup and
4316 freeargv.
4317 * Makefile.in (libiberty_h): New.
4318 (server_h): Append dependencies 'libiberty.h' and 'ansidecl.h'.
4319 (linux-bfin-low.o): Append dependency 'libiberty.h'.
4320
dc82f37b
YQ
43212012-08-23 Yao Qi <yao@codesourcery.com>
4322
4323 * server.h: Remove declaration of 'xsnprintf'.
4324
406b1477
KS
43252012-08-22 Keith Seitz <keiths@redhat.com>
4326
4327 * server.h: Include build-gnulib-gbserver/config.h.
4328 * gdbreplay.c: Likewise.
4329
e6712ff1
DE
43302012-08-08 Doug Evans <dje@google.com>
4331
4332 * Makefile.in (SFILES): Add gdb_vecs.c.
4333 (OBS): Add gdb_vecs.o.
4334 (gdb_vecs_h, host_defs_h): New variables.
4335 (thread-db.o): Add $(gdb_vecs_h) dependency.
4336 (gdb_vecs.o): New rule.
4337 * thread-db.c: #include "gdb_vecs.h".
4338 (thread_db_load_search): Use a vector to iterate over path elements.
4339 Handle text appearing after "$pdir".
4340
4341 * configure.ac: Add check for strstr.
4342 * config.in: Regenerate.
4343 * configure: Regenerate.
4344
7c3270ae
UW
43452012-08-02 Ulrich Weigand <ulrich.weigand@linaro.org>
4346
4347 * hostio.c (handle_pread): If pread fails, fall back to attempting
4348 lseek/read.
4349 (handle_pwrite): Likewise for pwrite.
4350
b62e2b27
UW
43512012-08-01 Ulrich Weigand <ulrich.weigand@linaro.org>
4352
4353 * linux-arm-low.c (arm_linux_hw_point_initialize): Distinguish
4354 between unsupported TYPE and unimplementable ADDR/LEN combination.
4355 (arm_insert_point): Act on new return value.
4356
78a99e91
PA
43572012-07-31 Pedro Alves <palves@redhat.com>
4358
4359 * server.c (process_point_options): Only skip tokens if we find
4360 one that is unrecognized. Don't treat 'X' specially while
4361 skipping unrecognized tokens.
4362
fcf303ab
UW
43632012-07-30 Ulrich Weigand <ulrich.weigand@linaro.org>
4364
4365 * linux-arm-low.c (arm_linux_hw_point_initialize): Do not attempt
4366 to 4-byte-align HW breakpoint addresses for Thumb.
4367
7255706c
YQ
43682012-07-27 Yao Qi <yao@codesourcery.com>
4369
4370 PR remote/14161.
4371
4372 * server.h: Declare gdb_agent_about_to_close.
4373 * target.c (kill_inferior): Include "agent.h".
4374 New. Send command 'kill'.
4375 * target.h (kill_inferior): Removed macro.
4376 * tracepoint.c (gdb_agent_about_to_close): New.
4377 (gdb_agent_helper_thread): Handle command 'close'.
4378 Wait endlessly until the inferior stops.
4379 Install gdb_agent_remove_socket to atexit hook.
4380 (agent_socket_name): New static variable.
4381 (gdb_agent_socket_init): Replace local variable 'name' with
4382 'agent_socket_name'.
4383 (gdb_agent_remove_socket): New.
4384
5a3f286f
YQ
43852012-07-27 Yao Qi <yao@codesourcery.com>
4386
4387 * server.c (process_point_options): Stop at 'X' when parsing.
4388
961bd387
ME
43892012-07-19 Michael Eager <eager@eagercon.com>
4390
a261b8f5 4391 * i386-low.c (Z_packet_to_hw_type): Add Z_PACKET_HW_BP, translate
961bd387
ME
4392 to hw_execute.
4393 * linux-x86-low.c (x86_insert_point, x86_remove_point):
4394 Call i386_low_insert_watchpoint, i386_low_remove_watchpoint to add/del
4395 hardware breakpoint.
4396
aa7c7447
JK
43972012-07-07 Jan Kratochvil <jan.kratochvil@redhat.com>
4398
4399 * gdbserver/linux-low.c (initialize_low): Call
4400 linux_ptrace_init_warnings.
4401
7f216e7c
DE
44022012-07-02 Doug Evans <dje@google.com>
4403
4404 * mem-break.c (gdb_no_commands_at_breakpoint): Fix cast from
4405 pointer to int.
4406
d3ce09f5
SS
44072012-07-02 Stan Shebs <stan@codesourcery.com>
4408
4409 * Makefile.in (WARN_CFLAGS_NO_FORMAT): Define.
4410 (ax.o): Add it to build rule.
4411 (ax-ipa.o): Ditto.
4412 (OBS): Add format.o.
4413 (IPA_OBS): Add format.o.
4414 * server.c (handle_query): Claim support for breakpoint commands.
4415 (process_point_options): Add command case.
4416 (process_serial_event): Leave running if there are printfs in
4417 effect.
4418 * mem-break.h (any_persistent_commands): Declare.
4419 (add_breakpoint_commands): Declare.
4420 (gdb_no_commands_at_breakpoint): Declare.
4421 (run_breakpoint_commands): Declare.
4422 * mem-break.c (struct point_command_list): New struct.
4423 (struct breakpoint): New field command_list.
4424 (any_persistent_commands): New function.
4425 (add_commands_to_breakpoint): New function.
4426 (add_breakpoint_commands): New function.
4427 (gdb_no_commands_at_breakpoint): New function.
4428 (run_breakpoint_commands): New function.
4429 * linux-low.c (linux_wait_1): Test for and run breakpoint commands
4430 locally.
4431 * ax.c: Include format.h.
4432 (ax_printf): New function.
4433 (gdb_eval_agent_expr): Add printf opcode.
4434
2f8f6aed
YQ
44352012-06-13 Yao Qi <yao@codesourcery.com>
4436
4437 * server.c (start_inferior): Remove duplicated writes to fields
4438 'last_resume_kind' and 'last_status' of 'current_inferior'.
4439
0c9070b3
YQ
44402012-06-12 Yao Qi <yao@codesourcery.com>
4441 Pedro Alves <palves@redhat.com>
4442
4443 * linux-low.c (linux_set_resume_request): Simplify predicate. Add
4444 comment.
4445 * server.c (handle_v_cont): Extend comment.
4446
c52daf70
YQ
44472012-06-11 Yao Qi <yao@codesourcery.com>
4448
4449 * linux-low.c (linux_attach): Add 'static'.
4450
d38bbb0a
YQ
44512012-06-06 Yao Qi <yao@codesourcery.com>
4452
4453 * ax.c (gdb_eval_agent_expr): Print `top' in hex.
4454
89dc0afd
JK
44552012-06-01 Jan Kratochvil <jan.kratochvil@redhat.com>
4456
4457 Fix gcc -flto compilation warning.
4458 * server.c (main): Make variable multi_mode and attach volatile.
4459
75f62ce7
TJB
44602012-05-30 Thiago Jung Bauermann <thiago.bauermann@linaro.org>
4461
4462 * linux-low.c (get_r_debug): Disable code using DT_MIPS_RLD_MAP
4463 if the platform doesn't know about it.
4464
65f479b6
PA
44652012-05-30 Jeff Kenton <jkenton@tilera.com>
4466
4467 * Makefile.in (SFILES): Add linux-tile-low.c.
4468 (linux-tile-low.o, reg-tilegx.o, reg-tilegx.c): New rules.
4469 * configure.srv: Handle tilegx-*-linux*.
4470 * linux-tile-low.c: New file.
4471
0c5bf5a9
JK
44722012-05-28 Jan Kratochvil <jan.kratochvil@redhat.com>
4473
4474 * linux-low.c (linux_qxfer_libraries_svr4): Return -1 if R_DEBUG is -1.
4475
a493e3e2
PA
44762012-05-24 Pedro Alves <palves@redhat.com>
4477
4478 PR gdb/7205
4479
43aaf8b6 4480 Replace TARGET_SIGNAL_ with GDB_SIGNAL_ throughout.
a493e3e2 4481
2ea28649
PA
44822012-05-24 Pedro Alves <palves@redhat.com>
4483
4484 PR gdb/7205
4485
4486 Replace target_signal with gdb_signal throughout.
4487
8d409d16
MR
44882012-05-22 Maciej W. Rozycki <macro@codesourcery.com>
4489
4490 * linux-low.c (linux_store_registers): Avoid the copying sequence
4491 when no data has been retrieved by ptrace.
4492
23512c01
MGD
44932012-05-22 Will Deacon <will.deacon@arm.com>
4494
4495 * linux-low (__UCLIBC__ && !(__UCLIBC_HAS_MMU__ || __ARCH_HAS_MMU__)):
4496 Include asm/ptrace.h.
4497 (PT_TEXT_ADDR, PT_DATA_ADDR, PT_TEXT_END_ADDR): Define only if not
4498 already defined.
4499
4934b29e
MR
45002012-05-21 Maciej W. Rozycki <macro@codesourcery.com>
4501
4502 * linux-low.c (linux_store_registers): Don't re-retrieve data
4503 with ptrace that has already been obtained from /proc. Always
4504 copy any data retrieved with ptrace to the buffer supplied.
4505
bde24c0a
PA
45062012-05-11 Yao Qi <yao@codesourcery.com>
4507 Pedro Alves <palves@redhat.com>
4508
4509 * linux-low.c (enum stopping_threads_kind): New.
4510 (stopping_threads): Change type to `enum stopping_threads_kind'.
4511 (handle_extended_wait): If stopping and suspending threads, leave
4512 the new_lwp suspended too.
4513 (linux_wait_for_event): Adjust.
4514 (stop_all_lwps): Set `stopping_threads' to
4515 STOPPING_AND_SUSPENDING_THREADS or STOPPING_THREADS depending on
4516 whether we're suspending threads or just stopping them. Assert no
4517 recursion happens.
4518
623b6bdf
YQ
45192012-04-29 Yao Qi <yao@codesourcery.com>
4520
4521 * server.h: Move some code to ...
4522 * gdbthread.h: ... here. New.
4523 * Makefile.in (inferiors.o, regcache.o): Depends on gdbthread.h
4524 (remote-utils.o, server.o, target.o tracepoint.o): Likewise.
4525 (nto-low.o, win32-low.o): Likewise.
4526 * inferiors.c, linux-low.h, nto-low.c: Include gdbthread.h.
4527 * regcache.c, remote-utils.c, server.c: Likewise.
4528 * target.c, tracepoint.c, win32-low.c: Likewise.
4529
f15f9948
TJB
45302012-04-24 Thiago Jung Bauermann <thiago.bauermann@linaro.org>
4531
4532 * linux-low.h (PTRACE_ARG3_TYPE): Move macro from linux-low.c.
4533 (PTRACE_ARG4_TYPE): Likewise.
4534 (PTRACE_XFER_TYPE): Likewise.
4535 * linux-arm-low.c (arm_prepare_to_resume): Cast third argument of
4536 ptrace to PTRACE_ARG3_TYPE.
4537 * linux-low.c (PTRACE_ARG3_TYPE): Move macro to linux-low.h.
4538 (PTRACE_ARG4_TYPE): Likewise.
4539 (PTRACE_XFER_TYPE): Likewise.
4540 (linux_detach_one_lwp): Cast fourth argument of
4541 ptrace to long then PTRACE_ARG4_TYPE.
4542 (regsets_fetch_inferior_registers): Cast third argument of
4543 ptrace to long then PTRACE_ARG3_TYPE.
4544 (regsets_store_inferior_registers): Likewise.
4545
38ea300a
PA
45462012-04-20 Pedro Alves <palves@redhat.com>
4547
4548 * configure: Regenerate.
4549
c971b7fa
PA
45502012-04-19 Pedro Alves <palves@redhat.com>
4551
43aaf8b6 4552 * Makefile.in (GNULIB_BUILDDIR): New.
c971b7fa 4553 (LIBGNU, INCGNU, GNULIB_H): Adjust.
43aaf8b6
PA
4554 (SUBDIRS, CLEANDIRS, REQUIRED_SUBDIRS): New.
4555 (all, install-only, uninstall, clean-info, all-lib, clean): No
4556 longer pass GNULIB_FLAGS_TO_PASS. Use subdir_do.
4557 (maintainer-clean realclean distclean): Use subdir_do.
4558 (subdir_do): New.
4559 (gnulib/import/Makefile): Adjust. Replace gnulib/import with
c971b7fa 4560 $(GNULIB_BUILDDIR). Don't pass argument to config.status.
43aaf8b6
PA
4561 * acinclude.m4: Include acx_configure_dir.m4.
4562 * configure.ac: Remove gl_EARLY, gl_INIT, and AM_INIT_AUTOMAKE
4563 calls. Call AC_PROG_RANLIB. Configure gnulib using
4564 ACX_CONFIGURE_DIR.
4565 (GNULIB): New.
4566 (GNULIB_STDINT_H): Adjust.
4567 (AC_OUTPUT): Don't output gnulib/Makefile anymore.
4568 * gdbreplay.c: Include build-gnulib/config.h.
4569 * server.h: Likewise.
4570 * aclocal.m4: Regenerate.
4571 * config.in: Regenerate.
4572 * configure: Regenerate.
c971b7fa 4573
809277f8
PA
45742012-04-19 Pedro Alves <palves@redhat.com>
4575
4576 * Makefile.in (LIBGNU, INCGNU): Adjust.
4577 (GNULIB_FLAGS_TO_PASS, GNULIB_H): Adjust.
4578 (all, install-only, uninstall, clean-info, all-lib, clean)
4579 (maintainer-clean, Makefile, gnulib/Makefile): Adjust.
4580 * configure.ac: Adjust AC_OUTPUT output.
4581 * aclocal.m4: Regenerate.
4582 * configure: Regenerate.
4583
fd9bb8b8
PA
45842012-04-19 Pedro Alves <palves@redhat.com>
4585
4586 * Makefile.in (generated_files): New.
4587 (server_h): Remove the explicit dependency on config.h, and depend
4588 on $generated_files.
4589
1c298c66
PA
45902012-04-19 Pedro Alves <palves@redhat.com>
4591
4592 * Makefile.in (INCGNU): Add -Ignulib.
4593
57c4b50b
PA
45942012-04-19 Pedro Alves <palves@redhat.com>
4595
4596 * Makefile.in (GNULIB_INCLUDE_DIR): Rename to ...
4597 (INCGNU): ... this, and spell out -I here.
4598 (GNULIB_LIB): Rename to ...
4599 (LIBGNU): ... this.
4600 (INCLUDE_CFLAGS, gdbserver$(EXEEXT), $(GNULIB_LIB) rule): Adjust.
4601
1030e047
PA
46022012-04-19 Pedro Alves <palves@redhat.com>
4603
4604 * config.in: Regenerate.
4605
447d4319
PA
46062012-04-19 Pedro Alves <palves@redhat.com>
4607
4608 * configure.ac: Remove AC_CHECK_DECLS check for memmem.
4609 * server.h (memmem): Remove declaration.
4610 * config.in: Regenerate.
4611 * configure: Regenerate.
4612
aad9eab9
YQ
46132012-04-19 Yao Qi <yao@codesourcery.com>
4614
4615 * Makefile.in (SFILES): Add common/vec.c.
4616 (OBS): Add vec.o.
4617 (vec.o): New rule.
4618
3e10640f
YQ
46192012-04-19 Yao Qi <yao@codesourcery.com>
4620
4621 * remote-utils.c (prepare_resume_reply): Replace with macro
4622 target_core_of_thread.
4623 * server.c (handle_qxfer_threads_proper): Likewise.
4624 * target.h (traget_core_of_thread): New macro.
4625
71622373
PA
46262012-04-18 Pedro Alves <palves@redhat.com>
4627
4628 * aclocal.m4: Regenerate.
4629 * configure: Regenerate.
4630
80d26939
YQ
46312012-04-16 Yao Qi <yao@codesourcery.com>
4632
4633 * tracepoint.c (cmd_qtstart): Download tracepoints even when they are
4634 duplicated on address.
4635
42476b70
YQ
46362012-04-16 Yao Qi <yao@codesourcery.com>
4637
4638 * tracepoint.c (COPY_FIELD_TO_BUF): New macro.
4639 (struct tracepoint_action_ops) <send>: New field.
4640 (m_tracepoint_action_send, r_tracepoint_action_send): New.
4641 (agent_expr_send, x_tracepoint_action_send): New.
4642 (l_tracepoint_action_send): New.
4643 (cmd_qtdp): Download and install tracepoint
4644 according to `use_agent'.
4645 (run_inferior_command): Add one more parameter `len'.
4646 Update callers.
4647 (tracepoint_send_agent): New.
4648 (cmd_qtdp, cmd_qtstart): Call tracepoint_send_agent.
4649
7bc83639
YQ
46502012-04-16 Yao Qi <yao@codesourcery.com>
4651
4652 * tracepoint.c (download_tracepoints): Moved to ...
4653 (cmd_qtstart): ... here.
4654
5f18041e
YQ
46552012-04-14 Yao Qi <yao@codesourcery.com>
4656
4657 * tracepoint.c: Include inttypes.h.
4658 (struct collect_memory_action): Use sized types.
4659 (struct tracepoint): Likewise.
4660 (cmd_qtdp, stop_tracing): Update print specifiers.
4661 (cmd_qtp, response_tracepoint): Likewise.
4662 (collect_data_at_tracepoint): Likewise.
4663 (collect_data_at_step): Likewise.
4664
55a8c076
YQ
46652012-04-14 Yao Qi <yao@codesourcery.com>
4666
4667 Import gnulib module inttypes.
4668 * aclocal.m4, config.in, configure: Regenerated.
4669
dc750257
YQ
46702012-04-14 Yao Qi <yao@codesourcery.com>
4671
4672 * Makefile.in (maintainer-clean, realclean, distclean): Remove
4673 Makefile and config.status at last.
4674
0ab5faf9
YQ
46752012-04-13 Yao Qi <yao@codesourcery.com>
4676
4677 * tracepoint.c: Include stdint.h unconditionally.
4678
18f5fd81
TJB
46792012-04-13 Thiago Jung Bauermann <thiago.bauermann@linaro.org>
4680
4681 * acinclude.m4 (GDBSERVER_HAVE_THREAD_DB_TYPE): New macro based
4682 on BFD_HAVE_SYS_PROCFS_TYPE.
4683 * configure.ac: Look for lwpid_t and psaddr_t in libthread_db.h.
4684 * configure: Regenerate.
4685 * config.in: Likewise.
4686
4d47af5c
L
46872012-04-13 H.J. Lu <hongjiu.lu@intel.com>
4688
4689 * Makefile.in (clean): Also remove x32.c x32-linux.c
4690 x32-avx.c x32-avx-linux.c.
4691 (x32.o): New target.
4692 (x32.c): Likewise.
4693 (x32-linux.o): Likewise.
4694 (x32-linux.c): Likewise.
4695 (x32-avx.o): Likewise.
4696 (x32-avx.c): Likewise.
4697 (x32-avx-linux.o): Likewise.
4698 (x32-avx-linux.c): Likewise.
4699
4700 * configure.srv (srv_amd64_regobj): Add x32.o x32-avx.o.
4701 (srv_amd64_linux_regobj): Add x32-linux.o x32-avx-linux.o.
4702 (srv_i386_64bit_xmlfiles): Add i386/x32-core.xml.
4703 (srv_amd64_xmlfiles): Add i386/x32.xml i386/x32-avx.xml.
4704 (srv_amd64_linux_xmlfiles): Add i386/x32-linux.xml
4705 i386/x32-avx-linux.xml.
4706
4707 * linux-x86-low.c (init_registers_x32_linux): New prototype.
4708 (init_registers_x32_avx_linux): Likwise.
4709 (x86_linux_update_xmltarget): Call init_registers_x32_linux
4710 or init_registers_x32_avx_linux if linux_is_elf64 is false.
4711
ecedbe58
PA
47122012-04-13 Pedro Alves <palves@redhat.com>
4713
4714 * Makefile.in (GNULIB_FLAGS_TO_PASS): New.
4715 (FLAGS_TO_PASS): Don't change or set $top_srcdir, $srcdir and VPATH.
4716 (all, uninstall, clean-info, all-lib, clean, maintainer-clean)
4717 (realclean, distclean): Explicitly pass $GNULIB_FLAGS_TO_PASS to
4718 the sub-make.
4719
c92b5177
L
47202012-04-12 H.J. Lu <hongjiu.lu@intel.com>
4721
4722 * linux-x86-low.c (compat_x32_clock_t): New.
4723 (compat_x32_siginfo_t): Likewise.
4724 (compat_x32_siginfo_from_siginfo): Likewise.
4725 (siginfo_from_compat_x32_siginfo): Likewise.
4726 (linux_is_elf64): Likewise.
4727 (x86_siginfo_fixup): Call compat_x32_siginfo_from_siginfo
4728 and siginfo_from_compat_x32_siginfo for x32.
4729 (x86_arch_setup): Set linux_is_elf64.
4730
214d508e
L
47312012-04-12 H.J. Lu <hongjiu.lu@intel.com>
4732
4733 PR gdb/13969
4734 * linux-low.c (linux_pid_exe_is_elf_64_file): Also return the
4735 e_machine field.
4736 (linux_qxfer_libraries_svr4): Update call to elf_64_file_p.
4737 * linux-low.h (linux_pid_exe_is_elf_64_file): Updated.
4738 * linux-x86-low.c (x86_arch_setup): Check if GDBserver is
4739 compatible with process.
4740
c9a1864a
YQ
47412012-04-12 Yao Qi <yao@codesourcery.com>
4742
4743 * Makefile.in: Define abs_top_srcdir and abs_srcdir.
4744 (INCLUDE_CFLAGS): Append GNULIB_INCLUDE_DIR.
4745 (install-only, install-info, clean): Handle sub dir gnulib.
4746 (all-lib, am--refresh): New targets.
4747 (memmem.o): Remove target.
4748 * configure.ac: Remove AC_CONFIG_LIBOBJ_DIR.
4749 Invoke gl_EARLY. Invoke AC_CHECK_PROGS for make.
4750 (AC_REPLACE_FUNCS): Remove memmem.
4751 Invoke gl_INIT and AM_INIT_AUTOMAKE.
4752 (AC_OUTPUT): Generate Makefile in gnulib/.
4753 * aclocal.m4, config.in, configure: Regenerated.
4754
367ba2c2
MR
47552012-04-10 Maciej W. Rozycki <macro@codesourcery.com>
4756
4757 * linux-low.c (get_r_debug): Handle DT_MIPS_RLD_MAP.
4758
9d236627
PA
47592012-04-05 Pedro Alves <palves@redhat.com>
4760
4761 -Werror=strict-aliasing
4762
4763 * spu-low.c (parse_spufs_run): Avoid dereferencing type-punned
4764 pointer.
4765
111217b3
PA
47662012-04-04 Pedro Alves <palves@redhat.com>
4767
4768 * linux-sparc-low.c (sparc_fill_gregset_to_stack)
4769 (sparc_store_gregset_from_stack, sparc_store_gregset)
4770 (sparc_breakpoint_at): Fix formatting.
4771
8365dcf5
TJB
47722012-03-30 Thiago Jung Bauermann <thiago.bauermann@linaro.org>
4773
4774 * configure.ac: Check whether Elf32_auxv_t and Elf64_auxv_t
4775 are available.
4776 * linux-low.c [HAVE_ELF32_AUXV_T] (Elf32_auxv_t): Add typedef.
4777 [HAVE_ELF64_AUXV_T] (Elf64_auxv_t): Likewise.
4778 * config.in: Regenerate.
4779 * configure: Likewise.
4780
689cc2ae
PA
47812012-03-29 Pedro Alves <palves@redhat.com>
4782
4783 * linux-low.c (regsets_store_inferior_registers) [__sparc__]:
4784 Correct ptrace arguments.
4785
c14dfd32
PA
47862012-03-28 Pedro Alves <palves@redhat.com>
4787
4788 * linux-ia64-low.c (ia64_regmap): Map IA64_EC_REGNUM to PT_AR_EC.
4789 (IA64_GR0_REGNUM, IA64_FR0_REGNUM)
4790 (IA64_FR1_REGNUM): New defines.
4791 (ia64_fetch_register): New.
4792 (the_low_target): Install it.
4793 * linux-low.h (struct linux_target_ops) <fetch_register>: New
4794 field.
4795 * linux-low.c (linux_fetch_registers): Try the
4796 the_low_target.fetch_register hook first.
4797
4798 * linux-arm-low.c (the_low_target): Adjust.
4799 * linux-bfin-low.c (the_low_target): Adjust.
4800 * linux-cris-low.c (the_low_target): Adjust.
4801 * linux-crisv32-low.c (the_low_target): Adjust.
4802 * linux-m32r-low.c (the_low_target): Adjust.
4803 * linux-m68k-low.c (the_low_target): Adjust.
4804 * linux-mips-low.c (the_low_target): Adjust.
4805 * linux-ppc-low.c (the_low_target): Adjust.
4806 * linux-s390-low.c (the_low_target): Adjust.
4807 * linux-sh-low.c (the_low_target): Adjust.
4808 * linux-sparc-low.c (the_low_target): Adjust.
4809 * linux-tic6x-low.c (the_low_target): Adjust.
4810 * linux-x86-low.c (the_low_target): Adjust.
4811 * linux-xtensa-low.c (the_low_target): Adjust.
4812
63c88e13
PA
48132012-03-26 Pedro Alves <palves@redhat.com>
4814
4815 * server.c (handle_qxfer_libraries): Don't bail early if
4816 the_target->qxfer_libraries_svr4 is not NULL.
4817
fb723180
PA
48182012-03-26 Pedro Alves <palves@redhat.com>
4819
4820 * linux-low.c (linux_qxfer_libraries_svr4): Fix pasto in comment.
4821
0afae3cf
PA
48222012-03-23 Pedro Alves <palves@redhat.com>
4823
4824 * linux-low.c (linux_qxfer_libraries_svr4): Terminate the
4825 "library-list-svr4" element's start tag when the the DSO list is
4826 empty.
4827
485f1ee4
PA
48282012-03-23 Pedro Alves <palves@redhat.com>
4829
4830 * linux-low.c (read_one_ptr): Read the inferior's pointer through
4831 a variable whose type size is the same as the inferior's pointer
4832 size.
4833
a5362b9a
TS
48342012-03-21 Thomas Schwinge <thomas@codesourcery.com>
4835
4836 * linux-arm-low.c (arm_stopped_by_watchpoint): Use siginfo_t instead of
4837 struct siginfo.
4838 * linux-low.c (siginfo_fixup, linux_xfer_siginfo): Likewise.
4839 * linux-x86-low.c (x86_siginfo_fixup): Likewise.
4840 * linux-low.h: Include <signal.h>.
4841 (struct siginfo): Remove forward declaration.
4842 (struct linux_target_ops) <siginfo_fixup>: Use siginfo_t instead of
4843 struct siginfo.
4844
d226c142
MF
48452012-03-21 Mike Frysinger <vapier@gentoo.org>
4846
4847 * .gitignore: Ignore more files.
4848
122f36ef
PA
48492012-03-19 Pedro Alves <palves@redhat.com>
4850 Jan Kratochvil <jan.kratochvil@redhat.com>
4851
4852 * server.c (cont_thread, general_thread): Add describing comments.
4853 (start_inferior): Clear `cont_thread'.
4854 (handle_v_cont): Don't set `cont_thread' if resuming all threads
4855 of a process.
4856
fc3e5175
YQ
48572012-03-15 Yao Qi <yao@codesourcery.com>
4858
4859 * tracepoint.c (install_tracepoint): Move duplicated tracepoint
4860 handling to ...
4861 (cmd_qtdp): ... here.
4862
8d0d92cd
YQ
48632012-03-15 Yao Qi <yao@codesourcery.com>
4864
4865 * tracepoint.c (struct tracepoint_action_ops): New.
4866 (struct tracepoint_action) [!IN_PROCESS_AGENT] <ops>: New field.
4867 (m_tracepoint_action_download): New.
4868 (r_tracepoint_action_download): New.
4869 (x_tracepoint_action_download): New.
4870 (l_tracepoint_action_download): New.
4871 (add_tracepoint_action): Install `action->ops' according type.
4872 (download_tracepoint_1): Move code `download' function pointer
4873 of various tracepoint_action_ops.
4874
87b0bb13
JK
48752012-03-13 Jan Kratochvil <jan.kratochvil@redhat.com>
4876
4877 * linux-low.c (linux_attach_lwp_1): New variable buffer. Call
4878 linux_ptrace_attach_warnings.
4879
5f572dec
JK
48802012-03-13 Jan Kratochvil <jan.kratochvil@redhat.com>
4881
4882 * Makefile.in (linux-ptrace.o): New.
4883 * configure.srv (arm*-*-linux*, bfin-*-*linux*, crisv32-*-linux*)
4884 (cris-*-linux*, i[34567]86-*-linux*, ia64-*-linux*, m32r*-*-linux*)
4885 (m68*-*-linux*, m68*-*-uclinux*, mips*-*-linux*, powerpc*-*-linux*)
4886 (s390*-*-linux*, sh*-*-linux*, sparc*-*-linux*, tic6x-*-uclinux)
4887 (x86_64-*-linux*, xtensa*-*-linux*): Add linux-ptrace.o to SRV_TGTOBJ
4888 of these targets.
4889 * linux-low.c (linux_attach_lwp_1): Remove redundent else clause.
4890
f4647387
YQ
48912012-03-08 Yao Qi <yao@codesourcery.com>
4892 Pedro Alves <palves@redhat.com>
4893
4894 Fix PR server/13392.
4895 * linux-x86-low.c (amd64_install_fast_tracepoint_jump_pad): Check
4896 offset of JMP insn.
4897 * tracepoint.c (remove_tracepoint): New.
4898 (cmd_qtdp): Call remove_tracepoint when failed to install.
4899
9b224c5e
PA
49002012-03-07 Pedro Alves <palves@redhat.com>
4901
4902 * linux-low.c (get_detach_signal): New.
4903 (linux_detach_one_lwp): Get rid of a pending SIGSTOP with SIGCONT.
4904 Pass on pending signals to PTRACE_DETACH. Check the result of the
4905 ptrace call.
4906 * server.c (program_signals, program_signals_p): New.
4907 (handle_general_set): Handle QProgramSignals.
4908 * server.h (program_signals, program_signals_p): Declare.
4909
e237a7e2
JK
49102012-03-05 Pedro Alves <palves@redhat.com>
4911 Jan Kratochvil <jan.kratochvil@redhat.com>
4912
4913 * linux-low.c (get_dynamic): Don't warn when PT_PHDR isn't found.
4914 New comment why.
4915
5808517f
YQ
49162012-03-03 Yao Qi <yao@codesourcery.com>
4917
4918 * tracepoint.c (tracepoint_look_up_symbols): Update call to
4919 agent_look_up_symbols.
4920
58b4daa5
YQ
49212012-03-03 Yao Qi <yao@codesourcery.com>
4922
4923 * Makefile.in (linux-low.o): Keep dependence on agent.h.
4924 (linux-x86-low.o): Likewise.
4925 * server.h: Remove in_process_agent_loaded.
4926 * tracepoint.c (in_process_agent_loaded): Removed. Moved it
4927 common/agent.c.
4928 Update callers.
4929
8ffcbaaf
YQ
49302012-03-03 Yao Qi <yao@codesourcery.com>
4931
4932 * tracepoint.c (gdb_agent_capability): New global.
4933 (in_process_agent_loaded_ust): Renamed to
4934 `in_process_agent_supports_ust'.
4935 Update callers.
4936 (in_process_agent_supports_ust): Call agent_capability_check.
4937 (clear_installed_tracepoints): Assert that agent supports
4938 agent.
4939
d1feda86
YQ
49402012-03-03 Yao Qi <yao@codesourcery.com>
4941
4942 * linux-low.c (linux_supports_agent): New.
4943 (linux_target_ops): Initialize field `supports_agent' with
4944 linux_supports_agent.
4945 * target.h (struct target_ops) <supports_agent>: New.
4946 (target_supports_agent): New macro.
4947 * server.c (handle_general_set): Handle packet 'QAgent'.
4948 (handle_query): Send `QAgent+'.
4949 * Makefile.in (server.o): Depends on agent.h.
4950
2fa291ac
YQ
49512012-03-03 Yao Qi <yao@codesourcery.com>
4952
4953 * Makefile.in (OBS): Add agent.o.
4954 Add new rule for agent.o.
4955 Track dependence of tracepoint.c on agent.h.
4956 * tracepoint.c (run_inferior_command_1):
4957 (run_inferior_command): Call agent_run_command.
4958 (gdb_ust_connect_sync_socket): Deleted. Move it to
4959 common/agent.c.
4960 (resume_thread, stop_thread): Likewise.
4961 (gdb_ust_socket_init): Renamed to ...
4962 (gdb_agent_socket_init): ... New.
4963 (gdb_ust_thread): Renamed to ...
4964 (gdb_agent_helper_thread): ... New.
4965 (gdb_ust_init): Move some code to ...
4966 (gdb_agent_init): ... here. New.
4967 [HAVE_UST]: Call gdb_ust_init.
4968 (initialize_tracepoint_ftlib): Call gdb_agent_init.
4969 * configure.ac: Add `sys/un.h' to AC_CHECK_HEADERS.
4970 * config.in, configure: Regenerated.
4971
05044653
PA
49722012-03-02 Pedro Alves <palves@redhat.com>
4973
4974 * inferiors.c (add_pid_to_list, pull_pid_from_list): Delete.
4975 * linux-low.c (struct simple_pid_list): New.
4976 (stopped_pids): New a struct simple_pid_list pointer.
4977 (add_to_pid_list, pull_pid_from_list): New.
4978 (handle_extended_wait): Don't assume the first signal new children
4979 report is SIGSTOP. Adjust call to pull_pid_from_list.
4980 (linux_wait_for_lwp): Adjust.
4981
8d00225b
YQ
49822012-03-02 Yao Qi <yao@codesourcery.com>
4983
4984 * tracepoint.c (do_action_at_tracepoint): Write `stop_pc' in
4985 debug log.
4986
19560ba5
YQ
49872012-03-02 Yao Qi <yao@codesourcery.com>
4988
4989 * tracepoint.c (collect_ust_data_at_tracepoint): Remove parameters
4990 `stop_pc' and `tpoint'. Update caller.
4991
1faeff08
MR
49922012-03-01 Maciej W. Rozycki <macro@codesourcery.com>
4993
4994 * linux-low.h (linux_target_ops): Add regset_bitmap member.
4995 * linux-low.c (use_linux_regsets): New macro.
4996 [!HAVE_LINUX_REGSETS] (regsets_fetch_inferior_registers): Likewise.
4997 [!HAVE_LINUX_REGSETS] (regsets_store_inferior_registers): Likewise.
4998 (linux_register_in_regsets): New function.
4999 (usr_fetch_inferior_registers): Skip registers covered by
5000 regsets.
5001 (usr_store_inferior_registers): Likewise.
5002 (usr_fetch_inferior_registers): New macro.
5003 (usr_store_inferior_registers): Likewise.
5004 (linux_fetch_registers): Handle mixed regset/non-regset targets.
5005 (linux_store_registers): Likewise.
5006 * linux-mips-low.c (init_registers_mips_dsp_linux): New
5007 prototype.
5008 (init_registers_mips64_dsp_linux): Likewise.
5009 (init_registers_mips_linux): New macro.
5010 (init_registers_mips_dsp_linux): Likewise.
5011 (mips_dsp_num_regs): Likewise.
5012 (DSP_BASE, DSP_CONTROL): New fallback macros.
5013 (mips_base_regs): New macro.
5014 (mips_regmap): Use it. Fix the size.
5015 (mips_dsp_regmap): New variable.
5016 (mips_dsp_regset_bitmap): Likewise.
5017 (mips_arch_setup): New function.
5018 (mips_cannot_fetch_register): Use the_low_target.regmap rather
5019 than mips_regmap.
5020 (mips_cannot_store_register): Likewise.
5021 (the_low_target): Update .arch_setup, .num_regs and .regmap
5022 initializers. Add .regset_bitmap initializer.
5023 * linux-arm-low.c (the_low_target): Add .regset_bitmap
5024 initializer.
5025 * linux-bfin-low.c (the_low_target): Likewise.
5026 * linux-cris-low.c (the_low_target): Likewise.
5027 * linux-crisv32-low.c (the_low_target): Likewise.
5028 * linux-ia64-low.c (the_low_target): Likewise.
5029 * linux-m32r-low.c (the_low_target): Likewise.
5030 * linux-m68k-low.c (the_low_target): Likewise.
5031 * linux-ppc-low.c (the_low_target): Likewise.
5032 * linux-s390-low.c (the_low_target): Likewise.
5033 * linux-sh-low.c (the_low_target): Likewise.
5034 * linux-sparc-low.c (the_low_target): Likewise.
5035 * linux-tic6x-low.c (the_low_target): Likewise.
5036 * linux-x86-low.c (the_low_target): Likewise.
5037 * linux-xtensa-low.c (the_low_target): Likewise.
5038 * configure.srv <mips*-*-linux*>: Add mips-dsp-linux.o and
5039 mips64-dsp-linux.o to srv_regobj. Add mips-dsp-linux.xml,
5040 mips64-dsp-linux.xml, mips-dsp.xml and mips64-dsp.xml to
5041 srv_xmlfiles.
5042 * Makefile.in (mips-dsp-linux.o, mips-dsp-linux.c): New targets.
5043 (mips64-dsp-linux.o, mips64-dsp-linux.c): Likewise.
5044
c03e6ccc
YQ
50452012-02-29 Yao Qi <yao@codesourcery.com>
5046 Pedro Alves <palves@redhat.com>
5047
5048 * linux-low.c: (linux_wait_1): Call unsuspend_all_lwps when
5049 `step_over_finished' is true.
5050
644cebc9
PA
50512012-02-27 Pedro Alves <palves@redhat.com>
5052
5053 * linux-low.c (pid_is_stopped): Delete, moved to common/.
5054 (linux_attach_lwp_1): Adjust to use linux_proc_pid_is_stopped.
5055
c14d7ab2
PA
50562012-02-27 Pedro Alves <palves@redhat.com>
5057
5058 PR server/9684
5059 * linux-low.c (pid_is_stopped): New.
5060 (linux_attach_lwp_1): Handle attaching to 'T (stopped)' processes.
5061
412c89dd
LM
50622012-02-25 Luis Machado <lgustavo@codesourcery.com>
5063
5064 * mem-break.c (clear_gdb_breakpoint_conditions): Fix de-allocation
5065 of conditions.
5066
b745defe
MR
50672012-02-24 Maciej W. Rozycki <macro@codesourcery.com>
5068
5069 * linux-mips-low.c (mips_regmap): Correct the index of $f9.
5070
9f3a5c85
LM
50712012-02-24 Luis Machado <lgustavo@codesourcery>
5072
5073 * server.c (handle_query): Advertise support for target-side
5074 breakpoint condition evaluation.
5075 (process_point_options): New function.
5076 (process_serial_event): When inserting a breakpoint, check for
5077 a target-side condition that should be evaluated.
5078
5079 * mem-break.c: Include regcache.h and ax.h.
5080 (point_cond_list_t): New data structure.
5081 (breakpoint) <cond_list>: New field.
5082 (find_gdb_breakpoint_at): Make non-static.
5083 (delete_gdb_breakpoint_at): Clear any target-side
5084 conditions.
5085 (clear_gdb_breakpoint_conditions): New function.
5086 (add_condition_to_breakpoint): Likewise.
5087 (add_breakpoint_condition): Likewise.
5088 (gdb_condition_true_at_breakpoint): Likewise.
5089 (gdb_breakpoint_here): Return result directly instead
5090 of going through a local variable.
5091
5092 * mem-break.h (find_gdb_breakpoint_at): New prototype.
5093 (clear_gdb_breakpoint_conditions): Likewise.
5094 (add_breakpoint_condition): Likewise.
5095 (gdb_condition_true_at_breakpoint): Likewise.
5096
5097 * linux-low.c (linux_wait_1): Evaluate target-side breakpoint condition.
5098 (need_step_over_p): Take target-side breakpoint condition into
5099 consideration.
5100
5e1dc496
LM
51012012-02-24 Luis Machado <lgustavo@codesourcery>
5102
5103 * server.h: Include tracepoint.h.
5104 (agent_mem_read, agent_get_trace_state_variable_value,
5105 agent_set_trace_state_variable_value,
5106 agent_tsv_read, agent_mem_read_string, get_get_tsv_func_addr,
5107 get_set_tsv_func_addr): New prototypes.
5108
5109 * ax.h: New include file.
5110 * ax.c: New source file.
5111
5112 * tracepoint.c: Include ax.h.
5113 (gdb_agent_op, gdb_agent_op_names, gdb_agent_op_sizes,
5114 agent_expr, eval_result_type): Move to ax.h.
5115 (parse_agent_expr): Rename to ...
5116 (gdb_parse_agent_expr): ... this, make it non-static and move
5117 to ax.h.
5118 (unparse_agent_expr) Rename to ...
5119 (gdb_unparse_agent_expr): ... this, make it non-static and move
5120 to ax.h.
5121 (eval_agent_expr): Rename to ...
5122 (eval_tracepoint_agent_expr): ... this.
5123 (agent_mem_read, agent_mem_read_string, agent_tsv_read): Remove
5124 forward declarations.
5125 (add_tracepoint_action): Call gdb_parse_agent_expr (...).
5126 (agent_get_trace_state_variable_value): New function.
5127 (agent_set_trace_state_variable_value): New function.
5128 (cmd_qtdp): Call gdb_parse_agent_expr (...).
5129 (response_tracepoint): Call gdb_unparse_agent_expr (...).
5130 (do_action_at_tracepoint): Call eval_tracepoint_agent_expr (...).
5131 (condition_true_at_tracepoint): Likewise.
5132 (parse_agent_expr): Rename to ...
5133 (gdb_parse_agent_expr): ... this and move to ax.c.
5134 (unparse_agent_expr): Rename to ...
5135 (gdb_unparse_agent_expr): ... this and move to ax.c.
5136 (gdb_agent_op_name): Move to ax.c.
5137 (eval_agent_expr): Rename to ...
5138 (gdb_eval_agent_expr): ... this, use regcache passed as parameter
5139 and move to ax.c.
5140 (eval_tracepoint_agent_expr): New function.
5141 (agent_mem_read, agent_mem_read_string, agent_tsv_read): Make
43aaf8b6 5142 non-static.
5e1dc496
LM
5143 (current_insn_ptr, emit_error, struct bytecode_address): Move to
5144 ax.c.
5145 (emit_prologue, emit_epilogue, emit_add, emit_sub, emit_mul, emit_lsh,
5146 emit_rsh_signed, emit_rsh_unsigned, emit_ext, emit_log_not,
5147 emit_bit_and, emit_bit_or, emit_bit_xor, emit_bit_not, emit_equal,
5148 emit_less_signed, emit_less_unsigned, emit_ref, emit_if_goto,
5149 emit_goto, write_goto_address, emit_const, emit_reg, emit_pop,
5150 emit_stack, emit_zero_ext, emit_swap, emit_stack_adjust,
5151 emit_int_call_1, emit_void_call_2, emit_eq_goto, emit_ne_goto,
5152 emit_lt_goto, emit_ge_goto, emit_gt_goto, emit_le_goto): Move to ax.c.
5153 (get_get_tsv_func_addr, get_set_tsv_func_addr): New functions.
5154 (compile_bytecodes): Remove forward declaration.
5155 (is_goto_target): Move to ax.c.
5156 (compile_bytecodes): Move to ax.c and call
5157 agent_get_trace_state_variable_value (...) and
5158 agent_set_trace_state_variable_value (...).
5159
5160 * Makefile.in: Update ax.c and IPA dependencies.
5161
277e4e52
PA
51622012-02-24 Pedro Alves <palves@redhat.com>
5163
5164 * tracepoint.c (cmd_bigqtbuffer): Rename as ...
5165 (cmd_bigqtbuffer_circular): ... this. Only handle
5166 'QTBuffer:circular:'.
5167 (handle_tracepoint_general_set): Adjust.
5168
bf4c19f7
YQ
51692012-02-16 Yao Qi <yao@codesourcery.com>
5170
5171 * inferiors.c: Move code to ...
5172 * dll.c: .... here. New.
5173 * server.h: Declare clear_dlls.
5174 * Makefile.in (SFILES): Add dll.c.
5175 (OBS): Add dll.o
5176 (dll.o): New rule.
5177
d73f2619
YQ
51782012-02-11 Yao Qi <yao@codesourcery.com>
5179
5180 * server.c: (handle_monitor_command): Add a new parameter
5181 `own_buf'.
5182 (handle_query): Update caller.
5183
f8255c2a
JB
51842012-02-09 Joel Brobecker <brobecker@adacore.com>
5185
5186 * configure.ac: Add readlink to AC_CHECK_FUNCS list.
5187 * configure, config.in: Regenerate.
5188 * hostio.c: Provide an alternate implementation if HAVE_READLINK
5189 is not defined.
5190
da84f473
PA
51912012-02-02 Pedro Alves <palves@redhat.com>
5192
5193 Try SIGKILL first, then PTRACE_KILL.
5194 * linux-low.c (linux_kill_one_lwp): New.
5195 (linux_kill_one_lwp): Rename to ...
5196 (kill_one_lwp_callback): ... this. Use the new
5197 linux_kill_one_lwp.
5198
e886a173
PA
51992012-02-02 Pedro Alves <palves@redhat.com>
5200
5201 * tracepoint.c (cmd_qtminftpilen): Return 0 if there's no current
5202 inferior.
5203
be07f1a2
PA
52042012-01-27 Pedro Alves <palves@redhat.com>
5205
5206 * linux-low.c (linux_child_pid_to_exec_file): Delete.
5207 (elf_64_file_p): Make static.
5208 (linux_pid_exe_is_elf_64_file): New.
5209 * linux-low.h (linux_child_pid_to_exec_file, elf_64_file_p):
5210 Delete declarations.
5211 (linux_pid_exe_is_elf_64_file): Declare.
5212 * linux-x86-low.c (x86_arch_setup): Use
5213 linux_pid_exe_is_elf_64_file.
5214
d8301ad1
JK
52152012-01-25 Jan Kratochvil <jan.kratochvil@redhat.com>
5216
5217 * linux-low.c (linux_wait_for_event_1): Rename to ...
5218 (linux_wait_for_event): ... here and merge it with former
5219 linux_wait_for_event - new variable wait_ptid, use it.
5220 (linux_wait_for_event): Remove - merge it to linux_wait_for_event_1.
5221
01b17894
PA
52222012-01-23 Pedro Alves <palves@redhat.com>
5223
5224 * server.c (main): Avoid yet another case of infinite loop while
5225 detaching/killing after a longjmp.
5226
e825046f
JK
52272012-01-20 Jan Kratochvil <jan.kratochvil@redhat.com>
5228
5229 Code cleanup.
5230 * linux-low.c (linux_wait_for_event_1): Use ptid_is_pid.
5231
b9e7b9c3
UW
52322012-01-20 Ulrich Weigand <ulrich.weigand@linaro.org>
5233
5234 * hostio.c (handle_readlink): New function.
5235 (handle_vFile): Call it to handle "vFile:readlink" packets.
5236
901f9912
UW
52372012-01-20 Pedro Alves <palves@redhat.com>
5238 Ulrich Weigand <ulrich.weigand@linaro.org>
5239
5240 * server.c (handle_v_requests): Only support vAttach and vRun to
5241 start multiple processes when in extended protocol mode.
5242
fc1ab1a0
PA
52432012-01-17 Pedro Alves <palves@redhat.com>
5244
5245 * tracepoint.c (initialize_tracepoint): Use mmap instead of
5246 memalign plus mprotect to allocate the scratch buffer.
5247
7d5d4e98
PA
52482012-01-13 Pedro Alves <palves@redhat.com>
5249
5250 * server.c (attach_inferior): Clear `cont_thread'.
5251
f128d5e9
PA
52522012-01-13 Pedro Alves <palves@redhat.com>
5253
5254 * server.c (main): Avoid infinite loop while detaching/killing
5255 after a longjmp.
5256
06db92f0
DE
52572012-01-09 Doug Evans <dje@google.com>
5258
5259 * server.c (start_inferior): Set last_ptid in --wrapper case.
5260
32d92999
YQ
52612012-01-06 Yao Qi <yao@codesourcery.com>
5262
5263 * tracepoint.c [IN_PROCESS_AGENT] (debug_threads): Macro
5264 defined.
5265 [IN_PROCESS_AGENT] (debug_agent): New global variable.
5266
5e0a92a9
YQ
52672012-01-04 Yao Qi <yao@codesourcery.com>
5268
5269 * tracepoint.c (cmd_qtdp): Print debug message
5270 for static tracepoint.
5271
ae639e8c
YQ
52722012-01-04 Yao Qi <yao@codesourcery.com>
5273
5274 * tracepoint.c (trace_vdebug): Differentiate debug message
5275 between gdbserver and IPA.
5276
f72429c5
YQ
52772012-01-03 Yao Qi <yao@codesourcery.com>
5278
5279 * tracepoint.c (tracepoint_was_hit): Don't collect for
5280 static tracepoint.
5281
12c3e59c
JB
52822012-01-02 Joel Brobecker <brobecker@adacore.com>
5283
5284 * terminal.h: Reformat copyright header.
5285
67827812
JB
52862012-01-02 Joel Brobecker <brobecker@adacore.com>
5287
5288 * server.c (gdbserver_version): Update copyright year.
5289 * gdbreplay.c (gdbreplay_version): Likewise.
5290
3e52c33d
JK
52912011-12-18 Jan Kratochvil <jan.kratochvil@redhat.com>
5292
5293 * linux-low.c (linux_create_inferior): Put empty if clause for write.
5294
5295 Revert:
5296 2011-12-18 Hui Zhu <teawater@gmail.com>
5297 * linux-low.c (linux_create_inferior): Save return value to ret.
5298
66f1260e
HZ
52992011-12-18 Hui Zhu <teawater@gmail.com>
5300
5301 * linux-low.c (linux_create_inferior): Save return value to ret.
5302
e77616d7
DE
53032011-12-16 Doug Evans <dje@google.com>
5304
e7b06c57
DE
5305 * linux-low.c (linux_create_inferior): If stdio connection,
5306 redirect stdin from /dev/null, stdout to stderr.
5307 * remote-utils.c (remote_is_stdio): New static global.
5308 (remote_connection_is_stdio): New function.
5309 (remote_prepare): Handle stdio connection.
5310 (remote_open): Ditto.
5311 (remote_close): Don't close stdin for stdio connections.
5312 (read_prim,write_prim): New functions. Replace all calls to
5313 read/write to these.
5314 * server.c (main): Watch for "-" argument. Move call to
5315 remote_prepare before start_inferior.
5316 * server.h (STDIO_CONNECTION_NAME): New macro.
5317 (remote_connection_is_stdio): Declare.
5318
e77616d7
DE
5319 * remote-utils.c (prepare_resume_reply): Remove extraneous \n
5320 in debugging output.
5321
82067193
YQ
53222011-12-15 Yao Qi <yao@codesourcery.com>
5323
5324 * tracepoint.c: Include sys/syscall.h.
5325 (gdb_ust_thread): Remove preprocessor conditional.
5326
82bfbe7e
PA
53272011-12-14 Pedro Alves <pedro@codesourcery.com>
5328
5329 * linux-low.c (linux_detach_one_lwp): Call
5330 the_low_target.prepare_to_resume before detaching.
5331
712c6575
YQ
53322011-12-14 Yao Qi <yao@codesourcery.com>
5333
5334 * tracepoint.c (gdb_ust_thread): Don't ignore return value
5335 of write.
5336
d54d1edf
YQ
53372011-12-14 Yao Qi <yao@codesourcery.com>
5338
5339 * i386-low.c (i386_low_stopped_data_address): Initialize local
5340 variable `control'.
5341
6210a125
PA
53422011-12-13 Pedro Alves <pedro@codesourcery.com>
5343
5344 PR remote/13492
5345
5346 * i386-low.c (i386_low_stopped_data_address): Avoid fetching
5347 DR_CONTROL unless necessary. Extend comments.
5348 * linux-x86-low.c (x86_linux_prepare_to_resume): Don't write to
5349 DR0-3 if not used. If any watchpoint was set, clear DR_STATUS.
5350
2ece8244
YQ
53512011-12-13 Yao Qi <yao@codesourcery.com>
5352
5353 * tracepoint.c (trace_buffer_alloc): Replace magic numbers with
5354 macros.
5355 (upload_fast_traceframes, upload_fast_traceframes): Likewise.
5356
784867a5
JK
53572011-12-08 Jan Kratochvil <jan.kratochvil@redhat.com>
5358
5359 * linux-low.c (linux_kill): Skip PTRACE_KILL if LWP does not exist.
5360 Print new debug message for such case.
5361
6bf36717
JK
53622011-12-06 Jan Kratochvil <jan.kratochvil@redhat.com>
5363
5364 Fix overlapping memcpy.
5365 * mem-break.c (set_raw_breakpoint_at): New variable buf. Use it for
5366 the read_inferior_memory transfer.
5367 (delete_fast_tracepoint_jump): New variable buf. Use it for the
5368 write_inferior_memory transfer.
5369 (set_fast_tracepoint_jump): New variable buf. Use it for the
5370 read_inferior_memory and write_inferior_memory transfers.
5371 (uninsert_fast_tracepoint_jumps_at, reinsert_fast_tracepoint_jumps_at)
5372 (delete_raw_breakpoint, uninsert_raw_breakpoint): New variable buf.
5373 Use it for the write_inferior_memory transfer.
5374 (check_mem_read, check_mem_write): New gdb_asserts for overlapping
5375 buffers.
5376
50275556
MR
53772011-12-06 Maciej W. Rozycki <macro@codesourcery.com>
5378
5379 * linux-low.c (fetch_register, store_register): Make code
5380 consistent, fix formatting.
5381
7325beb4
MR
53822011-12-06 Maciej W. Rozycki <macro@codesourcery.com>
5383
5384 * linux-low.c (usr_store_inferior_registers): Factor out code
5385 to handle individual registers into...
5386 (store_register): ... this new function.
5387
c642a434
UW
53882011-12-06 Ulrich Weigand <uweigand@de.ibm.com>
5389
5390 * Makefile.in (s390-linux32v1.o, s390-linux32v1.c): New rules.
5391 (s390-linux32v2.o, s390-linux32v2.c): Likewise.
5392 (s390-linux64v1.o, s390-linux64v1.c): Likewise.
5393 (s390-linux64v2.o, s390-linux64v2.c): Likewise.
5394 (s390x-linux64v1.o, s390x-linux64v1.c): Likewise.
5395 (s390x-linux64v2.o, s390x-linux64v2.c): Likewise.
5396 * configure.srv [s390*-*-linux*] (srv_regobj): Add new objects.
5397 (srv_xmlfiles): Add new XML files.
5398
5399 * linux-s390-low.c: Include "elf/common.h", <sys/ptrace.h>,
5400 and <sys/uio.h>.
5401 (PTRACE_GETREGSET, PTRACE_SETREGSET): Define if undefined.
5402 (init_registers_s390_linux32v1): Add prototype.
5403 (init_registers_s390_linux32v2): Likewise.
5404 (init_registers_s390_linux64v1): Likewise.
5405 (init_registers_s390_linux64v2): Likewise.
5406 (init_registers_s390x_linux64v1): Likewise.
5407 (init_registers_s390x_linux64v2): Likewise.
5408 (s390_num_regs): Increment to 52.
5409 (s390_regmap): Add orig_r2 register.
5410 (s390_num_regs_3264): Increment to 68.
5411 (s390_regmap_3264): Add orig_r2 register.
5412 (s390_collect_ptrace_register): Handle orig_r2 register.
5413 (s390_supply_ptrace_register): Likewise.
5414 (s390_fill_last_break): New function.
5415 (s390_store_last_break): Likewise.
5416 (s390_fill_system_call): New function.
5417 (s390_store_system_call): Likewise.
5418 (target_regsets): Handle NT_S390_LAST_BREAK and NT_S390_SYSTEM_CALL
5419 register sets.
5420 (s390_check_regset): New function.
5421 (s390_arch_setup): Check for presence of NT_S390_LAST_BREAK and
5422 NT_S390_SYSTEM_CALL regsets and use appropriate description.
5423 Update target_regsets for available register sets.
5424
2268b414
JK
54252011-12-02 Paul Pluzhnikov <ppluzhnikov@google.com>
5426 Jan Kratochvil <jan.kratochvil@redhat.com>
5427
5428 * linux-low.c (get_phdr_phnum_from_proc_auxv, get_dynamic, get_r_debug)
5429 (read_one_ptr, struct link_map_offsets, linux_qxfer_libraries_svr4):
5430 New.
5431 (struct linux_target_ops): Install linux_qxfer_libraries_svr4.
5432 * linux-low.h (struct process_info_private): New member r_debug.
5433 * server.c (handle_qxfer_libraries): Call
5434 the_target->qxfer_libraries_svr4.
5435 (handle_qxfer_libraries_svr4): New function.
5436 (qxfer_packets): New entry "libraries-svr4".
5437 (handle_query): Check QXFER_LIBRARIES_SVR4 and report libraries-svr4.
5438 * target.h (struct target_ops): New member qxfer_libraries_svr4.
5439 * remote.c (remote_xfer_partial): Call add_packet_config_cmd for
5440 PACKET_qXfer_libraries_svr4.
5441
d6db1fab
UW
54422011-11-30 Ulrich Weigand <uweigand@de.ibm.com>
5443
5444 * linux-s390-low.c (s390_collect_ptrace_register): Fully convert
5445 PSW address/mask between 8-byte and 16-byte formats.
5446 (s390_supply_ptrace_register): Likewise.
5447 (s390_get_pc, s390_set_pc): 4-byte PSW address always includes
5448 basic addressing mode bit.
5449
242f5f1c
SS
54502011-11-24 Stan Shebs <stan@codesourcery.com>
5451
5452 * tracepoint.c (cmd_qtstatus): Use plongest instead of %llx.
5453
f196051f
SS
54542011-11-17 Stan Shebs <stan@codesourcery.com>
5455
5456 * tracepoint.c (struct tracepoint): New field traceframe_usage.
5457 (tracing_start_time): New global.
5458 (tracing_stop_time): New global.
5459 (tracing_user_name): New global.
5460 (tracing_notes): New global.
5461 (tracing_stop_note): New global.
5462 (cmd_qtstart): Set traceframe_usage, start_time.
5463 (stop_tracing): Set stop_time.
5464 (cmd_qtstatus): Report additional status.
5465 (cmd_qtp): New function.
5466 (handle_tracepoint_query): Call it.
5467 (cmd_qtnotes): New function.
5468 (handle_tracepoint_general_set): Call it.
5469 (get_timestamp): Rename from tsv_get_timestamp.
5470
405f8e94
SS
54712011-11-14 Stan Shebs <stan@codesourcery.com>
5472 Kwok Cheung Yeung <kcy@codesourcery.com>
5473
5474 * linux-x86-low.c (small_jump_insn): New.
5475 (i386_install_fast_tracepoint_jump_pad): Add arguments for
5476 trampoline and error message, build a trampoline and issue a small
5477 jump instruction to it.
5478 (x86_install_fast_tracepoint_jump_pad): Add arguments for
5479 trampoline and error message.
5480 (x86_get_min_fast_tracepoint_insn_len): New.
5481 (the_low_target): Add call to x86_get_min_fast_tracepoint_insn_len.
5482 * linux-low.h (struct linux_target_ops): Add arguments to
5483 install_fast_tracepoint_jump_pad operation, add new operation.
5484 * linux-low.c (linux_install_fast_tracepoint_jump_pad): Add
5485 arguments.
5486 (linux_get_min_fast_tracepoint_insn_len): New function.
5487 (linux_target_op): Add new operation.
5488 * tracepoint.c (gdb_trampoline_buffer): New IPA variable.
5489 (gdb_trampoline_buffer_end): Ditto.
5490 (gdb_trampoline_buffer_error): Ditto.
5491 (struct ipa_sym_addresses): Add fields for new IPA variables.
5492 (symbol_list): Add entries for new IPA variables.
5493 (struct tracepoint): Add fields to hold the address range of the
5494 trampoline used by the tracepoint.
5495 (trampoline_buffer_head): New static variable.
5496 (trampoline_buffer_tail): Ditto.
5497 (claim_trampoline_space): New function.
5498 (have_fast_tracepoint_trampoline_buffer): New function.
5499 (clone_fast_tracepoint): Fill in trampoline fields of tracepoint
5500 structure.
5501 (install_fast_tracepoint): Ditto, also add error buffer argument.
5502 (cmd_qtminftpilen): New function.
5503 (handle_tracepoint_query): Add response to qTMinFTPILen packet.
5504 (fast_tracepoint_from_trampoline_address): New function.
5505 (fast_tracepoint_collecting): Handle trampoline as part of jump
5506 pad space.
5507 (set_trampoline_buffer_space): New function.
5508 (initialize_tracepoint): Initialize new IPA variables.
5509 * target.h (struct target_ops): Add arguments to
5510 install_fast_tracepoint_jump_pad operation, add new
5511 get_min_fast_tracepoint_insn_len operation.
5512 (target_get_min_fast_tracepoint_insn_len): New.
5513 (install_fast_tracepoint_jump_pad): Add arguments.
5514 * server.h (IPA_BUFSIZ): Define.
5515 * linux-i386-ipa.c: Include extra header files.
5516 (initialize_fast_tracepoint_trampoline_buffer): New function.
5517 (initialize_low_tracepoint): Call it.
5518 * server.h (set_trampoline_buffer_space): Declare.
5519 (claim_trampoline_space): Ditto.
5520 (have_fast_tracepoint_trampoline_buffer): Ditto.
5521
1e4d1764
YQ
55222011-11-14 Yao Qi <yao@codesourcery.com>
5523
5524 * server.c (handle_query): Handle InstallInTrace for qSupported.
5525 * tracepoint.c (add_tracepoint): Sort list.
5526 (install_tracepoint, download_tracepoint): New.
5527 (cmd_qtdp): Call them to install and download tracepoints.
5528 (sort_tracepoints): Removed.
5529 (cmd_qtstart): Update.
5530
5c73ff4e
YQ
55312011-11-14 Yao Qi <yao@codesourcery.com>
5532
5533 * mem-break.c (inc_ref_fast_tracepoint_jump): New.
5534 * mem-break.h: Declare.
5535 * tracepoint.c (cmd_qtstart): Move some code to ...
5536 (clone_fast_tracepoint, install_fast_tracepoint): ... here.
5537 New.
5538 (download_tracepoints): Move some code to ...
5539 (download_tracepoint_1): ... here. New.
5540
86a30030
YQ
55412011-11-08 Yao Qi <yao@codesourcery.com>
5542
5543 * remote-utils.c (relocate_instruction): A comment fix.
5544
8d26e50c
JB
55452011-11-07 Joel Brobecker <brobecker@adacore.com>
5546
5547 * win32-i386-low.c (dr_status_mirror, dr_control_mirror): Delete.
5548 (i386_dr_low_get_control, i386_dr_low_get_status): Use
5549 dr_status_mirror and dr_control_mirror from debug_reg_state.
5550 (i386_dr_low_get_status): Use debug_reg_state.dr_status_mirror
5551 (i386_initial_stuff): Remove use of deleted globals.
5552 (i386_get_thread_context, i386_set_thread_context,
5553 i386_thread_added): Use dr_status_mirror and dr_control_mirror
5554 from debug_reg_state.
5555
a59306a3
YQ
55562011-11-05 Yao Qi <yao@codesourcery.com>
5557
5558 * tracepoint.c (gdb_collect): Loop over tracepoints of same
5559 address as TPOINT's.
5560
3065dfb6
SS
55612011-11-02 Stan Shebs <stan@codesourcery.com>
5562
5563 * tracepoint.c (agent_mem_read_string): New function.
5564 (eval_agent_expr): Call it for tracenz.
5565 * server.c (handle_query): Report support for tracenz.
5566
fd0d8c7c
YQ
55672011-11-02 Yao Qi <yao@codesourcery.com>
5568
5569 * tracepoint.c (cmd_qtstart): Remove unused local variables.
5570
609086b1
YQ
55712011-11-02 Yao Qi <yao@codesourcery.com>
5572
5573 * target.h: Fix a typo in comment.
5574
b9fd1791
PA
55752011-10-31 Pedro Alves <pedro@codesourcery.com>
5576
5577 * mem-break.c (check_mem_write): Add `myaddr' parameter. Don't
5578 clobber the breakpoints' shadows with fast tracepoint jumps.
5579 * mem-break.h (check_mem_write): Add `myaddr' parameter.
5580 * target.c (write_inferior_memory): Also pass MYADDR down to
5581 check_mem_write.
5582
03583c20
UW
55832011-10-07 Ulrich Weigand <ulrich.weigand@linaro.org>
5584
5585 * configure.ac: Check support for personality routine.
5586 * configure: Regenerate.
5587 * config.in: Likewise.
5588 * linux-low.c: Include <sys/personality.h>.
5589 Define ADDR_NO_RANDOMIZE if necessary.
5590 (linux_create_inferior): Disable address space randomization when
5591 forking inferior, if requested.
5592 (linux_supports_disable_randomization): New function.
5593 (linux_target_ops): Install it.
5594 * server.h (disable_randomization): Declare.
5595 * server.c (disable_randomization): New global variable.
5596 (handle_general_set): Handle QDisableRandomization.
5597 (handle_query): Likewise for qSupported.
5598 (main): Support --disable-randomization and --no-disable-randomization
5599 command line arguments.
5600 * target.h (struct target_ops): Add supports_disable_randomization.
5601 (target_supports_disable_randomization): New macro.
5602
723b724b
MF
56032011-09-29 Mike Frysinger <vapier@gentoo.org>
5604
5605 * linux-low.c (target_loadseg): Add defined PTRACE_GETFDPIC to the
5606 ifdef check.
5607 [PT_GETDSBT] (target_loadmap): Wrap in a defined PT_GETDSBT check.
5608 [!PT_GETDSBT] (target_loadmap): New definition.
5609 (LINUX_LOADMAP, LINUX_LOADMAP_EXEC, LINUX_LOADMAP_INTERP): Define.
5610 (linux_read_loadmap): Change PTRACE_GETDSBT_EXEC to
5611 LINUX_LOADMAP_EXEC, PTRACE_GETDSBT_INTERP to LINUX_LOADMAP_INTERP,
5612 and PT_GETDSBT to LINUX_LOADMAP.
5613 [!PT_GETDSBT] (linux_read_loadmap): Define to NULL.
5614 (linux_target_ops): Delete unnecessary ifdef PT_GETDSBT check.
5615
55329a5c 56162011-09-21 Ulrich Weigand <ulrich.weigand@linaro.org>
71487fd7
UW
5617
5618 * linux-arm-low.c (struct arm_linux_hwbp_cap): Remove.
5619 (arm_linux_hwbp_cap): New static variable.
5620 (arm_linux_get_hwbp_cap): Replace by ...
5621 (arm_linux_init_hwbp_cap): ... this new function.
5622 (arm_linux_get_hw_breakpoint_count): Use arm_linux_hwbp_cap.
5623 (arm_linux_get_hw_watchpoint_count): Likewise.
5624 (arm_linux_get_hw_watchpoint_max_length): Likewise.
5625 (arm_arch_setup): Call arm_linux_init_hwbp_cap.
5626 (arm_prepare_to_resume): Use perror_with_name instead of error.
5627
55329a5c 56282011-09-21 Ulrich Weigand <ulrich.weigand@linaro.org>
09b4ad9f
UW
5629
5630 * linux-arm-low.c: Include <signal.h>.
5631 (PTRACE_GETHBPREGS, PTRACE_SETHBPREGS): Define if necessary.
5632 (struct arm_linux_hwbp_cap): New data type.
5633 (arm_hwbp_type, arm_hwbp_control_t): New typedefs.
5634 (struct arm_linux_hw_breakpoint): New data type.
5635 (MAX_BPTS, MAX_WPTS): Define.
5636 (struct arch_process_info, struct arch_lwp_info): New data types.
5637 (arm_linux_get_hwbp_cap): New function.
5638 (arm_linux_get_hw_breakpoint_count): Likewise.
5639 (arm_linux_get_hw_watchpoint_count): Likewise.
5640 (arm_linux_get_hw_watchpoint_max_length): Likewise.
5641 (arm_hwbp_control_initialize): Likewise.
5642 (arm_hwbp_control_is_enabled): Likewise.
5643 (arm_hwbp_control_is_initialized): Likewise.
5644 (arm_hwbp_control_disable): Likewise.
5645 (arm_linux_hw_breakpoint_equal): Likewise.
5646 (arm_linux_hw_point_initialize): Likewise.
5647 (struct update_registers_data): New data structure.
5648 (update_registers_callback: New function.
5649 (arm_insert_point): Likewise.
5650 (arm_remove_point): Likewise.
5651 (arm_stopped_by_watchpoint): Likewise.
5652 (arm_stopped_data_address): Likewise.
5653 (arm_new_process): Likewise.
5654 (arm_new_thread): Likewise.
5655 (arm_prepare_to_resume): Likewise.
5656 (the_low_target): Register arm_insert_point, arm_remove_point,
5657 arm_stopped_by_watchpoint, arm_stopped_data_address, arm_new_process,
5658 arm_new_thread, and arm_prepare_to_resume.
5659
6b9801d4
SS
56602011-09-15 Stan Shebs <stan@codesourcery.com>
5661
5662 * server.h (struct emit_ops): Add compare-goto fields.
5663 * tracepoint.c (gdb_agent_op_sizes): New table.
5664 (emit_eq_goto): New function.
5665 (emit_ne_goto): New function.
5666 (emit_lt_goto): New function.
5667 (emit_le_goto): New function.
5668 (emit_gt_goto): New function.
5669 (emit_ge_goto): New function.
5670 (is_goto_target): New function.
5671 (compile_bytecodes): Recognize special cases of compare-goto
5672 combinations and call specialized emitters for them.
5673 * linux-x86-low.c (amd64_emit_eq_goto): New function.
5674 (amd64_emit_ne_goto): New function.
5675 (amd64_emit_lt_goto): New function.
5676 (amd64_emit_le_goto): New function.
5677 (amd64_emit_gt_goto): New function.
5678 (amd64_emit_ge_goto): New function.
5679 (amd64_emit_ops): Add the new functions.
5680 (i386_emit_eq_goto): New function.
5681 (i386_emit_ne_goto): New function.
5682 (i386_emit_lt_goto): New function.
5683 (i386_emit_le_goto): New function.
5684 (i386_emit_gt_goto): New function.
5685 (i386_emit_ge_goto): New function.
5686 (i386_emit_ops): Add the new functions.
5687
bf15cbda
SS
56882011-09-08 Stan Shebs <stan@codesourcery.com>
5689
5690 * linux-x86-low.c (i386_emit_prologue): Save %ebx.
5691 (i386_emit_epilogue): Restore %ebx.
5692
943ca1dd
JZ
56932011-08-31 Jie Zhang <jzhang918@gmail.com>
5694
5695 * server.c (step_thread): Remove definition.
5696 (process_serial_event): Don't handle Hs.
5697 * server.h (step_thread): Remove declaration.
5698 * target.c (set_desired_inferior): Remove use of step_thread.
5699
e3deef73
LM
57002011-08-24 Luis Machado <lgustavo@codesourcery.com>
5701
5702 * linux-low.c: Include linux-procfs.h.
5703 (linux_attach_lwp_1): Update comments.
5704 (linux_attach): Scan for existing threads when attaching to a
5705 process that is the tgid.
5706 * Makefile.in: Update dependencies.
5707
13da1c97
LM
57082011-08-24 Luis Machado <lgustavo@codesourcery.com>
5709
5710 * configure.srv: Add linux-procfs.o dependencies.
5711
881127c9
YQ
57122011-08-14 Yao Qi <yao@codesourcery.com>
5713
5714 * target.h (struct target_ops): Fix indent.
5715 * win32-low.c (win32_target_ops): Fix comment.
5716
58dbd541
YQ
57172011-08-14 Andrew Jenner <andrew@codesourcery.com>
5718 Yao Qi <yao@codesourcery.com>
5719
5720 * Makefile.in (clean): Remove tic6x-*.c files.
5721 (linux-tic6x-low.o, tic6x-c62x-linux.o, tic6x-c64x-linux.o): New rules.
5722 (tic6x-c64xp-linux.o, tic6x-c62x-linux.c, tic6x-c64x-linux.c): Likewise.
5723 (tic6x-c64xp-linux.c): Likewise.
5724 * configure.srv: Add support for tic6x-*-uclinux.
5725 * linux-tic6x-low.c: New.
5726 * linux-low.c (PT_TEXT_ADDR, PT_DATA_ADDR, PT_TEXT_END_ADDR): Define.
5727
78d85199
YQ
57282011-08-14 Andrew Stubbs <ams@codesourcery.com>
5729 Yao Qi <yao@codesourcery.com>
5730
5731 * target.h (struct target_ops): Add read_loadmap.
5732 * linux-low.c (struct target_loadseg): New type.
5733 (struct target_loadmap): New type.
5734 (linux_read_loadmap): New function.
5735 (linux_target_ops): Add linux_read_loadmap.
5736 * server.c (handle_query): Support qXfer:fdpic:read packet.
43aaf8b6
PA
5737 * win32-low.c (win32_target_ops): Initialize field `read_loadmap'
5738 to NULL.
78d85199 5739
a959a88d
EZ
57402011-08-05 Eli Zaretskii <eliz@gnu.org>
5741
5742 * win32-low.c: Include <stdint.h>.
5743
1ced966e
PA
57442011-07-22 Pedro Alves <pedro@codesourcery.com>
5745
5746 * i386-low.c (i386_insert_aligned_watchpoint): Don't pass the info
5747 to the inferior here.
5748 (i386_remove_aligned_watchpoint): Ditto.
5749 (i386_handle_nonaligned_watchpoint): Return immediate on fail to
5750 fit part of the watchpoint in the debug registers.
5751 (i386_update_inferior_debug_regs): New.
5752 (i386_low_insert_watchpoint): Work on a local mirror of the debug
5753 registers, and only update the inferior on success.
5754 (i386_low_remove_watchpoint): Ditto.
5755
d26e3629
KY
57562011-07-22 Kwok Cheung Yeung <kcy@codesourcery.com>
5757
5758 * linux-low.c (compare_ints, unique, list_threads, show_process,
5759 linux_core_of_thread): Delete.
5760 (linux_target_ops): Change linux_core_of_thread to
5761 linux_common_core_of_thread.
5762 (linux_qxfer_osdata): Defer to linux_common_xfer_osdata.
5763 * utils.c (malloc_failure): Change type of argument.
5764 (xmalloc, xrealloc, xcalloc, xsnprintf): Delete.
5765 * Makefile.in (SFILES): Add common/common-utils.c, common/xml-utils.c,
5766 common/linux-osdata.c, common/ptid.c and common/buffer.c.
5767 (OBS): Add xml-utils.o, common-utils.o, ptid.o and buffer.o.
5768 (IPA_OBJS): Add common-utils-ipa.o.
5769 (ptid_h, linux_osdata_h): New macros.
5770 (server_h): Add common/common-utils.h, common/xml-utils.h,
5771 common/buffer.h, common/gdb_assert.h, common/gdb_locale.h and
5772 common/ptid.h.
5773 (common-utils-ipa.o, common-utils.o, xml-utils.o, linux-osdata.o,
5774 ptid.o, buffer.o): New rules.
5775 (linux-low.o): Add common/linux-osdata.h as a dependency.
5776 * configure.srv (srv_tgtobj): Add linux-osdata.o to Linux targets.
5777 * configure.ac: Add AC_HEADER_DIRENT check.
5778 * config.in: Regenerate.
5779 * configure: Regenerate.
5780 * remote-utils.c (xml_escape_text): Delete.
5781 (buffer_grow, buffer_free, buffer_init, buffer_finish,
5782 buffer_xml_printf): Move to common/buffer.c.
5783 * server.c (main): Remove call to initialize_inferiors.
5784 * server.h (struct ptid, ptid_t, minus_one_ptid, null_ptid,
5785 ptid_build, pid_to_ptid, ptid_get_pid, ptid_get_lwp, ptid_get_tid,
5786 ptid_equal, ptid_is_pid, initialize_inferiors, xml_escape_text,
5787 internal_error, gdb_assert, gdb_assert_fail): Delete.
5788 (struct buffer, buffer_grow, buffer_free, buffer_init, buffer_finish,
5789 buffer_xml_printf, buffer_grow_str, buffer_grow_str0): Move to
5790 common/buffer.h.
5791 * inferiors.c (null_ptid, minus_one_ptid, ptid_build, pid_to_ptid,
5792 ptid_get_pid, ptid_get_lwp, ptid_get_tid, ptid_equal, ptid_is_pid,
5793 initialize_inferiors): Delete.
5794
2275a1a7
PA
57952011-07-20 Pedro Alves <pedro@codesourcery.com>
5796
5797 * tracepoint.c (tracepoint_look_up_symbols): Return upon the first
5798 symbol error.
5799
0a5b1e09
PA
58002011-05-31 Pedro Alves <pedro@codesourcery.com>
5801
5802 * linux-x86-low.c (i386_dr_low_get_addr): Fix off by one in
5803 assertion.
5804 * win32-i386-low.c (i386_dr_low_get_addr): Ditto.
5805
6938fd34
YQ
58062011-05-26 Yao Qi <yao@codesourcery.com>
5807
5808 * Makefile.in (thread-db.o): Track dependence to
5809 common/gdb_thread_db.h.
5810 * thread-db.c: include gdb_thread_db.h from right place.
5811
b481f9e0
TT
58122011-05-16 Adrian Cornish <gnu@bluedreamer.com>
5813
5814 * linux-i386-ipa.c (supply_static_tracepoint_registers): Pass
5815 __FILE__ and __LINE__ to internal_error.
5816
98a5dd13
DE
58172011-05-13 Doug Evans <dje@google.com>
5818
5819 * thread-db.c (try_thread_db_load_from_sdir): New function.
5820 (try_thread_db_load_from_dir): New function.
5821 (thread_db_load_search): Handle $sdir, ignore $pdir.
5822 Remove trying of system directories if search of
5823 libthread-db-search-path fails, that is now done via $sdir.
5824
d248b706
KY
58252011-05-12 Kwok Cheung Yeung <kcy@codesourcery.com>
5826
5827 * server.c (handle_query): Add EnableDisableTracepoints to the list
5828 of supported features.
43aaf8b6 5829 * tracepoint.c (clear_installed_tracepoints): Uninstall disabled
d248b706 5830 tracepoints.
43aaf8b6
PA
5831 (cmd_qtenable_disable): New.
5832 (cmd_qtstart): Install tracepoints even if disabled.
5833 (handle_tracepoint_general_set): Add call to cmd_qtenable_disable on
5834 receiving a QTEnable or QTDisable packet.
5835 (gdb_collect): Skip data collection if fast tracepoint is disabled.
5836 (ust_marker_to_static_tracepoint): Do not ignore disabled static
5837 tracepoints.
5838 (gdb_probe): Skip data collection if static tracepoint is disabled.
d248b706 5839
84e578fb
DE
58402011-05-10 Doug Evans <dje@google.com>
5841
5842 * thread-db.c (thread_db_handle_monitor_command): Handle elided path.
5843
71f55dd8
DE
58442011-05-04 Doug Evans <dje@google.com>
5845
5846 * linux-low.c (linux_join): Skip process lookup.
5847 * spu-low.c (spu_join): Ditto.
5848 * server.c (join_inferiors_callback): Delete.
5849 (process_serial_event): For 'D' packet (detach) call join_inferior
5850 directly.
5851
4d393d60
JM
58522011-05-04 Joseph Myers <joseph@codesourcery.com>
5853
5854 * README: Don't mention xscale*-*-linux*.
5855 * configure.srv (xscale*-*-linux*): Don't handle target.
5856
b00ad6ff
NF
58572011-04-27 Nathan Froyd <froydnj@codesourcery.com>
5858
5859 * linux-x86-low.c (amd64_emit_const): Call memcpy instead of
5860 casting pointers.
5861 (amd64_emit_reg, amd64_emit_int_call_1, amd64_emit_void_call_2):
5862 (i386_emit_const, i386_emit_reg, i386_emit_int_call_1):
5863 (i386_emit_void_call_2): Likewise.
5864
af96c192
YQ
58652011-04-26 Yao Qi <yao@codesourcery.com>
5866
43aaf8b6
PA
5867 * linux-low.c: Move common macros to linux-ptrace.h.
5868 Include linux-ptrace.h.
af96c192
YQ
5869 * Makefile.in (linux_ptrace_h): New.
5870 (linux-low.o): Depends on linux-ptrace.h.
5871
03f2bd59
JK
58722011-04-24 Jan Kratochvil <jan.kratochvil@redhat.com>
5873
5874 * remote-utils.c (handle_accept_event): Close LISTEN_DESC only if
5875 RUN_ONCE. Comment for the LISTEN_DESC delete_file_handler call.
5876 (remote_prepare): New function with most of the TCP code from ...
5877 (remote_open): ... here. Detect PORT here unconditionally. Move also
5878 setting transport_is_reliable.
5879 * server.c (run_once): New variable.
5880 (gdbserver_usage): Document it.
5881 (main): Set run_once for `--once'. Call remote_prepare. Exit after
5882 the first run if RUN_ONCE.
5883 * server.h (run_once, remote_prepare): New declarations.
5884
7a9dd1b2
TT
58852011-04-19 Tom Tromey <tromey@redhat.com>
5886
5887 * win32-low.c (handle_load_dll): Remove duplicate "the".
5888
81239425
PM
58892011-04-07 Pierre Muller <muller@ics.u-strasbg.fr>
5890
5891 Remove support for old Cygwin 1.5 versions.
5892 * win32-low.c (win32_create_inferior): Use new cygwin_path_list
5893 function to avoid warning.
5894 (win32_add_one_solib): Use cygwin_conv_path function to avoid
5895 warning.
5896
9e0627f1
PM
58972011-03-18 Pierre Muller <muller@ics.u-strasbg.fr>
5898
5899 * gdbserver/server.h (Macro _): Define it if not available.
5900
588eebee
MS
59012011-03-14 Michael Snyder <msnyder@vmware.com>
5902
348af9f7 5903 * hostio.c (handle_close): Remove unnecessary null test.
588eebee 5904
43f70d4c
JB
59052011-03-10 Joel Brobecker <brobecker@adacore.com>
5906
5907 * Makefile.in (maintainer-clean realclean distclean): Remove
5908 "make ... subdir_do" command.
5909
348af9f7
MS
59102011-03-10 Michael Snyder <msnyder@vmware.com>
5911
5912 * tracepoint.c (tracepoint_finish_step): Fix loop variable.
5913
5914 * server.c (handle_v_run): Free alloced buffer on early return.
5915
e637a4f5
YQ
59162011-03-09 Yao Qi <yao@codesourcery.com>
5917
5918 Revert:
5919 2011-03-04 Yao Qi <yao@codesourcery.com>
5920
5921 * Makefile.in: Remove GNU make feature --directory.
5922
5923 2011-03-05 Yao Qi <yao@codesourcery.com>
5924
5925 * Makefile.in (CLEANDIRS, REQUIRED_SUBDIRS): New variable.
5926 (subdir_do): New make target. Copied from gdb/Makefile.
5927 (maintainer-clean, realclean, distclean, clean): Call corresponding
5928 make targets in common/Makefile.
5929
5930 2011-02-11 Yao Qi <yao@codesourcery.com>
5931
5932 * configure.ac: Call AC_PROG_RANLIB.
5933 * Makefile.in: Remove signals.o from OBS. Link libcommon.a.
5934 * configure: Regenerate.
5935
e6edda56
JK
59362011-03-07 Jan Kratochvil <jan.kratochvil@redhat.com>
5937
5938 * remote-utils.c (putpkt_binary_1): Calculate BUF2 size dynamically.
5939
e5141119
JB
59402011-03-06 Yao Qi <yao@codesourcery.com>
5941
5942 * Makefile.in (REQUIRED_SUBDIRS): Remove $(LIBCOMMON_DIR).
5943
64794aa4
JB
59442011-03-05 Yao Qi <yao@codesourcery.com>
5945
5946 * Makefile.in (CLEANDIRS, REQUIRED_SUBDIRS): New variable.
5947 (subdir_do): New make target. Copied from gdb/Makefile.
5948 (maintainer-clean, realclean, distclean, clean): Call corresponding
5949 make targets in common/Makefile.
5950
7a762829
YQ
59512011-03-04 Yao Qi <yao@codesourcery.com>
5952
5953 * Makefile.in: Remove GNU make feature --directory.
5954
348af9f7
MS
59552011-03-04 Michael Snyder <msnyder@vmware.com>
5956
5957 * server.c (queue_stop_reply): Call xmalloc not malloc.
5958
59592011-03-02 Michael Snyder <msnyder@vmware.com>
5960
5961 * linux-arm-low.c (arm_arch_setup): Replace malloc with xmalloc.
5962
9f72fee2
MS
59632011-02-28 Michael Snyder <msnyder@vmware.com>
5964
588eebee
MS
5965 * tracepoint.c (cmd_qtv): Discard unused value 'packet'.
5966 (cmd_qtframe): Ditto.
5967 (cmd_qtbuffer): Ditto.
5968 (cmd_bigqtbuffer): Ditto.
5969
9f72fee2
MS
5970 * utils.c (decimal2str): Initialize 'width' to nine, then
5971 don't mess with it.
5972
8040bd49
UW
59732011-02-28 Ulrich Weigand <uweigand@de.ibm.com>
5974
5975 * hostio.c (require_data): Free *data, not data.
5976
7e52cbd0
JK
59772011-02-28 Jan Kratochvil <jan.kratochvil@redhat.com>
5978
5979 * hostio.c (require_data): Use free, not xfree.
5980
9130f83e
MS
59812011-02-27 Michael Snyder <msnyder@vmware.com>
5982
4b812f4e
MS
5983 * server.c (handle_query): Discard unused value.
5984
9130f83e
MS
5985 * hostio.c (require_data): Free malloc memory before returning
5986 error.
5987
69d37113
MS
59882011-02-26 Michael Snyder <msnyder@vmware.com>
5989
5990 * linux-low.c (list_threads): Call closedir for dirent.
5991
35f5825a
MS
59922011-02-27 Michael Snyder <msnyder@vmware.com>
5993
2a589cef
MS
5994 * i386-low.c (i386-length_and_rw_bits): Comment the fact that
5995 a case statement falls through.
5996
0adea5f7
MS
5997 * linux-low.c (linux_xfer_siginfo): Fix fencepost error.
5998
35f5825a
MS
5999 * linux-amd64-ipa.c (gdb_agent_get_raw_reg): Fix fencepost error
6000 in comparison.
6001
238f1c74
MS
60022011-02-26 Michael Snyder <msnyder@vmware.com>
6003
6004 * utils.c (decimal2str): Eliminate dead code and dead param.
6005 (pulongest): Drop dead param from call to decimal2str.
6006 (plongest): Ditto.
6007
633ff500
JB
60082011-02-24 Joel Brobecker <brobecker@adacore.com>
6009
6010 Revert the following patch (not approved yet):
6011 2011-02-21 Hui Zhu <teawater@gmail.com>
6012 * tracepoint.c (tp_printf): New function.
6013 (eval_agent_expr): Handle gdb_agent_op_printf.
6014
f9c6ff72
HZ
60152011-02-21 Hui Zhu <teawater@gmail.com>
6016
6017 * tracepoint.c (tp_printf): New function.
6018 (eval_agent_expr): Handle gdb_agent_op_printf.
6019
94d5e490
TT
60202011-02-18 Tom Tromey <tromey@redhat.com>
6021
6022 * Makefile.in (tracepoint-ipa.o): Depend on ax.def.
6023 (tracepoint.o): Likewise.
6024 * tracepoint.c (enum gdb_agent_op): Use ax.def.
6025 (gdb_agent_op_names): Likewise.
6026
c7f96d2b
TT
60272011-02-18 Tom Tromey <tromey@redhat.com>
6028
6029 * tracepoint.c (enum gdb_agent_op) <gdb_agent_op_pick,
6030 gdb_agent_op_rot>: New constants.
6031 (gdb_agent_op_names): Add pick and roll.
6032 (eval_agent_expr) <gdb_agent_op_pick, gdb_agent_op_rot>: New
6033 cases.
6034
0feedb2c
JK
60352011-02-15 Jan Kratochvil <jan.kratochvil@redhat.com>
6036
6037 * aclocal.m4: Regenerated with aclocal-1.11.1.
6038
b3b9301e
PA
60392011-02-14 Pedro Alves <pedro@codesourcery.com>
6040
6041 * server.c (handle_qxfer_traceframe_info): New.
6042 (qxfer_packets): Register "traceframe-info".
6043 (handle_query): Report support for qXfer:traceframe-info:read+.
6044 * tracepoint.c (match_blocktype): New.
6045 (traceframe_find_block_type): Rename to ...
6046 (traceframe_walk_blocks): ... this. Add callback filter argument,
6047 and use it.
6048 (traceframe_find_block_type): New, reimplemented on top of
6049 traceframe_walk_blocks.
6050 (build_traceframe_info_xml): New.
6051 (traceframe_read_info): New.
6052 * server.h (traceframe_read_info): Declare.
6053
4f3e6fb7
YQ
60542011-02-11 Yao Qi <yao@codesourcery.com>
6055
6056 * configure.ac: Call AC_PROG_RANLIB.
6057 * Makefile.in: Remove signals.o from OBS. Link libcommon.a.
6058 * configure: Regenerate.
6059
764880b7
PA
60602011-02-07 Pedro Alves <pedro@codesourcery.com>
6061
6062 * server.c (gdb_read_memory): Change return semantics to allow
6063 partial transfers.
6064 (handle_search_memory_1): Adjust.
6065 (process_serial_event) <'m' packet>: Handle partial transfers.
6066 * tracepoint.c (traceframe_read_mem): Handle partial transfers.
6067
1c79eb8a
PA
60682011-01-28 Pedro Alves <pedro@codesourcery.com>
6069
6070 * regcache.c (init_register_cache): Initialize
6071 regcache->register_status.
6072 (free_register_cache): Release regcache->register_status.
6073 (regcache_cpy): Copy register_status.
6074 (registers_to_string): Print 'x's for unavailable registers.
6075 (supply_register): Mark the register's status valid or
6076 unavailable, depending on whether a buffer was passed in or not.
6077 (supply_register_zeroed): New.
6078 (supply_regblock): Mark the registers' status valid or
6079 unavailable, depending on whether a buffer was passed in or not.
6080 * regcache.h (REG_UNAVAILABLE, REG_VALID): New defines.
6081 (struct regcache): New `register_status' field.
6082 (supply_register_zeroed): Declare.
6083 * i387-fp.c (i387_xsave_to_cache): Zero out registers using
6084 supply_register_zeroed, rather than passing a NULL buffer to
6085 supply_register.
6086 * tracepoint.c (fetch_traceframe_registers): Update comment.
6087
85724a0e
PA
60882011-01-28 Pedro Alves <pedro@codesourcery.com>
6089
6090 * i387-fp.c (i387_xsave_to_cache): Make passing NULL as register
6091 buffer explicit.
6092
d08aafef
PA
60932011-01-25 Pedro Alves <pedro@codesourcery.com>
6094
6095 * server.h (decode_xfer_write): Change prototype.
6096 * remote-utils.c (decode_xfer_write): Remove `annex' parameter,
6097 and don't extract the annex here.
6098 * server.c (decode_xfer_read): Remove `annex' parameter,
6099 and don't extract the annex here.
6100 (decode_xfer): New.
6101 (struct qxfer): New.
6102 (handle_qxfer_auxv, handle_qxfer_features, handle_qxfer_libraries)
6103 (handle_qxfer_osdata, handle_qxfer_siginfo, handle_qxfer_spu)
6104 (handle_qxfer_statictrace): New functions, abstracted out from
6105 handle_query, and made to use the struct qxfer interface.
6106 (handle_threads_qxfer_proper): Rename to ...
6107 (handle_qxfer_threads_proper): ... this.
6108 (handle_threads_qxfer): Rename to ...
6109 (handle_qxfer_threads): ... this. Adjust.
6110 (qxfer_packets): New array.
6111 (handle_qxfer): New function.
6112 (handle_query): Use handle_qxfer.
6113
493e2a69
MS
61142011-01-05 Michael Snyder <msnyder@msnyder-server.eng.vmware.com>
6115
6116 * gdbreplay.c: Shorten lines of >= 80 columns.
6117 * linux-low.c: Ditto.
6118 * linux-ppc-low.c: Ditto.
6119 * linux-s390-low.c: Ditto.
6120 * linux-sparc-low.c: Ditto.
6121 * linux-x86-low.c: Ditto.
6122 * linux-xtensa-low.c: Ditto.
6123 * mem-break.c: Ditto.
6124 * nto-low.c: Ditto.
6125 * regcache.h: Ditto.
6126 * remote-utils.c: Ditto.
6127 * server.c: Ditto.
6128 * server.h: Ditto.
6129 * thread-db.c: Ditto.
6130 * tracepoint.c: Ditto.
6131 * utils.c: Ditto.
6132 * win32-low.h: Ditto.
6133
44944448
JB
61342011-01-05 Joel Brobecker <brobecker@adacore.com>
6135
6136 * gdbserver/configure.ac, gdbserver/gdbserver.1: Copyright year
6137 update.
6138
71ce852c
JB
61392011-01-01 Joel Brobecker <brobecker@adacore.com>
6140
6141 * server.c (gdbserver_version): Update copyright year in version
6142 output.
6143 * gdbreplay.c (gdbreplay_version): Ditto.
6144
eb826dc6
MF
61452010-12-29 Jie Zhang <jie.zhang@analog.com>
6146
6147 * configure.srv (bfin-*-*linux*): Handle Blackfin/Linux targets.
6148 * linux-bfin-low.c: New file.
6149 * linux-low.c: Define PT_TEXT_ADDR, PT_TEXT_END_ADDR, and
6150 PT_DATA_ADDR for BFIN targets.
6151 * Makefile.in (SFILES): Add linux-bfin-low.c.
6152 (clean): Remove reg-bfin.c.
6153 (linux-bfin-low.o, reg-bfin.o, reg-bfin.c): New targets.
6154 * README: Mention supported Blackfin targets.
6155
39ab222a
MF
61562010-12-23 Mike Frysinger <vapier@gentoo.org>
6157
6158 * .gitignore: New file.
6159
a1f2ce7d
MF
61602010-11-16 Mike Frysinger <vapier@gentoo.org>
6161
6162 * linux-low.c (linux_tracefork_child): Add char* cast to arg.
6163
f474844c
JZ
61642010-10-22 Jie Zhang <jie@codesourcery.com>
6165
6166 * Makefile.in: Add FLAGS_TO_PASS variable.
6167 (install): Remove dependency of install-only and recursively
6168 invoke make for install-only.
6169
f1048712
DE
61702010-10-04 Doug Evans <dje@google.com>
6171
6172 * Makefile.in (uninstall): Use $(DESTDIR).
6173
b53a1623
PA
61742010-09-24 Pedro Alves <pedro@codesourcery.com>
6175
e6ee044d
PA
6176 PR gdb/11842
6177
b53a1623
PA
6178 * linux-x86-low.c (compat_siginfo_from_siginfo)
6179 (siginfo_from_compat_siginfo): Also copy si_pid and si_uid when
6180 si_code is < 0. Check for si_code == SI_TIMER before checking for
6181 si_code < 0.
6182
fa1bd1e4
JB
61832010-09-13 Joel Brobecker <brobecker@adacore.com>
6184
6185 * lynx-i386-low.c: New file.
6186 * configure.srv: Add handling of i[34567]86-*-lynxos* targets.
6187
47fac8f8
JB
61882010-09-13 Joel Brobecker <brobecker@adacore.com>
6189
6190 * lynx-low.c (ptrace_request_to_str): Remove handling for
6191 request values that have been removed in LynxOS 5.x.
6192
1adfc54d
JB
61932010-09-13 Joel Brobecker <brobecker@adacore.com>
6194
6195 * lynx-low.c, lynx-ppc-loc.c: Include <sys/ptrace.h> instead of
6196 <ptrace.h>
6197
c2a66c29
NS
61982010-09-09 Nathan Sidwell <nathan@codesourcery.com>
6199
6200 * configure.ac: Add --enable-inprocess-agent option.
6201 * configure: Rebuilt.
6202
32fcada3
YQ
62032010-09-06 Yao Qi <yao@codesourcery.com>
6204
6205 * linux-low.c (linux_kill): Remove unused variable.
6206 (linux_stabilize_threads): Likewise.
6207 * server.c (start_inferior): Likewise.
6208 (queue_stop_reply_callback): Likewise.
6209 * tracepoint.c (do_action_at_tracepoint): Likewise.
6210
0cccb683
YQ
62112010-09-06 Yao Qi <yao@codesourcery.com>
6212
6213 * linux-low.c (maybe_move_out_of_jump_pad): Restore current_inferior
6214 on return.
6215
423ec54c
JK
62162010-09-06 Jan Kratochvil <jan.kratochvil@redhat.com>
6217
6218 * target.c (mywait) <TARGET_WAITKIND_EXITED>: Fix to use INTEGER.
6219
12ac6819
PA
62202010-09-06 Pedro Alves <pedro@codesourcery.com>
6221
6222 * Makefile.in (install-only): Replace $IPA_DEPFILES with
6223 "$(IPA_DEPFILES)".
6224
8ed54b31
JB
62252010-09-01 Joel Brobecker <brobecker@adacore.com>
6226
6227 * gdbserver/lynx-low.c, gdbserver/lynx-low.h,
6228 gdbserver/lynx-ppc-low.c: New files.
6229 * Makefile.in (lynx_low_h): New variable.
6230 (lynx-low.o, lynx-ppc-low.o): New rules.
6231 * configure.ac: On LynxOS, link with -lnetinet.
6232 * configure.srv: Add handling of powerpc-*-lynxos* targets.
6233 * configure: regenerate.
6234
bb0116a4
JB
62352010-09-01 Joel Brobecker <brobecker@adacore.com>
6236
6237 * Makefile.in (vasprintf.o, vsnprintf.o): New rules.
6238 * configure.ac: Add check for vasprintf and vsnprintf.
6239 * configure, config.in: Regenerate.
6240 * server.h (vasprintf, vsnprintf): Add conditional declarations.
6241
a778ab81 62422010-09-01 Joel Brobecker <brobecker@adacore.com>
6243
6244 * gdbreplay.c: Move include of alloca.h up, next to include of
6245 malloc.h.
6246 * server.h: Add include of malloc.h.
6247 * mem-break.c: Remove include of malloc.h.
6248 * server.c, tracepoint.c, utils.c, win32-low.c: Likewise.
6249
8b034a19 62502010-09-01 Joel Brobecker <brobecker@adacore.com>
6251
6252 * Makefile.in (memmem.o): Build with -Wno-error.
6253
62542010-09-01 Joel Brobecker <brobecker@adacore.com>
6255
6256 * utils.c (xsnprintf): Make non-static.
6257 * server.h: Add xsnprintf declaration.
6258 * linux-low.c, nto-low.c, target.c, thread-db.c, tracepoint.c:
6259 replace calls to snprintf by calls to xsnprintf throughout.
6260
62612010-09-01 Joel Brobecker <brobecker@adacore.com>
6262
6263 * configure.ac: Add configure check for alloca.
6264 * configure, config.in: Regenerate.
6265 * server.h: Include alloca.h if it exists.
6266 * gdbreplay.c: Include alloca.h if it exists.
6267
1a981360
PA
62682010-08-28 Pedro Alves <pedro@codesourcery.com>
6269
6270 * linux-low.c (__SIGRTMIN): Define if not already defined.
6271 (linux_create_inferior): Check for __ANDROID__ rather than
6272 __SIGRTMIN.
6273 (enqueue_one_deferred_signal): Don't requeue non-RT signals that
6274 are already deferred.
6275 (linux_wait_1): Check for __ANDROID__ rather than __SIGRTMIN.
6276 (linux_resume_one_thread): Don't queue a SIGSTOP if the lwp is
6277 stopped and already has a pending signal to report.
6278 (proceed_one_lwp): : Don't queue a SIGSTOP if the lwp already has
6279 a pending signal to report or is moving out of a jump pad.
6280 (linux_init_signals): Check for __ANDROID__ rather than
6281 __SIGRTMIN.
6282
b4d51a55
PA
62832010-08-28 Pedro Alves <pedro@codesourcery.com>
6284
6285 * linux-low.c (linux_stabilize_threads): Wrap debug output in a
6286 debug_threads check. Avoid a linear search when not doing debug
6287 output.
6288
ec48365d
PA
62892010-08-27 Pedro Alves <pedro@codesourcery.com>
6290
6291 * event-loop.c (event_handle_func): Adjust to use gdb_fildes_t.
6292 (struct gdb_event) <fd>: Change type to gdb_fildes_t.
6293 (struct file_handler) <fd>: Change type to gdb_fildes_t.
6294 (process_event): Change local fd's type to gdb_fildes_t.
6295 (create_file_handler): Adjust prototype.
6296 (delete_file_handler): Adjust prototype.
6297 (handle_file_event): Adjust prototype. Use pfildes.
6298 (create_file_event): Adjsut prototype.
6299 * remote-utils.c (remote_desc, listen_desc): Change type to
6300 gdb_fildes_t.
6301 * server.h: New gdb_fildes_t typedef.
6302 [USE_WIN32API]: Include winsock2.h.
6303 (delete_file_handler, add_file_handler): Adjust prototypes.
6304 (pfildes): Declare.
6305 * utils.c (pfildes): New.
6306
854d88f0
PA
63072010-08-27 Pedro Alves <pedro@codesourcery.com>
6308
6309 * configure.ac (build_warnings): Add -Wno-char-subscripts.
6310 * configure: Regenerate.
6311
0146f85b
PA
63122010-08-27 Pedro Alves <pedro@codesourcery.com>
6313
6314 * linux-low.c (linux_unprepare_to_access_memory): Rename to ...
6315 (linux_done_accessing_memory): ... this.
6316 (linux_target_ops): Adjust.
6317 * linux-x86-low.c (x86_insert_point, x86_remove_point): Adjust.
6318 * nto-low.c (nto_target_ops): Adjust comment.
6319 * server.c (gdb_read_memory, gdb_write_memory): Adjust.
6320 * spu-low.c (spu_target_ops): Adjust comment.
6321 * target.h (target_ops): Rename unprepare_to_access_memory field
6322 to done_accessing_memory.
6323 (unprepare_to_access_memory): Rename to ...
6324 (done_accessing_memory): ... this.
6325
90d74c30
PA
63262010-08-26 Pedro Alves <pedro@codesourcery.com>
6327
6328 * linux-low.c (linux_prepare_to_access_memory): New.
6329 (linux_unprepare_to_access_memory): New.
6330 (linux_target_ops): Install them.
6331 * server.c (read_memory): Rename to ...
6332 (gdb_read_memory): ... this. Use
6333 prepare_to_access_memory/prepare_to_access_memory.
6334 (write_memory): Rename to ...
6335 (gdb_write_memory): ... this. Use
6336 prepare_to_access_memory/prepare_to_access_memory.
6337 (handle_search_memory_1): Adjust.
6338 (process_serial_event): Adjust.
6339 * target.h (struct target_ops): New fields
6340 prepare_to_access_memory and unprepare_to_access_memory.
6341 (prepare_to_access_memory, unprepare_to_access_memory): New.
6342 * linux-x86-low.c (x86_insert_point, x86_remove_point): Use
6343 prepare_to_access_memory/prepare_to_access_memory.
6344 * nto-low.c (nto_target_ops): Adjust.
6345 * spu-low.c (spu_target_ops): Adjust.
6346 * win32-low.c (win32_target_ops): Adjust.
6347
fd467969
PA
63482010-08-26 Pedro Alves <pedro@codesourcery.com>
6349
6350 * Makefile.in (WARN_CFLAGS): Get it from configure.
6351 (WERROR_CFLAGS): New.
6352 (INTERNAL_CFLAGS): Add WERROR_CFLAGS.
6353 * configure.ac: Introduce --enable-werror, which adds -Werror to
6354 the compiler command line. Enabled by default. Disable with
6355 --disable-werror. Add -Wdeclaration-after-statement
6356 Wpointer-arith and -Wformat-nonliteral to warning flags.
6357 * configure: Regenerate.
6358
331e2f5f
PA
63592010-08-26 Pedro Alves <pedro@codesourcery.com>
6360
6361 * mem-break.c [HAVE_MALLOC_H]: Include malloc.h.
6362
e581f2b4
PA
63632010-08-26 Pedro Alves <pedro@codesourcery.com>
6364
6365 * gdbreplay.c (remote_error): New.
6366 (gdbchar): New.
6367 (expect): Use gdbchar. Check for error reading from GDB.
6368 Clarify sync error output.
6369 (play): Check for errors writing to GDB.
6370 * linux-low.c (sigchld_handler): Really ignore `write' errors.
6371 * remote-utils.c (getpkt): Check for errors writing to the remote
6372 descriptor.
6373
3c11dd79
PA
63742010-08-25 Pedro Alves <pedro@codesourcery.com>
6375
6376 * linux-low.c (linux_wait_1): Move non-debugging code out of
6377 `debug_threads' control.
6378
d20a8ad9
PA
63792010-08-25 Pedro Alves <pedro@codesourcery.com>
6380
6381 * linux-low.c (linux_wait_1): Don't set last_status here.
6382 * server.c (push_event, queue_stop_reply_callback): Assert we're
6383 not pushing a TARGET_WAITKIND_IGNORE event.
6384 (start_inferior, start_inferior, attach_inferior, handle_v_cont)
6385 (myresume, handle_target_event): Set the thread's last_resume_kind
6386 and last_status from the target returned status.
6387
964e4306
PA
63882010-08-25 Pedro Alves <pedro@codesourcery.com>
6389
6390 PR threads/10729
6391
6392 * linux-x86-low.c (update_debug_registers_callback): New.
6393 (i386_dr_low_set_addr): Use it.
6394 (i386_dr_low_get_addr): New.
6395 (i386_dr_low_set_control): Use update_debug_registers_callback.
6396 (i386_dr_low_get_control): New.
6397 (i386_dr_low_get_status): Adjust.
6398 * linux-low.c (linux_stop_lwp): New.
6399 * linux-low.h (linux_stop_lwp): Declare.
6400
6401 * i386-low.c (I386_DR_GET_RW_LEN): Take the dr7 contents as
6402 argument instead of a i386_debug_reg_state.
6403 (I386_DR_WATCH_HIT): Take the dr6 contents as argument instead of
6404 a i386_debug_reg_state.
6405 (i386_insert_aligned_watchpoint): Adjust.
6406 (i386_remove_aligned_watchpoint): Adjust.
6407 (i386_low_stopped_data_address): Read the debug registers from the
6408 inferior instead of from the mirrors.
6409 * i386-low.h (struct i386_debug_reg_state): Extend comment.
6410 (i386_dr_low_get_addr): Declare.
6411 (i386_dr_low_get_control): Declare.
6412 (i386_dr_low_get_status): Change prototype.
6413
6414 * win32-i386-low.c (dr_status_mirror, dr_control_mirror): New globals.
6415 (i386_dr_low_get_addr): New.
6416 (i386_dr_low_get_control): New.
6417 (i386_dr_low_get_status): Adjust prototype. Return
6418 dr_status_mirror.
6419 (i386_initial_stuff): Clear dr_status_mirror and
6420 dr_control_mirror.
6421 (i386_get_thread_context): Adjust.
6422 (i386_set_thread_context): Adjust.
6423 (i386_thread_added): Adjust.
6424
5f21a75b
PA
64252010-08-24 Pedro Alves <pedro@codesourcery.com>
6426
6427 * linux-low.h (linux_thread_area): Delete declaration.
6428
3e4c1235
TS
64292010-08-11 Thomas Schwinge <thomas@codesourcery.com>
6430
6431 * linux-low.c (linux_wait_1): Correctly return the ptid of the child
6432 after its termination.
6433
1971b033
PA
64342010-08-09 Pedro Alves <pedro@codesourcery.com>
6435
6436 * linux-low.c (gdb_wants_lwp_stopped): Delete.
6437 (gdb_wants_all_stopped): Delete.
6438 (linux_wait_1): Don't call them.
6439 * server.c (handle_v_cont): Tag all threads as want-stopped.
6440 (gdb_wants_thread_stopped): Fix comments. Tag the thread that
6441 stopped as "client-wants-stopped".
6442
310444ac
PA
64432010-07-31 Pedro Alves <pedro@codesourcery.com>
6444
6445 * Makefile.in (signals_h): New.
6446 (server_h): Depend on it.
6447 (server.o): Don't depend on $(signals_def).
6448 (signals.o): Depend on $(signals_def).
6449
a19cae16
JK
64502010-07-31 Jan Kratochvil <jan.kratochvil@redhat.com>
6451
6452 * Makefile.in (signals_def): New.
6453 (server_h): Append include/gdb/signals.h and signals_def.
6454 (server.o): Append signals_def.
6455
30d50328
JK
64562010-07-25 Jan Kratochvil <jan.kratochvil@redhat.com>
6457
6458 * server.c (handle_target_event): Use target_signal_to_host for
6459 resume_info.sig initialization.
6460 * target.h (struct thread_resume) <sig>: New comment.
6461
5c3216e2
OS
64622010-07-20 Ozkan Sezer <sezeroz@gmail.com>
6463
c6f46ca0
OS
6464 * server.c (handle_query): strcpy() the returned string from paddress()
6465 instead of sprintf().
5c3216e2
OS
6466 * utils.c (paddress): Return phex_nz().
6467
6bd31874
JB
64682010-07-07 Joel Brobecker <brobecker@adacore.com>
6469
6470 * server.c (handle_v_cont): Call mourn_inferior if process
6471 just exited.
6472 (myresume): Likewise.
6473
0fb4aa4b
PA
64742010-07-01 Pedro Alves <pedro@codesourcery.com>
6475
6476 Static tracepoints, and integration with UST.
6477
6478 * configure.ac: Handle --with-ust. substitute ustlibs and ustinc.
6479 * mem-break.c (uninsert_all_breakpoints)
6480 (reinsert_all_breakpoints): New.
6481 * mem-break.h (reinsert_all_breakpoints, uninsert_all_breakpoints):
6482 * tracepoint.c (ust_loaded, helper_thread_id, cmd_buf): New.
6483 (gdb_agent_ust_loaded, helper_thread_id)
6484 (gdb_agent_helper_thread_id): New macros.
6485 (struct ipa_sym_addresses): Add addr_ust_loaded,
6486 addr_helper_thread_id, addr_cmd_buf.
6487 (symbol_list): Add ust_loaded, helper_thread_id, cmd_buf.
6488 (in_process_agent_loaded_ust): New.
6489 (write_e_ust_not_loaded): New.
6490 (maybe_write_ipa_ust_not_loaded): New.
6491 (struct collect_static_trace_data_action): New.
6492 (enum tracepoint_type) <static_tracepoint>: New.
6493 (struct tracepoint) <handle>: Mention static tracepoints.
6494 (struct static_tracepoint_ctx): New.
6495 (CMD_BUF_SIZE): New.
6496 (add_tracepoint_action): Handle static tracepoint actions.
6497 (unprobe_marker_at): New.
6498 (clear_installed_tracepoints): Handle static tracepoints.
6499 (cmd_qtdp): Handle static tracepoints.
6500 (probe_marker_at): New.
6501 (cmd_qtstart): Handle static tracepoints.
6502 (response_tracepoint): Handle static tracepoints.
6503 (cmd_qtfstm, cmd_qtsstm, cmd_qtstmat): New.
6504 (handle_tracepoint_query): Handle qTfSTM, qTsSTM and qTSTMat.
6505 (get_context_regcache): Handle static tracepoints.
6506 (do_action_at_tracepoint): Handle static tracepoint actions.
6507 (traceframe_find_block_type): Handle static trace data blocks.
6508 (traceframe_read_sdata): New.
6509 (download_tracepoints): Download static tracepoint actions.
6510 [HAVE_UST] Include ust/ust.h, dlfcn.h, sys/socket.h, and sys/un.h.
6511 (GDB_PROBE_NAME): New.
6512 (ust_ops): New.
6513 (GET_UST_SYM): New.
6514 (USTF): New.
6515 (dlsym_ust): New.
6516 (ust_marker_to_static_tracepoint): New.
6517 (gdb_probe): New.
6518 (collect_ust_data_at_tracepoint): New.
6519 (gdb_ust_probe): New.
6520 (UNIX_PATH_MAX, SOCK_DIR): New.
6521 (gdb_ust_connect_sync_socket): New.
6522 (resume_thread, stop_thread): New.
6523 (run_inferior_command): New.
6524 (init_named_socket): New.
6525 (gdb_ust_socket_init): New.
6526 (cstr_to_hexstr): New.
6527 (next_st): New.
6528 (first_marker, next_marker): New.
6529 (response_ust_marker): New.
6530 (cmd_qtfstm, cmd_qtsstm): New.
6531 (unprobe_marker_at, probe_marker_at): New.
6532 (cmd_qtstmat, gdb_ust_thread): New.
6533 (gdb_ust_init): New.
6534 (initialize_tracepoint_ftlib): Call gdb_ust_init.
6535 * linux-amd64-ipa.c [HAVE_UST]: Include ust/processor.h
6536 (ST_REGENTRY): New.
6537 (x86_64_st_collect_regmap): New.
6538 (X86_64_NUM_ST_COLLECT_GREGS): New.
6539 (AMD64_RIP_REGNUM): New.
6540 (supply_static_tracepoint_registers): New.
6541 * linux-i386-ipa.c [HAVE_UST]: Include ust/processor.h
6542 (ST_REGENTRY): New.
6543 (i386_st_collect_regmap): New.
6544 (i386_NUM_ST_COLLECT_GREGS): New.
6545 (supply_static_tracepoint_registers): New.
6546 * server.c (handle_query): Handle qXfer:statictrace:read.
6547 <qSupported>: Report support for StaticTracepoints, and
6548 qXfer:statictrace:read features.
6549 * server.h (traceframe_read_sdata)
6550 (supply_static_tracepoint_registers): Declare.
6551 * remote-utils.c (convert_int_to_ascii, hexchars, ishex, tohex)
6552 (unpack_varlen_hex): Include in IPA build.
6553 * Makefile.in (ustlibs, ustinc): New.
6554 (IPA_OBJS): Add remote-utils-ipa.o.
6555 ($(IPA_LIB)): Link -ldl and -lpthread.
6556 (UST_CFLAGS): New.
6557 (IPAGENT_CFLAGS): Add UST_CFLAGS.
6558 * config.in, configure: Regenerate.
6559
9e4344e5
PA
65602010-06-20 Ian Lance Taylor <iant@google.com>
6561 Pedro Alves <pedro@codesourcery.com>
6562
6563 * linux-x86-low.c (always_true): Delete.
6564 (EMIT_ASM, EMIT_ASM32): Use an uncondition asm jmp instead of
6565 trying to fool the compiler with always_true.
6566
c6beb2cb
PA
65672010-06-20 Pedro Alves <pedro@codesourcery.com>
6568
6569 * tracepoint.c (condition_true_at_tracepoint): Don't run compiled
6570 conditions in gdbserver.
6571
d2ed6730
UW
65722010-06-19 Ulrich Weigand <uweigand@de.ibm.com>
6573
6574 * spu-low.c (spu_read_memory): Wrap around local store limit.
6575 (spu_write_memory): Likewise.
6576
4e29fb54
PA
65772010-06-15 Pedro Alves <pedro@codesourcery.com>
6578
6579 * linux-x86-low.c (amd64_emit_const, amd64_emit_void_call_2)
6580 (i386_emit_const, i386_emit_void_call_2): Replace int64_t uses with
6581 LONGEST uses.
6582 * server.h (struct emit_ops): Replace int64_t uses with LONGEST
6583 uses.
6584 * tracepoint.c (emit_const, emit_void_call_2): Replace int64_t
6585 uses with LONGEST uses.
6586
6a271cae
PA
65872010-06-14 Stan Shebs <stan@codesourcery.com>
6588 Pedro Alves <pedro@codesourcery.com>
6589
6590 Bytecode compiler.
6591
6592 * linux-x86-low.c: Include limits.h.
6593 (add_insns): New.
6594 (always_true): New.
6595 (EMIT_ASM): New.
6596 (EMIT_ASM32): New.
6597 (amd64_emit_prologue, amd64_emit_epilogue, amd64_emit_add)
6598 (amd64_emit_sub, amd64_emit_mul, amd64_emit_lsh)
6599 (amd64_emit_rsh_signed, amd64_emit_rsh_unsigned, amd64_emit_ext,
6600 (amd64_emit_log_not, amd64_emit_bit_and, amd64_emit_bit_or)
6601 (amd64_emit_bit_xor, amd64_emit_bit_not, amd64_emit_equal,
6602 (amd64_emit_less_signed, amd64_emit_less_unsigned, amd64_emit_ref,
6603 (amd64_emit_if_goto, amd64_emit_goto, amd64_write_goto_address)
6604 (amd64_emit_const, amd64_emit_call, amd64_emit_reg)
6605 (amd64_emit_pop, amd64_emit_stack_flush, amd64_emit_zero_ext)
6606 (amd64_emit_swap, amd64_emit_stack_adjust, amd64_emit_int_call_1)
6607 (amd64_emit_void_call_2): New.
6608 (amd64_emit_ops): New.
6609 (i386_emit_prologue, i386_emit_epilogue, i386_emit_add)
6610 (i386_emit_sub,i386_emit_mul, i386_emit_lsh, i386_emit_rsh_signed)
6611 (i386_emit_rsh_unsigned, i386_emit_ext, i386_emit_log_not)
6612 (i386_emit_bit_and, i386_emit_bit_or, i386_emit_bit_xor)
6613 (i386_emit_bit_not, i386_emit_equal, i386_emit_less_signed)
6614 (i386_emit_less_unsigned, i386_emit_ref, i386_emit_if_goto)
6615 (i386_emit_goto, i386_write_goto_address, i386_emit_const)
6616 (i386_emit_call, i386_emit_reg, i386_emit_pop)
6617 (i386_emit_stack_flush, i386_emit_zero_ext, i386_emit_swap)
6618 (i386_emit_stack_adjust, i386_emit_int_call_1)
6619 (i386_emit_void_call_2): New.
6620 (i386_emit_ops): New.
6621 (x86_emit_ops): New.
6622 (the_low_target): Install x86_emit_ops.
6623 * server.h (struct emit_ops): New.
6624 (get_raw_reg_func_addr): Declare.
6625 (current_insn_ptr, emit_error): Declare.
6626 * tracepoint.c (get_raw_reg, get_trace_state_variable_value)
6627 (set_trace_state_variable_value): New defines.
6628 (struct ipa_sym_addresses): New fields addr_get_raw_reg,
6629 addr_get_trace_state_variable_value and
6630 addr_set_trace_state_variable_value.
6631 (symbol_list): New fields for get_raw_reg,
6632 get_trace_state_variable_value and set_trace_state_variable_value.
6633 (condfn): New typedef.
6634 (struct tracepoint): New field `compiled_cond'.
6635 (do_action_at_tracepoint): Clear compiled_cond.
6636 (get_trace_state_variable_value, set_trace_state_variable_value):
6637 Export in the IPA.
6638 (condition_true_at_tracepoint): If there's a compiled condition,
6639 run that.
6640 (current_insn_ptr, emit_error): New globals.
6641 (struct bytecode_address): New.
6642 (get_raw_reg_func_addr): New.
6643 (emit_prologue, emit_epilogue, emit_add, emit_sub, emit_mul)
6644 (emit_lsh, emit_rsh_signed, emit_rsh_unsigned, emit_ext)
6645 (emit_log_not, emit_bit_and, emit_bit_or, emit_bit_xor)
6646 (emit_bit_not, emit_equal, emit_less_signed, emit_less_unsigned)
6647 (emit_ref, emit_if_goto, emit_goto, write_goto_address, emit_const)
6648 (emit_reg, emit_pop, emit_stack_flush, emit_zero_ext, emit_swap)
6649 (emit_stack_adjust, emit_int_call_1, emit_void_call_2): New.
6650 (compile_tracepoint_condition, compile_bytecodes): New.
6651 * target.h (emit_ops): Forward declare.
6652 (struct target_ops): New field emit_ops.
6653 (target_emit_ops): New.
6654 * linux-amd64-ipa.c (gdb_agent_get_raw_reg): New.
6655 * linux-i386-ipa.c (gdb_agent_get_raw_reg): New.
6656 * linux-low.c (linux_emit_ops): New.
6657 (linux_target_ops): Install it.
6658 * linux-low.h (struct linux_target_ops): New field emit_ops.
6659
92b72907
UW
66602010-06-14 Ulrich Weigand <uweigand@de.ibm.com>
6661
6662 * linux-ppc-low.c (ppc_arch_setup): Use private regcache to test MSR.
6663 * linux-s390-low.c (ppc_arch_setup): Use private regcache to test PSW.
6664
fa593d66
PA
66652010-06-01 Pedro Alves <pedro@codesourcery.com>
6666 Stan Shebs <stan@codesourcery.com>
6667
6668 * Makefile.in (IPA_DEPFILES, extra_libraries): New.
6669 (all): Depend on $(extra_libraries).
6670 (install-only): Install the IPA.
6671 (IPA_OBJS, IPA_LIB): New.
6672 (clean): Remove the IPA lib.
6673 (IPAGENT_CFLAGS): New.
6674 (tracepoint-ipa.o, utils-ipa.o, remote-utils-ipa.o)
6675 (regcache-ipa.o, i386-linux-ipa.o, linux-i386-ipa.o)
6676 (linux-amd64-ipa.o, amd64-linux-ipa.o): New rules.
6677 * linux-amd64-ipa.c, linux-i386-ipa.c: New files.
6678 * configure.ac: Check for atomic builtins support in the compiler.
6679 (IPA_DEPFILES, extra_libraries): Define.
6680 * configure.srv (ipa_obj): Add description.
6681 (ipa_i386_linux_regobj, ipa_amd64_linux_regobj): Define.
6682 (i[34567]86-*-linux*): Set ipa_obj.
6683 (x86_64-*-linux*): Set ipa_obj.
6684 * linux-low.c (stabilizing_threads): New.
6685 (supports_fast_tracepoints): New.
6686 (linux_detach): Stabilize threads before detaching.
6687 (handle_tracepoints): Handle internal tracing breakpoints. Assert
6688 the lwp is either not stabilizing, or is moving out of a jump pad.
6689 (linux_fast_tracepoint_collecting): New.
6690 (maybe_move_out_of_jump_pad): New.
6691 (enqueue_one_deferred_signal): New.
6692 (dequeue_one_deferred_signal): New.
6693 (linux_wait_for_event_1): If moving out of a jump pad, defer
6694 pending signals to later.
6695 (linux_stabilize_threads): New.
6696 (linux_wait_1): Check if threads need moving out of jump pads, and
6697 do it if so.
6698 (stuck_in_jump_pad_callback): New.
6699 (move_out_of_jump_pad_callback): New.
6700 (lwp_running): New.
6701 (linux_resume_one_lwp): Handle moving out of jump pads.
6702 (linux_set_resume_request): Dequeue deferred signals.
6703 (need_step_over_p): Also step over fast tracepoint jumps.
6704 (start_step_over): Also uninsert fast tracepoint jumps.
6705 (finish_step_over): Also reinsert fast tracepoint jumps.
6706 (linux_install_fast_tracepoint_jump): New.
6707 (linux_target_ops): Install linux_stabilize_threads and
6708 linux_install_fast_tracepoint_jump_pad.
6709 * linux-low.h (linux_target_ops) <get_thread_area,
6710 install_fast_tracepoint_jump_pad>: New fields.
6711 (struct lwp_info) <collecting_fast_tracepoint,
6712 pending_signals_to_report, exit_jump_pad_bkpt>: New fields.
6713 (linux_get_thread_area): Declare.
6714 * linux-x86-low.c (jump_insn): New.
6715 (x86_get_thread_area): New.
6716 (append_insns): New.
6717 (push_opcode): New.
6718 (amd64_install_fast_tracepoint_jump_pad): New.
6719 (i386_install_fast_tracepoint_jump_pad): New.
6720 (x86_install_fast_tracepoint_jump_pad): New.
6721 (the_low_target): Install x86_get_thread_area and
6722 x86_install_fast_tracepoint_jump_pad.
6723 * mem-break.c (set_raw_breakpoint_at): Use read_inferior_memory.
6724 (struct fast_tracepoint_jump): New.
6725 (fast_tracepoint_jump_insn): New.
6726 (fast_tracepoint_jump_shadow): New.
6727 (find_fast_tracepoint_jump_at): New.
6728 (fast_tracepoint_jump_here): New.
6729 (delete_fast_tracepoint_jump): New.
6730 (set_fast_tracepoint_jump): New.
6731 (uninsert_fast_tracepoint_jumps_at): New.
6732 (reinsert_fast_tracepoint_jumps_at): New.
6733 (set_breakpoint_at): Use write_inferior_memory.
6734 (uninsert_raw_breakpoint): Use write_inferior_memory.
6735 (check_mem_read): Mask out fast tracepoint jumps.
6736 (check_mem_write): Mask out fast tracepoint jumps.
6737 * mem-break.h (struct fast_tracepoint_jump): Forward declare.
6738 (set_fast_tracepoint_jump): Declare.
6739 (delete_fast_tracepoint_jump)
6740 (fast_tracepoint_jump_here, uninsert_fast_tracepoint_jumps_at)
6741 (reinsert_fast_tracepoint_jumps_at): Declare.
6742 * regcache.c: Don't compile many functions when building the
6743 in-process agent library.
6744 (init_register_cache) [IN_PROCESS_AGENT]: Don't allow allocating
6745 the register buffer in the heap.
6746 (free_register_cache): If the register buffer isn't owned by the
6747 regcache, don't free it.
6748 (set_register_cache) [IN_PROCESS_AGENT]: Don't re-alocate
6749 pre-existing register caches.
6750 * remote-utils.c (convert_int_to_ascii): Constify `from' parameter
6751 type.
6752 (convert_ascii_to_int): : Constify `from' parameter type.
6753 (decode_M_packet, decode_X_packet): Replace the `to' parameter by
6754 a `to_p' pointer to pointer parameter. If TO_P is NULL, malloc
6755 the needed buffer in-place.
6756 (relocate_instruction): New.
6757 * server.c (handle_query) <qSymbols>: If the target supports
6758 tracepoints, give it a chance of looking up symbols. Report
6759 support for fast tracepoints.
6760 (handle_status): Stabilize threads.
6761 (process_serial_event): Adjust.
6762 * server.h (struct fast_tracepoint_jump): Forward declare.
6763 (struct process_info) <fast_tracepoint_jumps>: New field.
6764 (convert_ascii_to_int, convert_int_to_ascii): Adjust.
6765 (decode_X_packet, decode_M_packet): Adjust.
6766 (relocate_instruction): Declare.
6767 (in_process_agent_loaded): Declare.
6768 (tracepoint_look_up_symbols): Declare.
6769 (struct fast_tpoint_collect_status): Declare.
6770 (fast_tracepoint_collecting): Declare.
6771 (force_unlock_trace_buffer): Declare.
6772 (handle_tracepoint_bkpts): Declare.
6773 (initialize_low_tracepoint)
6774 (supply_fast_tracepoint_registers) [IN_PROCESS_AGENT]: Declare.
6775 * target.h (struct target_ops) <stabilize_threads,
6776 install_fast_tracepoint_jump_pad>: New fields.
6777 (stabilize_threads, install_fast_tracepoint_jump_pad): New.
6778 * tracepoint.c [HAVE_MALLOC_H]: Include malloc.h.
6779 [HAVE_STDINT_H]: Include stdint.h.
6780 (trace_debug_1): Rename to ...
6781 (trace_vdebug): ... this.
6782 (trace_debug): Rename to ...
6783 (trace_debug_1): ... this. Add `level' parameter.
6784 (trace_debug): New.
6785 (ATTR_USED, ATTR_NOINLINE): New.
6786 (IP_AGENT_EXPORT): New.
6787 (gdb_tp_heap_buffer, gdb_jump_pad_buffer, gdb_jump_pad_buffer_end)
6788 (collecting, gdb_collect, stop_tracing, flush_trace_buffer)
6789 (about_to_request_buffer_space, trace_buffer_is_full)
6790 (stopping_tracepoint, expr_eval_result, error_tracepoint)
6791 (tracepoints, tracing, trace_buffer_ctrl, trace_buffer_ctrl_curr)
6792 (trace_buffer_lo, trace_buffer_hi, traceframe_read_count)
6793 (traceframe_write_count, traceframes_created)
6794 (trace_state_variables)
6795 New renaming defines.
6796 (struct ipa_sym_addresses): New.
6797 (STRINGIZE_1, STRINGIZE, IPA_SYM): New.
6798 (symbol_list): New.
6799 (ipa_sym_addrs): New.
6800 (all_tracepoint_symbols_looked_up): New.
6801 (in_process_agent_loaded): New.
6802 (write_e_ipa_not_loaded): New.
6803 (maybe_write_ipa_not_loaded): New.
6804 (tracepoint_look_up_symbols): New.
6805 (debug_threads) [IN_PROCESS_AGENT]: New.
6806 (read_inferior_memory) [IN_PROCESS_AGENT]: New.
6807 (UNKNOWN_SIDE_EFFECTS): New.
6808 (stop_tracing): New.
6809 (flush_trace_buffer): New.
6810 (stop_tracing_bkpt): New.
6811 (flush_trace_buffer_bkpt): New.
6812 (read_inferior_integer): New.
6813 (read_inferior_uinteger): New.
6814 (read_inferior_data_pointer): New.
6815 (write_inferior_data_pointer): New.
6816 (write_inferior_integer): New.
6817 (write_inferior_uinteger): New.
6818 (struct collect_static_trace_data_action): Delete.
6819 (enum tracepoint_type): New.
6820 (struct tracepoint) <type>: New field `type'.
43aaf8b6
PA
6821 <actions_str, step_actions, step_actions_str>: Only include in
6822 GDBserver.
fa593d66
PA
6823 <orig_size, obj_addr_on_target, adjusted_insn_addr>
6824 <adjusted_insn_addr_end, jump_pad, jump_pad_end>: New fields.
6825 (tracepoints): Use IP_AGENT_EXPORT.
6826 (last_tracepoint): Don't include in the IPA.
6827 (stopping_tracepoint): Use IP_AGENT_EXPORT.
6828 (trace_buffer_is_full): Use IP_AGENT_EXPORT.
6829 (alloced_trace_state_variables): New.
6830 (trace_state_variables): Use IP_AGENT_EXPORT.
6831 (traceframe_t): Delete unused variable.
6832 (circular_trace_buffer): Don't include in the IPA.
6833 (trace_buffer_start): Delete.
6834 (struct trace_buffer_control): New.
6835 (trace_buffer_free): Delete.
6836 (struct ipa_trace_buffer_control): New.
6837 (GDBSERVER_FLUSH_COUNT_MASK, GDBSERVER_FLUSH_COUNT_MASK_PREV)
6838 (GDBSERVER_FLUSH_COUNT_MASK_CURR, GDBSERVER_UPDATED_FLUSH_COUNT_BIT):
6839 New.
6840 (trace_buffer_ctrl): New.
6841 (TRACE_BUFFER_CTRL_CURR): New.
6842 (trace_buffer_start, trace_buffer_free, trace_buffer_end_free):
6843 Reimplement as macros.
6844 (trace_buffer_wrap): Delete.
6845 (traceframe_write_count, traceframe_read_count)
6846 (traceframes_created, tracing): Use IP_AGENT_EXPORT.
6847 (struct tracepoint_hit_ctx) <type>: New field.
6848 (struct fast_tracepoint_ctx): New.
6849 (memory_barrier): New.
6850 (cmpxchg): New.
6851 (record_tracepoint_error): Update atomically in the IPA.
6852 (clear_inferior_trace_buffer): New.
6853 (about_to_request_buffer_space): New.
6854 (trace_buffer_alloc): Handle GDBserver and inferior simulatenous
6855 updating the same buffer.
6856 (add_tracepoint): Default the tracepoint's type to trap
6857 tracepoint, and orig_size to -1.
6858 (get_trace_state_variable) [IN_PROCESS_AGENT]: Handle allocated
6859 internal variables.
6860 (create_trace_state_variable): New parameter `gdb'. Handle it.
6861 (clear_installed_tracepoints): Clear fast tracepoint jumps.
6862 (cmd_qtdp): Handle fast tracepoints.
6863 (cmd_qtdv): Adjust.
6864 (max_jump_pad_size): New.
6865 (gdb_jump_pad_head): New.
6866 (get_jump_space_head): New.
6867 (claim_jump_space): New.
6868 (sort_tracepoints): New.
6869 (MAX_JUMP_SIZE): New.
6870 (cmd_qtstart): Handle fast tracepoints. Sync tracepoints with the
6871 IPA.
6872 (stop_tracing) [IN_PROCESS_AGENT]: Don't include the tdisconnected
6873 support. Upload fast traceframes, and delete internal IPA
6874 breakpoints.
6875 (stop_tracing_handler): New.
6876 (flush_trace_buffer_handler): New.
6877 (cmd_qtstop): Upload fast tracepoints.
6878 (response_tracepoint): Handle fast tracepoints.
6879 (tracepoint_finished_step): Upload fast traceframes. Set the
6880 tracepoint hit context's tracepoint type.
6881 (handle_tracepoint_bkpts): New.
6882 (tracepoint_was_hit): Set the tracepoint hit context's tracepoint
6883 type. Add comment about fast tracepoints.
6884 (collect_data_at_tracepoint) [IN_PROCESS_AGENT]: Don't access the
6885 non-existing action_str field.
6886 (get_context_regcache): Handle fast tracepoints.
6887 (do_action_at_tracepoint) [!IN_PROCESS_AGENT]: Don't write the PC
6888 to the regcache.
6889 (fast_tracepoint_from_jump_pad_address): New.
6890 (fast_tracepoint_from_ipa_tpoint_address): New.
6891 (collecting_t): New.
6892 (force_unlock_trace_buffer): New.
6893 (fast_tracepoint_collecting): New.
6894 (collecting): New.
6895 (gdb_collect): New.
6896 (write_inferior_data_ptr): New.
6897 (target_tp_heap): New.
6898 (target_malloc): New.
6899 (download_agent_expr): New.
6900 (UALIGN): New.
6901 (download_tracepoints): New.
6902 (download_trace_state_variables): New.
6903 (upload_fast_traceframes): New.
6904 (IPA_FIRST_TRACEFRAME): New.
6905 (IPA_NEXT_TRACEFRAME_1): New.
6906 (IPA_NEXT_TRACEFRAME): New.
6907 [IN_PROCESS_AGENT]: Include sys/mman.h and fcntl.h.
6908 [IN_PROCESS_AGENT] (gdb_tp_heap_buffer, gdb_jump_pad_buffer)
6909 (gdb_jump_pad_buffer_end): New.
6910 [IN_PROCESS_AGENT] (initialize_tracepoint_ftlib): New.
6911 (initialize_tracepoint): Adjust.
6912 [IN_PROCESS_AGENT]: Allocate the IPA heap, and jump pad scratch
6913 buffer. Initialize the low module.
6914 * utils.c (PREFIX, TOOLNAME): New.
6915 (malloc_failure): Use PREFIX.
6916 (error): In the IPA, an error causes an exit.
6917 (fatal, warning): Use PREFIX.
6918 (internal_error): Use TOOLNAME.
6919 (NUMCELLS): Increase to 10.
6920 * configure, config.in: Regenerate.
6921
d149dd1d
PA
69222010-06-01 Pedro Alves <pedro@codesourcery.com>
6923
6924 * server.c (handle_query) <qSupported>: Do two passes over the
6925 qSupported string to avoid nesting strtok.
6926
f6528abd
JK
69272010-05-28 Jan Kratochvil <jan.kratochvil@redhat.com>
6928
6929 * Makefile.in (SFILES): Add $(srcdir)/proc-service.list.
6930 (CDEPS): New.
6931 * configure.ac (RDYNAMIC): New AC_MSG_CHECKING wrapping. Test also
6932 -Wl,--dynamic-list.
6933 * configure: Regenerate.
6934 * proc-service.list: New.
6935
ca2a87a0
JK
69362010-05-28 Jan Kratochvil <jan.kratochvil@redhat.com>
6937
6938 * linux-low.c (linux_core_of_thread): Fix crash on invalid CONTENT.
6939 New comment.
6940
363a6e9f
OS
69412010-05-26 Ozkan Sezer <sezeroz@gmail.com>
6942
6943 * gdbreplay.c (remote_open): Check error return from socket() call by
6944 its equality to -1 not by it being negative.
6945 * remote-utils.c (remote_open): Likewise.
6946
d23b6cb1
PA
69472010-05-23 Pedro Alves <pedro@codesourcery.com>
6948
6949 * config.h: Regenerate.
6950
28d3cf85
MK
69512010-05-19 Maxim Kuvyrkov <maxim@codesourcery.com>
6952
6953 * linux-m68k-low.c (ps_get_thread_area): Don't define if kernel
6954 doesn't provide PTRACE_GET_THREAD_AREA.
6955
fea36a59
MK
69562010-05-19 Maxim Kuvyrkov <maxim@codesourcery.com>
6957
6958 * linux-m68k-low.c: Include <asm/ptrace.h>
6959 (ps_get_thread_area): Implement.
6960
24b066ba
DE
69612010-05-03 Doug Evans <dje@google.com>
6962
6963 * event-loop.c (struct callback_event): New struct.
6964 (callback_list): New global.
6965 (append_callback_event, delete_callback_event): New functions.
6966 (process_callback): New function.
6967 (start_event_loop): Call it.
6968 * remote-utils.c (NOT_SCHEDULED): Define.
6969 (readchar_buf, readchar_bufcnt, readchar_bufp): New static globals,
6970 moved out of readchar.
6971 (readchar): Rewrite. Call reschedule before returning.
6972 (reset_readchar): New function.
6973 (remote_close): Call it.
6974 (process_remaining, reschedule): New functions.
6975 * server.h (callback_handler_func): New typedef.
6976 (append_callback_event, delete_callback_event): Declare.
6977
9836d6ea
PA
69782010-05-03 Pedro Alves <pedro@codesourcery.com>
6979
6980 * proc-service.c (ps_pglobal_lookup): Use
6981 thread_db_look_up_one_symbol.
6982 * remote-utils.c (look_up_one_symbol): Add new `may_ask_gdb'
6983 parameter. Use it instead of all_symbols_looked_up.
6984 * server.h (struct process_info) <all_symbols_looked_up>: Delete
6985 field.
6986 (all_symbols_looked_up): Don't declare.
6987 (look_up_one_symbol): Add new `may_ask_gdb' parameter.
6988 * thread-db.c (struct thread_db) <all_symbols_looked_up>: New
6989 field.
6990 (thread_db_look_up_symbols): Adjust call to look_up_one_symbol.
6991 Set all_symbols_looked_up here.
6992 (thread_db_look_up_one_symbol): New.
6993 (thread_db_get_tls_address): Adjust.
6994 (thread_db_load_search, try_thread_db_load_1): Always allocate the
6995 thread_db object on the heap, and tentatively set it in the
6996 process structure.
6997 (thread_db_init): Don't set all_symbols_looked_up here.
6998 * linux-low.h (thread_db_look_up_one_symbol): Declare.
6999
7984d532
PA
70002010-05-03 Pedro Alves <pedro@codesourcery.com>
7001
7002 * linux-low.c (linux_kill, linux_detach): Adjust.
7003 (status_pending_p_callback): Remove redundant statement. Check
7004 for !TARGET_WAITIKIND_IGNORE, instead of
7005 TARGET_WAITKIND_STOPPED.
7006 (handle_tracepoints): Make sure LWP is locked. Adjust.
7007 (linux_wait_for_event_1): Adjust.
7008 (linux_cancel_breakpoints): New.
7009 (unsuspend_one_lwp): New.
7010 (unsuspend_all_lwps): New.
7011 (linux_wait_1): If finishing a step-over, unsuspend all lwps.
7012 (send_sigstop_callback): Change return type to int, add new
7013 `except' parameter and handle it.
7014 (suspend_and_send_sigstop_callback): New.
7015 (stop_all_lwps): Add new `suspend' and `expect' parameters, and
7016 pass them down. If SUSPEND, also increment the lwp's suspend
7017 count.
7018 (linux_resume_one_lwp): Add notice about resuming a suspended LWP.
7019 (need_step_over_p): Don't consider suspended LWPs.
7020 (start_step_over): Adjust.
7021 (proceed_one_lwp): Change return type to int, add new `except'
7022 parameter and handle it.
7023 (unsuspend_and_proceed_one_lwp): New.
7024 (proceed_all_lwps): Use find_inferior instead of
7025 for_each_inferior.
7026 (unstop_all_lwps): Add `unsuspend' parameter. If UNSUSPEND, them
7027 also decrement the suspend count of LWPs. Pass `except' down,
7028 instead of hacking its suspend count.
7029 (linux_pause_all): Add `freeze' parameter. Adjust.
7030 (linux_unpause_all): New.
7031 (linux_target_ops): Install linux_unpause_all.
7032 * server.c (handle_status): Adjust.
7033 * target.h (struct target_ops): New fields `unpause_all' and
7034 `cancel_breakpoints'. Add new parameter to `pause_all'.
7035 (pause_all): Add new `freeze' parameter.
7036 (unpause_all): New.
7037 (cancel_breakpoints): New.
7038 * tracepoint.c (clear_installed_tracepoints): Pause threads, and
7039 cancel breakpoints.
7040 (cmd_qtstart): Pause threads.
7041 (stop_tracing): Pause threads, and cancel breakpoints.
7042 * win32-low.c (win32_target_ops): Adjust.
7043
e471f25b
PA
70442010-05-03 Pedro Alves <pedro@codesourcery.com>
7045
7046 * linux-low.c (linux_wait_for_event_1): Move passing the signal to
7047 the inferior right away from here...
7048 (linux_wait_1): ... to here, and adjust to check the thread's
7049 last_resume_kind instead of the lwp's step or stop_expected flags.
7050
1915ef4f
PA
70512010-05-02 Pedro Alves <pedro@codesourcery.com>
7052
7053 * README: Use consistent `GDB' and `GDBserver' spellings.
7054
f9e39928
PA
70552010-05-02 Pedro Alves <pedro@codesourcery.com>
7056
7057 * linux-low.c (linux_kill_one_lwp): Assume the lwp is stopped.
7058 (linux_kill): Stop all lwps here. Don't delete the main lwp here.
7059 (linux_detach_one_lwp): Assume the lwp is stopped.
7060 (any_thread_of): Delete.
7061 (linux_detach): Stop all lwps here. Don't blindly delete all
7062 breakpoints.
7063 (delete_lwp_callback): New.
7064 (linux_mourn): Delete all lwps of the process that is gone.
7065 (linux_wait_1): Don't delete the last lwp of the process here.
7066 * mem-break.h (mark_breakpoints_out): Declare.
7067 * mem-break.c (mark_breakpoints_out): New.
7068 (free_all_breakpoints): Use it.
7069 * server.c (handle_target_event): If the process is gone, mark
7070 breakpoints out.
7071 * thread-db.c (struct thread_db) <create_bp>: New field.
7072 (thread_db_enable_reporting): Fix prototype. Store a thread event
7073 breakpoint reference in the thread_db struct.
7074 (thread_db_load_search): Clear the thread_db object.
7075 (try_thread_db_load_1): Ditto.
7076 (switch_to_process): New.
7077 (disable_thread_event_reporting): Use it.
7078 (remove_thread_event_breakpoints): New.
7079 (thread_db_detach, thread_db_mourn): Use it.
7080
1e7fc18c
PA
70812010-05-01 Pedro Alves <pedro@codesourcery.com>
7082
7083 * linux-low.c (linux_enable_event_reporting): New.
7084 (linux_wait_for_event_1, handle_extended_wait): Use it.
7085
02fc4de7
PA
70862010-04-30 Pedro Alves <pedro@codesourcery.com>
7087
7088 * linux-low.c (linux_kill_one_lwp, linux_kill)
7089 (linux_detach_one_lwp): Adjust to send_sigstop interface change.
7090 (send_sigstop): Take an lwp_info as parameter instead. Queue a
7091 SIGSTOP even if the LWP is stopped.
7092 (send_sigstop_callback): New.
7093 (stop_all_lwps): Use send_sigstop_callback instead.
7094 (linux_resume_one_thread): Adjust.
7095 (proceed_one_lwp): Still proceed an LWP that the client has
7096 requested to stop, if we haven't reported it as stopped yet. Make
7097 sure that LWPs the client want stopped, have a pending SIGSTOP.
7098
bc3b5632
DE
70992010-04-26 Doug Evans <dje@google.com>
7100
ae1ada35
DE
7101 * server.c (handle_general_set): Make static.
7102
bc3b5632
DE
7103 * remote-utils.c (putpkt_binary_1): Call readchar instead of read.
7104 Print received char after testing for error/eof instead of before.
7105 (input_interrupt): Tweak comment.
7106
65730243
DE
71072010-04-23 Doug Evans <dje@google.com>
7108
7109 * server.c (start_inferior): Print inferior argv if --debug.
7110
a8ae7dc0
AR
71112010-04-21 Aleksandar Ristovski <aristovski@qnx.com>
7112
7113 * Makefile.in (nto_low_h nto-low.o nto-x86-low.o): New dependency lists.
7114 * nto-x86-low.c: Include server.h
7115
1c07cc19
PM
71162010-04-20 Pierre Muller <muller@ics.u-strasbg.fr>
7117
7118 * win32-i386-low.c: Use __x86_64__ macro instead of __x86_64 to
7119 be consistent with other sources of this directory.
7120 (init_registers_amd64): Correct name of source file of this function
7121 in the comment.
7122
e0a61e09
PM
71232010-04-19 Pierre Muller <muller@ics.u-strasbg.fr>
7124
7125 * configure.srv (x86_64-*-mingw*): New configuration for Windows
7126 64-bit executables.
7127
54709339
PM
71282010-04-19 Pierre Muller <muller@ics.u-strasbg.fr>
7129
7130 * win32-i386-low.c: Add 64-bit support.
7131 (CONTEXT_EXTENDED_REGISTERS): Set macro to zero if not exisiting.
7132 (init_registers_amd64): Declare.
7133 (mappings): Add 64-bit version of array.
7134 (init_windows_x86): New function.
7135 (the_low_target): Change init_arch field to init_windows_x86.
7136
e8f0053d
PM
71372010-04-19 Pierre Muller <muller@ics.u-strasbg.fr>
7138
7139 * win32-low.c: Adapt to support also 64-bit architecture.
7140 (child_xfer_memory): Use uintptr_t type for local variable `addr'.
7141 (get_image_name): Use SIZE_T type for local variable `done'.
7142 (psapi_get_dll_name): Use LPVOID type for parameter `BaseAddress'.
7143 (toolhelp_get_dll_name): Idem.
7144 (handle_load_dll): Use CORE_ADDR type for local variable `load_addr'.
7145 Use uintptr_t typecast to avoid warning.
7146 (handle_unload_dll): Use uintptr_t typecast to avoid warning.
7147 (handle_exception): Use phex_nz to avoid warning.
7148 (win32_wait): Remove unused local variable `process'.
7149
c481e77e
PM
71502010-04-19 Pierre Muller <muller@ics.u-strasbg.fr>
7151
7152 * configure.srv (srv_amd64_regobj): Replace `x86-64-avx.o' by
7153 `amd64-avx.o'.
7154
12ea4b69
PM
71552010-04-17 Pierre Muller <muller@ics.u-strasbg.fr>
7156
7157 * configure.ac: Use `ws2_32' library for srv_mingw.
7158 * configure: Regenerate.
7159 * gdbreplay.c: Include winsock2.h instead of winsock.h.
7160 * remote-utils.c: Likewise.
7161
f6d1620c
L
71622010-04-17 H.J. Lu <hongjiu.lu@intel.com>
7163
7164 * linux-x86-low.c (xmltarget_amd64_linux_no_xml): Define only
7165 if __x86_64__ is defined.
7166
8e642873
PM
71672010-04-16 Pierre Muller <muller@ics.u-strasbg.fr>
7168
7169 * configure: Regenerate.
7170
711e434b
PM
71712010-04-16 Pierre Muller <muller@ics.u-strasbg.fr>
7172
7173 * server.c (handle_query): Handle 'qGetTIBAddr' query.
7174 * target.h (target_ops): New get_tib_address field.
7175 * win32-low.h (win32_thread_info): Add thread_local_base field.
7176 * win32-low.c (child_add_thread): Add tlb argument.
7177 Set thread_local_base field to TLB.
7178 (get_child_debug_event): Adapt to child_add_thread change.
7179 (win32_get_tib_address): New function.
7180 (win32_target_ops): Set get_tib_address field to
7181 win32_get_tib_address.
7182 * linux-low.c (linux_target_ops): Set get_tib_address field to NULL.
7183
505106cd
PA
71842010-04-12 Pedro Alves <pedro@codesourcery.com>
7185
505106cd
PA
7186 * linux-low.c (linux_mourn): Also remove the process.
7187 * server.c (handle_target_event): Don't remove the process here.
7188 * nto-low.c (nto_mourn): New.
7189 (nto_target_ops): Install it.
7190 * spu-low.c (spu_mourn): New.
7191 (spu_target_ops): Install it.
7192 * win32-low.c (win32_mourn): New.
7193 (win32_target_ops): Install it.
7194
e8470a06
PA
71952010-04-12 Pedro Alves <pedro@codesourcery.com>
7196
7197 * server.h (buffer_xml_printf): Remove redundant `;'.
7198
45ba0d02
PA
71992010-04-12 Pedro Alves <pedro@codesourcery.com>
7200
7201 * regcache.c (set_register_cache): Invalidate regcaches before
7202 changing the register cache layout.
7203 (regcache_invalidate_one): Allow a NULL regcache.
7204 * linux-x86-low.c (x86_linux_update_xmltarget): Invalidate
7205 regcaches before changing the register cache layout or the target
7206 regsets.
7207
59e04013
L
72082010-04-12 H.J. Lu <hongjiu.lu@intel.com>
7209
7210 * linux-x86-low.c (x86_linux_update_xmltarget): Avoid unused
7211 variable warning on Linux/x86-64.
7212
8336d594
PA
72132010-04-11 Pedro Alves <pedro@codesourcery.com>
7214
7215 GDBserver disconnected tracing support.
7216
7217 * linux-low.c (linux_remove_process): Delete.
7218 (add_lwp): Don't set last_resume_kind here.
7219 (linux_kill): Use `mourn'.
7220 (linux_detach): Use `thread_db_detach', and `mourn'.
7221 (linux_mourn): New.
7222 (linux_attach_lwp_1): Adjust comment.
7223 (linux_attach): last_resume_kind moved the thread_info; adjust.
7224 (status_pending_p_callback): Adjust.
7225 (linux_wait_for_event_1): Adjust.
7226 (count_events_callback, select_singlestep_lwp_callback)
7227 (select_event_lwp_callback, cancel_breakpoints_callback)
7228 (db_wants_lwp_stopped, linux_wait_1, need_step_over_p)
7229 (proceed_one_lwp): Adjust.
7230 (linux_async): Add debug output.
7231 (linux_thread_stopped): New.
7232 (linux_pause_all): New.
7233 (linux_target_ops): Install linux_mourn, linux_thread_stopped and
7234 linux_pause_all.
7235 * linux-low.h (struct lwp_info): Delete last_resume_kind field.
7236 (thread_db_free): Delete declaration.
7237 (thread_db_detach, thread_db_mourn): Declare.
7238 * thread-db.c (thread_db_init): Use thread_db_mourn.
7239 (thread_db_free): Delete, split in two.
7240 (disable_thread_event_reporting): New.
7241 (thread_db_detach): New.
7242 (thread_db_mourn): New.
7243
7244 * server.h (struct thread_info) <last_resume_kind>: New field.
7245 <attached>: Add comment.
7246 <gdb_detached>: New field.
7247 (handler_func): Change return type to int.
7248 (handle_serial_event, handle_target_event): Ditto.
7249 (gdb_connected): Declare.
7250 (tracing): Delete.
7251 (disconnected_tracing): Declare.
7252 (stop_tracing): Declare.
7253
7254 * server.c (handle_query) <qSupported>: Report support for
7255 disconnected tracing.
7256 (queue_stop_reply_callback): Account for running threads.
7257 (gdb_wants_thread_stopped): New.
7258 (gdb_wants_all_threads_stopped): New.
7259 (gdb_reattached_process): New.
7260 (handle_status): Clear the `gdb_detached' flag of all processes.
7261 In all-stop, stop all threads.
7262 (main): Be sure to leave tfind mode. Handle disconnected tracing.
7263 (process_serial_event): If the remote connection breaks, or if an
7264 exit was forced with "monitor exit", force an event loop exit.
7265 Handle disconnected tracing on detach.
7266 (handle_serial_event): Adjust.
7267 (handle_target_event): If GDB isn't connected, forward events back
7268 to the inferior, unless the last process exited, in which case,
7269 exit gdbserver. Adjust interface.
7270
7271 * remote-utils.c (remote_open): Don't block in accept. Instead
7272 register an event loop source on the listen socket file
7273 descriptor. Refactor bits into ...
7274 (listen_desc): ... this new global.
7275 (gdb_connected): ... this new function.
7276 (enable_async_notification): ... this new function.
7277 (handle_accept_event): ... this new function.
7278 (remote_close): Clear remote_desc.
7279
7280 * inferiors.c (add_thread): Set the new thread's last_resume_kind.
7281
7282 * target.h (struct target_ops) <mourn, thread_stopped, pause_all>:
7283 New fields.
7284 (mourn_inferior): Define.
7285 (target_process_qsupported): Avoid the dangling else problem.
7286 (thread_stopped): Define.
7287 (pause_all): Define.
7288 (target_waitstatus_to_string): Declare.
7289 * target.c (target_waitstatus_to_string): New.
7290
7291 * tracepoint.c (tracing): Make extern.
7292 (disconnected_tracing): New.
7293 (stop_tracing): Make extern. Handle tracing stops due to GDB
7294 disconnecting.
7295 (cmd_qtdisconnected): New.
7296 (cmd_qtstatus): Report disconnected tracing status in trace reply.
7297 (handle_tracepoint_general_set): Handle QTDisconnected.
7298
7299 * event-loop.c (event_handler_func): Change return type to int.
7300 (process_event): Bail out if the event handler wants the event
7301 loop to stop.
7302 (handle_file_event): Ditto.
7303 (start_event_loop): Bail out if the event handler wants the event
7304 loop to stop.
7305
7306 * nto-low.c (nto_target_ops): Adjust.
7307 * spu-low.c (spu_wait): Don't remove the process here.
7308 (spu_target_ops): Adjust.
7309 * win32-low.c (win32_wait): Don't remove the process here.
7310 (win32_target_ops): Adjust.
7311
5d267c4c
PA
73122010-04-11 Pedro Alves <pedro@codesourcery.com>
7313
7314 * regcache.c (realloc_register_cache): Invalidate inferior's
7315 regcache before recreating it.
7316
623ccd72
PA
73172010-04-09 Pedro Alves <pedro@codesourcery.com>
7318
7319 * tracepoint.c (cmd_qtstatus): Report trace buffer circularity.
7320
219f2f23
PA
73212010-04-09 Stan Shebs <stan@codesourcery.com>
7322 Pedro Alves <pedro@codesourcery.com>
7323
7324 * server.h (LONGEST): New.
7325 (struct thread_info) <while_stepping>: New field.
7326 (unpack_varlen_hex, xrealloc, pulongest, plongest, phex_nz):
7327 Declare.
7328 (initialize_tracepoint, handle_tracepoint_general_set)
7329 (handle_tracepoint_query, tracepoint_finished_step)
7330 (tracepoint_was_hit, release_while_stepping_state_list):
7331 (current_traceframe): Declare.
7332 * server.c (handle_general_set): Handle tracepoint packets.
7333 (read_memory): New.
7334 (write_memory): New.
7335 (handle_search_memory_1): Use read_memory.
7336 (handle_query): Report support for conditional tracepoints, trace
7337 state variables, and tracepoint sources. Handle tracepoint
7338 queries.
7339 (main): Initialize the tracepoints module.
7340 (process_serial_event): Handle traceframe reads/writes.
7341
7342 * linux-low.c (handle_tracepoints): New.
7343 (linux_wait_1): Call it.
7344 (linux_resume_one_lwp): Handle while-stepping.
7345 (linux_supports_tracepoints, linux_read_pc, linux_write_pc): New.
7346 (linux_target_ops): Install them.
7347 * linux-low.h (struct linux_target_ops) <supports_tracepoints>:
7348 New field.
7349 * linux-x86-low.c (x86_supports_tracepoints): New.
7350 (the_low_target). Install it.
7351
7352 * mem-break.h (delete_breakpoint): Declare.
7353 * mem-break.c (delete_breakpoint): Make external.
7354
7355 * target.h (struct target_ops): Add `supports_tracepoints',
7356 `read_pc', and `write_pc' fields.
7357 (target_supports_tracepoints): Define.
7358 * utils.c (xrealloc, decimal2str, pulongest, plongest, thirty_two)
7359 (phex_nz): New.
7360
7361 * regcache.h (struct regcache) <registers_owned>: New field.
7362 (init_register_cache, regcache_cpy): Declare.
7363 (regcache_read_pc, regcache_write_pc): Declare.
7364 (register_cache_size): Declare.
7365 (supply_regblock): Declare.
7366 * regcache.c (init_register_cache): New.
7367 (new_register_cache): Use it.
7368 (regcache_cpy): New.
7369 (register_cache_size): New.
7370 (supply_regblock): New.
7371 (regcache_read_pc, regcache_write_pc): New.
889bf7c5 7372
219f2f23
PA
7373 * tracepoint.c: New.
7374
7375 * Makefile.in (OBS): Add tracepoint.o.
7376 (tracepoint.o): New rule.
7377
3a13a53b
L
73782010-04-08 H.J. Lu <hongjiu.lu@intel.com>
7379
7380 * Makefile.in (clean): Also remove i386-mmx.c i386-mmx-linux.c.
7381 (i386-mmx.o): New.
7382 (i386-mmx.c): Likewise.
7383 (i386-mmx-linux.o): Likewise.
7384 (i386-mmx-linux.c): Likewise.
7385
7386 * configure.srv (srv_i386_regobj): Add i386-mmx.o.
7387 (srv_i386_linux_regobj): Add i386-mmx-linux.o.
7388 (srv_i386_xmlfiles): Add i386/i386-mmx.xml.
7389 (srv_i386_linux_xmlfiles): Add i386/i386-mmx-linux.xml.
7390
7391 * linux-x86-low.c (init_registers_i386_mmx_linux): New.
7392 (x86_linux_update_xmltarget): Call init_registers_i386_mmx_linux
7393 and return if ptrace PTRACE_GETFPXREGS failed in 32bit.
7394
1570b33e
L
73952010-04-07 H.J. Lu <hongjiu.lu@intel.com>
7396
7397 * Makefile.in (clean): Updated.
7398 (i386-avx.o): New.
7399 (i386-avx.c): Likewise.
7400 (i386-avx-linux.o): Likewise.
7401 (i386-avx-linux.c): Likewise.
7402 (amd64-avx.o): Likewise.
7403 (amd64-avx.c): Likewise.
7404 (amd64-avx-linux.o): Likewise.
7405 (amd64-avx-linux.c): Likewise.
7406
7407 * configure.srv (srv_i386_regobj): Add i386-avx.o.
7408 (srv_i386_linux_regobj): Add i386-avx-linux.o.
7409 (srv_amd64_regobj): Add amd64-avx.o.
7410 (srv_amd64_linux_regobj): Add amd64-avx-linux.o.
7411 (srv_i386_32bit_xmlfiles): Add i386/32bit-avx.xml.
7412 (srv_i386_64bit_xmlfiles): Add i386/64bit-avx.xml.
7413 (srv_i386_xmlfiles): Add i386/i386-avx.xml.
7414 (srv_amd64_xmlfiles): Add i386/amd64-avx.xml.
7415 (srv_i386_linux_xmlfiles): Add i386/i386-avx-linux.xml.
7416 (srv_amd64_linux_xmlfiles): Add i386/amd64-avx-linux.xml.
7417
7418 * i387-fp.c: Include "i386-xstate.h".
7419 (i387_xsave): New.
7420 (i387_cache_to_xsave): Likewise.
7421 (i387_xsave_to_cache): Likewise.
7422 (x86_xcr0): Likewise.
7423
7424 * i387-fp.h (i387_cache_to_xsave): Likewise.
7425 (i387_xsave_to_cache): Likewise.
7426 (x86_xcr0): Likewise.
7427
7428 * linux-arm-low.c (target_regsets): Initialize nt_type to 0.
7429 * linux-crisv32-low.c (target_regsets): Likewise.
7430 * linux-m68k-low.c (target_regsets): Likewise.
7431 * linux-mips-low.c (target_regsets): Likewise.
7432 * linux-ppc-low.c (target_regsets): Likewise.
7433 * linux-s390-low.c (target_regsets): Likewise.
7434 * linux-sh-low.c (target_regsets): Likewise.
7435 * linux-sparc-low.c (target_regsets): Likewise.
7436 * linux-xtensa-low.c (target_regsets): Likewise.
7437
7438 * linux-low.c: Include <sys/uio.h>.
7439 (regsets_fetch_inferior_registers): Support nt_type.
7440 (regsets_store_inferior_registers): Likewise.
7441 (linux_process_qsupported): New.
7442 (linux_target_ops): Add linux_process_qsupported.
7443
7444 * linux-low.h (regset_info): Add nt_type.
7445 (linux_target_ops): Add process_qsupported.
7446
7447 * linux-x86-low.c: Include "i386-xstate.h", "elf/common.h"
7448 and <sys/uio.h>.
7449 (init_registers_i386_avx_linux): New.
7450 (init_registers_amd64_avx_linux): Likewise.
7451 (xmltarget_i386_linux_no_xml): Likewise.
7452 (xmltarget_amd64_linux_no_xml): Likewise.
7453 (PTRACE_GETREGSET): Likewise.
7454 (PTRACE_SETREGSET): Likewise.
7455 (x86_fill_xstateregset): Likewise.
7456 (x86_store_xstateregset): Likewise.
7457 (use_xml): Likewise.
7458 (x86_linux_update_xmltarget): Likewise.
7459 (x86_linux_process_qsupported): Likewise.
7460 (target_regsets): Add NT_X86_XSTATE entry and Initialize nt_type.
7461 (x86_arch_setup): Don't call init_registers_amd64_linux nor
7462 init_registers_i386_linux here. Call
7463 x86_linux_update_xmltarget.
7464 (the_low_target): Add x86_linux_process_qsupported.
7465
7466 * server.c (handle_query): Call target_process_qsupported.
7467
7468 * target.h (target_ops): Add process_qsupported.
7469 (target_process_qsupported): New.
7470
fc7238bb
PA
74712010-04-03 Pedro Alves <pedro@codesourcery.com>
7472
7473 * inferiors.c (add_thread): Set last_status kind to
7474 TARGET_WAITKIND_IGNORE.
7475 * linux-low.c (cancel_breakpoint): Remove unnecessary regcache
7476 fetch. Use ptid_of. Avoid unnecessary get_lwp_thread calls.
7477 (linux_wait_1): Move `thread' local definition to block that uses
7478 it. Don't NULL initialize `event_child'.
7479 (linux_resume_one_thread): Avoid unnecessary get_lwp_thread calls.
7480 Alway set the thread's last_status to TARGET_WAITKIND_IGNORE.
7481 * linux-x86-low.c (x86_breakpoint_at): Read raw memory.
7482
bdabb078
PA
74832010-04-01 Pedro Alves <pedro@codesourcery.com>
7484
7485 * linux-low.c (get_stop_pc): Don't adjust the PC if stopped with
7486 an extended waitstatus, or by a watchpoint.
7487 (cancel_breakpoints_callback): Don't cancel a breakpoint if the
7488 thread was stepping or has been stopped by a watchpoint.
7489
d3bbe7a0
PA
74902010-04-01 Pedro Alves <pedro@codesourcery.com>
7491
7492 * mem-break.c (struct raw_breakpoint): New field shlib_disabled.
7493 (set_gdb_breakpoint_at): If GDB is inserting a breakpoint on top
7494 of another, then delete the previous, and validate all
7495 breakpoints.
7496 (validate_inserted_breakpoint): New.
7497 (delete_disabled_breakpoints): New.
7498 (validate_breakpoints): New.
7499 (check_mem_read): Validate breakpoints before trusting their
7500 shadow. Delete disabled breakpoints.
7501 (check_mem_write): Validate breakpoints before trusting they
7502 should be inserted. Delete disabled breakpoints.
7503 * mem-break.h (validate_breakpoints):
7504 * server.c (handle_query): Validate breakpoints when we see a
7505 qSymbol query.
7506
8b07ae33
PA
75072010-04-01 Pedro Alves <pedro@codesourcery.com>
7508
7509 * linux-low.c (linux_wait_1): Avoid setting need_step_over is
7510 there's a GDB breakpoint at stop_pc. Always report a trap to GDB
7511 if we could tell there's a GDB breakpoint at stop_pc.
7512 (need_step_over_p): Don't do a step over if we find a GDB
7513 breakpoint at the resume PC.
7514
7515 * mem-break.c (struct raw_breakpoint): New.
7516 (enum bkpt_type): New type `gdb_breakpoint'.
7517 (struct breakpoint): Delete the `PC', `old_data' and `inserted'
7518 fields. New field `raw'.
7519 (find_raw_breakpoint_at): New.
7520 (set_raw_breakpoint_at): Handle refcounting. Create a raw
7521 breakpoint instead.
7522 (set_breakpoint_at): Adjust.
7523 (delete_raw_breakpoint): New.
7524 (release_breakpoint): New.
7525 (delete_breakpoint): Rename to...
7526 (delete_breakpoint_1): ... this. Add proc parameter. Use
7527 release_breakpoint. Return ENOENT.
7528 (delete_breakpoint): Reimplement.
7529 (find_breakpoint_at): Delete.
7530 (find_gdb_breakpoint_at): New.
7531 (delete_breakpoint_at): Delete.
7532 (set_gdb_breakpoint_at): New.
7533 (delete_gdb_breakpoint_at): New.
7534 (gdb_breakpoint_here): New.
7535 (set_reinsert_breakpoint): Use release_breakpoint.
7536 (uninsert_breakpoint): Rename to ...
7537 (uninsert_raw_breakpoint): ... this.
7538 (uninsert_breakpoints_at): Adjust to handle raw breakpoints.
7539 (reinsert_raw_breakpoint): Change parameter type to
7540 raw_breakpoint.
7541 (reinsert_breakpoints_at): Adjust to handle raw breakpoints
7542 instead.
7543 (check_breakpoints): Adjust. Use release_breakpoint.
7544 (breakpoint_here): Rewrite using find_raw_breakpoint_at.
7545 (breakpoint_inserted_here): Ditto.
7546 (check_mem_read): Adjust to iterate over raw breakpoints instead.
7547 Don't trust the breakpoint's shadow if it is not inserted.
7548 (check_mem_write): Adjust to iterate over raw breakpoints instead.
7549 (delete_all_breakpoints): Adjust.
7550 (free_all_breakpoints): Mark all breakpoints as uninserted, and
7551 use delete_breakpoint_1.
7552
7553 * mem-break.h (breakpoints_supported): Delete declaration.
7554 (set_gdb_breakpoint_at): Declare.
7555 (gdb_breakpoint_here): Declare.
7556 (delete_breakpoint_at): Delete.
7557 (delete_gdb_breakpoint_at): Declare.
7558
7559 * server.h (struct raw_breakpoint): Forward declare.
7560 (struct process_info): New field `raw_breakpoints'.
7561
7562 * linux-x86-low.c (x86_insert_point, x86_remote_point): Handle Z0
7563 breakpoints.
7564
6bf5e0ba
PA
75652010-03-24 Pedro Alves <pedro@codesourcery.com>
7566
7567 * linux-low.c (status_pending_p_callback): Fix comment.
7568 (linux_wait_for_event_1): Move most of the internal breakpoint
7569 handling from here...
7570 (linux_wait_1): ... to here.
7571 (count_events_callback): New.
7572 (select_singlestep_lwp_callback): New.
7573 (select_event_lwp_callback): New.
7574 (cancel_breakpoints_callback): New.
7575 (select_event_lwp): New.
7576 (linux_wait_1): Simplify internal breakpoint handling. Give equal
7577 priority to all LWPs that have had events that should be reported
7578 to the client. Cancel breakpoints when about to reporting the
7579 event to the client, not while stopping lwps. No longer cancel
7580 finished single-steps here.
7581 (cancel_finished_single_step): Delete.
7582 (cancel_finished_single_steps): Delete.
7583
414a389f
PA
75842010-03-24 Pedro Alves <pedro@codesourcery.com>
7585
7586 * mem-break.c (enum bkpt_type): New.
7587 (struct breakpoint): New field `type'.
7588 (set_breakpoint_at): Change return type to struct breakpoint
7589 pointer. Set type to `other_breakpoint' by default.
7590 (delete_breakpoint): Rewrite, supporting more than one breakpoint
7591 in the breakpoint list.
7592 (delete_reinsert_breakpoints): Only delete reinsert breakpoints.
7593 (reinsert_breakpoint): Rename to ...
7594 (reinsert_raw_breakpoint): ... this.
7595 (reinsert_breakpoints_at): Adjust.
7596 * mem-break.h (struct breakpoint): Declare.
7597 (set_breakpoint_at): Change return type to struct breakpoint
7598 pointer.
7599
2280c721
PA
76002010-03-24 Pedro Alves <pedro@codesourcery.com>
7601
7602 * server.c (handle_query): Assign, not compare.
7603
d50171e4
PA
76042010-03-24 Pedro Alves <pedro@codesourcery.com>
7605
7606 Teach linux gdbserver to step-over-breakpoints.
7607
7608 * linux-low.c (can_hardware_single_step): New.
7609 (supports_breakpoints): New.
7610 (handle_extended_wait): If stopping threads, read the stop pc of
7611 the new cloned LWP.
7612 (get_pc): New.
7613 (get_stop_pc): Add `lwp' parameter. Handle it. Bail out if the
7614 low target doesn't support retrieving the PC.
7615 (add_lwp): Set last_resume_kind to resume_continue.
7616 (linux_attach_lwp_1): Adjust comments. Always set stop_expected.
7617 (linux_attach): Don't clear stop_expected. Set the lwp's
7618 last_resume_kind to resume_stop.
7619 (linux_detach_one_lwp): Don't check for removed breakpoints.
7620 (check_removed_breakpoint): Delete.
7621 (status_pending_p): Rename to ...
7622 (status_pending_p_callback): ... this. Don't check for removed
7623 breakpoints. Don't consider threads that are stopped from GDB's
7624 perspective.
7625 (linux_wait_for_lwp): Always read the stop_pc here.
7626 (cancel_breakpoint): New.
7627 (step_over_bkpt): New global.
7628 (linux_wait_for_event_1): Implement stepping over breakpoints.
7629 (gdb_wants_lwp_stopped): New.
7630 (gdb_wants_all_stopped): New.
7631 (linux_wait_1): Tag threads as gdb-wants-stopped. Cancel finished
7632 single-step traps here. Store the thread's last reported target
7633 wait status.
7634 (send_sigstop): Don't clear stop_expected. Always set it,
7635 instead.
7636 (mark_lwp_dead): Remove reference to pending_is_breakpoint.
7637 (cancel_finished_single_step): New.
7638 (cancel_finished_single_steps): New.
7639 (wait_for_sigstop): Don't cancel finished single-step traps here.
7640 (linux_resume_one_lwp): Don't check for removed breakpoints.
7641 Don't set `step' on non-hardware step archs.
7642 (linux_set_resume_request): Ignore resume_stop requests if already
7643 stopping or stopped. Set the lwp's last_resume_kind.
7644 (resume_status_pending_p): Don't check for removed breakpoints.
7645 (need_step_over_p): New.
7646 (start_step_over): New.
7647 (finish_step_over): New.
7648 (linux_resume_one_thread): Always queue a sigstop for resume_stop
7649 requests. Clear the thread's last reported target waitstatus.
7650 Don't use the `suspended' flag. Don't consider pending breakpoints.
7651 (linux_resume): Start a step-over if necessary.
7652 (proceed_one_lwp): New.
7653 (proceed_all_lwps): New.
7654 (unstop_all_lwps): New.
7655 * linux-low.h (struct lwp_info): Rewrite comment for the
7656 `suspended' flag. Add the `stop_pc' field. Delete the
7657 `pending_stop_pc' field. Tweak the `stepping' flag's comment.
7658 Add `'last_resume_kind' and `need_step_over' fields.
7659 * inferiors.c (struct thread_info): Delete, moved elsewhere.
7660 * mem-break.c (struct breakpoint): Delete `reinserting' flag.
7661 Delete `breakpoint_to_reinsert' field. New flag `inserted'.
7662 (set_raw_breakpoint_at): New.
7663 (set_breakpoint_at): Rewrite to use it.
7664 (reinsert_breakpoint_handler): Delete.
7665 (set_reinsert_breakpoint): New.
7666 (reinsert_breakpoint_by_bp): Delete.
7667 (delete_reinsert_breakpoints): New.
7668 (uninsert_breakpoint): Rewrite.
7669 (uninsert_breakpoints_at): New.
7670 (reinsert_breakpoint): Rewrite.
7671 (reinsert_breakpoints_at): New.
7672 (check_breakpoints): Rewrite.
7673 (breakpoint_here): New.
7674 (breakpoint_inserted_here): New.
7675 (check_mem_read): Adjust.
7676 * mem-break.h (breakpoints_supported, breakpoint_here)
7677 (breakpoint_inserted_here, set_reinsert_breakpoint): Declare.
7678 (reinsert_breakpoint_by_bp): Delete declaration.
7679 (delete_reinsert_breakpoints): Declare.
7680 (reinsert_breakpoint): Delete declaration.
7681 (reinsert_breakpoints_at): Declare.
7682 (uninsert_breakpoint): Delete declaration.
7683 (uninsert_breakpoints_at): Declare.
7684 (check_breakpoints): Adjust prototype.
7685 * server.h: Adjust include order.
7686 (struct thread_info): Declare here. Add a `last_status' field.
7687
30ba68cb
MS
76882010-03-23 Michael Snyder <msnyder@vmware.com>
7689
7690 * server.c (crc32): New function.
7691 (handle_query): Add handling for 'qCRC:' request.
7692
b9a881c2
PA
76932010-03-23 Pedro Alves <pedro@codesourcery.com>
7694
7695 * linux-x86-low.c (x86_linux_prepare_to_resume): Clear DR6 if the
7696 lwp had been stopped by a watchpoint.
7697
e92d13d5
PA
76982010-03-16 Pedro Alves <pedro@codesourcery.com>
7699
7700 * server.h (internal_error): Declare.
7701 (gdb_assert, ASSERT_FUNCTION, gdb_assert_fail): Define.
7702 * utils.c (internal_error): New function.
7703
64daa791
AS
77042010-03-15 Andreas Schwab <schwab@redhat.com>
7705
7706 * configure.srv: Fix typo setting srv_regobj.
7707
f52cd8cd
PA
77082010-03-15 Pedro Alves <pedro@codesourcery.com>
7709
7710 * linux-low.c (fetch_register): Avoid passing a non string literal
7711 format to `error'.
7712 (usr_store_inferior_registers): Ditto.
7713
93ae6fdc
PA
77142010-03-14 Pedro Alves <pedro@codesourcery.com>
7715
7716 * linux-low.c (linux_write_memory): Bail out early if peeking
7717 memory failed.
7718
c3adc08c
PA
77192010-03-14 Pedro Alves <pedro@codesourcery.com>
7720
7721 * linux-low.h (struct lwp_info): New fields
7722 `stopped_by_watchpoint' and `stopped_data_address'.
7723 * linux-low.c (linux_wait_for_lwp): Check for watchpoint triggers
7724 here, and cache them in the lwp object.
7725 (wait_for_sigstop): Check stopped_by_watchpoint lwp field
7726 directly.
7727 (linux_resume_one_lwp): Clear the lwp's stopped_by_watchpoint
7728 field.
7729 (linux_stopped_by_watchpoint): Rewrite.
7730 (linux_stopped_data_address): Rewrite.
7731
bce522a2
PA
77322010-03-06 Simo Melenius <simo.melenius@iki.fi>
7733
7734 * linux-low.c (linux_wait_for_lwp): Fetch the regcache after
7735 switching the current inferior, not before.
7736
90884b2b
L
77372010-03-01 H.J. Lu <hongjiu.lu@intel.com>
7738
7739 * Makefile.in (clean): Replace reg-i386.c, reg-x86-64.c,
7740 reg-i386-linux.c and reg-x86-64-linux.c with i386.c, amd64.c,
7741 i386-linux.c and amd64-linux.c.
7742 (reg-i386.o): Removed.
7743 (reg-i386.c): Likewise.
7744 (reg-i386-linux.o): Likewise.
7745 (reg-i386-linux.c): Likewise.
7746 (reg-x86-64.o): Likewise.
7747 (reg-x86-64.c): Likewise.
7748 (reg-x86-64-linux.o): Likewise.
7749 (reg-x86-64-linux.c): Likewise.
7750 (i386.o): New.
7751 (i386.c): Likewise.
7752 (i386-linux.o): Likewise.
7753 (i386-linux.c): Likewise.
7754 (amd64.o): Likewise.
7755 (amd64.c): Likewise.
7756 (amd64-linux.o): Likewise.
7757 (amd64-linux.c): Likewise.
7758
7759 * configure.srv (srv_i386_regobj): New.
7760 (srv_i386_linux_regobj): Likewise.
7761 (srv_amd64_regobj): Likewise.
7762 (srv_amd64_linux_regobj): Likewise.
7763 (srv_i386_32bit_xmlfiles): Likewise.
7764 (srv_i386_64bit_xmlfiles): Likewise.
7765 (srv_i386_xmlfiles): Likewise.
7766 (srv_amd64_xmlfiles): Likewise.
7767 (srv_i386_linux_xmlfiles): Likewise.
7768 (srv_amd64_linux_xmlfiles): Likewise.
7769 (i[34567]86-*-cygwin*): Set srv_regobj to $srv_i386_regobj. Set
7770 srv_xmlfiles to $srv_i386_xmlfiles.
7771 (i[34567]86-*-mingw32ce*): Likewise.
7772 (i[34567]86-*-mingw*): Likewise.
7773 (i[34567]86-*-nto*): Likewise.
7774 (i[34567]86-*-linux*): Set srv_regobj to $srv_i386_linux_regobj
7775 and $srv_amd64_linux_regobj. Set srv_xmlfiles to
7776 $srv_i386_linux_xmlfiles and $srv_amd64_linux_xmlfiles.
7777 (x86_64-*-linux*): Likewise.
7778
7779 * linux-x86-low.c (init_registers_x86_64_linux): Removed.
7780 (init_registers_amd64_linux): New.
7781 (x86_arch_setup): Replace init_registers_x86_64_linux with
7782 init_registers_amd64_linux.
7783
193f13e6
MK
77842010-02-23 Maxim Kuvyrkov <maxim@codesourcery.com>
7785
7786 * configure.ac: Check for libdl. If it is not available link against
7787 static libthread_db.
7788 * configure: Regenerate.
7789
85d721b8
PA
77902010-02-22 Pedro Alves <pedro@codesourcery.com>
7791
7792 PR9605
7793
7794 * i386-low.c (i386_length_and_rw_bits): Throw a fatal error if
7795 handing a read watchpoint.
7796 (i386_low_insert_watchpoint): Read watchpoints aren't supported.
7797
6076632b
DE
77982010-02-12 Doug Evans <dje@google.com>
7799
7800 * linux-low.c (linux_supports_tracefork_flag): Document.
7801 (linux_look_up_symbols): Add comment.
7802
3327ccf7
L
78032010-02-03 H.J. Lu <hongjiu.lu@intel.com>
7804
7805 * regcache.c (supply_register): Clear regcache if buf is NULL.
7806
0718675c 78072010-02-02 Nicolas Roche <roche@sourceware.org>
3327ccf7 7808 Joel Brobecker <brobecker@adacore.com>
0718675c
JB
7809
7810 * inferiors.c (find_inferior): Add function documentation.
7811 (unloaded_dll): Handle the case where the unloaded dll has not
7812 been previously registered in the dll list.
7813
177321bd
DJ
78142010-02-01 Daniel Jacobowitz <dan@codesourcery.com>
7815
7816 * linux-arm-low.c (thumb_breakpoint_len): Delete.
7817 (thumb2_breakpoint): New.
7818 (arm_breakpoint_at): Check for Thumb-2 breakpoints.
7819
2b009048
DJ
78202010-01-29 Daniel Jacobowitz <dan@codesourcery.com>
7821
7822 * linux-low.c (get_stop_pc): Check for SIGTRAP.
7823 (linux_wait_for_event_1): Handle SIGILL and SIGSEGV as possible
7824 breakpoints.
7825
3be029c7
PA
78262010-01-21 Pedro Alves <pedro@codesourcery.com>
7827
7828 * linux-ppc-low.c (ppc_arch_setup): Adjust to regcache changes.
7829
18f5de3b
JK
78302010-01-21 Jan Kratochvil <jan.kratochvil@redhat.com>
7831
7832 * linux-s390-low.c (s390_collect_ptrace_register)
7833 (s390_supply_ptrace_register): Adjust it for the new regcache parameter.
7834
3743bb4f
DE
78352010-01-21 Doug Evans <dje@google.com>
7836
14ce3065
DE
7837 * linux-low.c (PTRACE_ARG3_TYPE): Change from long to void*.
7838 (PTRACE_ARG4_TYPE): New macro.
7839 (handle_extended_wait): Cast ptrace arg4 to PTRACE_ARG4_TYPE.
7840 (linux_wait_for_event_1, linux_resume_one_lwp): Ditto.
7841 (fetch_register): Cast to uintptr_t before casting to PTRACE_ARG3_TYPE.
7842 (usr_store_inferior_registers): Ditto.
7843 (linux_read_memory, linux_write_memory): Ditto.
7844 (linux_test_for_tracefork): Ditto.
7845
3743bb4f
DE
7846 * linux-arm-low.c: Remove redundant include of gdb_proc_service.h.
7847 Only include elf.h if gdb_proc_service.h didn't include linux/elf.h.
7848
8b315be5
PA
78492010-01-21 Pedro Alves <pedro@codesourcery.com>
7850
7851 * proc-service.c (ps_lgetregs): Don't refetch registers from the
7852 target.
7853
85492558
PA
78542010-01-21 Pedro Alves <pedro@codesourcery.com>
7855
7856 * spu-low.c (spu_fetch_registers, spu_store_registers): Change
7857 prototype to take a regcache. Adjust.
7858
442ea881
PA
78592010-01-20 Pedro Alves <pedro@codesourcery.com>
7860
7861 * regcache.h (struct thread_info): Forward declare.
7862 (struct regcache): New.
7863 (new_register_cache): Adjust prototype.
7864 (get_thread_regcache): Declare.
7865 (free_register_cache): Adjust prototype.
7866 (registers_to_string, registers_from_string): Ditto.
7867 (supply_register, supply_register_by_name, collect_register)
7868 (collect_register_as_string, collect_register_by_name): Ditto.
7869 * regcache.c (struct inferior_regcache_data): Delete.
7870 (get_regcache): Rename to ...
7871 (get_thread_regcache): ... this. Adjust. Switch inferior before
7872 fetching registers.
7873 (regcache_invalidate_one): Adjust.
7874 (regcache_invalidate): Fix prototype.
7875 (new_register_cache): Return the new register cache.
7876 (free_register_cache): Change prototype.
7877 (realloc_register_cache): Adjust.
7878 (registers_to_string): Change prototype to take a regcache. Adjust.
7879 (registers_from_string): Ditto.
7880 (register_data): Ditto.
7881 (supply_register): Ditto.
7882 (supply_register_by_name): Ditto.
7883 (collect_register): Ditto.
7884 (collect_register_as_string): Ditto.
7885 (collect_register_by_name): Ditto.
7886 * server.c (process_serial_event): Adjust.
7887 * linux-low.h (regset_fill_func, regset_store_func): Change
7888 prototype.
7889 (get_pc, set_pc, collect_ptrace_register, supply_ptrace_register):
7890 Change prototype.
7891 * linux-low.c (get_stop_pc): Adjust.
7892 (check_removed_breakpoint): Adjust.
7893 (linux_wait_for_event): Adjust.
7894 (linux_resume_one_lwp): Adjust.
7895 (fetch_register): Add regcache parameter. Adjust.
7896 (usr_store_inferior_registers): Ditto.
7897 (regsets_fetch_inferior_registers): Ditto.
7898 (regsets_store_inferior_registers): Ditto.
7899 (linux_fetch_registers, linux_store_registers): Ditto.
7900 * i387-fp.c (i387_cache_to_fsave): Change prototype to take a
7901 regcache. Adjust.
43aaf8b6
PA
7902 (i387_fsave_to_cache, i387_cache_to_fxsave, i387_fxsave_to_cache):
7903 Ditto.
442ea881
PA
7904 * i387-fp.h (i387_cache_to_fsave, i387_fsave_to_cache): Change
7905 prototype to take a regcache.
7906 (i387_cache_to_fxsave, i387_fxsave_to_cache): Ditto.
7907 * remote-utils.c (convert_ascii_to_int, outreg)
7908 (prepare_resume_reply): Change prototype to take a regcache.
7909 Adjust.
7910 * target.h (struct target_ops) <fetch_registers, store_registers>:
7911 Change prototype to take a regcache.
7912 (fetch_inferior_registers, store_inferior_registers): Change
7913 prototype to take a regcache. Adjust.
7914 * proc-service.c (ps_lgetregs): Adjust.
7915 * linux-x86-low.c (x86_fill_gregset, x86_store_gregset)
7916 (x86_fill_fpregset, x86_store_fpregset, x86_fill_fpxregset)
7917 (x86_store_fpxregset, x86_get_pc, x86_set_pc): Change prototype to
7918 take a regcache. Adjust.
7919 * linux-arm-low.c (arm_fill_gregset, arm_store_gregset)
7920 (arm_fill_wmmxregset, arm_store_wmmxregset, arm_fill_vfpregset)
7921 (arm_store_vfpregset, arm_get_pc, arm_set_pc):
7922 (arm_breakpoint_at): Change prototype to take a regcache. Adjust.
7923 * linux-cris-low.c (cris_get_pc, cris_set_pc)
7924 (cris_cannot_fetch_register):
7925 (cris_breakpoint_at): Change prototype to take a regcache.
7926 Adjust.
7927 * linux-crisv32-low.c (cris_get_pc, cris_set_pc,
7928 cris_reinsert_addr, cris_write_data_breakpoint): Change prototype
7929 to take a regcache. Adjust.
7930 (cris_breakpoint_at, cris_insert_point, cris_remove_point):
7931 Adjust.
7932 * linux-m32r-low.c (m32r_get_pc, m32r_set_pc): Change prototype to
7933 take a regcache. Adjust.
7934 * linux-m68k-low.c (m68k_fill_gregset, m68k_store_gregset)
7935 (m68k_fill_fpregset, m68k_store_fpregset, m68k_get_pc,
7936 (m68k_set_pc): Change prototype to take a regcache. Adjust.
7937 * linux-mips-low.c (mips_get_pc):
7938 (mips_set_pc): Change prototype to take a regcache. Adjust.
7939 (mips_reinsert_addr): Adjust.
7940 (mips_collect_register): Change prototype to take a regcache.
7941 Adjust.
7942 (mips_supply_register):
7943 (mips_collect_register_32bit, mips_supply_register_32bit)
7944 (mips_fill_gregset, mips_store_gregset, mips_fill_fpregset)
7945 (mips_store_fpregset): Ditto.
43aaf8b6
PA
7946 * linux-ppc-low.c (ppc_supply_ptrace_register)
7947 (ppc_supply_ptrace_register): Ditto.
442ea881
PA
7948 (parse_spufs_run): Adjust.
7949 (ppc_get_pc, ppc_set_pc, ppc_fill_gregset, ppc_fill_vsxregset)
7950 (ppc_store_vsxregset, ppc_fill_vrregset, ppc_store_vrregset)
7951 (ppc_fill_evrregset, ppc_store_evrregset): Change prototype to
7952 take a regcache. Adjust.
7953 * linux-s390-low.c (s390_collect_ptrace_register)
7954 (s390_supply_ptrace_register, s390_fill_gregset, s390_get_pc)
7955 (s390_set_pc): Change prototype to take a regcache. Adjust.
7956 (s390_arch_setup): Adjust.
7957 * linux-sh-low.c (sh_get_pc, sh_breakpoint_at)
7958 (sh_fill_gregset): Change prototype to take a regcache. Adjust.
7959 * linux-sparc-low.c (sparc_fill_gregset_to_stack)
7960 (sparc_fill_gregset, sparc_store_gregset_from_stack)
7961 (sparc_store_gregset, sparc_get_pc): Change prototype to take a
7962 regcache. Adjust.
7963 (sparc_breakpoint_at): Adjust.
7964 * linux-xtensa-low.c (xtensa_fill_gregset):
7965 (xtensa_store_gregset):
7966 (xtensa_fill_xtregset, xtensa_store_xtregset, xtensa_get_pc)
7967 (xtensa_set_pc): Change prototype to take a regcache. Adjust.
7968 * nto-low.c (nto_fetch_registers, nto_store_registers): Change
7969 prototype to take a regcache. Adjust.
7970 * win32-arm-low.c (arm_fetch_inferior_register)
7971 (arm_store_inferior_register): Change prototype to take a
7972 regcache. Adjust.
7973 * win32-i386-low.c (i386_fetch_inferior_register)
7974 (i386_store_inferior_register): Change prototype to take a
7975 regcache. Adjust.
7976 * win32-low.c (child_fetch_inferior_registers)
7977 (child_store_inferior_registers): Change prototype to take a
7978 regcache. Adjust.
7979 (win32_wait): Adjust.
7980 (win32_fetch_inferior_registers): Change prototype to take a
7981 regcache. Adjust.
7982 (win32_store_inferior_registers): Adjust.
7983 * win32-low.h (struct win32_target_ops) <fetch_inferior_register,
7984 store_inferior_register>: Change prototype to take a regcache.
7985
60c3d7b0
DE
79862010-01-20 Doug Evans <dje@google.com>
7987
7988 * linux-low.c (linux_create_inferior): Wrap use of __SIGRTMIN in
7989 #ifdef.
7990 (linux_wait_for_event1, linux_init_signals): Ditto.
ec8ebe72 7991 (W_STOPCODE): Provide definition if missing.
60c3d7b0 7992
dc146f7c
VP
79932010-01-13 Vladimir Prus <vladimir@codesourcery.com>
7994
7995 * linux-low.c (linux_core_of_thread): New.
7996 (compare_ints, show_process, list_threads): New.
7997 (linux_qxfer_osdata): Report threads and cores.
7998 (linux_target_op): Register linux_core_of_thread.
7999 * remote-utils.c (prepare_resume_reply): Report the core.
8000 (buffer_xml_printf): Support %d specifier.
8001 * server.c (handle_threads_qxfer_proper, handle_threads_qxfer):
8002 New.
8003 (handle_query): Handle qXfer:threads. Announce availability
8004 thereof.
8005 * target.h (struct target_ops): New field core_of_thread.
8006
7803799a
UW
80072010-01-04 Ulrich Weigand <uweigand@de.ibm.com>
8008
8009 * Makefile.in (clean): Remove new generated files.
8010 (reg-s390.o, reg-s390.c): Remove rules.
8011 (reg-s390x.o, reg-s390x.c): Likewise.
8012 (s390-linux32.o, s390-linux32.c): Add rules.
8013 (s390-linux64.o, s390-linux64.c): Likewise.
8014 (s390x-linux64.o, s390x-linux64.c): Likewise.
8015 * configure.srv (s390*-*-linux*): Update srv_regobj and srv_xmlfiles.
8016 * linux-s390-low.c: Include <elf.h>.
8017 (HWCAP_S390_HIGH_GPRS): Define if undefined.
8018 (init_registers_s390): Remove prototype.
8019 (init_registers_s390x): Likewise.
8020 (init_registers_s390_linux32): Add prototype.
8021 (init_registers_s390_linux64): Likewise.
8022 (init_registers_s390x_linux64): Likewise.
8023 (s390_num_regs_3264): New define.
8024 (s390_regmap_3264): New global variable.
8025 (s390_cannot_fetch_register): Remove obsolete check.
8026 (s390_cannot_store_register): Likewise.
8027 (s390_collect_ptrace_register): Handle upper/lower register halves.
8028 (s390_supply_ptrace_register): Likewise.
8029 (s390_fill_gregset): Update to register number changes.
8030 (s390_get_hwcap): New routine.
8031 (s390_arch_setup): Detect 32-bit process running on 64-bit system.
8032 Install appropriate regmap and register set.
8033
6e7ffa39
JB
80342010-01-01 Joel Brobecker <brobecker@adacore.com>
8035
8036 * server.c (gdbserver_version): Update copyright year to 2010.
8037 * gdbreplay.c (gdbreplay_version): Likewise.
8038
957f3f49
DE
80392009-12-28 Doug Evans <dje@google.com>
8040
8041 * linux-low.c: Delete inclusion of ansidecl.h, elf/common.h,
8042 elf/external.h. Include <elf.h> instead but only if necessary.
8043
ca5c370d
PA
80442009-12-28 Pedro Alves <pedro@codesourcery.com>
8045
8046 * linux-low.c (linux_remove_process): Remove `detaching'
8047 parameter. Don't release/detach from thread_db here.
8048 (linux_kill): Release/detach from thread_db here, ...
8049 (linux_detach): ... and here, before actually detaching.
8050 (linux_wait_1): ... and here, when a process exits.
8051 * thread-db.c (any_thread_of): New.
8052 (thread_db_free): Switch the current inferior to a thread of the
8053 passed in process.
8054
4ee62156
DE
80552009-12-21 Doug Evans <dje@google.com>
8056
d90e6a88
DE
8057 * linux-x86-low.c: Delete outdated comment about Elf32_Phdr.
8058
c5f62d5f
DE
8059 * linux-low.c (kill_lwp): Use __NR_tkill instead of SYS_tkill.
8060 Move definition of tkill_failed to ifdef __NR_tkill to avoid gcc
8061 warning ifndef __NR_tkill. Move setting of errno there too.
8062 Delete unnecessary resetting of errno after syscall.
8063 Minor comment changes to match gdb/linux-nat.c:kill_lwp.
8064
10e86dd7
DE
8065 * configure.ac: Check for dladdr.
8066 * config.in: Regenerate.
8067 * configure: Regenerate.
8068 * thread-db.c (dladdr_to_soname): Only define ifdef HAVE_DLADDR.
8069 (try_thread_db_load): Update.
8070
4ee62156
DE
8071 * linux-low.c (my_waitpid): Delete unnecessary prototype.
8072
00f515da
DE
80732009-12-18 Doug Evans <dje@google.com>
8074
e9464885
DE
8075 * event-loop.c: Include unistd.h if it exists.
8076
07d4f67e
DE
8077 * linux-low.c (my_waitpid): Move definition away from being in
8078 between linux_tracefork_child/linux_test_for_tracefork.
8079
00f515da
DE
8080 * gdb_proc_service.h (psaddr_t): Fix type.
8081 * thread-db.c (thread_db_info.td_thr_tls_get_addr_p): Fix
8082 signature to match glibc.
8083
1de1badb
DE
80842009-12-16 Doug Evans <dje@google.com>
8085
8086 * linux-low.c (linux_read_memory): Fix argument to read.
8087
aeeb81d1
PA
80882009-11-26 Pedro Alves <pedro@codesourcery.com>
8089
8090 * win32-low.c (get_child_debug_event): On EXIT_THREAD_DEBUG_EVENT
8091 events, don't leave current_inferior pointing at null.
8092
10357975
PA
80932009-11-26 Pedro Alves <pedro@codesourcery.com>
8094
8095 * win32-low.c (LOG): Delete.
8096 (OUTMSG): Output to stderr.
8097 (OUTMSG2): Conditionalize on `debug_threads' variable, instead of
8098 on compile time LOG macro.
8099 (win32_wait): Fix debug output.
8100
cf6e3471
PA
81012009-11-26 Pedro Alves <pedro@codesourcery.com>
8102
8103 * win32-low.c (win32_add_one_solib): If the dll name is
8104 "ntdll.dll", prepend the system directory to the dll path.
8105
0c85e18e
MK
81062009-11-17 Daniel Jacobowitz <dan@codesourcery.com>
8107
8108 * m68k-tdep.c (m68k_gdbarch_init): Reuse previous initialization.
8109
9ac544ce 81102009-11-17 Nathan Sidwell <nathan@codesourcery.com>
889bf7c5 8111 Vladimir Prus <vladimir@codesourcery.com>
9ac544ce
MK
8112
8113 * Makefile.in (reg-cf.o, reg-cf.c): New targets.
8114 * configure.ac: Check for __mcoldfire__ and set
8115 gdb_cv_m68k_is_coldfire.
8116 * configure.srv: Use gdb_cv_m68k_is_coldfire to select between
8117 reg-cf.o and reg-m68k.o.
8118 * configure: Regenerated.
8119
fd7dd3e6
PA
81202009-11-16 Pedro Alves <pedro@codesourcery.com>
8121
8122 * linux-low.c (linux_remove_process): Add `detaching' parameter.
8123 Pass it to thread_db_free.
8124 (linux_kill, linux_detach, linux_wait_1): Adjust to pass the
8125 proper `detaching' argument to linux_remove_process.
8126 * linux-low.h (thread_db_free): Add `detaching' parameter.
8127 * thread-db.c (thread_db_init): Pass false as `detaching' argument
8128 to thread_db_free.
8129 (thread_db_free): Add `detaching' parameter. Only
8130 call td_ta_clear_event if detaching from process.
8131
75aa492e
MK
81322009-11-12 Maxim Kuvyrkov <maxim@codesourcery.com>
8133
8134 * thread-db.c (thread_db_free): Fix typo.
8135
21e1bee4
PP
81362009-11-11 Paul Pluzhnikov <ppluzhnikov@google.com>
8137
8138 PR gdb/10838
8139 * thread-db.c (thread_db_free): Call td_ta_clear_event.
8140
8838b45e
NS
81412009-11-03 Nathan Sidwell <nathan@codesourcery.com>
8142
8143 * configure.ac (i[34567]86-*): Check if we're targetting x86-64
8144 with an i686 compiler.
8145 * configure.srv (i[34567]86-*-linux*): Pull in x86-64 handling if
8146 needed.
8147 * configure: Rebuilt.
8148
8a35fb51
SL
81492009-10-29 Sandra Loosemore <sandra@codesourcery.com>
8150
8151 PR gdb/10783
8152
8153 * server.c (handle_search_memory_1): Correct read_addr initialization
8154 in loop for searching subsequent chunks.
8155
96f15937
PP
81562009-10-29 Paul Pluzhnikov <ppluzhnikov@google.com>
8157
8158 * configure.ac: New --with-libthread-db option.
8159 * thread-db.c: Allow direct dependence on libthread_db.
8160 (thread_db_free): Adjust.
8161 * config.in: Regenerate.
8162 * configure: Likewise.
889bf7c5 8163
5f7d1694
PP
81642009-10-28 Paul Pluzhnikov <ppluzhnikov@google.com>
8165
8166 PR gdb/10757
8167 * thread-db.c (attach_thread): New function.
8168 (maybe_attach_thread): Return success/failure.
8169 (find_new_threads_callback): Adjust.
889bf7c5
PA
8170 (thread_db_find_new_threads): Loop until no new threads.
8171
88e3b899
PA
81722009-10-13 Pedro Alves <pedro@codesourcery.com>
8173
8174 * proc-service.c (ps_lgetregs): Formatting.
8175
cdbfd419
PP
81762009-10-08 Paul Pluzhnikov <ppluzhnikov@google.com>
8177
8178 * acinclude.m4: (SRV_CHECK_THREAD_DB, SRV_CHECK_TLS_GET_ADDR): Remove.
8179 * configure.ac: Adjust.
8180 * linux-low.h (struct process_info_private): Move members to struct
8181 thread_db.
8182 (thread_db_free, thread_db_handle_monitor_command): New prototype.
8183 * linux-low.c (linux_remove_process): Adjust.
8184 (linux_wait_for_event_1, linux_look_up_symbols): Likewise.
8185 * server.c (handle_query): Move code ...
8186 (handle_monitor_command): ... here. New function.
8187 * target.h (struct target_ops): New member.
8188 * thread-db.c (struct thread_db): New.
8189 (libthread_db_search_path): New variable.
8190 (thread_db_create_event, thread_db_enable_reporting)
8191 (find_one_thread, maybe_attach_thread, find_new_threads_callback)
8192 (thread_db_find_new_threads, (thread_db_get_tls_address): Adjust.
8193 (try_thread_db_load_1, dladdr_to_soname): New functions.
8194 (try_thread_db_load, thread_db_load_search): New functions.
8195 (thread_db_init): Search for libthread_db.
8196 (thread_db_free): New function.
8197 (thread_db_handle_monitor_command): Likewise.
8198 * config.in: Regenerate.
8199 * configure: Regenerate.
889bf7c5 8200
4168d2d6
UW
82012009-09-27 Ulrich Weigand <uweigand@de.ibm.com>
8202
8203 * spu-low.c (spu_kill): Wait for inferior to terminate.
8204 Call clear_inferiors.
8205 (spu_detach): Call clear_inferiors.
8206
81ecdfbb
RW
82072009-08-22 Ralf Wildenhues <Ralf.Wildenhues@gmx.de>
8208
8209 * aclocal.m4: Regenerate.
8210 * config.in: Likewise.
8211 * configure: Likewise.
8212
0b9ff2c0
UW
82132009-07-31 Ulrich Weigand <uweigand@de.ibm.com>
8214
8215 * linux-ppc-low.c (INSTR_SC, NR_spu_run): Define.
8216 (parse_spufs_run): New function.
8217 (ppc_get_pc, ppc_set_pc): Detect and handle SPU PC.
8218 (ppc_breakpoint_at): Handle SPU breakpoints.
8219
efcbbd14
UW
82202009-07-31 Ulrich Weigand <uweigand@de.ibm.com>
8221
8222 * linux-low.c: Include <sys/stat.h> and <sys/vfs.h>.
8223 (SPUFS_MAGIC): Define.
8224 (spu_enumerate_spu_ids): New function.
8225 (linux_qxfer_spu): New function.
8226 (linux_target_ops): Install linux_qxfer_spu.
8227
f4d9bade
UW
82282009-07-31 Ulrich Weigand <uweigand@de.ibm.com>
8229
8230 * configure.srv (powerpc*-*-linux*): Add powerpc-cell32l.o
8231 and powerpc-cell64l.o to srv_regobj. Add rs6000/powerpc-cell32l.xml
8232 and rs6000/powerpc-cell64l.xml to srv_xmlfiles.
8233 * Makefile.in (powerpc-cell32l.o, powerpc-cell32l.c): New rules.
8234 (powerpc-cell64l.o, powerpc-cell64l.c): Likewise.
8235 (clean): Handle powerpc-cell32l.c and powerpc-cell64l.c.
8236 * linux-ppc-low.c (PPC_FEATURE_CELL): Define.
8237 (init_registers_powerpc_cell32l): Add prototype.
8238 (init_registers_powerpc_cell64l): Likewise.
8239 (ppc_arch_setup): Detect Cell/B.E. architecture.
8240
96e946ca
RW
82412009-07-30 Ralf Wildenhues <Ralf.Wildenhues@gmx.de>
8242
8243 * Makefile.in (datarootdir): New variable.
8244
58d6951d
DJ
82452009-07-28 Daniel Jacobowitz <dan@codesourcery.com>
8246
8247 * linux-low.c (linux_write_memory): Update debugging output.
8248 * Makefile.in (clean): Add new descriptions.
8249 (arm-with-vfpv2.o, arm-with-vfpv2.c, arm-with-vfpv3.o)
8250 (arm-with-vfpv3.c, arm-with-neon.o, arm-with-neon.c): New rules.
8251 * configure.srv: Add new files for arm*-*-linux*.
8252 * linux-arm-low.c: Add new declarations.
8253 (PTRACE_GETVFPREGS, PTRACE_SETVFPREGS): Define if undefined.
8254 (arm_hwcap, HWCAP_VFP, HWCAP_IWMMXT, HWCAP_NEON, HWCAP_VFPv3)
8255 (HWCAP_VFPv3D16): New.
8256 (arm_fill_wmmxregset, arm_store_wmmxregset): Check HWCAP_IWMMXT
8257 instead of __IWMMXT__.
8258 (arm_fill_vfpregset, arm_store_vfpregset, arm_get_hwcap)
8259 (arm_arch_setup): New.
8260 (target_regsets): Remove #ifdef. Add VFP regset.
8261 (the_low_target): Use arm_arch_setup.
8262
12b42a12
DJ
82632009-07-28 Daniel Jacobowitz <dan@codesourcery.com>
8264
8265 * linux-low.c (linux_kill_one_lwp): Adjust kernel workaround to skip
8266 the main thread again.
8267
ac8c974e
AR
82682009-07-06 Aleksandar Ristovski <aristovski@qnx.com>
8269
8270 Adding Neutrino gdbserver.
8271 * configure: Regenerated.
8272 * configure.ac: Add case for srv_qnx and set LIBS accordingly.
8273 * configure.srv (i[34567]86-*-nto*): New target.
8274 * nto-low.c, nto-low.h, nto-x86-low.c: New files.
8275 * remote-utils.c [__QNX__]: Include sys/iomgr.h
8276 (nto_comctrl) [__QNX__]: New function.
8277 (enable_async_io, disable_async_io) [__QNX__]: Call nto_comctrl.
8278
4424e0c3 82792009-07-05 Danny Backx <dannybackx@users.sourceforge.net>
7437790a
PA
8280
8281 * configure.srv (i[34567]86-*-mingw32ce*): Add i386-low.o to
8282 srv_tgtobj.
8283
912cf4ba
PA
82842009-07-04 Danny Backx <dannybackx@users.sourceforge.net>
8285 Pedro Alves <pedro@codesourcery.com>
8286
8287 * win32-i386-low.c (i386_get_thread_context): Handle systems that
8288 don't support CONTEXT_EXTENDED_REGISTERS.
8289 (i386_win32_breakpoint, i386_win32_breakpoint_len): New.
8290 (the_low_target): Install them.
8291 * win32-low.c (get_child_debug_event): Handle WaitForDebugEvent
8292 failing with ERROR_PIPE_NOT_CONNECTED.
8293
aa5ca48f
DE
82942009-06-30 Doug Evans <dje@google.com>
8295 Pierre Muller <muller@ics.u-strasbg.fr>
8296
8297 Add h/w watchpoint support to x86-linux, win32-i386.
8298 * Makefile.in (SFILES): Add i386-low.c
8299 (i386_low_h): Define.
8300 (i386-low.o): Add dependencies.
8301 (linux-x86-low.o): Add i386-low.h dependency.
8302 (win32-i386-low.o): Ditto.
8303 * i386-low.c: New file.
8304 * i386-low.h: New file.
8305 * configure.srv (i[34567]86-*-cygwin*): Add i386-low.o to srv_tgtobj.
8306 (i[34567]86-*-linux*, i[34567]86-*-mingw*, x86_64-*-linux*): Ditto.
8307 * linux-low.c (linux_add_process): Initialize arch_private.
8308 (linux_remove_process): Free arch_private.
8309 (add_lwp): Initialize arch_private.
8310 (delete_lwp): Free arch_private.
8311 (linux_resume_one_lwp): Call the_low_target.prepare_to_resume if
8312 provided.
8313 * linux-low.h (process_info_private): New member arch_private.
8314 (lwp_info): New member arch_private.
8315 (linux_target_ops): New members new_process, new_thread,
8316 prepare_to_resume.
8317 (ptid_of): New macro.
8318 * linux-x86-low.c: Include stddef.h, i386-low.h.
8319 (arch_process_info): New struct.
8320 (arch_lwp_info): New struct.
8321 (x86_linux_dr_get, x86_linux_dr_set): New functions.
8322 (i386_dr_low_set_addr, i386_dr_low_set_control): New functions.
8323 (i386_dr_low_get_status): New function.
8324 (x86_insert_point, x86_remove_point): New functions.
8325 (x86_stopped_by_watchpoint): New function.
8326 (x86_stopped_data_address): New function.
8327 (x86_linux_new_process, x86_linux_new_thread): New functions.
8328 (x86_linux_prepare_to_resume): New function.
8329 (the_low_target): Add entries for insert_point, remove_point,
8330 stopped_by_watchpoint, stopped_data_address, new_process, new_thread,
8331 prepare_to_resume.
8332 * server.c (debug_hw_points): New global.
8333 (monitor_show_help): Document set debug-hw-points.
8334 (handle_query): Process "set debug-hw-points".
8335 * server.h (debug_hw_points): Declare.
8336 (paddress): Declare.
8337 * utils.c (NUMCELLS, CELLSIZE): New macros.
8338 (get_sell, xsnprintf, paddress): New functions.
8339 * win32-arm-low.c (the_low_target): Add entries for insert_point,
8340 remove_point, stopped_by_watchpoint, stopped_data_address.
8341 * win32-i386-low.c: Include i386-low.h.
8342 (debug_reg_state): Replaces dr.
8343 (i386_dr_low_set_addr, i386_dr_low_set_control): New functions.
8344 (i386_dr_low_get_status): New function.
8345 (i386_insert_point, i386_remove_point): New functions.
8346 (i386_stopped_by_watchpoint): New function.
8347 (i386_stopped_data_address): New function.
8348 (i386_initial_stuff): Update.
8349 (get_thread_context,set_thread_context,i386_thread_added): Update.
8350 (the_low_target): Add entries for insert_point,
8351 remove_point, stopped_by_watchpoint, stopped_data_address.
8352 * win32-low.c (win32_insert_watchpoint): New function.
8353 (win32_remove_watchpoint): New function.
8354 (win32_stopped_by_watchpoint): New function.
8355 (win32_stopped_data_address): New function.
8356 (win32_target_ops): Add entries for insert_watchpoint,
8357 remove_watchpoint, stopped_by_watchpoint, stopped_data_address.
8358 * win32-low.h (win32_target_ops): New members insert_point,
8359 remove_point, stopped_by_watchpoint, stopped_data_address.
8360
d993e290
PA
83612009-06-25 Pedro Alves <pedro@codesourcery.com>
8362
8363 * server.c (process_serial_event): Re-return unsupported, not
8364 error, if the type isn't recognized. Re-allow supporting only
8365 insert or remove packets. Also call require_running for
8366 breakpoints. Add missing break statement to default case. Tidy.
8367 * target.h (struct target_ops): Rename insert_watchpoint to
8368 insert_point, and remove_watchpoint to remove_point.
8369
8370 * linux-low.h (struct linux_target_ops): Likewise.
8371 * linux-low.c (linux_insert_watchpoint): Rename to ...
8372 (linux_insert_point): ... this. Adjust.
8373 (linux_remove_watchpoint): Rename to ...
8374 (linux_remove_point): ... this. Adjust.
8375 (linux_target_ops): Adjust.
8376 * linux-crisv32-low.c (cris_insert_watchpoint): Rename to ...
8377 (cris_insert_point): ... this.
8378 (cris_remove_watchpoint): Rename to ...
8379 (cris_remove_point): ... this.
8380 (the_low_target): Adjust.
8381
0f54c268
PM
83822009-06-24 Pierre Muller <muller@ics.u-strasbg.fr>
8383
8384 * server.c (handle_v_kill): Pass signal_pid to
8385 kill_inferior if multi_process is zero.
8386
c6314022
AR
83872009-06-23 Aleksandar Ristovski <aristovski@qnx.com>
8388
8389 * server.c (process_serial_event): Add support for Z0 and Z1 packet.
8390 * target.h (target_ops): Comment for *_watchpoint to make it clear
8391 the functions can get types '0' and '1'.
8392
4463ce24
AR
83932009-06-22 Aleksandar Ristovski <aristovski@qnx.com>
8394
8395 * linux-low.c (usr_fetch_inferior_registers): Remove check for regno 0.
8396 * proc-service.c (ps_lgetregs): Pass -1 to fetch all registers.
8397 * regcache.c (get_regcache): Likewise.
8398 * spu-low.c (spu_fetch_registers): Remove 0 to -1 conversion.
8399 * win32-low.c (child_fetch_inferior_registers): Remove check for
8400 regno 0.
8401
cf8fd78b
PA
84022009-06-19 Aleksandar Ristovski <aristovski@qnx.com>
8403 Pedro Alves <pedro@codesourcery.com>
8404
8405 * target.h (struct target_ops) <supports_multi_process>: New
8406 callback.
8407 (target_supports_multi_process): New.
8408 * server.c (handle_query): Even if GDB reports support, only
8409 enable multi-process if the target also supports it. Report
8410 multi-process support only if the target backend supports it.
8411 * linux-low.c (linux_supports_multi_process): New function.
8412 (linux_target_ops): Install it as target_supports_multi_process
8413 callback.
8414
47c0c975
DE
84152009-05-24 Doug Evans <dje@google.com>
8416
e09875d4
DE
8417 Global renaming of find_thread_pid to find_thread_ptid.
8418 * server.h (find_thread_ptid): Renamed from find_thread_pid.
8419 * inferiors.c (find_thread_ptid): Renamed from find_thread_pid.
8420 All callers updated.
8421
e27d73f6
DE
8422 * linux-low.c (handle_extended_wait): Use linux_resume_one_lwp
8423 to resume the newly created thread, don't call ptrace (PTRACE_CONT)
8424 directly.
8425
47c0c975
DE
8426 * linux-low.c (get_stop_pc): Print pc if debug_threads.
8427 (check_removed_breakpoint, linux_wait_for_lwp): Ditto.
8428 (linux_resume_one_lwp): Ditto.
8429
2acc282a
DE
84302009-05-23 Doug Evans <dje@google.com>
8431
8432 * linux-low.c (linux_resume_one_lwp): Change type of first arg
8433 from struct inferior_list_entry * to struct lwp_info *.
8434 All callers updated.
8435
9f1036c1
DE
84362009-05-13 Doug Evans <dje@google.com>
8437
8438 * linux-x86-low.c: Don't include assert.h.
8439 (x86_siginfo_fixup): Use fatal, not assert.
8440 (x86_arch_setup): Fix comment.
8441
d0722149
DE
84422009-05-12 Doug Evans <dje@google.com>
8443
8444 Biarch support for i386/amd64 gdbserver.
8445 * Makefile.in (SFILES): Remove linux-i386-low.c, linux-x86-64-low.c.
8446 Add linux-x86-low.c.
8447 (linux-i386-low.o, linux-x86-64-low.o): Delete.
8448 (linux-x86-low.o): Add.
8449 * linux-x86-64-low.c: Delete.
8450 * linux-i386-low.c: Delete.
8451 * linux-x86-low.c: New file.
8452 * configure.srv (i?86-linux srv_tgtobj): Replace linux-i386-low.o with
8453 linux-x86-low.o.
8454 (x86_64-linux srv_tgtobj): Replace linux-x86-64-low.o with
8455 linux-x86-low.o.
8456 (x86_64-linux srv_regobj): Add reg-i386-linux.o.
8457 * linux-low.c: Include ansidecl.h, elf/common.h, elf/external.h.
8458 (linux_child_pid_to_exec_file): New function.
8459 (elf_64_header_p, elf_64_file_p): New functions.
8460 (siginfo_fixup): New function.
8461 (linux_xfer_siginfo): New local inf_siginfo. Call siginfo_fixup to
8462 give target a chance to convert layout.
8463 * linux-low.h (linux_target_ops): New member siginfo_fixup.
8464 (linux_child_pid_to_exec_file, elf_64_file_p): Declare.
8465
fdeb2a12
DE
84662009-05-07 Doug Evans <dje@google.com>
8467
8468 * linux-low.c (regsets_fetch_inferior_registers): Fix memory leak.
8469 (regsets_store_inferior_registers): Ditto.
8470
a6dbe5df
PA
84712009-05-06 Pedro Alves <pedro@codesourcery.com>
8472
8473 PR server/10048
8474
8475 * linux-low.c (must_set_ptrace_flags): Delete.
8476 (linux_create_inferior): Set `lwp->must_set_ptrace_flags' instead
8477 of the global.
8478 (linux_attach_lwp_1): Don't set PTRACE_SETOPTIONS here. Set
8479 `lwp->must_set_ptrace_flags' instead.
ba42693b 8480 (linux_wait_for_event_1): Set ptrace options here.
a6dbe5df
PA
8481 (linux_wait_1): ... not here.
8482
5091eb23
DE
84832009-04-30 Doug Evans <dje@google.com>
8484
9f767825
DE
8485 * inferiors.c (started_inferior_callback): New function.
8486 (attached_inferior_callback): New function.
8487 (have_started_inferiors_p, have_attached_inferiors_p): New functions.
8488 * server.c (print_started_pid, print_attached_pid): New functions.
8489 (detach_or_kill_for_exit): New function.
8490 (main): Call it instead of for_each_inferior (kill_inferior_callback).
8491 * server.h (have_started_inferiors_p): Declare.
8492 (have_attached_inferiors_p): Declare.
8493
5091eb23
DE
8494 * inferiors.c (remove_process): Fix memory leak, free process.
8495 * linux-low.c (linux_remove_process): New function.
8496 (linux_kill): Call it instead of remove_process.
8497 (linux_detach, linux_wait_1): Ditto.
8498
155c8968
PA
84992009-04-19 Danny Backx <dannybackx@users.sourceforge.net>
8500
8501 * configure.srv: Add x86 Windows CE target.
8502
7fe519cb
UW
85032009-04-03 Ulrich Weigand <uweigand@de.ibm.com>
8504
8505 * inferiors.c (get_thread_process): Make global.
8506 * server.h (get_thread_process): Add prototype.
8507 * thread-db.c (find_one_thread): Use get_thread_process
8508 instead of current_process.
8509 (thread_db_get_tls_address): Do not crash if called when
8510 thread layer is not yet initialized.
8511
5472f405
UW
85122009-04-03 Ulrich Weigand <uweigand@de.ibm.com>
8513
8514 * remote-utils.c (prepare_resume_reply): Null-terminate packet.
8515 * spu-low.c (current_tid): Rename to ...
8516 (current_ptid): ... this.
8517 (fetch_ppc_register, fetch_ppc_memory, store_ppc_memory,
8518 spu_proc_xfer_spu, spu_resume, spu_request_interrupt): Use
8519 ptid_get_lwp (current_ptid) instead of current_tid.
8520 (spu_kill, spu_detach, spu_join, spu_wait): Use pid argument
8521 instead of current_tid. Use find_process_pid to verify pid
8522 argument is valid. Pass proper argument to remove_process.
8523 (spu_thread_alive): Compare current_ptid instead of current_tid.
8524 (spu_resume): Likewise.
8525
55ac2b99
PA
85262009-04-02 Pedro Alves <pedro@codesourcery.com>
8527
8528 * linux-low.c (usr_store_inferior_registers): Declare local `pid'
8529 variable.
8530
95954743
PA
85312009-04-01 Pedro Alves <pedro@codesourcery.com>
8532
8533 Implement the multiprocess extensions, and add linux multiprocess
8534 support.
8535
8536 * server.h (ULONGEST): Declare.
8537 (struct ptid, ptid_t): New.
8538 (minus_one_ptid, null_ptid): Declare.
8539 (ptid_build, pid_to_ptid, ptid_get_pid, ptid_get_lwp)
8540 (ptid_get_tid, ptid_equal, ptid_is_pid): Declare.
8541 (struct inferior_list_entry): Change `id' type from unsigned from
8542 to ptid_t.
8543 (struct sym_cache, struct breakpoint, struct
8544 process_info_private): Forward declare.
8545 (struct process_info): Declare.
8546 (current_process): Declare.
8547 (all_processes): Declare.
8548 (initialize_inferiors): Declare.
8549 (add_thread): Adjust to use ptid_t.
8550 (thread_id_to_gdb_id, thread_to_gdb_id, gdb_id_to_thread_id): Ditto.
8551 (add_process, remove_process, find_thread_pid): Declare.
8552 (find_inferior_id): Adjust to use ptid_t.
8553 (cont_thread, general_thread, step_thread): Change type to ptid_t.
8554 (multi_process): Declare.
8555 (push_event): Adjust to use ptid_t.
8556 (read_ptid, write_ptid): Declare.
8557 (prepare_resume_reply): Adjust to use ptid_t.
8558 (clear_symbol_cache): Declare.
8559 * inferiors.c (all_processes): New.
8560 (null_ptid, minus_one_ptid): New.
8561 (ptid_build, pid_to_ptid, ptid_get_pid, ptid_get_lwp)
8562 (ptid_get_tid, ptid_equal, ptid_is_pid): New.
8563 (add_thread): Change unsigned long to ptid. Remove gdb_id
8564 parameter. Adjust.
8565 (thread_id_to_gdb_id, thread_to_gdb_id): Change unsigned long to ptid.
8566 (gdb_id_to_thread): Rename to ...
8567 (find_thread_pid): ... this. Change unsigned long to ptid.
8568 (gdb_id_to_thread_id, find_inferior_id): Change unsigned long to ptid.
8569 (loaded_dll, pull_pid_from_list): Adjust.
8570 (add_process, remove_process, find_process_pid)
8571 (get_thread_process, current_process, initialize_inferiors): New.
8572 * target.h (struct thread_resume) <thread>: Change type to ptid_t.
8573 (struct target_waitstatus) <related_pid>: Ditto.
8574 (struct target_ops) <kill, detach>: Add `pid' argument. Change
8575 return type to int.
8576 (struct target_ops) <join>: Add `pid' argument.
8577 (struct target_ops) <thread_alive>: Change pid's type to ptid_t.
8578 (struct target_ops) <wait>: Add `ptid' field. Change return type
8579 to ptid.
8580 (kill_inferior, detach_inferior, join_inferior): Add `pid' argument.
8581 (mywait): Add `ptid' argument. Change return type to ptid_t.
8582 (target_pid_to_str): Declare.
8583 * target.c (set_desired_inferior): Adjust to use ptids.
8584 (mywait): Add new `ptid' argument. Adjust.
8585 (target_pid_to_str): New.
8586 * mem-break.h (free_all_breakpoints): Declare.
8587 * mem-break.c (breakpoints): Delelete.
8588 (set_breakpoint_at, delete_breakpoint, find_breakpoint_at)
8589 (check_mem_read, check_mem_write, delete_all_breakpoints): Adjust
8590 to use per-process breakpoint list.
8591 (free_all_breakpoints): New.
8592 * remote-utils.c (struct sym_cache) <name>: Drop `const'.
8593 (symbol_cache, all_symbols_looked_up): Delete.
8594 (hexchars): New.
8595 (ishex, unpack_varlen_hex, write_ptid, hex_or_minus_one,
8596 read_ptid): New.
8597 (prepare_resume_reply): Change ptid argument's type from unsigned
8598 long to ptid_t. Adjust. Implement W;process and X;process.
8599 (free_sym_cache, clear_symbol_cache): New.
8600 (look_up_one_symbol): Adjust to per-process symbol cache. *
8601 * server.c (cont_thread, general_thread, step_thread): Change type
8602 to ptid_t.
8603 (attached): Delete.
8604 (multi_process): New.
8605 (last_ptid): Change type to ptid_t.
8606 (struct vstop_notif) <ptid>: Change type to ptid_t.
8607 (queue_stop_reply, push_event): Change `ptid' argument's type to
8608 ptid_t.
8609 (discard_queued_stop_replies): Add `pid' argument.
8610 (start_inferior): Adjust to use ptids. Adjust to mywait interface
8611 changes. Don't reference the `attached' global.
8612 (attach_inferior): Adjust to mywait interface changes.
8613 (handle_query): Adjust to use ptids. Parse GDB's qSupported
8614 features. Handle and report "multiprocess+". Handle
8615 "qAttached:PID".
8616 (handle_v_cont): Adjust to use ptids. Adjust to mywait interface
8617 changes.
8618 (handle_v_kill): New.
8619 (handle_v_stopped): Adjust to use target_pid_to_str.
8620 (handle_v_requests): Allow multiple attaches and runs when
8621 multiprocess extensions are in effect. Handle "vKill".
8622 (myresume): Adjust to use ptids.
8623 (queue_stop_reply_callback): Add `arg' parameter. Handle it.
8624 (handle_status): Adjust to discard_queued_stop_replies interface
8625 change.
8626 (first_thread_of, kill_inferior_callback)
8627 (detach_or_kill_inferior_callback, join_inferiors_callback): New.
8628 (main): Call initialize_inferiors. Adjust to use ptids, killing
8629 and detaching from all inferiors. Handle multiprocess packet
8630 variants.
8631 * linux-low.h: Include gdb_proc_service.h.
8632 (struct process_info_private): New.
8633 (struct linux_target_ops) <pid_of>: Use ptid_get_pid.
8634 <lwpid_of>: Use ptid_get_lwp.
8635 (get_lwp_thread): Adjust.
8636 (struct lwp_info): Add `dead' member.
8637 (find_lwp_pid): Declare.
8638 * linux-low.c (thread_db_active): Delete.
8639 (new_inferior): Adjust comment.
8640 (inferior_pid): Delete.
8641 (linux_add_process): New.
8642 (handle_extended_wait): Adjust.
8643 (add_lwp): Change unsigned long to ptid.
8644 (linux_create_inferior): Add process to processes table. Adjust
8645 to use ptids. Don't set new_inferior here.
8646 (linux_attach_lwp): Rename to ...
8647 (linux_attach_lwp_1): ... this. Add `initial' argument. Handle
8648 it. Adjust to use ptids.
8649 (linux_attach_lwp): New.
8650 (linux_attach): Add process to processes table. Don't set
8651 new_inferior here.
8652 (struct counter): New.
8653 (second_thread_of_pid_p, last_thread_of_process_p): New.
8654 (linux_kill_one_lwp): Add `args' parameter. Handle it. Adjust to
8655 multiple processes.
8656 (linux_kill): Add `pid' argument. Handle it. Adjust to multiple
8657 processes. Remove process from process table.
8658 (linux_detach_one_lwp): Add `args' parameter. Handle it. Adjust
8659 to multiple processes.
8660 (any_thread_of): New.
8661 (linux_detach): Add `pid' argument, and handle it. Remove process
8662 from processes table.
8663 (linux_join): Add `pid' argument. Handle it.
8664 (linux_thread_alive): Change unsighed long argument to ptid_t.
8665 Consider dead lwps as not being alive.
8666 (status_pending_p): Rename `dummy' argument to `arg'. Filter out
8667 threads we're not interested in.
8668 (same_lwp, find_lwp_pid): New.
8669 (linux_wait_for_lwp): Change `pid' argument's type from int to
8670 ptid_t. Adjust.
8671 (linux_wait_for_event): Rename to ...
8672 (linux_wait_for_event_1): ... this. Change `pid' argument's type
8673 from int to ptid_t. Adjust.
8674 (linux_wait_for_event): New.
8675 (linux_wait_1): Add `ptid' argument. Change return type to
8676 ptid_t. Adjust. Use last_thread_of_process_p. Remove processes
8677 that exit from the process table.
8678 (linux_wait): Add `ptid' argument. Change return type to ptid_t.
8679 Adjust.
8680 (mark_lwp_dead): New.
8681 (wait_for_sigstop): Adjust to use ptids. If a process exits while
8682 stopping all threads, mark its main lwp as dead.
8683 (linux_set_resume_request, linux_resume_one_thread): Adjust to use
8684 ptids.
8685 (fetch_register, usr_store_inferior_registers)
8686 (regsets_fetch_inferior_registers)
8687 (regsets_store_inferior_registers, linux_read_memory)
8688 (linux_write_memory): Inline `inferior_pid'.
8689 (linux_look_up_symbols): Adjust to use per-process
8690 `thread_db_active'.
8691 (linux_request_interrupt): Adjust to use ptids.
8692 (linux_read_auxv): Inline `inferior_pid'.
8693 (initialize_low): Don't reference thread_db_active.
8694 * gdb_proc_service.h (struct ps_prochandle) <pid>: Remove.
8695 * proc-service.c (ps_lgetregs): Use find_lwp_pid.
8696 (ps_getpid): Return the pid of the current inferior.
8697 * thread-db.c (proc_handle, thread_agent): Delete.
8698 (thread_db_create_event, thread_db_enable_reporting): Adjust to
8699 per-process data.
8700 (find_one_thread): Change argument type to ptid_t. Adjust to
8701 per-process data.
8702 (maybe_attach_thread): Adjust to per-process data and ptids.
8703 (thread_db_find_new_threads): Ditto.
8704 (thread_db_init): Ditto.
8705 * spu-low.c (spu_create_inferior, spu_attach): Add process to
8706 processes table. Adjust to use ptids.
8707 (spu_kill, spu_detach): Adjust interface. Remove process from
8708 processes table.
8709 (spu_join, spu_thread_alive): Adjust interface.
8710 (spu_wait): Adjust interface. Remove process from processes
8711 table. Adjust to use ptids.
8712 * win32-low.c (current_inferior_tid): Delete.
8713 (current_inferior_ptid): New.
8714 (debug_event_ptid): New.
8715 (thread_rec): Take a ptid. Adjust.
8716 (child_add_thread): Add `pid' argument. Adjust to use ptids.
8717 (child_delete_thread): Ditto.
8718 (do_initial_child_stuff): Add `attached' argument. Add process to
8719 processes table.
8720 (child_fetch_inferior_registers, child_store_inferior_registers):
8721 Adjust.
8722 (win32_create_inferior): Pass 0 to do_initial_child_stuff.
8723 (win32_attach): Pass 1 to do_initial_child_stuff.
8724 (win32_kill): Adjust interface. Remove process from processes
8725 table.
8726 (win32_detach): Ditto.
8727 (win32_join): Adjust interface.
8728 (win32_thread_alive): Take a ptid.
8729 (win32_resume): Adjust to use ptids.
8730 (get_child_debug_event): Ditto.
8731 (win32_wait): Adjust interface. Remove exiting process from
8732 processes table.
8733
bd99dc85
PA
87342009-04-01 Pedro Alves <pedro@codesourcery.com>
8735
8736 Non-stop mode support.
8737
8738 * server.h (non_stop): Declare.
8739 (gdb_client_data, handler_func): Declare.
8740 (delete_file_handler, add_file_handler, start_event_loop):
8741 Declare.
8742 (handle_serial_event, handle_target_event, push_event)
8743 (putpkt_notif): Declare.
8744 * target.h (enum resume_kind): New.
8745 (struct thread_resume): Replace `step' field by `kind' field.
8746 (TARGET_WNOHANG): Define.
8747 (struct target_ops) <wait>: Add `options' argument.
8748 <supports_non_stop, async, start_non_stop>: New fields.
8749 (target_supports_non_stop, target_async): New.
8750 (start_non_stop): Declare.
8751 (mywait): Add `options' argument.
8752 * target.c (mywait): Add `options' argument. Print child exit
8753 notifications here.
8754 (start_non_stop): New.
8755 * server.c (non_stop, own_buf, mem_buf): New globals.
8756 (struct vstop_notif): New.
8757 (notif_queue): New global.
8758 (queue_stop_reply, push_event, discard_queued_stop_replies)
8759 (send_next_stop_reply): New.
8760 (start_inferior): Adjust to use resume_kind. Adjust to mywait
8761 interface changes.
8762 (attach_inferior): In non-stop mode, don't wait for the target
8763 here.
8764 (handle_general_set): Handle QNonStop.
8765 (handle_query): When handling qC, return the current general
8766 thread, instead of the first thread of the list.
8767 (handle_query): If the backend supports non-stop mode, include
8768 QNonStop+ in the qSupported query response.
8769 (handle_v_cont): Adjust to use resume_kind. Handle resume_stop
8770 and non-stop mode.
8771 (handle_v_attach, handle_v_run): Handle non-stop mode.
8772 (handle_v_stopped): New.
8773 (handle_v_requests): Report support for vCont;t. Handle vStopped.
8774 (myresume): Adjust to use resume_kind. Handle non-stop.
8775 (queue_stop_reply_callback): New.
8776 (handle_status): Handle non-stop mode.
8777 (main): Clear non_stop flag on reconnection. Use the event-loop.
8778 Refactor serial protocol handling from here ...
8779 (process_serial_event): ... to this new function. When GDB
8780 selects any thread, select one here. In non-stop mode, wait until
8781 GDB acks all pending events before exiting.
8782 (handle_serial_event, handle_target_event): New.
8783 * remote-utils.c (remote_open): Install remote_desc in the event
8784 loop.
8785 (remote_close): Remove remote_desc from the event loop.
8786 (putpkt_binary): Rename to...
8787 (putpkt_binary_1): ... this. Add `is_notic' argument. Handle it.
8788 (putpkt_binary): New as wrapper around putpkt_binary_1.
8789 (putpkt_notif): New.
8790 (prepare_resume_reply): In non-stop mode, don't change the
8791 general_thread.
8792 * event-loop.c: New.
8793 * Makefile.in (OBJ): Add event-loop.o.
8794 (event-loop.o): New rule.
8795
8796 * linux-low.h (pid_of): Moved here.
8797 (lwpid_of): New.
8798 (get_lwp_thread): Use lwpid_of.
8799 (struct lwp_info): Delete `lwpid' field. Add `suspended' field.
8800 * linux-low.c (pid_of): Delete.
8801 (inferior_pid): Use lwpid_of.
8802 (linux_event_pipe): New.
8803 (target_is_async_p): New.
8804 (delete_lwp): New.
8805 (handle_extended_wait): Use lwpid_of.
8806 (add_lwp): Don't set lwpid field.
8807 (linux_attach_lwp): Adjust debug output. Use lwpid_of.
8808 (linux_kill_one_lwp): If killing a running lwp, stop it first.
8809 Use lwpid_of. Adjust to linux_wait_for_event interface changes.
8810 (linux_detach_one_lwp): If detaching from a running lwp, stop it
8811 first. Adjust to linux_wait_for_event interface changes. Use
8812 lwpid_of.
8813 (linux_detach): Don't delete the main lwp here.
8814 (linux_join): Use my_waitpid. Avoid signal_pid. Use lwpid_of.
8815 (status_pending_p): Don't consider explicitly suspended lwps.
8816 (linux_wait_for_lwp): Take an integer pid instead of a lwp_info
8817 pointer. Add OPTIONS argument. Change return type to int. Use
8818 my_waitpid instead of sleeping. Handle WNOHANG. Use lwpid_of.
8819 (linux_wait_for_event): Take an integer pid instead of a lwp_info
8820 pointer. Add status pointer argument. Return a pid instead of a
8821 status. Use lwpid_of. Adjust to linux_wait_for_lwp interface
8822 changes. In non-stop mode, don't switch to a random thread.
8823 (linux_wait): Rename to...
8824 (linux_wait_1): ... this. Add target_options argument, and handle
8825 it. Adjust to use resume_kind. Use lwpid_of. In non-stop mode,
8826 don't handle the continue thread. Handle TARGET_WNOHANG. Merge
8827 clean exit and signal exit code. Don't stop all threads in
8828 non-stop mode. In all-stop mode, only stop all threads when
8829 reporting a stop to GDB. Handle explicit thread stop requests.
8830 (async_file_flush, async_file_mark): New.
8831 (linux_wait): New.
8832 (send_sigstop): Use lwpid_of.
8833 (wait_for_sigstop): Use lwpid_of. Adjust to linux_wait_for_event
8834 interface changes. In non-stop mode, don't switch to a random
8835 thread.
8836 (linux_resume_one_lwp): Use lwpid_of.
8837 (linux_continue_one_thread, linux_queue_one_thread): Merge into ...
8838 (linux_resume_one_thread): ... this. Handle resume_stop. In
8839 non-stop mode, don't look for pending flag in all threads.
8840 (resume_status_pending_p): Don't consider explicitly suspended
8841 threads.
8842 (my_waitpid): Reimplement. Emulate __WALL.
8843 (linux_request_interrupt, linux_read_offsets, linux_xfer_siginfo):
8844 Use lwpid_of.
8845 (sigchld_handler, linux_supports_non_stop, linux_async)
8846 (linux_start_non_stop): New.
8847 (linux_target_ops): Register linux_supports_non_stop, linux_async
8848 and linux_start_non_stop.
8849 (initialize_low): Install SIGCHLD handler.
8850 * thread-db.c (thread_db_create_event, find_one_thread)
8851 (thread_db_get_tls_address): Use lwpid_of.
8852 * win32-low.c (win32_detach): Adjust to use resume_kind.
8853 (win32_wait): Add `options' argument.
8854 * spu-low.c (spu_resume): Adjust to use resume_kind.
8855 (spu_wait): Add `options' argument.
8856
5b1c542e
PA
88572009-04-01 Pedro Alves <pedro@codesourcery.com>
8858
8859 Decouple target code from remote protocol.
8860
8861 * target.h (enum target_waitkind): New.
8862 (struct target_waitstatus): New.
8863 (struct target_ops) <wait>: Return an unsigned long. Take a
8864 target_waitstatus pointer instead of a char pointer.
8865 (mywait): Likewise.
8866 * target.c (mywait): Change prototype to return an unsigned long.
8867 Take a target_waitstatus pointer instead of a char pointer. Adjust.
8868 * server.h (thread_from_wait, old_thread_from_wait): Delete
8869 declarations.
8870 (prepare_resume_reply): Change prototype to take a
8871 target_waitstatus.
8872 * server.c (thread_from_wait, old_thread_from_wait): Delete.
8873 (last_status, last_ptid): New.
8874 (start_inferior): Remove "statusptr" argument. Adjust. Return a
8875 pid instead of a signal.
8876 (attach_inferior): Remove "status" and "signal" parameters.
8877 Adjust.
8878 (handle_query): For qGetTLSAddr, parse the thread id with strtol,
8879 not as an address.
8880 (handle_v_cont, handle_v_attach, handle_v_run, handle_v_kill)
8881 (handle_v_requests, myresume): Remove "status" and "signal"
8882 parameters. Adjust.
8883 (handle_status): New.
8884 (main): Delete local `status'. Adjust.
8885 * remote-utils.c: Include target.h.
8886 (prepare_resume_reply): Change prototype to take a
8887 target_waitstatus. Adjust.
8888
8889 * linux-low.c (linux_wait): Adjust to new target_ops->wait
8890 interface.
8891 * spu-low.c (spu_wait): Adjust.
8892 * win32-low.c (enum target_waitkind, struct target_waitstatus):
8893 Delete.
8894 (win32_wait): Adjust.
8895
2bd7c093
PA
88962009-04-01 Pedro Alves <pedro@codesourcery.com>
8897
8898 * target.h (struct thread_resume): Delete leave_stopped member.
8899 (struct target_ops): Add a `n' argument to the `resume' callback.
8900 * server.c (start_inferior): Adjust.
8901 (handle_v_cont, myresume): Adjust.
8902 * linux-low.c (check_removed_breakpoint): Adjust to resume
8903 interface change, and to removed leave_stopped field.
8904 (resume_ptr): Delete.
8905 (struct thread_resume_array): New.
8906 (linux_set_resume_request): Add new `arg' parameter. Adjust to
8907 resume interface change.
8908 (linux_continue_one_thread, linux_queue_one_thread)
8909 (resume_status_pending_p): Check if the resume field is NULL
8910 instead of checking the leave_stopped member.
8911 (linux_resume): Adjust to the target resume interface change.
8912 * spu-low.c (spu_resume): Adjust to the target resume interface
8913 change.
8914 * win32-low.c (win32_detach, win32_resume): Ditto.
8915
c35fafde
PA
89162009-04-01 Pedro Alves <pedro@codesourcery.com>
8917
8918 * linux-low.c (linux_wait_for_event): Don't clear the `stepping'
8919 flag.
8920 (wait_for_sigstop): Don't leave a finished single-step SIGTRAP
8921 pending.
8922 (linux_continue_one_thread): Only preserve the stepping flag if
8923 there's a pending breakpoint.
8924
0a59d50b
PA
89252009-03-31 Pedro Alves <pedro@codesourcery.com>
8926
8927 * server.c (main): After the inferior having exited, call
8928 remote_close before exiting gdbserver.
8929
f04c6d38
TJB
89302009-03-25 Thiago Jung Bauermann <bauerman@br.ibm.com>
8931
8932 Fix size of FPSCR in Power 7 processors.
8933 * linux-ppc-low.c (PPC_FEATURE_ARCH_2_05): Remove #define.
8934 (PPC_FEATURE_HAS_DFP): New #define.
8935 (ppc_arch_setup): Check for DFP feature instead of ISA 2.05 to decide on
8936 size of the FPSCR.
8937
78e5cee6
PA
89382009-03-23 Pedro Alves <pedro@codesourcery.com>
8939
8940 * server.c (handle_query) Whitespace and formatting.
8941
1b3f6016
PA
89422009-03-22 Pedro Alves <pedro@codesourcery.com>
8943
8944 * i387-fp.c, linux-arm-low.c, linux-cris-low.c,
8945 linux-crisv32-low.c, linux-i386-low.c, linux-low.c,
8946 linux-mips-low.c, linux-s390-low.c, linux-sparc-low.c,
8947 linux-x86-64-low.c, linux-xtensa-low.c, proc-service.c,
8948 regcache.c, remote-utils.c, server.c, spu-low.c, target.h,
8949 thread-db.c, win32-low.c, xtensa-xtregs.c, gdbreplay.c,
8950 Makefile.in, configure.ac: Fix whitespace throughout.
8951 * configure: Regenerate.
8952
a07b2135
PA
89532009-03-22 Pedro Alves <pedro@codesourcery.com>
8954
8955 * inferiors.c (find_inferior): Make it safe for the callback
8956 function to delete the currently iterated inferior.
8957
67cc2626
PA
89582009-03-22 Pedro Alves <pedro@codesourcery.com>
8959
8960 * Makefile.in (linuw_low_h): Move higher.
8961 (thread-db.o): Depend on $(linux_low_h).
8962
54a0b537
PA
89632009-03-17 Pedro Alves <pedro@codesourcery.com>
8964
8965 Rename "process" to "lwp" throughout.
8966
8967 * linux-low.c (all_processes): Rename to...
8968 (all_lwps): ... this.
8969 (inferior_pid, handle_extended_wait, get_stop_pc): Adjust.
8970 (add_process): Rename to ...
8971 (add_lwp): ... this. Adjust.
8972 (linux_create_inferior): Adjust.
8973 (linux_attach_lwp): Adjust.
8974 (linux_attach): Adjust.
8975 (linux_kill_one_process): Rename to ...
8976 (linux_kill_one_lwp): ... this. Adjust.
8977 (linux_kill): Adjust.
8978 (linux_detach_one_process): Rename to ...
8979 (linux_detach_one_lwp): ... this. Adjust.
8980 (linux_detach): Adjust.
8981 (check_removed_breakpoint): Adjust.
8982 (status_pending_p): Adjust.
8983 (linux_wait_for_process): Rename to ...
8984 (linux_wait_for_lwp): ... this. Adjust.
8985 (linux_wait_for_event): Adjust.
8986 (send_sigstop): Adjust.
8987 (wait_for_sigstop): Adjust.
8988 (stop_all_processes): Rename to ...
8989 (stop_all_lwps): ... this.
8990 (linux_resume_one_process): Rename to ...
8991 (linux_resume_one_lwp): ... this. Adjust.
8992 (linux_set_resume_request, linux_continue_one_thread)
8993 (linux_queue_one_thread, resume_status_pending_p)
8994 (usr_store_inferior_registers, regsets_store_inferior_registers)
8995 (linux_request_interrupt, linux_read_offsets, linux_xfer_siginfo):
8996 Adjust.
8997 * linux-low.h (get_process): Rename to ...
8998 (get_lwp): ... this. Adjust.
8999 (get_thread_process): Rename to ...
9000 (get_thread_lwp): ... this. Adjust.
9001 (get_process_thread): Rename to ...
9002 (get_lwp_thread): ... this. Adjust.
9003 (struct process_info): Rename to ...
9004 (struct lwp_info): ... this.
9005 (all_processes): Rename to ...
9006 (all_lwps): ... this.
9007 * proc-service.c (ps_lgetregs): Adjust.
9008 * thread-db.c (thread_db_create_event, find_one_thread)
9009 (maybe_attach_thread, thread_db_get_tls_address): Adjust.
9010
0b16c5cf
PA
90112009-03-14 Pedro Alves <pedro@codesourcery.com>
9012
9013 * server.c (handle_query): Handle "qAttached".
9014
32de4b9d
NS
90152009-03-13 Nathan Sidwell <nathan@codesourcery.com>
9016
9017 * Makefile.in, hostio-errno.c, errno.c, xtensa-xtregs.c: Change to
9018 GPLv3, update license URL.
9019
2aecd87f
DE
90202009-03-01 Doug Evans <dje@google.com>
9021
93efd302 9022 * Makefile.in (INCLUDE_CFLAGS): Add -I$(srcdir)/../common.
2aecd87f
DE
9023 (server_h): Add gdb_signals.h.
9024 (signals.o): Update.
9025 * server.h (target_signal_from_host,target_signal_to_host_p)
9026 (target_signal_to_host,target_signal_to_name): Moved to gdb_signals.h.
9027
86b1f9c5
PM
90282009-02-14 Pierre Muller <muller@ics.u-strasbg.fr>
9029
9030 * remote-utils.c (getpkt): Also generate remote-debug
9031 information if noack_mode is set.
9032
4aa995e1
PA
90332009-02-06 Pedro Alves <pedro@codesourcery.com>
9034
9035 * server.c (handle_query): Report qXfer:siginfo:read and
9036 qXfer:siginfo:write as supported and handle them.
9037 * target.h (struct target_ops) <qxfer_siginfo>: New field.
9038 * linux-low.c (linux_xfer_siginfo): New.
9039 (linux_target_ops): Set it.
9040
62709adf
PA
90412009-01-26 Pedro Alves <pedro@codesourcery.com>
9042
9043 * server.c (gdbserver_usage): Mention --remote-debug.
9044 (main): Accept '--remote-debug' switch.
9045
aef93bd7
DE
90462009-01-18 Doug Evans <dje@google.com>
9047
9048 * regcache.c (new_register_cache): No need to check result of xcalloc.
9049 * server.c (handle_search_memory): Back out calls to xmalloc,
9050 result is checked and error is returned to user upon failure.
9051 (handle_query): Ditto. Add more checks for result of malloc.
9052 (handle_v_cont): Check result of malloc, report error back to
9053 user upon failure.
9054 (handle_v_run): Ditto. Call freeargv.
9055 * server.h (freeargv): Declare.
9056 * utils.c (freeargv): New fn.
9057
54363045
DE
90582009-01-15 Doug Evans <dje@google.com>
9059
f626972c
DE
9060 * gdbreplay.c (perror_with_name): Make arg const char *.
9061 * server.h (target_signal_to_name): Make return type const char *.
0842e787 9062 * thread-db.c (thread_db_err_str): Make return type const char *.
f626972c 9063 * utils.c (perror_with_name): Make arg const char *.
54363045 9064
18aae699
PA
90652009-01-14 Pedro Alves <pedro@codesourcery.com>
9066
9067 * win32-low.c (get_child_debug_event): Issue a final DBG_CONTINUE
9068 when handling a EXIT_PROCESS_DEBUG_EVENT.
9069
ff703abe
JB
90702009-01-06 Joel Brobecker <brobecker@adacore.com>
9071
9072 * gdbreplay.c (gdbreplay_version): Update copyright year.
9073 * server.c (gdbserver_version): Likewise.
9074
f21cc1a2 90752009-01-05 Doug Evans <dje@google.com>
0e21c1ec
DE
9076
9077 * linux-low.c (linux_attach_lwp): Add some comments/fixmes.
f21cc1a2 9078 (handle_extended_wait): Improve comment.
0e21c1ec 9079
bca929d3
DE
90802008-12-13 Doug Evans <dje@google.com>
9081
9082 * utils.c (xmalloc,xcalloc,xstrdup): New fns.
9083 * server.h (ATTR_MALLOC): New macro.
9084 (xmalloc,xcalloc,xstrdup): Declare.
9085 * hostio.c: Replace malloc,calloc,strdup with xmalloc,xcalloc,xstrdup.
9086 * inferiors.c: Ditto.
9087 * linux-low.c: Ditto.
9088 * mem-break.c: Ditto.
9089 * regcache.c: Ditto.
9090 * remote-utils.c: Ditto.
9091 * server.c: Ditto.
9092 * target.c: Ditto.
9093 * win32-low.c: Ditto.
9094
97438e3f
DE
90952008-12-12 Doug Evans <dje@google.com>
9096
896c7fbb
DE
9097 * linux-low.c (linux_wait_for_process): Don't clobber current_inferior
9098 in debugging printf.
9099
97438e3f
DE
9100 * linux-low.c (handle_extended_wait): Simplify, use my_waitpid.
9101
e3b886f8
DE
91022008-12-09 Doug Evans <dje@google.com>
9103
9104 * linux-low.h (struct process_info): Delete member tid, unused.
9105 * thread-db.c (find_one_thread): Update.
9106 (maybe_attach_thread): Update.
9107
07e059b5
VP
91082008-12-02 Pedro Alves <pedro@codesourcery.com>
9109
889bf7c5
PA
9110 * target.h (struct target_ops): Add qxfer_osdata member.
9111 * linux-low.c: Include ctype.h and pwd.h and sys/types.h
9112 and dirent.h.
9113 (linux_qxfer_osdata): New functions.
9114 (linux_target_ops): Register linux_qxfer_osdata as qxfer_osdata
9115 callback.
9116 * server.c (handle_query): Handle "qXfer:osdata:read:".
9117 * remote-utils.c (buffer_grow, buffer_free, buffer_init, buffer_finish)
9118 (buffer_xml_printf): New functions.
9119 * server.h (struct buffer): New.
9120 (buffer_grow_str, buffer_grow_str0): New macros.
9121 (buffer_grow, buffer_free, buffer_init, buffer_finish)
9122 (buffer_xml_printf): Declare.
07e059b5 9123
4cab47ab
DE
91242008-11-24 Doug Evans <dje@google.com>
9125
9126 * Makefile.in (VERSION,DIST,LINT,LINTFLAGS): Delete, unused.
9127
f142445f
DJ
91282008-11-24 Daniel Jacobowitz <dan@codesourcery.com>
9129
9130 * server.c (handle_v_run): Always use the supplied argument list.
9131
d0107bb6 91322008-11-19 Bob Wilson <bob.wilson@acm.org>
889bf7c5 9133
d0107bb6
BW
9134 * xtensa-xtregs.c (XTENSA_ELF_XTREG_SIZE): Change to 4.
9135 (xtensa_regmap_table): Add entry for scompare1.
889bf7c5 9136
2c4ad781
TJB
91372008-11-18 Thiago Jung Bauermann <bauerman@br.ibm.com>
9138
9139 * Makefile.in (powerpc-isa205-32l.o, powerpc-isa205-32l.c,
9140 powerpc-isa205-altivec32l.o, powerpc-isa205-altivec32l.c,
9141 powerpc-isa205-vsx32l.o, powerpc-isa205-vsx32l.c,
9142 powerpc-isa205-64l.o, powerpc-isa205-64l.c,
9143 powerpc-isa205-altivec64l.o, powerpc-isa205-altivec64l.c,
9144 powerpc-isa205-vsx64l.o, powerpc-isa205-vsx64l.c): New targets.
9145 * configure.srv (powerpc*-*-linux*): Add ISA 2.05 object files and
9146 XML target descriptions.
9147 * linux-ppc-low.c (ppc_arch_setup): Init registers with 64-bit FPSCR
9148 when inferior is running on an ISA 2.05 or later processor. Add
9149 special case to return offset for full 64-bit slot of FPSCR when
9150 in 32-bits.
9151
dfb64f85
DJ
91522008-11-14 Daniel Gutson <dgutson@codesourcery.com>
9153
9154 * Makefile.in (SFILES, clean): Added sparc64 files.
9155 (reg-sparc64.o, reg-sparc64.c): New.
9156 * configure.srv (sparc*-*-linux*): New configuration.
9157 * linux-low.c (regsets_fetch_inferior_registers): Swap ptrace
9158 syscall arguments for SPARC.
9159 (regsets_store_inferior_registers): Likewise.
9160 * linux-sparc-low.c: New file.
9161
66b6e1dd
DE
91622008-10-21 Doug Evans <dje@google.com>
9163
9164 * Makefile.in (BFD_DIR,BFD,BFD_SRC,BFD_CFLAGS): Delete.
9165 (READLINE_DIR,READLINE_DEP): Delete.
9166 (INTERNAL_CFLAGS): Update.
9167 (LINTFLAGS): Update.
9168
9b710a42
PA
91692008-10-10 Pedro Alves <pedro@codesourcery.com>
9170
9171 * server.c (handle_v_run): If GDB didn't specify an argv, use the
9172 whole argv from the last run, not just argv[0].
9173
5822d809
PA
91742008-09-08 Pedro Alves <pedro@codesourcery.com>
9175
9176 * regcache.c (new_register_cache): Return NULL if the register
9177 cache size isn't known yet.
9178 (free_register_cache): Avoid dereferencing a NULL regcache.
9179
74aac56f
DJ
91802008-09-04 Daniel Jacobowitz <dan@codesourcery.com>
9181
9182 * configure.srv: Merge MIPS and MIPS64.
9183
400b20f5
MR
91842008-08-24 Maciej W. Rozycki <macro@linux-mips.org>
9185
9186 * Makefile.in (uninstall): Apply $(EXEEXT) too.
9187
677c5bb1
LM
91882008-08-18 Luis Machado <luisgpm@br.ibm.com>
9189
9190 * Makefile.in: Add required vsx dependencies.
9191
9192 * linux-ppc-low: Define PPC_FEATURE_HAS_VSX.
9193 Declare init_registers_powerpc_vsx32l.
9194 Declare init_registers_powerpc_vsx64l.
9195 Define PTRACE_GETVSXREGS and PTRACE_SETVSXREGS.
9196 (ppc_arch_setup): Check for VSX in hwcap.
9197 (ppc_fill_vsxregset): New function.
9198 (ppc_store_vsxregset): New function.
9199 Add new VSX entry in regset_info target_regsets.
9200
9201 * configure.srv: Add new VSX dependencies.
9202
a6f3e723
SL
92032008-08-12 Pedro Alves <pedro@codesourcery.com>
9204
9205 * remote-utils.c (noack_mode, transport_is_reliable): New globals.
9206 (remote_open): Set or clear transport_is_reliable.
9207 (putpkt_binary): Don't expect acks in noack mode.
9208 (getpkt): Don't send ack/nac in noack mode.
9209 * server.c (handle_general_set): Handle QStartNoAckMode.
9210 (handle_query): If connected by tcp pass QStartNoAckMode+ in
9211 qSupported.
9212 (main): Reset noack_mode on every connection.
9213 * server.h (noack_mode): Declare.
9214
a417dc56
RW
92152008-08-07 Ralf Wildenhues <Ralf.Wildenhues@gmx.de>
9216
9217 * Makefile.in (GDBREPLAY_OBS): New variable.
9218 (gdbreplay$(EXEEXT)): Use it to avoid unportable $^.
9219
3221518c
UW
92202008-08-05 Ulrich Weigand <uweigand@de.ibm.com>
9221 Daniel Jacobowitz <dan@codesourcery.com>
9222
9223 * linux-low.c (linux_resume_one_process): Ignore ESRCH.
9224 (usr_store_inferior_registers): Likewise.
9225 (regsets_store_inferior_registers): Likewise.
9226
ec56be1b
PA
92272008-07-31 Rolf Jansen <rj@surtec.com>
9228 Pedro Alves <pedro@codesourcery.com>
9229
9230 * configure.ac: Check for memmem declaration.
9231 * server.c [HAVE_MALLOC_H]: Include malloc.h.
9232 (disable_packet_vCont, disable_packet_Tthread, disable_packet_qC)
9233 (disable_packet_qfThreadInfo): Unconditionally compile.
9234 * server.h [!HAVE_DECL_MEMMEM]: Declare memmem.
9235 * configure, config.in: Regenerate.
9236
2fe5e3ff
DE
92372008-07-28 Doug Kwan <dougkwan@google.com>
9238
9239 * linux-low.c (sys/dir.h, sys/user.h): Remove includes.
9240 (linux_write_memory): Remove declaration of errno.
9241
836acd6d
UW
92422008-07-12 Ulrich Weigand <uweigand@de.ibm.com>
9243
9244 * linux-low.c (handle_extended_wait): Do not use "status"
9245 variable uninitialized.
9246
aeba519e
PA
92472008-07-07 Pedro Alves <pedro@codesourcery.com>
9248
9249 * server.c (handle_v_attach): Inhibit reporting dll changes.
9250
db42f210
PA
92512008-06-27 Pedro Alves <pedro@codesourcery.com>
9252
9253 * remote-utils.c (prepare_resume_reply): If requested, don't
9254 output "thread:TID" in the T stop reply.
9255
9256 * server.c (disable_packet_vCont, disable_packet_Tthread)
9257 (disable_packet_qC, disable_packet_qfThreadInfo): New globals.
9258 (handle_query): If requested, disable support for qC, qfThreadInfo
9259 and qsThreadInfo.
9260 (handle_v_requests): If requested, disable support for vCont.
9261 (gdbserver_show_disableable): New.
9262 (main): Handle --disable-packet and --disable-packet=LIST.
9263
9264 * server.h (disable_packet_vCont, disable_packet_Tthread)
9265 (disable_packet_qC, disable_packet_qfThreadInfo): Declare.
9266
8e4c5421
CD
92672008-06-20 Carlos O'Donell <carlos@codesourcery.com>
9268
9269 * server.c (gdbserver_usage): Mention --version.
9270
6e23a804
DJ
92712008-06-06 Daniel Jacobowitz <dan@codesourcery.com>
9272
9273 * Makefile.in (gdbreplay.o): New rule.
9274
90aa6a40
JM
92752008-06-06 Joseph Myers <joseph@codesourcery.com>
9276
9277 * gdbreplay.c (gdbreplay_version): Say gdbreplay in version
9278 message, not gdbserver.
9279
c16158bc 92802008-06-05 Vladimir Prus <vladimir@codesourcery.com>
889bf7c5
PA
9281 Nathan Sidwell <nathan@codesourcery.com>
9282 Joseph Myers <joseph@codesourcery.com>
c16158bc
JM
9283
9284 * acinclude.m4: Include ../../config/acx.m4.
9285 * configure.ac: Use ACX_PKGVERSION and ACX_BUGURL.
9286 * configure, config.in: Regenerate.
9287 * Makefile.in (gdbreplay$(EXEEXT)): Add version.o.
9288 * server.c (gdbserver_version): Print PKGVERSION.
9289 (gdbsrever_usage): Add stream parameter. Print REPORT_BUGS_TO.
9290 (main): Adjust gdbserver_usage calls.
9291 * gdbreplay.c (version, host_name): Add declarations.
9292 (gdbreplay_version, gdbreplay_usage): New.
9293 (main): Accept --version and --help options.
9294
aeb75bf5
DJ
92952008-06-04 Daniel Jacobowitz <dan@codesourcery.com>
9296
9297 * linux-arm-low.c (thumb_breakpoint, thumb_breakpoint_len): New.
9298 (arm_breakpoint_at): Handle Thumb.
9299 (the_low_target): Add comment.
9300
76b233dd
UW
93012008-05-29 Ulrich Weigand <uweigand@de.ibm.com>
9302
9303 * linux-ppc-low.c (ppc_collect_ptrace_register): Clear buffer.
9304
08388c79
DE
93052008-05-09 Doug Evans <dje@google.com>
9306
a3c83fae
DE
9307 * server.h (decode_search_memory_packet): Declare.
9308 * remote-utils.c (decode_search_memory_packet): New fn.
9309 * server.c (handle_search_memory_1): New fn.
08388c79
DE
9310 (handle_search_memory): New fn.
9311 (handle_query): Process qSearch:memory packets.
9312
bb9c3d36
UW
93132008-05-08 Ulrich Weigand <uweigand@de.ibm.com>
9314
9315 * regcache.c (registers_length): Remove.
9316 (set_register_cache): Verify that PBUFSIZ is large enough to hold a
9317 full register packet.
9318 * regcache.h (registers_length): Remove prototype.
9319 * server.h (PBUFSIZ): Define to 16384.
9320
7284e1be
UW
93212008-05-03 Ulrich Weigand <uweigand@de.ibm.com>
9322
9323 * configure.srv (powerpc*-*-linux*): Set srv_regobj to
9324 powerpc-32l.o, powerpc-altivec32l.o, powerpc-e500l.o,
9325 powerpc-64l.o, and powerpc-altivec64l.o.
9326 Remove rs6000/powerpc-32.xml, rs6000/powerpc-64.xml, and
9327 rs6000/powerpc-e500.xml; add rs6000/powerpc-32l.xml,
9328 rs6000/powerpc-altivec32l.xml, rs6000/powerpc-e500l.xml,
9329 rs6000/powerpc-64l.xml, rs6000/powerpc-altivec64l.xml,
9330 rs6000/power-linux.xml, and rs6000/power64-linux.xml
9331 to srv_xmlfiles.
9332
9333 * Makefile.in (reg-ppc.o, reg-ppc.c): Remove, replace by ...
9334 (powerpc-32l.o, powerpc-32l.c): ... these new rules.
9335 (powerpc-32.o, powerpc-32.c): Remove, replace by ...
9336 (powerpc-altivec32l.o, powerpc-altivec32l.c): ... these new rules.
9337 (powerpc-e500.o, powerpc-e500.c): Remove, replace by ...
9338 (powerpc-e500l.o, powerpc-e500l.c): ... these new rules.
9339 (reg-ppc64.o, reg-ppc64.c): Remove, replace by ...
9340 (powerpc-64l.o, powerpc-64l.c): ... these new rules.
9341 (powerpc-64.o, powerpc-64.c): Remove, replace by ...
9342 (powerpc-altivec64l.o, powerpc-altivec64l.c): ... these new rules.
9343 (clean): Update.
9344
9345 * linux-ppc-low.c (init_registers_ppc): Remove, replace by ...
9346 (init_registers_powerpc_32l): ... this new prototype.
9347 (init_registers_powerpc_32): Remove, replace by ...
9348 (init_registers_powerpc_altivec32l): ... this new prototype.
9349 (init_registers_powerpc_e500): Remove, replace by ...
9350 (init_registers_powerpc_e500l): ... this new prototype.
9351 (init_registers_ppc64): Remove, replace by ...
9352 (init_registers_powerpc_64l): ... this new prototype.
9353 (init_registers_powerpc_64): Remove, replace by ...
9354 (init_registers_powerpc_altivec64l): ... this new prototype.
9355 (ppc_num_regs): Set to 73.
9356 (PT_ORIG_R3, PT_TRAP): Define if necessary.
9357 (ppc_regmap, ppc_regmap_e500): Add values for orig_r3 and trap.
9358 (ppc_cannot_store_register): Handle orig_r3 and trap.
9359 (ppc_arch_setup): Update init_registers_... calls.
9360 (ppc_fill_gregset): Handle orig_r3 and trap.
9361
9362 * inferiors.c (clear_inferiors): Reset current_inferior.
9363
fdc59709
PB
93642008-04-23 Paolo Bonzini <bonzini@gnu.org>
9365
889bf7c5
PA
9366 * acinclude.m4: Add override.m4.
9367 * configure: Regenerate.
fdc59709 9368
c9b2f845
UW
93692008-04-21 Ulrich Weigand <uweigand@de.ibm.com>
9370
9371 * linux-ppc-low.c (ppc_arch_setup): Reset ppc_hwcap after the
9372 initial call to init_register_ppc64.
9373
550512b8
UW
93742008-04-21 Ulrich Weigand <uweigand@de.ibm.com>
9375
43aaf8b6
PA
9376 * configure.srv (powerpc64-*-linux*, powerpc-*-linux*): Merge into
9377 single powerpc*-*-linux* case.
550512b8
UW
9378 (s390-*-linux*, s390x-*-linux*): Merge into single s390*-*-linux* case.
9379
b6430ec3
UW
93802008-04-17 Ulrich Weigand <uweigand@de.ibm.com>
9381
9382 * configure.srv [powerpc64-*-linux*]: Remove powerpc-e500.o from
889bf7c5 9383 srv_regobj. Remove rs6000/powerpc-e500.xml and rs6000/power-spe.xml
b6430ec3
UW
9384 from reg_xmlfiles.
9385 * linux-ppc-low.c: Include <elf.h>.
9386 (PPC_FEATURE_HAS_ALTIVEC, PPC_FEATURE_HAS_SPE): Define.
9387 (ppc_hwcap): New global variable.
9388 (ppc_regmap): Remove __SPE__ #ifdef sections.
9389 (ppc_regmap_e500): New global variable.
9390 (ppc_cannot_store_register): Update __SPE__ special case.
9391 (ppc_get_hwcap): New function.
9392 (ppc_arch_setup): Use it to determine whether inferior supports
9393 AltiVec or SPE registers. Set the_low_target.regmap if appropriate.
9394 (ppc_fill_vrregset, ppc_store_vrregset): Define unconditionally.
9395 Do not access registers if target does not support AltiVec.
9396 (ppc_fill_evrregset, ppc_store_evrregset): Define unconditionally.
9397 Do not access registers if target does not support SPE.
9398 (target_regsets): Unconditionally include AltiVec and SPE regsets.
9399
52fa2412
UW
94002008-04-17 Daniel Jacobowitz <dan@codesourcery.com>
9401
9402 * linux-low.c (disabled_regsets, num_regsets): New.
9403 (use_regsets_p): Delete.
9404 (linux_wait_for_process): Clear disabled_regsets.
9405 (regsets_fetch_inferior_registers): Check and set it.
9406 (regsets_store_inferior_registers): Likewise.
9407 (linux_fetch_registers, linux_store_registers): Do not use
9408 use_regsets_p.
9409 (initialize_low): Allocate disabled_regsets.
9410
e28b3332
DJ
94112008-04-14 Daniel Jacobowitz <dan@codesourcery.com>
9412
9413 * Makefile.in (LIBOBJS): New.
9414 (OBS): Use LIBOBJS.
9415 (memmem.o): New rule.
9416 * configure.ac: Use AC_CONFIG_LIBOBJ_DIR and check for memmem.
9417 * configure: Regenerated.
9418
4536995d
UW
94192008-04-04 Ulrich Weigand <uweigand@de.ibm.com>
9420
9421 * server.c (handle_query): Never return "unsupported" for
9422 qXfer:features:read queries.
9423
221c031f
UW
94242008-03-27 Ulrich Weigand <uweigand@de.ibm.com>
9425
9426 * server.c (get_features_xml): Fix inverted condition.
9427 (handle_query): Always support qXfer:feature:read.
9428
ccd213ac
DJ
94292008-03-10 Daniel Jacobowitz <dan@codesourcery.com>
9430
9431 * server.c (wrapper_argv): New.
9432 (start_inferior): Handle wrapper_argv. If set, expect an extra
9433 trap.
9434 (gdbserver_usage): Document --wrapper.
9435 (main): Parse --wrapper.
9436
6fe305f7
UW
94372008-02-28 Ulrich Weigand <uweigand@de.ibm.com>
9438
9439 * configure.srv [powerpc64-*-linux*]: Add all files mentioned for
9440 powerpc-*-linux* to srv_regobj and reg_xmlfiles.
9441 * linux-ppc-low.c (ppc_get_pc): Support bi-arch operation.
9442 (ppc_set_pc): Likewise.
9443 (ppc_arch_setup): New function.
9444 (ppc_fill_gregset): Call ppc_collect_ptrace_register instead
9445 of collect_register.
889bf7c5 9446 (the_low_target): Use ppc_arch_setup as arch_setup initializer.
6fe305f7 9447
5b0a002e
UW
94482008-02-28 Ulrich Weigand <uweigand@de.ibm.com>
9449
9450 * configure.srv [powerpc64-*-linux*]: Use linux-ppc-low.o
9451 instead of linux-ppc64-low.o.
9452 * linux-ppc64-low.c: Remove file.
9453 * Makefile.in (SFILES): Remove linux-ppc64-low.c.
9454 (linux-ppc64-low.o): Remove rule.
9455
9456 * linux-ppc-low.c (init_registers_ppc64): Add prototype.
9457 (init_registers_powerpc_64): Likewise.
9458 (ppc_regmap): Conditionally define depending on __powerpc64__.
9459 (ppc_cannot_store_register): Do not special-case "fpscr" when
9460 compiled on __powerpc64__.
9461 (ppc_collect_ptrace_register): New function.
9462 (ppc_supply_ptrace_register): New function.
9463 (ppc_breakpoint): Change type to "unsigned int".
9464 (ppc_breakpoint_at): Change type of "insn" to "unsigned int".
9465 (the_low_target): Conditionally provide initializers for the
889bf7c5 9466 arch_setup member depending on __powerpc64__. Install
5b0a002e
UW
9467 collect_ptrace_register and supply_ptrace_register members.
9468
9b4b61c8
UW
94692008-02-28 Ulrich Weigand <uweigand@de.ibm.com>
9470
9471 * regcache.h (gdbserver_xmltarget): Add extern declaration.
9472 * server.c (gdbserver_xmltarget): Define.
9473 (get_features_xml): Use it to replace "target.xml" and arch_string.
9474
9475 * configure.srv: Remove srv_xmltarget. Add XML files that were
9476 mentioned there to srv_xmlfiles instead. Remove conditional tests
9477 on gdb_cv_arm_iwmmxt, gdb_cv_ppc_altivec, gdb_cv_ppc_spe; set
9478 srv_xmlfiles and srv_regobj to include all possible choices.
9479 * configure.ac (srv_xmltarget): Remove.
9480 (srv_xmlfiles): Do not add "target.xml".
9481 (gdb_cv_arm_iwmmxt, gdb_cv_ppc_altivec, gdb_cv_ppc_spe): Remove
9482 checks for supplementary target information.
9483 * configure: Regenerate.
9484 * Makefile.in (XML_TARGET): Remove.
9485 (target.xml): Remove rule.
9486 (clean): Do not clean up target.xml.
9487 (.PRECIOUS): Do not mention target.xml.
9488
9489 * target.h (struct target_ops): Remove arch_string member.
9490 * linux-low.c (linux_arch_string): Remove.
9491 (linux_target_ops): Remove arch_string initializer.
9492 * linux-low.h (struct linux_target_ops): Remove arch_string member.
9493 * linux-i386-low.c (the_low_target): Remove arch_string initializer.
9494 * linux-x86-64-low.c (the_low_target): Remove arch_string initializer.
9495 * spu-low.c (spu_arch_string): Remove.
9496 (spu_target_ops): Remove arch_string initializer.
9497 * win32-low.c (win32_arch_string): Remove.
9498 (win32_target_ops): Remove arch_string initializer.
9499 * win32-low.h (struct win32_target_ops): Remove arch_string member.
9500 * win32-arm-low.c (the_low_target): Remove arch_string initializer.
9501 * win32-i368-low.c (the_low_target): Remove arch_string initializer.
9502
ee1a7ae4
UW
95032008-02-27 Ulrich Weigand <uweigand@de.ibm.com>
9504
9505 * linux-low.h (struct linux_target_ops): Replace left_pad_xfer field
9506 by collect_ptrace_register and supply_ptrace_register hooks.
9507 * linux-low.c (fetch_register): Use supply_ptrace_register callback
9508 instead of checking for the_low_target.left_pad_xfer.
9509 (usr_store_inferior_registers): Use collect_ptrace_register callback
9510 instead of checking for the_low_target.left_pad_xfer.
9511
9512 * linux-s390-low.c (s390_collect_ptrace_register): New function.
9513 (s390_supply_ptrace_register): Likewise.
9514 (s390_fill_gregset): Call s390_collect_ptrace_register.
9515 (the_low_target): Update.
9516
9517 * linux-ppc64-low.c (ppc_collect_ptrace_register): New function.
9518 (ppc_supply_ptrace_register): Likewise.
9519 (the_low_target): Update.
9520
9521 * linux-i386-low.c (the_low_target): Update.
9522 * linux-x86-64-low.c (the_low_target): Update.
9523
d61ddec4
UW
95242008-02-27 Ulrich Weigand <uweigand@de.ibm.com>
9525
9526 * configure.srv [s390x-*-linux*]: Set srv_regobj to include both
9527 reg-s390.o and reg-s390x.o.
9528
9529 * linux-low.c (new_inferior): New global variable.
9530 (linux_create_inferior, linux_attach): Set it.
9531 (linux_wait_for_process): Call the_low_target.arch_setup after the
9532 target has stopped for the first time.
9533 (initialize_low): Do not call the_low_target.arch_setup.
9534
9535 * linux-s390-low.c (s390_get_pc): Support bi-arch operation.
9536 (s390_set_pc): Likewise.
9537 (s390_arch_setup): New function.
9538 (the_low_target): Use s390_arch_setup as arch_setup routine.
9539
9540 * regcache.c (realloc_register_cache): New function.
9541 (set_register_cache): Call it for each existing regcache.
9542
d05b4ac3
UW
95432008-02-27 Ulrich Weigand <uweigand@de.ibm.com>
9544
9545 * server.h (init_registers): Remove prototype.
9546
9547 * linux-low.h (struct linux_target_ops): Add arch_setup field.
9548 * linux-low.c (initialize_low): Call the_low_target.arch_setup ()
9549 instead of init_registers ().
9550 * linux-arm-low.c (init_registers_arm): Add prototype.
9551 (init_registers_arm_with_iwmmxt): Likewise.
9552 (the_low_target): Add initializer for arch_setup field.
9553 * linux-cris-low.c (init_registers_cris): Add prototype.
9554 (the_low_target): Add initializer for arch_setup field.
9555 * linux-crisv32-low.c (init_registers_crisv32): Add prototype.
9556 (the_low_target): Add initializer for arch_setup field.
9557 * linux-i386-low.c (init_registers_i386_linux): Add prototype.
9558 (the_low_target): Add initializer for arch_setup field.
9559 * linux-ia64-low.c (init_registers_ia64): Add prototype.
9560 (the_low_target): Add initializer for arch_setup field.
9561 * linux-m32r-low.c (init_registers_m32r): Add prototype.
9562 (the_low_target): Add initializer for arch_setup field.
9563 * linux-m68k-low.c (init_registers_m68k): Add prototype.
9564 (the_low_target): Add initializer for arch_setup field.
9565 * linux-mips-low.c (init_registers_mips_linux): Add prototype.
9566 (init_registers_mips64_linux): Likewise.
9567 (the_low_target): Add initializer for arch_setup field.
9568 * linux-ppc-low.c (init_registers_ppc): Add prototype.
9569 (init_registers_powerpc_32, init_registers_powerpc_e500): Likewise.
9570 (the_low_target): Add initializer for arch_setup field.
9571 * linux-ppc64-low.c (init_registers_ppc64): Add prototype.
9572 (init_registers_powerpc_64): Likewise.
9573 (the_low_target): Add initializer for arch_setup field.
9574 * linux-s390-low.c (init_registers_s390): Add prototype.
9575 (init_registers_s390x): Likewise.
9576 (the_low_target): Add initializer for arch_setup field.
9577 * linux-sh-low.c (init_registers_sh): Add prototype.
9578 (the_low_target): Add initializer for arch_setup field.
9579 * linux-x86-64-low.c (init_registers_x86_64_linux): Add prototype.
9580 (the_low_target): Add initializer for arch_setup field.
9581 * linux-xtensa-low.c (init_registers_xtensa): Add prototype.
9582 (the_low_target): Add initializer for arch_setup field.
9583
9584 * win32-low.h (struct win32_target_ops): Add arch_setup field.
9585 * win32-low.c (initialize_low): Call the_low_target.arch_setup ()
9586 instead of init_registers ().
9587 * win32-arm-low.c (init_registers_arm): Add prototype.
9588 (the_low_target): Add initializer for arch_setup field.
9589 * win32-i386-low.c (init_registers_i386): Add prototype.
9590 (the_low_target): Add initializer for arch_setup field.
9591
9592 * spu-low.c (init_registers_spu): Add prototype.
9593 (initialize_low): Call initialie_registers_spu () instead of
9594 initialize_registers ().
9595
fd96d250
PA
95962008-02-19 Pedro Alves <pedro@codesourcery.com>
9597
9598 * server.c (handle_v_requests): When handling the vRun and vAttach
9599 packets, if already debugging a process, don't kill it. Return an
9600 error instead.
9601
d41b6bb4
DJ
96022008-02-17 Daniel Jacobowitz <dan@codesourcery.com>
9603
9604 * server.c (handle_query): Correct length check.
9605
5ac588cf
PA
96062008-02-14 Pedro Alves <pedro_alves@portugalmail.pt>
9607
9608 * win32-low.c (do_initial_child_stuff): Add process handle
9609 parameter. Set current_process_handle and current_process_id from the
9610 parameters. Clear globals.
9611 (win32_create_inferior): Don't set current_process_handle and
9612 current_process_id here. Instead pass them on the call to
9613 do_initial_child_stuff.
9614 (win32_attach): Likewise.
9615 (win32_clear_inferiors): New.
9616 (win32_kill): Don't close the current process handle or the
9617 current thread handle here. Instead call win32_clear_inferiors.
9618 (win32_detach): Don't open a new handle to the process. Call
9619 win32_clear_inferiors.
9620 (win32_join): Don't rely on current_process_handle; open a new
9621 handle using the process id.
9622 (win32_wait): Call win32_clear_inferiors when the inferior process
9623 has exited.
9624
ecd7ecbc
DJ
96252008-02-14 Daniel Jacobowitz <dan@codesourcery.com>
9626
9627 * server.c (monitor_show_help): Add "exit".
9628
1525d545
MG
96292008-02-11 Maxim Grigoriev <maxim2405@gmail.com>
9630
ecd7ecbc 9631 * Makefile.in (SFILES): Add linux-xtensa-low.c.
1525d545
MG
9632 (clean): Add reg-xtensa.c.
9633 (linux-xtensa-low.o, reg-xtensa.o, reg-xtensa.c): New dependencies.
ecd7ecbc
DJ
9634 * configure.srv (xtensa*-*-linux*) New target.
9635 * linux-xtensa-low.c: New.
9636 * xtensa-xtregs.c: New.
1525d545 9637
59a016f0
PA
96382008-02-01 Pedro Alves <pedro_alves@portugalmail.pt>
9639
9640 * hostio.c: Don't include errno.h.
9641 (errno_to_fileio_errno): Move to hostio-errno.
9642 * hostio.c: (hostio_error): Remove the error parameter. Defer the
9643 error number outputting to the target->hostio_last_error callback.
9644 (hostio_packet_error): Use FILEIO_EINVAL directly.
9645 (handle_open, handle_pread, hostio_error, handle_unlink): Update
9646 calls to hostio_error.
9647 * hostio-errno.c: New.
9648 * server.h (hostio_last_error_from_errno): Declare.
9649 * target.h (target_ops): Add hostio_last_error member.
9650 * linux-low.c (linux_target_op): Register hostio_last_error_from_errno
9651 as hostio_last_error handler.
889bf7c5 9652 * spu-low.c (spu_target_ops): Likewise.
59a016f0
PA
9653 * win32-low.c [_WIN32_WCE] (win32_error_to_fileio_error)
9654 (wince_hostio_last_error): New functions.
9655 (win32_target_ops) [_WIN32_WCE]: Register wince_hostio_last_error
9656 as hostio_last_error handler.
9657 (win32_target_ops) [!_WIN32_WCE]: Register
9658 hostio_last_error_from_errno as hostio_last_error handler.
9659 * Makefile.in (SFILES): Add hostio.c and hostio-errno.c.
9660 (hostio-errno.o): New rule.
9661 * configure.ac (GDBSERVER_DEPFILES): Add $srv_hostio_err_objs.
9662 * configure.srv (srv_hostio_err_objs): New variable. Default to
9663 hostio-errno.o.
9664 (arm*-*-mingw32ce*): Set srv_hostio_err_objs to "".
9665 * configure: Regenerate.
9666
2d717e4f
DJ
96672008-01-29 Daniel Jacobowitz <dan@codesourcery.com>
9668
9669 * linux-low.c (linux_attach_lwp): Do not _exit after errors.
9670 (linux_kill, linux_detach): Clean up the process list.
9671 * remote-utils.c (remote_open): Improve port number parsing.
9672 (putpkt_binary, input_interrupt): Only send interrupts if the target
9673 is running.
9674 * server.c (extended_protocol): Make static.
9675 (attached): Define earlier.
9676 (exit_requested, response_needed, program_argv): New variables.
9677 (target_running): New.
9678 (start_inferior): Clear attached here.
9679 (attach_inferior): Set attached here.
9680 (require_running): Define.
9681 (handle_query): Use require_running and target_running. Implement
9682 "monitor exit".
9683 (handle_v_attach, handle_v_run): New.
9684 (handle_v_requests): Use require_running. Handle vAttach and vRun.
9685 (gdbserver_usage): Update.
9686 (main): Redo argument parsing. Handle --debug and --multi. Handle
9687 --attach along with other options or after the port. Save
9688 program_argv. Support no initial program. Resynchronize
9689 communication with GDB after an error. Handle "monitor exit".
9690 Use require_running and target_running. Always allow the extended
9691 protocol. Do not error out for Hc0 or Hc-1. Do not automatically
9692 restart in extended mode.
9693 * README: Refer to the GDB manual. Update --attach usage.
9694
7407e2de
AS
96952007-12-20 Andreas Schwab <schwab@suse.de>
9696
9697 * linux-low.c (STACK_SIZE): Define.
9698 (linux_tracefork_child): Use it. Use __clone2 on ia64.
9699 (linux_test_for_tracefork): Likewise.
9700
b65d95c5
DJ
97012007-12-18 Daniel Jacobowitz <dan@codesourcery.com>
9702
9703 * linux-low.c (linux_wait_for_event): Update messages. Do not
9704 reinsert auto-delete breakpoints.
9705 * mem-break.c (struct breakpoint): Change return type of handler to
9706 int.
9707 (set_breakpoint_at): Update handler type.
9708 (reinsert_breakpoint_handler): Return 1 instead of calling
9709 delete_breakpoint.
9710 (reinsert_breakpoint_by_bp): Check for the original breakpoint before
9711 setting a new one.
9712 (check_breakpoints): Delete auto-delete breakpoints and return 2.
9713 * mem-break.h (set_breakpoint_at): Update handler type.
9714 * thread-db.c (thread_db_create_event, thread_db_create_event): Update.
9715 * win32-low.c (auto_delete_breakpoint): New.
9716 (get_child_debug_event): Use it.
9717
4e799345
DJ
97182007-12-16 Daniel Jacobowitz <dan@codesourcery.com>
9719
9720 * configure.ac: Check for pread and pwrite.
9721 * hostio.c (handle_pread): Fall back to lseek and read.
9722 (handle_pwrite): Fall back to lseek and write.
9723 * config.in, configure: Regenerated.
9724
27524b67
DJ
97252007-12-07 Daniel Jacobowitz <dan@codesourcery.com>
9726
9727 * server.c (myresume): Add own_buf argument.
9728 (main): Update calls.
9729
a20d5e98
DJ
97302007-12-06 Daniel Jacobowitz <dan@codesourcery.com>
9731
9732 * linux-low.c (linux_wait, linux_resume): Do not handle async I/O.
9733 * remote-utils.c (remote_open): Do not call disable_async_io.
9734 (block_async_io): Delete.
9735 (unblock_async_io): Make static.
9736 (initialize_async_io): New.
9737 * server.c (handle_v_cont): Handle async I/O here.
9738 (myresume): Likewise. Move other common resume tasks here...
9739 (main): ... from here. Call initialize_async_io. Disable async
9740 I/O before the main loop.
9741 * server.h (initialize_async_io): Declare.
9742 (block_async_io, unblock_async_io): Delete prototypes.
9743 * spu-low.c (spu_resume, spu_wait): Do not handle async I/O here.
9744
b79d787e
DJ
97452007-12-06 Mick Davis <mickd@goanna.iinet.net.au>
9746
9747 * remote-utils.c (readchar): Allow binary data in received messages.
9748
d97903b2
PA
97492007-12-03 Pedro Alves <pedro_alves@portugalmail.pt>
9750
9751 * win32-low.c (attaching): New global.
9752 (win32_create_inferior): Clear the `attaching' global.
9753 (win32_attach): Set the `attaching' global.
9754 (get_child_debug_event) [_WIN32_WCE]: Stop the inferior when
9755 attaching. Only set a breakpoint at the entry point if not
9756 attaching.
9757
311de423
PA
97582007-12-03 Pedro Alves <pedro_alves@portugalmail.pt>
9759
9760 * server.c (main): Don't report dll events on the initial
9761 connection on attaches.
9762
6c2d16d2
PA
97632007-12-03 Pedro Alves <pedro_alves@portugalmail.pt>
9764
9765 * server.c (main): Relax numerical bases supported for the pid of
9766 the --attach command line argument.
9767
5ca906e6
PA
97682007-12-03 Pedro Alves <pedro_alves@portugalmail.pt>
9769
9770 * win32-low.c (win32_attach): Call OpenProcess before
9771 DebugActiveProcess, not after. Add last error output to error
9772 call.
9773
9c6c8194
PA
97742007-12-03 Pedro Alves <pedro_alves@portugalmail.pt>
9775
9776 * win32-low.c (win32_get_thread_context)
9777 (win32_set_thread_context): New functions.
9778 (thread_rec): Use win32_get_thread_context.
9779 (continue_one_thread, win32_resume): Use win32_set_thread_context.
9780 * win32-low.h (win32_thread_info) [_WIN32_WCE]: Add `base_context'
9781 field.
9782
4d5d1aaa
PA
97832007-12-03 Leo Zayas
9784 Pedro Alves <pedro_alves@portugalmail.pt>
9785
9786 * win32-low.c (soft_interrupt_requested, faked_breakpoint): New
9787 global variables.
9788 (child_add_thread): Minor cleanup.
9789 (child_continue): Resume artificially suspended threads before
9790 calling ContinueDebugEvent.
9791 (suspend_one_thread): New.
9792 (fake_breakpoint_event): New.
9793 (get_child_debug_event): Change return type to int. Check here if
9794 gdb sent an interrupt request. If a soft interrupt was requested,
9795 fake a breakpoint event. Return 0 if there is no event to handle,
9796 and 1 otherwise.
9797 (win32_wait): Don't check here if gdb sent an interrupt request.
9798 Ensure there is a valid event to handle.
9799 (win32_request_interrupt): Add soft interruption method as last
9800 resort.
9801
c436e841
PA
98022007-12-03 Leo Zayas
9803 Pedro Alves <pedro_alves@portugalmail.pt>
9804
9805 * win32-low.h (win32_thread_info): Add descriptions to the
9806 structure members. Replace `suspend_count' counter by a
9807 `suspended' flag.
9808 * win32-low.c (thread_rec): Update condition of when to get the
9809 context from the inferior. Rely on ContextFlags being set if it
9810 has already been retrieved. Only suspend the inferior thread if
9811 we haven't already. Warn if that fails.
9812 (continue_one_thread): s/suspend_count/suspended/. Only call
9813 ResumeThread once. Warn if that fails.
9814
e7b5fa67
PA
98152007-12-02 Pedro Alves <pedro_alves@portugalmail.pt>
9816
9817 * win32-low.c (win32_wait): Don't read from the inferior when it
9818 has already exited.
9819
a385171d
PA
98202007-12-02 Pedro Alves <pedro_alves@portugalmail.pt>
9821
9822 * Makefile.in (win32_low_h): New variable.
9823 (win32-low.o): Add dependency on $(win32_low_h).
9824 (win32-arm-low.o, win32-i386-low.o): New rules.
9825
f80c84b3
DJ
98262007-11-30 Daniel Jacobowitz <dan@codesourcery.com>
9827
9828 * hostio.c: Correct copyright year.
9829
a6b151f1
DJ
98302007-11-30 Daniel Jacobowitz <dan@codesourcery.com>
9831
9832 * Makefile.in (OBS): Add hostio.o.
9833 (hostio.o): New rule.
9834 * server.h (handle_vFile): Declare.
9835 * hostio.c: New file.
9836 * server.c (handle_v_requests): Take packet_len and new_packet_len
9837 for binary packets. Call handle_vFile.
9838 (main): Update call to handle_v_requests.
9839
f9387fc3
DJ
98402007-11-05 Daniel Jacobowitz <dan@codesourcery.com>
9841
9842 * linux-low.c: Include <sched.h>.
9843
51c2684e
DJ
98442007-11-01 Daniel Jacobowitz <dan@codesourcery.com>
9845
9846 * linux-low.c (linux_tracefork_grandchild): New.
9847 (linux_tracefork_child): Use clone.
9848 (linux_test_for_tracefork): Use clone; allocate and free a stack.
9849
75f83163
JB
98502007-10-31 Joel Brobecker <brobecker@adacore.com>
9851
9852 * Makefile.in: Use $(SHELL) instead of "sh" to call regdat.sh.
9853
da5898ce
DJ
98542007-10-24 Daniel Jacobowitz <dan@codesourcery.com>
9855
9856 * linux-low.c (handle_extended_wait): Handle unexpected signals.
9857
24a09b5f
DJ
98582007-10-23 Daniel Jacobowitz <dan@codesourcery.com>
9859
9860 * inferiors.c (change_inferior_id): Delete.
9861 (add_pid_to_list, pull_pid_from_list): New.
9862 * linux-low.c (PTRACE_SETOPTIONS, PTRACE_GETEVENTMSG)
9863 (PTRACE_O_TRACESYSGOOD, PTRACE_O_TRACEFORK, PTRACE_O_TRACEVFORK)
9864 (PTRACE_O_TRACECLONE, PTRACE_O_TRACEEXEC, PTRACE_O_TRACEVFORKDONE)
9865 (PTRACE_O_TRACEEXIT, PTRACE_EVENT_FORK, PTRACE_EVENT_VFORK)
9866 (PTRACE_EVENT_CLONE, PTRACE_EVENT_EXEC, PTRACE_EVENT_VFORK_DONE)
9867 (PTRACE_EVENT_EXIT, __WALL): Provide default definitions.
9868 (stopped_pids, thread_db_active, must_set_ptrace_flags): New variables.
9869 (using_threads): Always set to 1.
9870 (handle_extended_wait): New.
9871 (add_process): Do not set TID.
9872 (linux_create_inferior): Set must_set_ptrace_flags.
9873 (linux_attach_lwp): Remove TID argument. Do not check using_threads.
9874 Use PTRACE_SETOPTIONS. Call new_thread_notify. Update all callers.
9875 (linux_thread_alive): Rename TID argument to LWPID.
9876 (linux_wait_for_process): Handle unknown processes. Do not use TID.
9877 (linux_wait_for_event): Do not use TID or check using_threads. Update
9878 call to dead_thread_notify. Call handle_extended_wait.
9879 (linux_create_inferior): Use PTRACE_SETOPTIONS.
9880 (send_sigstop): Delete sigstop_sent.
9881 (wait_for_sigstop): Avoid TID.
9882 (linux_supports_tracefork_flag, linux_tracefork_child, my_waitpid)
9883 (linux_test_for_tracefork): New.
9884 (linux_lookup_signals): Use thread_db_active and
9885 linux_supports_tracefork_flag.
9886 (initialize_low): Use thread_db_active and linux_test_for_tracefork.
9887 * linux-low.h (get_process_thread): Avoid TID.
9888 (struct process_ifo): Move thread_known and tid to the end. Remove
9889 sigstop_sent.
9890 (linux_attach_lwp, thread_db_init): Update prototypes.
9891 * server.h (change_inferior_id): Delete prototype.
9892 (add_pid_to_list, pull_pid_from_list): New prototypes.
9893 * thread-db.c (thread_db_use_events): New.
9894 (find_first_thread): Rename to...
9895 (find_one_thread): ...this. Update callers and messages. Do not
9896 call fatal. Check thread_db_use_events. Do not call
9897 change_inferior_id or new_thread_notify.
9898 (maybe_attach_thread): Update. Do not call new_thread_notify.
9899 (thread_db_init): Set thread_db_use_events. Check use_events.
9900 * utils.c (fatal, warning): Correct message prefix.
9901
30ed0a8f
DJ
99022007-10-15 Daniel Jacobowitz <dan@codesourcery.com>
9903
9904 * Makefile.in (clean): Remove new files.
9905 (powerpc-32.o, powerpc-32.c, powerpc-e500.o, powerpc-e500.c)
9906 (powerpc-64.o, powerpc-64.c): New rules.
9907 * configure.srv: Use alternate register sets for powerpc64-*-linux*
9908 with AltiVec, powerpc-*-linux* with AltiVec, and powerpc-*-linux*
9909 with SPE.
9910 * linux-ppc-low.c (ppc_regmap): Do not fetch the FP registers for
9911 SPE targets.
9912 (ppc_cannot_store_register): Do not check for FPSCR for SPE targets.
9913 (PTRACE_GETVRREGS, PTRACE_SETVRREGS, SIZEOF_VRREGS, ppc_fill_vrregset)
9914 (ppc_store_vrregset, PTRACE_GETEVRREGS, PTRACE_SETEVRREGS)
9915 (struct gdb_evrregset_t, ppc_fill_evrregset, ppc_store_evrregset): New.
9916 (target_regsets): Add AltiVec and SPE register sets.
9917 * configure.ac: Check for AltiVec and SPE.
9918 * linux-ppc64-low.c (PTRACE_GETVRREGS, PTRACE_SETVRREGS, SIZEOF_VRREGS)
9919 (ppc_fill_vrregset, ppc_store_vrregset): New.
9920 (target_regsets): Add AltiVec register set.
9921 * configure: Regenerated.
9922
fd462a61
DJ
99232007-09-19 Daniel Jacobowitz <dan@codesourcery.com>
9924
9925 * linux-low.c (O_LARGEFILE): Define.
9926 (linux_read_memory): Use /proc/PID/mem.
9927 * configure.ac: Use AC_GNU_SOURCE. Check for pread64.
9928 * configure, config.in: Regenerated.
9929
69f223ed
DJ
99302007-09-04 Daniel Jacobowitz <dan@codesourcery.com>
9931
9932 * linux-low.c (linux_wait_for_event): Do not pass signals while
9933 single-stepping.
9934
aec18585
PA
99352007-09-03 Pedro Alves <pedro_alves@portugalmail.pt>
9936
9937 * win32-low.c (create_process): New.
9938 (win32_create_inferior): Use create_process instead of
9939 CreateProcess. If create_process failed retry appending an ".exe"
9940 suffix. Store the GetLastError result immediatelly after
9941 create_process calls and use it on the call to error.
9942
34d86ddd
PA
99432007-09-03 Pedro Alves <pedro_alves@portugalmail.pt>
9944
9945 * win32-low.c (handle_load_dll): Don't use toolhelp when waiting.
9946
5a0e3bd0
JB
99472007-08-23 Joel Brobecker <brobecker@adacore.com>
9948
9949 * configure.ac: Switch license to GPLv3.
9950
f88c79e6
MS
99512007-08-01 Michael Snyder <msnyder@access-company.com>
9952
9953 * remote-utils.c (putpkt_binary): Memory leak, free buf2.
9954
6b3d9b83
PA
99552007-07-31 Pedro Alves <pedro_alves@portugalmail.pt>
9956
9957 * win32-low.c (winapi_CloseToolhelp32Snapshot) [_WIN32_WCE]: New
9958 typedef.
9959 (win32_CloseToolhelp32Snapshot) [_WIN32_WCE]: New global var.
9960 (load_toolhelp) [_WIN32_WCE]: Load TOOLHELP.DLL. Get
9961 CloseToolhelp32Snapshot.
9962 (toolhelp_get_dll_name) [_WIN32_WCE]: Close the snapshot with
9963 CloseToolhelp32Snapshot.
9964
c588c53c
MS
99652007-07-27 Michael Snyder <michael.snyder@access-company.com>
9966
9967 * server.c (main): Check for inferior exit before main loop.
9968
aa0403d9
PA
99692007-07-18 Pedro Alves <pedro_alves@portugalmail.pt>
9970
9971 * remote-utils.c (remote_open): Set SO_KEEPALIVE on remote_desc
9972 instead of on tmp_desc.
9973
255e7678
DJ
99742007-07-17 Pedro Alves <pedro_alves@portugalmail.pt>
9975 Daniel Jacobowitz <dan@codesourcery.com>
9976
9977 * inferiors.c (all_dlls, dlls_changed, get_dll): New.
9978 (add_thread): Minor cleanups.
9979 (clear_inferiors): Move lower in the file. Clear the DLL
9980 list.
9981 (free_one_dll, match_dll, loaded_dll, unloaded_dll, clear_list): New.
9982 * remote-utils.c (prepare_resume_reply): Check dlls_changed.
9983 (xml_escape_text): New.
9984 * server.c (handle_query): Handle qXfer:libraries:read. Report it
9985 for qSupported.
9986 (handle_v_cont): Report errors.
9987 (gdbserver_version): Update.
9988 (main): Correct size of own_buf. Do not report initial DLL events.
9989 * server.h (struct dll_info, all_dlls, dlls_changed, loaded_dll)
9990 (unloaded_dll, xml_escape_text): New.
9991 * win32-low.c (enum target_waitkind): Update comments.
9992 (win32_add_one_solib, get_image_name, winapi_EnumProcessModules)
9993 (winapi_GetModuleInformation, winapi_GetModuleFileNameExA)
9994 (win32_EnumProcessModules, win32_GetModuleInformation)
9995 (win32_GetModuleFileNameExA, load_psapi, psapi_get_dll_name)
9996 (winapi_CreateToolhelp32Snapshot, winapi_Module32First)
9997 (winapi_Module32Next, win32_CreateToolhelp32Snapshot)
9998 (win32_Module32First, win32_Module32Next, load_toolhelp)
9999 (toolhelp_get_dll_name, handle_load_dll, handle_unload_dll): New.
10000 (get_child_debug_event): Handle DLL events.
10001 (win32_wait): Likewise.
10002
0d37add9
DJ
100032007-07-12 Daniel Jacobowitz <dan@codesourcery.com>
10004
10005 * configure.srv: Set srv_linux_regsets for sh*-*-linux*.
10006 * linux-sh-low.c (sh_fill_gregset, target_regsets): New.
10007
45e2715e
PA
100082007-07-08 Pedro Alves <pedro_alves@portugalmail.pt>
10009
10010 * win32-low.c (handle_output_debug_string): Ignore event if not
10011 waiting.
10012
c5674cf1
PA
100132007-07-08 Pedro Alves <pedro_alves@portugalmail.pt>
10014
10015 * win32-arm-low.c (arm_wince_breakpoint): Fix typo.
10016
2bbe3cc1
DJ
100172007-07-03 Daniel Jacobowitz <dan@codesourcery.com>
10018
10019 * remote-utils.c (look_up_one_symbol): Handle 'm' packets.
10020
ae13219e
DJ
100212007-07-02 Daniel Jacobowitz <dan@codesourcery.com>
10022
10023 * inferiors.c (change_inferior_id): Add comment.
10024 * linux-low.c (check_removed_breakpoint): Add an early
10025 prototype. Improve debug output.
10026 (linux_attach): Doc update.
10027 (linux_detach_one_process, linux_detach): Clean up before releasing
10028 each process.
10029 (send_sigstop, wait_for_sigstop): Improve comments and debug output.
10030 * linux-low.h (struct process_info): Doc improvement.
10031 * mem-break.c (delete_all_breakpoints): New.
10032 * mem-break.h (delete_all_breakpoints): New prototype.
10033 * thread-db.c (find_first_thread): New.
10034 (thread_db_create_event): Call it instead of
10035 thread_db_find_new_threads. Clean up unused variables.
10036 (maybe_attach_thread): Remove first thread handling.
10037 (thread_db_find_new_threads): Use find_first_thread.
10038 (thread_db_get_tls_address): Likewise.
10039
4105de34
DJ
100402007-06-27 Daniel Jacobowitz <dan@codesourcery.com>
10041
10042 * thread-db.c (thread_db_find_new_threads): Add prototype.
10043 (thread_db_create_event): Check for the main thread before adding
10044 a new thread.
10045 (maybe_attach_thread): Only enable event reporting if TID == 0.
10046 (thread_db_get_tls_address): Check for new threads.
10047
2b876972
DJ
100482007-06-20 Daniel Jacobowitz <dan@codesourcery.com>
10049
10050 * linux-low.c (linux_create_inferior): Try execv before execvp.
10051 * spu-low.c (spu_create_inferior): Likewise.
10052
7a245884
DJ
100532007-06-13 Mike Frysinger <vapier@gentoo.org>
10054
10055 * linux-low.c (linux_create_inferior): Change execv to execvp.
10056 * spu-low.c (spu_create_inferior): Likewies.
10057
117ce543
DJ
100582007-06-13 Daniel Jacobowitz <dan@codesourcery.com>
10059
10060 * Makefile.in (clean): Clean new files instead of deleted ones.
10061 (reg-mips.o, reg-mips.c, reg-mips64.o, reg-mips64.c): Delete.
10062 (mips-linux.o, mips-linux.c, mips64-linux.o, mips64-linux.c): New
10063 rules.
10064 * configure.srv: Specify XML files and new regformats for MIPS and
10065 MIPS64 GNU/Linux.
10066 * linux-mips-low.c (mips_num_regs): Set to only used registers.
10067 (mips_regmap): Do not fetch $0. Remove unused registers. Add
10068 an entry for the restart register.
10069 (mips_cannot_fetch_register, mips_cannot_store_register)
10070 (mips_reinsert_addr, mips_fill_fpregset, mips_store_fpregset): Update
10071 register names to match the XML descriptions.
10072 (mips_fill_gregset, mips_store_gregset): Likewise. Handle the
10073 restart register instead of $0.
10074
0e7f50da
UW
100752007-06-12 Ulrich Weigand <uweigand@de.ibm.com>
10076 Markus Deuling <deuling@de.ibm.com>
10077
10078 * remote-utils.c (decode_xfer_write): New function.
10079 * server.h (decode_xfer_write): Add prototype.
10080 * server.c (handle_query): Add PACKET_LEN argument. Support
10081 qXfer:spu:read and qXfer:spu:write packets.
10082 (main): Pass packet_len to handle_query.
10083 * spu-low.c (spu_target_ops): Add spu_proc_xfer_spu.
10084 * target.h (target_ops): Add qxfer_spu.
10085
374c1d38
UW
100862007-06-12 Ulrich Weigand <uweigand@de.ibm.com>
10087
10088 * spu-low.c (spu_proc_xfer_spu): Do not return failure when
10089 accessing non-seekable spufs files.
10090
bb63802a
UW
100912007-05-16 Markus Deuling <deuling@de.ibm.com>
10092
889bf7c5 10093 * server.c (handle_query): Add reply for qC packet.
bb63802a 10094
7390519e
PA
100952007-05-10 Pedro Alves <pedro_alves@portugalmail.pt>
10096 Leo Zayas <lerele@champenstudios@com>
10097
10098 * server.h (check_remote_input_interrupt_request): New function.
10099 * remote_utils.c (INVALID_DESCRIPTOR): New define.
10100 (remote_desc): Initialize with INVALID_DESCRIPTOR.
10101 (input_interrupt): Expose on USE_WIN32API too. Fix whitespace.
10102 (check_remote_input_interrupt_request): New function.
10103 * server.h (check_remote_input_interrupt_request): Declare.
3ecf0694 10104 * win32-low.c (winapi_DebugBreakProcess,
7390519e
PA
10105 winapi_GenerateConsoleCtrlEvent): New typedefs.
10106 (get_child_debug_event): Lower Win32 debug event polling from 1 sec
10107 to 250 ms.
10108 (win32_wait): Check for remote interrupt request
10109 with check_remote_input_interrupt_request.
10110 (win32_request_interrupt): New function.
10111 (win32_target_op): Set request_interrupt to win32_request_interrupt.
10112
34b34921
PA
101132007-05-10 Pedro Alves <pedro_alves@portugalmail.pt>
10114
10115 * win32-low.c (debug_registers_changed,
10116 debug_registers_used, CONTEXT_EXTENDED_REGISTERS,
10117 CONTEXT_FLOATING_POINT, CONTEXT_DEBUG_REGISTERS,
10118 CONTEXT_DEBUGGER, CONTEXT_DEBUGGER_DR): Delete.
10119 (thread_rec): Get context using the low target.
10120 (child_add_thread): Call thread_added on the low target,
10121 which does the same thing.
10122 (regptr): Delete.
10123 (do_initial_child_stuff): Remove debug registers references.
10124 Set context using the low target. Resume threads after
10125 setting the contexts.
10126 (child_continue): Remove dead variable. Remove debug
10127 registers references.
10128 (child_fetch_inferior_registers): Go through the low target.
10129 (do_child_store_inferior_registers): Remove.
10130 (child_store_inferior_registers): Go through the low target.
10131 (win32_resume): Remove debug registers references.
10132 Set context using the low target.
10133 (handle_exception): Change return type to void. Don't record
10134 context here. Set status to TARGET_WAITKIND_SPURIOUS on a
10135 first chance exception.
889bf7c5 10136 (get_child_debug_event): Change return type to void. Remove
34b34921
PA
10137 goto loop. Always return after waiting for debug event.
10138 (win32_wait): Convert to switch statement. Handle spurious
10139 events.
10140
10141 * win32-i386-low.c (debug_registers_changed,
10142 debug_registers_used): New.
10143 (initial_stuff): Rename to ...
10144 (i386_initial_stuff): ... this. Clear debug registers
10145 state variables.
10146 (store_debug_registers): Delete.
10147 (i386_get_thread_context): New.
10148 (load_debug_registers): Delete.
10149 (i386_set_thread_context): New.
10150 (i386_thread_added): New.
10151 (single_step): Rename to ...
10152 (i386_single_step): ... this.
10153 (do_fetch_inferior_registers): Rename to ...
10154 (i386_fetch_inferior_register): ... this.
10155 (i386_store_inferior_register): New.
10156 (the_low_target): Adapt to new interface.
10157
10158 * win32-arm-low.c (CONTEXT_FLOATING_POINT): Define.
10159 (arm_get_thread_context): New.
10160 (arm_set_thread_context): New.
10161 (regptr): New.
10162 (do_fetch_inferior_registers): Rename to ...
10163 (arm_fetch_inferior_register): ... this.
10164 (arm_store_inferior_register): New.
10165 (arm_wince_breakpoint): Reimplement as unsigned long.
10166 (arm_wince_breakpoint_len): Define.
10167 (the_low_target): Adapt to new interface.
10168
10169 * win32-low.h (target_ops): Remove regmap, store_debug_registers and
10170 load_debug_registers. Add get_thread_context, set_thread_context,
10171 thread_added and store_inferior_register. Rename
10172 fetch_inferior_registers to fetch_inferior_register.
10173 (regptr): Remove declaration.
10174
dd6953e1
PA
101752007-05-10 Pedro Alves <pedro_alves@portugalmail.pt>
10176
10177 * linux-low.c (linux_detach): Change return type to int. Return 0.
10178 * spu-low.c (spu_detach): Likewise.
10179
444d6139
PA
101802007-05-10 Pedro Alves <pedro_alves@portugalmail.pt>
10181
10182 * target.h (target_ops): Change return type of detach to int.
10183 Add join.
10184 (join_inferior): New.
10185 * server.c (main): Don't skip detach support on mingw32.
10186 If the inferior doesn't support detaching return error.
10187 Call join_inferior instead of using waitpid.
10188 * linux-low.c (linux_join): New.
10189 (linux_target_op): Add linux_join.
10190 * spu-low.c (spu_join): New.
10191 (spu_target_ops): Add spu_join.
10192 * win32-low.c (win32_detach): Adapt to new interface.
10193 Reopen current_process_handle before detaching. Issue a child
10194 resume before detaching.
10195 (win32_join): New.
10196 (win32_target_op): Add win32_join.
10197
1d5315fe
PA
101982007-05-10 Pedro Alves <pedro_alves@portugalmail.pt>
10199
10200 * win32-low.c (win32-attach): Fix return value.
10201 * target.h (target_ops): Describe ATTACH return values.
10202
bf914831
PA
102032007-05-10 Pedro Alves <pedro_alves@portugalmail.pt>
10204
10205 * win32-low.c (GETPROCADDRESS): Define.
10206 (winapi_DebugActiveProcessStop): Add WINAPI. typedef as pointer.
10207 (winapi_DebugSetProcessKillOnExit): Likewise.
10208 (win32_create_inferior): Force usage of ansi CreateProcessA.
10209 (win32_attach): Use GETPROCADDRESS.
10210 (win32_detach): Likewise.
10211
f72f3e60
PA
102122007-05-10 Pedro Alves <pedro_alves@portugalmail.pt>
10213
10214 * win32-low.c (win32_wait): Don't use WSTOPSIG.
10215
ed50f18f
PA
102162007-03-30 Pedro Alves <pedro_alves@portugalmail.pt>
10217
10218 * win32-low.c: Commit leftover changes from 2007-03-29.
10219
0c2ead7e
DJ
102202007-03-30 Daniel Jacobowitz <dan@codesourcery.com>
10221
10222 * i387-fp.c (struct i387_fsave, struct i387_fxsave): Make 16-bit
10223 fields short instead of int. Add explicit padding.
10224 (i387_cache_to_fsave): Remove unnecessary casts.
10225 (i387_fsave_to_cache): Doc fix.
10226 (i387_cache_to_fxsave): Remove unnecessary casts and masking.
10227
73725ff3
DJ
102282007-03-30 Daniel Jacobowitz <dan@codesourcery.com>
10229
10230 * i387-fp.c (i387_cache_to_fxsave): Reinitialize val2 before use.
10231 (i387_fxsave_to_cache): Check fp->ftag while building ftag value.
10232
d99f33d8
PA
102332007-03-29 Pedro Alves <pedro_alves@portugalmail.pt>
10234
10235 * configure.srv (arm*-*-mingw32ce*): Move near the other
10236 arm targets.
10237
68070c10
PA
102382007-03-29 Pedro Alves <pedro_alves@portugalmail.pt>
10239
2482afc6 10240 * configure.ac: Add errno checking.
68070c10
PA
10241 (AC_CHECK_HEADERS): Add errno.h, fcntl.h, signal.h,
10242 sys/file.h and malloc.h.
10243 (AC_CHECK_DECLS): Add perror.
10244 (srv_mingwce): Handle.
2482afc6 10245 * configure.srv (i[34567]86-*-cygwin*): Add
68070c10
PA
10246 win32-i386-low.o to srv_tgtobj.
10247 (i[34567]86-*-mingw*): Likewise.
10248 (arm*-*-mingw32ce*): Add case.
10249 * gdbreplay.c [HAVE_SYS_FILE_H, HAVE_SIGNAL_H,
10250 HAVE_FCNTL_H, HAVE_ERRNO_H, HAVE_MALLOC_H]: Check.
10251 [__MINGW32CE__] (strerror): New function.
10252 [__MINGW32CE__] (errno): Define to GetLastError.
10253 [__MINGW32CE__] (COUNTOF): New macro.
10254 (remote_open): Remove extra close call.
10255 * mem-break.c (delete_breakpoint_at): New function.
10256 * mem-break.h (delete_breakpoint_at): Declare.
10257 * remote-utils.c [HAVE_SYS_FILE_H, HAVE_SIGNAL_H,
10258 HAVE_FCNTL_H, HAVE_UNISTD_H, HAVE_ERRNO_H]: Check.
10259 [USE_WIN32API] (read, write): Add char* casts.
10260 * server.c [HAVE_UNISTD_H, HAVE_SIGNAL_H]: Check.
10261 * server.h: Include wincecompat.h on Windows CE.
10262 [HAVE_ERRNO_H]: Check.
10263 (perror): Declare if not declared.
10264 * utils.c: Add stdlib.h, errno.h and malloc.h includes.
10265 (perror_with_name): Remove errno declaration.
10266 * wincecompat.h: New.
10267 * wincecompat.c: New.
10268 * win32-low.h: New.
10269 * win32-arm-low.c: New.
10270 * win32-i386-low.c: New.
10271 (win32-low.c): Include mem-break.h and win32-low.h, and winnt.h.
10272 (OUTMSG2): Make it safe.
10273 (_T): New macro.
10274 (COUNTOF): New macro.
10275 (NUM_REGS): Get it from the low target.
10276 (CONTEXT_EXTENDED_REGISTERS, CONTEXT_FLOATING_POINT,
10277 CONTEXT_DEBUG_REGISTERS): Add fallbacks to 0.
10278 (thread_rec): Let low target handle debug registers.
10279 (child_add_thread): Likewise.
10280 (child_init_thread_list): Likewise.
10281 (continue_one_thread): Likewise.
10282 (regptr): New.
10283 (do_child_fetch_inferior_registers): Move to ...
10284 * win32-i386-low.c: ... here, and rename to ...
10285 (do_fetch_inferior_registers): ... this.
889bf7c5 10286 * win32-low.c (child_fetch_inferior_registers):
68070c10
PA
10287 Go through the low target.
10288 (do_child_store_inferior_registers): Use regptr.
10289 (strwinerror): New function.
10290 (win32_create_inferior): Handle Windows CE.
10291 Use strwinerror instead of strerror on Windows error
10292 codes. Add program to the error output.
10293 Don't close the main thread handle on Windows CE.
10294 (win32_attach): Use coredll.dll on Windows CE.
10295 (win32_kill): Close current process and current
10296 thread handles.
10297 (win32_detach): Use coredll.dll on Windows CE.
10298 (win32_resume): Let low target handle debug registers, and
10299 step request.
10300 (handle_exception): Add/Remove initial breakpoint. Avoid
10301 non-existant WSTOPSIG on Windows CE.
10302 (win32_read_inferior_memory): Cast to remove warning.
10303 (win32_arch_string): Go through the low target.
10304 (initialize_low): Call set_breakpoint_data with the low
10305 target's breakpoint.
10306 * win32-low.c (dr, FLAG_TRACE_BIT, FCS_REGNUM,
10307 FOP_REGNUM, mappings): Move to ...
10308 * win32-i386-low.c: ... here.
10309 * win32-low.c (win32_thread_info): Move to ...
10310 * win32-low.h: ... here.
10311 * Makefile.in (SFILES): Add win32-low.c, win32-i386-low.c,
10312 win32-arm-low.c and wincecompat.c.
10313 (all:): Add $EXEEXT.
10314 (install-only:): Likewise.
10315 (gdbserver:): Likewise.
10316 (gdbreplay:): Likewise.
10317 * config.in: Regenerate.
10318 * configure: Regenerate.
10319
41093d81
PA
103202007-03-28 Pedro Alves <pedro_alves@portugalmail.pt>
10321
10322 * win32-low.c: Rename typedef thread_info to
10323 win32_thread_info throughout.
10324
544afa54
PA
103252007-03-28 Pedro Alves <pedro_alves@portugalmail.pt>
10326
10327 * win32-i386-low.c: Rename to ...
10328 * win32-low.c: ... this.
10329 * configure.srv: Replace win32-i386-low.o with win32-low.o.
10330 * Makefile.in: Likewise.
10331
bce7165d
PA
103322007-03-27 Pedro Alves <pedro_alves@portugalmail.pt>
10333
10334 * remote-utils.c (monitor_output): Constify msg parameter.
10335 * server.h (monitor_output): Likewise.
10336 * win32-i386-low.c (handle_output_debug_string): New.
10337 (win32_kill): Handle OUTPUT_DEBUG_STRING_EVENT events using
10338 handle_output_debug_string.
10339 (get_child_debug_event): Likewise.
10340
506c7aa0
DJ
103412007-03-27 Mat Hostetter <mat@lcs.mit.edu>
10342
10343 * server.c (main): Correct strtoul check.
10344
42c81e2a
DJ
103452007-03-27 Jon Ringle <jon@ringle.org>
10346
10347 * linux-low.c: Check __ARCH_HAS_MMU__ also.
10348
9453113a
DJ
103492007-03-27 Brooks Moses <brooks.moses@codesourcery.com>
10350
10351 * Makefile.in: Add dummy "pdf" and "install-pdf" targets.
10352
64a69107
DJ
103532007-02-27 Daniel Jacobowitz <dan@codesourcery.com>
10354
10355 * terminal.h: Check HAVE_SGTTY_H.
10356
103572007-02-27 Mat Hostetter <mat@lcs.mit.edu>
6f8486da
DJ
10358
10359 * remote-utils.c (remote_open): Print out the assigned port number.
10360
c74d0ad8
DJ
103612007-02-26 Daniel Jacobowitz <dan@codesourcery.com>
10362
10363 * remote-utils.c (monitor_output): New function.
10364 * server.c (debug_threads): Define here.
10365 (monitor_show_help): New function.
10366 (handle_query): Handle qRcmd.
10367 (main): Do not handle 'd' packet.
10368 * server.h (debug_threads, remote_debug, monitor_output): Declare.
10369 * linux-low.c, spu-low.c, win32-i386-low.c: Remove definitions
10370 of debug_threads.
10371
de7c3b4a
PA
103722007-02-25 Pedro Alves <pedro_alves@portugalmail.pt>
10373
10374 * Makefile.in (EXEEXT): New.
10375 (clean): Use $(EXEEXT).
10376
ef57601b
PA
103772007-02-25 Pedro Alves <pedro_alves@portugalmail.pt>
10378
10379 * target.h (target_ops): Rename send_signal to request_interrupt,
10380 and remove enum target_signal parameter.
10381 * linux-low.c (linux_request_interrupt): Rename from
10382 linux_send_signal, and always send SIGINT.
10383 * spu-low.c (spu_request_interrupt): Rename from spu_send_signal,
10384 and always send SIGINT.
10385 * remote-utils.c (putpkt_binary): Call request_interrupt, instead
10386 of send_signal.
10387 (input_interrupt): Likewise.
10388
820f2bda
PA
103892007-02-25 Pedro Alves <pedro_alves@portugalmail.pt>
10390
10391 * server.c (get_features_xml): Check if target implemented
10392 arch_string.
10393 * win32-i386-low.c (win32_arch_string): New.
10394 (win32_target_ops): Add win32_arch_string as arch_string member.
10395
ab39bf24
UW
103962007-02-22 Markus Deuling <deuling@de.ibm.com>
10397
10398 * spu-low.c (spu_arch_string): New.
10399 (spu_target_ops): Add spu_arch_string.
10400
61ff6e04
DJ
104012007-02-16 Daniel Jacobowitz <dan@codesourcery.com>
10402
10403 * remote-utils.c: Remove HAVE_TERMINAL_H check.
10404 * configure.ac: Do not check for terminal.h.
10405 * configure, config.in: Regenerated.
10406
fb1e4ffc
DJ
104072007-02-08 Daniel Jacobowitz <dan@codesourcery.com>
10408
10409 * Makefile.in (OBS): Add $(XML_BUILTIN).
10410 (XML_DIR, XML_TARGET, XML_FILES, XML_BUILTIN): New.
10411 (clean): Update.
10412 (target.xml, xml-builtin.c, stamp-xml, arm-with-iwmmxt.o)
10413 (arm-with-iwmmxt.c): New.
10414 * config.in, configure: Regenerate.
10415 * configure.ac: Check for iWMMXt. Handle srv_xmltarget,
10416 srv_xmlbuiltin, and srv_xmlfiles. Define USE_XML.
10417 * configure.srv: Mention srv_xmltarget and srv_xmlfiles.
10418 (arm*-*-linux*): Add iWMMXt and regset support.
10419 * linux-arm-low.c (PTRACE_GETWMMXREGS, PTRACE_SETWMMXREGS): Define.
10420 (arm_fill_gregset, arm_store_gregset, arm_fill_wmmxregset)
10421 (arm_store_wmmxregset, target_regsets): New.
10422 * server.c (get_features_xml): Take annex argument. Check builtin
10423 XML documents.
10424 (handle_query): Handle multiple annexes.
10425
0f48aa01
DJ
104262007-01-29 Daniel Jacobowitz <dan@codesourcery.com>
10427
10428 * remote-utils.c [USE_WIN32API] (read, write): Define.
10429 (putpkt_binary, input_interrupt, readchar, getpkt): Use read and
10430 write.
10431
23181151
DJ
104322007-01-09 Daniel Jacobowitz <dan@codesourcery.com>
10433
10434 * linux-i386-low.c (the_low_target): Set arch_string.
10435 * linux-x86-64-low.c (the_low_target): Likewise.
10436 * linux-low.c (linux_arch_string): New.
10437 (linux_target_ops): Add it.
10438 * linux-low.h (struct linux_target_ops): Add arch_string.
10439 * server.c (write_qxfer_response): Use const void * for DATA.
10440 (get_features_xml): New.
10441 (handle_query): Handle qXfer:features:read. Report it for qSupported.
10442 * target.h (struct target_ops): Add arch_string method.
10443
9d606399
DJ
104442007-01-03 Denis Pilat <denis.pilat@st.com>
10445 Daniel Jacobowitz <dan@codesourcery.com>
10446
10447 * linux-low.c (linux_kill): Handle being called with no threads.
10448 * win32-i386-low.c (win32_kill): Likewise.
10449 (get_child_debug_event): Clear current_process_handle.
10450
104512006-12-30 Denis PILAT <denis.pilat@st.com>
8264bb58
DJ
10452 Daniel Jacobowitz <dan@codesourcery.com>
10453
10454 * remote-utils.c (remote_open): Check the type of specified
10455 serial port devices before opening them.
10456 * server.c (main): Kill the inferior if an error occurs during
10457 the first remote_open.
10458
a5e13d24
DJ
104592006-12-05 Markus Deuling <deuling@de.ibm.com>
10460
10461 * README: Update supported targets.
10462
186947f7
DJ
104632006-11-28 Daniel Jacobowitz <dan@codesourcery.com>
10464
10465 * Makefile.in (clean): Remove reg-mips64.c.
10466 (reg-mips64.c, reg-mips64.o): New rules.
10467 * configure.srv: Handle mips64. Include regset support for mips.
10468 * linux-mips-low.c (union mips_register): New.
10469 (mips_get_pc, mips_set_pc, mips_reinsert_addr): Use it.
10470 (mips_breakpoint, mips_breakpoint_at): Use int.
10471 (mips_collect_register, mips_supply_register)
10472 (mips_collect_register_32bit, mips_supply_register_32bit)
10473 (mips_fill_gregset, mips_store_gregset, mips_fill_fpregset)
10474 (mips_store_fpregset, target_regsets): New.
10475 * thread-db.c (thread_db_get_tls_address): Use uintptr_t.
10476
a13e2c95
UW
104772006-11-22 Ulrich Weigand <uweigand@de.ibm.com>
10478
10479 * configure.srv: Add target "spu*-*-*".
10480 * Makefile.in (clean): Remove reg-spu.c.
10481 (reg-spu.c, reg-spu.o, spu-low.o): Add dependencies.
10482 * spu-low.c: New file.
10483
cb7283db
DJ
104842006-11-16 Daniel Jacobowitz <dan@codesourcery.com>
10485
10486 * configure.ac: Correct td_thr_tls_get_addr test.
10487 * configure: Regenerated.
10488
89be2091
DJ
104892006-11-16 Daniel Jacobowitz <dan@codesourcery.com>
10490
10491 * linux-low.c (linux_wait_for_event): Reformat. Use the
10492 pass_signals array.
10493 * remote-utils.c (decode_address_to_semicolon): New.
10494 * server.c (pass_signals, handle_general_set): New.
10495 (handle_query): Mention QPassSignals for qSupported.
10496 (main): Call handle_general_set.
10497 * server.h (pass_signals, decode_address_to_semicolon): New.
10498
000ef4f0
DJ
104992006-11-06 Daniel Jacobowitz <dan@codesourcery.com>
10500
10501 * server.c (handle_query): Correct error handling for read_auxv.
10502
b7149293
UW
105032005-10-19 Ulrich Weigand <uweigand@de.ibm.com>
10504
10505 * configure.srv [s390-*-linux*, s390x-*-linux*]: Set srv_linux_regsets
10506 and srv_linux_thread_db to yes.
10507 * linux-s390-low.c (s390_fill_gregset): New function.
10508 (target_regsets): Define data structure.
10509
dae5f5cf
DJ
105102006-10-17 Daniel Jacobowitz <dan@codesourcery.com>
10511
10512 * acinclude.m4 (SRV_CHECK_TLS_GET_ADDR): New.
10513 * configure.ac: Use it. Define HAVE_TD_THR_TLS_GET_ADDR.
10514 * config.in, configure: Regenerated.
10515 * inferiors.c (gdb_id_to_thread): New function.
10516 (gdb_id_to_thread_id): Use it.
10517 * linux-low.c (linux_target_ops): Use thread_db_get_tls_address.
10518 * linux-low.h (struct process_info): Add th member.
10519 (thread_db_get_tls_address): New prototype.
10520 * remote-utils.c (decode_address): Make non-static.
10521 * server.c (handle_query): Handle qGetTLSAddr.
10522 * server.h (gdb_id_to_thread, decode_address): New prototypes.
10523 * target.h (struct target_ops): Add get_tls_address.
10524 * thread-db.c (maybe_attach_thread): Save the thread handle.
10525 (thread_db_get_tls_address): New.
10526
32ca6d61
DJ
105272006-09-28 Daniel Jacobowitz <dan@codesourcery.com>
10528
10529 * linux-low.c (PTRACE_GETSIGINFO, PTRACE_SETSIGINFO): Define.
10530 (linux_resume_one_process): Take a siginfo_t *. Update all
10531 callers. Queue it if necessary. Use PTRACE_SETSIGINFO.
10532 (struct pending_signals): Add a siginfo_t.
10533 (linux_wait_for_process): Always set last_status.
10534 (linux_wait_for_event): Use PTRACE_GETSIGINFO.
10535 (linux_queue_one_thread): Use PTRACE_GETSIGINFO.
10536 * linux-low.h (struct process_info): Add last_status.
10537
5ffff7c1
DJ
105382006-09-21 Daniel Jacobowitz <dan@codesourcery.com>
10539
10540 * remote-utils.c (try_rle): New function.
10541 (putpkt_binary): Use it.
10542
8695c747
DJ
105432006-08-19 Daniel Jacobowitz <dan@codesourcery.com>
10544
10545 * Makefile.in (clean): Clean reg-x86-64-linux.c.
10546 (reg-x86-64-linux.o, reg-x86-64-linux.c): New.
10547 * configure.srv (x86_64-*-linux*): Use reg-x86-64-linux.o.
10548 * linux-x86-64-low.c (x86_64_regmap): Include ORIG_RAX.
10549 (x86_64_fill_gregset, x86_64_store_gregset): Skip floating
10550 point registers.
10551
290fadea
RS
105522006-08-08 Richard Sandiford <richard@codesourcery.com>
10553
10554 * server.c (terminal_fd): New variable.
10555 (old_foreground_pgrp): Likewise.
10556 (restore_old_foreground_pgrp): New function.
10557 (start_inferior): Record the terminal file descriptor in terminal_fd
10558 and its original foreground group in old_foreground_pgrp. Register
10559 restore_old_foreground_pgrp with atexit().
10560
9f2e1e63
DJ
105612006-07-26 Daniel Jacobowitz <dan@codesourcery.com>
10562
10563 * server.c (handle_query): Correct qPart to qXfer.
10564
b80864fb
DJ
105652006-07-22 Daniel Jacobowitz <dan@codesourcery.com>
10566
10567 * configure.ac: Check for more headers which are missing on
10568 Windows. Automatically supply -lwsock32 and USE_WIN32API.
10569 * configure.srv: Add Cygwin and mingw32.
10570 * remote-utils.c: Don't include headers unconditionally which
10571 are missing on mingw32. Include <winsock.h> for mingw32.
10572 (remote_open): Adjust for mingw32 support. Flush
10573 standard error after writing to it.
10574 (remote_close, putpkt_binary, input_interrupt, block_async_io)
10575 (unblock_async_io, enable_async_io, disable_async_io)
10576 (readchar, getpkt): Update for Winsock support.
10577 (prepare_resume_reply): Expect a protocol signal number.
10578 * server.c: Disable <sys/wait.h> on mingw32.
10579 (start_inferior): Adjust for mingw32 support. Flush
10580 standard error after writing to it.
10581 (attach_inferior): Likewise. Use protocol signal
10582 numbers.
10583 (main): Skip 'D' packet on mingw32. Use protocol signal numbers
10584 and names.
10585 * win32-i386-low.c: New file.
10586 * Makefile.in (XM_CLIBS): Set.
10587 (gdbserver, gdbreplay): Use $(INTERNAL_CFLAGS).
10588 (win32-i386-low.o): New dependency rule.
10589 * linux-low.c (linux_wait): Use target signal numbers.
10590 * target.h (struct target_ops): Doc fix.
10591 * server.h (target_signal_to_name): New prototype.
10592 * gdbreplay.c: Don't include headers unconditionally which
10593 are missing on mingw32. Include <winsock.h> for mingw32.
10594 (remote_close, remote_open): Adjust for Winsock support.
10595 * configure, config.in: Regenerated.
10596
0876f84a
DJ
105972006-07-12 Daniel Jacobowitz <dan@codesourcery.com>
10598
10599 * server.c (decode_xfer_read, write_qxfer_response): New.
10600 (handle_query): Take a packet length argument. Handle
10601 qXfer:auxv:read instead of qPart:auxv:read. Mention it in
10602 the qSupported response.
10603 (main): Update call to handle_query.
10604
01f9e8fa
DJ
106052006-06-22 Daniel Jacobowitz <dan@codesourcery.com>
10606
10607 * remote-utils.c (remote_escape_output, remote_unescape_input): New.
10608 (putpkt_binary): Renamed from putpkt and adjusted for binary
10609 data.
10610 (putpkt): New wrapper for putpkt_binary.
10611 (readchar): Don't mask off the high bit.
10612 (decode_X_packet): New function.
10613 * server.c (main): Call putpkt_binary if a handler sets the packet
10614 length. Save the length of the incoming packet. Handle 'X'.
10615 * server.h (gdb_byte, remote_escape_output, decode_X_packet): New.
10616
be2a5f71
DJ
106172006-06-21 Daniel Jacobowitz <dan@codesourcery.com>
10618
10619 * server.c (handle_query): Handle qSupported.
10620
ea025f5f
DJ
106212006-05-30 Daniel Jacobowitz <dan@codesourcery.com>
10622
10623 * remote-utils.c (all_symbols_looked_up): New variable.
10624 (look_up_one_symbol): Check it.
10625 * server.h (look_up_one_symbol): New declaration.
10626 * thread-db.c (thread_db_init): Set all_symbols_looked_up.
10627
9308fc88
DJ
106282006-05-30 Daniel Jacobowitz <dan@codesourcery.com>
10629
10630 * Makefile.in (linux-arm-low.o): Update dependencies.
66f338c7 10631 * linux-arm-low.c: Include "gdb_proc_service.h".
9308fc88
DJ
10632 (PTRACE_GET_THREAD_AREA): Define.
10633 (ps_get_thread_area): New function.
10634
52fb6437
NS
106352006-05-09 Nathan Sidwell <nathan@codesourcery.com>
10636
10637 * configure.srv (m68k*-*-uclinux*): New target.
10638 * linux-low.c (linux_create_inferior): Use vfork on mmuless systems.
10639 (linux_resume_one_process): Remove extraneous cast.
10640 (linux_read_offsets): New.
10641 (linux_target_op): Add linux_read_offsets on mmuless systems.
10642 * server.c (handle_query): Add qOffsets logic.
10643 * target.h (struct target_ops): Add read_offsets.
10644
21b0f40c
DJ
106452006-03-15 Daniel Jacobowitz <dan@codesourcery.com>
10646
10647 * linux-mips-low.c: Include <sys/ptrace.h> and "gdb_proc_service.h".
10648 (PTRACE_GET_THREAD_AREA): Define.
10649 (ps_get_thread_area): New function.
10650 * Makefile.in (linux-i386-low.o, linux-mips-low.o)
10651 (linux-x86-64-low.o): Update.
10652
0050a760
DJ
106532006-03-15 Daniel Jacobowitz <dan@codesourcery.com>
10654
10655 * configure.ac: Remove checks for prfpregset_t.
10656 * gdb_proc_service.h: New file.
10657 * linux-i386-low.c, linux-x86-64-low.c, thread-db.c: Use the
10658 new "gdb_proc_service.h".
10659 * proc-service.c: Likewise.
10660 (ps_pglobal_lookup, ps_pdread, ps_pdwrite): Use psaddr_t.
10661 (ps_lgetfpregs, ps_lsetfpregs): Use a void* argument.
10662 * Makefile.in (gdb_proc_service_h): Updated.
10663 * configure, config.in: Regenerated.
10664
b92a518e
DJ
106652006-03-03 Daniel Jacobowitz <dan@codesourcery.com>
10666
10667 * remote-utils.c (prepare_resume_reply): Move declaration
10668 of gdb_id_from_wait to the top of the block.
10669
545587ee
DJ
106702006-02-15 Daniel Jacobowitz <dan@codesourcery.com>
10671
10672 * linux-low.c (regsets_store_inferior_registers): Read the regset
10673 from the target before filling it.
10674
9db87ebd
DJ
106752006-02-08 Daniel Jacobowitz <dan@codesourcery.com>
10676
10677 * server.c (attach_inferior): Return SIGTRAP for a successful
10678 attach.
10679
dd24457d
DJ
106802006-02-01 Daniel Jacobowitz <dan@codesourcery.com>
10681
10682 * Makefile.in (OBS): Add version.o.
10683 (STAGESTUFF): Delete.
10684 (version.o): Add dependencies.
10685 (version.c): Replace rule.
10686 (clean): Remove version.c.
10687 * server.c (gdbserver_version): New.
10688 (gdbserver_usage): Use printf.
10689 (main): Handle --version and --help.
10690 * server.h (version, host_name): Add declarations.
10691
6f0f660e
EZ
106922005-12-23 Eli Zaretskii <eliz@gnu.org>
10693
889bf7c5
PA
10694 * linux-arm-low.c:
10695 * linux-arm-low.c:
10696 * inferiors.c:
10697 * i387-fp.h:
10698 * i387-fp.c:
10699 * gdbreplay.c:
10700 * regcache.c:
10701 * proc-service.c:
10702 * mem-break.h:
10703 * mem-break.c:
10704 * linux-x86-64-low.c:
10705 * linux-sh-low.c:
10706 * linux-s390-low.c:
10707 * linux-ppc64-low.c:
10708 * linux-ppc-low.c:
10709 * linux-mips-low.c:
10710 * linux-m68k-low.c:
10711 * linux-m32r-low.c:
10712 * linux-low.h:
10713 * linux-low.c:
10714 * linux-ia64-low.c:
10715 * linux-i386-low.c:
10716 * linux-crisv32-low.c:
10717 * thread-db.c:
10718 * terminal.h:
10719 * target.h:
10720 * target.c:
10721 * server.h:
10722 * server.c:
10723 * remote-utils.c:
10724 * regcache.h:
10725 * utils.c:
10726 * Makefile.in:
10727 * configure.ac:
6f0f660e
EZ
10728 * gdbserver.1: Add (C) after Copyright. Update the FSF
10729 address.
10730
9d1fb177
DJ
107312005-11-13 Daniel Jacobowitz <dan@codesourcery.com>
10732
10733 * linux-arm-low.c (arm_eabi_breakpoint): New variable.
10734 (arm_breakpoint_at): Recognize both breakpoints.
10735 (the_low_target): Use the correct breakpoint instruction.
10736
011a70c2
DJ
107372005-11-02 Daniel Jacobowitz <dan@codesourcery.com>
10738
10739 * configure.srv (x86_64-*-linux*): Turn on thread_db support.
10740 * linux-x86-64-low.c (x86_64_breakpoint, x86_64_breakpoint_len)
10741 (x86_64_get_pc, x86_64_set_pc, x86_64_breakpoint_at): New.
10742 (the_low_target): Update.
10743
7fb85e41
AS
107442005-10-25 Andreas Schwab <schwab@suse.de>
10745
10746 * server.c (main): Allocate mem_buf with PBUFSIZ bytes.
10747
10748 * linux-ia64-low.c (ia64_regmap): Remove NAT registers.
10749 (ia64_num_regs): Reduce to 462.
10750
3db0444b
DJ
107512005-09-17 Daniel Jacobowitz <dan@codesourcery.com>
10752
10753 * acinclude.m4: Correct quoting.
10754 * aclocal.m4: Regenerated.
10755
10756 Suggested by SZOKOVACS Robert <szo@ies.hu>:
10757 * thread-db.c (thread_db_err_str): Handle TD_VERSION.
10758 (thread_db_init): Call thread_db_err_str.
10759 * configure.ac: Check for TD_VERSION.
10760 * config.in, configure: Regenerated.
10761
bee0189a
DJ
107622005-07-31 Kaveh R. Ghazi <ghazi@caip.rutgers.edu>
10763
10764 * server.h (error, fatal, warning): Add ATTR_FORMAT.
10765
e9d25b98
DJ
107662005-07-13 Daniel Jacobowitz <dan@codesourcery.com>
10767
10768 * configure.ac: Define HAVE_LINUX_REGSETS even if PTRACE_GETREGS
10769 is not available. Define HAVE_PTRACE_GETREGS if it is.
10770 * config.in, configure: Regenerated.
10771 * configure.srv: Set srv_linux_regsets for PowerPC and PowerPC64.
10772 * linux-i386-low.c, linux-m68k-low.c: Update to use
10773 HAVE_PTRACE_GETREGS.
10774 * linux-low.c (regsets_fetch_inferior_registers)
10775 (regsets_store_inferior_registers): Only return 0 if we processed
10776 GENERAL_REGS.
10777 * linux-ppc-low.c (ppc_fill_gregset, target_regsets): New.
10778 * linux-ppc64-low.c (ppc_fill_gregset, target_regsets): New.
10779
a06660f7
DJ
107802005-07-13 Daniel Jacobowitz <dan@codesourcery.com>
10781
10782 * inferiors.c (struct thread_info): Add gdb_id.
10783 (add_thread): Add gdb_id argument.
10784 (thread_id_to_gdb_id, thread_to_gdb_id, gdb_id_to_thread_id): New.
10785 * linux-low.c (linux_create_inferior, linux_attach_lwp): Update
10786 calls to add_thread.
10787 * remote-utils.c (prepare_resume_reply: Use thread_to_gdb_id.
10788 * server.c (handle_query): Use thread_to_gdb_id.
10789 (handle_v_cont, main): Use gdb_id_to_thread_id.
10790 * server.h (add_thread): Update prototype.
10791 (thread_id_to_gdb_id, thread_to_gdb_id, gdb_id_to_thread_id): New
10792 prototypes.
10793
5a1f5858
DJ
107942005-07-13 Daniel Jacobowitz <dan@codesourcery.com>
10795
10796 * linux-low.c (fetch_register, usr_store_inferior_registers): Handle
10797 left-padded registers.
10798 * linux-low.h (struct linux_target_ops): Add left_pad_xfer.
10799 * linux-ppc64-low.c (the_low_target): Set left_pad_xfer.
10800
e122f1f5
SE
108012005-07-01 Steve Ellcey <sje@cup.hp.com>
10802
10803 * configure.ac (BFD_NEED_DECLARATION): Replace with AC_CHECK_DECLS.
10804 * configure: Regenerate.
10805 * config.in: Regenerate.
10806 * server.h (NEED_DECLARATION_STRERROR):
10807 Replace with !HAVE_DECL_STRERROR.
10808
d592fa2f
DJ
108092005-06-16 Daniel Jacobowitz <dan@codesourcery.com>
10810
10811 * linux-low.c (linux_wait, linux_send_signal): Don't test
10812 an unsigned long variable for > 0 if it could be MAX_ULONG.
10813 * server.c (myresume): Likewise.
10814 * target.c (set_desired_inferior): Likewise.
10815
ccbd4912
MK
108162005-06-13 Mark Kettenis <kettenis@gnu.org>
10817
10818 * configure.ac: Simplify and improve check for socklen_t.
10819 * configure, config.in: Regenerate.
10820
f450004a
DJ
108212005-06-12 Daniel Jacobowitz <dan@codesourcery.com>
10822
10823 * acconfig.h: Remove.
10824 * configure.ac: Add a test for socklen_t. Use three-argument
10825 AC_DEFINE throughout.
10826 * config.in: Regenerated using autoheader 2.59.
10827 * configure: Regenerated.
10828
10829 * gdbreplay.c (socklen_t): Provide a default.
10830 (remote_open): Use socklen_t.
10831 * remote-utils.c (socklen_t): Provide a default.
10832 (remote_open): Use socklen_t.
10833 (convert_int_to_ascii, convert_ascii_to_int, decode_M_packet): Use
10834 unsigned char.
10835
10836 * i387-fp.c (struct i387_fsave, struct i387_fxsave): Use unsigned
10837 char for buffers.
10838 * linux-low.c (linux_read_memory, linux_write_memory)
10839 (linux_read_auxv): Likewise.
10840 * mem-break.c (breakpoint_data, set_breakpoint_data, check_mem_read)
10841 (check_mem_write): Likewise.
10842 * mem-break.h (set_breakpoint_data, check_mem_read, check_mem_write):
10843 Likewise.
10844 * regcache.c (struct inferior_rgcache_data, registers_to_string)
10845 (registers_from_string, register_data): Likewise.
10846 * server.c (handle_query, main): Likewise.
10847 * server.h (convert_ascii_to_int, convert_int_to_ascii)
10848 (decode_M_packet): Likewise.
10849 * target.c (read_inferior_memory, write_inferior_memory): Likewise.
10850 * target.h (struct target_ops): Update read_memory, write_memory,
10851 and read_auxv.
10852 (read_inferior_memory, write_inferior_memory): Update.
10853 * linux-low.h (struct linux_target_ops): Change type of breakpoint
10854 to unsigned char *.
10855 * linux-arm-low.c, linux-cris-low.c, linux-crisv32-low.c,
10856 linux-i386-low.c, linux-m32r-low.c, linux-m68k-low.c,
10857 linux-mips-low.c, linux-ppc-low.c, linux-ppc64-low.c,
10858 linux-s390-low.c, linux-sh-low.c: Update for changes in
10859 read_inferior_memory and the_low_target->breakpoint.
10860
eee84df1
DJ
108612005-05-28 Daniel Jacobowitz <dan@codesourcery.com>
10862
10863 * Makefile.in (SFILES): Add linux-ppc64-low.c.
10864 (linux-ppc64-low.o, reg-ppc64.c, reg-ppc64.o): New targets.
10865 * configure.srv: Add powerpc64-*-linux*.
10866 * linux-ppc64-low.c: New file.
10867
45b134e5
OF
108682005-05-23 Orjan Friberg <orjanf@axis.com>
10869
10870 * linux-cris-low.c: New file with support for CRIS.
10871 * linux-crisv32-low.c: Ditto for CRISv32.
10872 * Makefile.in (SFILES): Add linux-cris-low.c, linux-crisv32-low.c.
10873 (clean): Add reg-cris.c and reg-crisv32.c.
889bf7c5 10874 Add linux-cris-low.o, linux-crisv32-low.o, reg-cris.o, reg-cris.c,
45b134e5
OF
10875 reg-crisv32.o, and reg-crisv32.c to make rules.
10876 * configure.srv: Add cris-*-linux* and crisv32-*-linux* to list of
10877 recognized targets.
10878
48d93c75
UW
108792005-05-16 Ulrich Weigand <uweigand@de.ibm.com>
10880
10881 * linux-low.c (fetch_register): Ensure buffer size is a multiple
10882 of sizeof (PTRACE_XFER_TYPE).
10883 (usr_store_inferior_registers): Likewise. Zero out excess bytes.
10884
e013ee27
OF
108852005-05-12 Orjan Friberg <orjanf@axis.com>
10886
889bf7c5 10887 * target.h (struct target_ops): Add insert_watchpoint,
e013ee27
OF
10888 remove_watchpoint, stopped_by_watchpoint, stopped_data_address function
10889 pointers for hardware watchpoint support.
10890 * linux-low.h (struct linux_target_ops): Ditto.
10891 * linux-low.c (linux_insert_watchpoint, linux_remove_watchpoint)
10892 (linux_stopped_by_watchpoint, linux_stopped_data_address): New. Add
10893 to linux_target_ops.
10894 * remote-utils.c (prepare_resume_reply): Add watchpoint information to
10895 reply packet.
10896 * server.c (main): Recognize 'Z' and 'z' packets.
10897
b0ded00b
UW
108982005-05-10 Ulrich Weigand <uweigand@de.ibm.com>
10899
10900 * linux-s390-low.c (s390_breakpoint, s390_breakpoint_len): Define.
10901 (s390_get_pc, s390_set_pc, s390_breakpoint_at): New functions.
10902 (the_low_target): Add new members.
10903
8643e2ad
DJ
109042005-05-04 Daniel Jacobowitz <dan@codesourcery.com>
10905
10906 * proc-service.c (ps_lgetregs): Search all_processes instead of
10907 all_threads.
10908
fc620387
DJ
109092005-05-04 Daniel Jacobowitz <dan@codesourcery.com>
10910
10911 * server.c (start_inferior): Change return type to int.
10912 (attach_inferior): Change sigptr to int *.
10913 (handle_v_cont, handle_v_requests): Change signal to int *.
10914 (main): Change signal to int.
10915
109162005-04-15 Kei Sakamoto <sakamoto.kei@renesas.com>
7cfbc4a0
KI
10917
10918 * Makefile.in: Add linux-m32r-low.o, reg-m32r.c and reg-m32r.o.
10919 * configure.srv: Add m32r*-*-linux*.
10920 * linux-m32r-low.c: New file.
10921
e0e76420
DJ
109222005-03-04 Daniel Jacobowitz <dan@codesourcery.com>
10923
10924 * Makefile.in (stamp-h): Set CONFIG_HEADERS explicitly.
10925
a1928bad
DJ
109262005-03-03 Daniel Jacobowitz <dan@codesourcery.com>
10927
10928 * inferiors.c (change_inferior_id, add_thread, find_inferior_id):
10929 Take unsigned long arguments for PIDs.
10930 * linux-low.c (add_process, linux_attach_lwp, linux_attach)
10931 (linux_thread_alive, linux_wait_for_event, kill_lwp, send_sigstop)
10932 (wait_for_sigstop, linux_resume_one_process)
10933 (regsets_fetch_inferior_registers, linux_send_signal)
10934 (linux_read_auxv): Likewise. Update the types of variables holding
10935 PIDs. Update format string specifiers.
10936 * linux-low.h (struct process_info, linux_attach_lwp): Likewise.
10937 * remote-utils.c (prepare_resume_reply): Likewise.
10938 * server.c (cont_thread, general_thread, step_thread)
10939 (thread_from_wait, old_thread_from_wait, signal_pid): Change type to
10940 unsigned long.
10941 (handle_query): Update format specifiers.
10942 (handle_v_cont, main): Use strtoul for thread IDs.
10943 * server.h (struct inferior_list_entry): Use unsigned long for ID.
10944 (add_thread, find_inferior_id, change_inferior_id, cont_thread)
10945 (general_thread, step_thread, thread_from_wait)
10946 (old_thread_from_wait): Update.
10947 * target.h (struct thread_resume): Use unsigned long for THREAD.
10948 (struct target_ops): Use unsigned long for arguments to attach and
10949 thread_alive.
10950
dcdb98d2
DJ
109512005-02-24 Daniel Jacobowitz <dan@codesourcery.com>
10952
10953 * acinclude.m4: Include bfd/bfd.m4 directly.
10954 * configure.ac: Use AC_ARG_PROGRAM. Suggested by Aron Griffis
10955 <agriffis@toolchain.org>.
10956 * aclocal.m4, configure: Regenerated.
10957
bec39cab
AC
109582005-01-07 Andrew Cagney <cagney@gnu.org>
10959
10960 * configure.ac: Rename configure.in, require autoconf 2.59.
10961 * configure: Re-generate.
10962
434c4c77
DJ
109632004-12-08 Daniel Jacobowitz <dan@debian.org>
10964
10965 * acinclude.m4 (SRV_CHECK_THREAD_DB): Add ps_get_thread_area. Reset
10966 LIBS when finished.
10967 * aclocal.m4: Regenerated.
10968 * configure: Regenerated.
10969
db1d3e1b
AS
109702004-11-21 Andreas Schwab <schwab@suse.de>
10971
10972 * linux-m68k-low.c (m68k_num_gregs): Define.
10973 (m68k_fill_gregset, m68k_store_gregset, m68k_fill_fpregset)
10974 (m68k_store_fpregset, target_regsets) [HAVE_LINUX_REGSETS]: New.
10975 (m68k_breakpoint, m68k_breakpoint_len, m68k_get_pc, m68k_set_pc)
10976 (m68k_breakpoint_at): New. Add to the_low_target.
10977
10978 * configure.srv (m68*-*-linux*): Set srv_linux_regsets and
10979 srv_linux_thread_db to yes.
10980
43360365
JB
109812004-10-20 Joel Brobecker <brobecker@gnat.com>
10982
10983 * linux-x86-64-low.c (ARCH_SET_GS): Add definition if missing.
10984 (ARCH_SET_FS): Likewise.
10985 (ARCH_GET_FS): Likewise.
10986 (ARCH_GET_GS): Likewise.
10987
fd500816
DJ
109882004-10-16 Daniel Jacobowitz <dan@debian.org>
10989
10990 * linux-i386-low.c (ps_get_thread_area): New.
10991 * linux-x86-64-low.c (ps_get_thread_area): New.
10992 * linux-low.c: Include <sys/syscall.h>.
10993 (linux_kill_one_process): Don't kill the first thread here.
10994 (linux_kill): Kill the first thread here.
10995 (kill_lwp): New function.
10996 (send_sigstop, linux_send_signal): Use it.
10997 * proc-service.c: Clean up #ifdefs.
10998 (fpregset_info): Delete.
10999 (ps_lgetregs): Update and enable implementation.
11000 (ps_lsetregs, ps_lgetfpregs, ps_lsetfpregs): Remove disabled
11001 implementations.
11002 * remote-utils.c (struct sym_cache, symbol_cache): New.
11003 (input_interrupt): Print a clearer message.
11004 (async_io_enabled): New variable.
11005 (enable_async_io, disable_async_io): Use it. Update comments.
11006 (look_up_one_symbol): Use the symbol cache.
11007 * thread-db.c (thread_db_look_up_symbols): New function.
11008 (thread_db_init): Update comments. Call thread_db_look_up_symbols.
11009
f6de3c42
DJ
110102004-10-16 Daniel Jacobowitz <dan@debian.org>
11011
11012 * configure.in: Test for -rdynamic.
11013 * configure: Regenerated.
11014 * Makefile (INTERNAL_LDFLAGS): New.
11015 (gdbserver, gdbreplay): Use it.
11016
2c0fc042
AC
110172004-09-02 Andrew Cagney <cagney@gnu.org>
11018
11019 * Makefile.in (TAGS): Replace TM_FILE with DEPRECATED_TM_FILE.
11020
075b3282
DJ
110212004-03-23 Daniel Jacobowitz <drow@mvista.com>
11022
11023 * linux-low.c (linux_wait): Clear all_processes list also.
11024
fa6a77dc
DJ
110252004-03-12 Daniel Jacobowitz <drow@mvista.com>
11026
11027 * linux-low.c: Include <errno.h>. Remove extern declaration of
11028 errno.
11029
6d782a97
DJ
110302004-03-12 Daniel Jacobowitz <drow@mvista.com>
11031
11032 * gdbreplay.c, server.h, utils.c: Update copyright years.
11033
3a7fb99b
DJ
110342004-03-04 Nathan J. Williams <nathanw@wasabisystems.com>
11035
11036 * server.c (main): Print child status or termination signal from
11037 variable 'signal', not 'sig'.
11038
c3e735a6
DJ
110392004-03-04 Nathan J. Williams <nathanw@wasabisystems.com>
11040
11041 * linux-low.c (linux_read_memory): Change return type to
11042 int. Check for and return error from ptrace().
11043 * target.c (read_inferior_memory): Change return type to int. Pass
11044 back return status from the_target->read_memory().
11045 * target.h (struct target_ops): Adapt *read_memory() prototype.
11046 Update comment.
11047 (read_inferior_memory): Adapt prototype.
11048 * server.c (main): Return an error packet if
11049 read_inferior_memory() returns an error.
11050
a59d1c82
DJ
110512004-03-04 Daniel Jacobowitz <drow@mvista.com>
11052
11053 * Makefile.in (distclean): Remove config.h, stamp-h, and config.log.
11054 Unify with other clean targets.
11055
dc3f8883
DJ
110562004-02-29 Daniel Jacobowitz <drow@mvista.com>
11057
11058 * server.c (handle_v_cont): Call set_desired_inferior.
11059
89a208da
DJ
110602004-02-29 Daniel Jacobowitz <drow@mvista.com>
11061
11062 * remote-utils.c (prepare_resume_reply): Always supply "thread:".
11063
62ea82f5
DJ
110642004-02-29 Daniel Jacobowitz <drow@mvista.com>
11065
11066 * linux-low.c (linux_wait): Unblock async I/O.
11067 (linux_resume): Block and enable async I/O.
11068 * remote-utils.c (block_async_io, unblock_async_io): New functions.
11069 * server.h (block_async_io, unblock_async_io): Add prototypes.
11070
6910d122
DJ
110712004-02-29 Daniel Jacobowitz <drow@mvista.com>
11072
11073 * remote-utils.c (remote_open): Print a status notice after
11074 opening a TCP port.
11075 * server.c (attach_inferior): Print a status notice after
11076 attaching.
11077
110782004-02-29 Daniel Jacobowitz <drow@mvista.com>
d677d77d
DJ
11079
11080 * linux-arm-low.c (arm_get_pc): Print out stop PC in debug mode.
11081
c89dc5d4
DJ
110822004-02-26 Daniel Jacobowitz <drow@mvista.com>
11083
11084 * remote-utils.c (write_enn): Use "E01" instead of "ENN" for the
11085 error packet.
11086 * server.c, target.h: Update copyright years.
11087
4b8dad4a
RM
110882004-02-25 Roland McGrath <roland@redhat.com>
11089
11090 * target.h (struct target_ops): New member `read_auxv'.
11091 * server.c (handle_query): Handle qPart:auxv:read: query using that.
11092 * linux-low.c (linux_read_auxv): New function.
11093 (linux_target_ops): Initialize `read_auxv' member to that.
11094
d7446758
JB
110952004-02-17 Ulrich Weigand <Ulrich.Weigand@de.ibm.com>
11096
11097 Committed by Jim Blandy <jimb@redhat.com>.
11098
11099 * linux-s390-low.c (s390_num_regs): Update.
4b8dad4a 11100 (s390_regmap): Remove control registers. Use __s390x__ predefine
d7446758
JB
11101 instead of GPR_SIZE to distiguish s390 and s390x targets.
11102
5544ad89
DJ
111032004-01-31 Daniel Jacobowitz <drow@mvista.com>
11104
11105 * linux-low.c: Update copyright year.
11106 (check_removed_breakpoint): Clear pending_is_breakpoint.
11107 (linux_set_resume_request, linux_queue_one_thread)
11108 (resume_status_pending_p): New functions.
11109 (linux_continue_one_thread): Use process->resume.
11110 (linux_resume): Only resume threads if there are no pending events.
11111 * linux-low.h (struct process_info): Add resume request
11112 pointer.
11113
2a68b70e
DJ
111142004-01-30 Daniel Jacobowitz <drow@mvista.com>
11115
11116 * regcache.c (new_register_cache): Clear the allocated register
11117 buffer. Suggested by Atsushi Nemoto <anemo@mba.ocn.ne.jp>.
11118
64386c31
DJ
111192003-10-13 Daniel Jacobowitz <drow@mvista.com>
11120
11121 * linux-low.c (linux_resume): Take a struct thread_resume *
11122 argument.
11123 (linux_wait): Update call.
11124 (resume_ptr): New static variable.
11125 (linux_continue_one_thread): Renamed from
11126 linux_continue_one_process. Use resume_ptr.
11127 (linux_resume): Use linux_continue_one_thread.
11128 * server.c (handle_v_cont, handle_v_requests): New functions.
11129 (myresume): New function.
11130 (main): Handle 'v' case.
11131 * target.h (struct thread_resume): New type.
11132 (struct target_ops): Change argument of "resume" to struct
11133 thread_resume *.
11134 (myresume): Delete macro.
11135
c938e9b0
L
111362003-08-08 H.J. Lu <hongjiu.lu@intel.com>
11137
11138 * Makefile.in (install-only): Create dest dir. Support DESTDIR.
11139 (uninstall): Support DESTDIR.
11140
7f313d07
BC
11141Mon Jul 21 20:09:34 UTC 2003 Brendan Conoboy <blc@redhat.com>
11142
11143 * configure.srv: Add xscale*linux copy of arm*linux entry.
11144
3b2fc2ea
DJ
111452003-07-24 Daniel Jacobowitz <drow@mvista.com>
11146
11147 * linux-arm-low.c (arm_reinsert_addr): New function.
11148 (the_low_target): Add arm_reinsert_addr.
11149
1c0a559e
MK
111502003-07-08 Mark Kettenis <kettenis@gnu.org>
11151
11152 * mem-break.c: Remove whitespace at end of file.
11153
43d5792c
DJ
111542003-06-28 Daniel Jacobowitz <drow@mvista.com>
11155
11156 * configure.in: Check whether we need to prototype strerror.
11157 * server.h: Optionally prototype strerror.
11158 * gdbreplay.c (perror_with_name): Use strerror.
11159 * linux-low.c (linux_attach_lwp): Use strerror.
11160 * utils.c (perror_with_name): Use strerror.
11161 * config.in, configure: Regenerated.
11162
c8a86edf
DJ
111632003-06-28 Daniel Jacobowitz <drow@mvista.com>
11164
11165 * linux-sh-low.c (sh_regmap): Fix FP register offsets, reported by
11166 SUGIOKA Toshinobu <sugioka@itonet.co.jp>.
11167
73d37363
DJ
111682003-06-20 Daniel Jacobowitz <drow@mvista.com>
11169
11170 * Makefile.in (SFILES): Update.
11171 * low-hppabsd.c, low-lynx.c, low-nbsd.c, low-sim.c, low-sparc.c,
11172 low-sun3.c: Remove files.
11173
6ad8ae5c
DJ
111742003-06-17 Daniel Jacobowitz <drow@mvista.com>
11175
11176 * linux-low.c: Move comment to linux_thread_alive where it belonged.
11177 (linux_detach_one_process, linux_detach): New functions.
11178 (linux_target_ops): Add linux_detach.
11179 * server.c (main): Handle 'D' packet.
11180 * target.h (struct target_ops): Add "detach" member.
11181 (detach_inferior): Define.
11182
1581182a
MK
111832003-06-13 Mark Kettenis <kettenis@gnu.org>
11184
11185 From Kelley Cook <kelleycook@wideopenwest.com>:
11186 * configure.srv: Accept i[34567]86 variants.
11187
e5379b03
DJ
111882003-06-05 Daniel Jacobowitz <drow@mvista.com>
11189
11190 * linux-low.c (linux_wait_for_event): Correct comment typos.
11191 (linux_resume_one_process): Call check_removed_breakpoint.
11192 (linux_send_signal): New function.
11193 (linux_target_ops): Add linux_send_signal.
11194 * remote-utils.c (putpkt, input_interrupt): Use send_signal instead
11195 of kill.
11196 * target.h (struct target_ops): Add send_signal.
11197
2ff29de4
JB
111982003-05-29 Jim Blandy <jimb@redhat.com>
11199
11200 * linux-low.c (usr_store_inferior_registers): Transfer buf in
11201 PTRACE_XFER_TYPE-sized chunks, not int-sized chunks. Otherwise,
11202 if 'int' is smaller than PTRACE_XFER_TYPE, you end up throwing
11203 away part of the register's value.
11204
254787d4
DJ
112052003-03-26 Daniel Jacobowitz <drow@mvista.com>
11206
11207 * linux-low.c (linux_create_inferior): Use __SIGRTMIN.
11208 (linux_wait_for_event, linux_init_signals): Likewise.
11209
94e10508
DJ
112102003-03-17 Daniel Jacobowitz <drow@mvista.com>
11211
11212 * configure.in: Check for stdlib.h.
11213 * configure: Regenerated.
11214 * config.in: Regenerated.
11215
4c0711e0
DJ
112162003-01-04 Andreas Schwab <schwab@suse.de>
11217
11218 * linux-m68k-low.c (m68k_num_regs): Define to 29 instead of 31.
11219
ef66e766
AC
112202003-01-02 Andrew Cagney <ac131313@redhat.com>
11221
11222 * Makefile.in: Remove obsolete code.
11223
a1358604
DJ
112242002-11-20 Daniel Jacobowitz <drow@mvista.com>
11225
11226 * linux-s390-low.c (s390_regmap): Check GPR_SIZE instead of
11227 defined(PT_FPR0_HI).
11228
23ce3b1c
DJ
112292002-11-17 Stuart Hughes <seh@zee2.com>
11230
11231 * linux-arm-low.c (arm_num_regs): Increase.
11232 (arm_regmap): Include status register.
11233
112342002-11-17 Daniel Jacobowitz <drow@mvista.com>
11235
11236 * linux-low.c (register_addr): Remove incorrect -1 check.
11237
a9fa9f7d
DJ
112382002-08-29 Daniel Jacobowitz <drow@mvista.com>
11239
11240 * linux-low.c (linux_create_inferior): Call setpgid. Return
11241 the new PID.
11242 (unstopped_p, linux_signal_pid): Remove.
11243 (linux_target_ops): Remove linux_signal_pid.
11244 * remote-utils.c (putpkt, input_interrupt): Use signal_pid
11245 global instead of target method.
11246 * target.h (struct target_ops): Remove signal_pid. Update comment
11247 for create_inferior.
11248 * server.c (signal_pid): New variable.
11249 (create_inferior): Set signal_pid. Block SIGTTOU and SIGTTIN in
4b8dad4a 11250 gdbserver. Set the child to be the foreground process group.
a9fa9f7d
DJ
11251 (attach_inferior): Set signal_pid.
11252
17574093
DJ
112532002-08-23 Daniel Jacobowitz <drow@mvista.com>
11254
11255 * ChangeLog: New file, with entries from gdb/ChangeLog after GDB 5.2.
11256
112572002-08-20 Jim Blandy <jimb@redhat.com>
11258
11259 * Makefile.in (LDFLAGS): Allow the configure script to establish a
11260 default for this.
11261
112622002-08-01 Andrew Cagney <cagney@redhat.com>
11263
11264 * Makefile.in: Make chill references obsolete.
11265
112662002-07-24 Kevin Buettner <kevinb@redhat.com>
11267
11268 * configure.in (unistd.h): Add to AC_CHECK_HEADERS list.
11269 * configure: Regenerate.
11270 * config.in: Regenerate.
11271
112722002-07-09 David O'Brien <obrien@FreeBSD.org>
11273
11274 * gdbreplay.c (stdlib.h, unistd.h): Conditionaly include.
11275 (perror_with_name, remote_close, remote_open, expect, play): Static.
11276
112772002-07-04 Michal Ludvig <mludvig@suse.cz>
11278
4b8dad4a 11279 * linux-x86-64-low.c (x86_64_regmap): Make it an array of
17574093
DJ
11280 byte offsets instead of an array of indexes.
11281 (x86_64_store_gregset, x86_64_store_fpregset): Parameter made const.
11282
112832002-06-13 Daniel Jacobowitz <drow@mvista.com>
11284
11285 * regcache.c: Add comment.
11286
112872002-06-11 Daniel Jacobowitz <drow@mvista.com>
11288
11289 * thread-db.c: New file.
11290 * proc-service.c: New file.
11291 * acinclude.m4: New file.
11292 * Makefile.in: Add GDBSERVER_LIBS, gdb_proc_service_h,
11293 proc-service.o, and thread-db.o.
11294 (linux-low.o): Add USE_THREAD_DB.
11295 * acconfig.h: Add HAVE_PRGREGSET_T, HAVE_PRFPREGSET_T,
11296 HAVE_LWPID_T, HAVE_PSADDR_T, and PRFPREGSET_T_BROKEN.
11297 * aclocal.m4: Regenerated.
11298 * config.in: Regenerated.
11299 * configure: Regenerated.
11300 * configure.in: Check for proc_service.h, sys/procfs.h,
11301 thread_db.h, and linux/elf.h headrs.
11302 Check for lwpid_t, psaddr_t, prgregset_t, prfpregset_t, and
11303 PRFPREGSET_T_BROKEN. Introduce srv_thread_depfiles and USE_THREAD_DB.
11304 Check for -lthread_db and thread support.
11305 * configure.srv: Enable thread_db support for ARM, i386, MIPS,
11306 PowerPC, and SuperH.
11307 * i387-fp.c: Constify arguments.
11308 * i387-fp.h: Likewise.
11309 * inferiors.c: (struct thread_info): Renamed from
11310 `struct inferior_info'. Remove PID member. Use generic inferior
11311 list header. All uses updated.
11312 (inferiors, signal_pid): Removed.
11313 (all_threads): New variable.
11314 (get_thread): Define.
11315 (add_inferior_to_list): New function.
11316 (for_each_inferior): New function.
11317 (change_inferior_id): New function.
11318 (add_inferior): Removed.
11319 (remove_inferior): New function.
11320 (add_thread): New function.
11321 (free_one_thread): New function.
11322 (remove_thread): New function.
11323 (clear_inferiors): Use for_each_inferior and free_one_thread.
11324 (find_inferior): New function.
11325 (find_inferior_id): New function.
11326 (inferior_target_data): Update argument type.
11327 (set_inferior_target_data): Likewise.
11328 (inferior_regcache_data): Likewise.
11329 (set_inferior_regcache_data): Likewise.
11330 * linux-low.c (linux_bp_reinsert): Remove.
11331 (all_processes, stopping_threads, using_thrads)
11332 (struct pending_signals, debug_threads, pid_of): New.
11333 (inferior_pid): Replace with macro.
11334 (struct inferior_linux_data): Remove.
11335 (get_stop_pc, add_process): New functions.
11336 (linux_create_inferior): Restore SIGRTMIN+1 before calling exec.
11337 Use add_process and add_thread.
11338 (linux_attach_lwp): New function, based on old linux_attach. Use
11339 add_process and add_thread. Set stop_expected for new threads.
11340 (linux_attach): New function.
11341 (linux_kill_one_process): New function.
11342 (linux_kill): Kill all LWPs.
11343 (linux_thread_alive): Use find_inferior_id.
11344 (check_removed_breakpoints, status_pending_p): New functions.
11345 (linux_wait_for_process): Renamed from linux_wait_for_one_inferior.
11346 Update. Use WNOHANG. Wait for cloned processes also. Update process
11347 struct for the found process.
11348 (linux_wait_for_event): New function.
11349 (linux_wait): Use it. Support LWPs.
11350 (send_sigstop, wait_for_sigstop, stop_all_processes)
11351 (linux_resume_one_process, linux_continue_one_process): New functions.
11352 (linux_resume): Support LWPs.
11353 (REGISTER_RAW_SIZE): Remove.
11354 (fetch_register): Use register_size instead. Call supply_register.
11355 (usr_store_inferior_registers): Likewise. Call collect_register.
11356 Fix recursive case.
11357 (regsets_fetch_inferior_registers): Improve error message.
11358 (regsets_store_inferior_registers): Add debugging.
11359 (linux_look_up_symbols): Call thread_db_init if USE_THREAD_DB.
11360 (unstopped_p, linux_signal_pid): New functions.
11361 (linux_target_ops): Add linux_signal_pid.
11362 (linux_init_signals): New function.
11363 (initialize_low): Call it. Initialize using_threads.
11364 * regcache.c (inferior_regcache_data): Add valid
11365 flag.
11366 (get_regcache): Fetch registers lazily. Add fetch argument
11367 and update all callers.
11368 (regcache_invalidate_one, regcache_invalidate): New
11369 functions.
11370 (new_register_cache): Renamed from create_register_cache.
11371 Return the new regcache.
11372 (free_register_cache): Change argument to a void *.
11373 (registers_to_string, registers_from_string): Call get_regcache
11374 with fetch flag set.
11375 (register_data): Make static. Pass fetch flag to get_regcache.
11376 (supply_register): Call get_regcache with fetch flag clear.
11377 (collect_register): Call get_regcache with fetch flag set.
11378 (collect_register_as_string): New function.
11379 * regcache.h: Update.
11380 * remote-utils.c (putpkt): Flush after debug output and use
11381 stderr.
11382 Handle input interrupts while waiting for an ACK.
11383 (input_interrupt): Use signal_pid method.
11384 (getpkt): Flush after debug output and use stderr.
11385 (outreg): Use collect_register_as_string.
11386 (new_thread_notify, dead_thread_notify): New functions.
11387 (prepare_resume_reply): Check using_threads. Set thread_from_wait
11388 and general_thread.
11389 (look_up_one_symbol): Flush after debug output.
11390 * server.c (step_thread, server_waiting): New variables.
11391 (start_inferior): Don't use signal_pid. Update call to mywait.
11392 (attach_inferior): Update call to mywait.
11393 (handle_query): Handle qfThreadInfo and qsThreadInfo.
11394 (main): Don't fetch/store registers explicitly. Use
11395 set_desired_inferior. Support proposed ``Hs'' packet. Update
11396 calls to mywait.
11397 * server.h: Update.
11398 (struct inferior_list, struct_inferior_list_entry): New.
11399 * target.c (set_desired_inferior): New.
11400 (write_inferior_memory): Constify.
11401 (mywait): New function.
11402 * target.h: Update.
11403 (struct target_ops): New signal_pid method.
11404 (mywait): Removed macro, added prototype.
11405
11406 * linux-low.h (regset_func): Removed.
11407 (regset_fill_func, regset_store_func): New.
11408 (enum regset_type): New.
11409 (struct regset_info): Add type field. Use new operation types.
11410 (struct linux_target_ops): stop_pc renamed to get_pc.
11411 Add decr_pc_after_break and breakpoint_at.
11412 (get_process, get_thread_proess, get_process_thread)
11413 (strut process_info, all_processes, linux_attach_lwp)
11414 (thread_db_init): New.
11415
11416 * linux-arm-low.c (arm_get_pc, arm_set_pc,
11417 arm_breakpoint, arm_breakpoint_len, arm_breakpoint_at): New.
11418 (the_low_target): Add new members.
11419 * linux-i386-low.c (i386_store_gregset, i386_store_fpregset)
11420 (i386_store_fpxregset): Constify.
11421 (target_regsets): Add new kind identifier.
11422 (i386_get_pc): Renamed from i386_stop_pc. Simplify.
11423 (i386_set_pc): Add debugging.
11424 (i386_breakpoint_at): New function.
11425 (the_low_target): Add new members.
11426 * linux-mips-low.c (mips_get_pc, mips_set_pc)
11427 (mips_breakpoint, mips_breakpoint_len, mips_reinsert_addr)
11428 (mips_breakpoint_at): New.
11429 (the_low_target): Add new members.
11430 * linux-ppc-low.c (ppc_get_pc, ppc_set_pc)
11431 (ppc_breakpoint, ppc_breakpoint_len, ppc_breakpoint_at): New.
11432 (the_low_target): Add new members.
11433 * linux-sh-low.c (sh_get_pc, sh_set_pc)
11434 (sh_breakpoint, sh_breakpoint_len, sh_breakpoint_at): New.
11435 (the_low_target): Add new members.
11436 * linux-x86-64-low.c (target_regsets): Add new kind
11437 identifier.
11438
114392002-05-15 Daniel Jacobowitz <drow@mvista.com>
11440
11441 From Martin Pool <mbp@samba.org>:
11442 * server.c (gdbserver_usage): New function.
11443 (main): Call it.
11444
114452002-05-14 Daniel Jacobowitz <drow@mvista.com>
11446
11447 * mem-break.c (reinsert_breakpoint_by_bp): Correct typo
11448 stop_at -> stop_pc.
11449
114502002-05-04 Andrew Cagney <ac131313@redhat.com>
11451
11452 * Makefile.in: Remove obsolete code.
11453
114542002-04-24 Michal Ludvig <mludvig@suse.cz>
11455
11456 * linux-low.c (regsets_fetch_inferior_registers),
11457 (regsets_store_inferior_registers): Removed cast to int from
11458 ptrace() calls.
11459 * regcache.h: Added declaration of struct inferior_info.
11460
114612002-04-20 Daniel Jacobowitz <drow@mvista.com>
11462
11463 * inferiors.c (struct inferior_info): Add regcache_data.
11464 (add_inferior): Call create_register_cache.
11465 (clear_inferiors): Call free_register_cache.
11466 (inferior_regcache_data, set_inferior_regcache_data): New functions.
11467 * regcache.c (struct inferior_regcache_data): New.
11468 (registers): Remove.
11469 (get_regcache): New function.
11470 (create_register_cache, free_register_cache): New functions.
11471 (set_register_cache): Don't initialize the register cache here.
11472 (registers_to_string, registers_from_string, register_data): Call
11473 get_regcache.
11474 * regcache.h: Add prototypes.
11475 * server.h: Likewise.
11476
114772002-04-20 Daniel Jacobowitz <drow@mvista.com>
11478
11479 * mem-break.c: New file.
11480 * mem-break.h: New file.
11481 * Makefile.in: Add mem-break.o rule; update server.h
11482 dependencies.
11483 * inferiors.c (struct inferior_info): Add target_data
11484 member.
11485 (clear_inferiors): Free target_data member if set.
11486 (inferior_target_data, set_inferior_target_data): New functions.
11487 * linux-i386-low.c (i386_breakpoint, i386_breakpoint_len)
11488 (i386_stop_pc, i386_set_pc): New. Add to the_low_target.
11489 * linux-low.c (linux_bp_reinsert): New variable.
11490 (struct inferior_linux_data): New.
11491 (linux_create_inferior): Use set_inferior_target_data.
11492 (linux_attach): Likewise. Call add_inferior.
11493 (linux_wait_for_one_inferior): New function.
11494 (linux_wait): Call it.
11495 (linux_write_memory): Add const.
11496 (initialize_low): Call set_breakpoint_data.
11497 * linux-low.h (struct linux_target_ops): Add breakpoint
11498 handling members.
11499 * server.c (attach_inferior): Remove extra add_inferior
11500 call.
11501 * server.h: Include mem-break.h. Update inferior.c
11502 prototypes.
11503 * target.c (read_inferior_memory)
11504 (write_inferior_memory): New functions.
11505 * target.h (read_inferior_memory)
11506 (write_inferior_memory): Change macros to prototypes.
11507 (struct target_ops): Update comments. Add const to write_memory
11508 definition.
11509
115102002-04-11 Daniel Jacobowitz <drow@mvista.com>
11511
11512 * linux-low.c (usr_store_inferior_registers): Support
11513 registers which are allowed to fail to store.
11514 * linux-low.h (linux_target_ops): Likewise.
11515 * linux-ppc-low.c (ppc_regmap): Support FPSCR.
11516 (ppc_cannot_store_register): FPSCR may not be storable.
11517
115182002-04-09 Daniel Jacobowitz <drow@mvista.com>
11519
11520 * server.h: Include <string.h> if HAVE_STRING_H.
11521 * ChangeLog: Correct paths in last ChangeLog entry.
11522
115232002-04-09 Daniel Jacobowitz <drow@mvista.com>
11524
11525 * linux-low.h: Remove obsolete prototypes.
11526 (struct linux_target_ops): New.
11527 (extern the_low_target): New.
11528 * linux-low.c (num_regs, regmap): Remove declarations.
11529 (register_addr): Use the_low_target explicitly.
11530 (fetch_register): Likewise.
11531 (usr_fetch_inferior_registers): Likewise.
11532 (usr_store_inferior_registers): Likewise.
11533 * linux-arm-low.c (num_regs): Remove.
11534 (arm_num_regs): Define.
11535 (arm_regmap): Renamed from regmap, made static.
11536 (arm_cannot_fetch_register): Renamed from cannot_fetch_register,
11537 made static.
11538 (arm_cannot_store_register): Renamed from cannot_store_register,
11539 made static.
11540 (the_low_target): New.
11541 * linux-i386-low.c (num_regs): Remove.
11542 (i386_num_regs): Define.
11543 (i386_regmap): Renamed from regmap, made static.
11544 (i386_cannot_fetch_register): Renamed from cannot_fetch_register,
11545 made static.
11546 (i386_cannot_store_register): Renamed from cannot_store_register,
11547 made static.
11548 (the_low_target): New.
11549 * linux-ia64-low.c (num_regs): Remove.
11550 (ia64_num_regs): Define.
11551 (ia64_regmap): Renamed from regmap, made static.
11552 (ia64_cannot_fetch_register): Renamed from cannot_fetch_register,
11553 made static.
11554 (ia64_cannot_store_register): Renamed from cannot_store_register,
11555 made static.
11556 (the_low_target): New.
11557 * linux-m68k-low.c (num_regs): Remove.
11558 (m68k_num_regs): Define.
11559 (m68k_regmap): Renamed from regmap, made static.
11560 (m68k_cannot_fetch_register): Renamed from cannot_fetch_register,
11561 made static.
11562 (m68k_cannot_store_register): Renamed from cannot_store_register,
11563 made static.
11564 (the_low_target): New.
11565 * linux-mips-low.c (num_regs): Remove.
11566 (mips_num_regs): Define.
11567 (mips_regmap): Renamed from regmap, made static.
11568 (mips_cannot_fetch_register): Renamed from cannot_fetch_register,
11569 made static.
11570 (mips_cannot_store_register): Renamed from cannot_store_register,
11571 made static.
11572 (the_low_target): New.
11573 * linux-ppc-low.c (num_regs): Remove.
11574 (ppc_num_regs): Define.
11575 (ppc_regmap): Renamed from regmap, made static.
11576 (ppc_cannot_fetch_register): Renamed from cannot_fetch_register,
11577 made static.
11578 (ppc_cannot_store_register): Renamed from cannot_store_register,
11579 made static.
11580 (the_low_target): New.
11581 * linux-s390-low.c (num_regs): Remove.
11582 (s390_num_regs): Define.
11583 (s390_regmap): Renamed from regmap, made static.
11584 (s390_cannot_fetch_register): Renamed from cannot_fetch_register,
11585 made static.
11586 (s390_cannot_store_register): Renamed from cannot_store_register,
11587 made static.
11588 (the_low_target): New.
11589 * linux-sh-low.c (num_regs): Remove.
11590 (sh_num_regs): Define.
11591 (sh_regmap): Renamed from regmap, made static.
11592 (sh_cannot_fetch_register): Renamed from cannot_fetch_register,
11593 made static.
11594 (sh_cannot_store_register): Renamed from cannot_store_register,
11595 made static.
11596 (the_low_target): New.
11597 * linux-x86-64-low.c (x86_64_regmap): Renamed from regmap.
11598 (the_low_target): New.
11599
116002002-04-09 Daniel Jacobowitz <drow@mvista.com>
11601
11602 * Makefile.in: Add stamp-h target.
11603 * configure.in: Create stamp-h.
11604 * configure: Regenerated.
11605
116062002-04-09 Daniel Jacobowitz <drow@mvista.com>
11607
11608 * inferiors.c: New file.
11609 * target.c: New file.
11610 * target.h: New file.
11611 * Makefile.in: Add target.o and inferiors.o. Update
11612 dependencies.
11613 * linux-low.c (inferior_pid): New static variable,
11614 moved from server.c.
11615 (linux_create_inferior): Renamed from create_inferior.
11616 Call add_inferior. Return 0 on success instead of a PID.
11617 (linux_attach): Renamed from myattach.
11618 (linux_kill): Renamed from kill_inferior. Call clear_inferiors ().
11619 (linux_thread_alive): Renamed from mythread_alive.
11620 (linux_wait): Renamed from mywait. Call clear_inferiors () if the
11621 child dies.
11622 (linux_resume): Renamed from myresume. Add missing ``return 0''.
11623 (regsets_store_inferior_registers): Correct error message.
11624 Add missing ``return 0''.
11625 (linux_fetch_registers): Renamed from fetch_inferior_registers.
11626 (linux_store_registers): Renamed from store_inferior_registers.
11627 (linux_read_memory): Renamed from read_inferior_memory.
11628 (linux_write_memory): Renamed from write_inferior_memory.
11629 (linux_target_ops): New structure.
11630 (initialize_low): Call set_target_ops ().
11631 * remote-utils.c (unhexify): New function.
11632 (hexify): New function.
11633 (input_interrupt): Send signals to ``signal_pid''.
11634 * server.c (inferior_pid): Remove.
11635 (start_inferior): Update create_inferior call.
11636 (attach_inferior): Call add_inferior.
11637 (handle_query): New function.
11638 (main): Call handle_query for `q' packets.
11639 * server.h: Include "target.h". Remove obsolete prototypes.
11640 Add prototypes for "inferiors.c", "target.c", hexify, and unhexify.
11641
116422002-04-09 Daniel Jacobowitz <drow@mvista.com>
11643
11644 * Makefile.in: Add WARN_CFLAGS. Update configury
11645 dependencies.
11646 * configure.in: Check for <string.h>
11647 * configure: Regenerate.
11648 * config.in: Regenerate.
11649 * gdbreplay.c: Include needed system headers.
11650 (remote_open): Remove strchr prototype.
11651 * linux-low.h: Correct #ifdef to HAVE_LINUX_USRREGS.
11652 * regcache.c (supply_register): Change buf argument to const void *.
11653 (supply_register_by_name): Likewise.
11654 (collect_register): Change buf argument to void *.
11655 (collect_register_by_name): Likewise.
11656 * regcache.h: Add missing prototypes.
11657 * remote-utils.c: Include <arpa/inet.h> for inet_ntoa.
11658 * server.c (handle_query): New function.
11659 (attached): New static variable, moved out of main.
11660 (main): Quiet longjmp clobber warnings.
11661 * server.h: Add ATTR_NORETURN and ATTR_FORMAT. Update prototypes.
11662 * utils.c (error): Remove NORETURN.
11663 (fatal): Likewise.