]> git.ipfire.org Git - thirdparty/binutils-gdb.git/blame - gdb/gdbserver/ChangeLog
PR binutils/18257: Properly decode x86/Intel mask instructions.
[thirdparty/binutils-gdb.git] / gdb / gdbserver / ChangeLog
CommitLineData
45face3b
GB
12015-08-19 Gary Benson <gbenson@redhat.com>
2
3 * hostio.c (handle_pread): Do not attempt to read more data
4 than hostio_reply_with_data can fit in a packet.
5
16d5f642
JB
62015-08-18 Joel Brobecker <brobecker@adacore.com>
7
8 * linux-aarch32-low.c (NT_ARM_VFP): Define if not already defined.
9
a738da3a
MF
102015-08-14 Matthew Fortune <matthew.fortune@imgtec.com>
11
12 * linux-low.c (get_r_debug): Handle DT_MIPS_RLD_MAP_REL.
13
33ebda9d
PA
142015-08-06 Pedro Alves <palves@redhat.com>
15
16 * tracepoint.c (expr_eval_result): Now an int.
17
a44892be
PA
182015-08-06 Pedro Alves <palves@redhat.com>
19
20 * gdbthread.h (struct regcache): Forward declare.
21 (struct thread_info) <regcache_data>: Now a struct regcache
22 pointer.
23 * inferiors.c (inferior_regcache_data)
24 (set_inferior_regcache_data): Now work with struct regcache
25 pointers.
26 * inferiors.h (struct regcache): Forward declare.
27 (inferior_regcache_data, set_inferior_regcache_data): Now work
28 with struct regcache pointers.
29 * regcache.c (get_thread_regcache, regcache_invalidate_thread)
30 (free_register_cache_thread): Remove struct regcache pointer
31 casts.
32
608a1e46
PA
332015-08-06 Pedro Alves <palves@redhat.com>
34
35 * server.c (captured_main): On error, print the exception message
36 to stderr, and if run_once is set, throw a quit.
37
f0ce0d3a
PA
382015-08-06 Pedro Alves <palves@redhat.com>
39
40 * linux-low.c (move_out_of_jump_pad_callback): Temporarily switch
41 the current thread.
42
bf47e248
PA
432015-08-06 Pedro Alves <palves@redhat.com>
44
45 * linux-low.c (linux_write_memory): Rewrite debug output to avoid
46 reading beyond the passed in buffer length.
47
b6b9ffcc
PL
482015-08-06 Pierre Langlois <pierre.langlois@arm.com>
49
50 * tracepoint.c (symbol_list) <required>: Remove.
51
863d01bd
PA
522015-08-06 Pedro Alves <palves@redhat.com>
53
54 * linux-low.c (handle_extended_wait): Set the fork child's suspend
55 count if stopping and suspending threads.
56 (check_stopped_by_breakpoint): If stopped by trace, set the LWP's
57 stop reason to TARGET_STOPPED_BY_SINGLE_STEP.
58 (linux_detach): Complete an ongoing step-over.
59 (lwp_suspended_inc, lwp_suspended_decr): New functions. Use
60 throughout.
61 (resume_stopped_resumed_lwps): Don't resume a suspended thread.
62 (linux_wait_1): If passing a signal to the inferior after
63 finishing a step-over, unsuspend and re-resume all lwps. If we
64 see a single-step event but the thread should be continuing, don't
65 pass the trap to gdb.
66 (stuck_in_jump_pad_callback, move_out_of_jump_pad_callback): Use
67 internal_error instead of gdb_assert.
68 (enqueue_pending_signal): New function.
69 (check_ptrace_stopped_lwp_gone): Add debug output.
70 (start_step_over): Use internal_error instead of gdb_assert.
71 (complete_ongoing_step_over): New function.
72 (linux_resume_one_thread): Don't resume a suspended thread.
73 (proceed_one_lwp): If the LWP is stepping over a breakpoint, reset
74 it stepping.
75
00db26fa
PA
762015-08-06 Pedro Alves <palves@redhat.com>
77
78 * linux-low.c (add_lwp): Set waitstatus to TARGET_WAITKIND_IGNORE.
79 (linux_thread_alive): Use lwp_is_marked_dead.
80 (extended_event_reported): Delete.
81 (linux_wait_1): Check if waitstatus is TARGET_WAITKIND_IGNORE
82 instead of extended_event_reported.
83 (mark_lwp_dead): Don't set the 'dead' flag. Store the waitstatus
84 as well.
85 (lwp_is_marked_dead): New function.
86 (lwp_running): Use lwp_is_marked_dead.
87 * linux-low.h: Delete 'dead' field, and update 'waitstatus's
88 comment.
89
ad071a30
PA
902015-08-06 Pedro Alves <palves@redhat.com>
91
92 * linux-low.c (linux_wait_1): Move fork event output out of the
93 !report_to_gdb check. Pass event_child->waitstatus to
94 target_waitstatus_to_string instead of ourstatus.
95
524b57e6
YQ
962015-08-04 Yao Qi <yao.qi@linaro.org>
97
98 * linux-aarch64-low.c (aarch64_supports_tracepoints): Return 0
99 if current_thread is 32 bit.
100
6085d6f6
YQ
1012015-08-04 Yao Qi <yao.qi@linaro.org>
102
103 * linux-aarch64-low.c (aarch64_supports_z_point_type): Return
104 0 for Z_PACKET_SW_BP if it may be used in multi-arch debugging.
105 * server.c (extended_protocol): Remove "static".
106 * server.h (extended_protocol): Declare it.
107
8a7e4587
YQ
1082015-08-04 Yao Qi <yao.qi@linaro.org>
109
110 * linux-aarch64-low.c (aarch64_get_pc): Get PC register on
111 both aarch64 and aarch32.
112 (aarch64_set_pc): Likewise.
113
3b53ae99
YQ
1142015-08-04 Yao Qi <yao.qi@linaro.org>
115
116 * configure.srv (case aarch64*-*-linux*): Append arm-with-neon.o
117 to srv_regobj and append arm-core.xml arm-vfpv3.xml and
118 arm-with-neon.xml to srv_xmlfiles.
119 * linux-aarch64-low.c: Include linux-aarch32-low.h.
120 (is_64bit_tdesc): New function.
121 (aarch64_linux_read_description): New function.
122 (aarch64_arch_setup): Call aarch64_linux_read_description.
123 (regs_info): Rename to regs_info_aarch64.
124 (aarch64_regs_info): Return right regs_info.
125 (initialize_low_arch): Call initialize_low_arch_aarch32.
126
bd9e6534
YQ
1272015-08-04 Yao Qi <yao.qi@linaro.org>
128
129 * configure.srv (srv_tgtobj): Add linux-aarch32-low.o.
130 * linux-aarch32-low.c: New file.
131 * linux-aarch32-low.h: New file.
132 * linux-arm-low.c (arm_fill_gregset): Move it to
133 linux-aarch32-low.c.
134 (arm_store_gregset): Likewise.
135 (arm_fill_vfpregset): Call arm_fill_vfpregset_num
136 (arm_store_vfpregset): Call arm_store_vfpregset_num.
137 (arm_arch_setup): Check if PTRACE_GETREGSET works.
138 (regs_info): Rename to regs_info_arm.
139 (arm_regs_info): Return regs_info_aarch32 if
140 have_ptrace_getregset is 1 and target description is
141 arm_with_neon or arm_with_vfpv3.
142 (initialize_low_arch): Don't call init_registers_arm_with_neon.
143 Call initialize_low_arch_aarch32 instead.
144
ded48a5e
YQ
1452015-08-04 Yao Qi <yao.qi@linaro.org>
146
147 * linux-x86-low.c (have_ptrace_getregset): Move it to ...
148 * linux-low.c: ... here.
149 * linux-low.h (have_ptrace_getregset): Declare it.
150
96e9210f
PA
1512015-08-04 Pedro Alves <palves@redhat.com>
152
153 * thread-db.c (struct thread_db): Use new typedefs.
154 (try_thread_db_load_1): Define local TDB_DLSYM macro and use it in
155 CHK calls.
156 (disable_thread_event_reporting): Cast result of dlsym to
157 destination function pointer type.
158 (thread_db_mourn): Use td_ta_delete_ftype.
159
af60a1ef
SL
1602015-08-03 Sandra Loosemore <sandra@codesourcery.com>
161
162 * linux-nios2-low.c (NIOS2_BREAKPOINT): Conditionalize for
163 arch variant.
164 (CDX_BREAKPOINT): Define for R2.
165 (nios2_breakpoint_at): Check for CDX_BREAKPOINT when R2.
166 (the_low_target): Add comments.
167
e8b41681
YQ
1682015-07-30 Yao Qi <yao.qi@linaro.org>
169
170 * linux-arm-low.c (arm_hwcap): Remove it.
171 (arm_read_description): New local variable arm_hwcap. Don't
172 set arm_hwcap to zero.
173
89abb039
YQ
1742015-07-30 Yao Qi <yao.qi@linaro.org>
175
176 * linux-arm-low.c (arm_fill_wmmxregset): Don't use arm_hwcap.
177 Use regcache->tdesc instead.
178 (arm_store_wmmxregset): Likewise.
179 (arm_fill_vfpregset): Likewise.
180 (arm_store_vfpregset): Likewise.
181
deca266c
YQ
1822015-07-30 Yao Qi <yao.qi@linaro.org>
183
184 * linux-arm-low.c: Include arch/arm.h.
185 (arm_fill_gregset): Don't use arm_num_regs and arm_regmap.
186 (arm_store_gregset): Likewise.
187
aa58a496
SM
1882015-07-29 Simon Marchi <simon.marchi@ericsson.com>
189
190 * linux-mips-low.c (mips_linux_prepare_to_resume): Add NULL as
191 ptrace's 4th parameter.
192
50904b25
YQ
1932015-07-27 Yao Qi <yao.qi@linaro.org>
194
195 * configure.srv (case aarch64*-*-linux*): Don't set
196 srv_linux_usrregs.
197
5826e159
PA
1982015-07-24 Pedro Alves <palves@redhat.c: Likewise.om>
199
200 * linux-aarch64-low.c: Include nat/gdb_ptrace.h instead of
201 sys/ptrace.h.
202 * linux-arm-low.c: Likewise.
203 * linux-cris-low.c: Likewise.
204 * linux-crisv32-low.c: Likewise.
205 * linux-low.c: Likewise.
206 * linux-m68k-low.c: Likewise.
207 * linux-mips-low.c: Likewise.
208 * linux-nios2-low.c: Likewise.
209 * linux-s390-low.c: Likewise.
210 * linux-sparc-low.c: Likewise.
211 * linux-tic6x-low.c: Likewise.
212 * linux-tile-low.c: Likewise.
213 * linux-x86-low.c: Likewise.
214
54019719
PA
2152015-07-24 Pedro Alves <palves@redhat.com>
216
217 * config.in: Regenerate.
218 * configure: Regenerate.
219
eb7aa561
PA
2202015-07-24 Pedro Alves <palves@redhat.com>
221
222 * acinclude.m4: Include ../ptrace.m4.
223 * configure.ac: Call GDB_AC_PTRACE.
224 * config.in, configure: Regenerate.
225
55d7b841
YQ
2262015-07-24 Yao Qi <yao.qi@linaro.org>
227
228 * linux-low.c (linux_create_inferior): Remove setting to
229 proc->priv->new_inferior.
230 (linux_attach): Likewise.
231 (linux_low_filter_event): Likewise.
232 * linux-low.h (struct process_info_private) <new_inferior>: Remove.
233
c06cbd92
YQ
2342015-07-24 Yao Qi <yao.qi@linaro.org>
235
236 * linux-low.c (linux_arch_setup): New function.
237 (linux_low_filter_event): If proc->tdesc is NULL and
238 proc->attached is true, call the_low_target.arch_setup.
239 Otherwise, keep status pending, and return.
240 (linux_resume_one_lwp_throw): Don't call get_pc if
241 thread->while_stepping isn't NULL. Don't call
242 get_thread_regcache if proc->tdesc is NULL.
243 (need_step_over_p): Return 0 if proc->tdesc is NULL.
244 (linux_target_ops): Install arch_setup.
245 * server.c (start_inferior): Call the_target->arch_setup.
246 * target.h (struct target_ops) <arch_setup>: New field.
247 (target_arch_setup): New marco.
248 * lynx-low.c (lynx_target_ops): Update.
249 * nto-low.c (nto_target_ops): Update.
250 * spu-low.c (spu_target_ops): Update.
251 * win32-low.c (win32_target_ops): Update.
252
5ae3ebba
YQ
2532015-07-24 Yao Qi <yao.qi@linaro.org>
254
255 * linux-low.c (linux_add_process): Don't set
256 proc->priv->new_inferior.
257 (linux_create_inferior): Set proc->priv->new_inferior to 1.
258 (linux_attach): Likewise.
259
eb97750b
YQ
2602015-07-24 Yao Qi <yao.qi@linaro.org>
261
262 * server.c (start_inferior): Code refactor.
263
51aee833
YQ
2642015-07-24 Yao Qi <yao.qi@linaro.org>
265
266 * server.c (process_serial_event): Set general_thread.
267
af1b22f3
YQ
2682015-07-21 Yao Qi <yao.qi@linaro.org>
269
270 * linux-aarch64-low.c (aarch64_arch_setup): Remove code and call
271 aarch64_linux_get_debug_reg_capacity.
272
554717a3
YQ
2732015-07-17 Yao Qi <yao.qi@linaro.org>
274
275 * Makefile.in (aarch64-linux-hw-point.o): New rule.
276 * configure.srv (srv_tgtobj): Append aarch64-linux-hw-point.o.
277 * linux-aarch64-low.c: Include nat/aarch64-linux-hw-point.h.
278 (AARCH64_HBP_MAX_NUM): Move to nat/aarch64-linux-hw-point.h.
279 (AARCH64_HWP_MAX_NUM, AARCH64_HBP_ALIGNMENT): Likewise.
280 (AARCH64_HWP_ALIGNMENT): Likewise.
281 (AARCH64_HWP_MAX_LEN_PER_REG): Likewise.
282 (AARCH64_DEBUG_NUM_SLOTS, AARCH64_DEBUG_ARCH): Likewise.
283 (aarch64_num_bp_regs, aarch64_num_wp_regs): Likewise.
284 (AARCH64_DEBUG_ARCH_V8, DR_MARK_ALL_CHANGED): Likewise.
285 (DR_MARK_N_CHANGED, DR_CLEAR_CHANGED): Likewise.
286 (DR_HAS_CHANGED, DR_N_HAS_CHANGE): Likewise.
287 (struct aarch64_debug_reg_state): Likewise.
288 (struct arch_lwp_info): Likewise.
289 (aarch64_align_watchpoint): Likewise.
290 (DR_CONTROL_ENABLED, DR_CONTROL_LENGTH): Likewise.
291 (aarch64_watchpoint_length): Likewise.
292 (aarch64_point_encode_ctrl_reg): Likewise
293 (aarch64_point_is_aligned): Likewise.
294 (aarch64_align_watchpoint): Likewise.
295 (aarch64_linux_set_debug_regs):
296 (aarch64_dr_state_insert_one_point): Likewise.
297 (aarch64_dr_state_remove_one_point): Likewise.
298 (aarch64_handle_breakpoint): Likewise.
299 (aarch64_handle_aligned_watchpoint): Likewise.
300 (aarch64_handle_unaligned_watchpoint): Likewise.
301 (aarch64_handle_watchpoint): Likewise.
302
c67ca4de
YQ
3032015-07-17 Yao Qi <yao.qi@linaro.org>
304
305 * linux-aarch64-low.c (aarch64_handle_breakpoint): Add argument state
306 and don't aarch64_get_debug_reg_state. All callers update.
307 (aarch64_handle_aligned_watchpoint): Likewise.
308 (aarch64_handle_unaligned_watchpoint): Likewise.
309 (aarch64_handle_watchpoint): Likewise.
310 (aarch64_insert_point): Call aarch64_get_debug_reg_state earlier.
311 (aarch64_remove_point): Likewise.
312
25abf979
YQ
3132015-07-17 Yao Qi <yao.qi@linaro.org>
314
315 * linux-aarch64-low.c (aarch64_show_debug_reg_state): Use
316 debug_printf.
317 (aarch64_handle_unaligned_watchpoint): Likewise.
318
db1ff28b
JK
3192015-07-15 Jan Kratochvil <jan.kratochvil@redhat.com>
320
321 Revert the previous 3 commits:
322 Move gdb_regex* to common/
323 Move linux_find_memory_regions_full & co.
324 gdbserver build-id attribute generator
325
700ca40f
JK
3262015-07-15 Aleksandar Ristovski <aristovski@qnx.com
327 Jan Kratochvil <jan.kratochvil@redhat.com>
328
329 gdbserver build-id attribute generator.
330 * linux-low.c (nat/linux-maps.h, search.h, rsp-low.h): Include.
331 (ElfXX_Ehdr, ElfXX_Phdr, ElfXX_Nhdr): New.
332 (ELFXX_FLD, ELFXX_SIZEOF, ELFXX_ROUNDUP, BUILD_ID_INVALID): New.
333 (find_phdr): New.
334 (get_dynamic): Use find_pdhr to traverse program headers.
335 (struct mapping_entry, mapping_entry_s, free_mapping_entry_vec)
336 (compare_mapping_entry_range, struct find_memory_region_callback_data)
337 (read_build_id, find_memory_region_callback, lrfind_mapping_entry)
338 (get_hex_build_id): New.
339 (linux_qxfer_libraries_svr4): Add optional build-id attribute
340 to reply XML document.
341
9904185c
JK
3422015-07-15 Aleksandar Ristovski <aristovski@qnx.com
343 Jan Kratochvil <jan.kratochvil@redhat.com>
344
345 * target.c: Include target/target-utils.h and fcntl.h.
346 (target_fileio_read_stralloc_1_pread, target_fileio_read_stralloc_1)
347 (target_fileio_read_stralloc): New functions.
348
6e5b4429
JK
3492015-07-15 Jan Kratochvil <jan.kratochvil@redhat.com>
350
351 * Makefile.in (OBS): Add gdb_regex.o.
352 (gdb_regex.o): New.
353 * config.in: Rebuilt.
354 * configure: Rebuilt.
355
ddc98fbf
JK
3562015-07-15 Aleksandar Ristovski <aristovski@qnx.com
357 Jan Kratochvil <jan.kratochvil@redhat.com>
358
359 Create empty nat/linux-maps.[ch] and common/target-utils.[ch].
360 * Makefile.in (OBS): Add target-utils.o.
361 (linux-maps.o, target-utils.o): New.
362 * configure.srv (srv_linux_obj): Add linux-maps.o.
363
e57bb7a0
PL
3642015-07-15 Pierre Langlois <pierre.langlois@arm.com>
365
366 * linux-aarch64-low.c (aarch64_supports_range_stepping): New
367 function, return 1.
368 (the_low_target): Install it.
369
586b02a9
PA
3702015-07-14 Pedro Alves <palves@redhat.com>
371
372 * linux-low.c (kill_wait_lwp): Don't assert if waitpid fails.
373 Instead, ignore ECHILD, and throw an error for other errnos.
374
58c1b36c
PA
3752015-07-10 Pedro Alves <palves@redhat.com>
376
377 * event-loop.c (struct callback_event) <data>: Change type to
378 gdb_client_data instance instead of gdb_client_data pointer.
379 (append_callback_event): Adjust.
380
421530db
PL
3812015-07-10 Pierre Langlois <pierre.langlois@arm.com>
382
383 * linux-aarch64-low.c: Add comments for each linux_target_ops
384 method. Remove comments already covered in target_ops and
385 linux_target_ops definitions.
386 (the_low_target): Add comments for each unimplemented method.
387
c2d65f38
YQ
3882015-07-09 Yao Qi <yao.qi@linaro.org>
389
390 * linux-aarch64-low.c (aarch64_regmap): Remove.
391 (aarch64_usrregs_info): Remove.
392 (regs_info): Set field usrregs to NULL.
393
b20a6524
MM
3942015-07-02 Markus Metzger <markus.t.metzger@intel.com>
395
396 * linux-low.c: Include "rsp-low.h"
397 (linux_low_encode_pt_config, linux_low_encode_raw): New.
398 (linux_low_read_btrace): Support BTRACE_FORMAT_PT.
399 (linux_low_btrace_conf): Support BTRACE_FORMAT_PT.
400 (handle_btrace_enable_pt): New.
401 (handle_btrace_general_set): Support "pt".
402 (handle_btrace_conf_general_set): Support "pt:size".
403
96c97461
PL
4042015-06-29 Pierre Langlois <pierre.langlois@arm.com>
405
406 * linux-aarch64-low.c (aarch64_supports_z_point_type): Enable for
407 Z_PACKET_SW_BP.
408
37d66942
PL
4092015-06-29 Pierre Langlois <pierre.langlois@arm.com>
410
411 * linux-aarch64-low.c: Remove comment about endianness.
412 (aarch64_breakpoint): Change type to gdb_byte[]. Set to "brk #0".
413 (aarch64_breakpoint_at): Change type of insn to gdb_byte[]. Use
414 memcmp.
415
dc06243f
GB
4162015-06-24 Gary Benson <gbenson@redhat.com>
417
418 * linux-i386-ipa.c (stdint.h): Do not include.
419 * lynx-i386-low.c (stdint.h): Likewise.
420 * lynx-ppc-low.c (stdint.h): Likewise.
421 * mem-break.c (stdint.h): Likewise.
422 * thread-db.c (stdint.h): Likewise.
423 * tracepoint.c (stdint.h): Likewise.
424 * win32-low.c (stdint.h): Likewise.
425
124e13d9
SM
4262015-06-18 Simon Marchi <simon.marchi@ericsson.com>
427
428 * server.c (write_qxfer_response): Update call to
429 remote_escape_output.
430
909c2cda
JK
4312015-06-15 Aleksandar Ristovski <aristovski@qnx.com
432 Jan Kratochvil <jan.kratochvil@redhat.com>
433
434 Merge multiple hex conversions.
435 * gdbreplay.c (tohex): Rename to 'fromhex'.
436 (logchar): Use fromhex.
437
24c05f46
JK
4382015-06-10 Jan Kratochvil <jan.kratochvil@redhat.com>
439
440 * server.c (handle_qxfer_libraries): Set `version' attribute for
441 <library-list>.
442
14d2069a
GB
4432015-06-10 Gary Benson <gbenson@redhat.com>
444
445 * target.h (struct target_ops) <multifs_open>: New field.
446 <multifs_unlink>: Likewise.
447 <multifs_readlink>: Likewise.
448 * linux-low.c (nat/linux-namespaces.h): New include.
449 (linux_target_ops): Initialize the_target->multifs_open,
450 the_target->multifs_unlink and the_target->multifs_readlink.
451 * hostio.h (hostio_handle_new_gdb_connection): New declaration.
452 * hostio.c (hostio_fs_pid): New static variable.
453 (hostio_handle_new_gdb_connection): New function.
454 (handle_setfs): Likewise.
455 (handle_open): Use the_target->multifs_open as appropriate.
456 (handle_unlink): Use the_target->multifs_unlink as appropriate.
457 (handle_readlink): Use the_target->multifs_readlink as
458 appropriate.
459 (handle_vFile): Handle vFile:setfs packets.
460 * server.c (handle_query): Call hostio_handle_new_gdb_connection
461 after target_handle_new_gdb_connection.
462
4b8b5e72
GB
4632015-06-10 Gary Benson <gbenson@redhat.com>
464
465 * configure.ac (AC_CHECK_FUNCS): Add setns.
466 * config.in: Regenerate.
467 * configure: Likewise.
468 * Makefile.in (SFILES): Add nat/linux-namespaces.c.
469 (linux-namespaces.o): New rule.
470 * configure.srv (srv_linux_obj): Add linux-namespaces.o.
471
3ac2e371
GB
4722015-06-09 Gary Benson <gbenson@redhat.com>
473
474 * hostio.c (handle_open): Process mode argument with
475 fileio_to_host_mode.
476
ca9b78ce
YQ
4772015-06-01 Yao Qi <yao.qi@linaro.org>
478
479 * linux-s390-low.c (PTRACE_GETREGSET, PTRACE_SETREGSET): Remove.
480 * linux-x86-low.c: Likewise.
481
bfacd19d
DB
4822015-05-28 Don Breazeal <donb@codesourcery.com>
483
484 * linux-low.c (handle_extended_wait): Initialize
485 thread_info.last_resume_kind for new fork children.
486
452003ef
PA
4872015-05-15 Pedro Alves <palves@redhat.com>
488
489 * target.h (target_handle_new_gdb_connection): Rewrite using if
490 wrapped in do/while.
491
1041a03c
JB
4922015-05-14 Joel Brobecker <brobecker@adacore.com>
493
494 * configure.ac: Add prfpregset_t BFD_HAVE_SYS_PROCFS_TYPE check.
495 * configure, config.in: Regenerate.
496 * gdb_proc_service.h [HAVE_PRFPREGSET_T] (prfpregset_t):
497 Declare typedef.
498
c269dbdb
DB
4992015-05-12 Don Breazeal <donb@codesourcery.com>
500
501 * linux-low.c (handle_extended_wait): Handle PTRACE_EVENT_FORK and
502 PTRACE_EVENT_VFORK_DONE.
503 (linux_low_ptrace_options, extended_event_reported): Add vfork
504 events.
505 * remote-utils.c (prepare_resume_reply): New stop reasons "vfork"
506 and "vforkdone" for RSP 'T' Stop Reply Packet.
507 * server.h (report_vfork_events): Declare
508 global variable.
509
3a8a0396
DB
5102015-05-12 Don Breazeal <donb@codesourcery.com>
511
512 * linux-aarch64-low.c (aarch64_linux_new_fork): New function.
513 (the_low_target) <new_fork>: Initialize new member.
514 * linux-arm-low.c (arm_new_fork): New function.
515 (the_low_target) <new_fork>: Initialize new member.
516 * linux-low.c (handle_extended_wait): Call new target function
517 new_fork.
518 * linux-low.h (struct linux_target_ops) <new_fork>: New member.
519 * linux-mips-low.c (mips_add_watchpoint): New function
520 extracted from mips_insert_point.
521 (the_low_target) <new_fork>: Initialize new member.
522 (mips_linux_new_fork): New function.
523 (mips_insert_point): Call mips_add_watchpoint.
524 * linux-x86-low.c (x86_linux_new_fork): New function.
525 (the_low_target) <new_fork>: Initialize new member.
526
de0d863e
DB
5272015-05-12 Don Breazeal <donb@codesourcery.com>
528
529 * linux-low.c (handle_extended_wait): Implement return value,
530 rename argument 'event_child' to 'event_lwp', handle
531 PTRACE_EVENT_FORK, call internal_error for unrecognized event.
532 (linux_low_ptrace_options): New function.
533 (linux_low_filter_event): Call linux_low_ptrace_options,
534 use different argument fo linux_enable_event_reporting,
535 use return value from handle_extended_wait.
536 (extended_event_reported): New function.
537 (linux_wait_1): Call extended_event_reported and set
538 status to report fork events.
539 (linux_write_memory): Add pid to debug message.
540 (reset_lwp_ptrace_options_callback): New function.
541 (linux_handle_new_gdb_connection): New function.
542 (linux_target_ops): Initialize new structure member.
543 * linux-low.h (struct lwp_info) <waitstatus>: New member.
544 * lynx-low.c: Initialize new structure member.
545 * remote-utils.c (prepare_resume_reply): Implement stop reason
546 "fork" for "T" stop message.
547 * server.c (handle_query): Call handle_new_gdb_connection.
548 * server.h (report_fork_events): Declare global flag.
549 * target.h (struct target_ops) <handle_new_gdb_connection>:
550 New member.
551 (target_handle_new_gdb_connection): New macro.
552 * win32-low.c: Initialize new structure member.
553
ddcbc397
DB
5542015-05-12 Don Breazeal <donb@codesourcery.com>
555
556 * mem-break.c (APPEND_TO_LIST): Define macro.
557 (clone_agent_expr): New function.
558 (clone_one_breakpoint): New function.
559 (clone_all_breakpoints): New function.
560 * mem-break.h: Declare new functions.
561
89245bc0
DB
5622015-05-12 Don Breazeal <donb@codesourcery.com>
563
564 * linux-low.c (linux_supports_fork_events): New function.
565 (linux_supports_vfork_events): New function.
566 (linux_target_ops): Initialize new structure members.
567 (initialize_low): Call linux_check_ptrace_features.
568 * lynx-low.c (lynx_target_ops): Initialize new structure
569 members.
570 * server.c (report_fork_events, report_vfork_events):
571 New global flags.
572 (handle_query): Add new features to qSupported packet and
573 response.
574 (captured_main): Initialize new global variables.
575 * target.h (struct target_ops) <supports_fork_events>:
576 New member.
577 <supports_vfork_events>: New member.
578 (target_supports_fork_events): New macro.
579 (target_supports_vfork_events): New macro.
580 * win32-low.c (win32_target_ops): Initialize new structure
581 members.
582
835205d0
GB
5832015-05-12 Gary Benson <gbenson@redhat.com>
584
585 * server.c (handle_qxfer_exec_file): Use current process
586 if annex is empty.
587
21e94bd9
SL
5882015-05-08 Sandra Loosemore <sandra@codesourcery.com>
589
590 * linux-nios2-low.c: Include elf/common.h. Adjust comments.
591 Remove HAVE_PTRACE_GETREGS conditionals.
592 (nios2_regsets): Use PTRACE_GETREGSET and PTRACE_SETREGSET
593 instead of PTRACE_GETREGS and PTRACE_SETREGS.
594
45614f15
YQ
5952015-05-08 Yao Qi <yao.qi@linaro.org>
596
597 * linux-low.c (linux_supports_conditional_breakpoints): New
598 function.
599 (linux_target_ops): Install new target method.
600 * lynx-low.c (lynx_target_ops): Install NULL hook for
601 supports_conditional_breakpoints.
602 * nto-low.c (nto_target_ops): Likewise.
603 * spu-low.c (spu_target_ops): Likewise.
604 * win32-low.c (win32_target_ops): Likewise.
605 * server.c (handle_query): Check
606 target_supports_conditional_breakpoints.
607 * target.h (struct target_ops) <supports_conditional_breakpoints>:
608 New field.
609 (target_supports_conditional_breakpoints): New macro.
610
80ad801e
PA
6112015-05-06 Pedro Alves <palves@redhat.com>
612
613 PR server/18081
614 * server.c (start_inferior): If the process exits, mourn it.
615
819843c7
GB
6162015-04-21 Gary Benson <gbenson@redhat.com>
617
618 * hostio.c (fileio_open_flags_to_host): Factored out to
619 fileio_to_host_openflags in common/fileio.c. Single use
620 updated.
621
a2d5a9d7
MF
6222015-04-17 Max Filippov <jcmvbkbc@gmail.com>
623
624 * linux-xtensa-low.c (xtensa_fill_gregset)
625 (xtensa_store_gregset): Check XCHAL_HAVE_LOOPS instead of
626 XCHAL_HAVE_LOOP.
627
deb44829
MF
6282015-04-17 Max Filippov <jcmvbkbc@gmail.com>
629
630 * linux-xtensa-low.c (xtensa_usrregs_info): Remove.
631 (regs_info): Replace usrregs pointer with NULL.
632
e57f1de3
GB
6332015-04-17 Gary Benson <gbenson@redhat.com>
634
635 * target.h (struct target_ops) <pid_to_exec_file>: New field.
636 * linux-low.c (linux_target_ops): Initialize pid_to_exec_file.
637 * server.c (handle_qxfer_exec_file): New function.
638 (qxfer_packets): Add exec-file entry.
639 (handle_query): Report qXfer:exec-file:read as supported packet.
640
62828379
RN
6412015-04-14 Romain Naour <romain.naour@openwide.fr> (tiny change)
642
643 * linux-low.c (linux_read_offsets): Remove get_thread_lwp.
644
b88bb450
GB
6452015-04-09 Gary Benson <gbenson@redhat.com>
646
647 * hostio-errno.c (errno_to_fileio_error): Remove function.
648 Update caller to use remote_fileio_to_fio_error.
649
c8f4bfdd
YQ
6502015-04-09 Yao Qi <yao.qi@linaro.org>
651
652 * linux-low.c (linux_insert_point): Call
653 insert_memory_breakpoint if TYPE is raw_bkpt_type_sw.
654 (linux_remove_point): Call remove_memory_breakpoint if type is
655 raw_bkpt_type_sw.
656 * linux-x86-low.c (x86_insert_point): Don't call
657 insert_memory_breakpoint.
658 (x86_remove_point): Don't call remove_memory_breakpoint.
659
41f98f02
PA
6602015-04-01 Pedro Alves <palves@redhat.com>
661 Cleber Rosa <crosa@redhat.com>
662
663 * server.c (gdbserver_usage): Reorganize and extend the usage
664 message.
665
2bf6fb9d
PA
6662015-03-24 Pedro Alves <palves@redhat.com>
667
668 * linux-low.c (check_stopped_by_breakpoint): Tweak debug log
669 output. Also dump TRAP_TRACE.
670 (linux_low_filter_event): In debug output, distinguish a
671 resume_stop SIGSTOP from a delayed SIGSTOP.
672
369f6daa
GB
6732015-03-24 Gary Benson <gbenson@redhat.com>
674
675 * linux-x86-low.c (x86_linux_new_thread): Moved to
676 nat/x86-linux.c.
677 (x86_linux_prepare_to_resume): Likewise.
678
8e5d4070
GB
6792015-03-24 Gary Benson <gbenson@redhat.com>
680
681 * Makefile.in (x86-linux-dregs.o): New rule.
682 * configure.srv: Add x86-linux-dregs.o to relevant targets.
683 * linux-x86-low.c: Include nat/x86-linux-dregs.h.
684 (u_debugreg_offset): Moved to nat/x86-linux-dregs.c.
685 (x86_linux_dr_get): Likewise.
686 (x86_linux_dr_set): Likewise.
687 (update_debug_registers_callback): Likewise.
688 (x86_linux_dr_set_addr): Likewise.
689 (x86_linux_dr_get_addr): Likewise.
690 (x86_linux_dr_set_control): Likewise.
691 (x86_linux_dr_get_control): Likewise.
692 (x86_linux_dr_get_status): Likewise.
693 (x86_linux_update_debug_registers): Likewise.
694
2b95d440
GB
6952015-03-24 Gary Benson <gbenson@redhat.com>
696
697 * linux-x86-low.c (x86_linux_update_debug_registers):
698 New function, factored out from...
699 (x86_linux_prepare_to_resume): ...this.
700
14b0bc68
GB
7012015-03-24 Gary Benson <gbenson@redhat.com>
702
703 * linux-x86-low.c (x86_linux_dr_get): Update comments.
704 (x86_linux_dr_set): Likewise.
705 (update_debug_registers_callback): Likewise.
706 (x86_linux_dr_set_addr): Likewise.
707 (x86_linux_dr_get_addr): Likewise.
708 (x86_linux_dr_set_control): Likewise.
709 (x86_linux_dr_get_control): Likewise.
710 (x86_linux_dr_get_status): Likewise.
711 (x86_linux_prepare_to_resume): Likewise.
712
5dfe6ca8
GB
7132015-03-24 Gary Benson <gbenson@redhat.com>
714
715 * linux-x86-low.c (x86_linux_dr_get): Add assertion.
716 Use perror_with_name. Pass string through gettext.
717 (x86_linux_dr_set): Likewise.
718
d33472ad
GB
7192015-03-24 Gary Benson <gbenson@redhat.com>
720
721 * linux-x86-low.c (x86_dr_low_set_addr): Rename to...
722 (x86_linux_dr_set_addr): ...this.
723 (x86_dr_low_get_addr): Rename to...
724 (x86_linux_dr_get_addr): ...this.
725 (x86_dr_low_set_control): Rename to...
726 (x86_linux_dr_set_control): ...this.
727 (x86_dr_low_get_control): Rename to...
728 (x86_linux_dr_get_control): ...this.
729 (x86_dr_low_get_status): Rename to...
730 (x86_linux_dr_get_status): ...this.
731 (x86_dr_low): Update with new function names.
732
4b134ca1
GB
7332015-03-24 Gary Benson <gbenson@redhat.com>
734
735 * Makefile.in (x86-linux.o): New rule.
736 * configure.srv: Add x86-linux.o to relevant targets.
737 * linux-low.c (lwp_set_arch_private_info): New function.
738 (lwp_arch_private_info): Likewise.
739 * linux-x86-low.c: Include nat/x86-linux.h.
740 (arch_lwp_info): Removed structure.
741 (update_debug_registers_callback):
742 Use lwp_set_debug_registers_changed.
743 (x86_linux_prepare_to_resume): Use lwp_debug_registers_changed
744 and lwp_set_debug_registers_changed.
745 (x86_linux_new_thread): Use lwp_set_debug_registers_changed.
746
34c703da
GB
7472015-03-24 Gary Benson <gbenson@redhat.com>
748
749 * linux-low.h (linux_target_ops) <new_thread>: Changed signature.
750 * linux-arm-low.c (arm_new_thread): Likewise.
751 * linux-aarch64-low.c (aarch64_linux_new_thread): Likewise.
752 * linux-mips-low.c (mips_linux_new_thread): Likewise.
753 * linux-x86-low.c (x86_linux_new_thread): Likewise.
754 * linux-low.c (add_lwp): Update the_low_target.new_thread call.
755
cff068da
GB
7562015-03-24 Gary Benson <gbenson@redhat.com>
757
758 * linux-low.c (ptid_of_lwp): New function.
759 (lwp_is_stopped): Likewise.
760 (lwp_stop_reason): Likewise.
761 * linux-x86-low.c (update_debug_registers_callback):
762 Use lwp_is_stopped.
763 (x86_linux_prepare_to_resume): Use ptid_of_lwp and
764 lwp_stop_reason.
765
b2f7c7e8
GB
7662015-03-24 Gary Benson <gbenson@redhat.com>
767
768 * linux-low.h (linux_stop_lwp): Remove declaration.
769
6d4ee8c6
GB
7702015-03-24 Gary Benson <gbenson@redhat.com>
771
772 * linux-low.h: Include nat/linux-nat.h.
773 * linux-low.c (iterate_over_lwps_args): New structure.
774 (iterate_over_lwps_filter): New function.
775 (iterate_over_lwps): Likewise.
776 * linux-x86-low.c (update_debug_registers_callback):
777 Update signature to what iterate_over_lwps expects.
778 Remove PID check that iterate_over_lwps now performs.
779 (x86_dr_low_set_addr): Use iterate_over_lwps.
780 (x86_dr_low_set_control): Likewise.
781
70a0bb6b
GB
7822015-03-24 Gary Benson <gbenson@redhat.com>
783
784 * linux-x86-low.c (x86_debug_reg_state): New function.
785 (x86_linux_prepare_to_resume): Use the above.
786
7b669087
GB
7872015-03-24 Gary Benson <gbenson@redhat.com>
788
789 * linux-low.c (current_lwp_ptid): New function.
790 * linux-x86-low.c: Include nat/linux-nat.h.
791 (x86_dr_low_get_addr): Use current_lwp_ptid.
792 (x86_dr_low_get_control): Likewise.
793 (x86_dr_low_get_status): Likewise.
794
eef49a3d
PA
7952015-03-20 Pedro Alves <palves@redhat.com>
796
797 * tracepoint.c (cmd_qtstatus): Make "str" const.
798
b2333d22
PA
7992015-03-20 Pedro Alves <palves@redhat.com>
800
801 * server.c (handle_general_set): Make "req_str" const.
802
23f238d3
PA
8032015-03-19 Pedro Alves <palves@redhat.com>
804
805 * linux-low.c (linux_resume_one_lwp): Rename to ...
806 (linux_resume_one_lwp_throw): ... this. Don't handle ESRCH here,
807 instead call perror_with_name.
808 (check_ptrace_stopped_lwp_gone): New function.
809 (linux_resume_one_lwp): Reimplement as wrapper around
810 linux_resume_one_lwp_throw that swallows errors if the LWP is
811 gone.
812
91baf43f
PA
8132015-03-19 Pedro Alves <palves@redhat.com>
814
815 * linux-low.c (count_events_callback, select_event_lwp_callback):
816 No longer check whether the thread has resume_stop as last resume
817 kind.
818
8bf3b159
PA
8192015-03-19 Pedro Alves <palves@redhat.com>
820
821 * linux-low.c (count_events_callback, select_event_lwp_callback):
822 Use the lwp's status_pending_p field, not the thread's.
823
b90fc188
PA
8242015-03-19 Pedro Alves <palves@redhat.com>
825
826 * linux-low.c (select_event_lwp_callback): Update comments to
827 no longer mention SIGTRAP.
828
464b0089
GB
8292015-03-18 Gary Benson <gbenson@redhat.com>
830
831 * server.c (handle_query): Do not report vFile:fstat as supported.
832
aa9e327f
GB
8332015-03-11 Gary Benson <gbenson@redhat.com>
834
835 * hostio.c (sys/types.h): New include.
836 (sys/stat.h): Likewise.
837 (common-remote-fileio.h): Likewise.
838 (handle_fstat): New function.
839 (handle_vFile): Handle vFile:fstat packets.
aa9e327f 840
791c0056
GB
8412015-03-11 Gary Benson <gbenson@redhat.com>
842
843 * configure.ac (AC_CHECK_MEMBERS): Add checks for
844 struct stat.st_blocks and struct stat.st_blksize.
845 * configure: Regenerate.
846 * config.in: Likewise.
847 * Makefile.in (SFILES): Add common/common-remote-fileio.c.
848 (OBS): Add common-remote-fileio.o.
849 (common-remote-fileio.o): New rule.
850
9a9df970
PA
8512015-03-09 Pedro Alves <palves@redhat.com>
852
853 * tracepoint.c (gdb_agent_helper_thread): Cast '&sockaddr' to
854 'struct sockaddr' pointer in 'accept' call.
855
9eb1356e
PA
8562015-03-09 Pedro Alves <palves@redhat.com>
857
858 Revert:
859 2015-03-07 Pedro Alves <palves@redhat.com>
860 * gdbreplay.c: No longer include <netinet/in.h>, <sys/socket.h>,
861 or <winsock2.h> here. Instead include "gdb_socket.h".
862 (remote_open): Use union gdb_sockaddr_u.
863 * remote-utils.c: No longer include <netinet/in.h>, <sys/socket.h>
864 or <winsock2.h> here. Instead include "gdb_socket.h".
865 (handle_accept_event, remote_prepare): Use union gdb_sockaddr_u.
866 * tracepoint.c: Include "gdb_socket.h" instead of <sys/socket.h>
867 or <sys/un.h>.
868 (init_named_socket, gdb_agent_helper_thread): Use union
869 gdb_sockaddr_u.
870
aac331e4
PA
8712015-03-07 Pedro Alves <palves@redhat.com>
872
873 * configure.ac (build_warnings): Move
874 -Wdeclaration-after-statement to the C-specific set.
875 * configure: Regenerate.
876
366c75fc
PA
8772015-03-07 Pedro Alves <palves@redhat.com>
878
879 * gdbreplay.c: No longer include <netinet/in.h>, <sys/socket.h>,
880 or <winsock2.h> here. Instead include "gdb_socket.h".
881 (remote_open): Use union gdb_sockaddr_u.
882 * remote-utils.c: No longer include <netinet/in.h>, <sys/socket.h>
883 or <winsock2.h> here. Instead include "gdb_socket.h".
884 (handle_accept_event, remote_prepare): Use union gdb_sockaddr_u.
885 * tracepoint.c: Include "gdb_socket.h" instead of <sys/socket.h>
886 or <sys/un.h>.
887 (init_named_socket, gdb_agent_helper_thread): Use union
888 gdb_sockaddr_u.
889
492d29ea
PA
8902015-03-07 Pedro Alves <palves@redhat.com>
891
892 Adjust all callers of TRY_CATCH to use TRY/CATCH/END_CATCH
893 instead.
894
60a191ed
YQ
8952015-03-06 Yao Qi <yao.qi@linaro.org>
896
897 * linux-aarch64-low.c (aarch64_insert_point): Use
898 show_debug_regs as a boolean.
899 (aarch64_remove_point): Likewise.
900
f5771b1d
PA
9012015-03-05 Pedro Alves <palves@redhat.com>
902
903 * lynx-low.c (lynx_target_ops): Install NULL hooks for
904 stopped_by_sw_breakpoint, supports_stopped_by_sw_breakpoint,
905 stopped_by_hw_breakpoint, supports_stopped_by_hw_breakpoint.
906 * nto-low.c (nto_target_ops): Likewise.
907 * spu-low.c (spu_target_ops): Likewise.
908 * win32-low.c (win32_target_ops): Likewise.
909
3e572f71
PA
9102015-03-04 Pedro Alves <palves@redhat.com>
911
72f4393d 912 * linux-low.c (check_stopped_by_breakpoint) [USE_SIGTRAP_SIGINFO]:
3e572f71
PA
913 Decide whether a breakpoint triggered based on the SIGTRAP's
914 siginfo.si_code.
72f4393d
L
915 (thread_still_has_status_pending_p) [USE_SIGTRAP_SIGINFO]: Don't check whether a
916 breakpoint is inserted if relying on SIGTRAP's siginfo.si_code.
3e572f71
PA
917 (linux_low_filter_event): Check for breakpoints before checking
918 watchpoints.
919 (linux_wait_1): Don't re-increment the PC if relying on SIGTRAP's
920 siginfo.si_code.
72f4393d
L
921 (linux_stopped_by_sw_breakpoint)
922 (linux_supports_stopped_by_sw_breakpoint)
923 (linux_stopped_by_hw_breakpoint)
924 (linux_supports_stopped_by_hw_breakpoint): New functions.
925 (linux_target_ops): Install new target methods.
3e572f71 926
1ec68e26
PA
9272015-03-04 Pedro Alves <palves@redhat.com>
928
929 * remote-utils.c (prepare_resume_reply): Report swbreak/hbreak.
930 * server.c (swbreak_feature, hwbreak_feature): New globals.
931 (handle_query) <qSupported>: Handle "swbreak+" and "hwbreak+".
932 (captured_main): Clear swbreak_feature and hwbreak_feature.
933 * server.h (swbreak_feature, hwbreak_feature): Declare.
934 * target.h (struct target_ops) <stopped_by_sw_breakpoint,
935 supports_stopped_by_sw_breakpoint, stopped_by_hw_breakpoint,
936 supports_stopped_by_hw_breakpoint>: New fields.
937 (target_supports_stopped_by_sw_breakpoint)
938 (target_stopped_by_sw_breakpoint)
939 (target_supports_stopped_by_hw_breakpoint)
940 (target_stopped_by_hw_breakpoint): Declare.
941
15c66dd6
PA
9422015-03-04 Pedro Alves <palves@redhat.com>
943
944 enum lwp_stop_reason -> enum target_stop_reason
945 * linux-low.c (check_stopped_by_breakpoint): Adjust.
946 (thread_still_has_status_pending_p, check_stopped_by_watchpoint)
947 (linux_wait_1, stuck_in_jump_pad_callback)
948 (move_out_of_jump_pad_callback, linux_resume_one_lwp)
949 (linux_stopped_by_watchpoint):
950 * linux-low.h (enum lwp_stop_reason): Delete.
951 (struct lwp_info) <stop_reason>: Now an enum target_stop_reason.
952 * linux-x86-low.c (x86_linux_prepare_to_resume): Adjust.
953
98fc70d6
YQ
9542015-03-04 Yao Qi <yao.qi@linaro.org>
955
956 * Makefile.in (SFILES): Add linux-aarch64-low.c.
957
dd2ac174
GB
9582015-03-03 Gary Benson <gbenson@redhat.com>
959
960 * hostio.c (handle_vFile): Fix prefix lengths.
961
d68e53f4
MM
9622015-03-03 Markus Metzger <markus.t.metzger@intel.com>
963
964 * linux-low.c (linux_low_enable_btrace): Do not overwrite non-zero
965 ptr_bits.
966
bf2d68ab
AA
9672015-03-02 Andreas Arnez <arnez@linux.vnet.ibm.com>
968
969 * Makefile.in (s390-vx-linux64.c, s390-tevx-linux64.c)
970 (s390x-vx-linux64.c, s390x-tevx-linux64.c): New rules.
971 (clean): Add "rm -f" for above C files.
972 * configure.srv (srv_regobj): Add s390-vx-linux64.o,
973 s390-tevx-linux64.o, s390x-vx-linux64.o, and s390x-tevx-linux64.o.
974 (srv_xmlfiles): Add s390-vx-linux64.xml, s390-tevx-linux64.xml,
975 s390x-vx-linux64.xml, s390x-tevx-linux64.xml, and s390-vx.xml.
976 * linux-s390-low.c (HWCAP_S390_VX): New macro.
977 (init_registers_s390_vx_linux64, init_registers_s390_tevx_linux64)
978 (init_registers_s390x_vx_linux64)
979 (init_registers_s390x_tevx_linux64)
980 (tdesc_s390_vx_linux64, tdesc_s390_tevx_linux64)
981 (tdesc_s390x_vx_linux64, tdesc_s390x_tevx_linux64): New extern
982 declarations.
983 (s390_fill_vxrs_low, s390_store_vxrs_low, s390_fill_vxrs_high)
984 (s390_store_vxrs_high): New functions.
985 (s390_regsets): Add entries for NT_S390_VXRS_LOW and
986 NT_S390_VXRS_HIGH.
987 (s390_arch_setup): Add logic for selecting one of the new target
988 descriptions. Activate the new vector regsets if applicable.
989 (initialize_low_arch): Also invoke init_registers_s390_vx_linux64,
990 init_registers_s390_tevx_linux64, init_registers_s390x_vx_linux64,
991 and init_registers_s390x_tevx_linux64.
992
c966a859
PA
9932015-03-01 Pedro Alves <palves@redhat.com>
994
995 * linux-i386-ipa.c (gdb_agent_get_raw_reg): Constify 'raw_regs'
996 parameter.
997
4180215b
PA
9982015-02-27 Pedro Alves <palves@redhat.com>
999
1000 * linux-x86-low.c (u_debugreg_offset): New function.
1001 (x86_linux_dr_get, x86_linux_dr_set): Use it.
1002
749bab01
PA
10032015-02-27 Pedro Alves <palves@redhat.com>
1004
1005 * gdb_proc_service.h: Wrap with EXTERN_C_PUSH/EXTERN_C_POP.
1006 [!HAVE_PROC_SERVICE_H] (struct ps_prochandle): Forward declare.
1007 [!HAVE_PROC_SERVICE_H] (ps_pdread, ps_pdwrite, ps_ptread)
1008 ps_ptwrite, ps_lgetregs, ps_lsetregs, ps_lgetfpregs)
1009 (ps_lsetfpregs, ps_getpid)
1010 (ps_get_thread_area, ps_pglobal_lookup, ps_pstop, ps_pcontinue)
1011 (ps_lstop, ps_lcontinue, ps_lgetxregsize, ps_lgetxregs)
1012 (ps_lsetxregs, ps_plog): Declare.
1013
3c14e5a3
PA
10142015-02-27 Pedro Alves <palves@redhat.com>
1015
1016 * linux-amd64-ipa.c (gdb_agent_get_raw_reg): Use
1017 IP_AGENT_EXPORT_FUNC.
1018 * linux-i386-ipa.c (gdb_agent_get_raw_reg): Use
1019 IP_AGENT_EXPORT_FUNC.
1020 * tracepoint.c (ATTR_USED, ATTR_NOINLINE, ATTR_CONSTRUCTOR)
1021 (IP_AGENT_EXPORT): Delete.
1022 (gdb_tp_heap_buffer, gdb_jump_pad_buffer, gdb_jump_pad_buffer_end)
1023 (gdb_trampoline_buffer, gdb_trampoline_buffer_end)
1024 (gdb_trampoline_buffer_error, collecting, gdb_collect)
1025 (stop_tracing, flush_trace_buffer, about_to_request_buffer_space)
1026 (trace_buffer_is_full, stopping_tracepoint, expr_eval_result)
1027 (error_tracepoint, tracepoints, tracing, trace_buffer_ctrl)
1028 (trace_buffer_ctrl_curr, trace_buffer_lo, trace_buffer_hi)
1029 (traceframe_read_count, traceframe_write_count)
1030 (traceframes_created, trace_state_variables, get_raw_reg)
1031 (get_trace_state_variable_value, set_trace_state_variable_value)
1032 (ust_loaded, helper_thread_id, cmd_buf): Use
1033 IPA_SYM_EXPORTED_NAME.
1034 (stop_tracing, flush_trace_buffer): Use IP_AGENT_EXPORT_FUNC.
1035 (tracepoints) Use IP_AGENT_EXPORT_VAR.
1036 (stopping_tracepoint, trace_buffer_is_full, expr_eval_result): Use
1037 IP_AGENT_EXPORT_VAR and wrap in EXTERN_C_PUSH/EXTERN_C_POP.
1038 (last_tracepoint): Move into !IN_PROCESS_AGENT block.
1039 (error_tracepoint): Use IP_AGENT_EXPORT_VAR and wrap in
1040 EXTERN_C_PUSH/EXTERN_C_POP.
1041 (trace_state_variables): Use IP_AGENT_EXPORT_VAR.
1042 (trace_buffer_lo, trace_buffer_hi): Use IP_AGENT_EXPORT_VAR and
1043 wrap in EXTERN_C_PUSH/EXTERN_C_POP.
1044 (trace_buffer_ctrl, trace_buffer_ctrl_curr)
1045 (traceframe_write_count, traceframe_read_count)
1046 (traceframes_created, tracing): Use IP_AGENT_EXPORT_VAR.
1047 (about_to_request_buffer_space, get_trace_state_variable_value)
1048 (set_trace_state_variable_value): Use IP_AGENT_EXPORT_FUNC.
1049 (collecting): Use IP_AGENT_EXPORT_VAR and wrap in
1050 EXTERN_C_PUSH/EXTERN_C_POP.
1051 (gdb_collect): Use IP_AGENT_EXPORT_FUNC.
1052 (ust_loaded, cmd_buf): Use IP_AGENT_EXPORT_VAR.
1053 (helper_thread_id, gdb_agent_capability): Use IP_AGENT_EXPORT_VAR
1054 and wrap in EXTERN_C_PUSH/EXTERN_C_POP.
1055 (gdb_tp_heap_buffer, gdb_jump_pad_buffer, gdb_jump_pad_buffer_end)
1056 (gdb_trampoline_buffer, gdb_trampoline_buffer_end)
1057 (gdb_trampoline_buffer_error): Use IP_AGENT_EXPORT_VAR.
1058 * tracepoint.h (ATTR_USED, ATTR_NOINLINE, EXPORTED_SYMBOL):
1059 Define.
1060 (IP_AGENT_EXPORT_FUNC, IP_AGENT_EXPORT_VAR)
1061 (IP_AGENT_EXPORT_VAR_DECL): Define.
1062 (tracing): Declare.
1063 (gdb_agent_get_raw_reg): Declare.
1064
fe978cb0
PA
10652015-02-27 Tom Tromey <tromey@redhat.com>
1066 Pedro Alves <palves@redhat.com>
1067
1068 Rename symbols whose names are reserved C++ keywords throughout.
1069
3bc3d82a
PA
10702015-02-27 Pedro Alves <palves@redhat.com>
1071
1072 * Makefile.in (COMPILER): New, get it from autoconf.
1073 (CXX): Get from autoconf instead.
1074 (COMPILE.pre): Use COMPILER.
1075 (CC-LD): Rename to ...
1076 (CC_LD): ... this. Use COMPILER.
1077 (gdbserver$(EXEEXT), gdbreplay$(EXEEXT), $(IPA_LIB)): Adjust.
1078 (CXX_FOR_TARGET): Default to g++ instead of gcc.
1079 * acinclude.m4: Include build-with-cxx.m4.
1080 * configure.ac: Call AC_PROG_CXX and GDB_AC_BUILD_WITH_CXX.
1081 Disable -Werror by default if building in C++ mode.
1082 (build_warnings): Add -Wno-sign-compare, -Wno-write-strings and
1083 -Wno-narrowing in C++ mode. Run supported-warning-flags tests with
1084 the C++ compiler. Save/restore CXXFLAGS too.
1085 * configure: Regenerate.
1086
07697489
PA
10872015-02-27 Pedro Alves <palves@redhat.com>
1088
1089 * acinclude.m4: Include libiberty.m4.
1090 * configure.ac: Call libiberty_INIT.
1091 * config.in, configure: Regenerate.
1092
9beb7c4e
PA
10932015-02-26 Pedro Alves <palves@redhat.com>
1094
1095 * linux-low.c (linux_wait_1): When incrementing the PC past a
1096 program breakpoint always use the_low_target.breakpoint_len as
1097 increment, rather than the maximum between that and
1098 the_low_target.decr_pc_after_break.
1099
8090aef2
PA
11002015-02-23 Pedro Alves <palves@redhat.com>
1101
1102 * linux-low.c (check_stopped_by_breakpoint): Don't check if the
1103 thread was doing a step-over; always adjust the PC if
1104 we stepped over a permanent breakpoint.
1105 (linux_wait_1): If we stepped over breakpoint that was on top of a
1106 permanent breakpoint, manually advance the PC past it.
1107
bc9540e8
PA
11082015-02-23 Pedro Alves <palves@redhat.com>
1109
1110 * linux-x86-low.c (REGSIZE): Define in both 32-bit and 64-bit
1111 modes.
1112 (x86_fill_gregset, x86_store_gregset): Use it when handling
1113 $orig_eax.
1114
2db9a427
PA
11152015-02-20 Pedro Alves <palves@redhat.com>
1116
1117 * thread-db.c: Include "nat/linux-procfs.h".
1118 (thread_db_init): Skip listing new threads if the kernel supports
1119 PTRACE_EVENT_CLONE and /proc/PID/task/ is accessible.
1120
afa8d396
PA
11212015-02-20 Pedro Alves <palves@redhat.com>
1122
1123 * linux-low.c (status_pending_p_callback): Use ptid_match.
1124
c9587f88
AT
11252015-02-19 Antoine Tremblay <antoine.tremblay@ericsson.com>
1126
1127 PR breakpoints/16812
1128 * linux-low.c (wstatus_maybe_breakpoint): Remove.
1129 (linux_low_filter_event): Update wstatus_maybe_breakpoint name.
1130 (linux_wait_1): Report SIGTRAP,SIGILL,SIGSEGV.
1131
b05ec7a5
AT
11322015-02-10 Antoine Tremblay <antoine.tremblay@ericsson.com>
1133
1134 PR breakpoints/15956
1135 * tracepoint.c (cmd_qtinit): Add check for current_thread.
1136
d33501a5
MM
11372015-02-09 Markus Metzger <markus.t.metzger@intel.com>
1138
1139 * linux-low.c (linux_low_btrace_conf): Print size.
1140 * server.c (handle_btrace_conf_general_set): New.
1141 (hanle_general_set): Call handle_btrace_conf_general_set.
1142 (handle_query): Report Qbtrace-conf:bts:size as supported.
1143
f4abbc16
MM
11442015-02-09 Markus Metzger <markus.t.metzger@intel.com>
1145
1146 * linux-low.c (linux_low_enable_btrace): Update parameters.
1147 (linux_low_btrace_conf): New.
1148 (linux_target_ops)<to_btrace_conf>: Initialize.
1149 * server.c (current_btrace_conf): New.
1150 (handle_btrace_enable): Rename to ...
1151 (handle_btrace_enable_bts): ... this. Pass &current_btrace_conf
1152 to target_enable_btrace. Update comment. Update users.
1153 (handle_qxfer_btrace_conf): New.
1154 (qxfer_packets): Add btrace-conf entry.
1155 (handle_query): Report qXfer:btrace-conf:read as supported packet.
1156 * target.h (target_ops)<enable_btrace>: Update parameters and comment.
1157 (target_ops)<read_btrace_conf>: New.
1158 (target_enable_btrace): Update parameters.
1159 (target_read_btrace_conf): New.
1160
043c3577
MM
11612015-02-09 Markus Metzger <markus.t.metzger@intel.com>
1162
1163 * server.c (handle_btrace_general_set): Remove call to
1164 target_supports_btrace.
1165 (supported_btrace_packets): New.
1166 (handle_query): Call supported_btrace_packets.
1167 * target.h: include btrace-common.h.
1168 (btrace_target_info): Removed.
1169 (supports_btrace, target_supports_btrace): Update parameters.
1170
734b0e4b
MM
11712015-02-09 Markus Metzger <markus.t.metzger@intel.com>
1172
1173 * Makefile.in (SFILES): Add common/btrace-common.c.
1174 (OBS): Add common/btrace-common.o.
1175 (btrace-common.o): Add build rules.
1176 * linux-low: Include btrace-common.h.
1177 (linux_low_read_btrace): Use struct btrace_data. Call
1178 btrace_data_init and btrace_data_fini.
1179
d6c146e9
PA
11802015-02-06 Pedro Alves <palves@redhat.com>
1181
1182 * thread-db.c (find_new_threads_callback): Add debug output.
1183
20ba1ce6
PA
11842015-02-04 Pedro Alves <palves@redhat.com>
1185
1186 * linux-low.c (handle_extended_wait): Don't resume LWPs here.
1187 (resume_stopped_resumed_lwps): New function.
1188 (linux_wait_for_event_filtered): Use it.
1189
8cc73a39
SDJ
11902015-01-15 Sergio Durigan Junior <sergiodj@redhat.com>
1191
1192 * Makefile.in (SFILES): Add linux-personality.c.
1193 (linux-personality.o): New rule.
1194 * configure.srv (srv_linux_obj): Add linux-personality.o to the
1195 list of objects to be built.
1196 * linux-low.c: Include nat/linux-personality.h.
1197 (linux_create_inferior): Remove code to disable address space
1198 randomization (moved to ../nat/linux-personality.c). Create
1199 cleanup to disable address space randomization.
1200
fb23d554
SDJ
12012015-01-15 Sergio Durigan Junior <sergiodj@redhat.com>
1202
1203 * Makefile.in (posix-strerror.o): New rule.
1204 (mingw-strerror.o): Likewise.
1205 * configure: Regenerated.
1206 * configure.ac: Source file ../common/common.host. Initialize new
1207 variable srv_host_obs. Add srv_host_obs to GDBSERVER_DEPFILES.
1208
cdf43629
YQ
12092015-01-14 Yao Qi <yao@codesourcery.com>
1210
1211 * Makefile.in (SFILES): Add nat/ppc-linux.c.
1212 (ppc-linux.o): New rule.
1213 * configure.srv (powerpc*-*-linux*): Add ppc-linux.o.
1214 * configure.ac: AC_CHECK_FUNCS(getauxval).
1215 * config.in: Re-generated.
1216 * configure: Re-generated.
1217 * linux-ppc-low.c (ppc_arch_setup) [__powerpc64__]: Call
1218 ppc64_64bit_inferior_p
1219
514c5338
YQ
12202015-01-14 Yao Qi <yao@codesourcery.com>
1221
1222 * linux-ppc-low.c: Include "nat/ppc-linux.h".
1223 (PPC_FEATURE_HAS_VSX): Move to nat/ppc-linux.h.
1224 (PPC_FEATURE_HAS_ALTIVEC, PPC_FEATURE_HAS_SPE): Likewise.
1225 (PT_ORIG_R3, PT_TRAP): Likewise.
1226 (PTRACE_GETVSXREGS, PTRACE_SETVSXREGS): Likewise.
1227 (PTRACE_GETVRREGS, PTRACE_SETVRREGS): Likewise.
1228 (PTRACE_GETEVRREGS, PTRACE_SETEVRREGS): Likewise.
1229
3368c1e5
JB
12302015-01-10 Joel Brobecker <brobecker@adacore.com>
1231
1232 * i387-fp.c (i387_cache_to_xsave): In look over
1233 num_avx512_zmmh_high_registers, replace use of struct i387_xsave
1234 zmmh_low_space field by use of zmmh_high_space.
1235
582511be
PA
12362015-01-09 Pedro Alves <palves@redhat.com>
1237
1238 * linux-low.c (step_over_bkpt): Move higher up in the file.
1239 (handle_extended_wait): Don't store the stop_pc here.
1240 (get_stop_pc): Adjust comments and rename to ...
1241 (check_stopped_by_breakpoint): ... this. Record whether the LWP
1242 stopped for a software breakpoint or hardware breakpoint.
1243 (thread_still_has_status_pending_p): New function.
1244 (status_pending_p_callback): Use
1245 thread_still_has_status_pending_p. If the event is no longer
1246 interesting, resume the LWP.
1247 (handle_tracepoints): Add assert.
1248 (maybe_move_out_of_jump_pad): Remove cancel_breakpoints call.
1249 (wstatus_maybe_breakpoint): New function.
1250 (cancel_breakpoint): Delete function.
1251 (check_stopped_by_watchpoint): New function, factored out from
1252 linux_low_filter_event.
1253 (lp_status_maybe_breakpoint): Delete function.
1254 (linux_low_filter_event): Remove filter_ptid argument.
1255 Leave thread group exits pending here. Store the LWP's stop PC.
1256 Always leave events pending.
1257 (linux_wait_for_event_filtered): Pull all events out of the
1258 kernel, and leave them all pending.
1259 (count_events_callback, select_event_lwp_callback): Consider all
1260 events.
1261 (cancel_breakpoints_callback, linux_cancel_breakpoints): Delete.
1262 (select_event_lwp): Only give preference to the stepping LWP in
1263 all-stop mode. Adjust comments.
1264 (ignore_event): New function.
1265 (linux_wait_1): Delete 'retry' label. Use ignore_event. Remove
1266 references to cancel_breakpoints. Adjust to renames. Also give
1267 equal priority to all LWPs that have had events in non-stop mode.
1268 If reporting a software breakpoint event, unadjust the LWP's PC.
1269 (linux_wait): If linux_wait_1 returned an ignored event, retry.
1270 (stuck_in_jump_pad_callback, move_out_of_jump_pad_callback):
1271 Adjust.
1272 (linux_resume_one_lwp): Store the LWP's PC. Adjust.
1273 (resume_status_pending_p): Use thread_still_has_status_pending_p.
1274 (linux_stopped_by_watchpoint): Adjust.
1275 (linux_target_ops): Remove reference to linux_cancel_breakpoints.
1276 * linux-low.h (enum lwp_stop_reason): New.
1277 (struct lwp_info) <stop_pc>: Adjust comment.
1278 <stopped_by_watchpoint>: Delete field.
1279 <stop_reason>: New field.
1280 * linux-x86-low.c (x86_linux_prepare_to_resume): Adjust.
1281 * mem-break.c (software_breakpoint_inserted_here)
1282 (hardware_breakpoint_inserted_here): New function.
1283 * mem-break.h (software_breakpoint_inserted_here)
1284 (hardware_breakpoint_inserted_here): Declare.
1285 * target.h (struct target_ops) <cancel_breakpoints>: Remove field.
1286 (cancel_breakpoints): Delete.
1287 * tracepoint.c (clear_installed_tracepoints, stop_tracing)
1288 (upload_fast_traceframes): Remove references to
1289 cancel_breakpoints.
1290
a33e3959
PA
12912015-01-09 Pedro Alves <palves@redhat.com>
1292
1293 * thread-db.c (find_new_threads_callback): Ignore thread if the
1294 kernel thread ID is -1.
1295
8784d563
PA
12962015-01-09 Pedro Alves <palves@redhat.com>
1297
1298 * linux-low.c (linux_attach_fail_reason_string): Move to
1299 nat/linux-ptrace.c, and rename.
1300 (linux_attach_lwp): Update comment.
1301 (attach_proc_task_lwp_callback): New function.
1302 (linux_attach): Adjust to rename and use
1303 linux_proc_attach_tgid_threads.
1304 (linux_attach_fail_reason_string): Delete declaration.
1305
76f2b779
JB
13062015-01-01 Joel Brobecker <brobecker@adacore.com>
1307
1308 * gdbreplay.c (gdbreplay_version): Update copyright year to 2015.
1309 * server.c (gdbserver_version): Likewise.
1310
fafcc06a
SDJ
13112014-12-29 Sergio Durigan Junior <sergiodj@redhat.com>
1312
1313 * remote-utils.c: Include ctype.h.
1314 (input_interrupt): Explicitly handle the case when the char
1315 received is the NUL byte. Improve the printing of non-ASCII
1316 characters.
1317
beed38b8
JB
13182014-12-16 Joel Brobecker <brobecker@adacore.com>
1319
1320 * linux-low.c (linux_low_filter_event): Update call to
1321 linux_enable_event_reporting following the addition of
1322 a new parameter to that function.
1323
bf330350
CU
13242014-12-16 Catalin Udma <catalin.udma@freescale.com>
1325
1326 PR server/17457
1327 * linux-aarch64-low.c (AARCH64_FPSR_REGNO): New define.
1328 (AARCH64_FPCR_REGNO): Likewise.
1329 (AARCH64_NUM_REGS): Update to include fpsr/fpcr registers.
1330 (aarch64_fill_fpregset): Add missing fpsr/fpcr registers.
1331 (aarch64_store_fpregset): Likewise.
1332
5227d625
JB
13332014-12-15 Joel Brobecker <brobecker@adacore.com>
1334
1335 * lynx-low.c (lynx_resume): Use PTRACE_SINGLESTEP_ONE if N == 1.
1336 Remove FIXME comment about assumption about N.
1337
f93b65a0
JB
13382014-12-13 Joel Brobecker <brobecker@adacore.com>
1339
1340 * configure.ac: If large-file support is disabled in GDBserver,
1341 pass --disable-largefile to ACX_CONFIGURE_DIR call for "gnulib".
1342 * configure: Regenerate.
1343
e5a9158d
AA
13442014-12-12 Andreas Arnez <arnez@linux.vnet.ibm.com>
1345
1346 * linux-low.c (regsets_fetch_inferior_registers): Suppress the
1347 warning upon ENODATA from ptrace.
1348 * linux-s390-low.c (s390_store_tdb): New.
1349 (s390_regsets): Add regset for NT_S390_TDB.
1350
feea5f36
AA
13512014-12-12 Andreas Arnez <arnez@linux.vnet.ibm.com>
1352
1353 * linux-low.c (regsets_store_inferior_registers): Skip regsets
1354 without a fill_function.
1355 * linux-s390-low.c (s390_fill_last_break): Remove.
1356 (s390_regsets): Set fill_function to NULL for NT_S390_LAST_BREAK.
1357 (s390_arch_setup): Use regset's size instead of fill_function for
1358 loop end condition.
1359
098dbe61
AA
13602014-12-12 Andreas Arnez <arnez@linux.vnet.ibm.com>
1361
1362 * linux-low.c (regsets_fetch_inferior_registers): Do not invoke
1363 the regset's store function when ptrace returned an error.
1364 * regcache.c (get_thread_regcache): Invalidate register cache
1365 before fetching inferior's registers.
1366
28eef672
AA
13672014-12-12 Andreas Arnez <arnez@linux.vnet.ibm.com>
1368
1369 * linux-low.c (regsets_fetch_inferior_registers): Rephrase
1370 while-loop as for-loop.
1371 (regsets_store_inferior_registers): Likewise.
1372
bdca27a2
YQ
13732014-11-28 Yao Qi <yao@codesourcery.com>
1374
1375 * configure.ac(AC_CHECK_FUNCS): Remove readlink.
1376 * config.in, configure: Re-generate.
1377 * hostio.c (handle_unlink): Remove code checking HAVE_READLINK
1378 is defined.
1379
9c232dda
YQ
13802014-11-21 Yao Qi <yao@codesourcery.com>
1381
1382 * configure.ac: Don't invoke AC_FUNC_ALLOCA.
1383 (AC_CHECK_HEADERS): Remove malloc.h.
1384 * configure: Re-generated.
1385 * config.in: Re-generated.
1386 * server.h: Don't include alloca.h and malloc.h.
1387 * gdbreplay.c: Don't check HAVE_ALLOCA_H is defined.
1388 Don't include malloc.h.
1389
43968415
JB
13902014-11-17 Joel Brobecker <brobecker@adacore.com>
1391
1392 * lynx-low.c (lynx_write_memory): Put lynx_read_memory and
1393 corresponding ERRNO check in same block.
1394
40e91bc7
PA
13952014-11-12 Pedro Alves <palves@redhat.com>
1396
1397 * server.c (cont_thread): Update comment.
1398 (start_inferior, attach_inferior): No longer clear cont_thread.
1399 (handle_v_cont): No longer set cont_thread.
1400 (captured_main): Clear cont_thread each time a GDB connects.
1401
c2c118cf
PA
14022014-11-12 Pedro Alves <palves@redhat.com>
1403
1404 * linux-low.c (linux_wait_1): Don't force a wait for the Hc
1405 thread, and don't resume all threads if the Hc thread has exited.
1406
78708b7c
PA
14072014-11-12 Pedro Alves <palves@redhat.com>
1408
1409 * linux-low.c (linux_request_interrupt): Always send a SIGINT to
1410 the process group instead of to a specific LWP.
1411
a2abc7de
PA
14122014-10-15 Pedro Alves <palves@redhat.com>
1413
1414 PR server/17487
1415 * win32-arm-low.c (arm_set_thread_context): Remove current_event
1416 parameter.
1417 (arm_set_thread_context): Delete.
1418 (the_low_target): Adjust.
1419 * win32-i386-low.c (debug_registers_changed)
1420 (debug_registers_used): Delete.
1421 (update_debug_registers_callback): New function.
1422 (x86_dr_low_set_addr, x86_dr_low_set_control): Mark all threads as
1423 needing to update their debug registers.
1424 (win32_get_current_dr): New function.
1425 (x86_dr_low_get_addr, x86_dr_low_get_control)
1426 (x86_dr_low_get_status): Fetch the debug register from the thread
1427 record's context.
1428 (i386_initial_stuff): Adjust.
1429 (i386_get_thread_context): Remove current_event parameter. Don't
1430 clear debug_registers_changed nor copy DR values to
1431 debug_reg_state.
1432 (i386_set_thread_context): Delete.
1433 (i386_prepare_to_resume): New function.
1434 (i386_thread_added): Mark the thread as needing to update irs
1435 debug registers.
1436 (the_low_target): Remove i386_set_thread_context and install
1437 i386_prepare_to_resume.
1438 * win32-low.c (win32_get_thread_context): Adjust.
1439 (win32_set_thread_context): Use SetThreadContext
1440 directly.
1441 (win32_prepare_to_resume): New function.
1442 (win32_require_context): New function, factored out from ...
1443 (thread_rec): ... this.
1444 (continue_one_thread): Call win32_prepare_to_resume on each thread
1445 we're about to continue.
1446 (win32_resume): Call win32_prepare_to_resume on the event thread.
1447 * win32-low.h (struct win32_thread_info)
1448 <debug_registers_changed>: New field.
1449 (struct win32_target_ops): Change prototype of set_thread_context,
1450 delete set_thread_context and add prepare_to_resume.
1451 (win32_require_context): New declaration.
1452
a442d071
GB
14532014-10-08 Gary Benson <gbenson@redhat.com>
1454
1455 * server.h: Do not include common-exceptions.h.
1456
6f1947e8
GB
14572014-10-08 Gary Benson <gbenson@redhat.com>
1458
1459 * server.h: Do not include cleanups.h.
1460
63b434a4
JH
14612014-09-30 James Hogan <james.hogan@imgtec.com>
1462
1463 * Makefile.in (clean): Add rm -f commands for mips-dsp-linux.c and
1464 mips64-dsp-linux.c.
1465
c4d9ceb6
YQ
14662014-09-23 Yao Qi <yao@codesourcery.com>
1467
1468 * linux-low.c (lp_status_maybe_breakpoint): New function.
1469 (linux_low_filter_event): Call lp_status_maybe_breakpoint.
1470 (count_events_callback): Likewise.
1471 (select_event_lwp_callback): Likewise.
1472 (cancel_breakpoints_callback): Likewise.
1473
89a5711c
DB
14742014-09-19 Don Breazeal <donb@codesourcery.com>
1475
1476 * linux-low.c (handle_extended_wait): Call
1477 linux_ptrace_get_extended_event.
1478 (get_stop_pc, get_detach_signal, linux_low_filter_event): Call
1479 linux_is_extended_waitstatus.
1480
bffc0964
JB
14812014-09-16 Joel Brobecker <brobecker@adacore.com>
1482
1483 * Makefile.in (CPPFLAGS): Define.
1484 (INTERNAL_CFLAGS_BASE): Add ${CPPFLAGS}.
1485 (IPAGENT_CFLAGS): Remove ${CPPFLAGS}.
1486
0bfdf32f
GB
14872014-09-16 Gary Benson <gbenson@redhat.com>
1488
1489 * inferiors.h (current_inferior): Renamed as...
1490 (current_thread): New variable. All uses updated.
1491 * linux-low.c (get_pc): Renamed saved_inferior as saved_thread.
1492 (maybe_move_out_of_jump_pad): Likewise.
1493 (cancel_breakpoint): Likewise.
1494 (linux_low_filter_event): Likewise.
1495 (wait_for_sigstop): Likewise.
1496 (linux_resume_one_lwp): Likewise.
1497 (need_step_over_p): Likewise.
1498 (start_step_over): Likewise.
1499 (linux_stabilize_threads): Renamed save_inferior as saved_thread.
1500 * linux-x86-low.c (x86_linux_update_xmltarget): Likewise.
1501 * proc-service.c (ps_lgetregs): Renamed reg_inferior as reg_thread
1502 and save_inferior as saved_thread.
1503 * regcache.c (get_thread_regcache): Renamed saved_inferior as
1504 saved_thread.
1505 (regcache_invalidate_thread): Likewise.
1506 * remote-utils.c (prepare_resume_reply): Likewise.
1507 * thread-db.c (thread_db_get_tls_address): Likewise.
1508 (disable_thread_event_reporting): Likewise.
1509 (remove_thread_event_breakpoints): Likewise.
1510 * tracepoint.c (gdb_agent_about_to_close): Renamed save_inferior
1511 as saved_thread.
1512 * target.h (set_desired_inferior): Renamed as...
1513 (set_desired_thread): New declaration. All uses updated.
1514 * server.c (myresume): Updated comment to reference thread instead
1515 of inferior.
1516 (handle_serial_event): Likewise.
1517 (handle_target_event): Likewise.
1518
361c8ade
GB
15192014-09-12 Tom Tromey <tromey@redhat.com>
1520 Gary Benson <gbenson@redhat.com>
1521
1522 * regcache.h: Include common-regcache.h.
1523 (regcache_read_pc): Don't declare.
1524 * regcache.c (get_thread_regcache_for_ptid): New function.
1525
bd9269f7
GB
15262014-09-11 Tom Tromey <tromey@redhat.com>
1527 Gary Benson <gbenson@redhat.com>
1528
1529 * symbol.c: New file.
1530 * Makefile.in (SFILES): Add symbol.c.
1531 (OBS): Add symbol.o.
1532
f8c1d06b
GB
15332014-09-11 Gary Benson <gbenson@redhat.com>
1534
1535 * target.c (target_stop_ptid, target_continue_ptid): New
1536 functions.
1537
721ec300
GB
15382014-09-11 Tom Tromey <tromey@redhat.com>
1539 Gary Benson <gbenson@redhat.com>
1540
1541 * target.h: Include target/target.h.
1542 * target.c (target_read_memory, target_read_uint32)
1543 (target_write_memory): New functions.
1544
c5e92cca
GB
15452014-09-11 Gary Benson <gbenson@redhat.com>
1546
1547 * server.h (debug_hw_points): Don't declare.
1548 * server.c (debug_hw_points): Don't define. Replace all uses
1549 with show_debug_regs.
1550 * linux-aarch64-low.c (debug_hw_points): Don't define. Replace
1551 all uses with show_debug_regs.
1552
2e4bb98a
EBM
15532014-09-08 Edjunior Barbosa Machado <emachado@linux.vnet.ibm.com>
1554
1555 * linux-ppc-low.c (ppc_collect_ptrace_register): Adjust routine to take
1556 endianness into account.
1557 (ppc_supply_ptrace_register): Likewise.
1558
ac740bc7
JH
15592014-09-03 James Hogan <james.hogan@imgtec.com>
1560
1561 * linux-mips-low.c (mips_read_description): Reset errno to 0 prior
1562 to reading DSP_CONTROL with PTRACE_PEEKUSER ptrace call.
1563
97ea6506
GB
15642014-09-03 Gary Benson <gbenson@redhat.com>
1565
1566 * linux-x86-low.c (x86_linux_prepare_to_resume): Use
1567 ALL_DEBUG_ADDRESS_REGISTERS.
1568
df7e5265
GB
15692014-09-02 Gary Benson <gbenson@redhat.com>
1570
1571 * i386-low.h: Renamed as...
1572 * x86-low.h: New file. All type, function and variable name
1573 prefixes changed from "i386_" to "x86_". All references updated.
1574 * i386-low.c: Renamed as...
1575 * x86-low.c: New file. All type, function and variable name
1576 prefixes changed from "i386_" to "x86_". All references updated.
1577
ed859da7
GB
15782014-09-02 Gary Benson <gbenson@redhat.com>
1579
1580 * linux-x86-low.c (x86_linux_new_process): Use XCNEW.
1581 (x86_linux_new_thread): Likewise.
1582
860789c7
GB
15832014-08-29 Gary Benson <gbenson@redhat.com>
1584
1585 * server.h (setjmp.h): Do not include.
1586 (toplevel): Do not declare.
1587 (common-exceptions.h): Include.
1588 (cleanups.h): Likewise.
1589 * server.c (toplevel): Do not define.
1590 (exit_code): New static global.
1591 (detach_or_kill_for_exit_cleanup): New function.
1592 (main): New function. Original main renamed to...
1593 (captured_main): New function.
1594 * utils.c (verror) [!IN_PROCESS_AGENT]: Use throw_verror.
1595
ff55e1b5
GB
15962014-08-29 Gary Benson <gbenson@redhat.com>
1597
1598 * Makefile.in (SFILES): Add common/common-exceptions.c.
1599 (OBS): Add common-exceptions.o.
1600 (common-exceptions.o): New rule.
1601 * utils.c (prepare_to_throw_exception): New function.
1602
e9bcb658
GB
16032014-08-29 Gary Benson <gbenson@redhat.com>
1604
1605 * config.in: Regenerate.
1606 * configure: Likewise.
1607
e3180625
GB
16082014-08-29 Gary Benson <gbenson@redhat.com>
1609
1610 * Makefile.in (SFILES): Add common/cleanups.c.
1611 (OBS): cleanups.o.
1612 (cleanups.o): New rule.
1613
e3d6ba5d
GB
16142014-08-29 Gary Benson <gbenson@redhat.com>
1615
1616 * utils.c (internal_vwarning): New function.
1617
7096e886
GB
16182014-08-28 Gary Benson <gbenson@redhat.com>
1619
1620 * utils.h (fatal): Remove declaration.
1621 * utils.c (fatal): Remove function.
1622
14ce3192
GB
16232014-08-28 Gary Benson <gbenson@redhat.com>
1624
1625 * tracepoint.c (gdb_agent_init): Replace fatal with
1626 perror_with_name.
1627 (initialize_tracepoint): Likewise.
1628
50278d59
GB
16292014-08-28 Gary Benson <gbenson@redhat.com>
1630
1631 * remote-utils.c (remote_prepare): Replace fatal with error.
1632
aa96c426
GB
16332014-08-28 Gary Benson <gbenson@redhat.com>
1634
1635 * linux-low.c (linux_async): Replace fatal with warning.
1636 Tidy up and return.
1637 (linux_start_non_stop): Return -1 if linux_async failed.
1638
f7160e97
GB
16392014-08-28 Gary Benson <gbenson@redhat.com>
1640
1641 * linux-x86-low.c (i386_dr_low_set_addr): Replace check with
1642 gdb_assert.
1643 (i386_dr_low_get_addr): Remove vague comment.
1644 * win32-i386-low.c (i386_dr_low_set_addr): Replace check with
1645 gdb_assert.
1646
38e08fca
GB
16472014-08-28 Gary Benson <gbenson@redhat.com>
1648
1649 * inferiors.c (get_thread_process): Replace check with gdb_assert.
1650 * linux-low.c (linux_wait_for_event_filtered): Replace fatal with
1651 internal_error.
1652 (linux_resume_one_lwp): Likewise.
1653 * linux-x86-low.c (x86_siginfo_fixup): Replace checks with
1654 gdb_assert.
1655 * mem-break.c (raw_bkpt_type_to_target_hw_bp_type): Replace fatal
1656 with internal_error.
1657 * regcache.c (get_thread_regcache): Replace check with gdb_assert.
1658 (init_register_cache): Replace fatal with gdb_assert_not_reached.
1659 (find_register_by_name): Replace fatal with internal_error.
1660 (find_regno): Likewise.
1661 * tdesc.c (init_target_desc): Replace check with gdb_assert.
1662 * thread-db.c (thread_db_create_event): Likewise.
1663 (thread_db_load_search): Likewise.
1664 (try_thread_db_load_1): Likewise.
1665 * tracepoint.c (get_jump_space_head): Replace fatal with
1666 internal_error.
1667 (claim_trampoline_space): Likewise.
1668 (have_fast_tracepoint_trampoline_buffer): Likewise.
1669 (cmd_qtstart): Likewise.
1670 (stop_tracing): Likewise.
1671 (fast_tracepoint_collecting): Likewise.
1672 (target_malloc): Likewise.
1673 (download_tracepoint): Likewise.
1674 (download_trace_state_variables): Replace check with gdb_assert.
1675 (upload_fast_traceframes): Replace fatal with internal_error.
1676
34abf635
GB
16772014-08-19 Tom Tromey <tromey@redhat.com>
1678 Gary Benson <gbenson@redhat.com>
1679
1680 * Makefile.in (SFILES): Add common/common-debug.c.
1681 (OBS): Add common-debug.o.
1682 (common-debug.o): New rule.
1683 * debug.h (debug_printf): Don't declare.
1684 * debug.c (debug_printf): Renamed and rewritten as...
1685 (debug_vprintf): New function.
1686
f6e94d78
GB
16872014-08-19 Gary Benson <gbenson@redhat.com>
1688
1689 * utils.h: Do not include print-utils.h.
1690
9239eeab
GB
16912014-08-19 Tom Tromey <tromey@redhat.com>
1692 Gary Benson <gbenson@redhat.com>
1693
1694 * server.h: Add static assertion.
1695 (gdb_byte, CORE_ADDR, LONGEST, ULONGEST): Remove.
1696
ef87c8bb
GB
16972014-08-19 Tom Tromey <tromey@redhat.com>
1698 Gary Benson <gbenson@redhat.com>
1699
1700 * Makefile.in (SFILES): Add common/errors.c.
1701 (OBS): Add errors.o.
1702 (IPA_OBS): Add errors-ipa.o.
1703 (errors.o): New rule.
1704 (errors-ipa.o): Likewise.
1705 * utils.h (perror_with_name, error, warning): Don't declare.
1706 * utils.c (warning): Renamed and rewritten as...
1707 (vwarning): New function.
1708 (error): Renamed and rewritten as...
1709 (verror): New function.
1710 (internal_error): Renamed and rewritten as...
1711 (internal_verror): New function.
1712
bb974a24
GB
17132014-08-07 Gary Benson <gbenson@redhat.com>
1714
1715 * configure.ac (AC_CHECK_HEADERS): Remove errno.h.
1716 * configure: Regenerate.
1717 * config.in: Likewise.
1718 * server.h: Do not include errno.h.
1719 * event-loop.c: Likewise.
1720 * hostio-errno.c: Likewise.
1721 * linux-low.c: Likewise.
1722 * remote-utils.c: Likewise.
1723 * spu-low.c: Likewise.
1724 * utils.c: Likewise.
1725 * gdbreplay.c: Unconditionally include errno.h.
1726
6d3d12eb
GB
17272014-08-07 Gary Benson <gbenson@redhat.com>
1728
1729 * server.h: Do not include string.h.
1730 * event-loop.c: Likewise.
1731 * linux-low.c: Likewise.
1732 * regcache.c: Likewise.
1733 * remote-utils.c: Likewise.
1734 * spu-low.c: Likewise.
1735 * utils.c: Likewise.
1736
dccbb609
GB
17372014-08-07 Gary Benson <gbenson@redhat.com>
1738
1739 * server.h: Do not include gdb_assert.h.
1740
e76df0d0
GB
17412014-08-07 Gary Benson <gbenson@redhat.com>
1742
1743 * server.h: Do not include common-utils.h.
1744
4cb9c816
GB
17452014-08-07 Gary Benson <gbenson@redhat.com>
1746
1747 * server.h: Do not include ptid.h.
1748 * notif.h: Likewise.
1749
3995eeee
GB
17502014-08-07 Gary Benson <gbenson@redhat.com>
1751
1752 * server.h: Do not include gdb_locale.h.
1753
cb9f1a9b
GB
17542014-08-07 Gary Benson <gbenson@redhat.com>
1755
1756 * server.h: Do not include gdb/signals.h.
1757 * win32-low.c: Likewise.
1758
a5fceff8
GB
17592014-08-07 Gary Benson <gbenson@redhat.com>
1760
1761 * server.h: Do not include pathmax.h.
1762
b9391142
GB
17632014-08-07 Gary Benson <gbenson@redhat.com>
1764
1765 * server.h: Do not include libiberty.h.
1766 * linux-bfin-low.c: Likewise.
1767
0e443c87
GB
17682014-08-07 Gary Benson <gbenson@redhat.com>
1769
1770 * server.h: Do not include ansidecl.h.
1771
8ebb3f56
GB
17722014-08-07 Gary Benson <gbenson@redhat.com>
1773
1774 * linux-x86-low.c: Do not include stddef.h.
1775 * lynx-ppc-low.c: Likewise.
1776 * tracepoint.c: Likewise.
1777
8980bdf6
GB
17782014-08-07 Gary Benson <gbenson@redhat.com>
1779
1780 * server.h: Do not include stdarg.h.
1781 * nto-low.c: Likewise.
1782
d7096f71
GB
17832014-08-07 Gary Benson <gbenson@redhat.com>
1784
1785 * server.h: Do not include stdlib.h.
1786 * inferiors.c: Likewise.
1787 * linux-low.c: Likewise.
1788 * regcache.c: Likewise.
1789 * spu-low.c: Likewise.
1790 * tracepoint.c: Likewise.
1791 * utils.c: Likewise.
1792
d02f550d
GB
17932014-08-07 Gary Benson <gbenson@redhat.com>
1794
1795 * server.h: Do not include stdio.h.
1796 * linux-low.c: Likewise.
1797 * remote-utils.c: Likewise.
1798 * spu-low.c: Likewise.
1799 * utils.c: Likewise.
1800 * wincecompat.c: Likewise.
1801
87f6c4e3
GB
18022014-08-06 Gary Benson <gbenson@redhat.com>
1803
1804 * regcache.c (init_register_cache): Move conditionals inside if.
1805
7089dca4
GB
18062014-08-06 Gary Benson <gbenson@redhat.com>
1807
1808 * linux-low.c (linux_supports_non_stop): Use target_is_async_p.
1809
462f517e
GB
18102014-07-31 Gary Benson <gbenson@redhat.com>
1811
1812 * ax.h: Do not include server.h.
1813 * gdbthread.h: Likewise.
1814 * lynx-low.h: Likewise.
1815 * notif.h: Likewise.
1816
976411d6
GB
18172014-07-30 Gary Benson <gbenson@redhat.com>
1818
1819 * server.h: Include common-defs.h.
1820 Do not include config.h or build-gnulib-gdbserver/config.h.
1821
d41f6d8e
GB
18222014-07-30 Gary Benson <gbenson@redhat.com>
1823
1824 * hostio-errno.c: Move server.h to top of includes list.
1825 * inferiors.c: Likewise.
1826 * linux-x86-low.c: Likewise.
1827 * notif.c: Include server.h.
1828
314c6a35
TT
18292014-07-24 Tom Tromey <tromey@redhat.com>
1830 Gary Benson <gbenson@redhat.com>
1831
1832 * server.h (CORE_ADDR): Now unsigned.
1833
69ff6be5
PA
18342014-07-16 Pedro Alves <palves@redhat.com>
1835
1836 * linux-low.c (linux_kill_one_lwp): Use kill_lwp, not kill.
1837
ce9e3fe7
PA
18382014-07-15 Pedro Alves <palves@redhat.com>
1839
1840 * linux-low.c (linux_kill_one_lwp): Save errno and work with saved
1841 copy.
1842
e76126e8
PA
18432014-07-11 Pedro Alves <palves@redhat.com>
1844
1845 * linux-low.c (kill_wait_lwp): New function, based on
1846 kill_one_lwp_callback, but use my_waitpid directly.
1847 (kill_one_lwp_callback, linux_kill): Use it.
1848
8e9db26e
PA
18492014-06-23 Pedro Alves <palves@redhat.com>
1850
1851 * linux-x86-low.c (x86_linux_prepare_to_resume): Clear DR_CONTROL
1852 before setting DR0..DR3.
1853
698b3e08
GB
18542014-06-20 Gary Benson <gbenson@redhat.com>
1855
1856 * configure.ac (AC_REPLACE_FUNCS) <vasprintf, vsnprintf>: Removed.
1857 * configure: Regenerated.
1858 * config.in: Likewise.
1859
125f8a3d
GB
18602014-06-20 Gary Benson <gbenson@redhat.com>
1861
1862 * Makefile.in (SFILES): Update locations for files moved
1863 from common to nat.
1864 (object file files): Reordered.
1865
42995dbd
GB
18662014-06-20 Gary Benson <gbenson@redhat.com>
1867
1868 * i386-low.h (i386_dr_low_can_set_addr): Removed.
1869 (i386_dr_low_set_addr): Likewise.
1870 (i386_dr_low_get_addr): Likewise.
1871 (i386_dr_low_can_set_control): Likewise.
1872 (i386_dr_low_set_control): Likewise.
1873 (i386_dr_low_get_control): Likewise.
1874 (i386_dr_low_get_status): Likewise.
1875 (i386_get_debug_register_length): Likewise.
1876 * linux-x86-low.c (i386_dr_low_set_addr):
1877 Changed signature. Made static.
1878 (i386_dr_low_get_addr): Likewise.
1879 (i386_dr_low_set_control): Likewise.
1880 (i386_dr_low_get_control): Likewise.
1881 (i386_dr_low_get_status): Likewise.
1882 (i386_dr_low): New global variable.
1883 * win32-i386-low.c (i386_dr_low_set_addr):
1884 Changed signature. Made static.
1885 (i386_dr_low_get_addr): Likewise.
1886 (i386_dr_low_set_control): Likewise.
1887 (i386_dr_low_get_control): Likewise.
1888 (i386_dr_low_get_status): Likewise.
1889 (i386_dr_low): New global variable.
1890
e1d2394b
MS
18912014-06-20 Marcus Shawcroft <marcus.shawcroft@arm.com>
1892
1893 * configure.ac: Invoke. AC_CHECK_TOOL(AR, ar).
1894 * Makefile.in (AR, AR_FLAGS): Define.
1895 * configure: Regenerate.
1896
3a8ee006
GB
18972014-06-19 Gary Benson <gbenson@redhat.com>
1898
1899 * Makefile.in (i386-dregs.o): New rule.
1900 * configure.srv: Add i386-dregs.o to all targets using i386-low.o.
1901 * i386-low.c (target.h): Remove include.
1902 (TARGET_HAS_DR_LEN_8): Now in i386-dregs.c.
1903 (DR_CONTROL_SHIFT): Likewise.
1904 (DR_CONTROL_SIZE): Likewise.
1905 (DR_RW_EXECUTE): Likewise.
1906 (DR_RW_WRITE): Likewise.
1907 (DR_RW_READ): Likewise.
1908 (DR_RW_IORW): Likewise.
1909 (DR_LEN_1): Likewise.
1910 (DR_LEN_2): Likewise.
1911 (DR_LEN_4): Likewise.
1912 (DR_LEN_8): Likewise.
1913 (DR_LOCAL_ENABLE_SHIFT): Likewise.
1914 (DR_GLOBAL_ENABLE_SHIFT): Likewise.
1915 (DR_ENABLE_SIZE): Likewise.
1916 (DR_LOCAL_SLOWDOWN): Likewise.
1917 (DR_GLOBAL_SLOWDOWN): Likewise.
1918 (DR_CONTROL_RESERVED): Likewise.
1919 (I386_DR_CONTROL_MASK): Likewise.
1920 (I386_DR_VACANT): Likewise.
1921 (I386_DR_LOCAL_ENABLE): Likewise.
1922 (I386_DR_GLOBAL_ENABLE): Likewise.
1923 (I386_DR_DISABLE): Likewise.
1924 (I386_DR_SET_RW_LEN): Likewise.
1925 (I386_DR_GET_RW_LEN): Likewise.
1926 (I386_DR_WATCH_HIT): Likewise.
1927 (i386_wp_op_t): Likewise.
1928 (i386_show_dr): Likewise.
1929 (i386_length_and_rw_bits): Likewise.
1930 (i386_insert_aligned_watchpoint): Likewise.
1931 (i386_remove_aligned_watchpoint): Likewise.
1932 (i386_handle_nonaligned_watchpoint): Likewise.
1933 i386_update_inferior_debug_regs(): Likewise.
1934 (i386_dr_insert_watchpoint): Likewise.
1935 (i386_dr_remove_watchpoint): Likewise.
1936 (i386_dr_region_ok_for_watchpoint): Likewise.
1937 (i386_dr_stopped_data_address): Likewise.
1938 (i386_dr_stopped_by_watchpoint): Likewise.
1939
8f26655c
GB
19402014-06-19 Gary Benson <gbenson@redhat.com>
1941
1942 * i386-low.c (i386_dr_show): Renamed to
1943 i386_show_dr and made static. All uses updated.
1944 (i386_dr_length_and_rw_bits): Renamed to
1945 i386_length_and_rw_bits and made static.
1946 All uses updated.
1947 (i386_dr_insert_aligned_watchpoint): Renamed to
1948 i386_insert_aligned_watchpoint and made static.
1949 All uses updated.
1950 (i386_dr_remove_aligned_watchpoint): Renamed to
1951 i386_remove_aligned_watchpoint and made static.
1952 All uses updated.
1953 (i386_dr_update_inferior_debug_regs): Renamed to
1954 i386_update_inferior_debug_regs and made static.
1955 All uses updated.
1956
b9228891
GB
19572014-06-18 Gary Benson <gbenson@redhat.com>
1958
5171def3
GB
1959 * i386-low.h (i386_dr_low_can_set_addr): New macro.
1960 (i386_dr_low_can_set_control): Likewise.
1961 (i386_get_debug_register_length): Likewise.
1962 * i386-low.c (i386_dr_low_can_set_addr): Now in i386-low.h.
1963 (i386_dr_low_can_set_control): Likewise.
1964 (i386_get_debug_register_length): Likewise.
1965
19662014-06-17 Gary Benson <gbenson@redhat.com>
1967
b9228891
GB
1968 * i386-low.h (i386-dregs.h): New include.
1969 (DR_FIRSTADDR): Now in i386-dregs.h.
1970 (DR_LASTADDR): Likewise.
1971 (DR_NADDR): Likewise.
1972 (DR_STATUS): Likewise.
1973 (DR_CONTROL): Likewise.
1974 (i386_debug_reg_state): Likewise.
1975 (i386_dr_insert_watchpoint): Likewise.
1976 (i386_dr_remove_watchpoint): Likewise.
1977 (i386_dr_region_ok_for_watchpoint): Likewise.
1978 (i386_dr_stopped_data_address): Likewise.
1979 (i386_dr_stopped_by_watchpoint): Likewise.
1980 * i386-low.c (ALL_DEBUG_REGISTERS): Likewise.
1981
4be83cc2
GB
19822014-06-18 Gary Benson <gbenson@redhat.com>
1983
1984 * i386-low.h (i386_low_insert_watchpoint): Renamed to
1985 i386_dr_insert_watchpoint.
1986 (i386_low_remove_watchpoint): Renamed to
1987 i386_dr_remove_watchpoint.
1988 (i386_low_region_ok_for_watchpoint): Renamed to
1989 i386_dr_region_ok_for_watchpoint.
1990 (i386_low_stopped_data_address): Renamed to
1991 i386_dr_stopped_data_address.
1992 (i386_low_stopped_by_watchpoint): Renamed to
1993 i386_dr_stopped_by_watchpoint.
1994 * i386-low.c (i386_show_dr): Renamed to
1995 i386_dr_show and made nonstatic. All uses updated.
1996 (i386_length_and_rw_bits): Renamed to
1997 i386_dr_length_and_rw_bits and made nonstatic.
1998 All uses updated.
1999 (i386_insert_aligned_watchpoint): Renamed to
2000 i386_dr_insert_aligned_watchpoint and made nonstatic.
2001 All uses updated.
2002 (i386_remove_aligned_watchpoint): Renamed to
2003 i386_dr_remove_aligned_watchpoint and made nonstatic.
2004 All uses updated.
2005 (i386_update_inferior_debug_regs): Renamed to
2006 i386_dr_update_inferior_debug_regs and made nonstatic.
2007 All uses updated.
2008 (i386_low_insert_watchpoint): Renamed to
2009 i386_dr_insert_watchpoint. All uses updated.
2010 (i386_low_remove_watchpoint): Renamed to
2011 i386_dr_remove_watchpoint. All uses updated.
2012 (i386_low_region_ok_for_watchpoint): Renamed to
2013 i386_dr_region_ok_for_watchpoint. All uses updated.
2014 (i386_low_stopped_data_address): Renamed to
2015 i386_dr_stopped_data_address. All uses updated.
2016 (i386_low_stopped_by_watchpoint): Renamed to
2017 i386_dr_stopped_by_watchpoint. All uses updated.
2018
131aa0d4
GB
20192014-06-18 Gary Benson <gbenson@redhat.com>
2020
2021 * i386-low.c (i386_dr_low_can_set_addr): New macro.
2022 (i386_dr_low_can_set_control): Likewise.
2023 (i386_insert_aligned_watchpoint): New check.
2024
d9305f7f
GB
20252014-06-18 Gary Benson <gbenson@redhat.com>
2026
2027 * i386-low.c (i386_update_inferior_debug_regs) <inf_state>:
2028 Renamed to state.
2029
e927c9fc
GB
20302014-06-18 Gary Benson <gbenson@redhat.com>
2031
2032 * i386-low.c (i386_length_and_rw_bits): Use internal_error
2033 instead of fatal and error.
2034 (i386_handle_nonaligned_watchpoint): Likewise.
2035
1b6d4134
GB
20362014-06-18 Gary Benson <gbenson@redhat.com>
2037
2038 * i386-low.c (i386_get_debug_register_length): New macro.
2039 (TARGET_HAS_DR_LEN_8): Remove conditional. Use above macro.
2040 (i386_show_dr): Use debug_printf instead of fprintf. Use
2041 phex to format values.
2042
6e62758f
GB
20432014-06-18 Gary Benson <gbenson@redhat.com>
2044
2045 * i386-low.h: Comment changes.
2046 * i386-low.c: Likewise.
2047
fc6e2f03
GB
20482014-06-18 Gary Benson <gbenson@redhat.com>
2049
2050 * i386-low.c: Whitespace changes.
2051
f9d1eeed
TT
20522014-06-12 Tom Tromey <tromey@redhat.com>
2053
2054 * utils.c (freeargv): Remove.
2055
0b04e523
TT
20562014-06-12 Tom Tromey <tromey@redhat.com>
2057
2058 * debug.c (debug_printf): Remove HAVE_GETTIMEOFDAY checks.
2059 * server.c (monitor_show_help): Remove HAVE_GETTIMEOFDAY check.
2060 (parse_debug_format_options): Likewise.
2061 (gdbserver_usage): Likewise.
2062 * Makefile.in (LIBIBERTY_BUILDDIR, LIBIBERTY): New variables.
2063 (SUBDIRS, REQUIRED_SUBDIRS): Add libiberty.
2064 (gdbserver$(EXEEXT), gdbreplay$(EXEEXT)): Depend on and link
2065 against libiberty.
2066 ($(LIBGNU)): Depend on libiberty.
2067 (all-lib): Recurse into all subdirs.
2068 (install-only): Invoke "install" target in subdirs.
2069 (vasprintf.o, vsnprintf.o, safe-ctype.o, lbasename.o): Remove
2070 targets.
2071 * configure: Rebuild.
2072 * configure.ac: Add ACX_CONFIGURE_DIR for libiberty. Don't check
2073 for vasprintf, vsnprintf, or gettimeofday.
2074 * configure.srv: Don't add safe-ctype.o or lbasename.o to
2075 srv_tgtobj.
2076
270c9937
JB
20772014-06-05 Joel Brobecker <brobecker@adacore.com>
2078
2079 * development.sh: Delete.
2080 * Makefile.in (config.status): Adjust dependency on development.sh.
2081 * configure.ac: Adjust development.sh source call.
2082 * configure: Regenerate.
2083
0a261ed8
PA
20842014-06-02 Pedro Alves <palves@redhat.com>
2085
2086 * ax.c (gdb_free_agent_expr): New function.
2087 * ax.h (gdb_free_agent_expr): New declaration.
2088 * mem-break.c (delete_gdb_breakpoint_1): Also clear the commands
2089 list.
2090 (clear_breakpoint_conditions, clear_breakpoint_commands): Make
2091 static.
2092 (clear_breakpoint_conditions_and_commands): New function.
2093 * mem-break.h (clear_breakpoint_conditions): Delete declaration.
2094 (clear_breakpoint_conditions_and_commands): New declaration.
2095
e9dae05e
RR
20962014-05-23 Ramana Radhakrishnan <ramana.radhakrishnan@arm.com>
2097
2098 * linux-aarch64-low.c (asm/ptrace.h): Include.
2099
5876f503
JK
21002014-05-21 Jan Kratochvil <jan.kratochvil@redhat.com>
2101
2102 Fix TLS access for -static -pthread.
2103 * gdbserver/thread-db.c (struct thread_db): Add td_thr_tlsbase_p.
2104 (thread_db_get_tls_address): Call it if LOAD_MODULE is zero.
2105 (thread_db_load_search, try_thread_db_load_1): Initialize it.
2106
802e8e6d
PA
21072014-05-20 Pedro Alves <palves@redhat.com>
2108
2109 * linux-aarch64-low.c (aarch64_insert_point)
2110 (aarch64_remove_point): No longer check whether the type is
2111 supported here. Adjust to new interface.
2112 (the_low_target): Install aarch64_supports_z_point_type as
2113 supports_z_point_type method.
2114 * linux-arm-low.c (raw_bkpt_type_to_arm_hwbp_type): New function.
2115 (arm_linux_hw_point_initialize): Take an enum raw_bkpt_type
2116 instead of a Z packet char. Adjust.
2117 (arm_supports_z_point_type): New function.
2118 (arm_insert_point, arm_remove_point): Adjust to new interface.
2119 (the_low_target): Install arm_supports_z_point_type.
2120 * linux-crisv32-low.c (cris_supports_z_point_type): New function.
2121 (cris_insert_point, cris_remove_point): Adjust to new interface.
2122 Don't check whether the type is supported here.
2123 (the_low_target): Install cris_supports_z_point_type.
2124 * linux-low.c (linux_supports_z_point_type): New function.
2125 (linux_insert_point, linux_remove_point): Adjust to new interface.
2126 * linux-low.h (struct linux_target_ops) <insert_point,
2127 remove_point>: Take an enum raw_bkpt_type instead of a char. Add
2128 raw_breakpoint pointer parameter.
2129 <supports_z_point_type>: New method.
2130 * linux-mips-low.c (mips_supports_z_point_type): New function.
2131 (mips_insert_point, mips_remove_point): Adjust to new interface.
2132 Use mips_supports_z_point_type.
2133 (the_low_target): Install mips_supports_z_point_type.
2134 * linux-ppc-low.c (the_low_target): Install NULL as
2135 supports_z_point_type method.
2136 * linux-s390-low.c (the_low_target): Install NULL as
2137 supports_z_point_type method.
2138 * linux-sparc-low.c (the_low_target): Install NULL as
2139 supports_z_point_type method.
2140 * linux-x86-low.c (x86_supports_z_point_type): New function.
2141 (x86_insert_point): Adjust to new insert_point interface. Use
2142 insert_memory_breakpoint. Adjust to new
2143 i386_low_insert_watchpoint interface.
2144 (x86_remove_point): Adjust to remove_point interface. Use
2145 remove_memory_breakpoint. Adjust to new
2146 i386_low_remove_watchpoint interface.
2147 (the_low_target): Install x86_supports_z_point_type.
2148 * lynx-low.c (lynx_target_ops): Install NULL as
2149 supports_z_point_type callback.
2150 * nto-low.c (nto_supports_z_point_type): New.
2151 (nto_insert_point, nto_remove_point): Adjust to new interface.
2152 (nto_target_ops): Install nto_supports_z_point_type.
2153 * mem-break.c: Adjust intro comment.
2154 (struct raw_breakpoint) <raw_type, size>: New fields.
2155 <inserted>: Update comment.
2156 <shlib_disabled>: Delete field.
2157 (enum bkpt_type) <gdb_breakpoint>: Delete value.
2158 <gdb_breakpoint_Z0, gdb_breakpoint_Z1, gdb_breakpoint_Z2,
2159 gdb_breakpoint_Z3, gdb_breakpoint_Z4>: New values.
2160 (raw_bkpt_type_to_target_hw_bp_type): New function.
2161 (find_enabled_raw_code_breakpoint_at): New function.
2162 (find_raw_breakpoint_at): New type and size parameters. Use them.
2163 (insert_memory_breakpoint): New function, based off
2164 set_raw_breakpoint_at.
2165 (remove_memory_breakpoint): New function.
2166 (set_raw_breakpoint_at): Reimplement.
2167 (set_breakpoint): New, based on set_breakpoint_at.
2168 (set_breakpoint_at): Reimplement.
2169 (delete_raw_breakpoint): Go through the_target->remove_point
2170 instead of assuming memory breakpoints.
2171 (find_gdb_breakpoint_at): Delete.
2172 (Z_packet_to_bkpt_type, Z_packet_to_raw_bkpt_type): New functions.
2173 (find_gdb_breakpoint): New function.
2174 (set_gdb_breakpoint_at): Delete.
2175 (z_type_supported): New function.
2176 (set_gdb_breakpoint_1): New function, loosely based off
2177 set_gdb_breakpoint_at.
2178 (check_gdb_bp_preconditions, set_gdb_breakpoint): New functions.
2179 (delete_gdb_breakpoint_at): Delete.
2180 (delete_gdb_breakpoint_1): New function, loosely based off
2181 delete_gdb_breakpoint_at.
2182 (delete_gdb_breakpoint): New function.
2183 (clear_gdb_breakpoint_conditions): Rename to ...
2184 (clear_breakpoint_conditions): ... this. Don't handle a NULL
2185 breakpoint.
2186 (add_condition_to_breakpoint): Make static.
2187 (add_breakpoint_condition): Take a struct breakpoint pointer
2188 instead of an address. Adjust.
2189 (gdb_condition_true_at_breakpoint): Rename to ...
2190 (gdb_condition_true_at_breakpoint_z_type): ... this, and add
2191 z_type parameter.
2192 (gdb_condition_true_at_breakpoint): Reimplement.
2193 (add_breakpoint_commands): Take a struct breakpoint pointer
2194 instead of an address. Adjust.
2195 (gdb_no_commands_at_breakpoint): Rename to ...
2196 (gdb_no_commands_at_breakpoint_z_type): ... this. Add z_type
2197 parameter. Return true if no breakpoint was found. Change debug
2198 output.
2199 (gdb_no_commands_at_breakpoint): Reimplement.
2200 (run_breakpoint_commands): Rename to ...
2201 (run_breakpoint_commands_z_type): ... this. Add z_type parameter,
2202 and change return type to boolean.
2203 (run_breakpoint_commands): New function.
2204 (gdb_breakpoint_here): Also check for Z1 breakpoints.
2205 (uninsert_raw_breakpoint): Don't try to reinsert a disabled
2206 breakpoint. Go through the_target->remove_point instead of
2207 assuming memory breakpoint.
2208 (uninsert_breakpoints_at, uninsert_all_breakpoints): Uninsert
2209 software and hardware breakpoints.
2210 (reinsert_raw_breakpoint): Go through the_target->insert_point
2211 instead of assuming memory breakpoint.
2212 (reinsert_breakpoints_at, reinsert_all_breakpoints): Reinsert
2213 software and hardware breakpoints.
2214 (check_breakpoints, breakpoint_here, breakpoint_inserted_here):
2215 Check both software and hardware breakpoints.
2216 (validate_inserted_breakpoint): Assert the breakpoint is a
2217 software breakpoint. Set the inserted flag to -1 instead of
2218 setting shlib_disabled.
2219 (delete_disabled_breakpoints): Adjust.
2220 (validate_breakpoints): Only validate software breakpoints.
2221 Adjust to inserted flag change.
2222 (check_mem_read, check_mem_write): Skip breakpoint types other
2223 than software breakpoints. Adjust to inserted flag change.
2224 * mem-break.h (enum raw_bkpt_type): New enum.
2225 (raw_breakpoint, struct process_info): Forward declare.
2226 (Z_packet_to_target_hw_bp_type): Delete declaration.
2227 (raw_bkpt_type_to_target_hw_bp_type, Z_packet_to_raw_bkpt_type)
2228 (set_gdb_breakpoint, delete_gdb_breakpoint)
2229 (clear_breakpoint_conditions): New declarations.
2230 (set_gdb_breakpoint_at, clear_gdb_breakpoint_conditions): Delete.
2231 (breakpoint_inserted_here): Update comment.
2232 (add_breakpoint_condition, add_breakpoint_commands): Replace
2233 address parameter with a breakpoint pointer parameter.
2234 (gdb_breakpoint_here): Update comment.
2235 (delete_gdb_breakpoint_at): Delete.
2236 (insert_memory_breakpoint, remove_memory_breakpoint): Declare.
2237 * server.c (process_point_options): Take a struct breakpoint
2238 pointer instead of an address. Adjust.
2239 (process_serial_event) <Z/z packets>: Use set_gdb_breakpoint and
2240 delete_gdb_breakpoint.
2241 * spu-low.c (spu_target_ops): Install NULL as
2242 supports_z_point_type method.
2243 * target.h: Include mem-break.h.
2244 (struct target_ops) <prepare_to_access_memory>: Update comment.
2245 <supports_z_point_type>: New field.
2246 <insert_point, remove_point>: Take an enum raw_bkpt_type argument
2247 instead of a char. Also take a raw breakpoint pointer.
2248 * win32-arm-low.c (the_low_target): Install NULL as
2249 supports_z_point_type.
2250 * win32-i386-low.c (i386_supports_z_point_type): New function.
2251 (i386_insert_point, i386_remove_point): Adjust to new interface.
2252 (the_low_target): Install i386_supports_z_point_type.
2253 * win32-low.c (win32_supports_z_point_type): New function.
2254 (win32_insert_point, win32_remove_point): Adjust to new interface.
2255 (win32_target_ops): Install win32_supports_z_point_type.
2256 * win32-low.h (struct win32_target_ops):
2257 <supports_z_point_type>: New method.
2258 <insert_point, remove_point>: Take an enum raw_bkpt_type argument
2259 instead of a char. Also take a raw breakpoint pointer.
2260
932539e3
PA
22612014-05-20 Pedro Alves <palves@redhat.com>
2262
2263 * mem-break.h: Include break-common.h.
2264 (Z_PACKET_SW_BP, Z_PACKET_HW_BP, Z_PACKET_WRITE_WP)
2265 (Z_PACKET_READ_WP, Z_PACKET_ACCESS_WP): New defines.
2266 (Z_packet_to_target_hw_bp_type): New declaration.
2267 * mem-break.c (Z_packet_to_target_hw_bp_type): New function.
2268 * i386-low.c (Z_PACKET_HW_BP, Z_PACKET_WRITE_WP, Z_PACKET_READ_WP)
2269 (Z_PACKET_ACCESS_WP): Delete macros.
2270 (Z_packet_to_hw_type): Delete function.
2271 * i386-low.h: Don't include break-common.h here.
2272 (Z_packet_to_hw_type): Delete declaration.
2273 * linux-x86-low.c (x86_insert_point, x86_insert_point): Call
2274 Z_packet_to_target_hw_bp_type instead of Z_packet_to_hw_type.
2275 * win32-i386-low.c (i386_insert_point, i386_remove_point): Call
2276 Z_packet_to_target_hw_bp_type instead of Z_packet_to_hw_type.
2277 * linux-aarch64-low.c: Don't include break-common.h here.
2278 (Z_PACKET_SW_BP, Z_PACKET_HW_BP, Z_PACKET_WRITE_WP)
2279 (Z_PACKET_READ_WP, Z_PACKET_ACCESS_WP): Delete macros.
2280 (Z_packet_to_target_hw_bp_type): Delete function.
2281 * linux-mips-low.c (rsp_bp_type_to_target_hw_bp_type): Delete
2282 function.
2283 (mips_insert_point, mips_remove_point): Use
2284 Z_packet_to_target_hw_bp_type.
2285
4ff0d3d8
PA
22862014-05-20 Pedro Alves <palves@redhat.com>
2287
2288 * linux-aarch64-low.c: Include break-common.h.
2289 (enum target_point_type): Delete.
2290 (Z_packet_to_point_type): Rename to ...
2291 (Z_packet_to_target_hw_bp_type): ... this, and return a
2292 target_hw_bp_type instead.
2293 (aarch64_show_debug_reg_state): Take an enum target_hw_bp_type
2294 instead of an enum target_point_type.
2295 (aarch64_point_encode_ctrl_reg): Likewise. Compute type mask from
2296 breakpoint type.
2297 (aarch64_dr_state_insert_one_point)
2298 (aarch64_dr_state_remove_one_point, aarch64_handle_breakpoint)
2299 (aarch64_handle_aligned_watchpoint)
2300 (aarch64_handle_unaligned_watchpoint, aarch64_handle_watchpoint):
2301 Take an enum target_hw_bp_type instead of an enum
2302 target_point_type.
2303 (aarch64_supports_z_point_type): New function.
2304 (aarch64_insert_point, aarch64_remove_point): Use it. Adjust to
2305 use Z_packet_to_target_hw_bp_type.
2306
786dc519
JB
23072014-05-20 Joel Brobecker <brobecker@adacore.com>
2308
2309 * configure.ac: Only use -Werror by default when DEVELOPMENT
2310 is true.
2311 * configure: Regenerate.
2312
9e0aa64f
JK
23132014-05-19 Jan Kratochvil <jan.kratochvil@redhat.com>
2314
2315 Fix gdbserver qGetTLSAddr for x86_64 -m32.
2316 * linux-x86-low.c (X86_64_USER_REGS): New.
2317 (x86_fill_gregset): Call memset for BUF first in x86_64 -m32 case.
2318
2b577b92
YQ
23192014-04-28 Yao Qi <yao@codesourcery.com>
2320
2321 * Makefile.in (i386-avx512.c): Fix the typo of generated file
2322 name.
2323
94611da2
PA
23242014-04-25 Pedro Alves <palves@redhat.com>
2325
2326 PR server/16255
2327 * linux-low.c (linux_attach_fail_reason_string): New function.
2328 (linux_attach_lwp): Delete.
2329 (linux_attach_lwp_1): Rename to ...
2330 (linux_attach_lwp): ... this. Take a ptid instead of a pid as
2331 argument. Remove "initial" parameter. Return int instead of
2332 void. Don't error or warn here.
2333 (linux_attach): Adjust to call linux_attach_lwp. Call error on
2334 failure to attach to the tgid. Call warning when failing to
2335 attach to an lwp.
2336 * linux-low.h (linux_attach_lwp): Take a ptid instead of a pid as
2337 argument. Remove "initial" parameter. Return int instead of
2338 void. Don't error or warn here.
2339 (linux_attach_fail_reason_string): New declaration.
2340 * thread-db.c (attach_thread): Adjust to linux_attach_lwp's
2341 interface change. Use linux_attach_fail_reason_string.
2342
01f9f808
MS
23432014-04-24 Michael Sturm <michael.sturm@mintel.com>
2344 Walfred Tedeschi <walfred.tedeschi@intel.com>
2345
2346 * Makefile.in: Added rules to handle new files
2347 i386-avx512.c i386-avx512-linux.c amd64-avx512.c
2348 amd64-avx512-linux.c x32-avx512.c x32-avx512-linux.c.
2349 * configure.srv (srv_i386_regobj): Add i386-avx512.o.
2350 (srv_i386_linux_regobj): Add i386-avx512-linux.o.
2351 (srv_amd64_regobj): Add amd64-avx512.o and x32-avx512.o.
2352 (srv_amd64_linux_regobj): Add amd64-avx512-linux.o and
2353 x32-avx512-linux.o.
2354 (srv_i386_32bit_xmlfiles): Add i386/32bit-avx512.xml.
2355 (srv_i386_64bit_xmlfiles): Add i386/64bit-avx512.xml.
2356 (srv_amd64_xmlfiles): Add i386/amd64-avx512.xml and
2357 i386/x32-avx512.xml.
2358 (srv_i386_linux_xmlfiles): Add i386/i386-avx512-linux.xml.
2359 (srv_amd64_linux_xmlfiles): Add i386/amd64-avx512-linux.xml and
2360 i386/x32-avx512-linux.xml.
2361 * i387-fp.c (num_avx512_k_registers): New constant for number
2362 of K registers.
2363 (num_avx512_zmmh_low_registers): New constant for number of
2364 lower ZMM registers (0-15).
2365 (num_avx512_zmmh_high_registers): New constant for number of
2366 higher ZMM registers (16-31).
2367 (num_avx512_ymmh_registers): New contant for number of higher
2368 YMM registers (ymm16-31 added by avx521 on x86_64).
2369 (num_avx512_xmm_registers): New constant for number of higher
2370 XMM registers (xmm16-31 added by AVX512 on x86_64).
2371 (struct i387_xsave): Add space for AVX512 registers.
2372 (i387_cache_to_xsave): Change raw buffer size to 64 characters.
2373 Add code to handle AVX512 registers.
2374 (i387_xsave_to_cache): Add code to handle AVX512 registers.
2375 * linux-x86-low.c (init_registers_amd64_avx512_linux): New
2376 prototypei from generated file.
2377 (tdesc_amd64_avx512_linux): Likewise.
2378 (init_registers_x32_avx512_linux): Likewise.
2379 (tdesc_x32_avx512_linux): Likewise.
2380 (init_registers_i386_avx512_linux): Likewise.
2381 (tdesc_i386_avx512_linux): Likewise.
2382 (x86_64_regmap): Add AVX512 registers.
2383 (x86_linux_read_description): Add code to handle AVX512 XSTATE
2384 mask.
2385 (initialize_low_arch): Add code to initialize AVX512 registers.
2386
51aa91f9
PA
23872014-04-23 Pedro Alves <palves@redhat.com>
2388
2389 * mem-break.c (find_gdb_breakpoint_at): Make static.
2390 * mem-break.h (find_gdb_breakpoint_at): Delete declaration.
2391
a4165e94
PA
23922014-04-23 Pedro Alves <palves@redhat.com>
2393
2394 * i386-low.c: Don't include break-common.h here.
2395 (i386_low_insert_watchpoint, i386_low_remove_watchpoint): Change
2396 prototype to take target_hw_bp_type as argument instead of a Z
2397 packet char.
2398 * i386-low.h: Include break-common.h here.
2399 (Z_packet_to_hw_type): Declare.
2400 (i386_low_insert_watchpoint, i386_low_remove_watchpoint): Change
2401 prototypes.
2402 * linux-x86-low.c (x86_insert_point): Convert the packet number to
2403 a target_hw_bp_type before calling i386_low_insert_watchpoint.
2404 (x86_remove_point): Convert the packet number to a
2405 target_hw_bp_type before calling i386_low_remove_watchpoint.
2406 * win32-i386-low.c (i386_insert_point): Convert the packet number
2407 to a target_hw_bp_type before calling i386_low_insert_watchpoint.
2408 (i386_remove_point): Convert the packet number to a
2409 target_hw_bp_type before calling i386_low_remove_watchpoint.
2410
b8acf843
PA
24112014-04-23 Pedro Alves <palves@redhat.com>
2412
2413 * utils.h (perror_with_name): Add ATTRIBUTE_NORETURN.
2414
d708bcd1
PA
24152014-04-10 Pedro Alves <palves@redhat.com>
2416
2417 * mem-break.c (add_breakpoint_condition, add_breakpoint_commands):
2418 Check if the condition or command is NULL before checking if the
2419 breakpoint is known. On success, return true.
2420 * mem-break.h (add_breakpoint_condition): Document return.
2421 (add_breakpoint_commands): Add describing comment.
2422 * server.c (skip_to_semicolon): New function.
2423 (process_point_options): Use it.
2424
2eec7d5b
PA
24252014-04-09 Pedro Alves <palves@redhat.com>
2426
2427 * linux-low.c (linux_read_loadmap): Pass current_inferior directly
2428 to lwpid_of.
2429
fa96cb38
PA
24302014-02-27 Pedro Alves <palves@redhat.com>
2431
2432 PR 12702
2433 * inferiors.h (A_I_NEXT, ALL_INFERIORS_TYPE, ALL_PROCESSES): New
2434 macros.
2435 * linux-low.c (delete_lwp, handle_extended_wait): Add debug
2436 output.
2437 (last_thread_of_process_p): Take a PID argument instead of a
2438 thread pointer.
2439 (linux_wait_for_lwp): Delete.
2440 (num_lwps, check_zombie_leaders, not_stopped_callback): New
2441 functions.
2442 (linux_low_filter_event): New function, party factored out from
2443 linux_wait_for_event.
2444 (linux_wait_for_event): Rename to ...
2445 (linux_wait_for_event_filtered): ... this. Add new filter ptid
2446 argument. Partly rewrite. Always use waitpid(-1, WNOHANG) and
2447 sigsuspend. Check for zombie leaders.
2448 (linux_wait_for_event): Reimplement as wrapper around
2449 linux_wait_for_event_filtered.
2450 (linux_wait_1): Handle TARGET_WAITKIND_NO_RESUMED. Assume that if
2451 a normal or signal exit is seen, it's the whole process exiting.
2452 (wait_for_sigstop): No longer a for_each_inferior callback.
2453 Rewrite on top of linux_wait_for_event_filtered.
2454 (stop_all_lwps): Call wait_for_sigstop directly.
2455 * server.c (resume, handle_target_event): Handle
2456 TARGET_WAITKIND_NO_RESUMED.
2457
d763de10
JB
24582014-02-26 Joel Brobecker <brobecker@adacore.com>
2459
2460 * win32-low.c (psapi_get_dll_name,
2461 * win32_CreateToolhelp32Snapshot): Delete.
2462 (win32_CreateToolhelp32Snapshot, win32_Module32First)
2463 (win32_Module32Next, load_toolhelp, toolhelp_get_dll_name):
2464 Delete.
2465 (handle_load_dll): Add function description.
2466 Remove code using psapi_get_dll_name and toolhelp_get_dll_name.
2467
850a0f76
JB
24682014-02-26 Joel Brobecker <brobecker@adacore.com>
2469
2470 * win32-low.c (win32_add_one_solib): Add 0x1000 to load_addr.
2471 Add comment.
2472 (win32_add_all_dlls): Remove 0x1000 offset applied to DLL
2473 base address when calling win32_add_one_solib.
2474 (handle_load_dll): Delete local variable load_addr.
2475 Remove 0x1000 offset applied to DLL base address when calling
2476 win32_add_one_solib.
2477 (handle_unload_dll): Add comment.
2478
f25b3fc3
JB
24792014-02-26 Joel Brobecker <brobecker@adacore.com>
2480
2481 * win32-low.c (win32_add_all_dlls): Renames
2482 win32_ensure_ntdll_loaded. Rewrite function documentation.
2483 Adjust implementation to always load all DLLs.
2484 Add 0x1000 offset to DLL base address when calling
2485 win32_add_one_solib.
2486 (child_initialization_done): New static global.
2487 (do_initial_child_stuff): Set child_initialization_done to
2488 zero during child initialization, and 1 after. Replace call
2489 to win32_ensure_ntdll_loaded by call to win32_add_all_dlls.
2490 Add comment.
2491 (match_dll_by_basename, dll_is_loaded_by_basename): Delete.
2492 (handle_unload_dll): Add function documentation.
2493 (get_child_debug_event): Ignore load and unload DLL events
2494 during child initialization.
2495
d86d4aaf
DE
24962014-02-20 Doug Evans <dje@google.com>
2497
3bc32da3 2498 Remove global all_lwps.
d86d4aaf
DE
2499 * inferiors.h (ptid_of): Move here from linux-low.h.
2500 (pid_of, lwpid_of): Ditto.
2501 * linux-aarch64-low.c (debug_reg_change_callback): Update, "entry"
2502 parameter is a struct thread_info * now.
2503 (aarch64_notify_debug_reg_change): Fetch pid from current_inferior
2504 directly. Pass &all_threads to find_inferior instead of &all_lwps.
2505 (aarch64_stopped_data_address): Fetch lwpid from current_inferior
2506 directly.
2507 (aarch64_linux_prepare_to_resume): Fetch ptid from thread.
2508 (aarch64_arch_setup): Fetch lwpid from current_inferior directly.
2509 * linux-arm-low.c (update_registers_callback): Update, "entry"
2510 parameter is a struct thread_info * now.
2511 Fetch lwpid from current_inferior directly.
2512 (arm_insert_point): Pass &all_threads to find_inferior instead of
2513 &all_lwps.
2514 (arm_remove_point): Ditto.
2515 (arm_stopped_by_watchpoint): Fetch lwp from current_inferior.
2516 (arm_prepare_to_resume): Fetch pid from thread.
2517 (arm_read_description): Fetch lwpid from current_inferior directly.
2518 * linux-low.c (all_lwps): Delete.
2519 (delete_lwp): Delete call to remove_inferior.
2520 (handle_extended_wait): Fetch lwpid from thread.
2521 (add_lwp): Don't set lwp->entry.id. Remove call to
2522 add_inferior_to_list.
2523 (linux_attach_lwp_1): Fetch pid from current_inferior directly.
2524 (linux_kill_one_lwp): Fetch ptid,lwpid from thread.
2525 (kill_one_lwp_callback): Ditto.
2526 (linux_kill): Don't dereference NULL pointer.
2527 Fetch ptid,lwpid from thread.
2528 (get_detach_signal): Fetch ptid from thread.
2529 (linux_detach_one_lwp): Fetch ptid,lwpid from thread.
2530 Simplify call to regcache_invalidate_thread.
2531 (delete_lwp_callback): Update, "entry" parameter is a
2532 struct thread_info * now. Fetch pid from thread.
2533 (linux_mourn): Pass &all_threads to find_inferior instead of &all_lwps.
2534 (status_pending_p_callback): Update, "entry" parameter is a
2535 struct thread_info * now. Fetch ptid from thread.
2536 (find_lwp_pid): Update, "entry" parameter is a
2537 struct thread_info * now.
2538 (linux_wait_for_lwp): Fetch pid from thread.
2539 (linux_fast_tracepoint_collecting): Fetch lwpid from thread.
2540 (maybe_move_out_of_jump_pad): Fetch lwpid from current_inferior.
2541 (enqueue_one_deferred_signal): Fetch lwpid from thread.
2542 (dequeue_one_deferred_signal): Ditto.
2543 (cancel_breakpoint): Fetch ptid from current_inferior.
2544 (linux_wait_for_event): Pass &all_threads to find_inferior,
2545 not &all_lwps. Fetch ptid, lwpid from thread.
2546 (count_events_callback): Update, "entry" parameter is a
2547 struct thread_info * now.
2548 (select_singlestep_lwp_callback): Ditto.
2549 (select_event_lwp_callback): Ditto.
2550 (cancel_breakpoints_callback): Ditto.
2551 (linux_cancel_breakpoints): Pass &all_threads to find_inferior,
2552 not &all_lwps.
2553 (select_event_lwp): Ditto. Fetch ptid from event_thread.
2554 (unsuspend_one_lwp): Update, "entry" parameter is a
2555 struct thread_info * now.
2556 (unsuspend_all_lwps): Pass &all_threads to find_inferior,
2557 not &all_lwps.
2558 (linux_stabilize_threads): Ditto. And for for_each_inferior.
2559 Fetch lwpid from thread, not lwp.
2560 (linux_wait_1): Fetch ptid, lwpid from current_inferior.
2561 Pass &all_threads to find_inferior, not &all_lwps.
2562 (send_sigstop): Fetch lwpid from thread, not lwp.
2563 (send_sigstop_callback): Update, "entry" parameter is a
2564 struct thread_info * now.
2565 (suspend_and_send_sigstop_callback): Ditto.
2566 (wait_for_sigstop): Ditto. Fetch ptid, lwpid from thread, lwp.
2567 (stuck_in_jump_pad_callback): Update, "entry" parameter is a
2568 struct thread_info * now.
2569 (move_out_of_jump_pad_callback): Ditto. Fetch ptid, lwpid
2570 from thread, lwp.
2571 (lwp_running): Update, "entry" parameter is a
2572 struct thread_info * now.
2573 (stop_all_lwps): Fetch ptid from thread.
2574 Pass &all_threads to find_inferior, for_each_inferior, not &all_lwps.
2575 (linux_resume_one_lwp): Fetch lwpid from thread.
2576 (linux_set_resume_request): Update, "entry" parameter is a
2577 struct thread_info * now. Fetch pid, lwpid from thread.
2578 (resume_status_pending_p): Update, "entry" parameter is a
2579 struct thread_info * now.
2580 (need_step_over_p): Ditto. Fetch lwpid from thread.
2581 (start_step_over): Fetch lwpid from thread.
2582 (linux_resume_one_thread): Update, "entry" parameter is a
2583 struct thread_info * now. Fetch lwpid from thread.
2584 (linux_resume): Pass &all_threads to find_inferior, not &all_lwps.
2585 (proceed_one_lwp): Update, "entry" parameter is a
2586 struct thread_info * now. Fetch lwpid from thread.
2587 (unsuspend_and_proceed_one_lwp): Update, "entry" parameter is a
2588 struct thread_info * now.
2589 (proceed_all_lwps): Pass &all_threads to find_inferior, not &all_lwps.
2590 (unstop_all_lwps): Ditto. Fetch lwpid from thread.
2591 (regsets_fetch_inferior_registers): Fetch lwpid from current_inferior
2592 directly.
2593 (regsets_store_inferior_registers): Ditto.
2594 (fetch_register, store_register): Ditto.
2595 (linux_read_memory, linux_write_memory): Ditto.
2596 (linux_request_interrupt): Ditto.
2597 (linux_read_auxv): Ditto.
2598 (linux_xfer_siginfo): Ditto.
2599 (linux_qxfer_spu): Ditto.
2600 (linux_qxfer_libraries_svr4): Ditto.
2601 * linux-low.h (ptid_of, pid_of, lwpid_of): Delete,
2602 moved to inferiors.h.
2603 (get_lwp): Delete.
2604 (get_thread_lwp): Update.
2605 (struct lwp_info): Delete member "entry". Simplify comment for
2606 member "thread".
2607 (all_lwps): Delete.
2608 * linux-mips-low.c (mips_read_description): Fetch lwpid from
2609 current_inferior directly.
2610 (update_watch_registers_callback): Update, "entry" parameter is a
2611 struct thread_info * now. Fetch pid from thread.
2612 (mips_linux_prepare_to_resume): Fetch ptid from thread.
2613 (mips_insert_point): Fetch lwpid from current_inferior.
2614 Pass &all_threads to find_inferior, not &all_lwps.
2615 (mips_remove_point): Pass &all_threads to find_inferior, not &all_lwps.
2616 (mips_stopped_by_watchpoint): Fetch lwpid from current_inferior
2617 directly.
2618 (mips_stopped_data_address): Ditto.
2619 * linux-s390-low.c (s390_arch_setup): Fetch pid from current_inferior
2620 directly.
2621 * linux-tile-low.c (tile_arch_setup): Ditto.
2622 * linux-x86-low.c (x86_get_thread_area): Fetch lwpid from thread.
2623 (update_debug_registers_callback): Update, "entry" parameter is a
2624 struct thread_info * now. Fetch pid from thread.
2625 (i386_dr_low_set_addr): Fetch pid from current_inferior directly.
2626 Pass &all_threads to find_inferior, not &all_lwps.
2627 (i386_dr_low_get_addr): Fetch ptid from current_inferior directly.
2628 (i386_dr_low_set_control): Fetch pid from current_inferior directly.
2629 Pass &all_threads to find_inferior, not &all_lwps.
2630 (i386_dr_low_get_control): Fetch ptid from current_inferior directly.
2631 (i386_dr_low_get_status): Ditto.
2632 (x86_linux_prepare_to_resume): Fetch ptid from thread.
2633 (x86_siginfo_fixup): Fetch lwpid from current_inferior directly.
2634 (x86_linux_read_description): Ditto.
2635 * proc-service.c (ps_getpid): Fetch pid from current_inferior directly.
2636
3b8361aa
DE
26372014-02-20 Doug Evans <dje@google.com>
2638
2639 * inferiors.c (get_first_inferior): Fix buglet.
2640
f7667f0d
DE
26412014-02-19 Doug Evans <dje@google.com>
2642
2643 * gdbthread.h (add_thread): Change result type to struct thread_info *.
2644 * inferiors.c (add_thread): Change result type to struct thread_info *.
2645 All callers updated.
2646 (add_lwp): Call add_thread here instead of in callers.
2647 All callers updated.
2648 * linux-low.h (get_lwp_thread): Rewrite.
2649 (struct lwp_info): New member "thread".
2650
b3312d80
DE
26512014-02-19 Doug Evans <dje@google.com>
2652
2653 * linux-low.c (add_lwp): Change result to struct lwp_info *.
2654 All callers updated.
2655
ecc6f45c
DE
26562014-02-19 Doug Evans <dje@google.com>
2657
2658 * inferiors.c (add_thread): Fix whitespace.
2659
649ebbca
DE
26602014-02-19 Doug Evans <dje@google.com>
2661
2662 * dll.c (clear_dlls): Replace accessing list implemention details
2663 with API function.
2664 * gdbthread.h (get_first_thread): Declare.
2665 * inferiors.c (for_each_inferior_with_data): New function.
2666 (get_first_thread): New function.
2667 (find_thread_ptid): Simplify.
2668 (get_first_inferior): New function.
2669 (clear_list): Delete.
2670 (one_inferior_p): New function.
2671 (clear_inferior_list): New function.
2672 (clear_inferiors): Update.
2673 * inferiors.h (for_each_inferior_with_data): Declare.
2674 (clear_inferior_list): Declare.
2675 (one_inferior_p): Declare.
2676 (get_first_inferior): Declare.
2677 * linux-low.c (linux_wait_for_event): Replace accessing list
2678 implemention details with API function.
2679 * server.c (target_running): Ditto.
2680 (accumulate_file_name_length): New function.
2681 (emit_dll_description): New function.
2682 (handle_qxfer_libraries): Replace accessing list implemention
2683 details with API function.
2684 (handle_qxfer_threads_worker): New function.
2685 (handle_qxfer_threads_proper): Replace accessing list implemention
2686 details with API function.
2687 (handle_query): Ditto.
2688 (visit_actioned_threads_callback_ftype): New typedef.
2689 (visit_actioned_threads_data): New struct.
2690 (visit_actioned_threads): Rewrite to be find_inferior callback.
2691 (resume): Call find_inferior.
2692 (handle_status): Replace accessing list implemention
2693 details with API function.
2694 (process_serial_event): Replace accessing list implemention details
2695 with API function.
2696 * target.c (set_desired_inferior): Replace accessing list implemention
2697 details with API function.
2698 * tracepoint.c (same_process_p): New function.
2699 (gdb_agent_about_to_close): Replace accessing list implemention
2700 details with API function.
2701 * win32-low.c (child_delete_thread): Replace accessing list
2702 implemention details with API function.
2703 (match_dll_by_basename): New function.
2704 (dll_is_loaded_by_basename): New function.
2705 (win32_ensure_ntdll_loaded): Replace accessing list implemention
2706 details call to dll_is_loaded_by_basename.
2707
80894984
DE
27082014-02-19 Doug Evans <dje@google.com>
2709
2710 * dll.h (struct dll_info): Add comment.
2711 * gdbthread.h (struct thread_info): Add comment.
2712 (current_ptid): Simplify.
2713 * inferiors.c (add_process): Update.
2714 (remove_process): Update.
2715 * inferiors.h (struct process_info): Rename member "head" to "entry".
2716 * linux-low.c (delete_lwp): Update.
2717 (add_lwp): Update.
2718 (last_thread_of_process_p): Update.
2719 (kill_one_lwp_callback, linux_kill): Update.
2720 (status_pending_p_callback): Update.
2721 (wait_for_sigstop): Update. Simplify read of ptid.
2722 (start_step_over): Update.
2723 * linux-low.h (ptid_of, pid_of, lwpid_of): Update.
2724 (get_lwp_thread): Update.
2725 (struct lwp_info): Rename member "head" to "entry".
2726 * regcache.h (inferior_list_entry): Delete.
2727 * server.c (kill_inferior_callback): Update.
2728 (detach_or_kill_inferior_callback): Update.
2729 (print_started_pid): Update.
2730 (print_attached_pid): Update.
2731 (process_serial_event): Simplify read of ptid.
2732 * thread-db.c (thread_db_create_event): Update.
2733 (thread_db_get_tls_address): Update.
2734 * win32-low.c (current_inferior_ptid): Simplify.
2735
46917d26
TT
27362014-02-19 Tom Tromey <tromey@redhat.com>
2737
2738 * target.h (struct target_ops) <supports_btrace>: Add target_ops
2739 argument.
2740 (target_supports_btrace): Update.
2741
0759a81e
YQ
27422014-02-14 Yao Qi <yao@codesourcery.com>
2743
2744 * Makefile.in (IPA_OBJS): Append rsp-low-ipa.o.
2745 (rsp-low-ipa.o): New target.
2746
a7191e8b
TT
27472014-02-12 Tom Tromey <tromey@redhat.com>
2748
2749 * ax.c (gdb_parse_agent_expr): Use hex2bin, not
2750 convert_ascii_to_int.
2751 * regcache.c (registers_to_string): Likewise.
2752 * remote-utils.c (decode_M_packet): Likewise.
2753 * server.c (process_serial_event): Likewise.
2754
ff0e980e
TT
27552014-02-12 Tom Tromey <tromey@redhat.com>
2756
2757 * server.c (handle_query, handle_v_run): Use hex2bin, not
2758 unhexify.
2759 * tracepoint.c (cmd_qtdpsrc, cmd_qtdv, cmd_qtnotes): Likewise.
2760
e9371aff
TT
27612014-02-12 Tom Tromey <tromey@redhat.com>
2762
2763 * ax.c (gdb_unparse_agent_expr): Use bin2hex, not
2764 convert_int_to_ascii.
2765 * regcache.c (registers_to_string, collect_register_as_string):
2766 Likewise.
2767 * remote-utils.c (look_up_one_symbol, relocate_instruction):
2768 Likewise.
2769 * server.c (process_serial_event): Likewise.
2770 * tracepoint.c (cmd_qtstatus, response_source, response_tsv)
2771 (cmd_qtbuffer, cstr_to_hexstr): Likewise.
2772
971dc0b8
TT
27732014-02-12 Tom Tromey <tromey@redhat.com>
2774
2775 * remote-utils.c (look_up_one_symbol, monitor_output): Use
2776 bin2hex, not hexify.
2777 * tracepoint.c (cmd_qtstatus): Likewise.
2778
0a822afb
TT
27792014-02-12 Tom Tromey <tromey@redhat.com>
2780
2781 * remote-utils.c (monitor_output): Pass explicit length to
2782 hexify.
2783
9c3d6531
TT
27842014-02-12 Tom Tromey <tromey@redhat.com>
2785
2786 * tracepoint.c: Include rsp-low.h.
2787 * server.c: Include rsp-low.h.
2788 * remote-utils.h (convert_ascii_to_int, convert_int_to_ascii)
2789 (unhexify, hexify, remote_escape_output, unpack_varlen_hex): Don't
2790 declare.
2791 * remote-utils.c: Include rsp-low.h.
2792 (fromhex, hexchars, ishex, unhexify, tohex, hexify)
2793 (remote_escape_output, remote_unescape_input, unpack_varlen_hex)
2794 (convert_int_to_ascii, convert_ascii_to_int): Move to
2795 common/rsp-low.c.
2796 * regcache.c: Include rsp-low.h.
2797 * ax.c: Include rsp-low.h.
2798 * Makefile.in (SFILES): Add common/rsp-low.c.
2799 (OBS): Add rsp-low.o.
2800 (rsp-low.o): New target.
2801
01fd3ea5
TT
28022014-02-12 Tom Tromey <tromey@redhat.com>
2803
2804 * utils.h (pulongest, plongest, phex_nz): Don't declare.
2805 Include print-utils.h.
2806 * utils.c (NUMCELLS, CELLSIZE, get_cell, decimal2str, pulongest)
2807 (plongest, thirty_two, phex_nz): Remove.
2808 * Makefile.in (SFILES): Add common/print-utils.c.
2809 (OBS): Add print-utils.o.
2810 (print-utils-ipa.o): New target.
2811 (print-utils.o): New target.
2812 (IPA_OBJS): Add print-utils-ipa.o.
2813
e99dc820
TT
28142014-02-06 Tom Tromey <tromey@redhat.com>
2815
2816 * Makefile.in (SFILES): Fix indentation.
2817
ee1e2d4f
DE
28182014-02-05 Doug Evans <dje@google.com>
2819
2820 * linux-low.c (linux_wait_for_event): Improve comment.
2821 (linux_wait_1): Keep current_inferior in sync with event_child.
2822
f5a02773
DE
28232014-01-22 Doug Evans <dje@google.com>
2824
2825 * gdbthread.h (gdb_id_to_thread): Delete, unused.
2826
87ce2a04
DE
28272014-01-22 Doug Evans <dje@google.com>
2828
2829 * configure.ac (AC_CHECK_FUNCS): Add test for gettimeofday.
2830 * configure: Regenerate.
2831 * config.in: Regenerate.
2832 * Makefile.in (SFILES): Add debug.c.
2833 (OBS): Add debug.o.
2834 * debug.c: New file.
2835 * debug.h: New file.
2836 * linux-aarch64-low.c (*): Update all debugging printfs to use
2837 debug_printf instead of fprintf.
2838 * linux-arm-low.c (*): Ditto.
2839 * linux-cris-low.c (*): Ditto.
2840 * linux-crisv32-low.c (*): Ditto.
2841 * linux-m32r-low.c (*): Ditto.
2842 * linux-sparc-low.c (*): Ditto.
2843 * linux-x86.c (*): Ditto.
2844 * linux-low.c (*): Ditto.
2845 (linux_wait_1): Add calls to debug_enter, debug_exit.
2846 (linux_wait): Remove redundant debugging printf.
2847 (stop_all_lwps): Add calls to debug_enter, debug_exit.
2848 (linux_resume, unstop_all_lwps): Ditto.
2849 * mem-break.c (*): Update all debugging printfs to use
2850 debug_printf instead of fprintf.
2851 * remote-utils.c (*): Ditto.
2852 * thread-db.c (*): Ditto.
2853 * server.c #include <ctype.h>, "gdb_vecs.h".
2854 (debug_threads): Moved to debug.c.
2855 (*): Update all debugging printfs to use debug_printf instead of
2856 fprintf.
2857 (start_inferior): Replace call to fflush with call to debug_flush.
2858 (monitor_show_help): Mention set debug-format.
2859 (parse_debug_format_options): New function.
2860 (handle_monitor_command): Handle "monitor set debug-format".
2861 (gdbserver_usage): Mention --debug-format.
2862 (main): Parse --debug-format.
2863 * server.h (debug_threads): Declaration moved to debug.h.
2864 #include "debug.h".
2865 * tracepoint.c (trace_debug_1) [!IN_PROCESS_AGENT]: Add version of
2866 trace_debug_1 that uses debug_printf.
2867 (tracepoint_look_up_symbols): Update all debugging printfs to use
2868 debug_printf instead of fprintf.
2869
e671835b
BS
28702014-01-20 Baruch Siach <baruch@tkos.co.il>
2871
2872 * linux-xtensa-low.c: Include asm/ptrace.h instead of
2873 sys/ptrace.h.
2874
b5737fa9
PA
28752014-01-17 Pedro Alves <palves@redhat.com>
2876
ea38d2a9 2877 PR build/16445
c7faa97a
PA
2878 * linux-x86-low.c: Don't include elf/common.h if ELFMAG0 is
2879 defined after including gdb_proc_service.h.
b5737fa9 2880
40ed484e
DE
28812014-01-16 Doug Evans <dje@google.com>
2882
2883 * dll.c (UNSPECIFIED_CORE_ADDR): New macro.
2884 (match_dll): Use it.
2885
969c39fb
MM
28862014-01-16 Markus Metzger <markus.t.metzger@intel.com>
2887
2888 * target.h (target_ops) <read_btrace>: Change parameters and
2889 return type to allow error reporting.
2890 * server.c (handle_qxfer_btrace): Support delta reads. Pass
2891 trace reading errors on.
2892 * linux-low.c (linux_low_read_btrace): Pass trace reading
2893 errors on.
2894 (linux_low_disable_btrace): New.
2895
ab7f45ba
DE
28962014-01-15 Doug Evans <dje@google.com>
2897
2898 * inferiors.c (thread_id_to_gdb_id): Delete.
2899 * inferiors.h (thread_id_to_gdb_id): Delete.
2900
66af0f44
EZ
29012014-01-13 Eli Zaretskii <eliz@gnu.org>
2902
2903 * Makefile.in (INCLUDE_CFLAGS): Remove trailing slash from
2904 "-I$(srcdir)/../". Fixes MinGW compilation errors with old GCC
2905 versions.
2906
9939e131
PA
29072014-01-08 Pedro Alves <palves@redhat.com>
2908
2909 * server.c (handle_status): Don't discard previous queued stop
2910 replies or thread's pending status here.
2911 (main) <disconnection>: Do it here instead.
2912
b7ea362b
PA
29132014-01-08 Pedro Alves <palves@redhat.com>
2914
2915 * gdbthread.h (struct thread_info) <status_pending_p>: New field.
2916 * server.c (visit_actioned_threads, handle_pending_status): New
2917 function.
2918 (handle_v_cont): Factor out parts to ...
2919 (resume): ... this new function. If in all-stop, and a thread
2920 being resumed has a pending status, report it without actually
2921 resuming.
2922 (myresume): Adjust to use the new 'resume' function.
2923 (clear_pending_status_callback, set_pending_status_callback)
2924 (find_status_pending_thread_callback): New functions.
2925 (handle_status): Handle the case of multiple threads having
2926 interesting statuses to report. Report threads' real last signal
2927 instead of always reporting GDB_SIGNAL_TRAP. Look for a thread
2928 with an interesting thread to report the status for, instead of
2929 always reporting the status of the first thread.
2930
28498c42
JB
29312014-01-01 Joel Brobecker <brobecker@adacore.com>
2932
2933 * gdbserver.c (gdbserver_version): Set copyright year to 2014.
2934 * gdbreplay.c (gdbreplay_version): Likewise.
2935
f45c82da
YZ
29362013-12-18 Yufeng Zhang <yufeng.zhang@arm.com>
2937
2938 * linux-aarch64-low.c (aarch64_linux_set_debug_regs): Set
2939 iov.iov_len with the real length in use.
2940
379a5e2d
JB
29412013-12-13 Joel Brobecker <brobecker@adacore.com>
2942
2943 * Makefile.in (safe-ctype.o, lbasename.o): New rules.
2944 * configure.srv: Add safe-ctype.o and lbasename.o to srv_tgtobj
2945 for all targets that use win32-low.c.
2946 * win32-low.c (win32_ensure_ntdll_loaded): New function.
2947 (do_initial_child_stuff): Add call to win32_ensure_ntdll_loaded.
2948
4210d83e
PA
29492013-12-13 Pedro Alves <palves@redhat.com>
2950
2951 * target.c (mywait): Set OURSTATUS->KIND to TARGET_WAITKIND_STOPPED
2952 if equal to TARGET_WAITKIND_LOADED.
2953 * win32-low.c (cached_status): New static global.
2954 (win32_wait): Add declaration.
2955 (do_initial_child_stuff): Flush all initial pending debug events
2956 up to the initial breakpoint.
2957 (win32_wait): If CACHED_STATUS was set, return that instead
2958 of doing a real wait. Remove the code resuming the execution
2959 of the inferior after receiving a TARGET_WAITKIND_LOADED event
2960 during the initial phase. Also remove the code changing
2961 OURSTATUS->KIND from TARGET_WAITKIND_LOADED to
2962 TARGET_WAITKIND_STOPPED.
2963
e7f0d979
YQ
29642013-12-11 Yao Qi <yao@codesourcery.com>
2965
2966 * notif.c (handle_notif_ack): Return 0 if no notification
2967 matches.
2968
ebcf782c
DE
29692013-11-20 Doug Evans <dje@google.com>
2970
2971 * linux-low.c (linux_set_resume_request): Fix comment.
2972
20ad9378
DE
29732013-11-20 Doug Evans <dje@google.com>
2974
2975 * linux-low.c (resume_status_pending_p): Tweak comment.
2976
a196ebeb
WT
29772013-11-20 Walfred Tedeschi <walfred.tedeschi@intel.com>
2978
2979 * Makefile.in: Add i386-mpx.c, i386-mpx-linux.c, amd64-mpx.c,
2980 amd64-mpx-linux.c, x32-mpx.c and x32-mpx-linux.c generation.
2981 * configure.srv (srv_i386_regobj): Add i386-mpx.o.
2982 (srv_i386_linux_regobj): Add i386-mpx-linux.o.
2983 (srv_amd64_regobj): Add amd64-mpx.o.
2984 (srv_amd64_linux_regobj): Add amd64-mpx-linux.o.
2985 (srv_i386_32bit_xmlfiles): Add i386/32bit-mpx.xml.
2986 (srv_i386_64bit_xmlfiles): Add i386/64bit-mpx.xml.
2987 * i387-fp.c (num_pl_bnd_register) Added constant.
2988 (num_pl_bnd_cfg_registers) Added constant.
2989 (struct i387_xsave) Added reserved area and MPX fields.
2990 (i387_cache_to_xsave, i387_xsave_to_cache) Add MPX.
2991 * linux-x86-low.c (init_registers_i386_mpx_linux): Declare new
2992 function.
2993 (tdesc_i386_mpx_linux): Add MPX amd64 target.
2994 (init_registers_amd64_mpx_linux): Declare new function.
2995 (tdesc_amd64_mpx_linux): Add MPX amd64 target.
2996 (x86_64_regmap): Add MPX registers.
2997 (x86_linux_read_description): Add MPX case.
2998 (initialize_low_arch): Initialize MPX targets.
2999
0080a2f6
TT
30002013-11-18 Tom Tromey <tromey@redhat.com>
3001
3002 * configure: Rebuild.
3003 * configure.ac: Don't check for stdlib.h.
3004 * gdbreplay.c: Unconditionally include stdlib.h.
3005
2978b111
TT
30062013-11-18 Tom Tromey <tromey@redhat.com>
3007
3008 * config.in: Rebuild.
3009 * configure: Rebuild.
3010 * configure.ac: Don't use AC_HEADER_DIRENT.
3011
a3d08894
TT
30122013-11-18 Tom Tromey <tromey@redhat.com>
3013
3014 * server.h: Don't check HAVE_STRING_H.
3015 * gdbreplay.c: Don't check HAVE_STRING_H.
3016 * configure: Rebuild.
3017
0a5dd17d
TT
30182013-11-18 Tom Tromey <tromey@redhat.com>
3019
3020 * Makefile.in (gdbreplay$(EXEEXT)): Depend on and link against
3021 LIBGNU.
3022
1bd2f0ba
TT
30232013-11-08 Tom Tromey <tromey@redhat.com>
3024
3025 * configure, config.in: Rebuild.
3026 * configure.ac: Remove unused configury.
3027
3266f10b
TT
30282013-11-08 Tom Tromey <tromey@redhat.com>
3029
3030 * acinclude.m4: Include common.m4, codeset.m4.
3031 * configure, config.in: Rebuild.
3032 * configure.ac: Use GDB_AC_COMMON.
3033
6682d959
AA
30342013-11-06 Andreas Arnez <arnez@linux.vnet.ibm.com>
3035
3036 * linux-s390-low.c (HWCAP_S390_TE): New define.
3037 (s390_arch_setup): Consider the TE field in the HWCAP for
3038 determining 'have_regset_tdb'.
3039
fd0a4d76
SDJ
30402013-10-16 Sergio Durigan Junior <sergiodj@redhat.com>
3041
3042 PR gdb/16014
3043 * tracepoint.c (download_tracepoint_1): Remove unnecessary double
3044 call to sizeof.
3045
1a3d890b
PA
30462013-10-02 Pedro Alves <palves@redhat.com>
3047
3048 * server.c (process_serial_event): Don't output "GDBserver
3049 exiting" if GDB is connected through stdio.
3050 * target.c (mywait): Likewise, be silent if GDB is connected
3051 through stdio.
3052
97ad4581
JB
30532013-10-01 Joel Brobecker <brobecker@adacore.com>
3054
3055 * lynx-low.c (lynx_add_threads_after_attach): New function.
3056 (lynx_attach): Remove call to add_thread. Add call to
3057 lynx_add_threads_after_attach instead.
3058
5b4e221c
MF
30592013-09-28 Mike Frysinger <vapier@gentoo.org>
3060
3061 * configure.ac (AC_CHECK_HEADERS): Add sys/syscall.h
3062 * config.in, configure: Regenerated.
3063
ee47b2f8
YQ
30642013-09-18 Yao Qi <yao@codesourcery.com>
3065
3066 PR server/15959
3067 * server.c (start_inferior): Clear 'resume_info'.
3068
d6707650 30692013-09-16 Jiong Wang <jiwang@tilera.com>
0f63d4db 3070
d6707650
JW
3071 * linux-tile-low.c (tile_regsets): Modify the size field to 64-bit
3072 for each register.
3073
9243dd0e 30742013-09-16 Jiong Wang <jiwang@tilera.com>
0f63d4db 3075
9243dd0e
JW
3076 * configure.srv <tilegx*-*-linux*>: Remove linux-osdata.o from and add
3077 linux-tile-low.o to srv_tgtobj.
3078
c623a6ef
WN
30792013-09-16 Will Newton <will.newton@linaro.org>
3080
3081 * linux-aarch64-low.c (aarch64_linux_set_debug_regs): Zero
3082 out regs.
3083
fb71d39e
PA
30842013-09-06 Pedro Alves <palves@redhat.com>
3085
3086 * Makefile.in (gdb_proc_service_h, regdef_h, regcache_h)
3087 (signals_def, signals_h, ptid_h, ax_h, agent_h, linux_btrace_h)
3088 (linux_osdata_h, vec_h, gdb_vecs_h, host_defs_h, libiberty_h)
3089 (server_h, gdbthread_h, linux_low_h, linux_ptrace_h)
3090 (gdb_thread_db_h, linux_procfs_h, lynx_low_h, nto_low_h)
3091 (mips_linux_watch_h, i386_low_h, win32_low_h): Delete.
3092
8e7e9910
PA
30932013-09-06 Pedro Alves <palves@redhat.com>
3094
3095 * Makefile.in (linux-btrace.o, mips-linux-watch.o): Remove
3096 explicit header dependencies and use $COMPILE/$POSTCOMPILE.
3097
7c3a12ca
PA
30982013-09-06 Pedro Alves <palves@redhat.com>
3099
3100 * linux-amd64-ipa.c: Include tracepoint.h.
3101 * linux-i386-ipa.c: Include tracepoint.h.
3102
8eb3d7b6
RW
31032013-09-06 Ricard Wanderlof <ricardw@axis.com>
3104
3105 * linux-crisv32-low.c (PTRACE_GET_THREAD_AREA): New macro.
3106 (ps_get_thread_area): New function.
3107
eddddb9d
RW
31082013-09-06 Ricard Wanderlof <ricardw@axis.com>
3109
3110 * linux-crisv32-low.c (elf_gregset_t): Delete typedef.
3111 (initialize_low_arch): Call init_registers_crisv32 rather than
3112 init_register_crisv32.
3113
533b0600
PA
31142013-09-05 Pedro Alves <palves@redhat.com>
3115
3116 * server.h (handle_vFile, hostio_last_error_from_errno): Move
3117 to ...
3118 * hostio.h: ... this new file.
3119 * hostio.c, server.c, linux-low.c, nto-low.c, spu-low,
3120 win32-low.c: Include hostio.h.
3121
0ce3d3b5
PA
31222013-09-05 Pedro Alves <palves@redhat.com>
3123
3124 * server.h (gdb_client_data, handler_func, callback_handler_func)
3125 (delete_file_handler, add_file_handler, append_callback_event)
3126 (delete_callback_event, start_event_loop, initialize_event_loop):
3127 Move to event-loop.h and include it.
3128 * event-loop.h: New file.
3129
799cdc37
PA
31302013-09-05 Pedro Alves <palves@redhat.com>
3131
3132 * dll.c, inferiors.c, remote-utils.c, server.c: Include "dll.h".
3133 * server.h (struct dll_info, all_dlls, dlls_changed, clear_dlls)
3134 (loaded_dll, unloaded_dll): Move to ...
3135 * dll.h: ... this new file.
3136 * inferiors.c, remote-utils.c, win32-low.c: Include "dll.h".
3137
6a6bbd9d
PA
31382013-09-05 Pedro Alves <palves@redhat.com>
3139
3140 * server.h (current_process, get_thread_process, all_processes)
3141 (add_inferior_to_list, for_each_inferior, current_inferior)
3142 (remove_inferior, add_process, remove_process, find_process_pid)
3143 (have_started_inferiors_p, have_attached_inferiors_p)
3144 (thread_id_to_gdb_id, thread_to_gdb_id, gdb_id_to_thread_id)
3145 (clear_inferiors, find_inferior, find_inferior_id)
3146 (inferior_target_data, set_inferior_target_data)
3147 (inferior_regcache_data, set_inferior_regcache_data): Move to
3148 inferiors.h, and include it.
3149 * inferiors.h: New file.
3150
f699aaba
PA
31512013-09-05 Pedro Alves <palves@redhat.com>
3152
3153 * server.h (struct emit_ops, current_insn_ptr, emit_error):
3154 Move ...
72f4393d 3155 * ax.h: ... here.
f699aaba 3156
c144c7a0
PA
31572013-09-05 Pedro Alves <palves@redhat.com>
3158
3159 * ax.c, linux-low.c, linux-x86-low.c, server.c: Include
3160 tracepoint.h.
3161 * server.h (IPA_BUFSIZ, initialize_tracepoint, tracing)
3162 (disconnected_tracing, tracepoint_look_up_symbols, stop_tracing
3163 (handle_tracepoint_general_set, handle_tracepoint_query)
3164 (tracepoint_finished_step, tracepoint_was_hit)
3165 (release_while_stepping_state_list, current_traceframe)
3166 (in_readonly_region, traceframe_read_mem)
3167 (fetch_traceframe_registers, traceframe_read_sdata)
3168 (traceframe_read_info, struct fast_tpoint_collect_status)
3169 (fast_tracepoint_collecting, force_unlock_trace_buffer)
3170 (handle_tracepoit_bkpts, initialize_low_tracepoint)
3171 (supply_fast_tracepoint_registers)
3172 (supply_static_tracepoint_registers, set_trampoline_buffer_space)
3173 (ipa_tdesc, claim_trampoline_space)
3174 (have_fast_tracepoint_trampoline_buffer, gdb_agent_about_to_close)
3175 (agent_mem_read, agent_get_trace_state_variable_value)
3176 (agent_set_trace_state_variable_value, agent_tsv_read)
3177 (agent_mem_read_string, get_raw_reg_func_addr)
3178 (get_get_tsv_func_addr, get_set_tsv_func_addr): Move to ...
3179 * tracepoint.h: ... this new file.
3180
ff42e6ab
PA
31812013-09-05 Pedro Alves <palves@redhat.com>
3182
3183 * server.h (perror_with_name, error, fatal, warning, paddress)
3184 (pulongest, plongest, phex_nz, pfildes): Move to utils.h, and
3185 include it.
3186 * utils.h: New file.
3187
541af0f4
PA
31882013-09-05 Pedro Alves <palves@redhat.com>
3189
3190 * server.h (remote_debug, noack_mode, transport_is_reliable)
3191 (gdb_connected, STDIO_CONNECTION_NAME, remote_connection_is_stdio)
3192 (read_ptid, write_ptid, putpkt, putpkt_binary, putpkt_notif)
3193 (getpkt, remote_prepare, remote_open, remote_close, write_ok)
3194 (write_enn, initialize_async_io, enable_async_io)
3195 (disable_async_io, check_remote_input_interrupt_request)
3196 (convert_ascii_to_int, convert_int_to_ascii, new_thread_notify)
3197 (dead_thread_notify, prepare_resume_reply)
3198 (decode_address_to_semicolon, decode_address, decode_m_packet)
3199 (decode_M_packet, decode_X_packet, decode_xfer_write)
3200 (decode_search_memory_packet, unhexify, hexify)
3201 (remote_escape_output, unpack_varlen_hex, clear_symbol_cache)
3202 (look_up_one_symbol, relocate_instruction)
3203 (monitor_output): Move to remote-utils.h, and include it.
3204 * remote-utils.h: New file.
3205
eebdf26b
PA
32062013-09-05 Pedro Alves <palves@redhat.com>
3207
3208 * server.h (_): Delete.
3209
3aafd2ff
PA
32102013-09-02 Pedro Alves <palves@redhat.com>
3211
3212 * tracepoint.c (TRACEFRAME_EOB_MARKER_SIZE): New macro.
3213 (init_trace_buffer): Ensure at least TRACEFRAME_EOB_MARKER_SIZE is
3214 allocated.
3215 (trace_buffer_alloc): Use TRACEFRAME_EOB_MARKER_SIZE.
3216
cee83bcb
PM
32172013-09-02 Pierre Muller <muller@sourceware.org>
3218
3219 * win32-low.c (child_xfer_memory): Check if ReadProcessMemory
3220 or WriteProcessMemory complete successfully and handle
3221 ERROR_PARTIAL_COPY error.
3222
9a13b2fa
PA
32232013-09-02 Pedro Alves <palves@redhat.com>
3224
3225 * server.c (gdb_read_memory): Return -1 on traceframe memory read
3226 error instead of EIO.
3227
602e3198
JK
32282013-08-28 Jan Kratochvil <jan.kratochvil@redhat.com>
3229
3230 PR server/15604
3231 * linux-low.c: Include filestuff.h.
3232 (linux_create_inferior) <pid == 0>: Call close_most_fds.
3233 * lynx-low.c: Include filestuff.h.
3234 (lynx_create_inferior) <pid == 0>: Call close_most_fds.
3235 * server.c: Include filestuff.h.
3236 (main): Call notice_open_fds.
3237 * spu-low.c: Include filestuff.h.
3238 (spu_create_inferior) <pid == 0>: Call close_most_fds.
3239
96d7229d
LM
32402013-08-22 Luis Machado <lgustavo@codesourcery.com>
3241
3242 * Makefile.in: Explain why ../target and ../nat are not
3243 listed as include file search paths.
3244 (linux-waitpid.o): New object file rule.
3245 * configure.srv (srv_native_linux_obj): New variable.
3246 Replace all occurrences of linux native object files with
3247 $srv_native_linux_obj.
3248 * linux-low.c: Include nat/linux-nat.h and nat/linux-waitpid.h.
3249 (HAS_NOMMU): Move defining logic to common/linux-ptrace.c.
3250 (linux_enable_event_reporting): Remove declaration.
3251 (my_waitpid): Moved to common/linux-waitpid.c.
3252 (linux_wait_for_event): Pass ptid when calling
3253 linux_enable_event_reporting.
3254 (linux_supports_tracefork_flag): Remove.
3255 (linux_enable_event_reporting): Likewise.
3256 (linux_tracefork_grandchild): Remove.
3257 (STACK_SIZE): Moved to common/linux-ptrace.c.
3258 (linux_tracefork_child): Remove.
3259 (linux_test_for_tracefork): Remove.
3260 (linux_look_up_symbols): Call linux_supports_traceclone.
3261 (initialize_low): Remove call to linux_test_for_tracefork.
3262 * linux-low.h (PTRACE_TYPE_ARG3): Move to
3263 common/linux-ptrace.h.
3264 (PTRACE_TYPE_ARG4): Likewise.
3265 Include linux-ptrace.h.
3266
32940073
PA
32672013-08-21 Pedro Alves <palves@redhat.com>
3268
3269 * config.in: Renegerate.
3270
33b60d58 32712013-08-19 Luis Machado <lgustavo@codesourcery.com>
a261b8f5 3272
33b60d58
LM
3273 * Makefile.in (INCLUDE_CFLAGS): Include -I$(srcdir)/../.
3274 (SFILES): Remove $(srcdir)/common/target-common.c and
3275 add $(srcdir)/target/waitstatus.c.
3276 (OBS): Remove target-common.o and add waitstatus.o.
3277 (server_h): Remove $(srcdir)/../common/target-common.h and
3278 add $(srcdir)/../target/resume.h, $(srcdir)/../target/wait.h
3279 and $(srcdir)/../target/waitstatus.h.
3280 (target-common.o): Remove.
3281 (waitstatus.o): New target object file.
3282 * target.h: Do not include target-common.h and
3283 include target/resume.h, target/wait.h and
3284 target/waitstatus.h.
3285
b8e1b30e
LM
32862013-08-13 Luis Machado <lgustavo@codesourcery.com>
3287
3288 * linux-arm-low.c: Rename all occurrences of PTRACE_ARG3_TYPE
3289 to PTRACE_TYPE_ARG3.
3290 * linux-low.c: Rename all occurrences of PTRACE_ARG3_TYPE
3291 to PTRACE_TYPE_ARG3 and PTRACE_ARG4_TYPE to
3292 PTRACE_TYPE_ARG4.
3293 * linux-low.h (PTRACE_ARG3_TYPE): Rename to PTRACE_TYPE_ARG3.
3294 (PTRACE_ARG4_TYPE): Rename to PTRACE_TYPE_ARG4.
3295
7a60ad40
YQ
32962013-07-27 Jie Zhang <jie@codesourcery.com>
3297 Daniel Jacobowitz <dan@codesourcery.com>
3298 Yao Qi <yao@codesourcery.com>
3299
3300 * Makefile.in (SFILES): Add common/mips-linux-watch.c.
3301 (mips-linux-watch.o): New rule.
3302 (mips_linux_watch_h): New variable.
3303 * configure.srv <mips*-*-linux*>: Add mips-linux-watch.o to
3304 srv_tgtobj.
3305 * linux-mips-low.c: Include mips-linux-watch.h.
3306 (struct arch_process_info, struct arch_lwp_info): New.
3307 (update_watch_registers_callback): New function.
3308 (mips_linux_new_process, mips_linux_new_thread) New functions.
3309 (mips_linux_prepare_to_resume, mips_insert_point): New
3310 functions.
3311 (mips_remove_point, mips_stopped_by_watchpoint): New
3312 functions.
3313 (rsp_bp_type_to_target_hw_bp_type): New function.
3314 (mips_stopped_data_address): New function.
3315 (the_low_target): Add watchpoint support functions.
3316
de6f69ad
YQ
33172013-07-27 Yao Qi <yao@codesourcery.com>
3318
3319 * i386-low.c: Include break-common.h.
3320 (enum target_hw_bp_type): Remove.
3321
3360c0bf
LM
33222013-07-24 Luis Machado <lgustavo@codesourcery.com>
3323
3324 * Makefile.in (SFILES): /common/target-common.c.
3325 (OBS): Add target-common.o.
3326 (server_h): Add $(srcdir)/../common/target-common.h.
3327 (target-common.o): New target.
3328 * server.c (queue_stop_reply_callback): Free
3329 status string after use.
3330 * target.c (target_waitstatus_to_string): Remove.
3331 * target.h: Include target-common.h.
3332 (resume_kind): Likewise.
3333 (target_waitkind): Likewise.
3334 (target_waitstatus): Likewise.
3335 (TARGET_WNOHANG): Likewise.
3336
bd885420
YQ
33372013-07-04 Yao Qi <yao@codesourcery.com>
3338
3339 * Makefile.in (host_alias): Use @host_noncanonical@.
3340 (target_alias): Use @target_noncanonical@.
3341 * configure.ac: Use ACX_NONCANONICAL_TARGET and
3342 ACX_NONCANONICAL_HOST.
3343 * configure: Regenerated.
3344
3345 Revert:
3346 2013-06-28 Mircea Gherzan <mircea.gherzan@intel.com>
3347
3348 * configure.ac (version_host, version_target): Set and AC_SUBST them.
3349 * configure: Rebuild.
3350 * Makefile.in (version_host, version_target): Get from configure.
3351 (version.c): Use $(version_host) and $(version_target).
3352
17ef446e
PA
33532013-07-03 Pedro Alves <palves@redhat.com>
3354
3355 * Makefile.in (config.status): Depend on development.sh.
3356 * acinclude.m4: Include libmcheck.m4.
3357 * configure: Regenerate.
3358
7a9a7487
MG
33592013-07-02 Mircea Gherzan <mircea.gherzan@intel.com>
3360
3361 * win32-low.c (winapi_DebugActiveProcessStop): Move the WINAPI
3362 attribute inside the parentheses.
3363 (winapi_DebugSetProcessKillOnExit): Ditto.
3364 (winapi_DebugBreakProcess): Ditto.
3365 (winapi_GenerateConsoleCtrlEvent): Ditto.
a261b8f5 3366
49b64de6
MG
33672013-07-02 Mircea Gherzan <mircea.gherzan@intel.com>
3368
3369 * notif.h (notif_event): Add a dummy member to avoid compiler
3370 errors.
3371
d5749ee7
PA
33722013-07-01 Pedro Alves <palves@redhat.com>
3373
3374 * hostio.c (HOSTIO_PATH_MAX): Define.
3375 (require_filename, handle_open, handle_unlink, handle_readlink):
3376 Use it.
3377
d8d2a3ee
PA
33782013-07-01 Pedro Alves <palves@redhat.com>
3379
3380 * server.h: Include "pathmax.h".
3381 * linux-low.c: Don't include sys/param.h.
3382 (linux_pid_exe_is_elf_64_file): Use PATH_MAX instead of
3383 MAXPATHLEN.
3384 * win32-low.c: Don't include sys/param.h.
3385 (win32_create_inferior): Use PATH_MAX instead of MAXPATHLEN.
3386
bc7dea8d
PA
33872013-07-01 Pedro Alves <palves@redhat.com>
3388
3389 * event-loop.c: Don't check HAVE_UNISTD_H before including
3390 <unistd.h>.
3391 * gdbreplay.c: Likewise.
3392 * remote-utils.c: Likewise.
3393 * server.c: Likewise.
3394 * configure.ac: Don't check for unistd.h.
3395 * configure: Regenerate.
3396
d6c2da54
TT
33972013-06-28 Tom Tromey <tromey@redhat.com>
3398
3399 * Makefile.in (version.c): Use version.in, not
3400 common/version.in.
3401
257b6bec
MG
34022013-06-28 Mircea Gherzan <mircea.gherzan@intel.com>
3403
3404 * configure.ac (version_host, version_target): Set and AC_SUBST them.
3405 * configure: Rebuild.
3406 * Makefile.in (version_host, version_target): Get from configure.
3407 (version.c): Use $(version_host) and $(version_target).
3408
86ebe149
DK
34092013-06-10 Dmitry Kozlov <ddk@codesourcery.com>
3410
3411 Fix trace-status to output user name without trailing colon.
3412 * tracepoint.c (cmd_qtstatus): Remove unnecessary colon from user name.
3413
f30aa5af
DK
34142013-06-10 Dmitry Kozlov <ddk@codesourcery.com>
3415
3416 Fix trace-status to output proper start-time and stop-time.
3417 * tracepoint.c (cmd_qtstatus): Modify trace-status output to
3418 output start time and stop time in hex as gdb expects.
3419
28a93511
YQ
34202013-06-26 Pedro Alves <pedro@codesourcery.com>
3421
3422 * tracepoint.c (build_traceframe_info_xml): Output trace state
3423 variables present in the trace buffer.
3424
01208463
TT
34252013-06-24 Tom Tromey <tromey@redhat.com>
3426
3427 * Makefile.in (version.c): Use bfd/version.h, common/version.in,
3428 create-version.sh.
3429 (version.o): Remove.
3430 * gdbreplay.c: Include version.h.
3431 (version, host_name): Don't declare.
3432 * server.h: Include version.h.
3433 (version, host_name): Don't declare.
3434
760256f9
PA
34352013-06-12 Pedro Alves <palves@redhat.com>
3436
3437 * linux-x86-low.c (linux_is_elf64): Delete global.
3438 (x86_siginfo_fixup): Replace reference to `linux_is_elf64' global
3439 with local linux_pid_exe_is_elf_64_file use.
3440
030031ee
PA
34412013-06-11 Pedro Alves <palves@redhat.com>
3442
3443 * linux-low.c (regset_disabled, disable_regset): New functions.
3444 (regsets_fetch_inferior_registers)
3445 (regsets_store_inferior_registers): Use them.
3446 (initialize_regsets_info); Don't allocate the disabled_regsets
3447 array here.
3448 * linux-low.h (struct regsets_info) <disabled_regsets>: Extend
3449 comment.
3450
5da6eb0a
PA
34512013-06-11 Pedro Alves <palves@redhat.com>
3452
3453 * linux-low.c (initialize_regsets_info): Use xcalloc instead of
3454 xmalloc.
3455
7e5aaa09
PA
34562013-06-11 Pedro Alves <palves@redhat.com>
3457
3458 * linux-x86-low.c (initialize_low_arch): Call
3459 init_registers_x32_avx_linux.
3460
d878444c
JK
34612013-06-09 Jan Kratochvil <jan.kratochvil@redhat.com>
3462
3463 Fix compatibility with Android Bionic.
3464 * linux-low.c (linux_qxfer_libraries_svr4): Ignore first entry even if
3465 it is not empty.
3466
3aee8918
PA
34672013-06-07 Pedro Alves <palves@redhat.com>
3468
5f2b57b5 3469 PR server/14823
3aee8918
PA
3470 * Makefile.in (OBS): Add tdesc.o.
3471 (IPA_OBJS): Add tdesc-ipa.o.
3472 (tdesc-ipa.o): New rule.
3473 * ax.c (gdb_eval_agent_expr): Adjust register_size call to new
3474 interface.
3475 * linux-low.c (new_inferior): Delete.
3476 (disabled_regsets, num_regsets): Delete.
3477 (linux_add_process): Adjust to set the new per-process
3478 new_inferior flag.
3479 (linux_detach_one_lwp): Adjust to call regcache_invalidate_thread.
3480 (linux_wait_for_lwp): Adjust. Only call arch_setup if the event
3481 was a stop. When calling arch_setup, switch the current inferior
3482 to the thread that got an event.
3483 (linux_resume_one_lwp): Adjust to call regcache_invalidate_thread.
3484 (regsets_fetch_inferior_registers)
3485 (regsets_store_inferior_registers): New regsets_info parameter.
3486 Adjust to use it.
3487 (linux_register_in_regsets): New regs_info parameter. Adjust to
3488 use it.
3489 (register_addr, fetch_register, store_register): New usrregs_info
3490 parameter. Adjust to use it.
3491 (usr_fetch_inferior_registers, usr_store_inferior_registers): New
3492 parameter regs_info. Adjust to use it.
3493 (linux_fetch_registers): Get the current inferior's regs_info, and
3494 adjust to use it.
3495 (linux_store_registers): Ditto.
3496 [HAVE_LINUX_REGSETS] (initialize_regsets_info): New.
3497 (initialize_low): Don't initialize the target_regsets here. Call
3498 initialize_low_arch.
3499 * linux-low.h (target_regsets): Delete declaration.
3500 (struct regsets_info): New.
3501 (struct usrregs_info): New.
3502 (struct regs_info): New.
3503 (struct process_info_private) <new_inferior>: New field.
3504 (struct linux_target_ops): Delete the num_regs, regmap, and
3505 regset_bitmap fields. New field regs_info.
3506 [HAVE_LINUX_REGSETS] (initialize_regsets_info): Declare.
3507 * i387-fp.c (num_xmm_registers): Delete.
3508 (i387_cache_to_fsave, i387_fsave_to_cache): Adjust find_regno
3509 calls to new interface.
3510 (i387_cache_to_fxsave, i387_cache_to_xsave, i387_fxsave_to_cache)
3511 (i387_xsave_to_cache): Adjust find_regno calls to new interface.
3512 Infer the number of xmm registers from the regcache's target
3513 description.
3514 * i387-fp.h (num_xmm_registers): Delete.
3515 * inferiors.c (add_thread): Don't install the thread's regcache
3516 here.
3517 * proc-service.c (gregset_info): Fetch the current inferior's
3518 regs_info. Adjust to use it.
3519 * regcache.c: Include tdesc.h.
3520 (register_bytes, reg_defs, num_registers)
3521 (gdbserver_expedite_regs): Delete.
3522 (get_thread_regcache): If the thread doesn't have a regcache yet,
3523 create one, instead of aborting gdbserver.
3524 (regcache_invalidate_one): Rename to ...
3525 (regcache_invalidate_thread): ... this.
3526 (regcache_invalidate_one): New.
3527 (regcache_invalidate): Only invalidate registers of the current
3528 process.
3529 (init_register_cache): Add target_desc parameter, and use it.
3530 (new_register_cache): Ditto. Assert the target description has a
3531 non zero registers_size.
3532 (regcache_cpy): Add assertions. Adjust.
3533 (realloc_register_cache, set_register_cache): Delete.
3534 (registers_to_string, registers_from_string): Adjust.
3535 (find_register_by_name, find_regno, find_register_by_number)
3536 (register_cache_size): Add target_desc parameter, and use it.
3537 (free_register_cache_thread, free_register_cache_thread_one)
3538 (regcache_release, register_cache_size): New.
3539 (register_size): Add target_desc parameter, and use it.
3540 (register_data, supply_register, supply_register_zeroed)
3541 (supply_regblock, supply_register_by_name, collect_register)
3542 (collect_register_as_string, collect_register_by_name): Adjust.
3543 * regcache.h (struct target_desc): Forward declare.
3544 (struct regcache) <tdesc>: New field.
3545 (init_register_cache, new_register_cache): Add target_desc
3546 parameter.
3547 (regcache_invalidate_thread): Declare.
3548 (regcache_invalidate_one): Delete declaration.
3549 (regcache_release): Declare.
3550 (find_register_by_number, register_cache_size, register_size)
3551 (find_regno): Add target_desc parameter.
3552 (gdbserver_expedite_regs, gdbserver_xmltarget): Delete
3553 declarations.
3554 * remote-utils.c: Include tdesc.h.
3555 (outreg, prepare_resume_reply): Adjust.
3556 * server.c: Include tdesc.h.
3557 (gdbserver_xmltarget): Delete declaration.
3558 (get_features_xml, process_serial_event): Adjust.
3559 * server.h [IN_PROCESS_AGENT] (struct target_desc): Forward
3560 declare.
3561 (struct process_info) <tdesc>: New field.
3562 (ipa_tdesc): Declare.
3563 * tdesc.c: New file.
3564 * tdesc.h: New file.
3565 * tracepoint.c: Include tdesc.h.
3566 [IN_PROCESS_AGENT] (ipa_tdesc): Define.
3567 (get_context_regcache): Adjust to pass ipa_tdesc down.
3568 (do_action_at_tracepoint): Adjust to get the register cache size
3569 from the context regcache's description.
3570 (traceframe_walk_blocks): Adjust to get the register cache size
3571 from the current trace frame's description.
3572 (traceframe_get_pc): Adjust to get current trace frame's
3573 description and pass it down.
3574 (gdb_collect): Adjust to get the register cache size from the
3575 IPA's description.
3576 * linux-amd64-ipa.c (tdesc_amd64_linux): Declare.
3577 (gdbserver_xmltarget): Delete.
3578 (initialize_low_tracepoint): Set the ipa's target description.
3579 * linux-i386-ipa.c (tdesc_i386_linux): Declare.
3580 (initialize_low_tracepoint): Set the ipa's target description.
3581 * linux-x86-low.c: Include tdesc.h.
3582 [__x86_64__] (is_64bit_tdesc): New.
3583 (ps_get_thread_area, x86_get_thread_area): Use it.
3584 (i386_cannot_store_register): Rename to ...
3585 (x86_cannot_store_register): ... this. Use is_64bit_tdesc.
3586 (i386_cannot_fetch_register): Rename to ...
3587 (x86_cannot_fetch_register): ... this. Use is_64bit_tdesc.
3588 (x86_fill_gregset, x86_store_gregset): Adjust register_size calls
3589 to new interface.
3590 (target_regsets): Rename to ...
3591 (x86_regsets): ... this.
3592 (x86_get_pc, x86_set_pc): Adjust register_size calls to new
3593 interface.
3594 (x86_siginfo_fixup): Use is_64bit_tdesc.
3595 [__x86_64__] (tdesc_amd64_linux, tdesc_amd64_avx_linux)
3596 (tdesc_x32_avx_linux, tdesc_x32_linux)
3597 (tdesc_i386_linux, tdesc_i386_mmx_linux, tdesc_i386_avx_linux):
3598 Declare.
3599 (x86_linux_update_xmltarget): Delete.
3600 (I386_LINUX_XSAVE_XCR0_OFFSET): Define.
3601 (have_ptrace_getfpxregs, have_ptrace_getregset): New.
3602 (AMD64_LINUX_USER64_CS): New.
3603 (x86_linux_read_description): New, based on
3604 x86_linux_update_xmltarget.
3605 (same_process_callback): New.
3606 (x86_arch_setup_process_callback): New.
3607 (x86_linux_update_xmltarget): New.
3608 (x86_regsets_info): New.
3609 (amd64_linux_regs_info): New.
3610 (i386_linux_usrregs_info): New.
3611 (i386_linux_regs_info): New.
3612 (x86_linux_regs_info): New.
3613 (x86_arch_setup): Reimplement.
3614 (x86_install_fast_tracepoint_jump_pad): Use is_64bit_tdesc.
3615 (x86_emit_ops): Ditto.
3616 (the_low_target): Adjust. Install x86_linux_regs_info,
3617 x86_cannot_fetch_register, and x86_cannot_store_register.
3618 (initialize_low_arch): New.
3619 * linux-ia64-low.c (tdesc_ia64): Declare.
3620 (ia64_fetch_register): Adjust.
3621 (ia64_usrregs_info, regs_info): New globals.
3622 (ia64_regs_info): New function.
3623 (the_low_target): Adjust.
3624 (initialize_low_arch): New function.
3625 * linux-sparc-low.c (tdesc_sparc64): Declare.
3626 (sparc_fill_gregset_to_stack, sparc_store_gregset_from_stack):
3627 Adjust.
3628 (sparc_arch_setup): New function.
3629 (sparc_regsets_info, sparc_usrregs_info, regs_info): New globals.
3630 (the_low_target): Adjust.
3631 (initialize_low_arch): New function.
3632 * linux-ppc-low.c (tdesc_powerpc_32l, tdesc_powerpc_altivec32l)
3633 (tdesc_powerpc_cell32l, tdesc_powerpc_vsx32l)
3634 (tdesc_powerpc_isa205_32l, tdesc_powerpc_isa205_altivec32l)
3635 (tdesc_powerpc_isa205_vsx32l, tdesc_powerpc_e500l)
3636 (tdesc_powerpc_64l, tdesc_powerpc_altivec64l)
3637 (tdesc_powerpc_cell64l, tdesc_powerpc_vsx64l)
3638 (tdesc_powerpc_isa205_64l, tdesc_powerpc_isa205_altivec64l)
3639 (tdesc_powerpc_isa205_vsx64l): Declare.
3640 (ppc_cannot_store_register, ppc_collect_ptrace_register)
3641 (ppc_supply_ptrace_register, parse_spufs_run, ppc_get_pc)
3642 (ppc_set_pc, ppc_get_hwcap): Adjust.
3643 (ppc_usrregs_info): Forward declare.
3644 (!__powerpc64__) ppc_regmap_adjusted: New global.
3645 (ppc_arch_setup): Adjust to the current process'es target
3646 description.
3647 (ppc_fill_vsxregset, ppc_store_vsxregset, ppc_fill_vrregset)
3648 (ppc_store_vrregset, ppc_fill_evrregset, ppc_store_evrregse)
3649 (ppc_store_evrregset): Adjust.
3650 (target_regsets): Rename to ...
3651 (ppc_regsets): ... this, and make static.
3652 (ppc_usrregs_info, ppc_regsets_info, regs_info): New globals.
3653 (ppc_regs_info): New function.
3654 (the_low_target): Adjust.
3655 (initialize_low_arch): New function.
3656 * linux-s390-low.c (tdesc_s390_linux32, tdesc_s390_linux32v1)
3657 (tdesc_s390_linux32v2, tdesc_s390_linux64, tdesc_s390_linux64v1)
3658 (tdesc_s390_linux64v2, tdesc_s390x_linux64, tdesc_s390x_linux64v1)
3659 (tdesc_s390x_linux64v2): Declare.
3660 (s390_collect_ptrace_register, s390_supply_ptrace_register)
3661 (s390_fill_gregset, s390_store_last_break): Adjust.
3662 (target_regsets): Rename to ...
3663 (s390_regsets): ... this, and make static.
3664 (s390_get_pc, s390_set_pc): Adjust.
3665 (s390_get_hwcap): New target_desc parameter, and use it.
3666 [__s390x__] (have_hwcap_s390_high_gprs): New global.
3667 (s390_arch_setup): Adjust to set the current process'es target
3668 description. Don't adjust the regmap.
3669 (s390_usrregs_info, s390_regsets_info, regs_info): New globals.
3670 [__s390x__] (s390_usrregs_info_3264, s390_regsets_info_3264)
3671 (regs_info_3264): New globals.
3672 (s390_regs_info): New function.
3673 (the_low_target): Adjust.
3674 (initialize_low_arch): New function.
3675 * linux-mips-low.c (tdesc_mips_linux, tdesc_mips_dsp_linux)
3676 (tdesc_mips64_linux, tdesc_mips64_dsp_linux): Declare.
3677 [__mips64] (init_registers_mips_linux)
3678 (init_registers_mips_dsp_linux): Delete defines.
3679 [__mips64] (tdesc_mips_linux, tdesc_mips_dsp_linux): New defines.
3680 (have_dsp): New global.
3681 (mips_read_description): New, based on mips_arch_setup.
3682 (mips_arch_setup): Reimplement.
3683 (get_usrregs_info): New function.
3684 (mips_cannot_fetch_register, mips_cannot_store_register)
3685 (mips_get_pc, mips_set_pc, mips_fill_gregset, mips_store_gregset)
3686 (mips_fill_fpregset, mips_store_fpregset): Adjust.
3687 (target_regsets): Rename to ...
3688 (mips_regsets): ... this, and make static.
3689 (mips_regsets_info, mips_dsp_usrregs_info, mips_usrregs_info)
3690 (dsp_regs_info, regs_info): New globals.
3691 (mips_regs_info): New function.
3692 (the_low_target): Adjust.
3693 (initialize_low_arch): New function.
3694 * linux-arm-low.c (tdesc_arm, tdesc_arm_with_iwmmxt)
3695 (tdesc_arm_with_vfpv2, tdesc_arm_with_vfpv3, tdesc_arm_with_neon):
3696 Declare.
3697 (arm_fill_vfpregset, arm_store_vfpregset): Adjust.
3698 (arm_read_description): New, with bits factored from
3699 arm_arch_setup.
3700 (arm_arch_setup): Reimplement.
3701 (target_regsets): Rename to ...
3702 (arm_regsets): ... this, and make static.
3703 (arm_regsets_info, arm_usrregs_info, regs_info): New globals.
3704 (arm_regs_info): New function.
3705 (the_low_target): Adjust.
3706 (initialize_low_arch): New function.
3707 * linux-m68k-low.c (tdesc_m68k): Declare.
3708 (target_regsets): Rename to ...
3709 (m68k_regsets): ... this, and make static.
3710 (m68k_regsets_info, m68k_usrregs_info, regs_info): New globals.
3711 (m68k_regs_info): New function.
3712 (m68k_arch_setup): New function.
3713 (the_low_target): Adjust.
3714 (initialize_low_arch): New function.
3715 * linux-sh-low.c (tdesc_sharch): Declare.
3716 (target_regsets): Rename to ...
3717 (sh_regsets): ... this, and make static.
3718 (sh_regsets_info, sh_usrregs_info, regs_info): New globals.
3719 (sh_regs_info, sh_arch_setup): New functions.
3720 (the_low_target): Adjust.
3721 (initialize_low_arch): New function.
3722 * linux-bfin-low.c (tdesc_bfin): Declare.
3723 (bfin_arch_setup): New function.
3724 (bfin_usrregs_info, regs_info): New globals.
3725 (bfin_regs_info): New function.
3726 (the_low_target): Adjust.
3727 (initialize_low_arch): New function.
3728 * linux-cris-low.c (tdesc_cris): Declare.
3729 (cris_arch_setup): New function.
3730 (cris_usrregs_info, regs_info): New globals.
3731 (cris_regs_info): New function.
3732 (the_low_target): Adjust.
3733 (initialize_low_arch): New function.
3734 * linux-cris-low.c (tdesc_crisv32): Declare.
3735 (cris_arch_setup): New function.
3736 (cris_regsets_info, cris_usrregs_info, regs_info): New globals.
3737 (cris_regs_info): New function.
3738 (the_low_target): Adjust.
3739 (initialize_low_arch): New function.
3740 * linux-m32r-low.c (tdesc_m32r): Declare.
3741 (m32r_arch_setup): New function.
3742 (m32r_usrregs_info, regs_info): New globals.
3743 (m32r_regs_info): Adjust.
3744 (initialize_low_arch): New function.
3745 * linux-tic6x-low.c (tdesc_tic6x_c64xp_linux)
3746 (tdesc_tic6x_c64x_linux, tdesc_tic6x_c62x_linux): Declare.
3747 (tic6x_usrregs_info): Forward declare.
3748 (tic6x_read_description): New function, based on ...
3749 (tic6x_arch_setup): ... this. Reimplement.
3750 (target_regsets): Rename to ...
3751 (tic6x_regsets): ... this, and make static.
3752 (tic6x_regsets_info, tic6x_usrregs_info, regs_info): New globals.
3753 (tic6x_regs_info): New function.
3754 (the_low_target): Adjust.
3755 (initialize_low_arch): New function.
3756 * linux-xtensa-low.c (tdesc_xtensa): Declare.
3757 (xtensa_fill_gregset, xtensa_store_gregset): Adjust.
3758 (target_regsets): Rename to ...
3759 (xtensa_regsets): ... this, and make static.
3760 (xtensa_regsets_info, xtensa_usrregs_info, regs_info): New
3761 globals.
3762 (xtensa_arch_setup, xtensa_regs_info): New functions.
3763 (the_low_target): Adjust.
3764 (initialize_low_arch): New function.
3765 * linux-nios2-low.c (tdesc_nios2_linux): Declare.
3766 (nios2_arch_setup): Set the current process'es tdesc.
3767 (target_regsets): Rename to ...
3768 (nios2_regsets): ... this.
3769 (nios2_regsets_info, nios2_usrregs_info, regs_info): New globals.
3770 (nios2_regs_info): New function.
3771 (the_low_target): Adjust.
3772 (initialize_low_arch): New function.
a261b8f5
PA
3773 * linux-aarch64-low.c (tdesc_aarch64): Declare.
3774 (aarch64_arch_setup): Set the current process'es tdesc.
3775 (target_regsets): Rename to ...
3776 (aarch64_regsets): ... this.
3777 (aarch64_regsets_info, aarch64_usrregs_info, regs_info): New globals.
3778 (aarch64_regs_info): New function.
3779 (the_low_target): Adjust.
3780 (initialize_low_arch): New function.
3aee8918
PA
3781 * linux-tile-low.c (tdesc_tilegx, tdesc_tilegx32): Declare
3782 globals.
3783 (target_regsets): Rename to ...
3784 (tile_regsets): ... this.
3785 (tile_regsets_info, tile_usrregs_info, regs_info): New globals.
3786 (tile_regs_info): New function.
3787 (tile_arch_setup): Set the current process'es tdesc.
3788 (the_low_target): Adjust.
3789 (initialize_low_arch): New function.
3790 * spu-low.c (tdesc_spu): Declare.
3791 (spu_create_inferior, spu_attach): Set the new process'es tdesc.
3792 * win32-arm-low.c (tdesc_arm): Declare.
3793 (arm_arch_setup): New function.
3794 (the_low_target): Install arm_arch_setup instead of
3795 init_registers_arm.
3796 * win32-i386-low.c (tdesc_i386, tdesc_amd64): Declare.
3797 (init_windows_x86): Rename to ...
3798 (i386_arch_setup): ... this. Set `win32_tdesc'.
3799 (the_low_target): Adjust.
3800 * win32-low.c (win32_tdesc): New global.
3801 (child_add_thread): Don't create the thread cache here.
3802 (do_initial_child_stuff): Set the new process'es tdesc.
3803 * win32-low.h (struct target_desc): Forward declare.
3804 (win32_tdesc): Declare.
3805 * lynx-i386-low.c (tdesc_i386): Declare global.
3806 (lynx_i386_arch_setup): Set `lynx_tdesc'.
3807 * lynx-low.c (lynx_tdesc): New global.
3808 (lynx_add_process): Set the new process'es tdesc.
3809 * lynx-low.h (struct target_desc): Forward declare.
3810 (lynx_tdesc): Declare global.
3811 * lynx-ppc-low.c (tdesc_powerpc_32): Declare global.
3812 (lynx_ppc_arch_setup): Set `lynx_tdesc'.
3813 * nto-low.c (nto_tdesc): New global.
3814 (do_attach): Set the new process'es tdesc.
3815 * nto-low.h (struct target_desc): Forward declare.
3816 (nto_tdesc): Declare.
3817 * nto-x86-low.c (tdesc_i386): Declare.
3818 (nto_x86_arch_setup): Set `nto_tdesc'.
3819
b1fbec62
GB
38202013-06-04 Gary Benson <gbenson@redhat.com>
3821
3822 * server.c (handle_query): Add "augmented-libraries-svr4-read+"
3823 to qSupported response when appropriate.
3824 (handle_qxfer_libraries_svr4): Allow qXfer:libraries-svr4:read
3825 with nonzero-length annex.
3826 * linux-low.c (linux_qxfer_libraries_svr4): Parse and handle
3827 arguments supplied in annex.
3828
d1ec4ce7
DE
38292013-05-31 Doug Evans <dje@google.com>
3830
ac44adcb 3831 PR server/15594
d1ec4ce7
DE
3832 * linux-x86-low.c (ps_get_thread_area): Properly extend address to
3833 64 bits in 64-cross-32 environment.
3834
9b25f2d3
PA
38352013-05-28 Pedro Alves <palves@redhat.com>
3836
3837 * Makefile.in (clean): Remove reference to aarch64-without-fpu.c.
3838 (aarch64-without-fpu.c): Delete rule.
3839 * configure.srv (aarch64*-*-linux*): Remove references to
3840 aarch64-without-fpu.o and aarch64-without-fpu.xml.
3841 * linux-aarch64-low.c (init_registers_aarch64_without_fpu): Remove
3842 declaration.
3843
6740dc9c
PA
38442013-05-24 Pedro Alves <palves@redhat.com>
3845
3846 * server.c (handle_v_cont) <vCont;r>: Use unpack_varlen_hex
3847 instead of strchr/decode_address. Error if the range isn't split
3848 with a ','. Don't assume there's be a ':' in the action.
3849
c2d6af84
PA
38502013-05-23 Yao Qi <yao@codesourcery.com>
3851 Pedro Alves <palves@redhat.com>
3852
3853 * linux-low.c (lwp_in_step_range): New function.
3854 (linux_wait_1): If the thread was range stepping and stopped
3855 outside the stepping range, report the stop to GDB. Otherwise,
3856 continue stepping. Add range stepping debug output.
3857 (linux_set_resume_request): Copy the step range from the resume
3858 request to the lwp.
3859 (linux_supports_range_stepping): New.
3860 (linux_target_ops) <supports_range_stepping>: Set to
3861 linux_supports_range_stepping.
3862 * linux-low.h (struct linux_target_ops)
3863 <supports_range_stepping>: New field.
3864 (struct lwp_info) <step_range_start, step_range_end>: New fields.
3865 * linux-x86-low.c (x86_supports_range_stepping): New.
3866 (the_low_target) <supports_range_stepping>: Set to
3867 x86_supports_range_stepping.
3868 * server.c (handle_v_cont): Handle 'r' action.
3869 (handle_v_requests): Append ";r" if the target supports range
3870 stepping.
3871 * target.h (struct thread_resume) <step_range_start,
3872 step_range_end>: New fields.
3873 (struct target_ops) <supports_range_stepping>:
3874 New field.
3875 (target_supports_range_stepping): New macro.
3876
58794e1a
JB
38772013-05-17 Joel Brobecker <brobecker@adacore.com>
3878
3879 * lynx-low.c (lynx_resume): Fix null_ptid/minus_one_ptid
3880 confusion in comment.
3881
d631c5a7
JB
38822013-05-17 Joel Brobecker <brobecker@adacore.com>
3883
3884 * lynx-low.c (struct process_info_private): New type.
3885 (lynx_add_process): New function.
3886 (lynx_create_inferior, lynx_attach): Replace calls to
3887 add_process by calls to lynx_add_process.
3888 (lynx_resume): If PTID is null, then try using
3889 current_process()->private->last_wait_event_ptid.
3890 Add comments.
3891 (lynx_clear_inferiors): Delete. The contents of that function
3892 has been inlined in lynx_mourn;
3893 (lynx_wait_1): Save the ptid in the process's private data.
3894 (lynx_mourn): Free the process' private data. Replace call
3895 to lynx_clear_inferiors by call to clear_inferiors.
3896
96f7a20f
YQ
38972013-05-17 Yao Qi <yao@codesourcery.com>
3898
3899 * i386-low.c (i386_length_and_rw_bits): Move the comment to
3900 the right place.
3901
db0dfaa0
LM
39022013-05-16 Luis Machado <lgustavo@codesourcery.com>
3903
3904 * linux-low.c: Move definition checks upwards for PT_TEXT_ADDR,
3905 PT_DATA_ADDR and PT_TEXT_END_ADDR. Update comments.
3906 (linux_read_offsets): Remove PT_TEXT_ADDR, PT_DATA_ADDR and
3907 PT_TEXT_END_ADDR guards. Update comments.
3908 (linux_target_op) <read_offsets>: Conditionally define to
3909 linux_read_offsets if the target is UCLIBC and if it defines
3910 PT_TEXT_ADDR, PT_DATA_ADDR and PT_TEXT_END_ADDR.
3911
68f5f838
SL
39122013-05-06 Sandra Loosemore <sandra@codesourcery.com>
3913 Andrew Jenner <andrew@codesourcery.com>
3914
3915 * Makefile.in (SFILES): Add linux-nios2-low.c.
3916 (clean): Add action to delete nios2-linux.c.
3917 (nios2-linux.c): New rule.
3918 * configure.srv: Add nios2*-*-linux*.
3919 * linux-nios2-low.c: New.
3920
1ebff1fd
HAQ
39212013-05-03 Hafiz Abid Qadeer <abidh@codesourcery.com>
3922
3923 * tracepoint.c (cmd_qtinit): Call 'stop_tracing'.
3924
f6150862
HZ
39252013-04-25 Hui Zhu <hui@codesourcery.com>
3926
3927 PR gdb/15186
f6150862
HZ
3928 * ax.c (ax_printf): Add fflush.
3929
614c279d
TT
39302013-04-22 Tom Tromey <tromey@redhat.com>
3931
3932 * Makefile.in (SFILES): Add filestuff.c.
3933 (OBS): Add filestuff.o.
3934 (filestuff.o): New target.
3935 * config.in, configure: Rebuild.
3936 * configure.ac: Check for fdwalk, pipe2.
3937
7d4e5717
PA
39382013-04-17 Pedro Alves <palves@redhat.com>
3939
3940 * configure.ac (USE_THREAD_DB): Delete variable.
3941 (if test "$srv_linux_thread_db" = "yes"): AC_DEFINE USE_THREAD_DB.
3942 Don't AC_SUBST USE_THREAD_DB.
3943 * Makefile.in (INTERNAL_CFLAGS): Remove @USE_THREAD_DB@.
3944 * config.in, configure: Regenerate.
3945
d5c93e41
PA
39462013-04-16 Pedro Alves <palves@redhat.com>
3947
3948 * linux-low.h (struct lwp_info) <thread_known>: Move under
3949 the USE_THREAD_DB #ifdef.
3950
04f5fe89
PA
39512013-04-16 Pedro Alves <palves@redhat.com>
3952
3953 * Makefile.in (INTERNAL_CFLAGS): Add @USE_THREAD_DB@.
3954 (linux-low.o): Delete rule.
3955 * linux-low.h: Always include "gdb_thread_db.h" instead of
3956 conditionally including thread_db.h.
3957 (struct lwp_info) <th>: Guard with #ifdef USE_THREAD_DB instead of
3958 HAVE_THREAD_DB_H.
3959
480b27bf
JK
39602013-04-07 Jan Kratochvil <jan.kratochvil@redhat.com>
3961
3962 * Makefile.in (install-only): Fix make install regression.
3963
43662968
JK
39642013-04-05 Jan Kratochvil <jan.kratochvil@redhat.com>
3965
3966 Convert man pages to texinfo, new gdbinit.5 texinfo page.
3967 * Makefile.in (install-only): Remove $(man1dir) and gdbserver.1
3968 installation.
3969 * gdbserver.1: Remove.
3970
3e74e146
PA
39712013-03-22 Pedro Alves <palves@redhat.com>
3972
3973 * linux-low.c (handle_extended_wait): Don't call
3974 linux_enable_event_reporting.
3975
a8347a2a
TT
39762013-03-15 Tony Theodore <tonyt@logyst.com>
3977
3978 PR build/9098:
3979 * Makefile.in (SHELL): Use @SHELL@.
3980
eeb56fa7
SDJ
39812013-03-14 Sergio Durigan Junior <sergiodj@redhat.com>
3982
3983 * tracepoint.c (cmd_qtv): Initialize `val' with zero, silencing
3984 compiler warning.
3985
4fa7e2ff
JB
39862013-03-13 Joel Brobecker <brobecker@adacore.com>
3987
3988 * linux-low.c (linux_target_ops) [!HAVE_LINUX_BTRACE]:
3989 Remove extraneous NULL element.
3990
8ddb1965
YQ
39912013-03-13 Yao Qi <yao@codesourcery.com>
3992
3993 * tracepoint.c (traceframe_read_tsv): Look for the last matched
3994 'V' block in trace frame.
3995
9accd112
MM
39962013-03-11 Markus Metzger <markus.t.metzger@intel.com>
3997
3998 * target.h (struct target_ops): Add btrace ops.
3999 (target_supports_btrace): New macro.
4000 (target_enable_btrace): New macro.
4001 (target_disable_btrace): New macro.
4002 (target_read_btrace): New macro.
4003 * gdbthread.h (struct thread_info): Add btrace field.
4004 * server.c: Include btrace-common.h.
4005 (handle_btrace_general_set): New function.
4006 (handle_btrace_enable): New function.
4007 (handle_btrace_disable): New function.
4008 (handle_general_set): Call handle_btrace_general_set.
4009 (handle_qxfer_btrace): New function.
4010 (struct qxfer qxfer_packets[]): Add btrace entry.
4011 * inferiors.c (remove_thread): Disable btrace.
4012 * linux-low: Include linux-btrace.h.
4013 (linux_low_enable_btrace): New function.
4014 (linux_low_read_btrace): New function.
4015 (linux_target_ops): Add btrace ops.
4016 * configure.srv (i[34567]86-*-linux*): Add linux-btrace.o.
4017 Add srv_linux_btrace=yes.
4018 (x86_64-*-linux*): Add linux-btrace.o.
4019 Add srv_linux_btrace=yes.
4020 * configure.ac: Define HAVE_LINUX_BTRACE.
4021 * config.in: Regenerated.
4022 * configure: Regenerated.
4023
5cc22e4c
MM
40242013-03-11 Markus Metzger <markus.t.metzger@intel.com>
4025
4026 * server.c (handle_qxfer): Preserve error message if -3 is
4027 returned.
4028 (qxfer): Document the -3 return value.
4029
7c97f91e
MM
40302013-03-11 Markus Metzger <markus.t.metzger@intel.com>
4031
4032 * Makefile.in (SFILES): Add $(srcdir)/common/linux-btrace.c.
4033 (linux_btrace_h): New variable.
4034 (linux-btrace.o): New rule.
4035
be9a119c 40362013-03-08 Stan Shebs <stan@codesourcery.com>
f6f899bf
HAQ
4037 Hafiz Abid Qadeer <abidh@codesourcery.com>
4038
4039 * tracepoint.c (trace_buffer_size): New global.
4040 (DEFAULT_TRACE_BUFFER_SIZE): New define.
4041 (init_trace_buffer): Change to one-argument function. Allocate
4042 trace buffer memory.
4043 (handle_tracepoint_general_set): Call cmd_bigqtbuffer_size to
4044 handle QTBuffer:size packet.
4045 (cmd_bigqtbuffer_size): New function.
4046 (initialize_tracepoint): Call init_trace_buffer with
4047 DEFAULT_TRACE_BUFFER_SIZE.
4048 * server.c (handle_query): Add QTBuffer:size in the
4049 supported packets.
4050
e64f7499
YQ
40512013-03-07 Yao Qi <yao@codesourcery.com>
4052
4053 * tracepoint.c (cur_action, cur_step_action): Make them unsigned.
4054 (cmd_qtfp): Initialize cur_action and cur_step_action 0 instead
4055 of -1.
4056 (cmd_qtsp): Adjust condition. Do post increment.
4057 Set cur_action and cur_step_action back to 0.
4058
f0ae6fc3
PA
40592013-03-07 Jeremy Bennett <jeremy.bennett@embecosm.com>
4060
4061 PR server/15236
4062 * linux-low.c (linux_write_memory): Return early success if LEN is
4063 zero.
4064
b5b0b0af
CV
40652013-03-05 Corinna Vinschen <vinschen@redhat.de>
4066
334ad4a8 4067 * configure.srv: Add x86_64-*-cygwin* as target.
b5b0b0af 4068
589bc927
TT
40692013-02-28 Tom Tromey <tromey@redhat.com>
4070
4071 * configure.ac: Invoke AC_SYS_LARGEFILE.
4072 * configure, config.in: Rebuild.
4073
dfe07582
CV
40742013-02-28 Corinna Vinschen <vinschen@redhat.com>
4075
4076 * win32-low.c: Throughout, fix format strings and casts of
4077 printf-like functions to avoid type related warnings on all
4078 platforms.
4079 (get_child_debug_event): Print dwDebugEventCode as hex since
4080 that's how it's usually documented.
4081
736cd585
YQ
40822013-02-28 Yao Qi <yao@codesourcery.com>
4083
4084 * tracepoint.c (cmd_qtbuffer): Call phex_nz instead of
4085 pulongest.
4086
e1f58301
JW
40872013-02-27 Jiong Wang <jiwang@tilera.com>
4088
4089 * Makefile.in (clean): Remove reg-tilegx.c, reg-tilegx32.c.
4090 (reg-tilegx32.c): New rule.
4091 * configure.srv (tilegx-*-linux*): Add reg-tilegx32.o to srv_regobj.
4092 * linux-tile-low.c (tile_arch_setup): New function. Invoke
4093 different register info initializer according to elf class.
4094 (init_registers_tilgx32): New function. The tilegx32 register info
4095 initializer.
4096 (tile_fill_gregset): Use "uint_reg_t" to represent register size.
4097 (tile_store_gregset): Likewise.
4098
d171ca78
YQ
40992013-02-27 Yao Qi <yao@codesourcery.com>
4100
4101 * server.c (process_point_options): Print debug message when
4102 debug_threads is true.
4103
282bbdf3
YQ
41042013-02-26 Yao Qi <yao@codesourcery.com>
4105
4106 * tracepoint.c (cmd_qtbuffer): Don't set '\0' in OWN_BUF.
4107
aca22551
PA
41082013-02-19 Pedro Alves <palves@redhat.com>
4109 Kai Tietz <ktietz@redhat.com>
4110
4111 PR gdb/15161
4112
4113 * server.c (handle_query) <CRC check>: Use unpack_varlen_hex
4114 instead of strtoul to extract address from packet.
4115 (process_serial_event) <'z'>: Likewise.
4116
4f3cee1c
YQ
41172013-02-18 Yao Qi <yao@codesourcery.com>
4118
4119 * linux-bfin-low.c (the_low_target): Use NULL instead of 0.
4120
8e1d55a3
PA
41212013-02-14 Pedro Alves <palves@redhat.com>
4122
4123 Plug memory leak.
4124
4125 * tracepoint.c (cmd_qtnotes): Free TRACING_USER_NAME,
4126 TRACING_NOTES and TRACING_STOP_NOTE before clobbering.
4127
458820da
PA
41282013-02-14 Pedro Alves <palves@redhat.com>
4129
4130 * tracepoint.c (cmd_qtdpsrc): Use savestring.
4131
baea0dae
PA
41322013-02-14 Pedro Alves <palves@redhat.com>
4133
4134 * tracepoint.c (save_string): Delete.
4135 (add_tracepoint_action): Use savestring instead of save_string.
4136
0b1afbb3
PA
41372013-02-12 Pedro Alves <palves@redhat.com>
4138
4139 * linux-xtensa-low.c: Ditto.
4140 * xtensa-xtregs.c: Ditto.
4141
8a4ac37e
PA
41422013-02-12 Sanimir Agovic <sanimir.agovic@intel.com>
4143
4144 * thread-db.c (thread_db_get_tls_address): NULL pointer check
4145 thread_db.
4146
148de6bb
MS
41472013-02-07 Marcus Shawcroft <marcus.shawcroft@arm.com>
4148
4149 * linux-aarch64-low.c (aarch64_arch_setup): Clamp
4150 aarch64_num_wp_regs and aarch64_num_bp_regs to
4151 AARCH64_HWP_MAX_NUM and AARCH64_HBP_MAX_NUM respectively.
4152
55fac6e0
MS
41532013-02-07 Marcus Shawcroft <marcus.shawcroft@arm.com>
4154
4155 * linux-aarch64-low.c (ps_get_thread_area): Replace
4156 PTRACE_GET_THREAD_AREA with PTRACE_GETREGSET.
4157
176eb98c
MS
41582013-02-04 Jim MacArthur <jim.macarthur@arm.com>
4159 Marcus Shawcroft <marcus.shawcroft@arm.com>
4160 Nigel Stephens <nigel.stephens@arm.com>
4161 Yufeng Zhang <yufeng.zhang@arm.com>
4162
4163 * Makefile.in (clean): Remove aarch64.c and aarch64-without-fpu.c.
4164 (aarch64.c, aarch64-without-fpu.c): New targets.
4165 * configure.srv (aarch64*-*-linux*): New.
4166 * linux-aarch64-low.c: New file.
4167
56f7af9c
MS
41682013-02-04 Marcus Shawcroft <marcus.shawcroft@arm.com>
4169
43aaf8b6 4170 * linux-low.c (handle_extended_wait, linux_create_inferior)
56f7af9c
MS
4171 (linux_attach_lwp_1, linux_kill_one_lwp, linux_attach_one_lwp)
4172 (dequeue_one_deferred_signal, linux_resume_one_thread)
4173 (fetch_register, linux_write_memory, linux_enable_event_reporting)
4174 (linux_tracefork_grandchild, linux_test_for_tracefork)
4175 (linux_read_offsets, linux_xfer_siginfo, linux_xfer_siginfo): Add
4176 PTRACE_ARG3_TYPE and PTRACE_ARG4_TYPE cast to ptrace arguments
4177 where the argument is 0.
4178
60f662b0
YQ
41792013-01-25 Yao Qi <yao@codesourcery.com>
4180
4181 * event-loop.c: Include "queue.h".
4182 (gdb_event_p): New typedef.
4183 (struct gdb_event) <next_event>: Remove.
4184 (event_queue): Change to QUEUE(gdb_event_p).
4185 (async_queue_event): Remove.
4186 (gdb_event_xfree): New.
4187 (initialize_event_loop): New.
4188 (process_event): Use API from QUEUE.
4189 (wait_for_event): Likewise.
4190 * server.c (main): Call initialize_event_loop.
4191 * server.h (initialize_event_loop): Declare.
4192
5ae4861a
YQ
41932013-01-18 Yao Qi <yao@codesourcery.com>
4194
4195 * ax.h (struct eval_agent_expr_context): New.
4196 (gdb_eval_agent_expr): Update declaration.
4197 * ax.c (gdb_eval_agent_expr): Remove argument REGCACHE and
4198 TFRAME. Add new argument CTX.
4199 * server.h (struct eval_agent_expr_context): Declare.
4200 (agent_mem_read, agent_tsv_read): Update declaration.
4201 (agent_mem_read_string): Likewise.
4202 * tracepoint.c (eval_tracepoint_agent_expr): Remove.
4203 (add_traceframe_block): Add new argument TPOINT.
4204 Increase TPOINT->traceframe_usage.
4205 (do_action_at_tracepoint): Call gdb_eval_agent_expr instead of
4206 eval_tracepoint_agent_expr.
4207 (condition_true_at_tracepoint): Likewise.
4208 (agent_mem_read): Remove argument TFRAME. Add argument CTX.
4209 (agent_mem_read_string, agent_tsv_read): Likewise.
4210
85e00e85
YQ
42112013-01-16 Yao Qi <yao@codesourcery.com>
4212
4213 * linux-low.c (linux_resume_one_lwp): Don't check
4214 'lwp->bp_reinsert != 0'.
4215
4039cf45
JB
42162013-01-07 Joel Brobecker <brobecker@adacore.com>
4217 Pedro Alves <palves@redhat.com>
4218
4219 * lynx-low.c (ptrace_request_to_str): Define a temporary
4220 macro and use it to simplify this function's implementation.
4221
9044dee2
JB
42222013-01-07 Joel Brobecker <brobecker@adacore.com>
4223
4224 * lynx-low.c (lynx_resume): Call perror_with_name if lynx_ptrace
4225 sets errno.
4226
e6352c8f
JB
42272013-01-07 Joel Brobecker <brobecker@adacore.com>
4228
4229 * configure.srv (i[34567]86-*-lynxos*): Set srv_xmlfiles.
4230
50681a27
JB
42312013-01-07 Joel Brobecker <brobecker@adacore.com>
4232
4233 * configure.srv (powerpc-*-lynxos*): Set srv_xmlfiles.
4234
3f6e77ef
JB
42352013-01-07 Joel Brobecker <brobecker@adacore.com>
4236
4237 * lynx-low.c (lynx_resume): Use the resume_info parameter
4238 to determine the ptid for the lynx_ptrace call, unless
4239 it is equal to minus_one_ptid, in which case we use the
4240 ptid of the current_inferior.
4241 (lynx_wait_1): After having received a thread create/exit
4242 event, resume the inferior's execution using the signaling
4243 thread's ptid, rather than the old ptid.
4244
7fda33ae
JB
42452013-01-07 Joel Brobecker <brobecker@adacore.com>
4246
4247 * lynx-low.c (lynx_resume): Delete variable ret.
4248
b9786c74
JB
42492013-01-01 Joel Brobecker <brobecker@adacore.com>
4250
4251 * gdbreplay.c (gdbreplay_version): Update copyright year.
4252 * server.c (gdbserver_version): Likewise.
4253
8b93d60f
JB
42542012-12-17 Joel Brobecker <brobecker@adacore.com>
4255
4256 * lynx-low.c (lynx_wait_1): Add debug trace before adding
4257 new thread.
4258
037335a7
JB
42592012-12-17 Joel Brobecker <brobecker@adacore.com>
4260
4261 * lynx-low.c (ptrace_request_to_str): Add handling for
4262 PTRACE_GETTRACESIG.
4263
52d4cbd8
JB
42642012-12-17 Joel Brobecker <brobecker@adacore.com>
4265
4266 * lynx-low.c (lynx_attach): Delete variable new_process.
4267
ab8f6ca9
JB
42682012-12-17 Joel Brobecker <brobecker@adacore.com>
4269
4270 * lynx-low.c (lynx_create_inferior): Delete variable
4271 new_process.
4272
78cbc024
JB
42732012-12-17 Joel Brobecker <brobecker@adacore.com>
4274
4275 * lynx-low.c (ptrace_request_to_str): Do not handle
4276 PTRACE_GETTHREADLIST if this macro does not exist.
4277
14a00470
YQ
42782012-12-15 Yao Qi <yao@codesourcery.com>
4279
4280 * Makefile.in (OBS): Add notif.o.
4281 * notif.c, notif.h: New.
4282 * server.c: Include "notif.h".
4283 (struct vstop_notif) <next>: Remove.
4284 <base>: New field.
4285 (queue_stop_reply): Update.
4286 (push_event, send_next_stop_reply): Remove.
4287 (discard_queued_stop_replies): Update.
4288 (notif_stop): New variable.
4289 (handle_v_stopped): Remove.
4290 (handle_v_requests): Don't call handle_v_stopped. Call
4291 handle_ack_notif instead.
4292 (queue_stop_reply_callback): Call notif_event_enque instead
4293 of queue_stop_reply.
4294 (handle_status): Don't call send_next_stop_reply, call
4295 notif_write_event instead.
4296 (kill_inferior_callback): Likewise.
4297 (detach_or_kill_inferior_callback): Likewise.
4298 (main): Call initialize_notif.
4299 (process_serial_event): Call QUEUE_is_empty.
4300 (handle_target_event): Call notif_push instead of push event.
4301 * server.h (push_event): Remove declaration.
4302
61c125b9
TT
43032012-12-10 Tom Tromey <tromey@redhat.com>
4304
4305 * Makefile.in (DEPMODE, DEPDIR, depcomp, COMPILE.pre)
4306 (COMPILE.post, COMPILE, POSTCOMPILE, IPAGENT_COMPILE): New
4307 macros.
4308 (.c.o): Rewrite.
4309 (ax-ipa.o, tracepoint-ipa.o, utils-ipa.o, format-ipa.o)
4310 (common-utils-ipa.o, remote-utils-ipa.o, regcache-ipa.o)
4311 (i386-linux-ipa.o, linux-i386-ipa.o, linux-amd64-ipa.o)
4312 (amd64-linux-ipa.o, ax.o): Rewrite.
4313 (event-loop.o, hostio.o, hostio-errno.o, inferiors.o, mem-break.o)
4314 (proc-service.o, regcache.o, remote-utils.o, server.o, target.o)
4315 (thread-db.o, tracepoint.o, utils.o, gdbreplay.o, dll.o): Remove.
4316 (signals.o, linux-procfs.o, linux-ptrace.o, common-utils.o, vec.o)
4317 (gdb_vecs.o, xml-utils.o, linux-osdata.o, ptid.o, buffer.o)
4318 (format.o, agent.o, vasprintf.o, vsnprintf.o): Rewrite.
4319 (i386-low.o, i387-fp.o, linux-low.o, linux-arm-low.o)
4320 (linux-bfin-low.o, linux-cris-low.o, linux-crisv32-low.o)
4321 (linux-ia64-low.o, linux-m32r-low.o, linux-mips-low.o)
4322 (linux-ppc-low.o, linux-s390-low.o, linux-sh-low.o)
4323 (linux-tic6x-low.o, linux-x86-low.o, linux-xtensa-low.o)
4324 (linux-tile-low.o, lynx-low.o, lynx-ppc-low.o, nto-low.o)
4325 (nto-x86-low.o, linux-low.o, win32-low.o, win32-arm-low.o)
4326 (win32-i386-low.o, spu-low.o, reg-arm.o, arm-with-iwmmxt.o)
4327 (arm-with-vfpv2.o, arm-with-vfpv3.o, arm-with-neon.o, reg-bfin.o)
4328 (reg-cris.o, reg-crisv32.o, i386.o, i386-linux.o, i386-avx.o)
4329 (i386-avx-linux.o, i386-mmx.o, i386-mmx-linux.o, reg-ia64.o)
4330 (reg-m32r.o, reg-m68k.o, reg-cf.o, mips-linux.o, mips-dsp-linux.o)
4331 (mips64-linux.o, mips64-dsp-linux.o, powerpc-32.o, powerpc-32l.o)
4332 (powerpc-altivec32l.o, powerpc-cell32l.o, powerpc-vsx32l.o)
4333 (powerpc-isa205-32l.o, powerpc-isa205-altivec32l.o)
4334 (powerpc-isa205-vsx32l.o, powerpc-e500l.o, powerpc-64l.o)
4335 (powerpc-altivec64l.o, powerpc-cell64l.o, powerpc-vsx64l.o)
4336 (powerpc-isa205-64l.o, powerpc-isa205-altivec64l.o)
4337 (powerpc-isa205-vsx64l.o, s390-linux32.o, s390-linux32v1.o)
4338 (s390-linux32v2.o, s390-linux64.o, s390-linux64v1.o)
4339 (s390-linux64v2.o, s390x-linux64.o, s390x-linux64v1.o)
4340 (s390x-linux64v2.o, tic6x-c64xp-linux.o, tic6x-c64x-linux.o)
4341 (tic6x-c62x-linux.o, reg-sh.o, reg-sparc64.o, reg-spu.o, amd64.o)
4342 (amd64-linux.o, amd64-avx.o, amd64-avx-linux.o, x32.o)
4343 (x32-linux.o, x32-avx.o, x32-avx-linux.o, reg-xtensa.o)
4344 (reg-tilegx.o): Remove.
4345 (all_object_files): New macro.
4346 Include .deps files.
4347 * aclocal.m4, configure: Rebuild.
4348 * acinclude.m4: Include depstand.m4, lead-dot.m4.
4349 * configure.ac: Invoke ZW_CREATE_DEPDIR,
4350 ZW_PROG_COMPILER_DEPENDENCIES. Compute GMAKE condition.
4351
e90e9ad9
TT
43522012-12-05 Tom Tromey <tromey@redhat.com>
4353
4354 PR gdb/14917:
4355 * server.h (current_insn_ptr, emit_error): Declare 'extern'.
4356
02d403bf 43572012-11-28 Markus Metzger <markus.t.metzger@intel.com>
945bf713
MM
4358
4359 * configure.ac: Check for linux/perf_event.h.
4360 * config.in: Regenerated.
4361 * configure: Regenerated.
4362
0270a750
PA
43632012-11-26 Maxime Villard <rustyBSD@gmx.fr>
4364
4365 * hostio.c (handle_readlink): Decrease buffer size
4366 parameter passed to readlink by one byte.
4367
8c29b58e
YQ
43682012-11-26 Yao Qi <yao@codesourcery.com>
4369
4370 * configure.ac (build_warnings): Append '-Wempty-body'.
4371 * configure: Regenerated.
4372 * linux-low.c (linux_create_inferior): Use braces for empty 'if'
4373 body.
4374
8bdce1ff
PM
43752012-11-15 Pierre Muller <muller@sourceware.org>
4376
4377 * configure.ac (AC_CHECK_HEADERS): Add wait.h header.
4378 * config.in: Regenerate.
4379 * configure: Regenerate.
4380 * linux-low.c: Use "gdb_stat.h" header instead of <sys/stat.h> header.
4381 Use "gdb_wait.h" header instead of <sys/wait.h> header.
4382 * lynx-low.c: Use "gdb_wait.h" header instead of <sys/wait.h> header.
4383 * remote-utils.c: Use "gdb_stat.h" header instead of <sys/stat.h>
4384 header.
4385 * server.c: Remove HAVE_WAIT_H conditional. Use "gdb_wait.h" header
4386 instead of <sys/wait.h> header.
4387 * spu-low.c: Use "gdb_wait.h" header instead of <sys/wait.h> header.
4388
02d403bf 43892012-11-13 Markus Metzger <markus.t.metzger@intel.com>
3ba6ad0f
MM
4390
4391 * Makefile.in: (INTERNAL_CFLAGS): Add -DGDBSERVER
4392 (various make rules): Remove -DGDBSERVER
4393
fbd5db48
YQ
43942012-11-09 Yao Qi <yao@codesourcery.com>
4395
4396 * spu-low.c (current_ptid): Move it to ..
4397 * gdbthread.h: ... here. New.
4398 * remote-utils.c (read_ptid): Use macro 'current_ptid'.
4399 * server.c (myresume, process_serial_event): Likewise.
4400 * thread-db.c (thread_db_find_new_threads): Likewise.
4401 * tracepoint.c (run_inferior_command): Likewise.
4402
b3dc46ff
AB
44032012-10-01 Andrew Burgess <aburgess@broadcom.com>
4404
4405 * server.c (handle_search_memory_1): Include access length in
4406 warning message.
4407
07c04788
HPN
44082012-09-05 Michael Brandt <michael.brandt@axis.com>
4409
4410 * linux-crisv32-low.c: Fix compile errors.
4411
918d227b
YQ
44122012-09-04 Yao Qi <yao@codesourcery.com>
4413
4414 * tracepoint.c (cmd_qtsv): Adjust debug message.
4415 Don't check CUR_TPOINT.
4416
18c1b81a
YQ
44172012-08-28 Yao Qi <yao@codesourcery.com>
4418
4419 * ax.c, tracepoint.c: Replace ATTR_FORMAT with ATTRIBUTE_PRINTF.
4420 * server.h: Include 'libiberty.h' and 'ansidecl.h'.
4421 (ATTR_NORETURN, ATTR_FORMAT, ATTR_MALLOC): Remove.
4422 Remove declarations of xmalloc, xreallloc, xstrdup and
4423 freeargv.
4424 * Makefile.in (libiberty_h): New.
4425 (server_h): Append dependencies 'libiberty.h' and 'ansidecl.h'.
4426 (linux-bfin-low.o): Append dependency 'libiberty.h'.
4427
dc82f37b
YQ
44282012-08-23 Yao Qi <yao@codesourcery.com>
4429
4430 * server.h: Remove declaration of 'xsnprintf'.
4431
406b1477
KS
44322012-08-22 Keith Seitz <keiths@redhat.com>
4433
4434 * server.h: Include build-gnulib-gbserver/config.h.
4435 * gdbreplay.c: Likewise.
4436
e6712ff1
DE
44372012-08-08 Doug Evans <dje@google.com>
4438
4439 * Makefile.in (SFILES): Add gdb_vecs.c.
4440 (OBS): Add gdb_vecs.o.
4441 (gdb_vecs_h, host_defs_h): New variables.
4442 (thread-db.o): Add $(gdb_vecs_h) dependency.
4443 (gdb_vecs.o): New rule.
4444 * thread-db.c: #include "gdb_vecs.h".
4445 (thread_db_load_search): Use a vector to iterate over path elements.
4446 Handle text appearing after "$pdir".
4447
4448 * configure.ac: Add check for strstr.
4449 * config.in: Regenerate.
4450 * configure: Regenerate.
4451
7c3270ae
UW
44522012-08-02 Ulrich Weigand <ulrich.weigand@linaro.org>
4453
4454 * hostio.c (handle_pread): If pread fails, fall back to attempting
4455 lseek/read.
4456 (handle_pwrite): Likewise for pwrite.
4457
b62e2b27
UW
44582012-08-01 Ulrich Weigand <ulrich.weigand@linaro.org>
4459
4460 * linux-arm-low.c (arm_linux_hw_point_initialize): Distinguish
4461 between unsupported TYPE and unimplementable ADDR/LEN combination.
4462 (arm_insert_point): Act on new return value.
4463
78a99e91
PA
44642012-07-31 Pedro Alves <palves@redhat.com>
4465
4466 * server.c (process_point_options): Only skip tokens if we find
4467 one that is unrecognized. Don't treat 'X' specially while
4468 skipping unrecognized tokens.
4469
fcf303ab
UW
44702012-07-30 Ulrich Weigand <ulrich.weigand@linaro.org>
4471
4472 * linux-arm-low.c (arm_linux_hw_point_initialize): Do not attempt
4473 to 4-byte-align HW breakpoint addresses for Thumb.
4474
7255706c
YQ
44752012-07-27 Yao Qi <yao@codesourcery.com>
4476
4477 PR remote/14161.
4478
4479 * server.h: Declare gdb_agent_about_to_close.
4480 * target.c (kill_inferior): Include "agent.h".
4481 New. Send command 'kill'.
4482 * target.h (kill_inferior): Removed macro.
4483 * tracepoint.c (gdb_agent_about_to_close): New.
4484 (gdb_agent_helper_thread): Handle command 'close'.
4485 Wait endlessly until the inferior stops.
4486 Install gdb_agent_remove_socket to atexit hook.
4487 (agent_socket_name): New static variable.
4488 (gdb_agent_socket_init): Replace local variable 'name' with
4489 'agent_socket_name'.
4490 (gdb_agent_remove_socket): New.
4491
5a3f286f
YQ
44922012-07-27 Yao Qi <yao@codesourcery.com>
4493
4494 * server.c (process_point_options): Stop at 'X' when parsing.
4495
961bd387
ME
44962012-07-19 Michael Eager <eager@eagercon.com>
4497
a261b8f5 4498 * i386-low.c (Z_packet_to_hw_type): Add Z_PACKET_HW_BP, translate
961bd387
ME
4499 to hw_execute.
4500 * linux-x86-low.c (x86_insert_point, x86_remove_point):
4501 Call i386_low_insert_watchpoint, i386_low_remove_watchpoint to add/del
4502 hardware breakpoint.
4503
aa7c7447
JK
45042012-07-07 Jan Kratochvil <jan.kratochvil@redhat.com>
4505
4506 * gdbserver/linux-low.c (initialize_low): Call
4507 linux_ptrace_init_warnings.
4508
7f216e7c
DE
45092012-07-02 Doug Evans <dje@google.com>
4510
4511 * mem-break.c (gdb_no_commands_at_breakpoint): Fix cast from
4512 pointer to int.
4513
d3ce09f5
SS
45142012-07-02 Stan Shebs <stan@codesourcery.com>
4515
4516 * Makefile.in (WARN_CFLAGS_NO_FORMAT): Define.
4517 (ax.o): Add it to build rule.
4518 (ax-ipa.o): Ditto.
4519 (OBS): Add format.o.
4520 (IPA_OBS): Add format.o.
4521 * server.c (handle_query): Claim support for breakpoint commands.
4522 (process_point_options): Add command case.
4523 (process_serial_event): Leave running if there are printfs in
4524 effect.
4525 * mem-break.h (any_persistent_commands): Declare.
4526 (add_breakpoint_commands): Declare.
4527 (gdb_no_commands_at_breakpoint): Declare.
4528 (run_breakpoint_commands): Declare.
4529 * mem-break.c (struct point_command_list): New struct.
4530 (struct breakpoint): New field command_list.
4531 (any_persistent_commands): New function.
4532 (add_commands_to_breakpoint): New function.
4533 (add_breakpoint_commands): New function.
4534 (gdb_no_commands_at_breakpoint): New function.
4535 (run_breakpoint_commands): New function.
4536 * linux-low.c (linux_wait_1): Test for and run breakpoint commands
4537 locally.
4538 * ax.c: Include format.h.
4539 (ax_printf): New function.
4540 (gdb_eval_agent_expr): Add printf opcode.
4541
2f8f6aed
YQ
45422012-06-13 Yao Qi <yao@codesourcery.com>
4543
4544 * server.c (start_inferior): Remove duplicated writes to fields
4545 'last_resume_kind' and 'last_status' of 'current_inferior'.
4546
0c9070b3
YQ
45472012-06-12 Yao Qi <yao@codesourcery.com>
4548 Pedro Alves <palves@redhat.com>
4549
4550 * linux-low.c (linux_set_resume_request): Simplify predicate. Add
4551 comment.
4552 * server.c (handle_v_cont): Extend comment.
4553
c52daf70
YQ
45542012-06-11 Yao Qi <yao@codesourcery.com>
4555
4556 * linux-low.c (linux_attach): Add 'static'.
4557
d38bbb0a
YQ
45582012-06-06 Yao Qi <yao@codesourcery.com>
4559
4560 * ax.c (gdb_eval_agent_expr): Print `top' in hex.
4561
89dc0afd
JK
45622012-06-01 Jan Kratochvil <jan.kratochvil@redhat.com>
4563
4564 Fix gcc -flto compilation warning.
4565 * server.c (main): Make variable multi_mode and attach volatile.
4566
75f62ce7
TJB
45672012-05-30 Thiago Jung Bauermann <thiago.bauermann@linaro.org>
4568
4569 * linux-low.c (get_r_debug): Disable code using DT_MIPS_RLD_MAP
4570 if the platform doesn't know about it.
4571
65f479b6
PA
45722012-05-30 Jeff Kenton <jkenton@tilera.com>
4573
4574 * Makefile.in (SFILES): Add linux-tile-low.c.
4575 (linux-tile-low.o, reg-tilegx.o, reg-tilegx.c): New rules.
4576 * configure.srv: Handle tilegx-*-linux*.
4577 * linux-tile-low.c: New file.
4578
0c5bf5a9
JK
45792012-05-28 Jan Kratochvil <jan.kratochvil@redhat.com>
4580
4581 * linux-low.c (linux_qxfer_libraries_svr4): Return -1 if R_DEBUG is -1.
4582
a493e3e2
PA
45832012-05-24 Pedro Alves <palves@redhat.com>
4584
4585 PR gdb/7205
4586
43aaf8b6 4587 Replace TARGET_SIGNAL_ with GDB_SIGNAL_ throughout.
a493e3e2 4588
2ea28649
PA
45892012-05-24 Pedro Alves <palves@redhat.com>
4590
4591 PR gdb/7205
4592
4593 Replace target_signal with gdb_signal throughout.
4594
8d409d16
MR
45952012-05-22 Maciej W. Rozycki <macro@codesourcery.com>
4596
4597 * linux-low.c (linux_store_registers): Avoid the copying sequence
4598 when no data has been retrieved by ptrace.
4599
23512c01
MGD
46002012-05-22 Will Deacon <will.deacon@arm.com>
4601
4602 * linux-low (__UCLIBC__ && !(__UCLIBC_HAS_MMU__ || __ARCH_HAS_MMU__)):
4603 Include asm/ptrace.h.
4604 (PT_TEXT_ADDR, PT_DATA_ADDR, PT_TEXT_END_ADDR): Define only if not
4605 already defined.
4606
4934b29e
MR
46072012-05-21 Maciej W. Rozycki <macro@codesourcery.com>
4608
4609 * linux-low.c (linux_store_registers): Don't re-retrieve data
4610 with ptrace that has already been obtained from /proc. Always
4611 copy any data retrieved with ptrace to the buffer supplied.
4612
bde24c0a
PA
46132012-05-11 Yao Qi <yao@codesourcery.com>
4614 Pedro Alves <palves@redhat.com>
4615
4616 * linux-low.c (enum stopping_threads_kind): New.
4617 (stopping_threads): Change type to `enum stopping_threads_kind'.
4618 (handle_extended_wait): If stopping and suspending threads, leave
4619 the new_lwp suspended too.
4620 (linux_wait_for_event): Adjust.
4621 (stop_all_lwps): Set `stopping_threads' to
4622 STOPPING_AND_SUSPENDING_THREADS or STOPPING_THREADS depending on
4623 whether we're suspending threads or just stopping them. Assert no
4624 recursion happens.
4625
623b6bdf
YQ
46262012-04-29 Yao Qi <yao@codesourcery.com>
4627
4628 * server.h: Move some code to ...
4629 * gdbthread.h: ... here. New.
4630 * Makefile.in (inferiors.o, regcache.o): Depends on gdbthread.h
4631 (remote-utils.o, server.o, target.o tracepoint.o): Likewise.
4632 (nto-low.o, win32-low.o): Likewise.
4633 * inferiors.c, linux-low.h, nto-low.c: Include gdbthread.h.
4634 * regcache.c, remote-utils.c, server.c: Likewise.
4635 * target.c, tracepoint.c, win32-low.c: Likewise.
4636
f15f9948
TJB
46372012-04-24 Thiago Jung Bauermann <thiago.bauermann@linaro.org>
4638
4639 * linux-low.h (PTRACE_ARG3_TYPE): Move macro from linux-low.c.
4640 (PTRACE_ARG4_TYPE): Likewise.
4641 (PTRACE_XFER_TYPE): Likewise.
4642 * linux-arm-low.c (arm_prepare_to_resume): Cast third argument of
4643 ptrace to PTRACE_ARG3_TYPE.
4644 * linux-low.c (PTRACE_ARG3_TYPE): Move macro to linux-low.h.
4645 (PTRACE_ARG4_TYPE): Likewise.
4646 (PTRACE_XFER_TYPE): Likewise.
4647 (linux_detach_one_lwp): Cast fourth argument of
4648 ptrace to long then PTRACE_ARG4_TYPE.
4649 (regsets_fetch_inferior_registers): Cast third argument of
4650 ptrace to long then PTRACE_ARG3_TYPE.
4651 (regsets_store_inferior_registers): Likewise.
4652
38ea300a
PA
46532012-04-20 Pedro Alves <palves@redhat.com>
4654
4655 * configure: Regenerate.
4656
c971b7fa
PA
46572012-04-19 Pedro Alves <palves@redhat.com>
4658
43aaf8b6 4659 * Makefile.in (GNULIB_BUILDDIR): New.
c971b7fa 4660 (LIBGNU, INCGNU, GNULIB_H): Adjust.
43aaf8b6
PA
4661 (SUBDIRS, CLEANDIRS, REQUIRED_SUBDIRS): New.
4662 (all, install-only, uninstall, clean-info, all-lib, clean): No
4663 longer pass GNULIB_FLAGS_TO_PASS. Use subdir_do.
4664 (maintainer-clean realclean distclean): Use subdir_do.
4665 (subdir_do): New.
4666 (gnulib/import/Makefile): Adjust. Replace gnulib/import with
c971b7fa 4667 $(GNULIB_BUILDDIR). Don't pass argument to config.status.
43aaf8b6
PA
4668 * acinclude.m4: Include acx_configure_dir.m4.
4669 * configure.ac: Remove gl_EARLY, gl_INIT, and AM_INIT_AUTOMAKE
4670 calls. Call AC_PROG_RANLIB. Configure gnulib using
4671 ACX_CONFIGURE_DIR.
4672 (GNULIB): New.
4673 (GNULIB_STDINT_H): Adjust.
4674 (AC_OUTPUT): Don't output gnulib/Makefile anymore.
4675 * gdbreplay.c: Include build-gnulib/config.h.
4676 * server.h: Likewise.
4677 * aclocal.m4: Regenerate.
4678 * config.in: Regenerate.
4679 * configure: Regenerate.
c971b7fa 4680
809277f8
PA
46812012-04-19 Pedro Alves <palves@redhat.com>
4682
4683 * Makefile.in (LIBGNU, INCGNU): Adjust.
4684 (GNULIB_FLAGS_TO_PASS, GNULIB_H): Adjust.
4685 (all, install-only, uninstall, clean-info, all-lib, clean)
4686 (maintainer-clean, Makefile, gnulib/Makefile): Adjust.
4687 * configure.ac: Adjust AC_OUTPUT output.
4688 * aclocal.m4: Regenerate.
4689 * configure: Regenerate.
4690
fd9bb8b8
PA
46912012-04-19 Pedro Alves <palves@redhat.com>
4692
4693 * Makefile.in (generated_files): New.
4694 (server_h): Remove the explicit dependency on config.h, and depend
4695 on $generated_files.
4696
1c298c66
PA
46972012-04-19 Pedro Alves <palves@redhat.com>
4698
4699 * Makefile.in (INCGNU): Add -Ignulib.
4700
57c4b50b
PA
47012012-04-19 Pedro Alves <palves@redhat.com>
4702
4703 * Makefile.in (GNULIB_INCLUDE_DIR): Rename to ...
4704 (INCGNU): ... this, and spell out -I here.
4705 (GNULIB_LIB): Rename to ...
4706 (LIBGNU): ... this.
4707 (INCLUDE_CFLAGS, gdbserver$(EXEEXT), $(GNULIB_LIB) rule): Adjust.
4708
1030e047
PA
47092012-04-19 Pedro Alves <palves@redhat.com>
4710
4711 * config.in: Regenerate.
4712
447d4319
PA
47132012-04-19 Pedro Alves <palves@redhat.com>
4714
4715 * configure.ac: Remove AC_CHECK_DECLS check for memmem.
4716 * server.h (memmem): Remove declaration.
4717 * config.in: Regenerate.
4718 * configure: Regenerate.
4719
aad9eab9
YQ
47202012-04-19 Yao Qi <yao@codesourcery.com>
4721
4722 * Makefile.in (SFILES): Add common/vec.c.
4723 (OBS): Add vec.o.
4724 (vec.o): New rule.
4725
3e10640f
YQ
47262012-04-19 Yao Qi <yao@codesourcery.com>
4727
4728 * remote-utils.c (prepare_resume_reply): Replace with macro
4729 target_core_of_thread.
4730 * server.c (handle_qxfer_threads_proper): Likewise.
4731 * target.h (traget_core_of_thread): New macro.
4732
71622373
PA
47332012-04-18 Pedro Alves <palves@redhat.com>
4734
4735 * aclocal.m4: Regenerate.
4736 * configure: Regenerate.
4737
80d26939
YQ
47382012-04-16 Yao Qi <yao@codesourcery.com>
4739
4740 * tracepoint.c (cmd_qtstart): Download tracepoints even when they are
4741 duplicated on address.
4742
42476b70
YQ
47432012-04-16 Yao Qi <yao@codesourcery.com>
4744
4745 * tracepoint.c (COPY_FIELD_TO_BUF): New macro.
4746 (struct tracepoint_action_ops) <send>: New field.
4747 (m_tracepoint_action_send, r_tracepoint_action_send): New.
4748 (agent_expr_send, x_tracepoint_action_send): New.
4749 (l_tracepoint_action_send): New.
4750 (cmd_qtdp): Download and install tracepoint
4751 according to `use_agent'.
4752 (run_inferior_command): Add one more parameter `len'.
4753 Update callers.
4754 (tracepoint_send_agent): New.
4755 (cmd_qtdp, cmd_qtstart): Call tracepoint_send_agent.
4756
7bc83639
YQ
47572012-04-16 Yao Qi <yao@codesourcery.com>
4758
4759 * tracepoint.c (download_tracepoints): Moved to ...
4760 (cmd_qtstart): ... here.
4761
5f18041e
YQ
47622012-04-14 Yao Qi <yao@codesourcery.com>
4763
4764 * tracepoint.c: Include inttypes.h.
4765 (struct collect_memory_action): Use sized types.
4766 (struct tracepoint): Likewise.
4767 (cmd_qtdp, stop_tracing): Update print specifiers.
4768 (cmd_qtp, response_tracepoint): Likewise.
4769 (collect_data_at_tracepoint): Likewise.
4770 (collect_data_at_step): Likewise.
4771
55a8c076
YQ
47722012-04-14 Yao Qi <yao@codesourcery.com>
4773
4774 Import gnulib module inttypes.
4775 * aclocal.m4, config.in, configure: Regenerated.
4776
dc750257
YQ
47772012-04-14 Yao Qi <yao@codesourcery.com>
4778
4779 * Makefile.in (maintainer-clean, realclean, distclean): Remove
4780 Makefile and config.status at last.
4781
0ab5faf9
YQ
47822012-04-13 Yao Qi <yao@codesourcery.com>
4783
4784 * tracepoint.c: Include stdint.h unconditionally.
4785
18f5fd81
TJB
47862012-04-13 Thiago Jung Bauermann <thiago.bauermann@linaro.org>
4787
4788 * acinclude.m4 (GDBSERVER_HAVE_THREAD_DB_TYPE): New macro based
4789 on BFD_HAVE_SYS_PROCFS_TYPE.
4790 * configure.ac: Look for lwpid_t and psaddr_t in libthread_db.h.
4791 * configure: Regenerate.
4792 * config.in: Likewise.
4793
4d47af5c
L
47942012-04-13 H.J. Lu <hongjiu.lu@intel.com>
4795
4796 * Makefile.in (clean): Also remove x32.c x32-linux.c
4797 x32-avx.c x32-avx-linux.c.
4798 (x32.o): New target.
4799 (x32.c): Likewise.
4800 (x32-linux.o): Likewise.
4801 (x32-linux.c): Likewise.
4802 (x32-avx.o): Likewise.
4803 (x32-avx.c): Likewise.
4804 (x32-avx-linux.o): Likewise.
4805 (x32-avx-linux.c): Likewise.
4806
4807 * configure.srv (srv_amd64_regobj): Add x32.o x32-avx.o.
4808 (srv_amd64_linux_regobj): Add x32-linux.o x32-avx-linux.o.
4809 (srv_i386_64bit_xmlfiles): Add i386/x32-core.xml.
4810 (srv_amd64_xmlfiles): Add i386/x32.xml i386/x32-avx.xml.
4811 (srv_amd64_linux_xmlfiles): Add i386/x32-linux.xml
4812 i386/x32-avx-linux.xml.
4813
4814 * linux-x86-low.c (init_registers_x32_linux): New prototype.
4815 (init_registers_x32_avx_linux): Likwise.
4816 (x86_linux_update_xmltarget): Call init_registers_x32_linux
4817 or init_registers_x32_avx_linux if linux_is_elf64 is false.
4818
ecedbe58
PA
48192012-04-13 Pedro Alves <palves@redhat.com>
4820
4821 * Makefile.in (GNULIB_FLAGS_TO_PASS): New.
4822 (FLAGS_TO_PASS): Don't change or set $top_srcdir, $srcdir and VPATH.
4823 (all, uninstall, clean-info, all-lib, clean, maintainer-clean)
4824 (realclean, distclean): Explicitly pass $GNULIB_FLAGS_TO_PASS to
4825 the sub-make.
4826
c92b5177
L
48272012-04-12 H.J. Lu <hongjiu.lu@intel.com>
4828
4829 * linux-x86-low.c (compat_x32_clock_t): New.
4830 (compat_x32_siginfo_t): Likewise.
4831 (compat_x32_siginfo_from_siginfo): Likewise.
4832 (siginfo_from_compat_x32_siginfo): Likewise.
4833 (linux_is_elf64): Likewise.
4834 (x86_siginfo_fixup): Call compat_x32_siginfo_from_siginfo
4835 and siginfo_from_compat_x32_siginfo for x32.
4836 (x86_arch_setup): Set linux_is_elf64.
4837
214d508e
L
48382012-04-12 H.J. Lu <hongjiu.lu@intel.com>
4839
4840 PR gdb/13969
4841 * linux-low.c (linux_pid_exe_is_elf_64_file): Also return the
4842 e_machine field.
4843 (linux_qxfer_libraries_svr4): Update call to elf_64_file_p.
4844 * linux-low.h (linux_pid_exe_is_elf_64_file): Updated.
4845 * linux-x86-low.c (x86_arch_setup): Check if GDBserver is
4846 compatible with process.
4847
c9a1864a
YQ
48482012-04-12 Yao Qi <yao@codesourcery.com>
4849
4850 * Makefile.in: Define abs_top_srcdir and abs_srcdir.
4851 (INCLUDE_CFLAGS): Append GNULIB_INCLUDE_DIR.
4852 (install-only, install-info, clean): Handle sub dir gnulib.
4853 (all-lib, am--refresh): New targets.
4854 (memmem.o): Remove target.
4855 * configure.ac: Remove AC_CONFIG_LIBOBJ_DIR.
4856 Invoke gl_EARLY. Invoke AC_CHECK_PROGS for make.
4857 (AC_REPLACE_FUNCS): Remove memmem.
4858 Invoke gl_INIT and AM_INIT_AUTOMAKE.
4859 (AC_OUTPUT): Generate Makefile in gnulib/.
4860 * aclocal.m4, config.in, configure: Regenerated.
4861
367ba2c2
MR
48622012-04-10 Maciej W. Rozycki <macro@codesourcery.com>
4863
4864 * linux-low.c (get_r_debug): Handle DT_MIPS_RLD_MAP.
4865
9d236627
PA
48662012-04-05 Pedro Alves <palves@redhat.com>
4867
4868 -Werror=strict-aliasing
4869
4870 * spu-low.c (parse_spufs_run): Avoid dereferencing type-punned
4871 pointer.
4872
111217b3
PA
48732012-04-04 Pedro Alves <palves@redhat.com>
4874
4875 * linux-sparc-low.c (sparc_fill_gregset_to_stack)
4876 (sparc_store_gregset_from_stack, sparc_store_gregset)
4877 (sparc_breakpoint_at): Fix formatting.
4878
8365dcf5
TJB
48792012-03-30 Thiago Jung Bauermann <thiago.bauermann@linaro.org>
4880
4881 * configure.ac: Check whether Elf32_auxv_t and Elf64_auxv_t
4882 are available.
4883 * linux-low.c [HAVE_ELF32_AUXV_T] (Elf32_auxv_t): Add typedef.
4884 [HAVE_ELF64_AUXV_T] (Elf64_auxv_t): Likewise.
4885 * config.in: Regenerate.
4886 * configure: Likewise.
4887
689cc2ae
PA
48882012-03-29 Pedro Alves <palves@redhat.com>
4889
4890 * linux-low.c (regsets_store_inferior_registers) [__sparc__]:
4891 Correct ptrace arguments.
4892
c14dfd32
PA
48932012-03-28 Pedro Alves <palves@redhat.com>
4894
4895 * linux-ia64-low.c (ia64_regmap): Map IA64_EC_REGNUM to PT_AR_EC.
4896 (IA64_GR0_REGNUM, IA64_FR0_REGNUM)
4897 (IA64_FR1_REGNUM): New defines.
4898 (ia64_fetch_register): New.
4899 (the_low_target): Install it.
4900 * linux-low.h (struct linux_target_ops) <fetch_register>: New
4901 field.
4902 * linux-low.c (linux_fetch_registers): Try the
4903 the_low_target.fetch_register hook first.
4904
4905 * linux-arm-low.c (the_low_target): Adjust.
4906 * linux-bfin-low.c (the_low_target): Adjust.
4907 * linux-cris-low.c (the_low_target): Adjust.
4908 * linux-crisv32-low.c (the_low_target): Adjust.
4909 * linux-m32r-low.c (the_low_target): Adjust.
4910 * linux-m68k-low.c (the_low_target): Adjust.
4911 * linux-mips-low.c (the_low_target): Adjust.
4912 * linux-ppc-low.c (the_low_target): Adjust.
4913 * linux-s390-low.c (the_low_target): Adjust.
4914 * linux-sh-low.c (the_low_target): Adjust.
4915 * linux-sparc-low.c (the_low_target): Adjust.
4916 * linux-tic6x-low.c (the_low_target): Adjust.
4917 * linux-x86-low.c (the_low_target): Adjust.
4918 * linux-xtensa-low.c (the_low_target): Adjust.
4919
63c88e13
PA
49202012-03-26 Pedro Alves <palves@redhat.com>
4921
4922 * server.c (handle_qxfer_libraries): Don't bail early if
4923 the_target->qxfer_libraries_svr4 is not NULL.
4924
fb723180
PA
49252012-03-26 Pedro Alves <palves@redhat.com>
4926
4927 * linux-low.c (linux_qxfer_libraries_svr4): Fix pasto in comment.
4928
0afae3cf
PA
49292012-03-23 Pedro Alves <palves@redhat.com>
4930
4931 * linux-low.c (linux_qxfer_libraries_svr4): Terminate the
4932 "library-list-svr4" element's start tag when the the DSO list is
4933 empty.
4934
485f1ee4
PA
49352012-03-23 Pedro Alves <palves@redhat.com>
4936
4937 * linux-low.c (read_one_ptr): Read the inferior's pointer through
4938 a variable whose type size is the same as the inferior's pointer
4939 size.
4940
a5362b9a
TS
49412012-03-21 Thomas Schwinge <thomas@codesourcery.com>
4942
4943 * linux-arm-low.c (arm_stopped_by_watchpoint): Use siginfo_t instead of
4944 struct siginfo.
4945 * linux-low.c (siginfo_fixup, linux_xfer_siginfo): Likewise.
4946 * linux-x86-low.c (x86_siginfo_fixup): Likewise.
4947 * linux-low.h: Include <signal.h>.
4948 (struct siginfo): Remove forward declaration.
4949 (struct linux_target_ops) <siginfo_fixup>: Use siginfo_t instead of
4950 struct siginfo.
4951
d226c142
MF
49522012-03-21 Mike Frysinger <vapier@gentoo.org>
4953
4954 * .gitignore: Ignore more files.
4955
122f36ef
PA
49562012-03-19 Pedro Alves <palves@redhat.com>
4957 Jan Kratochvil <jan.kratochvil@redhat.com>
4958
4959 * server.c (cont_thread, general_thread): Add describing comments.
4960 (start_inferior): Clear `cont_thread'.
4961 (handle_v_cont): Don't set `cont_thread' if resuming all threads
4962 of a process.
4963
fc3e5175
YQ
49642012-03-15 Yao Qi <yao@codesourcery.com>
4965
4966 * tracepoint.c (install_tracepoint): Move duplicated tracepoint
4967 handling to ...
4968 (cmd_qtdp): ... here.
4969
8d0d92cd
YQ
49702012-03-15 Yao Qi <yao@codesourcery.com>
4971
4972 * tracepoint.c (struct tracepoint_action_ops): New.
4973 (struct tracepoint_action) [!IN_PROCESS_AGENT] <ops>: New field.
4974 (m_tracepoint_action_download): New.
4975 (r_tracepoint_action_download): New.
4976 (x_tracepoint_action_download): New.
4977 (l_tracepoint_action_download): New.
4978 (add_tracepoint_action): Install `action->ops' according type.
4979 (download_tracepoint_1): Move code `download' function pointer
4980 of various tracepoint_action_ops.
4981
87b0bb13
JK
49822012-03-13 Jan Kratochvil <jan.kratochvil@redhat.com>
4983
4984 * linux-low.c (linux_attach_lwp_1): New variable buffer. Call
4985 linux_ptrace_attach_warnings.
4986
5f572dec
JK
49872012-03-13 Jan Kratochvil <jan.kratochvil@redhat.com>
4988
4989 * Makefile.in (linux-ptrace.o): New.
4990 * configure.srv (arm*-*-linux*, bfin-*-*linux*, crisv32-*-linux*)
4991 (cris-*-linux*, i[34567]86-*-linux*, ia64-*-linux*, m32r*-*-linux*)
4992 (m68*-*-linux*, m68*-*-uclinux*, mips*-*-linux*, powerpc*-*-linux*)
4993 (s390*-*-linux*, sh*-*-linux*, sparc*-*-linux*, tic6x-*-uclinux)
4994 (x86_64-*-linux*, xtensa*-*-linux*): Add linux-ptrace.o to SRV_TGTOBJ
4995 of these targets.
4996 * linux-low.c (linux_attach_lwp_1): Remove redundent else clause.
4997
f4647387
YQ
49982012-03-08 Yao Qi <yao@codesourcery.com>
4999 Pedro Alves <palves@redhat.com>
5000
5001 Fix PR server/13392.
5002 * linux-x86-low.c (amd64_install_fast_tracepoint_jump_pad): Check
5003 offset of JMP insn.
5004 * tracepoint.c (remove_tracepoint): New.
5005 (cmd_qtdp): Call remove_tracepoint when failed to install.
5006
9b224c5e
PA
50072012-03-07 Pedro Alves <palves@redhat.com>
5008
5009 * linux-low.c (get_detach_signal): New.
5010 (linux_detach_one_lwp): Get rid of a pending SIGSTOP with SIGCONT.
5011 Pass on pending signals to PTRACE_DETACH. Check the result of the
5012 ptrace call.
5013 * server.c (program_signals, program_signals_p): New.
5014 (handle_general_set): Handle QProgramSignals.
5015 * server.h (program_signals, program_signals_p): Declare.
5016
e237a7e2
JK
50172012-03-05 Pedro Alves <palves@redhat.com>
5018 Jan Kratochvil <jan.kratochvil@redhat.com>
5019
5020 * linux-low.c (get_dynamic): Don't warn when PT_PHDR isn't found.
5021 New comment why.
5022
5808517f
YQ
50232012-03-03 Yao Qi <yao@codesourcery.com>
5024
5025 * tracepoint.c (tracepoint_look_up_symbols): Update call to
5026 agent_look_up_symbols.
5027
58b4daa5
YQ
50282012-03-03 Yao Qi <yao@codesourcery.com>
5029
5030 * Makefile.in (linux-low.o): Keep dependence on agent.h.
5031 (linux-x86-low.o): Likewise.
5032 * server.h: Remove in_process_agent_loaded.
5033 * tracepoint.c (in_process_agent_loaded): Removed. Moved it
5034 common/agent.c.
5035 Update callers.
5036
8ffcbaaf
YQ
50372012-03-03 Yao Qi <yao@codesourcery.com>
5038
5039 * tracepoint.c (gdb_agent_capability): New global.
5040 (in_process_agent_loaded_ust): Renamed to
5041 `in_process_agent_supports_ust'.
5042 Update callers.
5043 (in_process_agent_supports_ust): Call agent_capability_check.
5044 (clear_installed_tracepoints): Assert that agent supports
5045 agent.
5046
d1feda86
YQ
50472012-03-03 Yao Qi <yao@codesourcery.com>
5048
5049 * linux-low.c (linux_supports_agent): New.
5050 (linux_target_ops): Initialize field `supports_agent' with
5051 linux_supports_agent.
5052 * target.h (struct target_ops) <supports_agent>: New.
5053 (target_supports_agent): New macro.
5054 * server.c (handle_general_set): Handle packet 'QAgent'.
5055 (handle_query): Send `QAgent+'.
5056 * Makefile.in (server.o): Depends on agent.h.
5057
2fa291ac
YQ
50582012-03-03 Yao Qi <yao@codesourcery.com>
5059
5060 * Makefile.in (OBS): Add agent.o.
5061 Add new rule for agent.o.
5062 Track dependence of tracepoint.c on agent.h.
5063 * tracepoint.c (run_inferior_command_1):
5064 (run_inferior_command): Call agent_run_command.
5065 (gdb_ust_connect_sync_socket): Deleted. Move it to
5066 common/agent.c.
5067 (resume_thread, stop_thread): Likewise.
5068 (gdb_ust_socket_init): Renamed to ...
5069 (gdb_agent_socket_init): ... New.
5070 (gdb_ust_thread): Renamed to ...
5071 (gdb_agent_helper_thread): ... New.
5072 (gdb_ust_init): Move some code to ...
5073 (gdb_agent_init): ... here. New.
5074 [HAVE_UST]: Call gdb_ust_init.
5075 (initialize_tracepoint_ftlib): Call gdb_agent_init.
5076 * configure.ac: Add `sys/un.h' to AC_CHECK_HEADERS.
5077 * config.in, configure: Regenerated.
5078
05044653
PA
50792012-03-02 Pedro Alves <palves@redhat.com>
5080
5081 * inferiors.c (add_pid_to_list, pull_pid_from_list): Delete.
5082 * linux-low.c (struct simple_pid_list): New.
5083 (stopped_pids): New a struct simple_pid_list pointer.
5084 (add_to_pid_list, pull_pid_from_list): New.
5085 (handle_extended_wait): Don't assume the first signal new children
5086 report is SIGSTOP. Adjust call to pull_pid_from_list.
5087 (linux_wait_for_lwp): Adjust.
5088
8d00225b
YQ
50892012-03-02 Yao Qi <yao@codesourcery.com>
5090
5091 * tracepoint.c (do_action_at_tracepoint): Write `stop_pc' in
5092 debug log.
5093
19560ba5
YQ
50942012-03-02 Yao Qi <yao@codesourcery.com>
5095
5096 * tracepoint.c (collect_ust_data_at_tracepoint): Remove parameters
5097 `stop_pc' and `tpoint'. Update caller.
5098
1faeff08
MR
50992012-03-01 Maciej W. Rozycki <macro@codesourcery.com>
5100
5101 * linux-low.h (linux_target_ops): Add regset_bitmap member.
5102 * linux-low.c (use_linux_regsets): New macro.
5103 [!HAVE_LINUX_REGSETS] (regsets_fetch_inferior_registers): Likewise.
5104 [!HAVE_LINUX_REGSETS] (regsets_store_inferior_registers): Likewise.
5105 (linux_register_in_regsets): New function.
5106 (usr_fetch_inferior_registers): Skip registers covered by
5107 regsets.
5108 (usr_store_inferior_registers): Likewise.
5109 (usr_fetch_inferior_registers): New macro.
5110 (usr_store_inferior_registers): Likewise.
5111 (linux_fetch_registers): Handle mixed regset/non-regset targets.
5112 (linux_store_registers): Likewise.
5113 * linux-mips-low.c (init_registers_mips_dsp_linux): New
5114 prototype.
5115 (init_registers_mips64_dsp_linux): Likewise.
5116 (init_registers_mips_linux): New macro.
5117 (init_registers_mips_dsp_linux): Likewise.
5118 (mips_dsp_num_regs): Likewise.
5119 (DSP_BASE, DSP_CONTROL): New fallback macros.
5120 (mips_base_regs): New macro.
5121 (mips_regmap): Use it. Fix the size.
5122 (mips_dsp_regmap): New variable.
5123 (mips_dsp_regset_bitmap): Likewise.
5124 (mips_arch_setup): New function.
5125 (mips_cannot_fetch_register): Use the_low_target.regmap rather
5126 than mips_regmap.
5127 (mips_cannot_store_register): Likewise.
5128 (the_low_target): Update .arch_setup, .num_regs and .regmap
5129 initializers. Add .regset_bitmap initializer.
5130 * linux-arm-low.c (the_low_target): Add .regset_bitmap
5131 initializer.
5132 * linux-bfin-low.c (the_low_target): Likewise.
5133 * linux-cris-low.c (the_low_target): Likewise.
5134 * linux-crisv32-low.c (the_low_target): Likewise.
5135 * linux-ia64-low.c (the_low_target): Likewise.
5136 * linux-m32r-low.c (the_low_target): Likewise.
5137 * linux-m68k-low.c (the_low_target): Likewise.
5138 * linux-ppc-low.c (the_low_target): Likewise.
5139 * linux-s390-low.c (the_low_target): Likewise.
5140 * linux-sh-low.c (the_low_target): Likewise.
5141 * linux-sparc-low.c (the_low_target): Likewise.
5142 * linux-tic6x-low.c (the_low_target): Likewise.
5143 * linux-x86-low.c (the_low_target): Likewise.
5144 * linux-xtensa-low.c (the_low_target): Likewise.
5145 * configure.srv <mips*-*-linux*>: Add mips-dsp-linux.o and
5146 mips64-dsp-linux.o to srv_regobj. Add mips-dsp-linux.xml,
5147 mips64-dsp-linux.xml, mips-dsp.xml and mips64-dsp.xml to
5148 srv_xmlfiles.
5149 * Makefile.in (mips-dsp-linux.o, mips-dsp-linux.c): New targets.
5150 (mips64-dsp-linux.o, mips64-dsp-linux.c): Likewise.
5151
c03e6ccc
YQ
51522012-02-29 Yao Qi <yao@codesourcery.com>
5153 Pedro Alves <palves@redhat.com>
5154
5155 * linux-low.c: (linux_wait_1): Call unsuspend_all_lwps when
5156 `step_over_finished' is true.
5157
644cebc9
PA
51582012-02-27 Pedro Alves <palves@redhat.com>
5159
5160 * linux-low.c (pid_is_stopped): Delete, moved to common/.
5161 (linux_attach_lwp_1): Adjust to use linux_proc_pid_is_stopped.
5162
c14d7ab2
PA
51632012-02-27 Pedro Alves <palves@redhat.com>
5164
5165 PR server/9684
5166 * linux-low.c (pid_is_stopped): New.
5167 (linux_attach_lwp_1): Handle attaching to 'T (stopped)' processes.
5168
412c89dd
LM
51692012-02-25 Luis Machado <lgustavo@codesourcery.com>
5170
5171 * mem-break.c (clear_gdb_breakpoint_conditions): Fix de-allocation
5172 of conditions.
5173
b745defe
MR
51742012-02-24 Maciej W. Rozycki <macro@codesourcery.com>
5175
5176 * linux-mips-low.c (mips_regmap): Correct the index of $f9.
5177
9f3a5c85
LM
51782012-02-24 Luis Machado <lgustavo@codesourcery>
5179
5180 * server.c (handle_query): Advertise support for target-side
5181 breakpoint condition evaluation.
5182 (process_point_options): New function.
5183 (process_serial_event): When inserting a breakpoint, check for
5184 a target-side condition that should be evaluated.
5185
5186 * mem-break.c: Include regcache.h and ax.h.
5187 (point_cond_list_t): New data structure.
5188 (breakpoint) <cond_list>: New field.
5189 (find_gdb_breakpoint_at): Make non-static.
5190 (delete_gdb_breakpoint_at): Clear any target-side
5191 conditions.
5192 (clear_gdb_breakpoint_conditions): New function.
5193 (add_condition_to_breakpoint): Likewise.
5194 (add_breakpoint_condition): Likewise.
5195 (gdb_condition_true_at_breakpoint): Likewise.
5196 (gdb_breakpoint_here): Return result directly instead
5197 of going through a local variable.
5198
5199 * mem-break.h (find_gdb_breakpoint_at): New prototype.
5200 (clear_gdb_breakpoint_conditions): Likewise.
5201 (add_breakpoint_condition): Likewise.
5202 (gdb_condition_true_at_breakpoint): Likewise.
5203
5204 * linux-low.c (linux_wait_1): Evaluate target-side breakpoint condition.
5205 (need_step_over_p): Take target-side breakpoint condition into
5206 consideration.
5207
5e1dc496
LM
52082012-02-24 Luis Machado <lgustavo@codesourcery>
5209
5210 * server.h: Include tracepoint.h.
5211 (agent_mem_read, agent_get_trace_state_variable_value,
5212 agent_set_trace_state_variable_value,
5213 agent_tsv_read, agent_mem_read_string, get_get_tsv_func_addr,
5214 get_set_tsv_func_addr): New prototypes.
5215
5216 * ax.h: New include file.
5217 * ax.c: New source file.
5218
5219 * tracepoint.c: Include ax.h.
5220 (gdb_agent_op, gdb_agent_op_names, gdb_agent_op_sizes,
5221 agent_expr, eval_result_type): Move to ax.h.
5222 (parse_agent_expr): Rename to ...
5223 (gdb_parse_agent_expr): ... this, make it non-static and move
5224 to ax.h.
5225 (unparse_agent_expr) Rename to ...
5226 (gdb_unparse_agent_expr): ... this, make it non-static and move
5227 to ax.h.
5228 (eval_agent_expr): Rename to ...
5229 (eval_tracepoint_agent_expr): ... this.
5230 (agent_mem_read, agent_mem_read_string, agent_tsv_read): Remove
5231 forward declarations.
5232 (add_tracepoint_action): Call gdb_parse_agent_expr (...).
5233 (agent_get_trace_state_variable_value): New function.
5234 (agent_set_trace_state_variable_value): New function.
5235 (cmd_qtdp): Call gdb_parse_agent_expr (...).
5236 (response_tracepoint): Call gdb_unparse_agent_expr (...).
5237 (do_action_at_tracepoint): Call eval_tracepoint_agent_expr (...).
5238 (condition_true_at_tracepoint): Likewise.
5239 (parse_agent_expr): Rename to ...
5240 (gdb_parse_agent_expr): ... this and move to ax.c.
5241 (unparse_agent_expr): Rename to ...
5242 (gdb_unparse_agent_expr): ... this and move to ax.c.
5243 (gdb_agent_op_name): Move to ax.c.
5244 (eval_agent_expr): Rename to ...
5245 (gdb_eval_agent_expr): ... this, use regcache passed as parameter
5246 and move to ax.c.
5247 (eval_tracepoint_agent_expr): New function.
5248 (agent_mem_read, agent_mem_read_string, agent_tsv_read): Make
43aaf8b6 5249 non-static.
5e1dc496
LM
5250 (current_insn_ptr, emit_error, struct bytecode_address): Move to
5251 ax.c.
5252 (emit_prologue, emit_epilogue, emit_add, emit_sub, emit_mul, emit_lsh,
5253 emit_rsh_signed, emit_rsh_unsigned, emit_ext, emit_log_not,
5254 emit_bit_and, emit_bit_or, emit_bit_xor, emit_bit_not, emit_equal,
5255 emit_less_signed, emit_less_unsigned, emit_ref, emit_if_goto,
5256 emit_goto, write_goto_address, emit_const, emit_reg, emit_pop,
5257 emit_stack, emit_zero_ext, emit_swap, emit_stack_adjust,
5258 emit_int_call_1, emit_void_call_2, emit_eq_goto, emit_ne_goto,
5259 emit_lt_goto, emit_ge_goto, emit_gt_goto, emit_le_goto): Move to ax.c.
5260 (get_get_tsv_func_addr, get_set_tsv_func_addr): New functions.
5261 (compile_bytecodes): Remove forward declaration.
5262 (is_goto_target): Move to ax.c.
5263 (compile_bytecodes): Move to ax.c and call
5264 agent_get_trace_state_variable_value (...) and
5265 agent_set_trace_state_variable_value (...).
5266
5267 * Makefile.in: Update ax.c and IPA dependencies.
5268
277e4e52
PA
52692012-02-24 Pedro Alves <palves@redhat.com>
5270
5271 * tracepoint.c (cmd_bigqtbuffer): Rename as ...
5272 (cmd_bigqtbuffer_circular): ... this. Only handle
5273 'QTBuffer:circular:'.
5274 (handle_tracepoint_general_set): Adjust.
5275
bf4c19f7
YQ
52762012-02-16 Yao Qi <yao@codesourcery.com>
5277
5278 * inferiors.c: Move code to ...
5279 * dll.c: .... here. New.
5280 * server.h: Declare clear_dlls.
5281 * Makefile.in (SFILES): Add dll.c.
5282 (OBS): Add dll.o
5283 (dll.o): New rule.
5284
d73f2619
YQ
52852012-02-11 Yao Qi <yao@codesourcery.com>
5286
5287 * server.c: (handle_monitor_command): Add a new parameter
5288 `own_buf'.
5289 (handle_query): Update caller.
5290
f8255c2a
JB
52912012-02-09 Joel Brobecker <brobecker@adacore.com>
5292
5293 * configure.ac: Add readlink to AC_CHECK_FUNCS list.
5294 * configure, config.in: Regenerate.
5295 * hostio.c: Provide an alternate implementation if HAVE_READLINK
5296 is not defined.
5297
da84f473
PA
52982012-02-02 Pedro Alves <palves@redhat.com>
5299
5300 Try SIGKILL first, then PTRACE_KILL.
5301 * linux-low.c (linux_kill_one_lwp): New.
5302 (linux_kill_one_lwp): Rename to ...
5303 (kill_one_lwp_callback): ... this. Use the new
5304 linux_kill_one_lwp.
5305
e886a173
PA
53062012-02-02 Pedro Alves <palves@redhat.com>
5307
5308 * tracepoint.c (cmd_qtminftpilen): Return 0 if there's no current
5309 inferior.
5310
be07f1a2
PA
53112012-01-27 Pedro Alves <palves@redhat.com>
5312
5313 * linux-low.c (linux_child_pid_to_exec_file): Delete.
5314 (elf_64_file_p): Make static.
5315 (linux_pid_exe_is_elf_64_file): New.
5316 * linux-low.h (linux_child_pid_to_exec_file, elf_64_file_p):
5317 Delete declarations.
5318 (linux_pid_exe_is_elf_64_file): Declare.
5319 * linux-x86-low.c (x86_arch_setup): Use
5320 linux_pid_exe_is_elf_64_file.
5321
d8301ad1
JK
53222012-01-25 Jan Kratochvil <jan.kratochvil@redhat.com>
5323
5324 * linux-low.c (linux_wait_for_event_1): Rename to ...
5325 (linux_wait_for_event): ... here and merge it with former
5326 linux_wait_for_event - new variable wait_ptid, use it.
5327 (linux_wait_for_event): Remove - merge it to linux_wait_for_event_1.
5328
01b17894
PA
53292012-01-23 Pedro Alves <palves@redhat.com>
5330
5331 * server.c (main): Avoid yet another case of infinite loop while
5332 detaching/killing after a longjmp.
5333
e825046f
JK
53342012-01-20 Jan Kratochvil <jan.kratochvil@redhat.com>
5335
5336 Code cleanup.
5337 * linux-low.c (linux_wait_for_event_1): Use ptid_is_pid.
5338
b9e7b9c3
UW
53392012-01-20 Ulrich Weigand <ulrich.weigand@linaro.org>
5340
5341 * hostio.c (handle_readlink): New function.
5342 (handle_vFile): Call it to handle "vFile:readlink" packets.
5343
901f9912
UW
53442012-01-20 Pedro Alves <palves@redhat.com>
5345 Ulrich Weigand <ulrich.weigand@linaro.org>
5346
5347 * server.c (handle_v_requests): Only support vAttach and vRun to
5348 start multiple processes when in extended protocol mode.
5349
fc1ab1a0
PA
53502012-01-17 Pedro Alves <palves@redhat.com>
5351
5352 * tracepoint.c (initialize_tracepoint): Use mmap instead of
5353 memalign plus mprotect to allocate the scratch buffer.
5354
7d5d4e98
PA
53552012-01-13 Pedro Alves <palves@redhat.com>
5356
5357 * server.c (attach_inferior): Clear `cont_thread'.
5358
f128d5e9
PA
53592012-01-13 Pedro Alves <palves@redhat.com>
5360
5361 * server.c (main): Avoid infinite loop while detaching/killing
5362 after a longjmp.
5363
06db92f0
DE
53642012-01-09 Doug Evans <dje@google.com>
5365
5366 * server.c (start_inferior): Set last_ptid in --wrapper case.
5367
32d92999
YQ
53682012-01-06 Yao Qi <yao@codesourcery.com>
5369
5370 * tracepoint.c [IN_PROCESS_AGENT] (debug_threads): Macro
5371 defined.
5372 [IN_PROCESS_AGENT] (debug_agent): New global variable.
5373
5e0a92a9
YQ
53742012-01-04 Yao Qi <yao@codesourcery.com>
5375
5376 * tracepoint.c (cmd_qtdp): Print debug message
5377 for static tracepoint.
5378
ae639e8c
YQ
53792012-01-04 Yao Qi <yao@codesourcery.com>
5380
5381 * tracepoint.c (trace_vdebug): Differentiate debug message
5382 between gdbserver and IPA.
5383
f72429c5
YQ
53842012-01-03 Yao Qi <yao@codesourcery.com>
5385
5386 * tracepoint.c (tracepoint_was_hit): Don't collect for
5387 static tracepoint.
5388
12c3e59c
JB
53892012-01-02 Joel Brobecker <brobecker@adacore.com>
5390
5391 * terminal.h: Reformat copyright header.
5392
67827812
JB
53932012-01-02 Joel Brobecker <brobecker@adacore.com>
5394
5395 * server.c (gdbserver_version): Update copyright year.
5396 * gdbreplay.c (gdbreplay_version): Likewise.
5397
3e52c33d
JK
53982011-12-18 Jan Kratochvil <jan.kratochvil@redhat.com>
5399
5400 * linux-low.c (linux_create_inferior): Put empty if clause for write.
5401
5402 Revert:
5403 2011-12-18 Hui Zhu <teawater@gmail.com>
5404 * linux-low.c (linux_create_inferior): Save return value to ret.
5405
66f1260e
HZ
54062011-12-18 Hui Zhu <teawater@gmail.com>
5407
5408 * linux-low.c (linux_create_inferior): Save return value to ret.
5409
e77616d7
DE
54102011-12-16 Doug Evans <dje@google.com>
5411
e7b06c57
DE
5412 * linux-low.c (linux_create_inferior): If stdio connection,
5413 redirect stdin from /dev/null, stdout to stderr.
5414 * remote-utils.c (remote_is_stdio): New static global.
5415 (remote_connection_is_stdio): New function.
5416 (remote_prepare): Handle stdio connection.
5417 (remote_open): Ditto.
5418 (remote_close): Don't close stdin for stdio connections.
5419 (read_prim,write_prim): New functions. Replace all calls to
5420 read/write to these.
5421 * server.c (main): Watch for "-" argument. Move call to
5422 remote_prepare before start_inferior.
5423 * server.h (STDIO_CONNECTION_NAME): New macro.
5424 (remote_connection_is_stdio): Declare.
5425
e77616d7
DE
5426 * remote-utils.c (prepare_resume_reply): Remove extraneous \n
5427 in debugging output.
5428
82067193
YQ
54292011-12-15 Yao Qi <yao@codesourcery.com>
5430
5431 * tracepoint.c: Include sys/syscall.h.
5432 (gdb_ust_thread): Remove preprocessor conditional.
5433
82bfbe7e
PA
54342011-12-14 Pedro Alves <pedro@codesourcery.com>
5435
5436 * linux-low.c (linux_detach_one_lwp): Call
5437 the_low_target.prepare_to_resume before detaching.
5438
712c6575
YQ
54392011-12-14 Yao Qi <yao@codesourcery.com>
5440
5441 * tracepoint.c (gdb_ust_thread): Don't ignore return value
5442 of write.
5443
d54d1edf
YQ
54442011-12-14 Yao Qi <yao@codesourcery.com>
5445
5446 * i386-low.c (i386_low_stopped_data_address): Initialize local
5447 variable `control'.
5448
6210a125
PA
54492011-12-13 Pedro Alves <pedro@codesourcery.com>
5450
5451 PR remote/13492
5452
5453 * i386-low.c (i386_low_stopped_data_address): Avoid fetching
5454 DR_CONTROL unless necessary. Extend comments.
5455 * linux-x86-low.c (x86_linux_prepare_to_resume): Don't write to
5456 DR0-3 if not used. If any watchpoint was set, clear DR_STATUS.
5457
2ece8244
YQ
54582011-12-13 Yao Qi <yao@codesourcery.com>
5459
5460 * tracepoint.c (trace_buffer_alloc): Replace magic numbers with
5461 macros.
5462 (upload_fast_traceframes, upload_fast_traceframes): Likewise.
5463
784867a5
JK
54642011-12-08 Jan Kratochvil <jan.kratochvil@redhat.com>
5465
5466 * linux-low.c (linux_kill): Skip PTRACE_KILL if LWP does not exist.
5467 Print new debug message for such case.
5468
6bf36717
JK
54692011-12-06 Jan Kratochvil <jan.kratochvil@redhat.com>
5470
5471 Fix overlapping memcpy.
5472 * mem-break.c (set_raw_breakpoint_at): New variable buf. Use it for
5473 the read_inferior_memory transfer.
5474 (delete_fast_tracepoint_jump): New variable buf. Use it for the
5475 write_inferior_memory transfer.
5476 (set_fast_tracepoint_jump): New variable buf. Use it for the
5477 read_inferior_memory and write_inferior_memory transfers.
5478 (uninsert_fast_tracepoint_jumps_at, reinsert_fast_tracepoint_jumps_at)
5479 (delete_raw_breakpoint, uninsert_raw_breakpoint): New variable buf.
5480 Use it for the write_inferior_memory transfer.
5481 (check_mem_read, check_mem_write): New gdb_asserts for overlapping
5482 buffers.
5483
50275556
MR
54842011-12-06 Maciej W. Rozycki <macro@codesourcery.com>
5485
5486 * linux-low.c (fetch_register, store_register): Make code
5487 consistent, fix formatting.
5488
7325beb4
MR
54892011-12-06 Maciej W. Rozycki <macro@codesourcery.com>
5490
5491 * linux-low.c (usr_store_inferior_registers): Factor out code
5492 to handle individual registers into...
5493 (store_register): ... this new function.
5494
c642a434
UW
54952011-12-06 Ulrich Weigand <uweigand@de.ibm.com>
5496
5497 * Makefile.in (s390-linux32v1.o, s390-linux32v1.c): New rules.
5498 (s390-linux32v2.o, s390-linux32v2.c): Likewise.
5499 (s390-linux64v1.o, s390-linux64v1.c): Likewise.
5500 (s390-linux64v2.o, s390-linux64v2.c): Likewise.
5501 (s390x-linux64v1.o, s390x-linux64v1.c): Likewise.
5502 (s390x-linux64v2.o, s390x-linux64v2.c): Likewise.
5503 * configure.srv [s390*-*-linux*] (srv_regobj): Add new objects.
5504 (srv_xmlfiles): Add new XML files.
5505
5506 * linux-s390-low.c: Include "elf/common.h", <sys/ptrace.h>,
5507 and <sys/uio.h>.
5508 (PTRACE_GETREGSET, PTRACE_SETREGSET): Define if undefined.
5509 (init_registers_s390_linux32v1): Add prototype.
5510 (init_registers_s390_linux32v2): Likewise.
5511 (init_registers_s390_linux64v1): Likewise.
5512 (init_registers_s390_linux64v2): Likewise.
5513 (init_registers_s390x_linux64v1): Likewise.
5514 (init_registers_s390x_linux64v2): Likewise.
5515 (s390_num_regs): Increment to 52.
5516 (s390_regmap): Add orig_r2 register.
5517 (s390_num_regs_3264): Increment to 68.
5518 (s390_regmap_3264): Add orig_r2 register.
5519 (s390_collect_ptrace_register): Handle orig_r2 register.
5520 (s390_supply_ptrace_register): Likewise.
5521 (s390_fill_last_break): New function.
5522 (s390_store_last_break): Likewise.
5523 (s390_fill_system_call): New function.
5524 (s390_store_system_call): Likewise.
5525 (target_regsets): Handle NT_S390_LAST_BREAK and NT_S390_SYSTEM_CALL
5526 register sets.
5527 (s390_check_regset): New function.
5528 (s390_arch_setup): Check for presence of NT_S390_LAST_BREAK and
5529 NT_S390_SYSTEM_CALL regsets and use appropriate description.
5530 Update target_regsets for available register sets.
5531
2268b414
JK
55322011-12-02 Paul Pluzhnikov <ppluzhnikov@google.com>
5533 Jan Kratochvil <jan.kratochvil@redhat.com>
5534
5535 * linux-low.c (get_phdr_phnum_from_proc_auxv, get_dynamic, get_r_debug)
5536 (read_one_ptr, struct link_map_offsets, linux_qxfer_libraries_svr4):
5537 New.
5538 (struct linux_target_ops): Install linux_qxfer_libraries_svr4.
5539 * linux-low.h (struct process_info_private): New member r_debug.
5540 * server.c (handle_qxfer_libraries): Call
5541 the_target->qxfer_libraries_svr4.
5542 (handle_qxfer_libraries_svr4): New function.
5543 (qxfer_packets): New entry "libraries-svr4".
5544 (handle_query): Check QXFER_LIBRARIES_SVR4 and report libraries-svr4.
5545 * target.h (struct target_ops): New member qxfer_libraries_svr4.
5546 * remote.c (remote_xfer_partial): Call add_packet_config_cmd for
5547 PACKET_qXfer_libraries_svr4.
5548
d6db1fab
UW
55492011-11-30 Ulrich Weigand <uweigand@de.ibm.com>
5550
5551 * linux-s390-low.c (s390_collect_ptrace_register): Fully convert
5552 PSW address/mask between 8-byte and 16-byte formats.
5553 (s390_supply_ptrace_register): Likewise.
5554 (s390_get_pc, s390_set_pc): 4-byte PSW address always includes
5555 basic addressing mode bit.
5556
242f5f1c
SS
55572011-11-24 Stan Shebs <stan@codesourcery.com>
5558
5559 * tracepoint.c (cmd_qtstatus): Use plongest instead of %llx.
5560
f196051f
SS
55612011-11-17 Stan Shebs <stan@codesourcery.com>
5562
5563 * tracepoint.c (struct tracepoint): New field traceframe_usage.
5564 (tracing_start_time): New global.
5565 (tracing_stop_time): New global.
5566 (tracing_user_name): New global.
5567 (tracing_notes): New global.
5568 (tracing_stop_note): New global.
5569 (cmd_qtstart): Set traceframe_usage, start_time.
5570 (stop_tracing): Set stop_time.
5571 (cmd_qtstatus): Report additional status.
5572 (cmd_qtp): New function.
5573 (handle_tracepoint_query): Call it.
5574 (cmd_qtnotes): New function.
5575 (handle_tracepoint_general_set): Call it.
5576 (get_timestamp): Rename from tsv_get_timestamp.
5577
405f8e94
SS
55782011-11-14 Stan Shebs <stan@codesourcery.com>
5579 Kwok Cheung Yeung <kcy@codesourcery.com>
5580
5581 * linux-x86-low.c (small_jump_insn): New.
5582 (i386_install_fast_tracepoint_jump_pad): Add arguments for
5583 trampoline and error message, build a trampoline and issue a small
5584 jump instruction to it.
5585 (x86_install_fast_tracepoint_jump_pad): Add arguments for
5586 trampoline and error message.
5587 (x86_get_min_fast_tracepoint_insn_len): New.
5588 (the_low_target): Add call to x86_get_min_fast_tracepoint_insn_len.
5589 * linux-low.h (struct linux_target_ops): Add arguments to
5590 install_fast_tracepoint_jump_pad operation, add new operation.
5591 * linux-low.c (linux_install_fast_tracepoint_jump_pad): Add
5592 arguments.
5593 (linux_get_min_fast_tracepoint_insn_len): New function.
5594 (linux_target_op): Add new operation.
5595 * tracepoint.c (gdb_trampoline_buffer): New IPA variable.
5596 (gdb_trampoline_buffer_end): Ditto.
5597 (gdb_trampoline_buffer_error): Ditto.
5598 (struct ipa_sym_addresses): Add fields for new IPA variables.
5599 (symbol_list): Add entries for new IPA variables.
5600 (struct tracepoint): Add fields to hold the address range of the
5601 trampoline used by the tracepoint.
5602 (trampoline_buffer_head): New static variable.
5603 (trampoline_buffer_tail): Ditto.
5604 (claim_trampoline_space): New function.
5605 (have_fast_tracepoint_trampoline_buffer): New function.
5606 (clone_fast_tracepoint): Fill in trampoline fields of tracepoint
5607 structure.
5608 (install_fast_tracepoint): Ditto, also add error buffer argument.
5609 (cmd_qtminftpilen): New function.
5610 (handle_tracepoint_query): Add response to qTMinFTPILen packet.
5611 (fast_tracepoint_from_trampoline_address): New function.
5612 (fast_tracepoint_collecting): Handle trampoline as part of jump
5613 pad space.
5614 (set_trampoline_buffer_space): New function.
5615 (initialize_tracepoint): Initialize new IPA variables.
5616 * target.h (struct target_ops): Add arguments to
5617 install_fast_tracepoint_jump_pad operation, add new
5618 get_min_fast_tracepoint_insn_len operation.
5619 (target_get_min_fast_tracepoint_insn_len): New.
5620 (install_fast_tracepoint_jump_pad): Add arguments.
5621 * server.h (IPA_BUFSIZ): Define.
5622 * linux-i386-ipa.c: Include extra header files.
5623 (initialize_fast_tracepoint_trampoline_buffer): New function.
5624 (initialize_low_tracepoint): Call it.
5625 * server.h (set_trampoline_buffer_space): Declare.
5626 (claim_trampoline_space): Ditto.
5627 (have_fast_tracepoint_trampoline_buffer): Ditto.
5628
1e4d1764
YQ
56292011-11-14 Yao Qi <yao@codesourcery.com>
5630
5631 * server.c (handle_query): Handle InstallInTrace for qSupported.
5632 * tracepoint.c (add_tracepoint): Sort list.
5633 (install_tracepoint, download_tracepoint): New.
5634 (cmd_qtdp): Call them to install and download tracepoints.
5635 (sort_tracepoints): Removed.
5636 (cmd_qtstart): Update.
5637
5c73ff4e
YQ
56382011-11-14 Yao Qi <yao@codesourcery.com>
5639
5640 * mem-break.c (inc_ref_fast_tracepoint_jump): New.
5641 * mem-break.h: Declare.
5642 * tracepoint.c (cmd_qtstart): Move some code to ...
5643 (clone_fast_tracepoint, install_fast_tracepoint): ... here.
5644 New.
5645 (download_tracepoints): Move some code to ...
5646 (download_tracepoint_1): ... here. New.
5647
86a30030
YQ
56482011-11-08 Yao Qi <yao@codesourcery.com>
5649
5650 * remote-utils.c (relocate_instruction): A comment fix.
5651
8d26e50c
JB
56522011-11-07 Joel Brobecker <brobecker@adacore.com>
5653
5654 * win32-i386-low.c (dr_status_mirror, dr_control_mirror): Delete.
5655 (i386_dr_low_get_control, i386_dr_low_get_status): Use
5656 dr_status_mirror and dr_control_mirror from debug_reg_state.
5657 (i386_dr_low_get_status): Use debug_reg_state.dr_status_mirror
5658 (i386_initial_stuff): Remove use of deleted globals.
5659 (i386_get_thread_context, i386_set_thread_context,
5660 i386_thread_added): Use dr_status_mirror and dr_control_mirror
5661 from debug_reg_state.
5662
a59306a3
YQ
56632011-11-05 Yao Qi <yao@codesourcery.com>
5664
5665 * tracepoint.c (gdb_collect): Loop over tracepoints of same
5666 address as TPOINT's.
5667
3065dfb6
SS
56682011-11-02 Stan Shebs <stan@codesourcery.com>
5669
5670 * tracepoint.c (agent_mem_read_string): New function.
5671 (eval_agent_expr): Call it for tracenz.
5672 * server.c (handle_query): Report support for tracenz.
5673
fd0d8c7c
YQ
56742011-11-02 Yao Qi <yao@codesourcery.com>
5675
5676 * tracepoint.c (cmd_qtstart): Remove unused local variables.
5677
609086b1
YQ
56782011-11-02 Yao Qi <yao@codesourcery.com>
5679
5680 * target.h: Fix a typo in comment.
5681
b9fd1791
PA
56822011-10-31 Pedro Alves <pedro@codesourcery.com>
5683
5684 * mem-break.c (check_mem_write): Add `myaddr' parameter. Don't
5685 clobber the breakpoints' shadows with fast tracepoint jumps.
5686 * mem-break.h (check_mem_write): Add `myaddr' parameter.
5687 * target.c (write_inferior_memory): Also pass MYADDR down to
5688 check_mem_write.
5689
03583c20
UW
56902011-10-07 Ulrich Weigand <ulrich.weigand@linaro.org>
5691
5692 * configure.ac: Check support for personality routine.
5693 * configure: Regenerate.
5694 * config.in: Likewise.
5695 * linux-low.c: Include <sys/personality.h>.
5696 Define ADDR_NO_RANDOMIZE if necessary.
5697 (linux_create_inferior): Disable address space randomization when
5698 forking inferior, if requested.
5699 (linux_supports_disable_randomization): New function.
5700 (linux_target_ops): Install it.
5701 * server.h (disable_randomization): Declare.
5702 * server.c (disable_randomization): New global variable.
5703 (handle_general_set): Handle QDisableRandomization.
5704 (handle_query): Likewise for qSupported.
5705 (main): Support --disable-randomization and --no-disable-randomization
5706 command line arguments.
5707 * target.h (struct target_ops): Add supports_disable_randomization.
5708 (target_supports_disable_randomization): New macro.
5709
723b724b
MF
57102011-09-29 Mike Frysinger <vapier@gentoo.org>
5711
5712 * linux-low.c (target_loadseg): Add defined PTRACE_GETFDPIC to the
5713 ifdef check.
5714 [PT_GETDSBT] (target_loadmap): Wrap in a defined PT_GETDSBT check.
5715 [!PT_GETDSBT] (target_loadmap): New definition.
5716 (LINUX_LOADMAP, LINUX_LOADMAP_EXEC, LINUX_LOADMAP_INTERP): Define.
5717 (linux_read_loadmap): Change PTRACE_GETDSBT_EXEC to
5718 LINUX_LOADMAP_EXEC, PTRACE_GETDSBT_INTERP to LINUX_LOADMAP_INTERP,
5719 and PT_GETDSBT to LINUX_LOADMAP.
5720 [!PT_GETDSBT] (linux_read_loadmap): Define to NULL.
5721 (linux_target_ops): Delete unnecessary ifdef PT_GETDSBT check.
5722
55329a5c 57232011-09-21 Ulrich Weigand <ulrich.weigand@linaro.org>
71487fd7
UW
5724
5725 * linux-arm-low.c (struct arm_linux_hwbp_cap): Remove.
5726 (arm_linux_hwbp_cap): New static variable.
5727 (arm_linux_get_hwbp_cap): Replace by ...
5728 (arm_linux_init_hwbp_cap): ... this new function.
5729 (arm_linux_get_hw_breakpoint_count): Use arm_linux_hwbp_cap.
5730 (arm_linux_get_hw_watchpoint_count): Likewise.
5731 (arm_linux_get_hw_watchpoint_max_length): Likewise.
5732 (arm_arch_setup): Call arm_linux_init_hwbp_cap.
5733 (arm_prepare_to_resume): Use perror_with_name instead of error.
5734
55329a5c 57352011-09-21 Ulrich Weigand <ulrich.weigand@linaro.org>
09b4ad9f
UW
5736
5737 * linux-arm-low.c: Include <signal.h>.
5738 (PTRACE_GETHBPREGS, PTRACE_SETHBPREGS): Define if necessary.
5739 (struct arm_linux_hwbp_cap): New data type.
5740 (arm_hwbp_type, arm_hwbp_control_t): New typedefs.
5741 (struct arm_linux_hw_breakpoint): New data type.
5742 (MAX_BPTS, MAX_WPTS): Define.
5743 (struct arch_process_info, struct arch_lwp_info): New data types.
5744 (arm_linux_get_hwbp_cap): New function.
5745 (arm_linux_get_hw_breakpoint_count): Likewise.
5746 (arm_linux_get_hw_watchpoint_count): Likewise.
5747 (arm_linux_get_hw_watchpoint_max_length): Likewise.
5748 (arm_hwbp_control_initialize): Likewise.
5749 (arm_hwbp_control_is_enabled): Likewise.
5750 (arm_hwbp_control_is_initialized): Likewise.
5751 (arm_hwbp_control_disable): Likewise.
5752 (arm_linux_hw_breakpoint_equal): Likewise.
5753 (arm_linux_hw_point_initialize): Likewise.
5754 (struct update_registers_data): New data structure.
5755 (update_registers_callback: New function.
5756 (arm_insert_point): Likewise.
5757 (arm_remove_point): Likewise.
5758 (arm_stopped_by_watchpoint): Likewise.
5759 (arm_stopped_data_address): Likewise.
5760 (arm_new_process): Likewise.
5761 (arm_new_thread): Likewise.
5762 (arm_prepare_to_resume): Likewise.
5763 (the_low_target): Register arm_insert_point, arm_remove_point,
5764 arm_stopped_by_watchpoint, arm_stopped_data_address, arm_new_process,
5765 arm_new_thread, and arm_prepare_to_resume.
5766
6b9801d4
SS
57672011-09-15 Stan Shebs <stan@codesourcery.com>
5768
5769 * server.h (struct emit_ops): Add compare-goto fields.
5770 * tracepoint.c (gdb_agent_op_sizes): New table.
5771 (emit_eq_goto): New function.
5772 (emit_ne_goto): New function.
5773 (emit_lt_goto): New function.
5774 (emit_le_goto): New function.
5775 (emit_gt_goto): New function.
5776 (emit_ge_goto): New function.
5777 (is_goto_target): New function.
5778 (compile_bytecodes): Recognize special cases of compare-goto
5779 combinations and call specialized emitters for them.
5780 * linux-x86-low.c (amd64_emit_eq_goto): New function.
5781 (amd64_emit_ne_goto): New function.
5782 (amd64_emit_lt_goto): New function.
5783 (amd64_emit_le_goto): New function.
5784 (amd64_emit_gt_goto): New function.
5785 (amd64_emit_ge_goto): New function.
5786 (amd64_emit_ops): Add the new functions.
5787 (i386_emit_eq_goto): New function.
5788 (i386_emit_ne_goto): New function.
5789 (i386_emit_lt_goto): New function.
5790 (i386_emit_le_goto): New function.
5791 (i386_emit_gt_goto): New function.
5792 (i386_emit_ge_goto): New function.
5793 (i386_emit_ops): Add the new functions.
5794
bf15cbda
SS
57952011-09-08 Stan Shebs <stan@codesourcery.com>
5796
5797 * linux-x86-low.c (i386_emit_prologue): Save %ebx.
5798 (i386_emit_epilogue): Restore %ebx.
5799
943ca1dd
JZ
58002011-08-31 Jie Zhang <jzhang918@gmail.com>
5801
5802 * server.c (step_thread): Remove definition.
5803 (process_serial_event): Don't handle Hs.
5804 * server.h (step_thread): Remove declaration.
5805 * target.c (set_desired_inferior): Remove use of step_thread.
5806
e3deef73
LM
58072011-08-24 Luis Machado <lgustavo@codesourcery.com>
5808
5809 * linux-low.c: Include linux-procfs.h.
5810 (linux_attach_lwp_1): Update comments.
5811 (linux_attach): Scan for existing threads when attaching to a
5812 process that is the tgid.
5813 * Makefile.in: Update dependencies.
5814
13da1c97
LM
58152011-08-24 Luis Machado <lgustavo@codesourcery.com>
5816
5817 * configure.srv: Add linux-procfs.o dependencies.
5818
881127c9
YQ
58192011-08-14 Yao Qi <yao@codesourcery.com>
5820
5821 * target.h (struct target_ops): Fix indent.
5822 * win32-low.c (win32_target_ops): Fix comment.
5823
58dbd541
YQ
58242011-08-14 Andrew Jenner <andrew@codesourcery.com>
5825 Yao Qi <yao@codesourcery.com>
5826
5827 * Makefile.in (clean): Remove tic6x-*.c files.
5828 (linux-tic6x-low.o, tic6x-c62x-linux.o, tic6x-c64x-linux.o): New rules.
5829 (tic6x-c64xp-linux.o, tic6x-c62x-linux.c, tic6x-c64x-linux.c): Likewise.
5830 (tic6x-c64xp-linux.c): Likewise.
5831 * configure.srv: Add support for tic6x-*-uclinux.
5832 * linux-tic6x-low.c: New.
5833 * linux-low.c (PT_TEXT_ADDR, PT_DATA_ADDR, PT_TEXT_END_ADDR): Define.
5834
78d85199
YQ
58352011-08-14 Andrew Stubbs <ams@codesourcery.com>
5836 Yao Qi <yao@codesourcery.com>
5837
5838 * target.h (struct target_ops): Add read_loadmap.
5839 * linux-low.c (struct target_loadseg): New type.
5840 (struct target_loadmap): New type.
5841 (linux_read_loadmap): New function.
5842 (linux_target_ops): Add linux_read_loadmap.
5843 * server.c (handle_query): Support qXfer:fdpic:read packet.
43aaf8b6
PA
5844 * win32-low.c (win32_target_ops): Initialize field `read_loadmap'
5845 to NULL.
78d85199 5846
a959a88d
EZ
58472011-08-05 Eli Zaretskii <eliz@gnu.org>
5848
5849 * win32-low.c: Include <stdint.h>.
5850
1ced966e
PA
58512011-07-22 Pedro Alves <pedro@codesourcery.com>
5852
5853 * i386-low.c (i386_insert_aligned_watchpoint): Don't pass the info
5854 to the inferior here.
5855 (i386_remove_aligned_watchpoint): Ditto.
5856 (i386_handle_nonaligned_watchpoint): Return immediate on fail to
5857 fit part of the watchpoint in the debug registers.
5858 (i386_update_inferior_debug_regs): New.
5859 (i386_low_insert_watchpoint): Work on a local mirror of the debug
5860 registers, and only update the inferior on success.
5861 (i386_low_remove_watchpoint): Ditto.
5862
d26e3629
KY
58632011-07-22 Kwok Cheung Yeung <kcy@codesourcery.com>
5864
5865 * linux-low.c (compare_ints, unique, list_threads, show_process,
5866 linux_core_of_thread): Delete.
5867 (linux_target_ops): Change linux_core_of_thread to
5868 linux_common_core_of_thread.
5869 (linux_qxfer_osdata): Defer to linux_common_xfer_osdata.
5870 * utils.c (malloc_failure): Change type of argument.
5871 (xmalloc, xrealloc, xcalloc, xsnprintf): Delete.
5872 * Makefile.in (SFILES): Add common/common-utils.c, common/xml-utils.c,
5873 common/linux-osdata.c, common/ptid.c and common/buffer.c.
5874 (OBS): Add xml-utils.o, common-utils.o, ptid.o and buffer.o.
5875 (IPA_OBJS): Add common-utils-ipa.o.
5876 (ptid_h, linux_osdata_h): New macros.
5877 (server_h): Add common/common-utils.h, common/xml-utils.h,
5878 common/buffer.h, common/gdb_assert.h, common/gdb_locale.h and
5879 common/ptid.h.
5880 (common-utils-ipa.o, common-utils.o, xml-utils.o, linux-osdata.o,
5881 ptid.o, buffer.o): New rules.
5882 (linux-low.o): Add common/linux-osdata.h as a dependency.
5883 * configure.srv (srv_tgtobj): Add linux-osdata.o to Linux targets.
5884 * configure.ac: Add AC_HEADER_DIRENT check.
5885 * config.in: Regenerate.
5886 * configure: Regenerate.
5887 * remote-utils.c (xml_escape_text): Delete.
5888 (buffer_grow, buffer_free, buffer_init, buffer_finish,
5889 buffer_xml_printf): Move to common/buffer.c.
5890 * server.c (main): Remove call to initialize_inferiors.
5891 * server.h (struct ptid, ptid_t, minus_one_ptid, null_ptid,
5892 ptid_build, pid_to_ptid, ptid_get_pid, ptid_get_lwp, ptid_get_tid,
5893 ptid_equal, ptid_is_pid, initialize_inferiors, xml_escape_text,
5894 internal_error, gdb_assert, gdb_assert_fail): Delete.
5895 (struct buffer, buffer_grow, buffer_free, buffer_init, buffer_finish,
5896 buffer_xml_printf, buffer_grow_str, buffer_grow_str0): Move to
5897 common/buffer.h.
5898 * inferiors.c (null_ptid, minus_one_ptid, ptid_build, pid_to_ptid,
5899 ptid_get_pid, ptid_get_lwp, ptid_get_tid, ptid_equal, ptid_is_pid,
5900 initialize_inferiors): Delete.
5901
2275a1a7
PA
59022011-07-20 Pedro Alves <pedro@codesourcery.com>
5903
5904 * tracepoint.c (tracepoint_look_up_symbols): Return upon the first
5905 symbol error.
5906
0a5b1e09
PA
59072011-05-31 Pedro Alves <pedro@codesourcery.com>
5908
5909 * linux-x86-low.c (i386_dr_low_get_addr): Fix off by one in
5910 assertion.
5911 * win32-i386-low.c (i386_dr_low_get_addr): Ditto.
5912
6938fd34
YQ
59132011-05-26 Yao Qi <yao@codesourcery.com>
5914
5915 * Makefile.in (thread-db.o): Track dependence to
5916 common/gdb_thread_db.h.
5917 * thread-db.c: include gdb_thread_db.h from right place.
5918
b481f9e0
TT
59192011-05-16 Adrian Cornish <gnu@bluedreamer.com>
5920
5921 * linux-i386-ipa.c (supply_static_tracepoint_registers): Pass
5922 __FILE__ and __LINE__ to internal_error.
5923
98a5dd13
DE
59242011-05-13 Doug Evans <dje@google.com>
5925
5926 * thread-db.c (try_thread_db_load_from_sdir): New function.
5927 (try_thread_db_load_from_dir): New function.
5928 (thread_db_load_search): Handle $sdir, ignore $pdir.
5929 Remove trying of system directories if search of
5930 libthread-db-search-path fails, that is now done via $sdir.
5931
d248b706
KY
59322011-05-12 Kwok Cheung Yeung <kcy@codesourcery.com>
5933
5934 * server.c (handle_query): Add EnableDisableTracepoints to the list
5935 of supported features.
43aaf8b6 5936 * tracepoint.c (clear_installed_tracepoints): Uninstall disabled
d248b706 5937 tracepoints.
43aaf8b6
PA
5938 (cmd_qtenable_disable): New.
5939 (cmd_qtstart): Install tracepoints even if disabled.
5940 (handle_tracepoint_general_set): Add call to cmd_qtenable_disable on
5941 receiving a QTEnable or QTDisable packet.
5942 (gdb_collect): Skip data collection if fast tracepoint is disabled.
5943 (ust_marker_to_static_tracepoint): Do not ignore disabled static
5944 tracepoints.
5945 (gdb_probe): Skip data collection if static tracepoint is disabled.
d248b706 5946
84e578fb
DE
59472011-05-10 Doug Evans <dje@google.com>
5948
5949 * thread-db.c (thread_db_handle_monitor_command): Handle elided path.
5950
71f55dd8
DE
59512011-05-04 Doug Evans <dje@google.com>
5952
5953 * linux-low.c (linux_join): Skip process lookup.
5954 * spu-low.c (spu_join): Ditto.
5955 * server.c (join_inferiors_callback): Delete.
5956 (process_serial_event): For 'D' packet (detach) call join_inferior
5957 directly.
5958
4d393d60
JM
59592011-05-04 Joseph Myers <joseph@codesourcery.com>
5960
5961 * README: Don't mention xscale*-*-linux*.
5962 * configure.srv (xscale*-*-linux*): Don't handle target.
5963
b00ad6ff
NF
59642011-04-27 Nathan Froyd <froydnj@codesourcery.com>
5965
5966 * linux-x86-low.c (amd64_emit_const): Call memcpy instead of
5967 casting pointers.
5968 (amd64_emit_reg, amd64_emit_int_call_1, amd64_emit_void_call_2):
5969 (i386_emit_const, i386_emit_reg, i386_emit_int_call_1):
5970 (i386_emit_void_call_2): Likewise.
5971
af96c192
YQ
59722011-04-26 Yao Qi <yao@codesourcery.com>
5973
43aaf8b6
PA
5974 * linux-low.c: Move common macros to linux-ptrace.h.
5975 Include linux-ptrace.h.
af96c192
YQ
5976 * Makefile.in (linux_ptrace_h): New.
5977 (linux-low.o): Depends on linux-ptrace.h.
5978
03f2bd59
JK
59792011-04-24 Jan Kratochvil <jan.kratochvil@redhat.com>
5980
5981 * remote-utils.c (handle_accept_event): Close LISTEN_DESC only if
5982 RUN_ONCE. Comment for the LISTEN_DESC delete_file_handler call.
5983 (remote_prepare): New function with most of the TCP code from ...
5984 (remote_open): ... here. Detect PORT here unconditionally. Move also
5985 setting transport_is_reliable.
5986 * server.c (run_once): New variable.
5987 (gdbserver_usage): Document it.
5988 (main): Set run_once for `--once'. Call remote_prepare. Exit after
5989 the first run if RUN_ONCE.
5990 * server.h (run_once, remote_prepare): New declarations.
5991
7a9dd1b2
TT
59922011-04-19 Tom Tromey <tromey@redhat.com>
5993
5994 * win32-low.c (handle_load_dll): Remove duplicate "the".
5995
81239425
PM
59962011-04-07 Pierre Muller <muller@ics.u-strasbg.fr>
5997
5998 Remove support for old Cygwin 1.5 versions.
5999 * win32-low.c (win32_create_inferior): Use new cygwin_path_list
6000 function to avoid warning.
6001 (win32_add_one_solib): Use cygwin_conv_path function to avoid
6002 warning.
6003
9e0627f1
PM
60042011-03-18 Pierre Muller <muller@ics.u-strasbg.fr>
6005
6006 * gdbserver/server.h (Macro _): Define it if not available.
6007
588eebee
MS
60082011-03-14 Michael Snyder <msnyder@vmware.com>
6009
348af9f7 6010 * hostio.c (handle_close): Remove unnecessary null test.
588eebee 6011
43f70d4c
JB
60122011-03-10 Joel Brobecker <brobecker@adacore.com>
6013
6014 * Makefile.in (maintainer-clean realclean distclean): Remove
6015 "make ... subdir_do" command.
6016
348af9f7
MS
60172011-03-10 Michael Snyder <msnyder@vmware.com>
6018
6019 * tracepoint.c (tracepoint_finish_step): Fix loop variable.
6020
6021 * server.c (handle_v_run): Free alloced buffer on early return.
6022
e637a4f5
YQ
60232011-03-09 Yao Qi <yao@codesourcery.com>
6024
6025 Revert:
6026 2011-03-04 Yao Qi <yao@codesourcery.com>
6027
6028 * Makefile.in: Remove GNU make feature --directory.
6029
6030 2011-03-05 Yao Qi <yao@codesourcery.com>
6031
6032 * Makefile.in (CLEANDIRS, REQUIRED_SUBDIRS): New variable.
6033 (subdir_do): New make target. Copied from gdb/Makefile.
6034 (maintainer-clean, realclean, distclean, clean): Call corresponding
6035 make targets in common/Makefile.
6036
6037 2011-02-11 Yao Qi <yao@codesourcery.com>
6038
6039 * configure.ac: Call AC_PROG_RANLIB.
6040 * Makefile.in: Remove signals.o from OBS. Link libcommon.a.
6041 * configure: Regenerate.
6042
e6edda56
JK
60432011-03-07 Jan Kratochvil <jan.kratochvil@redhat.com>
6044
6045 * remote-utils.c (putpkt_binary_1): Calculate BUF2 size dynamically.
6046
e5141119
JB
60472011-03-06 Yao Qi <yao@codesourcery.com>
6048
6049 * Makefile.in (REQUIRED_SUBDIRS): Remove $(LIBCOMMON_DIR).
6050
64794aa4
JB
60512011-03-05 Yao Qi <yao@codesourcery.com>
6052
6053 * Makefile.in (CLEANDIRS, REQUIRED_SUBDIRS): New variable.
6054 (subdir_do): New make target. Copied from gdb/Makefile.
6055 (maintainer-clean, realclean, distclean, clean): Call corresponding
6056 make targets in common/Makefile.
6057
7a762829
YQ
60582011-03-04 Yao Qi <yao@codesourcery.com>
6059
6060 * Makefile.in: Remove GNU make feature --directory.
6061
348af9f7
MS
60622011-03-04 Michael Snyder <msnyder@vmware.com>
6063
6064 * server.c (queue_stop_reply): Call xmalloc not malloc.
6065
60662011-03-02 Michael Snyder <msnyder@vmware.com>
6067
6068 * linux-arm-low.c (arm_arch_setup): Replace malloc with xmalloc.
6069
9f72fee2
MS
60702011-02-28 Michael Snyder <msnyder@vmware.com>
6071
588eebee
MS
6072 * tracepoint.c (cmd_qtv): Discard unused value 'packet'.
6073 (cmd_qtframe): Ditto.
6074 (cmd_qtbuffer): Ditto.
6075 (cmd_bigqtbuffer): Ditto.
6076
9f72fee2
MS
6077 * utils.c (decimal2str): Initialize 'width' to nine, then
6078 don't mess with it.
6079
8040bd49
UW
60802011-02-28 Ulrich Weigand <uweigand@de.ibm.com>
6081
6082 * hostio.c (require_data): Free *data, not data.
6083
7e52cbd0
JK
60842011-02-28 Jan Kratochvil <jan.kratochvil@redhat.com>
6085
6086 * hostio.c (require_data): Use free, not xfree.
6087
9130f83e
MS
60882011-02-27 Michael Snyder <msnyder@vmware.com>
6089
4b812f4e
MS
6090 * server.c (handle_query): Discard unused value.
6091
9130f83e
MS
6092 * hostio.c (require_data): Free malloc memory before returning
6093 error.
6094
69d37113
MS
60952011-02-26 Michael Snyder <msnyder@vmware.com>
6096
6097 * linux-low.c (list_threads): Call closedir for dirent.
6098
35f5825a
MS
60992011-02-27 Michael Snyder <msnyder@vmware.com>
6100
2a589cef
MS
6101 * i386-low.c (i386-length_and_rw_bits): Comment the fact that
6102 a case statement falls through.
6103
0adea5f7
MS
6104 * linux-low.c (linux_xfer_siginfo): Fix fencepost error.
6105
35f5825a
MS
6106 * linux-amd64-ipa.c (gdb_agent_get_raw_reg): Fix fencepost error
6107 in comparison.
6108
238f1c74
MS
61092011-02-26 Michael Snyder <msnyder@vmware.com>
6110
6111 * utils.c (decimal2str): Eliminate dead code and dead param.
6112 (pulongest): Drop dead param from call to decimal2str.
6113 (plongest): Ditto.
6114
633ff500
JB
61152011-02-24 Joel Brobecker <brobecker@adacore.com>
6116
6117 Revert the following patch (not approved yet):
6118 2011-02-21 Hui Zhu <teawater@gmail.com>
6119 * tracepoint.c (tp_printf): New function.
6120 (eval_agent_expr): Handle gdb_agent_op_printf.
6121
f9c6ff72
HZ
61222011-02-21 Hui Zhu <teawater@gmail.com>
6123
6124 * tracepoint.c (tp_printf): New function.
6125 (eval_agent_expr): Handle gdb_agent_op_printf.
6126
94d5e490
TT
61272011-02-18 Tom Tromey <tromey@redhat.com>
6128
6129 * Makefile.in (tracepoint-ipa.o): Depend on ax.def.
6130 (tracepoint.o): Likewise.
6131 * tracepoint.c (enum gdb_agent_op): Use ax.def.
6132 (gdb_agent_op_names): Likewise.
6133
c7f96d2b
TT
61342011-02-18 Tom Tromey <tromey@redhat.com>
6135
6136 * tracepoint.c (enum gdb_agent_op) <gdb_agent_op_pick,
6137 gdb_agent_op_rot>: New constants.
6138 (gdb_agent_op_names): Add pick and roll.
6139 (eval_agent_expr) <gdb_agent_op_pick, gdb_agent_op_rot>: New
6140 cases.
6141
0feedb2c
JK
61422011-02-15 Jan Kratochvil <jan.kratochvil@redhat.com>
6143
6144 * aclocal.m4: Regenerated with aclocal-1.11.1.
6145
b3b9301e
PA
61462011-02-14 Pedro Alves <pedro@codesourcery.com>
6147
6148 * server.c (handle_qxfer_traceframe_info): New.
6149 (qxfer_packets): Register "traceframe-info".
6150 (handle_query): Report support for qXfer:traceframe-info:read+.
6151 * tracepoint.c (match_blocktype): New.
6152 (traceframe_find_block_type): Rename to ...
6153 (traceframe_walk_blocks): ... this. Add callback filter argument,
6154 and use it.
6155 (traceframe_find_block_type): New, reimplemented on top of
6156 traceframe_walk_blocks.
6157 (build_traceframe_info_xml): New.
6158 (traceframe_read_info): New.
6159 * server.h (traceframe_read_info): Declare.
6160
4f3e6fb7
YQ
61612011-02-11 Yao Qi <yao@codesourcery.com>
6162
6163 * configure.ac: Call AC_PROG_RANLIB.
6164 * Makefile.in: Remove signals.o from OBS. Link libcommon.a.
6165 * configure: Regenerate.
6166
764880b7
PA
61672011-02-07 Pedro Alves <pedro@codesourcery.com>
6168
6169 * server.c (gdb_read_memory): Change return semantics to allow
6170 partial transfers.
6171 (handle_search_memory_1): Adjust.
6172 (process_serial_event) <'m' packet>: Handle partial transfers.
6173 * tracepoint.c (traceframe_read_mem): Handle partial transfers.
6174
1c79eb8a
PA
61752011-01-28 Pedro Alves <pedro@codesourcery.com>
6176
6177 * regcache.c (init_register_cache): Initialize
6178 regcache->register_status.
6179 (free_register_cache): Release regcache->register_status.
6180 (regcache_cpy): Copy register_status.
6181 (registers_to_string): Print 'x's for unavailable registers.
6182 (supply_register): Mark the register's status valid or
6183 unavailable, depending on whether a buffer was passed in or not.
6184 (supply_register_zeroed): New.
6185 (supply_regblock): Mark the registers' status valid or
6186 unavailable, depending on whether a buffer was passed in or not.
6187 * regcache.h (REG_UNAVAILABLE, REG_VALID): New defines.
6188 (struct regcache): New `register_status' field.
6189 (supply_register_zeroed): Declare.
6190 * i387-fp.c (i387_xsave_to_cache): Zero out registers using
6191 supply_register_zeroed, rather than passing a NULL buffer to
6192 supply_register.
6193 * tracepoint.c (fetch_traceframe_registers): Update comment.
6194
85724a0e
PA
61952011-01-28 Pedro Alves <pedro@codesourcery.com>
6196
6197 * i387-fp.c (i387_xsave_to_cache): Make passing NULL as register
6198 buffer explicit.
6199
d08aafef
PA
62002011-01-25 Pedro Alves <pedro@codesourcery.com>
6201
6202 * server.h (decode_xfer_write): Change prototype.
6203 * remote-utils.c (decode_xfer_write): Remove `annex' parameter,
6204 and don't extract the annex here.
6205 * server.c (decode_xfer_read): Remove `annex' parameter,
6206 and don't extract the annex here.
6207 (decode_xfer): New.
6208 (struct qxfer): New.
6209 (handle_qxfer_auxv, handle_qxfer_features, handle_qxfer_libraries)
6210 (handle_qxfer_osdata, handle_qxfer_siginfo, handle_qxfer_spu)
6211 (handle_qxfer_statictrace): New functions, abstracted out from
6212 handle_query, and made to use the struct qxfer interface.
6213 (handle_threads_qxfer_proper): Rename to ...
6214 (handle_qxfer_threads_proper): ... this.
6215 (handle_threads_qxfer): Rename to ...
6216 (handle_qxfer_threads): ... this. Adjust.
6217 (qxfer_packets): New array.
6218 (handle_qxfer): New function.
6219 (handle_query): Use handle_qxfer.
6220
493e2a69
MS
62212011-01-05 Michael Snyder <msnyder@msnyder-server.eng.vmware.com>
6222
6223 * gdbreplay.c: Shorten lines of >= 80 columns.
6224 * linux-low.c: Ditto.
6225 * linux-ppc-low.c: Ditto.
6226 * linux-s390-low.c: Ditto.
6227 * linux-sparc-low.c: Ditto.
6228 * linux-x86-low.c: Ditto.
6229 * linux-xtensa-low.c: Ditto.
6230 * mem-break.c: Ditto.
6231 * nto-low.c: Ditto.
6232 * regcache.h: Ditto.
6233 * remote-utils.c: Ditto.
6234 * server.c: Ditto.
6235 * server.h: Ditto.
6236 * thread-db.c: Ditto.
6237 * tracepoint.c: Ditto.
6238 * utils.c: Ditto.
6239 * win32-low.h: Ditto.
6240
44944448
JB
62412011-01-05 Joel Brobecker <brobecker@adacore.com>
6242
6243 * gdbserver/configure.ac, gdbserver/gdbserver.1: Copyright year
6244 update.
6245
71ce852c
JB
62462011-01-01 Joel Brobecker <brobecker@adacore.com>
6247
6248 * server.c (gdbserver_version): Update copyright year in version
6249 output.
6250 * gdbreplay.c (gdbreplay_version): Ditto.
6251
eb826dc6
MF
62522010-12-29 Jie Zhang <jie.zhang@analog.com>
6253
6254 * configure.srv (bfin-*-*linux*): Handle Blackfin/Linux targets.
6255 * linux-bfin-low.c: New file.
6256 * linux-low.c: Define PT_TEXT_ADDR, PT_TEXT_END_ADDR, and
6257 PT_DATA_ADDR for BFIN targets.
6258 * Makefile.in (SFILES): Add linux-bfin-low.c.
6259 (clean): Remove reg-bfin.c.
6260 (linux-bfin-low.o, reg-bfin.o, reg-bfin.c): New targets.
6261 * README: Mention supported Blackfin targets.
6262
39ab222a
MF
62632010-12-23 Mike Frysinger <vapier@gentoo.org>
6264
6265 * .gitignore: New file.
6266
a1f2ce7d
MF
62672010-11-16 Mike Frysinger <vapier@gentoo.org>
6268
6269 * linux-low.c (linux_tracefork_child): Add char* cast to arg.
6270
f474844c
JZ
62712010-10-22 Jie Zhang <jie@codesourcery.com>
6272
6273 * Makefile.in: Add FLAGS_TO_PASS variable.
6274 (install): Remove dependency of install-only and recursively
6275 invoke make for install-only.
6276
f1048712
DE
62772010-10-04 Doug Evans <dje@google.com>
6278
6279 * Makefile.in (uninstall): Use $(DESTDIR).
6280
b53a1623
PA
62812010-09-24 Pedro Alves <pedro@codesourcery.com>
6282
e6ee044d
PA
6283 PR gdb/11842
6284
b53a1623
PA
6285 * linux-x86-low.c (compat_siginfo_from_siginfo)
6286 (siginfo_from_compat_siginfo): Also copy si_pid and si_uid when
6287 si_code is < 0. Check for si_code == SI_TIMER before checking for
6288 si_code < 0.
6289
fa1bd1e4
JB
62902010-09-13 Joel Brobecker <brobecker@adacore.com>
6291
6292 * lynx-i386-low.c: New file.
6293 * configure.srv: Add handling of i[34567]86-*-lynxos* targets.
6294
47fac8f8
JB
62952010-09-13 Joel Brobecker <brobecker@adacore.com>
6296
6297 * lynx-low.c (ptrace_request_to_str): Remove handling for
6298 request values that have been removed in LynxOS 5.x.
6299
1adfc54d
JB
63002010-09-13 Joel Brobecker <brobecker@adacore.com>
6301
6302 * lynx-low.c, lynx-ppc-loc.c: Include <sys/ptrace.h> instead of
6303 <ptrace.h>
6304
c2a66c29
NS
63052010-09-09 Nathan Sidwell <nathan@codesourcery.com>
6306
6307 * configure.ac: Add --enable-inprocess-agent option.
6308 * configure: Rebuilt.
6309
32fcada3
YQ
63102010-09-06 Yao Qi <yao@codesourcery.com>
6311
6312 * linux-low.c (linux_kill): Remove unused variable.
6313 (linux_stabilize_threads): Likewise.
6314 * server.c (start_inferior): Likewise.
6315 (queue_stop_reply_callback): Likewise.
6316 * tracepoint.c (do_action_at_tracepoint): Likewise.
6317
0cccb683
YQ
63182010-09-06 Yao Qi <yao@codesourcery.com>
6319
6320 * linux-low.c (maybe_move_out_of_jump_pad): Restore current_inferior
6321 on return.
6322
423ec54c
JK
63232010-09-06 Jan Kratochvil <jan.kratochvil@redhat.com>
6324
6325 * target.c (mywait) <TARGET_WAITKIND_EXITED>: Fix to use INTEGER.
6326
12ac6819
PA
63272010-09-06 Pedro Alves <pedro@codesourcery.com>
6328
6329 * Makefile.in (install-only): Replace $IPA_DEPFILES with
6330 "$(IPA_DEPFILES)".
6331
8ed54b31
JB
63322010-09-01 Joel Brobecker <brobecker@adacore.com>
6333
6334 * gdbserver/lynx-low.c, gdbserver/lynx-low.h,
6335 gdbserver/lynx-ppc-low.c: New files.
6336 * Makefile.in (lynx_low_h): New variable.
6337 (lynx-low.o, lynx-ppc-low.o): New rules.
6338 * configure.ac: On LynxOS, link with -lnetinet.
6339 * configure.srv: Add handling of powerpc-*-lynxos* targets.
6340 * configure: regenerate.
6341
bb0116a4
JB
63422010-09-01 Joel Brobecker <brobecker@adacore.com>
6343
6344 * Makefile.in (vasprintf.o, vsnprintf.o): New rules.
6345 * configure.ac: Add check for vasprintf and vsnprintf.
6346 * configure, config.in: Regenerate.
6347 * server.h (vasprintf, vsnprintf): Add conditional declarations.
6348
a778ab81 63492010-09-01 Joel Brobecker <brobecker@adacore.com>
6350
6351 * gdbreplay.c: Move include of alloca.h up, next to include of
6352 malloc.h.
6353 * server.h: Add include of malloc.h.
6354 * mem-break.c: Remove include of malloc.h.
6355 * server.c, tracepoint.c, utils.c, win32-low.c: Likewise.
6356
8b034a19 63572010-09-01 Joel Brobecker <brobecker@adacore.com>
6358
6359 * Makefile.in (memmem.o): Build with -Wno-error.
6360
63612010-09-01 Joel Brobecker <brobecker@adacore.com>
6362
6363 * utils.c (xsnprintf): Make non-static.
6364 * server.h: Add xsnprintf declaration.
6365 * linux-low.c, nto-low.c, target.c, thread-db.c, tracepoint.c:
6366 replace calls to snprintf by calls to xsnprintf throughout.
6367
63682010-09-01 Joel Brobecker <brobecker@adacore.com>
6369
6370 * configure.ac: Add configure check for alloca.
6371 * configure, config.in: Regenerate.
6372 * server.h: Include alloca.h if it exists.
6373 * gdbreplay.c: Include alloca.h if it exists.
6374
1a981360
PA
63752010-08-28 Pedro Alves <pedro@codesourcery.com>
6376
6377 * linux-low.c (__SIGRTMIN): Define if not already defined.
6378 (linux_create_inferior): Check for __ANDROID__ rather than
6379 __SIGRTMIN.
6380 (enqueue_one_deferred_signal): Don't requeue non-RT signals that
6381 are already deferred.
6382 (linux_wait_1): Check for __ANDROID__ rather than __SIGRTMIN.
6383 (linux_resume_one_thread): Don't queue a SIGSTOP if the lwp is
6384 stopped and already has a pending signal to report.
6385 (proceed_one_lwp): : Don't queue a SIGSTOP if the lwp already has
6386 a pending signal to report or is moving out of a jump pad.
6387 (linux_init_signals): Check for __ANDROID__ rather than
6388 __SIGRTMIN.
6389
b4d51a55
PA
63902010-08-28 Pedro Alves <pedro@codesourcery.com>
6391
6392 * linux-low.c (linux_stabilize_threads): Wrap debug output in a
6393 debug_threads check. Avoid a linear search when not doing debug
6394 output.
6395
ec48365d
PA
63962010-08-27 Pedro Alves <pedro@codesourcery.com>
6397
6398 * event-loop.c (event_handle_func): Adjust to use gdb_fildes_t.
6399 (struct gdb_event) <fd>: Change type to gdb_fildes_t.
6400 (struct file_handler) <fd>: Change type to gdb_fildes_t.
6401 (process_event): Change local fd's type to gdb_fildes_t.
6402 (create_file_handler): Adjust prototype.
6403 (delete_file_handler): Adjust prototype.
6404 (handle_file_event): Adjust prototype. Use pfildes.
6405 (create_file_event): Adjsut prototype.
6406 * remote-utils.c (remote_desc, listen_desc): Change type to
6407 gdb_fildes_t.
6408 * server.h: New gdb_fildes_t typedef.
6409 [USE_WIN32API]: Include winsock2.h.
6410 (delete_file_handler, add_file_handler): Adjust prototypes.
6411 (pfildes): Declare.
6412 * utils.c (pfildes): New.
6413
854d88f0
PA
64142010-08-27 Pedro Alves <pedro@codesourcery.com>
6415
6416 * configure.ac (build_warnings): Add -Wno-char-subscripts.
6417 * configure: Regenerate.
6418
0146f85b
PA
64192010-08-27 Pedro Alves <pedro@codesourcery.com>
6420
6421 * linux-low.c (linux_unprepare_to_access_memory): Rename to ...
6422 (linux_done_accessing_memory): ... this.
6423 (linux_target_ops): Adjust.
6424 * linux-x86-low.c (x86_insert_point, x86_remove_point): Adjust.
6425 * nto-low.c (nto_target_ops): Adjust comment.
6426 * server.c (gdb_read_memory, gdb_write_memory): Adjust.
6427 * spu-low.c (spu_target_ops): Adjust comment.
6428 * target.h (target_ops): Rename unprepare_to_access_memory field
6429 to done_accessing_memory.
6430 (unprepare_to_access_memory): Rename to ...
6431 (done_accessing_memory): ... this.
6432
90d74c30
PA
64332010-08-26 Pedro Alves <pedro@codesourcery.com>
6434
6435 * linux-low.c (linux_prepare_to_access_memory): New.
6436 (linux_unprepare_to_access_memory): New.
6437 (linux_target_ops): Install them.
6438 * server.c (read_memory): Rename to ...
6439 (gdb_read_memory): ... this. Use
6440 prepare_to_access_memory/prepare_to_access_memory.
6441 (write_memory): Rename to ...
6442 (gdb_write_memory): ... this. Use
6443 prepare_to_access_memory/prepare_to_access_memory.
6444 (handle_search_memory_1): Adjust.
6445 (process_serial_event): Adjust.
6446 * target.h (struct target_ops): New fields
6447 prepare_to_access_memory and unprepare_to_access_memory.
6448 (prepare_to_access_memory, unprepare_to_access_memory): New.
6449 * linux-x86-low.c (x86_insert_point, x86_remove_point): Use
6450 prepare_to_access_memory/prepare_to_access_memory.
6451 * nto-low.c (nto_target_ops): Adjust.
6452 * spu-low.c (spu_target_ops): Adjust.
6453 * win32-low.c (win32_target_ops): Adjust.
6454
fd467969
PA
64552010-08-26 Pedro Alves <pedro@codesourcery.com>
6456
6457 * Makefile.in (WARN_CFLAGS): Get it from configure.
6458 (WERROR_CFLAGS): New.
6459 (INTERNAL_CFLAGS): Add WERROR_CFLAGS.
6460 * configure.ac: Introduce --enable-werror, which adds -Werror to
6461 the compiler command line. Enabled by default. Disable with
6462 --disable-werror. Add -Wdeclaration-after-statement
6463 Wpointer-arith and -Wformat-nonliteral to warning flags.
6464 * configure: Regenerate.
6465
331e2f5f
PA
64662010-08-26 Pedro Alves <pedro@codesourcery.com>
6467
6468 * mem-break.c [HAVE_MALLOC_H]: Include malloc.h.
6469
e581f2b4
PA
64702010-08-26 Pedro Alves <pedro@codesourcery.com>
6471
6472 * gdbreplay.c (remote_error): New.
6473 (gdbchar): New.
6474 (expect): Use gdbchar. Check for error reading from GDB.
6475 Clarify sync error output.
6476 (play): Check for errors writing to GDB.
6477 * linux-low.c (sigchld_handler): Really ignore `write' errors.
6478 * remote-utils.c (getpkt): Check for errors writing to the remote
6479 descriptor.
6480
3c11dd79
PA
64812010-08-25 Pedro Alves <pedro@codesourcery.com>
6482
6483 * linux-low.c (linux_wait_1): Move non-debugging code out of
6484 `debug_threads' control.
6485
d20a8ad9
PA
64862010-08-25 Pedro Alves <pedro@codesourcery.com>
6487
6488 * linux-low.c (linux_wait_1): Don't set last_status here.
6489 * server.c (push_event, queue_stop_reply_callback): Assert we're
6490 not pushing a TARGET_WAITKIND_IGNORE event.
6491 (start_inferior, start_inferior, attach_inferior, handle_v_cont)
6492 (myresume, handle_target_event): Set the thread's last_resume_kind
6493 and last_status from the target returned status.
6494
964e4306
PA
64952010-08-25 Pedro Alves <pedro@codesourcery.com>
6496
6497 PR threads/10729
6498
6499 * linux-x86-low.c (update_debug_registers_callback): New.
6500 (i386_dr_low_set_addr): Use it.
6501 (i386_dr_low_get_addr): New.
6502 (i386_dr_low_set_control): Use update_debug_registers_callback.
6503 (i386_dr_low_get_control): New.
6504 (i386_dr_low_get_status): Adjust.
6505 * linux-low.c (linux_stop_lwp): New.
6506 * linux-low.h (linux_stop_lwp): Declare.
6507
6508 * i386-low.c (I386_DR_GET_RW_LEN): Take the dr7 contents as
6509 argument instead of a i386_debug_reg_state.
6510 (I386_DR_WATCH_HIT): Take the dr6 contents as argument instead of
6511 a i386_debug_reg_state.
6512 (i386_insert_aligned_watchpoint): Adjust.
6513 (i386_remove_aligned_watchpoint): Adjust.
6514 (i386_low_stopped_data_address): Read the debug registers from the
6515 inferior instead of from the mirrors.
6516 * i386-low.h (struct i386_debug_reg_state): Extend comment.
6517 (i386_dr_low_get_addr): Declare.
6518 (i386_dr_low_get_control): Declare.
6519 (i386_dr_low_get_status): Change prototype.
6520
6521 * win32-i386-low.c (dr_status_mirror, dr_control_mirror): New globals.
6522 (i386_dr_low_get_addr): New.
6523 (i386_dr_low_get_control): New.
6524 (i386_dr_low_get_status): Adjust prototype. Return
6525 dr_status_mirror.
6526 (i386_initial_stuff): Clear dr_status_mirror and
6527 dr_control_mirror.
6528 (i386_get_thread_context): Adjust.
6529 (i386_set_thread_context): Adjust.
6530 (i386_thread_added): Adjust.
6531
5f21a75b
PA
65322010-08-24 Pedro Alves <pedro@codesourcery.com>
6533
6534 * linux-low.h (linux_thread_area): Delete declaration.
6535
3e4c1235
TS
65362010-08-11 Thomas Schwinge <thomas@codesourcery.com>
6537
6538 * linux-low.c (linux_wait_1): Correctly return the ptid of the child
6539 after its termination.
6540
1971b033
PA
65412010-08-09 Pedro Alves <pedro@codesourcery.com>
6542
6543 * linux-low.c (gdb_wants_lwp_stopped): Delete.
6544 (gdb_wants_all_stopped): Delete.
6545 (linux_wait_1): Don't call them.
6546 * server.c (handle_v_cont): Tag all threads as want-stopped.
6547 (gdb_wants_thread_stopped): Fix comments. Tag the thread that
6548 stopped as "client-wants-stopped".
6549
310444ac
PA
65502010-07-31 Pedro Alves <pedro@codesourcery.com>
6551
6552 * Makefile.in (signals_h): New.
6553 (server_h): Depend on it.
6554 (server.o): Don't depend on $(signals_def).
6555 (signals.o): Depend on $(signals_def).
6556
a19cae16
JK
65572010-07-31 Jan Kratochvil <jan.kratochvil@redhat.com>
6558
6559 * Makefile.in (signals_def): New.
6560 (server_h): Append include/gdb/signals.h and signals_def.
6561 (server.o): Append signals_def.
6562
30d50328
JK
65632010-07-25 Jan Kratochvil <jan.kratochvil@redhat.com>
6564
6565 * server.c (handle_target_event): Use target_signal_to_host for
6566 resume_info.sig initialization.
6567 * target.h (struct thread_resume) <sig>: New comment.
6568
5c3216e2
OS
65692010-07-20 Ozkan Sezer <sezeroz@gmail.com>
6570
c6f46ca0
OS
6571 * server.c (handle_query): strcpy() the returned string from paddress()
6572 instead of sprintf().
5c3216e2
OS
6573 * utils.c (paddress): Return phex_nz().
6574
6bd31874
JB
65752010-07-07 Joel Brobecker <brobecker@adacore.com>
6576
6577 * server.c (handle_v_cont): Call mourn_inferior if process
6578 just exited.
6579 (myresume): Likewise.
6580
0fb4aa4b
PA
65812010-07-01 Pedro Alves <pedro@codesourcery.com>
6582
6583 Static tracepoints, and integration with UST.
6584
6585 * configure.ac: Handle --with-ust. substitute ustlibs and ustinc.
6586 * mem-break.c (uninsert_all_breakpoints)
6587 (reinsert_all_breakpoints): New.
6588 * mem-break.h (reinsert_all_breakpoints, uninsert_all_breakpoints):
6589 * tracepoint.c (ust_loaded, helper_thread_id, cmd_buf): New.
6590 (gdb_agent_ust_loaded, helper_thread_id)
6591 (gdb_agent_helper_thread_id): New macros.
6592 (struct ipa_sym_addresses): Add addr_ust_loaded,
6593 addr_helper_thread_id, addr_cmd_buf.
6594 (symbol_list): Add ust_loaded, helper_thread_id, cmd_buf.
6595 (in_process_agent_loaded_ust): New.
6596 (write_e_ust_not_loaded): New.
6597 (maybe_write_ipa_ust_not_loaded): New.
6598 (struct collect_static_trace_data_action): New.
6599 (enum tracepoint_type) <static_tracepoint>: New.
6600 (struct tracepoint) <handle>: Mention static tracepoints.
6601 (struct static_tracepoint_ctx): New.
6602 (CMD_BUF_SIZE): New.
6603 (add_tracepoint_action): Handle static tracepoint actions.
6604 (unprobe_marker_at): New.
6605 (clear_installed_tracepoints): Handle static tracepoints.
6606 (cmd_qtdp): Handle static tracepoints.
6607 (probe_marker_at): New.
6608 (cmd_qtstart): Handle static tracepoints.
6609 (response_tracepoint): Handle static tracepoints.
6610 (cmd_qtfstm, cmd_qtsstm, cmd_qtstmat): New.
6611 (handle_tracepoint_query): Handle qTfSTM, qTsSTM and qTSTMat.
6612 (get_context_regcache): Handle static tracepoints.
6613 (do_action_at_tracepoint): Handle static tracepoint actions.
6614 (traceframe_find_block_type): Handle static trace data blocks.
6615 (traceframe_read_sdata): New.
6616 (download_tracepoints): Download static tracepoint actions.
6617 [HAVE_UST] Include ust/ust.h, dlfcn.h, sys/socket.h, and sys/un.h.
6618 (GDB_PROBE_NAME): New.
6619 (ust_ops): New.
6620 (GET_UST_SYM): New.
6621 (USTF): New.
6622 (dlsym_ust): New.
6623 (ust_marker_to_static_tracepoint): New.
6624 (gdb_probe): New.
6625 (collect_ust_data_at_tracepoint): New.
6626 (gdb_ust_probe): New.
6627 (UNIX_PATH_MAX, SOCK_DIR): New.
6628 (gdb_ust_connect_sync_socket): New.
6629 (resume_thread, stop_thread): New.
6630 (run_inferior_command): New.
6631 (init_named_socket): New.
6632 (gdb_ust_socket_init): New.
6633 (cstr_to_hexstr): New.
6634 (next_st): New.
6635 (first_marker, next_marker): New.
6636 (response_ust_marker): New.
6637 (cmd_qtfstm, cmd_qtsstm): New.
6638 (unprobe_marker_at, probe_marker_at): New.
6639 (cmd_qtstmat, gdb_ust_thread): New.
6640 (gdb_ust_init): New.
6641 (initialize_tracepoint_ftlib): Call gdb_ust_init.
6642 * linux-amd64-ipa.c [HAVE_UST]: Include ust/processor.h
6643 (ST_REGENTRY): New.
6644 (x86_64_st_collect_regmap): New.
6645 (X86_64_NUM_ST_COLLECT_GREGS): New.
6646 (AMD64_RIP_REGNUM): New.
6647 (supply_static_tracepoint_registers): New.
6648 * linux-i386-ipa.c [HAVE_UST]: Include ust/processor.h
6649 (ST_REGENTRY): New.
6650 (i386_st_collect_regmap): New.
6651 (i386_NUM_ST_COLLECT_GREGS): New.
6652 (supply_static_tracepoint_registers): New.
6653 * server.c (handle_query): Handle qXfer:statictrace:read.
6654 <qSupported>: Report support for StaticTracepoints, and
6655 qXfer:statictrace:read features.
6656 * server.h (traceframe_read_sdata)
6657 (supply_static_tracepoint_registers): Declare.
6658 * remote-utils.c (convert_int_to_ascii, hexchars, ishex, tohex)
6659 (unpack_varlen_hex): Include in IPA build.
6660 * Makefile.in (ustlibs, ustinc): New.
6661 (IPA_OBJS): Add remote-utils-ipa.o.
6662 ($(IPA_LIB)): Link -ldl and -lpthread.
6663 (UST_CFLAGS): New.
6664 (IPAGENT_CFLAGS): Add UST_CFLAGS.
6665 * config.in, configure: Regenerate.
6666
9e4344e5
PA
66672010-06-20 Ian Lance Taylor <iant@google.com>
6668 Pedro Alves <pedro@codesourcery.com>
6669
6670 * linux-x86-low.c (always_true): Delete.
6671 (EMIT_ASM, EMIT_ASM32): Use an uncondition asm jmp instead of
6672 trying to fool the compiler with always_true.
6673
c6beb2cb
PA
66742010-06-20 Pedro Alves <pedro@codesourcery.com>
6675
6676 * tracepoint.c (condition_true_at_tracepoint): Don't run compiled
6677 conditions in gdbserver.
6678
d2ed6730
UW
66792010-06-19 Ulrich Weigand <uweigand@de.ibm.com>
6680
6681 * spu-low.c (spu_read_memory): Wrap around local store limit.
6682 (spu_write_memory): Likewise.
6683
4e29fb54
PA
66842010-06-15 Pedro Alves <pedro@codesourcery.com>
6685
6686 * linux-x86-low.c (amd64_emit_const, amd64_emit_void_call_2)
6687 (i386_emit_const, i386_emit_void_call_2): Replace int64_t uses with
6688 LONGEST uses.
6689 * server.h (struct emit_ops): Replace int64_t uses with LONGEST
6690 uses.
6691 * tracepoint.c (emit_const, emit_void_call_2): Replace int64_t
6692 uses with LONGEST uses.
6693
6a271cae
PA
66942010-06-14 Stan Shebs <stan@codesourcery.com>
6695 Pedro Alves <pedro@codesourcery.com>
6696
6697 Bytecode compiler.
6698
6699 * linux-x86-low.c: Include limits.h.
6700 (add_insns): New.
6701 (always_true): New.
6702 (EMIT_ASM): New.
6703 (EMIT_ASM32): New.
6704 (amd64_emit_prologue, amd64_emit_epilogue, amd64_emit_add)
6705 (amd64_emit_sub, amd64_emit_mul, amd64_emit_lsh)
6706 (amd64_emit_rsh_signed, amd64_emit_rsh_unsigned, amd64_emit_ext,
6707 (amd64_emit_log_not, amd64_emit_bit_and, amd64_emit_bit_or)
6708 (amd64_emit_bit_xor, amd64_emit_bit_not, amd64_emit_equal,
6709 (amd64_emit_less_signed, amd64_emit_less_unsigned, amd64_emit_ref,
6710 (amd64_emit_if_goto, amd64_emit_goto, amd64_write_goto_address)
6711 (amd64_emit_const, amd64_emit_call, amd64_emit_reg)
6712 (amd64_emit_pop, amd64_emit_stack_flush, amd64_emit_zero_ext)
6713 (amd64_emit_swap, amd64_emit_stack_adjust, amd64_emit_int_call_1)
6714 (amd64_emit_void_call_2): New.
6715 (amd64_emit_ops): New.
6716 (i386_emit_prologue, i386_emit_epilogue, i386_emit_add)
6717 (i386_emit_sub,i386_emit_mul, i386_emit_lsh, i386_emit_rsh_signed)
6718 (i386_emit_rsh_unsigned, i386_emit_ext, i386_emit_log_not)
6719 (i386_emit_bit_and, i386_emit_bit_or, i386_emit_bit_xor)
6720 (i386_emit_bit_not, i386_emit_equal, i386_emit_less_signed)
6721 (i386_emit_less_unsigned, i386_emit_ref, i386_emit_if_goto)
6722 (i386_emit_goto, i386_write_goto_address, i386_emit_const)
6723 (i386_emit_call, i386_emit_reg, i386_emit_pop)
6724 (i386_emit_stack_flush, i386_emit_zero_ext, i386_emit_swap)
6725 (i386_emit_stack_adjust, i386_emit_int_call_1)
6726 (i386_emit_void_call_2): New.
6727 (i386_emit_ops): New.
6728 (x86_emit_ops): New.
6729 (the_low_target): Install x86_emit_ops.
6730 * server.h (struct emit_ops): New.
6731 (get_raw_reg_func_addr): Declare.
6732 (current_insn_ptr, emit_error): Declare.
6733 * tracepoint.c (get_raw_reg, get_trace_state_variable_value)
6734 (set_trace_state_variable_value): New defines.
6735 (struct ipa_sym_addresses): New fields addr_get_raw_reg,
6736 addr_get_trace_state_variable_value and
6737 addr_set_trace_state_variable_value.
6738 (symbol_list): New fields for get_raw_reg,
6739 get_trace_state_variable_value and set_trace_state_variable_value.
6740 (condfn): New typedef.
6741 (struct tracepoint): New field `compiled_cond'.
6742 (do_action_at_tracepoint): Clear compiled_cond.
6743 (get_trace_state_variable_value, set_trace_state_variable_value):
6744 Export in the IPA.
6745 (condition_true_at_tracepoint): If there's a compiled condition,
6746 run that.
6747 (current_insn_ptr, emit_error): New globals.
6748 (struct bytecode_address): New.
6749 (get_raw_reg_func_addr): New.
6750 (emit_prologue, emit_epilogue, emit_add, emit_sub, emit_mul)
6751 (emit_lsh, emit_rsh_signed, emit_rsh_unsigned, emit_ext)
6752 (emit_log_not, emit_bit_and, emit_bit_or, emit_bit_xor)
6753 (emit_bit_not, emit_equal, emit_less_signed, emit_less_unsigned)
6754 (emit_ref, emit_if_goto, emit_goto, write_goto_address, emit_const)
6755 (emit_reg, emit_pop, emit_stack_flush, emit_zero_ext, emit_swap)
6756 (emit_stack_adjust, emit_int_call_1, emit_void_call_2): New.
6757 (compile_tracepoint_condition, compile_bytecodes): New.
6758 * target.h (emit_ops): Forward declare.
6759 (struct target_ops): New field emit_ops.
6760 (target_emit_ops): New.
6761 * linux-amd64-ipa.c (gdb_agent_get_raw_reg): New.
6762 * linux-i386-ipa.c (gdb_agent_get_raw_reg): New.
6763 * linux-low.c (linux_emit_ops): New.
6764 (linux_target_ops): Install it.
6765 * linux-low.h (struct linux_target_ops): New field emit_ops.
6766
92b72907
UW
67672010-06-14 Ulrich Weigand <uweigand@de.ibm.com>
6768
6769 * linux-ppc-low.c (ppc_arch_setup): Use private regcache to test MSR.
6770 * linux-s390-low.c (ppc_arch_setup): Use private regcache to test PSW.
6771
fa593d66
PA
67722010-06-01 Pedro Alves <pedro@codesourcery.com>
6773 Stan Shebs <stan@codesourcery.com>
6774
6775 * Makefile.in (IPA_DEPFILES, extra_libraries): New.
6776 (all): Depend on $(extra_libraries).
6777 (install-only): Install the IPA.
6778 (IPA_OBJS, IPA_LIB): New.
6779 (clean): Remove the IPA lib.
6780 (IPAGENT_CFLAGS): New.
6781 (tracepoint-ipa.o, utils-ipa.o, remote-utils-ipa.o)
6782 (regcache-ipa.o, i386-linux-ipa.o, linux-i386-ipa.o)
6783 (linux-amd64-ipa.o, amd64-linux-ipa.o): New rules.
6784 * linux-amd64-ipa.c, linux-i386-ipa.c: New files.
6785 * configure.ac: Check for atomic builtins support in the compiler.
6786 (IPA_DEPFILES, extra_libraries): Define.
6787 * configure.srv (ipa_obj): Add description.
6788 (ipa_i386_linux_regobj, ipa_amd64_linux_regobj): Define.
6789 (i[34567]86-*-linux*): Set ipa_obj.
6790 (x86_64-*-linux*): Set ipa_obj.
6791 * linux-low.c (stabilizing_threads): New.
6792 (supports_fast_tracepoints): New.
6793 (linux_detach): Stabilize threads before detaching.
6794 (handle_tracepoints): Handle internal tracing breakpoints. Assert
6795 the lwp is either not stabilizing, or is moving out of a jump pad.
6796 (linux_fast_tracepoint_collecting): New.
6797 (maybe_move_out_of_jump_pad): New.
6798 (enqueue_one_deferred_signal): New.
6799 (dequeue_one_deferred_signal): New.
6800 (linux_wait_for_event_1): If moving out of a jump pad, defer
6801 pending signals to later.
6802 (linux_stabilize_threads): New.
6803 (linux_wait_1): Check if threads need moving out of jump pads, and
6804 do it if so.
6805 (stuck_in_jump_pad_callback): New.
6806 (move_out_of_jump_pad_callback): New.
6807 (lwp_running): New.
6808 (linux_resume_one_lwp): Handle moving out of jump pads.
6809 (linux_set_resume_request): Dequeue deferred signals.
6810 (need_step_over_p): Also step over fast tracepoint jumps.
6811 (start_step_over): Also uninsert fast tracepoint jumps.
6812 (finish_step_over): Also reinsert fast tracepoint jumps.
6813 (linux_install_fast_tracepoint_jump): New.
6814 (linux_target_ops): Install linux_stabilize_threads and
6815 linux_install_fast_tracepoint_jump_pad.
6816 * linux-low.h (linux_target_ops) <get_thread_area,
6817 install_fast_tracepoint_jump_pad>: New fields.
6818 (struct lwp_info) <collecting_fast_tracepoint,
6819 pending_signals_to_report, exit_jump_pad_bkpt>: New fields.
6820 (linux_get_thread_area): Declare.
6821 * linux-x86-low.c (jump_insn): New.
6822 (x86_get_thread_area): New.
6823 (append_insns): New.
6824 (push_opcode): New.
6825 (amd64_install_fast_tracepoint_jump_pad): New.
6826 (i386_install_fast_tracepoint_jump_pad): New.
6827 (x86_install_fast_tracepoint_jump_pad): New.
6828 (the_low_target): Install x86_get_thread_area and
6829 x86_install_fast_tracepoint_jump_pad.
6830 * mem-break.c (set_raw_breakpoint_at): Use read_inferior_memory.
6831 (struct fast_tracepoint_jump): New.
6832 (fast_tracepoint_jump_insn): New.
6833 (fast_tracepoint_jump_shadow): New.
6834 (find_fast_tracepoint_jump_at): New.
6835 (fast_tracepoint_jump_here): New.
6836 (delete_fast_tracepoint_jump): New.
6837 (set_fast_tracepoint_jump): New.
6838 (uninsert_fast_tracepoint_jumps_at): New.
6839 (reinsert_fast_tracepoint_jumps_at): New.
6840 (set_breakpoint_at): Use write_inferior_memory.
6841 (uninsert_raw_breakpoint): Use write_inferior_memory.
6842 (check_mem_read): Mask out fast tracepoint jumps.
6843 (check_mem_write): Mask out fast tracepoint jumps.
6844 * mem-break.h (struct fast_tracepoint_jump): Forward declare.
6845 (set_fast_tracepoint_jump): Declare.
6846 (delete_fast_tracepoint_jump)
6847 (fast_tracepoint_jump_here, uninsert_fast_tracepoint_jumps_at)
6848 (reinsert_fast_tracepoint_jumps_at): Declare.
6849 * regcache.c: Don't compile many functions when building the
6850 in-process agent library.
6851 (init_register_cache) [IN_PROCESS_AGENT]: Don't allow allocating
6852 the register buffer in the heap.
6853 (free_register_cache): If the register buffer isn't owned by the
6854 regcache, don't free it.
6855 (set_register_cache) [IN_PROCESS_AGENT]: Don't re-alocate
6856 pre-existing register caches.
6857 * remote-utils.c (convert_int_to_ascii): Constify `from' parameter
6858 type.
6859 (convert_ascii_to_int): : Constify `from' parameter type.
6860 (decode_M_packet, decode_X_packet): Replace the `to' parameter by
6861 a `to_p' pointer to pointer parameter. If TO_P is NULL, malloc
6862 the needed buffer in-place.
6863 (relocate_instruction): New.
6864 * server.c (handle_query) <qSymbols>: If the target supports
6865 tracepoints, give it a chance of looking up symbols. Report
6866 support for fast tracepoints.
6867 (handle_status): Stabilize threads.
6868 (process_serial_event): Adjust.
6869 * server.h (struct fast_tracepoint_jump): Forward declare.
6870 (struct process_info) <fast_tracepoint_jumps>: New field.
6871 (convert_ascii_to_int, convert_int_to_ascii): Adjust.
6872 (decode_X_packet, decode_M_packet): Adjust.
6873 (relocate_instruction): Declare.
6874 (in_process_agent_loaded): Declare.
6875 (tracepoint_look_up_symbols): Declare.
6876 (struct fast_tpoint_collect_status): Declare.
6877 (fast_tracepoint_collecting): Declare.
6878 (force_unlock_trace_buffer): Declare.
6879 (handle_tracepoint_bkpts): Declare.
6880 (initialize_low_tracepoint)
6881 (supply_fast_tracepoint_registers) [IN_PROCESS_AGENT]: Declare.
6882 * target.h (struct target_ops) <stabilize_threads,
6883 install_fast_tracepoint_jump_pad>: New fields.
6884 (stabilize_threads, install_fast_tracepoint_jump_pad): New.
6885 * tracepoint.c [HAVE_MALLOC_H]: Include malloc.h.
6886 [HAVE_STDINT_H]: Include stdint.h.
6887 (trace_debug_1): Rename to ...
6888 (trace_vdebug): ... this.
6889 (trace_debug): Rename to ...
6890 (trace_debug_1): ... this. Add `level' parameter.
6891 (trace_debug): New.
6892 (ATTR_USED, ATTR_NOINLINE): New.
6893 (IP_AGENT_EXPORT): New.
6894 (gdb_tp_heap_buffer, gdb_jump_pad_buffer, gdb_jump_pad_buffer_end)
6895 (collecting, gdb_collect, stop_tracing, flush_trace_buffer)
6896 (about_to_request_buffer_space, trace_buffer_is_full)
6897 (stopping_tracepoint, expr_eval_result, error_tracepoint)
6898 (tracepoints, tracing, trace_buffer_ctrl, trace_buffer_ctrl_curr)
6899 (trace_buffer_lo, trace_buffer_hi, traceframe_read_count)
6900 (traceframe_write_count, traceframes_created)
6901 (trace_state_variables)
6902 New renaming defines.
6903 (struct ipa_sym_addresses): New.
6904 (STRINGIZE_1, STRINGIZE, IPA_SYM): New.
6905 (symbol_list): New.
6906 (ipa_sym_addrs): New.
6907 (all_tracepoint_symbols_looked_up): New.
6908 (in_process_agent_loaded): New.
6909 (write_e_ipa_not_loaded): New.
6910 (maybe_write_ipa_not_loaded): New.
6911 (tracepoint_look_up_symbols): New.
6912 (debug_threads) [IN_PROCESS_AGENT]: New.
6913 (read_inferior_memory) [IN_PROCESS_AGENT]: New.
6914 (UNKNOWN_SIDE_EFFECTS): New.
6915 (stop_tracing): New.
6916 (flush_trace_buffer): New.
6917 (stop_tracing_bkpt): New.
6918 (flush_trace_buffer_bkpt): New.
6919 (read_inferior_integer): New.
6920 (read_inferior_uinteger): New.
6921 (read_inferior_data_pointer): New.
6922 (write_inferior_data_pointer): New.
6923 (write_inferior_integer): New.
6924 (write_inferior_uinteger): New.
6925 (struct collect_static_trace_data_action): Delete.
6926 (enum tracepoint_type): New.
6927 (struct tracepoint) <type>: New field `type'.
43aaf8b6
PA
6928 <actions_str, step_actions, step_actions_str>: Only include in
6929 GDBserver.
fa593d66
PA
6930 <orig_size, obj_addr_on_target, adjusted_insn_addr>
6931 <adjusted_insn_addr_end, jump_pad, jump_pad_end>: New fields.
6932 (tracepoints): Use IP_AGENT_EXPORT.
6933 (last_tracepoint): Don't include in the IPA.
6934 (stopping_tracepoint): Use IP_AGENT_EXPORT.
6935 (trace_buffer_is_full): Use IP_AGENT_EXPORT.
6936 (alloced_trace_state_variables): New.
6937 (trace_state_variables): Use IP_AGENT_EXPORT.
6938 (traceframe_t): Delete unused variable.
6939 (circular_trace_buffer): Don't include in the IPA.
6940 (trace_buffer_start): Delete.
6941 (struct trace_buffer_control): New.
6942 (trace_buffer_free): Delete.
6943 (struct ipa_trace_buffer_control): New.
6944 (GDBSERVER_FLUSH_COUNT_MASK, GDBSERVER_FLUSH_COUNT_MASK_PREV)
6945 (GDBSERVER_FLUSH_COUNT_MASK_CURR, GDBSERVER_UPDATED_FLUSH_COUNT_BIT):
6946 New.
6947 (trace_buffer_ctrl): New.
6948 (TRACE_BUFFER_CTRL_CURR): New.
6949 (trace_buffer_start, trace_buffer_free, trace_buffer_end_free):
6950 Reimplement as macros.
6951 (trace_buffer_wrap): Delete.
6952 (traceframe_write_count, traceframe_read_count)
6953 (traceframes_created, tracing): Use IP_AGENT_EXPORT.
6954 (struct tracepoint_hit_ctx) <type>: New field.
6955 (struct fast_tracepoint_ctx): New.
6956 (memory_barrier): New.
6957 (cmpxchg): New.
6958 (record_tracepoint_error): Update atomically in the IPA.
6959 (clear_inferior_trace_buffer): New.
6960 (about_to_request_buffer_space): New.
6961 (trace_buffer_alloc): Handle GDBserver and inferior simulatenous
6962 updating the same buffer.
6963 (add_tracepoint): Default the tracepoint's type to trap
6964 tracepoint, and orig_size to -1.
6965 (get_trace_state_variable) [IN_PROCESS_AGENT]: Handle allocated
6966 internal variables.
6967 (create_trace_state_variable): New parameter `gdb'. Handle it.
6968 (clear_installed_tracepoints): Clear fast tracepoint jumps.
6969 (cmd_qtdp): Handle fast tracepoints.
6970 (cmd_qtdv): Adjust.
6971 (max_jump_pad_size): New.
6972 (gdb_jump_pad_head): New.
6973 (get_jump_space_head): New.
6974 (claim_jump_space): New.
6975 (sort_tracepoints): New.
6976 (MAX_JUMP_SIZE): New.
6977 (cmd_qtstart): Handle fast tracepoints. Sync tracepoints with the
6978 IPA.
6979 (stop_tracing) [IN_PROCESS_AGENT]: Don't include the tdisconnected
6980 support. Upload fast traceframes, and delete internal IPA
6981 breakpoints.
6982 (stop_tracing_handler): New.
6983 (flush_trace_buffer_handler): New.
6984 (cmd_qtstop): Upload fast tracepoints.
6985 (response_tracepoint): Handle fast tracepoints.
6986 (tracepoint_finished_step): Upload fast traceframes. Set the
6987 tracepoint hit context's tracepoint type.
6988 (handle_tracepoint_bkpts): New.
6989 (tracepoint_was_hit): Set the tracepoint hit context's tracepoint
6990 type. Add comment about fast tracepoints.
6991 (collect_data_at_tracepoint) [IN_PROCESS_AGENT]: Don't access the
6992 non-existing action_str field.
6993 (get_context_regcache): Handle fast tracepoints.
6994 (do_action_at_tracepoint) [!IN_PROCESS_AGENT]: Don't write the PC
6995 to the regcache.
6996 (fast_tracepoint_from_jump_pad_address): New.
6997 (fast_tracepoint_from_ipa_tpoint_address): New.
6998 (collecting_t): New.
6999 (force_unlock_trace_buffer): New.
7000 (fast_tracepoint_collecting): New.
7001 (collecting): New.
7002 (gdb_collect): New.
7003 (write_inferior_data_ptr): New.
7004 (target_tp_heap): New.
7005 (target_malloc): New.
7006 (download_agent_expr): New.
7007 (UALIGN): New.
7008 (download_tracepoints): New.
7009 (download_trace_state_variables): New.
7010 (upload_fast_traceframes): New.
7011 (IPA_FIRST_TRACEFRAME): New.
7012 (IPA_NEXT_TRACEFRAME_1): New.
7013 (IPA_NEXT_TRACEFRAME): New.
7014 [IN_PROCESS_AGENT]: Include sys/mman.h and fcntl.h.
7015 [IN_PROCESS_AGENT] (gdb_tp_heap_buffer, gdb_jump_pad_buffer)
7016 (gdb_jump_pad_buffer_end): New.
7017 [IN_PROCESS_AGENT] (initialize_tracepoint_ftlib): New.
7018 (initialize_tracepoint): Adjust.
7019 [IN_PROCESS_AGENT]: Allocate the IPA heap, and jump pad scratch
7020 buffer. Initialize the low module.
7021 * utils.c (PREFIX, TOOLNAME): New.
7022 (malloc_failure): Use PREFIX.
7023 (error): In the IPA, an error causes an exit.
7024 (fatal, warning): Use PREFIX.
7025 (internal_error): Use TOOLNAME.
7026 (NUMCELLS): Increase to 10.
7027 * configure, config.in: Regenerate.
7028
d149dd1d
PA
70292010-06-01 Pedro Alves <pedro@codesourcery.com>
7030
7031 * server.c (handle_query) <qSupported>: Do two passes over the
7032 qSupported string to avoid nesting strtok.
7033
f6528abd
JK
70342010-05-28 Jan Kratochvil <jan.kratochvil@redhat.com>
7035
7036 * Makefile.in (SFILES): Add $(srcdir)/proc-service.list.
7037 (CDEPS): New.
7038 * configure.ac (RDYNAMIC): New AC_MSG_CHECKING wrapping. Test also
7039 -Wl,--dynamic-list.
7040 * configure: Regenerate.
7041 * proc-service.list: New.
7042
ca2a87a0
JK
70432010-05-28 Jan Kratochvil <jan.kratochvil@redhat.com>
7044
7045 * linux-low.c (linux_core_of_thread): Fix crash on invalid CONTENT.
7046 New comment.
7047
363a6e9f
OS
70482010-05-26 Ozkan Sezer <sezeroz@gmail.com>
7049
7050 * gdbreplay.c (remote_open): Check error return from socket() call by
7051 its equality to -1 not by it being negative.
7052 * remote-utils.c (remote_open): Likewise.
7053
d23b6cb1
PA
70542010-05-23 Pedro Alves <pedro@codesourcery.com>
7055
7056 * config.h: Regenerate.
7057
28d3cf85
MK
70582010-05-19 Maxim Kuvyrkov <maxim@codesourcery.com>
7059
7060 * linux-m68k-low.c (ps_get_thread_area): Don't define if kernel
7061 doesn't provide PTRACE_GET_THREAD_AREA.
7062
fea36a59
MK
70632010-05-19 Maxim Kuvyrkov <maxim@codesourcery.com>
7064
7065 * linux-m68k-low.c: Include <asm/ptrace.h>
7066 (ps_get_thread_area): Implement.
7067
24b066ba
DE
70682010-05-03 Doug Evans <dje@google.com>
7069
7070 * event-loop.c (struct callback_event): New struct.
7071 (callback_list): New global.
7072 (append_callback_event, delete_callback_event): New functions.
7073 (process_callback): New function.
7074 (start_event_loop): Call it.
7075 * remote-utils.c (NOT_SCHEDULED): Define.
7076 (readchar_buf, readchar_bufcnt, readchar_bufp): New static globals,
7077 moved out of readchar.
7078 (readchar): Rewrite. Call reschedule before returning.
7079 (reset_readchar): New function.
7080 (remote_close): Call it.
7081 (process_remaining, reschedule): New functions.
7082 * server.h (callback_handler_func): New typedef.
7083 (append_callback_event, delete_callback_event): Declare.
7084
9836d6ea
PA
70852010-05-03 Pedro Alves <pedro@codesourcery.com>
7086
7087 * proc-service.c (ps_pglobal_lookup): Use
7088 thread_db_look_up_one_symbol.
7089 * remote-utils.c (look_up_one_symbol): Add new `may_ask_gdb'
7090 parameter. Use it instead of all_symbols_looked_up.
7091 * server.h (struct process_info) <all_symbols_looked_up>: Delete
7092 field.
7093 (all_symbols_looked_up): Don't declare.
7094 (look_up_one_symbol): Add new `may_ask_gdb' parameter.
7095 * thread-db.c (struct thread_db) <all_symbols_looked_up>: New
7096 field.
7097 (thread_db_look_up_symbols): Adjust call to look_up_one_symbol.
7098 Set all_symbols_looked_up here.
7099 (thread_db_look_up_one_symbol): New.
7100 (thread_db_get_tls_address): Adjust.
7101 (thread_db_load_search, try_thread_db_load_1): Always allocate the
7102 thread_db object on the heap, and tentatively set it in the
7103 process structure.
7104 (thread_db_init): Don't set all_symbols_looked_up here.
7105 * linux-low.h (thread_db_look_up_one_symbol): Declare.
7106
7984d532
PA
71072010-05-03 Pedro Alves <pedro@codesourcery.com>
7108
7109 * linux-low.c (linux_kill, linux_detach): Adjust.
7110 (status_pending_p_callback): Remove redundant statement. Check
7111 for !TARGET_WAITIKIND_IGNORE, instead of
7112 TARGET_WAITKIND_STOPPED.
7113 (handle_tracepoints): Make sure LWP is locked. Adjust.
7114 (linux_wait_for_event_1): Adjust.
7115 (linux_cancel_breakpoints): New.
7116 (unsuspend_one_lwp): New.
7117 (unsuspend_all_lwps): New.
7118 (linux_wait_1): If finishing a step-over, unsuspend all lwps.
7119 (send_sigstop_callback): Change return type to int, add new
7120 `except' parameter and handle it.
7121 (suspend_and_send_sigstop_callback): New.
7122 (stop_all_lwps): Add new `suspend' and `expect' parameters, and
7123 pass them down. If SUSPEND, also increment the lwp's suspend
7124 count.
7125 (linux_resume_one_lwp): Add notice about resuming a suspended LWP.
7126 (need_step_over_p): Don't consider suspended LWPs.
7127 (start_step_over): Adjust.
7128 (proceed_one_lwp): Change return type to int, add new `except'
7129 parameter and handle it.
7130 (unsuspend_and_proceed_one_lwp): New.
7131 (proceed_all_lwps): Use find_inferior instead of
7132 for_each_inferior.
7133 (unstop_all_lwps): Add `unsuspend' parameter. If UNSUSPEND, them
7134 also decrement the suspend count of LWPs. Pass `except' down,
7135 instead of hacking its suspend count.
7136 (linux_pause_all): Add `freeze' parameter. Adjust.
7137 (linux_unpause_all): New.
7138 (linux_target_ops): Install linux_unpause_all.
7139 * server.c (handle_status): Adjust.
7140 * target.h (struct target_ops): New fields `unpause_all' and
7141 `cancel_breakpoints'. Add new parameter to `pause_all'.
7142 (pause_all): Add new `freeze' parameter.
7143 (unpause_all): New.
7144 (cancel_breakpoints): New.
7145 * tracepoint.c (clear_installed_tracepoints): Pause threads, and
7146 cancel breakpoints.
7147 (cmd_qtstart): Pause threads.
7148 (stop_tracing): Pause threads, and cancel breakpoints.
7149 * win32-low.c (win32_target_ops): Adjust.
7150
e471f25b
PA
71512010-05-03 Pedro Alves <pedro@codesourcery.com>
7152
7153 * linux-low.c (linux_wait_for_event_1): Move passing the signal to
7154 the inferior right away from here...
7155 (linux_wait_1): ... to here, and adjust to check the thread's
7156 last_resume_kind instead of the lwp's step or stop_expected flags.
7157
1915ef4f
PA
71582010-05-02 Pedro Alves <pedro@codesourcery.com>
7159
7160 * README: Use consistent `GDB' and `GDBserver' spellings.
7161
f9e39928
PA
71622010-05-02 Pedro Alves <pedro@codesourcery.com>
7163
7164 * linux-low.c (linux_kill_one_lwp): Assume the lwp is stopped.
7165 (linux_kill): Stop all lwps here. Don't delete the main lwp here.
7166 (linux_detach_one_lwp): Assume the lwp is stopped.
7167 (any_thread_of): Delete.
7168 (linux_detach): Stop all lwps here. Don't blindly delete all
7169 breakpoints.
7170 (delete_lwp_callback): New.
7171 (linux_mourn): Delete all lwps of the process that is gone.
7172 (linux_wait_1): Don't delete the last lwp of the process here.
7173 * mem-break.h (mark_breakpoints_out): Declare.
7174 * mem-break.c (mark_breakpoints_out): New.
7175 (free_all_breakpoints): Use it.
7176 * server.c (handle_target_event): If the process is gone, mark
7177 breakpoints out.
7178 * thread-db.c (struct thread_db) <create_bp>: New field.
7179 (thread_db_enable_reporting): Fix prototype. Store a thread event
7180 breakpoint reference in the thread_db struct.
7181 (thread_db_load_search): Clear the thread_db object.
7182 (try_thread_db_load_1): Ditto.
7183 (switch_to_process): New.
7184 (disable_thread_event_reporting): Use it.
7185 (remove_thread_event_breakpoints): New.
7186 (thread_db_detach, thread_db_mourn): Use it.
7187
1e7fc18c
PA
71882010-05-01 Pedro Alves <pedro@codesourcery.com>
7189
7190 * linux-low.c (linux_enable_event_reporting): New.
7191 (linux_wait_for_event_1, handle_extended_wait): Use it.
7192
02fc4de7
PA
71932010-04-30 Pedro Alves <pedro@codesourcery.com>
7194
7195 * linux-low.c (linux_kill_one_lwp, linux_kill)
7196 (linux_detach_one_lwp): Adjust to send_sigstop interface change.
7197 (send_sigstop): Take an lwp_info as parameter instead. Queue a
7198 SIGSTOP even if the LWP is stopped.
7199 (send_sigstop_callback): New.
7200 (stop_all_lwps): Use send_sigstop_callback instead.
7201 (linux_resume_one_thread): Adjust.
7202 (proceed_one_lwp): Still proceed an LWP that the client has
7203 requested to stop, if we haven't reported it as stopped yet. Make
7204 sure that LWPs the client want stopped, have a pending SIGSTOP.
7205
bc3b5632
DE
72062010-04-26 Doug Evans <dje@google.com>
7207
ae1ada35
DE
7208 * server.c (handle_general_set): Make static.
7209
bc3b5632
DE
7210 * remote-utils.c (putpkt_binary_1): Call readchar instead of read.
7211 Print received char after testing for error/eof instead of before.
7212 (input_interrupt): Tweak comment.
7213
65730243
DE
72142010-04-23 Doug Evans <dje@google.com>
7215
7216 * server.c (start_inferior): Print inferior argv if --debug.
7217
a8ae7dc0
AR
72182010-04-21 Aleksandar Ristovski <aristovski@qnx.com>
7219
7220 * Makefile.in (nto_low_h nto-low.o nto-x86-low.o): New dependency lists.
7221 * nto-x86-low.c: Include server.h
7222
1c07cc19
PM
72232010-04-20 Pierre Muller <muller@ics.u-strasbg.fr>
7224
7225 * win32-i386-low.c: Use __x86_64__ macro instead of __x86_64 to
7226 be consistent with other sources of this directory.
7227 (init_registers_amd64): Correct name of source file of this function
7228 in the comment.
7229
e0a61e09
PM
72302010-04-19 Pierre Muller <muller@ics.u-strasbg.fr>
7231
7232 * configure.srv (x86_64-*-mingw*): New configuration for Windows
7233 64-bit executables.
7234
54709339
PM
72352010-04-19 Pierre Muller <muller@ics.u-strasbg.fr>
7236
7237 * win32-i386-low.c: Add 64-bit support.
7238 (CONTEXT_EXTENDED_REGISTERS): Set macro to zero if not exisiting.
7239 (init_registers_amd64): Declare.
7240 (mappings): Add 64-bit version of array.
7241 (init_windows_x86): New function.
7242 (the_low_target): Change init_arch field to init_windows_x86.
7243
e8f0053d
PM
72442010-04-19 Pierre Muller <muller@ics.u-strasbg.fr>
7245
7246 * win32-low.c: Adapt to support also 64-bit architecture.
7247 (child_xfer_memory): Use uintptr_t type for local variable `addr'.
7248 (get_image_name): Use SIZE_T type for local variable `done'.
7249 (psapi_get_dll_name): Use LPVOID type for parameter `BaseAddress'.
7250 (toolhelp_get_dll_name): Idem.
7251 (handle_load_dll): Use CORE_ADDR type for local variable `load_addr'.
7252 Use uintptr_t typecast to avoid warning.
7253 (handle_unload_dll): Use uintptr_t typecast to avoid warning.
7254 (handle_exception): Use phex_nz to avoid warning.
7255 (win32_wait): Remove unused local variable `process'.
7256
c481e77e
PM
72572010-04-19 Pierre Muller <muller@ics.u-strasbg.fr>
7258
7259 * configure.srv (srv_amd64_regobj): Replace `x86-64-avx.o' by
7260 `amd64-avx.o'.
7261
12ea4b69
PM
72622010-04-17 Pierre Muller <muller@ics.u-strasbg.fr>
7263
7264 * configure.ac: Use `ws2_32' library for srv_mingw.
7265 * configure: Regenerate.
7266 * gdbreplay.c: Include winsock2.h instead of winsock.h.
7267 * remote-utils.c: Likewise.
7268
f6d1620c
L
72692010-04-17 H.J. Lu <hongjiu.lu@intel.com>
7270
7271 * linux-x86-low.c (xmltarget_amd64_linux_no_xml): Define only
7272 if __x86_64__ is defined.
7273
8e642873
PM
72742010-04-16 Pierre Muller <muller@ics.u-strasbg.fr>
7275
7276 * configure: Regenerate.
7277
711e434b
PM
72782010-04-16 Pierre Muller <muller@ics.u-strasbg.fr>
7279
7280 * server.c (handle_query): Handle 'qGetTIBAddr' query.
7281 * target.h (target_ops): New get_tib_address field.
7282 * win32-low.h (win32_thread_info): Add thread_local_base field.
7283 * win32-low.c (child_add_thread): Add tlb argument.
7284 Set thread_local_base field to TLB.
7285 (get_child_debug_event): Adapt to child_add_thread change.
7286 (win32_get_tib_address): New function.
7287 (win32_target_ops): Set get_tib_address field to
7288 win32_get_tib_address.
7289 * linux-low.c (linux_target_ops): Set get_tib_address field to NULL.
7290
505106cd
PA
72912010-04-12 Pedro Alves <pedro@codesourcery.com>
7292
505106cd
PA
7293 * linux-low.c (linux_mourn): Also remove the process.
7294 * server.c (handle_target_event): Don't remove the process here.
7295 * nto-low.c (nto_mourn): New.
7296 (nto_target_ops): Install it.
7297 * spu-low.c (spu_mourn): New.
7298 (spu_target_ops): Install it.
7299 * win32-low.c (win32_mourn): New.
7300 (win32_target_ops): Install it.
7301
e8470a06
PA
73022010-04-12 Pedro Alves <pedro@codesourcery.com>
7303
7304 * server.h (buffer_xml_printf): Remove redundant `;'.
7305
45ba0d02
PA
73062010-04-12 Pedro Alves <pedro@codesourcery.com>
7307
7308 * regcache.c (set_register_cache): Invalidate regcaches before
7309 changing the register cache layout.
7310 (regcache_invalidate_one): Allow a NULL regcache.
7311 * linux-x86-low.c (x86_linux_update_xmltarget): Invalidate
7312 regcaches before changing the register cache layout or the target
7313 regsets.
7314
59e04013
L
73152010-04-12 H.J. Lu <hongjiu.lu@intel.com>
7316
7317 * linux-x86-low.c (x86_linux_update_xmltarget): Avoid unused
7318 variable warning on Linux/x86-64.
7319
8336d594
PA
73202010-04-11 Pedro Alves <pedro@codesourcery.com>
7321
7322 GDBserver disconnected tracing support.
7323
7324 * linux-low.c (linux_remove_process): Delete.
7325 (add_lwp): Don't set last_resume_kind here.
7326 (linux_kill): Use `mourn'.
7327 (linux_detach): Use `thread_db_detach', and `mourn'.
7328 (linux_mourn): New.
7329 (linux_attach_lwp_1): Adjust comment.
7330 (linux_attach): last_resume_kind moved the thread_info; adjust.
7331 (status_pending_p_callback): Adjust.
7332 (linux_wait_for_event_1): Adjust.
7333 (count_events_callback, select_singlestep_lwp_callback)
7334 (select_event_lwp_callback, cancel_breakpoints_callback)
7335 (db_wants_lwp_stopped, linux_wait_1, need_step_over_p)
7336 (proceed_one_lwp): Adjust.
7337 (linux_async): Add debug output.
7338 (linux_thread_stopped): New.
7339 (linux_pause_all): New.
7340 (linux_target_ops): Install linux_mourn, linux_thread_stopped and
7341 linux_pause_all.
7342 * linux-low.h (struct lwp_info): Delete last_resume_kind field.
7343 (thread_db_free): Delete declaration.
7344 (thread_db_detach, thread_db_mourn): Declare.
7345 * thread-db.c (thread_db_init): Use thread_db_mourn.
7346 (thread_db_free): Delete, split in two.
7347 (disable_thread_event_reporting): New.
7348 (thread_db_detach): New.
7349 (thread_db_mourn): New.
7350
7351 * server.h (struct thread_info) <last_resume_kind>: New field.
7352 <attached>: Add comment.
7353 <gdb_detached>: New field.
7354 (handler_func): Change return type to int.
7355 (handle_serial_event, handle_target_event): Ditto.
7356 (gdb_connected): Declare.
7357 (tracing): Delete.
7358 (disconnected_tracing): Declare.
7359 (stop_tracing): Declare.
7360
7361 * server.c (handle_query) <qSupported>: Report support for
7362 disconnected tracing.
7363 (queue_stop_reply_callback): Account for running threads.
7364 (gdb_wants_thread_stopped): New.
7365 (gdb_wants_all_threads_stopped): New.
7366 (gdb_reattached_process): New.
7367 (handle_status): Clear the `gdb_detached' flag of all processes.
7368 In all-stop, stop all threads.
7369 (main): Be sure to leave tfind mode. Handle disconnected tracing.
7370 (process_serial_event): If the remote connection breaks, or if an
7371 exit was forced with "monitor exit", force an event loop exit.
7372 Handle disconnected tracing on detach.
7373 (handle_serial_event): Adjust.
7374 (handle_target_event): If GDB isn't connected, forward events back
7375 to the inferior, unless the last process exited, in which case,
7376 exit gdbserver. Adjust interface.
7377
7378 * remote-utils.c (remote_open): Don't block in accept. Instead
7379 register an event loop source on the listen socket file
7380 descriptor. Refactor bits into ...
7381 (listen_desc): ... this new global.
7382 (gdb_connected): ... this new function.
7383 (enable_async_notification): ... this new function.
7384 (handle_accept_event): ... this new function.
7385 (remote_close): Clear remote_desc.
7386
7387 * inferiors.c (add_thread): Set the new thread's last_resume_kind.
7388
7389 * target.h (struct target_ops) <mourn, thread_stopped, pause_all>:
7390 New fields.
7391 (mourn_inferior): Define.
7392 (target_process_qsupported): Avoid the dangling else problem.
7393 (thread_stopped): Define.
7394 (pause_all): Define.
7395 (target_waitstatus_to_string): Declare.
7396 * target.c (target_waitstatus_to_string): New.
7397
7398 * tracepoint.c (tracing): Make extern.
7399 (disconnected_tracing): New.
7400 (stop_tracing): Make extern. Handle tracing stops due to GDB
7401 disconnecting.
7402 (cmd_qtdisconnected): New.
7403 (cmd_qtstatus): Report disconnected tracing status in trace reply.
7404 (handle_tracepoint_general_set): Handle QTDisconnected.
7405
7406 * event-loop.c (event_handler_func): Change return type to int.
7407 (process_event): Bail out if the event handler wants the event
7408 loop to stop.
7409 (handle_file_event): Ditto.
7410 (start_event_loop): Bail out if the event handler wants the event
7411 loop to stop.
7412
7413 * nto-low.c (nto_target_ops): Adjust.
7414 * spu-low.c (spu_wait): Don't remove the process here.
7415 (spu_target_ops): Adjust.
7416 * win32-low.c (win32_wait): Don't remove the process here.
7417 (win32_target_ops): Adjust.
7418
5d267c4c
PA
74192010-04-11 Pedro Alves <pedro@codesourcery.com>
7420
7421 * regcache.c (realloc_register_cache): Invalidate inferior's
7422 regcache before recreating it.
7423
623ccd72
PA
74242010-04-09 Pedro Alves <pedro@codesourcery.com>
7425
7426 * tracepoint.c (cmd_qtstatus): Report trace buffer circularity.
7427
219f2f23
PA
74282010-04-09 Stan Shebs <stan@codesourcery.com>
7429 Pedro Alves <pedro@codesourcery.com>
7430
7431 * server.h (LONGEST): New.
7432 (struct thread_info) <while_stepping>: New field.
7433 (unpack_varlen_hex, xrealloc, pulongest, plongest, phex_nz):
7434 Declare.
7435 (initialize_tracepoint, handle_tracepoint_general_set)
7436 (handle_tracepoint_query, tracepoint_finished_step)
7437 (tracepoint_was_hit, release_while_stepping_state_list):
7438 (current_traceframe): Declare.
7439 * server.c (handle_general_set): Handle tracepoint packets.
7440 (read_memory): New.
7441 (write_memory): New.
7442 (handle_search_memory_1): Use read_memory.
7443 (handle_query): Report support for conditional tracepoints, trace
7444 state variables, and tracepoint sources. Handle tracepoint
7445 queries.
7446 (main): Initialize the tracepoints module.
7447 (process_serial_event): Handle traceframe reads/writes.
7448
7449 * linux-low.c (handle_tracepoints): New.
7450 (linux_wait_1): Call it.
7451 (linux_resume_one_lwp): Handle while-stepping.
7452 (linux_supports_tracepoints, linux_read_pc, linux_write_pc): New.
7453 (linux_target_ops): Install them.
7454 * linux-low.h (struct linux_target_ops) <supports_tracepoints>:
7455 New field.
7456 * linux-x86-low.c (x86_supports_tracepoints): New.
7457 (the_low_target). Install it.
7458
7459 * mem-break.h (delete_breakpoint): Declare.
7460 * mem-break.c (delete_breakpoint): Make external.
7461
7462 * target.h (struct target_ops): Add `supports_tracepoints',
7463 `read_pc', and `write_pc' fields.
7464 (target_supports_tracepoints): Define.
7465 * utils.c (xrealloc, decimal2str, pulongest, plongest, thirty_two)
7466 (phex_nz): New.
7467
7468 * regcache.h (struct regcache) <registers_owned>: New field.
7469 (init_register_cache, regcache_cpy): Declare.
7470 (regcache_read_pc, regcache_write_pc): Declare.
7471 (register_cache_size): Declare.
7472 (supply_regblock): Declare.
7473 * regcache.c (init_register_cache): New.
7474 (new_register_cache): Use it.
7475 (regcache_cpy): New.
7476 (register_cache_size): New.
7477 (supply_regblock): New.
7478 (regcache_read_pc, regcache_write_pc): New.
889bf7c5 7479
219f2f23
PA
7480 * tracepoint.c: New.
7481
7482 * Makefile.in (OBS): Add tracepoint.o.
7483 (tracepoint.o): New rule.
7484
3a13a53b
L
74852010-04-08 H.J. Lu <hongjiu.lu@intel.com>
7486
7487 * Makefile.in (clean): Also remove i386-mmx.c i386-mmx-linux.c.
7488 (i386-mmx.o): New.
7489 (i386-mmx.c): Likewise.
7490 (i386-mmx-linux.o): Likewise.
7491 (i386-mmx-linux.c): Likewise.
7492
7493 * configure.srv (srv_i386_regobj): Add i386-mmx.o.
7494 (srv_i386_linux_regobj): Add i386-mmx-linux.o.
7495 (srv_i386_xmlfiles): Add i386/i386-mmx.xml.
7496 (srv_i386_linux_xmlfiles): Add i386/i386-mmx-linux.xml.
7497
7498 * linux-x86-low.c (init_registers_i386_mmx_linux): New.
7499 (x86_linux_update_xmltarget): Call init_registers_i386_mmx_linux
7500 and return if ptrace PTRACE_GETFPXREGS failed in 32bit.
7501
1570b33e
L
75022010-04-07 H.J. Lu <hongjiu.lu@intel.com>
7503
7504 * Makefile.in (clean): Updated.
7505 (i386-avx.o): New.
7506 (i386-avx.c): Likewise.
7507 (i386-avx-linux.o): Likewise.
7508 (i386-avx-linux.c): Likewise.
7509 (amd64-avx.o): Likewise.
7510 (amd64-avx.c): Likewise.
7511 (amd64-avx-linux.o): Likewise.
7512 (amd64-avx-linux.c): Likewise.
7513
7514 * configure.srv (srv_i386_regobj): Add i386-avx.o.
7515 (srv_i386_linux_regobj): Add i386-avx-linux.o.
7516 (srv_amd64_regobj): Add amd64-avx.o.
7517 (srv_amd64_linux_regobj): Add amd64-avx-linux.o.
7518 (srv_i386_32bit_xmlfiles): Add i386/32bit-avx.xml.
7519 (srv_i386_64bit_xmlfiles): Add i386/64bit-avx.xml.
7520 (srv_i386_xmlfiles): Add i386/i386-avx.xml.
7521 (srv_amd64_xmlfiles): Add i386/amd64-avx.xml.
7522 (srv_i386_linux_xmlfiles): Add i386/i386-avx-linux.xml.
7523 (srv_amd64_linux_xmlfiles): Add i386/amd64-avx-linux.xml.
7524
7525 * i387-fp.c: Include "i386-xstate.h".
7526 (i387_xsave): New.
7527 (i387_cache_to_xsave): Likewise.
7528 (i387_xsave_to_cache): Likewise.
7529 (x86_xcr0): Likewise.
7530
7531 * i387-fp.h (i387_cache_to_xsave): Likewise.
7532 (i387_xsave_to_cache): Likewise.
7533 (x86_xcr0): Likewise.
7534
7535 * linux-arm-low.c (target_regsets): Initialize nt_type to 0.
7536 * linux-crisv32-low.c (target_regsets): Likewise.
7537 * linux-m68k-low.c (target_regsets): Likewise.
7538 * linux-mips-low.c (target_regsets): Likewise.
7539 * linux-ppc-low.c (target_regsets): Likewise.
7540 * linux-s390-low.c (target_regsets): Likewise.
7541 * linux-sh-low.c (target_regsets): Likewise.
7542 * linux-sparc-low.c (target_regsets): Likewise.
7543 * linux-xtensa-low.c (target_regsets): Likewise.
7544
7545 * linux-low.c: Include <sys/uio.h>.
7546 (regsets_fetch_inferior_registers): Support nt_type.
7547 (regsets_store_inferior_registers): Likewise.
7548 (linux_process_qsupported): New.
7549 (linux_target_ops): Add linux_process_qsupported.
7550
7551 * linux-low.h (regset_info): Add nt_type.
7552 (linux_target_ops): Add process_qsupported.
7553
7554 * linux-x86-low.c: Include "i386-xstate.h", "elf/common.h"
7555 and <sys/uio.h>.
7556 (init_registers_i386_avx_linux): New.
7557 (init_registers_amd64_avx_linux): Likewise.
7558 (xmltarget_i386_linux_no_xml): Likewise.
7559 (xmltarget_amd64_linux_no_xml): Likewise.
7560 (PTRACE_GETREGSET): Likewise.
7561 (PTRACE_SETREGSET): Likewise.
7562 (x86_fill_xstateregset): Likewise.
7563 (x86_store_xstateregset): Likewise.
7564 (use_xml): Likewise.
7565 (x86_linux_update_xmltarget): Likewise.
7566 (x86_linux_process_qsupported): Likewise.
7567 (target_regsets): Add NT_X86_XSTATE entry and Initialize nt_type.
7568 (x86_arch_setup): Don't call init_registers_amd64_linux nor
7569 init_registers_i386_linux here. Call
7570 x86_linux_update_xmltarget.
7571 (the_low_target): Add x86_linux_process_qsupported.
7572
7573 * server.c (handle_query): Call target_process_qsupported.
7574
7575 * target.h (target_ops): Add process_qsupported.
7576 (target_process_qsupported): New.
7577
fc7238bb
PA
75782010-04-03 Pedro Alves <pedro@codesourcery.com>
7579
7580 * inferiors.c (add_thread): Set last_status kind to
7581 TARGET_WAITKIND_IGNORE.
7582 * linux-low.c (cancel_breakpoint): Remove unnecessary regcache
7583 fetch. Use ptid_of. Avoid unnecessary get_lwp_thread calls.
7584 (linux_wait_1): Move `thread' local definition to block that uses
7585 it. Don't NULL initialize `event_child'.
7586 (linux_resume_one_thread): Avoid unnecessary get_lwp_thread calls.
7587 Alway set the thread's last_status to TARGET_WAITKIND_IGNORE.
7588 * linux-x86-low.c (x86_breakpoint_at): Read raw memory.
7589
bdabb078
PA
75902010-04-01 Pedro Alves <pedro@codesourcery.com>
7591
7592 * linux-low.c (get_stop_pc): Don't adjust the PC if stopped with
7593 an extended waitstatus, or by a watchpoint.
7594 (cancel_breakpoints_callback): Don't cancel a breakpoint if the
7595 thread was stepping or has been stopped by a watchpoint.
7596
d3bbe7a0
PA
75972010-04-01 Pedro Alves <pedro@codesourcery.com>
7598
7599 * mem-break.c (struct raw_breakpoint): New field shlib_disabled.
7600 (set_gdb_breakpoint_at): If GDB is inserting a breakpoint on top
7601 of another, then delete the previous, and validate all
7602 breakpoints.
7603 (validate_inserted_breakpoint): New.
7604 (delete_disabled_breakpoints): New.
7605 (validate_breakpoints): New.
7606 (check_mem_read): Validate breakpoints before trusting their
7607 shadow. Delete disabled breakpoints.
7608 (check_mem_write): Validate breakpoints before trusting they
7609 should be inserted. Delete disabled breakpoints.
7610 * mem-break.h (validate_breakpoints):
7611 * server.c (handle_query): Validate breakpoints when we see a
7612 qSymbol query.
7613
8b07ae33
PA
76142010-04-01 Pedro Alves <pedro@codesourcery.com>
7615
7616 * linux-low.c (linux_wait_1): Avoid setting need_step_over is
7617 there's a GDB breakpoint at stop_pc. Always report a trap to GDB
7618 if we could tell there's a GDB breakpoint at stop_pc.
7619 (need_step_over_p): Don't do a step over if we find a GDB
7620 breakpoint at the resume PC.
7621
7622 * mem-break.c (struct raw_breakpoint): New.
7623 (enum bkpt_type): New type `gdb_breakpoint'.
7624 (struct breakpoint): Delete the `PC', `old_data' and `inserted'
7625 fields. New field `raw'.
7626 (find_raw_breakpoint_at): New.
7627 (set_raw_breakpoint_at): Handle refcounting. Create a raw
7628 breakpoint instead.
7629 (set_breakpoint_at): Adjust.
7630 (delete_raw_breakpoint): New.
7631 (release_breakpoint): New.
7632 (delete_breakpoint): Rename to...
7633 (delete_breakpoint_1): ... this. Add proc parameter. Use
7634 release_breakpoint. Return ENOENT.
7635 (delete_breakpoint): Reimplement.
7636 (find_breakpoint_at): Delete.
7637 (find_gdb_breakpoint_at): New.
7638 (delete_breakpoint_at): Delete.
7639 (set_gdb_breakpoint_at): New.
7640 (delete_gdb_breakpoint_at): New.
7641 (gdb_breakpoint_here): New.
7642 (set_reinsert_breakpoint): Use release_breakpoint.
7643 (uninsert_breakpoint): Rename to ...
7644 (uninsert_raw_breakpoint): ... this.
7645 (uninsert_breakpoints_at): Adjust to handle raw breakpoints.
7646 (reinsert_raw_breakpoint): Change parameter type to
7647 raw_breakpoint.
7648 (reinsert_breakpoints_at): Adjust to handle raw breakpoints
7649 instead.
7650 (check_breakpoints): Adjust. Use release_breakpoint.
7651 (breakpoint_here): Rewrite using find_raw_breakpoint_at.
7652 (breakpoint_inserted_here): Ditto.
7653 (check_mem_read): Adjust to iterate over raw breakpoints instead.
7654 Don't trust the breakpoint's shadow if it is not inserted.
7655 (check_mem_write): Adjust to iterate over raw breakpoints instead.
7656 (delete_all_breakpoints): Adjust.
7657 (free_all_breakpoints): Mark all breakpoints as uninserted, and
7658 use delete_breakpoint_1.
7659
7660 * mem-break.h (breakpoints_supported): Delete declaration.
7661 (set_gdb_breakpoint_at): Declare.
7662 (gdb_breakpoint_here): Declare.
7663 (delete_breakpoint_at): Delete.
7664 (delete_gdb_breakpoint_at): Declare.
7665
7666 * server.h (struct raw_breakpoint): Forward declare.
7667 (struct process_info): New field `raw_breakpoints'.
7668
7669 * linux-x86-low.c (x86_insert_point, x86_remote_point): Handle Z0
7670 breakpoints.
7671
6bf5e0ba
PA
76722010-03-24 Pedro Alves <pedro@codesourcery.com>
7673
7674 * linux-low.c (status_pending_p_callback): Fix comment.
7675 (linux_wait_for_event_1): Move most of the internal breakpoint
7676 handling from here...
7677 (linux_wait_1): ... to here.
7678 (count_events_callback): New.
7679 (select_singlestep_lwp_callback): New.
7680 (select_event_lwp_callback): New.
7681 (cancel_breakpoints_callback): New.
7682 (select_event_lwp): New.
7683 (linux_wait_1): Simplify internal breakpoint handling. Give equal
7684 priority to all LWPs that have had events that should be reported
7685 to the client. Cancel breakpoints when about to reporting the
7686 event to the client, not while stopping lwps. No longer cancel
7687 finished single-steps here.
7688 (cancel_finished_single_step): Delete.
7689 (cancel_finished_single_steps): Delete.
7690
414a389f
PA
76912010-03-24 Pedro Alves <pedro@codesourcery.com>
7692
7693 * mem-break.c (enum bkpt_type): New.
7694 (struct breakpoint): New field `type'.
7695 (set_breakpoint_at): Change return type to struct breakpoint
7696 pointer. Set type to `other_breakpoint' by default.
7697 (delete_breakpoint): Rewrite, supporting more than one breakpoint
7698 in the breakpoint list.
7699 (delete_reinsert_breakpoints): Only delete reinsert breakpoints.
7700 (reinsert_breakpoint): Rename to ...
7701 (reinsert_raw_breakpoint): ... this.
7702 (reinsert_breakpoints_at): Adjust.
7703 * mem-break.h (struct breakpoint): Declare.
7704 (set_breakpoint_at): Change return type to struct breakpoint
7705 pointer.
7706
2280c721
PA
77072010-03-24 Pedro Alves <pedro@codesourcery.com>
7708
7709 * server.c (handle_query): Assign, not compare.
7710
d50171e4
PA
77112010-03-24 Pedro Alves <pedro@codesourcery.com>
7712
7713 Teach linux gdbserver to step-over-breakpoints.
7714
7715 * linux-low.c (can_hardware_single_step): New.
7716 (supports_breakpoints): New.
7717 (handle_extended_wait): If stopping threads, read the stop pc of
7718 the new cloned LWP.
7719 (get_pc): New.
7720 (get_stop_pc): Add `lwp' parameter. Handle it. Bail out if the
7721 low target doesn't support retrieving the PC.
7722 (add_lwp): Set last_resume_kind to resume_continue.
7723 (linux_attach_lwp_1): Adjust comments. Always set stop_expected.
7724 (linux_attach): Don't clear stop_expected. Set the lwp's
7725 last_resume_kind to resume_stop.
7726 (linux_detach_one_lwp): Don't check for removed breakpoints.
7727 (check_removed_breakpoint): Delete.
7728 (status_pending_p): Rename to ...
7729 (status_pending_p_callback): ... this. Don't check for removed
7730 breakpoints. Don't consider threads that are stopped from GDB's
7731 perspective.
7732 (linux_wait_for_lwp): Always read the stop_pc here.
7733 (cancel_breakpoint): New.
7734 (step_over_bkpt): New global.
7735 (linux_wait_for_event_1): Implement stepping over breakpoints.
7736 (gdb_wants_lwp_stopped): New.
7737 (gdb_wants_all_stopped): New.
7738 (linux_wait_1): Tag threads as gdb-wants-stopped. Cancel finished
7739 single-step traps here. Store the thread's last reported target
7740 wait status.
7741 (send_sigstop): Don't clear stop_expected. Always set it,
7742 instead.
7743 (mark_lwp_dead): Remove reference to pending_is_breakpoint.
7744 (cancel_finished_single_step): New.
7745 (cancel_finished_single_steps): New.
7746 (wait_for_sigstop): Don't cancel finished single-step traps here.
7747 (linux_resume_one_lwp): Don't check for removed breakpoints.
7748 Don't set `step' on non-hardware step archs.
7749 (linux_set_resume_request): Ignore resume_stop requests if already
7750 stopping or stopped. Set the lwp's last_resume_kind.
7751 (resume_status_pending_p): Don't check for removed breakpoints.
7752 (need_step_over_p): New.
7753 (start_step_over): New.
7754 (finish_step_over): New.
7755 (linux_resume_one_thread): Always queue a sigstop for resume_stop
7756 requests. Clear the thread's last reported target waitstatus.
7757 Don't use the `suspended' flag. Don't consider pending breakpoints.
7758 (linux_resume): Start a step-over if necessary.
7759 (proceed_one_lwp): New.
7760 (proceed_all_lwps): New.
7761 (unstop_all_lwps): New.
7762 * linux-low.h (struct lwp_info): Rewrite comment for the
7763 `suspended' flag. Add the `stop_pc' field. Delete the
7764 `pending_stop_pc' field. Tweak the `stepping' flag's comment.
7765 Add `'last_resume_kind' and `need_step_over' fields.
7766 * inferiors.c (struct thread_info): Delete, moved elsewhere.
7767 * mem-break.c (struct breakpoint): Delete `reinserting' flag.
7768 Delete `breakpoint_to_reinsert' field. New flag `inserted'.
7769 (set_raw_breakpoint_at): New.
7770 (set_breakpoint_at): Rewrite to use it.
7771 (reinsert_breakpoint_handler): Delete.
7772 (set_reinsert_breakpoint): New.
7773 (reinsert_breakpoint_by_bp): Delete.
7774 (delete_reinsert_breakpoints): New.
7775 (uninsert_breakpoint): Rewrite.
7776 (uninsert_breakpoints_at): New.
7777 (reinsert_breakpoint): Rewrite.
7778 (reinsert_breakpoints_at): New.
7779 (check_breakpoints): Rewrite.
7780 (breakpoint_here): New.
7781 (breakpoint_inserted_here): New.
7782 (check_mem_read): Adjust.
7783 * mem-break.h (breakpoints_supported, breakpoint_here)
7784 (breakpoint_inserted_here, set_reinsert_breakpoint): Declare.
7785 (reinsert_breakpoint_by_bp): Delete declaration.
7786 (delete_reinsert_breakpoints): Declare.
7787 (reinsert_breakpoint): Delete declaration.
7788 (reinsert_breakpoints_at): Declare.
7789 (uninsert_breakpoint): Delete declaration.
7790 (uninsert_breakpoints_at): Declare.
7791 (check_breakpoints): Adjust prototype.
7792 * server.h: Adjust include order.
7793 (struct thread_info): Declare here. Add a `last_status' field.
7794
30ba68cb
MS
77952010-03-23 Michael Snyder <msnyder@vmware.com>
7796
7797 * server.c (crc32): New function.
7798 (handle_query): Add handling for 'qCRC:' request.
7799
b9a881c2
PA
78002010-03-23 Pedro Alves <pedro@codesourcery.com>
7801
7802 * linux-x86-low.c (x86_linux_prepare_to_resume): Clear DR6 if the
7803 lwp had been stopped by a watchpoint.
7804
e92d13d5
PA
78052010-03-16 Pedro Alves <pedro@codesourcery.com>
7806
7807 * server.h (internal_error): Declare.
7808 (gdb_assert, ASSERT_FUNCTION, gdb_assert_fail): Define.
7809 * utils.c (internal_error): New function.
7810
64daa791
AS
78112010-03-15 Andreas Schwab <schwab@redhat.com>
7812
7813 * configure.srv: Fix typo setting srv_regobj.
7814
f52cd8cd
PA
78152010-03-15 Pedro Alves <pedro@codesourcery.com>
7816
7817 * linux-low.c (fetch_register): Avoid passing a non string literal
7818 format to `error'.
7819 (usr_store_inferior_registers): Ditto.
7820
93ae6fdc
PA
78212010-03-14 Pedro Alves <pedro@codesourcery.com>
7822
7823 * linux-low.c (linux_write_memory): Bail out early if peeking
7824 memory failed.
7825
c3adc08c
PA
78262010-03-14 Pedro Alves <pedro@codesourcery.com>
7827
7828 * linux-low.h (struct lwp_info): New fields
7829 `stopped_by_watchpoint' and `stopped_data_address'.
7830 * linux-low.c (linux_wait_for_lwp): Check for watchpoint triggers
7831 here, and cache them in the lwp object.
7832 (wait_for_sigstop): Check stopped_by_watchpoint lwp field
7833 directly.
7834 (linux_resume_one_lwp): Clear the lwp's stopped_by_watchpoint
7835 field.
7836 (linux_stopped_by_watchpoint): Rewrite.
7837 (linux_stopped_data_address): Rewrite.
7838
bce522a2
PA
78392010-03-06 Simo Melenius <simo.melenius@iki.fi>
7840
7841 * linux-low.c (linux_wait_for_lwp): Fetch the regcache after
7842 switching the current inferior, not before.
7843
90884b2b
L
78442010-03-01 H.J. Lu <hongjiu.lu@intel.com>
7845
7846 * Makefile.in (clean): Replace reg-i386.c, reg-x86-64.c,
7847 reg-i386-linux.c and reg-x86-64-linux.c with i386.c, amd64.c,
7848 i386-linux.c and amd64-linux.c.
7849 (reg-i386.o): Removed.
7850 (reg-i386.c): Likewise.
7851 (reg-i386-linux.o): Likewise.
7852 (reg-i386-linux.c): Likewise.
7853 (reg-x86-64.o): Likewise.
7854 (reg-x86-64.c): Likewise.
7855 (reg-x86-64-linux.o): Likewise.
7856 (reg-x86-64-linux.c): Likewise.
7857 (i386.o): New.
7858 (i386.c): Likewise.
7859 (i386-linux.o): Likewise.
7860 (i386-linux.c): Likewise.
7861 (amd64.o): Likewise.
7862 (amd64.c): Likewise.
7863 (amd64-linux.o): Likewise.
7864 (amd64-linux.c): Likewise.
7865
7866 * configure.srv (srv_i386_regobj): New.
7867 (srv_i386_linux_regobj): Likewise.
7868 (srv_amd64_regobj): Likewise.
7869 (srv_amd64_linux_regobj): Likewise.
7870 (srv_i386_32bit_xmlfiles): Likewise.
7871 (srv_i386_64bit_xmlfiles): Likewise.
7872 (srv_i386_xmlfiles): Likewise.
7873 (srv_amd64_xmlfiles): Likewise.
7874 (srv_i386_linux_xmlfiles): Likewise.
7875 (srv_amd64_linux_xmlfiles): Likewise.
7876 (i[34567]86-*-cygwin*): Set srv_regobj to $srv_i386_regobj. Set
7877 srv_xmlfiles to $srv_i386_xmlfiles.
7878 (i[34567]86-*-mingw32ce*): Likewise.
7879 (i[34567]86-*-mingw*): Likewise.
7880 (i[34567]86-*-nto*): Likewise.
7881 (i[34567]86-*-linux*): Set srv_regobj to $srv_i386_linux_regobj
7882 and $srv_amd64_linux_regobj. Set srv_xmlfiles to
7883 $srv_i386_linux_xmlfiles and $srv_amd64_linux_xmlfiles.
7884 (x86_64-*-linux*): Likewise.
7885
7886 * linux-x86-low.c (init_registers_x86_64_linux): Removed.
7887 (init_registers_amd64_linux): New.
7888 (x86_arch_setup): Replace init_registers_x86_64_linux with
7889 init_registers_amd64_linux.
7890
193f13e6
MK
78912010-02-23 Maxim Kuvyrkov <maxim@codesourcery.com>
7892
7893 * configure.ac: Check for libdl. If it is not available link against
7894 static libthread_db.
7895 * configure: Regenerate.
7896
85d721b8
PA
78972010-02-22 Pedro Alves <pedro@codesourcery.com>
7898
7899 PR9605
7900
7901 * i386-low.c (i386_length_and_rw_bits): Throw a fatal error if
7902 handing a read watchpoint.
7903 (i386_low_insert_watchpoint): Read watchpoints aren't supported.
7904
6076632b
DE
79052010-02-12 Doug Evans <dje@google.com>
7906
7907 * linux-low.c (linux_supports_tracefork_flag): Document.
7908 (linux_look_up_symbols): Add comment.
7909
3327ccf7
L
79102010-02-03 H.J. Lu <hongjiu.lu@intel.com>
7911
7912 * regcache.c (supply_register): Clear regcache if buf is NULL.
7913
0718675c 79142010-02-02 Nicolas Roche <roche@sourceware.org>
3327ccf7 7915 Joel Brobecker <brobecker@adacore.com>
0718675c
JB
7916
7917 * inferiors.c (find_inferior): Add function documentation.
7918 (unloaded_dll): Handle the case where the unloaded dll has not
7919 been previously registered in the dll list.
7920
177321bd
DJ
79212010-02-01 Daniel Jacobowitz <dan@codesourcery.com>
7922
7923 * linux-arm-low.c (thumb_breakpoint_len): Delete.
7924 (thumb2_breakpoint): New.
7925 (arm_breakpoint_at): Check for Thumb-2 breakpoints.
7926
2b009048
DJ
79272010-01-29 Daniel Jacobowitz <dan@codesourcery.com>
7928
7929 * linux-low.c (get_stop_pc): Check for SIGTRAP.
7930 (linux_wait_for_event_1): Handle SIGILL and SIGSEGV as possible
7931 breakpoints.
7932
3be029c7
PA
79332010-01-21 Pedro Alves <pedro@codesourcery.com>
7934
7935 * linux-ppc-low.c (ppc_arch_setup): Adjust to regcache changes.
7936
18f5de3b
JK
79372010-01-21 Jan Kratochvil <jan.kratochvil@redhat.com>
7938
7939 * linux-s390-low.c (s390_collect_ptrace_register)
7940 (s390_supply_ptrace_register): Adjust it for the new regcache parameter.
7941
3743bb4f
DE
79422010-01-21 Doug Evans <dje@google.com>
7943
14ce3065
DE
7944 * linux-low.c (PTRACE_ARG3_TYPE): Change from long to void*.
7945 (PTRACE_ARG4_TYPE): New macro.
7946 (handle_extended_wait): Cast ptrace arg4 to PTRACE_ARG4_TYPE.
7947 (linux_wait_for_event_1, linux_resume_one_lwp): Ditto.
7948 (fetch_register): Cast to uintptr_t before casting to PTRACE_ARG3_TYPE.
7949 (usr_store_inferior_registers): Ditto.
7950 (linux_read_memory, linux_write_memory): Ditto.
7951 (linux_test_for_tracefork): Ditto.
7952
3743bb4f
DE
7953 * linux-arm-low.c: Remove redundant include of gdb_proc_service.h.
7954 Only include elf.h if gdb_proc_service.h didn't include linux/elf.h.
7955
8b315be5
PA
79562010-01-21 Pedro Alves <pedro@codesourcery.com>
7957
7958 * proc-service.c (ps_lgetregs): Don't refetch registers from the
7959 target.
7960
85492558
PA
79612010-01-21 Pedro Alves <pedro@codesourcery.com>
7962
7963 * spu-low.c (spu_fetch_registers, spu_store_registers): Change
7964 prototype to take a regcache. Adjust.
7965
442ea881
PA
79662010-01-20 Pedro Alves <pedro@codesourcery.com>
7967
7968 * regcache.h (struct thread_info): Forward declare.
7969 (struct regcache): New.
7970 (new_register_cache): Adjust prototype.
7971 (get_thread_regcache): Declare.
7972 (free_register_cache): Adjust prototype.
7973 (registers_to_string, registers_from_string): Ditto.
7974 (supply_register, supply_register_by_name, collect_register)
7975 (collect_register_as_string, collect_register_by_name): Ditto.
7976 * regcache.c (struct inferior_regcache_data): Delete.
7977 (get_regcache): Rename to ...
7978 (get_thread_regcache): ... this. Adjust. Switch inferior before
7979 fetching registers.
7980 (regcache_invalidate_one): Adjust.
7981 (regcache_invalidate): Fix prototype.
7982 (new_register_cache): Return the new register cache.
7983 (free_register_cache): Change prototype.
7984 (realloc_register_cache): Adjust.
7985 (registers_to_string): Change prototype to take a regcache. Adjust.
7986 (registers_from_string): Ditto.
7987 (register_data): Ditto.
7988 (supply_register): Ditto.
7989 (supply_register_by_name): Ditto.
7990 (collect_register): Ditto.
7991 (collect_register_as_string): Ditto.
7992 (collect_register_by_name): Ditto.
7993 * server.c (process_serial_event): Adjust.
7994 * linux-low.h (regset_fill_func, regset_store_func): Change
7995 prototype.
7996 (get_pc, set_pc, collect_ptrace_register, supply_ptrace_register):
7997 Change prototype.
7998 * linux-low.c (get_stop_pc): Adjust.
7999 (check_removed_breakpoint): Adjust.
8000 (linux_wait_for_event): Adjust.
8001 (linux_resume_one_lwp): Adjust.
8002 (fetch_register): Add regcache parameter. Adjust.
8003 (usr_store_inferior_registers): Ditto.
8004 (regsets_fetch_inferior_registers): Ditto.
8005 (regsets_store_inferior_registers): Ditto.
8006 (linux_fetch_registers, linux_store_registers): Ditto.
8007 * i387-fp.c (i387_cache_to_fsave): Change prototype to take a
8008 regcache. Adjust.
43aaf8b6
PA
8009 (i387_fsave_to_cache, i387_cache_to_fxsave, i387_fxsave_to_cache):
8010 Ditto.
442ea881
PA
8011 * i387-fp.h (i387_cache_to_fsave, i387_fsave_to_cache): Change
8012 prototype to take a regcache.
8013 (i387_cache_to_fxsave, i387_fxsave_to_cache): Ditto.
8014 * remote-utils.c (convert_ascii_to_int, outreg)
8015 (prepare_resume_reply): Change prototype to take a regcache.
8016 Adjust.
8017 * target.h (struct target_ops) <fetch_registers, store_registers>:
8018 Change prototype to take a regcache.
8019 (fetch_inferior_registers, store_inferior_registers): Change
8020 prototype to take a regcache. Adjust.
8021 * proc-service.c (ps_lgetregs): Adjust.
8022 * linux-x86-low.c (x86_fill_gregset, x86_store_gregset)
8023 (x86_fill_fpregset, x86_store_fpregset, x86_fill_fpxregset)
8024 (x86_store_fpxregset, x86_get_pc, x86_set_pc): Change prototype to
8025 take a regcache. Adjust.
8026 * linux-arm-low.c (arm_fill_gregset, arm_store_gregset)
8027 (arm_fill_wmmxregset, arm_store_wmmxregset, arm_fill_vfpregset)
8028 (arm_store_vfpregset, arm_get_pc, arm_set_pc):
8029 (arm_breakpoint_at): Change prototype to take a regcache. Adjust.
8030 * linux-cris-low.c (cris_get_pc, cris_set_pc)
8031 (cris_cannot_fetch_register):
8032 (cris_breakpoint_at): Change prototype to take a regcache.
8033 Adjust.
8034 * linux-crisv32-low.c (cris_get_pc, cris_set_pc,
8035 cris_reinsert_addr, cris_write_data_breakpoint): Change prototype
8036 to take a regcache. Adjust.
8037 (cris_breakpoint_at, cris_insert_point, cris_remove_point):
8038 Adjust.
8039 * linux-m32r-low.c (m32r_get_pc, m32r_set_pc): Change prototype to
8040 take a regcache. Adjust.
8041 * linux-m68k-low.c (m68k_fill_gregset, m68k_store_gregset)
8042 (m68k_fill_fpregset, m68k_store_fpregset, m68k_get_pc,
8043 (m68k_set_pc): Change prototype to take a regcache. Adjust.
8044 * linux-mips-low.c (mips_get_pc):
8045 (mips_set_pc): Change prototype to take a regcache. Adjust.
8046 (mips_reinsert_addr): Adjust.
8047 (mips_collect_register): Change prototype to take a regcache.
8048 Adjust.
8049 (mips_supply_register):
8050 (mips_collect_register_32bit, mips_supply_register_32bit)
8051 (mips_fill_gregset, mips_store_gregset, mips_fill_fpregset)
8052 (mips_store_fpregset): Ditto.
43aaf8b6
PA
8053 * linux-ppc-low.c (ppc_supply_ptrace_register)
8054 (ppc_supply_ptrace_register): Ditto.
442ea881
PA
8055 (parse_spufs_run): Adjust.
8056 (ppc_get_pc, ppc_set_pc, ppc_fill_gregset, ppc_fill_vsxregset)
8057 (ppc_store_vsxregset, ppc_fill_vrregset, ppc_store_vrregset)
8058 (ppc_fill_evrregset, ppc_store_evrregset): Change prototype to
8059 take a regcache. Adjust.
8060 * linux-s390-low.c (s390_collect_ptrace_register)
8061 (s390_supply_ptrace_register, s390_fill_gregset, s390_get_pc)
8062 (s390_set_pc): Change prototype to take a regcache. Adjust.
8063 (s390_arch_setup): Adjust.
8064 * linux-sh-low.c (sh_get_pc, sh_breakpoint_at)
8065 (sh_fill_gregset): Change prototype to take a regcache. Adjust.
8066 * linux-sparc-low.c (sparc_fill_gregset_to_stack)
8067 (sparc_fill_gregset, sparc_store_gregset_from_stack)
8068 (sparc_store_gregset, sparc_get_pc): Change prototype to take a
8069 regcache. Adjust.
8070 (sparc_breakpoint_at): Adjust.
8071 * linux-xtensa-low.c (xtensa_fill_gregset):
8072 (xtensa_store_gregset):
8073 (xtensa_fill_xtregset, xtensa_store_xtregset, xtensa_get_pc)
8074 (xtensa_set_pc): Change prototype to take a regcache. Adjust.
8075 * nto-low.c (nto_fetch_registers, nto_store_registers): Change
8076 prototype to take a regcache. Adjust.
8077 * win32-arm-low.c (arm_fetch_inferior_register)
8078 (arm_store_inferior_register): Change prototype to take a
8079 regcache. Adjust.
8080 * win32-i386-low.c (i386_fetch_inferior_register)
8081 (i386_store_inferior_register): Change prototype to take a
8082 regcache. Adjust.
8083 * win32-low.c (child_fetch_inferior_registers)
8084 (child_store_inferior_registers): Change prototype to take a
8085 regcache. Adjust.
8086 (win32_wait): Adjust.
8087 (win32_fetch_inferior_registers): Change prototype to take a
8088 regcache. Adjust.
8089 (win32_store_inferior_registers): Adjust.
8090 * win32-low.h (struct win32_target_ops) <fetch_inferior_register,
8091 store_inferior_register>: Change prototype to take a regcache.
8092
60c3d7b0
DE
80932010-01-20 Doug Evans <dje@google.com>
8094
8095 * linux-low.c (linux_create_inferior): Wrap use of __SIGRTMIN in
8096 #ifdef.
8097 (linux_wait_for_event1, linux_init_signals): Ditto.
ec8ebe72 8098 (W_STOPCODE): Provide definition if missing.
60c3d7b0 8099
dc146f7c
VP
81002010-01-13 Vladimir Prus <vladimir@codesourcery.com>
8101
8102 * linux-low.c (linux_core_of_thread): New.
8103 (compare_ints, show_process, list_threads): New.
8104 (linux_qxfer_osdata): Report threads and cores.
8105 (linux_target_op): Register linux_core_of_thread.
8106 * remote-utils.c (prepare_resume_reply): Report the core.
8107 (buffer_xml_printf): Support %d specifier.
8108 * server.c (handle_threads_qxfer_proper, handle_threads_qxfer):
8109 New.
8110 (handle_query): Handle qXfer:threads. Announce availability
8111 thereof.
8112 * target.h (struct target_ops): New field core_of_thread.
8113
7803799a
UW
81142010-01-04 Ulrich Weigand <uweigand@de.ibm.com>
8115
8116 * Makefile.in (clean): Remove new generated files.
8117 (reg-s390.o, reg-s390.c): Remove rules.
8118 (reg-s390x.o, reg-s390x.c): Likewise.
8119 (s390-linux32.o, s390-linux32.c): Add rules.
8120 (s390-linux64.o, s390-linux64.c): Likewise.
8121 (s390x-linux64.o, s390x-linux64.c): Likewise.
8122 * configure.srv (s390*-*-linux*): Update srv_regobj and srv_xmlfiles.
8123 * linux-s390-low.c: Include <elf.h>.
8124 (HWCAP_S390_HIGH_GPRS): Define if undefined.
8125 (init_registers_s390): Remove prototype.
8126 (init_registers_s390x): Likewise.
8127 (init_registers_s390_linux32): Add prototype.
8128 (init_registers_s390_linux64): Likewise.
8129 (init_registers_s390x_linux64): Likewise.
8130 (s390_num_regs_3264): New define.
8131 (s390_regmap_3264): New global variable.
8132 (s390_cannot_fetch_register): Remove obsolete check.
8133 (s390_cannot_store_register): Likewise.
8134 (s390_collect_ptrace_register): Handle upper/lower register halves.
8135 (s390_supply_ptrace_register): Likewise.
8136 (s390_fill_gregset): Update to register number changes.
8137 (s390_get_hwcap): New routine.
8138 (s390_arch_setup): Detect 32-bit process running on 64-bit system.
8139 Install appropriate regmap and register set.
8140
6e7ffa39
JB
81412010-01-01 Joel Brobecker <brobecker@adacore.com>
8142
8143 * server.c (gdbserver_version): Update copyright year to 2010.
8144 * gdbreplay.c (gdbreplay_version): Likewise.
8145
957f3f49
DE
81462009-12-28 Doug Evans <dje@google.com>
8147
8148 * linux-low.c: Delete inclusion of ansidecl.h, elf/common.h,
8149 elf/external.h. Include <elf.h> instead but only if necessary.
8150
ca5c370d
PA
81512009-12-28 Pedro Alves <pedro@codesourcery.com>
8152
8153 * linux-low.c (linux_remove_process): Remove `detaching'
8154 parameter. Don't release/detach from thread_db here.
8155 (linux_kill): Release/detach from thread_db here, ...
8156 (linux_detach): ... and here, before actually detaching.
8157 (linux_wait_1): ... and here, when a process exits.
8158 * thread-db.c (any_thread_of): New.
8159 (thread_db_free): Switch the current inferior to a thread of the
8160 passed in process.
8161
4ee62156
DE
81622009-12-21 Doug Evans <dje@google.com>
8163
d90e6a88
DE
8164 * linux-x86-low.c: Delete outdated comment about Elf32_Phdr.
8165
c5f62d5f
DE
8166 * linux-low.c (kill_lwp): Use __NR_tkill instead of SYS_tkill.
8167 Move definition of tkill_failed to ifdef __NR_tkill to avoid gcc
8168 warning ifndef __NR_tkill. Move setting of errno there too.
8169 Delete unnecessary resetting of errno after syscall.
8170 Minor comment changes to match gdb/linux-nat.c:kill_lwp.
8171
10e86dd7
DE
8172 * configure.ac: Check for dladdr.
8173 * config.in: Regenerate.
8174 * configure: Regenerate.
8175 * thread-db.c (dladdr_to_soname): Only define ifdef HAVE_DLADDR.
8176 (try_thread_db_load): Update.
8177
4ee62156
DE
8178 * linux-low.c (my_waitpid): Delete unnecessary prototype.
8179
00f515da
DE
81802009-12-18 Doug Evans <dje@google.com>
8181
e9464885
DE
8182 * event-loop.c: Include unistd.h if it exists.
8183
07d4f67e
DE
8184 * linux-low.c (my_waitpid): Move definition away from being in
8185 between linux_tracefork_child/linux_test_for_tracefork.
8186
00f515da
DE
8187 * gdb_proc_service.h (psaddr_t): Fix type.
8188 * thread-db.c (thread_db_info.td_thr_tls_get_addr_p): Fix
8189 signature to match glibc.
8190
1de1badb
DE
81912009-12-16 Doug Evans <dje@google.com>
8192
8193 * linux-low.c (linux_read_memory): Fix argument to read.
8194
aeeb81d1
PA
81952009-11-26 Pedro Alves <pedro@codesourcery.com>
8196
8197 * win32-low.c (get_child_debug_event): On EXIT_THREAD_DEBUG_EVENT
8198 events, don't leave current_inferior pointing at null.
8199
10357975
PA
82002009-11-26 Pedro Alves <pedro@codesourcery.com>
8201
8202 * win32-low.c (LOG): Delete.
8203 (OUTMSG): Output to stderr.
8204 (OUTMSG2): Conditionalize on `debug_threads' variable, instead of
8205 on compile time LOG macro.
8206 (win32_wait): Fix debug output.
8207
cf6e3471
PA
82082009-11-26 Pedro Alves <pedro@codesourcery.com>
8209
8210 * win32-low.c (win32_add_one_solib): If the dll name is
8211 "ntdll.dll", prepend the system directory to the dll path.
8212
0c85e18e
MK
82132009-11-17 Daniel Jacobowitz <dan@codesourcery.com>
8214
8215 * m68k-tdep.c (m68k_gdbarch_init): Reuse previous initialization.
8216
9ac544ce 82172009-11-17 Nathan Sidwell <nathan@codesourcery.com>
889bf7c5 8218 Vladimir Prus <vladimir@codesourcery.com>
9ac544ce
MK
8219
8220 * Makefile.in (reg-cf.o, reg-cf.c): New targets.
8221 * configure.ac: Check for __mcoldfire__ and set
8222 gdb_cv_m68k_is_coldfire.
8223 * configure.srv: Use gdb_cv_m68k_is_coldfire to select between
8224 reg-cf.o and reg-m68k.o.
8225 * configure: Regenerated.
8226
fd7dd3e6
PA
82272009-11-16 Pedro Alves <pedro@codesourcery.com>
8228
8229 * linux-low.c (linux_remove_process): Add `detaching' parameter.
8230 Pass it to thread_db_free.
8231 (linux_kill, linux_detach, linux_wait_1): Adjust to pass the
8232 proper `detaching' argument to linux_remove_process.
8233 * linux-low.h (thread_db_free): Add `detaching' parameter.
8234 * thread-db.c (thread_db_init): Pass false as `detaching' argument
8235 to thread_db_free.
8236 (thread_db_free): Add `detaching' parameter. Only
8237 call td_ta_clear_event if detaching from process.
8238
75aa492e
MK
82392009-11-12 Maxim Kuvyrkov <maxim@codesourcery.com>
8240
8241 * thread-db.c (thread_db_free): Fix typo.
8242
21e1bee4
PP
82432009-11-11 Paul Pluzhnikov <ppluzhnikov@google.com>
8244
8245 PR gdb/10838
8246 * thread-db.c (thread_db_free): Call td_ta_clear_event.
8247
8838b45e
NS
82482009-11-03 Nathan Sidwell <nathan@codesourcery.com>
8249
8250 * configure.ac (i[34567]86-*): Check if we're targetting x86-64
8251 with an i686 compiler.
8252 * configure.srv (i[34567]86-*-linux*): Pull in x86-64 handling if
8253 needed.
8254 * configure: Rebuilt.
8255
8a35fb51
SL
82562009-10-29 Sandra Loosemore <sandra@codesourcery.com>
8257
8258 PR gdb/10783
8259
8260 * server.c (handle_search_memory_1): Correct read_addr initialization
8261 in loop for searching subsequent chunks.
8262
96f15937
PP
82632009-10-29 Paul Pluzhnikov <ppluzhnikov@google.com>
8264
8265 * configure.ac: New --with-libthread-db option.
8266 * thread-db.c: Allow direct dependence on libthread_db.
8267 (thread_db_free): Adjust.
8268 * config.in: Regenerate.
8269 * configure: Likewise.
889bf7c5 8270
5f7d1694
PP
82712009-10-28 Paul Pluzhnikov <ppluzhnikov@google.com>
8272
8273 PR gdb/10757
8274 * thread-db.c (attach_thread): New function.
8275 (maybe_attach_thread): Return success/failure.
8276 (find_new_threads_callback): Adjust.
889bf7c5
PA
8277 (thread_db_find_new_threads): Loop until no new threads.
8278
88e3b899
PA
82792009-10-13 Pedro Alves <pedro@codesourcery.com>
8280
8281 * proc-service.c (ps_lgetregs): Formatting.
8282
cdbfd419
PP
82832009-10-08 Paul Pluzhnikov <ppluzhnikov@google.com>
8284
8285 * acinclude.m4: (SRV_CHECK_THREAD_DB, SRV_CHECK_TLS_GET_ADDR): Remove.
8286 * configure.ac: Adjust.
8287 * linux-low.h (struct process_info_private): Move members to struct
8288 thread_db.
8289 (thread_db_free, thread_db_handle_monitor_command): New prototype.
8290 * linux-low.c (linux_remove_process): Adjust.
8291 (linux_wait_for_event_1, linux_look_up_symbols): Likewise.
8292 * server.c (handle_query): Move code ...
8293 (handle_monitor_command): ... here. New function.
8294 * target.h (struct target_ops): New member.
8295 * thread-db.c (struct thread_db): New.
8296 (libthread_db_search_path): New variable.
8297 (thread_db_create_event, thread_db_enable_reporting)
8298 (find_one_thread, maybe_attach_thread, find_new_threads_callback)
8299 (thread_db_find_new_threads, (thread_db_get_tls_address): Adjust.
8300 (try_thread_db_load_1, dladdr_to_soname): New functions.
8301 (try_thread_db_load, thread_db_load_search): New functions.
8302 (thread_db_init): Search for libthread_db.
8303 (thread_db_free): New function.
8304 (thread_db_handle_monitor_command): Likewise.
8305 * config.in: Regenerate.
8306 * configure: Regenerate.
889bf7c5 8307
4168d2d6
UW
83082009-09-27 Ulrich Weigand <uweigand@de.ibm.com>
8309
8310 * spu-low.c (spu_kill): Wait for inferior to terminate.
8311 Call clear_inferiors.
8312 (spu_detach): Call clear_inferiors.
8313
81ecdfbb
RW
83142009-08-22 Ralf Wildenhues <Ralf.Wildenhues@gmx.de>
8315
8316 * aclocal.m4: Regenerate.
8317 * config.in: Likewise.
8318 * configure: Likewise.
8319
0b9ff2c0
UW
83202009-07-31 Ulrich Weigand <uweigand@de.ibm.com>
8321
8322 * linux-ppc-low.c (INSTR_SC, NR_spu_run): Define.
8323 (parse_spufs_run): New function.
8324 (ppc_get_pc, ppc_set_pc): Detect and handle SPU PC.
8325 (ppc_breakpoint_at): Handle SPU breakpoints.
8326
efcbbd14
UW
83272009-07-31 Ulrich Weigand <uweigand@de.ibm.com>
8328
8329 * linux-low.c: Include <sys/stat.h> and <sys/vfs.h>.
8330 (SPUFS_MAGIC): Define.
8331 (spu_enumerate_spu_ids): New function.
8332 (linux_qxfer_spu): New function.
8333 (linux_target_ops): Install linux_qxfer_spu.
8334
f4d9bade
UW
83352009-07-31 Ulrich Weigand <uweigand@de.ibm.com>
8336
8337 * configure.srv (powerpc*-*-linux*): Add powerpc-cell32l.o
8338 and powerpc-cell64l.o to srv_regobj. Add rs6000/powerpc-cell32l.xml
8339 and rs6000/powerpc-cell64l.xml to srv_xmlfiles.
8340 * Makefile.in (powerpc-cell32l.o, powerpc-cell32l.c): New rules.
8341 (powerpc-cell64l.o, powerpc-cell64l.c): Likewise.
8342 (clean): Handle powerpc-cell32l.c and powerpc-cell64l.c.
8343 * linux-ppc-low.c (PPC_FEATURE_CELL): Define.
8344 (init_registers_powerpc_cell32l): Add prototype.
8345 (init_registers_powerpc_cell64l): Likewise.
8346 (ppc_arch_setup): Detect Cell/B.E. architecture.
8347
96e946ca
RW
83482009-07-30 Ralf Wildenhues <Ralf.Wildenhues@gmx.de>
8349
8350 * Makefile.in (datarootdir): New variable.
8351
58d6951d
DJ
83522009-07-28 Daniel Jacobowitz <dan@codesourcery.com>
8353
8354 * linux-low.c (linux_write_memory): Update debugging output.
8355 * Makefile.in (clean): Add new descriptions.
8356 (arm-with-vfpv2.o, arm-with-vfpv2.c, arm-with-vfpv3.o)
8357 (arm-with-vfpv3.c, arm-with-neon.o, arm-with-neon.c): New rules.
8358 * configure.srv: Add new files for arm*-*-linux*.
8359 * linux-arm-low.c: Add new declarations.
8360 (PTRACE_GETVFPREGS, PTRACE_SETVFPREGS): Define if undefined.
8361 (arm_hwcap, HWCAP_VFP, HWCAP_IWMMXT, HWCAP_NEON, HWCAP_VFPv3)
8362 (HWCAP_VFPv3D16): New.
8363 (arm_fill_wmmxregset, arm_store_wmmxregset): Check HWCAP_IWMMXT
8364 instead of __IWMMXT__.
8365 (arm_fill_vfpregset, arm_store_vfpregset, arm_get_hwcap)
8366 (arm_arch_setup): New.
8367 (target_regsets): Remove #ifdef. Add VFP regset.
8368 (the_low_target): Use arm_arch_setup.
8369
12b42a12
DJ
83702009-07-28 Daniel Jacobowitz <dan@codesourcery.com>
8371
8372 * linux-low.c (linux_kill_one_lwp): Adjust kernel workaround to skip
8373 the main thread again.
8374
ac8c974e
AR
83752009-07-06 Aleksandar Ristovski <aristovski@qnx.com>
8376
8377 Adding Neutrino gdbserver.
8378 * configure: Regenerated.
8379 * configure.ac: Add case for srv_qnx and set LIBS accordingly.
8380 * configure.srv (i[34567]86-*-nto*): New target.
8381 * nto-low.c, nto-low.h, nto-x86-low.c: New files.
8382 * remote-utils.c [__QNX__]: Include sys/iomgr.h
8383 (nto_comctrl) [__QNX__]: New function.
8384 (enable_async_io, disable_async_io) [__QNX__]: Call nto_comctrl.
8385
4424e0c3 83862009-07-05 Danny Backx <dannybackx@users.sourceforge.net>
7437790a
PA
8387
8388 * configure.srv (i[34567]86-*-mingw32ce*): Add i386-low.o to
8389 srv_tgtobj.
8390
912cf4ba
PA
83912009-07-04 Danny Backx <dannybackx@users.sourceforge.net>
8392 Pedro Alves <pedro@codesourcery.com>
8393
8394 * win32-i386-low.c (i386_get_thread_context): Handle systems that
8395 don't support CONTEXT_EXTENDED_REGISTERS.
8396 (i386_win32_breakpoint, i386_win32_breakpoint_len): New.
8397 (the_low_target): Install them.
8398 * win32-low.c (get_child_debug_event): Handle WaitForDebugEvent
8399 failing with ERROR_PIPE_NOT_CONNECTED.
8400
aa5ca48f
DE
84012009-06-30 Doug Evans <dje@google.com>
8402 Pierre Muller <muller@ics.u-strasbg.fr>
8403
8404 Add h/w watchpoint support to x86-linux, win32-i386.
8405 * Makefile.in (SFILES): Add i386-low.c
8406 (i386_low_h): Define.
8407 (i386-low.o): Add dependencies.
8408 (linux-x86-low.o): Add i386-low.h dependency.
8409 (win32-i386-low.o): Ditto.
8410 * i386-low.c: New file.
8411 * i386-low.h: New file.
8412 * configure.srv (i[34567]86-*-cygwin*): Add i386-low.o to srv_tgtobj.
8413 (i[34567]86-*-linux*, i[34567]86-*-mingw*, x86_64-*-linux*): Ditto.
8414 * linux-low.c (linux_add_process): Initialize arch_private.
8415 (linux_remove_process): Free arch_private.
8416 (add_lwp): Initialize arch_private.
8417 (delete_lwp): Free arch_private.
8418 (linux_resume_one_lwp): Call the_low_target.prepare_to_resume if
8419 provided.
8420 * linux-low.h (process_info_private): New member arch_private.
8421 (lwp_info): New member arch_private.
8422 (linux_target_ops): New members new_process, new_thread,
8423 prepare_to_resume.
8424 (ptid_of): New macro.
8425 * linux-x86-low.c: Include stddef.h, i386-low.h.
8426 (arch_process_info): New struct.
8427 (arch_lwp_info): New struct.
8428 (x86_linux_dr_get, x86_linux_dr_set): New functions.
8429 (i386_dr_low_set_addr, i386_dr_low_set_control): New functions.
8430 (i386_dr_low_get_status): New function.
8431 (x86_insert_point, x86_remove_point): New functions.
8432 (x86_stopped_by_watchpoint): New function.
8433 (x86_stopped_data_address): New function.
8434 (x86_linux_new_process, x86_linux_new_thread): New functions.
8435 (x86_linux_prepare_to_resume): New function.
8436 (the_low_target): Add entries for insert_point, remove_point,
8437 stopped_by_watchpoint, stopped_data_address, new_process, new_thread,
8438 prepare_to_resume.
8439 * server.c (debug_hw_points): New global.
8440 (monitor_show_help): Document set debug-hw-points.
8441 (handle_query): Process "set debug-hw-points".
8442 * server.h (debug_hw_points): Declare.
8443 (paddress): Declare.
8444 * utils.c (NUMCELLS, CELLSIZE): New macros.
8445 (get_sell, xsnprintf, paddress): New functions.
8446 * win32-arm-low.c (the_low_target): Add entries for insert_point,
8447 remove_point, stopped_by_watchpoint, stopped_data_address.
8448 * win32-i386-low.c: Include i386-low.h.
8449 (debug_reg_state): Replaces dr.
8450 (i386_dr_low_set_addr, i386_dr_low_set_control): New functions.
8451 (i386_dr_low_get_status): New function.
8452 (i386_insert_point, i386_remove_point): New functions.
8453 (i386_stopped_by_watchpoint): New function.
8454 (i386_stopped_data_address): New function.
8455 (i386_initial_stuff): Update.
8456 (get_thread_context,set_thread_context,i386_thread_added): Update.
8457 (the_low_target): Add entries for insert_point,
8458 remove_point, stopped_by_watchpoint, stopped_data_address.
8459 * win32-low.c (win32_insert_watchpoint): New function.
8460 (win32_remove_watchpoint): New function.
8461 (win32_stopped_by_watchpoint): New function.
8462 (win32_stopped_data_address): New function.
8463 (win32_target_ops): Add entries for insert_watchpoint,
8464 remove_watchpoint, stopped_by_watchpoint, stopped_data_address.
8465 * win32-low.h (win32_target_ops): New members insert_point,
8466 remove_point, stopped_by_watchpoint, stopped_data_address.
8467
d993e290
PA
84682009-06-25 Pedro Alves <pedro@codesourcery.com>
8469
8470 * server.c (process_serial_event): Re-return unsupported, not
8471 error, if the type isn't recognized. Re-allow supporting only
8472 insert or remove packets. Also call require_running for
8473 breakpoints. Add missing break statement to default case. Tidy.
8474 * target.h (struct target_ops): Rename insert_watchpoint to
8475 insert_point, and remove_watchpoint to remove_point.
8476
8477 * linux-low.h (struct linux_target_ops): Likewise.
8478 * linux-low.c (linux_insert_watchpoint): Rename to ...
8479 (linux_insert_point): ... this. Adjust.
8480 (linux_remove_watchpoint): Rename to ...
8481 (linux_remove_point): ... this. Adjust.
8482 (linux_target_ops): Adjust.
8483 * linux-crisv32-low.c (cris_insert_watchpoint): Rename to ...
8484 (cris_insert_point): ... this.
8485 (cris_remove_watchpoint): Rename to ...
8486 (cris_remove_point): ... this.
8487 (the_low_target): Adjust.
8488
0f54c268
PM
84892009-06-24 Pierre Muller <muller@ics.u-strasbg.fr>
8490
8491 * server.c (handle_v_kill): Pass signal_pid to
8492 kill_inferior if multi_process is zero.
8493
c6314022
AR
84942009-06-23 Aleksandar Ristovski <aristovski@qnx.com>
8495
8496 * server.c (process_serial_event): Add support for Z0 and Z1 packet.
8497 * target.h (target_ops): Comment for *_watchpoint to make it clear
8498 the functions can get types '0' and '1'.
8499
4463ce24
AR
85002009-06-22 Aleksandar Ristovski <aristovski@qnx.com>
8501
8502 * linux-low.c (usr_fetch_inferior_registers): Remove check for regno 0.
8503 * proc-service.c (ps_lgetregs): Pass -1 to fetch all registers.
8504 * regcache.c (get_regcache): Likewise.
8505 * spu-low.c (spu_fetch_registers): Remove 0 to -1 conversion.
8506 * win32-low.c (child_fetch_inferior_registers): Remove check for
8507 regno 0.
8508
cf8fd78b
PA
85092009-06-19 Aleksandar Ristovski <aristovski@qnx.com>
8510 Pedro Alves <pedro@codesourcery.com>
8511
8512 * target.h (struct target_ops) <supports_multi_process>: New
8513 callback.
8514 (target_supports_multi_process): New.
8515 * server.c (handle_query): Even if GDB reports support, only
8516 enable multi-process if the target also supports it. Report
8517 multi-process support only if the target backend supports it.
8518 * linux-low.c (linux_supports_multi_process): New function.
8519 (linux_target_ops): Install it as target_supports_multi_process
8520 callback.
8521
47c0c975
DE
85222009-05-24 Doug Evans <dje@google.com>
8523
e09875d4
DE
8524 Global renaming of find_thread_pid to find_thread_ptid.
8525 * server.h (find_thread_ptid): Renamed from find_thread_pid.
8526 * inferiors.c (find_thread_ptid): Renamed from find_thread_pid.
8527 All callers updated.
8528
e27d73f6
DE
8529 * linux-low.c (handle_extended_wait): Use linux_resume_one_lwp
8530 to resume the newly created thread, don't call ptrace (PTRACE_CONT)
8531 directly.
8532
47c0c975
DE
8533 * linux-low.c (get_stop_pc): Print pc if debug_threads.
8534 (check_removed_breakpoint, linux_wait_for_lwp): Ditto.
8535 (linux_resume_one_lwp): Ditto.
8536
2acc282a
DE
85372009-05-23 Doug Evans <dje@google.com>
8538
8539 * linux-low.c (linux_resume_one_lwp): Change type of first arg
8540 from struct inferior_list_entry * to struct lwp_info *.
8541 All callers updated.
8542
9f1036c1
DE
85432009-05-13 Doug Evans <dje@google.com>
8544
8545 * linux-x86-low.c: Don't include assert.h.
8546 (x86_siginfo_fixup): Use fatal, not assert.
8547 (x86_arch_setup): Fix comment.
8548
d0722149
DE
85492009-05-12 Doug Evans <dje@google.com>
8550
8551 Biarch support for i386/amd64 gdbserver.
8552 * Makefile.in (SFILES): Remove linux-i386-low.c, linux-x86-64-low.c.
8553 Add linux-x86-low.c.
8554 (linux-i386-low.o, linux-x86-64-low.o): Delete.
8555 (linux-x86-low.o): Add.
8556 * linux-x86-64-low.c: Delete.
8557 * linux-i386-low.c: Delete.
8558 * linux-x86-low.c: New file.
8559 * configure.srv (i?86-linux srv_tgtobj): Replace linux-i386-low.o with
8560 linux-x86-low.o.
8561 (x86_64-linux srv_tgtobj): Replace linux-x86-64-low.o with
8562 linux-x86-low.o.
8563 (x86_64-linux srv_regobj): Add reg-i386-linux.o.
8564 * linux-low.c: Include ansidecl.h, elf/common.h, elf/external.h.
8565 (linux_child_pid_to_exec_file): New function.
8566 (elf_64_header_p, elf_64_file_p): New functions.
8567 (siginfo_fixup): New function.
8568 (linux_xfer_siginfo): New local inf_siginfo. Call siginfo_fixup to
8569 give target a chance to convert layout.
8570 * linux-low.h (linux_target_ops): New member siginfo_fixup.
8571 (linux_child_pid_to_exec_file, elf_64_file_p): Declare.
8572
fdeb2a12
DE
85732009-05-07 Doug Evans <dje@google.com>
8574
8575 * linux-low.c (regsets_fetch_inferior_registers): Fix memory leak.
8576 (regsets_store_inferior_registers): Ditto.
8577
a6dbe5df
PA
85782009-05-06 Pedro Alves <pedro@codesourcery.com>
8579
8580 PR server/10048
8581
8582 * linux-low.c (must_set_ptrace_flags): Delete.
8583 (linux_create_inferior): Set `lwp->must_set_ptrace_flags' instead
8584 of the global.
8585 (linux_attach_lwp_1): Don't set PTRACE_SETOPTIONS here. Set
8586 `lwp->must_set_ptrace_flags' instead.
ba42693b 8587 (linux_wait_for_event_1): Set ptrace options here.
a6dbe5df
PA
8588 (linux_wait_1): ... not here.
8589
5091eb23
DE
85902009-04-30 Doug Evans <dje@google.com>
8591
9f767825
DE
8592 * inferiors.c (started_inferior_callback): New function.
8593 (attached_inferior_callback): New function.
8594 (have_started_inferiors_p, have_attached_inferiors_p): New functions.
8595 * server.c (print_started_pid, print_attached_pid): New functions.
8596 (detach_or_kill_for_exit): New function.
8597 (main): Call it instead of for_each_inferior (kill_inferior_callback).
8598 * server.h (have_started_inferiors_p): Declare.
8599 (have_attached_inferiors_p): Declare.
8600
5091eb23
DE
8601 * inferiors.c (remove_process): Fix memory leak, free process.
8602 * linux-low.c (linux_remove_process): New function.
8603 (linux_kill): Call it instead of remove_process.
8604 (linux_detach, linux_wait_1): Ditto.
8605
155c8968
PA
86062009-04-19 Danny Backx <dannybackx@users.sourceforge.net>
8607
8608 * configure.srv: Add x86 Windows CE target.
8609
7fe519cb
UW
86102009-04-03 Ulrich Weigand <uweigand@de.ibm.com>
8611
8612 * inferiors.c (get_thread_process): Make global.
8613 * server.h (get_thread_process): Add prototype.
8614 * thread-db.c (find_one_thread): Use get_thread_process
8615 instead of current_process.
8616 (thread_db_get_tls_address): Do not crash if called when
8617 thread layer is not yet initialized.
8618
5472f405
UW
86192009-04-03 Ulrich Weigand <uweigand@de.ibm.com>
8620
8621 * remote-utils.c (prepare_resume_reply): Null-terminate packet.
8622 * spu-low.c (current_tid): Rename to ...
8623 (current_ptid): ... this.
8624 (fetch_ppc_register, fetch_ppc_memory, store_ppc_memory,
8625 spu_proc_xfer_spu, spu_resume, spu_request_interrupt): Use
8626 ptid_get_lwp (current_ptid) instead of current_tid.
8627 (spu_kill, spu_detach, spu_join, spu_wait): Use pid argument
8628 instead of current_tid. Use find_process_pid to verify pid
8629 argument is valid. Pass proper argument to remove_process.
8630 (spu_thread_alive): Compare current_ptid instead of current_tid.
8631 (spu_resume): Likewise.
8632
55ac2b99
PA
86332009-04-02 Pedro Alves <pedro@codesourcery.com>
8634
8635 * linux-low.c (usr_store_inferior_registers): Declare local `pid'
8636 variable.
8637
95954743
PA
86382009-04-01 Pedro Alves <pedro@codesourcery.com>
8639
8640 Implement the multiprocess extensions, and add linux multiprocess
8641 support.
8642
8643 * server.h (ULONGEST): Declare.
8644 (struct ptid, ptid_t): New.
8645 (minus_one_ptid, null_ptid): Declare.
8646 (ptid_build, pid_to_ptid, ptid_get_pid, ptid_get_lwp)
8647 (ptid_get_tid, ptid_equal, ptid_is_pid): Declare.
8648 (struct inferior_list_entry): Change `id' type from unsigned from
8649 to ptid_t.
8650 (struct sym_cache, struct breakpoint, struct
8651 process_info_private): Forward declare.
8652 (struct process_info): Declare.
8653 (current_process): Declare.
8654 (all_processes): Declare.
8655 (initialize_inferiors): Declare.
8656 (add_thread): Adjust to use ptid_t.
8657 (thread_id_to_gdb_id, thread_to_gdb_id, gdb_id_to_thread_id): Ditto.
8658 (add_process, remove_process, find_thread_pid): Declare.
8659 (find_inferior_id): Adjust to use ptid_t.
8660 (cont_thread, general_thread, step_thread): Change type to ptid_t.
8661 (multi_process): Declare.
8662 (push_event): Adjust to use ptid_t.
8663 (read_ptid, write_ptid): Declare.
8664 (prepare_resume_reply): Adjust to use ptid_t.
8665 (clear_symbol_cache): Declare.
8666 * inferiors.c (all_processes): New.
8667 (null_ptid, minus_one_ptid): New.
8668 (ptid_build, pid_to_ptid, ptid_get_pid, ptid_get_lwp)
8669 (ptid_get_tid, ptid_equal, ptid_is_pid): New.
8670 (add_thread): Change unsigned long to ptid. Remove gdb_id
8671 parameter. Adjust.
8672 (thread_id_to_gdb_id, thread_to_gdb_id): Change unsigned long to ptid.
8673 (gdb_id_to_thread): Rename to ...
8674 (find_thread_pid): ... this. Change unsigned long to ptid.
8675 (gdb_id_to_thread_id, find_inferior_id): Change unsigned long to ptid.
8676 (loaded_dll, pull_pid_from_list): Adjust.
8677 (add_process, remove_process, find_process_pid)
8678 (get_thread_process, current_process, initialize_inferiors): New.
8679 * target.h (struct thread_resume) <thread>: Change type to ptid_t.
8680 (struct target_waitstatus) <related_pid>: Ditto.
8681 (struct target_ops) <kill, detach>: Add `pid' argument. Change
8682 return type to int.
8683 (struct target_ops) <join>: Add `pid' argument.
8684 (struct target_ops) <thread_alive>: Change pid's type to ptid_t.
8685 (struct target_ops) <wait>: Add `ptid' field. Change return type
8686 to ptid.
8687 (kill_inferior, detach_inferior, join_inferior): Add `pid' argument.
8688 (mywait): Add `ptid' argument. Change return type to ptid_t.
8689 (target_pid_to_str): Declare.
8690 * target.c (set_desired_inferior): Adjust to use ptids.
8691 (mywait): Add new `ptid' argument. Adjust.
8692 (target_pid_to_str): New.
8693 * mem-break.h (free_all_breakpoints): Declare.
8694 * mem-break.c (breakpoints): Delelete.
8695 (set_breakpoint_at, delete_breakpoint, find_breakpoint_at)
8696 (check_mem_read, check_mem_write, delete_all_breakpoints): Adjust
8697 to use per-process breakpoint list.
8698 (free_all_breakpoints): New.
8699 * remote-utils.c (struct sym_cache) <name>: Drop `const'.
8700 (symbol_cache, all_symbols_looked_up): Delete.
8701 (hexchars): New.
8702 (ishex, unpack_varlen_hex, write_ptid, hex_or_minus_one,
8703 read_ptid): New.
8704 (prepare_resume_reply): Change ptid argument's type from unsigned
8705 long to ptid_t. Adjust. Implement W;process and X;process.
8706 (free_sym_cache, clear_symbol_cache): New.
8707 (look_up_one_symbol): Adjust to per-process symbol cache. *
8708 * server.c (cont_thread, general_thread, step_thread): Change type
8709 to ptid_t.
8710 (attached): Delete.
8711 (multi_process): New.
8712 (last_ptid): Change type to ptid_t.
8713 (struct vstop_notif) <ptid>: Change type to ptid_t.
8714 (queue_stop_reply, push_event): Change `ptid' argument's type to
8715 ptid_t.
8716 (discard_queued_stop_replies): Add `pid' argument.
8717 (start_inferior): Adjust to use ptids. Adjust to mywait interface
8718 changes. Don't reference the `attached' global.
8719 (attach_inferior): Adjust to mywait interface changes.
8720 (handle_query): Adjust to use ptids. Parse GDB's qSupported
8721 features. Handle and report "multiprocess+". Handle
8722 "qAttached:PID".
8723 (handle_v_cont): Adjust to use ptids. Adjust to mywait interface
8724 changes.
8725 (handle_v_kill): New.
8726 (handle_v_stopped): Adjust to use target_pid_to_str.
8727 (handle_v_requests): Allow multiple attaches and runs when
8728 multiprocess extensions are in effect. Handle "vKill".
8729 (myresume): Adjust to use ptids.
8730 (queue_stop_reply_callback): Add `arg' parameter. Handle it.
8731 (handle_status): Adjust to discard_queued_stop_replies interface
8732 change.
8733 (first_thread_of, kill_inferior_callback)
8734 (detach_or_kill_inferior_callback, join_inferiors_callback): New.
8735 (main): Call initialize_inferiors. Adjust to use ptids, killing
8736 and detaching from all inferiors. Handle multiprocess packet
8737 variants.
8738 * linux-low.h: Include gdb_proc_service.h.
8739 (struct process_info_private): New.
8740 (struct linux_target_ops) <pid_of>: Use ptid_get_pid.
8741 <lwpid_of>: Use ptid_get_lwp.
8742 (get_lwp_thread): Adjust.
8743 (struct lwp_info): Add `dead' member.
8744 (find_lwp_pid): Declare.
8745 * linux-low.c (thread_db_active): Delete.
8746 (new_inferior): Adjust comment.
8747 (inferior_pid): Delete.
8748 (linux_add_process): New.
8749 (handle_extended_wait): Adjust.
8750 (add_lwp): Change unsigned long to ptid.
8751 (linux_create_inferior): Add process to processes table. Adjust
8752 to use ptids. Don't set new_inferior here.
8753 (linux_attach_lwp): Rename to ...
8754 (linux_attach_lwp_1): ... this. Add `initial' argument. Handle
8755 it. Adjust to use ptids.
8756 (linux_attach_lwp): New.
8757 (linux_attach): Add process to processes table. Don't set
8758 new_inferior here.
8759 (struct counter): New.
8760 (second_thread_of_pid_p, last_thread_of_process_p): New.
8761 (linux_kill_one_lwp): Add `args' parameter. Handle it. Adjust to
8762 multiple processes.
8763 (linux_kill): Add `pid' argument. Handle it. Adjust to multiple
8764 processes. Remove process from process table.
8765 (linux_detach_one_lwp): Add `args' parameter. Handle it. Adjust
8766 to multiple processes.
8767 (any_thread_of): New.
8768 (linux_detach): Add `pid' argument, and handle it. Remove process
8769 from processes table.
8770 (linux_join): Add `pid' argument. Handle it.
8771 (linux_thread_alive): Change unsighed long argument to ptid_t.
8772 Consider dead lwps as not being alive.
8773 (status_pending_p): Rename `dummy' argument to `arg'. Filter out
8774 threads we're not interested in.
8775 (same_lwp, find_lwp_pid): New.
8776 (linux_wait_for_lwp): Change `pid' argument's type from int to
8777 ptid_t. Adjust.
8778 (linux_wait_for_event): Rename to ...
8779 (linux_wait_for_event_1): ... this. Change `pid' argument's type
8780 from int to ptid_t. Adjust.
8781 (linux_wait_for_event): New.
8782 (linux_wait_1): Add `ptid' argument. Change return type to
8783 ptid_t. Adjust. Use last_thread_of_process_p. Remove processes
8784 that exit from the process table.
8785 (linux_wait): Add `ptid' argument. Change return type to ptid_t.
8786 Adjust.
8787 (mark_lwp_dead): New.
8788 (wait_for_sigstop): Adjust to use ptids. If a process exits while
8789 stopping all threads, mark its main lwp as dead.
8790 (linux_set_resume_request, linux_resume_one_thread): Adjust to use
8791 ptids.
8792 (fetch_register, usr_store_inferior_registers)
8793 (regsets_fetch_inferior_registers)
8794 (regsets_store_inferior_registers, linux_read_memory)
8795 (linux_write_memory): Inline `inferior_pid'.
8796 (linux_look_up_symbols): Adjust to use per-process
8797 `thread_db_active'.
8798 (linux_request_interrupt): Adjust to use ptids.
8799 (linux_read_auxv): Inline `inferior_pid'.
8800 (initialize_low): Don't reference thread_db_active.
8801 * gdb_proc_service.h (struct ps_prochandle) <pid>: Remove.
8802 * proc-service.c (ps_lgetregs): Use find_lwp_pid.
8803 (ps_getpid): Return the pid of the current inferior.
8804 * thread-db.c (proc_handle, thread_agent): Delete.
8805 (thread_db_create_event, thread_db_enable_reporting): Adjust to
8806 per-process data.
8807 (find_one_thread): Change argument type to ptid_t. Adjust to
8808 per-process data.
8809 (maybe_attach_thread): Adjust to per-process data and ptids.
8810 (thread_db_find_new_threads): Ditto.
8811 (thread_db_init): Ditto.
8812 * spu-low.c (spu_create_inferior, spu_attach): Add process to
8813 processes table. Adjust to use ptids.
8814 (spu_kill, spu_detach): Adjust interface. Remove process from
8815 processes table.
8816 (spu_join, spu_thread_alive): Adjust interface.
8817 (spu_wait): Adjust interface. Remove process from processes
8818 table. Adjust to use ptids.
8819 * win32-low.c (current_inferior_tid): Delete.
8820 (current_inferior_ptid): New.
8821 (debug_event_ptid): New.
8822 (thread_rec): Take a ptid. Adjust.
8823 (child_add_thread): Add `pid' argument. Adjust to use ptids.
8824 (child_delete_thread): Ditto.
8825 (do_initial_child_stuff): Add `attached' argument. Add process to
8826 processes table.
8827 (child_fetch_inferior_registers, child_store_inferior_registers):
8828 Adjust.
8829 (win32_create_inferior): Pass 0 to do_initial_child_stuff.
8830 (win32_attach): Pass 1 to do_initial_child_stuff.
8831 (win32_kill): Adjust interface. Remove process from processes
8832 table.
8833 (win32_detach): Ditto.
8834 (win32_join): Adjust interface.
8835 (win32_thread_alive): Take a ptid.
8836 (win32_resume): Adjust to use ptids.
8837 (get_child_debug_event): Ditto.
8838 (win32_wait): Adjust interface. Remove exiting process from
8839 processes table.
8840
bd99dc85
PA
88412009-04-01 Pedro Alves <pedro@codesourcery.com>
8842
8843 Non-stop mode support.
8844
8845 * server.h (non_stop): Declare.
8846 (gdb_client_data, handler_func): Declare.
8847 (delete_file_handler, add_file_handler, start_event_loop):
8848 Declare.
8849 (handle_serial_event, handle_target_event, push_event)
8850 (putpkt_notif): Declare.
8851 * target.h (enum resume_kind): New.
8852 (struct thread_resume): Replace `step' field by `kind' field.
8853 (TARGET_WNOHANG): Define.
8854 (struct target_ops) <wait>: Add `options' argument.
8855 <supports_non_stop, async, start_non_stop>: New fields.
8856 (target_supports_non_stop, target_async): New.
8857 (start_non_stop): Declare.
8858 (mywait): Add `options' argument.
8859 * target.c (mywait): Add `options' argument. Print child exit
8860 notifications here.
8861 (start_non_stop): New.
8862 * server.c (non_stop, own_buf, mem_buf): New globals.
8863 (struct vstop_notif): New.
8864 (notif_queue): New global.
8865 (queue_stop_reply, push_event, discard_queued_stop_replies)
8866 (send_next_stop_reply): New.
8867 (start_inferior): Adjust to use resume_kind. Adjust to mywait
8868 interface changes.
8869 (attach_inferior): In non-stop mode, don't wait for the target
8870 here.
8871 (handle_general_set): Handle QNonStop.
8872 (handle_query): When handling qC, return the current general
8873 thread, instead of the first thread of the list.
8874 (handle_query): If the backend supports non-stop mode, include
8875 QNonStop+ in the qSupported query response.
8876 (handle_v_cont): Adjust to use resume_kind. Handle resume_stop
8877 and non-stop mode.
8878 (handle_v_attach, handle_v_run): Handle non-stop mode.
8879 (handle_v_stopped): New.
8880 (handle_v_requests): Report support for vCont;t. Handle vStopped.
8881 (myresume): Adjust to use resume_kind. Handle non-stop.
8882 (queue_stop_reply_callback): New.
8883 (handle_status): Handle non-stop mode.
8884 (main): Clear non_stop flag on reconnection. Use the event-loop.
8885 Refactor serial protocol handling from here ...
8886 (process_serial_event): ... to this new function. When GDB
8887 selects any thread, select one here. In non-stop mode, wait until
8888 GDB acks all pending events before exiting.
8889 (handle_serial_event, handle_target_event): New.
8890 * remote-utils.c (remote_open): Install remote_desc in the event
8891 loop.
8892 (remote_close): Remove remote_desc from the event loop.
8893 (putpkt_binary): Rename to...
8894 (putpkt_binary_1): ... this. Add `is_notic' argument. Handle it.
8895 (putpkt_binary): New as wrapper around putpkt_binary_1.
8896 (putpkt_notif): New.
8897 (prepare_resume_reply): In non-stop mode, don't change the
8898 general_thread.
8899 * event-loop.c: New.
8900 * Makefile.in (OBJ): Add event-loop.o.
8901 (event-loop.o): New rule.
8902
8903 * linux-low.h (pid_of): Moved here.
8904 (lwpid_of): New.
8905 (get_lwp_thread): Use lwpid_of.
8906 (struct lwp_info): Delete `lwpid' field. Add `suspended' field.
8907 * linux-low.c (pid_of): Delete.
8908 (inferior_pid): Use lwpid_of.
8909 (linux_event_pipe): New.
8910 (target_is_async_p): New.
8911 (delete_lwp): New.
8912 (handle_extended_wait): Use lwpid_of.
8913 (add_lwp): Don't set lwpid field.
8914 (linux_attach_lwp): Adjust debug output. Use lwpid_of.
8915 (linux_kill_one_lwp): If killing a running lwp, stop it first.
8916 Use lwpid_of. Adjust to linux_wait_for_event interface changes.
8917 (linux_detach_one_lwp): If detaching from a running lwp, stop it
8918 first. Adjust to linux_wait_for_event interface changes. Use
8919 lwpid_of.
8920 (linux_detach): Don't delete the main lwp here.
8921 (linux_join): Use my_waitpid. Avoid signal_pid. Use lwpid_of.
8922 (status_pending_p): Don't consider explicitly suspended lwps.
8923 (linux_wait_for_lwp): Take an integer pid instead of a lwp_info
8924 pointer. Add OPTIONS argument. Change return type to int. Use
8925 my_waitpid instead of sleeping. Handle WNOHANG. Use lwpid_of.
8926 (linux_wait_for_event): Take an integer pid instead of a lwp_info
8927 pointer. Add status pointer argument. Return a pid instead of a
8928 status. Use lwpid_of. Adjust to linux_wait_for_lwp interface
8929 changes. In non-stop mode, don't switch to a random thread.
8930 (linux_wait): Rename to...
8931 (linux_wait_1): ... this. Add target_options argument, and handle
8932 it. Adjust to use resume_kind. Use lwpid_of. In non-stop mode,
8933 don't handle the continue thread. Handle TARGET_WNOHANG. Merge
8934 clean exit and signal exit code. Don't stop all threads in
8935 non-stop mode. In all-stop mode, only stop all threads when
8936 reporting a stop to GDB. Handle explicit thread stop requests.
8937 (async_file_flush, async_file_mark): New.
8938 (linux_wait): New.
8939 (send_sigstop): Use lwpid_of.
8940 (wait_for_sigstop): Use lwpid_of. Adjust to linux_wait_for_event
8941 interface changes. In non-stop mode, don't switch to a random
8942 thread.
8943 (linux_resume_one_lwp): Use lwpid_of.
8944 (linux_continue_one_thread, linux_queue_one_thread): Merge into ...
8945 (linux_resume_one_thread): ... this. Handle resume_stop. In
8946 non-stop mode, don't look for pending flag in all threads.
8947 (resume_status_pending_p): Don't consider explicitly suspended
8948 threads.
8949 (my_waitpid): Reimplement. Emulate __WALL.
8950 (linux_request_interrupt, linux_read_offsets, linux_xfer_siginfo):
8951 Use lwpid_of.
8952 (sigchld_handler, linux_supports_non_stop, linux_async)
8953 (linux_start_non_stop): New.
8954 (linux_target_ops): Register linux_supports_non_stop, linux_async
8955 and linux_start_non_stop.
8956 (initialize_low): Install SIGCHLD handler.
8957 * thread-db.c (thread_db_create_event, find_one_thread)
8958 (thread_db_get_tls_address): Use lwpid_of.
8959 * win32-low.c (win32_detach): Adjust to use resume_kind.
8960 (win32_wait): Add `options' argument.
8961 * spu-low.c (spu_resume): Adjust to use resume_kind.
8962 (spu_wait): Add `options' argument.
8963
5b1c542e
PA
89642009-04-01 Pedro Alves <pedro@codesourcery.com>
8965
8966 Decouple target code from remote protocol.
8967
8968 * target.h (enum target_waitkind): New.
8969 (struct target_waitstatus): New.
8970 (struct target_ops) <wait>: Return an unsigned long. Take a
8971 target_waitstatus pointer instead of a char pointer.
8972 (mywait): Likewise.
8973 * target.c (mywait): Change prototype to return an unsigned long.
8974 Take a target_waitstatus pointer instead of a char pointer. Adjust.
8975 * server.h (thread_from_wait, old_thread_from_wait): Delete
8976 declarations.
8977 (prepare_resume_reply): Change prototype to take a
8978 target_waitstatus.
8979 * server.c (thread_from_wait, old_thread_from_wait): Delete.
8980 (last_status, last_ptid): New.
8981 (start_inferior): Remove "statusptr" argument. Adjust. Return a
8982 pid instead of a signal.
8983 (attach_inferior): Remove "status" and "signal" parameters.
8984 Adjust.
8985 (handle_query): For qGetTLSAddr, parse the thread id with strtol,
8986 not as an address.
8987 (handle_v_cont, handle_v_attach, handle_v_run, handle_v_kill)
8988 (handle_v_requests, myresume): Remove "status" and "signal"
8989 parameters. Adjust.
8990 (handle_status): New.
8991 (main): Delete local `status'. Adjust.
8992 * remote-utils.c: Include target.h.
8993 (prepare_resume_reply): Change prototype to take a
8994 target_waitstatus. Adjust.
8995
8996 * linux-low.c (linux_wait): Adjust to new target_ops->wait
8997 interface.
8998 * spu-low.c (spu_wait): Adjust.
8999 * win32-low.c (enum target_waitkind, struct target_waitstatus):
9000 Delete.
9001 (win32_wait): Adjust.
9002
2bd7c093
PA
90032009-04-01 Pedro Alves <pedro@codesourcery.com>
9004
9005 * target.h (struct thread_resume): Delete leave_stopped member.
9006 (struct target_ops): Add a `n' argument to the `resume' callback.
9007 * server.c (start_inferior): Adjust.
9008 (handle_v_cont, myresume): Adjust.
9009 * linux-low.c (check_removed_breakpoint): Adjust to resume
9010 interface change, and to removed leave_stopped field.
9011 (resume_ptr): Delete.
9012 (struct thread_resume_array): New.
9013 (linux_set_resume_request): Add new `arg' parameter. Adjust to
9014 resume interface change.
9015 (linux_continue_one_thread, linux_queue_one_thread)
9016 (resume_status_pending_p): Check if the resume field is NULL
9017 instead of checking the leave_stopped member.
9018 (linux_resume): Adjust to the target resume interface change.
9019 * spu-low.c (spu_resume): Adjust to the target resume interface
9020 change.
9021 * win32-low.c (win32_detach, win32_resume): Ditto.
9022
c35fafde
PA
90232009-04-01 Pedro Alves <pedro@codesourcery.com>
9024
9025 * linux-low.c (linux_wait_for_event): Don't clear the `stepping'
9026 flag.
9027 (wait_for_sigstop): Don't leave a finished single-step SIGTRAP
9028 pending.
9029 (linux_continue_one_thread): Only preserve the stepping flag if
9030 there's a pending breakpoint.
9031
0a59d50b
PA
90322009-03-31 Pedro Alves <pedro@codesourcery.com>
9033
9034 * server.c (main): After the inferior having exited, call
9035 remote_close before exiting gdbserver.
9036
f04c6d38
TJB
90372009-03-25 Thiago Jung Bauermann <bauerman@br.ibm.com>
9038
9039 Fix size of FPSCR in Power 7 processors.
9040 * linux-ppc-low.c (PPC_FEATURE_ARCH_2_05): Remove #define.
9041 (PPC_FEATURE_HAS_DFP): New #define.
9042 (ppc_arch_setup): Check for DFP feature instead of ISA 2.05 to decide on
9043 size of the FPSCR.
9044
78e5cee6
PA
90452009-03-23 Pedro Alves <pedro@codesourcery.com>
9046
9047 * server.c (handle_query) Whitespace and formatting.
9048
1b3f6016
PA
90492009-03-22 Pedro Alves <pedro@codesourcery.com>
9050
9051 * i387-fp.c, linux-arm-low.c, linux-cris-low.c,
9052 linux-crisv32-low.c, linux-i386-low.c, linux-low.c,
9053 linux-mips-low.c, linux-s390-low.c, linux-sparc-low.c,
9054 linux-x86-64-low.c, linux-xtensa-low.c, proc-service.c,
9055 regcache.c, remote-utils.c, server.c, spu-low.c, target.h,
9056 thread-db.c, win32-low.c, xtensa-xtregs.c, gdbreplay.c,
9057 Makefile.in, configure.ac: Fix whitespace throughout.
9058 * configure: Regenerate.
9059
a07b2135
PA
90602009-03-22 Pedro Alves <pedro@codesourcery.com>
9061
9062 * inferiors.c (find_inferior): Make it safe for the callback
9063 function to delete the currently iterated inferior.
9064
67cc2626
PA
90652009-03-22 Pedro Alves <pedro@codesourcery.com>
9066
9067 * Makefile.in (linuw_low_h): Move higher.
9068 (thread-db.o): Depend on $(linux_low_h).
9069
54a0b537
PA
90702009-03-17 Pedro Alves <pedro@codesourcery.com>
9071
9072 Rename "process" to "lwp" throughout.
9073
9074 * linux-low.c (all_processes): Rename to...
9075 (all_lwps): ... this.
9076 (inferior_pid, handle_extended_wait, get_stop_pc): Adjust.
9077 (add_process): Rename to ...
9078 (add_lwp): ... this. Adjust.
9079 (linux_create_inferior): Adjust.
9080 (linux_attach_lwp): Adjust.
9081 (linux_attach): Adjust.
9082 (linux_kill_one_process): Rename to ...
9083 (linux_kill_one_lwp): ... this. Adjust.
9084 (linux_kill): Adjust.
9085 (linux_detach_one_process): Rename to ...
9086 (linux_detach_one_lwp): ... this. Adjust.
9087 (linux_detach): Adjust.
9088 (check_removed_breakpoint): Adjust.
9089 (status_pending_p): Adjust.
9090 (linux_wait_for_process): Rename to ...
9091 (linux_wait_for_lwp): ... this. Adjust.
9092 (linux_wait_for_event): Adjust.
9093 (send_sigstop): Adjust.
9094 (wait_for_sigstop): Adjust.
9095 (stop_all_processes): Rename to ...
9096 (stop_all_lwps): ... this.
9097 (linux_resume_one_process): Rename to ...
9098 (linux_resume_one_lwp): ... this. Adjust.
9099 (linux_set_resume_request, linux_continue_one_thread)
9100 (linux_queue_one_thread, resume_status_pending_p)
9101 (usr_store_inferior_registers, regsets_store_inferior_registers)
9102 (linux_request_interrupt, linux_read_offsets, linux_xfer_siginfo):
9103 Adjust.
9104 * linux-low.h (get_process): Rename to ...
9105 (get_lwp): ... this. Adjust.
9106 (get_thread_process): Rename to ...
9107 (get_thread_lwp): ... this. Adjust.
9108 (get_process_thread): Rename to ...
9109 (get_lwp_thread): ... this. Adjust.
9110 (struct process_info): Rename to ...
9111 (struct lwp_info): ... this.
9112 (all_processes): Rename to ...
9113 (all_lwps): ... this.
9114 * proc-service.c (ps_lgetregs): Adjust.
9115 * thread-db.c (thread_db_create_event, find_one_thread)
9116 (maybe_attach_thread, thread_db_get_tls_address): Adjust.
9117
0b16c5cf
PA
91182009-03-14 Pedro Alves <pedro@codesourcery.com>
9119
9120 * server.c (handle_query): Handle "qAttached".
9121
32de4b9d
NS
91222009-03-13 Nathan Sidwell <nathan@codesourcery.com>
9123
9124 * Makefile.in, hostio-errno.c, errno.c, xtensa-xtregs.c: Change to
9125 GPLv3, update license URL.
9126
2aecd87f
DE
91272009-03-01 Doug Evans <dje@google.com>
9128
93efd302 9129 * Makefile.in (INCLUDE_CFLAGS): Add -I$(srcdir)/../common.
2aecd87f
DE
9130 (server_h): Add gdb_signals.h.
9131 (signals.o): Update.
9132 * server.h (target_signal_from_host,target_signal_to_host_p)
9133 (target_signal_to_host,target_signal_to_name): Moved to gdb_signals.h.
9134
86b1f9c5
PM
91352009-02-14 Pierre Muller <muller@ics.u-strasbg.fr>
9136
9137 * remote-utils.c (getpkt): Also generate remote-debug
9138 information if noack_mode is set.
9139
4aa995e1
PA
91402009-02-06 Pedro Alves <pedro@codesourcery.com>
9141
9142 * server.c (handle_query): Report qXfer:siginfo:read and
9143 qXfer:siginfo:write as supported and handle them.
9144 * target.h (struct target_ops) <qxfer_siginfo>: New field.
9145 * linux-low.c (linux_xfer_siginfo): New.
9146 (linux_target_ops): Set it.
9147
62709adf
PA
91482009-01-26 Pedro Alves <pedro@codesourcery.com>
9149
9150 * server.c (gdbserver_usage): Mention --remote-debug.
9151 (main): Accept '--remote-debug' switch.
9152
aef93bd7
DE
91532009-01-18 Doug Evans <dje@google.com>
9154
9155 * regcache.c (new_register_cache): No need to check result of xcalloc.
9156 * server.c (handle_search_memory): Back out calls to xmalloc,
9157 result is checked and error is returned to user upon failure.
9158 (handle_query): Ditto. Add more checks for result of malloc.
9159 (handle_v_cont): Check result of malloc, report error back to
9160 user upon failure.
9161 (handle_v_run): Ditto. Call freeargv.
9162 * server.h (freeargv): Declare.
9163 * utils.c (freeargv): New fn.
9164
54363045
DE
91652009-01-15 Doug Evans <dje@google.com>
9166
f626972c
DE
9167 * gdbreplay.c (perror_with_name): Make arg const char *.
9168 * server.h (target_signal_to_name): Make return type const char *.
0842e787 9169 * thread-db.c (thread_db_err_str): Make return type const char *.
f626972c 9170 * utils.c (perror_with_name): Make arg const char *.
54363045 9171
18aae699
PA
91722009-01-14 Pedro Alves <pedro@codesourcery.com>
9173
9174 * win32-low.c (get_child_debug_event): Issue a final DBG_CONTINUE
9175 when handling a EXIT_PROCESS_DEBUG_EVENT.
9176
ff703abe
JB
91772009-01-06 Joel Brobecker <brobecker@adacore.com>
9178
9179 * gdbreplay.c (gdbreplay_version): Update copyright year.
9180 * server.c (gdbserver_version): Likewise.
9181
f21cc1a2 91822009-01-05 Doug Evans <dje@google.com>
0e21c1ec
DE
9183
9184 * linux-low.c (linux_attach_lwp): Add some comments/fixmes.
f21cc1a2 9185 (handle_extended_wait): Improve comment.
0e21c1ec 9186
bca929d3
DE
91872008-12-13 Doug Evans <dje@google.com>
9188
9189 * utils.c (xmalloc,xcalloc,xstrdup): New fns.
9190 * server.h (ATTR_MALLOC): New macro.
9191 (xmalloc,xcalloc,xstrdup): Declare.
9192 * hostio.c: Replace malloc,calloc,strdup with xmalloc,xcalloc,xstrdup.
9193 * inferiors.c: Ditto.
9194 * linux-low.c: Ditto.
9195 * mem-break.c: Ditto.
9196 * regcache.c: Ditto.
9197 * remote-utils.c: Ditto.
9198 * server.c: Ditto.
9199 * target.c: Ditto.
9200 * win32-low.c: Ditto.
9201
97438e3f
DE
92022008-12-12 Doug Evans <dje@google.com>
9203
896c7fbb
DE
9204 * linux-low.c (linux_wait_for_process): Don't clobber current_inferior
9205 in debugging printf.
9206
97438e3f
DE
9207 * linux-low.c (handle_extended_wait): Simplify, use my_waitpid.
9208
e3b886f8
DE
92092008-12-09 Doug Evans <dje@google.com>
9210
9211 * linux-low.h (struct process_info): Delete member tid, unused.
9212 * thread-db.c (find_one_thread): Update.
9213 (maybe_attach_thread): Update.
9214
07e059b5
VP
92152008-12-02 Pedro Alves <pedro@codesourcery.com>
9216
889bf7c5
PA
9217 * target.h (struct target_ops): Add qxfer_osdata member.
9218 * linux-low.c: Include ctype.h and pwd.h and sys/types.h
9219 and dirent.h.
9220 (linux_qxfer_osdata): New functions.
9221 (linux_target_ops): Register linux_qxfer_osdata as qxfer_osdata
9222 callback.
9223 * server.c (handle_query): Handle "qXfer:osdata:read:".
9224 * remote-utils.c (buffer_grow, buffer_free, buffer_init, buffer_finish)
9225 (buffer_xml_printf): New functions.
9226 * server.h (struct buffer): New.
9227 (buffer_grow_str, buffer_grow_str0): New macros.
9228 (buffer_grow, buffer_free, buffer_init, buffer_finish)
9229 (buffer_xml_printf): Declare.
07e059b5 9230
4cab47ab
DE
92312008-11-24 Doug Evans <dje@google.com>
9232
9233 * Makefile.in (VERSION,DIST,LINT,LINTFLAGS): Delete, unused.
9234
f142445f
DJ
92352008-11-24 Daniel Jacobowitz <dan@codesourcery.com>
9236
9237 * server.c (handle_v_run): Always use the supplied argument list.
9238
d0107bb6 92392008-11-19 Bob Wilson <bob.wilson@acm.org>
889bf7c5 9240
d0107bb6
BW
9241 * xtensa-xtregs.c (XTENSA_ELF_XTREG_SIZE): Change to 4.
9242 (xtensa_regmap_table): Add entry for scompare1.
889bf7c5 9243
2c4ad781
TJB
92442008-11-18 Thiago Jung Bauermann <bauerman@br.ibm.com>
9245
9246 * Makefile.in (powerpc-isa205-32l.o, powerpc-isa205-32l.c,
9247 powerpc-isa205-altivec32l.o, powerpc-isa205-altivec32l.c,
9248 powerpc-isa205-vsx32l.o, powerpc-isa205-vsx32l.c,
9249 powerpc-isa205-64l.o, powerpc-isa205-64l.c,
9250 powerpc-isa205-altivec64l.o, powerpc-isa205-altivec64l.c,
9251 powerpc-isa205-vsx64l.o, powerpc-isa205-vsx64l.c): New targets.
9252 * configure.srv (powerpc*-*-linux*): Add ISA 2.05 object files and
9253 XML target descriptions.
9254 * linux-ppc-low.c (ppc_arch_setup): Init registers with 64-bit FPSCR
9255 when inferior is running on an ISA 2.05 or later processor. Add
9256 special case to return offset for full 64-bit slot of FPSCR when
9257 in 32-bits.
9258
dfb64f85
DJ
92592008-11-14 Daniel Gutson <dgutson@codesourcery.com>
9260
9261 * Makefile.in (SFILES, clean): Added sparc64 files.
9262 (reg-sparc64.o, reg-sparc64.c): New.
9263 * configure.srv (sparc*-*-linux*): New configuration.
9264 * linux-low.c (regsets_fetch_inferior_registers): Swap ptrace
9265 syscall arguments for SPARC.
9266 (regsets_store_inferior_registers): Likewise.
9267 * linux-sparc-low.c: New file.
9268
66b6e1dd
DE
92692008-10-21 Doug Evans <dje@google.com>
9270
9271 * Makefile.in (BFD_DIR,BFD,BFD_SRC,BFD_CFLAGS): Delete.
9272 (READLINE_DIR,READLINE_DEP): Delete.
9273 (INTERNAL_CFLAGS): Update.
9274 (LINTFLAGS): Update.
9275
9b710a42
PA
92762008-10-10 Pedro Alves <pedro@codesourcery.com>
9277
9278 * server.c (handle_v_run): If GDB didn't specify an argv, use the
9279 whole argv from the last run, not just argv[0].
9280
5822d809
PA
92812008-09-08 Pedro Alves <pedro@codesourcery.com>
9282
9283 * regcache.c (new_register_cache): Return NULL if the register
9284 cache size isn't known yet.
9285 (free_register_cache): Avoid dereferencing a NULL regcache.
9286
74aac56f
DJ
92872008-09-04 Daniel Jacobowitz <dan@codesourcery.com>
9288
9289 * configure.srv: Merge MIPS and MIPS64.
9290
400b20f5
MR
92912008-08-24 Maciej W. Rozycki <macro@linux-mips.org>
9292
9293 * Makefile.in (uninstall): Apply $(EXEEXT) too.
9294
677c5bb1
LM
92952008-08-18 Luis Machado <luisgpm@br.ibm.com>
9296
9297 * Makefile.in: Add required vsx dependencies.
9298
9299 * linux-ppc-low: Define PPC_FEATURE_HAS_VSX.
9300 Declare init_registers_powerpc_vsx32l.
9301 Declare init_registers_powerpc_vsx64l.
9302 Define PTRACE_GETVSXREGS and PTRACE_SETVSXREGS.
9303 (ppc_arch_setup): Check for VSX in hwcap.
9304 (ppc_fill_vsxregset): New function.
9305 (ppc_store_vsxregset): New function.
9306 Add new VSX entry in regset_info target_regsets.
9307
9308 * configure.srv: Add new VSX dependencies.
9309
a6f3e723
SL
93102008-08-12 Pedro Alves <pedro@codesourcery.com>
9311
9312 * remote-utils.c (noack_mode, transport_is_reliable): New globals.
9313 (remote_open): Set or clear transport_is_reliable.
9314 (putpkt_binary): Don't expect acks in noack mode.
9315 (getpkt): Don't send ack/nac in noack mode.
9316 * server.c (handle_general_set): Handle QStartNoAckMode.
9317 (handle_query): If connected by tcp pass QStartNoAckMode+ in
9318 qSupported.
9319 (main): Reset noack_mode on every connection.
9320 * server.h (noack_mode): Declare.
9321
a417dc56
RW
93222008-08-07 Ralf Wildenhues <Ralf.Wildenhues@gmx.de>
9323
9324 * Makefile.in (GDBREPLAY_OBS): New variable.
9325 (gdbreplay$(EXEEXT)): Use it to avoid unportable $^.
9326
3221518c
UW
93272008-08-05 Ulrich Weigand <uweigand@de.ibm.com>
9328 Daniel Jacobowitz <dan@codesourcery.com>
9329
9330 * linux-low.c (linux_resume_one_process): Ignore ESRCH.
9331 (usr_store_inferior_registers): Likewise.
9332 (regsets_store_inferior_registers): Likewise.
9333
ec56be1b
PA
93342008-07-31 Rolf Jansen <rj@surtec.com>
9335 Pedro Alves <pedro@codesourcery.com>
9336
9337 * configure.ac: Check for memmem declaration.
9338 * server.c [HAVE_MALLOC_H]: Include malloc.h.
9339 (disable_packet_vCont, disable_packet_Tthread, disable_packet_qC)
9340 (disable_packet_qfThreadInfo): Unconditionally compile.
9341 * server.h [!HAVE_DECL_MEMMEM]: Declare memmem.
9342 * configure, config.in: Regenerate.
9343
2fe5e3ff
DE
93442008-07-28 Doug Kwan <dougkwan@google.com>
9345
9346 * linux-low.c (sys/dir.h, sys/user.h): Remove includes.
9347 (linux_write_memory): Remove declaration of errno.
9348
836acd6d
UW
93492008-07-12 Ulrich Weigand <uweigand@de.ibm.com>
9350
9351 * linux-low.c (handle_extended_wait): Do not use "status"
9352 variable uninitialized.
9353
aeba519e
PA
93542008-07-07 Pedro Alves <pedro@codesourcery.com>
9355
9356 * server.c (handle_v_attach): Inhibit reporting dll changes.
9357
db42f210
PA
93582008-06-27 Pedro Alves <pedro@codesourcery.com>
9359
9360 * remote-utils.c (prepare_resume_reply): If requested, don't
9361 output "thread:TID" in the T stop reply.
9362
9363 * server.c (disable_packet_vCont, disable_packet_Tthread)
9364 (disable_packet_qC, disable_packet_qfThreadInfo): New globals.
9365 (handle_query): If requested, disable support for qC, qfThreadInfo
9366 and qsThreadInfo.
9367 (handle_v_requests): If requested, disable support for vCont.
9368 (gdbserver_show_disableable): New.
9369 (main): Handle --disable-packet and --disable-packet=LIST.
9370
9371 * server.h (disable_packet_vCont, disable_packet_Tthread)
9372 (disable_packet_qC, disable_packet_qfThreadInfo): Declare.
9373
8e4c5421
CD
93742008-06-20 Carlos O'Donell <carlos@codesourcery.com>
9375
9376 * server.c (gdbserver_usage): Mention --version.
9377
6e23a804
DJ
93782008-06-06 Daniel Jacobowitz <dan@codesourcery.com>
9379
9380 * Makefile.in (gdbreplay.o): New rule.
9381
90aa6a40
JM
93822008-06-06 Joseph Myers <joseph@codesourcery.com>
9383
9384 * gdbreplay.c (gdbreplay_version): Say gdbreplay in version
9385 message, not gdbserver.
9386
c16158bc 93872008-06-05 Vladimir Prus <vladimir@codesourcery.com>
889bf7c5
PA
9388 Nathan Sidwell <nathan@codesourcery.com>
9389 Joseph Myers <joseph@codesourcery.com>
c16158bc
JM
9390
9391 * acinclude.m4: Include ../../config/acx.m4.
9392 * configure.ac: Use ACX_PKGVERSION and ACX_BUGURL.
9393 * configure, config.in: Regenerate.
9394 * Makefile.in (gdbreplay$(EXEEXT)): Add version.o.
9395 * server.c (gdbserver_version): Print PKGVERSION.
9396 (gdbsrever_usage): Add stream parameter. Print REPORT_BUGS_TO.
9397 (main): Adjust gdbserver_usage calls.
9398 * gdbreplay.c (version, host_name): Add declarations.
9399 (gdbreplay_version, gdbreplay_usage): New.
9400 (main): Accept --version and --help options.
9401
aeb75bf5
DJ
94022008-06-04 Daniel Jacobowitz <dan@codesourcery.com>
9403
9404 * linux-arm-low.c (thumb_breakpoint, thumb_breakpoint_len): New.
9405 (arm_breakpoint_at): Handle Thumb.
9406 (the_low_target): Add comment.
9407
76b233dd
UW
94082008-05-29 Ulrich Weigand <uweigand@de.ibm.com>
9409
9410 * linux-ppc-low.c (ppc_collect_ptrace_register): Clear buffer.
9411
08388c79
DE
94122008-05-09 Doug Evans <dje@google.com>
9413
a3c83fae
DE
9414 * server.h (decode_search_memory_packet): Declare.
9415 * remote-utils.c (decode_search_memory_packet): New fn.
9416 * server.c (handle_search_memory_1): New fn.
08388c79
DE
9417 (handle_search_memory): New fn.
9418 (handle_query): Process qSearch:memory packets.
9419
bb9c3d36
UW
94202008-05-08 Ulrich Weigand <uweigand@de.ibm.com>
9421
9422 * regcache.c (registers_length): Remove.
9423 (set_register_cache): Verify that PBUFSIZ is large enough to hold a
9424 full register packet.
9425 * regcache.h (registers_length): Remove prototype.
9426 * server.h (PBUFSIZ): Define to 16384.
9427
7284e1be
UW
94282008-05-03 Ulrich Weigand <uweigand@de.ibm.com>
9429
9430 * configure.srv (powerpc*-*-linux*): Set srv_regobj to
9431 powerpc-32l.o, powerpc-altivec32l.o, powerpc-e500l.o,
9432 powerpc-64l.o, and powerpc-altivec64l.o.
9433 Remove rs6000/powerpc-32.xml, rs6000/powerpc-64.xml, and
9434 rs6000/powerpc-e500.xml; add rs6000/powerpc-32l.xml,
9435 rs6000/powerpc-altivec32l.xml, rs6000/powerpc-e500l.xml,
9436 rs6000/powerpc-64l.xml, rs6000/powerpc-altivec64l.xml,
9437 rs6000/power-linux.xml, and rs6000/power64-linux.xml
9438 to srv_xmlfiles.
9439
9440 * Makefile.in (reg-ppc.o, reg-ppc.c): Remove, replace by ...
9441 (powerpc-32l.o, powerpc-32l.c): ... these new rules.
9442 (powerpc-32.o, powerpc-32.c): Remove, replace by ...
9443 (powerpc-altivec32l.o, powerpc-altivec32l.c): ... these new rules.
9444 (powerpc-e500.o, powerpc-e500.c): Remove, replace by ...
9445 (powerpc-e500l.o, powerpc-e500l.c): ... these new rules.
9446 (reg-ppc64.o, reg-ppc64.c): Remove, replace by ...
9447 (powerpc-64l.o, powerpc-64l.c): ... these new rules.
9448 (powerpc-64.o, powerpc-64.c): Remove, replace by ...
9449 (powerpc-altivec64l.o, powerpc-altivec64l.c): ... these new rules.
9450 (clean): Update.
9451
9452 * linux-ppc-low.c (init_registers_ppc): Remove, replace by ...
9453 (init_registers_powerpc_32l): ... this new prototype.
9454 (init_registers_powerpc_32): Remove, replace by ...
9455 (init_registers_powerpc_altivec32l): ... this new prototype.
9456 (init_registers_powerpc_e500): Remove, replace by ...
9457 (init_registers_powerpc_e500l): ... this new prototype.
9458 (init_registers_ppc64): Remove, replace by ...
9459 (init_registers_powerpc_64l): ... this new prototype.
9460 (init_registers_powerpc_64): Remove, replace by ...
9461 (init_registers_powerpc_altivec64l): ... this new prototype.
9462 (ppc_num_regs): Set to 73.
9463 (PT_ORIG_R3, PT_TRAP): Define if necessary.
9464 (ppc_regmap, ppc_regmap_e500): Add values for orig_r3 and trap.
9465 (ppc_cannot_store_register): Handle orig_r3 and trap.
9466 (ppc_arch_setup): Update init_registers_... calls.
9467 (ppc_fill_gregset): Handle orig_r3 and trap.
9468
9469 * inferiors.c (clear_inferiors): Reset current_inferior.
9470
fdc59709
PB
94712008-04-23 Paolo Bonzini <bonzini@gnu.org>
9472
889bf7c5
PA
9473 * acinclude.m4: Add override.m4.
9474 * configure: Regenerate.
fdc59709 9475
c9b2f845
UW
94762008-04-21 Ulrich Weigand <uweigand@de.ibm.com>
9477
9478 * linux-ppc-low.c (ppc_arch_setup): Reset ppc_hwcap after the
9479 initial call to init_register_ppc64.
9480
550512b8
UW
94812008-04-21 Ulrich Weigand <uweigand@de.ibm.com>
9482
43aaf8b6
PA
9483 * configure.srv (powerpc64-*-linux*, powerpc-*-linux*): Merge into
9484 single powerpc*-*-linux* case.
550512b8
UW
9485 (s390-*-linux*, s390x-*-linux*): Merge into single s390*-*-linux* case.
9486
b6430ec3
UW
94872008-04-17 Ulrich Weigand <uweigand@de.ibm.com>
9488
9489 * configure.srv [powerpc64-*-linux*]: Remove powerpc-e500.o from
889bf7c5 9490 srv_regobj. Remove rs6000/powerpc-e500.xml and rs6000/power-spe.xml
b6430ec3
UW
9491 from reg_xmlfiles.
9492 * linux-ppc-low.c: Include <elf.h>.
9493 (PPC_FEATURE_HAS_ALTIVEC, PPC_FEATURE_HAS_SPE): Define.
9494 (ppc_hwcap): New global variable.
9495 (ppc_regmap): Remove __SPE__ #ifdef sections.
9496 (ppc_regmap_e500): New global variable.
9497 (ppc_cannot_store_register): Update __SPE__ special case.
9498 (ppc_get_hwcap): New function.
9499 (ppc_arch_setup): Use it to determine whether inferior supports
9500 AltiVec or SPE registers. Set the_low_target.regmap if appropriate.
9501 (ppc_fill_vrregset, ppc_store_vrregset): Define unconditionally.
9502 Do not access registers if target does not support AltiVec.
9503 (ppc_fill_evrregset, ppc_store_evrregset): Define unconditionally.
9504 Do not access registers if target does not support SPE.
9505 (target_regsets): Unconditionally include AltiVec and SPE regsets.
9506
52fa2412
UW
95072008-04-17 Daniel Jacobowitz <dan@codesourcery.com>
9508
9509 * linux-low.c (disabled_regsets, num_regsets): New.
9510 (use_regsets_p): Delete.
9511 (linux_wait_for_process): Clear disabled_regsets.
9512 (regsets_fetch_inferior_registers): Check and set it.
9513 (regsets_store_inferior_registers): Likewise.
9514 (linux_fetch_registers, linux_store_registers): Do not use
9515 use_regsets_p.
9516 (initialize_low): Allocate disabled_regsets.
9517
e28b3332
DJ
95182008-04-14 Daniel Jacobowitz <dan@codesourcery.com>
9519
9520 * Makefile.in (LIBOBJS): New.
9521 (OBS): Use LIBOBJS.
9522 (memmem.o): New rule.
9523 * configure.ac: Use AC_CONFIG_LIBOBJ_DIR and check for memmem.
9524 * configure: Regenerated.
9525
4536995d
UW
95262008-04-04 Ulrich Weigand <uweigand@de.ibm.com>
9527
9528 * server.c (handle_query): Never return "unsupported" for
9529 qXfer:features:read queries.
9530
221c031f
UW
95312008-03-27 Ulrich Weigand <uweigand@de.ibm.com>
9532
9533 * server.c (get_features_xml): Fix inverted condition.
9534 (handle_query): Always support qXfer:feature:read.
9535
ccd213ac
DJ
95362008-03-10 Daniel Jacobowitz <dan@codesourcery.com>
9537
9538 * server.c (wrapper_argv): New.
9539 (start_inferior): Handle wrapper_argv. If set, expect an extra
9540 trap.
9541 (gdbserver_usage): Document --wrapper.
9542 (main): Parse --wrapper.
9543
6fe305f7
UW
95442008-02-28 Ulrich Weigand <uweigand@de.ibm.com>
9545
9546 * configure.srv [powerpc64-*-linux*]: Add all files mentioned for
9547 powerpc-*-linux* to srv_regobj and reg_xmlfiles.
9548 * linux-ppc-low.c (ppc_get_pc): Support bi-arch operation.
9549 (ppc_set_pc): Likewise.
9550 (ppc_arch_setup): New function.
9551 (ppc_fill_gregset): Call ppc_collect_ptrace_register instead
9552 of collect_register.
889bf7c5 9553 (the_low_target): Use ppc_arch_setup as arch_setup initializer.
6fe305f7 9554
5b0a002e
UW
95552008-02-28 Ulrich Weigand <uweigand@de.ibm.com>
9556
9557 * configure.srv [powerpc64-*-linux*]: Use linux-ppc-low.o
9558 instead of linux-ppc64-low.o.
9559 * linux-ppc64-low.c: Remove file.
9560 * Makefile.in (SFILES): Remove linux-ppc64-low.c.
9561 (linux-ppc64-low.o): Remove rule.
9562
9563 * linux-ppc-low.c (init_registers_ppc64): Add prototype.
9564 (init_registers_powerpc_64): Likewise.
9565 (ppc_regmap): Conditionally define depending on __powerpc64__.
9566 (ppc_cannot_store_register): Do not special-case "fpscr" when
9567 compiled on __powerpc64__.
9568 (ppc_collect_ptrace_register): New function.
9569 (ppc_supply_ptrace_register): New function.
9570 (ppc_breakpoint): Change type to "unsigned int".
9571 (ppc_breakpoint_at): Change type of "insn" to "unsigned int".
9572 (the_low_target): Conditionally provide initializers for the
889bf7c5 9573 arch_setup member depending on __powerpc64__. Install
5b0a002e
UW
9574 collect_ptrace_register and supply_ptrace_register members.
9575
9b4b61c8
UW
95762008-02-28 Ulrich Weigand <uweigand@de.ibm.com>
9577
9578 * regcache.h (gdbserver_xmltarget): Add extern declaration.
9579 * server.c (gdbserver_xmltarget): Define.
9580 (get_features_xml): Use it to replace "target.xml" and arch_string.
9581
9582 * configure.srv: Remove srv_xmltarget. Add XML files that were
9583 mentioned there to srv_xmlfiles instead. Remove conditional tests
9584 on gdb_cv_arm_iwmmxt, gdb_cv_ppc_altivec, gdb_cv_ppc_spe; set
9585 srv_xmlfiles and srv_regobj to include all possible choices.
9586 * configure.ac (srv_xmltarget): Remove.
9587 (srv_xmlfiles): Do not add "target.xml".
9588 (gdb_cv_arm_iwmmxt, gdb_cv_ppc_altivec, gdb_cv_ppc_spe): Remove
9589 checks for supplementary target information.
9590 * configure: Regenerate.
9591 * Makefile.in (XML_TARGET): Remove.
9592 (target.xml): Remove rule.
9593 (clean): Do not clean up target.xml.
9594 (.PRECIOUS): Do not mention target.xml.
9595
9596 * target.h (struct target_ops): Remove arch_string member.
9597 * linux-low.c (linux_arch_string): Remove.
9598 (linux_target_ops): Remove arch_string initializer.
9599 * linux-low.h (struct linux_target_ops): Remove arch_string member.
9600 * linux-i386-low.c (the_low_target): Remove arch_string initializer.
9601 * linux-x86-64-low.c (the_low_target): Remove arch_string initializer.
9602 * spu-low.c (spu_arch_string): Remove.
9603 (spu_target_ops): Remove arch_string initializer.
9604 * win32-low.c (win32_arch_string): Remove.
9605 (win32_target_ops): Remove arch_string initializer.
9606 * win32-low.h (struct win32_target_ops): Remove arch_string member.
9607 * win32-arm-low.c (the_low_target): Remove arch_string initializer.
9608 * win32-i368-low.c (the_low_target): Remove arch_string initializer.
9609
ee1a7ae4
UW
96102008-02-27 Ulrich Weigand <uweigand@de.ibm.com>
9611
9612 * linux-low.h (struct linux_target_ops): Replace left_pad_xfer field
9613 by collect_ptrace_register and supply_ptrace_register hooks.
9614 * linux-low.c (fetch_register): Use supply_ptrace_register callback
9615 instead of checking for the_low_target.left_pad_xfer.
9616 (usr_store_inferior_registers): Use collect_ptrace_register callback
9617 instead of checking for the_low_target.left_pad_xfer.
9618
9619 * linux-s390-low.c (s390_collect_ptrace_register): New function.
9620 (s390_supply_ptrace_register): Likewise.
9621 (s390_fill_gregset): Call s390_collect_ptrace_register.
9622 (the_low_target): Update.
9623
9624 * linux-ppc64-low.c (ppc_collect_ptrace_register): New function.
9625 (ppc_supply_ptrace_register): Likewise.
9626 (the_low_target): Update.
9627
9628 * linux-i386-low.c (the_low_target): Update.
9629 * linux-x86-64-low.c (the_low_target): Update.
9630
d61ddec4
UW
96312008-02-27 Ulrich Weigand <uweigand@de.ibm.com>
9632
9633 * configure.srv [s390x-*-linux*]: Set srv_regobj to include both
9634 reg-s390.o and reg-s390x.o.
9635
9636 * linux-low.c (new_inferior): New global variable.
9637 (linux_create_inferior, linux_attach): Set it.
9638 (linux_wait_for_process): Call the_low_target.arch_setup after the
9639 target has stopped for the first time.
9640 (initialize_low): Do not call the_low_target.arch_setup.
9641
9642 * linux-s390-low.c (s390_get_pc): Support bi-arch operation.
9643 (s390_set_pc): Likewise.
9644 (s390_arch_setup): New function.
9645 (the_low_target): Use s390_arch_setup as arch_setup routine.
9646
9647 * regcache.c (realloc_register_cache): New function.
9648 (set_register_cache): Call it for each existing regcache.
9649
d05b4ac3
UW
96502008-02-27 Ulrich Weigand <uweigand@de.ibm.com>
9651
9652 * server.h (init_registers): Remove prototype.
9653
9654 * linux-low.h (struct linux_target_ops): Add arch_setup field.
9655 * linux-low.c (initialize_low): Call the_low_target.arch_setup ()
9656 instead of init_registers ().
9657 * linux-arm-low.c (init_registers_arm): Add prototype.
9658 (init_registers_arm_with_iwmmxt): Likewise.
9659 (the_low_target): Add initializer for arch_setup field.
9660 * linux-cris-low.c (init_registers_cris): Add prototype.
9661 (the_low_target): Add initializer for arch_setup field.
9662 * linux-crisv32-low.c (init_registers_crisv32): Add prototype.
9663 (the_low_target): Add initializer for arch_setup field.
9664 * linux-i386-low.c (init_registers_i386_linux): Add prototype.
9665 (the_low_target): Add initializer for arch_setup field.
9666 * linux-ia64-low.c (init_registers_ia64): Add prototype.
9667 (the_low_target): Add initializer for arch_setup field.
9668 * linux-m32r-low.c (init_registers_m32r): Add prototype.
9669 (the_low_target): Add initializer for arch_setup field.
9670 * linux-m68k-low.c (init_registers_m68k): Add prototype.
9671 (the_low_target): Add initializer for arch_setup field.
9672 * linux-mips-low.c (init_registers_mips_linux): Add prototype.
9673 (init_registers_mips64_linux): Likewise.
9674 (the_low_target): Add initializer for arch_setup field.
9675 * linux-ppc-low.c (init_registers_ppc): Add prototype.
9676 (init_registers_powerpc_32, init_registers_powerpc_e500): Likewise.
9677 (the_low_target): Add initializer for arch_setup field.
9678 * linux-ppc64-low.c (init_registers_ppc64): Add prototype.
9679 (init_registers_powerpc_64): Likewise.
9680 (the_low_target): Add initializer for arch_setup field.
9681 * linux-s390-low.c (init_registers_s390): Add prototype.
9682 (init_registers_s390x): Likewise.
9683 (the_low_target): Add initializer for arch_setup field.
9684 * linux-sh-low.c (init_registers_sh): Add prototype.
9685 (the_low_target): Add initializer for arch_setup field.
9686 * linux-x86-64-low.c (init_registers_x86_64_linux): Add prototype.
9687 (the_low_target): Add initializer for arch_setup field.
9688 * linux-xtensa-low.c (init_registers_xtensa): Add prototype.
9689 (the_low_target): Add initializer for arch_setup field.
9690
9691 * win32-low.h (struct win32_target_ops): Add arch_setup field.
9692 * win32-low.c (initialize_low): Call the_low_target.arch_setup ()
9693 instead of init_registers ().
9694 * win32-arm-low.c (init_registers_arm): Add prototype.
9695 (the_low_target): Add initializer for arch_setup field.
9696 * win32-i386-low.c (init_registers_i386): Add prototype.
9697 (the_low_target): Add initializer for arch_setup field.
9698
9699 * spu-low.c (init_registers_spu): Add prototype.
9700 (initialize_low): Call initialie_registers_spu () instead of
9701 initialize_registers ().
9702
fd96d250
PA
97032008-02-19 Pedro Alves <pedro@codesourcery.com>
9704
9705 * server.c (handle_v_requests): When handling the vRun and vAttach
9706 packets, if already debugging a process, don't kill it. Return an
9707 error instead.
9708
d41b6bb4
DJ
97092008-02-17 Daniel Jacobowitz <dan@codesourcery.com>
9710
9711 * server.c (handle_query): Correct length check.
9712
5ac588cf
PA
97132008-02-14 Pedro Alves <pedro_alves@portugalmail.pt>
9714
9715 * win32-low.c (do_initial_child_stuff): Add process handle
9716 parameter. Set current_process_handle and current_process_id from the
9717 parameters. Clear globals.
9718 (win32_create_inferior): Don't set current_process_handle and
9719 current_process_id here. Instead pass them on the call to
9720 do_initial_child_stuff.
9721 (win32_attach): Likewise.
9722 (win32_clear_inferiors): New.
9723 (win32_kill): Don't close the current process handle or the
9724 current thread handle here. Instead call win32_clear_inferiors.
9725 (win32_detach): Don't open a new handle to the process. Call
9726 win32_clear_inferiors.
9727 (win32_join): Don't rely on current_process_handle; open a new
9728 handle using the process id.
9729 (win32_wait): Call win32_clear_inferiors when the inferior process
9730 has exited.
9731
ecd7ecbc
DJ
97322008-02-14 Daniel Jacobowitz <dan@codesourcery.com>
9733
9734 * server.c (monitor_show_help): Add "exit".
9735
1525d545
MG
97362008-02-11 Maxim Grigoriev <maxim2405@gmail.com>
9737
ecd7ecbc 9738 * Makefile.in (SFILES): Add linux-xtensa-low.c.
1525d545
MG
9739 (clean): Add reg-xtensa.c.
9740 (linux-xtensa-low.o, reg-xtensa.o, reg-xtensa.c): New dependencies.
ecd7ecbc
DJ
9741 * configure.srv (xtensa*-*-linux*) New target.
9742 * linux-xtensa-low.c: New.
9743 * xtensa-xtregs.c: New.
1525d545 9744
59a016f0
PA
97452008-02-01 Pedro Alves <pedro_alves@portugalmail.pt>
9746
9747 * hostio.c: Don't include errno.h.
9748 (errno_to_fileio_errno): Move to hostio-errno.
9749 * hostio.c: (hostio_error): Remove the error parameter. Defer the
9750 error number outputting to the target->hostio_last_error callback.
9751 (hostio_packet_error): Use FILEIO_EINVAL directly.
9752 (handle_open, handle_pread, hostio_error, handle_unlink): Update
9753 calls to hostio_error.
9754 * hostio-errno.c: New.
9755 * server.h (hostio_last_error_from_errno): Declare.
9756 * target.h (target_ops): Add hostio_last_error member.
9757 * linux-low.c (linux_target_op): Register hostio_last_error_from_errno
9758 as hostio_last_error handler.
889bf7c5 9759 * spu-low.c (spu_target_ops): Likewise.
59a016f0
PA
9760 * win32-low.c [_WIN32_WCE] (win32_error_to_fileio_error)
9761 (wince_hostio_last_error): New functions.
9762 (win32_target_ops) [_WIN32_WCE]: Register wince_hostio_last_error
9763 as hostio_last_error handler.
9764 (win32_target_ops) [!_WIN32_WCE]: Register
9765 hostio_last_error_from_errno as hostio_last_error handler.
9766 * Makefile.in (SFILES): Add hostio.c and hostio-errno.c.
9767 (hostio-errno.o): New rule.
9768 * configure.ac (GDBSERVER_DEPFILES): Add $srv_hostio_err_objs.
9769 * configure.srv (srv_hostio_err_objs): New variable. Default to
9770 hostio-errno.o.
9771 (arm*-*-mingw32ce*): Set srv_hostio_err_objs to "".
9772 * configure: Regenerate.
9773
2d717e4f
DJ
97742008-01-29 Daniel Jacobowitz <dan@codesourcery.com>
9775
9776 * linux-low.c (linux_attach_lwp): Do not _exit after errors.
9777 (linux_kill, linux_detach): Clean up the process list.
9778 * remote-utils.c (remote_open): Improve port number parsing.
9779 (putpkt_binary, input_interrupt): Only send interrupts if the target
9780 is running.
9781 * server.c (extended_protocol): Make static.
9782 (attached): Define earlier.
9783 (exit_requested, response_needed, program_argv): New variables.
9784 (target_running): New.
9785 (start_inferior): Clear attached here.
9786 (attach_inferior): Set attached here.
9787 (require_running): Define.
9788 (handle_query): Use require_running and target_running. Implement
9789 "monitor exit".
9790 (handle_v_attach, handle_v_run): New.
9791 (handle_v_requests): Use require_running. Handle vAttach and vRun.
9792 (gdbserver_usage): Update.
9793 (main): Redo argument parsing. Handle --debug and --multi. Handle
9794 --attach along with other options or after the port. Save
9795 program_argv. Support no initial program. Resynchronize
9796 communication with GDB after an error. Handle "monitor exit".
9797 Use require_running and target_running. Always allow the extended
9798 protocol. Do not error out for Hc0 or Hc-1. Do not automatically
9799 restart in extended mode.
9800 * README: Refer to the GDB manual. Update --attach usage.
9801
7407e2de
AS
98022007-12-20 Andreas Schwab <schwab@suse.de>
9803
9804 * linux-low.c (STACK_SIZE): Define.
9805 (linux_tracefork_child): Use it. Use __clone2 on ia64.
9806 (linux_test_for_tracefork): Likewise.
9807
b65d95c5
DJ
98082007-12-18 Daniel Jacobowitz <dan@codesourcery.com>
9809
9810 * linux-low.c (linux_wait_for_event): Update messages. Do not
9811 reinsert auto-delete breakpoints.
9812 * mem-break.c (struct breakpoint): Change return type of handler to
9813 int.
9814 (set_breakpoint_at): Update handler type.
9815 (reinsert_breakpoint_handler): Return 1 instead of calling
9816 delete_breakpoint.
9817 (reinsert_breakpoint_by_bp): Check for the original breakpoint before
9818 setting a new one.
9819 (check_breakpoints): Delete auto-delete breakpoints and return 2.
9820 * mem-break.h (set_breakpoint_at): Update handler type.
9821 * thread-db.c (thread_db_create_event, thread_db_create_event): Update.
9822 * win32-low.c (auto_delete_breakpoint): New.
9823 (get_child_debug_event): Use it.
9824
4e799345
DJ
98252007-12-16 Daniel Jacobowitz <dan@codesourcery.com>
9826
9827 * configure.ac: Check for pread and pwrite.
9828 * hostio.c (handle_pread): Fall back to lseek and read.
9829 (handle_pwrite): Fall back to lseek and write.
9830 * config.in, configure: Regenerated.
9831
27524b67
DJ
98322007-12-07 Daniel Jacobowitz <dan@codesourcery.com>
9833
9834 * server.c (myresume): Add own_buf argument.
9835 (main): Update calls.
9836
a20d5e98
DJ
98372007-12-06 Daniel Jacobowitz <dan@codesourcery.com>
9838
9839 * linux-low.c (linux_wait, linux_resume): Do not handle async I/O.
9840 * remote-utils.c (remote_open): Do not call disable_async_io.
9841 (block_async_io): Delete.
9842 (unblock_async_io): Make static.
9843 (initialize_async_io): New.
9844 * server.c (handle_v_cont): Handle async I/O here.
9845 (myresume): Likewise. Move other common resume tasks here...
9846 (main): ... from here. Call initialize_async_io. Disable async
9847 I/O before the main loop.
9848 * server.h (initialize_async_io): Declare.
9849 (block_async_io, unblock_async_io): Delete prototypes.
9850 * spu-low.c (spu_resume, spu_wait): Do not handle async I/O here.
9851
b79d787e
DJ
98522007-12-06 Mick Davis <mickd@goanna.iinet.net.au>
9853
9854 * remote-utils.c (readchar): Allow binary data in received messages.
9855
d97903b2
PA
98562007-12-03 Pedro Alves <pedro_alves@portugalmail.pt>
9857
9858 * win32-low.c (attaching): New global.
9859 (win32_create_inferior): Clear the `attaching' global.
9860 (win32_attach): Set the `attaching' global.
9861 (get_child_debug_event) [_WIN32_WCE]: Stop the inferior when
9862 attaching. Only set a breakpoint at the entry point if not
9863 attaching.
9864
311de423
PA
98652007-12-03 Pedro Alves <pedro_alves@portugalmail.pt>
9866
9867 * server.c (main): Don't report dll events on the initial
9868 connection on attaches.
9869
6c2d16d2
PA
98702007-12-03 Pedro Alves <pedro_alves@portugalmail.pt>
9871
9872 * server.c (main): Relax numerical bases supported for the pid of
9873 the --attach command line argument.
9874
5ca906e6
PA
98752007-12-03 Pedro Alves <pedro_alves@portugalmail.pt>
9876
9877 * win32-low.c (win32_attach): Call OpenProcess before
9878 DebugActiveProcess, not after. Add last error output to error
9879 call.
9880
9c6c8194
PA
98812007-12-03 Pedro Alves <pedro_alves@portugalmail.pt>
9882
9883 * win32-low.c (win32_get_thread_context)
9884 (win32_set_thread_context): New functions.
9885 (thread_rec): Use win32_get_thread_context.
9886 (continue_one_thread, win32_resume): Use win32_set_thread_context.
9887 * win32-low.h (win32_thread_info) [_WIN32_WCE]: Add `base_context'
9888 field.
9889
4d5d1aaa
PA
98902007-12-03 Leo Zayas
9891 Pedro Alves <pedro_alves@portugalmail.pt>
9892
9893 * win32-low.c (soft_interrupt_requested, faked_breakpoint): New
9894 global variables.
9895 (child_add_thread): Minor cleanup.
9896 (child_continue): Resume artificially suspended threads before
9897 calling ContinueDebugEvent.
9898 (suspend_one_thread): New.
9899 (fake_breakpoint_event): New.
9900 (get_child_debug_event): Change return type to int. Check here if
9901 gdb sent an interrupt request. If a soft interrupt was requested,
9902 fake a breakpoint event. Return 0 if there is no event to handle,
9903 and 1 otherwise.
9904 (win32_wait): Don't check here if gdb sent an interrupt request.
9905 Ensure there is a valid event to handle.
9906 (win32_request_interrupt): Add soft interruption method as last
9907 resort.
9908
c436e841
PA
99092007-12-03 Leo Zayas
9910 Pedro Alves <pedro_alves@portugalmail.pt>
9911
9912 * win32-low.h (win32_thread_info): Add descriptions to the
9913 structure members. Replace `suspend_count' counter by a
9914 `suspended' flag.
9915 * win32-low.c (thread_rec): Update condition of when to get the
9916 context from the inferior. Rely on ContextFlags being set if it
9917 has already been retrieved. Only suspend the inferior thread if
9918 we haven't already. Warn if that fails.
9919 (continue_one_thread): s/suspend_count/suspended/. Only call
9920 ResumeThread once. Warn if that fails.
9921
e7b5fa67
PA
99222007-12-02 Pedro Alves <pedro_alves@portugalmail.pt>
9923
9924 * win32-low.c (win32_wait): Don't read from the inferior when it
9925 has already exited.
9926
a385171d
PA
99272007-12-02 Pedro Alves <pedro_alves@portugalmail.pt>
9928
9929 * Makefile.in (win32_low_h): New variable.
9930 (win32-low.o): Add dependency on $(win32_low_h).
9931 (win32-arm-low.o, win32-i386-low.o): New rules.
9932
f80c84b3
DJ
99332007-11-30 Daniel Jacobowitz <dan@codesourcery.com>
9934
9935 * hostio.c: Correct copyright year.
9936
a6b151f1
DJ
99372007-11-30 Daniel Jacobowitz <dan@codesourcery.com>
9938
9939 * Makefile.in (OBS): Add hostio.o.
9940 (hostio.o): New rule.
9941 * server.h (handle_vFile): Declare.
9942 * hostio.c: New file.
9943 * server.c (handle_v_requests): Take packet_len and new_packet_len
9944 for binary packets. Call handle_vFile.
9945 (main): Update call to handle_v_requests.
9946
f9387fc3
DJ
99472007-11-05 Daniel Jacobowitz <dan@codesourcery.com>
9948
9949 * linux-low.c: Include <sched.h>.
9950
51c2684e
DJ
99512007-11-01 Daniel Jacobowitz <dan@codesourcery.com>
9952
9953 * linux-low.c (linux_tracefork_grandchild): New.
9954 (linux_tracefork_child): Use clone.
9955 (linux_test_for_tracefork): Use clone; allocate and free a stack.
9956
75f83163
JB
99572007-10-31 Joel Brobecker <brobecker@adacore.com>
9958
9959 * Makefile.in: Use $(SHELL) instead of "sh" to call regdat.sh.
9960
da5898ce
DJ
99612007-10-24 Daniel Jacobowitz <dan@codesourcery.com>
9962
9963 * linux-low.c (handle_extended_wait): Handle unexpected signals.
9964
24a09b5f
DJ
99652007-10-23 Daniel Jacobowitz <dan@codesourcery.com>
9966
9967 * inferiors.c (change_inferior_id): Delete.
9968 (add_pid_to_list, pull_pid_from_list): New.
9969 * linux-low.c (PTRACE_SETOPTIONS, PTRACE_GETEVENTMSG)
9970 (PTRACE_O_TRACESYSGOOD, PTRACE_O_TRACEFORK, PTRACE_O_TRACEVFORK)
9971 (PTRACE_O_TRACECLONE, PTRACE_O_TRACEEXEC, PTRACE_O_TRACEVFORKDONE)
9972 (PTRACE_O_TRACEEXIT, PTRACE_EVENT_FORK, PTRACE_EVENT_VFORK)
9973 (PTRACE_EVENT_CLONE, PTRACE_EVENT_EXEC, PTRACE_EVENT_VFORK_DONE)
9974 (PTRACE_EVENT_EXIT, __WALL): Provide default definitions.
9975 (stopped_pids, thread_db_active, must_set_ptrace_flags): New variables.
9976 (using_threads): Always set to 1.
9977 (handle_extended_wait): New.
9978 (add_process): Do not set TID.
9979 (linux_create_inferior): Set must_set_ptrace_flags.
9980 (linux_attach_lwp): Remove TID argument. Do not check using_threads.
9981 Use PTRACE_SETOPTIONS. Call new_thread_notify. Update all callers.
9982 (linux_thread_alive): Rename TID argument to LWPID.
9983 (linux_wait_for_process): Handle unknown processes. Do not use TID.
9984 (linux_wait_for_event): Do not use TID or check using_threads. Update
9985 call to dead_thread_notify. Call handle_extended_wait.
9986 (linux_create_inferior): Use PTRACE_SETOPTIONS.
9987 (send_sigstop): Delete sigstop_sent.
9988 (wait_for_sigstop): Avoid TID.
9989 (linux_supports_tracefork_flag, linux_tracefork_child, my_waitpid)
9990 (linux_test_for_tracefork): New.
9991 (linux_lookup_signals): Use thread_db_active and
9992 linux_supports_tracefork_flag.
9993 (initialize_low): Use thread_db_active and linux_test_for_tracefork.
9994 * linux-low.h (get_process_thread): Avoid TID.
9995 (struct process_ifo): Move thread_known and tid to the end. Remove
9996 sigstop_sent.
9997 (linux_attach_lwp, thread_db_init): Update prototypes.
9998 * server.h (change_inferior_id): Delete prototype.
9999 (add_pid_to_list, pull_pid_from_list): New prototypes.
10000 * thread-db.c (thread_db_use_events): New.
10001 (find_first_thread): Rename to...
10002 (find_one_thread): ...this. Update callers and messages. Do not
10003 call fatal. Check thread_db_use_events. Do not call
10004 change_inferior_id or new_thread_notify.
10005 (maybe_attach_thread): Update. Do not call new_thread_notify.
10006 (thread_db_init): Set thread_db_use_events. Check use_events.
10007 * utils.c (fatal, warning): Correct message prefix.
10008
30ed0a8f
DJ
100092007-10-15 Daniel Jacobowitz <dan@codesourcery.com>
10010
10011 * Makefile.in (clean): Remove new files.
10012 (powerpc-32.o, powerpc-32.c, powerpc-e500.o, powerpc-e500.c)
10013 (powerpc-64.o, powerpc-64.c): New rules.
10014 * configure.srv: Use alternate register sets for powerpc64-*-linux*
10015 with AltiVec, powerpc-*-linux* with AltiVec, and powerpc-*-linux*
10016 with SPE.
10017 * linux-ppc-low.c (ppc_regmap): Do not fetch the FP registers for
10018 SPE targets.
10019 (ppc_cannot_store_register): Do not check for FPSCR for SPE targets.
10020 (PTRACE_GETVRREGS, PTRACE_SETVRREGS, SIZEOF_VRREGS, ppc_fill_vrregset)
10021 (ppc_store_vrregset, PTRACE_GETEVRREGS, PTRACE_SETEVRREGS)
10022 (struct gdb_evrregset_t, ppc_fill_evrregset, ppc_store_evrregset): New.
10023 (target_regsets): Add AltiVec and SPE register sets.
10024 * configure.ac: Check for AltiVec and SPE.
10025 * linux-ppc64-low.c (PTRACE_GETVRREGS, PTRACE_SETVRREGS, SIZEOF_VRREGS)
10026 (ppc_fill_vrregset, ppc_store_vrregset): New.
10027 (target_regsets): Add AltiVec register set.
10028 * configure: Regenerated.
10029
fd462a61
DJ
100302007-09-19 Daniel Jacobowitz <dan@codesourcery.com>
10031
10032 * linux-low.c (O_LARGEFILE): Define.
10033 (linux_read_memory): Use /proc/PID/mem.
10034 * configure.ac: Use AC_GNU_SOURCE. Check for pread64.
10035 * configure, config.in: Regenerated.
10036
69f223ed
DJ
100372007-09-04 Daniel Jacobowitz <dan@codesourcery.com>
10038
10039 * linux-low.c (linux_wait_for_event): Do not pass signals while
10040 single-stepping.
10041
aec18585
PA
100422007-09-03 Pedro Alves <pedro_alves@portugalmail.pt>
10043
10044 * win32-low.c (create_process): New.
10045 (win32_create_inferior): Use create_process instead of
10046 CreateProcess. If create_process failed retry appending an ".exe"
10047 suffix. Store the GetLastError result immediatelly after
10048 create_process calls and use it on the call to error.
10049
34d86ddd
PA
100502007-09-03 Pedro Alves <pedro_alves@portugalmail.pt>
10051
10052 * win32-low.c (handle_load_dll): Don't use toolhelp when waiting.
10053
5a0e3bd0
JB
100542007-08-23 Joel Brobecker <brobecker@adacore.com>
10055
10056 * configure.ac: Switch license to GPLv3.
10057
f88c79e6
MS
100582007-08-01 Michael Snyder <msnyder@access-company.com>
10059
10060 * remote-utils.c (putpkt_binary): Memory leak, free buf2.
10061
6b3d9b83
PA
100622007-07-31 Pedro Alves <pedro_alves@portugalmail.pt>
10063
10064 * win32-low.c (winapi_CloseToolhelp32Snapshot) [_WIN32_WCE]: New
10065 typedef.
10066 (win32_CloseToolhelp32Snapshot) [_WIN32_WCE]: New global var.
10067 (load_toolhelp) [_WIN32_WCE]: Load TOOLHELP.DLL. Get
10068 CloseToolhelp32Snapshot.
10069 (toolhelp_get_dll_name) [_WIN32_WCE]: Close the snapshot with
10070 CloseToolhelp32Snapshot.
10071
c588c53c
MS
100722007-07-27 Michael Snyder <michael.snyder@access-company.com>
10073
10074 * server.c (main): Check for inferior exit before main loop.
10075
aa0403d9
PA
100762007-07-18 Pedro Alves <pedro_alves@portugalmail.pt>
10077
10078 * remote-utils.c (remote_open): Set SO_KEEPALIVE on remote_desc
10079 instead of on tmp_desc.
10080
255e7678
DJ
100812007-07-17 Pedro Alves <pedro_alves@portugalmail.pt>
10082 Daniel Jacobowitz <dan@codesourcery.com>
10083
10084 * inferiors.c (all_dlls, dlls_changed, get_dll): New.
10085 (add_thread): Minor cleanups.
10086 (clear_inferiors): Move lower in the file. Clear the DLL
10087 list.
10088 (free_one_dll, match_dll, loaded_dll, unloaded_dll, clear_list): New.
10089 * remote-utils.c (prepare_resume_reply): Check dlls_changed.
10090 (xml_escape_text): New.
10091 * server.c (handle_query): Handle qXfer:libraries:read. Report it
10092 for qSupported.
10093 (handle_v_cont): Report errors.
10094 (gdbserver_version): Update.
10095 (main): Correct size of own_buf. Do not report initial DLL events.
10096 * server.h (struct dll_info, all_dlls, dlls_changed, loaded_dll)
10097 (unloaded_dll, xml_escape_text): New.
10098 * win32-low.c (enum target_waitkind): Update comments.
10099 (win32_add_one_solib, get_image_name, winapi_EnumProcessModules)
10100 (winapi_GetModuleInformation, winapi_GetModuleFileNameExA)
10101 (win32_EnumProcessModules, win32_GetModuleInformation)
10102 (win32_GetModuleFileNameExA, load_psapi, psapi_get_dll_name)
10103 (winapi_CreateToolhelp32Snapshot, winapi_Module32First)
10104 (winapi_Module32Next, win32_CreateToolhelp32Snapshot)
10105 (win32_Module32First, win32_Module32Next, load_toolhelp)
10106 (toolhelp_get_dll_name, handle_load_dll, handle_unload_dll): New.
10107 (get_child_debug_event): Handle DLL events.
10108 (win32_wait): Likewise.
10109
0d37add9
DJ
101102007-07-12 Daniel Jacobowitz <dan@codesourcery.com>
10111
10112 * configure.srv: Set srv_linux_regsets for sh*-*-linux*.
10113 * linux-sh-low.c (sh_fill_gregset, target_regsets): New.
10114
45e2715e
PA
101152007-07-08 Pedro Alves <pedro_alves@portugalmail.pt>
10116
10117 * win32-low.c (handle_output_debug_string): Ignore event if not
10118 waiting.
10119
c5674cf1
PA
101202007-07-08 Pedro Alves <pedro_alves@portugalmail.pt>
10121
10122 * win32-arm-low.c (arm_wince_breakpoint): Fix typo.
10123
2bbe3cc1
DJ
101242007-07-03 Daniel Jacobowitz <dan@codesourcery.com>
10125
10126 * remote-utils.c (look_up_one_symbol): Handle 'm' packets.
10127
ae13219e
DJ
101282007-07-02 Daniel Jacobowitz <dan@codesourcery.com>
10129
10130 * inferiors.c (change_inferior_id): Add comment.
10131 * linux-low.c (check_removed_breakpoint): Add an early
10132 prototype. Improve debug output.
10133 (linux_attach): Doc update.
10134 (linux_detach_one_process, linux_detach): Clean up before releasing
10135 each process.
10136 (send_sigstop, wait_for_sigstop): Improve comments and debug output.
10137 * linux-low.h (struct process_info): Doc improvement.
10138 * mem-break.c (delete_all_breakpoints): New.
10139 * mem-break.h (delete_all_breakpoints): New prototype.
10140 * thread-db.c (find_first_thread): New.
10141 (thread_db_create_event): Call it instead of
10142 thread_db_find_new_threads. Clean up unused variables.
10143 (maybe_attach_thread): Remove first thread handling.
10144 (thread_db_find_new_threads): Use find_first_thread.
10145 (thread_db_get_tls_address): Likewise.
10146
4105de34
DJ
101472007-06-27 Daniel Jacobowitz <dan@codesourcery.com>
10148
10149 * thread-db.c (thread_db_find_new_threads): Add prototype.
10150 (thread_db_create_event): Check for the main thread before adding
10151 a new thread.
10152 (maybe_attach_thread): Only enable event reporting if TID == 0.
10153 (thread_db_get_tls_address): Check for new threads.
10154
2b876972
DJ
101552007-06-20 Daniel Jacobowitz <dan@codesourcery.com>
10156
10157 * linux-low.c (linux_create_inferior): Try execv before execvp.
10158 * spu-low.c (spu_create_inferior): Likewise.
10159
7a245884
DJ
101602007-06-13 Mike Frysinger <vapier@gentoo.org>
10161
10162 * linux-low.c (linux_create_inferior): Change execv to execvp.
10163 * spu-low.c (spu_create_inferior): Likewies.
10164
117ce543
DJ
101652007-06-13 Daniel Jacobowitz <dan@codesourcery.com>
10166
10167 * Makefile.in (clean): Clean new files instead of deleted ones.
10168 (reg-mips.o, reg-mips.c, reg-mips64.o, reg-mips64.c): Delete.
10169 (mips-linux.o, mips-linux.c, mips64-linux.o, mips64-linux.c): New
10170 rules.
10171 * configure.srv: Specify XML files and new regformats for MIPS and
10172 MIPS64 GNU/Linux.
10173 * linux-mips-low.c (mips_num_regs): Set to only used registers.
10174 (mips_regmap): Do not fetch $0. Remove unused registers. Add
10175 an entry for the restart register.
10176 (mips_cannot_fetch_register, mips_cannot_store_register)
10177 (mips_reinsert_addr, mips_fill_fpregset, mips_store_fpregset): Update
10178 register names to match the XML descriptions.
10179 (mips_fill_gregset, mips_store_gregset): Likewise. Handle the
10180 restart register instead of $0.
10181
0e7f50da
UW
101822007-06-12 Ulrich Weigand <uweigand@de.ibm.com>
10183 Markus Deuling <deuling@de.ibm.com>
10184
10185 * remote-utils.c (decode_xfer_write): New function.
10186 * server.h (decode_xfer_write): Add prototype.
10187 * server.c (handle_query): Add PACKET_LEN argument. Support
10188 qXfer:spu:read and qXfer:spu:write packets.
10189 (main): Pass packet_len to handle_query.
10190 * spu-low.c (spu_target_ops): Add spu_proc_xfer_spu.
10191 * target.h (target_ops): Add qxfer_spu.
10192
374c1d38
UW
101932007-06-12 Ulrich Weigand <uweigand@de.ibm.com>
10194
10195 * spu-low.c (spu_proc_xfer_spu): Do not return failure when
10196 accessing non-seekable spufs files.
10197
bb63802a
UW
101982007-05-16 Markus Deuling <deuling@de.ibm.com>
10199
889bf7c5 10200 * server.c (handle_query): Add reply for qC packet.
bb63802a 10201
7390519e
PA
102022007-05-10 Pedro Alves <pedro_alves@portugalmail.pt>
10203 Leo Zayas <lerele@champenstudios@com>
10204
10205 * server.h (check_remote_input_interrupt_request): New function.
10206 * remote_utils.c (INVALID_DESCRIPTOR): New define.
10207 (remote_desc): Initialize with INVALID_DESCRIPTOR.
10208 (input_interrupt): Expose on USE_WIN32API too. Fix whitespace.
10209 (check_remote_input_interrupt_request): New function.
10210 * server.h (check_remote_input_interrupt_request): Declare.
3ecf0694 10211 * win32-low.c (winapi_DebugBreakProcess,
7390519e
PA
10212 winapi_GenerateConsoleCtrlEvent): New typedefs.
10213 (get_child_debug_event): Lower Win32 debug event polling from 1 sec
10214 to 250 ms.
10215 (win32_wait): Check for remote interrupt request
10216 with check_remote_input_interrupt_request.
10217 (win32_request_interrupt): New function.
10218 (win32_target_op): Set request_interrupt to win32_request_interrupt.
10219
34b34921
PA
102202007-05-10 Pedro Alves <pedro_alves@portugalmail.pt>
10221
10222 * win32-low.c (debug_registers_changed,
10223 debug_registers_used, CONTEXT_EXTENDED_REGISTERS,
10224 CONTEXT_FLOATING_POINT, CONTEXT_DEBUG_REGISTERS,
10225 CONTEXT_DEBUGGER, CONTEXT_DEBUGGER_DR): Delete.
10226 (thread_rec): Get context using the low target.
10227 (child_add_thread): Call thread_added on the low target,
10228 which does the same thing.
10229 (regptr): Delete.
10230 (do_initial_child_stuff): Remove debug registers references.
10231 Set context using the low target. Resume threads after
10232 setting the contexts.
10233 (child_continue): Remove dead variable. Remove debug
10234 registers references.
10235 (child_fetch_inferior_registers): Go through the low target.
10236 (do_child_store_inferior_registers): Remove.
10237 (child_store_inferior_registers): Go through the low target.
10238 (win32_resume): Remove debug registers references.
10239 Set context using the low target.
10240 (handle_exception): Change return type to void. Don't record
10241 context here. Set status to TARGET_WAITKIND_SPURIOUS on a
10242 first chance exception.
889bf7c5 10243 (get_child_debug_event): Change return type to void. Remove
34b34921
PA
10244 goto loop. Always return after waiting for debug event.
10245 (win32_wait): Convert to switch statement. Handle spurious
10246 events.
10247
10248 * win32-i386-low.c (debug_registers_changed,
10249 debug_registers_used): New.
10250 (initial_stuff): Rename to ...
10251 (i386_initial_stuff): ... this. Clear debug registers
10252 state variables.
10253 (store_debug_registers): Delete.
10254 (i386_get_thread_context): New.
10255 (load_debug_registers): Delete.
10256 (i386_set_thread_context): New.
10257 (i386_thread_added): New.
10258 (single_step): Rename to ...
10259 (i386_single_step): ... this.
10260 (do_fetch_inferior_registers): Rename to ...
10261 (i386_fetch_inferior_register): ... this.
10262 (i386_store_inferior_register): New.
10263 (the_low_target): Adapt to new interface.
10264
10265 * win32-arm-low.c (CONTEXT_FLOATING_POINT): Define.
10266 (arm_get_thread_context): New.
10267 (arm_set_thread_context): New.
10268 (regptr): New.
10269 (do_fetch_inferior_registers): Rename to ...
10270 (arm_fetch_inferior_register): ... this.
10271 (arm_store_inferior_register): New.
10272 (arm_wince_breakpoint): Reimplement as unsigned long.
10273 (arm_wince_breakpoint_len): Define.
10274 (the_low_target): Adapt to new interface.
10275
10276 * win32-low.h (target_ops): Remove regmap, store_debug_registers and
10277 load_debug_registers. Add get_thread_context, set_thread_context,
10278 thread_added and store_inferior_register. Rename
10279 fetch_inferior_registers to fetch_inferior_register.
10280 (regptr): Remove declaration.
10281
dd6953e1
PA
102822007-05-10 Pedro Alves <pedro_alves@portugalmail.pt>
10283
10284 * linux-low.c (linux_detach): Change return type to int. Return 0.
10285 * spu-low.c (spu_detach): Likewise.
10286
444d6139
PA
102872007-05-10 Pedro Alves <pedro_alves@portugalmail.pt>
10288
10289 * target.h (target_ops): Change return type of detach to int.
10290 Add join.
10291 (join_inferior): New.
10292 * server.c (main): Don't skip detach support on mingw32.
10293 If the inferior doesn't support detaching return error.
10294 Call join_inferior instead of using waitpid.
10295 * linux-low.c (linux_join): New.
10296 (linux_target_op): Add linux_join.
10297 * spu-low.c (spu_join): New.
10298 (spu_target_ops): Add spu_join.
10299 * win32-low.c (win32_detach): Adapt to new interface.
10300 Reopen current_process_handle before detaching. Issue a child
10301 resume before detaching.
10302 (win32_join): New.
10303 (win32_target_op): Add win32_join.
10304
1d5315fe
PA
103052007-05-10 Pedro Alves <pedro_alves@portugalmail.pt>
10306
10307 * win32-low.c (win32-attach): Fix return value.
10308 * target.h (target_ops): Describe ATTACH return values.
10309
bf914831
PA
103102007-05-10 Pedro Alves <pedro_alves@portugalmail.pt>
10311
10312 * win32-low.c (GETPROCADDRESS): Define.
10313 (winapi_DebugActiveProcessStop): Add WINAPI. typedef as pointer.
10314 (winapi_DebugSetProcessKillOnExit): Likewise.
10315 (win32_create_inferior): Force usage of ansi CreateProcessA.
10316 (win32_attach): Use GETPROCADDRESS.
10317 (win32_detach): Likewise.
10318
f72f3e60
PA
103192007-05-10 Pedro Alves <pedro_alves@portugalmail.pt>
10320
10321 * win32-low.c (win32_wait): Don't use WSTOPSIG.
10322
ed50f18f
PA
103232007-03-30 Pedro Alves <pedro_alves@portugalmail.pt>
10324
10325 * win32-low.c: Commit leftover changes from 2007-03-29.
10326
0c2ead7e
DJ
103272007-03-30 Daniel Jacobowitz <dan@codesourcery.com>
10328
10329 * i387-fp.c (struct i387_fsave, struct i387_fxsave): Make 16-bit
10330 fields short instead of int. Add explicit padding.
10331 (i387_cache_to_fsave): Remove unnecessary casts.
10332 (i387_fsave_to_cache): Doc fix.
10333 (i387_cache_to_fxsave): Remove unnecessary casts and masking.
10334
73725ff3
DJ
103352007-03-30 Daniel Jacobowitz <dan@codesourcery.com>
10336
10337 * i387-fp.c (i387_cache_to_fxsave): Reinitialize val2 before use.
10338 (i387_fxsave_to_cache): Check fp->ftag while building ftag value.
10339
d99f33d8
PA
103402007-03-29 Pedro Alves <pedro_alves@portugalmail.pt>
10341
10342 * configure.srv (arm*-*-mingw32ce*): Move near the other
10343 arm targets.
10344
68070c10
PA
103452007-03-29 Pedro Alves <pedro_alves@portugalmail.pt>
10346
2482afc6 10347 * configure.ac: Add errno checking.
68070c10
PA
10348 (AC_CHECK_HEADERS): Add errno.h, fcntl.h, signal.h,
10349 sys/file.h and malloc.h.
10350 (AC_CHECK_DECLS): Add perror.
10351 (srv_mingwce): Handle.
2482afc6 10352 * configure.srv (i[34567]86-*-cygwin*): Add
68070c10
PA
10353 win32-i386-low.o to srv_tgtobj.
10354 (i[34567]86-*-mingw*): Likewise.
10355 (arm*-*-mingw32ce*): Add case.
10356 * gdbreplay.c [HAVE_SYS_FILE_H, HAVE_SIGNAL_H,
10357 HAVE_FCNTL_H, HAVE_ERRNO_H, HAVE_MALLOC_H]: Check.
10358 [__MINGW32CE__] (strerror): New function.
10359 [__MINGW32CE__] (errno): Define to GetLastError.
10360 [__MINGW32CE__] (COUNTOF): New macro.
10361 (remote_open): Remove extra close call.
10362 * mem-break.c (delete_breakpoint_at): New function.
10363 * mem-break.h (delete_breakpoint_at): Declare.
10364 * remote-utils.c [HAVE_SYS_FILE_H, HAVE_SIGNAL_H,
10365 HAVE_FCNTL_H, HAVE_UNISTD_H, HAVE_ERRNO_H]: Check.
10366 [USE_WIN32API] (read, write): Add char* casts.
10367 * server.c [HAVE_UNISTD_H, HAVE_SIGNAL_H]: Check.
10368 * server.h: Include wincecompat.h on Windows CE.
10369 [HAVE_ERRNO_H]: Check.
10370 (perror): Declare if not declared.
10371 * utils.c: Add stdlib.h, errno.h and malloc.h includes.
10372 (perror_with_name): Remove errno declaration.
10373 * wincecompat.h: New.
10374 * wincecompat.c: New.
10375 * win32-low.h: New.
10376 * win32-arm-low.c: New.
10377 * win32-i386-low.c: New.
10378 (win32-low.c): Include mem-break.h and win32-low.h, and winnt.h.
10379 (OUTMSG2): Make it safe.
10380 (_T): New macro.
10381 (COUNTOF): New macro.
10382 (NUM_REGS): Get it from the low target.
10383 (CONTEXT_EXTENDED_REGISTERS, CONTEXT_FLOATING_POINT,
10384 CONTEXT_DEBUG_REGISTERS): Add fallbacks to 0.
10385 (thread_rec): Let low target handle debug registers.
10386 (child_add_thread): Likewise.
10387 (child_init_thread_list): Likewise.
10388 (continue_one_thread): Likewise.
10389 (regptr): New.
10390 (do_child_fetch_inferior_registers): Move to ...
10391 * win32-i386-low.c: ... here, and rename to ...
10392 (do_fetch_inferior_registers): ... this.
889bf7c5 10393 * win32-low.c (child_fetch_inferior_registers):
68070c10
PA
10394 Go through the low target.
10395 (do_child_store_inferior_registers): Use regptr.
10396 (strwinerror): New function.
10397 (win32_create_inferior): Handle Windows CE.
10398 Use strwinerror instead of strerror on Windows error
10399 codes. Add program to the error output.
10400 Don't close the main thread handle on Windows CE.
10401 (win32_attach): Use coredll.dll on Windows CE.
10402 (win32_kill): Close current process and current
10403 thread handles.
10404 (win32_detach): Use coredll.dll on Windows CE.
10405 (win32_resume): Let low target handle debug registers, and
10406 step request.
10407 (handle_exception): Add/Remove initial breakpoint. Avoid
10408 non-existant WSTOPSIG on Windows CE.
10409 (win32_read_inferior_memory): Cast to remove warning.
10410 (win32_arch_string): Go through the low target.
10411 (initialize_low): Call set_breakpoint_data with the low
10412 target's breakpoint.
10413 * win32-low.c (dr, FLAG_TRACE_BIT, FCS_REGNUM,
10414 FOP_REGNUM, mappings): Move to ...
10415 * win32-i386-low.c: ... here.
10416 * win32-low.c (win32_thread_info): Move to ...
10417 * win32-low.h: ... here.
10418 * Makefile.in (SFILES): Add win32-low.c, win32-i386-low.c,
10419 win32-arm-low.c and wincecompat.c.
10420 (all:): Add $EXEEXT.
10421 (install-only:): Likewise.
10422 (gdbserver:): Likewise.
10423 (gdbreplay:): Likewise.
10424 * config.in: Regenerate.
10425 * configure: Regenerate.
10426
41093d81
PA
104272007-03-28 Pedro Alves <pedro_alves@portugalmail.pt>
10428
10429 * win32-low.c: Rename typedef thread_info to
10430 win32_thread_info throughout.
10431
544afa54
PA
104322007-03-28 Pedro Alves <pedro_alves@portugalmail.pt>
10433
10434 * win32-i386-low.c: Rename to ...
10435 * win32-low.c: ... this.
10436 * configure.srv: Replace win32-i386-low.o with win32-low.o.
10437 * Makefile.in: Likewise.
10438
bce7165d
PA
104392007-03-27 Pedro Alves <pedro_alves@portugalmail.pt>
10440
10441 * remote-utils.c (monitor_output): Constify msg parameter.
10442 * server.h (monitor_output): Likewise.
10443 * win32-i386-low.c (handle_output_debug_string): New.
10444 (win32_kill): Handle OUTPUT_DEBUG_STRING_EVENT events using
10445 handle_output_debug_string.
10446 (get_child_debug_event): Likewise.
10447
506c7aa0
DJ
104482007-03-27 Mat Hostetter <mat@lcs.mit.edu>
10449
10450 * server.c (main): Correct strtoul check.
10451
42c81e2a
DJ
104522007-03-27 Jon Ringle <jon@ringle.org>
10453
10454 * linux-low.c: Check __ARCH_HAS_MMU__ also.
10455
9453113a
DJ
104562007-03-27 Brooks Moses <brooks.moses@codesourcery.com>
10457
10458 * Makefile.in: Add dummy "pdf" and "install-pdf" targets.
10459
64a69107
DJ
104602007-02-27 Daniel Jacobowitz <dan@codesourcery.com>
10461
10462 * terminal.h: Check HAVE_SGTTY_H.
10463
104642007-02-27 Mat Hostetter <mat@lcs.mit.edu>
6f8486da
DJ
10465
10466 * remote-utils.c (remote_open): Print out the assigned port number.
10467
c74d0ad8
DJ
104682007-02-26 Daniel Jacobowitz <dan@codesourcery.com>
10469
10470 * remote-utils.c (monitor_output): New function.
10471 * server.c (debug_threads): Define here.
10472 (monitor_show_help): New function.
10473 (handle_query): Handle qRcmd.
10474 (main): Do not handle 'd' packet.
10475 * server.h (debug_threads, remote_debug, monitor_output): Declare.
10476 * linux-low.c, spu-low.c, win32-i386-low.c: Remove definitions
10477 of debug_threads.
10478
de7c3b4a
PA
104792007-02-25 Pedro Alves <pedro_alves@portugalmail.pt>
10480
10481 * Makefile.in (EXEEXT): New.
10482 (clean): Use $(EXEEXT).
10483
ef57601b
PA
104842007-02-25 Pedro Alves <pedro_alves@portugalmail.pt>
10485
10486 * target.h (target_ops): Rename send_signal to request_interrupt,
10487 and remove enum target_signal parameter.
10488 * linux-low.c (linux_request_interrupt): Rename from
10489 linux_send_signal, and always send SIGINT.
10490 * spu-low.c (spu_request_interrupt): Rename from spu_send_signal,
10491 and always send SIGINT.
10492 * remote-utils.c (putpkt_binary): Call request_interrupt, instead
10493 of send_signal.
10494 (input_interrupt): Likewise.
10495
820f2bda
PA
104962007-02-25 Pedro Alves <pedro_alves@portugalmail.pt>
10497
10498 * server.c (get_features_xml): Check if target implemented
10499 arch_string.
10500 * win32-i386-low.c (win32_arch_string): New.
10501 (win32_target_ops): Add win32_arch_string as arch_string member.
10502
ab39bf24
UW
105032007-02-22 Markus Deuling <deuling@de.ibm.com>
10504
10505 * spu-low.c (spu_arch_string): New.
10506 (spu_target_ops): Add spu_arch_string.
10507
61ff6e04
DJ
105082007-02-16 Daniel Jacobowitz <dan@codesourcery.com>
10509
10510 * remote-utils.c: Remove HAVE_TERMINAL_H check.
10511 * configure.ac: Do not check for terminal.h.
10512 * configure, config.in: Regenerated.
10513
fb1e4ffc
DJ
105142007-02-08 Daniel Jacobowitz <dan@codesourcery.com>
10515
10516 * Makefile.in (OBS): Add $(XML_BUILTIN).
10517 (XML_DIR, XML_TARGET, XML_FILES, XML_BUILTIN): New.
10518 (clean): Update.
10519 (target.xml, xml-builtin.c, stamp-xml, arm-with-iwmmxt.o)
10520 (arm-with-iwmmxt.c): New.
10521 * config.in, configure: Regenerate.
10522 * configure.ac: Check for iWMMXt. Handle srv_xmltarget,
10523 srv_xmlbuiltin, and srv_xmlfiles. Define USE_XML.
10524 * configure.srv: Mention srv_xmltarget and srv_xmlfiles.
10525 (arm*-*-linux*): Add iWMMXt and regset support.
10526 * linux-arm-low.c (PTRACE_GETWMMXREGS, PTRACE_SETWMMXREGS): Define.
10527 (arm_fill_gregset, arm_store_gregset, arm_fill_wmmxregset)
10528 (arm_store_wmmxregset, target_regsets): New.
10529 * server.c (get_features_xml): Take annex argument. Check builtin
10530 XML documents.
10531 (handle_query): Handle multiple annexes.
10532
0f48aa01
DJ
105332007-01-29 Daniel Jacobowitz <dan@codesourcery.com>
10534
10535 * remote-utils.c [USE_WIN32API] (read, write): Define.
10536 (putpkt_binary, input_interrupt, readchar, getpkt): Use read and
10537 write.
10538
23181151
DJ
105392007-01-09 Daniel Jacobowitz <dan@codesourcery.com>
10540
10541 * linux-i386-low.c (the_low_target): Set arch_string.
10542 * linux-x86-64-low.c (the_low_target): Likewise.
10543 * linux-low.c (linux_arch_string): New.
10544 (linux_target_ops): Add it.
10545 * linux-low.h (struct linux_target_ops): Add arch_string.
10546 * server.c (write_qxfer_response): Use const void * for DATA.
10547 (get_features_xml): New.
10548 (handle_query): Handle qXfer:features:read. Report it for qSupported.
10549 * target.h (struct target_ops): Add arch_string method.
10550
9d606399
DJ
105512007-01-03 Denis Pilat <denis.pilat@st.com>
10552 Daniel Jacobowitz <dan@codesourcery.com>
10553
10554 * linux-low.c (linux_kill): Handle being called with no threads.
10555 * win32-i386-low.c (win32_kill): Likewise.
10556 (get_child_debug_event): Clear current_process_handle.
10557
105582006-12-30 Denis PILAT <denis.pilat@st.com>
8264bb58
DJ
10559 Daniel Jacobowitz <dan@codesourcery.com>
10560
10561 * remote-utils.c (remote_open): Check the type of specified
10562 serial port devices before opening them.
10563 * server.c (main): Kill the inferior if an error occurs during
10564 the first remote_open.
10565
a5e13d24
DJ
105662006-12-05 Markus Deuling <deuling@de.ibm.com>
10567
10568 * README: Update supported targets.
10569
186947f7
DJ
105702006-11-28 Daniel Jacobowitz <dan@codesourcery.com>
10571
10572 * Makefile.in (clean): Remove reg-mips64.c.
10573 (reg-mips64.c, reg-mips64.o): New rules.
10574 * configure.srv: Handle mips64. Include regset support for mips.
10575 * linux-mips-low.c (union mips_register): New.
10576 (mips_get_pc, mips_set_pc, mips_reinsert_addr): Use it.
10577 (mips_breakpoint, mips_breakpoint_at): Use int.
10578 (mips_collect_register, mips_supply_register)
10579 (mips_collect_register_32bit, mips_supply_register_32bit)
10580 (mips_fill_gregset, mips_store_gregset, mips_fill_fpregset)
10581 (mips_store_fpregset, target_regsets): New.
10582 * thread-db.c (thread_db_get_tls_address): Use uintptr_t.
10583
a13e2c95
UW
105842006-11-22 Ulrich Weigand <uweigand@de.ibm.com>
10585
10586 * configure.srv: Add target "spu*-*-*".
10587 * Makefile.in (clean): Remove reg-spu.c.
10588 (reg-spu.c, reg-spu.o, spu-low.o): Add dependencies.
10589 * spu-low.c: New file.
10590
cb7283db
DJ
105912006-11-16 Daniel Jacobowitz <dan@codesourcery.com>
10592
10593 * configure.ac: Correct td_thr_tls_get_addr test.
10594 * configure: Regenerated.
10595
89be2091
DJ
105962006-11-16 Daniel Jacobowitz <dan@codesourcery.com>
10597
10598 * linux-low.c (linux_wait_for_event): Reformat. Use the
10599 pass_signals array.
10600 * remote-utils.c (decode_address_to_semicolon): New.
10601 * server.c (pass_signals, handle_general_set): New.
10602 (handle_query): Mention QPassSignals for qSupported.
10603 (main): Call handle_general_set.
10604 * server.h (pass_signals, decode_address_to_semicolon): New.
10605
000ef4f0
DJ
106062006-11-06 Daniel Jacobowitz <dan@codesourcery.com>
10607
10608 * server.c (handle_query): Correct error handling for read_auxv.
10609
b7149293
UW
106102005-10-19 Ulrich Weigand <uweigand@de.ibm.com>
10611
10612 * configure.srv [s390-*-linux*, s390x-*-linux*]: Set srv_linux_regsets
10613 and srv_linux_thread_db to yes.
10614 * linux-s390-low.c (s390_fill_gregset): New function.
10615 (target_regsets): Define data structure.
10616
dae5f5cf
DJ
106172006-10-17 Daniel Jacobowitz <dan@codesourcery.com>
10618
10619 * acinclude.m4 (SRV_CHECK_TLS_GET_ADDR): New.
10620 * configure.ac: Use it. Define HAVE_TD_THR_TLS_GET_ADDR.
10621 * config.in, configure: Regenerated.
10622 * inferiors.c (gdb_id_to_thread): New function.
10623 (gdb_id_to_thread_id): Use it.
10624 * linux-low.c (linux_target_ops): Use thread_db_get_tls_address.
10625 * linux-low.h (struct process_info): Add th member.
10626 (thread_db_get_tls_address): New prototype.
10627 * remote-utils.c (decode_address): Make non-static.
10628 * server.c (handle_query): Handle qGetTLSAddr.
10629 * server.h (gdb_id_to_thread, decode_address): New prototypes.
10630 * target.h (struct target_ops): Add get_tls_address.
10631 * thread-db.c (maybe_attach_thread): Save the thread handle.
10632 (thread_db_get_tls_address): New.
10633
32ca6d61
DJ
106342006-09-28 Daniel Jacobowitz <dan@codesourcery.com>
10635
10636 * linux-low.c (PTRACE_GETSIGINFO, PTRACE_SETSIGINFO): Define.
10637 (linux_resume_one_process): Take a siginfo_t *. Update all
10638 callers. Queue it if necessary. Use PTRACE_SETSIGINFO.
10639 (struct pending_signals): Add a siginfo_t.
10640 (linux_wait_for_process): Always set last_status.
10641 (linux_wait_for_event): Use PTRACE_GETSIGINFO.
10642 (linux_queue_one_thread): Use PTRACE_GETSIGINFO.
10643 * linux-low.h (struct process_info): Add last_status.
10644
5ffff7c1
DJ
106452006-09-21 Daniel Jacobowitz <dan@codesourcery.com>
10646
10647 * remote-utils.c (try_rle): New function.
10648 (putpkt_binary): Use it.
10649
8695c747
DJ
106502006-08-19 Daniel Jacobowitz <dan@codesourcery.com>
10651
10652 * Makefile.in (clean): Clean reg-x86-64-linux.c.
10653 (reg-x86-64-linux.o, reg-x86-64-linux.c): New.
10654 * configure.srv (x86_64-*-linux*): Use reg-x86-64-linux.o.
10655 * linux-x86-64-low.c (x86_64_regmap): Include ORIG_RAX.
10656 (x86_64_fill_gregset, x86_64_store_gregset): Skip floating
10657 point registers.
10658
290fadea
RS
106592006-08-08 Richard Sandiford <richard@codesourcery.com>
10660
10661 * server.c (terminal_fd): New variable.
10662 (old_foreground_pgrp): Likewise.
10663 (restore_old_foreground_pgrp): New function.
10664 (start_inferior): Record the terminal file descriptor in terminal_fd
10665 and its original foreground group in old_foreground_pgrp. Register
10666 restore_old_foreground_pgrp with atexit().
10667
9f2e1e63
DJ
106682006-07-26 Daniel Jacobowitz <dan@codesourcery.com>
10669
10670 * server.c (handle_query): Correct qPart to qXfer.
10671
b80864fb
DJ
106722006-07-22 Daniel Jacobowitz <dan@codesourcery.com>
10673
10674 * configure.ac: Check for more headers which are missing on
10675 Windows. Automatically supply -lwsock32 and USE_WIN32API.
10676 * configure.srv: Add Cygwin and mingw32.
10677 * remote-utils.c: Don't include headers unconditionally which
10678 are missing on mingw32. Include <winsock.h> for mingw32.
10679 (remote_open): Adjust for mingw32 support. Flush
10680 standard error after writing to it.
10681 (remote_close, putpkt_binary, input_interrupt, block_async_io)
10682 (unblock_async_io, enable_async_io, disable_async_io)
10683 (readchar, getpkt): Update for Winsock support.
10684 (prepare_resume_reply): Expect a protocol signal number.
10685 * server.c: Disable <sys/wait.h> on mingw32.
10686 (start_inferior): Adjust for mingw32 support. Flush
10687 standard error after writing to it.
10688 (attach_inferior): Likewise. Use protocol signal
10689 numbers.
10690 (main): Skip 'D' packet on mingw32. Use protocol signal numbers
10691 and names.
10692 * win32-i386-low.c: New file.
10693 * Makefile.in (XM_CLIBS): Set.
10694 (gdbserver, gdbreplay): Use $(INTERNAL_CFLAGS).
10695 (win32-i386-low.o): New dependency rule.
10696 * linux-low.c (linux_wait): Use target signal numbers.
10697 * target.h (struct target_ops): Doc fix.
10698 * server.h (target_signal_to_name): New prototype.
10699 * gdbreplay.c: Don't include headers unconditionally which
10700 are missing on mingw32. Include <winsock.h> for mingw32.
10701 (remote_close, remote_open): Adjust for Winsock support.
10702 * configure, config.in: Regenerated.
10703
0876f84a
DJ
107042006-07-12 Daniel Jacobowitz <dan@codesourcery.com>
10705
10706 * server.c (decode_xfer_read, write_qxfer_response): New.
10707 (handle_query): Take a packet length argument. Handle
10708 qXfer:auxv:read instead of qPart:auxv:read. Mention it in
10709 the qSupported response.
10710 (main): Update call to handle_query.
10711
01f9e8fa
DJ
107122006-06-22 Daniel Jacobowitz <dan@codesourcery.com>
10713
10714 * remote-utils.c (remote_escape_output, remote_unescape_input): New.
10715 (putpkt_binary): Renamed from putpkt and adjusted for binary
10716 data.
10717 (putpkt): New wrapper for putpkt_binary.
10718 (readchar): Don't mask off the high bit.
10719 (decode_X_packet): New function.
10720 * server.c (main): Call putpkt_binary if a handler sets the packet
10721 length. Save the length of the incoming packet. Handle 'X'.
10722 * server.h (gdb_byte, remote_escape_output, decode_X_packet): New.
10723
be2a5f71
DJ
107242006-06-21 Daniel Jacobowitz <dan@codesourcery.com>
10725
10726 * server.c (handle_query): Handle qSupported.
10727
ea025f5f
DJ
107282006-05-30 Daniel Jacobowitz <dan@codesourcery.com>
10729
10730 * remote-utils.c (all_symbols_looked_up): New variable.
10731 (look_up_one_symbol): Check it.
10732 * server.h (look_up_one_symbol): New declaration.
10733 * thread-db.c (thread_db_init): Set all_symbols_looked_up.
10734
9308fc88
DJ
107352006-05-30 Daniel Jacobowitz <dan@codesourcery.com>
10736
10737 * Makefile.in (linux-arm-low.o): Update dependencies.
66f338c7 10738 * linux-arm-low.c: Include "gdb_proc_service.h".
9308fc88
DJ
10739 (PTRACE_GET_THREAD_AREA): Define.
10740 (ps_get_thread_area): New function.
10741
52fb6437
NS
107422006-05-09 Nathan Sidwell <nathan@codesourcery.com>
10743
10744 * configure.srv (m68k*-*-uclinux*): New target.
10745 * linux-low.c (linux_create_inferior): Use vfork on mmuless systems.
10746 (linux_resume_one_process): Remove extraneous cast.
10747 (linux_read_offsets): New.
10748 (linux_target_op): Add linux_read_offsets on mmuless systems.
10749 * server.c (handle_query): Add qOffsets logic.
10750 * target.h (struct target_ops): Add read_offsets.
10751
21b0f40c
DJ
107522006-03-15 Daniel Jacobowitz <dan@codesourcery.com>
10753
10754 * linux-mips-low.c: Include <sys/ptrace.h> and "gdb_proc_service.h".
10755 (PTRACE_GET_THREAD_AREA): Define.
10756 (ps_get_thread_area): New function.
10757 * Makefile.in (linux-i386-low.o, linux-mips-low.o)
10758 (linux-x86-64-low.o): Update.
10759
0050a760
DJ
107602006-03-15 Daniel Jacobowitz <dan@codesourcery.com>
10761
10762 * configure.ac: Remove checks for prfpregset_t.
10763 * gdb_proc_service.h: New file.
10764 * linux-i386-low.c, linux-x86-64-low.c, thread-db.c: Use the
10765 new "gdb_proc_service.h".
10766 * proc-service.c: Likewise.
10767 (ps_pglobal_lookup, ps_pdread, ps_pdwrite): Use psaddr_t.
10768 (ps_lgetfpregs, ps_lsetfpregs): Use a void* argument.
10769 * Makefile.in (gdb_proc_service_h): Updated.
10770 * configure, config.in: Regenerated.
10771
b92a518e
DJ
107722006-03-03 Daniel Jacobowitz <dan@codesourcery.com>
10773
10774 * remote-utils.c (prepare_resume_reply): Move declaration
10775 of gdb_id_from_wait to the top of the block.
10776
545587ee
DJ
107772006-02-15 Daniel Jacobowitz <dan@codesourcery.com>
10778
10779 * linux-low.c (regsets_store_inferior_registers): Read the regset
10780 from the target before filling it.
10781
9db87ebd
DJ
107822006-02-08 Daniel Jacobowitz <dan@codesourcery.com>
10783
10784 * server.c (attach_inferior): Return SIGTRAP for a successful
10785 attach.
10786
dd24457d
DJ
107872006-02-01 Daniel Jacobowitz <dan@codesourcery.com>
10788
10789 * Makefile.in (OBS): Add version.o.
10790 (STAGESTUFF): Delete.
10791 (version.o): Add dependencies.
10792 (version.c): Replace rule.
10793 (clean): Remove version.c.
10794 * server.c (gdbserver_version): New.
10795 (gdbserver_usage): Use printf.
10796 (main): Handle --version and --help.
10797 * server.h (version, host_name): Add declarations.
10798
6f0f660e
EZ
107992005-12-23 Eli Zaretskii <eliz@gnu.org>
10800
889bf7c5
PA
10801 * linux-arm-low.c:
10802 * linux-arm-low.c:
10803 * inferiors.c:
10804 * i387-fp.h:
10805 * i387-fp.c:
10806 * gdbreplay.c:
10807 * regcache.c:
10808 * proc-service.c:
10809 * mem-break.h:
10810 * mem-break.c:
10811 * linux-x86-64-low.c:
10812 * linux-sh-low.c:
10813 * linux-s390-low.c:
10814 * linux-ppc64-low.c:
10815 * linux-ppc-low.c:
10816 * linux-mips-low.c:
10817 * linux-m68k-low.c:
10818 * linux-m32r-low.c:
10819 * linux-low.h:
10820 * linux-low.c:
10821 * linux-ia64-low.c:
10822 * linux-i386-low.c:
10823 * linux-crisv32-low.c:
10824 * thread-db.c:
10825 * terminal.h:
10826 * target.h:
10827 * target.c:
10828 * server.h:
10829 * server.c:
10830 * remote-utils.c:
10831 * regcache.h:
10832 * utils.c:
10833 * Makefile.in:
10834 * configure.ac:
6f0f660e
EZ
10835 * gdbserver.1: Add (C) after Copyright. Update the FSF
10836 address.
10837
9d1fb177
DJ
108382005-11-13 Daniel Jacobowitz <dan@codesourcery.com>
10839
10840 * linux-arm-low.c (arm_eabi_breakpoint): New variable.
10841 (arm_breakpoint_at): Recognize both breakpoints.
10842 (the_low_target): Use the correct breakpoint instruction.
10843
011a70c2
DJ
108442005-11-02 Daniel Jacobowitz <dan@codesourcery.com>
10845
10846 * configure.srv (x86_64-*-linux*): Turn on thread_db support.
10847 * linux-x86-64-low.c (x86_64_breakpoint, x86_64_breakpoint_len)
10848 (x86_64_get_pc, x86_64_set_pc, x86_64_breakpoint_at): New.
10849 (the_low_target): Update.
10850
7fb85e41
AS
108512005-10-25 Andreas Schwab <schwab@suse.de>
10852
10853 * server.c (main): Allocate mem_buf with PBUFSIZ bytes.
10854
10855 * linux-ia64-low.c (ia64_regmap): Remove NAT registers.
10856 (ia64_num_regs): Reduce to 462.
10857
3db0444b
DJ
108582005-09-17 Daniel Jacobowitz <dan@codesourcery.com>
10859
10860 * acinclude.m4: Correct quoting.
10861 * aclocal.m4: Regenerated.
10862
10863 Suggested by SZOKOVACS Robert <szo@ies.hu>:
10864 * thread-db.c (thread_db_err_str): Handle TD_VERSION.
10865 (thread_db_init): Call thread_db_err_str.
10866 * configure.ac: Check for TD_VERSION.
10867 * config.in, configure: Regenerated.
10868
bee0189a
DJ
108692005-07-31 Kaveh R. Ghazi <ghazi@caip.rutgers.edu>
10870
10871 * server.h (error, fatal, warning): Add ATTR_FORMAT.
10872
e9d25b98
DJ
108732005-07-13 Daniel Jacobowitz <dan@codesourcery.com>
10874
10875 * configure.ac: Define HAVE_LINUX_REGSETS even if PTRACE_GETREGS
10876 is not available. Define HAVE_PTRACE_GETREGS if it is.
10877 * config.in, configure: Regenerated.
10878 * configure.srv: Set srv_linux_regsets for PowerPC and PowerPC64.
10879 * linux-i386-low.c, linux-m68k-low.c: Update to use
10880 HAVE_PTRACE_GETREGS.
10881 * linux-low.c (regsets_fetch_inferior_registers)
10882 (regsets_store_inferior_registers): Only return 0 if we processed
10883 GENERAL_REGS.
10884 * linux-ppc-low.c (ppc_fill_gregset, target_regsets): New.
10885 * linux-ppc64-low.c (ppc_fill_gregset, target_regsets): New.
10886
a06660f7
DJ
108872005-07-13 Daniel Jacobowitz <dan@codesourcery.com>
10888
10889 * inferiors.c (struct thread_info): Add gdb_id.
10890 (add_thread): Add gdb_id argument.
10891 (thread_id_to_gdb_id, thread_to_gdb_id, gdb_id_to_thread_id): New.
10892 * linux-low.c (linux_create_inferior, linux_attach_lwp): Update
10893 calls to add_thread.
10894 * remote-utils.c (prepare_resume_reply: Use thread_to_gdb_id.
10895 * server.c (handle_query): Use thread_to_gdb_id.
10896 (handle_v_cont, main): Use gdb_id_to_thread_id.
10897 * server.h (add_thread): Update prototype.
10898 (thread_id_to_gdb_id, thread_to_gdb_id, gdb_id_to_thread_id): New
10899 prototypes.
10900
5a1f5858
DJ
109012005-07-13 Daniel Jacobowitz <dan@codesourcery.com>
10902
10903 * linux-low.c (fetch_register, usr_store_inferior_registers): Handle
10904 left-padded registers.
10905 * linux-low.h (struct linux_target_ops): Add left_pad_xfer.
10906 * linux-ppc64-low.c (the_low_target): Set left_pad_xfer.
10907
e122f1f5
SE
109082005-07-01 Steve Ellcey <sje@cup.hp.com>
10909
10910 * configure.ac (BFD_NEED_DECLARATION): Replace with AC_CHECK_DECLS.
10911 * configure: Regenerate.
10912 * config.in: Regenerate.
10913 * server.h (NEED_DECLARATION_STRERROR):
10914 Replace with !HAVE_DECL_STRERROR.
10915
d592fa2f
DJ
109162005-06-16 Daniel Jacobowitz <dan@codesourcery.com>
10917
10918 * linux-low.c (linux_wait, linux_send_signal): Don't test
10919 an unsigned long variable for > 0 if it could be MAX_ULONG.
10920 * server.c (myresume): Likewise.
10921 * target.c (set_desired_inferior): Likewise.
10922
ccbd4912
MK
109232005-06-13 Mark Kettenis <kettenis@gnu.org>
10924
10925 * configure.ac: Simplify and improve check for socklen_t.
10926 * configure, config.in: Regenerate.
10927
f450004a
DJ
109282005-06-12 Daniel Jacobowitz <dan@codesourcery.com>
10929
10930 * acconfig.h: Remove.
10931 * configure.ac: Add a test for socklen_t. Use three-argument
10932 AC_DEFINE throughout.
10933 * config.in: Regenerated using autoheader 2.59.
10934 * configure: Regenerated.
10935
10936 * gdbreplay.c (socklen_t): Provide a default.
10937 (remote_open): Use socklen_t.
10938 * remote-utils.c (socklen_t): Provide a default.
10939 (remote_open): Use socklen_t.
10940 (convert_int_to_ascii, convert_ascii_to_int, decode_M_packet): Use
10941 unsigned char.
10942
10943 * i387-fp.c (struct i387_fsave, struct i387_fxsave): Use unsigned
10944 char for buffers.
10945 * linux-low.c (linux_read_memory, linux_write_memory)
10946 (linux_read_auxv): Likewise.
10947 * mem-break.c (breakpoint_data, set_breakpoint_data, check_mem_read)
10948 (check_mem_write): Likewise.
10949 * mem-break.h (set_breakpoint_data, check_mem_read, check_mem_write):
10950 Likewise.
10951 * regcache.c (struct inferior_rgcache_data, registers_to_string)
10952 (registers_from_string, register_data): Likewise.
10953 * server.c (handle_query, main): Likewise.
10954 * server.h (convert_ascii_to_int, convert_int_to_ascii)
10955 (decode_M_packet): Likewise.
10956 * target.c (read_inferior_memory, write_inferior_memory): Likewise.
10957 * target.h (struct target_ops): Update read_memory, write_memory,
10958 and read_auxv.
10959 (read_inferior_memory, write_inferior_memory): Update.
10960 * linux-low.h (struct linux_target_ops): Change type of breakpoint
10961 to unsigned char *.
10962 * linux-arm-low.c, linux-cris-low.c, linux-crisv32-low.c,
10963 linux-i386-low.c, linux-m32r-low.c, linux-m68k-low.c,
10964 linux-mips-low.c, linux-ppc-low.c, linux-ppc64-low.c,
10965 linux-s390-low.c, linux-sh-low.c: Update for changes in
10966 read_inferior_memory and the_low_target->breakpoint.
10967
eee84df1
DJ
109682005-05-28 Daniel Jacobowitz <dan@codesourcery.com>
10969
10970 * Makefile.in (SFILES): Add linux-ppc64-low.c.
10971 (linux-ppc64-low.o, reg-ppc64.c, reg-ppc64.o): New targets.
10972 * configure.srv: Add powerpc64-*-linux*.
10973 * linux-ppc64-low.c: New file.
10974
45b134e5
OF
109752005-05-23 Orjan Friberg <orjanf@axis.com>
10976
10977 * linux-cris-low.c: New file with support for CRIS.
10978 * linux-crisv32-low.c: Ditto for CRISv32.
10979 * Makefile.in (SFILES): Add linux-cris-low.c, linux-crisv32-low.c.
10980 (clean): Add reg-cris.c and reg-crisv32.c.
889bf7c5 10981 Add linux-cris-low.o, linux-crisv32-low.o, reg-cris.o, reg-cris.c,
45b134e5
OF
10982 reg-crisv32.o, and reg-crisv32.c to make rules.
10983 * configure.srv: Add cris-*-linux* and crisv32-*-linux* to list of
10984 recognized targets.
10985
48d93c75
UW
109862005-05-16 Ulrich Weigand <uweigand@de.ibm.com>
10987
10988 * linux-low.c (fetch_register): Ensure buffer size is a multiple
10989 of sizeof (PTRACE_XFER_TYPE).
10990 (usr_store_inferior_registers): Likewise. Zero out excess bytes.
10991
e013ee27
OF
109922005-05-12 Orjan Friberg <orjanf@axis.com>
10993
889bf7c5 10994 * target.h (struct target_ops): Add insert_watchpoint,
e013ee27
OF
10995 remove_watchpoint, stopped_by_watchpoint, stopped_data_address function
10996 pointers for hardware watchpoint support.
10997 * linux-low.h (struct linux_target_ops): Ditto.
10998 * linux-low.c (linux_insert_watchpoint, linux_remove_watchpoint)
10999 (linux_stopped_by_watchpoint, linux_stopped_data_address): New. Add
11000 to linux_target_ops.
11001 * remote-utils.c (prepare_resume_reply): Add watchpoint information to
11002 reply packet.
11003 * server.c (main): Recognize 'Z' and 'z' packets.
11004
b0ded00b
UW
110052005-05-10 Ulrich Weigand <uweigand@de.ibm.com>
11006
11007 * linux-s390-low.c (s390_breakpoint, s390_breakpoint_len): Define.
11008 (s390_get_pc, s390_set_pc, s390_breakpoint_at): New functions.
11009 (the_low_target): Add new members.
11010
8643e2ad
DJ
110112005-05-04 Daniel Jacobowitz <dan@codesourcery.com>
11012
11013 * proc-service.c (ps_lgetregs): Search all_processes instead of
11014 all_threads.
11015
fc620387
DJ
110162005-05-04 Daniel Jacobowitz <dan@codesourcery.com>
11017
11018 * server.c (start_inferior): Change return type to int.
11019 (attach_inferior): Change sigptr to int *.
11020 (handle_v_cont, handle_v_requests): Change signal to int *.
11021 (main): Change signal to int.
11022
110232005-04-15 Kei Sakamoto <sakamoto.kei@renesas.com>
7cfbc4a0
KI
11024
11025 * Makefile.in: Add linux-m32r-low.o, reg-m32r.c and reg-m32r.o.
11026 * configure.srv: Add m32r*-*-linux*.
11027 * linux-m32r-low.c: New file.
11028
e0e76420
DJ
110292005-03-04 Daniel Jacobowitz <dan@codesourcery.com>
11030
11031 * Makefile.in (stamp-h): Set CONFIG_HEADERS explicitly.
11032
a1928bad
DJ
110332005-03-03 Daniel Jacobowitz <dan@codesourcery.com>
11034
11035 * inferiors.c (change_inferior_id, add_thread, find_inferior_id):
11036 Take unsigned long arguments for PIDs.
11037 * linux-low.c (add_process, linux_attach_lwp, linux_attach)
11038 (linux_thread_alive, linux_wait_for_event, kill_lwp, send_sigstop)
11039 (wait_for_sigstop, linux_resume_one_process)
11040 (regsets_fetch_inferior_registers, linux_send_signal)
11041 (linux_read_auxv): Likewise. Update the types of variables holding
11042 PIDs. Update format string specifiers.
11043 * linux-low.h (struct process_info, linux_attach_lwp): Likewise.
11044 * remote-utils.c (prepare_resume_reply): Likewise.
11045 * server.c (cont_thread, general_thread, step_thread)
11046 (thread_from_wait, old_thread_from_wait, signal_pid): Change type to
11047 unsigned long.
11048 (handle_query): Update format specifiers.
11049 (handle_v_cont, main): Use strtoul for thread IDs.
11050 * server.h (struct inferior_list_entry): Use unsigned long for ID.
11051 (add_thread, find_inferior_id, change_inferior_id, cont_thread)
11052 (general_thread, step_thread, thread_from_wait)
11053 (old_thread_from_wait): Update.
11054 * target.h (struct thread_resume): Use unsigned long for THREAD.
11055 (struct target_ops): Use unsigned long for arguments to attach and
11056 thread_alive.
11057
dcdb98d2
DJ
110582005-02-24 Daniel Jacobowitz <dan@codesourcery.com>
11059
11060 * acinclude.m4: Include bfd/bfd.m4 directly.
11061 * configure.ac: Use AC_ARG_PROGRAM. Suggested by Aron Griffis
11062 <agriffis@toolchain.org>.
11063 * aclocal.m4, configure: Regenerated.
11064
bec39cab
AC
110652005-01-07 Andrew Cagney <cagney@gnu.org>
11066
11067 * configure.ac: Rename configure.in, require autoconf 2.59.
11068 * configure: Re-generate.
11069
434c4c77
DJ
110702004-12-08 Daniel Jacobowitz <dan@debian.org>
11071
11072 * acinclude.m4 (SRV_CHECK_THREAD_DB): Add ps_get_thread_area. Reset
11073 LIBS when finished.
11074 * aclocal.m4: Regenerated.
11075 * configure: Regenerated.
11076
db1d3e1b
AS
110772004-11-21 Andreas Schwab <schwab@suse.de>
11078
11079 * linux-m68k-low.c (m68k_num_gregs): Define.
11080 (m68k_fill_gregset, m68k_store_gregset, m68k_fill_fpregset)
11081 (m68k_store_fpregset, target_regsets) [HAVE_LINUX_REGSETS]: New.
11082 (m68k_breakpoint, m68k_breakpoint_len, m68k_get_pc, m68k_set_pc)
11083 (m68k_breakpoint_at): New. Add to the_low_target.
11084
11085 * configure.srv (m68*-*-linux*): Set srv_linux_regsets and
11086 srv_linux_thread_db to yes.
11087
43360365
JB
110882004-10-20 Joel Brobecker <brobecker@gnat.com>
11089
11090 * linux-x86-64-low.c (ARCH_SET_GS): Add definition if missing.
11091 (ARCH_SET_FS): Likewise.
11092 (ARCH_GET_FS): Likewise.
11093 (ARCH_GET_GS): Likewise.
11094
fd500816
DJ
110952004-10-16 Daniel Jacobowitz <dan@debian.org>
11096
11097 * linux-i386-low.c (ps_get_thread_area): New.
11098 * linux-x86-64-low.c (ps_get_thread_area): New.
11099 * linux-low.c: Include <sys/syscall.h>.
11100 (linux_kill_one_process): Don't kill the first thread here.
11101 (linux_kill): Kill the first thread here.
11102 (kill_lwp): New function.
11103 (send_sigstop, linux_send_signal): Use it.
11104 * proc-service.c: Clean up #ifdefs.
11105 (fpregset_info): Delete.
11106 (ps_lgetregs): Update and enable implementation.
11107 (ps_lsetregs, ps_lgetfpregs, ps_lsetfpregs): Remove disabled
11108 implementations.
11109 * remote-utils.c (struct sym_cache, symbol_cache): New.
11110 (input_interrupt): Print a clearer message.
11111 (async_io_enabled): New variable.
11112 (enable_async_io, disable_async_io): Use it. Update comments.
11113 (look_up_one_symbol): Use the symbol cache.
11114 * thread-db.c (thread_db_look_up_symbols): New function.
11115 (thread_db_init): Update comments. Call thread_db_look_up_symbols.
11116
f6de3c42
DJ
111172004-10-16 Daniel Jacobowitz <dan@debian.org>
11118
11119 * configure.in: Test for -rdynamic.
11120 * configure: Regenerated.
11121 * Makefile (INTERNAL_LDFLAGS): New.
11122 (gdbserver, gdbreplay): Use it.
11123
2c0fc042
AC
111242004-09-02 Andrew Cagney <cagney@gnu.org>
11125
11126 * Makefile.in (TAGS): Replace TM_FILE with DEPRECATED_TM_FILE.
11127
075b3282
DJ
111282004-03-23 Daniel Jacobowitz <drow@mvista.com>
11129
11130 * linux-low.c (linux_wait): Clear all_processes list also.
11131
fa6a77dc
DJ
111322004-03-12 Daniel Jacobowitz <drow@mvista.com>
11133
11134 * linux-low.c: Include <errno.h>. Remove extern declaration of
11135 errno.
11136
6d782a97
DJ
111372004-03-12 Daniel Jacobowitz <drow@mvista.com>
11138
11139 * gdbreplay.c, server.h, utils.c: Update copyright years.
11140
3a7fb99b
DJ
111412004-03-04 Nathan J. Williams <nathanw@wasabisystems.com>
11142
11143 * server.c (main): Print child status or termination signal from
11144 variable 'signal', not 'sig'.
11145
c3e735a6
DJ
111462004-03-04 Nathan J. Williams <nathanw@wasabisystems.com>
11147
11148 * linux-low.c (linux_read_memory): Change return type to
11149 int. Check for and return error from ptrace().
11150 * target.c (read_inferior_memory): Change return type to int. Pass
11151 back return status from the_target->read_memory().
11152 * target.h (struct target_ops): Adapt *read_memory() prototype.
11153 Update comment.
11154 (read_inferior_memory): Adapt prototype.
11155 * server.c (main): Return an error packet if
11156 read_inferior_memory() returns an error.
11157
a59d1c82
DJ
111582004-03-04 Daniel Jacobowitz <drow@mvista.com>
11159
11160 * Makefile.in (distclean): Remove config.h, stamp-h, and config.log.
11161 Unify with other clean targets.
11162
dc3f8883
DJ
111632004-02-29 Daniel Jacobowitz <drow@mvista.com>
11164
11165 * server.c (handle_v_cont): Call set_desired_inferior.
11166
89a208da
DJ
111672004-02-29 Daniel Jacobowitz <drow@mvista.com>
11168
11169 * remote-utils.c (prepare_resume_reply): Always supply "thread:".
11170
62ea82f5
DJ
111712004-02-29 Daniel Jacobowitz <drow@mvista.com>
11172
11173 * linux-low.c (linux_wait): Unblock async I/O.
11174 (linux_resume): Block and enable async I/O.
11175 * remote-utils.c (block_async_io, unblock_async_io): New functions.
11176 * server.h (block_async_io, unblock_async_io): Add prototypes.
11177
6910d122
DJ
111782004-02-29 Daniel Jacobowitz <drow@mvista.com>
11179
11180 * remote-utils.c (remote_open): Print a status notice after
11181 opening a TCP port.
11182 * server.c (attach_inferior): Print a status notice after
11183 attaching.
11184
111852004-02-29 Daniel Jacobowitz <drow@mvista.com>
d677d77d
DJ
11186
11187 * linux-arm-low.c (arm_get_pc): Print out stop PC in debug mode.
11188
c89dc5d4
DJ
111892004-02-26 Daniel Jacobowitz <drow@mvista.com>
11190
11191 * remote-utils.c (write_enn): Use "E01" instead of "ENN" for the
11192 error packet.
11193 * server.c, target.h: Update copyright years.
11194
4b8dad4a
RM
111952004-02-25 Roland McGrath <roland@redhat.com>
11196
11197 * target.h (struct target_ops): New member `read_auxv'.
11198 * server.c (handle_query): Handle qPart:auxv:read: query using that.
11199 * linux-low.c (linux_read_auxv): New function.
11200 (linux_target_ops): Initialize `read_auxv' member to that.
11201
d7446758
JB
112022004-02-17 Ulrich Weigand <Ulrich.Weigand@de.ibm.com>
11203
11204 Committed by Jim Blandy <jimb@redhat.com>.
11205
11206 * linux-s390-low.c (s390_num_regs): Update.
4b8dad4a 11207 (s390_regmap): Remove control registers. Use __s390x__ predefine
d7446758
JB
11208 instead of GPR_SIZE to distiguish s390 and s390x targets.
11209
5544ad89
DJ
112102004-01-31 Daniel Jacobowitz <drow@mvista.com>
11211
11212 * linux-low.c: Update copyright year.
11213 (check_removed_breakpoint): Clear pending_is_breakpoint.
11214 (linux_set_resume_request, linux_queue_one_thread)
11215 (resume_status_pending_p): New functions.
11216 (linux_continue_one_thread): Use process->resume.
11217 (linux_resume): Only resume threads if there are no pending events.
11218 * linux-low.h (struct process_info): Add resume request
11219 pointer.
11220
2a68b70e
DJ
112212004-01-30 Daniel Jacobowitz <drow@mvista.com>
11222
11223 * regcache.c (new_register_cache): Clear the allocated register
11224 buffer. Suggested by Atsushi Nemoto <anemo@mba.ocn.ne.jp>.
11225
64386c31
DJ
112262003-10-13 Daniel Jacobowitz <drow@mvista.com>
11227
11228 * linux-low.c (linux_resume): Take a struct thread_resume *
11229 argument.
11230 (linux_wait): Update call.
11231 (resume_ptr): New static variable.
11232 (linux_continue_one_thread): Renamed from
11233 linux_continue_one_process. Use resume_ptr.
11234 (linux_resume): Use linux_continue_one_thread.
11235 * server.c (handle_v_cont, handle_v_requests): New functions.
11236 (myresume): New function.
11237 (main): Handle 'v' case.
11238 * target.h (struct thread_resume): New type.
11239 (struct target_ops): Change argument of "resume" to struct
11240 thread_resume *.
11241 (myresume): Delete macro.
11242
c938e9b0
L
112432003-08-08 H.J. Lu <hongjiu.lu@intel.com>
11244
11245 * Makefile.in (install-only): Create dest dir. Support DESTDIR.
11246 (uninstall): Support DESTDIR.
11247
7f313d07
BC
11248Mon Jul 21 20:09:34 UTC 2003 Brendan Conoboy <blc@redhat.com>
11249
11250 * configure.srv: Add xscale*linux copy of arm*linux entry.
11251
3b2fc2ea
DJ
112522003-07-24 Daniel Jacobowitz <drow@mvista.com>
11253
11254 * linux-arm-low.c (arm_reinsert_addr): New function.
11255 (the_low_target): Add arm_reinsert_addr.
11256
1c0a559e
MK
112572003-07-08 Mark Kettenis <kettenis@gnu.org>
11258
11259 * mem-break.c: Remove whitespace at end of file.
11260
43d5792c
DJ
112612003-06-28 Daniel Jacobowitz <drow@mvista.com>
11262
11263 * configure.in: Check whether we need to prototype strerror.
11264 * server.h: Optionally prototype strerror.
11265 * gdbreplay.c (perror_with_name): Use strerror.
11266 * linux-low.c (linux_attach_lwp): Use strerror.
11267 * utils.c (perror_with_name): Use strerror.
11268 * config.in, configure: Regenerated.
11269
c8a86edf
DJ
112702003-06-28 Daniel Jacobowitz <drow@mvista.com>
11271
11272 * linux-sh-low.c (sh_regmap): Fix FP register offsets, reported by
11273 SUGIOKA Toshinobu <sugioka@itonet.co.jp>.
11274
73d37363
DJ
112752003-06-20 Daniel Jacobowitz <drow@mvista.com>
11276
11277 * Makefile.in (SFILES): Update.
11278 * low-hppabsd.c, low-lynx.c, low-nbsd.c, low-sim.c, low-sparc.c,
11279 low-sun3.c: Remove files.
11280
6ad8ae5c
DJ
112812003-06-17 Daniel Jacobowitz <drow@mvista.com>
11282
11283 * linux-low.c: Move comment to linux_thread_alive where it belonged.
11284 (linux_detach_one_process, linux_detach): New functions.
11285 (linux_target_ops): Add linux_detach.
11286 * server.c (main): Handle 'D' packet.
11287 * target.h (struct target_ops): Add "detach" member.
11288 (detach_inferior): Define.
11289
1581182a
MK
112902003-06-13 Mark Kettenis <kettenis@gnu.org>
11291
11292 From Kelley Cook <kelleycook@wideopenwest.com>:
11293 * configure.srv: Accept i[34567]86 variants.
11294
e5379b03
DJ
112952003-06-05 Daniel Jacobowitz <drow@mvista.com>
11296
11297 * linux-low.c (linux_wait_for_event): Correct comment typos.
11298 (linux_resume_one_process): Call check_removed_breakpoint.
11299 (linux_send_signal): New function.
11300 (linux_target_ops): Add linux_send_signal.
11301 * remote-utils.c (putpkt, input_interrupt): Use send_signal instead
11302 of kill.
11303 * target.h (struct target_ops): Add send_signal.
11304
2ff29de4
JB
113052003-05-29 Jim Blandy <jimb@redhat.com>
11306
11307 * linux-low.c (usr_store_inferior_registers): Transfer buf in
11308 PTRACE_XFER_TYPE-sized chunks, not int-sized chunks. Otherwise,
11309 if 'int' is smaller than PTRACE_XFER_TYPE, you end up throwing
11310 away part of the register's value.
11311
254787d4
DJ
113122003-03-26 Daniel Jacobowitz <drow@mvista.com>
11313
11314 * linux-low.c (linux_create_inferior): Use __SIGRTMIN.
11315 (linux_wait_for_event, linux_init_signals): Likewise.
11316
94e10508
DJ
113172003-03-17 Daniel Jacobowitz <drow@mvista.com>
11318
11319 * configure.in: Check for stdlib.h.
11320 * configure: Regenerated.
11321 * config.in: Regenerated.
11322
4c0711e0
DJ
113232003-01-04 Andreas Schwab <schwab@suse.de>
11324
11325 * linux-m68k-low.c (m68k_num_regs): Define to 29 instead of 31.
11326
ef66e766
AC
113272003-01-02 Andrew Cagney <ac131313@redhat.com>
11328
11329 * Makefile.in: Remove obsolete code.
11330
a1358604
DJ
113312002-11-20 Daniel Jacobowitz <drow@mvista.com>
11332
11333 * linux-s390-low.c (s390_regmap): Check GPR_SIZE instead of
11334 defined(PT_FPR0_HI).
11335
23ce3b1c
DJ
113362002-11-17 Stuart Hughes <seh@zee2.com>
11337
11338 * linux-arm-low.c (arm_num_regs): Increase.
11339 (arm_regmap): Include status register.
11340
113412002-11-17 Daniel Jacobowitz <drow@mvista.com>
11342
11343 * linux-low.c (register_addr): Remove incorrect -1 check.
11344
a9fa9f7d
DJ
113452002-08-29 Daniel Jacobowitz <drow@mvista.com>
11346
11347 * linux-low.c (linux_create_inferior): Call setpgid. Return
11348 the new PID.
11349 (unstopped_p, linux_signal_pid): Remove.
11350 (linux_target_ops): Remove linux_signal_pid.
11351 * remote-utils.c (putpkt, input_interrupt): Use signal_pid
11352 global instead of target method.
11353 * target.h (struct target_ops): Remove signal_pid. Update comment
11354 for create_inferior.
11355 * server.c (signal_pid): New variable.
11356 (create_inferior): Set signal_pid. Block SIGTTOU and SIGTTIN in
4b8dad4a 11357 gdbserver. Set the child to be the foreground process group.
a9fa9f7d
DJ
11358 (attach_inferior): Set signal_pid.
11359
17574093
DJ
113602002-08-23 Daniel Jacobowitz <drow@mvista.com>
11361
11362 * ChangeLog: New file, with entries from gdb/ChangeLog after GDB 5.2.
11363
113642002-08-20 Jim Blandy <jimb@redhat.com>
11365
11366 * Makefile.in (LDFLAGS): Allow the configure script to establish a
11367 default for this.
11368
113692002-08-01 Andrew Cagney <cagney@redhat.com>
11370
11371 * Makefile.in: Make chill references obsolete.
11372
113732002-07-24 Kevin Buettner <kevinb@redhat.com>
11374
11375 * configure.in (unistd.h): Add to AC_CHECK_HEADERS list.
11376 * configure: Regenerate.
11377 * config.in: Regenerate.
11378
113792002-07-09 David O'Brien <obrien@FreeBSD.org>
11380
11381 * gdbreplay.c (stdlib.h, unistd.h): Conditionaly include.
11382 (perror_with_name, remote_close, remote_open, expect, play): Static.
11383
113842002-07-04 Michal Ludvig <mludvig@suse.cz>
11385
4b8dad4a 11386 * linux-x86-64-low.c (x86_64_regmap): Make it an array of
17574093
DJ
11387 byte offsets instead of an array of indexes.
11388 (x86_64_store_gregset, x86_64_store_fpregset): Parameter made const.
11389
113902002-06-13 Daniel Jacobowitz <drow@mvista.com>
11391
11392 * regcache.c: Add comment.
11393
113942002-06-11 Daniel Jacobowitz <drow@mvista.com>
11395
11396 * thread-db.c: New file.
11397 * proc-service.c: New file.
11398 * acinclude.m4: New file.
11399 * Makefile.in: Add GDBSERVER_LIBS, gdb_proc_service_h,
11400 proc-service.o, and thread-db.o.
11401 (linux-low.o): Add USE_THREAD_DB.
11402 * acconfig.h: Add HAVE_PRGREGSET_T, HAVE_PRFPREGSET_T,
11403 HAVE_LWPID_T, HAVE_PSADDR_T, and PRFPREGSET_T_BROKEN.
11404 * aclocal.m4: Regenerated.
11405 * config.in: Regenerated.
11406 * configure: Regenerated.
11407 * configure.in: Check for proc_service.h, sys/procfs.h,
11408 thread_db.h, and linux/elf.h headrs.
11409 Check for lwpid_t, psaddr_t, prgregset_t, prfpregset_t, and
11410 PRFPREGSET_T_BROKEN. Introduce srv_thread_depfiles and USE_THREAD_DB.
11411 Check for -lthread_db and thread support.
11412 * configure.srv: Enable thread_db support for ARM, i386, MIPS,
11413 PowerPC, and SuperH.
11414 * i387-fp.c: Constify arguments.
11415 * i387-fp.h: Likewise.
11416 * inferiors.c: (struct thread_info): Renamed from
11417 `struct inferior_info'. Remove PID member. Use generic inferior
11418 list header. All uses updated.
11419 (inferiors, signal_pid): Removed.
11420 (all_threads): New variable.
11421 (get_thread): Define.
11422 (add_inferior_to_list): New function.
11423 (for_each_inferior): New function.
11424 (change_inferior_id): New function.
11425 (add_inferior): Removed.
11426 (remove_inferior): New function.
11427 (add_thread): New function.
11428 (free_one_thread): New function.
11429 (remove_thread): New function.
11430 (clear_inferiors): Use for_each_inferior and free_one_thread.
11431 (find_inferior): New function.
11432 (find_inferior_id): New function.
11433 (inferior_target_data): Update argument type.
11434 (set_inferior_target_data): Likewise.
11435 (inferior_regcache_data): Likewise.
11436 (set_inferior_regcache_data): Likewise.
11437 * linux-low.c (linux_bp_reinsert): Remove.
11438 (all_processes, stopping_threads, using_thrads)
11439 (struct pending_signals, debug_threads, pid_of): New.
11440 (inferior_pid): Replace with macro.
11441 (struct inferior_linux_data): Remove.
11442 (get_stop_pc, add_process): New functions.
11443 (linux_create_inferior): Restore SIGRTMIN+1 before calling exec.
11444 Use add_process and add_thread.
11445 (linux_attach_lwp): New function, based on old linux_attach. Use
11446 add_process and add_thread. Set stop_expected for new threads.
11447 (linux_attach): New function.
11448 (linux_kill_one_process): New function.
11449 (linux_kill): Kill all LWPs.
11450 (linux_thread_alive): Use find_inferior_id.
11451 (check_removed_breakpoints, status_pending_p): New functions.
11452 (linux_wait_for_process): Renamed from linux_wait_for_one_inferior.
11453 Update. Use WNOHANG. Wait for cloned processes also. Update process
11454 struct for the found process.
11455 (linux_wait_for_event): New function.
11456 (linux_wait): Use it. Support LWPs.
11457 (send_sigstop, wait_for_sigstop, stop_all_processes)
11458 (linux_resume_one_process, linux_continue_one_process): New functions.
11459 (linux_resume): Support LWPs.
11460 (REGISTER_RAW_SIZE): Remove.
11461 (fetch_register): Use register_size instead. Call supply_register.
11462 (usr_store_inferior_registers): Likewise. Call collect_register.
11463 Fix recursive case.
11464 (regsets_fetch_inferior_registers): Improve error message.
11465 (regsets_store_inferior_registers): Add debugging.
11466 (linux_look_up_symbols): Call thread_db_init if USE_THREAD_DB.
11467 (unstopped_p, linux_signal_pid): New functions.
11468 (linux_target_ops): Add linux_signal_pid.
11469 (linux_init_signals): New function.
11470 (initialize_low): Call it. Initialize using_threads.
11471 * regcache.c (inferior_regcache_data): Add valid
11472 flag.
11473 (get_regcache): Fetch registers lazily. Add fetch argument
11474 and update all callers.
11475 (regcache_invalidate_one, regcache_invalidate): New
11476 functions.
11477 (new_register_cache): Renamed from create_register_cache.
11478 Return the new regcache.
11479 (free_register_cache): Change argument to a void *.
11480 (registers_to_string, registers_from_string): Call get_regcache
11481 with fetch flag set.
11482 (register_data): Make static. Pass fetch flag to get_regcache.
11483 (supply_register): Call get_regcache with fetch flag clear.
11484 (collect_register): Call get_regcache with fetch flag set.
11485 (collect_register_as_string): New function.
11486 * regcache.h: Update.
11487 * remote-utils.c (putpkt): Flush after debug output and use
11488 stderr.
11489 Handle input interrupts while waiting for an ACK.
11490 (input_interrupt): Use signal_pid method.
11491 (getpkt): Flush after debug output and use stderr.
11492 (outreg): Use collect_register_as_string.
11493 (new_thread_notify, dead_thread_notify): New functions.
11494 (prepare_resume_reply): Check using_threads. Set thread_from_wait
11495 and general_thread.
11496 (look_up_one_symbol): Flush after debug output.
11497 * server.c (step_thread, server_waiting): New variables.
11498 (start_inferior): Don't use signal_pid. Update call to mywait.
11499 (attach_inferior): Update call to mywait.
11500 (handle_query): Handle qfThreadInfo and qsThreadInfo.
11501 (main): Don't fetch/store registers explicitly. Use
11502 set_desired_inferior. Support proposed ``Hs'' packet. Update
11503 calls to mywait.
11504 * server.h: Update.
11505 (struct inferior_list, struct_inferior_list_entry): New.
11506 * target.c (set_desired_inferior): New.
11507 (write_inferior_memory): Constify.
11508 (mywait): New function.
11509 * target.h: Update.
11510 (struct target_ops): New signal_pid method.
11511 (mywait): Removed macro, added prototype.
11512
11513 * linux-low.h (regset_func): Removed.
11514 (regset_fill_func, regset_store_func): New.
11515 (enum regset_type): New.
11516 (struct regset_info): Add type field. Use new operation types.
11517 (struct linux_target_ops): stop_pc renamed to get_pc.
11518 Add decr_pc_after_break and breakpoint_at.
11519 (get_process, get_thread_proess, get_process_thread)
11520 (strut process_info, all_processes, linux_attach_lwp)
11521 (thread_db_init): New.
11522
11523 * linux-arm-low.c (arm_get_pc, arm_set_pc,
11524 arm_breakpoint, arm_breakpoint_len, arm_breakpoint_at): New.
11525 (the_low_target): Add new members.
11526 * linux-i386-low.c (i386_store_gregset, i386_store_fpregset)
11527 (i386_store_fpxregset): Constify.
11528 (target_regsets): Add new kind identifier.
11529 (i386_get_pc): Renamed from i386_stop_pc. Simplify.
11530 (i386_set_pc): Add debugging.
11531 (i386_breakpoint_at): New function.
11532 (the_low_target): Add new members.
11533 * linux-mips-low.c (mips_get_pc, mips_set_pc)
11534 (mips_breakpoint, mips_breakpoint_len, mips_reinsert_addr)
11535 (mips_breakpoint_at): New.
11536 (the_low_target): Add new members.
11537 * linux-ppc-low.c (ppc_get_pc, ppc_set_pc)
11538 (ppc_breakpoint, ppc_breakpoint_len, ppc_breakpoint_at): New.
11539 (the_low_target): Add new members.
11540 * linux-sh-low.c (sh_get_pc, sh_set_pc)
11541 (sh_breakpoint, sh_breakpoint_len, sh_breakpoint_at): New.
11542 (the_low_target): Add new members.
11543 * linux-x86-64-low.c (target_regsets): Add new kind
11544 identifier.
11545
115462002-05-15 Daniel Jacobowitz <drow@mvista.com>
11547
11548 From Martin Pool <mbp@samba.org>:
11549 * server.c (gdbserver_usage): New function.
11550 (main): Call it.
11551
115522002-05-14 Daniel Jacobowitz <drow@mvista.com>
11553
11554 * mem-break.c (reinsert_breakpoint_by_bp): Correct typo
11555 stop_at -> stop_pc.
11556
115572002-05-04 Andrew Cagney <ac131313@redhat.com>
11558
11559 * Makefile.in: Remove obsolete code.
11560
115612002-04-24 Michal Ludvig <mludvig@suse.cz>
11562
11563 * linux-low.c (regsets_fetch_inferior_registers),
11564 (regsets_store_inferior_registers): Removed cast to int from
11565 ptrace() calls.
11566 * regcache.h: Added declaration of struct inferior_info.
11567
115682002-04-20 Daniel Jacobowitz <drow@mvista.com>
11569
11570 * inferiors.c (struct inferior_info): Add regcache_data.
11571 (add_inferior): Call create_register_cache.
11572 (clear_inferiors): Call free_register_cache.
11573 (inferior_regcache_data, set_inferior_regcache_data): New functions.
11574 * regcache.c (struct inferior_regcache_data): New.
11575 (registers): Remove.
11576 (get_regcache): New function.
11577 (create_register_cache, free_register_cache): New functions.
11578 (set_register_cache): Don't initialize the register cache here.
11579 (registers_to_string, registers_from_string, register_data): Call
11580 get_regcache.
11581 * regcache.h: Add prototypes.
11582 * server.h: Likewise.
11583
115842002-04-20 Daniel Jacobowitz <drow@mvista.com>
11585
11586 * mem-break.c: New file.
11587 * mem-break.h: New file.
11588 * Makefile.in: Add mem-break.o rule; update server.h
11589 dependencies.
11590 * inferiors.c (struct inferior_info): Add target_data
11591 member.
11592 (clear_inferiors): Free target_data member if set.
11593 (inferior_target_data, set_inferior_target_data): New functions.
11594 * linux-i386-low.c (i386_breakpoint, i386_breakpoint_len)
11595 (i386_stop_pc, i386_set_pc): New. Add to the_low_target.
11596 * linux-low.c (linux_bp_reinsert): New variable.
11597 (struct inferior_linux_data): New.
11598 (linux_create_inferior): Use set_inferior_target_data.
11599 (linux_attach): Likewise. Call add_inferior.
11600 (linux_wait_for_one_inferior): New function.
11601 (linux_wait): Call it.
11602 (linux_write_memory): Add const.
11603 (initialize_low): Call set_breakpoint_data.
11604 * linux-low.h (struct linux_target_ops): Add breakpoint
11605 handling members.
11606 * server.c (attach_inferior): Remove extra add_inferior
11607 call.
11608 * server.h: Include mem-break.h. Update inferior.c
11609 prototypes.
11610 * target.c (read_inferior_memory)
11611 (write_inferior_memory): New functions.
11612 * target.h (read_inferior_memory)
11613 (write_inferior_memory): Change macros to prototypes.
11614 (struct target_ops): Update comments. Add const to write_memory
11615 definition.
11616
116172002-04-11 Daniel Jacobowitz <drow@mvista.com>
11618
11619 * linux-low.c (usr_store_inferior_registers): Support
11620 registers which are allowed to fail to store.
11621 * linux-low.h (linux_target_ops): Likewise.
11622 * linux-ppc-low.c (ppc_regmap): Support FPSCR.
11623 (ppc_cannot_store_register): FPSCR may not be storable.
11624
116252002-04-09 Daniel Jacobowitz <drow@mvista.com>
11626
11627 * server.h: Include <string.h> if HAVE_STRING_H.
11628 * ChangeLog: Correct paths in last ChangeLog entry.
11629
116302002-04-09 Daniel Jacobowitz <drow@mvista.com>
11631
11632 * linux-low.h: Remove obsolete prototypes.
11633 (struct linux_target_ops): New.
11634 (extern the_low_target): New.
11635 * linux-low.c (num_regs, regmap): Remove declarations.
11636 (register_addr): Use the_low_target explicitly.
11637 (fetch_register): Likewise.
11638 (usr_fetch_inferior_registers): Likewise.
11639 (usr_store_inferior_registers): Likewise.
11640 * linux-arm-low.c (num_regs): Remove.
11641 (arm_num_regs): Define.
11642 (arm_regmap): Renamed from regmap, made static.
11643 (arm_cannot_fetch_register): Renamed from cannot_fetch_register,
11644 made static.
11645 (arm_cannot_store_register): Renamed from cannot_store_register,
11646 made static.
11647 (the_low_target): New.
11648 * linux-i386-low.c (num_regs): Remove.
11649 (i386_num_regs): Define.
11650 (i386_regmap): Renamed from regmap, made static.
11651 (i386_cannot_fetch_register): Renamed from cannot_fetch_register,
11652 made static.
11653 (i386_cannot_store_register): Renamed from cannot_store_register,
11654 made static.
11655 (the_low_target): New.
11656 * linux-ia64-low.c (num_regs): Remove.
11657 (ia64_num_regs): Define.
11658 (ia64_regmap): Renamed from regmap, made static.
11659 (ia64_cannot_fetch_register): Renamed from cannot_fetch_register,
11660 made static.
11661 (ia64_cannot_store_register): Renamed from cannot_store_register,
11662 made static.
11663 (the_low_target): New.
11664 * linux-m68k-low.c (num_regs): Remove.
11665 (m68k_num_regs): Define.
11666 (m68k_regmap): Renamed from regmap, made static.
11667 (m68k_cannot_fetch_register): Renamed from cannot_fetch_register,
11668 made static.
11669 (m68k_cannot_store_register): Renamed from cannot_store_register,
11670 made static.
11671 (the_low_target): New.
11672 * linux-mips-low.c (num_regs): Remove.
11673 (mips_num_regs): Define.
11674 (mips_regmap): Renamed from regmap, made static.
11675 (mips_cannot_fetch_register): Renamed from cannot_fetch_register,
11676 made static.
11677 (mips_cannot_store_register): Renamed from cannot_store_register,
11678 made static.
11679 (the_low_target): New.
11680 * linux-ppc-low.c (num_regs): Remove.
11681 (ppc_num_regs): Define.
11682 (ppc_regmap): Renamed from regmap, made static.
11683 (ppc_cannot_fetch_register): Renamed from cannot_fetch_register,
11684 made static.
11685 (ppc_cannot_store_register): Renamed from cannot_store_register,
11686 made static.
11687 (the_low_target): New.
11688 * linux-s390-low.c (num_regs): Remove.
11689 (s390_num_regs): Define.
11690 (s390_regmap): Renamed from regmap, made static.
11691 (s390_cannot_fetch_register): Renamed from cannot_fetch_register,
11692 made static.
11693 (s390_cannot_store_register): Renamed from cannot_store_register,
11694 made static.
11695 (the_low_target): New.
11696 * linux-sh-low.c (num_regs): Remove.
11697 (sh_num_regs): Define.
11698 (sh_regmap): Renamed from regmap, made static.
11699 (sh_cannot_fetch_register): Renamed from cannot_fetch_register,
11700 made static.
11701 (sh_cannot_store_register): Renamed from cannot_store_register,
11702 made static.
11703 (the_low_target): New.
11704 * linux-x86-64-low.c (x86_64_regmap): Renamed from regmap.
11705 (the_low_target): New.
11706
117072002-04-09 Daniel Jacobowitz <drow@mvista.com>
11708
11709 * Makefile.in: Add stamp-h target.
11710 * configure.in: Create stamp-h.
11711 * configure: Regenerated.
11712
117132002-04-09 Daniel Jacobowitz <drow@mvista.com>
11714
11715 * inferiors.c: New file.
11716 * target.c: New file.
11717 * target.h: New file.
11718 * Makefile.in: Add target.o and inferiors.o. Update
11719 dependencies.
11720 * linux-low.c (inferior_pid): New static variable,
11721 moved from server.c.
11722 (linux_create_inferior): Renamed from create_inferior.
11723 Call add_inferior. Return 0 on success instead of a PID.
11724 (linux_attach): Renamed from myattach.
11725 (linux_kill): Renamed from kill_inferior. Call clear_inferiors ().
11726 (linux_thread_alive): Renamed from mythread_alive.
11727 (linux_wait): Renamed from mywait. Call clear_inferiors () if the
11728 child dies.
11729 (linux_resume): Renamed from myresume. Add missing ``return 0''.
11730 (regsets_store_inferior_registers): Correct error message.
11731 Add missing ``return 0''.
11732 (linux_fetch_registers): Renamed from fetch_inferior_registers.
11733 (linux_store_registers): Renamed from store_inferior_registers.
11734 (linux_read_memory): Renamed from read_inferior_memory.
11735 (linux_write_memory): Renamed from write_inferior_memory.
11736 (linux_target_ops): New structure.
11737 (initialize_low): Call set_target_ops ().
11738 * remote-utils.c (unhexify): New function.
11739 (hexify): New function.
11740 (input_interrupt): Send signals to ``signal_pid''.
11741 * server.c (inferior_pid): Remove.
11742 (start_inferior): Update create_inferior call.
11743 (attach_inferior): Call add_inferior.
11744 (handle_query): New function.
11745 (main): Call handle_query for `q' packets.
11746 * server.h: Include "target.h". Remove obsolete prototypes.
11747 Add prototypes for "inferiors.c", "target.c", hexify, and unhexify.
11748
117492002-04-09 Daniel Jacobowitz <drow@mvista.com>
11750
11751 * Makefile.in: Add WARN_CFLAGS. Update configury
11752 dependencies.
11753 * configure.in: Check for <string.h>
11754 * configure: Regenerate.
11755 * config.in: Regenerate.
11756 * gdbreplay.c: Include needed system headers.
11757 (remote_open): Remove strchr prototype.
11758 * linux-low.h: Correct #ifdef to HAVE_LINUX_USRREGS.
11759 * regcache.c (supply_register): Change buf argument to const void *.
11760 (supply_register_by_name): Likewise.
11761 (collect_register): Change buf argument to void *.
11762 (collect_register_by_name): Likewise.
11763 * regcache.h: Add missing prototypes.
11764 * remote-utils.c: Include <arpa/inet.h> for inet_ntoa.
11765 * server.c (handle_query): New function.
11766 (attached): New static variable, moved out of main.
11767 (main): Quiet longjmp clobber warnings.
11768 * server.h: Add ATTR_NORETURN and ATTR_FORMAT. Update prototypes.
11769 * utils.c (error): Remove NORETURN.
11770 (fatal): Likewise.