Linux gdbserver confused when event randomization picks process exit event
[deliverable/binutils-gdb.git] / gdb / gdbserver / ChangeLog
CommitLineData
00db26fa
PA
12015-08-06 Pedro Alves <palves@redhat.com>
2
3 * linux-low.c (add_lwp): Set waitstatus to TARGET_WAITKIND_IGNORE.
4 (linux_thread_alive): Use lwp_is_marked_dead.
5 (extended_event_reported): Delete.
6 (linux_wait_1): Check if waitstatus is TARGET_WAITKIND_IGNORE
7 instead of extended_event_reported.
8 (mark_lwp_dead): Don't set the 'dead' flag. Store the waitstatus
9 as well.
10 (lwp_is_marked_dead): New function.
11 (lwp_running): Use lwp_is_marked_dead.
12 * linux-low.h: Delete 'dead' field, and update 'waitstatus's
13 comment.
14
ad071a30
PA
152015-08-06 Pedro Alves <palves@redhat.com>
16
17 * linux-low.c (linux_wait_1): Move fork event output out of the
18 !report_to_gdb check. Pass event_child->waitstatus to
19 target_waitstatus_to_string instead of ourstatus.
20
524b57e6
YQ
212015-08-04 Yao Qi <yao.qi@linaro.org>
22
23 * linux-aarch64-low.c (aarch64_supports_tracepoints): Return 0
24 if current_thread is 32 bit.
25
6085d6f6
YQ
262015-08-04 Yao Qi <yao.qi@linaro.org>
27
28 * linux-aarch64-low.c (aarch64_supports_z_point_type): Return
29 0 for Z_PACKET_SW_BP if it may be used in multi-arch debugging.
30 * server.c (extended_protocol): Remove "static".
31 * server.h (extended_protocol): Declare it.
32
8a7e4587
YQ
332015-08-04 Yao Qi <yao.qi@linaro.org>
34
35 * linux-aarch64-low.c (aarch64_get_pc): Get PC register on
36 both aarch64 and aarch32.
37 (aarch64_set_pc): Likewise.
38
3b53ae99
YQ
392015-08-04 Yao Qi <yao.qi@linaro.org>
40
41 * configure.srv (case aarch64*-*-linux*): Append arm-with-neon.o
42 to srv_regobj and append arm-core.xml arm-vfpv3.xml and
43 arm-with-neon.xml to srv_xmlfiles.
44 * linux-aarch64-low.c: Include linux-aarch32-low.h.
45 (is_64bit_tdesc): New function.
46 (aarch64_linux_read_description): New function.
47 (aarch64_arch_setup): Call aarch64_linux_read_description.
48 (regs_info): Rename to regs_info_aarch64.
49 (aarch64_regs_info): Return right regs_info.
50 (initialize_low_arch): Call initialize_low_arch_aarch32.
51
bd9e6534
YQ
522015-08-04 Yao Qi <yao.qi@linaro.org>
53
54 * configure.srv (srv_tgtobj): Add linux-aarch32-low.o.
55 * linux-aarch32-low.c: New file.
56 * linux-aarch32-low.h: New file.
57 * linux-arm-low.c (arm_fill_gregset): Move it to
58 linux-aarch32-low.c.
59 (arm_store_gregset): Likewise.
60 (arm_fill_vfpregset): Call arm_fill_vfpregset_num
61 (arm_store_vfpregset): Call arm_store_vfpregset_num.
62 (arm_arch_setup): Check if PTRACE_GETREGSET works.
63 (regs_info): Rename to regs_info_arm.
64 (arm_regs_info): Return regs_info_aarch32 if
65 have_ptrace_getregset is 1 and target description is
66 arm_with_neon or arm_with_vfpv3.
67 (initialize_low_arch): Don't call init_registers_arm_with_neon.
68 Call initialize_low_arch_aarch32 instead.
69
ded48a5e
YQ
702015-08-04 Yao Qi <yao.qi@linaro.org>
71
72 * linux-x86-low.c (have_ptrace_getregset): Move it to ...
73 * linux-low.c: ... here.
74 * linux-low.h (have_ptrace_getregset): Declare it.
75
96e9210f
PA
762015-08-04 Pedro Alves <palves@redhat.com>
77
78 * thread-db.c (struct thread_db): Use new typedefs.
79 (try_thread_db_load_1): Define local TDB_DLSYM macro and use it in
80 CHK calls.
81 (disable_thread_event_reporting): Cast result of dlsym to
82 destination function pointer type.
83 (thread_db_mourn): Use td_ta_delete_ftype.
84
af60a1ef
SL
852015-08-03 Sandra Loosemore <sandra@codesourcery.com>
86
87 * linux-nios2-low.c (NIOS2_BREAKPOINT): Conditionalize for
88 arch variant.
89 (CDX_BREAKPOINT): Define for R2.
90 (nios2_breakpoint_at): Check for CDX_BREAKPOINT when R2.
91 (the_low_target): Add comments.
92
e8b41681
YQ
932015-07-30 Yao Qi <yao.qi@linaro.org>
94
95 * linux-arm-low.c (arm_hwcap): Remove it.
96 (arm_read_description): New local variable arm_hwcap. Don't
97 set arm_hwcap to zero.
98
89abb039
YQ
992015-07-30 Yao Qi <yao.qi@linaro.org>
100
101 * linux-arm-low.c (arm_fill_wmmxregset): Don't use arm_hwcap.
102 Use regcache->tdesc instead.
103 (arm_store_wmmxregset): Likewise.
104 (arm_fill_vfpregset): Likewise.
105 (arm_store_vfpregset): Likewise.
106
deca266c
YQ
1072015-07-30 Yao Qi <yao.qi@linaro.org>
108
109 * linux-arm-low.c: Include arch/arm.h.
110 (arm_fill_gregset): Don't use arm_num_regs and arm_regmap.
111 (arm_store_gregset): Likewise.
112
aa58a496
SM
1132015-07-29 Simon Marchi <simon.marchi@ericsson.com>
114
115 * linux-mips-low.c (mips_linux_prepare_to_resume): Add NULL as
116 ptrace's 4th parameter.
117
50904b25
YQ
1182015-07-27 Yao Qi <yao.qi@linaro.org>
119
120 * configure.srv (case aarch64*-*-linux*): Don't set
121 srv_linux_usrregs.
122
5826e159
PA
1232015-07-24 Pedro Alves <palves@redhat.c: Likewise.om>
124
125 * linux-aarch64-low.c: Include nat/gdb_ptrace.h instead of
126 sys/ptrace.h.
127 * linux-arm-low.c: Likewise.
128 * linux-cris-low.c: Likewise.
129 * linux-crisv32-low.c: Likewise.
130 * linux-low.c: Likewise.
131 * linux-m68k-low.c: Likewise.
132 * linux-mips-low.c: Likewise.
133 * linux-nios2-low.c: Likewise.
134 * linux-s390-low.c: Likewise.
135 * linux-sparc-low.c: Likewise.
136 * linux-tic6x-low.c: Likewise.
137 * linux-tile-low.c: Likewise.
138 * linux-x86-low.c: Likewise.
139
54019719
PA
1402015-07-24 Pedro Alves <palves@redhat.com>
141
142 * config.in: Regenerate.
143 * configure: Regenerate.
144
eb7aa561
PA
1452015-07-24 Pedro Alves <palves@redhat.com>
146
147 * acinclude.m4: Include ../ptrace.m4.
148 * configure.ac: Call GDB_AC_PTRACE.
149 * config.in, configure: Regenerate.
150
55d7b841
YQ
1512015-07-24 Yao Qi <yao.qi@linaro.org>
152
153 * linux-low.c (linux_create_inferior): Remove setting to
154 proc->priv->new_inferior.
155 (linux_attach): Likewise.
156 (linux_low_filter_event): Likewise.
157 * linux-low.h (struct process_info_private) <new_inferior>: Remove.
158
c06cbd92
YQ
1592015-07-24 Yao Qi <yao.qi@linaro.org>
160
161 * linux-low.c (linux_arch_setup): New function.
162 (linux_low_filter_event): If proc->tdesc is NULL and
163 proc->attached is true, call the_low_target.arch_setup.
164 Otherwise, keep status pending, and return.
165 (linux_resume_one_lwp_throw): Don't call get_pc if
166 thread->while_stepping isn't NULL. Don't call
167 get_thread_regcache if proc->tdesc is NULL.
168 (need_step_over_p): Return 0 if proc->tdesc is NULL.
169 (linux_target_ops): Install arch_setup.
170 * server.c (start_inferior): Call the_target->arch_setup.
171 * target.h (struct target_ops) <arch_setup>: New field.
172 (target_arch_setup): New marco.
173 * lynx-low.c (lynx_target_ops): Update.
174 * nto-low.c (nto_target_ops): Update.
175 * spu-low.c (spu_target_ops): Update.
176 * win32-low.c (win32_target_ops): Update.
177
5ae3ebba
YQ
1782015-07-24 Yao Qi <yao.qi@linaro.org>
179
180 * linux-low.c (linux_add_process): Don't set
181 proc->priv->new_inferior.
182 (linux_create_inferior): Set proc->priv->new_inferior to 1.
183 (linux_attach): Likewise.
184
eb97750b
YQ
1852015-07-24 Yao Qi <yao.qi@linaro.org>
186
187 * server.c (start_inferior): Code refactor.
188
51aee833
YQ
1892015-07-24 Yao Qi <yao.qi@linaro.org>
190
191 * server.c (process_serial_event): Set general_thread.
192
af1b22f3
YQ
1932015-07-21 Yao Qi <yao.qi@linaro.org>
194
195 * linux-aarch64-low.c (aarch64_arch_setup): Remove code and call
196 aarch64_linux_get_debug_reg_capacity.
197
554717a3
YQ
1982015-07-17 Yao Qi <yao.qi@linaro.org>
199
200 * Makefile.in (aarch64-linux-hw-point.o): New rule.
201 * configure.srv (srv_tgtobj): Append aarch64-linux-hw-point.o.
202 * linux-aarch64-low.c: Include nat/aarch64-linux-hw-point.h.
203 (AARCH64_HBP_MAX_NUM): Move to nat/aarch64-linux-hw-point.h.
204 (AARCH64_HWP_MAX_NUM, AARCH64_HBP_ALIGNMENT): Likewise.
205 (AARCH64_HWP_ALIGNMENT): Likewise.
206 (AARCH64_HWP_MAX_LEN_PER_REG): Likewise.
207 (AARCH64_DEBUG_NUM_SLOTS, AARCH64_DEBUG_ARCH): Likewise.
208 (aarch64_num_bp_regs, aarch64_num_wp_regs): Likewise.
209 (AARCH64_DEBUG_ARCH_V8, DR_MARK_ALL_CHANGED): Likewise.
210 (DR_MARK_N_CHANGED, DR_CLEAR_CHANGED): Likewise.
211 (DR_HAS_CHANGED, DR_N_HAS_CHANGE): Likewise.
212 (struct aarch64_debug_reg_state): Likewise.
213 (struct arch_lwp_info): Likewise.
214 (aarch64_align_watchpoint): Likewise.
215 (DR_CONTROL_ENABLED, DR_CONTROL_LENGTH): Likewise.
216 (aarch64_watchpoint_length): Likewise.
217 (aarch64_point_encode_ctrl_reg): Likewise
218 (aarch64_point_is_aligned): Likewise.
219 (aarch64_align_watchpoint): Likewise.
220 (aarch64_linux_set_debug_regs):
221 (aarch64_dr_state_insert_one_point): Likewise.
222 (aarch64_dr_state_remove_one_point): Likewise.
223 (aarch64_handle_breakpoint): Likewise.
224 (aarch64_handle_aligned_watchpoint): Likewise.
225 (aarch64_handle_unaligned_watchpoint): Likewise.
226 (aarch64_handle_watchpoint): Likewise.
227
c67ca4de
YQ
2282015-07-17 Yao Qi <yao.qi@linaro.org>
229
230 * linux-aarch64-low.c (aarch64_handle_breakpoint): Add argument state
231 and don't aarch64_get_debug_reg_state. All callers update.
232 (aarch64_handle_aligned_watchpoint): Likewise.
233 (aarch64_handle_unaligned_watchpoint): Likewise.
234 (aarch64_handle_watchpoint): Likewise.
235 (aarch64_insert_point): Call aarch64_get_debug_reg_state earlier.
236 (aarch64_remove_point): Likewise.
237
25abf979
YQ
2382015-07-17 Yao Qi <yao.qi@linaro.org>
239
240 * linux-aarch64-low.c (aarch64_show_debug_reg_state): Use
241 debug_printf.
242 (aarch64_handle_unaligned_watchpoint): Likewise.
243
db1ff28b
JK
2442015-07-15 Jan Kratochvil <jan.kratochvil@redhat.com>
245
246 Revert the previous 3 commits:
247 Move gdb_regex* to common/
248 Move linux_find_memory_regions_full & co.
249 gdbserver build-id attribute generator
250
700ca40f
JK
2512015-07-15 Aleksandar Ristovski <aristovski@qnx.com
252 Jan Kratochvil <jan.kratochvil@redhat.com>
253
254 gdbserver build-id attribute generator.
255 * linux-low.c (nat/linux-maps.h, search.h, rsp-low.h): Include.
256 (ElfXX_Ehdr, ElfXX_Phdr, ElfXX_Nhdr): New.
257 (ELFXX_FLD, ELFXX_SIZEOF, ELFXX_ROUNDUP, BUILD_ID_INVALID): New.
258 (find_phdr): New.
259 (get_dynamic): Use find_pdhr to traverse program headers.
260 (struct mapping_entry, mapping_entry_s, free_mapping_entry_vec)
261 (compare_mapping_entry_range, struct find_memory_region_callback_data)
262 (read_build_id, find_memory_region_callback, lrfind_mapping_entry)
263 (get_hex_build_id): New.
264 (linux_qxfer_libraries_svr4): Add optional build-id attribute
265 to reply XML document.
266
9904185c
JK
2672015-07-15 Aleksandar Ristovski <aristovski@qnx.com
268 Jan Kratochvil <jan.kratochvil@redhat.com>
269
270 * target.c: Include target/target-utils.h and fcntl.h.
271 (target_fileio_read_stralloc_1_pread, target_fileio_read_stralloc_1)
272 (target_fileio_read_stralloc): New functions.
273
6e5b4429
JK
2742015-07-15 Jan Kratochvil <jan.kratochvil@redhat.com>
275
276 * Makefile.in (OBS): Add gdb_regex.o.
277 (gdb_regex.o): New.
278 * config.in: Rebuilt.
279 * configure: Rebuilt.
280
ddc98fbf
JK
2812015-07-15 Aleksandar Ristovski <aristovski@qnx.com
282 Jan Kratochvil <jan.kratochvil@redhat.com>
283
284 Create empty nat/linux-maps.[ch] and common/target-utils.[ch].
285 * Makefile.in (OBS): Add target-utils.o.
286 (linux-maps.o, target-utils.o): New.
287 * configure.srv (srv_linux_obj): Add linux-maps.o.
288
e57bb7a0
PL
2892015-07-15 Pierre Langlois <pierre.langlois@arm.com>
290
291 * linux-aarch64-low.c (aarch64_supports_range_stepping): New
292 function, return 1.
293 (the_low_target): Install it.
294
586b02a9
PA
2952015-07-14 Pedro Alves <palves@redhat.com>
296
297 * linux-low.c (kill_wait_lwp): Don't assert if waitpid fails.
298 Instead, ignore ECHILD, and throw an error for other errnos.
299
58c1b36c
PA
3002015-07-10 Pedro Alves <palves@redhat.com>
301
302 * event-loop.c (struct callback_event) <data>: Change type to
303 gdb_client_data instance instead of gdb_client_data pointer.
304 (append_callback_event): Adjust.
305
421530db
PL
3062015-07-10 Pierre Langlois <pierre.langlois@arm.com>
307
308 * linux-aarch64-low.c: Add comments for each linux_target_ops
309 method. Remove comments already covered in target_ops and
310 linux_target_ops definitions.
311 (the_low_target): Add comments for each unimplemented method.
312
c2d65f38
YQ
3132015-07-09 Yao Qi <yao.qi@linaro.org>
314
315 * linux-aarch64-low.c (aarch64_regmap): Remove.
316 (aarch64_usrregs_info): Remove.
317 (regs_info): Set field usrregs to NULL.
318
b20a6524
MM
3192015-07-02 Markus Metzger <markus.t.metzger@intel.com>
320
321 * linux-low.c: Include "rsp-low.h"
322 (linux_low_encode_pt_config, linux_low_encode_raw): New.
323 (linux_low_read_btrace): Support BTRACE_FORMAT_PT.
324 (linux_low_btrace_conf): Support BTRACE_FORMAT_PT.
325 (handle_btrace_enable_pt): New.
326 (handle_btrace_general_set): Support "pt".
327 (handle_btrace_conf_general_set): Support "pt:size".
328
96c97461
PL
3292015-06-29 Pierre Langlois <pierre.langlois@arm.com>
330
331 * linux-aarch64-low.c (aarch64_supports_z_point_type): Enable for
332 Z_PACKET_SW_BP.
333
37d66942
PL
3342015-06-29 Pierre Langlois <pierre.langlois@arm.com>
335
336 * linux-aarch64-low.c: Remove comment about endianness.
337 (aarch64_breakpoint): Change type to gdb_byte[]. Set to "brk #0".
338 (aarch64_breakpoint_at): Change type of insn to gdb_byte[]. Use
339 memcmp.
340
dc06243f
GB
3412015-06-24 Gary Benson <gbenson@redhat.com>
342
343 * linux-i386-ipa.c (stdint.h): Do not include.
344 * lynx-i386-low.c (stdint.h): Likewise.
345 * lynx-ppc-low.c (stdint.h): Likewise.
346 * mem-break.c (stdint.h): Likewise.
347 * thread-db.c (stdint.h): Likewise.
348 * tracepoint.c (stdint.h): Likewise.
349 * win32-low.c (stdint.h): Likewise.
350
124e13d9
SM
3512015-06-18 Simon Marchi <simon.marchi@ericsson.com>
352
353 * server.c (write_qxfer_response): Update call to
354 remote_escape_output.
355
909c2cda
JK
3562015-06-15 Aleksandar Ristovski <aristovski@qnx.com
357 Jan Kratochvil <jan.kratochvil@redhat.com>
358
359 Merge multiple hex conversions.
360 * gdbreplay.c (tohex): Rename to 'fromhex'.
361 (logchar): Use fromhex.
362
24c05f46
JK
3632015-06-10 Jan Kratochvil <jan.kratochvil@redhat.com>
364
365 * server.c (handle_qxfer_libraries): Set `version' attribute for
366 <library-list>.
367
14d2069a
GB
3682015-06-10 Gary Benson <gbenson@redhat.com>
369
370 * target.h (struct target_ops) <multifs_open>: New field.
371 <multifs_unlink>: Likewise.
372 <multifs_readlink>: Likewise.
373 * linux-low.c (nat/linux-namespaces.h): New include.
374 (linux_target_ops): Initialize the_target->multifs_open,
375 the_target->multifs_unlink and the_target->multifs_readlink.
376 * hostio.h (hostio_handle_new_gdb_connection): New declaration.
377 * hostio.c (hostio_fs_pid): New static variable.
378 (hostio_handle_new_gdb_connection): New function.
379 (handle_setfs): Likewise.
380 (handle_open): Use the_target->multifs_open as appropriate.
381 (handle_unlink): Use the_target->multifs_unlink as appropriate.
382 (handle_readlink): Use the_target->multifs_readlink as
383 appropriate.
384 (handle_vFile): Handle vFile:setfs packets.
385 * server.c (handle_query): Call hostio_handle_new_gdb_connection
386 after target_handle_new_gdb_connection.
387
4b8b5e72
GB
3882015-06-10 Gary Benson <gbenson@redhat.com>
389
390 * configure.ac (AC_CHECK_FUNCS): Add setns.
391 * config.in: Regenerate.
392 * configure: Likewise.
393 * Makefile.in (SFILES): Add nat/linux-namespaces.c.
394 (linux-namespaces.o): New rule.
395 * configure.srv (srv_linux_obj): Add linux-namespaces.o.
396
3ac2e371
GB
3972015-06-09 Gary Benson <gbenson@redhat.com>
398
399 * hostio.c (handle_open): Process mode argument with
400 fileio_to_host_mode.
401
ca9b78ce
YQ
4022015-06-01 Yao Qi <yao.qi@linaro.org>
403
404 * linux-s390-low.c (PTRACE_GETREGSET, PTRACE_SETREGSET): Remove.
405 * linux-x86-low.c: Likewise.
406
bfacd19d
DB
4072015-05-28 Don Breazeal <donb@codesourcery.com>
408
409 * linux-low.c (handle_extended_wait): Initialize
410 thread_info.last_resume_kind for new fork children.
411
452003ef
PA
4122015-05-15 Pedro Alves <palves@redhat.com>
413
414 * target.h (target_handle_new_gdb_connection): Rewrite using if
415 wrapped in do/while.
416
1041a03c
JB
4172015-05-14 Joel Brobecker <brobecker@adacore.com>
418
419 * configure.ac: Add prfpregset_t BFD_HAVE_SYS_PROCFS_TYPE check.
420 * configure, config.in: Regenerate.
421 * gdb_proc_service.h [HAVE_PRFPREGSET_T] (prfpregset_t):
422 Declare typedef.
423
c269dbdb
DB
4242015-05-12 Don Breazeal <donb@codesourcery.com>
425
426 * linux-low.c (handle_extended_wait): Handle PTRACE_EVENT_FORK and
427 PTRACE_EVENT_VFORK_DONE.
428 (linux_low_ptrace_options, extended_event_reported): Add vfork
429 events.
430 * remote-utils.c (prepare_resume_reply): New stop reasons "vfork"
431 and "vforkdone" for RSP 'T' Stop Reply Packet.
432 * server.h (report_vfork_events): Declare
433 global variable.
434
3a8a0396
DB
4352015-05-12 Don Breazeal <donb@codesourcery.com>
436
437 * linux-aarch64-low.c (aarch64_linux_new_fork): New function.
438 (the_low_target) <new_fork>: Initialize new member.
439 * linux-arm-low.c (arm_new_fork): New function.
440 (the_low_target) <new_fork>: Initialize new member.
441 * linux-low.c (handle_extended_wait): Call new target function
442 new_fork.
443 * linux-low.h (struct linux_target_ops) <new_fork>: New member.
444 * linux-mips-low.c (mips_add_watchpoint): New function
445 extracted from mips_insert_point.
446 (the_low_target) <new_fork>: Initialize new member.
447 (mips_linux_new_fork): New function.
448 (mips_insert_point): Call mips_add_watchpoint.
449 * linux-x86-low.c (x86_linux_new_fork): New function.
450 (the_low_target) <new_fork>: Initialize new member.
451
de0d863e
DB
4522015-05-12 Don Breazeal <donb@codesourcery.com>
453
454 * linux-low.c (handle_extended_wait): Implement return value,
455 rename argument 'event_child' to 'event_lwp', handle
456 PTRACE_EVENT_FORK, call internal_error for unrecognized event.
457 (linux_low_ptrace_options): New function.
458 (linux_low_filter_event): Call linux_low_ptrace_options,
459 use different argument fo linux_enable_event_reporting,
460 use return value from handle_extended_wait.
461 (extended_event_reported): New function.
462 (linux_wait_1): Call extended_event_reported and set
463 status to report fork events.
464 (linux_write_memory): Add pid to debug message.
465 (reset_lwp_ptrace_options_callback): New function.
466 (linux_handle_new_gdb_connection): New function.
467 (linux_target_ops): Initialize new structure member.
468 * linux-low.h (struct lwp_info) <waitstatus>: New member.
469 * lynx-low.c: Initialize new structure member.
470 * remote-utils.c (prepare_resume_reply): Implement stop reason
471 "fork" for "T" stop message.
472 * server.c (handle_query): Call handle_new_gdb_connection.
473 * server.h (report_fork_events): Declare global flag.
474 * target.h (struct target_ops) <handle_new_gdb_connection>:
475 New member.
476 (target_handle_new_gdb_connection): New macro.
477 * win32-low.c: Initialize new structure member.
478
ddcbc397
DB
4792015-05-12 Don Breazeal <donb@codesourcery.com>
480
481 * mem-break.c (APPEND_TO_LIST): Define macro.
482 (clone_agent_expr): New function.
483 (clone_one_breakpoint): New function.
484 (clone_all_breakpoints): New function.
485 * mem-break.h: Declare new functions.
486
89245bc0
DB
4872015-05-12 Don Breazeal <donb@codesourcery.com>
488
489 * linux-low.c (linux_supports_fork_events): New function.
490 (linux_supports_vfork_events): New function.
491 (linux_target_ops): Initialize new structure members.
492 (initialize_low): Call linux_check_ptrace_features.
493 * lynx-low.c (lynx_target_ops): Initialize new structure
494 members.
495 * server.c (report_fork_events, report_vfork_events):
496 New global flags.
497 (handle_query): Add new features to qSupported packet and
498 response.
499 (captured_main): Initialize new global variables.
500 * target.h (struct target_ops) <supports_fork_events>:
501 New member.
502 <supports_vfork_events>: New member.
503 (target_supports_fork_events): New macro.
504 (target_supports_vfork_events): New macro.
505 * win32-low.c (win32_target_ops): Initialize new structure
506 members.
507
835205d0
GB
5082015-05-12 Gary Benson <gbenson@redhat.com>
509
510 * server.c (handle_qxfer_exec_file): Use current process
511 if annex is empty.
512
21e94bd9
SL
5132015-05-08 Sandra Loosemore <sandra@codesourcery.com>
514
515 * linux-nios2-low.c: Include elf/common.h. Adjust comments.
516 Remove HAVE_PTRACE_GETREGS conditionals.
517 (nios2_regsets): Use PTRACE_GETREGSET and PTRACE_SETREGSET
518 instead of PTRACE_GETREGS and PTRACE_SETREGS.
519
45614f15
YQ
5202015-05-08 Yao Qi <yao.qi@linaro.org>
521
522 * linux-low.c (linux_supports_conditional_breakpoints): New
523 function.
524 (linux_target_ops): Install new target method.
525 * lynx-low.c (lynx_target_ops): Install NULL hook for
526 supports_conditional_breakpoints.
527 * nto-low.c (nto_target_ops): Likewise.
528 * spu-low.c (spu_target_ops): Likewise.
529 * win32-low.c (win32_target_ops): Likewise.
530 * server.c (handle_query): Check
531 target_supports_conditional_breakpoints.
532 * target.h (struct target_ops) <supports_conditional_breakpoints>:
533 New field.
534 (target_supports_conditional_breakpoints): New macro.
535
80ad801e
PA
5362015-05-06 Pedro Alves <palves@redhat.com>
537
538 PR server/18081
539 * server.c (start_inferior): If the process exits, mourn it.
540
819843c7
GB
5412015-04-21 Gary Benson <gbenson@redhat.com>
542
543 * hostio.c (fileio_open_flags_to_host): Factored out to
544 fileio_to_host_openflags in common/fileio.c. Single use
545 updated.
546
a2d5a9d7
MF
5472015-04-17 Max Filippov <jcmvbkbc@gmail.com>
548
549 * linux-xtensa-low.c (xtensa_fill_gregset)
550 (xtensa_store_gregset): Check XCHAL_HAVE_LOOPS instead of
551 XCHAL_HAVE_LOOP.
552
deb44829
MF
5532015-04-17 Max Filippov <jcmvbkbc@gmail.com>
554
555 * linux-xtensa-low.c (xtensa_usrregs_info): Remove.
556 (regs_info): Replace usrregs pointer with NULL.
557
e57f1de3
GB
5582015-04-17 Gary Benson <gbenson@redhat.com>
559
560 * target.h (struct target_ops) <pid_to_exec_file>: New field.
561 * linux-low.c (linux_target_ops): Initialize pid_to_exec_file.
562 * server.c (handle_qxfer_exec_file): New function.
563 (qxfer_packets): Add exec-file entry.
564 (handle_query): Report qXfer:exec-file:read as supported packet.
565
62828379
RN
5662015-04-14 Romain Naour <romain.naour@openwide.fr> (tiny change)
567
568 * linux-low.c (linux_read_offsets): Remove get_thread_lwp.
569
b88bb450
GB
5702015-04-09 Gary Benson <gbenson@redhat.com>
571
572 * hostio-errno.c (errno_to_fileio_error): Remove function.
573 Update caller to use remote_fileio_to_fio_error.
574
c8f4bfdd
YQ
5752015-04-09 Yao Qi <yao.qi@linaro.org>
576
577 * linux-low.c (linux_insert_point): Call
578 insert_memory_breakpoint if TYPE is raw_bkpt_type_sw.
579 (linux_remove_point): Call remove_memory_breakpoint if type is
580 raw_bkpt_type_sw.
581 * linux-x86-low.c (x86_insert_point): Don't call
582 insert_memory_breakpoint.
583 (x86_remove_point): Don't call remove_memory_breakpoint.
584
41f98f02
PA
5852015-04-01 Pedro Alves <palves@redhat.com>
586 Cleber Rosa <crosa@redhat.com>
587
588 * server.c (gdbserver_usage): Reorganize and extend the usage
589 message.
590
2bf6fb9d
PA
5912015-03-24 Pedro Alves <palves@redhat.com>
592
593 * linux-low.c (check_stopped_by_breakpoint): Tweak debug log
594 output. Also dump TRAP_TRACE.
595 (linux_low_filter_event): In debug output, distinguish a
596 resume_stop SIGSTOP from a delayed SIGSTOP.
597
369f6daa
GB
5982015-03-24 Gary Benson <gbenson@redhat.com>
599
600 * linux-x86-low.c (x86_linux_new_thread): Moved to
601 nat/x86-linux.c.
602 (x86_linux_prepare_to_resume): Likewise.
603
8e5d4070
GB
6042015-03-24 Gary Benson <gbenson@redhat.com>
605
606 * Makefile.in (x86-linux-dregs.o): New rule.
607 * configure.srv: Add x86-linux-dregs.o to relevant targets.
608 * linux-x86-low.c: Include nat/x86-linux-dregs.h.
609 (u_debugreg_offset): Moved to nat/x86-linux-dregs.c.
610 (x86_linux_dr_get): Likewise.
611 (x86_linux_dr_set): Likewise.
612 (update_debug_registers_callback): Likewise.
613 (x86_linux_dr_set_addr): Likewise.
614 (x86_linux_dr_get_addr): Likewise.
615 (x86_linux_dr_set_control): Likewise.
616 (x86_linux_dr_get_control): Likewise.
617 (x86_linux_dr_get_status): Likewise.
618 (x86_linux_update_debug_registers): Likewise.
619
2b95d440
GB
6202015-03-24 Gary Benson <gbenson@redhat.com>
621
622 * linux-x86-low.c (x86_linux_update_debug_registers):
623 New function, factored out from...
624 (x86_linux_prepare_to_resume): ...this.
625
14b0bc68
GB
6262015-03-24 Gary Benson <gbenson@redhat.com>
627
628 * linux-x86-low.c (x86_linux_dr_get): Update comments.
629 (x86_linux_dr_set): Likewise.
630 (update_debug_registers_callback): Likewise.
631 (x86_linux_dr_set_addr): Likewise.
632 (x86_linux_dr_get_addr): Likewise.
633 (x86_linux_dr_set_control): Likewise.
634 (x86_linux_dr_get_control): Likewise.
635 (x86_linux_dr_get_status): Likewise.
636 (x86_linux_prepare_to_resume): Likewise.
637
5dfe6ca8
GB
6382015-03-24 Gary Benson <gbenson@redhat.com>
639
640 * linux-x86-low.c (x86_linux_dr_get): Add assertion.
641 Use perror_with_name. Pass string through gettext.
642 (x86_linux_dr_set): Likewise.
643
d33472ad
GB
6442015-03-24 Gary Benson <gbenson@redhat.com>
645
646 * linux-x86-low.c (x86_dr_low_set_addr): Rename to...
647 (x86_linux_dr_set_addr): ...this.
648 (x86_dr_low_get_addr): Rename to...
649 (x86_linux_dr_get_addr): ...this.
650 (x86_dr_low_set_control): Rename to...
651 (x86_linux_dr_set_control): ...this.
652 (x86_dr_low_get_control): Rename to...
653 (x86_linux_dr_get_control): ...this.
654 (x86_dr_low_get_status): Rename to...
655 (x86_linux_dr_get_status): ...this.
656 (x86_dr_low): Update with new function names.
657
4b134ca1
GB
6582015-03-24 Gary Benson <gbenson@redhat.com>
659
660 * Makefile.in (x86-linux.o): New rule.
661 * configure.srv: Add x86-linux.o to relevant targets.
662 * linux-low.c (lwp_set_arch_private_info): New function.
663 (lwp_arch_private_info): Likewise.
664 * linux-x86-low.c: Include nat/x86-linux.h.
665 (arch_lwp_info): Removed structure.
666 (update_debug_registers_callback):
667 Use lwp_set_debug_registers_changed.
668 (x86_linux_prepare_to_resume): Use lwp_debug_registers_changed
669 and lwp_set_debug_registers_changed.
670 (x86_linux_new_thread): Use lwp_set_debug_registers_changed.
671
34c703da
GB
6722015-03-24 Gary Benson <gbenson@redhat.com>
673
674 * linux-low.h (linux_target_ops) <new_thread>: Changed signature.
675 * linux-arm-low.c (arm_new_thread): Likewise.
676 * linux-aarch64-low.c (aarch64_linux_new_thread): Likewise.
677 * linux-mips-low.c (mips_linux_new_thread): Likewise.
678 * linux-x86-low.c (x86_linux_new_thread): Likewise.
679 * linux-low.c (add_lwp): Update the_low_target.new_thread call.
680
cff068da
GB
6812015-03-24 Gary Benson <gbenson@redhat.com>
682
683 * linux-low.c (ptid_of_lwp): New function.
684 (lwp_is_stopped): Likewise.
685 (lwp_stop_reason): Likewise.
686 * linux-x86-low.c (update_debug_registers_callback):
687 Use lwp_is_stopped.
688 (x86_linux_prepare_to_resume): Use ptid_of_lwp and
689 lwp_stop_reason.
690
b2f7c7e8
GB
6912015-03-24 Gary Benson <gbenson@redhat.com>
692
693 * linux-low.h (linux_stop_lwp): Remove declaration.
694
6d4ee8c6
GB
6952015-03-24 Gary Benson <gbenson@redhat.com>
696
697 * linux-low.h: Include nat/linux-nat.h.
698 * linux-low.c (iterate_over_lwps_args): New structure.
699 (iterate_over_lwps_filter): New function.
700 (iterate_over_lwps): Likewise.
701 * linux-x86-low.c (update_debug_registers_callback):
702 Update signature to what iterate_over_lwps expects.
703 Remove PID check that iterate_over_lwps now performs.
704 (x86_dr_low_set_addr): Use iterate_over_lwps.
705 (x86_dr_low_set_control): Likewise.
706
70a0bb6b
GB
7072015-03-24 Gary Benson <gbenson@redhat.com>
708
709 * linux-x86-low.c (x86_debug_reg_state): New function.
710 (x86_linux_prepare_to_resume): Use the above.
711
7b669087
GB
7122015-03-24 Gary Benson <gbenson@redhat.com>
713
714 * linux-low.c (current_lwp_ptid): New function.
715 * linux-x86-low.c: Include nat/linux-nat.h.
716 (x86_dr_low_get_addr): Use current_lwp_ptid.
717 (x86_dr_low_get_control): Likewise.
718 (x86_dr_low_get_status): Likewise.
719
eef49a3d
PA
7202015-03-20 Pedro Alves <palves@redhat.com>
721
722 * tracepoint.c (cmd_qtstatus): Make "str" const.
723
b2333d22
PA
7242015-03-20 Pedro Alves <palves@redhat.com>
725
726 * server.c (handle_general_set): Make "req_str" const.
727
23f238d3
PA
7282015-03-19 Pedro Alves <palves@redhat.com>
729
730 * linux-low.c (linux_resume_one_lwp): Rename to ...
731 (linux_resume_one_lwp_throw): ... this. Don't handle ESRCH here,
732 instead call perror_with_name.
733 (check_ptrace_stopped_lwp_gone): New function.
734 (linux_resume_one_lwp): Reimplement as wrapper around
735 linux_resume_one_lwp_throw that swallows errors if the LWP is
736 gone.
737
91baf43f
PA
7382015-03-19 Pedro Alves <palves@redhat.com>
739
740 * linux-low.c (count_events_callback, select_event_lwp_callback):
741 No longer check whether the thread has resume_stop as last resume
742 kind.
743
8bf3b159
PA
7442015-03-19 Pedro Alves <palves@redhat.com>
745
746 * linux-low.c (count_events_callback, select_event_lwp_callback):
747 Use the lwp's status_pending_p field, not the thread's.
748
b90fc188
PA
7492015-03-19 Pedro Alves <palves@redhat.com>
750
751 * linux-low.c (select_event_lwp_callback): Update comments to
752 no longer mention SIGTRAP.
753
464b0089
GB
7542015-03-18 Gary Benson <gbenson@redhat.com>
755
756 * server.c (handle_query): Do not report vFile:fstat as supported.
757
aa9e327f
GB
7582015-03-11 Gary Benson <gbenson@redhat.com>
759
760 * hostio.c (sys/types.h): New include.
761 (sys/stat.h): Likewise.
762 (common-remote-fileio.h): Likewise.
763 (handle_fstat): New function.
764 (handle_vFile): Handle vFile:fstat packets.
aa9e327f 765
791c0056
GB
7662015-03-11 Gary Benson <gbenson@redhat.com>
767
768 * configure.ac (AC_CHECK_MEMBERS): Add checks for
769 struct stat.st_blocks and struct stat.st_blksize.
770 * configure: Regenerate.
771 * config.in: Likewise.
772 * Makefile.in (SFILES): Add common/common-remote-fileio.c.
773 (OBS): Add common-remote-fileio.o.
774 (common-remote-fileio.o): New rule.
775
9a9df970
PA
7762015-03-09 Pedro Alves <palves@redhat.com>
777
778 * tracepoint.c (gdb_agent_helper_thread): Cast '&sockaddr' to
779 'struct sockaddr' pointer in 'accept' call.
780
9eb1356e
PA
7812015-03-09 Pedro Alves <palves@redhat.com>
782
783 Revert:
784 2015-03-07 Pedro Alves <palves@redhat.com>
785 * gdbreplay.c: No longer include <netinet/in.h>, <sys/socket.h>,
786 or <winsock2.h> here. Instead include "gdb_socket.h".
787 (remote_open): Use union gdb_sockaddr_u.
788 * remote-utils.c: No longer include <netinet/in.h>, <sys/socket.h>
789 or <winsock2.h> here. Instead include "gdb_socket.h".
790 (handle_accept_event, remote_prepare): Use union gdb_sockaddr_u.
791 * tracepoint.c: Include "gdb_socket.h" instead of <sys/socket.h>
792 or <sys/un.h>.
793 (init_named_socket, gdb_agent_helper_thread): Use union
794 gdb_sockaddr_u.
795
aac331e4
PA
7962015-03-07 Pedro Alves <palves@redhat.com>
797
798 * configure.ac (build_warnings): Move
799 -Wdeclaration-after-statement to the C-specific set.
800 * configure: Regenerate.
801
366c75fc
PA
8022015-03-07 Pedro Alves <palves@redhat.com>
803
804 * gdbreplay.c: No longer include <netinet/in.h>, <sys/socket.h>,
805 or <winsock2.h> here. Instead include "gdb_socket.h".
806 (remote_open): Use union gdb_sockaddr_u.
807 * remote-utils.c: No longer include <netinet/in.h>, <sys/socket.h>
808 or <winsock2.h> here. Instead include "gdb_socket.h".
809 (handle_accept_event, remote_prepare): Use union gdb_sockaddr_u.
810 * tracepoint.c: Include "gdb_socket.h" instead of <sys/socket.h>
811 or <sys/un.h>.
812 (init_named_socket, gdb_agent_helper_thread): Use union
813 gdb_sockaddr_u.
814
492d29ea
PA
8152015-03-07 Pedro Alves <palves@redhat.com>
816
817 Adjust all callers of TRY_CATCH to use TRY/CATCH/END_CATCH
818 instead.
819
60a191ed
YQ
8202015-03-06 Yao Qi <yao.qi@linaro.org>
821
822 * linux-aarch64-low.c (aarch64_insert_point): Use
823 show_debug_regs as a boolean.
824 (aarch64_remove_point): Likewise.
825
f5771b1d
PA
8262015-03-05 Pedro Alves <palves@redhat.com>
827
828 * lynx-low.c (lynx_target_ops): Install NULL hooks for
829 stopped_by_sw_breakpoint, supports_stopped_by_sw_breakpoint,
830 stopped_by_hw_breakpoint, supports_stopped_by_hw_breakpoint.
831 * nto-low.c (nto_target_ops): Likewise.
832 * spu-low.c (spu_target_ops): Likewise.
833 * win32-low.c (win32_target_ops): Likewise.
834
3e572f71
PA
8352015-03-04 Pedro Alves <palves@redhat.com>
836
72f4393d 837 * linux-low.c (check_stopped_by_breakpoint) [USE_SIGTRAP_SIGINFO]:
3e572f71
PA
838 Decide whether a breakpoint triggered based on the SIGTRAP's
839 siginfo.si_code.
72f4393d
L
840 (thread_still_has_status_pending_p) [USE_SIGTRAP_SIGINFO]: Don't check whether a
841 breakpoint is inserted if relying on SIGTRAP's siginfo.si_code.
3e572f71
PA
842 (linux_low_filter_event): Check for breakpoints before checking
843 watchpoints.
844 (linux_wait_1): Don't re-increment the PC if relying on SIGTRAP's
845 siginfo.si_code.
72f4393d
L
846 (linux_stopped_by_sw_breakpoint)
847 (linux_supports_stopped_by_sw_breakpoint)
848 (linux_stopped_by_hw_breakpoint)
849 (linux_supports_stopped_by_hw_breakpoint): New functions.
850 (linux_target_ops): Install new target methods.
3e572f71 851
1ec68e26
PA
8522015-03-04 Pedro Alves <palves@redhat.com>
853
854 * remote-utils.c (prepare_resume_reply): Report swbreak/hbreak.
855 * server.c (swbreak_feature, hwbreak_feature): New globals.
856 (handle_query) <qSupported>: Handle "swbreak+" and "hwbreak+".
857 (captured_main): Clear swbreak_feature and hwbreak_feature.
858 * server.h (swbreak_feature, hwbreak_feature): Declare.
859 * target.h (struct target_ops) <stopped_by_sw_breakpoint,
860 supports_stopped_by_sw_breakpoint, stopped_by_hw_breakpoint,
861 supports_stopped_by_hw_breakpoint>: New fields.
862 (target_supports_stopped_by_sw_breakpoint)
863 (target_stopped_by_sw_breakpoint)
864 (target_supports_stopped_by_hw_breakpoint)
865 (target_stopped_by_hw_breakpoint): Declare.
866
15c66dd6
PA
8672015-03-04 Pedro Alves <palves@redhat.com>
868
869 enum lwp_stop_reason -> enum target_stop_reason
870 * linux-low.c (check_stopped_by_breakpoint): Adjust.
871 (thread_still_has_status_pending_p, check_stopped_by_watchpoint)
872 (linux_wait_1, stuck_in_jump_pad_callback)
873 (move_out_of_jump_pad_callback, linux_resume_one_lwp)
874 (linux_stopped_by_watchpoint):
875 * linux-low.h (enum lwp_stop_reason): Delete.
876 (struct lwp_info) <stop_reason>: Now an enum target_stop_reason.
877 * linux-x86-low.c (x86_linux_prepare_to_resume): Adjust.
878
98fc70d6
YQ
8792015-03-04 Yao Qi <yao.qi@linaro.org>
880
881 * Makefile.in (SFILES): Add linux-aarch64-low.c.
882
dd2ac174
GB
8832015-03-03 Gary Benson <gbenson@redhat.com>
884
885 * hostio.c (handle_vFile): Fix prefix lengths.
886
d68e53f4
MM
8872015-03-03 Markus Metzger <markus.t.metzger@intel.com>
888
889 * linux-low.c (linux_low_enable_btrace): Do not overwrite non-zero
890 ptr_bits.
891
bf2d68ab
AA
8922015-03-02 Andreas Arnez <arnez@linux.vnet.ibm.com>
893
894 * Makefile.in (s390-vx-linux64.c, s390-tevx-linux64.c)
895 (s390x-vx-linux64.c, s390x-tevx-linux64.c): New rules.
896 (clean): Add "rm -f" for above C files.
897 * configure.srv (srv_regobj): Add s390-vx-linux64.o,
898 s390-tevx-linux64.o, s390x-vx-linux64.o, and s390x-tevx-linux64.o.
899 (srv_xmlfiles): Add s390-vx-linux64.xml, s390-tevx-linux64.xml,
900 s390x-vx-linux64.xml, s390x-tevx-linux64.xml, and s390-vx.xml.
901 * linux-s390-low.c (HWCAP_S390_VX): New macro.
902 (init_registers_s390_vx_linux64, init_registers_s390_tevx_linux64)
903 (init_registers_s390x_vx_linux64)
904 (init_registers_s390x_tevx_linux64)
905 (tdesc_s390_vx_linux64, tdesc_s390_tevx_linux64)
906 (tdesc_s390x_vx_linux64, tdesc_s390x_tevx_linux64): New extern
907 declarations.
908 (s390_fill_vxrs_low, s390_store_vxrs_low, s390_fill_vxrs_high)
909 (s390_store_vxrs_high): New functions.
910 (s390_regsets): Add entries for NT_S390_VXRS_LOW and
911 NT_S390_VXRS_HIGH.
912 (s390_arch_setup): Add logic for selecting one of the new target
913 descriptions. Activate the new vector regsets if applicable.
914 (initialize_low_arch): Also invoke init_registers_s390_vx_linux64,
915 init_registers_s390_tevx_linux64, init_registers_s390x_vx_linux64,
916 and init_registers_s390x_tevx_linux64.
917
c966a859
PA
9182015-03-01 Pedro Alves <palves@redhat.com>
919
920 * linux-i386-ipa.c (gdb_agent_get_raw_reg): Constify 'raw_regs'
921 parameter.
922
4180215b
PA
9232015-02-27 Pedro Alves <palves@redhat.com>
924
925 * linux-x86-low.c (u_debugreg_offset): New function.
926 (x86_linux_dr_get, x86_linux_dr_set): Use it.
927
749bab01
PA
9282015-02-27 Pedro Alves <palves@redhat.com>
929
930 * gdb_proc_service.h: Wrap with EXTERN_C_PUSH/EXTERN_C_POP.
931 [!HAVE_PROC_SERVICE_H] (struct ps_prochandle): Forward declare.
932 [!HAVE_PROC_SERVICE_H] (ps_pdread, ps_pdwrite, ps_ptread)
933 ps_ptwrite, ps_lgetregs, ps_lsetregs, ps_lgetfpregs)
934 (ps_lsetfpregs, ps_getpid)
935 (ps_get_thread_area, ps_pglobal_lookup, ps_pstop, ps_pcontinue)
936 (ps_lstop, ps_lcontinue, ps_lgetxregsize, ps_lgetxregs)
937 (ps_lsetxregs, ps_plog): Declare.
938
3c14e5a3
PA
9392015-02-27 Pedro Alves <palves@redhat.com>
940
941 * linux-amd64-ipa.c (gdb_agent_get_raw_reg): Use
942 IP_AGENT_EXPORT_FUNC.
943 * linux-i386-ipa.c (gdb_agent_get_raw_reg): Use
944 IP_AGENT_EXPORT_FUNC.
945 * tracepoint.c (ATTR_USED, ATTR_NOINLINE, ATTR_CONSTRUCTOR)
946 (IP_AGENT_EXPORT): Delete.
947 (gdb_tp_heap_buffer, gdb_jump_pad_buffer, gdb_jump_pad_buffer_end)
948 (gdb_trampoline_buffer, gdb_trampoline_buffer_end)
949 (gdb_trampoline_buffer_error, collecting, gdb_collect)
950 (stop_tracing, flush_trace_buffer, about_to_request_buffer_space)
951 (trace_buffer_is_full, stopping_tracepoint, expr_eval_result)
952 (error_tracepoint, tracepoints, tracing, trace_buffer_ctrl)
953 (trace_buffer_ctrl_curr, trace_buffer_lo, trace_buffer_hi)
954 (traceframe_read_count, traceframe_write_count)
955 (traceframes_created, trace_state_variables, get_raw_reg)
956 (get_trace_state_variable_value, set_trace_state_variable_value)
957 (ust_loaded, helper_thread_id, cmd_buf): Use
958 IPA_SYM_EXPORTED_NAME.
959 (stop_tracing, flush_trace_buffer): Use IP_AGENT_EXPORT_FUNC.
960 (tracepoints) Use IP_AGENT_EXPORT_VAR.
961 (stopping_tracepoint, trace_buffer_is_full, expr_eval_result): Use
962 IP_AGENT_EXPORT_VAR and wrap in EXTERN_C_PUSH/EXTERN_C_POP.
963 (last_tracepoint): Move into !IN_PROCESS_AGENT block.
964 (error_tracepoint): Use IP_AGENT_EXPORT_VAR and wrap in
965 EXTERN_C_PUSH/EXTERN_C_POP.
966 (trace_state_variables): Use IP_AGENT_EXPORT_VAR.
967 (trace_buffer_lo, trace_buffer_hi): Use IP_AGENT_EXPORT_VAR and
968 wrap in EXTERN_C_PUSH/EXTERN_C_POP.
969 (trace_buffer_ctrl, trace_buffer_ctrl_curr)
970 (traceframe_write_count, traceframe_read_count)
971 (traceframes_created, tracing): Use IP_AGENT_EXPORT_VAR.
972 (about_to_request_buffer_space, get_trace_state_variable_value)
973 (set_trace_state_variable_value): Use IP_AGENT_EXPORT_FUNC.
974 (collecting): Use IP_AGENT_EXPORT_VAR and wrap in
975 EXTERN_C_PUSH/EXTERN_C_POP.
976 (gdb_collect): Use IP_AGENT_EXPORT_FUNC.
977 (ust_loaded, cmd_buf): Use IP_AGENT_EXPORT_VAR.
978 (helper_thread_id, gdb_agent_capability): Use IP_AGENT_EXPORT_VAR
979 and wrap in EXTERN_C_PUSH/EXTERN_C_POP.
980 (gdb_tp_heap_buffer, gdb_jump_pad_buffer, gdb_jump_pad_buffer_end)
981 (gdb_trampoline_buffer, gdb_trampoline_buffer_end)
982 (gdb_trampoline_buffer_error): Use IP_AGENT_EXPORT_VAR.
983 * tracepoint.h (ATTR_USED, ATTR_NOINLINE, EXPORTED_SYMBOL):
984 Define.
985 (IP_AGENT_EXPORT_FUNC, IP_AGENT_EXPORT_VAR)
986 (IP_AGENT_EXPORT_VAR_DECL): Define.
987 (tracing): Declare.
988 (gdb_agent_get_raw_reg): Declare.
989
fe978cb0
PA
9902015-02-27 Tom Tromey <tromey@redhat.com>
991 Pedro Alves <palves@redhat.com>
992
993 Rename symbols whose names are reserved C++ keywords throughout.
994
3bc3d82a
PA
9952015-02-27 Pedro Alves <palves@redhat.com>
996
997 * Makefile.in (COMPILER): New, get it from autoconf.
998 (CXX): Get from autoconf instead.
999 (COMPILE.pre): Use COMPILER.
1000 (CC-LD): Rename to ...
1001 (CC_LD): ... this. Use COMPILER.
1002 (gdbserver$(EXEEXT), gdbreplay$(EXEEXT), $(IPA_LIB)): Adjust.
1003 (CXX_FOR_TARGET): Default to g++ instead of gcc.
1004 * acinclude.m4: Include build-with-cxx.m4.
1005 * configure.ac: Call AC_PROG_CXX and GDB_AC_BUILD_WITH_CXX.
1006 Disable -Werror by default if building in C++ mode.
1007 (build_warnings): Add -Wno-sign-compare, -Wno-write-strings and
1008 -Wno-narrowing in C++ mode. Run supported-warning-flags tests with
1009 the C++ compiler. Save/restore CXXFLAGS too.
1010 * configure: Regenerate.
1011
07697489
PA
10122015-02-27 Pedro Alves <palves@redhat.com>
1013
1014 * acinclude.m4: Include libiberty.m4.
1015 * configure.ac: Call libiberty_INIT.
1016 * config.in, configure: Regenerate.
1017
9beb7c4e
PA
10182015-02-26 Pedro Alves <palves@redhat.com>
1019
1020 * linux-low.c (linux_wait_1): When incrementing the PC past a
1021 program breakpoint always use the_low_target.breakpoint_len as
1022 increment, rather than the maximum between that and
1023 the_low_target.decr_pc_after_break.
1024
8090aef2
PA
10252015-02-23 Pedro Alves <palves@redhat.com>
1026
1027 * linux-low.c (check_stopped_by_breakpoint): Don't check if the
1028 thread was doing a step-over; always adjust the PC if
1029 we stepped over a permanent breakpoint.
1030 (linux_wait_1): If we stepped over breakpoint that was on top of a
1031 permanent breakpoint, manually advance the PC past it.
1032
bc9540e8
PA
10332015-02-23 Pedro Alves <palves@redhat.com>
1034
1035 * linux-x86-low.c (REGSIZE): Define in both 32-bit and 64-bit
1036 modes.
1037 (x86_fill_gregset, x86_store_gregset): Use it when handling
1038 $orig_eax.
1039
2db9a427
PA
10402015-02-20 Pedro Alves <palves@redhat.com>
1041
1042 * thread-db.c: Include "nat/linux-procfs.h".
1043 (thread_db_init): Skip listing new threads if the kernel supports
1044 PTRACE_EVENT_CLONE and /proc/PID/task/ is accessible.
1045
afa8d396
PA
10462015-02-20 Pedro Alves <palves@redhat.com>
1047
1048 * linux-low.c (status_pending_p_callback): Use ptid_match.
1049
c9587f88
AT
10502015-02-19 Antoine Tremblay <antoine.tremblay@ericsson.com>
1051
1052 PR breakpoints/16812
1053 * linux-low.c (wstatus_maybe_breakpoint): Remove.
1054 (linux_low_filter_event): Update wstatus_maybe_breakpoint name.
1055 (linux_wait_1): Report SIGTRAP,SIGILL,SIGSEGV.
1056
b05ec7a5
AT
10572015-02-10 Antoine Tremblay <antoine.tremblay@ericsson.com>
1058
1059 PR breakpoints/15956
1060 * tracepoint.c (cmd_qtinit): Add check for current_thread.
1061
d33501a5
MM
10622015-02-09 Markus Metzger <markus.t.metzger@intel.com>
1063
1064 * linux-low.c (linux_low_btrace_conf): Print size.
1065 * server.c (handle_btrace_conf_general_set): New.
1066 (hanle_general_set): Call handle_btrace_conf_general_set.
1067 (handle_query): Report Qbtrace-conf:bts:size as supported.
1068
f4abbc16
MM
10692015-02-09 Markus Metzger <markus.t.metzger@intel.com>
1070
1071 * linux-low.c (linux_low_enable_btrace): Update parameters.
1072 (linux_low_btrace_conf): New.
1073 (linux_target_ops)<to_btrace_conf>: Initialize.
1074 * server.c (current_btrace_conf): New.
1075 (handle_btrace_enable): Rename to ...
1076 (handle_btrace_enable_bts): ... this. Pass &current_btrace_conf
1077 to target_enable_btrace. Update comment. Update users.
1078 (handle_qxfer_btrace_conf): New.
1079 (qxfer_packets): Add btrace-conf entry.
1080 (handle_query): Report qXfer:btrace-conf:read as supported packet.
1081 * target.h (target_ops)<enable_btrace>: Update parameters and comment.
1082 (target_ops)<read_btrace_conf>: New.
1083 (target_enable_btrace): Update parameters.
1084 (target_read_btrace_conf): New.
1085
043c3577
MM
10862015-02-09 Markus Metzger <markus.t.metzger@intel.com>
1087
1088 * server.c (handle_btrace_general_set): Remove call to
1089 target_supports_btrace.
1090 (supported_btrace_packets): New.
1091 (handle_query): Call supported_btrace_packets.
1092 * target.h: include btrace-common.h.
1093 (btrace_target_info): Removed.
1094 (supports_btrace, target_supports_btrace): Update parameters.
1095
734b0e4b
MM
10962015-02-09 Markus Metzger <markus.t.metzger@intel.com>
1097
1098 * Makefile.in (SFILES): Add common/btrace-common.c.
1099 (OBS): Add common/btrace-common.o.
1100 (btrace-common.o): Add build rules.
1101 * linux-low: Include btrace-common.h.
1102 (linux_low_read_btrace): Use struct btrace_data. Call
1103 btrace_data_init and btrace_data_fini.
1104
d6c146e9
PA
11052015-02-06 Pedro Alves <palves@redhat.com>
1106
1107 * thread-db.c (find_new_threads_callback): Add debug output.
1108
20ba1ce6
PA
11092015-02-04 Pedro Alves <palves@redhat.com>
1110
1111 * linux-low.c (handle_extended_wait): Don't resume LWPs here.
1112 (resume_stopped_resumed_lwps): New function.
1113 (linux_wait_for_event_filtered): Use it.
1114
8cc73a39
SDJ
11152015-01-15 Sergio Durigan Junior <sergiodj@redhat.com>
1116
1117 * Makefile.in (SFILES): Add linux-personality.c.
1118 (linux-personality.o): New rule.
1119 * configure.srv (srv_linux_obj): Add linux-personality.o to the
1120 list of objects to be built.
1121 * linux-low.c: Include nat/linux-personality.h.
1122 (linux_create_inferior): Remove code to disable address space
1123 randomization (moved to ../nat/linux-personality.c). Create
1124 cleanup to disable address space randomization.
1125
fb23d554
SDJ
11262015-01-15 Sergio Durigan Junior <sergiodj@redhat.com>
1127
1128 * Makefile.in (posix-strerror.o): New rule.
1129 (mingw-strerror.o): Likewise.
1130 * configure: Regenerated.
1131 * configure.ac: Source file ../common/common.host. Initialize new
1132 variable srv_host_obs. Add srv_host_obs to GDBSERVER_DEPFILES.
1133
cdf43629
YQ
11342015-01-14 Yao Qi <yao@codesourcery.com>
1135
1136 * Makefile.in (SFILES): Add nat/ppc-linux.c.
1137 (ppc-linux.o): New rule.
1138 * configure.srv (powerpc*-*-linux*): Add ppc-linux.o.
1139 * configure.ac: AC_CHECK_FUNCS(getauxval).
1140 * config.in: Re-generated.
1141 * configure: Re-generated.
1142 * linux-ppc-low.c (ppc_arch_setup) [__powerpc64__]: Call
1143 ppc64_64bit_inferior_p
1144
514c5338
YQ
11452015-01-14 Yao Qi <yao@codesourcery.com>
1146
1147 * linux-ppc-low.c: Include "nat/ppc-linux.h".
1148 (PPC_FEATURE_HAS_VSX): Move to nat/ppc-linux.h.
1149 (PPC_FEATURE_HAS_ALTIVEC, PPC_FEATURE_HAS_SPE): Likewise.
1150 (PT_ORIG_R3, PT_TRAP): Likewise.
1151 (PTRACE_GETVSXREGS, PTRACE_SETVSXREGS): Likewise.
1152 (PTRACE_GETVRREGS, PTRACE_SETVRREGS): Likewise.
1153 (PTRACE_GETEVRREGS, PTRACE_SETEVRREGS): Likewise.
1154
3368c1e5
JB
11552015-01-10 Joel Brobecker <brobecker@adacore.com>
1156
1157 * i387-fp.c (i387_cache_to_xsave): In look over
1158 num_avx512_zmmh_high_registers, replace use of struct i387_xsave
1159 zmmh_low_space field by use of zmmh_high_space.
1160
582511be
PA
11612015-01-09 Pedro Alves <palves@redhat.com>
1162
1163 * linux-low.c (step_over_bkpt): Move higher up in the file.
1164 (handle_extended_wait): Don't store the stop_pc here.
1165 (get_stop_pc): Adjust comments and rename to ...
1166 (check_stopped_by_breakpoint): ... this. Record whether the LWP
1167 stopped for a software breakpoint or hardware breakpoint.
1168 (thread_still_has_status_pending_p): New function.
1169 (status_pending_p_callback): Use
1170 thread_still_has_status_pending_p. If the event is no longer
1171 interesting, resume the LWP.
1172 (handle_tracepoints): Add assert.
1173 (maybe_move_out_of_jump_pad): Remove cancel_breakpoints call.
1174 (wstatus_maybe_breakpoint): New function.
1175 (cancel_breakpoint): Delete function.
1176 (check_stopped_by_watchpoint): New function, factored out from
1177 linux_low_filter_event.
1178 (lp_status_maybe_breakpoint): Delete function.
1179 (linux_low_filter_event): Remove filter_ptid argument.
1180 Leave thread group exits pending here. Store the LWP's stop PC.
1181 Always leave events pending.
1182 (linux_wait_for_event_filtered): Pull all events out of the
1183 kernel, and leave them all pending.
1184 (count_events_callback, select_event_lwp_callback): Consider all
1185 events.
1186 (cancel_breakpoints_callback, linux_cancel_breakpoints): Delete.
1187 (select_event_lwp): Only give preference to the stepping LWP in
1188 all-stop mode. Adjust comments.
1189 (ignore_event): New function.
1190 (linux_wait_1): Delete 'retry' label. Use ignore_event. Remove
1191 references to cancel_breakpoints. Adjust to renames. Also give
1192 equal priority to all LWPs that have had events in non-stop mode.
1193 If reporting a software breakpoint event, unadjust the LWP's PC.
1194 (linux_wait): If linux_wait_1 returned an ignored event, retry.
1195 (stuck_in_jump_pad_callback, move_out_of_jump_pad_callback):
1196 Adjust.
1197 (linux_resume_one_lwp): Store the LWP's PC. Adjust.
1198 (resume_status_pending_p): Use thread_still_has_status_pending_p.
1199 (linux_stopped_by_watchpoint): Adjust.
1200 (linux_target_ops): Remove reference to linux_cancel_breakpoints.
1201 * linux-low.h (enum lwp_stop_reason): New.
1202 (struct lwp_info) <stop_pc>: Adjust comment.
1203 <stopped_by_watchpoint>: Delete field.
1204 <stop_reason>: New field.
1205 * linux-x86-low.c (x86_linux_prepare_to_resume): Adjust.
1206 * mem-break.c (software_breakpoint_inserted_here)
1207 (hardware_breakpoint_inserted_here): New function.
1208 * mem-break.h (software_breakpoint_inserted_here)
1209 (hardware_breakpoint_inserted_here): Declare.
1210 * target.h (struct target_ops) <cancel_breakpoints>: Remove field.
1211 (cancel_breakpoints): Delete.
1212 * tracepoint.c (clear_installed_tracepoints, stop_tracing)
1213 (upload_fast_traceframes): Remove references to
1214 cancel_breakpoints.
1215
a33e3959
PA
12162015-01-09 Pedro Alves <palves@redhat.com>
1217
1218 * thread-db.c (find_new_threads_callback): Ignore thread if the
1219 kernel thread ID is -1.
1220
8784d563
PA
12212015-01-09 Pedro Alves <palves@redhat.com>
1222
1223 * linux-low.c (linux_attach_fail_reason_string): Move to
1224 nat/linux-ptrace.c, and rename.
1225 (linux_attach_lwp): Update comment.
1226 (attach_proc_task_lwp_callback): New function.
1227 (linux_attach): Adjust to rename and use
1228 linux_proc_attach_tgid_threads.
1229 (linux_attach_fail_reason_string): Delete declaration.
1230
76f2b779
JB
12312015-01-01 Joel Brobecker <brobecker@adacore.com>
1232
1233 * gdbreplay.c (gdbreplay_version): Update copyright year to 2015.
1234 * server.c (gdbserver_version): Likewise.
1235
fafcc06a
SDJ
12362014-12-29 Sergio Durigan Junior <sergiodj@redhat.com>
1237
1238 * remote-utils.c: Include ctype.h.
1239 (input_interrupt): Explicitly handle the case when the char
1240 received is the NUL byte. Improve the printing of non-ASCII
1241 characters.
1242
beed38b8
JB
12432014-12-16 Joel Brobecker <brobecker@adacore.com>
1244
1245 * linux-low.c (linux_low_filter_event): Update call to
1246 linux_enable_event_reporting following the addition of
1247 a new parameter to that function.
1248
bf330350
CU
12492014-12-16 Catalin Udma <catalin.udma@freescale.com>
1250
1251 PR server/17457
1252 * linux-aarch64-low.c (AARCH64_FPSR_REGNO): New define.
1253 (AARCH64_FPCR_REGNO): Likewise.
1254 (AARCH64_NUM_REGS): Update to include fpsr/fpcr registers.
1255 (aarch64_fill_fpregset): Add missing fpsr/fpcr registers.
1256 (aarch64_store_fpregset): Likewise.
1257
5227d625
JB
12582014-12-15 Joel Brobecker <brobecker@adacore.com>
1259
1260 * lynx-low.c (lynx_resume): Use PTRACE_SINGLESTEP_ONE if N == 1.
1261 Remove FIXME comment about assumption about N.
1262
f93b65a0
JB
12632014-12-13 Joel Brobecker <brobecker@adacore.com>
1264
1265 * configure.ac: If large-file support is disabled in GDBserver,
1266 pass --disable-largefile to ACX_CONFIGURE_DIR call for "gnulib".
1267 * configure: Regenerate.
1268
e5a9158d
AA
12692014-12-12 Andreas Arnez <arnez@linux.vnet.ibm.com>
1270
1271 * linux-low.c (regsets_fetch_inferior_registers): Suppress the
1272 warning upon ENODATA from ptrace.
1273 * linux-s390-low.c (s390_store_tdb): New.
1274 (s390_regsets): Add regset for NT_S390_TDB.
1275
feea5f36
AA
12762014-12-12 Andreas Arnez <arnez@linux.vnet.ibm.com>
1277
1278 * linux-low.c (regsets_store_inferior_registers): Skip regsets
1279 without a fill_function.
1280 * linux-s390-low.c (s390_fill_last_break): Remove.
1281 (s390_regsets): Set fill_function to NULL for NT_S390_LAST_BREAK.
1282 (s390_arch_setup): Use regset's size instead of fill_function for
1283 loop end condition.
1284
098dbe61
AA
12852014-12-12 Andreas Arnez <arnez@linux.vnet.ibm.com>
1286
1287 * linux-low.c (regsets_fetch_inferior_registers): Do not invoke
1288 the regset's store function when ptrace returned an error.
1289 * regcache.c (get_thread_regcache): Invalidate register cache
1290 before fetching inferior's registers.
1291
28eef672
AA
12922014-12-12 Andreas Arnez <arnez@linux.vnet.ibm.com>
1293
1294 * linux-low.c (regsets_fetch_inferior_registers): Rephrase
1295 while-loop as for-loop.
1296 (regsets_store_inferior_registers): Likewise.
1297
bdca27a2
YQ
12982014-11-28 Yao Qi <yao@codesourcery.com>
1299
1300 * configure.ac(AC_CHECK_FUNCS): Remove readlink.
1301 * config.in, configure: Re-generate.
1302 * hostio.c (handle_unlink): Remove code checking HAVE_READLINK
1303 is defined.
1304
9c232dda
YQ
13052014-11-21 Yao Qi <yao@codesourcery.com>
1306
1307 * configure.ac: Don't invoke AC_FUNC_ALLOCA.
1308 (AC_CHECK_HEADERS): Remove malloc.h.
1309 * configure: Re-generated.
1310 * config.in: Re-generated.
1311 * server.h: Don't include alloca.h and malloc.h.
1312 * gdbreplay.c: Don't check HAVE_ALLOCA_H is defined.
1313 Don't include malloc.h.
1314
43968415
JB
13152014-11-17 Joel Brobecker <brobecker@adacore.com>
1316
1317 * lynx-low.c (lynx_write_memory): Put lynx_read_memory and
1318 corresponding ERRNO check in same block.
1319
40e91bc7
PA
13202014-11-12 Pedro Alves <palves@redhat.com>
1321
1322 * server.c (cont_thread): Update comment.
1323 (start_inferior, attach_inferior): No longer clear cont_thread.
1324 (handle_v_cont): No longer set cont_thread.
1325 (captured_main): Clear cont_thread each time a GDB connects.
1326
c2c118cf
PA
13272014-11-12 Pedro Alves <palves@redhat.com>
1328
1329 * linux-low.c (linux_wait_1): Don't force a wait for the Hc
1330 thread, and don't resume all threads if the Hc thread has exited.
1331
78708b7c
PA
13322014-11-12 Pedro Alves <palves@redhat.com>
1333
1334 * linux-low.c (linux_request_interrupt): Always send a SIGINT to
1335 the process group instead of to a specific LWP.
1336
a2abc7de
PA
13372014-10-15 Pedro Alves <palves@redhat.com>
1338
1339 PR server/17487
1340 * win32-arm-low.c (arm_set_thread_context): Remove current_event
1341 parameter.
1342 (arm_set_thread_context): Delete.
1343 (the_low_target): Adjust.
1344 * win32-i386-low.c (debug_registers_changed)
1345 (debug_registers_used): Delete.
1346 (update_debug_registers_callback): New function.
1347 (x86_dr_low_set_addr, x86_dr_low_set_control): Mark all threads as
1348 needing to update their debug registers.
1349 (win32_get_current_dr): New function.
1350 (x86_dr_low_get_addr, x86_dr_low_get_control)
1351 (x86_dr_low_get_status): Fetch the debug register from the thread
1352 record's context.
1353 (i386_initial_stuff): Adjust.
1354 (i386_get_thread_context): Remove current_event parameter. Don't
1355 clear debug_registers_changed nor copy DR values to
1356 debug_reg_state.
1357 (i386_set_thread_context): Delete.
1358 (i386_prepare_to_resume): New function.
1359 (i386_thread_added): Mark the thread as needing to update irs
1360 debug registers.
1361 (the_low_target): Remove i386_set_thread_context and install
1362 i386_prepare_to_resume.
1363 * win32-low.c (win32_get_thread_context): Adjust.
1364 (win32_set_thread_context): Use SetThreadContext
1365 directly.
1366 (win32_prepare_to_resume): New function.
1367 (win32_require_context): New function, factored out from ...
1368 (thread_rec): ... this.
1369 (continue_one_thread): Call win32_prepare_to_resume on each thread
1370 we're about to continue.
1371 (win32_resume): Call win32_prepare_to_resume on the event thread.
1372 * win32-low.h (struct win32_thread_info)
1373 <debug_registers_changed>: New field.
1374 (struct win32_target_ops): Change prototype of set_thread_context,
1375 delete set_thread_context and add prepare_to_resume.
1376 (win32_require_context): New declaration.
1377
a442d071
GB
13782014-10-08 Gary Benson <gbenson@redhat.com>
1379
1380 * server.h: Do not include common-exceptions.h.
1381
6f1947e8
GB
13822014-10-08 Gary Benson <gbenson@redhat.com>
1383
1384 * server.h: Do not include cleanups.h.
1385
63b434a4
JH
13862014-09-30 James Hogan <james.hogan@imgtec.com>
1387
1388 * Makefile.in (clean): Add rm -f commands for mips-dsp-linux.c and
1389 mips64-dsp-linux.c.
1390
c4d9ceb6
YQ
13912014-09-23 Yao Qi <yao@codesourcery.com>
1392
1393 * linux-low.c (lp_status_maybe_breakpoint): New function.
1394 (linux_low_filter_event): Call lp_status_maybe_breakpoint.
1395 (count_events_callback): Likewise.
1396 (select_event_lwp_callback): Likewise.
1397 (cancel_breakpoints_callback): Likewise.
1398
89a5711c
DB
13992014-09-19 Don Breazeal <donb@codesourcery.com>
1400
1401 * linux-low.c (handle_extended_wait): Call
1402 linux_ptrace_get_extended_event.
1403 (get_stop_pc, get_detach_signal, linux_low_filter_event): Call
1404 linux_is_extended_waitstatus.
1405
bffc0964
JB
14062014-09-16 Joel Brobecker <brobecker@adacore.com>
1407
1408 * Makefile.in (CPPFLAGS): Define.
1409 (INTERNAL_CFLAGS_BASE): Add ${CPPFLAGS}.
1410 (IPAGENT_CFLAGS): Remove ${CPPFLAGS}.
1411
0bfdf32f
GB
14122014-09-16 Gary Benson <gbenson@redhat.com>
1413
1414 * inferiors.h (current_inferior): Renamed as...
1415 (current_thread): New variable. All uses updated.
1416 * linux-low.c (get_pc): Renamed saved_inferior as saved_thread.
1417 (maybe_move_out_of_jump_pad): Likewise.
1418 (cancel_breakpoint): Likewise.
1419 (linux_low_filter_event): Likewise.
1420 (wait_for_sigstop): Likewise.
1421 (linux_resume_one_lwp): Likewise.
1422 (need_step_over_p): Likewise.
1423 (start_step_over): Likewise.
1424 (linux_stabilize_threads): Renamed save_inferior as saved_thread.
1425 * linux-x86-low.c (x86_linux_update_xmltarget): Likewise.
1426 * proc-service.c (ps_lgetregs): Renamed reg_inferior as reg_thread
1427 and save_inferior as saved_thread.
1428 * regcache.c (get_thread_regcache): Renamed saved_inferior as
1429 saved_thread.
1430 (regcache_invalidate_thread): Likewise.
1431 * remote-utils.c (prepare_resume_reply): Likewise.
1432 * thread-db.c (thread_db_get_tls_address): Likewise.
1433 (disable_thread_event_reporting): Likewise.
1434 (remove_thread_event_breakpoints): Likewise.
1435 * tracepoint.c (gdb_agent_about_to_close): Renamed save_inferior
1436 as saved_thread.
1437 * target.h (set_desired_inferior): Renamed as...
1438 (set_desired_thread): New declaration. All uses updated.
1439 * server.c (myresume): Updated comment to reference thread instead
1440 of inferior.
1441 (handle_serial_event): Likewise.
1442 (handle_target_event): Likewise.
1443
361c8ade
GB
14442014-09-12 Tom Tromey <tromey@redhat.com>
1445 Gary Benson <gbenson@redhat.com>
1446
1447 * regcache.h: Include common-regcache.h.
1448 (regcache_read_pc): Don't declare.
1449 * regcache.c (get_thread_regcache_for_ptid): New function.
1450
bd9269f7
GB
14512014-09-11 Tom Tromey <tromey@redhat.com>
1452 Gary Benson <gbenson@redhat.com>
1453
1454 * symbol.c: New file.
1455 * Makefile.in (SFILES): Add symbol.c.
1456 (OBS): Add symbol.o.
1457
f8c1d06b
GB
14582014-09-11 Gary Benson <gbenson@redhat.com>
1459
1460 * target.c (target_stop_ptid, target_continue_ptid): New
1461 functions.
1462
721ec300
GB
14632014-09-11 Tom Tromey <tromey@redhat.com>
1464 Gary Benson <gbenson@redhat.com>
1465
1466 * target.h: Include target/target.h.
1467 * target.c (target_read_memory, target_read_uint32)
1468 (target_write_memory): New functions.
1469
c5e92cca
GB
14702014-09-11 Gary Benson <gbenson@redhat.com>
1471
1472 * server.h (debug_hw_points): Don't declare.
1473 * server.c (debug_hw_points): Don't define. Replace all uses
1474 with show_debug_regs.
1475 * linux-aarch64-low.c (debug_hw_points): Don't define. Replace
1476 all uses with show_debug_regs.
1477
2e4bb98a
EBM
14782014-09-08 Edjunior Barbosa Machado <emachado@linux.vnet.ibm.com>
1479
1480 * linux-ppc-low.c (ppc_collect_ptrace_register): Adjust routine to take
1481 endianness into account.
1482 (ppc_supply_ptrace_register): Likewise.
1483
ac740bc7
JH
14842014-09-03 James Hogan <james.hogan@imgtec.com>
1485
1486 * linux-mips-low.c (mips_read_description): Reset errno to 0 prior
1487 to reading DSP_CONTROL with PTRACE_PEEKUSER ptrace call.
1488
97ea6506
GB
14892014-09-03 Gary Benson <gbenson@redhat.com>
1490
1491 * linux-x86-low.c (x86_linux_prepare_to_resume): Use
1492 ALL_DEBUG_ADDRESS_REGISTERS.
1493
df7e5265
GB
14942014-09-02 Gary Benson <gbenson@redhat.com>
1495
1496 * i386-low.h: Renamed as...
1497 * x86-low.h: New file. All type, function and variable name
1498 prefixes changed from "i386_" to "x86_". All references updated.
1499 * i386-low.c: Renamed as...
1500 * x86-low.c: New file. All type, function and variable name
1501 prefixes changed from "i386_" to "x86_". All references updated.
1502
ed859da7
GB
15032014-09-02 Gary Benson <gbenson@redhat.com>
1504
1505 * linux-x86-low.c (x86_linux_new_process): Use XCNEW.
1506 (x86_linux_new_thread): Likewise.
1507
860789c7
GB
15082014-08-29 Gary Benson <gbenson@redhat.com>
1509
1510 * server.h (setjmp.h): Do not include.
1511 (toplevel): Do not declare.
1512 (common-exceptions.h): Include.
1513 (cleanups.h): Likewise.
1514 * server.c (toplevel): Do not define.
1515 (exit_code): New static global.
1516 (detach_or_kill_for_exit_cleanup): New function.
1517 (main): New function. Original main renamed to...
1518 (captured_main): New function.
1519 * utils.c (verror) [!IN_PROCESS_AGENT]: Use throw_verror.
1520
ff55e1b5
GB
15212014-08-29 Gary Benson <gbenson@redhat.com>
1522
1523 * Makefile.in (SFILES): Add common/common-exceptions.c.
1524 (OBS): Add common-exceptions.o.
1525 (common-exceptions.o): New rule.
1526 * utils.c (prepare_to_throw_exception): New function.
1527
e9bcb658
GB
15282014-08-29 Gary Benson <gbenson@redhat.com>
1529
1530 * config.in: Regenerate.
1531 * configure: Likewise.
1532
e3180625
GB
15332014-08-29 Gary Benson <gbenson@redhat.com>
1534
1535 * Makefile.in (SFILES): Add common/cleanups.c.
1536 (OBS): cleanups.o.
1537 (cleanups.o): New rule.
1538
e3d6ba5d
GB
15392014-08-29 Gary Benson <gbenson@redhat.com>
1540
1541 * utils.c (internal_vwarning): New function.
1542
7096e886
GB
15432014-08-28 Gary Benson <gbenson@redhat.com>
1544
1545 * utils.h (fatal): Remove declaration.
1546 * utils.c (fatal): Remove function.
1547
14ce3192
GB
15482014-08-28 Gary Benson <gbenson@redhat.com>
1549
1550 * tracepoint.c (gdb_agent_init): Replace fatal with
1551 perror_with_name.
1552 (initialize_tracepoint): Likewise.
1553
50278d59
GB
15542014-08-28 Gary Benson <gbenson@redhat.com>
1555
1556 * remote-utils.c (remote_prepare): Replace fatal with error.
1557
aa96c426
GB
15582014-08-28 Gary Benson <gbenson@redhat.com>
1559
1560 * linux-low.c (linux_async): Replace fatal with warning.
1561 Tidy up and return.
1562 (linux_start_non_stop): Return -1 if linux_async failed.
1563
f7160e97
GB
15642014-08-28 Gary Benson <gbenson@redhat.com>
1565
1566 * linux-x86-low.c (i386_dr_low_set_addr): Replace check with
1567 gdb_assert.
1568 (i386_dr_low_get_addr): Remove vague comment.
1569 * win32-i386-low.c (i386_dr_low_set_addr): Replace check with
1570 gdb_assert.
1571
38e08fca
GB
15722014-08-28 Gary Benson <gbenson@redhat.com>
1573
1574 * inferiors.c (get_thread_process): Replace check with gdb_assert.
1575 * linux-low.c (linux_wait_for_event_filtered): Replace fatal with
1576 internal_error.
1577 (linux_resume_one_lwp): Likewise.
1578 * linux-x86-low.c (x86_siginfo_fixup): Replace checks with
1579 gdb_assert.
1580 * mem-break.c (raw_bkpt_type_to_target_hw_bp_type): Replace fatal
1581 with internal_error.
1582 * regcache.c (get_thread_regcache): Replace check with gdb_assert.
1583 (init_register_cache): Replace fatal with gdb_assert_not_reached.
1584 (find_register_by_name): Replace fatal with internal_error.
1585 (find_regno): Likewise.
1586 * tdesc.c (init_target_desc): Replace check with gdb_assert.
1587 * thread-db.c (thread_db_create_event): Likewise.
1588 (thread_db_load_search): Likewise.
1589 (try_thread_db_load_1): Likewise.
1590 * tracepoint.c (get_jump_space_head): Replace fatal with
1591 internal_error.
1592 (claim_trampoline_space): Likewise.
1593 (have_fast_tracepoint_trampoline_buffer): Likewise.
1594 (cmd_qtstart): Likewise.
1595 (stop_tracing): Likewise.
1596 (fast_tracepoint_collecting): Likewise.
1597 (target_malloc): Likewise.
1598 (download_tracepoint): Likewise.
1599 (download_trace_state_variables): Replace check with gdb_assert.
1600 (upload_fast_traceframes): Replace fatal with internal_error.
1601
34abf635
GB
16022014-08-19 Tom Tromey <tromey@redhat.com>
1603 Gary Benson <gbenson@redhat.com>
1604
1605 * Makefile.in (SFILES): Add common/common-debug.c.
1606 (OBS): Add common-debug.o.
1607 (common-debug.o): New rule.
1608 * debug.h (debug_printf): Don't declare.
1609 * debug.c (debug_printf): Renamed and rewritten as...
1610 (debug_vprintf): New function.
1611
f6e94d78
GB
16122014-08-19 Gary Benson <gbenson@redhat.com>
1613
1614 * utils.h: Do not include print-utils.h.
1615
9239eeab
GB
16162014-08-19 Tom Tromey <tromey@redhat.com>
1617 Gary Benson <gbenson@redhat.com>
1618
1619 * server.h: Add static assertion.
1620 (gdb_byte, CORE_ADDR, LONGEST, ULONGEST): Remove.
1621
ef87c8bb
GB
16222014-08-19 Tom Tromey <tromey@redhat.com>
1623 Gary Benson <gbenson@redhat.com>
1624
1625 * Makefile.in (SFILES): Add common/errors.c.
1626 (OBS): Add errors.o.
1627 (IPA_OBS): Add errors-ipa.o.
1628 (errors.o): New rule.
1629 (errors-ipa.o): Likewise.
1630 * utils.h (perror_with_name, error, warning): Don't declare.
1631 * utils.c (warning): Renamed and rewritten as...
1632 (vwarning): New function.
1633 (error): Renamed and rewritten as...
1634 (verror): New function.
1635 (internal_error): Renamed and rewritten as...
1636 (internal_verror): New function.
1637
bb974a24
GB
16382014-08-07 Gary Benson <gbenson@redhat.com>
1639
1640 * configure.ac (AC_CHECK_HEADERS): Remove errno.h.
1641 * configure: Regenerate.
1642 * config.in: Likewise.
1643 * server.h: Do not include errno.h.
1644 * event-loop.c: Likewise.
1645 * hostio-errno.c: Likewise.
1646 * linux-low.c: Likewise.
1647 * remote-utils.c: Likewise.
1648 * spu-low.c: Likewise.
1649 * utils.c: Likewise.
1650 * gdbreplay.c: Unconditionally include errno.h.
1651
6d3d12eb
GB
16522014-08-07 Gary Benson <gbenson@redhat.com>
1653
1654 * server.h: Do not include string.h.
1655 * event-loop.c: Likewise.
1656 * linux-low.c: Likewise.
1657 * regcache.c: Likewise.
1658 * remote-utils.c: Likewise.
1659 * spu-low.c: Likewise.
1660 * utils.c: Likewise.
1661
dccbb609
GB
16622014-08-07 Gary Benson <gbenson@redhat.com>
1663
1664 * server.h: Do not include gdb_assert.h.
1665
e76df0d0
GB
16662014-08-07 Gary Benson <gbenson@redhat.com>
1667
1668 * server.h: Do not include common-utils.h.
1669
4cb9c816
GB
16702014-08-07 Gary Benson <gbenson@redhat.com>
1671
1672 * server.h: Do not include ptid.h.
1673 * notif.h: Likewise.
1674
3995eeee
GB
16752014-08-07 Gary Benson <gbenson@redhat.com>
1676
1677 * server.h: Do not include gdb_locale.h.
1678
cb9f1a9b
GB
16792014-08-07 Gary Benson <gbenson@redhat.com>
1680
1681 * server.h: Do not include gdb/signals.h.
1682 * win32-low.c: Likewise.
1683
a5fceff8
GB
16842014-08-07 Gary Benson <gbenson@redhat.com>
1685
1686 * server.h: Do not include pathmax.h.
1687
b9391142
GB
16882014-08-07 Gary Benson <gbenson@redhat.com>
1689
1690 * server.h: Do not include libiberty.h.
1691 * linux-bfin-low.c: Likewise.
1692
0e443c87
GB
16932014-08-07 Gary Benson <gbenson@redhat.com>
1694
1695 * server.h: Do not include ansidecl.h.
1696
8ebb3f56
GB
16972014-08-07 Gary Benson <gbenson@redhat.com>
1698
1699 * linux-x86-low.c: Do not include stddef.h.
1700 * lynx-ppc-low.c: Likewise.
1701 * tracepoint.c: Likewise.
1702
8980bdf6
GB
17032014-08-07 Gary Benson <gbenson@redhat.com>
1704
1705 * server.h: Do not include stdarg.h.
1706 * nto-low.c: Likewise.
1707
d7096f71
GB
17082014-08-07 Gary Benson <gbenson@redhat.com>
1709
1710 * server.h: Do not include stdlib.h.
1711 * inferiors.c: Likewise.
1712 * linux-low.c: Likewise.
1713 * regcache.c: Likewise.
1714 * spu-low.c: Likewise.
1715 * tracepoint.c: Likewise.
1716 * utils.c: Likewise.
1717
d02f550d
GB
17182014-08-07 Gary Benson <gbenson@redhat.com>
1719
1720 * server.h: Do not include stdio.h.
1721 * linux-low.c: Likewise.
1722 * remote-utils.c: Likewise.
1723 * spu-low.c: Likewise.
1724 * utils.c: Likewise.
1725 * wincecompat.c: Likewise.
1726
87f6c4e3
GB
17272014-08-06 Gary Benson <gbenson@redhat.com>
1728
1729 * regcache.c (init_register_cache): Move conditionals inside if.
1730
7089dca4
GB
17312014-08-06 Gary Benson <gbenson@redhat.com>
1732
1733 * linux-low.c (linux_supports_non_stop): Use target_is_async_p.
1734
462f517e
GB
17352014-07-31 Gary Benson <gbenson@redhat.com>
1736
1737 * ax.h: Do not include server.h.
1738 * gdbthread.h: Likewise.
1739 * lynx-low.h: Likewise.
1740 * notif.h: Likewise.
1741
976411d6
GB
17422014-07-30 Gary Benson <gbenson@redhat.com>
1743
1744 * server.h: Include common-defs.h.
1745 Do not include config.h or build-gnulib-gdbserver/config.h.
1746
d41f6d8e
GB
17472014-07-30 Gary Benson <gbenson@redhat.com>
1748
1749 * hostio-errno.c: Move server.h to top of includes list.
1750 * inferiors.c: Likewise.
1751 * linux-x86-low.c: Likewise.
1752 * notif.c: Include server.h.
1753
314c6a35
TT
17542014-07-24 Tom Tromey <tromey@redhat.com>
1755 Gary Benson <gbenson@redhat.com>
1756
1757 * server.h (CORE_ADDR): Now unsigned.
1758
69ff6be5
PA
17592014-07-16 Pedro Alves <palves@redhat.com>
1760
1761 * linux-low.c (linux_kill_one_lwp): Use kill_lwp, not kill.
1762
ce9e3fe7
PA
17632014-07-15 Pedro Alves <palves@redhat.com>
1764
1765 * linux-low.c (linux_kill_one_lwp): Save errno and work with saved
1766 copy.
1767
e76126e8
PA
17682014-07-11 Pedro Alves <palves@redhat.com>
1769
1770 * linux-low.c (kill_wait_lwp): New function, based on
1771 kill_one_lwp_callback, but use my_waitpid directly.
1772 (kill_one_lwp_callback, linux_kill): Use it.
1773
8e9db26e
PA
17742014-06-23 Pedro Alves <palves@redhat.com>
1775
1776 * linux-x86-low.c (x86_linux_prepare_to_resume): Clear DR_CONTROL
1777 before setting DR0..DR3.
1778
698b3e08
GB
17792014-06-20 Gary Benson <gbenson@redhat.com>
1780
1781 * configure.ac (AC_REPLACE_FUNCS) <vasprintf, vsnprintf>: Removed.
1782 * configure: Regenerated.
1783 * config.in: Likewise.
1784
125f8a3d
GB
17852014-06-20 Gary Benson <gbenson@redhat.com>
1786
1787 * Makefile.in (SFILES): Update locations for files moved
1788 from common to nat.
1789 (object file files): Reordered.
1790
42995dbd
GB
17912014-06-20 Gary Benson <gbenson@redhat.com>
1792
1793 * i386-low.h (i386_dr_low_can_set_addr): Removed.
1794 (i386_dr_low_set_addr): Likewise.
1795 (i386_dr_low_get_addr): Likewise.
1796 (i386_dr_low_can_set_control): Likewise.
1797 (i386_dr_low_set_control): Likewise.
1798 (i386_dr_low_get_control): Likewise.
1799 (i386_dr_low_get_status): Likewise.
1800 (i386_get_debug_register_length): Likewise.
1801 * linux-x86-low.c (i386_dr_low_set_addr):
1802 Changed signature. Made static.
1803 (i386_dr_low_get_addr): Likewise.
1804 (i386_dr_low_set_control): Likewise.
1805 (i386_dr_low_get_control): Likewise.
1806 (i386_dr_low_get_status): Likewise.
1807 (i386_dr_low): New global variable.
1808 * win32-i386-low.c (i386_dr_low_set_addr):
1809 Changed signature. Made static.
1810 (i386_dr_low_get_addr): Likewise.
1811 (i386_dr_low_set_control): Likewise.
1812 (i386_dr_low_get_control): Likewise.
1813 (i386_dr_low_get_status): Likewise.
1814 (i386_dr_low): New global variable.
1815
e1d2394b
MS
18162014-06-20 Marcus Shawcroft <marcus.shawcroft@arm.com>
1817
1818 * configure.ac: Invoke. AC_CHECK_TOOL(AR, ar).
1819 * Makefile.in (AR, AR_FLAGS): Define.
1820 * configure: Regenerate.
1821
3a8ee006
GB
18222014-06-19 Gary Benson <gbenson@redhat.com>
1823
1824 * Makefile.in (i386-dregs.o): New rule.
1825 * configure.srv: Add i386-dregs.o to all targets using i386-low.o.
1826 * i386-low.c (target.h): Remove include.
1827 (TARGET_HAS_DR_LEN_8): Now in i386-dregs.c.
1828 (DR_CONTROL_SHIFT): Likewise.
1829 (DR_CONTROL_SIZE): Likewise.
1830 (DR_RW_EXECUTE): Likewise.
1831 (DR_RW_WRITE): Likewise.
1832 (DR_RW_READ): Likewise.
1833 (DR_RW_IORW): Likewise.
1834 (DR_LEN_1): Likewise.
1835 (DR_LEN_2): Likewise.
1836 (DR_LEN_4): Likewise.
1837 (DR_LEN_8): Likewise.
1838 (DR_LOCAL_ENABLE_SHIFT): Likewise.
1839 (DR_GLOBAL_ENABLE_SHIFT): Likewise.
1840 (DR_ENABLE_SIZE): Likewise.
1841 (DR_LOCAL_SLOWDOWN): Likewise.
1842 (DR_GLOBAL_SLOWDOWN): Likewise.
1843 (DR_CONTROL_RESERVED): Likewise.
1844 (I386_DR_CONTROL_MASK): Likewise.
1845 (I386_DR_VACANT): Likewise.
1846 (I386_DR_LOCAL_ENABLE): Likewise.
1847 (I386_DR_GLOBAL_ENABLE): Likewise.
1848 (I386_DR_DISABLE): Likewise.
1849 (I386_DR_SET_RW_LEN): Likewise.
1850 (I386_DR_GET_RW_LEN): Likewise.
1851 (I386_DR_WATCH_HIT): Likewise.
1852 (i386_wp_op_t): Likewise.
1853 (i386_show_dr): Likewise.
1854 (i386_length_and_rw_bits): Likewise.
1855 (i386_insert_aligned_watchpoint): Likewise.
1856 (i386_remove_aligned_watchpoint): Likewise.
1857 (i386_handle_nonaligned_watchpoint): Likewise.
1858 i386_update_inferior_debug_regs(): Likewise.
1859 (i386_dr_insert_watchpoint): Likewise.
1860 (i386_dr_remove_watchpoint): Likewise.
1861 (i386_dr_region_ok_for_watchpoint): Likewise.
1862 (i386_dr_stopped_data_address): Likewise.
1863 (i386_dr_stopped_by_watchpoint): Likewise.
1864
8f26655c
GB
18652014-06-19 Gary Benson <gbenson@redhat.com>
1866
1867 * i386-low.c (i386_dr_show): Renamed to
1868 i386_show_dr and made static. All uses updated.
1869 (i386_dr_length_and_rw_bits): Renamed to
1870 i386_length_and_rw_bits and made static.
1871 All uses updated.
1872 (i386_dr_insert_aligned_watchpoint): Renamed to
1873 i386_insert_aligned_watchpoint and made static.
1874 All uses updated.
1875 (i386_dr_remove_aligned_watchpoint): Renamed to
1876 i386_remove_aligned_watchpoint and made static.
1877 All uses updated.
1878 (i386_dr_update_inferior_debug_regs): Renamed to
1879 i386_update_inferior_debug_regs and made static.
1880 All uses updated.
1881
b9228891
GB
18822014-06-18 Gary Benson <gbenson@redhat.com>
1883
5171def3
GB
1884 * i386-low.h (i386_dr_low_can_set_addr): New macro.
1885 (i386_dr_low_can_set_control): Likewise.
1886 (i386_get_debug_register_length): Likewise.
1887 * i386-low.c (i386_dr_low_can_set_addr): Now in i386-low.h.
1888 (i386_dr_low_can_set_control): Likewise.
1889 (i386_get_debug_register_length): Likewise.
1890
18912014-06-17 Gary Benson <gbenson@redhat.com>
1892
b9228891
GB
1893 * i386-low.h (i386-dregs.h): New include.
1894 (DR_FIRSTADDR): Now in i386-dregs.h.
1895 (DR_LASTADDR): Likewise.
1896 (DR_NADDR): Likewise.
1897 (DR_STATUS): Likewise.
1898 (DR_CONTROL): Likewise.
1899 (i386_debug_reg_state): Likewise.
1900 (i386_dr_insert_watchpoint): Likewise.
1901 (i386_dr_remove_watchpoint): Likewise.
1902 (i386_dr_region_ok_for_watchpoint): Likewise.
1903 (i386_dr_stopped_data_address): Likewise.
1904 (i386_dr_stopped_by_watchpoint): Likewise.
1905 * i386-low.c (ALL_DEBUG_REGISTERS): Likewise.
1906
4be83cc2
GB
19072014-06-18 Gary Benson <gbenson@redhat.com>
1908
1909 * i386-low.h (i386_low_insert_watchpoint): Renamed to
1910 i386_dr_insert_watchpoint.
1911 (i386_low_remove_watchpoint): Renamed to
1912 i386_dr_remove_watchpoint.
1913 (i386_low_region_ok_for_watchpoint): Renamed to
1914 i386_dr_region_ok_for_watchpoint.
1915 (i386_low_stopped_data_address): Renamed to
1916 i386_dr_stopped_data_address.
1917 (i386_low_stopped_by_watchpoint): Renamed to
1918 i386_dr_stopped_by_watchpoint.
1919 * i386-low.c (i386_show_dr): Renamed to
1920 i386_dr_show and made nonstatic. All uses updated.
1921 (i386_length_and_rw_bits): Renamed to
1922 i386_dr_length_and_rw_bits and made nonstatic.
1923 All uses updated.
1924 (i386_insert_aligned_watchpoint): Renamed to
1925 i386_dr_insert_aligned_watchpoint and made nonstatic.
1926 All uses updated.
1927 (i386_remove_aligned_watchpoint): Renamed to
1928 i386_dr_remove_aligned_watchpoint and made nonstatic.
1929 All uses updated.
1930 (i386_update_inferior_debug_regs): Renamed to
1931 i386_dr_update_inferior_debug_regs and made nonstatic.
1932 All uses updated.
1933 (i386_low_insert_watchpoint): Renamed to
1934 i386_dr_insert_watchpoint. All uses updated.
1935 (i386_low_remove_watchpoint): Renamed to
1936 i386_dr_remove_watchpoint. All uses updated.
1937 (i386_low_region_ok_for_watchpoint): Renamed to
1938 i386_dr_region_ok_for_watchpoint. All uses updated.
1939 (i386_low_stopped_data_address): Renamed to
1940 i386_dr_stopped_data_address. All uses updated.
1941 (i386_low_stopped_by_watchpoint): Renamed to
1942 i386_dr_stopped_by_watchpoint. All uses updated.
1943
131aa0d4
GB
19442014-06-18 Gary Benson <gbenson@redhat.com>
1945
1946 * i386-low.c (i386_dr_low_can_set_addr): New macro.
1947 (i386_dr_low_can_set_control): Likewise.
1948 (i386_insert_aligned_watchpoint): New check.
1949
d9305f7f
GB
19502014-06-18 Gary Benson <gbenson@redhat.com>
1951
1952 * i386-low.c (i386_update_inferior_debug_regs) <inf_state>:
1953 Renamed to state.
1954
e927c9fc
GB
19552014-06-18 Gary Benson <gbenson@redhat.com>
1956
1957 * i386-low.c (i386_length_and_rw_bits): Use internal_error
1958 instead of fatal and error.
1959 (i386_handle_nonaligned_watchpoint): Likewise.
1960
1b6d4134
GB
19612014-06-18 Gary Benson <gbenson@redhat.com>
1962
1963 * i386-low.c (i386_get_debug_register_length): New macro.
1964 (TARGET_HAS_DR_LEN_8): Remove conditional. Use above macro.
1965 (i386_show_dr): Use debug_printf instead of fprintf. Use
1966 phex to format values.
1967
6e62758f
GB
19682014-06-18 Gary Benson <gbenson@redhat.com>
1969
1970 * i386-low.h: Comment changes.
1971 * i386-low.c: Likewise.
1972
fc6e2f03
GB
19732014-06-18 Gary Benson <gbenson@redhat.com>
1974
1975 * i386-low.c: Whitespace changes.
1976
f9d1eeed
TT
19772014-06-12 Tom Tromey <tromey@redhat.com>
1978
1979 * utils.c (freeargv): Remove.
1980
0b04e523
TT
19812014-06-12 Tom Tromey <tromey@redhat.com>
1982
1983 * debug.c (debug_printf): Remove HAVE_GETTIMEOFDAY checks.
1984 * server.c (monitor_show_help): Remove HAVE_GETTIMEOFDAY check.
1985 (parse_debug_format_options): Likewise.
1986 (gdbserver_usage): Likewise.
1987 * Makefile.in (LIBIBERTY_BUILDDIR, LIBIBERTY): New variables.
1988 (SUBDIRS, REQUIRED_SUBDIRS): Add libiberty.
1989 (gdbserver$(EXEEXT), gdbreplay$(EXEEXT)): Depend on and link
1990 against libiberty.
1991 ($(LIBGNU)): Depend on libiberty.
1992 (all-lib): Recurse into all subdirs.
1993 (install-only): Invoke "install" target in subdirs.
1994 (vasprintf.o, vsnprintf.o, safe-ctype.o, lbasename.o): Remove
1995 targets.
1996 * configure: Rebuild.
1997 * configure.ac: Add ACX_CONFIGURE_DIR for libiberty. Don't check
1998 for vasprintf, vsnprintf, or gettimeofday.
1999 * configure.srv: Don't add safe-ctype.o or lbasename.o to
2000 srv_tgtobj.
2001
270c9937
JB
20022014-06-05 Joel Brobecker <brobecker@adacore.com>
2003
2004 * development.sh: Delete.
2005 * Makefile.in (config.status): Adjust dependency on development.sh.
2006 * configure.ac: Adjust development.sh source call.
2007 * configure: Regenerate.
2008
0a261ed8
PA
20092014-06-02 Pedro Alves <palves@redhat.com>
2010
2011 * ax.c (gdb_free_agent_expr): New function.
2012 * ax.h (gdb_free_agent_expr): New declaration.
2013 * mem-break.c (delete_gdb_breakpoint_1): Also clear the commands
2014 list.
2015 (clear_breakpoint_conditions, clear_breakpoint_commands): Make
2016 static.
2017 (clear_breakpoint_conditions_and_commands): New function.
2018 * mem-break.h (clear_breakpoint_conditions): Delete declaration.
2019 (clear_breakpoint_conditions_and_commands): New declaration.
2020
e9dae05e
RR
20212014-05-23 Ramana Radhakrishnan <ramana.radhakrishnan@arm.com>
2022
2023 * linux-aarch64-low.c (asm/ptrace.h): Include.
2024
5876f503
JK
20252014-05-21 Jan Kratochvil <jan.kratochvil@redhat.com>
2026
2027 Fix TLS access for -static -pthread.
2028 * gdbserver/thread-db.c (struct thread_db): Add td_thr_tlsbase_p.
2029 (thread_db_get_tls_address): Call it if LOAD_MODULE is zero.
2030 (thread_db_load_search, try_thread_db_load_1): Initialize it.
2031
802e8e6d
PA
20322014-05-20 Pedro Alves <palves@redhat.com>
2033
2034 * linux-aarch64-low.c (aarch64_insert_point)
2035 (aarch64_remove_point): No longer check whether the type is
2036 supported here. Adjust to new interface.
2037 (the_low_target): Install aarch64_supports_z_point_type as
2038 supports_z_point_type method.
2039 * linux-arm-low.c (raw_bkpt_type_to_arm_hwbp_type): New function.
2040 (arm_linux_hw_point_initialize): Take an enum raw_bkpt_type
2041 instead of a Z packet char. Adjust.
2042 (arm_supports_z_point_type): New function.
2043 (arm_insert_point, arm_remove_point): Adjust to new interface.
2044 (the_low_target): Install arm_supports_z_point_type.
2045 * linux-crisv32-low.c (cris_supports_z_point_type): New function.
2046 (cris_insert_point, cris_remove_point): Adjust to new interface.
2047 Don't check whether the type is supported here.
2048 (the_low_target): Install cris_supports_z_point_type.
2049 * linux-low.c (linux_supports_z_point_type): New function.
2050 (linux_insert_point, linux_remove_point): Adjust to new interface.
2051 * linux-low.h (struct linux_target_ops) <insert_point,
2052 remove_point>: Take an enum raw_bkpt_type instead of a char. Add
2053 raw_breakpoint pointer parameter.
2054 <supports_z_point_type>: New method.
2055 * linux-mips-low.c (mips_supports_z_point_type): New function.
2056 (mips_insert_point, mips_remove_point): Adjust to new interface.
2057 Use mips_supports_z_point_type.
2058 (the_low_target): Install mips_supports_z_point_type.
2059 * linux-ppc-low.c (the_low_target): Install NULL as
2060 supports_z_point_type method.
2061 * linux-s390-low.c (the_low_target): Install NULL as
2062 supports_z_point_type method.
2063 * linux-sparc-low.c (the_low_target): Install NULL as
2064 supports_z_point_type method.
2065 * linux-x86-low.c (x86_supports_z_point_type): New function.
2066 (x86_insert_point): Adjust to new insert_point interface. Use
2067 insert_memory_breakpoint. Adjust to new
2068 i386_low_insert_watchpoint interface.
2069 (x86_remove_point): Adjust to remove_point interface. Use
2070 remove_memory_breakpoint. Adjust to new
2071 i386_low_remove_watchpoint interface.
2072 (the_low_target): Install x86_supports_z_point_type.
2073 * lynx-low.c (lynx_target_ops): Install NULL as
2074 supports_z_point_type callback.
2075 * nto-low.c (nto_supports_z_point_type): New.
2076 (nto_insert_point, nto_remove_point): Adjust to new interface.
2077 (nto_target_ops): Install nto_supports_z_point_type.
2078 * mem-break.c: Adjust intro comment.
2079 (struct raw_breakpoint) <raw_type, size>: New fields.
2080 <inserted>: Update comment.
2081 <shlib_disabled>: Delete field.
2082 (enum bkpt_type) <gdb_breakpoint>: Delete value.
2083 <gdb_breakpoint_Z0, gdb_breakpoint_Z1, gdb_breakpoint_Z2,
2084 gdb_breakpoint_Z3, gdb_breakpoint_Z4>: New values.
2085 (raw_bkpt_type_to_target_hw_bp_type): New function.
2086 (find_enabled_raw_code_breakpoint_at): New function.
2087 (find_raw_breakpoint_at): New type and size parameters. Use them.
2088 (insert_memory_breakpoint): New function, based off
2089 set_raw_breakpoint_at.
2090 (remove_memory_breakpoint): New function.
2091 (set_raw_breakpoint_at): Reimplement.
2092 (set_breakpoint): New, based on set_breakpoint_at.
2093 (set_breakpoint_at): Reimplement.
2094 (delete_raw_breakpoint): Go through the_target->remove_point
2095 instead of assuming memory breakpoints.
2096 (find_gdb_breakpoint_at): Delete.
2097 (Z_packet_to_bkpt_type, Z_packet_to_raw_bkpt_type): New functions.
2098 (find_gdb_breakpoint): New function.
2099 (set_gdb_breakpoint_at): Delete.
2100 (z_type_supported): New function.
2101 (set_gdb_breakpoint_1): New function, loosely based off
2102 set_gdb_breakpoint_at.
2103 (check_gdb_bp_preconditions, set_gdb_breakpoint): New functions.
2104 (delete_gdb_breakpoint_at): Delete.
2105 (delete_gdb_breakpoint_1): New function, loosely based off
2106 delete_gdb_breakpoint_at.
2107 (delete_gdb_breakpoint): New function.
2108 (clear_gdb_breakpoint_conditions): Rename to ...
2109 (clear_breakpoint_conditions): ... this. Don't handle a NULL
2110 breakpoint.
2111 (add_condition_to_breakpoint): Make static.
2112 (add_breakpoint_condition): Take a struct breakpoint pointer
2113 instead of an address. Adjust.
2114 (gdb_condition_true_at_breakpoint): Rename to ...
2115 (gdb_condition_true_at_breakpoint_z_type): ... this, and add
2116 z_type parameter.
2117 (gdb_condition_true_at_breakpoint): Reimplement.
2118 (add_breakpoint_commands): Take a struct breakpoint pointer
2119 instead of an address. Adjust.
2120 (gdb_no_commands_at_breakpoint): Rename to ...
2121 (gdb_no_commands_at_breakpoint_z_type): ... this. Add z_type
2122 parameter. Return true if no breakpoint was found. Change debug
2123 output.
2124 (gdb_no_commands_at_breakpoint): Reimplement.
2125 (run_breakpoint_commands): Rename to ...
2126 (run_breakpoint_commands_z_type): ... this. Add z_type parameter,
2127 and change return type to boolean.
2128 (run_breakpoint_commands): New function.
2129 (gdb_breakpoint_here): Also check for Z1 breakpoints.
2130 (uninsert_raw_breakpoint): Don't try to reinsert a disabled
2131 breakpoint. Go through the_target->remove_point instead of
2132 assuming memory breakpoint.
2133 (uninsert_breakpoints_at, uninsert_all_breakpoints): Uninsert
2134 software and hardware breakpoints.
2135 (reinsert_raw_breakpoint): Go through the_target->insert_point
2136 instead of assuming memory breakpoint.
2137 (reinsert_breakpoints_at, reinsert_all_breakpoints): Reinsert
2138 software and hardware breakpoints.
2139 (check_breakpoints, breakpoint_here, breakpoint_inserted_here):
2140 Check both software and hardware breakpoints.
2141 (validate_inserted_breakpoint): Assert the breakpoint is a
2142 software breakpoint. Set the inserted flag to -1 instead of
2143 setting shlib_disabled.
2144 (delete_disabled_breakpoints): Adjust.
2145 (validate_breakpoints): Only validate software breakpoints.
2146 Adjust to inserted flag change.
2147 (check_mem_read, check_mem_write): Skip breakpoint types other
2148 than software breakpoints. Adjust to inserted flag change.
2149 * mem-break.h (enum raw_bkpt_type): New enum.
2150 (raw_breakpoint, struct process_info): Forward declare.
2151 (Z_packet_to_target_hw_bp_type): Delete declaration.
2152 (raw_bkpt_type_to_target_hw_bp_type, Z_packet_to_raw_bkpt_type)
2153 (set_gdb_breakpoint, delete_gdb_breakpoint)
2154 (clear_breakpoint_conditions): New declarations.
2155 (set_gdb_breakpoint_at, clear_gdb_breakpoint_conditions): Delete.
2156 (breakpoint_inserted_here): Update comment.
2157 (add_breakpoint_condition, add_breakpoint_commands): Replace
2158 address parameter with a breakpoint pointer parameter.
2159 (gdb_breakpoint_here): Update comment.
2160 (delete_gdb_breakpoint_at): Delete.
2161 (insert_memory_breakpoint, remove_memory_breakpoint): Declare.
2162 * server.c (process_point_options): Take a struct breakpoint
2163 pointer instead of an address. Adjust.
2164 (process_serial_event) <Z/z packets>: Use set_gdb_breakpoint and
2165 delete_gdb_breakpoint.
2166 * spu-low.c (spu_target_ops): Install NULL as
2167 supports_z_point_type method.
2168 * target.h: Include mem-break.h.
2169 (struct target_ops) <prepare_to_access_memory>: Update comment.
2170 <supports_z_point_type>: New field.
2171 <insert_point, remove_point>: Take an enum raw_bkpt_type argument
2172 instead of a char. Also take a raw breakpoint pointer.
2173 * win32-arm-low.c (the_low_target): Install NULL as
2174 supports_z_point_type.
2175 * win32-i386-low.c (i386_supports_z_point_type): New function.
2176 (i386_insert_point, i386_remove_point): Adjust to new interface.
2177 (the_low_target): Install i386_supports_z_point_type.
2178 * win32-low.c (win32_supports_z_point_type): New function.
2179 (win32_insert_point, win32_remove_point): Adjust to new interface.
2180 (win32_target_ops): Install win32_supports_z_point_type.
2181 * win32-low.h (struct win32_target_ops):
2182 <supports_z_point_type>: New method.
2183 <insert_point, remove_point>: Take an enum raw_bkpt_type argument
2184 instead of a char. Also take a raw breakpoint pointer.
2185
932539e3
PA
21862014-05-20 Pedro Alves <palves@redhat.com>
2187
2188 * mem-break.h: Include break-common.h.
2189 (Z_PACKET_SW_BP, Z_PACKET_HW_BP, Z_PACKET_WRITE_WP)
2190 (Z_PACKET_READ_WP, Z_PACKET_ACCESS_WP): New defines.
2191 (Z_packet_to_target_hw_bp_type): New declaration.
2192 * mem-break.c (Z_packet_to_target_hw_bp_type): New function.
2193 * i386-low.c (Z_PACKET_HW_BP, Z_PACKET_WRITE_WP, Z_PACKET_READ_WP)
2194 (Z_PACKET_ACCESS_WP): Delete macros.
2195 (Z_packet_to_hw_type): Delete function.
2196 * i386-low.h: Don't include break-common.h here.
2197 (Z_packet_to_hw_type): Delete declaration.
2198 * linux-x86-low.c (x86_insert_point, x86_insert_point): Call
2199 Z_packet_to_target_hw_bp_type instead of Z_packet_to_hw_type.
2200 * win32-i386-low.c (i386_insert_point, i386_remove_point): Call
2201 Z_packet_to_target_hw_bp_type instead of Z_packet_to_hw_type.
2202 * linux-aarch64-low.c: Don't include break-common.h here.
2203 (Z_PACKET_SW_BP, Z_PACKET_HW_BP, Z_PACKET_WRITE_WP)
2204 (Z_PACKET_READ_WP, Z_PACKET_ACCESS_WP): Delete macros.
2205 (Z_packet_to_target_hw_bp_type): Delete function.
2206 * linux-mips-low.c (rsp_bp_type_to_target_hw_bp_type): Delete
2207 function.
2208 (mips_insert_point, mips_remove_point): Use
2209 Z_packet_to_target_hw_bp_type.
2210
4ff0d3d8
PA
22112014-05-20 Pedro Alves <palves@redhat.com>
2212
2213 * linux-aarch64-low.c: Include break-common.h.
2214 (enum target_point_type): Delete.
2215 (Z_packet_to_point_type): Rename to ...
2216 (Z_packet_to_target_hw_bp_type): ... this, and return a
2217 target_hw_bp_type instead.
2218 (aarch64_show_debug_reg_state): Take an enum target_hw_bp_type
2219 instead of an enum target_point_type.
2220 (aarch64_point_encode_ctrl_reg): Likewise. Compute type mask from
2221 breakpoint type.
2222 (aarch64_dr_state_insert_one_point)
2223 (aarch64_dr_state_remove_one_point, aarch64_handle_breakpoint)
2224 (aarch64_handle_aligned_watchpoint)
2225 (aarch64_handle_unaligned_watchpoint, aarch64_handle_watchpoint):
2226 Take an enum target_hw_bp_type instead of an enum
2227 target_point_type.
2228 (aarch64_supports_z_point_type): New function.
2229 (aarch64_insert_point, aarch64_remove_point): Use it. Adjust to
2230 use Z_packet_to_target_hw_bp_type.
2231
786dc519
JB
22322014-05-20 Joel Brobecker <brobecker@adacore.com>
2233
2234 * configure.ac: Only use -Werror by default when DEVELOPMENT
2235 is true.
2236 * configure: Regenerate.
2237
9e0aa64f
JK
22382014-05-19 Jan Kratochvil <jan.kratochvil@redhat.com>
2239
2240 Fix gdbserver qGetTLSAddr for x86_64 -m32.
2241 * linux-x86-low.c (X86_64_USER_REGS): New.
2242 (x86_fill_gregset): Call memset for BUF first in x86_64 -m32 case.
2243
2b577b92
YQ
22442014-04-28 Yao Qi <yao@codesourcery.com>
2245
2246 * Makefile.in (i386-avx512.c): Fix the typo of generated file
2247 name.
2248
94611da2
PA
22492014-04-25 Pedro Alves <palves@redhat.com>
2250
2251 PR server/16255
2252 * linux-low.c (linux_attach_fail_reason_string): New function.
2253 (linux_attach_lwp): Delete.
2254 (linux_attach_lwp_1): Rename to ...
2255 (linux_attach_lwp): ... this. Take a ptid instead of a pid as
2256 argument. Remove "initial" parameter. Return int instead of
2257 void. Don't error or warn here.
2258 (linux_attach): Adjust to call linux_attach_lwp. Call error on
2259 failure to attach to the tgid. Call warning when failing to
2260 attach to an lwp.
2261 * linux-low.h (linux_attach_lwp): Take a ptid instead of a pid as
2262 argument. Remove "initial" parameter. Return int instead of
2263 void. Don't error or warn here.
2264 (linux_attach_fail_reason_string): New declaration.
2265 * thread-db.c (attach_thread): Adjust to linux_attach_lwp's
2266 interface change. Use linux_attach_fail_reason_string.
2267
01f9f808
MS
22682014-04-24 Michael Sturm <michael.sturm@mintel.com>
2269 Walfred Tedeschi <walfred.tedeschi@intel.com>
2270
2271 * Makefile.in: Added rules to handle new files
2272 i386-avx512.c i386-avx512-linux.c amd64-avx512.c
2273 amd64-avx512-linux.c x32-avx512.c x32-avx512-linux.c.
2274 * configure.srv (srv_i386_regobj): Add i386-avx512.o.
2275 (srv_i386_linux_regobj): Add i386-avx512-linux.o.
2276 (srv_amd64_regobj): Add amd64-avx512.o and x32-avx512.o.
2277 (srv_amd64_linux_regobj): Add amd64-avx512-linux.o and
2278 x32-avx512-linux.o.
2279 (srv_i386_32bit_xmlfiles): Add i386/32bit-avx512.xml.
2280 (srv_i386_64bit_xmlfiles): Add i386/64bit-avx512.xml.
2281 (srv_amd64_xmlfiles): Add i386/amd64-avx512.xml and
2282 i386/x32-avx512.xml.
2283 (srv_i386_linux_xmlfiles): Add i386/i386-avx512-linux.xml.
2284 (srv_amd64_linux_xmlfiles): Add i386/amd64-avx512-linux.xml and
2285 i386/x32-avx512-linux.xml.
2286 * i387-fp.c (num_avx512_k_registers): New constant for number
2287 of K registers.
2288 (num_avx512_zmmh_low_registers): New constant for number of
2289 lower ZMM registers (0-15).
2290 (num_avx512_zmmh_high_registers): New constant for number of
2291 higher ZMM registers (16-31).
2292 (num_avx512_ymmh_registers): New contant for number of higher
2293 YMM registers (ymm16-31 added by avx521 on x86_64).
2294 (num_avx512_xmm_registers): New constant for number of higher
2295 XMM registers (xmm16-31 added by AVX512 on x86_64).
2296 (struct i387_xsave): Add space for AVX512 registers.
2297 (i387_cache_to_xsave): Change raw buffer size to 64 characters.
2298 Add code to handle AVX512 registers.
2299 (i387_xsave_to_cache): Add code to handle AVX512 registers.
2300 * linux-x86-low.c (init_registers_amd64_avx512_linux): New
2301 prototypei from generated file.
2302 (tdesc_amd64_avx512_linux): Likewise.
2303 (init_registers_x32_avx512_linux): Likewise.
2304 (tdesc_x32_avx512_linux): Likewise.
2305 (init_registers_i386_avx512_linux): Likewise.
2306 (tdesc_i386_avx512_linux): Likewise.
2307 (x86_64_regmap): Add AVX512 registers.
2308 (x86_linux_read_description): Add code to handle AVX512 XSTATE
2309 mask.
2310 (initialize_low_arch): Add code to initialize AVX512 registers.
2311
51aa91f9
PA
23122014-04-23 Pedro Alves <palves@redhat.com>
2313
2314 * mem-break.c (find_gdb_breakpoint_at): Make static.
2315 * mem-break.h (find_gdb_breakpoint_at): Delete declaration.
2316
a4165e94
PA
23172014-04-23 Pedro Alves <palves@redhat.com>
2318
2319 * i386-low.c: Don't include break-common.h here.
2320 (i386_low_insert_watchpoint, i386_low_remove_watchpoint): Change
2321 prototype to take target_hw_bp_type as argument instead of a Z
2322 packet char.
2323 * i386-low.h: Include break-common.h here.
2324 (Z_packet_to_hw_type): Declare.
2325 (i386_low_insert_watchpoint, i386_low_remove_watchpoint): Change
2326 prototypes.
2327 * linux-x86-low.c (x86_insert_point): Convert the packet number to
2328 a target_hw_bp_type before calling i386_low_insert_watchpoint.
2329 (x86_remove_point): Convert the packet number to a
2330 target_hw_bp_type before calling i386_low_remove_watchpoint.
2331 * win32-i386-low.c (i386_insert_point): Convert the packet number
2332 to a target_hw_bp_type before calling i386_low_insert_watchpoint.
2333 (i386_remove_point): Convert the packet number to a
2334 target_hw_bp_type before calling i386_low_remove_watchpoint.
2335
b8acf843
PA
23362014-04-23 Pedro Alves <palves@redhat.com>
2337
2338 * utils.h (perror_with_name): Add ATTRIBUTE_NORETURN.
2339
d708bcd1
PA
23402014-04-10 Pedro Alves <palves@redhat.com>
2341
2342 * mem-break.c (add_breakpoint_condition, add_breakpoint_commands):
2343 Check if the condition or command is NULL before checking if the
2344 breakpoint is known. On success, return true.
2345 * mem-break.h (add_breakpoint_condition): Document return.
2346 (add_breakpoint_commands): Add describing comment.
2347 * server.c (skip_to_semicolon): New function.
2348 (process_point_options): Use it.
2349
2eec7d5b
PA
23502014-04-09 Pedro Alves <palves@redhat.com>
2351
2352 * linux-low.c (linux_read_loadmap): Pass current_inferior directly
2353 to lwpid_of.
2354
fa96cb38
PA
23552014-02-27 Pedro Alves <palves@redhat.com>
2356
2357 PR 12702
2358 * inferiors.h (A_I_NEXT, ALL_INFERIORS_TYPE, ALL_PROCESSES): New
2359 macros.
2360 * linux-low.c (delete_lwp, handle_extended_wait): Add debug
2361 output.
2362 (last_thread_of_process_p): Take a PID argument instead of a
2363 thread pointer.
2364 (linux_wait_for_lwp): Delete.
2365 (num_lwps, check_zombie_leaders, not_stopped_callback): New
2366 functions.
2367 (linux_low_filter_event): New function, party factored out from
2368 linux_wait_for_event.
2369 (linux_wait_for_event): Rename to ...
2370 (linux_wait_for_event_filtered): ... this. Add new filter ptid
2371 argument. Partly rewrite. Always use waitpid(-1, WNOHANG) and
2372 sigsuspend. Check for zombie leaders.
2373 (linux_wait_for_event): Reimplement as wrapper around
2374 linux_wait_for_event_filtered.
2375 (linux_wait_1): Handle TARGET_WAITKIND_NO_RESUMED. Assume that if
2376 a normal or signal exit is seen, it's the whole process exiting.
2377 (wait_for_sigstop): No longer a for_each_inferior callback.
2378 Rewrite on top of linux_wait_for_event_filtered.
2379 (stop_all_lwps): Call wait_for_sigstop directly.
2380 * server.c (resume, handle_target_event): Handle
2381 TARGET_WAITKIND_NO_RESUMED.
2382
d763de10
JB
23832014-02-26 Joel Brobecker <brobecker@adacore.com>
2384
2385 * win32-low.c (psapi_get_dll_name,
2386 * win32_CreateToolhelp32Snapshot): Delete.
2387 (win32_CreateToolhelp32Snapshot, win32_Module32First)
2388 (win32_Module32Next, load_toolhelp, toolhelp_get_dll_name):
2389 Delete.
2390 (handle_load_dll): Add function description.
2391 Remove code using psapi_get_dll_name and toolhelp_get_dll_name.
2392
850a0f76
JB
23932014-02-26 Joel Brobecker <brobecker@adacore.com>
2394
2395 * win32-low.c (win32_add_one_solib): Add 0x1000 to load_addr.
2396 Add comment.
2397 (win32_add_all_dlls): Remove 0x1000 offset applied to DLL
2398 base address when calling win32_add_one_solib.
2399 (handle_load_dll): Delete local variable load_addr.
2400 Remove 0x1000 offset applied to DLL base address when calling
2401 win32_add_one_solib.
2402 (handle_unload_dll): Add comment.
2403
f25b3fc3
JB
24042014-02-26 Joel Brobecker <brobecker@adacore.com>
2405
2406 * win32-low.c (win32_add_all_dlls): Renames
2407 win32_ensure_ntdll_loaded. Rewrite function documentation.
2408 Adjust implementation to always load all DLLs.
2409 Add 0x1000 offset to DLL base address when calling
2410 win32_add_one_solib.
2411 (child_initialization_done): New static global.
2412 (do_initial_child_stuff): Set child_initialization_done to
2413 zero during child initialization, and 1 after. Replace call
2414 to win32_ensure_ntdll_loaded by call to win32_add_all_dlls.
2415 Add comment.
2416 (match_dll_by_basename, dll_is_loaded_by_basename): Delete.
2417 (handle_unload_dll): Add function documentation.
2418 (get_child_debug_event): Ignore load and unload DLL events
2419 during child initialization.
2420
d86d4aaf
DE
24212014-02-20 Doug Evans <dje@google.com>
2422
3bc32da3 2423 Remove global all_lwps.
d86d4aaf
DE
2424 * inferiors.h (ptid_of): Move here from linux-low.h.
2425 (pid_of, lwpid_of): Ditto.
2426 * linux-aarch64-low.c (debug_reg_change_callback): Update, "entry"
2427 parameter is a struct thread_info * now.
2428 (aarch64_notify_debug_reg_change): Fetch pid from current_inferior
2429 directly. Pass &all_threads to find_inferior instead of &all_lwps.
2430 (aarch64_stopped_data_address): Fetch lwpid from current_inferior
2431 directly.
2432 (aarch64_linux_prepare_to_resume): Fetch ptid from thread.
2433 (aarch64_arch_setup): Fetch lwpid from current_inferior directly.
2434 * linux-arm-low.c (update_registers_callback): Update, "entry"
2435 parameter is a struct thread_info * now.
2436 Fetch lwpid from current_inferior directly.
2437 (arm_insert_point): Pass &all_threads to find_inferior instead of
2438 &all_lwps.
2439 (arm_remove_point): Ditto.
2440 (arm_stopped_by_watchpoint): Fetch lwp from current_inferior.
2441 (arm_prepare_to_resume): Fetch pid from thread.
2442 (arm_read_description): Fetch lwpid from current_inferior directly.
2443 * linux-low.c (all_lwps): Delete.
2444 (delete_lwp): Delete call to remove_inferior.
2445 (handle_extended_wait): Fetch lwpid from thread.
2446 (add_lwp): Don't set lwp->entry.id. Remove call to
2447 add_inferior_to_list.
2448 (linux_attach_lwp_1): Fetch pid from current_inferior directly.
2449 (linux_kill_one_lwp): Fetch ptid,lwpid from thread.
2450 (kill_one_lwp_callback): Ditto.
2451 (linux_kill): Don't dereference NULL pointer.
2452 Fetch ptid,lwpid from thread.
2453 (get_detach_signal): Fetch ptid from thread.
2454 (linux_detach_one_lwp): Fetch ptid,lwpid from thread.
2455 Simplify call to regcache_invalidate_thread.
2456 (delete_lwp_callback): Update, "entry" parameter is a
2457 struct thread_info * now. Fetch pid from thread.
2458 (linux_mourn): Pass &all_threads to find_inferior instead of &all_lwps.
2459 (status_pending_p_callback): Update, "entry" parameter is a
2460 struct thread_info * now. Fetch ptid from thread.
2461 (find_lwp_pid): Update, "entry" parameter is a
2462 struct thread_info * now.
2463 (linux_wait_for_lwp): Fetch pid from thread.
2464 (linux_fast_tracepoint_collecting): Fetch lwpid from thread.
2465 (maybe_move_out_of_jump_pad): Fetch lwpid from current_inferior.
2466 (enqueue_one_deferred_signal): Fetch lwpid from thread.
2467 (dequeue_one_deferred_signal): Ditto.
2468 (cancel_breakpoint): Fetch ptid from current_inferior.
2469 (linux_wait_for_event): Pass &all_threads to find_inferior,
2470 not &all_lwps. Fetch ptid, lwpid from thread.
2471 (count_events_callback): Update, "entry" parameter is a
2472 struct thread_info * now.
2473 (select_singlestep_lwp_callback): Ditto.
2474 (select_event_lwp_callback): Ditto.
2475 (cancel_breakpoints_callback): Ditto.
2476 (linux_cancel_breakpoints): Pass &all_threads to find_inferior,
2477 not &all_lwps.
2478 (select_event_lwp): Ditto. Fetch ptid from event_thread.
2479 (unsuspend_one_lwp): Update, "entry" parameter is a
2480 struct thread_info * now.
2481 (unsuspend_all_lwps): Pass &all_threads to find_inferior,
2482 not &all_lwps.
2483 (linux_stabilize_threads): Ditto. And for for_each_inferior.
2484 Fetch lwpid from thread, not lwp.
2485 (linux_wait_1): Fetch ptid, lwpid from current_inferior.
2486 Pass &all_threads to find_inferior, not &all_lwps.
2487 (send_sigstop): Fetch lwpid from thread, not lwp.
2488 (send_sigstop_callback): Update, "entry" parameter is a
2489 struct thread_info * now.
2490 (suspend_and_send_sigstop_callback): Ditto.
2491 (wait_for_sigstop): Ditto. Fetch ptid, lwpid from thread, lwp.
2492 (stuck_in_jump_pad_callback): Update, "entry" parameter is a
2493 struct thread_info * now.
2494 (move_out_of_jump_pad_callback): Ditto. Fetch ptid, lwpid
2495 from thread, lwp.
2496 (lwp_running): Update, "entry" parameter is a
2497 struct thread_info * now.
2498 (stop_all_lwps): Fetch ptid from thread.
2499 Pass &all_threads to find_inferior, for_each_inferior, not &all_lwps.
2500 (linux_resume_one_lwp): Fetch lwpid from thread.
2501 (linux_set_resume_request): Update, "entry" parameter is a
2502 struct thread_info * now. Fetch pid, lwpid from thread.
2503 (resume_status_pending_p): Update, "entry" parameter is a
2504 struct thread_info * now.
2505 (need_step_over_p): Ditto. Fetch lwpid from thread.
2506 (start_step_over): Fetch lwpid from thread.
2507 (linux_resume_one_thread): Update, "entry" parameter is a
2508 struct thread_info * now. Fetch lwpid from thread.
2509 (linux_resume): Pass &all_threads to find_inferior, not &all_lwps.
2510 (proceed_one_lwp): Update, "entry" parameter is a
2511 struct thread_info * now. Fetch lwpid from thread.
2512 (unsuspend_and_proceed_one_lwp): Update, "entry" parameter is a
2513 struct thread_info * now.
2514 (proceed_all_lwps): Pass &all_threads to find_inferior, not &all_lwps.
2515 (unstop_all_lwps): Ditto. Fetch lwpid from thread.
2516 (regsets_fetch_inferior_registers): Fetch lwpid from current_inferior
2517 directly.
2518 (regsets_store_inferior_registers): Ditto.
2519 (fetch_register, store_register): Ditto.
2520 (linux_read_memory, linux_write_memory): Ditto.
2521 (linux_request_interrupt): Ditto.
2522 (linux_read_auxv): Ditto.
2523 (linux_xfer_siginfo): Ditto.
2524 (linux_qxfer_spu): Ditto.
2525 (linux_qxfer_libraries_svr4): Ditto.
2526 * linux-low.h (ptid_of, pid_of, lwpid_of): Delete,
2527 moved to inferiors.h.
2528 (get_lwp): Delete.
2529 (get_thread_lwp): Update.
2530 (struct lwp_info): Delete member "entry". Simplify comment for
2531 member "thread".
2532 (all_lwps): Delete.
2533 * linux-mips-low.c (mips_read_description): Fetch lwpid from
2534 current_inferior directly.
2535 (update_watch_registers_callback): Update, "entry" parameter is a
2536 struct thread_info * now. Fetch pid from thread.
2537 (mips_linux_prepare_to_resume): Fetch ptid from thread.
2538 (mips_insert_point): Fetch lwpid from current_inferior.
2539 Pass &all_threads to find_inferior, not &all_lwps.
2540 (mips_remove_point): Pass &all_threads to find_inferior, not &all_lwps.
2541 (mips_stopped_by_watchpoint): Fetch lwpid from current_inferior
2542 directly.
2543 (mips_stopped_data_address): Ditto.
2544 * linux-s390-low.c (s390_arch_setup): Fetch pid from current_inferior
2545 directly.
2546 * linux-tile-low.c (tile_arch_setup): Ditto.
2547 * linux-x86-low.c (x86_get_thread_area): Fetch lwpid from thread.
2548 (update_debug_registers_callback): Update, "entry" parameter is a
2549 struct thread_info * now. Fetch pid from thread.
2550 (i386_dr_low_set_addr): Fetch pid from current_inferior directly.
2551 Pass &all_threads to find_inferior, not &all_lwps.
2552 (i386_dr_low_get_addr): Fetch ptid from current_inferior directly.
2553 (i386_dr_low_set_control): Fetch pid from current_inferior directly.
2554 Pass &all_threads to find_inferior, not &all_lwps.
2555 (i386_dr_low_get_control): Fetch ptid from current_inferior directly.
2556 (i386_dr_low_get_status): Ditto.
2557 (x86_linux_prepare_to_resume): Fetch ptid from thread.
2558 (x86_siginfo_fixup): Fetch lwpid from current_inferior directly.
2559 (x86_linux_read_description): Ditto.
2560 * proc-service.c (ps_getpid): Fetch pid from current_inferior directly.
2561
3b8361aa
DE
25622014-02-20 Doug Evans <dje@google.com>
2563
2564 * inferiors.c (get_first_inferior): Fix buglet.
2565
f7667f0d
DE
25662014-02-19 Doug Evans <dje@google.com>
2567
2568 * gdbthread.h (add_thread): Change result type to struct thread_info *.
2569 * inferiors.c (add_thread): Change result type to struct thread_info *.
2570 All callers updated.
2571 (add_lwp): Call add_thread here instead of in callers.
2572 All callers updated.
2573 * linux-low.h (get_lwp_thread): Rewrite.
2574 (struct lwp_info): New member "thread".
2575
b3312d80
DE
25762014-02-19 Doug Evans <dje@google.com>
2577
2578 * linux-low.c (add_lwp): Change result to struct lwp_info *.
2579 All callers updated.
2580
ecc6f45c
DE
25812014-02-19 Doug Evans <dje@google.com>
2582
2583 * inferiors.c (add_thread): Fix whitespace.
2584
649ebbca
DE
25852014-02-19 Doug Evans <dje@google.com>
2586
2587 * dll.c (clear_dlls): Replace accessing list implemention details
2588 with API function.
2589 * gdbthread.h (get_first_thread): Declare.
2590 * inferiors.c (for_each_inferior_with_data): New function.
2591 (get_first_thread): New function.
2592 (find_thread_ptid): Simplify.
2593 (get_first_inferior): New function.
2594 (clear_list): Delete.
2595 (one_inferior_p): New function.
2596 (clear_inferior_list): New function.
2597 (clear_inferiors): Update.
2598 * inferiors.h (for_each_inferior_with_data): Declare.
2599 (clear_inferior_list): Declare.
2600 (one_inferior_p): Declare.
2601 (get_first_inferior): Declare.
2602 * linux-low.c (linux_wait_for_event): Replace accessing list
2603 implemention details with API function.
2604 * server.c (target_running): Ditto.
2605 (accumulate_file_name_length): New function.
2606 (emit_dll_description): New function.
2607 (handle_qxfer_libraries): Replace accessing list implemention
2608 details with API function.
2609 (handle_qxfer_threads_worker): New function.
2610 (handle_qxfer_threads_proper): Replace accessing list implemention
2611 details with API function.
2612 (handle_query): Ditto.
2613 (visit_actioned_threads_callback_ftype): New typedef.
2614 (visit_actioned_threads_data): New struct.
2615 (visit_actioned_threads): Rewrite to be find_inferior callback.
2616 (resume): Call find_inferior.
2617 (handle_status): Replace accessing list implemention
2618 details with API function.
2619 (process_serial_event): Replace accessing list implemention details
2620 with API function.
2621 * target.c (set_desired_inferior): Replace accessing list implemention
2622 details with API function.
2623 * tracepoint.c (same_process_p): New function.
2624 (gdb_agent_about_to_close): Replace accessing list implemention
2625 details with API function.
2626 * win32-low.c (child_delete_thread): Replace accessing list
2627 implemention details with API function.
2628 (match_dll_by_basename): New function.
2629 (dll_is_loaded_by_basename): New function.
2630 (win32_ensure_ntdll_loaded): Replace accessing list implemention
2631 details call to dll_is_loaded_by_basename.
2632
80894984
DE
26332014-02-19 Doug Evans <dje@google.com>
2634
2635 * dll.h (struct dll_info): Add comment.
2636 * gdbthread.h (struct thread_info): Add comment.
2637 (current_ptid): Simplify.
2638 * inferiors.c (add_process): Update.
2639 (remove_process): Update.
2640 * inferiors.h (struct process_info): Rename member "head" to "entry".
2641 * linux-low.c (delete_lwp): Update.
2642 (add_lwp): Update.
2643 (last_thread_of_process_p): Update.
2644 (kill_one_lwp_callback, linux_kill): Update.
2645 (status_pending_p_callback): Update.
2646 (wait_for_sigstop): Update. Simplify read of ptid.
2647 (start_step_over): Update.
2648 * linux-low.h (ptid_of, pid_of, lwpid_of): Update.
2649 (get_lwp_thread): Update.
2650 (struct lwp_info): Rename member "head" to "entry".
2651 * regcache.h (inferior_list_entry): Delete.
2652 * server.c (kill_inferior_callback): Update.
2653 (detach_or_kill_inferior_callback): Update.
2654 (print_started_pid): Update.
2655 (print_attached_pid): Update.
2656 (process_serial_event): Simplify read of ptid.
2657 * thread-db.c (thread_db_create_event): Update.
2658 (thread_db_get_tls_address): Update.
2659 * win32-low.c (current_inferior_ptid): Simplify.
2660
46917d26
TT
26612014-02-19 Tom Tromey <tromey@redhat.com>
2662
2663 * target.h (struct target_ops) <supports_btrace>: Add target_ops
2664 argument.
2665 (target_supports_btrace): Update.
2666
0759a81e
YQ
26672014-02-14 Yao Qi <yao@codesourcery.com>
2668
2669 * Makefile.in (IPA_OBJS): Append rsp-low-ipa.o.
2670 (rsp-low-ipa.o): New target.
2671
a7191e8b
TT
26722014-02-12 Tom Tromey <tromey@redhat.com>
2673
2674 * ax.c (gdb_parse_agent_expr): Use hex2bin, not
2675 convert_ascii_to_int.
2676 * regcache.c (registers_to_string): Likewise.
2677 * remote-utils.c (decode_M_packet): Likewise.
2678 * server.c (process_serial_event): Likewise.
2679
ff0e980e
TT
26802014-02-12 Tom Tromey <tromey@redhat.com>
2681
2682 * server.c (handle_query, handle_v_run): Use hex2bin, not
2683 unhexify.
2684 * tracepoint.c (cmd_qtdpsrc, cmd_qtdv, cmd_qtnotes): Likewise.
2685
e9371aff
TT
26862014-02-12 Tom Tromey <tromey@redhat.com>
2687
2688 * ax.c (gdb_unparse_agent_expr): Use bin2hex, not
2689 convert_int_to_ascii.
2690 * regcache.c (registers_to_string, collect_register_as_string):
2691 Likewise.
2692 * remote-utils.c (look_up_one_symbol, relocate_instruction):
2693 Likewise.
2694 * server.c (process_serial_event): Likewise.
2695 * tracepoint.c (cmd_qtstatus, response_source, response_tsv)
2696 (cmd_qtbuffer, cstr_to_hexstr): Likewise.
2697
971dc0b8
TT
26982014-02-12 Tom Tromey <tromey@redhat.com>
2699
2700 * remote-utils.c (look_up_one_symbol, monitor_output): Use
2701 bin2hex, not hexify.
2702 * tracepoint.c (cmd_qtstatus): Likewise.
2703
0a822afb
TT
27042014-02-12 Tom Tromey <tromey@redhat.com>
2705
2706 * remote-utils.c (monitor_output): Pass explicit length to
2707 hexify.
2708
9c3d6531
TT
27092014-02-12 Tom Tromey <tromey@redhat.com>
2710
2711 * tracepoint.c: Include rsp-low.h.
2712 * server.c: Include rsp-low.h.
2713 * remote-utils.h (convert_ascii_to_int, convert_int_to_ascii)
2714 (unhexify, hexify, remote_escape_output, unpack_varlen_hex): Don't
2715 declare.
2716 * remote-utils.c: Include rsp-low.h.
2717 (fromhex, hexchars, ishex, unhexify, tohex, hexify)
2718 (remote_escape_output, remote_unescape_input, unpack_varlen_hex)
2719 (convert_int_to_ascii, convert_ascii_to_int): Move to
2720 common/rsp-low.c.
2721 * regcache.c: Include rsp-low.h.
2722 * ax.c: Include rsp-low.h.
2723 * Makefile.in (SFILES): Add common/rsp-low.c.
2724 (OBS): Add rsp-low.o.
2725 (rsp-low.o): New target.
2726
01fd3ea5
TT
27272014-02-12 Tom Tromey <tromey@redhat.com>
2728
2729 * utils.h (pulongest, plongest, phex_nz): Don't declare.
2730 Include print-utils.h.
2731 * utils.c (NUMCELLS, CELLSIZE, get_cell, decimal2str, pulongest)
2732 (plongest, thirty_two, phex_nz): Remove.
2733 * Makefile.in (SFILES): Add common/print-utils.c.
2734 (OBS): Add print-utils.o.
2735 (print-utils-ipa.o): New target.
2736 (print-utils.o): New target.
2737 (IPA_OBJS): Add print-utils-ipa.o.
2738
e99dc820
TT
27392014-02-06 Tom Tromey <tromey@redhat.com>
2740
2741 * Makefile.in (SFILES): Fix indentation.
2742
ee1e2d4f
DE
27432014-02-05 Doug Evans <dje@google.com>
2744
2745 * linux-low.c (linux_wait_for_event): Improve comment.
2746 (linux_wait_1): Keep current_inferior in sync with event_child.
2747
f5a02773
DE
27482014-01-22 Doug Evans <dje@google.com>
2749
2750 * gdbthread.h (gdb_id_to_thread): Delete, unused.
2751
87ce2a04
DE
27522014-01-22 Doug Evans <dje@google.com>
2753
2754 * configure.ac (AC_CHECK_FUNCS): Add test for gettimeofday.
2755 * configure: Regenerate.
2756 * config.in: Regenerate.
2757 * Makefile.in (SFILES): Add debug.c.
2758 (OBS): Add debug.o.
2759 * debug.c: New file.
2760 * debug.h: New file.
2761 * linux-aarch64-low.c (*): Update all debugging printfs to use
2762 debug_printf instead of fprintf.
2763 * linux-arm-low.c (*): Ditto.
2764 * linux-cris-low.c (*): Ditto.
2765 * linux-crisv32-low.c (*): Ditto.
2766 * linux-m32r-low.c (*): Ditto.
2767 * linux-sparc-low.c (*): Ditto.
2768 * linux-x86.c (*): Ditto.
2769 * linux-low.c (*): Ditto.
2770 (linux_wait_1): Add calls to debug_enter, debug_exit.
2771 (linux_wait): Remove redundant debugging printf.
2772 (stop_all_lwps): Add calls to debug_enter, debug_exit.
2773 (linux_resume, unstop_all_lwps): Ditto.
2774 * mem-break.c (*): Update all debugging printfs to use
2775 debug_printf instead of fprintf.
2776 * remote-utils.c (*): Ditto.
2777 * thread-db.c (*): Ditto.
2778 * server.c #include <ctype.h>, "gdb_vecs.h".
2779 (debug_threads): Moved to debug.c.
2780 (*): Update all debugging printfs to use debug_printf instead of
2781 fprintf.
2782 (start_inferior): Replace call to fflush with call to debug_flush.
2783 (monitor_show_help): Mention set debug-format.
2784 (parse_debug_format_options): New function.
2785 (handle_monitor_command): Handle "monitor set debug-format".
2786 (gdbserver_usage): Mention --debug-format.
2787 (main): Parse --debug-format.
2788 * server.h (debug_threads): Declaration moved to debug.h.
2789 #include "debug.h".
2790 * tracepoint.c (trace_debug_1) [!IN_PROCESS_AGENT]: Add version of
2791 trace_debug_1 that uses debug_printf.
2792 (tracepoint_look_up_symbols): Update all debugging printfs to use
2793 debug_printf instead of fprintf.
2794
e671835b
BS
27952014-01-20 Baruch Siach <baruch@tkos.co.il>
2796
2797 * linux-xtensa-low.c: Include asm/ptrace.h instead of
2798 sys/ptrace.h.
2799
b5737fa9
PA
28002014-01-17 Pedro Alves <palves@redhat.com>
2801
ea38d2a9 2802 PR build/16445
c7faa97a
PA
2803 * linux-x86-low.c: Don't include elf/common.h if ELFMAG0 is
2804 defined after including gdb_proc_service.h.
b5737fa9 2805
40ed484e
DE
28062014-01-16 Doug Evans <dje@google.com>
2807
2808 * dll.c (UNSPECIFIED_CORE_ADDR): New macro.
2809 (match_dll): Use it.
2810
969c39fb
MM
28112014-01-16 Markus Metzger <markus.t.metzger@intel.com>
2812
2813 * target.h (target_ops) <read_btrace>: Change parameters and
2814 return type to allow error reporting.
2815 * server.c (handle_qxfer_btrace): Support delta reads. Pass
2816 trace reading errors on.
2817 * linux-low.c (linux_low_read_btrace): Pass trace reading
2818 errors on.
2819 (linux_low_disable_btrace): New.
2820
ab7f45ba
DE
28212014-01-15 Doug Evans <dje@google.com>
2822
2823 * inferiors.c (thread_id_to_gdb_id): Delete.
2824 * inferiors.h (thread_id_to_gdb_id): Delete.
2825
66af0f44
EZ
28262014-01-13 Eli Zaretskii <eliz@gnu.org>
2827
2828 * Makefile.in (INCLUDE_CFLAGS): Remove trailing slash from
2829 "-I$(srcdir)/../". Fixes MinGW compilation errors with old GCC
2830 versions.
2831
9939e131
PA
28322014-01-08 Pedro Alves <palves@redhat.com>
2833
2834 * server.c (handle_status): Don't discard previous queued stop
2835 replies or thread's pending status here.
2836 (main) <disconnection>: Do it here instead.
2837
b7ea362b
PA
28382014-01-08 Pedro Alves <palves@redhat.com>
2839
2840 * gdbthread.h (struct thread_info) <status_pending_p>: New field.
2841 * server.c (visit_actioned_threads, handle_pending_status): New
2842 function.
2843 (handle_v_cont): Factor out parts to ...
2844 (resume): ... this new function. If in all-stop, and a thread
2845 being resumed has a pending status, report it without actually
2846 resuming.
2847 (myresume): Adjust to use the new 'resume' function.
2848 (clear_pending_status_callback, set_pending_status_callback)
2849 (find_status_pending_thread_callback): New functions.
2850 (handle_status): Handle the case of multiple threads having
2851 interesting statuses to report. Report threads' real last signal
2852 instead of always reporting GDB_SIGNAL_TRAP. Look for a thread
2853 with an interesting thread to report the status for, instead of
2854 always reporting the status of the first thread.
2855
28498c42
JB
28562014-01-01 Joel Brobecker <brobecker@adacore.com>
2857
2858 * gdbserver.c (gdbserver_version): Set copyright year to 2014.
2859 * gdbreplay.c (gdbreplay_version): Likewise.
2860
f45c82da
YZ
28612013-12-18 Yufeng Zhang <yufeng.zhang@arm.com>
2862
2863 * linux-aarch64-low.c (aarch64_linux_set_debug_regs): Set
2864 iov.iov_len with the real length in use.
2865
379a5e2d
JB
28662013-12-13 Joel Brobecker <brobecker@adacore.com>
2867
2868 * Makefile.in (safe-ctype.o, lbasename.o): New rules.
2869 * configure.srv: Add safe-ctype.o and lbasename.o to srv_tgtobj
2870 for all targets that use win32-low.c.
2871 * win32-low.c (win32_ensure_ntdll_loaded): New function.
2872 (do_initial_child_stuff): Add call to win32_ensure_ntdll_loaded.
2873
4210d83e
PA
28742013-12-13 Pedro Alves <palves@redhat.com>
2875
2876 * target.c (mywait): Set OURSTATUS->KIND to TARGET_WAITKIND_STOPPED
2877 if equal to TARGET_WAITKIND_LOADED.
2878 * win32-low.c (cached_status): New static global.
2879 (win32_wait): Add declaration.
2880 (do_initial_child_stuff): Flush all initial pending debug events
2881 up to the initial breakpoint.
2882 (win32_wait): If CACHED_STATUS was set, return that instead
2883 of doing a real wait. Remove the code resuming the execution
2884 of the inferior after receiving a TARGET_WAITKIND_LOADED event
2885 during the initial phase. Also remove the code changing
2886 OURSTATUS->KIND from TARGET_WAITKIND_LOADED to
2887 TARGET_WAITKIND_STOPPED.
2888
e7f0d979
YQ
28892013-12-11 Yao Qi <yao@codesourcery.com>
2890
2891 * notif.c (handle_notif_ack): Return 0 if no notification
2892 matches.
2893
ebcf782c
DE
28942013-11-20 Doug Evans <dje@google.com>
2895
2896 * linux-low.c (linux_set_resume_request): Fix comment.
2897
20ad9378
DE
28982013-11-20 Doug Evans <dje@google.com>
2899
2900 * linux-low.c (resume_status_pending_p): Tweak comment.
2901
a196ebeb
WT
29022013-11-20 Walfred Tedeschi <walfred.tedeschi@intel.com>
2903
2904 * Makefile.in: Add i386-mpx.c, i386-mpx-linux.c, amd64-mpx.c,
2905 amd64-mpx-linux.c, x32-mpx.c and x32-mpx-linux.c generation.
2906 * configure.srv (srv_i386_regobj): Add i386-mpx.o.
2907 (srv_i386_linux_regobj): Add i386-mpx-linux.o.
2908 (srv_amd64_regobj): Add amd64-mpx.o.
2909 (srv_amd64_linux_regobj): Add amd64-mpx-linux.o.
2910 (srv_i386_32bit_xmlfiles): Add i386/32bit-mpx.xml.
2911 (srv_i386_64bit_xmlfiles): Add i386/64bit-mpx.xml.
2912 * i387-fp.c (num_pl_bnd_register) Added constant.
2913 (num_pl_bnd_cfg_registers) Added constant.
2914 (struct i387_xsave) Added reserved area and MPX fields.
2915 (i387_cache_to_xsave, i387_xsave_to_cache) Add MPX.
2916 * linux-x86-low.c (init_registers_i386_mpx_linux): Declare new
2917 function.
2918 (tdesc_i386_mpx_linux): Add MPX amd64 target.
2919 (init_registers_amd64_mpx_linux): Declare new function.
2920 (tdesc_amd64_mpx_linux): Add MPX amd64 target.
2921 (x86_64_regmap): Add MPX registers.
2922 (x86_linux_read_description): Add MPX case.
2923 (initialize_low_arch): Initialize MPX targets.
2924
0080a2f6
TT
29252013-11-18 Tom Tromey <tromey@redhat.com>
2926
2927 * configure: Rebuild.
2928 * configure.ac: Don't check for stdlib.h.
2929 * gdbreplay.c: Unconditionally include stdlib.h.
2930
2978b111
TT
29312013-11-18 Tom Tromey <tromey@redhat.com>
2932
2933 * config.in: Rebuild.
2934 * configure: Rebuild.
2935 * configure.ac: Don't use AC_HEADER_DIRENT.
2936
a3d08894
TT
29372013-11-18 Tom Tromey <tromey@redhat.com>
2938
2939 * server.h: Don't check HAVE_STRING_H.
2940 * gdbreplay.c: Don't check HAVE_STRING_H.
2941 * configure: Rebuild.
2942
0a5dd17d
TT
29432013-11-18 Tom Tromey <tromey@redhat.com>
2944
2945 * Makefile.in (gdbreplay$(EXEEXT)): Depend on and link against
2946 LIBGNU.
2947
1bd2f0ba
TT
29482013-11-08 Tom Tromey <tromey@redhat.com>
2949
2950 * configure, config.in: Rebuild.
2951 * configure.ac: Remove unused configury.
2952
3266f10b
TT
29532013-11-08 Tom Tromey <tromey@redhat.com>
2954
2955 * acinclude.m4: Include common.m4, codeset.m4.
2956 * configure, config.in: Rebuild.
2957 * configure.ac: Use GDB_AC_COMMON.
2958
6682d959
AA
29592013-11-06 Andreas Arnez <arnez@linux.vnet.ibm.com>
2960
2961 * linux-s390-low.c (HWCAP_S390_TE): New define.
2962 (s390_arch_setup): Consider the TE field in the HWCAP for
2963 determining 'have_regset_tdb'.
2964
fd0a4d76
SDJ
29652013-10-16 Sergio Durigan Junior <sergiodj@redhat.com>
2966
2967 PR gdb/16014
2968 * tracepoint.c (download_tracepoint_1): Remove unnecessary double
2969 call to sizeof.
2970
1a3d890b
PA
29712013-10-02 Pedro Alves <palves@redhat.com>
2972
2973 * server.c (process_serial_event): Don't output "GDBserver
2974 exiting" if GDB is connected through stdio.
2975 * target.c (mywait): Likewise, be silent if GDB is connected
2976 through stdio.
2977
97ad4581
JB
29782013-10-01 Joel Brobecker <brobecker@adacore.com>
2979
2980 * lynx-low.c (lynx_add_threads_after_attach): New function.
2981 (lynx_attach): Remove call to add_thread. Add call to
2982 lynx_add_threads_after_attach instead.
2983
5b4e221c
MF
29842013-09-28 Mike Frysinger <vapier@gentoo.org>
2985
2986 * configure.ac (AC_CHECK_HEADERS): Add sys/syscall.h
2987 * config.in, configure: Regenerated.
2988
ee47b2f8
YQ
29892013-09-18 Yao Qi <yao@codesourcery.com>
2990
2991 PR server/15959
2992 * server.c (start_inferior): Clear 'resume_info'.
2993
d6707650 29942013-09-16 Jiong Wang <jiwang@tilera.com>
0f63d4db 2995
d6707650
JW
2996 * linux-tile-low.c (tile_regsets): Modify the size field to 64-bit
2997 for each register.
2998
9243dd0e 29992013-09-16 Jiong Wang <jiwang@tilera.com>
0f63d4db 3000
9243dd0e
JW
3001 * configure.srv <tilegx*-*-linux*>: Remove linux-osdata.o from and add
3002 linux-tile-low.o to srv_tgtobj.
3003
c623a6ef
WN
30042013-09-16 Will Newton <will.newton@linaro.org>
3005
3006 * linux-aarch64-low.c (aarch64_linux_set_debug_regs): Zero
3007 out regs.
3008
fb71d39e
PA
30092013-09-06 Pedro Alves <palves@redhat.com>
3010
3011 * Makefile.in (gdb_proc_service_h, regdef_h, regcache_h)
3012 (signals_def, signals_h, ptid_h, ax_h, agent_h, linux_btrace_h)
3013 (linux_osdata_h, vec_h, gdb_vecs_h, host_defs_h, libiberty_h)
3014 (server_h, gdbthread_h, linux_low_h, linux_ptrace_h)
3015 (gdb_thread_db_h, linux_procfs_h, lynx_low_h, nto_low_h)
3016 (mips_linux_watch_h, i386_low_h, win32_low_h): Delete.
3017
8e7e9910
PA
30182013-09-06 Pedro Alves <palves@redhat.com>
3019
3020 * Makefile.in (linux-btrace.o, mips-linux-watch.o): Remove
3021 explicit header dependencies and use $COMPILE/$POSTCOMPILE.
3022
7c3a12ca
PA
30232013-09-06 Pedro Alves <palves@redhat.com>
3024
3025 * linux-amd64-ipa.c: Include tracepoint.h.
3026 * linux-i386-ipa.c: Include tracepoint.h.
3027
8eb3d7b6
RW
30282013-09-06 Ricard Wanderlof <ricardw@axis.com>
3029
3030 * linux-crisv32-low.c (PTRACE_GET_THREAD_AREA): New macro.
3031 (ps_get_thread_area): New function.
3032
eddddb9d
RW
30332013-09-06 Ricard Wanderlof <ricardw@axis.com>
3034
3035 * linux-crisv32-low.c (elf_gregset_t): Delete typedef.
3036 (initialize_low_arch): Call init_registers_crisv32 rather than
3037 init_register_crisv32.
3038
533b0600
PA
30392013-09-05 Pedro Alves <palves@redhat.com>
3040
3041 * server.h (handle_vFile, hostio_last_error_from_errno): Move
3042 to ...
3043 * hostio.h: ... this new file.
3044 * hostio.c, server.c, linux-low.c, nto-low.c, spu-low,
3045 win32-low.c: Include hostio.h.
3046
0ce3d3b5
PA
30472013-09-05 Pedro Alves <palves@redhat.com>
3048
3049 * server.h (gdb_client_data, handler_func, callback_handler_func)
3050 (delete_file_handler, add_file_handler, append_callback_event)
3051 (delete_callback_event, start_event_loop, initialize_event_loop):
3052 Move to event-loop.h and include it.
3053 * event-loop.h: New file.
3054
799cdc37
PA
30552013-09-05 Pedro Alves <palves@redhat.com>
3056
3057 * dll.c, inferiors.c, remote-utils.c, server.c: Include "dll.h".
3058 * server.h (struct dll_info, all_dlls, dlls_changed, clear_dlls)
3059 (loaded_dll, unloaded_dll): Move to ...
3060 * dll.h: ... this new file.
3061 * inferiors.c, remote-utils.c, win32-low.c: Include "dll.h".
3062
6a6bbd9d
PA
30632013-09-05 Pedro Alves <palves@redhat.com>
3064
3065 * server.h (current_process, get_thread_process, all_processes)
3066 (add_inferior_to_list, for_each_inferior, current_inferior)
3067 (remove_inferior, add_process, remove_process, find_process_pid)
3068 (have_started_inferiors_p, have_attached_inferiors_p)
3069 (thread_id_to_gdb_id, thread_to_gdb_id, gdb_id_to_thread_id)
3070 (clear_inferiors, find_inferior, find_inferior_id)
3071 (inferior_target_data, set_inferior_target_data)
3072 (inferior_regcache_data, set_inferior_regcache_data): Move to
3073 inferiors.h, and include it.
3074 * inferiors.h: New file.
3075
f699aaba
PA
30762013-09-05 Pedro Alves <palves@redhat.com>
3077
3078 * server.h (struct emit_ops, current_insn_ptr, emit_error):
3079 Move ...
72f4393d 3080 * ax.h: ... here.
f699aaba 3081
c144c7a0
PA
30822013-09-05 Pedro Alves <palves@redhat.com>
3083
3084 * ax.c, linux-low.c, linux-x86-low.c, server.c: Include
3085 tracepoint.h.
3086 * server.h (IPA_BUFSIZ, initialize_tracepoint, tracing)
3087 (disconnected_tracing, tracepoint_look_up_symbols, stop_tracing
3088 (handle_tracepoint_general_set, handle_tracepoint_query)
3089 (tracepoint_finished_step, tracepoint_was_hit)
3090 (release_while_stepping_state_list, current_traceframe)
3091 (in_readonly_region, traceframe_read_mem)
3092 (fetch_traceframe_registers, traceframe_read_sdata)
3093 (traceframe_read_info, struct fast_tpoint_collect_status)
3094 (fast_tracepoint_collecting, force_unlock_trace_buffer)
3095 (handle_tracepoit_bkpts, initialize_low_tracepoint)
3096 (supply_fast_tracepoint_registers)
3097 (supply_static_tracepoint_registers, set_trampoline_buffer_space)
3098 (ipa_tdesc, claim_trampoline_space)
3099 (have_fast_tracepoint_trampoline_buffer, gdb_agent_about_to_close)
3100 (agent_mem_read, agent_get_trace_state_variable_value)
3101 (agent_set_trace_state_variable_value, agent_tsv_read)
3102 (agent_mem_read_string, get_raw_reg_func_addr)
3103 (get_get_tsv_func_addr, get_set_tsv_func_addr): Move to ...
3104 * tracepoint.h: ... this new file.
3105
ff42e6ab
PA
31062013-09-05 Pedro Alves <palves@redhat.com>
3107
3108 * server.h (perror_with_name, error, fatal, warning, paddress)
3109 (pulongest, plongest, phex_nz, pfildes): Move to utils.h, and
3110 include it.
3111 * utils.h: New file.
3112
541af0f4
PA
31132013-09-05 Pedro Alves <palves@redhat.com>
3114
3115 * server.h (remote_debug, noack_mode, transport_is_reliable)
3116 (gdb_connected, STDIO_CONNECTION_NAME, remote_connection_is_stdio)
3117 (read_ptid, write_ptid, putpkt, putpkt_binary, putpkt_notif)
3118 (getpkt, remote_prepare, remote_open, remote_close, write_ok)
3119 (write_enn, initialize_async_io, enable_async_io)
3120 (disable_async_io, check_remote_input_interrupt_request)
3121 (convert_ascii_to_int, convert_int_to_ascii, new_thread_notify)
3122 (dead_thread_notify, prepare_resume_reply)
3123 (decode_address_to_semicolon, decode_address, decode_m_packet)
3124 (decode_M_packet, decode_X_packet, decode_xfer_write)
3125 (decode_search_memory_packet, unhexify, hexify)
3126 (remote_escape_output, unpack_varlen_hex, clear_symbol_cache)
3127 (look_up_one_symbol, relocate_instruction)
3128 (monitor_output): Move to remote-utils.h, and include it.
3129 * remote-utils.h: New file.
3130
eebdf26b
PA
31312013-09-05 Pedro Alves <palves@redhat.com>
3132
3133 * server.h (_): Delete.
3134
3aafd2ff
PA
31352013-09-02 Pedro Alves <palves@redhat.com>
3136
3137 * tracepoint.c (TRACEFRAME_EOB_MARKER_SIZE): New macro.
3138 (init_trace_buffer): Ensure at least TRACEFRAME_EOB_MARKER_SIZE is
3139 allocated.
3140 (trace_buffer_alloc): Use TRACEFRAME_EOB_MARKER_SIZE.
3141
cee83bcb
PM
31422013-09-02 Pierre Muller <muller@sourceware.org>
3143
3144 * win32-low.c (child_xfer_memory): Check if ReadProcessMemory
3145 or WriteProcessMemory complete successfully and handle
3146 ERROR_PARTIAL_COPY error.
3147
9a13b2fa
PA
31482013-09-02 Pedro Alves <palves@redhat.com>
3149
3150 * server.c (gdb_read_memory): Return -1 on traceframe memory read
3151 error instead of EIO.
3152
602e3198
JK
31532013-08-28 Jan Kratochvil <jan.kratochvil@redhat.com>
3154
3155 PR server/15604
3156 * linux-low.c: Include filestuff.h.
3157 (linux_create_inferior) <pid == 0>: Call close_most_fds.
3158 * lynx-low.c: Include filestuff.h.
3159 (lynx_create_inferior) <pid == 0>: Call close_most_fds.
3160 * server.c: Include filestuff.h.
3161 (main): Call notice_open_fds.
3162 * spu-low.c: Include filestuff.h.
3163 (spu_create_inferior) <pid == 0>: Call close_most_fds.
3164
96d7229d
LM
31652013-08-22 Luis Machado <lgustavo@codesourcery.com>
3166
3167 * Makefile.in: Explain why ../target and ../nat are not
3168 listed as include file search paths.
3169 (linux-waitpid.o): New object file rule.
3170 * configure.srv (srv_native_linux_obj): New variable.
3171 Replace all occurrences of linux native object files with
3172 $srv_native_linux_obj.
3173 * linux-low.c: Include nat/linux-nat.h and nat/linux-waitpid.h.
3174 (HAS_NOMMU): Move defining logic to common/linux-ptrace.c.
3175 (linux_enable_event_reporting): Remove declaration.
3176 (my_waitpid): Moved to common/linux-waitpid.c.
3177 (linux_wait_for_event): Pass ptid when calling
3178 linux_enable_event_reporting.
3179 (linux_supports_tracefork_flag): Remove.
3180 (linux_enable_event_reporting): Likewise.
3181 (linux_tracefork_grandchild): Remove.
3182 (STACK_SIZE): Moved to common/linux-ptrace.c.
3183 (linux_tracefork_child): Remove.
3184 (linux_test_for_tracefork): Remove.
3185 (linux_look_up_symbols): Call linux_supports_traceclone.
3186 (initialize_low): Remove call to linux_test_for_tracefork.
3187 * linux-low.h (PTRACE_TYPE_ARG3): Move to
3188 common/linux-ptrace.h.
3189 (PTRACE_TYPE_ARG4): Likewise.
3190 Include linux-ptrace.h.
3191
32940073
PA
31922013-08-21 Pedro Alves <palves@redhat.com>
3193
3194 * config.in: Renegerate.
3195
33b60d58 31962013-08-19 Luis Machado <lgustavo@codesourcery.com>
a261b8f5 3197
33b60d58
LM
3198 * Makefile.in (INCLUDE_CFLAGS): Include -I$(srcdir)/../.
3199 (SFILES): Remove $(srcdir)/common/target-common.c and
3200 add $(srcdir)/target/waitstatus.c.
3201 (OBS): Remove target-common.o and add waitstatus.o.
3202 (server_h): Remove $(srcdir)/../common/target-common.h and
3203 add $(srcdir)/../target/resume.h, $(srcdir)/../target/wait.h
3204 and $(srcdir)/../target/waitstatus.h.
3205 (target-common.o): Remove.
3206 (waitstatus.o): New target object file.
3207 * target.h: Do not include target-common.h and
3208 include target/resume.h, target/wait.h and
3209 target/waitstatus.h.
3210
b8e1b30e
LM
32112013-08-13 Luis Machado <lgustavo@codesourcery.com>
3212
3213 * linux-arm-low.c: Rename all occurrences of PTRACE_ARG3_TYPE
3214 to PTRACE_TYPE_ARG3.
3215 * linux-low.c: Rename all occurrences of PTRACE_ARG3_TYPE
3216 to PTRACE_TYPE_ARG3 and PTRACE_ARG4_TYPE to
3217 PTRACE_TYPE_ARG4.
3218 * linux-low.h (PTRACE_ARG3_TYPE): Rename to PTRACE_TYPE_ARG3.
3219 (PTRACE_ARG4_TYPE): Rename to PTRACE_TYPE_ARG4.
3220
7a60ad40
YQ
32212013-07-27 Jie Zhang <jie@codesourcery.com>
3222 Daniel Jacobowitz <dan@codesourcery.com>
3223 Yao Qi <yao@codesourcery.com>
3224
3225 * Makefile.in (SFILES): Add common/mips-linux-watch.c.
3226 (mips-linux-watch.o): New rule.
3227 (mips_linux_watch_h): New variable.
3228 * configure.srv <mips*-*-linux*>: Add mips-linux-watch.o to
3229 srv_tgtobj.
3230 * linux-mips-low.c: Include mips-linux-watch.h.
3231 (struct arch_process_info, struct arch_lwp_info): New.
3232 (update_watch_registers_callback): New function.
3233 (mips_linux_new_process, mips_linux_new_thread) New functions.
3234 (mips_linux_prepare_to_resume, mips_insert_point): New
3235 functions.
3236 (mips_remove_point, mips_stopped_by_watchpoint): New
3237 functions.
3238 (rsp_bp_type_to_target_hw_bp_type): New function.
3239 (mips_stopped_data_address): New function.
3240 (the_low_target): Add watchpoint support functions.
3241
de6f69ad
YQ
32422013-07-27 Yao Qi <yao@codesourcery.com>
3243
3244 * i386-low.c: Include break-common.h.
3245 (enum target_hw_bp_type): Remove.
3246
3360c0bf
LM
32472013-07-24 Luis Machado <lgustavo@codesourcery.com>
3248
3249 * Makefile.in (SFILES): /common/target-common.c.
3250 (OBS): Add target-common.o.
3251 (server_h): Add $(srcdir)/../common/target-common.h.
3252 (target-common.o): New target.
3253 * server.c (queue_stop_reply_callback): Free
3254 status string after use.
3255 * target.c (target_waitstatus_to_string): Remove.
3256 * target.h: Include target-common.h.
3257 (resume_kind): Likewise.
3258 (target_waitkind): Likewise.
3259 (target_waitstatus): Likewise.
3260 (TARGET_WNOHANG): Likewise.
3261
bd885420
YQ
32622013-07-04 Yao Qi <yao@codesourcery.com>
3263
3264 * Makefile.in (host_alias): Use @host_noncanonical@.
3265 (target_alias): Use @target_noncanonical@.
3266 * configure.ac: Use ACX_NONCANONICAL_TARGET and
3267 ACX_NONCANONICAL_HOST.
3268 * configure: Regenerated.
3269
3270 Revert:
3271 2013-06-28 Mircea Gherzan <mircea.gherzan@intel.com>
3272
3273 * configure.ac (version_host, version_target): Set and AC_SUBST them.
3274 * configure: Rebuild.
3275 * Makefile.in (version_host, version_target): Get from configure.
3276 (version.c): Use $(version_host) and $(version_target).
3277
17ef446e
PA
32782013-07-03 Pedro Alves <palves@redhat.com>
3279
3280 * Makefile.in (config.status): Depend on development.sh.
3281 * acinclude.m4: Include libmcheck.m4.
3282 * configure: Regenerate.
3283
7a9a7487
MG
32842013-07-02 Mircea Gherzan <mircea.gherzan@intel.com>
3285
3286 * win32-low.c (winapi_DebugActiveProcessStop): Move the WINAPI
3287 attribute inside the parentheses.
3288 (winapi_DebugSetProcessKillOnExit): Ditto.
3289 (winapi_DebugBreakProcess): Ditto.
3290 (winapi_GenerateConsoleCtrlEvent): Ditto.
a261b8f5 3291
49b64de6
MG
32922013-07-02 Mircea Gherzan <mircea.gherzan@intel.com>
3293
3294 * notif.h (notif_event): Add a dummy member to avoid compiler
3295 errors.
3296
d5749ee7
PA
32972013-07-01 Pedro Alves <palves@redhat.com>
3298
3299 * hostio.c (HOSTIO_PATH_MAX): Define.
3300 (require_filename, handle_open, handle_unlink, handle_readlink):
3301 Use it.
3302
d8d2a3ee
PA
33032013-07-01 Pedro Alves <palves@redhat.com>
3304
3305 * server.h: Include "pathmax.h".
3306 * linux-low.c: Don't include sys/param.h.
3307 (linux_pid_exe_is_elf_64_file): Use PATH_MAX instead of
3308 MAXPATHLEN.
3309 * win32-low.c: Don't include sys/param.h.
3310 (win32_create_inferior): Use PATH_MAX instead of MAXPATHLEN.
3311
bc7dea8d
PA
33122013-07-01 Pedro Alves <palves@redhat.com>
3313
3314 * event-loop.c: Don't check HAVE_UNISTD_H before including
3315 <unistd.h>.
3316 * gdbreplay.c: Likewise.
3317 * remote-utils.c: Likewise.
3318 * server.c: Likewise.
3319 * configure.ac: Don't check for unistd.h.
3320 * configure: Regenerate.
3321
d6c2da54
TT
33222013-06-28 Tom Tromey <tromey@redhat.com>
3323
3324 * Makefile.in (version.c): Use version.in, not
3325 common/version.in.
3326
257b6bec
MG
33272013-06-28 Mircea Gherzan <mircea.gherzan@intel.com>
3328
3329 * configure.ac (version_host, version_target): Set and AC_SUBST them.
3330 * configure: Rebuild.
3331 * Makefile.in (version_host, version_target): Get from configure.
3332 (version.c): Use $(version_host) and $(version_target).
3333
86ebe149
DK
33342013-06-10 Dmitry Kozlov <ddk@codesourcery.com>
3335
3336 Fix trace-status to output user name without trailing colon.
3337 * tracepoint.c (cmd_qtstatus): Remove unnecessary colon from user name.
3338
f30aa5af
DK
33392013-06-10 Dmitry Kozlov <ddk@codesourcery.com>
3340
3341 Fix trace-status to output proper start-time and stop-time.
3342 * tracepoint.c (cmd_qtstatus): Modify trace-status output to
3343 output start time and stop time in hex as gdb expects.
3344
28a93511
YQ
33452013-06-26 Pedro Alves <pedro@codesourcery.com>
3346
3347 * tracepoint.c (build_traceframe_info_xml): Output trace state
3348 variables present in the trace buffer.
3349
01208463
TT
33502013-06-24 Tom Tromey <tromey@redhat.com>
3351
3352 * Makefile.in (version.c): Use bfd/version.h, common/version.in,
3353 create-version.sh.
3354 (version.o): Remove.
3355 * gdbreplay.c: Include version.h.
3356 (version, host_name): Don't declare.
3357 * server.h: Include version.h.
3358 (version, host_name): Don't declare.
3359
760256f9
PA
33602013-06-12 Pedro Alves <palves@redhat.com>
3361
3362 * linux-x86-low.c (linux_is_elf64): Delete global.
3363 (x86_siginfo_fixup): Replace reference to `linux_is_elf64' global
3364 with local linux_pid_exe_is_elf_64_file use.
3365
030031ee
PA
33662013-06-11 Pedro Alves <palves@redhat.com>
3367
3368 * linux-low.c (regset_disabled, disable_regset): New functions.
3369 (regsets_fetch_inferior_registers)
3370 (regsets_store_inferior_registers): Use them.
3371 (initialize_regsets_info); Don't allocate the disabled_regsets
3372 array here.
3373 * linux-low.h (struct regsets_info) <disabled_regsets>: Extend
3374 comment.
3375
5da6eb0a
PA
33762013-06-11 Pedro Alves <palves@redhat.com>
3377
3378 * linux-low.c (initialize_regsets_info): Use xcalloc instead of
3379 xmalloc.
3380
7e5aaa09
PA
33812013-06-11 Pedro Alves <palves@redhat.com>
3382
3383 * linux-x86-low.c (initialize_low_arch): Call
3384 init_registers_x32_avx_linux.
3385
d878444c
JK
33862013-06-09 Jan Kratochvil <jan.kratochvil@redhat.com>
3387
3388 Fix compatibility with Android Bionic.
3389 * linux-low.c (linux_qxfer_libraries_svr4): Ignore first entry even if
3390 it is not empty.
3391
3aee8918
PA
33922013-06-07 Pedro Alves <palves@redhat.com>
3393
5f2b57b5 3394 PR server/14823
3aee8918
PA
3395 * Makefile.in (OBS): Add tdesc.o.
3396 (IPA_OBJS): Add tdesc-ipa.o.
3397 (tdesc-ipa.o): New rule.
3398 * ax.c (gdb_eval_agent_expr): Adjust register_size call to new
3399 interface.
3400 * linux-low.c (new_inferior): Delete.
3401 (disabled_regsets, num_regsets): Delete.
3402 (linux_add_process): Adjust to set the new per-process
3403 new_inferior flag.
3404 (linux_detach_one_lwp): Adjust to call regcache_invalidate_thread.
3405 (linux_wait_for_lwp): Adjust. Only call arch_setup if the event
3406 was a stop. When calling arch_setup, switch the current inferior
3407 to the thread that got an event.
3408 (linux_resume_one_lwp): Adjust to call regcache_invalidate_thread.
3409 (regsets_fetch_inferior_registers)
3410 (regsets_store_inferior_registers): New regsets_info parameter.
3411 Adjust to use it.
3412 (linux_register_in_regsets): New regs_info parameter. Adjust to
3413 use it.
3414 (register_addr, fetch_register, store_register): New usrregs_info
3415 parameter. Adjust to use it.
3416 (usr_fetch_inferior_registers, usr_store_inferior_registers): New
3417 parameter regs_info. Adjust to use it.
3418 (linux_fetch_registers): Get the current inferior's regs_info, and
3419 adjust to use it.
3420 (linux_store_registers): Ditto.
3421 [HAVE_LINUX_REGSETS] (initialize_regsets_info): New.
3422 (initialize_low): Don't initialize the target_regsets here. Call
3423 initialize_low_arch.
3424 * linux-low.h (target_regsets): Delete declaration.
3425 (struct regsets_info): New.
3426 (struct usrregs_info): New.
3427 (struct regs_info): New.
3428 (struct process_info_private) <new_inferior>: New field.
3429 (struct linux_target_ops): Delete the num_regs, regmap, and
3430 regset_bitmap fields. New field regs_info.
3431 [HAVE_LINUX_REGSETS] (initialize_regsets_info): Declare.
3432 * i387-fp.c (num_xmm_registers): Delete.
3433 (i387_cache_to_fsave, i387_fsave_to_cache): Adjust find_regno
3434 calls to new interface.
3435 (i387_cache_to_fxsave, i387_cache_to_xsave, i387_fxsave_to_cache)
3436 (i387_xsave_to_cache): Adjust find_regno calls to new interface.
3437 Infer the number of xmm registers from the regcache's target
3438 description.
3439 * i387-fp.h (num_xmm_registers): Delete.
3440 * inferiors.c (add_thread): Don't install the thread's regcache
3441 here.
3442 * proc-service.c (gregset_info): Fetch the current inferior's
3443 regs_info. Adjust to use it.
3444 * regcache.c: Include tdesc.h.
3445 (register_bytes, reg_defs, num_registers)
3446 (gdbserver_expedite_regs): Delete.
3447 (get_thread_regcache): If the thread doesn't have a regcache yet,
3448 create one, instead of aborting gdbserver.
3449 (regcache_invalidate_one): Rename to ...
3450 (regcache_invalidate_thread): ... this.
3451 (regcache_invalidate_one): New.
3452 (regcache_invalidate): Only invalidate registers of the current
3453 process.
3454 (init_register_cache): Add target_desc parameter, and use it.
3455 (new_register_cache): Ditto. Assert the target description has a
3456 non zero registers_size.
3457 (regcache_cpy): Add assertions. Adjust.
3458 (realloc_register_cache, set_register_cache): Delete.
3459 (registers_to_string, registers_from_string): Adjust.
3460 (find_register_by_name, find_regno, find_register_by_number)
3461 (register_cache_size): Add target_desc parameter, and use it.
3462 (free_register_cache_thread, free_register_cache_thread_one)
3463 (regcache_release, register_cache_size): New.
3464 (register_size): Add target_desc parameter, and use it.
3465 (register_data, supply_register, supply_register_zeroed)
3466 (supply_regblock, supply_register_by_name, collect_register)
3467 (collect_register_as_string, collect_register_by_name): Adjust.
3468 * regcache.h (struct target_desc): Forward declare.
3469 (struct regcache) <tdesc>: New field.
3470 (init_register_cache, new_register_cache): Add target_desc
3471 parameter.
3472 (regcache_invalidate_thread): Declare.
3473 (regcache_invalidate_one): Delete declaration.
3474 (regcache_release): Declare.
3475 (find_register_by_number, register_cache_size, register_size)
3476 (find_regno): Add target_desc parameter.
3477 (gdbserver_expedite_regs, gdbserver_xmltarget): Delete
3478 declarations.
3479 * remote-utils.c: Include tdesc.h.
3480 (outreg, prepare_resume_reply): Adjust.
3481 * server.c: Include tdesc.h.
3482 (gdbserver_xmltarget): Delete declaration.
3483 (get_features_xml, process_serial_event): Adjust.
3484 * server.h [IN_PROCESS_AGENT] (struct target_desc): Forward
3485 declare.
3486 (struct process_info) <tdesc>: New field.
3487 (ipa_tdesc): Declare.
3488 * tdesc.c: New file.
3489 * tdesc.h: New file.
3490 * tracepoint.c: Include tdesc.h.
3491 [IN_PROCESS_AGENT] (ipa_tdesc): Define.
3492 (get_context_regcache): Adjust to pass ipa_tdesc down.
3493 (do_action_at_tracepoint): Adjust to get the register cache size
3494 from the context regcache's description.
3495 (traceframe_walk_blocks): Adjust to get the register cache size
3496 from the current trace frame's description.
3497 (traceframe_get_pc): Adjust to get current trace frame's
3498 description and pass it down.
3499 (gdb_collect): Adjust to get the register cache size from the
3500 IPA's description.
3501 * linux-amd64-ipa.c (tdesc_amd64_linux): Declare.
3502 (gdbserver_xmltarget): Delete.
3503 (initialize_low_tracepoint): Set the ipa's target description.
3504 * linux-i386-ipa.c (tdesc_i386_linux): Declare.
3505 (initialize_low_tracepoint): Set the ipa's target description.
3506 * linux-x86-low.c: Include tdesc.h.
3507 [__x86_64__] (is_64bit_tdesc): New.
3508 (ps_get_thread_area, x86_get_thread_area): Use it.
3509 (i386_cannot_store_register): Rename to ...
3510 (x86_cannot_store_register): ... this. Use is_64bit_tdesc.
3511 (i386_cannot_fetch_register): Rename to ...
3512 (x86_cannot_fetch_register): ... this. Use is_64bit_tdesc.
3513 (x86_fill_gregset, x86_store_gregset): Adjust register_size calls
3514 to new interface.
3515 (target_regsets): Rename to ...
3516 (x86_regsets): ... this.
3517 (x86_get_pc, x86_set_pc): Adjust register_size calls to new
3518 interface.
3519 (x86_siginfo_fixup): Use is_64bit_tdesc.
3520 [__x86_64__] (tdesc_amd64_linux, tdesc_amd64_avx_linux)
3521 (tdesc_x32_avx_linux, tdesc_x32_linux)
3522 (tdesc_i386_linux, tdesc_i386_mmx_linux, tdesc_i386_avx_linux):
3523 Declare.
3524 (x86_linux_update_xmltarget): Delete.
3525 (I386_LINUX_XSAVE_XCR0_OFFSET): Define.
3526 (have_ptrace_getfpxregs, have_ptrace_getregset): New.
3527 (AMD64_LINUX_USER64_CS): New.
3528 (x86_linux_read_description): New, based on
3529 x86_linux_update_xmltarget.
3530 (same_process_callback): New.
3531 (x86_arch_setup_process_callback): New.
3532 (x86_linux_update_xmltarget): New.
3533 (x86_regsets_info): New.
3534 (amd64_linux_regs_info): New.
3535 (i386_linux_usrregs_info): New.
3536 (i386_linux_regs_info): New.
3537 (x86_linux_regs_info): New.
3538 (x86_arch_setup): Reimplement.
3539 (x86_install_fast_tracepoint_jump_pad): Use is_64bit_tdesc.
3540 (x86_emit_ops): Ditto.
3541 (the_low_target): Adjust. Install x86_linux_regs_info,
3542 x86_cannot_fetch_register, and x86_cannot_store_register.
3543 (initialize_low_arch): New.
3544 * linux-ia64-low.c (tdesc_ia64): Declare.
3545 (ia64_fetch_register): Adjust.
3546 (ia64_usrregs_info, regs_info): New globals.
3547 (ia64_regs_info): New function.
3548 (the_low_target): Adjust.
3549 (initialize_low_arch): New function.
3550 * linux-sparc-low.c (tdesc_sparc64): Declare.
3551 (sparc_fill_gregset_to_stack, sparc_store_gregset_from_stack):
3552 Adjust.
3553 (sparc_arch_setup): New function.
3554 (sparc_regsets_info, sparc_usrregs_info, regs_info): New globals.
3555 (the_low_target): Adjust.
3556 (initialize_low_arch): New function.
3557 * linux-ppc-low.c (tdesc_powerpc_32l, tdesc_powerpc_altivec32l)
3558 (tdesc_powerpc_cell32l, tdesc_powerpc_vsx32l)
3559 (tdesc_powerpc_isa205_32l, tdesc_powerpc_isa205_altivec32l)
3560 (tdesc_powerpc_isa205_vsx32l, tdesc_powerpc_e500l)
3561 (tdesc_powerpc_64l, tdesc_powerpc_altivec64l)
3562 (tdesc_powerpc_cell64l, tdesc_powerpc_vsx64l)
3563 (tdesc_powerpc_isa205_64l, tdesc_powerpc_isa205_altivec64l)
3564 (tdesc_powerpc_isa205_vsx64l): Declare.
3565 (ppc_cannot_store_register, ppc_collect_ptrace_register)
3566 (ppc_supply_ptrace_register, parse_spufs_run, ppc_get_pc)
3567 (ppc_set_pc, ppc_get_hwcap): Adjust.
3568 (ppc_usrregs_info): Forward declare.
3569 (!__powerpc64__) ppc_regmap_adjusted: New global.
3570 (ppc_arch_setup): Adjust to the current process'es target
3571 description.
3572 (ppc_fill_vsxregset, ppc_store_vsxregset, ppc_fill_vrregset)
3573 (ppc_store_vrregset, ppc_fill_evrregset, ppc_store_evrregse)
3574 (ppc_store_evrregset): Adjust.
3575 (target_regsets): Rename to ...
3576 (ppc_regsets): ... this, and make static.
3577 (ppc_usrregs_info, ppc_regsets_info, regs_info): New globals.
3578 (ppc_regs_info): New function.
3579 (the_low_target): Adjust.
3580 (initialize_low_arch): New function.
3581 * linux-s390-low.c (tdesc_s390_linux32, tdesc_s390_linux32v1)
3582 (tdesc_s390_linux32v2, tdesc_s390_linux64, tdesc_s390_linux64v1)
3583 (tdesc_s390_linux64v2, tdesc_s390x_linux64, tdesc_s390x_linux64v1)
3584 (tdesc_s390x_linux64v2): Declare.
3585 (s390_collect_ptrace_register, s390_supply_ptrace_register)
3586 (s390_fill_gregset, s390_store_last_break): Adjust.
3587 (target_regsets): Rename to ...
3588 (s390_regsets): ... this, and make static.
3589 (s390_get_pc, s390_set_pc): Adjust.
3590 (s390_get_hwcap): New target_desc parameter, and use it.
3591 [__s390x__] (have_hwcap_s390_high_gprs): New global.
3592 (s390_arch_setup): Adjust to set the current process'es target
3593 description. Don't adjust the regmap.
3594 (s390_usrregs_info, s390_regsets_info, regs_info): New globals.
3595 [__s390x__] (s390_usrregs_info_3264, s390_regsets_info_3264)
3596 (regs_info_3264): New globals.
3597 (s390_regs_info): New function.
3598 (the_low_target): Adjust.
3599 (initialize_low_arch): New function.
3600 * linux-mips-low.c (tdesc_mips_linux, tdesc_mips_dsp_linux)
3601 (tdesc_mips64_linux, tdesc_mips64_dsp_linux): Declare.
3602 [__mips64] (init_registers_mips_linux)
3603 (init_registers_mips_dsp_linux): Delete defines.
3604 [__mips64] (tdesc_mips_linux, tdesc_mips_dsp_linux): New defines.
3605 (have_dsp): New global.
3606 (mips_read_description): New, based on mips_arch_setup.
3607 (mips_arch_setup): Reimplement.
3608 (get_usrregs_info): New function.
3609 (mips_cannot_fetch_register, mips_cannot_store_register)
3610 (mips_get_pc, mips_set_pc, mips_fill_gregset, mips_store_gregset)
3611 (mips_fill_fpregset, mips_store_fpregset): Adjust.
3612 (target_regsets): Rename to ...
3613 (mips_regsets): ... this, and make static.
3614 (mips_regsets_info, mips_dsp_usrregs_info, mips_usrregs_info)
3615 (dsp_regs_info, regs_info): New globals.
3616 (mips_regs_info): New function.
3617 (the_low_target): Adjust.
3618 (initialize_low_arch): New function.
3619 * linux-arm-low.c (tdesc_arm, tdesc_arm_with_iwmmxt)
3620 (tdesc_arm_with_vfpv2, tdesc_arm_with_vfpv3, tdesc_arm_with_neon):
3621 Declare.
3622 (arm_fill_vfpregset, arm_store_vfpregset): Adjust.
3623 (arm_read_description): New, with bits factored from
3624 arm_arch_setup.
3625 (arm_arch_setup): Reimplement.
3626 (target_regsets): Rename to ...
3627 (arm_regsets): ... this, and make static.
3628 (arm_regsets_info, arm_usrregs_info, regs_info): New globals.
3629 (arm_regs_info): New function.
3630 (the_low_target): Adjust.
3631 (initialize_low_arch): New function.
3632 * linux-m68k-low.c (tdesc_m68k): Declare.
3633 (target_regsets): Rename to ...
3634 (m68k_regsets): ... this, and make static.
3635 (m68k_regsets_info, m68k_usrregs_info, regs_info): New globals.
3636 (m68k_regs_info): New function.
3637 (m68k_arch_setup): New function.
3638 (the_low_target): Adjust.
3639 (initialize_low_arch): New function.
3640 * linux-sh-low.c (tdesc_sharch): Declare.
3641 (target_regsets): Rename to ...
3642 (sh_regsets): ... this, and make static.
3643 (sh_regsets_info, sh_usrregs_info, regs_info): New globals.
3644 (sh_regs_info, sh_arch_setup): New functions.
3645 (the_low_target): Adjust.
3646 (initialize_low_arch): New function.
3647 * linux-bfin-low.c (tdesc_bfin): Declare.
3648 (bfin_arch_setup): New function.
3649 (bfin_usrregs_info, regs_info): New globals.
3650 (bfin_regs_info): New function.
3651 (the_low_target): Adjust.
3652 (initialize_low_arch): New function.
3653 * linux-cris-low.c (tdesc_cris): Declare.
3654 (cris_arch_setup): New function.
3655 (cris_usrregs_info, regs_info): New globals.
3656 (cris_regs_info): New function.
3657 (the_low_target): Adjust.
3658 (initialize_low_arch): New function.
3659 * linux-cris-low.c (tdesc_crisv32): Declare.
3660 (cris_arch_setup): New function.
3661 (cris_regsets_info, cris_usrregs_info, regs_info): New globals.
3662 (cris_regs_info): New function.
3663 (the_low_target): Adjust.
3664 (initialize_low_arch): New function.
3665 * linux-m32r-low.c (tdesc_m32r): Declare.
3666 (m32r_arch_setup): New function.
3667 (m32r_usrregs_info, regs_info): New globals.
3668 (m32r_regs_info): Adjust.
3669 (initialize_low_arch): New function.
3670 * linux-tic6x-low.c (tdesc_tic6x_c64xp_linux)
3671 (tdesc_tic6x_c64x_linux, tdesc_tic6x_c62x_linux): Declare.
3672 (tic6x_usrregs_info): Forward declare.
3673 (tic6x_read_description): New function, based on ...
3674 (tic6x_arch_setup): ... this. Reimplement.
3675 (target_regsets): Rename to ...
3676 (tic6x_regsets): ... this, and make static.
3677 (tic6x_regsets_info, tic6x_usrregs_info, regs_info): New globals.
3678 (tic6x_regs_info): New function.
3679 (the_low_target): Adjust.
3680 (initialize_low_arch): New function.
3681 * linux-xtensa-low.c (tdesc_xtensa): Declare.
3682 (xtensa_fill_gregset, xtensa_store_gregset): Adjust.
3683 (target_regsets): Rename to ...
3684 (xtensa_regsets): ... this, and make static.
3685 (xtensa_regsets_info, xtensa_usrregs_info, regs_info): New
3686 globals.
3687 (xtensa_arch_setup, xtensa_regs_info): New functions.
3688 (the_low_target): Adjust.
3689 (initialize_low_arch): New function.
3690 * linux-nios2-low.c (tdesc_nios2_linux): Declare.
3691 (nios2_arch_setup): Set the current process'es tdesc.
3692 (target_regsets): Rename to ...
3693 (nios2_regsets): ... this.
3694 (nios2_regsets_info, nios2_usrregs_info, regs_info): New globals.
3695 (nios2_regs_info): New function.
3696 (the_low_target): Adjust.
3697 (initialize_low_arch): New function.
a261b8f5
PA
3698 * linux-aarch64-low.c (tdesc_aarch64): Declare.
3699 (aarch64_arch_setup): Set the current process'es tdesc.
3700 (target_regsets): Rename to ...
3701 (aarch64_regsets): ... this.
3702 (aarch64_regsets_info, aarch64_usrregs_info, regs_info): New globals.
3703 (aarch64_regs_info): New function.
3704 (the_low_target): Adjust.
3705 (initialize_low_arch): New function.
3aee8918
PA
3706 * linux-tile-low.c (tdesc_tilegx, tdesc_tilegx32): Declare
3707 globals.
3708 (target_regsets): Rename to ...
3709 (tile_regsets): ... this.
3710 (tile_regsets_info, tile_usrregs_info, regs_info): New globals.
3711 (tile_regs_info): New function.
3712 (tile_arch_setup): Set the current process'es tdesc.
3713 (the_low_target): Adjust.
3714 (initialize_low_arch): New function.
3715 * spu-low.c (tdesc_spu): Declare.
3716 (spu_create_inferior, spu_attach): Set the new process'es tdesc.
3717 * win32-arm-low.c (tdesc_arm): Declare.
3718 (arm_arch_setup): New function.
3719 (the_low_target): Install arm_arch_setup instead of
3720 init_registers_arm.
3721 * win32-i386-low.c (tdesc_i386, tdesc_amd64): Declare.
3722 (init_windows_x86): Rename to ...
3723 (i386_arch_setup): ... this. Set `win32_tdesc'.
3724 (the_low_target): Adjust.
3725 * win32-low.c (win32_tdesc): New global.
3726 (child_add_thread): Don't create the thread cache here.
3727 (do_initial_child_stuff): Set the new process'es tdesc.
3728 * win32-low.h (struct target_desc): Forward declare.
3729 (win32_tdesc): Declare.
3730 * lynx-i386-low.c (tdesc_i386): Declare global.
3731 (lynx_i386_arch_setup): Set `lynx_tdesc'.
3732 * lynx-low.c (lynx_tdesc): New global.
3733 (lynx_add_process): Set the new process'es tdesc.
3734 * lynx-low.h (struct target_desc): Forward declare.
3735 (lynx_tdesc): Declare global.
3736 * lynx-ppc-low.c (tdesc_powerpc_32): Declare global.
3737 (lynx_ppc_arch_setup): Set `lynx_tdesc'.
3738 * nto-low.c (nto_tdesc): New global.
3739 (do_attach): Set the new process'es tdesc.
3740 * nto-low.h (struct target_desc): Forward declare.
3741 (nto_tdesc): Declare.
3742 * nto-x86-low.c (tdesc_i386): Declare.
3743 (nto_x86_arch_setup): Set `nto_tdesc'.
3744
b1fbec62
GB
37452013-06-04 Gary Benson <gbenson@redhat.com>
3746
3747 * server.c (handle_query): Add "augmented-libraries-svr4-read+"
3748 to qSupported response when appropriate.
3749 (handle_qxfer_libraries_svr4): Allow qXfer:libraries-svr4:read
3750 with nonzero-length annex.
3751 * linux-low.c (linux_qxfer_libraries_svr4): Parse and handle
3752 arguments supplied in annex.
3753
d1ec4ce7
DE
37542013-05-31 Doug Evans <dje@google.com>
3755
ac44adcb 3756 PR server/15594
d1ec4ce7
DE
3757 * linux-x86-low.c (ps_get_thread_area): Properly extend address to
3758 64 bits in 64-cross-32 environment.
3759
9b25f2d3
PA
37602013-05-28 Pedro Alves <palves@redhat.com>
3761
3762 * Makefile.in (clean): Remove reference to aarch64-without-fpu.c.
3763 (aarch64-without-fpu.c): Delete rule.
3764 * configure.srv (aarch64*-*-linux*): Remove references to
3765 aarch64-without-fpu.o and aarch64-without-fpu.xml.
3766 * linux-aarch64-low.c (init_registers_aarch64_without_fpu): Remove
3767 declaration.
3768
6740dc9c
PA
37692013-05-24 Pedro Alves <palves@redhat.com>
3770
3771 * server.c (handle_v_cont) <vCont;r>: Use unpack_varlen_hex
3772 instead of strchr/decode_address. Error if the range isn't split
3773 with a ','. Don't assume there's be a ':' in the action.
3774
c2d6af84
PA
37752013-05-23 Yao Qi <yao@codesourcery.com>
3776 Pedro Alves <palves@redhat.com>
3777
3778 * linux-low.c (lwp_in_step_range): New function.
3779 (linux_wait_1): If the thread was range stepping and stopped
3780 outside the stepping range, report the stop to GDB. Otherwise,
3781 continue stepping. Add range stepping debug output.
3782 (linux_set_resume_request): Copy the step range from the resume
3783 request to the lwp.
3784 (linux_supports_range_stepping): New.
3785 (linux_target_ops) <supports_range_stepping>: Set to
3786 linux_supports_range_stepping.
3787 * linux-low.h (struct linux_target_ops)
3788 <supports_range_stepping>: New field.
3789 (struct lwp_info) <step_range_start, step_range_end>: New fields.
3790 * linux-x86-low.c (x86_supports_range_stepping): New.
3791 (the_low_target) <supports_range_stepping>: Set to
3792 x86_supports_range_stepping.
3793 * server.c (handle_v_cont): Handle 'r' action.
3794 (handle_v_requests): Append ";r" if the target supports range
3795 stepping.
3796 * target.h (struct thread_resume) <step_range_start,
3797 step_range_end>: New fields.
3798 (struct target_ops) <supports_range_stepping>:
3799 New field.
3800 (target_supports_range_stepping): New macro.
3801
58794e1a
JB
38022013-05-17 Joel Brobecker <brobecker@adacore.com>
3803
3804 * lynx-low.c (lynx_resume): Fix null_ptid/minus_one_ptid
3805 confusion in comment.
3806
d631c5a7
JB
38072013-05-17 Joel Brobecker <brobecker@adacore.com>
3808
3809 * lynx-low.c (struct process_info_private): New type.
3810 (lynx_add_process): New function.
3811 (lynx_create_inferior, lynx_attach): Replace calls to
3812 add_process by calls to lynx_add_process.
3813 (lynx_resume): If PTID is null, then try using
3814 current_process()->private->last_wait_event_ptid.
3815 Add comments.
3816 (lynx_clear_inferiors): Delete. The contents of that function
3817 has been inlined in lynx_mourn;
3818 (lynx_wait_1): Save the ptid in the process's private data.
3819 (lynx_mourn): Free the process' private data. Replace call
3820 to lynx_clear_inferiors by call to clear_inferiors.
3821
96f7a20f
YQ
38222013-05-17 Yao Qi <yao@codesourcery.com>
3823
3824 * i386-low.c (i386_length_and_rw_bits): Move the comment to
3825 the right place.
3826
db0dfaa0
LM
38272013-05-16 Luis Machado <lgustavo@codesourcery.com>
3828
3829 * linux-low.c: Move definition checks upwards for PT_TEXT_ADDR,
3830 PT_DATA_ADDR and PT_TEXT_END_ADDR. Update comments.
3831 (linux_read_offsets): Remove PT_TEXT_ADDR, PT_DATA_ADDR and
3832 PT_TEXT_END_ADDR guards. Update comments.
3833 (linux_target_op) <read_offsets>: Conditionally define to
3834 linux_read_offsets if the target is UCLIBC and if it defines
3835 PT_TEXT_ADDR, PT_DATA_ADDR and PT_TEXT_END_ADDR.
3836
68f5f838
SL
38372013-05-06 Sandra Loosemore <sandra@codesourcery.com>
3838 Andrew Jenner <andrew@codesourcery.com>
3839
3840 * Makefile.in (SFILES): Add linux-nios2-low.c.
3841 (clean): Add action to delete nios2-linux.c.
3842 (nios2-linux.c): New rule.
3843 * configure.srv: Add nios2*-*-linux*.
3844 * linux-nios2-low.c: New.
3845
1ebff1fd
HAQ
38462013-05-03 Hafiz Abid Qadeer <abidh@codesourcery.com>
3847
3848 * tracepoint.c (cmd_qtinit): Call 'stop_tracing'.
3849
f6150862
HZ
38502013-04-25 Hui Zhu <hui@codesourcery.com>
3851
3852 PR gdb/15186
f6150862
HZ
3853 * ax.c (ax_printf): Add fflush.
3854
614c279d
TT
38552013-04-22 Tom Tromey <tromey@redhat.com>
3856
3857 * Makefile.in (SFILES): Add filestuff.c.
3858 (OBS): Add filestuff.o.
3859 (filestuff.o): New target.
3860 * config.in, configure: Rebuild.
3861 * configure.ac: Check for fdwalk, pipe2.
3862
7d4e5717
PA
38632013-04-17 Pedro Alves <palves@redhat.com>
3864
3865 * configure.ac (USE_THREAD_DB): Delete variable.
3866 (if test "$srv_linux_thread_db" = "yes"): AC_DEFINE USE_THREAD_DB.
3867 Don't AC_SUBST USE_THREAD_DB.
3868 * Makefile.in (INTERNAL_CFLAGS): Remove @USE_THREAD_DB@.
3869 * config.in, configure: Regenerate.
3870
d5c93e41
PA
38712013-04-16 Pedro Alves <palves@redhat.com>
3872
3873 * linux-low.h (struct lwp_info) <thread_known>: Move under
3874 the USE_THREAD_DB #ifdef.
3875
04f5fe89
PA
38762013-04-16 Pedro Alves <palves@redhat.com>
3877
3878 * Makefile.in (INTERNAL_CFLAGS): Add @USE_THREAD_DB@.
3879 (linux-low.o): Delete rule.
3880 * linux-low.h: Always include "gdb_thread_db.h" instead of
3881 conditionally including thread_db.h.
3882 (struct lwp_info) <th>: Guard with #ifdef USE_THREAD_DB instead of
3883 HAVE_THREAD_DB_H.
3884
480b27bf
JK
38852013-04-07 Jan Kratochvil <jan.kratochvil@redhat.com>
3886
3887 * Makefile.in (install-only): Fix make install regression.
3888
43662968
JK
38892013-04-05 Jan Kratochvil <jan.kratochvil@redhat.com>
3890
3891 Convert man pages to texinfo, new gdbinit.5 texinfo page.
3892 * Makefile.in (install-only): Remove $(man1dir) and gdbserver.1
3893 installation.
3894 * gdbserver.1: Remove.
3895
3e74e146
PA
38962013-03-22 Pedro Alves <palves@redhat.com>
3897
3898 * linux-low.c (handle_extended_wait): Don't call
3899 linux_enable_event_reporting.
3900
a8347a2a
TT
39012013-03-15 Tony Theodore <tonyt@logyst.com>
3902
3903 PR build/9098:
3904 * Makefile.in (SHELL): Use @SHELL@.
3905
eeb56fa7
SDJ
39062013-03-14 Sergio Durigan Junior <sergiodj@redhat.com>
3907
3908 * tracepoint.c (cmd_qtv): Initialize `val' with zero, silencing
3909 compiler warning.
3910
4fa7e2ff
JB
39112013-03-13 Joel Brobecker <brobecker@adacore.com>
3912
3913 * linux-low.c (linux_target_ops) [!HAVE_LINUX_BTRACE]:
3914 Remove extraneous NULL element.
3915
8ddb1965
YQ
39162013-03-13 Yao Qi <yao@codesourcery.com>
3917
3918 * tracepoint.c (traceframe_read_tsv): Look for the last matched
3919 'V' block in trace frame.
3920
9accd112
MM
39212013-03-11 Markus Metzger <markus.t.metzger@intel.com>
3922
3923 * target.h (struct target_ops): Add btrace ops.
3924 (target_supports_btrace): New macro.
3925 (target_enable_btrace): New macro.
3926 (target_disable_btrace): New macro.
3927 (target_read_btrace): New macro.
3928 * gdbthread.h (struct thread_info): Add btrace field.
3929 * server.c: Include btrace-common.h.
3930 (handle_btrace_general_set): New function.
3931 (handle_btrace_enable): New function.
3932 (handle_btrace_disable): New function.
3933 (handle_general_set): Call handle_btrace_general_set.
3934 (handle_qxfer_btrace): New function.
3935 (struct qxfer qxfer_packets[]): Add btrace entry.
3936 * inferiors.c (remove_thread): Disable btrace.
3937 * linux-low: Include linux-btrace.h.
3938 (linux_low_enable_btrace): New function.
3939 (linux_low_read_btrace): New function.
3940 (linux_target_ops): Add btrace ops.
3941 * configure.srv (i[34567]86-*-linux*): Add linux-btrace.o.
3942 Add srv_linux_btrace=yes.
3943 (x86_64-*-linux*): Add linux-btrace.o.
3944 Add srv_linux_btrace=yes.
3945 * configure.ac: Define HAVE_LINUX_BTRACE.
3946 * config.in: Regenerated.
3947 * configure: Regenerated.
3948
5cc22e4c
MM
39492013-03-11 Markus Metzger <markus.t.metzger@intel.com>
3950
3951 * server.c (handle_qxfer): Preserve error message if -3 is
3952 returned.
3953 (qxfer): Document the -3 return value.
3954
7c97f91e
MM
39552013-03-11 Markus Metzger <markus.t.metzger@intel.com>
3956
3957 * Makefile.in (SFILES): Add $(srcdir)/common/linux-btrace.c.
3958 (linux_btrace_h): New variable.
3959 (linux-btrace.o): New rule.
3960
be9a119c 39612013-03-08 Stan Shebs <stan@codesourcery.com>
f6f899bf
HAQ
3962 Hafiz Abid Qadeer <abidh@codesourcery.com>
3963
3964 * tracepoint.c (trace_buffer_size): New global.
3965 (DEFAULT_TRACE_BUFFER_SIZE): New define.
3966 (init_trace_buffer): Change to one-argument function. Allocate
3967 trace buffer memory.
3968 (handle_tracepoint_general_set): Call cmd_bigqtbuffer_size to
3969 handle QTBuffer:size packet.
3970 (cmd_bigqtbuffer_size): New function.
3971 (initialize_tracepoint): Call init_trace_buffer with
3972 DEFAULT_TRACE_BUFFER_SIZE.
3973 * server.c (handle_query): Add QTBuffer:size in the
3974 supported packets.
3975
e64f7499
YQ
39762013-03-07 Yao Qi <yao@codesourcery.com>
3977
3978 * tracepoint.c (cur_action, cur_step_action): Make them unsigned.
3979 (cmd_qtfp): Initialize cur_action and cur_step_action 0 instead
3980 of -1.
3981 (cmd_qtsp): Adjust condition. Do post increment.
3982 Set cur_action and cur_step_action back to 0.
3983
f0ae6fc3
PA
39842013-03-07 Jeremy Bennett <jeremy.bennett@embecosm.com>
3985
3986 PR server/15236
3987 * linux-low.c (linux_write_memory): Return early success if LEN is
3988 zero.
3989
b5b0b0af
CV
39902013-03-05 Corinna Vinschen <vinschen@redhat.de>
3991
334ad4a8 3992 * configure.srv: Add x86_64-*-cygwin* as target.
b5b0b0af 3993
589bc927
TT
39942013-02-28 Tom Tromey <tromey@redhat.com>
3995
3996 * configure.ac: Invoke AC_SYS_LARGEFILE.
3997 * configure, config.in: Rebuild.
3998
dfe07582
CV
39992013-02-28 Corinna Vinschen <vinschen@redhat.com>
4000
4001 * win32-low.c: Throughout, fix format strings and casts of
4002 printf-like functions to avoid type related warnings on all
4003 platforms.
4004 (get_child_debug_event): Print dwDebugEventCode as hex since
4005 that's how it's usually documented.
4006
736cd585
YQ
40072013-02-28 Yao Qi <yao@codesourcery.com>
4008
4009 * tracepoint.c (cmd_qtbuffer): Call phex_nz instead of
4010 pulongest.
4011
e1f58301
JW
40122013-02-27 Jiong Wang <jiwang@tilera.com>
4013
4014 * Makefile.in (clean): Remove reg-tilegx.c, reg-tilegx32.c.
4015 (reg-tilegx32.c): New rule.
4016 * configure.srv (tilegx-*-linux*): Add reg-tilegx32.o to srv_regobj.
4017 * linux-tile-low.c (tile_arch_setup): New function. Invoke
4018 different register info initializer according to elf class.
4019 (init_registers_tilgx32): New function. The tilegx32 register info
4020 initializer.
4021 (tile_fill_gregset): Use "uint_reg_t" to represent register size.
4022 (tile_store_gregset): Likewise.
4023
d171ca78
YQ
40242013-02-27 Yao Qi <yao@codesourcery.com>
4025
4026 * server.c (process_point_options): Print debug message when
4027 debug_threads is true.
4028
282bbdf3
YQ
40292013-02-26 Yao Qi <yao@codesourcery.com>
4030
4031 * tracepoint.c (cmd_qtbuffer): Don't set '\0' in OWN_BUF.
4032
aca22551
PA
40332013-02-19 Pedro Alves <palves@redhat.com>
4034 Kai Tietz <ktietz@redhat.com>
4035
4036 PR gdb/15161
4037
4038 * server.c (handle_query) <CRC check>: Use unpack_varlen_hex
4039 instead of strtoul to extract address from packet.
4040 (process_serial_event) <'z'>: Likewise.
4041
4f3cee1c
YQ
40422013-02-18 Yao Qi <yao@codesourcery.com>
4043
4044 * linux-bfin-low.c (the_low_target): Use NULL instead of 0.
4045
8e1d55a3
PA
40462013-02-14 Pedro Alves <palves@redhat.com>
4047
4048 Plug memory leak.
4049
4050 * tracepoint.c (cmd_qtnotes): Free TRACING_USER_NAME,
4051 TRACING_NOTES and TRACING_STOP_NOTE before clobbering.
4052
458820da
PA
40532013-02-14 Pedro Alves <palves@redhat.com>
4054
4055 * tracepoint.c (cmd_qtdpsrc): Use savestring.
4056
baea0dae
PA
40572013-02-14 Pedro Alves <palves@redhat.com>
4058
4059 * tracepoint.c (save_string): Delete.
4060 (add_tracepoint_action): Use savestring instead of save_string.
4061
0b1afbb3
PA
40622013-02-12 Pedro Alves <palves@redhat.com>
4063
4064 * linux-xtensa-low.c: Ditto.
4065 * xtensa-xtregs.c: Ditto.
4066
8a4ac37e
PA
40672013-02-12 Sanimir Agovic <sanimir.agovic@intel.com>
4068
4069 * thread-db.c (thread_db_get_tls_address): NULL pointer check
4070 thread_db.
4071
148de6bb
MS
40722013-02-07 Marcus Shawcroft <marcus.shawcroft@arm.com>
4073
4074 * linux-aarch64-low.c (aarch64_arch_setup): Clamp
4075 aarch64_num_wp_regs and aarch64_num_bp_regs to
4076 AARCH64_HWP_MAX_NUM and AARCH64_HBP_MAX_NUM respectively.
4077
55fac6e0
MS
40782013-02-07 Marcus Shawcroft <marcus.shawcroft@arm.com>
4079
4080 * linux-aarch64-low.c (ps_get_thread_area): Replace
4081 PTRACE_GET_THREAD_AREA with PTRACE_GETREGSET.
4082
176eb98c
MS
40832013-02-04 Jim MacArthur <jim.macarthur@arm.com>
4084 Marcus Shawcroft <marcus.shawcroft@arm.com>
4085 Nigel Stephens <nigel.stephens@arm.com>
4086 Yufeng Zhang <yufeng.zhang@arm.com>
4087
4088 * Makefile.in (clean): Remove aarch64.c and aarch64-without-fpu.c.
4089 (aarch64.c, aarch64-without-fpu.c): New targets.
4090 * configure.srv (aarch64*-*-linux*): New.
4091 * linux-aarch64-low.c: New file.
4092
56f7af9c
MS
40932013-02-04 Marcus Shawcroft <marcus.shawcroft@arm.com>
4094
43aaf8b6 4095 * linux-low.c (handle_extended_wait, linux_create_inferior)
56f7af9c
MS
4096 (linux_attach_lwp_1, linux_kill_one_lwp, linux_attach_one_lwp)
4097 (dequeue_one_deferred_signal, linux_resume_one_thread)
4098 (fetch_register, linux_write_memory, linux_enable_event_reporting)
4099 (linux_tracefork_grandchild, linux_test_for_tracefork)
4100 (linux_read_offsets, linux_xfer_siginfo, linux_xfer_siginfo): Add
4101 PTRACE_ARG3_TYPE and PTRACE_ARG4_TYPE cast to ptrace arguments
4102 where the argument is 0.
4103
60f662b0
YQ
41042013-01-25 Yao Qi <yao@codesourcery.com>
4105
4106 * event-loop.c: Include "queue.h".
4107 (gdb_event_p): New typedef.
4108 (struct gdb_event) <next_event>: Remove.
4109 (event_queue): Change to QUEUE(gdb_event_p).
4110 (async_queue_event): Remove.
4111 (gdb_event_xfree): New.
4112 (initialize_event_loop): New.
4113 (process_event): Use API from QUEUE.
4114 (wait_for_event): Likewise.
4115 * server.c (main): Call initialize_event_loop.
4116 * server.h (initialize_event_loop): Declare.
4117
5ae4861a
YQ
41182013-01-18 Yao Qi <yao@codesourcery.com>
4119
4120 * ax.h (struct eval_agent_expr_context): New.
4121 (gdb_eval_agent_expr): Update declaration.
4122 * ax.c (gdb_eval_agent_expr): Remove argument REGCACHE and
4123 TFRAME. Add new argument CTX.
4124 * server.h (struct eval_agent_expr_context): Declare.
4125 (agent_mem_read, agent_tsv_read): Update declaration.
4126 (agent_mem_read_string): Likewise.
4127 * tracepoint.c (eval_tracepoint_agent_expr): Remove.
4128 (add_traceframe_block): Add new argument TPOINT.
4129 Increase TPOINT->traceframe_usage.
4130 (do_action_at_tracepoint): Call gdb_eval_agent_expr instead of
4131 eval_tracepoint_agent_expr.
4132 (condition_true_at_tracepoint): Likewise.
4133 (agent_mem_read): Remove argument TFRAME. Add argument CTX.
4134 (agent_mem_read_string, agent_tsv_read): Likewise.
4135
85e00e85
YQ
41362013-01-16 Yao Qi <yao@codesourcery.com>
4137
4138 * linux-low.c (linux_resume_one_lwp): Don't check
4139 'lwp->bp_reinsert != 0'.
4140
4039cf45
JB
41412013-01-07 Joel Brobecker <brobecker@adacore.com>
4142 Pedro Alves <palves@redhat.com>
4143
4144 * lynx-low.c (ptrace_request_to_str): Define a temporary
4145 macro and use it to simplify this function's implementation.
4146
9044dee2
JB
41472013-01-07 Joel Brobecker <brobecker@adacore.com>
4148
4149 * lynx-low.c (lynx_resume): Call perror_with_name if lynx_ptrace
4150 sets errno.
4151
e6352c8f
JB
41522013-01-07 Joel Brobecker <brobecker@adacore.com>
4153
4154 * configure.srv (i[34567]86-*-lynxos*): Set srv_xmlfiles.
4155
50681a27
JB
41562013-01-07 Joel Brobecker <brobecker@adacore.com>
4157
4158 * configure.srv (powerpc-*-lynxos*): Set srv_xmlfiles.
4159
3f6e77ef
JB
41602013-01-07 Joel Brobecker <brobecker@adacore.com>
4161
4162 * lynx-low.c (lynx_resume): Use the resume_info parameter
4163 to determine the ptid for the lynx_ptrace call, unless
4164 it is equal to minus_one_ptid, in which case we use the
4165 ptid of the current_inferior.
4166 (lynx_wait_1): After having received a thread create/exit
4167 event, resume the inferior's execution using the signaling
4168 thread's ptid, rather than the old ptid.
4169
7fda33ae
JB
41702013-01-07 Joel Brobecker <brobecker@adacore.com>
4171
4172 * lynx-low.c (lynx_resume): Delete variable ret.
4173
b9786c74
JB
41742013-01-01 Joel Brobecker <brobecker@adacore.com>
4175
4176 * gdbreplay.c (gdbreplay_version): Update copyright year.
4177 * server.c (gdbserver_version): Likewise.
4178
8b93d60f
JB
41792012-12-17 Joel Brobecker <brobecker@adacore.com>
4180
4181 * lynx-low.c (lynx_wait_1): Add debug trace before adding
4182 new thread.
4183
037335a7
JB
41842012-12-17 Joel Brobecker <brobecker@adacore.com>
4185
4186 * lynx-low.c (ptrace_request_to_str): Add handling for
4187 PTRACE_GETTRACESIG.
4188
52d4cbd8
JB
41892012-12-17 Joel Brobecker <brobecker@adacore.com>
4190
4191 * lynx-low.c (lynx_attach): Delete variable new_process.
4192
ab8f6ca9
JB
41932012-12-17 Joel Brobecker <brobecker@adacore.com>
4194
4195 * lynx-low.c (lynx_create_inferior): Delete variable
4196 new_process.
4197
78cbc024
JB
41982012-12-17 Joel Brobecker <brobecker@adacore.com>
4199
4200 * lynx-low.c (ptrace_request_to_str): Do not handle
4201 PTRACE_GETTHREADLIST if this macro does not exist.
4202
14a00470
YQ
42032012-12-15 Yao Qi <yao@codesourcery.com>
4204
4205 * Makefile.in (OBS): Add notif.o.
4206 * notif.c, notif.h: New.
4207 * server.c: Include "notif.h".
4208 (struct vstop_notif) <next>: Remove.
4209 <base>: New field.
4210 (queue_stop_reply): Update.
4211 (push_event, send_next_stop_reply): Remove.
4212 (discard_queued_stop_replies): Update.
4213 (notif_stop): New variable.
4214 (handle_v_stopped): Remove.
4215 (handle_v_requests): Don't call handle_v_stopped. Call
4216 handle_ack_notif instead.
4217 (queue_stop_reply_callback): Call notif_event_enque instead
4218 of queue_stop_reply.
4219 (handle_status): Don't call send_next_stop_reply, call
4220 notif_write_event instead.
4221 (kill_inferior_callback): Likewise.
4222 (detach_or_kill_inferior_callback): Likewise.
4223 (main): Call initialize_notif.
4224 (process_serial_event): Call QUEUE_is_empty.
4225 (handle_target_event): Call notif_push instead of push event.
4226 * server.h (push_event): Remove declaration.
4227
61c125b9
TT
42282012-12-10 Tom Tromey <tromey@redhat.com>
4229
4230 * Makefile.in (DEPMODE, DEPDIR, depcomp, COMPILE.pre)
4231 (COMPILE.post, COMPILE, POSTCOMPILE, IPAGENT_COMPILE): New
4232 macros.
4233 (.c.o): Rewrite.
4234 (ax-ipa.o, tracepoint-ipa.o, utils-ipa.o, format-ipa.o)
4235 (common-utils-ipa.o, remote-utils-ipa.o, regcache-ipa.o)
4236 (i386-linux-ipa.o, linux-i386-ipa.o, linux-amd64-ipa.o)
4237 (amd64-linux-ipa.o, ax.o): Rewrite.
4238 (event-loop.o, hostio.o, hostio-errno.o, inferiors.o, mem-break.o)
4239 (proc-service.o, regcache.o, remote-utils.o, server.o, target.o)
4240 (thread-db.o, tracepoint.o, utils.o, gdbreplay.o, dll.o): Remove.
4241 (signals.o, linux-procfs.o, linux-ptrace.o, common-utils.o, vec.o)
4242 (gdb_vecs.o, xml-utils.o, linux-osdata.o, ptid.o, buffer.o)
4243 (format.o, agent.o, vasprintf.o, vsnprintf.o): Rewrite.
4244 (i386-low.o, i387-fp.o, linux-low.o, linux-arm-low.o)
4245 (linux-bfin-low.o, linux-cris-low.o, linux-crisv32-low.o)
4246 (linux-ia64-low.o, linux-m32r-low.o, linux-mips-low.o)
4247 (linux-ppc-low.o, linux-s390-low.o, linux-sh-low.o)
4248 (linux-tic6x-low.o, linux-x86-low.o, linux-xtensa-low.o)
4249 (linux-tile-low.o, lynx-low.o, lynx-ppc-low.o, nto-low.o)
4250 (nto-x86-low.o, linux-low.o, win32-low.o, win32-arm-low.o)
4251 (win32-i386-low.o, spu-low.o, reg-arm.o, arm-with-iwmmxt.o)
4252 (arm-with-vfpv2.o, arm-with-vfpv3.o, arm-with-neon.o, reg-bfin.o)
4253 (reg-cris.o, reg-crisv32.o, i386.o, i386-linux.o, i386-avx.o)
4254 (i386-avx-linux.o, i386-mmx.o, i386-mmx-linux.o, reg-ia64.o)
4255 (reg-m32r.o, reg-m68k.o, reg-cf.o, mips-linux.o, mips-dsp-linux.o)
4256 (mips64-linux.o, mips64-dsp-linux.o, powerpc-32.o, powerpc-32l.o)
4257 (powerpc-altivec32l.o, powerpc-cell32l.o, powerpc-vsx32l.o)
4258 (powerpc-isa205-32l.o, powerpc-isa205-altivec32l.o)
4259 (powerpc-isa205-vsx32l.o, powerpc-e500l.o, powerpc-64l.o)
4260 (powerpc-altivec64l.o, powerpc-cell64l.o, powerpc-vsx64l.o)
4261 (powerpc-isa205-64l.o, powerpc-isa205-altivec64l.o)
4262 (powerpc-isa205-vsx64l.o, s390-linux32.o, s390-linux32v1.o)
4263 (s390-linux32v2.o, s390-linux64.o, s390-linux64v1.o)
4264 (s390-linux64v2.o, s390x-linux64.o, s390x-linux64v1.o)
4265 (s390x-linux64v2.o, tic6x-c64xp-linux.o, tic6x-c64x-linux.o)
4266 (tic6x-c62x-linux.o, reg-sh.o, reg-sparc64.o, reg-spu.o, amd64.o)
4267 (amd64-linux.o, amd64-avx.o, amd64-avx-linux.o, x32.o)
4268 (x32-linux.o, x32-avx.o, x32-avx-linux.o, reg-xtensa.o)
4269 (reg-tilegx.o): Remove.
4270 (all_object_files): New macro.
4271 Include .deps files.
4272 * aclocal.m4, configure: Rebuild.
4273 * acinclude.m4: Include depstand.m4, lead-dot.m4.
4274 * configure.ac: Invoke ZW_CREATE_DEPDIR,
4275 ZW_PROG_COMPILER_DEPENDENCIES. Compute GMAKE condition.
4276
e90e9ad9
TT
42772012-12-05 Tom Tromey <tromey@redhat.com>
4278
4279 PR gdb/14917:
4280 * server.h (current_insn_ptr, emit_error): Declare 'extern'.
4281
02d403bf 42822012-11-28 Markus Metzger <markus.t.metzger@intel.com>
945bf713
MM
4283
4284 * configure.ac: Check for linux/perf_event.h.
4285 * config.in: Regenerated.
4286 * configure: Regenerated.
4287
0270a750
PA
42882012-11-26 Maxime Villard <rustyBSD@gmx.fr>
4289
4290 * hostio.c (handle_readlink): Decrease buffer size
4291 parameter passed to readlink by one byte.
4292
8c29b58e
YQ
42932012-11-26 Yao Qi <yao@codesourcery.com>
4294
4295 * configure.ac (build_warnings): Append '-Wempty-body'.
4296 * configure: Regenerated.
4297 * linux-low.c (linux_create_inferior): Use braces for empty 'if'
4298 body.
4299
8bdce1ff
PM
43002012-11-15 Pierre Muller <muller@sourceware.org>
4301
4302 * configure.ac (AC_CHECK_HEADERS): Add wait.h header.
4303 * config.in: Regenerate.
4304 * configure: Regenerate.
4305 * linux-low.c: Use "gdb_stat.h" header instead of <sys/stat.h> header.
4306 Use "gdb_wait.h" header instead of <sys/wait.h> header.
4307 * lynx-low.c: Use "gdb_wait.h" header instead of <sys/wait.h> header.
4308 * remote-utils.c: Use "gdb_stat.h" header instead of <sys/stat.h>
4309 header.
4310 * server.c: Remove HAVE_WAIT_H conditional. Use "gdb_wait.h" header
4311 instead of <sys/wait.h> header.
4312 * spu-low.c: Use "gdb_wait.h" header instead of <sys/wait.h> header.
4313
02d403bf 43142012-11-13 Markus Metzger <markus.t.metzger@intel.com>
3ba6ad0f
MM
4315
4316 * Makefile.in: (INTERNAL_CFLAGS): Add -DGDBSERVER
4317 (various make rules): Remove -DGDBSERVER
4318
fbd5db48
YQ
43192012-11-09 Yao Qi <yao@codesourcery.com>
4320
4321 * spu-low.c (current_ptid): Move it to ..
4322 * gdbthread.h: ... here. New.
4323 * remote-utils.c (read_ptid): Use macro 'current_ptid'.
4324 * server.c (myresume, process_serial_event): Likewise.
4325 * thread-db.c (thread_db_find_new_threads): Likewise.
4326 * tracepoint.c (run_inferior_command): Likewise.
4327
b3dc46ff
AB
43282012-10-01 Andrew Burgess <aburgess@broadcom.com>
4329
4330 * server.c (handle_search_memory_1): Include access length in
4331 warning message.
4332
07c04788
HPN
43332012-09-05 Michael Brandt <michael.brandt@axis.com>
4334
4335 * linux-crisv32-low.c: Fix compile errors.
4336
918d227b
YQ
43372012-09-04 Yao Qi <yao@codesourcery.com>
4338
4339 * tracepoint.c (cmd_qtsv): Adjust debug message.
4340 Don't check CUR_TPOINT.
4341
18c1b81a
YQ
43422012-08-28 Yao Qi <yao@codesourcery.com>
4343
4344 * ax.c, tracepoint.c: Replace ATTR_FORMAT with ATTRIBUTE_PRINTF.
4345 * server.h: Include 'libiberty.h' and 'ansidecl.h'.
4346 (ATTR_NORETURN, ATTR_FORMAT, ATTR_MALLOC): Remove.
4347 Remove declarations of xmalloc, xreallloc, xstrdup and
4348 freeargv.
4349 * Makefile.in (libiberty_h): New.
4350 (server_h): Append dependencies 'libiberty.h' and 'ansidecl.h'.
4351 (linux-bfin-low.o): Append dependency 'libiberty.h'.
4352
dc82f37b
YQ
43532012-08-23 Yao Qi <yao@codesourcery.com>
4354
4355 * server.h: Remove declaration of 'xsnprintf'.
4356
406b1477
KS
43572012-08-22 Keith Seitz <keiths@redhat.com>
4358
4359 * server.h: Include build-gnulib-gbserver/config.h.
4360 * gdbreplay.c: Likewise.
4361
e6712ff1
DE
43622012-08-08 Doug Evans <dje@google.com>
4363
4364 * Makefile.in (SFILES): Add gdb_vecs.c.
4365 (OBS): Add gdb_vecs.o.
4366 (gdb_vecs_h, host_defs_h): New variables.
4367 (thread-db.o): Add $(gdb_vecs_h) dependency.
4368 (gdb_vecs.o): New rule.
4369 * thread-db.c: #include "gdb_vecs.h".
4370 (thread_db_load_search): Use a vector to iterate over path elements.
4371 Handle text appearing after "$pdir".
4372
4373 * configure.ac: Add check for strstr.
4374 * config.in: Regenerate.
4375 * configure: Regenerate.
4376
7c3270ae
UW
43772012-08-02 Ulrich Weigand <ulrich.weigand@linaro.org>
4378
4379 * hostio.c (handle_pread): If pread fails, fall back to attempting
4380 lseek/read.
4381 (handle_pwrite): Likewise for pwrite.
4382
b62e2b27
UW
43832012-08-01 Ulrich Weigand <ulrich.weigand@linaro.org>
4384
4385 * linux-arm-low.c (arm_linux_hw_point_initialize): Distinguish
4386 between unsupported TYPE and unimplementable ADDR/LEN combination.
4387 (arm_insert_point): Act on new return value.
4388
78a99e91
PA
43892012-07-31 Pedro Alves <palves@redhat.com>
4390
4391 * server.c (process_point_options): Only skip tokens if we find
4392 one that is unrecognized. Don't treat 'X' specially while
4393 skipping unrecognized tokens.
4394
fcf303ab
UW
43952012-07-30 Ulrich Weigand <ulrich.weigand@linaro.org>
4396
4397 * linux-arm-low.c (arm_linux_hw_point_initialize): Do not attempt
4398 to 4-byte-align HW breakpoint addresses for Thumb.
4399
7255706c
YQ
44002012-07-27 Yao Qi <yao@codesourcery.com>
4401
4402 PR remote/14161.
4403
4404 * server.h: Declare gdb_agent_about_to_close.
4405 * target.c (kill_inferior): Include "agent.h".
4406 New. Send command 'kill'.
4407 * target.h (kill_inferior): Removed macro.
4408 * tracepoint.c (gdb_agent_about_to_close): New.
4409 (gdb_agent_helper_thread): Handle command 'close'.
4410 Wait endlessly until the inferior stops.
4411 Install gdb_agent_remove_socket to atexit hook.
4412 (agent_socket_name): New static variable.
4413 (gdb_agent_socket_init): Replace local variable 'name' with
4414 'agent_socket_name'.
4415 (gdb_agent_remove_socket): New.
4416
5a3f286f
YQ
44172012-07-27 Yao Qi <yao@codesourcery.com>
4418
4419 * server.c (process_point_options): Stop at 'X' when parsing.
4420
961bd387
ME
44212012-07-19 Michael Eager <eager@eagercon.com>
4422
a261b8f5 4423 * i386-low.c (Z_packet_to_hw_type): Add Z_PACKET_HW_BP, translate
961bd387
ME
4424 to hw_execute.
4425 * linux-x86-low.c (x86_insert_point, x86_remove_point):
4426 Call i386_low_insert_watchpoint, i386_low_remove_watchpoint to add/del
4427 hardware breakpoint.
4428
aa7c7447
JK
44292012-07-07 Jan Kratochvil <jan.kratochvil@redhat.com>
4430
4431 * gdbserver/linux-low.c (initialize_low): Call
4432 linux_ptrace_init_warnings.
4433
7f216e7c
DE
44342012-07-02 Doug Evans <dje@google.com>
4435
4436 * mem-break.c (gdb_no_commands_at_breakpoint): Fix cast from
4437 pointer to int.
4438
d3ce09f5
SS
44392012-07-02 Stan Shebs <stan@codesourcery.com>
4440
4441 * Makefile.in (WARN_CFLAGS_NO_FORMAT): Define.
4442 (ax.o): Add it to build rule.
4443 (ax-ipa.o): Ditto.
4444 (OBS): Add format.o.
4445 (IPA_OBS): Add format.o.
4446 * server.c (handle_query): Claim support for breakpoint commands.
4447 (process_point_options): Add command case.
4448 (process_serial_event): Leave running if there are printfs in
4449 effect.
4450 * mem-break.h (any_persistent_commands): Declare.
4451 (add_breakpoint_commands): Declare.
4452 (gdb_no_commands_at_breakpoint): Declare.
4453 (run_breakpoint_commands): Declare.
4454 * mem-break.c (struct point_command_list): New struct.
4455 (struct breakpoint): New field command_list.
4456 (any_persistent_commands): New function.
4457 (add_commands_to_breakpoint): New function.
4458 (add_breakpoint_commands): New function.
4459 (gdb_no_commands_at_breakpoint): New function.
4460 (run_breakpoint_commands): New function.
4461 * linux-low.c (linux_wait_1): Test for and run breakpoint commands
4462 locally.
4463 * ax.c: Include format.h.
4464 (ax_printf): New function.
4465 (gdb_eval_agent_expr): Add printf opcode.
4466
2f8f6aed
YQ
44672012-06-13 Yao Qi <yao@codesourcery.com>
4468
4469 * server.c (start_inferior): Remove duplicated writes to fields
4470 'last_resume_kind' and 'last_status' of 'current_inferior'.
4471
0c9070b3
YQ
44722012-06-12 Yao Qi <yao@codesourcery.com>
4473 Pedro Alves <palves@redhat.com>
4474
4475 * linux-low.c (linux_set_resume_request): Simplify predicate. Add
4476 comment.
4477 * server.c (handle_v_cont): Extend comment.
4478
c52daf70
YQ
44792012-06-11 Yao Qi <yao@codesourcery.com>
4480
4481 * linux-low.c (linux_attach): Add 'static'.
4482
d38bbb0a
YQ
44832012-06-06 Yao Qi <yao@codesourcery.com>
4484
4485 * ax.c (gdb_eval_agent_expr): Print `top' in hex.
4486
89dc0afd
JK
44872012-06-01 Jan Kratochvil <jan.kratochvil@redhat.com>
4488
4489 Fix gcc -flto compilation warning.
4490 * server.c (main): Make variable multi_mode and attach volatile.
4491
75f62ce7
TJB
44922012-05-30 Thiago Jung Bauermann <thiago.bauermann@linaro.org>
4493
4494 * linux-low.c (get_r_debug): Disable code using DT_MIPS_RLD_MAP
4495 if the platform doesn't know about it.
4496
65f479b6
PA
44972012-05-30 Jeff Kenton <jkenton@tilera.com>
4498
4499 * Makefile.in (SFILES): Add linux-tile-low.c.
4500 (linux-tile-low.o, reg-tilegx.o, reg-tilegx.c): New rules.
4501 * configure.srv: Handle tilegx-*-linux*.
4502 * linux-tile-low.c: New file.
4503
0c5bf5a9
JK
45042012-05-28 Jan Kratochvil <jan.kratochvil@redhat.com>
4505
4506 * linux-low.c (linux_qxfer_libraries_svr4): Return -1 if R_DEBUG is -1.
4507
a493e3e2
PA
45082012-05-24 Pedro Alves <palves@redhat.com>
4509
4510 PR gdb/7205
4511
43aaf8b6 4512 Replace TARGET_SIGNAL_ with GDB_SIGNAL_ throughout.
a493e3e2 4513
2ea28649
PA
45142012-05-24 Pedro Alves <palves@redhat.com>
4515
4516 PR gdb/7205
4517
4518 Replace target_signal with gdb_signal throughout.
4519
8d409d16
MR
45202012-05-22 Maciej W. Rozycki <macro@codesourcery.com>
4521
4522 * linux-low.c (linux_store_registers): Avoid the copying sequence
4523 when no data has been retrieved by ptrace.
4524
23512c01
MGD
45252012-05-22 Will Deacon <will.deacon@arm.com>
4526
4527 * linux-low (__UCLIBC__ && !(__UCLIBC_HAS_MMU__ || __ARCH_HAS_MMU__)):
4528 Include asm/ptrace.h.
4529 (PT_TEXT_ADDR, PT_DATA_ADDR, PT_TEXT_END_ADDR): Define only if not
4530 already defined.
4531
4934b29e
MR
45322012-05-21 Maciej W. Rozycki <macro@codesourcery.com>
4533
4534 * linux-low.c (linux_store_registers): Don't re-retrieve data
4535 with ptrace that has already been obtained from /proc. Always
4536 copy any data retrieved with ptrace to the buffer supplied.
4537
bde24c0a
PA
45382012-05-11 Yao Qi <yao@codesourcery.com>
4539 Pedro Alves <palves@redhat.com>
4540
4541 * linux-low.c (enum stopping_threads_kind): New.
4542 (stopping_threads): Change type to `enum stopping_threads_kind'.
4543 (handle_extended_wait): If stopping and suspending threads, leave
4544 the new_lwp suspended too.
4545 (linux_wait_for_event): Adjust.
4546 (stop_all_lwps): Set `stopping_threads' to
4547 STOPPING_AND_SUSPENDING_THREADS or STOPPING_THREADS depending on
4548 whether we're suspending threads or just stopping them. Assert no
4549 recursion happens.
4550
623b6bdf
YQ
45512012-04-29 Yao Qi <yao@codesourcery.com>
4552
4553 * server.h: Move some code to ...
4554 * gdbthread.h: ... here. New.
4555 * Makefile.in (inferiors.o, regcache.o): Depends on gdbthread.h
4556 (remote-utils.o, server.o, target.o tracepoint.o): Likewise.
4557 (nto-low.o, win32-low.o): Likewise.
4558 * inferiors.c, linux-low.h, nto-low.c: Include gdbthread.h.
4559 * regcache.c, remote-utils.c, server.c: Likewise.
4560 * target.c, tracepoint.c, win32-low.c: Likewise.
4561
f15f9948
TJB
45622012-04-24 Thiago Jung Bauermann <thiago.bauermann@linaro.org>
4563
4564 * linux-low.h (PTRACE_ARG3_TYPE): Move macro from linux-low.c.
4565 (PTRACE_ARG4_TYPE): Likewise.
4566 (PTRACE_XFER_TYPE): Likewise.
4567 * linux-arm-low.c (arm_prepare_to_resume): Cast third argument of
4568 ptrace to PTRACE_ARG3_TYPE.
4569 * linux-low.c (PTRACE_ARG3_TYPE): Move macro to linux-low.h.
4570 (PTRACE_ARG4_TYPE): Likewise.
4571 (PTRACE_XFER_TYPE): Likewise.
4572 (linux_detach_one_lwp): Cast fourth argument of
4573 ptrace to long then PTRACE_ARG4_TYPE.
4574 (regsets_fetch_inferior_registers): Cast third argument of
4575 ptrace to long then PTRACE_ARG3_TYPE.
4576 (regsets_store_inferior_registers): Likewise.
4577
38ea300a
PA
45782012-04-20 Pedro Alves <palves@redhat.com>
4579
4580 * configure: Regenerate.
4581
c971b7fa
PA
45822012-04-19 Pedro Alves <palves@redhat.com>
4583
43aaf8b6 4584 * Makefile.in (GNULIB_BUILDDIR): New.
c971b7fa 4585 (LIBGNU, INCGNU, GNULIB_H): Adjust.
43aaf8b6
PA
4586 (SUBDIRS, CLEANDIRS, REQUIRED_SUBDIRS): New.
4587 (all, install-only, uninstall, clean-info, all-lib, clean): No
4588 longer pass GNULIB_FLAGS_TO_PASS. Use subdir_do.
4589 (maintainer-clean realclean distclean): Use subdir_do.
4590 (subdir_do): New.
4591 (gnulib/import/Makefile): Adjust. Replace gnulib/import with
c971b7fa 4592 $(GNULIB_BUILDDIR). Don't pass argument to config.status.
43aaf8b6
PA
4593 * acinclude.m4: Include acx_configure_dir.m4.
4594 * configure.ac: Remove gl_EARLY, gl_INIT, and AM_INIT_AUTOMAKE
4595 calls. Call AC_PROG_RANLIB. Configure gnulib using
4596 ACX_CONFIGURE_DIR.
4597 (GNULIB): New.
4598 (GNULIB_STDINT_H): Adjust.
4599 (AC_OUTPUT): Don't output gnulib/Makefile anymore.
4600 * gdbreplay.c: Include build-gnulib/config.h.
4601 * server.h: Likewise.
4602 * aclocal.m4: Regenerate.
4603 * config.in: Regenerate.
4604 * configure: Regenerate.
c971b7fa 4605
809277f8
PA
46062012-04-19 Pedro Alves <palves@redhat.com>
4607
4608 * Makefile.in (LIBGNU, INCGNU): Adjust.
4609 (GNULIB_FLAGS_TO_PASS, GNULIB_H): Adjust.
4610 (all, install-only, uninstall, clean-info, all-lib, clean)
4611 (maintainer-clean, Makefile, gnulib/Makefile): Adjust.
4612 * configure.ac: Adjust AC_OUTPUT output.
4613 * aclocal.m4: Regenerate.
4614 * configure: Regenerate.
4615
fd9bb8b8
PA
46162012-04-19 Pedro Alves <palves@redhat.com>
4617
4618 * Makefile.in (generated_files): New.
4619 (server_h): Remove the explicit dependency on config.h, and depend
4620 on $generated_files.
4621
1c298c66
PA
46222012-04-19 Pedro Alves <palves@redhat.com>
4623
4624 * Makefile.in (INCGNU): Add -Ignulib.
4625
57c4b50b
PA
46262012-04-19 Pedro Alves <palves@redhat.com>
4627
4628 * Makefile.in (GNULIB_INCLUDE_DIR): Rename to ...
4629 (INCGNU): ... this, and spell out -I here.
4630 (GNULIB_LIB): Rename to ...
4631 (LIBGNU): ... this.
4632 (INCLUDE_CFLAGS, gdbserver$(EXEEXT), $(GNULIB_LIB) rule): Adjust.
4633
1030e047
PA
46342012-04-19 Pedro Alves <palves@redhat.com>
4635
4636 * config.in: Regenerate.
4637
447d4319
PA
46382012-04-19 Pedro Alves <palves@redhat.com>
4639
4640 * configure.ac: Remove AC_CHECK_DECLS check for memmem.
4641 * server.h (memmem): Remove declaration.
4642 * config.in: Regenerate.
4643 * configure: Regenerate.
4644
aad9eab9
YQ
46452012-04-19 Yao Qi <yao@codesourcery.com>
4646
4647 * Makefile.in (SFILES): Add common/vec.c.
4648 (OBS): Add vec.o.
4649 (vec.o): New rule.
4650
3e10640f
YQ
46512012-04-19 Yao Qi <yao@codesourcery.com>
4652
4653 * remote-utils.c (prepare_resume_reply): Replace with macro
4654 target_core_of_thread.
4655 * server.c (handle_qxfer_threads_proper): Likewise.
4656 * target.h (traget_core_of_thread): New macro.
4657
71622373
PA
46582012-04-18 Pedro Alves <palves@redhat.com>
4659
4660 * aclocal.m4: Regenerate.
4661 * configure: Regenerate.
4662
80d26939
YQ
46632012-04-16 Yao Qi <yao@codesourcery.com>
4664
4665 * tracepoint.c (cmd_qtstart): Download tracepoints even when they are
4666 duplicated on address.
4667
42476b70
YQ
46682012-04-16 Yao Qi <yao@codesourcery.com>
4669
4670 * tracepoint.c (COPY_FIELD_TO_BUF): New macro.
4671 (struct tracepoint_action_ops) <send>: New field.
4672 (m_tracepoint_action_send, r_tracepoint_action_send): New.
4673 (agent_expr_send, x_tracepoint_action_send): New.
4674 (l_tracepoint_action_send): New.
4675 (cmd_qtdp): Download and install tracepoint
4676 according to `use_agent'.
4677 (run_inferior_command): Add one more parameter `len'.
4678 Update callers.
4679 (tracepoint_send_agent): New.
4680 (cmd_qtdp, cmd_qtstart): Call tracepoint_send_agent.
4681
7bc83639
YQ
46822012-04-16 Yao Qi <yao@codesourcery.com>
4683
4684 * tracepoint.c (download_tracepoints): Moved to ...
4685 (cmd_qtstart): ... here.
4686
5f18041e
YQ
46872012-04-14 Yao Qi <yao@codesourcery.com>
4688
4689 * tracepoint.c: Include inttypes.h.
4690 (struct collect_memory_action): Use sized types.
4691 (struct tracepoint): Likewise.
4692 (cmd_qtdp, stop_tracing): Update print specifiers.
4693 (cmd_qtp, response_tracepoint): Likewise.
4694 (collect_data_at_tracepoint): Likewise.
4695 (collect_data_at_step): Likewise.
4696
55a8c076
YQ
46972012-04-14 Yao Qi <yao@codesourcery.com>
4698
4699 Import gnulib module inttypes.
4700 * aclocal.m4, config.in, configure: Regenerated.
4701
dc750257
YQ
47022012-04-14 Yao Qi <yao@codesourcery.com>
4703
4704 * Makefile.in (maintainer-clean, realclean, distclean): Remove
4705 Makefile and config.status at last.
4706
0ab5faf9
YQ
47072012-04-13 Yao Qi <yao@codesourcery.com>
4708
4709 * tracepoint.c: Include stdint.h unconditionally.
4710
18f5fd81
TJB
47112012-04-13 Thiago Jung Bauermann <thiago.bauermann@linaro.org>
4712
4713 * acinclude.m4 (GDBSERVER_HAVE_THREAD_DB_TYPE): New macro based
4714 on BFD_HAVE_SYS_PROCFS_TYPE.
4715 * configure.ac: Look for lwpid_t and psaddr_t in libthread_db.h.
4716 * configure: Regenerate.
4717 * config.in: Likewise.
4718
4d47af5c
L
47192012-04-13 H.J. Lu <hongjiu.lu@intel.com>
4720
4721 * Makefile.in (clean): Also remove x32.c x32-linux.c
4722 x32-avx.c x32-avx-linux.c.
4723 (x32.o): New target.
4724 (x32.c): Likewise.
4725 (x32-linux.o): Likewise.
4726 (x32-linux.c): Likewise.
4727 (x32-avx.o): Likewise.
4728 (x32-avx.c): Likewise.
4729 (x32-avx-linux.o): Likewise.
4730 (x32-avx-linux.c): Likewise.
4731
4732 * configure.srv (srv_amd64_regobj): Add x32.o x32-avx.o.
4733 (srv_amd64_linux_regobj): Add x32-linux.o x32-avx-linux.o.
4734 (srv_i386_64bit_xmlfiles): Add i386/x32-core.xml.
4735 (srv_amd64_xmlfiles): Add i386/x32.xml i386/x32-avx.xml.
4736 (srv_amd64_linux_xmlfiles): Add i386/x32-linux.xml
4737 i386/x32-avx-linux.xml.
4738
4739 * linux-x86-low.c (init_registers_x32_linux): New prototype.
4740 (init_registers_x32_avx_linux): Likwise.
4741 (x86_linux_update_xmltarget): Call init_registers_x32_linux
4742 or init_registers_x32_avx_linux if linux_is_elf64 is false.
4743
ecedbe58
PA
47442012-04-13 Pedro Alves <palves@redhat.com>
4745
4746 * Makefile.in (GNULIB_FLAGS_TO_PASS): New.
4747 (FLAGS_TO_PASS): Don't change or set $top_srcdir, $srcdir and VPATH.
4748 (all, uninstall, clean-info, all-lib, clean, maintainer-clean)
4749 (realclean, distclean): Explicitly pass $GNULIB_FLAGS_TO_PASS to
4750 the sub-make.
4751
c92b5177
L
47522012-04-12 H.J. Lu <hongjiu.lu@intel.com>
4753
4754 * linux-x86-low.c (compat_x32_clock_t): New.
4755 (compat_x32_siginfo_t): Likewise.
4756 (compat_x32_siginfo_from_siginfo): Likewise.
4757 (siginfo_from_compat_x32_siginfo): Likewise.
4758 (linux_is_elf64): Likewise.
4759 (x86_siginfo_fixup): Call compat_x32_siginfo_from_siginfo
4760 and siginfo_from_compat_x32_siginfo for x32.
4761 (x86_arch_setup): Set linux_is_elf64.
4762
214d508e
L
47632012-04-12 H.J. Lu <hongjiu.lu@intel.com>
4764
4765 PR gdb/13969
4766 * linux-low.c (linux_pid_exe_is_elf_64_file): Also return the
4767 e_machine field.
4768 (linux_qxfer_libraries_svr4): Update call to elf_64_file_p.
4769 * linux-low.h (linux_pid_exe_is_elf_64_file): Updated.
4770 * linux-x86-low.c (x86_arch_setup): Check if GDBserver is
4771 compatible with process.
4772
c9a1864a
YQ
47732012-04-12 Yao Qi <yao@codesourcery.com>
4774
4775 * Makefile.in: Define abs_top_srcdir and abs_srcdir.
4776 (INCLUDE_CFLAGS): Append GNULIB_INCLUDE_DIR.
4777 (install-only, install-info, clean): Handle sub dir gnulib.
4778 (all-lib, am--refresh): New targets.
4779 (memmem.o): Remove target.
4780 * configure.ac: Remove AC_CONFIG_LIBOBJ_DIR.
4781 Invoke gl_EARLY. Invoke AC_CHECK_PROGS for make.
4782 (AC_REPLACE_FUNCS): Remove memmem.
4783 Invoke gl_INIT and AM_INIT_AUTOMAKE.
4784 (AC_OUTPUT): Generate Makefile in gnulib/.
4785 * aclocal.m4, config.in, configure: Regenerated.
4786
367ba2c2
MR
47872012-04-10 Maciej W. Rozycki <macro@codesourcery.com>
4788
4789 * linux-low.c (get_r_debug): Handle DT_MIPS_RLD_MAP.
4790
9d236627
PA
47912012-04-05 Pedro Alves <palves@redhat.com>
4792
4793 -Werror=strict-aliasing
4794
4795 * spu-low.c (parse_spufs_run): Avoid dereferencing type-punned
4796 pointer.
4797
111217b3
PA
47982012-04-04 Pedro Alves <palves@redhat.com>
4799
4800 * linux-sparc-low.c (sparc_fill_gregset_to_stack)
4801 (sparc_store_gregset_from_stack, sparc_store_gregset)
4802 (sparc_breakpoint_at): Fix formatting.
4803
8365dcf5
TJB
48042012-03-30 Thiago Jung Bauermann <thiago.bauermann@linaro.org>
4805
4806 * configure.ac: Check whether Elf32_auxv_t and Elf64_auxv_t
4807 are available.
4808 * linux-low.c [HAVE_ELF32_AUXV_T] (Elf32_auxv_t): Add typedef.
4809 [HAVE_ELF64_AUXV_T] (Elf64_auxv_t): Likewise.
4810 * config.in: Regenerate.
4811 * configure: Likewise.
4812
689cc2ae
PA
48132012-03-29 Pedro Alves <palves@redhat.com>
4814
4815 * linux-low.c (regsets_store_inferior_registers) [__sparc__]:
4816 Correct ptrace arguments.
4817
c14dfd32
PA
48182012-03-28 Pedro Alves <palves@redhat.com>
4819
4820 * linux-ia64-low.c (ia64_regmap): Map IA64_EC_REGNUM to PT_AR_EC.
4821 (IA64_GR0_REGNUM, IA64_FR0_REGNUM)
4822 (IA64_FR1_REGNUM): New defines.
4823 (ia64_fetch_register): New.
4824 (the_low_target): Install it.
4825 * linux-low.h (struct linux_target_ops) <fetch_register>: New
4826 field.
4827 * linux-low.c (linux_fetch_registers): Try the
4828 the_low_target.fetch_register hook first.
4829
4830 * linux-arm-low.c (the_low_target): Adjust.
4831 * linux-bfin-low.c (the_low_target): Adjust.
4832 * linux-cris-low.c (the_low_target): Adjust.
4833 * linux-crisv32-low.c (the_low_target): Adjust.
4834 * linux-m32r-low.c (the_low_target): Adjust.
4835 * linux-m68k-low.c (the_low_target): Adjust.
4836 * linux-mips-low.c (the_low_target): Adjust.
4837 * linux-ppc-low.c (the_low_target): Adjust.
4838 * linux-s390-low.c (the_low_target): Adjust.
4839 * linux-sh-low.c (the_low_target): Adjust.
4840 * linux-sparc-low.c (the_low_target): Adjust.
4841 * linux-tic6x-low.c (the_low_target): Adjust.
4842 * linux-x86-low.c (the_low_target): Adjust.
4843 * linux-xtensa-low.c (the_low_target): Adjust.
4844
63c88e13
PA
48452012-03-26 Pedro Alves <palves@redhat.com>
4846
4847 * server.c (handle_qxfer_libraries): Don't bail early if
4848 the_target->qxfer_libraries_svr4 is not NULL.
4849
fb723180
PA
48502012-03-26 Pedro Alves <palves@redhat.com>
4851
4852 * linux-low.c (linux_qxfer_libraries_svr4): Fix pasto in comment.
4853
0afae3cf
PA
48542012-03-23 Pedro Alves <palves@redhat.com>
4855
4856 * linux-low.c (linux_qxfer_libraries_svr4): Terminate the
4857 "library-list-svr4" element's start tag when the the DSO list is
4858 empty.
4859
485f1ee4
PA
48602012-03-23 Pedro Alves <palves@redhat.com>
4861
4862 * linux-low.c (read_one_ptr): Read the inferior's pointer through
4863 a variable whose type size is the same as the inferior's pointer
4864 size.
4865
a5362b9a
TS
48662012-03-21 Thomas Schwinge <thomas@codesourcery.com>
4867
4868 * linux-arm-low.c (arm_stopped_by_watchpoint): Use siginfo_t instead of
4869 struct siginfo.
4870 * linux-low.c (siginfo_fixup, linux_xfer_siginfo): Likewise.
4871 * linux-x86-low.c (x86_siginfo_fixup): Likewise.
4872 * linux-low.h: Include <signal.h>.
4873 (struct siginfo): Remove forward declaration.
4874 (struct linux_target_ops) <siginfo_fixup>: Use siginfo_t instead of
4875 struct siginfo.
4876
d226c142
MF
48772012-03-21 Mike Frysinger <vapier@gentoo.org>
4878
4879 * .gitignore: Ignore more files.
4880
122f36ef
PA
48812012-03-19 Pedro Alves <palves@redhat.com>
4882 Jan Kratochvil <jan.kratochvil@redhat.com>
4883
4884 * server.c (cont_thread, general_thread): Add describing comments.
4885 (start_inferior): Clear `cont_thread'.
4886 (handle_v_cont): Don't set `cont_thread' if resuming all threads
4887 of a process.
4888
fc3e5175
YQ
48892012-03-15 Yao Qi <yao@codesourcery.com>
4890
4891 * tracepoint.c (install_tracepoint): Move duplicated tracepoint
4892 handling to ...
4893 (cmd_qtdp): ... here.
4894
8d0d92cd
YQ
48952012-03-15 Yao Qi <yao@codesourcery.com>
4896
4897 * tracepoint.c (struct tracepoint_action_ops): New.
4898 (struct tracepoint_action) [!IN_PROCESS_AGENT] <ops>: New field.
4899 (m_tracepoint_action_download): New.
4900 (r_tracepoint_action_download): New.
4901 (x_tracepoint_action_download): New.
4902 (l_tracepoint_action_download): New.
4903 (add_tracepoint_action): Install `action->ops' according type.
4904 (download_tracepoint_1): Move code `download' function pointer
4905 of various tracepoint_action_ops.
4906
87b0bb13
JK
49072012-03-13 Jan Kratochvil <jan.kratochvil@redhat.com>
4908
4909 * linux-low.c (linux_attach_lwp_1): New variable buffer. Call
4910 linux_ptrace_attach_warnings.
4911
5f572dec
JK
49122012-03-13 Jan Kratochvil <jan.kratochvil@redhat.com>
4913
4914 * Makefile.in (linux-ptrace.o): New.
4915 * configure.srv (arm*-*-linux*, bfin-*-*linux*, crisv32-*-linux*)
4916 (cris-*-linux*, i[34567]86-*-linux*, ia64-*-linux*, m32r*-*-linux*)
4917 (m68*-*-linux*, m68*-*-uclinux*, mips*-*-linux*, powerpc*-*-linux*)
4918 (s390*-*-linux*, sh*-*-linux*, sparc*-*-linux*, tic6x-*-uclinux)
4919 (x86_64-*-linux*, xtensa*-*-linux*): Add linux-ptrace.o to SRV_TGTOBJ
4920 of these targets.
4921 * linux-low.c (linux_attach_lwp_1): Remove redundent else clause.
4922
f4647387
YQ
49232012-03-08 Yao Qi <yao@codesourcery.com>
4924 Pedro Alves <palves@redhat.com>
4925
4926 Fix PR server/13392.
4927 * linux-x86-low.c (amd64_install_fast_tracepoint_jump_pad): Check
4928 offset of JMP insn.
4929 * tracepoint.c (remove_tracepoint): New.
4930 (cmd_qtdp): Call remove_tracepoint when failed to install.
4931
9b224c5e
PA
49322012-03-07 Pedro Alves <palves@redhat.com>
4933
4934 * linux-low.c (get_detach_signal): New.
4935 (linux_detach_one_lwp): Get rid of a pending SIGSTOP with SIGCONT.
4936 Pass on pending signals to PTRACE_DETACH. Check the result of the
4937 ptrace call.
4938 * server.c (program_signals, program_signals_p): New.
4939 (handle_general_set): Handle QProgramSignals.
4940 * server.h (program_signals, program_signals_p): Declare.
4941
e237a7e2
JK
49422012-03-05 Pedro Alves <palves@redhat.com>
4943 Jan Kratochvil <jan.kratochvil@redhat.com>
4944
4945 * linux-low.c (get_dynamic): Don't warn when PT_PHDR isn't found.
4946 New comment why.
4947
5808517f
YQ
49482012-03-03 Yao Qi <yao@codesourcery.com>
4949
4950 * tracepoint.c (tracepoint_look_up_symbols): Update call to
4951 agent_look_up_symbols.
4952
58b4daa5
YQ
49532012-03-03 Yao Qi <yao@codesourcery.com>
4954
4955 * Makefile.in (linux-low.o): Keep dependence on agent.h.
4956 (linux-x86-low.o): Likewise.
4957 * server.h: Remove in_process_agent_loaded.
4958 * tracepoint.c (in_process_agent_loaded): Removed. Moved it
4959 common/agent.c.
4960 Update callers.
4961
8ffcbaaf
YQ
49622012-03-03 Yao Qi <yao@codesourcery.com>
4963
4964 * tracepoint.c (gdb_agent_capability): New global.
4965 (in_process_agent_loaded_ust): Renamed to
4966 `in_process_agent_supports_ust'.
4967 Update callers.
4968 (in_process_agent_supports_ust): Call agent_capability_check.
4969 (clear_installed_tracepoints): Assert that agent supports
4970 agent.
4971
d1feda86
YQ
49722012-03-03 Yao Qi <yao@codesourcery.com>
4973
4974 * linux-low.c (linux_supports_agent): New.
4975 (linux_target_ops): Initialize field `supports_agent' with
4976 linux_supports_agent.
4977 * target.h (struct target_ops) <supports_agent>: New.
4978 (target_supports_agent): New macro.
4979 * server.c (handle_general_set): Handle packet 'QAgent'.
4980 (handle_query): Send `QAgent+'.
4981 * Makefile.in (server.o): Depends on agent.h.
4982
2fa291ac
YQ
49832012-03-03 Yao Qi <yao@codesourcery.com>
4984
4985 * Makefile.in (OBS): Add agent.o.
4986 Add new rule for agent.o.
4987 Track dependence of tracepoint.c on agent.h.
4988 * tracepoint.c (run_inferior_command_1):
4989 (run_inferior_command): Call agent_run_command.
4990 (gdb_ust_connect_sync_socket): Deleted. Move it to
4991 common/agent.c.
4992 (resume_thread, stop_thread): Likewise.
4993 (gdb_ust_socket_init): Renamed to ...
4994 (gdb_agent_socket_init): ... New.
4995 (gdb_ust_thread): Renamed to ...
4996 (gdb_agent_helper_thread): ... New.
4997 (gdb_ust_init): Move some code to ...
4998 (gdb_agent_init): ... here. New.
4999 [HAVE_UST]: Call gdb_ust_init.
5000 (initialize_tracepoint_ftlib): Call gdb_agent_init.
5001 * configure.ac: Add `sys/un.h' to AC_CHECK_HEADERS.
5002 * config.in, configure: Regenerated.
5003
05044653
PA
50042012-03-02 Pedro Alves <palves@redhat.com>
5005
5006 * inferiors.c (add_pid_to_list, pull_pid_from_list): Delete.
5007 * linux-low.c (struct simple_pid_list): New.
5008 (stopped_pids): New a struct simple_pid_list pointer.
5009 (add_to_pid_list, pull_pid_from_list): New.
5010 (handle_extended_wait): Don't assume the first signal new children
5011 report is SIGSTOP. Adjust call to pull_pid_from_list.
5012 (linux_wait_for_lwp): Adjust.
5013
8d00225b
YQ
50142012-03-02 Yao Qi <yao@codesourcery.com>
5015
5016 * tracepoint.c (do_action_at_tracepoint): Write `stop_pc' in
5017 debug log.
5018
19560ba5
YQ
50192012-03-02 Yao Qi <yao@codesourcery.com>
5020
5021 * tracepoint.c (collect_ust_data_at_tracepoint): Remove parameters
5022 `stop_pc' and `tpoint'. Update caller.
5023
1faeff08
MR
50242012-03-01 Maciej W. Rozycki <macro@codesourcery.com>
5025
5026 * linux-low.h (linux_target_ops): Add regset_bitmap member.
5027 * linux-low.c (use_linux_regsets): New macro.
5028 [!HAVE_LINUX_REGSETS] (regsets_fetch_inferior_registers): Likewise.
5029 [!HAVE_LINUX_REGSETS] (regsets_store_inferior_registers): Likewise.
5030 (linux_register_in_regsets): New function.
5031 (usr_fetch_inferior_registers): Skip registers covered by
5032 regsets.
5033 (usr_store_inferior_registers): Likewise.
5034 (usr_fetch_inferior_registers): New macro.
5035 (usr_store_inferior_registers): Likewise.
5036 (linux_fetch_registers): Handle mixed regset/non-regset targets.
5037 (linux_store_registers): Likewise.
5038 * linux-mips-low.c (init_registers_mips_dsp_linux): New
5039 prototype.
5040 (init_registers_mips64_dsp_linux): Likewise.
5041 (init_registers_mips_linux): New macro.
5042 (init_registers_mips_dsp_linux): Likewise.
5043 (mips_dsp_num_regs): Likewise.
5044 (DSP_BASE, DSP_CONTROL): New fallback macros.
5045 (mips_base_regs): New macro.
5046 (mips_regmap): Use it. Fix the size.
5047 (mips_dsp_regmap): New variable.
5048 (mips_dsp_regset_bitmap): Likewise.
5049 (mips_arch_setup): New function.
5050 (mips_cannot_fetch_register): Use the_low_target.regmap rather
5051 than mips_regmap.
5052 (mips_cannot_store_register): Likewise.
5053 (the_low_target): Update .arch_setup, .num_regs and .regmap
5054 initializers. Add .regset_bitmap initializer.
5055 * linux-arm-low.c (the_low_target): Add .regset_bitmap
5056 initializer.
5057 * linux-bfin-low.c (the_low_target): Likewise.
5058 * linux-cris-low.c (the_low_target): Likewise.
5059 * linux-crisv32-low.c (the_low_target): Likewise.
5060 * linux-ia64-low.c (the_low_target): Likewise.
5061 * linux-m32r-low.c (the_low_target): Likewise.
5062 * linux-m68k-low.c (the_low_target): Likewise.
5063 * linux-ppc-low.c (the_low_target): Likewise.
5064 * linux-s390-low.c (the_low_target): Likewise.
5065 * linux-sh-low.c (the_low_target): Likewise.
5066 * linux-sparc-low.c (the_low_target): Likewise.
5067 * linux-tic6x-low.c (the_low_target): Likewise.
5068 * linux-x86-low.c (the_low_target): Likewise.
5069 * linux-xtensa-low.c (the_low_target): Likewise.
5070 * configure.srv <mips*-*-linux*>: Add mips-dsp-linux.o and
5071 mips64-dsp-linux.o to srv_regobj. Add mips-dsp-linux.xml,
5072 mips64-dsp-linux.xml, mips-dsp.xml and mips64-dsp.xml to
5073 srv_xmlfiles.
5074 * Makefile.in (mips-dsp-linux.o, mips-dsp-linux.c): New targets.
5075 (mips64-dsp-linux.o, mips64-dsp-linux.c): Likewise.
5076
c03e6ccc
YQ
50772012-02-29 Yao Qi <yao@codesourcery.com>
5078 Pedro Alves <palves@redhat.com>
5079
5080 * linux-low.c: (linux_wait_1): Call unsuspend_all_lwps when
5081 `step_over_finished' is true.
5082
644cebc9
PA
50832012-02-27 Pedro Alves <palves@redhat.com>
5084
5085 * linux-low.c (pid_is_stopped): Delete, moved to common/.
5086 (linux_attach_lwp_1): Adjust to use linux_proc_pid_is_stopped.
5087
c14d7ab2
PA
50882012-02-27 Pedro Alves <palves@redhat.com>
5089
5090 PR server/9684
5091 * linux-low.c (pid_is_stopped): New.
5092 (linux_attach_lwp_1): Handle attaching to 'T (stopped)' processes.
5093
412c89dd
LM
50942012-02-25 Luis Machado <lgustavo@codesourcery.com>
5095
5096 * mem-break.c (clear_gdb_breakpoint_conditions): Fix de-allocation
5097 of conditions.
5098
b745defe
MR
50992012-02-24 Maciej W. Rozycki <macro@codesourcery.com>
5100
5101 * linux-mips-low.c (mips_regmap): Correct the index of $f9.
5102
9f3a5c85
LM
51032012-02-24 Luis Machado <lgustavo@codesourcery>
5104
5105 * server.c (handle_query): Advertise support for target-side
5106 breakpoint condition evaluation.
5107 (process_point_options): New function.
5108 (process_serial_event): When inserting a breakpoint, check for
5109 a target-side condition that should be evaluated.
5110
5111 * mem-break.c: Include regcache.h and ax.h.
5112 (point_cond_list_t): New data structure.
5113 (breakpoint) <cond_list>: New field.
5114 (find_gdb_breakpoint_at): Make non-static.
5115 (delete_gdb_breakpoint_at): Clear any target-side
5116 conditions.
5117 (clear_gdb_breakpoint_conditions): New function.
5118 (add_condition_to_breakpoint): Likewise.
5119 (add_breakpoint_condition): Likewise.
5120 (gdb_condition_true_at_breakpoint): Likewise.
5121 (gdb_breakpoint_here): Return result directly instead
5122 of going through a local variable.
5123
5124 * mem-break.h (find_gdb_breakpoint_at): New prototype.
5125 (clear_gdb_breakpoint_conditions): Likewise.
5126 (add_breakpoint_condition): Likewise.
5127 (gdb_condition_true_at_breakpoint): Likewise.
5128
5129 * linux-low.c (linux_wait_1): Evaluate target-side breakpoint condition.
5130 (need_step_over_p): Take target-side breakpoint condition into
5131 consideration.
5132
5e1dc496
LM
51332012-02-24 Luis Machado <lgustavo@codesourcery>
5134
5135 * server.h: Include tracepoint.h.
5136 (agent_mem_read, agent_get_trace_state_variable_value,
5137 agent_set_trace_state_variable_value,
5138 agent_tsv_read, agent_mem_read_string, get_get_tsv_func_addr,
5139 get_set_tsv_func_addr): New prototypes.
5140
5141 * ax.h: New include file.
5142 * ax.c: New source file.
5143
5144 * tracepoint.c: Include ax.h.
5145 (gdb_agent_op, gdb_agent_op_names, gdb_agent_op_sizes,
5146 agent_expr, eval_result_type): Move to ax.h.
5147 (parse_agent_expr): Rename to ...
5148 (gdb_parse_agent_expr): ... this, make it non-static and move
5149 to ax.h.
5150 (unparse_agent_expr) Rename to ...
5151 (gdb_unparse_agent_expr): ... this, make it non-static and move
5152 to ax.h.
5153 (eval_agent_expr): Rename to ...
5154 (eval_tracepoint_agent_expr): ... this.
5155 (agent_mem_read, agent_mem_read_string, agent_tsv_read): Remove
5156 forward declarations.
5157 (add_tracepoint_action): Call gdb_parse_agent_expr (...).
5158 (agent_get_trace_state_variable_value): New function.
5159 (agent_set_trace_state_variable_value): New function.
5160 (cmd_qtdp): Call gdb_parse_agent_expr (...).
5161 (response_tracepoint): Call gdb_unparse_agent_expr (...).
5162 (do_action_at_tracepoint): Call eval_tracepoint_agent_expr (...).
5163 (condition_true_at_tracepoint): Likewise.
5164 (parse_agent_expr): Rename to ...
5165 (gdb_parse_agent_expr): ... this and move to ax.c.
5166 (unparse_agent_expr): Rename to ...
5167 (gdb_unparse_agent_expr): ... this and move to ax.c.
5168 (gdb_agent_op_name): Move to ax.c.
5169 (eval_agent_expr): Rename to ...
5170 (gdb_eval_agent_expr): ... this, use regcache passed as parameter
5171 and move to ax.c.
5172 (eval_tracepoint_agent_expr): New function.
5173 (agent_mem_read, agent_mem_read_string, agent_tsv_read): Make
43aaf8b6 5174 non-static.
5e1dc496
LM
5175 (current_insn_ptr, emit_error, struct bytecode_address): Move to
5176 ax.c.
5177 (emit_prologue, emit_epilogue, emit_add, emit_sub, emit_mul, emit_lsh,
5178 emit_rsh_signed, emit_rsh_unsigned, emit_ext, emit_log_not,
5179 emit_bit_and, emit_bit_or, emit_bit_xor, emit_bit_not, emit_equal,
5180 emit_less_signed, emit_less_unsigned, emit_ref, emit_if_goto,
5181 emit_goto, write_goto_address, emit_const, emit_reg, emit_pop,
5182 emit_stack, emit_zero_ext, emit_swap, emit_stack_adjust,
5183 emit_int_call_1, emit_void_call_2, emit_eq_goto, emit_ne_goto,
5184 emit_lt_goto, emit_ge_goto, emit_gt_goto, emit_le_goto): Move to ax.c.
5185 (get_get_tsv_func_addr, get_set_tsv_func_addr): New functions.
5186 (compile_bytecodes): Remove forward declaration.
5187 (is_goto_target): Move to ax.c.
5188 (compile_bytecodes): Move to ax.c and call
5189 agent_get_trace_state_variable_value (...) and
5190 agent_set_trace_state_variable_value (...).
5191
5192 * Makefile.in: Update ax.c and IPA dependencies.
5193
277e4e52
PA
51942012-02-24 Pedro Alves <palves@redhat.com>
5195
5196 * tracepoint.c (cmd_bigqtbuffer): Rename as ...
5197 (cmd_bigqtbuffer_circular): ... this. Only handle
5198 'QTBuffer:circular:'.
5199 (handle_tracepoint_general_set): Adjust.
5200
bf4c19f7
YQ
52012012-02-16 Yao Qi <yao@codesourcery.com>
5202
5203 * inferiors.c: Move code to ...
5204 * dll.c: .... here. New.
5205 * server.h: Declare clear_dlls.
5206 * Makefile.in (SFILES): Add dll.c.
5207 (OBS): Add dll.o
5208 (dll.o): New rule.
5209
d73f2619
YQ
52102012-02-11 Yao Qi <yao@codesourcery.com>
5211
5212 * server.c: (handle_monitor_command): Add a new parameter
5213 `own_buf'.
5214 (handle_query): Update caller.
5215
f8255c2a
JB
52162012-02-09 Joel Brobecker <brobecker@adacore.com>
5217
5218 * configure.ac: Add readlink to AC_CHECK_FUNCS list.
5219 * configure, config.in: Regenerate.
5220 * hostio.c: Provide an alternate implementation if HAVE_READLINK
5221 is not defined.
5222
da84f473
PA
52232012-02-02 Pedro Alves <palves@redhat.com>
5224
5225 Try SIGKILL first, then PTRACE_KILL.
5226 * linux-low.c (linux_kill_one_lwp): New.
5227 (linux_kill_one_lwp): Rename to ...
5228 (kill_one_lwp_callback): ... this. Use the new
5229 linux_kill_one_lwp.
5230
e886a173
PA
52312012-02-02 Pedro Alves <palves@redhat.com>
5232
5233 * tracepoint.c (cmd_qtminftpilen): Return 0 if there's no current
5234 inferior.
5235
be07f1a2
PA
52362012-01-27 Pedro Alves <palves@redhat.com>
5237
5238 * linux-low.c (linux_child_pid_to_exec_file): Delete.
5239 (elf_64_file_p): Make static.
5240 (linux_pid_exe_is_elf_64_file): New.
5241 * linux-low.h (linux_child_pid_to_exec_file, elf_64_file_p):
5242 Delete declarations.
5243 (linux_pid_exe_is_elf_64_file): Declare.
5244 * linux-x86-low.c (x86_arch_setup): Use
5245 linux_pid_exe_is_elf_64_file.
5246
d8301ad1
JK
52472012-01-25 Jan Kratochvil <jan.kratochvil@redhat.com>
5248
5249 * linux-low.c (linux_wait_for_event_1): Rename to ...
5250 (linux_wait_for_event): ... here and merge it with former
5251 linux_wait_for_event - new variable wait_ptid, use it.
5252 (linux_wait_for_event): Remove - merge it to linux_wait_for_event_1.
5253
01b17894
PA
52542012-01-23 Pedro Alves <palves@redhat.com>
5255
5256 * server.c (main): Avoid yet another case of infinite loop while
5257 detaching/killing after a longjmp.
5258
e825046f
JK
52592012-01-20 Jan Kratochvil <jan.kratochvil@redhat.com>
5260
5261 Code cleanup.
5262 * linux-low.c (linux_wait_for_event_1): Use ptid_is_pid.
5263
b9e7b9c3
UW
52642012-01-20 Ulrich Weigand <ulrich.weigand@linaro.org>
5265
5266 * hostio.c (handle_readlink): New function.
5267 (handle_vFile): Call it to handle "vFile:readlink" packets.
5268
901f9912
UW
52692012-01-20 Pedro Alves <palves@redhat.com>
5270 Ulrich Weigand <ulrich.weigand@linaro.org>
5271
5272 * server.c (handle_v_requests): Only support vAttach and vRun to
5273 start multiple processes when in extended protocol mode.
5274
fc1ab1a0
PA
52752012-01-17 Pedro Alves <palves@redhat.com>
5276
5277 * tracepoint.c (initialize_tracepoint): Use mmap instead of
5278 memalign plus mprotect to allocate the scratch buffer.
5279
7d5d4e98
PA
52802012-01-13 Pedro Alves <palves@redhat.com>
5281
5282 * server.c (attach_inferior): Clear `cont_thread'.
5283
f128d5e9
PA
52842012-01-13 Pedro Alves <palves@redhat.com>
5285
5286 * server.c (main): Avoid infinite loop while detaching/killing
5287 after a longjmp.
5288
06db92f0
DE
52892012-01-09 Doug Evans <dje@google.com>
5290
5291 * server.c (start_inferior): Set last_ptid in --wrapper case.
5292
32d92999
YQ
52932012-01-06 Yao Qi <yao@codesourcery.com>
5294
5295 * tracepoint.c [IN_PROCESS_AGENT] (debug_threads): Macro
5296 defined.
5297 [IN_PROCESS_AGENT] (debug_agent): New global variable.
5298
5e0a92a9
YQ
52992012-01-04 Yao Qi <yao@codesourcery.com>
5300
5301 * tracepoint.c (cmd_qtdp): Print debug message
5302 for static tracepoint.
5303
ae639e8c
YQ
53042012-01-04 Yao Qi <yao@codesourcery.com>
5305
5306 * tracepoint.c (trace_vdebug): Differentiate debug message
5307 between gdbserver and IPA.
5308
f72429c5
YQ
53092012-01-03 Yao Qi <yao@codesourcery.com>
5310
5311 * tracepoint.c (tracepoint_was_hit): Don't collect for
5312 static tracepoint.
5313
12c3e59c
JB
53142012-01-02 Joel Brobecker <brobecker@adacore.com>
5315
5316 * terminal.h: Reformat copyright header.
5317
67827812
JB
53182012-01-02 Joel Brobecker <brobecker@adacore.com>
5319
5320 * server.c (gdbserver_version): Update copyright year.
5321 * gdbreplay.c (gdbreplay_version): Likewise.
5322
3e52c33d
JK
53232011-12-18 Jan Kratochvil <jan.kratochvil@redhat.com>
5324
5325 * linux-low.c (linux_create_inferior): Put empty if clause for write.
5326
5327 Revert:
5328 2011-12-18 Hui Zhu <teawater@gmail.com>
5329 * linux-low.c (linux_create_inferior): Save return value to ret.
5330
66f1260e
HZ
53312011-12-18 Hui Zhu <teawater@gmail.com>
5332
5333 * linux-low.c (linux_create_inferior): Save return value to ret.
5334
e77616d7
DE
53352011-12-16 Doug Evans <dje@google.com>
5336
e7b06c57
DE
5337 * linux-low.c (linux_create_inferior): If stdio connection,
5338 redirect stdin from /dev/null, stdout to stderr.
5339 * remote-utils.c (remote_is_stdio): New static global.
5340 (remote_connection_is_stdio): New function.
5341 (remote_prepare): Handle stdio connection.
5342 (remote_open): Ditto.
5343 (remote_close): Don't close stdin for stdio connections.
5344 (read_prim,write_prim): New functions. Replace all calls to
5345 read/write to these.
5346 * server.c (main): Watch for "-" argument. Move call to
5347 remote_prepare before start_inferior.
5348 * server.h (STDIO_CONNECTION_NAME): New macro.
5349 (remote_connection_is_stdio): Declare.
5350
e77616d7
DE
5351 * remote-utils.c (prepare_resume_reply): Remove extraneous \n
5352 in debugging output.
5353
82067193
YQ
53542011-12-15 Yao Qi <yao@codesourcery.com>
5355
5356 * tracepoint.c: Include sys/syscall.h.
5357 (gdb_ust_thread): Remove preprocessor conditional.
5358
82bfbe7e
PA
53592011-12-14 Pedro Alves <pedro@codesourcery.com>
5360
5361 * linux-low.c (linux_detach_one_lwp): Call
5362 the_low_target.prepare_to_resume before detaching.
5363
712c6575
YQ
53642011-12-14 Yao Qi <yao@codesourcery.com>
5365
5366 * tracepoint.c (gdb_ust_thread): Don't ignore return value
5367 of write.
5368
d54d1edf
YQ
53692011-12-14 Yao Qi <yao@codesourcery.com>
5370
5371 * i386-low.c (i386_low_stopped_data_address): Initialize local
5372 variable `control'.
5373
6210a125
PA
53742011-12-13 Pedro Alves <pedro@codesourcery.com>
5375
5376 PR remote/13492
5377
5378 * i386-low.c (i386_low_stopped_data_address): Avoid fetching
5379 DR_CONTROL unless necessary. Extend comments.
5380 * linux-x86-low.c (x86_linux_prepare_to_resume): Don't write to
5381 DR0-3 if not used. If any watchpoint was set, clear DR_STATUS.
5382
2ece8244
YQ
53832011-12-13 Yao Qi <yao@codesourcery.com>
5384
5385 * tracepoint.c (trace_buffer_alloc): Replace magic numbers with
5386 macros.
5387 (upload_fast_traceframes, upload_fast_traceframes): Likewise.
5388
784867a5
JK
53892011-12-08 Jan Kratochvil <jan.kratochvil@redhat.com>
5390
5391 * linux-low.c (linux_kill): Skip PTRACE_KILL if LWP does not exist.
5392 Print new debug message for such case.
5393
6bf36717
JK
53942011-12-06 Jan Kratochvil <jan.kratochvil@redhat.com>
5395
5396 Fix overlapping memcpy.
5397 * mem-break.c (set_raw_breakpoint_at): New variable buf. Use it for
5398 the read_inferior_memory transfer.
5399 (delete_fast_tracepoint_jump): New variable buf. Use it for the
5400 write_inferior_memory transfer.
5401 (set_fast_tracepoint_jump): New variable buf. Use it for the
5402 read_inferior_memory and write_inferior_memory transfers.
5403 (uninsert_fast_tracepoint_jumps_at, reinsert_fast_tracepoint_jumps_at)
5404 (delete_raw_breakpoint, uninsert_raw_breakpoint): New variable buf.
5405 Use it for the write_inferior_memory transfer.
5406 (check_mem_read, check_mem_write): New gdb_asserts for overlapping
5407 buffers.
5408
50275556
MR
54092011-12-06 Maciej W. Rozycki <macro@codesourcery.com>
5410
5411 * linux-low.c (fetch_register, store_register): Make code
5412 consistent, fix formatting.
5413
7325beb4
MR
54142011-12-06 Maciej W. Rozycki <macro@codesourcery.com>
5415
5416 * linux-low.c (usr_store_inferior_registers): Factor out code
5417 to handle individual registers into...
5418 (store_register): ... this new function.
5419
c642a434
UW
54202011-12-06 Ulrich Weigand <uweigand@de.ibm.com>
5421
5422 * Makefile.in (s390-linux32v1.o, s390-linux32v1.c): New rules.
5423 (s390-linux32v2.o, s390-linux32v2.c): Likewise.
5424 (s390-linux64v1.o, s390-linux64v1.c): Likewise.
5425 (s390-linux64v2.o, s390-linux64v2.c): Likewise.
5426 (s390x-linux64v1.o, s390x-linux64v1.c): Likewise.
5427 (s390x-linux64v2.o, s390x-linux64v2.c): Likewise.
5428 * configure.srv [s390*-*-linux*] (srv_regobj): Add new objects.
5429 (srv_xmlfiles): Add new XML files.
5430
5431 * linux-s390-low.c: Include "elf/common.h", <sys/ptrace.h>,
5432 and <sys/uio.h>.
5433 (PTRACE_GETREGSET, PTRACE_SETREGSET): Define if undefined.
5434 (init_registers_s390_linux32v1): Add prototype.
5435 (init_registers_s390_linux32v2): Likewise.
5436 (init_registers_s390_linux64v1): Likewise.
5437 (init_registers_s390_linux64v2): Likewise.
5438 (init_registers_s390x_linux64v1): Likewise.
5439 (init_registers_s390x_linux64v2): Likewise.
5440 (s390_num_regs): Increment to 52.
5441 (s390_regmap): Add orig_r2 register.
5442 (s390_num_regs_3264): Increment to 68.
5443 (s390_regmap_3264): Add orig_r2 register.
5444 (s390_collect_ptrace_register): Handle orig_r2 register.
5445 (s390_supply_ptrace_register): Likewise.
5446 (s390_fill_last_break): New function.
5447 (s390_store_last_break): Likewise.
5448 (s390_fill_system_call): New function.
5449 (s390_store_system_call): Likewise.
5450 (target_regsets): Handle NT_S390_LAST_BREAK and NT_S390_SYSTEM_CALL
5451 register sets.
5452 (s390_check_regset): New function.
5453 (s390_arch_setup): Check for presence of NT_S390_LAST_BREAK and
5454 NT_S390_SYSTEM_CALL regsets and use appropriate description.
5455 Update target_regsets for available register sets.
5456
2268b414
JK
54572011-12-02 Paul Pluzhnikov <ppluzhnikov@google.com>
5458 Jan Kratochvil <jan.kratochvil@redhat.com>
5459
5460 * linux-low.c (get_phdr_phnum_from_proc_auxv, get_dynamic, get_r_debug)
5461 (read_one_ptr, struct link_map_offsets, linux_qxfer_libraries_svr4):
5462 New.
5463 (struct linux_target_ops): Install linux_qxfer_libraries_svr4.
5464 * linux-low.h (struct process_info_private): New member r_debug.
5465 * server.c (handle_qxfer_libraries): Call
5466 the_target->qxfer_libraries_svr4.
5467 (handle_qxfer_libraries_svr4): New function.
5468 (qxfer_packets): New entry "libraries-svr4".
5469 (handle_query): Check QXFER_LIBRARIES_SVR4 and report libraries-svr4.
5470 * target.h (struct target_ops): New member qxfer_libraries_svr4.
5471 * remote.c (remote_xfer_partial): Call add_packet_config_cmd for
5472 PACKET_qXfer_libraries_svr4.
5473
d6db1fab
UW
54742011-11-30 Ulrich Weigand <uweigand@de.ibm.com>
5475
5476 * linux-s390-low.c (s390_collect_ptrace_register): Fully convert
5477 PSW address/mask between 8-byte and 16-byte formats.
5478 (s390_supply_ptrace_register): Likewise.
5479 (s390_get_pc, s390_set_pc): 4-byte PSW address always includes
5480 basic addressing mode bit.
5481
242f5f1c
SS
54822011-11-24 Stan Shebs <stan@codesourcery.com>
5483
5484 * tracepoint.c (cmd_qtstatus): Use plongest instead of %llx.
5485
f196051f
SS
54862011-11-17 Stan Shebs <stan@codesourcery.com>
5487
5488 * tracepoint.c (struct tracepoint): New field traceframe_usage.
5489 (tracing_start_time): New global.
5490 (tracing_stop_time): New global.
5491 (tracing_user_name): New global.
5492 (tracing_notes): New global.
5493 (tracing_stop_note): New global.
5494 (cmd_qtstart): Set traceframe_usage, start_time.
5495 (stop_tracing): Set stop_time.
5496 (cmd_qtstatus): Report additional status.
5497 (cmd_qtp): New function.
5498 (handle_tracepoint_query): Call it.
5499 (cmd_qtnotes): New function.
5500 (handle_tracepoint_general_set): Call it.
5501 (get_timestamp): Rename from tsv_get_timestamp.
5502
405f8e94
SS
55032011-11-14 Stan Shebs <stan@codesourcery.com>
5504 Kwok Cheung Yeung <kcy@codesourcery.com>
5505
5506 * linux-x86-low.c (small_jump_insn): New.
5507 (i386_install_fast_tracepoint_jump_pad): Add arguments for
5508 trampoline and error message, build a trampoline and issue a small
5509 jump instruction to it.
5510 (x86_install_fast_tracepoint_jump_pad): Add arguments for
5511 trampoline and error message.
5512 (x86_get_min_fast_tracepoint_insn_len): New.
5513 (the_low_target): Add call to x86_get_min_fast_tracepoint_insn_len.
5514 * linux-low.h (struct linux_target_ops): Add arguments to
5515 install_fast_tracepoint_jump_pad operation, add new operation.
5516 * linux-low.c (linux_install_fast_tracepoint_jump_pad): Add
5517 arguments.
5518 (linux_get_min_fast_tracepoint_insn_len): New function.
5519 (linux_target_op): Add new operation.
5520 * tracepoint.c (gdb_trampoline_buffer): New IPA variable.
5521 (gdb_trampoline_buffer_end): Ditto.
5522 (gdb_trampoline_buffer_error): Ditto.
5523 (struct ipa_sym_addresses): Add fields for new IPA variables.
5524 (symbol_list): Add entries for new IPA variables.
5525 (struct tracepoint): Add fields to hold the address range of the
5526 trampoline used by the tracepoint.
5527 (trampoline_buffer_head): New static variable.
5528 (trampoline_buffer_tail): Ditto.
5529 (claim_trampoline_space): New function.
5530 (have_fast_tracepoint_trampoline_buffer): New function.
5531 (clone_fast_tracepoint): Fill in trampoline fields of tracepoint
5532 structure.
5533 (install_fast_tracepoint): Ditto, also add error buffer argument.
5534 (cmd_qtminftpilen): New function.
5535 (handle_tracepoint_query): Add response to qTMinFTPILen packet.
5536 (fast_tracepoint_from_trampoline_address): New function.
5537 (fast_tracepoint_collecting): Handle trampoline as part of jump
5538 pad space.
5539 (set_trampoline_buffer_space): New function.
5540 (initialize_tracepoint): Initialize new IPA variables.
5541 * target.h (struct target_ops): Add arguments to
5542 install_fast_tracepoint_jump_pad operation, add new
5543 get_min_fast_tracepoint_insn_len operation.
5544 (target_get_min_fast_tracepoint_insn_len): New.
5545 (install_fast_tracepoint_jump_pad): Add arguments.
5546 * server.h (IPA_BUFSIZ): Define.
5547 * linux-i386-ipa.c: Include extra header files.
5548 (initialize_fast_tracepoint_trampoline_buffer): New function.
5549 (initialize_low_tracepoint): Call it.
5550 * server.h (set_trampoline_buffer_space): Declare.
5551 (claim_trampoline_space): Ditto.
5552 (have_fast_tracepoint_trampoline_buffer): Ditto.
5553
1e4d1764
YQ
55542011-11-14 Yao Qi <yao@codesourcery.com>
5555
5556 * server.c (handle_query): Handle InstallInTrace for qSupported.
5557 * tracepoint.c (add_tracepoint): Sort list.
5558 (install_tracepoint, download_tracepoint): New.
5559 (cmd_qtdp): Call them to install and download tracepoints.
5560 (sort_tracepoints): Removed.
5561 (cmd_qtstart): Update.
5562
5c73ff4e
YQ
55632011-11-14 Yao Qi <yao@codesourcery.com>
5564
5565 * mem-break.c (inc_ref_fast_tracepoint_jump): New.
5566 * mem-break.h: Declare.
5567 * tracepoint.c (cmd_qtstart): Move some code to ...
5568 (clone_fast_tracepoint, install_fast_tracepoint): ... here.
5569 New.
5570 (download_tracepoints): Move some code to ...
5571 (download_tracepoint_1): ... here. New.
5572
86a30030
YQ
55732011-11-08 Yao Qi <yao@codesourcery.com>
5574
5575 * remote-utils.c (relocate_instruction): A comment fix.
5576
8d26e50c
JB
55772011-11-07 Joel Brobecker <brobecker@adacore.com>
5578
5579 * win32-i386-low.c (dr_status_mirror, dr_control_mirror): Delete.
5580 (i386_dr_low_get_control, i386_dr_low_get_status): Use
5581 dr_status_mirror and dr_control_mirror from debug_reg_state.
5582 (i386_dr_low_get_status): Use debug_reg_state.dr_status_mirror
5583 (i386_initial_stuff): Remove use of deleted globals.
5584 (i386_get_thread_context, i386_set_thread_context,
5585 i386_thread_added): Use dr_status_mirror and dr_control_mirror
5586 from debug_reg_state.
5587
a59306a3
YQ
55882011-11-05 Yao Qi <yao@codesourcery.com>
5589
5590 * tracepoint.c (gdb_collect): Loop over tracepoints of same
5591 address as TPOINT's.
5592
3065dfb6
SS
55932011-11-02 Stan Shebs <stan@codesourcery.com>
5594
5595 * tracepoint.c (agent_mem_read_string): New function.
5596 (eval_agent_expr): Call it for tracenz.
5597 * server.c (handle_query): Report support for tracenz.
5598
fd0d8c7c
YQ
55992011-11-02 Yao Qi <yao@codesourcery.com>
5600
5601 * tracepoint.c (cmd_qtstart): Remove unused local variables.
5602
609086b1
YQ
56032011-11-02 Yao Qi <yao@codesourcery.com>
5604
5605 * target.h: Fix a typo in comment.
5606
b9fd1791
PA
56072011-10-31 Pedro Alves <pedro@codesourcery.com>
5608
5609 * mem-break.c (check_mem_write): Add `myaddr' parameter. Don't
5610 clobber the breakpoints' shadows with fast tracepoint jumps.
5611 * mem-break.h (check_mem_write): Add `myaddr' parameter.
5612 * target.c (write_inferior_memory): Also pass MYADDR down to
5613 check_mem_write.
5614
03583c20
UW
56152011-10-07 Ulrich Weigand <ulrich.weigand@linaro.org>
5616
5617 * configure.ac: Check support for personality routine.
5618 * configure: Regenerate.
5619 * config.in: Likewise.
5620 * linux-low.c: Include <sys/personality.h>.
5621 Define ADDR_NO_RANDOMIZE if necessary.
5622 (linux_create_inferior): Disable address space randomization when
5623 forking inferior, if requested.
5624 (linux_supports_disable_randomization): New function.
5625 (linux_target_ops): Install it.
5626 * server.h (disable_randomization): Declare.
5627 * server.c (disable_randomization): New global variable.
5628 (handle_general_set): Handle QDisableRandomization.
5629 (handle_query): Likewise for qSupported.
5630 (main): Support --disable-randomization and --no-disable-randomization
5631 command line arguments.
5632 * target.h (struct target_ops): Add supports_disable_randomization.
5633 (target_supports_disable_randomization): New macro.
5634
723b724b
MF
56352011-09-29 Mike Frysinger <vapier@gentoo.org>
5636
5637 * linux-low.c (target_loadseg): Add defined PTRACE_GETFDPIC to the
5638 ifdef check.
5639 [PT_GETDSBT] (target_loadmap): Wrap in a defined PT_GETDSBT check.
5640 [!PT_GETDSBT] (target_loadmap): New definition.
5641 (LINUX_LOADMAP, LINUX_LOADMAP_EXEC, LINUX_LOADMAP_INTERP): Define.
5642 (linux_read_loadmap): Change PTRACE_GETDSBT_EXEC to
5643 LINUX_LOADMAP_EXEC, PTRACE_GETDSBT_INTERP to LINUX_LOADMAP_INTERP,
5644 and PT_GETDSBT to LINUX_LOADMAP.
5645 [!PT_GETDSBT] (linux_read_loadmap): Define to NULL.
5646 (linux_target_ops): Delete unnecessary ifdef PT_GETDSBT check.
5647
55329a5c 56482011-09-21 Ulrich Weigand <ulrich.weigand@linaro.org>
71487fd7
UW
5649
5650 * linux-arm-low.c (struct arm_linux_hwbp_cap): Remove.
5651 (arm_linux_hwbp_cap): New static variable.
5652 (arm_linux_get_hwbp_cap): Replace by ...
5653 (arm_linux_init_hwbp_cap): ... this new function.
5654 (arm_linux_get_hw_breakpoint_count): Use arm_linux_hwbp_cap.
5655 (arm_linux_get_hw_watchpoint_count): Likewise.
5656 (arm_linux_get_hw_watchpoint_max_length): Likewise.
5657 (arm_arch_setup): Call arm_linux_init_hwbp_cap.
5658 (arm_prepare_to_resume): Use perror_with_name instead of error.
5659
55329a5c 56602011-09-21 Ulrich Weigand <ulrich.weigand@linaro.org>
09b4ad9f
UW
5661
5662 * linux-arm-low.c: Include <signal.h>.
5663 (PTRACE_GETHBPREGS, PTRACE_SETHBPREGS): Define if necessary.
5664 (struct arm_linux_hwbp_cap): New data type.
5665 (arm_hwbp_type, arm_hwbp_control_t): New typedefs.
5666 (struct arm_linux_hw_breakpoint): New data type.
5667 (MAX_BPTS, MAX_WPTS): Define.
5668 (struct arch_process_info, struct arch_lwp_info): New data types.
5669 (arm_linux_get_hwbp_cap): New function.
5670 (arm_linux_get_hw_breakpoint_count): Likewise.
5671 (arm_linux_get_hw_watchpoint_count): Likewise.
5672 (arm_linux_get_hw_watchpoint_max_length): Likewise.
5673 (arm_hwbp_control_initialize): Likewise.
5674 (arm_hwbp_control_is_enabled): Likewise.
5675 (arm_hwbp_control_is_initialized): Likewise.
5676 (arm_hwbp_control_disable): Likewise.
5677 (arm_linux_hw_breakpoint_equal): Likewise.
5678 (arm_linux_hw_point_initialize): Likewise.
5679 (struct update_registers_data): New data structure.
5680 (update_registers_callback: New function.
5681 (arm_insert_point): Likewise.
5682 (arm_remove_point): Likewise.
5683 (arm_stopped_by_watchpoint): Likewise.
5684 (arm_stopped_data_address): Likewise.
5685 (arm_new_process): Likewise.
5686 (arm_new_thread): Likewise.
5687 (arm_prepare_to_resume): Likewise.
5688 (the_low_target): Register arm_insert_point, arm_remove_point,
5689 arm_stopped_by_watchpoint, arm_stopped_data_address, arm_new_process,
5690 arm_new_thread, and arm_prepare_to_resume.
5691
6b9801d4
SS
56922011-09-15 Stan Shebs <stan@codesourcery.com>
5693
5694 * server.h (struct emit_ops): Add compare-goto fields.
5695 * tracepoint.c (gdb_agent_op_sizes): New table.
5696 (emit_eq_goto): New function.
5697 (emit_ne_goto): New function.
5698 (emit_lt_goto): New function.
5699 (emit_le_goto): New function.
5700 (emit_gt_goto): New function.
5701 (emit_ge_goto): New function.
5702 (is_goto_target): New function.
5703 (compile_bytecodes): Recognize special cases of compare-goto
5704 combinations and call specialized emitters for them.
5705 * linux-x86-low.c (amd64_emit_eq_goto): New function.
5706 (amd64_emit_ne_goto): New function.
5707 (amd64_emit_lt_goto): New function.
5708 (amd64_emit_le_goto): New function.
5709 (amd64_emit_gt_goto): New function.
5710 (amd64_emit_ge_goto): New function.
5711 (amd64_emit_ops): Add the new functions.
5712 (i386_emit_eq_goto): New function.
5713 (i386_emit_ne_goto): New function.
5714 (i386_emit_lt_goto): New function.
5715 (i386_emit_le_goto): New function.
5716 (i386_emit_gt_goto): New function.
5717 (i386_emit_ge_goto): New function.
5718 (i386_emit_ops): Add the new functions.
5719
bf15cbda
SS
57202011-09-08 Stan Shebs <stan@codesourcery.com>
5721
5722 * linux-x86-low.c (i386_emit_prologue): Save %ebx.
5723 (i386_emit_epilogue): Restore %ebx.
5724
943ca1dd
JZ
57252011-08-31 Jie Zhang <jzhang918@gmail.com>
5726
5727 * server.c (step_thread): Remove definition.
5728 (process_serial_event): Don't handle Hs.
5729 * server.h (step_thread): Remove declaration.
5730 * target.c (set_desired_inferior): Remove use of step_thread.
5731
e3deef73
LM
57322011-08-24 Luis Machado <lgustavo@codesourcery.com>
5733
5734 * linux-low.c: Include linux-procfs.h.
5735 (linux_attach_lwp_1): Update comments.
5736 (linux_attach): Scan for existing threads when attaching to a
5737 process that is the tgid.
5738 * Makefile.in: Update dependencies.
5739
13da1c97
LM
57402011-08-24 Luis Machado <lgustavo@codesourcery.com>
5741
5742 * configure.srv: Add linux-procfs.o dependencies.
5743
881127c9
YQ
57442011-08-14 Yao Qi <yao@codesourcery.com>
5745
5746 * target.h (struct target_ops): Fix indent.
5747 * win32-low.c (win32_target_ops): Fix comment.
5748
58dbd541
YQ
57492011-08-14 Andrew Jenner <andrew@codesourcery.com>
5750 Yao Qi <yao@codesourcery.com>
5751
5752 * Makefile.in (clean): Remove tic6x-*.c files.
5753 (linux-tic6x-low.o, tic6x-c62x-linux.o, tic6x-c64x-linux.o): New rules.
5754 (tic6x-c64xp-linux.o, tic6x-c62x-linux.c, tic6x-c64x-linux.c): Likewise.
5755 (tic6x-c64xp-linux.c): Likewise.
5756 * configure.srv: Add support for tic6x-*-uclinux.
5757 * linux-tic6x-low.c: New.
5758 * linux-low.c (PT_TEXT_ADDR, PT_DATA_ADDR, PT_TEXT_END_ADDR): Define.
5759
78d85199
YQ
57602011-08-14 Andrew Stubbs <ams@codesourcery.com>
5761 Yao Qi <yao@codesourcery.com>
5762
5763 * target.h (struct target_ops): Add read_loadmap.
5764 * linux-low.c (struct target_loadseg): New type.
5765 (struct target_loadmap): New type.
5766 (linux_read_loadmap): New function.
5767 (linux_target_ops): Add linux_read_loadmap.
5768 * server.c (handle_query): Support qXfer:fdpic:read packet.
43aaf8b6
PA
5769 * win32-low.c (win32_target_ops): Initialize field `read_loadmap'
5770 to NULL.
78d85199 5771
a959a88d
EZ
57722011-08-05 Eli Zaretskii <eliz@gnu.org>
5773
5774 * win32-low.c: Include <stdint.h>.
5775
1ced966e
PA
57762011-07-22 Pedro Alves <pedro@codesourcery.com>
5777
5778 * i386-low.c (i386_insert_aligned_watchpoint): Don't pass the info
5779 to the inferior here.
5780 (i386_remove_aligned_watchpoint): Ditto.
5781 (i386_handle_nonaligned_watchpoint): Return immediate on fail to
5782 fit part of the watchpoint in the debug registers.
5783 (i386_update_inferior_debug_regs): New.
5784 (i386_low_insert_watchpoint): Work on a local mirror of the debug
5785 registers, and only update the inferior on success.
5786 (i386_low_remove_watchpoint): Ditto.
5787
d26e3629
KY
57882011-07-22 Kwok Cheung Yeung <kcy@codesourcery.com>
5789
5790 * linux-low.c (compare_ints, unique, list_threads, show_process,
5791 linux_core_of_thread): Delete.
5792 (linux_target_ops): Change linux_core_of_thread to
5793 linux_common_core_of_thread.
5794 (linux_qxfer_osdata): Defer to linux_common_xfer_osdata.
5795 * utils.c (malloc_failure): Change type of argument.
5796 (xmalloc, xrealloc, xcalloc, xsnprintf): Delete.
5797 * Makefile.in (SFILES): Add common/common-utils.c, common/xml-utils.c,
5798 common/linux-osdata.c, common/ptid.c and common/buffer.c.
5799 (OBS): Add xml-utils.o, common-utils.o, ptid.o and buffer.o.
5800 (IPA_OBJS): Add common-utils-ipa.o.
5801 (ptid_h, linux_osdata_h): New macros.
5802 (server_h): Add common/common-utils.h, common/xml-utils.h,
5803 common/buffer.h, common/gdb_assert.h, common/gdb_locale.h and
5804 common/ptid.h.
5805 (common-utils-ipa.o, common-utils.o, xml-utils.o, linux-osdata.o,
5806 ptid.o, buffer.o): New rules.
5807 (linux-low.o): Add common/linux-osdata.h as a dependency.
5808 * configure.srv (srv_tgtobj): Add linux-osdata.o to Linux targets.
5809 * configure.ac: Add AC_HEADER_DIRENT check.
5810 * config.in: Regenerate.
5811 * configure: Regenerate.
5812 * remote-utils.c (xml_escape_text): Delete.
5813 (buffer_grow, buffer_free, buffer_init, buffer_finish,
5814 buffer_xml_printf): Move to common/buffer.c.
5815 * server.c (main): Remove call to initialize_inferiors.
5816 * server.h (struct ptid, ptid_t, minus_one_ptid, null_ptid,
5817 ptid_build, pid_to_ptid, ptid_get_pid, ptid_get_lwp, ptid_get_tid,
5818 ptid_equal, ptid_is_pid, initialize_inferiors, xml_escape_text,
5819 internal_error, gdb_assert, gdb_assert_fail): Delete.
5820 (struct buffer, buffer_grow, buffer_free, buffer_init, buffer_finish,
5821 buffer_xml_printf, buffer_grow_str, buffer_grow_str0): Move to
5822 common/buffer.h.
5823 * inferiors.c (null_ptid, minus_one_ptid, ptid_build, pid_to_ptid,
5824 ptid_get_pid, ptid_get_lwp, ptid_get_tid, ptid_equal, ptid_is_pid,
5825 initialize_inferiors): Delete.
5826
2275a1a7
PA
58272011-07-20 Pedro Alves <pedro@codesourcery.com>
5828
5829 * tracepoint.c (tracepoint_look_up_symbols): Return upon the first
5830 symbol error.
5831
0a5b1e09
PA
58322011-05-31 Pedro Alves <pedro@codesourcery.com>
5833
5834 * linux-x86-low.c (i386_dr_low_get_addr): Fix off by one in
5835 assertion.
5836 * win32-i386-low.c (i386_dr_low_get_addr): Ditto.
5837
6938fd34
YQ
58382011-05-26 Yao Qi <yao@codesourcery.com>
5839
5840 * Makefile.in (thread-db.o): Track dependence to
5841 common/gdb_thread_db.h.
5842 * thread-db.c: include gdb_thread_db.h from right place.
5843
b481f9e0
TT
58442011-05-16 Adrian Cornish <gnu@bluedreamer.com>
5845
5846 * linux-i386-ipa.c (supply_static_tracepoint_registers): Pass
5847 __FILE__ and __LINE__ to internal_error.
5848
98a5dd13
DE
58492011-05-13 Doug Evans <dje@google.com>
5850
5851 * thread-db.c (try_thread_db_load_from_sdir): New function.
5852 (try_thread_db_load_from_dir): New function.
5853 (thread_db_load_search): Handle $sdir, ignore $pdir.
5854 Remove trying of system directories if search of
5855 libthread-db-search-path fails, that is now done via $sdir.
5856
d248b706
KY
58572011-05-12 Kwok Cheung Yeung <kcy@codesourcery.com>
5858
5859 * server.c (handle_query): Add EnableDisableTracepoints to the list
5860 of supported features.
43aaf8b6 5861 * tracepoint.c (clear_installed_tracepoints): Uninstall disabled
d248b706 5862 tracepoints.
43aaf8b6
PA
5863 (cmd_qtenable_disable): New.
5864 (cmd_qtstart): Install tracepoints even if disabled.
5865 (handle_tracepoint_general_set): Add call to cmd_qtenable_disable on
5866 receiving a QTEnable or QTDisable packet.
5867 (gdb_collect): Skip data collection if fast tracepoint is disabled.
5868 (ust_marker_to_static_tracepoint): Do not ignore disabled static
5869 tracepoints.
5870 (gdb_probe): Skip data collection if static tracepoint is disabled.
d248b706 5871
84e578fb
DE
58722011-05-10 Doug Evans <dje@google.com>
5873
5874 * thread-db.c (thread_db_handle_monitor_command): Handle elided path.
5875
71f55dd8
DE
58762011-05-04 Doug Evans <dje@google.com>
5877
5878 * linux-low.c (linux_join): Skip process lookup.
5879 * spu-low.c (spu_join): Ditto.
5880 * server.c (join_inferiors_callback): Delete.
5881 (process_serial_event): For 'D' packet (detach) call join_inferior
5882 directly.
5883
4d393d60
JM
58842011-05-04 Joseph Myers <joseph@codesourcery.com>
5885
5886 * README: Don't mention xscale*-*-linux*.
5887 * configure.srv (xscale*-*-linux*): Don't handle target.
5888
b00ad6ff
NF
58892011-04-27 Nathan Froyd <froydnj@codesourcery.com>
5890
5891 * linux-x86-low.c (amd64_emit_const): Call memcpy instead of
5892 casting pointers.
5893 (amd64_emit_reg, amd64_emit_int_call_1, amd64_emit_void_call_2):
5894 (i386_emit_const, i386_emit_reg, i386_emit_int_call_1):
5895 (i386_emit_void_call_2): Likewise.
5896
af96c192
YQ
58972011-04-26 Yao Qi <yao@codesourcery.com>
5898
43aaf8b6
PA
5899 * linux-low.c: Move common macros to linux-ptrace.h.
5900 Include linux-ptrace.h.
af96c192
YQ
5901 * Makefile.in (linux_ptrace_h): New.
5902 (linux-low.o): Depends on linux-ptrace.h.
5903
03f2bd59
JK
59042011-04-24 Jan Kratochvil <jan.kratochvil@redhat.com>
5905
5906 * remote-utils.c (handle_accept_event): Close LISTEN_DESC only if
5907 RUN_ONCE. Comment for the LISTEN_DESC delete_file_handler call.
5908 (remote_prepare): New function with most of the TCP code from ...
5909 (remote_open): ... here. Detect PORT here unconditionally. Move also
5910 setting transport_is_reliable.
5911 * server.c (run_once): New variable.
5912 (gdbserver_usage): Document it.
5913 (main): Set run_once for `--once'. Call remote_prepare. Exit after
5914 the first run if RUN_ONCE.
5915 * server.h (run_once, remote_prepare): New declarations.
5916
7a9dd1b2
TT
59172011-04-19 Tom Tromey <tromey@redhat.com>
5918
5919 * win32-low.c (handle_load_dll): Remove duplicate "the".
5920
81239425
PM
59212011-04-07 Pierre Muller <muller@ics.u-strasbg.fr>
5922
5923 Remove support for old Cygwin 1.5 versions.
5924 * win32-low.c (win32_create_inferior): Use new cygwin_path_list
5925 function to avoid warning.
5926 (win32_add_one_solib): Use cygwin_conv_path function to avoid
5927 warning.
5928
9e0627f1
PM
59292011-03-18 Pierre Muller <muller@ics.u-strasbg.fr>
5930
5931 * gdbserver/server.h (Macro _): Define it if not available.
5932
588eebee
MS
59332011-03-14 Michael Snyder <msnyder@vmware.com>
5934
348af9f7 5935 * hostio.c (handle_close): Remove unnecessary null test.
588eebee 5936
43f70d4c
JB
59372011-03-10 Joel Brobecker <brobecker@adacore.com>
5938
5939 * Makefile.in (maintainer-clean realclean distclean): Remove
5940 "make ... subdir_do" command.
5941
348af9f7
MS
59422011-03-10 Michael Snyder <msnyder@vmware.com>
5943
5944 * tracepoint.c (tracepoint_finish_step): Fix loop variable.
5945
5946 * server.c (handle_v_run): Free alloced buffer on early return.
5947
e637a4f5
YQ
59482011-03-09 Yao Qi <yao@codesourcery.com>
5949
5950 Revert:
5951 2011-03-04 Yao Qi <yao@codesourcery.com>
5952
5953 * Makefile.in: Remove GNU make feature --directory.
5954
5955 2011-03-05 Yao Qi <yao@codesourcery.com>
5956
5957 * Makefile.in (CLEANDIRS, REQUIRED_SUBDIRS): New variable.
5958 (subdir_do): New make target. Copied from gdb/Makefile.
5959 (maintainer-clean, realclean, distclean, clean): Call corresponding
5960 make targets in common/Makefile.
5961
5962 2011-02-11 Yao Qi <yao@codesourcery.com>
5963
5964 * configure.ac: Call AC_PROG_RANLIB.
5965 * Makefile.in: Remove signals.o from OBS. Link libcommon.a.
5966 * configure: Regenerate.
5967
e6edda56
JK
59682011-03-07 Jan Kratochvil <jan.kratochvil@redhat.com>
5969
5970 * remote-utils.c (putpkt_binary_1): Calculate BUF2 size dynamically.
5971
e5141119
JB
59722011-03-06 Yao Qi <yao@codesourcery.com>
5973
5974 * Makefile.in (REQUIRED_SUBDIRS): Remove $(LIBCOMMON_DIR).
5975
64794aa4
JB
59762011-03-05 Yao Qi <yao@codesourcery.com>
5977
5978 * Makefile.in (CLEANDIRS, REQUIRED_SUBDIRS): New variable.
5979 (subdir_do): New make target. Copied from gdb/Makefile.
5980 (maintainer-clean, realclean, distclean, clean): Call corresponding
5981 make targets in common/Makefile.
5982
7a762829
YQ
59832011-03-04 Yao Qi <yao@codesourcery.com>
5984
5985 * Makefile.in: Remove GNU make feature --directory.
5986
348af9f7
MS
59872011-03-04 Michael Snyder <msnyder@vmware.com>
5988
5989 * server.c (queue_stop_reply): Call xmalloc not malloc.
5990
59912011-03-02 Michael Snyder <msnyder@vmware.com>
5992
5993 * linux-arm-low.c (arm_arch_setup): Replace malloc with xmalloc.
5994
9f72fee2
MS
59952011-02-28 Michael Snyder <msnyder@vmware.com>
5996
588eebee
MS
5997 * tracepoint.c (cmd_qtv): Discard unused value 'packet'.
5998 (cmd_qtframe): Ditto.
5999 (cmd_qtbuffer): Ditto.
6000 (cmd_bigqtbuffer): Ditto.
6001
9f72fee2
MS
6002 * utils.c (decimal2str): Initialize 'width' to nine, then
6003 don't mess with it.
6004
8040bd49
UW
60052011-02-28 Ulrich Weigand <uweigand@de.ibm.com>
6006
6007 * hostio.c (require_data): Free *data, not data.
6008
7e52cbd0
JK
60092011-02-28 Jan Kratochvil <jan.kratochvil@redhat.com>
6010
6011 * hostio.c (require_data): Use free, not xfree.
6012
9130f83e
MS
60132011-02-27 Michael Snyder <msnyder@vmware.com>
6014
4b812f4e
MS
6015 * server.c (handle_query): Discard unused value.
6016
9130f83e
MS
6017 * hostio.c (require_data): Free malloc memory before returning
6018 error.
6019
69d37113
MS
60202011-02-26 Michael Snyder <msnyder@vmware.com>
6021
6022 * linux-low.c (list_threads): Call closedir for dirent.
6023
35f5825a
MS
60242011-02-27 Michael Snyder <msnyder@vmware.com>
6025
2a589cef
MS
6026 * i386-low.c (i386-length_and_rw_bits): Comment the fact that
6027 a case statement falls through.
6028
0adea5f7
MS
6029 * linux-low.c (linux_xfer_siginfo): Fix fencepost error.
6030
35f5825a
MS
6031 * linux-amd64-ipa.c (gdb_agent_get_raw_reg): Fix fencepost error
6032 in comparison.
6033
238f1c74
MS
60342011-02-26 Michael Snyder <msnyder@vmware.com>
6035
6036 * utils.c (decimal2str): Eliminate dead code and dead param.
6037 (pulongest): Drop dead param from call to decimal2str.
6038 (plongest): Ditto.
6039
633ff500
JB
60402011-02-24 Joel Brobecker <brobecker@adacore.com>
6041
6042 Revert the following patch (not approved yet):
6043 2011-02-21 Hui Zhu <teawater@gmail.com>
6044 * tracepoint.c (tp_printf): New function.
6045 (eval_agent_expr): Handle gdb_agent_op_printf.
6046
f9c6ff72
HZ
60472011-02-21 Hui Zhu <teawater@gmail.com>
6048
6049 * tracepoint.c (tp_printf): New function.
6050 (eval_agent_expr): Handle gdb_agent_op_printf.
6051
94d5e490
TT
60522011-02-18 Tom Tromey <tromey@redhat.com>
6053
6054 * Makefile.in (tracepoint-ipa.o): Depend on ax.def.
6055 (tracepoint.o): Likewise.
6056 * tracepoint.c (enum gdb_agent_op): Use ax.def.
6057 (gdb_agent_op_names): Likewise.
6058
c7f96d2b
TT
60592011-02-18 Tom Tromey <tromey@redhat.com>
6060
6061 * tracepoint.c (enum gdb_agent_op) <gdb_agent_op_pick,
6062 gdb_agent_op_rot>: New constants.
6063 (gdb_agent_op_names): Add pick and roll.
6064 (eval_agent_expr) <gdb_agent_op_pick, gdb_agent_op_rot>: New
6065 cases.
6066
0feedb2c
JK
60672011-02-15 Jan Kratochvil <jan.kratochvil@redhat.com>
6068
6069 * aclocal.m4: Regenerated with aclocal-1.11.1.
6070
b3b9301e
PA
60712011-02-14 Pedro Alves <pedro@codesourcery.com>
6072
6073 * server.c (handle_qxfer_traceframe_info): New.
6074 (qxfer_packets): Register "traceframe-info".
6075 (handle_query): Report support for qXfer:traceframe-info:read+.
6076 * tracepoint.c (match_blocktype): New.
6077 (traceframe_find_block_type): Rename to ...
6078 (traceframe_walk_blocks): ... this. Add callback filter argument,
6079 and use it.
6080 (traceframe_find_block_type): New, reimplemented on top of
6081 traceframe_walk_blocks.
6082 (build_traceframe_info_xml): New.
6083 (traceframe_read_info): New.
6084 * server.h (traceframe_read_info): Declare.
6085
4f3e6fb7
YQ
60862011-02-11 Yao Qi <yao@codesourcery.com>
6087
6088 * configure.ac: Call AC_PROG_RANLIB.
6089 * Makefile.in: Remove signals.o from OBS. Link libcommon.a.
6090 * configure: Regenerate.
6091
764880b7
PA
60922011-02-07 Pedro Alves <pedro@codesourcery.com>
6093
6094 * server.c (gdb_read_memory): Change return semantics to allow
6095 partial transfers.
6096 (handle_search_memory_1): Adjust.
6097 (process_serial_event) <'m' packet>: Handle partial transfers.
6098 * tracepoint.c (traceframe_read_mem): Handle partial transfers.
6099
1c79eb8a
PA
61002011-01-28 Pedro Alves <pedro@codesourcery.com>
6101
6102 * regcache.c (init_register_cache): Initialize
6103 regcache->register_status.
6104 (free_register_cache): Release regcache->register_status.
6105 (regcache_cpy): Copy register_status.
6106 (registers_to_string): Print 'x's for unavailable registers.
6107 (supply_register): Mark the register's status valid or
6108 unavailable, depending on whether a buffer was passed in or not.
6109 (supply_register_zeroed): New.
6110 (supply_regblock): Mark the registers' status valid or
6111 unavailable, depending on whether a buffer was passed in or not.
6112 * regcache.h (REG_UNAVAILABLE, REG_VALID): New defines.
6113 (struct regcache): New `register_status' field.
6114 (supply_register_zeroed): Declare.
6115 * i387-fp.c (i387_xsave_to_cache): Zero out registers using
6116 supply_register_zeroed, rather than passing a NULL buffer to
6117 supply_register.
6118 * tracepoint.c (fetch_traceframe_registers): Update comment.
6119
85724a0e
PA
61202011-01-28 Pedro Alves <pedro@codesourcery.com>
6121
6122 * i387-fp.c (i387_xsave_to_cache): Make passing NULL as register
6123 buffer explicit.
6124
d08aafef
PA
61252011-01-25 Pedro Alves <pedro@codesourcery.com>
6126
6127 * server.h (decode_xfer_write): Change prototype.
6128 * remote-utils.c (decode_xfer_write): Remove `annex' parameter,
6129 and don't extract the annex here.
6130 * server.c (decode_xfer_read): Remove `annex' parameter,
6131 and don't extract the annex here.
6132 (decode_xfer): New.
6133 (struct qxfer): New.
6134 (handle_qxfer_auxv, handle_qxfer_features, handle_qxfer_libraries)
6135 (handle_qxfer_osdata, handle_qxfer_siginfo, handle_qxfer_spu)
6136 (handle_qxfer_statictrace): New functions, abstracted out from
6137 handle_query, and made to use the struct qxfer interface.
6138 (handle_threads_qxfer_proper): Rename to ...
6139 (handle_qxfer_threads_proper): ... this.
6140 (handle_threads_qxfer): Rename to ...
6141 (handle_qxfer_threads): ... this. Adjust.
6142 (qxfer_packets): New array.
6143 (handle_qxfer): New function.
6144 (handle_query): Use handle_qxfer.
6145
493e2a69
MS
61462011-01-05 Michael Snyder <msnyder@msnyder-server.eng.vmware.com>
6147
6148 * gdbreplay.c: Shorten lines of >= 80 columns.
6149 * linux-low.c: Ditto.
6150 * linux-ppc-low.c: Ditto.
6151 * linux-s390-low.c: Ditto.
6152 * linux-sparc-low.c: Ditto.
6153 * linux-x86-low.c: Ditto.
6154 * linux-xtensa-low.c: Ditto.
6155 * mem-break.c: Ditto.
6156 * nto-low.c: Ditto.
6157 * regcache.h: Ditto.
6158 * remote-utils.c: Ditto.
6159 * server.c: Ditto.
6160 * server.h: Ditto.
6161 * thread-db.c: Ditto.
6162 * tracepoint.c: Ditto.
6163 * utils.c: Ditto.
6164 * win32-low.h: Ditto.
6165
44944448
JB
61662011-01-05 Joel Brobecker <brobecker@adacore.com>
6167
6168 * gdbserver/configure.ac, gdbserver/gdbserver.1: Copyright year
6169 update.
6170
71ce852c
JB
61712011-01-01 Joel Brobecker <brobecker@adacore.com>
6172
6173 * server.c (gdbserver_version): Update copyright year in version
6174 output.
6175 * gdbreplay.c (gdbreplay_version): Ditto.
6176
eb826dc6
MF
61772010-12-29 Jie Zhang <jie.zhang@analog.com>
6178
6179 * configure.srv (bfin-*-*linux*): Handle Blackfin/Linux targets.
6180 * linux-bfin-low.c: New file.
6181 * linux-low.c: Define PT_TEXT_ADDR, PT_TEXT_END_ADDR, and
6182 PT_DATA_ADDR for BFIN targets.
6183 * Makefile.in (SFILES): Add linux-bfin-low.c.
6184 (clean): Remove reg-bfin.c.
6185 (linux-bfin-low.o, reg-bfin.o, reg-bfin.c): New targets.
6186 * README: Mention supported Blackfin targets.
6187
39ab222a
MF
61882010-12-23 Mike Frysinger <vapier@gentoo.org>
6189
6190 * .gitignore: New file.
6191
a1f2ce7d
MF
61922010-11-16 Mike Frysinger <vapier@gentoo.org>
6193
6194 * linux-low.c (linux_tracefork_child): Add char* cast to arg.
6195
f474844c
JZ
61962010-10-22 Jie Zhang <jie@codesourcery.com>
6197
6198 * Makefile.in: Add FLAGS_TO_PASS variable.
6199 (install): Remove dependency of install-only and recursively
6200 invoke make for install-only.
6201
f1048712
DE
62022010-10-04 Doug Evans <dje@google.com>
6203
6204 * Makefile.in (uninstall): Use $(DESTDIR).
6205
b53a1623
PA
62062010-09-24 Pedro Alves <pedro@codesourcery.com>
6207
e6ee044d
PA
6208 PR gdb/11842
6209
b53a1623
PA
6210 * linux-x86-low.c (compat_siginfo_from_siginfo)
6211 (siginfo_from_compat_siginfo): Also copy si_pid and si_uid when
6212 si_code is < 0. Check for si_code == SI_TIMER before checking for
6213 si_code < 0.
6214
fa1bd1e4
JB
62152010-09-13 Joel Brobecker <brobecker@adacore.com>
6216
6217 * lynx-i386-low.c: New file.
6218 * configure.srv: Add handling of i[34567]86-*-lynxos* targets.
6219
47fac8f8
JB
62202010-09-13 Joel Brobecker <brobecker@adacore.com>
6221
6222 * lynx-low.c (ptrace_request_to_str): Remove handling for
6223 request values that have been removed in LynxOS 5.x.
6224
1adfc54d
JB
62252010-09-13 Joel Brobecker <brobecker@adacore.com>
6226
6227 * lynx-low.c, lynx-ppc-loc.c: Include <sys/ptrace.h> instead of
6228 <ptrace.h>
6229
c2a66c29
NS
62302010-09-09 Nathan Sidwell <nathan@codesourcery.com>
6231
6232 * configure.ac: Add --enable-inprocess-agent option.
6233 * configure: Rebuilt.
6234
32fcada3
YQ
62352010-09-06 Yao Qi <yao@codesourcery.com>
6236
6237 * linux-low.c (linux_kill): Remove unused variable.
6238 (linux_stabilize_threads): Likewise.
6239 * server.c (start_inferior): Likewise.
6240 (queue_stop_reply_callback): Likewise.
6241 * tracepoint.c (do_action_at_tracepoint): Likewise.
6242
0cccb683
YQ
62432010-09-06 Yao Qi <yao@codesourcery.com>
6244
6245 * linux-low.c (maybe_move_out_of_jump_pad): Restore current_inferior
6246 on return.
6247
423ec54c
JK
62482010-09-06 Jan Kratochvil <jan.kratochvil@redhat.com>
6249
6250 * target.c (mywait) <TARGET_WAITKIND_EXITED>: Fix to use INTEGER.
6251
12ac6819
PA
62522010-09-06 Pedro Alves <pedro@codesourcery.com>
6253
6254 * Makefile.in (install-only): Replace $IPA_DEPFILES with
6255 "$(IPA_DEPFILES)".
6256
8ed54b31
JB
62572010-09-01 Joel Brobecker <brobecker@adacore.com>
6258
6259 * gdbserver/lynx-low.c, gdbserver/lynx-low.h,
6260 gdbserver/lynx-ppc-low.c: New files.
6261 * Makefile.in (lynx_low_h): New variable.
6262 (lynx-low.o, lynx-ppc-low.o): New rules.
6263 * configure.ac: On LynxOS, link with -lnetinet.
6264 * configure.srv: Add handling of powerpc-*-lynxos* targets.
6265 * configure: regenerate.
6266
bb0116a4
JB
62672010-09-01 Joel Brobecker <brobecker@adacore.com>
6268
6269 * Makefile.in (vasprintf.o, vsnprintf.o): New rules.
6270 * configure.ac: Add check for vasprintf and vsnprintf.
6271 * configure, config.in: Regenerate.
6272 * server.h (vasprintf, vsnprintf): Add conditional declarations.
6273
a778ab81 62742010-09-01 Joel Brobecker <brobecker@adacore.com>
6275
6276 * gdbreplay.c: Move include of alloca.h up, next to include of
6277 malloc.h.
6278 * server.h: Add include of malloc.h.
6279 * mem-break.c: Remove include of malloc.h.
6280 * server.c, tracepoint.c, utils.c, win32-low.c: Likewise.
6281
8b034a19 62822010-09-01 Joel Brobecker <brobecker@adacore.com>
6283
6284 * Makefile.in (memmem.o): Build with -Wno-error.
6285
62862010-09-01 Joel Brobecker <brobecker@adacore.com>
6287
6288 * utils.c (xsnprintf): Make non-static.
6289 * server.h: Add xsnprintf declaration.
6290 * linux-low.c, nto-low.c, target.c, thread-db.c, tracepoint.c:
6291 replace calls to snprintf by calls to xsnprintf throughout.
6292
62932010-09-01 Joel Brobecker <brobecker@adacore.com>
6294
6295 * configure.ac: Add configure check for alloca.
6296 * configure, config.in: Regenerate.
6297 * server.h: Include alloca.h if it exists.
6298 * gdbreplay.c: Include alloca.h if it exists.
6299
1a981360
PA
63002010-08-28 Pedro Alves <pedro@codesourcery.com>
6301
6302 * linux-low.c (__SIGRTMIN): Define if not already defined.
6303 (linux_create_inferior): Check for __ANDROID__ rather than
6304 __SIGRTMIN.
6305 (enqueue_one_deferred_signal): Don't requeue non-RT signals that
6306 are already deferred.
6307 (linux_wait_1): Check for __ANDROID__ rather than __SIGRTMIN.
6308 (linux_resume_one_thread): Don't queue a SIGSTOP if the lwp is
6309 stopped and already has a pending signal to report.
6310 (proceed_one_lwp): : Don't queue a SIGSTOP if the lwp already has
6311 a pending signal to report or is moving out of a jump pad.
6312 (linux_init_signals): Check for __ANDROID__ rather than
6313 __SIGRTMIN.
6314
b4d51a55
PA
63152010-08-28 Pedro Alves <pedro@codesourcery.com>
6316
6317 * linux-low.c (linux_stabilize_threads): Wrap debug output in a
6318 debug_threads check. Avoid a linear search when not doing debug
6319 output.
6320
ec48365d
PA
63212010-08-27 Pedro Alves <pedro@codesourcery.com>
6322
6323 * event-loop.c (event_handle_func): Adjust to use gdb_fildes_t.
6324 (struct gdb_event) <fd>: Change type to gdb_fildes_t.
6325 (struct file_handler) <fd>: Change type to gdb_fildes_t.
6326 (process_event): Change local fd's type to gdb_fildes_t.
6327 (create_file_handler): Adjust prototype.
6328 (delete_file_handler): Adjust prototype.
6329 (handle_file_event): Adjust prototype. Use pfildes.
6330 (create_file_event): Adjsut prototype.
6331 * remote-utils.c (remote_desc, listen_desc): Change type to
6332 gdb_fildes_t.
6333 * server.h: New gdb_fildes_t typedef.
6334 [USE_WIN32API]: Include winsock2.h.
6335 (delete_file_handler, add_file_handler): Adjust prototypes.
6336 (pfildes): Declare.
6337 * utils.c (pfildes): New.
6338
854d88f0
PA
63392010-08-27 Pedro Alves <pedro@codesourcery.com>
6340
6341 * configure.ac (build_warnings): Add -Wno-char-subscripts.
6342 * configure: Regenerate.
6343
0146f85b
PA
63442010-08-27 Pedro Alves <pedro@codesourcery.com>
6345
6346 * linux-low.c (linux_unprepare_to_access_memory): Rename to ...
6347 (linux_done_accessing_memory): ... this.
6348 (linux_target_ops): Adjust.
6349 * linux-x86-low.c (x86_insert_point, x86_remove_point): Adjust.
6350 * nto-low.c (nto_target_ops): Adjust comment.
6351 * server.c (gdb_read_memory, gdb_write_memory): Adjust.
6352 * spu-low.c (spu_target_ops): Adjust comment.
6353 * target.h (target_ops): Rename unprepare_to_access_memory field
6354 to done_accessing_memory.
6355 (unprepare_to_access_memory): Rename to ...
6356 (done_accessing_memory): ... this.
6357
90d74c30
PA
63582010-08-26 Pedro Alves <pedro@codesourcery.com>
6359
6360 * linux-low.c (linux_prepare_to_access_memory): New.
6361 (linux_unprepare_to_access_memory): New.
6362 (linux_target_ops): Install them.
6363 * server.c (read_memory): Rename to ...
6364 (gdb_read_memory): ... this. Use
6365 prepare_to_access_memory/prepare_to_access_memory.
6366 (write_memory): Rename to ...
6367 (gdb_write_memory): ... this. Use
6368 prepare_to_access_memory/prepare_to_access_memory.
6369 (handle_search_memory_1): Adjust.
6370 (process_serial_event): Adjust.
6371 * target.h (struct target_ops): New fields
6372 prepare_to_access_memory and unprepare_to_access_memory.
6373 (prepare_to_access_memory, unprepare_to_access_memory): New.
6374 * linux-x86-low.c (x86_insert_point, x86_remove_point): Use
6375 prepare_to_access_memory/prepare_to_access_memory.
6376 * nto-low.c (nto_target_ops): Adjust.
6377 * spu-low.c (spu_target_ops): Adjust.
6378 * win32-low.c (win32_target_ops): Adjust.
6379
fd467969
PA
63802010-08-26 Pedro Alves <pedro@codesourcery.com>
6381
6382 * Makefile.in (WARN_CFLAGS): Get it from configure.
6383 (WERROR_CFLAGS): New.
6384 (INTERNAL_CFLAGS): Add WERROR_CFLAGS.
6385 * configure.ac: Introduce --enable-werror, which adds -Werror to
6386 the compiler command line. Enabled by default. Disable with
6387 --disable-werror. Add -Wdeclaration-after-statement
6388 Wpointer-arith and -Wformat-nonliteral to warning flags.
6389 * configure: Regenerate.
6390
331e2f5f
PA
63912010-08-26 Pedro Alves <pedro@codesourcery.com>
6392
6393 * mem-break.c [HAVE_MALLOC_H]: Include malloc.h.
6394
e581f2b4
PA
63952010-08-26 Pedro Alves <pedro@codesourcery.com>
6396
6397 * gdbreplay.c (remote_error): New.
6398 (gdbchar): New.
6399 (expect): Use gdbchar. Check for error reading from GDB.
6400 Clarify sync error output.
6401 (play): Check for errors writing to GDB.
6402 * linux-low.c (sigchld_handler): Really ignore `write' errors.
6403 * remote-utils.c (getpkt): Check for errors writing to the remote
6404 descriptor.
6405
3c11dd79
PA
64062010-08-25 Pedro Alves <pedro@codesourcery.com>
6407
6408 * linux-low.c (linux_wait_1): Move non-debugging code out of
6409 `debug_threads' control.
6410
d20a8ad9
PA
64112010-08-25 Pedro Alves <pedro@codesourcery.com>
6412
6413 * linux-low.c (linux_wait_1): Don't set last_status here.
6414 * server.c (push_event, queue_stop_reply_callback): Assert we're
6415 not pushing a TARGET_WAITKIND_IGNORE event.
6416 (start_inferior, start_inferior, attach_inferior, handle_v_cont)
6417 (myresume, handle_target_event): Set the thread's last_resume_kind
6418 and last_status from the target returned status.
6419
964e4306
PA
64202010-08-25 Pedro Alves <pedro@codesourcery.com>
6421
6422 PR threads/10729
6423
6424 * linux-x86-low.c (update_debug_registers_callback): New.
6425 (i386_dr_low_set_addr): Use it.
6426 (i386_dr_low_get_addr): New.
6427 (i386_dr_low_set_control): Use update_debug_registers_callback.
6428 (i386_dr_low_get_control): New.
6429 (i386_dr_low_get_status): Adjust.
6430 * linux-low.c (linux_stop_lwp): New.
6431 * linux-low.h (linux_stop_lwp): Declare.
6432
6433 * i386-low.c (I386_DR_GET_RW_LEN): Take the dr7 contents as
6434 argument instead of a i386_debug_reg_state.
6435 (I386_DR_WATCH_HIT): Take the dr6 contents as argument instead of
6436 a i386_debug_reg_state.
6437 (i386_insert_aligned_watchpoint): Adjust.
6438 (i386_remove_aligned_watchpoint): Adjust.
6439 (i386_low_stopped_data_address): Read the debug registers from the
6440 inferior instead of from the mirrors.
6441 * i386-low.h (struct i386_debug_reg_state): Extend comment.
6442 (i386_dr_low_get_addr): Declare.
6443 (i386_dr_low_get_control): Declare.
6444 (i386_dr_low_get_status): Change prototype.
6445
6446 * win32-i386-low.c (dr_status_mirror, dr_control_mirror): New globals.
6447 (i386_dr_low_get_addr): New.
6448 (i386_dr_low_get_control): New.
6449 (i386_dr_low_get_status): Adjust prototype. Return
6450 dr_status_mirror.
6451 (i386_initial_stuff): Clear dr_status_mirror and
6452 dr_control_mirror.
6453 (i386_get_thread_context): Adjust.
6454 (i386_set_thread_context): Adjust.
6455 (i386_thread_added): Adjust.
6456
5f21a75b
PA
64572010-08-24 Pedro Alves <pedro@codesourcery.com>
6458
6459 * linux-low.h (linux_thread_area): Delete declaration.
6460
3e4c1235
TS
64612010-08-11 Thomas Schwinge <thomas@codesourcery.com>
6462
6463 * linux-low.c (linux_wait_1): Correctly return the ptid of the child
6464 after its termination.
6465
1971b033
PA
64662010-08-09 Pedro Alves <pedro@codesourcery.com>
6467
6468 * linux-low.c (gdb_wants_lwp_stopped): Delete.
6469 (gdb_wants_all_stopped): Delete.
6470 (linux_wait_1): Don't call them.
6471 * server.c (handle_v_cont): Tag all threads as want-stopped.
6472 (gdb_wants_thread_stopped): Fix comments. Tag the thread that
6473 stopped as "client-wants-stopped".
6474
310444ac
PA
64752010-07-31 Pedro Alves <pedro@codesourcery.com>
6476
6477 * Makefile.in (signals_h): New.
6478 (server_h): Depend on it.
6479 (server.o): Don't depend on $(signals_def).
6480 (signals.o): Depend on $(signals_def).
6481
a19cae16
JK
64822010-07-31 Jan Kratochvil <jan.kratochvil@redhat.com>
6483
6484 * Makefile.in (signals_def): New.
6485 (server_h): Append include/gdb/signals.h and signals_def.
6486 (server.o): Append signals_def.
6487
30d50328
JK
64882010-07-25 Jan Kratochvil <jan.kratochvil@redhat.com>
6489
6490 * server.c (handle_target_event): Use target_signal_to_host for
6491 resume_info.sig initialization.
6492 * target.h (struct thread_resume) <sig>: New comment.
6493
5c3216e2
OS
64942010-07-20 Ozkan Sezer <sezeroz@gmail.com>
6495
c6f46ca0
OS
6496 * server.c (handle_query): strcpy() the returned string from paddress()
6497 instead of sprintf().
5c3216e2
OS
6498 * utils.c (paddress): Return phex_nz().
6499
6bd31874
JB
65002010-07-07 Joel Brobecker <brobecker@adacore.com>
6501
6502 * server.c (handle_v_cont): Call mourn_inferior if process
6503 just exited.
6504 (myresume): Likewise.
6505
0fb4aa4b
PA
65062010-07-01 Pedro Alves <pedro@codesourcery.com>
6507
6508 Static tracepoints, and integration with UST.
6509
6510 * configure.ac: Handle --with-ust. substitute ustlibs and ustinc.
6511 * mem-break.c (uninsert_all_breakpoints)
6512 (reinsert_all_breakpoints): New.
6513 * mem-break.h (reinsert_all_breakpoints, uninsert_all_breakpoints):
6514 * tracepoint.c (ust_loaded, helper_thread_id, cmd_buf): New.
6515 (gdb_agent_ust_loaded, helper_thread_id)
6516 (gdb_agent_helper_thread_id): New macros.
6517 (struct ipa_sym_addresses): Add addr_ust_loaded,
6518 addr_helper_thread_id, addr_cmd_buf.
6519 (symbol_list): Add ust_loaded, helper_thread_id, cmd_buf.
6520 (in_process_agent_loaded_ust): New.
6521 (write_e_ust_not_loaded): New.
6522 (maybe_write_ipa_ust_not_loaded): New.
6523 (struct collect_static_trace_data_action): New.
6524 (enum tracepoint_type) <static_tracepoint>: New.
6525 (struct tracepoint) <handle>: Mention static tracepoints.
6526 (struct static_tracepoint_ctx): New.
6527 (CMD_BUF_SIZE): New.
6528 (add_tracepoint_action): Handle static tracepoint actions.
6529 (unprobe_marker_at): New.
6530 (clear_installed_tracepoints): Handle static tracepoints.
6531 (cmd_qtdp): Handle static tracepoints.
6532 (probe_marker_at): New.
6533 (cmd_qtstart): Handle static tracepoints.
6534 (response_tracepoint): Handle static tracepoints.
6535 (cmd_qtfstm, cmd_qtsstm, cmd_qtstmat): New.
6536 (handle_tracepoint_query): Handle qTfSTM, qTsSTM and qTSTMat.
6537 (get_context_regcache): Handle static tracepoints.
6538 (do_action_at_tracepoint): Handle static tracepoint actions.
6539 (traceframe_find_block_type): Handle static trace data blocks.
6540 (traceframe_read_sdata): New.
6541 (download_tracepoints): Download static tracepoint actions.
6542 [HAVE_UST] Include ust/ust.h, dlfcn.h, sys/socket.h, and sys/un.h.
6543 (GDB_PROBE_NAME): New.
6544 (ust_ops): New.
6545 (GET_UST_SYM): New.
6546 (USTF): New.
6547 (dlsym_ust): New.
6548 (ust_marker_to_static_tracepoint): New.
6549 (gdb_probe): New.
6550 (collect_ust_data_at_tracepoint): New.
6551 (gdb_ust_probe): New.
6552 (UNIX_PATH_MAX, SOCK_DIR): New.
6553 (gdb_ust_connect_sync_socket): New.
6554 (resume_thread, stop_thread): New.
6555 (run_inferior_command): New.
6556 (init_named_socket): New.
6557 (gdb_ust_socket_init): New.
6558 (cstr_to_hexstr): New.
6559 (next_st): New.
6560 (first_marker, next_marker): New.
6561 (response_ust_marker): New.
6562 (cmd_qtfstm, cmd_qtsstm): New.
6563 (unprobe_marker_at, probe_marker_at): New.
6564 (cmd_qtstmat, gdb_ust_thread): New.
6565 (gdb_ust_init): New.
6566 (initialize_tracepoint_ftlib): Call gdb_ust_init.
6567 * linux-amd64-ipa.c [HAVE_UST]: Include ust/processor.h
6568 (ST_REGENTRY): New.
6569 (x86_64_st_collect_regmap): New.
6570 (X86_64_NUM_ST_COLLECT_GREGS): New.
6571 (AMD64_RIP_REGNUM): New.
6572 (supply_static_tracepoint_registers): New.
6573 * linux-i386-ipa.c [HAVE_UST]: Include ust/processor.h
6574 (ST_REGENTRY): New.
6575 (i386_st_collect_regmap): New.
6576 (i386_NUM_ST_COLLECT_GREGS): New.
6577 (supply_static_tracepoint_registers): New.
6578 * server.c (handle_query): Handle qXfer:statictrace:read.
6579 <qSupported>: Report support for StaticTracepoints, and
6580 qXfer:statictrace:read features.
6581 * server.h (traceframe_read_sdata)
6582 (supply_static_tracepoint_registers): Declare.
6583 * remote-utils.c (convert_int_to_ascii, hexchars, ishex, tohex)
6584 (unpack_varlen_hex): Include in IPA build.
6585 * Makefile.in (ustlibs, ustinc): New.
6586 (IPA_OBJS): Add remote-utils-ipa.o.
6587 ($(IPA_LIB)): Link -ldl and -lpthread.
6588 (UST_CFLAGS): New.
6589 (IPAGENT_CFLAGS): Add UST_CFLAGS.
6590 * config.in, configure: Regenerate.
6591
9e4344e5
PA
65922010-06-20 Ian Lance Taylor <iant@google.com>
6593 Pedro Alves <pedro@codesourcery.com>
6594
6595 * linux-x86-low.c (always_true): Delete.
6596 (EMIT_ASM, EMIT_ASM32): Use an uncondition asm jmp instead of
6597 trying to fool the compiler with always_true.
6598
c6beb2cb
PA
65992010-06-20 Pedro Alves <pedro@codesourcery.com>
6600
6601 * tracepoint.c (condition_true_at_tracepoint): Don't run compiled
6602 conditions in gdbserver.
6603
d2ed6730
UW
66042010-06-19 Ulrich Weigand <uweigand@de.ibm.com>
6605
6606 * spu-low.c (spu_read_memory): Wrap around local store limit.
6607 (spu_write_memory): Likewise.
6608
4e29fb54
PA
66092010-06-15 Pedro Alves <pedro@codesourcery.com>
6610
6611 * linux-x86-low.c (amd64_emit_const, amd64_emit_void_call_2)
6612 (i386_emit_const, i386_emit_void_call_2): Replace int64_t uses with
6613 LONGEST uses.
6614 * server.h (struct emit_ops): Replace int64_t uses with LONGEST
6615 uses.
6616 * tracepoint.c (emit_const, emit_void_call_2): Replace int64_t
6617 uses with LONGEST uses.
6618
6a271cae
PA
66192010-06-14 Stan Shebs <stan@codesourcery.com>
6620 Pedro Alves <pedro@codesourcery.com>
6621
6622 Bytecode compiler.
6623
6624 * linux-x86-low.c: Include limits.h.
6625 (add_insns): New.
6626 (always_true): New.
6627 (EMIT_ASM): New.
6628 (EMIT_ASM32): New.
6629 (amd64_emit_prologue, amd64_emit_epilogue, amd64_emit_add)
6630 (amd64_emit_sub, amd64_emit_mul, amd64_emit_lsh)
6631 (amd64_emit_rsh_signed, amd64_emit_rsh_unsigned, amd64_emit_ext,
6632 (amd64_emit_log_not, amd64_emit_bit_and, amd64_emit_bit_or)
6633 (amd64_emit_bit_xor, amd64_emit_bit_not, amd64_emit_equal,
6634 (amd64_emit_less_signed, amd64_emit_less_unsigned, amd64_emit_ref,
6635 (amd64_emit_if_goto, amd64_emit_goto, amd64_write_goto_address)
6636 (amd64_emit_const, amd64_emit_call, amd64_emit_reg)
6637 (amd64_emit_pop, amd64_emit_stack_flush, amd64_emit_zero_ext)
6638 (amd64_emit_swap, amd64_emit_stack_adjust, amd64_emit_int_call_1)
6639 (amd64_emit_void_call_2): New.
6640 (amd64_emit_ops): New.
6641 (i386_emit_prologue, i386_emit_epilogue, i386_emit_add)
6642 (i386_emit_sub,i386_emit_mul, i386_emit_lsh, i386_emit_rsh_signed)
6643 (i386_emit_rsh_unsigned, i386_emit_ext, i386_emit_log_not)
6644 (i386_emit_bit_and, i386_emit_bit_or, i386_emit_bit_xor)
6645 (i386_emit_bit_not, i386_emit_equal, i386_emit_less_signed)
6646 (i386_emit_less_unsigned, i386_emit_ref, i386_emit_if_goto)
6647 (i386_emit_goto, i386_write_goto_address, i386_emit_const)
6648 (i386_emit_call, i386_emit_reg, i386_emit_pop)
6649 (i386_emit_stack_flush, i386_emit_zero_ext, i386_emit_swap)
6650 (i386_emit_stack_adjust, i386_emit_int_call_1)
6651 (i386_emit_void_call_2): New.
6652 (i386_emit_ops): New.
6653 (x86_emit_ops): New.
6654 (the_low_target): Install x86_emit_ops.
6655 * server.h (struct emit_ops): New.
6656 (get_raw_reg_func_addr): Declare.
6657 (current_insn_ptr, emit_error): Declare.
6658 * tracepoint.c (get_raw_reg, get_trace_state_variable_value)
6659 (set_trace_state_variable_value): New defines.
6660 (struct ipa_sym_addresses): New fields addr_get_raw_reg,
6661 addr_get_trace_state_variable_value and
6662 addr_set_trace_state_variable_value.
6663 (symbol_list): New fields for get_raw_reg,
6664 get_trace_state_variable_value and set_trace_state_variable_value.
6665 (condfn): New typedef.
6666 (struct tracepoint): New field `compiled_cond'.
6667 (do_action_at_tracepoint): Clear compiled_cond.
6668 (get_trace_state_variable_value, set_trace_state_variable_value):
6669 Export in the IPA.
6670 (condition_true_at_tracepoint): If there's a compiled condition,
6671 run that.
6672 (current_insn_ptr, emit_error): New globals.
6673 (struct bytecode_address): New.
6674 (get_raw_reg_func_addr): New.
6675 (emit_prologue, emit_epilogue, emit_add, emit_sub, emit_mul)
6676 (emit_lsh, emit_rsh_signed, emit_rsh_unsigned, emit_ext)
6677 (emit_log_not, emit_bit_and, emit_bit_or, emit_bit_xor)
6678 (emit_bit_not, emit_equal, emit_less_signed, emit_less_unsigned)
6679 (emit_ref, emit_if_goto, emit_goto, write_goto_address, emit_const)
6680 (emit_reg, emit_pop, emit_stack_flush, emit_zero_ext, emit_swap)
6681 (emit_stack_adjust, emit_int_call_1, emit_void_call_2): New.
6682 (compile_tracepoint_condition, compile_bytecodes): New.
6683 * target.h (emit_ops): Forward declare.
6684 (struct target_ops): New field emit_ops.
6685 (target_emit_ops): New.
6686 * linux-amd64-ipa.c (gdb_agent_get_raw_reg): New.
6687 * linux-i386-ipa.c (gdb_agent_get_raw_reg): New.
6688 * linux-low.c (linux_emit_ops): New.
6689 (linux_target_ops): Install it.
6690 * linux-low.h (struct linux_target_ops): New field emit_ops.
6691
92b72907
UW
66922010-06-14 Ulrich Weigand <uweigand@de.ibm.com>
6693
6694 * linux-ppc-low.c (ppc_arch_setup): Use private regcache to test MSR.
6695 * linux-s390-low.c (ppc_arch_setup): Use private regcache to test PSW.
6696
fa593d66
PA
66972010-06-01 Pedro Alves <pedro@codesourcery.com>
6698 Stan Shebs <stan@codesourcery.com>
6699
6700 * Makefile.in (IPA_DEPFILES, extra_libraries): New.
6701 (all): Depend on $(extra_libraries).
6702 (install-only): Install the IPA.
6703 (IPA_OBJS, IPA_LIB): New.
6704 (clean): Remove the IPA lib.
6705 (IPAGENT_CFLAGS): New.
6706 (tracepoint-ipa.o, utils-ipa.o, remote-utils-ipa.o)
6707 (regcache-ipa.o, i386-linux-ipa.o, linux-i386-ipa.o)
6708 (linux-amd64-ipa.o, amd64-linux-ipa.o): New rules.
6709 * linux-amd64-ipa.c, linux-i386-ipa.c: New files.
6710 * configure.ac: Check for atomic builtins support in the compiler.
6711 (IPA_DEPFILES, extra_libraries): Define.
6712 * configure.srv (ipa_obj): Add description.
6713 (ipa_i386_linux_regobj, ipa_amd64_linux_regobj): Define.
6714 (i[34567]86-*-linux*): Set ipa_obj.
6715 (x86_64-*-linux*): Set ipa_obj.
6716 * linux-low.c (stabilizing_threads): New.
6717 (supports_fast_tracepoints): New.
6718 (linux_detach): Stabilize threads before detaching.
6719 (handle_tracepoints): Handle internal tracing breakpoints. Assert
6720 the lwp is either not stabilizing, or is moving out of a jump pad.
6721 (linux_fast_tracepoint_collecting): New.
6722 (maybe_move_out_of_jump_pad): New.
6723 (enqueue_one_deferred_signal): New.
6724 (dequeue_one_deferred_signal): New.
6725 (linux_wait_for_event_1): If moving out of a jump pad, defer
6726 pending signals to later.
6727 (linux_stabilize_threads): New.
6728 (linux_wait_1): Check if threads need moving out of jump pads, and
6729 do it if so.
6730 (stuck_in_jump_pad_callback): New.
6731 (move_out_of_jump_pad_callback): New.
6732 (lwp_running): New.
6733 (linux_resume_one_lwp): Handle moving out of jump pads.
6734 (linux_set_resume_request): Dequeue deferred signals.
6735 (need_step_over_p): Also step over fast tracepoint jumps.
6736 (start_step_over): Also uninsert fast tracepoint jumps.
6737 (finish_step_over): Also reinsert fast tracepoint jumps.
6738 (linux_install_fast_tracepoint_jump): New.
6739 (linux_target_ops): Install linux_stabilize_threads and
6740 linux_install_fast_tracepoint_jump_pad.
6741 * linux-low.h (linux_target_ops) <get_thread_area,
6742 install_fast_tracepoint_jump_pad>: New fields.
6743 (struct lwp_info) <collecting_fast_tracepoint,
6744 pending_signals_to_report, exit_jump_pad_bkpt>: New fields.
6745 (linux_get_thread_area): Declare.
6746 * linux-x86-low.c (jump_insn): New.
6747 (x86_get_thread_area): New.
6748 (append_insns): New.
6749 (push_opcode): New.
6750 (amd64_install_fast_tracepoint_jump_pad): New.
6751 (i386_install_fast_tracepoint_jump_pad): New.
6752 (x86_install_fast_tracepoint_jump_pad): New.
6753 (the_low_target): Install x86_get_thread_area and
6754 x86_install_fast_tracepoint_jump_pad.
6755 * mem-break.c (set_raw_breakpoint_at): Use read_inferior_memory.
6756 (struct fast_tracepoint_jump): New.
6757 (fast_tracepoint_jump_insn): New.
6758 (fast_tracepoint_jump_shadow): New.
6759 (find_fast_tracepoint_jump_at): New.
6760 (fast_tracepoint_jump_here): New.
6761 (delete_fast_tracepoint_jump): New.
6762 (set_fast_tracepoint_jump): New.
6763 (uninsert_fast_tracepoint_jumps_at): New.
6764 (reinsert_fast_tracepoint_jumps_at): New.
6765 (set_breakpoint_at): Use write_inferior_memory.
6766 (uninsert_raw_breakpoint): Use write_inferior_memory.
6767 (check_mem_read): Mask out fast tracepoint jumps.
6768 (check_mem_write): Mask out fast tracepoint jumps.
6769 * mem-break.h (struct fast_tracepoint_jump): Forward declare.
6770 (set_fast_tracepoint_jump): Declare.
6771 (delete_fast_tracepoint_jump)
6772 (fast_tracepoint_jump_here, uninsert_fast_tracepoint_jumps_at)
6773 (reinsert_fast_tracepoint_jumps_at): Declare.
6774 * regcache.c: Don't compile many functions when building the
6775 in-process agent library.
6776 (init_register_cache) [IN_PROCESS_AGENT]: Don't allow allocating
6777 the register buffer in the heap.
6778 (free_register_cache): If the register buffer isn't owned by the
6779 regcache, don't free it.
6780 (set_register_cache) [IN_PROCESS_AGENT]: Don't re-alocate
6781 pre-existing register caches.
6782 * remote-utils.c (convert_int_to_ascii): Constify `from' parameter
6783 type.
6784 (convert_ascii_to_int): : Constify `from' parameter type.
6785 (decode_M_packet, decode_X_packet): Replace the `to' parameter by
6786 a `to_p' pointer to pointer parameter. If TO_P is NULL, malloc
6787 the needed buffer in-place.
6788 (relocate_instruction): New.
6789 * server.c (handle_query) <qSymbols>: If the target supports
6790 tracepoints, give it a chance of looking up symbols. Report
6791 support for fast tracepoints.
6792 (handle_status): Stabilize threads.
6793 (process_serial_event): Adjust.
6794 * server.h (struct fast_tracepoint_jump): Forward declare.
6795 (struct process_info) <fast_tracepoint_jumps>: New field.
6796 (convert_ascii_to_int, convert_int_to_ascii): Adjust.
6797 (decode_X_packet, decode_M_packet): Adjust.
6798 (relocate_instruction): Declare.
6799 (in_process_agent_loaded): Declare.
6800 (tracepoint_look_up_symbols): Declare.
6801 (struct fast_tpoint_collect_status): Declare.
6802 (fast_tracepoint_collecting): Declare.
6803 (force_unlock_trace_buffer): Declare.
6804 (handle_tracepoint_bkpts): Declare.
6805 (initialize_low_tracepoint)
6806 (supply_fast_tracepoint_registers) [IN_PROCESS_AGENT]: Declare.
6807 * target.h (struct target_ops) <stabilize_threads,
6808 install_fast_tracepoint_jump_pad>: New fields.
6809 (stabilize_threads, install_fast_tracepoint_jump_pad): New.
6810 * tracepoint.c [HAVE_MALLOC_H]: Include malloc.h.
6811 [HAVE_STDINT_H]: Include stdint.h.
6812 (trace_debug_1): Rename to ...
6813 (trace_vdebug): ... this.
6814 (trace_debug): Rename to ...
6815 (trace_debug_1): ... this. Add `level' parameter.
6816 (trace_debug): New.
6817 (ATTR_USED, ATTR_NOINLINE): New.
6818 (IP_AGENT_EXPORT): New.
6819 (gdb_tp_heap_buffer, gdb_jump_pad_buffer, gdb_jump_pad_buffer_end)
6820 (collecting, gdb_collect, stop_tracing, flush_trace_buffer)
6821 (about_to_request_buffer_space, trace_buffer_is_full)
6822 (stopping_tracepoint, expr_eval_result, error_tracepoint)
6823 (tracepoints, tracing, trace_buffer_ctrl, trace_buffer_ctrl_curr)
6824 (trace_buffer_lo, trace_buffer_hi, traceframe_read_count)
6825 (traceframe_write_count, traceframes_created)
6826 (trace_state_variables)
6827 New renaming defines.
6828 (struct ipa_sym_addresses): New.
6829 (STRINGIZE_1, STRINGIZE, IPA_SYM): New.
6830 (symbol_list): New.
6831 (ipa_sym_addrs): New.
6832 (all_tracepoint_symbols_looked_up): New.
6833 (in_process_agent_loaded): New.
6834 (write_e_ipa_not_loaded): New.
6835 (maybe_write_ipa_not_loaded): New.
6836 (tracepoint_look_up_symbols): New.
6837 (debug_threads) [IN_PROCESS_AGENT]: New.
6838 (read_inferior_memory) [IN_PROCESS_AGENT]: New.
6839 (UNKNOWN_SIDE_EFFECTS): New.
6840 (stop_tracing): New.
6841 (flush_trace_buffer): New.
6842 (stop_tracing_bkpt): New.
6843 (flush_trace_buffer_bkpt): New.
6844 (read_inferior_integer): New.
6845 (read_inferior_uinteger): New.
6846 (read_inferior_data_pointer): New.
6847 (write_inferior_data_pointer): New.
6848 (write_inferior_integer): New.
6849 (write_inferior_uinteger): New.
6850 (struct collect_static_trace_data_action): Delete.
6851 (enum tracepoint_type): New.
6852 (struct tracepoint) <type>: New field `type'.
43aaf8b6
PA
6853 <actions_str, step_actions, step_actions_str>: Only include in
6854 GDBserver.
fa593d66
PA
6855 <orig_size, obj_addr_on_target, adjusted_insn_addr>
6856 <adjusted_insn_addr_end, jump_pad, jump_pad_end>: New fields.
6857 (tracepoints): Use IP_AGENT_EXPORT.
6858 (last_tracepoint): Don't include in the IPA.
6859 (stopping_tracepoint): Use IP_AGENT_EXPORT.
6860 (trace_buffer_is_full): Use IP_AGENT_EXPORT.
6861 (alloced_trace_state_variables): New.
6862 (trace_state_variables): Use IP_AGENT_EXPORT.
6863 (traceframe_t): Delete unused variable.
6864 (circular_trace_buffer): Don't include in the IPA.
6865 (trace_buffer_start): Delete.
6866 (struct trace_buffer_control): New.
6867 (trace_buffer_free): Delete.
6868 (struct ipa_trace_buffer_control): New.
6869 (GDBSERVER_FLUSH_COUNT_MASK, GDBSERVER_FLUSH_COUNT_MASK_PREV)
6870 (GDBSERVER_FLUSH_COUNT_MASK_CURR, GDBSERVER_UPDATED_FLUSH_COUNT_BIT):
6871 New.
6872 (trace_buffer_ctrl): New.
6873 (TRACE_BUFFER_CTRL_CURR): New.
6874 (trace_buffer_start, trace_buffer_free, trace_buffer_end_free):
6875 Reimplement as macros.
6876 (trace_buffer_wrap): Delete.
6877 (traceframe_write_count, traceframe_read_count)
6878 (traceframes_created, tracing): Use IP_AGENT_EXPORT.
6879 (struct tracepoint_hit_ctx) <type>: New field.
6880 (struct fast_tracepoint_ctx): New.
6881 (memory_barrier): New.
6882 (cmpxchg): New.
6883 (record_tracepoint_error): Update atomically in the IPA.
6884 (clear_inferior_trace_buffer): New.
6885 (about_to_request_buffer_space): New.
6886 (trace_buffer_alloc): Handle GDBserver and inferior simulatenous
6887 updating the same buffer.
6888 (add_tracepoint): Default the tracepoint's type to trap
6889 tracepoint, and orig_size to -1.
6890 (get_trace_state_variable) [IN_PROCESS_AGENT]: Handle allocated
6891 internal variables.
6892 (create_trace_state_variable): New parameter `gdb'. Handle it.
6893 (clear_installed_tracepoints): Clear fast tracepoint jumps.
6894 (cmd_qtdp): Handle fast tracepoints.
6895 (cmd_qtdv): Adjust.
6896 (max_jump_pad_size): New.
6897 (gdb_jump_pad_head): New.
6898 (get_jump_space_head): New.
6899 (claim_jump_space): New.
6900 (sort_tracepoints): New.
6901 (MAX_JUMP_SIZE): New.
6902 (cmd_qtstart): Handle fast tracepoints. Sync tracepoints with the
6903 IPA.
6904 (stop_tracing) [IN_PROCESS_AGENT]: Don't include the tdisconnected
6905 support. Upload fast traceframes, and delete internal IPA
6906 breakpoints.
6907 (stop_tracing_handler): New.
6908 (flush_trace_buffer_handler): New.
6909 (cmd_qtstop): Upload fast tracepoints.
6910 (response_tracepoint): Handle fast tracepoints.
6911 (tracepoint_finished_step): Upload fast traceframes. Set the
6912 tracepoint hit context's tracepoint type.
6913 (handle_tracepoint_bkpts): New.
6914 (tracepoint_was_hit): Set the tracepoint hit context's tracepoint
6915 type. Add comment about fast tracepoints.
6916 (collect_data_at_tracepoint) [IN_PROCESS_AGENT]: Don't access the
6917 non-existing action_str field.
6918 (get_context_regcache): Handle fast tracepoints.
6919 (do_action_at_tracepoint) [!IN_PROCESS_AGENT]: Don't write the PC
6920 to the regcache.
6921 (fast_tracepoint_from_jump_pad_address): New.
6922 (fast_tracepoint_from_ipa_tpoint_address): New.
6923 (collecting_t): New.
6924 (force_unlock_trace_buffer): New.
6925 (fast_tracepoint_collecting): New.
6926 (collecting): New.
6927 (gdb_collect): New.
6928 (write_inferior_data_ptr): New.
6929 (target_tp_heap): New.
6930 (target_malloc): New.
6931 (download_agent_expr): New.
6932 (UALIGN): New.
6933 (download_tracepoints): New.
6934 (download_trace_state_variables): New.
6935 (upload_fast_traceframes): New.
6936 (IPA_FIRST_TRACEFRAME): New.
6937 (IPA_NEXT_TRACEFRAME_1): New.
6938 (IPA_NEXT_TRACEFRAME): New.
6939 [IN_PROCESS_AGENT]: Include sys/mman.h and fcntl.h.
6940 [IN_PROCESS_AGENT] (gdb_tp_heap_buffer, gdb_jump_pad_buffer)
6941 (gdb_jump_pad_buffer_end): New.
6942 [IN_PROCESS_AGENT] (initialize_tracepoint_ftlib): New.
6943 (initialize_tracepoint): Adjust.
6944 [IN_PROCESS_AGENT]: Allocate the IPA heap, and jump pad scratch
6945 buffer. Initialize the low module.
6946 * utils.c (PREFIX, TOOLNAME): New.
6947 (malloc_failure): Use PREFIX.
6948 (error): In the IPA, an error causes an exit.
6949 (fatal, warning): Use PREFIX.
6950 (internal_error): Use TOOLNAME.
6951 (NUMCELLS): Increase to 10.
6952 * configure, config.in: Regenerate.
6953
d149dd1d
PA
69542010-06-01 Pedro Alves <pedro@codesourcery.com>
6955
6956 * server.c (handle_query) <qSupported>: Do two passes over the
6957 qSupported string to avoid nesting strtok.
6958
f6528abd
JK
69592010-05-28 Jan Kratochvil <jan.kratochvil@redhat.com>
6960
6961 * Makefile.in (SFILES): Add $(srcdir)/proc-service.list.
6962 (CDEPS): New.
6963 * configure.ac (RDYNAMIC): New AC_MSG_CHECKING wrapping. Test also
6964 -Wl,--dynamic-list.
6965 * configure: Regenerate.
6966 * proc-service.list: New.
6967
ca2a87a0
JK
69682010-05-28 Jan Kratochvil <jan.kratochvil@redhat.com>
6969
6970 * linux-low.c (linux_core_of_thread): Fix crash on invalid CONTENT.
6971 New comment.
6972
363a6e9f
OS
69732010-05-26 Ozkan Sezer <sezeroz@gmail.com>
6974
6975 * gdbreplay.c (remote_open): Check error return from socket() call by
6976 its equality to -1 not by it being negative.
6977 * remote-utils.c (remote_open): Likewise.
6978
d23b6cb1
PA
69792010-05-23 Pedro Alves <pedro@codesourcery.com>
6980
6981 * config.h: Regenerate.
6982
28d3cf85
MK
69832010-05-19 Maxim Kuvyrkov <maxim@codesourcery.com>
6984
6985 * linux-m68k-low.c (ps_get_thread_area): Don't define if kernel
6986 doesn't provide PTRACE_GET_THREAD_AREA.
6987
fea36a59
MK
69882010-05-19 Maxim Kuvyrkov <maxim@codesourcery.com>
6989
6990 * linux-m68k-low.c: Include <asm/ptrace.h>
6991 (ps_get_thread_area): Implement.
6992
24b066ba
DE
69932010-05-03 Doug Evans <dje@google.com>
6994
6995 * event-loop.c (struct callback_event): New struct.
6996 (callback_list): New global.
6997 (append_callback_event, delete_callback_event): New functions.
6998 (process_callback): New function.
6999 (start_event_loop): Call it.
7000 * remote-utils.c (NOT_SCHEDULED): Define.
7001 (readchar_buf, readchar_bufcnt, readchar_bufp): New static globals,
7002 moved out of readchar.
7003 (readchar): Rewrite. Call reschedule before returning.
7004 (reset_readchar): New function.
7005 (remote_close): Call it.
7006 (process_remaining, reschedule): New functions.
7007 * server.h (callback_handler_func): New typedef.
7008 (append_callback_event, delete_callback_event): Declare.
7009
9836d6ea
PA
70102010-05-03 Pedro Alves <pedro@codesourcery.com>
7011
7012 * proc-service.c (ps_pglobal_lookup): Use
7013 thread_db_look_up_one_symbol.
7014 * remote-utils.c (look_up_one_symbol): Add new `may_ask_gdb'
7015 parameter. Use it instead of all_symbols_looked_up.
7016 * server.h (struct process_info) <all_symbols_looked_up>: Delete
7017 field.
7018 (all_symbols_looked_up): Don't declare.
7019 (look_up_one_symbol): Add new `may_ask_gdb' parameter.
7020 * thread-db.c (struct thread_db) <all_symbols_looked_up>: New
7021 field.
7022 (thread_db_look_up_symbols): Adjust call to look_up_one_symbol.
7023 Set all_symbols_looked_up here.
7024 (thread_db_look_up_one_symbol): New.
7025 (thread_db_get_tls_address): Adjust.
7026 (thread_db_load_search, try_thread_db_load_1): Always allocate the
7027 thread_db object on the heap, and tentatively set it in the
7028 process structure.
7029 (thread_db_init): Don't set all_symbols_looked_up here.
7030 * linux-low.h (thread_db_look_up_one_symbol): Declare.
7031
7984d532
PA
70322010-05-03 Pedro Alves <pedro@codesourcery.com>
7033
7034 * linux-low.c (linux_kill, linux_detach): Adjust.
7035 (status_pending_p_callback): Remove redundant statement. Check
7036 for !TARGET_WAITIKIND_IGNORE, instead of
7037 TARGET_WAITKIND_STOPPED.
7038 (handle_tracepoints): Make sure LWP is locked. Adjust.
7039 (linux_wait_for_event_1): Adjust.
7040 (linux_cancel_breakpoints): New.
7041 (unsuspend_one_lwp): New.
7042 (unsuspend_all_lwps): New.
7043 (linux_wait_1): If finishing a step-over, unsuspend all lwps.
7044 (send_sigstop_callback): Change return type to int, add new
7045 `except' parameter and handle it.
7046 (suspend_and_send_sigstop_callback): New.
7047 (stop_all_lwps): Add new `suspend' and `expect' parameters, and
7048 pass them down. If SUSPEND, also increment the lwp's suspend
7049 count.
7050 (linux_resume_one_lwp): Add notice about resuming a suspended LWP.
7051 (need_step_over_p): Don't consider suspended LWPs.
7052 (start_step_over): Adjust.
7053 (proceed_one_lwp): Change return type to int, add new `except'
7054 parameter and handle it.
7055 (unsuspend_and_proceed_one_lwp): New.
7056 (proceed_all_lwps): Use find_inferior instead of
7057 for_each_inferior.
7058 (unstop_all_lwps): Add `unsuspend' parameter. If UNSUSPEND, them
7059 also decrement the suspend count of LWPs. Pass `except' down,
7060 instead of hacking its suspend count.
7061 (linux_pause_all): Add `freeze' parameter. Adjust.
7062 (linux_unpause_all): New.
7063 (linux_target_ops): Install linux_unpause_all.
7064 * server.c (handle_status): Adjust.
7065 * target.h (struct target_ops): New fields `unpause_all' and
7066 `cancel_breakpoints'. Add new parameter to `pause_all'.
7067 (pause_all): Add new `freeze' parameter.
7068 (unpause_all): New.
7069 (cancel_breakpoints): New.
7070 * tracepoint.c (clear_installed_tracepoints): Pause threads, and
7071 cancel breakpoints.
7072 (cmd_qtstart): Pause threads.
7073 (stop_tracing): Pause threads, and cancel breakpoints.
7074 * win32-low.c (win32_target_ops): Adjust.
7075
e471f25b
PA
70762010-05-03 Pedro Alves <pedro@codesourcery.com>
7077
7078 * linux-low.c (linux_wait_for_event_1): Move passing the signal to
7079 the inferior right away from here...
7080 (linux_wait_1): ... to here, and adjust to check the thread's
7081 last_resume_kind instead of the lwp's step or stop_expected flags.
7082
1915ef4f
PA
70832010-05-02 Pedro Alves <pedro@codesourcery.com>
7084
7085 * README: Use consistent `GDB' and `GDBserver' spellings.
7086
f9e39928
PA
70872010-05-02 Pedro Alves <pedro@codesourcery.com>
7088
7089 * linux-low.c (linux_kill_one_lwp): Assume the lwp is stopped.
7090 (linux_kill): Stop all lwps here. Don't delete the main lwp here.
7091 (linux_detach_one_lwp): Assume the lwp is stopped.
7092 (any_thread_of): Delete.
7093 (linux_detach): Stop all lwps here. Don't blindly delete all
7094 breakpoints.
7095 (delete_lwp_callback): New.
7096 (linux_mourn): Delete all lwps of the process that is gone.
7097 (linux_wait_1): Don't delete the last lwp of the process here.
7098 * mem-break.h (mark_breakpoints_out): Declare.
7099 * mem-break.c (mark_breakpoints_out): New.
7100 (free_all_breakpoints): Use it.
7101 * server.c (handle_target_event): If the process is gone, mark
7102 breakpoints out.
7103 * thread-db.c (struct thread_db) <create_bp>: New field.
7104 (thread_db_enable_reporting): Fix prototype. Store a thread event
7105 breakpoint reference in the thread_db struct.
7106 (thread_db_load_search): Clear the thread_db object.
7107 (try_thread_db_load_1): Ditto.
7108 (switch_to_process): New.
7109 (disable_thread_event_reporting): Use it.
7110 (remove_thread_event_breakpoints): New.
7111 (thread_db_detach, thread_db_mourn): Use it.
7112
1e7fc18c
PA
71132010-05-01 Pedro Alves <pedro@codesourcery.com>
7114
7115 * linux-low.c (linux_enable_event_reporting): New.
7116 (linux_wait_for_event_1, handle_extended_wait): Use it.
7117
02fc4de7
PA
71182010-04-30 Pedro Alves <pedro@codesourcery.com>
7119
7120 * linux-low.c (linux_kill_one_lwp, linux_kill)
7121 (linux_detach_one_lwp): Adjust to send_sigstop interface change.
7122 (send_sigstop): Take an lwp_info as parameter instead. Queue a
7123 SIGSTOP even if the LWP is stopped.
7124 (send_sigstop_callback): New.
7125 (stop_all_lwps): Use send_sigstop_callback instead.
7126 (linux_resume_one_thread): Adjust.
7127 (proceed_one_lwp): Still proceed an LWP that the client has
7128 requested to stop, if we haven't reported it as stopped yet. Make
7129 sure that LWPs the client want stopped, have a pending SIGSTOP.
7130
bc3b5632
DE
71312010-04-26 Doug Evans <dje@google.com>
7132
ae1ada35
DE
7133 * server.c (handle_general_set): Make static.
7134
bc3b5632
DE
7135 * remote-utils.c (putpkt_binary_1): Call readchar instead of read.
7136 Print received char after testing for error/eof instead of before.
7137 (input_interrupt): Tweak comment.
7138
65730243
DE
71392010-04-23 Doug Evans <dje@google.com>
7140
7141 * server.c (start_inferior): Print inferior argv if --debug.
7142
a8ae7dc0
AR
71432010-04-21 Aleksandar Ristovski <aristovski@qnx.com>
7144
7145 * Makefile.in (nto_low_h nto-low.o nto-x86-low.o): New dependency lists.
7146 * nto-x86-low.c: Include server.h
7147
1c07cc19
PM
71482010-04-20 Pierre Muller <muller@ics.u-strasbg.fr>
7149
7150 * win32-i386-low.c: Use __x86_64__ macro instead of __x86_64 to
7151 be consistent with other sources of this directory.
7152 (init_registers_amd64): Correct name of source file of this function
7153 in the comment.
7154
e0a61e09
PM
71552010-04-19 Pierre Muller <muller@ics.u-strasbg.fr>
7156
7157 * configure.srv (x86_64-*-mingw*): New configuration for Windows
7158 64-bit executables.
7159
54709339
PM
71602010-04-19 Pierre Muller <muller@ics.u-strasbg.fr>
7161
7162 * win32-i386-low.c: Add 64-bit support.
7163 (CONTEXT_EXTENDED_REGISTERS): Set macro to zero if not exisiting.
7164 (init_registers_amd64): Declare.
7165 (mappings): Add 64-bit version of array.
7166 (init_windows_x86): New function.
7167 (the_low_target): Change init_arch field to init_windows_x86.
7168
e8f0053d
PM
71692010-04-19 Pierre Muller <muller@ics.u-strasbg.fr>
7170
7171 * win32-low.c: Adapt to support also 64-bit architecture.
7172 (child_xfer_memory): Use uintptr_t type for local variable `addr'.
7173 (get_image_name): Use SIZE_T type for local variable `done'.
7174 (psapi_get_dll_name): Use LPVOID type for parameter `BaseAddress'.
7175 (toolhelp_get_dll_name): Idem.
7176 (handle_load_dll): Use CORE_ADDR type for local variable `load_addr'.
7177 Use uintptr_t typecast to avoid warning.
7178 (handle_unload_dll): Use uintptr_t typecast to avoid warning.
7179 (handle_exception): Use phex_nz to avoid warning.
7180 (win32_wait): Remove unused local variable `process'.
7181
c481e77e
PM
71822010-04-19 Pierre Muller <muller@ics.u-strasbg.fr>
7183
7184 * configure.srv (srv_amd64_regobj): Replace `x86-64-avx.o' by
7185 `amd64-avx.o'.
7186
12ea4b69
PM
71872010-04-17 Pierre Muller <muller@ics.u-strasbg.fr>
7188
7189 * configure.ac: Use `ws2_32' library for srv_mingw.
7190 * configure: Regenerate.
7191 * gdbreplay.c: Include winsock2.h instead of winsock.h.
7192 * remote-utils.c: Likewise.
7193
f6d1620c
L
71942010-04-17 H.J. Lu <hongjiu.lu@intel.com>
7195
7196 * linux-x86-low.c (xmltarget_amd64_linux_no_xml): Define only
7197 if __x86_64__ is defined.
7198
8e642873
PM
71992010-04-16 Pierre Muller <muller@ics.u-strasbg.fr>
7200
7201 * configure: Regenerate.
7202
711e434b
PM
72032010-04-16 Pierre Muller <muller@ics.u-strasbg.fr>
7204
7205 * server.c (handle_query): Handle 'qGetTIBAddr' query.
7206 * target.h (target_ops): New get_tib_address field.
7207 * win32-low.h (win32_thread_info): Add thread_local_base field.
7208 * win32-low.c (child_add_thread): Add tlb argument.
7209 Set thread_local_base field to TLB.
7210 (get_child_debug_event): Adapt to child_add_thread change.
7211 (win32_get_tib_address): New function.
7212 (win32_target_ops): Set get_tib_address field to
7213 win32_get_tib_address.
7214 * linux-low.c (linux_target_ops): Set get_tib_address field to NULL.
7215
505106cd
PA
72162010-04-12 Pedro Alves <pedro@codesourcery.com>
7217
505106cd
PA
7218 * linux-low.c (linux_mourn): Also remove the process.
7219 * server.c (handle_target_event): Don't remove the process here.
7220 * nto-low.c (nto_mourn): New.
7221 (nto_target_ops): Install it.
7222 * spu-low.c (spu_mourn): New.
7223 (spu_target_ops): Install it.
7224 * win32-low.c (win32_mourn): New.
7225 (win32_target_ops): Install it.
7226
e8470a06
PA
72272010-04-12 Pedro Alves <pedro@codesourcery.com>
7228
7229 * server.h (buffer_xml_printf): Remove redundant `;'.
7230
45ba0d02
PA
72312010-04-12 Pedro Alves <pedro@codesourcery.com>
7232
7233 * regcache.c (set_register_cache): Invalidate regcaches before
7234 changing the register cache layout.
7235 (regcache_invalidate_one): Allow a NULL regcache.
7236 * linux-x86-low.c (x86_linux_update_xmltarget): Invalidate
7237 regcaches before changing the register cache layout or the target
7238 regsets.
7239
59e04013
L
72402010-04-12 H.J. Lu <hongjiu.lu@intel.com>
7241
7242 * linux-x86-low.c (x86_linux_update_xmltarget): Avoid unused
7243 variable warning on Linux/x86-64.
7244
8336d594
PA
72452010-04-11 Pedro Alves <pedro@codesourcery.com>
7246
7247 GDBserver disconnected tracing support.
7248
7249 * linux-low.c (linux_remove_process): Delete.
7250 (add_lwp): Don't set last_resume_kind here.
7251 (linux_kill): Use `mourn'.
7252 (linux_detach): Use `thread_db_detach', and `mourn'.
7253 (linux_mourn): New.
7254 (linux_attach_lwp_1): Adjust comment.
7255 (linux_attach): last_resume_kind moved the thread_info; adjust.
7256 (status_pending_p_callback): Adjust.
7257 (linux_wait_for_event_1): Adjust.
7258 (count_events_callback, select_singlestep_lwp_callback)
7259 (select_event_lwp_callback, cancel_breakpoints_callback)
7260 (db_wants_lwp_stopped, linux_wait_1, need_step_over_p)
7261 (proceed_one_lwp): Adjust.
7262 (linux_async): Add debug output.
7263 (linux_thread_stopped): New.
7264 (linux_pause_all): New.
7265 (linux_target_ops): Install linux_mourn, linux_thread_stopped and
7266 linux_pause_all.
7267 * linux-low.h (struct lwp_info): Delete last_resume_kind field.
7268 (thread_db_free): Delete declaration.
7269 (thread_db_detach, thread_db_mourn): Declare.
7270 * thread-db.c (thread_db_init): Use thread_db_mourn.
7271 (thread_db_free): Delete, split in two.
7272 (disable_thread_event_reporting): New.
7273 (thread_db_detach): New.
7274 (thread_db_mourn): New.
7275
7276 * server.h (struct thread_info) <last_resume_kind>: New field.
7277 <attached>: Add comment.
7278 <gdb_detached>: New field.
7279 (handler_func): Change return type to int.
7280 (handle_serial_event, handle_target_event): Ditto.
7281 (gdb_connected): Declare.
7282 (tracing): Delete.
7283 (disconnected_tracing): Declare.
7284 (stop_tracing): Declare.
7285
7286 * server.c (handle_query) <qSupported>: Report support for
7287 disconnected tracing.
7288 (queue_stop_reply_callback): Account for running threads.
7289 (gdb_wants_thread_stopped): New.
7290 (gdb_wants_all_threads_stopped): New.
7291 (gdb_reattached_process): New.
7292 (handle_status): Clear the `gdb_detached' flag of all processes.
7293 In all-stop, stop all threads.
7294 (main): Be sure to leave tfind mode. Handle disconnected tracing.
7295 (process_serial_event): If the remote connection breaks, or if an
7296 exit was forced with "monitor exit", force an event loop exit.
7297 Handle disconnected tracing on detach.
7298 (handle_serial_event): Adjust.
7299 (handle_target_event): If GDB isn't connected, forward events back
7300 to the inferior, unless the last process exited, in which case,
7301 exit gdbserver. Adjust interface.
7302
7303 * remote-utils.c (remote_open): Don't block in accept. Instead
7304 register an event loop source on the listen socket file
7305 descriptor. Refactor bits into ...
7306 (listen_desc): ... this new global.
7307 (gdb_connected): ... this new function.
7308 (enable_async_notification): ... this new function.
7309 (handle_accept_event): ... this new function.
7310 (remote_close): Clear remote_desc.
7311
7312 * inferiors.c (add_thread): Set the new thread's last_resume_kind.
7313
7314 * target.h (struct target_ops) <mourn, thread_stopped, pause_all>:
7315 New fields.
7316 (mourn_inferior): Define.
7317 (target_process_qsupported): Avoid the dangling else problem.
7318 (thread_stopped): Define.
7319 (pause_all): Define.
7320 (target_waitstatus_to_string): Declare.
7321 * target.c (target_waitstatus_to_string): New.
7322
7323 * tracepoint.c (tracing): Make extern.
7324 (disconnected_tracing): New.
7325 (stop_tracing): Make extern. Handle tracing stops due to GDB
7326 disconnecting.
7327 (cmd_qtdisconnected): New.
7328 (cmd_qtstatus): Report disconnected tracing status in trace reply.
7329 (handle_tracepoint_general_set): Handle QTDisconnected.
7330
7331 * event-loop.c (event_handler_func): Change return type to int.
7332 (process_event): Bail out if the event handler wants the event
7333 loop to stop.
7334 (handle_file_event): Ditto.
7335 (start_event_loop): Bail out if the event handler wants the event
7336 loop to stop.
7337
7338 * nto-low.c (nto_target_ops): Adjust.
7339 * spu-low.c (spu_wait): Don't remove the process here.
7340 (spu_target_ops): Adjust.
7341 * win32-low.c (win32_wait): Don't remove the process here.
7342 (win32_target_ops): Adjust.
7343
5d267c4c
PA
73442010-04-11 Pedro Alves <pedro@codesourcery.com>
7345
7346 * regcache.c (realloc_register_cache): Invalidate inferior's
7347 regcache before recreating it.
7348
623ccd72
PA
73492010-04-09 Pedro Alves <pedro@codesourcery.com>
7350
7351 * tracepoint.c (cmd_qtstatus): Report trace buffer circularity.
7352
219f2f23
PA
73532010-04-09 Stan Shebs <stan@codesourcery.com>
7354 Pedro Alves <pedro@codesourcery.com>
7355
7356 * server.h (LONGEST): New.
7357 (struct thread_info) <while_stepping>: New field.
7358 (unpack_varlen_hex, xrealloc, pulongest, plongest, phex_nz):
7359 Declare.
7360 (initialize_tracepoint, handle_tracepoint_general_set)
7361 (handle_tracepoint_query, tracepoint_finished_step)
7362 (tracepoint_was_hit, release_while_stepping_state_list):
7363 (current_traceframe): Declare.
7364 * server.c (handle_general_set): Handle tracepoint packets.
7365 (read_memory): New.
7366 (write_memory): New.
7367 (handle_search_memory_1): Use read_memory.
7368 (handle_query): Report support for conditional tracepoints, trace
7369 state variables, and tracepoint sources. Handle tracepoint
7370 queries.
7371 (main): Initialize the tracepoints module.
7372 (process_serial_event): Handle traceframe reads/writes.
7373
7374 * linux-low.c (handle_tracepoints): New.
7375 (linux_wait_1): Call it.
7376 (linux_resume_one_lwp): Handle while-stepping.
7377 (linux_supports_tracepoints, linux_read_pc, linux_write_pc): New.
7378 (linux_target_ops): Install them.
7379 * linux-low.h (struct linux_target_ops) <supports_tracepoints>:
7380 New field.
7381 * linux-x86-low.c (x86_supports_tracepoints): New.
7382 (the_low_target). Install it.
7383
7384 * mem-break.h (delete_breakpoint): Declare.
7385 * mem-break.c (delete_breakpoint): Make external.
7386
7387 * target.h (struct target_ops): Add `supports_tracepoints',
7388 `read_pc', and `write_pc' fields.
7389 (target_supports_tracepoints): Define.
7390 * utils.c (xrealloc, decimal2str, pulongest, plongest, thirty_two)
7391 (phex_nz): New.
7392
7393 * regcache.h (struct regcache) <registers_owned>: New field.
7394 (init_register_cache, regcache_cpy): Declare.
7395 (regcache_read_pc, regcache_write_pc): Declare.
7396 (register_cache_size): Declare.
7397 (supply_regblock): Declare.
7398 * regcache.c (init_register_cache): New.
7399 (new_register_cache): Use it.
7400 (regcache_cpy): New.
7401 (register_cache_size): New.
7402 (supply_regblock): New.
7403 (regcache_read_pc, regcache_write_pc): New.
889bf7c5 7404
219f2f23
PA
7405 * tracepoint.c: New.
7406
7407 * Makefile.in (OBS): Add tracepoint.o.
7408 (tracepoint.o): New rule.
7409
3a13a53b
L
74102010-04-08 H.J. Lu <hongjiu.lu@intel.com>
7411
7412 * Makefile.in (clean): Also remove i386-mmx.c i386-mmx-linux.c.
7413 (i386-mmx.o): New.
7414 (i386-mmx.c): Likewise.
7415 (i386-mmx-linux.o): Likewise.
7416 (i386-mmx-linux.c): Likewise.
7417
7418 * configure.srv (srv_i386_regobj): Add i386-mmx.o.
7419 (srv_i386_linux_regobj): Add i386-mmx-linux.o.
7420 (srv_i386_xmlfiles): Add i386/i386-mmx.xml.
7421 (srv_i386_linux_xmlfiles): Add i386/i386-mmx-linux.xml.
7422
7423 * linux-x86-low.c (init_registers_i386_mmx_linux): New.
7424 (x86_linux_update_xmltarget): Call init_registers_i386_mmx_linux
7425 and return if ptrace PTRACE_GETFPXREGS failed in 32bit.
7426
1570b33e
L
74272010-04-07 H.J. Lu <hongjiu.lu@intel.com>
7428
7429 * Makefile.in (clean): Updated.
7430 (i386-avx.o): New.
7431 (i386-avx.c): Likewise.
7432 (i386-avx-linux.o): Likewise.
7433 (i386-avx-linux.c): Likewise.
7434 (amd64-avx.o): Likewise.
7435 (amd64-avx.c): Likewise.
7436 (amd64-avx-linux.o): Likewise.
7437 (amd64-avx-linux.c): Likewise.
7438
7439 * configure.srv (srv_i386_regobj): Add i386-avx.o.
7440 (srv_i386_linux_regobj): Add i386-avx-linux.o.
7441 (srv_amd64_regobj): Add amd64-avx.o.
7442 (srv_amd64_linux_regobj): Add amd64-avx-linux.o.
7443 (srv_i386_32bit_xmlfiles): Add i386/32bit-avx.xml.
7444 (srv_i386_64bit_xmlfiles): Add i386/64bit-avx.xml.
7445 (srv_i386_xmlfiles): Add i386/i386-avx.xml.
7446 (srv_amd64_xmlfiles): Add i386/amd64-avx.xml.
7447 (srv_i386_linux_xmlfiles): Add i386/i386-avx-linux.xml.
7448 (srv_amd64_linux_xmlfiles): Add i386/amd64-avx-linux.xml.
7449
7450 * i387-fp.c: Include "i386-xstate.h".
7451 (i387_xsave): New.
7452 (i387_cache_to_xsave): Likewise.
7453 (i387_xsave_to_cache): Likewise.
7454 (x86_xcr0): Likewise.
7455
7456 * i387-fp.h (i387_cache_to_xsave): Likewise.
7457 (i387_xsave_to_cache): Likewise.
7458 (x86_xcr0): Likewise.
7459
7460 * linux-arm-low.c (target_regsets): Initialize nt_type to 0.
7461 * linux-crisv32-low.c (target_regsets): Likewise.
7462 * linux-m68k-low.c (target_regsets): Likewise.
7463 * linux-mips-low.c (target_regsets): Likewise.
7464 * linux-ppc-low.c (target_regsets): Likewise.
7465 * linux-s390-low.c (target_regsets): Likewise.
7466 * linux-sh-low.c (target_regsets): Likewise.
7467 * linux-sparc-low.c (target_regsets): Likewise.
7468 * linux-xtensa-low.c (target_regsets): Likewise.
7469
7470 * linux-low.c: Include <sys/uio.h>.
7471 (regsets_fetch_inferior_registers): Support nt_type.
7472 (regsets_store_inferior_registers): Likewise.
7473 (linux_process_qsupported): New.
7474 (linux_target_ops): Add linux_process_qsupported.
7475
7476 * linux-low.h (regset_info): Add nt_type.
7477 (linux_target_ops): Add process_qsupported.
7478
7479 * linux-x86-low.c: Include "i386-xstate.h", "elf/common.h"
7480 and <sys/uio.h>.
7481 (init_registers_i386_avx_linux): New.
7482 (init_registers_amd64_avx_linux): Likewise.
7483 (xmltarget_i386_linux_no_xml): Likewise.
7484 (xmltarget_amd64_linux_no_xml): Likewise.
7485 (PTRACE_GETREGSET): Likewise.
7486 (PTRACE_SETREGSET): Likewise.
7487 (x86_fill_xstateregset): Likewise.
7488 (x86_store_xstateregset): Likewise.
7489 (use_xml): Likewise.
7490 (x86_linux_update_xmltarget): Likewise.
7491 (x86_linux_process_qsupported): Likewise.
7492 (target_regsets): Add NT_X86_XSTATE entry and Initialize nt_type.
7493 (x86_arch_setup): Don't call init_registers_amd64_linux nor
7494 init_registers_i386_linux here. Call
7495 x86_linux_update_xmltarget.
7496 (the_low_target): Add x86_linux_process_qsupported.
7497
7498 * server.c (handle_query): Call target_process_qsupported.
7499
7500 * target.h (target_ops): Add process_qsupported.
7501 (target_process_qsupported): New.
7502
fc7238bb
PA
75032010-04-03 Pedro Alves <pedro@codesourcery.com>
7504
7505 * inferiors.c (add_thread): Set last_status kind to
7506 TARGET_WAITKIND_IGNORE.
7507 * linux-low.c (cancel_breakpoint): Remove unnecessary regcache
7508 fetch. Use ptid_of. Avoid unnecessary get_lwp_thread calls.
7509 (linux_wait_1): Move `thread' local definition to block that uses
7510 it. Don't NULL initialize `event_child'.
7511 (linux_resume_one_thread): Avoid unnecessary get_lwp_thread calls.
7512 Alway set the thread's last_status to TARGET_WAITKIND_IGNORE.
7513 * linux-x86-low.c (x86_breakpoint_at): Read raw memory.
7514
bdabb078
PA
75152010-04-01 Pedro Alves <pedro@codesourcery.com>
7516
7517 * linux-low.c (get_stop_pc): Don't adjust the PC if stopped with
7518 an extended waitstatus, or by a watchpoint.
7519 (cancel_breakpoints_callback): Don't cancel a breakpoint if the
7520 thread was stepping or has been stopped by a watchpoint.
7521
d3bbe7a0
PA
75222010-04-01 Pedro Alves <pedro@codesourcery.com>
7523
7524 * mem-break.c (struct raw_breakpoint): New field shlib_disabled.
7525 (set_gdb_breakpoint_at): If GDB is inserting a breakpoint on top
7526 of another, then delete the previous, and validate all
7527 breakpoints.
7528 (validate_inserted_breakpoint): New.
7529 (delete_disabled_breakpoints): New.
7530 (validate_breakpoints): New.
7531 (check_mem_read): Validate breakpoints before trusting their
7532 shadow. Delete disabled breakpoints.
7533 (check_mem_write): Validate breakpoints before trusting they
7534 should be inserted. Delete disabled breakpoints.
7535 * mem-break.h (validate_breakpoints):
7536 * server.c (handle_query): Validate breakpoints when we see a
7537 qSymbol query.
7538
8b07ae33
PA
75392010-04-01 Pedro Alves <pedro@codesourcery.com>
7540
7541 * linux-low.c (linux_wait_1): Avoid setting need_step_over is
7542 there's a GDB breakpoint at stop_pc. Always report a trap to GDB
7543 if we could tell there's a GDB breakpoint at stop_pc.
7544 (need_step_over_p): Don't do a step over if we find a GDB
7545 breakpoint at the resume PC.
7546
7547 * mem-break.c (struct raw_breakpoint): New.
7548 (enum bkpt_type): New type `gdb_breakpoint'.
7549 (struct breakpoint): Delete the `PC', `old_data' and `inserted'
7550 fields. New field `raw'.
7551 (find_raw_breakpoint_at): New.
7552 (set_raw_breakpoint_at): Handle refcounting. Create a raw
7553 breakpoint instead.
7554 (set_breakpoint_at): Adjust.
7555 (delete_raw_breakpoint): New.
7556 (release_breakpoint): New.
7557 (delete_breakpoint): Rename to...
7558 (delete_breakpoint_1): ... this. Add proc parameter. Use
7559 release_breakpoint. Return ENOENT.
7560 (delete_breakpoint): Reimplement.
7561 (find_breakpoint_at): Delete.
7562 (find_gdb_breakpoint_at): New.
7563 (delete_breakpoint_at): Delete.
7564 (set_gdb_breakpoint_at): New.
7565 (delete_gdb_breakpoint_at): New.
7566 (gdb_breakpoint_here): New.
7567 (set_reinsert_breakpoint): Use release_breakpoint.
7568 (uninsert_breakpoint): Rename to ...
7569 (uninsert_raw_breakpoint): ... this.
7570 (uninsert_breakpoints_at): Adjust to handle raw breakpoints.
7571 (reinsert_raw_breakpoint): Change parameter type to
7572 raw_breakpoint.
7573 (reinsert_breakpoints_at): Adjust to handle raw breakpoints
7574 instead.
7575 (check_breakpoints): Adjust. Use release_breakpoint.
7576 (breakpoint_here): Rewrite using find_raw_breakpoint_at.
7577 (breakpoint_inserted_here): Ditto.
7578 (check_mem_read): Adjust to iterate over raw breakpoints instead.
7579 Don't trust the breakpoint's shadow if it is not inserted.
7580 (check_mem_write): Adjust to iterate over raw breakpoints instead.
7581 (delete_all_breakpoints): Adjust.
7582 (free_all_breakpoints): Mark all breakpoints as uninserted, and
7583 use delete_breakpoint_1.
7584
7585 * mem-break.h (breakpoints_supported): Delete declaration.
7586 (set_gdb_breakpoint_at): Declare.
7587 (gdb_breakpoint_here): Declare.
7588 (delete_breakpoint_at): Delete.
7589 (delete_gdb_breakpoint_at): Declare.
7590
7591 * server.h (struct raw_breakpoint): Forward declare.
7592 (struct process_info): New field `raw_breakpoints'.
7593
7594 * linux-x86-low.c (x86_insert_point, x86_remote_point): Handle Z0
7595 breakpoints.
7596
6bf5e0ba
PA
75972010-03-24 Pedro Alves <pedro@codesourcery.com>
7598
7599 * linux-low.c (status_pending_p_callback): Fix comment.
7600 (linux_wait_for_event_1): Move most of the internal breakpoint
7601 handling from here...
7602 (linux_wait_1): ... to here.
7603 (count_events_callback): New.
7604 (select_singlestep_lwp_callback): New.
7605 (select_event_lwp_callback): New.
7606 (cancel_breakpoints_callback): New.
7607 (select_event_lwp): New.
7608 (linux_wait_1): Simplify internal breakpoint handling. Give equal
7609 priority to all LWPs that have had events that should be reported
7610 to the client. Cancel breakpoints when about to reporting the
7611 event to the client, not while stopping lwps. No longer cancel
7612 finished single-steps here.
7613 (cancel_finished_single_step): Delete.
7614 (cancel_finished_single_steps): Delete.
7615
414a389f
PA
76162010-03-24 Pedro Alves <pedro@codesourcery.com>
7617
7618 * mem-break.c (enum bkpt_type): New.
7619 (struct breakpoint): New field `type'.
7620 (set_breakpoint_at): Change return type to struct breakpoint
7621 pointer. Set type to `other_breakpoint' by default.
7622 (delete_breakpoint): Rewrite, supporting more than one breakpoint
7623 in the breakpoint list.
7624 (delete_reinsert_breakpoints): Only delete reinsert breakpoints.
7625 (reinsert_breakpoint): Rename to ...
7626 (reinsert_raw_breakpoint): ... this.
7627 (reinsert_breakpoints_at): Adjust.
7628 * mem-break.h (struct breakpoint): Declare.
7629 (set_breakpoint_at): Change return type to struct breakpoint
7630 pointer.
7631
2280c721
PA
76322010-03-24 Pedro Alves <pedro@codesourcery.com>
7633
7634 * server.c (handle_query): Assign, not compare.
7635
d50171e4
PA
76362010-03-24 Pedro Alves <pedro@codesourcery.com>
7637
7638 Teach linux gdbserver to step-over-breakpoints.
7639
7640 * linux-low.c (can_hardware_single_step): New.
7641 (supports_breakpoints): New.
7642 (handle_extended_wait): If stopping threads, read the stop pc of
7643 the new cloned LWP.
7644 (get_pc): New.
7645 (get_stop_pc): Add `lwp' parameter. Handle it. Bail out if the
7646 low target doesn't support retrieving the PC.
7647 (add_lwp): Set last_resume_kind to resume_continue.
7648 (linux_attach_lwp_1): Adjust comments. Always set stop_expected.
7649 (linux_attach): Don't clear stop_expected. Set the lwp's
7650 last_resume_kind to resume_stop.
7651 (linux_detach_one_lwp): Don't check for removed breakpoints.
7652 (check_removed_breakpoint): Delete.
7653 (status_pending_p): Rename to ...
7654 (status_pending_p_callback): ... this. Don't check for removed
7655 breakpoints. Don't consider threads that are stopped from GDB's
7656 perspective.
7657 (linux_wait_for_lwp): Always read the stop_pc here.
7658 (cancel_breakpoint): New.
7659 (step_over_bkpt): New global.
7660 (linux_wait_for_event_1): Implement stepping over breakpoints.
7661 (gdb_wants_lwp_stopped): New.
7662 (gdb_wants_all_stopped): New.
7663 (linux_wait_1): Tag threads as gdb-wants-stopped. Cancel finished
7664 single-step traps here. Store the thread's last reported target
7665 wait status.
7666 (send_sigstop): Don't clear stop_expected. Always set it,
7667 instead.
7668 (mark_lwp_dead): Remove reference to pending_is_breakpoint.
7669 (cancel_finished_single_step): New.
7670 (cancel_finished_single_steps): New.
7671 (wait_for_sigstop): Don't cancel finished single-step traps here.
7672 (linux_resume_one_lwp): Don't check for removed breakpoints.
7673 Don't set `step' on non-hardware step archs.
7674 (linux_set_resume_request): Ignore resume_stop requests if already
7675 stopping or stopped. Set the lwp's last_resume_kind.
7676 (resume_status_pending_p): Don't check for removed breakpoints.
7677 (need_step_over_p): New.
7678 (start_step_over): New.
7679 (finish_step_over): New.
7680 (linux_resume_one_thread): Always queue a sigstop for resume_stop
7681 requests. Clear the thread's last reported target waitstatus.
7682 Don't use the `suspended' flag. Don't consider pending breakpoints.
7683 (linux_resume): Start a step-over if necessary.
7684 (proceed_one_lwp): New.
7685 (proceed_all_lwps): New.
7686 (unstop_all_lwps): New.
7687 * linux-low.h (struct lwp_info): Rewrite comment for the
7688 `suspended' flag. Add the `stop_pc' field. Delete the
7689 `pending_stop_pc' field. Tweak the `stepping' flag's comment.
7690 Add `'last_resume_kind' and `need_step_over' fields.
7691 * inferiors.c (struct thread_info): Delete, moved elsewhere.
7692 * mem-break.c (struct breakpoint): Delete `reinserting' flag.
7693 Delete `breakpoint_to_reinsert' field. New flag `inserted'.
7694 (set_raw_breakpoint_at): New.
7695 (set_breakpoint_at): Rewrite to use it.
7696 (reinsert_breakpoint_handler): Delete.
7697 (set_reinsert_breakpoint): New.
7698 (reinsert_breakpoint_by_bp): Delete.
7699 (delete_reinsert_breakpoints): New.
7700 (uninsert_breakpoint): Rewrite.
7701 (uninsert_breakpoints_at): New.
7702 (reinsert_breakpoint): Rewrite.
7703 (reinsert_breakpoints_at): New.
7704 (check_breakpoints): Rewrite.
7705 (breakpoint_here): New.
7706 (breakpoint_inserted_here): New.
7707 (check_mem_read): Adjust.
7708 * mem-break.h (breakpoints_supported, breakpoint_here)
7709 (breakpoint_inserted_here, set_reinsert_breakpoint): Declare.
7710 (reinsert_breakpoint_by_bp): Delete declaration.
7711 (delete_reinsert_breakpoints): Declare.
7712 (reinsert_breakpoint): Delete declaration.
7713 (reinsert_breakpoints_at): Declare.
7714 (uninsert_breakpoint): Delete declaration.
7715 (uninsert_breakpoints_at): Declare.
7716 (check_breakpoints): Adjust prototype.
7717 * server.h: Adjust include order.
7718 (struct thread_info): Declare here. Add a `last_status' field.
7719
30ba68cb
MS
77202010-03-23 Michael Snyder <msnyder@vmware.com>
7721
7722 * server.c (crc32): New function.
7723 (handle_query): Add handling for 'qCRC:' request.
7724
b9a881c2
PA
77252010-03-23 Pedro Alves <pedro@codesourcery.com>
7726
7727 * linux-x86-low.c (x86_linux_prepare_to_resume): Clear DR6 if the
7728 lwp had been stopped by a watchpoint.
7729
e92d13d5
PA
77302010-03-16 Pedro Alves <pedro@codesourcery.com>
7731
7732 * server.h (internal_error): Declare.
7733 (gdb_assert, ASSERT_FUNCTION, gdb_assert_fail): Define.
7734 * utils.c (internal_error): New function.
7735
64daa791
AS
77362010-03-15 Andreas Schwab <schwab@redhat.com>
7737
7738 * configure.srv: Fix typo setting srv_regobj.
7739
f52cd8cd
PA
77402010-03-15 Pedro Alves <pedro@codesourcery.com>
7741
7742 * linux-low.c (fetch_register): Avoid passing a non string literal
7743 format to `error'.
7744 (usr_store_inferior_registers): Ditto.
7745
93ae6fdc
PA
77462010-03-14 Pedro Alves <pedro@codesourcery.com>
7747
7748 * linux-low.c (linux_write_memory): Bail out early if peeking
7749 memory failed.
7750
c3adc08c
PA
77512010-03-14 Pedro Alves <pedro@codesourcery.com>
7752
7753 * linux-low.h (struct lwp_info): New fields
7754 `stopped_by_watchpoint' and `stopped_data_address'.
7755 * linux-low.c (linux_wait_for_lwp): Check for watchpoint triggers
7756 here, and cache them in the lwp object.
7757 (wait_for_sigstop): Check stopped_by_watchpoint lwp field
7758 directly.
7759 (linux_resume_one_lwp): Clear the lwp's stopped_by_watchpoint
7760 field.
7761 (linux_stopped_by_watchpoint): Rewrite.
7762 (linux_stopped_data_address): Rewrite.
7763
bce522a2
PA
77642010-03-06 Simo Melenius <simo.melenius@iki.fi>
7765
7766 * linux-low.c (linux_wait_for_lwp): Fetch the regcache after
7767 switching the current inferior, not before.
7768
90884b2b
L
77692010-03-01 H.J. Lu <hongjiu.lu@intel.com>
7770
7771 * Makefile.in (clean): Replace reg-i386.c, reg-x86-64.c,
7772 reg-i386-linux.c and reg-x86-64-linux.c with i386.c, amd64.c,
7773 i386-linux.c and amd64-linux.c.
7774 (reg-i386.o): Removed.
7775 (reg-i386.c): Likewise.
7776 (reg-i386-linux.o): Likewise.
7777 (reg-i386-linux.c): Likewise.
7778 (reg-x86-64.o): Likewise.
7779 (reg-x86-64.c): Likewise.
7780 (reg-x86-64-linux.o): Likewise.
7781 (reg-x86-64-linux.c): Likewise.
7782 (i386.o): New.
7783 (i386.c): Likewise.
7784 (i386-linux.o): Likewise.
7785 (i386-linux.c): Likewise.
7786 (amd64.o): Likewise.
7787 (amd64.c): Likewise.
7788 (amd64-linux.o): Likewise.
7789 (amd64-linux.c): Likewise.
7790
7791 * configure.srv (srv_i386_regobj): New.
7792 (srv_i386_linux_regobj): Likewise.
7793 (srv_amd64_regobj): Likewise.
7794 (srv_amd64_linux_regobj): Likewise.
7795 (srv_i386_32bit_xmlfiles): Likewise.
7796 (srv_i386_64bit_xmlfiles): Likewise.
7797 (srv_i386_xmlfiles): Likewise.
7798 (srv_amd64_xmlfiles): Likewise.
7799 (srv_i386_linux_xmlfiles): Likewise.
7800 (srv_amd64_linux_xmlfiles): Likewise.
7801 (i[34567]86-*-cygwin*): Set srv_regobj to $srv_i386_regobj. Set
7802 srv_xmlfiles to $srv_i386_xmlfiles.
7803 (i[34567]86-*-mingw32ce*): Likewise.
7804 (i[34567]86-*-mingw*): Likewise.
7805 (i[34567]86-*-nto*): Likewise.
7806 (i[34567]86-*-linux*): Set srv_regobj to $srv_i386_linux_regobj
7807 and $srv_amd64_linux_regobj. Set srv_xmlfiles to
7808 $srv_i386_linux_xmlfiles and $srv_amd64_linux_xmlfiles.
7809 (x86_64-*-linux*): Likewise.
7810
7811 * linux-x86-low.c (init_registers_x86_64_linux): Removed.
7812 (init_registers_amd64_linux): New.
7813 (x86_arch_setup): Replace init_registers_x86_64_linux with
7814 init_registers_amd64_linux.
7815
193f13e6
MK
78162010-02-23 Maxim Kuvyrkov <maxim@codesourcery.com>
7817
7818 * configure.ac: Check for libdl. If it is not available link against
7819 static libthread_db.
7820 * configure: Regenerate.
7821
85d721b8
PA
78222010-02-22 Pedro Alves <pedro@codesourcery.com>
7823
7824 PR9605
7825
7826 * i386-low.c (i386_length_and_rw_bits): Throw a fatal error if
7827 handing a read watchpoint.
7828 (i386_low_insert_watchpoint): Read watchpoints aren't supported.
7829
6076632b
DE
78302010-02-12 Doug Evans <dje@google.com>
7831
7832 * linux-low.c (linux_supports_tracefork_flag): Document.
7833 (linux_look_up_symbols): Add comment.
7834
3327ccf7
L
78352010-02-03 H.J. Lu <hongjiu.lu@intel.com>
7836
7837 * regcache.c (supply_register): Clear regcache if buf is NULL.
7838
0718675c 78392010-02-02 Nicolas Roche <roche@sourceware.org>
3327ccf7 7840 Joel Brobecker <brobecker@adacore.com>
0718675c
JB
7841
7842 * inferiors.c (find_inferior): Add function documentation.
7843 (unloaded_dll): Handle the case where the unloaded dll has not
7844 been previously registered in the dll list.
7845
177321bd
DJ
78462010-02-01 Daniel Jacobowitz <dan@codesourcery.com>
7847
7848 * linux-arm-low.c (thumb_breakpoint_len): Delete.
7849 (thumb2_breakpoint): New.
7850 (arm_breakpoint_at): Check for Thumb-2 breakpoints.
7851
2b009048
DJ
78522010-01-29 Daniel Jacobowitz <dan@codesourcery.com>
7853
7854 * linux-low.c (get_stop_pc): Check for SIGTRAP.
7855 (linux_wait_for_event_1): Handle SIGILL and SIGSEGV as possible
7856 breakpoints.
7857
3be029c7
PA
78582010-01-21 Pedro Alves <pedro@codesourcery.com>
7859
7860 * linux-ppc-low.c (ppc_arch_setup): Adjust to regcache changes.
7861
18f5de3b
JK
78622010-01-21 Jan Kratochvil <jan.kratochvil@redhat.com>
7863
7864 * linux-s390-low.c (s390_collect_ptrace_register)
7865 (s390_supply_ptrace_register): Adjust it for the new regcache parameter.
7866
3743bb4f
DE
78672010-01-21 Doug Evans <dje@google.com>
7868
14ce3065
DE
7869 * linux-low.c (PTRACE_ARG3_TYPE): Change from long to void*.
7870 (PTRACE_ARG4_TYPE): New macro.
7871 (handle_extended_wait): Cast ptrace arg4 to PTRACE_ARG4_TYPE.
7872 (linux_wait_for_event_1, linux_resume_one_lwp): Ditto.
7873 (fetch_register): Cast to uintptr_t before casting to PTRACE_ARG3_TYPE.
7874 (usr_store_inferior_registers): Ditto.
7875 (linux_read_memory, linux_write_memory): Ditto.
7876 (linux_test_for_tracefork): Ditto.
7877
3743bb4f
DE
7878 * linux-arm-low.c: Remove redundant include of gdb_proc_service.h.
7879 Only include elf.h if gdb_proc_service.h didn't include linux/elf.h.
7880
8b315be5
PA
78812010-01-21 Pedro Alves <pedro@codesourcery.com>
7882
7883 * proc-service.c (ps_lgetregs): Don't refetch registers from the
7884 target.
7885
85492558
PA
78862010-01-21 Pedro Alves <pedro@codesourcery.com>
7887
7888 * spu-low.c (spu_fetch_registers, spu_store_registers): Change
7889 prototype to take a regcache. Adjust.
7890
442ea881
PA
78912010-01-20 Pedro Alves <pedro@codesourcery.com>
7892
7893 * regcache.h (struct thread_info): Forward declare.
7894 (struct regcache): New.
7895 (new_register_cache): Adjust prototype.
7896 (get_thread_regcache): Declare.
7897 (free_register_cache): Adjust prototype.
7898 (registers_to_string, registers_from_string): Ditto.
7899 (supply_register, supply_register_by_name, collect_register)
7900 (collect_register_as_string, collect_register_by_name): Ditto.
7901 * regcache.c (struct inferior_regcache_data): Delete.
7902 (get_regcache): Rename to ...
7903 (get_thread_regcache): ... this. Adjust. Switch inferior before
7904 fetching registers.
7905 (regcache_invalidate_one): Adjust.
7906 (regcache_invalidate): Fix prototype.
7907 (new_register_cache): Return the new register cache.
7908 (free_register_cache): Change prototype.
7909 (realloc_register_cache): Adjust.
7910 (registers_to_string): Change prototype to take a regcache. Adjust.
7911 (registers_from_string): Ditto.
7912 (register_data): Ditto.
7913 (supply_register): Ditto.
7914 (supply_register_by_name): Ditto.
7915 (collect_register): Ditto.
7916 (collect_register_as_string): Ditto.
7917 (collect_register_by_name): Ditto.
7918 * server.c (process_serial_event): Adjust.
7919 * linux-low.h (regset_fill_func, regset_store_func): Change
7920 prototype.
7921 (get_pc, set_pc, collect_ptrace_register, supply_ptrace_register):
7922 Change prototype.
7923 * linux-low.c (get_stop_pc): Adjust.
7924 (check_removed_breakpoint): Adjust.
7925 (linux_wait_for_event): Adjust.
7926 (linux_resume_one_lwp): Adjust.
7927 (fetch_register): Add regcache parameter. Adjust.
7928 (usr_store_inferior_registers): Ditto.
7929 (regsets_fetch_inferior_registers): Ditto.
7930 (regsets_store_inferior_registers): Ditto.
7931 (linux_fetch_registers, linux_store_registers): Ditto.
7932 * i387-fp.c (i387_cache_to_fsave): Change prototype to take a
7933 regcache. Adjust.
43aaf8b6
PA
7934 (i387_fsave_to_cache, i387_cache_to_fxsave, i387_fxsave_to_cache):
7935 Ditto.
442ea881
PA
7936 * i387-fp.h (i387_cache_to_fsave, i387_fsave_to_cache): Change
7937 prototype to take a regcache.
7938 (i387_cache_to_fxsave, i387_fxsave_to_cache): Ditto.
7939 * remote-utils.c (convert_ascii_to_int, outreg)
7940 (prepare_resume_reply): Change prototype to take a regcache.
7941 Adjust.
7942 * target.h (struct target_ops) <fetch_registers, store_registers>:
7943 Change prototype to take a regcache.
7944 (fetch_inferior_registers, store_inferior_registers): Change
7945 prototype to take a regcache. Adjust.
7946 * proc-service.c (ps_lgetregs): Adjust.
7947 * linux-x86-low.c (x86_fill_gregset, x86_store_gregset)
7948 (x86_fill_fpregset, x86_store_fpregset, x86_fill_fpxregset)
7949 (x86_store_fpxregset, x86_get_pc, x86_set_pc): Change prototype to
7950 take a regcache. Adjust.
7951 * linux-arm-low.c (arm_fill_gregset, arm_store_gregset)
7952 (arm_fill_wmmxregset, arm_store_wmmxregset, arm_fill_vfpregset)
7953 (arm_store_vfpregset, arm_get_pc, arm_set_pc):
7954 (arm_breakpoint_at): Change prototype to take a regcache. Adjust.
7955 * linux-cris-low.c (cris_get_pc, cris_set_pc)
7956 (cris_cannot_fetch_register):
7957 (cris_breakpoint_at): Change prototype to take a regcache.
7958 Adjust.
7959 * linux-crisv32-low.c (cris_get_pc, cris_set_pc,
7960 cris_reinsert_addr, cris_write_data_breakpoint): Change prototype
7961 to take a regcache. Adjust.
7962 (cris_breakpoint_at, cris_insert_point, cris_remove_point):
7963 Adjust.
7964 * linux-m32r-low.c (m32r_get_pc, m32r_set_pc): Change prototype to
7965 take a regcache. Adjust.
7966 * linux-m68k-low.c (m68k_fill_gregset, m68k_store_gregset)
7967 (m68k_fill_fpregset, m68k_store_fpregset, m68k_get_pc,
7968 (m68k_set_pc): Change prototype to take a regcache. Adjust.
7969 * linux-mips-low.c (mips_get_pc):
7970 (mips_set_pc): Change prototype to take a regcache. Adjust.
7971 (mips_reinsert_addr): Adjust.
7972 (mips_collect_register): Change prototype to take a regcache.
7973 Adjust.
7974 (mips_supply_register):
7975 (mips_collect_register_32bit, mips_supply_register_32bit)
7976 (mips_fill_gregset, mips_store_gregset, mips_fill_fpregset)
7977 (mips_store_fpregset): Ditto.
43aaf8b6
PA
7978 * linux-ppc-low.c (ppc_supply_ptrace_register)
7979 (ppc_supply_ptrace_register): Ditto.
442ea881
PA
7980 (parse_spufs_run): Adjust.
7981 (ppc_get_pc, ppc_set_pc, ppc_fill_gregset, ppc_fill_vsxregset)
7982 (ppc_store_vsxregset, ppc_fill_vrregset, ppc_store_vrregset)
7983 (ppc_fill_evrregset, ppc_store_evrregset): Change prototype to
7984 take a regcache. Adjust.
7985 * linux-s390-low.c (s390_collect_ptrace_register)
7986 (s390_supply_ptrace_register, s390_fill_gregset, s390_get_pc)
7987 (s390_set_pc): Change prototype to take a regcache. Adjust.
7988 (s390_arch_setup): Adjust.
7989 * linux-sh-low.c (sh_get_pc, sh_breakpoint_at)
7990 (sh_fill_gregset): Change prototype to take a regcache. Adjust.
7991 * linux-sparc-low.c (sparc_fill_gregset_to_stack)
7992 (sparc_fill_gregset, sparc_store_gregset_from_stack)
7993 (sparc_store_gregset, sparc_get_pc): Change prototype to take a
7994 regcache. Adjust.
7995 (sparc_breakpoint_at): Adjust.
7996 * linux-xtensa-low.c (xtensa_fill_gregset):
7997 (xtensa_store_gregset):
7998 (xtensa_fill_xtregset, xtensa_store_xtregset, xtensa_get_pc)
7999 (xtensa_set_pc): Change prototype to take a regcache. Adjust.
8000 * nto-low.c (nto_fetch_registers, nto_store_registers): Change
8001 prototype to take a regcache. Adjust.
8002 * win32-arm-low.c (arm_fetch_inferior_register)
8003 (arm_store_inferior_register): Change prototype to take a
8004 regcache. Adjust.
8005 * win32-i386-low.c (i386_fetch_inferior_register)
8006 (i386_store_inferior_register): Change prototype to take a
8007 regcache. Adjust.
8008 * win32-low.c (child_fetch_inferior_registers)
8009 (child_store_inferior_registers): Change prototype to take a
8010 regcache. Adjust.
8011 (win32_wait): Adjust.
8012 (win32_fetch_inferior_registers): Change prototype to take a
8013 regcache. Adjust.
8014 (win32_store_inferior_registers): Adjust.
8015 * win32-low.h (struct win32_target_ops) <fetch_inferior_register,
8016 store_inferior_register>: Change prototype to take a regcache.
8017
60c3d7b0
DE
80182010-01-20 Doug Evans <dje@google.com>
8019
8020 * linux-low.c (linux_create_inferior): Wrap use of __SIGRTMIN in
8021 #ifdef.
8022 (linux_wait_for_event1, linux_init_signals): Ditto.
ec8ebe72 8023 (W_STOPCODE): Provide definition if missing.
60c3d7b0 8024
dc146f7c
VP
80252010-01-13 Vladimir Prus <vladimir@codesourcery.com>
8026
8027 * linux-low.c (linux_core_of_thread): New.
8028 (compare_ints, show_process, list_threads): New.
8029 (linux_qxfer_osdata): Report threads and cores.
8030 (linux_target_op): Register linux_core_of_thread.
8031 * remote-utils.c (prepare_resume_reply): Report the core.
8032 (buffer_xml_printf): Support %d specifier.
8033 * server.c (handle_threads_qxfer_proper, handle_threads_qxfer):
8034 New.
8035 (handle_query): Handle qXfer:threads. Announce availability
8036 thereof.
8037 * target.h (struct target_ops): New field core_of_thread.
8038
7803799a
UW
80392010-01-04 Ulrich Weigand <uweigand@de.ibm.com>
8040
8041 * Makefile.in (clean): Remove new generated files.
8042 (reg-s390.o, reg-s390.c): Remove rules.
8043 (reg-s390x.o, reg-s390x.c): Likewise.
8044 (s390-linux32.o, s390-linux32.c): Add rules.
8045 (s390-linux64.o, s390-linux64.c): Likewise.
8046 (s390x-linux64.o, s390x-linux64.c): Likewise.
8047 * configure.srv (s390*-*-linux*): Update srv_regobj and srv_xmlfiles.
8048 * linux-s390-low.c: Include <elf.h>.
8049 (HWCAP_S390_HIGH_GPRS): Define if undefined.
8050 (init_registers_s390): Remove prototype.
8051 (init_registers_s390x): Likewise.
8052 (init_registers_s390_linux32): Add prototype.
8053 (init_registers_s390_linux64): Likewise.
8054 (init_registers_s390x_linux64): Likewise.
8055 (s390_num_regs_3264): New define.
8056 (s390_regmap_3264): New global variable.
8057 (s390_cannot_fetch_register): Remove obsolete check.
8058 (s390_cannot_store_register): Likewise.
8059 (s390_collect_ptrace_register): Handle upper/lower register halves.
8060 (s390_supply_ptrace_register): Likewise.
8061 (s390_fill_gregset): Update to register number changes.
8062 (s390_get_hwcap): New routine.
8063 (s390_arch_setup): Detect 32-bit process running on 64-bit system.
8064 Install appropriate regmap and register set.
8065
6e7ffa39
JB
80662010-01-01 Joel Brobecker <brobecker@adacore.com>
8067
8068 * server.c (gdbserver_version): Update copyright year to 2010.
8069 * gdbreplay.c (gdbreplay_version): Likewise.
8070
957f3f49
DE
80712009-12-28 Doug Evans <dje@google.com>
8072
8073 * linux-low.c: Delete inclusion of ansidecl.h, elf/common.h,
8074 elf/external.h. Include <elf.h> instead but only if necessary.
8075
ca5c370d
PA
80762009-12-28 Pedro Alves <pedro@codesourcery.com>
8077
8078 * linux-low.c (linux_remove_process): Remove `detaching'
8079 parameter. Don't release/detach from thread_db here.
8080 (linux_kill): Release/detach from thread_db here, ...
8081 (linux_detach): ... and here, before actually detaching.
8082 (linux_wait_1): ... and here, when a process exits.
8083 * thread-db.c (any_thread_of): New.
8084 (thread_db_free): Switch the current inferior to a thread of the
8085 passed in process.
8086
4ee62156
DE
80872009-12-21 Doug Evans <dje@google.com>
8088
d90e6a88
DE
8089 * linux-x86-low.c: Delete outdated comment about Elf32_Phdr.
8090
c5f62d5f
DE
8091 * linux-low.c (kill_lwp): Use __NR_tkill instead of SYS_tkill.
8092 Move definition of tkill_failed to ifdef __NR_tkill to avoid gcc
8093 warning ifndef __NR_tkill. Move setting of errno there too.
8094 Delete unnecessary resetting of errno after syscall.
8095 Minor comment changes to match gdb/linux-nat.c:kill_lwp.
8096
10e86dd7
DE
8097 * configure.ac: Check for dladdr.
8098 * config.in: Regenerate.
8099 * configure: Regenerate.
8100 * thread-db.c (dladdr_to_soname): Only define ifdef HAVE_DLADDR.
8101 (try_thread_db_load): Update.
8102
4ee62156
DE
8103 * linux-low.c (my_waitpid): Delete unnecessary prototype.
8104
00f515da
DE
81052009-12-18 Doug Evans <dje@google.com>
8106
e9464885
DE
8107 * event-loop.c: Include unistd.h if it exists.
8108
07d4f67e
DE
8109 * linux-low.c (my_waitpid): Move definition away from being in
8110 between linux_tracefork_child/linux_test_for_tracefork.
8111
00f515da
DE
8112 * gdb_proc_service.h (psaddr_t): Fix type.
8113 * thread-db.c (thread_db_info.td_thr_tls_get_addr_p): Fix
8114 signature to match glibc.
8115
1de1badb
DE
81162009-12-16 Doug Evans <dje@google.com>
8117
8118 * linux-low.c (linux_read_memory): Fix argument to read.
8119
aeeb81d1
PA
81202009-11-26 Pedro Alves <pedro@codesourcery.com>
8121
8122 * win32-low.c (get_child_debug_event): On EXIT_THREAD_DEBUG_EVENT
8123 events, don't leave current_inferior pointing at null.
8124
10357975
PA
81252009-11-26 Pedro Alves <pedro@codesourcery.com>
8126
8127 * win32-low.c (LOG): Delete.
8128 (OUTMSG): Output to stderr.
8129 (OUTMSG2): Conditionalize on `debug_threads' variable, instead of
8130 on compile time LOG macro.
8131 (win32_wait): Fix debug output.
8132
cf6e3471
PA
81332009-11-26 Pedro Alves <pedro@codesourcery.com>
8134
8135 * win32-low.c (win32_add_one_solib): If the dll name is
8136 "ntdll.dll", prepend the system directory to the dll path.
8137
0c85e18e
MK
81382009-11-17 Daniel Jacobowitz <dan@codesourcery.com>
8139
8140 * m68k-tdep.c (m68k_gdbarch_init): Reuse previous initialization.
8141
9ac544ce 81422009-11-17 Nathan Sidwell <nathan@codesourcery.com>
889bf7c5 8143 Vladimir Prus <vladimir@codesourcery.com>
9ac544ce
MK
8144
8145 * Makefile.in (reg-cf.o, reg-cf.c): New targets.
8146 * configure.ac: Check for __mcoldfire__ and set
8147 gdb_cv_m68k_is_coldfire.
8148 * configure.srv: Use gdb_cv_m68k_is_coldfire to select between
8149 reg-cf.o and reg-m68k.o.
8150 * configure: Regenerated.
8151
fd7dd3e6
PA
81522009-11-16 Pedro Alves <pedro@codesourcery.com>
8153
8154 * linux-low.c (linux_remove_process): Add `detaching' parameter.
8155 Pass it to thread_db_free.
8156 (linux_kill, linux_detach, linux_wait_1): Adjust to pass the
8157 proper `detaching' argument to linux_remove_process.
8158 * linux-low.h (thread_db_free): Add `detaching' parameter.
8159 * thread-db.c (thread_db_init): Pass false as `detaching' argument
8160 to thread_db_free.
8161 (thread_db_free): Add `detaching' parameter. Only
8162 call td_ta_clear_event if detaching from process.
8163
75aa492e
MK
81642009-11-12 Maxim Kuvyrkov <maxim@codesourcery.com>
8165
8166 * thread-db.c (thread_db_free): Fix typo.
8167
21e1bee4
PP
81682009-11-11 Paul Pluzhnikov <ppluzhnikov@google.com>
8169
8170 PR gdb/10838
8171 * thread-db.c (thread_db_free): Call td_ta_clear_event.
8172
8838b45e
NS
81732009-11-03 Nathan Sidwell <nathan@codesourcery.com>
8174
8175 * configure.ac (i[34567]86-*): Check if we're targetting x86-64
8176 with an i686 compiler.
8177 * configure.srv (i[34567]86-*-linux*): Pull in x86-64 handling if
8178 needed.
8179 * configure: Rebuilt.
8180
8a35fb51
SL
81812009-10-29 Sandra Loosemore <sandra@codesourcery.com>
8182
8183 PR gdb/10783
8184
8185 * server.c (handle_search_memory_1): Correct read_addr initialization
8186 in loop for searching subsequent chunks.
8187
96f15937
PP
81882009-10-29 Paul Pluzhnikov <ppluzhnikov@google.com>
8189
8190 * configure.ac: New --with-libthread-db option.
8191 * thread-db.c: Allow direct dependence on libthread_db.
8192 (thread_db_free): Adjust.
8193 * config.in: Regenerate.
8194 * configure: Likewise.
889bf7c5 8195
5f7d1694
PP
81962009-10-28 Paul Pluzhnikov <ppluzhnikov@google.com>
8197
8198 PR gdb/10757
8199 * thread-db.c (attach_thread): New function.
8200 (maybe_attach_thread): Return success/failure.
8201 (find_new_threads_callback): Adjust.
889bf7c5
PA
8202 (thread_db_find_new_threads): Loop until no new threads.
8203
88e3b899
PA
82042009-10-13 Pedro Alves <pedro@codesourcery.com>
8205
8206 * proc-service.c (ps_lgetregs): Formatting.
8207
cdbfd419
PP
82082009-10-08 Paul Pluzhnikov <ppluzhnikov@google.com>
8209
8210 * acinclude.m4: (SRV_CHECK_THREAD_DB, SRV_CHECK_TLS_GET_ADDR): Remove.
8211 * configure.ac: Adjust.
8212 * linux-low.h (struct process_info_private): Move members to struct
8213 thread_db.
8214 (thread_db_free, thread_db_handle_monitor_command): New prototype.
8215 * linux-low.c (linux_remove_process): Adjust.
8216 (linux_wait_for_event_1, linux_look_up_symbols): Likewise.
8217 * server.c (handle_query): Move code ...
8218 (handle_monitor_command): ... here. New function.
8219 * target.h (struct target_ops): New member.
8220 * thread-db.c (struct thread_db): New.
8221 (libthread_db_search_path): New variable.
8222 (thread_db_create_event, thread_db_enable_reporting)
8223 (find_one_thread, maybe_attach_thread, find_new_threads_callback)
8224 (thread_db_find_new_threads, (thread_db_get_tls_address): Adjust.
8225 (try_thread_db_load_1, dladdr_to_soname): New functions.
8226 (try_thread_db_load, thread_db_load_search): New functions.
8227 (thread_db_init): Search for libthread_db.
8228 (thread_db_free): New function.
8229 (thread_db_handle_monitor_command): Likewise.
8230 * config.in: Regenerate.
8231 * configure: Regenerate.
889bf7c5 8232
4168d2d6
UW
82332009-09-27 Ulrich Weigand <uweigand@de.ibm.com>
8234
8235 * spu-low.c (spu_kill): Wait for inferior to terminate.
8236 Call clear_inferiors.
8237 (spu_detach): Call clear_inferiors.
8238
81ecdfbb
RW
82392009-08-22 Ralf Wildenhues <Ralf.Wildenhues@gmx.de>
8240
8241 * aclocal.m4: Regenerate.
8242 * config.in: Likewise.
8243 * configure: Likewise.
8244
0b9ff2c0
UW
82452009-07-31 Ulrich Weigand <uweigand@de.ibm.com>
8246
8247 * linux-ppc-low.c (INSTR_SC, NR_spu_run): Define.
8248 (parse_spufs_run): New function.
8249 (ppc_get_pc, ppc_set_pc): Detect and handle SPU PC.
8250 (ppc_breakpoint_at): Handle SPU breakpoints.
8251
efcbbd14
UW
82522009-07-31 Ulrich Weigand <uweigand@de.ibm.com>
8253
8254 * linux-low.c: Include <sys/stat.h> and <sys/vfs.h>.
8255 (SPUFS_MAGIC): Define.
8256 (spu_enumerate_spu_ids): New function.
8257 (linux_qxfer_spu): New function.
8258 (linux_target_ops): Install linux_qxfer_spu.
8259
f4d9bade
UW
82602009-07-31 Ulrich Weigand <uweigand@de.ibm.com>
8261
8262 * configure.srv (powerpc*-*-linux*): Add powerpc-cell32l.o
8263 and powerpc-cell64l.o to srv_regobj. Add rs6000/powerpc-cell32l.xml
8264 and rs6000/powerpc-cell64l.xml to srv_xmlfiles.
8265 * Makefile.in (powerpc-cell32l.o, powerpc-cell32l.c): New rules.
8266 (powerpc-cell64l.o, powerpc-cell64l.c): Likewise.
8267 (clean): Handle powerpc-cell32l.c and powerpc-cell64l.c.
8268 * linux-ppc-low.c (PPC_FEATURE_CELL): Define.
8269 (init_registers_powerpc_cell32l): Add prototype.
8270 (init_registers_powerpc_cell64l): Likewise.
8271 (ppc_arch_setup): Detect Cell/B.E. architecture.
8272
96e946ca
RW
82732009-07-30 Ralf Wildenhues <Ralf.Wildenhues@gmx.de>
8274
8275 * Makefile.in (datarootdir): New variable.
8276
58d6951d
DJ
82772009-07-28 Daniel Jacobowitz <dan@codesourcery.com>
8278
8279 * linux-low.c (linux_write_memory): Update debugging output.
8280 * Makefile.in (clean): Add new descriptions.
8281 (arm-with-vfpv2.o, arm-with-vfpv2.c, arm-with-vfpv3.o)
8282 (arm-with-vfpv3.c, arm-with-neon.o, arm-with-neon.c): New rules.
8283 * configure.srv: Add new files for arm*-*-linux*.
8284 * linux-arm-low.c: Add new declarations.
8285 (PTRACE_GETVFPREGS, PTRACE_SETVFPREGS): Define if undefined.
8286 (arm_hwcap, HWCAP_VFP, HWCAP_IWMMXT, HWCAP_NEON, HWCAP_VFPv3)
8287 (HWCAP_VFPv3D16): New.
8288 (arm_fill_wmmxregset, arm_store_wmmxregset): Check HWCAP_IWMMXT
8289 instead of __IWMMXT__.
8290 (arm_fill_vfpregset, arm_store_vfpregset, arm_get_hwcap)
8291 (arm_arch_setup): New.
8292 (target_regsets): Remove #ifdef. Add VFP regset.
8293 (the_low_target): Use arm_arch_setup.
8294
12b42a12
DJ
82952009-07-28 Daniel Jacobowitz <dan@codesourcery.com>
8296
8297 * linux-low.c (linux_kill_one_lwp): Adjust kernel workaround to skip
8298 the main thread again.
8299
ac8c974e
AR
83002009-07-06 Aleksandar Ristovski <aristovski@qnx.com>
8301
8302 Adding Neutrino gdbserver.
8303 * configure: Regenerated.
8304 * configure.ac: Add case for srv_qnx and set LIBS accordingly.
8305 * configure.srv (i[34567]86-*-nto*): New target.
8306 * nto-low.c, nto-low.h, nto-x86-low.c: New files.
8307 * remote-utils.c [__QNX__]: Include sys/iomgr.h
8308 (nto_comctrl) [__QNX__]: New function.
8309 (enable_async_io, disable_async_io) [__QNX__]: Call nto_comctrl.
8310
4424e0c3 83112009-07-05 Danny Backx <dannybackx@users.sourceforge.net>
7437790a
PA
8312
8313 * configure.srv (i[34567]86-*-mingw32ce*): Add i386-low.o to
8314 srv_tgtobj.
8315
912cf4ba
PA
83162009-07-04 Danny Backx <dannybackx@users.sourceforge.net>
8317 Pedro Alves <pedro@codesourcery.com>
8318
8319 * win32-i386-low.c (i386_get_thread_context): Handle systems that
8320 don't support CONTEXT_EXTENDED_REGISTERS.
8321 (i386_win32_breakpoint, i386_win32_breakpoint_len): New.
8322 (the_low_target): Install them.
8323 * win32-low.c (get_child_debug_event): Handle WaitForDebugEvent
8324 failing with ERROR_PIPE_NOT_CONNECTED.
8325
aa5ca48f
DE
83262009-06-30 Doug Evans <dje@google.com>
8327 Pierre Muller <muller@ics.u-strasbg.fr>
8328
8329 Add h/w watchpoint support to x86-linux, win32-i386.
8330 * Makefile.in (SFILES): Add i386-low.c
8331 (i386_low_h): Define.
8332 (i386-low.o): Add dependencies.
8333 (linux-x86-low.o): Add i386-low.h dependency.
8334 (win32-i386-low.o): Ditto.
8335 * i386-low.c: New file.
8336 * i386-low.h: New file.
8337 * configure.srv (i[34567]86-*-cygwin*): Add i386-low.o to srv_tgtobj.
8338 (i[34567]86-*-linux*, i[34567]86-*-mingw*, x86_64-*-linux*): Ditto.
8339 * linux-low.c (linux_add_process): Initialize arch_private.
8340 (linux_remove_process): Free arch_private.
8341 (add_lwp): Initialize arch_private.
8342 (delete_lwp): Free arch_private.
8343 (linux_resume_one_lwp): Call the_low_target.prepare_to_resume if
8344 provided.
8345 * linux-low.h (process_info_private): New member arch_private.
8346 (lwp_info): New member arch_private.
8347 (linux_target_ops): New members new_process, new_thread,
8348 prepare_to_resume.
8349 (ptid_of): New macro.
8350 * linux-x86-low.c: Include stddef.h, i386-low.h.
8351 (arch_process_info): New struct.
8352 (arch_lwp_info): New struct.
8353 (x86_linux_dr_get, x86_linux_dr_set): New functions.
8354 (i386_dr_low_set_addr, i386_dr_low_set_control): New functions.
8355 (i386_dr_low_get_status): New function.
8356 (x86_insert_point, x86_remove_point): New functions.
8357 (x86_stopped_by_watchpoint): New function.
8358 (x86_stopped_data_address): New function.
8359 (x86_linux_new_process, x86_linux_new_thread): New functions.
8360 (x86_linux_prepare_to_resume): New function.
8361 (the_low_target): Add entries for insert_point, remove_point,
8362 stopped_by_watchpoint, stopped_data_address, new_process, new_thread,
8363 prepare_to_resume.
8364 * server.c (debug_hw_points): New global.
8365 (monitor_show_help): Document set debug-hw-points.
8366 (handle_query): Process "set debug-hw-points".
8367 * server.h (debug_hw_points): Declare.
8368 (paddress): Declare.
8369 * utils.c (NUMCELLS, CELLSIZE): New macros.
8370 (get_sell, xsnprintf, paddress): New functions.
8371 * win32-arm-low.c (the_low_target): Add entries for insert_point,
8372 remove_point, stopped_by_watchpoint, stopped_data_address.
8373 * win32-i386-low.c: Include i386-low.h.
8374 (debug_reg_state): Replaces dr.
8375 (i386_dr_low_set_addr, i386_dr_low_set_control): New functions.
8376 (i386_dr_low_get_status): New function.
8377 (i386_insert_point, i386_remove_point): New functions.
8378 (i386_stopped_by_watchpoint): New function.
8379 (i386_stopped_data_address): New function.
8380 (i386_initial_stuff): Update.
8381 (get_thread_context,set_thread_context,i386_thread_added): Update.
8382 (the_low_target): Add entries for insert_point,
8383 remove_point, stopped_by_watchpoint, stopped_data_address.
8384 * win32-low.c (win32_insert_watchpoint): New function.
8385 (win32_remove_watchpoint): New function.
8386 (win32_stopped_by_watchpoint): New function.
8387 (win32_stopped_data_address): New function.
8388 (win32_target_ops): Add entries for insert_watchpoint,
8389 remove_watchpoint, stopped_by_watchpoint, stopped_data_address.
8390 * win32-low.h (win32_target_ops): New members insert_point,
8391 remove_point, stopped_by_watchpoint, stopped_data_address.
8392
d993e290
PA
83932009-06-25 Pedro Alves <pedro@codesourcery.com>
8394
8395 * server.c (process_serial_event): Re-return unsupported, not
8396 error, if the type isn't recognized. Re-allow supporting only
8397 insert or remove packets. Also call require_running for
8398 breakpoints. Add missing break statement to default case. Tidy.
8399 * target.h (struct target_ops): Rename insert_watchpoint to
8400 insert_point, and remove_watchpoint to remove_point.
8401
8402 * linux-low.h (struct linux_target_ops): Likewise.
8403 * linux-low.c (linux_insert_watchpoint): Rename to ...
8404 (linux_insert_point): ... this. Adjust.
8405 (linux_remove_watchpoint): Rename to ...
8406 (linux_remove_point): ... this. Adjust.
8407 (linux_target_ops): Adjust.
8408 * linux-crisv32-low.c (cris_insert_watchpoint): Rename to ...
8409 (cris_insert_point): ... this.
8410 (cris_remove_watchpoint): Rename to ...
8411 (cris_remove_point): ... this.
8412 (the_low_target): Adjust.
8413
0f54c268
PM
84142009-06-24 Pierre Muller <muller@ics.u-strasbg.fr>
8415
8416 * server.c (handle_v_kill): Pass signal_pid to
8417 kill_inferior if multi_process is zero.
8418
c6314022
AR
84192009-06-23 Aleksandar Ristovski <aristovski@qnx.com>
8420
8421 * server.c (process_serial_event): Add support for Z0 and Z1 packet.
8422 * target.h (target_ops): Comment for *_watchpoint to make it clear
8423 the functions can get types '0' and '1'.
8424
4463ce24
AR
84252009-06-22 Aleksandar Ristovski <aristovski@qnx.com>
8426
8427 * linux-low.c (usr_fetch_inferior_registers): Remove check for regno 0.
8428 * proc-service.c (ps_lgetregs): Pass -1 to fetch all registers.
8429 * regcache.c (get_regcache): Likewise.
8430 * spu-low.c (spu_fetch_registers): Remove 0 to -1 conversion.
8431 * win32-low.c (child_fetch_inferior_registers): Remove check for
8432 regno 0.
8433
cf8fd78b
PA
84342009-06-19 Aleksandar Ristovski <aristovski@qnx.com>
8435 Pedro Alves <pedro@codesourcery.com>
8436
8437 * target.h (struct target_ops) <supports_multi_process>: New
8438 callback.
8439 (target_supports_multi_process): New.
8440 * server.c (handle_query): Even if GDB reports support, only
8441 enable multi-process if the target also supports it. Report
8442 multi-process support only if the target backend supports it.
8443 * linux-low.c (linux_supports_multi_process): New function.
8444 (linux_target_ops): Install it as target_supports_multi_process
8445 callback.
8446
47c0c975
DE
84472009-05-24 Doug Evans <dje@google.com>
8448
e09875d4
DE
8449 Global renaming of find_thread_pid to find_thread_ptid.
8450 * server.h (find_thread_ptid): Renamed from find_thread_pid.
8451 * inferiors.c (find_thread_ptid): Renamed from find_thread_pid.
8452 All callers updated.
8453
e27d73f6
DE
8454 * linux-low.c (handle_extended_wait): Use linux_resume_one_lwp
8455 to resume the newly created thread, don't call ptrace (PTRACE_CONT)
8456 directly.
8457
47c0c975
DE
8458 * linux-low.c (get_stop_pc): Print pc if debug_threads.
8459 (check_removed_breakpoint, linux_wait_for_lwp): Ditto.
8460 (linux_resume_one_lwp): Ditto.
8461
2acc282a
DE
84622009-05-23 Doug Evans <dje@google.com>
8463
8464 * linux-low.c (linux_resume_one_lwp): Change type of first arg
8465 from struct inferior_list_entry * to struct lwp_info *.
8466 All callers updated.
8467
9f1036c1
DE
84682009-05-13 Doug Evans <dje@google.com>
8469
8470 * linux-x86-low.c: Don't include assert.h.
8471 (x86_siginfo_fixup): Use fatal, not assert.
8472 (x86_arch_setup): Fix comment.
8473
d0722149
DE
84742009-05-12 Doug Evans <dje@google.com>
8475
8476 Biarch support for i386/amd64 gdbserver.
8477 * Makefile.in (SFILES): Remove linux-i386-low.c, linux-x86-64-low.c.
8478 Add linux-x86-low.c.
8479 (linux-i386-low.o, linux-x86-64-low.o): Delete.
8480 (linux-x86-low.o): Add.
8481 * linux-x86-64-low.c: Delete.
8482 * linux-i386-low.c: Delete.
8483 * linux-x86-low.c: New file.
8484 * configure.srv (i?86-linux srv_tgtobj): Replace linux-i386-low.o with
8485 linux-x86-low.o.
8486 (x86_64-linux srv_tgtobj): Replace linux-x86-64-low.o with
8487 linux-x86-low.o.
8488 (x86_64-linux srv_regobj): Add reg-i386-linux.o.
8489 * linux-low.c: Include ansidecl.h, elf/common.h, elf/external.h.
8490 (linux_child_pid_to_exec_file): New function.
8491 (elf_64_header_p, elf_64_file_p): New functions.
8492 (siginfo_fixup): New function.
8493 (linux_xfer_siginfo): New local inf_siginfo. Call siginfo_fixup to
8494 give target a chance to convert layout.
8495 * linux-low.h (linux_target_ops): New member siginfo_fixup.
8496 (linux_child_pid_to_exec_file, elf_64_file_p): Declare.
8497
fdeb2a12
DE
84982009-05-07 Doug Evans <dje@google.com>
8499
8500 * linux-low.c (regsets_fetch_inferior_registers): Fix memory leak.
8501 (regsets_store_inferior_registers): Ditto.
8502
a6dbe5df
PA
85032009-05-06 Pedro Alves <pedro@codesourcery.com>
8504
8505 PR server/10048
8506
8507 * linux-low.c (must_set_ptrace_flags): Delete.
8508 (linux_create_inferior): Set `lwp->must_set_ptrace_flags' instead
8509 of the global.
8510 (linux_attach_lwp_1): Don't set PTRACE_SETOPTIONS here. Set
8511 `lwp->must_set_ptrace_flags' instead.
ba42693b 8512 (linux_wait_for_event_1): Set ptrace options here.
a6dbe5df
PA
8513 (linux_wait_1): ... not here.
8514
5091eb23
DE
85152009-04-30 Doug Evans <dje@google.com>
8516
9f767825
DE
8517 * inferiors.c (started_inferior_callback): New function.
8518 (attached_inferior_callback): New function.
8519 (have_started_inferiors_p, have_attached_inferiors_p): New functions.
8520 * server.c (print_started_pid, print_attached_pid): New functions.
8521 (detach_or_kill_for_exit): New function.
8522 (main): Call it instead of for_each_inferior (kill_inferior_callback).
8523 * server.h (have_started_inferiors_p): Declare.
8524 (have_attached_inferiors_p): Declare.
8525
5091eb23
DE
8526 * inferiors.c (remove_process): Fix memory leak, free process.
8527 * linux-low.c (linux_remove_process): New function.
8528 (linux_kill): Call it instead of remove_process.
8529 (linux_detach, linux_wait_1): Ditto.
8530
155c8968
PA
85312009-04-19 Danny Backx <dannybackx@users.sourceforge.net>
8532
8533 * configure.srv: Add x86 Windows CE target.
8534
7fe519cb
UW
85352009-04-03 Ulrich Weigand <uweigand@de.ibm.com>
8536
8537 * inferiors.c (get_thread_process): Make global.
8538 * server.h (get_thread_process): Add prototype.
8539 * thread-db.c (find_one_thread): Use get_thread_process
8540 instead of current_process.
8541 (thread_db_get_tls_address): Do not crash if called when
8542 thread layer is not yet initialized.
8543
5472f405
UW
85442009-04-03 Ulrich Weigand <uweigand@de.ibm.com>
8545
8546 * remote-utils.c (prepare_resume_reply): Null-terminate packet.
8547 * spu-low.c (current_tid): Rename to ...
8548 (current_ptid): ... this.
8549 (fetch_ppc_register, fetch_ppc_memory, store_ppc_memory,
8550 spu_proc_xfer_spu, spu_resume, spu_request_interrupt): Use
8551 ptid_get_lwp (current_ptid) instead of current_tid.
8552 (spu_kill, spu_detach, spu_join, spu_wait): Use pid argument
8553 instead of current_tid. Use find_process_pid to verify pid
8554 argument is valid. Pass proper argument to remove_process.
8555 (spu_thread_alive): Compare current_ptid instead of current_tid.
8556 (spu_resume): Likewise.
8557
55ac2b99
PA
85582009-04-02 Pedro Alves <pedro@codesourcery.com>
8559
8560 * linux-low.c (usr_store_inferior_registers): Declare local `pid'
8561 variable.
8562
95954743
PA
85632009-04-01 Pedro Alves <pedro@codesourcery.com>
8564
8565 Implement the multiprocess extensions, and add linux multiprocess
8566 support.
8567
8568 * server.h (ULONGEST): Declare.
8569 (struct ptid, ptid_t): New.
8570 (minus_one_ptid, null_ptid): Declare.
8571 (ptid_build, pid_to_ptid, ptid_get_pid, ptid_get_lwp)
8572 (ptid_get_tid, ptid_equal, ptid_is_pid): Declare.
8573 (struct inferior_list_entry): Change `id' type from unsigned from
8574 to ptid_t.
8575 (struct sym_cache, struct breakpoint, struct
8576 process_info_private): Forward declare.
8577 (struct process_info): Declare.
8578 (current_process): Declare.
8579 (all_processes): Declare.
8580 (initialize_inferiors): Declare.
8581 (add_thread): Adjust to use ptid_t.
8582 (thread_id_to_gdb_id, thread_to_gdb_id, gdb_id_to_thread_id): Ditto.
8583 (add_process, remove_process, find_thread_pid): Declare.
8584 (find_inferior_id): Adjust to use ptid_t.
8585 (cont_thread, general_thread, step_thread): Change type to ptid_t.
8586 (multi_process): Declare.
8587 (push_event): Adjust to use ptid_t.
8588 (read_ptid, write_ptid): Declare.
8589 (prepare_resume_reply): Adjust to use ptid_t.
8590 (clear_symbol_cache): Declare.
8591 * inferiors.c (all_processes): New.
8592 (null_ptid, minus_one_ptid): New.
8593 (ptid_build, pid_to_ptid, ptid_get_pid, ptid_get_lwp)
8594 (ptid_get_tid, ptid_equal, ptid_is_pid): New.
8595 (add_thread): Change unsigned long to ptid. Remove gdb_id
8596 parameter. Adjust.
8597 (thread_id_to_gdb_id, thread_to_gdb_id): Change unsigned long to ptid.
8598 (gdb_id_to_thread): Rename to ...
8599 (find_thread_pid): ... this. Change unsigned long to ptid.
8600 (gdb_id_to_thread_id, find_inferior_id): Change unsigned long to ptid.
8601 (loaded_dll, pull_pid_from_list): Adjust.
8602 (add_process, remove_process, find_process_pid)
8603 (get_thread_process, current_process, initialize_inferiors): New.
8604 * target.h (struct thread_resume) <thread>: Change type to ptid_t.
8605 (struct target_waitstatus) <related_pid>: Ditto.
8606 (struct target_ops) <kill, detach>: Add `pid' argument. Change
8607 return type to int.
8608 (struct target_ops) <join>: Add `pid' argument.
8609 (struct target_ops) <thread_alive>: Change pid's type to ptid_t.
8610 (struct target_ops) <wait>: Add `ptid' field. Change return type
8611 to ptid.
8612 (kill_inferior, detach_inferior, join_inferior): Add `pid' argument.
8613 (mywait): Add `ptid' argument. Change return type to ptid_t.
8614 (target_pid_to_str): Declare.
8615 * target.c (set_desired_inferior): Adjust to use ptids.
8616 (mywait): Add new `ptid' argument. Adjust.
8617 (target_pid_to_str): New.
8618 * mem-break.h (free_all_breakpoints): Declare.
8619 * mem-break.c (breakpoints): Delelete.
8620 (set_breakpoint_at, delete_breakpoint, find_breakpoint_at)
8621 (check_mem_read, check_mem_write, delete_all_breakpoints): Adjust
8622 to use per-process breakpoint list.
8623 (free_all_breakpoints): New.
8624 * remote-utils.c (struct sym_cache) <name>: Drop `const'.
8625 (symbol_cache, all_symbols_looked_up): Delete.
8626 (hexchars): New.
8627 (ishex, unpack_varlen_hex, write_ptid, hex_or_minus_one,
8628 read_ptid): New.
8629 (prepare_resume_reply): Change ptid argument's type from unsigned
8630 long to ptid_t. Adjust. Implement W;process and X;process.
8631 (free_sym_cache, clear_symbol_cache): New.
8632 (look_up_one_symbol): Adjust to per-process symbol cache. *
8633 * server.c (cont_thread, general_thread, step_thread): Change type
8634 to ptid_t.
8635 (attached): Delete.
8636 (multi_process): New.
8637 (last_ptid): Change type to ptid_t.
8638 (struct vstop_notif) <ptid>: Change type to ptid_t.
8639 (queue_stop_reply, push_event): Change `ptid' argument's type to
8640 ptid_t.
8641 (discard_queued_stop_replies): Add `pid' argument.
8642 (start_inferior): Adjust to use ptids. Adjust to mywait interface
8643 changes. Don't reference the `attached' global.
8644 (attach_inferior): Adjust to mywait interface changes.
8645 (handle_query): Adjust to use ptids. Parse GDB's qSupported
8646 features. Handle and report "multiprocess+". Handle
8647 "qAttached:PID".
8648 (handle_v_cont): Adjust to use ptids. Adjust to mywait interface
8649 changes.
8650 (handle_v_kill): New.
8651 (handle_v_stopped): Adjust to use target_pid_to_str.
8652 (handle_v_requests): Allow multiple attaches and runs when
8653 multiprocess extensions are in effect. Handle "vKill".
8654 (myresume): Adjust to use ptids.
8655 (queue_stop_reply_callback): Add `arg' parameter. Handle it.
8656 (handle_status): Adjust to discard_queued_stop_replies interface
8657 change.
8658 (first_thread_of, kill_inferior_callback)
8659 (detach_or_kill_inferior_callback, join_inferiors_callback): New.
8660 (main): Call initialize_inferiors. Adjust to use ptids, killing
8661 and detaching from all inferiors. Handle multiprocess packet
8662 variants.
8663 * linux-low.h: Include gdb_proc_service.h.
8664 (struct process_info_private): New.
8665 (struct linux_target_ops) <pid_of>: Use ptid_get_pid.
8666 <lwpid_of>: Use ptid_get_lwp.
8667 (get_lwp_thread): Adjust.
8668 (struct lwp_info): Add `dead' member.
8669 (find_lwp_pid): Declare.
8670 * linux-low.c (thread_db_active): Delete.
8671 (new_inferior): Adjust comment.
8672 (inferior_pid): Delete.
8673 (linux_add_process): New.
8674 (handle_extended_wait): Adjust.
8675 (add_lwp): Change unsigned long to ptid.
8676 (linux_create_inferior): Add process to processes table. Adjust
8677 to use ptids. Don't set new_inferior here.
8678 (linux_attach_lwp): Rename to ...
8679 (linux_attach_lwp_1): ... this. Add `initial' argument. Handle
8680 it. Adjust to use ptids.
8681 (linux_attach_lwp): New.
8682 (linux_attach): Add process to processes table. Don't set
8683 new_inferior here.
8684 (struct counter): New.
8685 (second_thread_of_pid_p, last_thread_of_process_p): New.
8686 (linux_kill_one_lwp): Add `args' parameter. Handle it. Adjust to
8687 multiple processes.
8688 (linux_kill): Add `pid' argument. Handle it. Adjust to multiple
8689 processes. Remove process from process table.
8690 (linux_detach_one_lwp): Add `args' parameter. Handle it. Adjust
8691 to multiple processes.
8692 (any_thread_of): New.
8693 (linux_detach): Add `pid' argument, and handle it. Remove process
8694 from processes table.
8695 (linux_join): Add `pid' argument. Handle it.
8696 (linux_thread_alive): Change unsighed long argument to ptid_t.
8697 Consider dead lwps as not being alive.
8698 (status_pending_p): Rename `dummy' argument to `arg'. Filter out
8699 threads we're not interested in.
8700 (same_lwp, find_lwp_pid): New.
8701 (linux_wait_for_lwp): Change `pid' argument's type from int to
8702 ptid_t. Adjust.
8703 (linux_wait_for_event): Rename to ...
8704 (linux_wait_for_event_1): ... this. Change `pid' argument's type
8705 from int to ptid_t. Adjust.
8706 (linux_wait_for_event): New.
8707 (linux_wait_1): Add `ptid' argument. Change return type to
8708 ptid_t. Adjust. Use last_thread_of_process_p. Remove processes
8709 that exit from the process table.
8710 (linux_wait): Add `ptid' argument. Change return type to ptid_t.
8711 Adjust.
8712 (mark_lwp_dead): New.
8713 (wait_for_sigstop): Adjust to use ptids. If a process exits while
8714 stopping all threads, mark its main lwp as dead.
8715 (linux_set_resume_request, linux_resume_one_thread): Adjust to use
8716 ptids.
8717 (fetch_register, usr_store_inferior_registers)
8718 (regsets_fetch_inferior_registers)
8719 (regsets_store_inferior_registers, linux_read_memory)
8720 (linux_write_memory): Inline `inferior_pid'.
8721 (linux_look_up_symbols): Adjust to use per-process
8722 `thread_db_active'.
8723 (linux_request_interrupt): Adjust to use ptids.
8724 (linux_read_auxv): Inline `inferior_pid'.
8725 (initialize_low): Don't reference thread_db_active.
8726 * gdb_proc_service.h (struct ps_prochandle) <pid>: Remove.
8727 * proc-service.c (ps_lgetregs): Use find_lwp_pid.
8728 (ps_getpid): Return the pid of the current inferior.
8729 * thread-db.c (proc_handle, thread_agent): Delete.
8730 (thread_db_create_event, thread_db_enable_reporting): Adjust to
8731 per-process data.
8732 (find_one_thread): Change argument type to ptid_t. Adjust to
8733 per-process data.
8734 (maybe_attach_thread): Adjust to per-process data and ptids.
8735 (thread_db_find_new_threads): Ditto.
8736 (thread_db_init): Ditto.
8737 * spu-low.c (spu_create_inferior, spu_attach): Add process to
8738 processes table. Adjust to use ptids.
8739 (spu_kill, spu_detach): Adjust interface. Remove process from
8740 processes table.
8741 (spu_join, spu_thread_alive): Adjust interface.
8742 (spu_wait): Adjust interface. Remove process from processes
8743 table. Adjust to use ptids.
8744 * win32-low.c (current_inferior_tid): Delete.
8745 (current_inferior_ptid): New.
8746 (debug_event_ptid): New.
8747 (thread_rec): Take a ptid. Adjust.
8748 (child_add_thread): Add `pid' argument. Adjust to use ptids.
8749 (child_delete_thread): Ditto.
8750 (do_initial_child_stuff): Add `attached' argument. Add process to
8751 processes table.
8752 (child_fetch_inferior_registers, child_store_inferior_registers):
8753 Adjust.
8754 (win32_create_inferior): Pass 0 to do_initial_child_stuff.
8755 (win32_attach): Pass 1 to do_initial_child_stuff.
8756 (win32_kill): Adjust interface. Remove process from processes
8757 table.
8758 (win32_detach): Ditto.
8759 (win32_join): Adjust interface.
8760 (win32_thread_alive): Take a ptid.
8761 (win32_resume): Adjust to use ptids.
8762 (get_child_debug_event): Ditto.
8763 (win32_wait): Adjust interface. Remove exiting process from
8764 processes table.
8765
bd99dc85
PA
87662009-04-01 Pedro Alves <pedro@codesourcery.com>
8767
8768 Non-stop mode support.
8769
8770 * server.h (non_stop): Declare.
8771 (gdb_client_data, handler_func): Declare.
8772 (delete_file_handler, add_file_handler, start_event_loop):
8773 Declare.
8774 (handle_serial_event, handle_target_event, push_event)
8775 (putpkt_notif): Declare.
8776 * target.h (enum resume_kind): New.
8777 (struct thread_resume): Replace `step' field by `kind' field.
8778 (TARGET_WNOHANG): Define.
8779 (struct target_ops) <wait>: Add `options' argument.
8780 <supports_non_stop, async, start_non_stop>: New fields.
8781 (target_supports_non_stop, target_async): New.
8782 (start_non_stop): Declare.
8783 (mywait): Add `options' argument.
8784 * target.c (mywait): Add `options' argument. Print child exit
8785 notifications here.
8786 (start_non_stop): New.
8787 * server.c (non_stop, own_buf, mem_buf): New globals.
8788 (struct vstop_notif): New.
8789 (notif_queue): New global.
8790 (queue_stop_reply, push_event, discard_queued_stop_replies)
8791 (send_next_stop_reply): New.
8792 (start_inferior): Adjust to use resume_kind. Adjust to mywait
8793 interface changes.
8794 (attach_inferior): In non-stop mode, don't wait for the target
8795 here.
8796 (handle_general_set): Handle QNonStop.
8797 (handle_query): When handling qC, return the current general
8798 thread, instead of the first thread of the list.
8799 (handle_query): If the backend supports non-stop mode, include
8800 QNonStop+ in the qSupported query response.
8801 (handle_v_cont): Adjust to use resume_kind. Handle resume_stop
8802 and non-stop mode.
8803 (handle_v_attach, handle_v_run): Handle non-stop mode.
8804 (handle_v_stopped): New.
8805 (handle_v_requests): Report support for vCont;t. Handle vStopped.
8806 (myresume): Adjust to use resume_kind. Handle non-stop.
8807 (queue_stop_reply_callback): New.
8808 (handle_status): Handle non-stop mode.
8809 (main): Clear non_stop flag on reconnection. Use the event-loop.
8810 Refactor serial protocol handling from here ...
8811 (process_serial_event): ... to this new function. When GDB
8812 selects any thread, select one here. In non-stop mode, wait until
8813 GDB acks all pending events before exiting.
8814 (handle_serial_event, handle_target_event): New.
8815 * remote-utils.c (remote_open): Install remote_desc in the event
8816 loop.
8817 (remote_close): Remove remote_desc from the event loop.
8818 (putpkt_binary): Rename to...
8819 (putpkt_binary_1): ... this. Add `is_notic' argument. Handle it.
8820 (putpkt_binary): New as wrapper around putpkt_binary_1.
8821 (putpkt_notif): New.
8822 (prepare_resume_reply): In non-stop mode, don't change the
8823 general_thread.
8824 * event-loop.c: New.
8825 * Makefile.in (OBJ): Add event-loop.o.
8826 (event-loop.o): New rule.
8827
8828 * linux-low.h (pid_of): Moved here.
8829 (lwpid_of): New.
8830 (get_lwp_thread): Use lwpid_of.
8831 (struct lwp_info): Delete `lwpid' field. Add `suspended' field.
8832 * linux-low.c (pid_of): Delete.
8833 (inferior_pid): Use lwpid_of.
8834 (linux_event_pipe): New.
8835 (target_is_async_p): New.
8836 (delete_lwp): New.
8837 (handle_extended_wait): Use lwpid_of.
8838 (add_lwp): Don't set lwpid field.
8839 (linux_attach_lwp): Adjust debug output. Use lwpid_of.
8840 (linux_kill_one_lwp): If killing a running lwp, stop it first.
8841 Use lwpid_of. Adjust to linux_wait_for_event interface changes.
8842 (linux_detach_one_lwp): If detaching from a running lwp, stop it
8843 first. Adjust to linux_wait_for_event interface changes. Use
8844 lwpid_of.
8845 (linux_detach): Don't delete the main lwp here.
8846 (linux_join): Use my_waitpid. Avoid signal_pid. Use lwpid_of.
8847 (status_pending_p): Don't consider explicitly suspended lwps.
8848 (linux_wait_for_lwp): Take an integer pid instead of a lwp_info
8849 pointer. Add OPTIONS argument. Change return type to int. Use
8850 my_waitpid instead of sleeping. Handle WNOHANG. Use lwpid_of.
8851 (linux_wait_for_event): Take an integer pid instead of a lwp_info
8852 pointer. Add status pointer argument. Return a pid instead of a
8853 status. Use lwpid_of. Adjust to linux_wait_for_lwp interface
8854 changes. In non-stop mode, don't switch to a random thread.
8855 (linux_wait): Rename to...
8856 (linux_wait_1): ... this. Add target_options argument, and handle
8857 it. Adjust to use resume_kind. Use lwpid_of. In non-stop mode,
8858 don't handle the continue thread. Handle TARGET_WNOHANG. Merge
8859 clean exit and signal exit code. Don't stop all threads in
8860 non-stop mode. In all-stop mode, only stop all threads when
8861 reporting a stop to GDB. Handle explicit thread stop requests.
8862 (async_file_flush, async_file_mark): New.
8863 (linux_wait): New.
8864 (send_sigstop): Use lwpid_of.
8865 (wait_for_sigstop): Use lwpid_of. Adjust to linux_wait_for_event
8866 interface changes. In non-stop mode, don't switch to a random
8867 thread.
8868 (linux_resume_one_lwp): Use lwpid_of.
8869 (linux_continue_one_thread, linux_queue_one_thread): Merge into ...
8870 (linux_resume_one_thread): ... this. Handle resume_stop. In
8871 non-stop mode, don't look for pending flag in all threads.
8872 (resume_status_pending_p): Don't consider explicitly suspended
8873 threads.
8874 (my_waitpid): Reimplement. Emulate __WALL.
8875 (linux_request_interrupt, linux_read_offsets, linux_xfer_siginfo):
8876 Use lwpid_of.
8877 (sigchld_handler, linux_supports_non_stop, linux_async)
8878 (linux_start_non_stop): New.
8879 (linux_target_ops): Register linux_supports_non_stop, linux_async
8880 and linux_start_non_stop.
8881 (initialize_low): Install SIGCHLD handler.
8882 * thread-db.c (thread_db_create_event, find_one_thread)
8883 (thread_db_get_tls_address): Use lwpid_of.
8884 * win32-low.c (win32_detach): Adjust to use resume_kind.
8885 (win32_wait): Add `options' argument.
8886 * spu-low.c (spu_resume): Adjust to use resume_kind.
8887 (spu_wait): Add `options' argument.
8888
5b1c542e
PA
88892009-04-01 Pedro Alves <pedro@codesourcery.com>
8890
8891 Decouple target code from remote protocol.
8892
8893 * target.h (enum target_waitkind): New.
8894 (struct target_waitstatus): New.
8895 (struct target_ops) <wait>: Return an unsigned long. Take a
8896 target_waitstatus pointer instead of a char pointer.
8897 (mywait): Likewise.
8898 * target.c (mywait): Change prototype to return an unsigned long.
8899 Take a target_waitstatus pointer instead of a char pointer. Adjust.
8900 * server.h (thread_from_wait, old_thread_from_wait): Delete
8901 declarations.
8902 (prepare_resume_reply): Change prototype to take a
8903 target_waitstatus.
8904 * server.c (thread_from_wait, old_thread_from_wait): Delete.
8905 (last_status, last_ptid): New.
8906 (start_inferior): Remove "statusptr" argument. Adjust. Return a
8907 pid instead of a signal.
8908 (attach_inferior): Remove "status" and "signal" parameters.
8909 Adjust.
8910 (handle_query): For qGetTLSAddr, parse the thread id with strtol,
8911 not as an address.
8912 (handle_v_cont, handle_v_attach, handle_v_run, handle_v_kill)
8913 (handle_v_requests, myresume): Remove "status" and "signal"
8914 parameters. Adjust.
8915 (handle_status): New.
8916 (main): Delete local `status'. Adjust.
8917 * remote-utils.c: Include target.h.
8918 (prepare_resume_reply): Change prototype to take a
8919 target_waitstatus. Adjust.
8920
8921 * linux-low.c (linux_wait): Adjust to new target_ops->wait
8922 interface.
8923 * spu-low.c (spu_wait): Adjust.
8924 * win32-low.c (enum target_waitkind, struct target_waitstatus):
8925 Delete.
8926 (win32_wait): Adjust.
8927
2bd7c093
PA
89282009-04-01 Pedro Alves <pedro@codesourcery.com>
8929
8930 * target.h (struct thread_resume): Delete leave_stopped member.
8931 (struct target_ops): Add a `n' argument to the `resume' callback.
8932 * server.c (start_inferior): Adjust.
8933 (handle_v_cont, myresume): Adjust.
8934 * linux-low.c (check_removed_breakpoint): Adjust to resume
8935 interface change, and to removed leave_stopped field.
8936 (resume_ptr): Delete.
8937 (struct thread_resume_array): New.
8938 (linux_set_resume_request): Add new `arg' parameter. Adjust to
8939 resume interface change.
8940 (linux_continue_one_thread, linux_queue_one_thread)
8941 (resume_status_pending_p): Check if the resume field is NULL
8942 instead of checking the leave_stopped member.
8943 (linux_resume): Adjust to the target resume interface change.
8944 * spu-low.c (spu_resume): Adjust to the target resume interface
8945 change.
8946 * win32-low.c (win32_detach, win32_resume): Ditto.
8947
c35fafde
PA
89482009-04-01 Pedro Alves <pedro@codesourcery.com>
8949
8950 * linux-low.c (linux_wait_for_event): Don't clear the `stepping'
8951 flag.
8952 (wait_for_sigstop): Don't leave a finished single-step SIGTRAP
8953 pending.
8954 (linux_continue_one_thread): Only preserve the stepping flag if
8955 there's a pending breakpoint.
8956
0a59d50b
PA
89572009-03-31 Pedro Alves <pedro@codesourcery.com>
8958
8959 * server.c (main): After the inferior having exited, call
8960 remote_close before exiting gdbserver.
8961
f04c6d38
TJB
89622009-03-25 Thiago Jung Bauermann <bauerman@br.ibm.com>
8963
8964 Fix size of FPSCR in Power 7 processors.
8965 * linux-ppc-low.c (PPC_FEATURE_ARCH_2_05): Remove #define.
8966 (PPC_FEATURE_HAS_DFP): New #define.
8967 (ppc_arch_setup): Check for DFP feature instead of ISA 2.05 to decide on
8968 size of the FPSCR.
8969
78e5cee6
PA
89702009-03-23 Pedro Alves <pedro@codesourcery.com>
8971
8972 * server.c (handle_query) Whitespace and formatting.
8973
1b3f6016
PA
89742009-03-22 Pedro Alves <pedro@codesourcery.com>
8975
8976 * i387-fp.c, linux-arm-low.c, linux-cris-low.c,
8977 linux-crisv32-low.c, linux-i386-low.c, linux-low.c,
8978 linux-mips-low.c, linux-s390-low.c, linux-sparc-low.c,
8979 linux-x86-64-low.c, linux-xtensa-low.c, proc-service.c,
8980 regcache.c, remote-utils.c, server.c, spu-low.c, target.h,
8981 thread-db.c, win32-low.c, xtensa-xtregs.c, gdbreplay.c,
8982 Makefile.in, configure.ac: Fix whitespace throughout.
8983 * configure: Regenerate.
8984
a07b2135
PA
89852009-03-22 Pedro Alves <pedro@codesourcery.com>
8986
8987 * inferiors.c (find_inferior): Make it safe for the callback
8988 function to delete the currently iterated inferior.
8989
67cc2626
PA
89902009-03-22 Pedro Alves <pedro@codesourcery.com>
8991
8992 * Makefile.in (linuw_low_h): Move higher.
8993 (thread-db.o): Depend on $(linux_low_h).
8994
54a0b537
PA
89952009-03-17 Pedro Alves <pedro@codesourcery.com>
8996
8997 Rename "process" to "lwp" throughout.
8998
8999 * linux-low.c (all_processes): Rename to...
9000 (all_lwps): ... this.
9001 (inferior_pid, handle_extended_wait, get_stop_pc): Adjust.
9002 (add_process): Rename to ...
9003 (add_lwp): ... this. Adjust.
9004 (linux_create_inferior): Adjust.
9005 (linux_attach_lwp): Adjust.
9006 (linux_attach): Adjust.
9007 (linux_kill_one_process): Rename to ...
9008 (linux_kill_one_lwp): ... this. Adjust.
9009 (linux_kill): Adjust.
9010 (linux_detach_one_process): Rename to ...
9011 (linux_detach_one_lwp): ... this. Adjust.
9012 (linux_detach): Adjust.
9013 (check_removed_breakpoint): Adjust.
9014 (status_pending_p): Adjust.
9015 (linux_wait_for_process): Rename to ...
9016 (linux_wait_for_lwp): ... this. Adjust.
9017 (linux_wait_for_event): Adjust.
9018 (send_sigstop): Adjust.
9019 (wait_for_sigstop): Adjust.
9020 (stop_all_processes): Rename to ...
9021 (stop_all_lwps): ... this.
9022 (linux_resume_one_process): Rename to ...
9023 (linux_resume_one_lwp): ... this. Adjust.
9024 (linux_set_resume_request, linux_continue_one_thread)
9025 (linux_queue_one_thread, resume_status_pending_p)
9026 (usr_store_inferior_registers, regsets_store_inferior_registers)
9027 (linux_request_interrupt, linux_read_offsets, linux_xfer_siginfo):
9028 Adjust.
9029 * linux-low.h (get_process): Rename to ...
9030 (get_lwp): ... this. Adjust.
9031 (get_thread_process): Rename to ...
9032 (get_thread_lwp): ... this. Adjust.
9033 (get_process_thread): Rename to ...
9034 (get_lwp_thread): ... this. Adjust.
9035 (struct process_info): Rename to ...
9036 (struct lwp_info): ... this.
9037 (all_processes): Rename to ...
9038 (all_lwps): ... this.
9039 * proc-service.c (ps_lgetregs): Adjust.
9040 * thread-db.c (thread_db_create_event, find_one_thread)
9041 (maybe_attach_thread, thread_db_get_tls_address): Adjust.
9042
0b16c5cf
PA
90432009-03-14 Pedro Alves <pedro@codesourcery.com>
9044
9045 * server.c (handle_query): Handle "qAttached".
9046
32de4b9d
NS
90472009-03-13 Nathan Sidwell <nathan@codesourcery.com>
9048
9049 * Makefile.in, hostio-errno.c, errno.c, xtensa-xtregs.c: Change to
9050 GPLv3, update license URL.
9051
2aecd87f
DE
90522009-03-01 Doug Evans <dje@google.com>
9053
93efd302 9054 * Makefile.in (INCLUDE_CFLAGS): Add -I$(srcdir)/../common.
2aecd87f
DE
9055 (server_h): Add gdb_signals.h.
9056 (signals.o): Update.
9057 * server.h (target_signal_from_host,target_signal_to_host_p)
9058 (target_signal_to_host,target_signal_to_name): Moved to gdb_signals.h.
9059
86b1f9c5
PM
90602009-02-14 Pierre Muller <muller@ics.u-strasbg.fr>
9061
9062 * remote-utils.c (getpkt): Also generate remote-debug
9063 information if noack_mode is set.
9064
4aa995e1
PA
90652009-02-06 Pedro Alves <pedro@codesourcery.com>
9066
9067 * server.c (handle_query): Report qXfer:siginfo:read and
9068 qXfer:siginfo:write as supported and handle them.
9069 * target.h (struct target_ops) <qxfer_siginfo>: New field.
9070 * linux-low.c (linux_xfer_siginfo): New.
9071 (linux_target_ops): Set it.
9072
62709adf
PA
90732009-01-26 Pedro Alves <pedro@codesourcery.com>
9074
9075 * server.c (gdbserver_usage): Mention --remote-debug.
9076 (main): Accept '--remote-debug' switch.
9077
aef93bd7
DE
90782009-01-18 Doug Evans <dje@google.com>
9079
9080 * regcache.c (new_register_cache): No need to check result of xcalloc.
9081 * server.c (handle_search_memory): Back out calls to xmalloc,
9082 result is checked and error is returned to user upon failure.
9083 (handle_query): Ditto. Add more checks for result of malloc.
9084 (handle_v_cont): Check result of malloc, report error back to
9085 user upon failure.
9086 (handle_v_run): Ditto. Call freeargv.
9087 * server.h (freeargv): Declare.
9088 * utils.c (freeargv): New fn.
9089
54363045
DE
90902009-01-15 Doug Evans <dje@google.com>
9091
f626972c
DE
9092 * gdbreplay.c (perror_with_name): Make arg const char *.
9093 * server.h (target_signal_to_name): Make return type const char *.
0842e787 9094 * thread-db.c (thread_db_err_str): Make return type const char *.
f626972c 9095 * utils.c (perror_with_name): Make arg const char *.
54363045 9096
18aae699
PA
90972009-01-14 Pedro Alves <pedro@codesourcery.com>
9098
9099 * win32-low.c (get_child_debug_event): Issue a final DBG_CONTINUE
9100 when handling a EXIT_PROCESS_DEBUG_EVENT.
9101
ff703abe
JB
91022009-01-06 Joel Brobecker <brobecker@adacore.com>
9103
9104 * gdbreplay.c (gdbreplay_version): Update copyright year.
9105 * server.c (gdbserver_version): Likewise.
9106
f21cc1a2 91072009-01-05 Doug Evans <dje@google.com>
0e21c1ec
DE
9108
9109 * linux-low.c (linux_attach_lwp): Add some comments/fixmes.
f21cc1a2 9110 (handle_extended_wait): Improve comment.
0e21c1ec 9111
bca929d3
DE
91122008-12-13 Doug Evans <dje@google.com>
9113
9114 * utils.c (xmalloc,xcalloc,xstrdup): New fns.
9115 * server.h (ATTR_MALLOC): New macro.
9116 (xmalloc,xcalloc,xstrdup): Declare.
9117 * hostio.c: Replace malloc,calloc,strdup with xmalloc,xcalloc,xstrdup.
9118 * inferiors.c: Ditto.
9119 * linux-low.c: Ditto.
9120 * mem-break.c: Ditto.
9121 * regcache.c: Ditto.
9122 * remote-utils.c: Ditto.
9123 * server.c: Ditto.
9124 * target.c: Ditto.
9125 * win32-low.c: Ditto.
9126
97438e3f
DE
91272008-12-12 Doug Evans <dje@google.com>
9128
896c7fbb
DE
9129 * linux-low.c (linux_wait_for_process): Don't clobber current_inferior
9130 in debugging printf.
9131
97438e3f
DE
9132 * linux-low.c (handle_extended_wait): Simplify, use my_waitpid.
9133
e3b886f8
DE
91342008-12-09 Doug Evans <dje@google.com>
9135
9136 * linux-low.h (struct process_info): Delete member tid, unused.
9137 * thread-db.c (find_one_thread): Update.
9138 (maybe_attach_thread): Update.
9139
07e059b5
VP
91402008-12-02 Pedro Alves <pedro@codesourcery.com>
9141
889bf7c5
PA
9142 * target.h (struct target_ops): Add qxfer_osdata member.
9143 * linux-low.c: Include ctype.h and pwd.h and sys/types.h
9144 and dirent.h.
9145 (linux_qxfer_osdata): New functions.
9146 (linux_target_ops): Register linux_qxfer_osdata as qxfer_osdata
9147 callback.
9148 * server.c (handle_query): Handle "qXfer:osdata:read:".
9149 * remote-utils.c (buffer_grow, buffer_free, buffer_init, buffer_finish)
9150 (buffer_xml_printf): New functions.
9151 * server.h (struct buffer): New.
9152 (buffer_grow_str, buffer_grow_str0): New macros.
9153 (buffer_grow, buffer_free, buffer_init, buffer_finish)
9154 (buffer_xml_printf): Declare.
07e059b5 9155
4cab47ab
DE
91562008-11-24 Doug Evans <dje@google.com>
9157
9158 * Makefile.in (VERSION,DIST,LINT,LINTFLAGS): Delete, unused.
9159
f142445f
DJ
91602008-11-24 Daniel Jacobowitz <dan@codesourcery.com>
9161
9162 * server.c (handle_v_run): Always use the supplied argument list.
9163
d0107bb6 91642008-11-19 Bob Wilson <bob.wilson@acm.org>
889bf7c5 9165
d0107bb6
BW
9166 * xtensa-xtregs.c (XTENSA_ELF_XTREG_SIZE): Change to 4.
9167 (xtensa_regmap_table): Add entry for scompare1.
889bf7c5 9168
2c4ad781
TJB
91692008-11-18 Thiago Jung Bauermann <bauerman@br.ibm.com>
9170
9171 * Makefile.in (powerpc-isa205-32l.o, powerpc-isa205-32l.c,
9172 powerpc-isa205-altivec32l.o, powerpc-isa205-altivec32l.c,
9173 powerpc-isa205-vsx32l.o, powerpc-isa205-vsx32l.c,
9174 powerpc-isa205-64l.o, powerpc-isa205-64l.c,
9175 powerpc-isa205-altivec64l.o, powerpc-isa205-altivec64l.c,
9176 powerpc-isa205-vsx64l.o, powerpc-isa205-vsx64l.c): New targets.
9177 * configure.srv (powerpc*-*-linux*): Add ISA 2.05 object files and
9178 XML target descriptions.
9179 * linux-ppc-low.c (ppc_arch_setup): Init registers with 64-bit FPSCR
9180 when inferior is running on an ISA 2.05 or later processor. Add
9181 special case to return offset for full 64-bit slot of FPSCR when
9182 in 32-bits.
9183
dfb64f85
DJ
91842008-11-14 Daniel Gutson <dgutson@codesourcery.com>
9185
9186 * Makefile.in (SFILES, clean): Added sparc64 files.
9187 (reg-sparc64.o, reg-sparc64.c): New.
9188 * configure.srv (sparc*-*-linux*): New configuration.
9189 * linux-low.c (regsets_fetch_inferior_registers): Swap ptrace
9190 syscall arguments for SPARC.
9191 (regsets_store_inferior_registers): Likewise.
9192 * linux-sparc-low.c: New file.
9193
66b6e1dd
DE
91942008-10-21 Doug Evans <dje@google.com>
9195
9196 * Makefile.in (BFD_DIR,BFD,BFD_SRC,BFD_CFLAGS): Delete.
9197 (READLINE_DIR,READLINE_DEP): Delete.
9198 (INTERNAL_CFLAGS): Update.
9199 (LINTFLAGS): Update.
9200
9b710a42
PA
92012008-10-10 Pedro Alves <pedro@codesourcery.com>
9202
9203 * server.c (handle_v_run): If GDB didn't specify an argv, use the
9204 whole argv from the last run, not just argv[0].
9205
5822d809
PA
92062008-09-08 Pedro Alves <pedro@codesourcery.com>
9207
9208 * regcache.c (new_register_cache): Return NULL if the register
9209 cache size isn't known yet.
9210 (free_register_cache): Avoid dereferencing a NULL regcache.
9211
74aac56f
DJ
92122008-09-04 Daniel Jacobowitz <dan@codesourcery.com>
9213
9214 * configure.srv: Merge MIPS and MIPS64.
9215
400b20f5
MR
92162008-08-24 Maciej W. Rozycki <macro@linux-mips.org>
9217
9218 * Makefile.in (uninstall): Apply $(EXEEXT) too.
9219
677c5bb1
LM
92202008-08-18 Luis Machado <luisgpm@br.ibm.com>
9221
9222 * Makefile.in: Add required vsx dependencies.
9223
9224 * linux-ppc-low: Define PPC_FEATURE_HAS_VSX.
9225 Declare init_registers_powerpc_vsx32l.
9226 Declare init_registers_powerpc_vsx64l.
9227 Define PTRACE_GETVSXREGS and PTRACE_SETVSXREGS.
9228 (ppc_arch_setup): Check for VSX in hwcap.
9229 (ppc_fill_vsxregset): New function.
9230 (ppc_store_vsxregset): New function.
9231 Add new VSX entry in regset_info target_regsets.
9232
9233 * configure.srv: Add new VSX dependencies.
9234
a6f3e723
SL
92352008-08-12 Pedro Alves <pedro@codesourcery.com>
9236
9237 * remote-utils.c (noack_mode, transport_is_reliable): New globals.
9238 (remote_open): Set or clear transport_is_reliable.
9239 (putpkt_binary): Don't expect acks in noack mode.
9240 (getpkt): Don't send ack/nac in noack mode.
9241 * server.c (handle_general_set): Handle QStartNoAckMode.
9242 (handle_query): If connected by tcp pass QStartNoAckMode+ in
9243 qSupported.
9244 (main): Reset noack_mode on every connection.
9245 * server.h (noack_mode): Declare.
9246
a417dc56
RW
92472008-08-07 Ralf Wildenhues <Ralf.Wildenhues@gmx.de>
9248
9249 * Makefile.in (GDBREPLAY_OBS): New variable.
9250 (gdbreplay$(EXEEXT)): Use it to avoid unportable $^.
9251
3221518c
UW
92522008-08-05 Ulrich Weigand <uweigand@de.ibm.com>
9253 Daniel Jacobowitz <dan@codesourcery.com>
9254
9255 * linux-low.c (linux_resume_one_process): Ignore ESRCH.
9256 (usr_store_inferior_registers): Likewise.
9257 (regsets_store_inferior_registers): Likewise.
9258
ec56be1b
PA
92592008-07-31 Rolf Jansen <rj@surtec.com>
9260 Pedro Alves <pedro@codesourcery.com>
9261
9262 * configure.ac: Check for memmem declaration.
9263 * server.c [HAVE_MALLOC_H]: Include malloc.h.
9264 (disable_packet_vCont, disable_packet_Tthread, disable_packet_qC)
9265 (disable_packet_qfThreadInfo): Unconditionally compile.
9266 * server.h [!HAVE_DECL_MEMMEM]: Declare memmem.
9267 * configure, config.in: Regenerate.
9268
2fe5e3ff
DE
92692008-07-28 Doug Kwan <dougkwan@google.com>
9270
9271 * linux-low.c (sys/dir.h, sys/user.h): Remove includes.
9272 (linux_write_memory): Remove declaration of errno.
9273
836acd6d
UW
92742008-07-12 Ulrich Weigand <uweigand@de.ibm.com>
9275
9276 * linux-low.c (handle_extended_wait): Do not use "status"
9277 variable uninitialized.
9278
aeba519e
PA
92792008-07-07 Pedro Alves <pedro@codesourcery.com>
9280
9281 * server.c (handle_v_attach): Inhibit reporting dll changes.
9282
db42f210
PA
92832008-06-27 Pedro Alves <pedro@codesourcery.com>
9284
9285 * remote-utils.c (prepare_resume_reply): If requested, don't
9286 output "thread:TID" in the T stop reply.
9287
9288 * server.c (disable_packet_vCont, disable_packet_Tthread)
9289 (disable_packet_qC, disable_packet_qfThreadInfo): New globals.
9290 (handle_query): If requested, disable support for qC, qfThreadInfo
9291 and qsThreadInfo.
9292 (handle_v_requests): If requested, disable support for vCont.
9293 (gdbserver_show_disableable): New.
9294 (main): Handle --disable-packet and --disable-packet=LIST.
9295
9296 * server.h (disable_packet_vCont, disable_packet_Tthread)
9297 (disable_packet_qC, disable_packet_qfThreadInfo): Declare.
9298
8e4c5421
CD
92992008-06-20 Carlos O'Donell <carlos@codesourcery.com>
9300
9301 * server.c (gdbserver_usage): Mention --version.
9302
6e23a804
DJ
93032008-06-06 Daniel Jacobowitz <dan@codesourcery.com>
9304
9305 * Makefile.in (gdbreplay.o): New rule.
9306
90aa6a40
JM
93072008-06-06 Joseph Myers <joseph@codesourcery.com>
9308
9309 * gdbreplay.c (gdbreplay_version): Say gdbreplay in version
9310 message, not gdbserver.
9311
c16158bc 93122008-06-05 Vladimir Prus <vladimir@codesourcery.com>
889bf7c5
PA
9313 Nathan Sidwell <nathan@codesourcery.com>
9314 Joseph Myers <joseph@codesourcery.com>
c16158bc
JM
9315
9316 * acinclude.m4: Include ../../config/acx.m4.
9317 * configure.ac: Use ACX_PKGVERSION and ACX_BUGURL.
9318 * configure, config.in: Regenerate.
9319 * Makefile.in (gdbreplay$(EXEEXT)): Add version.o.
9320 * server.c (gdbserver_version): Print PKGVERSION.
9321 (gdbsrever_usage): Add stream parameter. Print REPORT_BUGS_TO.
9322 (main): Adjust gdbserver_usage calls.
9323 * gdbreplay.c (version, host_name): Add declarations.
9324 (gdbreplay_version, gdbreplay_usage): New.
9325 (main): Accept --version and --help options.
9326
aeb75bf5
DJ
93272008-06-04 Daniel Jacobowitz <dan@codesourcery.com>
9328
9329 * linux-arm-low.c (thumb_breakpoint, thumb_breakpoint_len): New.
9330 (arm_breakpoint_at): Handle Thumb.
9331 (the_low_target): Add comment.
9332
76b233dd
UW
93332008-05-29 Ulrich Weigand <uweigand@de.ibm.com>
9334
9335 * linux-ppc-low.c (ppc_collect_ptrace_register): Clear buffer.
9336
08388c79
DE
93372008-05-09 Doug Evans <dje@google.com>
9338
a3c83fae
DE
9339 * server.h (decode_search_memory_packet): Declare.
9340 * remote-utils.c (decode_search_memory_packet): New fn.
9341 * server.c (handle_search_memory_1): New fn.
08388c79
DE
9342 (handle_search_memory): New fn.
9343 (handle_query): Process qSearch:memory packets.
9344
bb9c3d36
UW
93452008-05-08 Ulrich Weigand <uweigand@de.ibm.com>
9346
9347 * regcache.c (registers_length): Remove.
9348 (set_register_cache): Verify that PBUFSIZ is large enough to hold a
9349 full register packet.
9350 * regcache.h (registers_length): Remove prototype.
9351 * server.h (PBUFSIZ): Define to 16384.
9352
7284e1be
UW
93532008-05-03 Ulrich Weigand <uweigand@de.ibm.com>
9354
9355 * configure.srv (powerpc*-*-linux*): Set srv_regobj to
9356 powerpc-32l.o, powerpc-altivec32l.o, powerpc-e500l.o,
9357 powerpc-64l.o, and powerpc-altivec64l.o.
9358 Remove rs6000/powerpc-32.xml, rs6000/powerpc-64.xml, and
9359 rs6000/powerpc-e500.xml; add rs6000/powerpc-32l.xml,
9360 rs6000/powerpc-altivec32l.xml, rs6000/powerpc-e500l.xml,
9361 rs6000/powerpc-64l.xml, rs6000/powerpc-altivec64l.xml,
9362 rs6000/power-linux.xml, and rs6000/power64-linux.xml
9363 to srv_xmlfiles.
9364
9365 * Makefile.in (reg-ppc.o, reg-ppc.c): Remove, replace by ...
9366 (powerpc-32l.o, powerpc-32l.c): ... these new rules.
9367 (powerpc-32.o, powerpc-32.c): Remove, replace by ...
9368 (powerpc-altivec32l.o, powerpc-altivec32l.c): ... these new rules.
9369 (powerpc-e500.o, powerpc-e500.c): Remove, replace by ...
9370 (powerpc-e500l.o, powerpc-e500l.c): ... these new rules.
9371 (reg-ppc64.o, reg-ppc64.c): Remove, replace by ...
9372 (powerpc-64l.o, powerpc-64l.c): ... these new rules.
9373 (powerpc-64.o, powerpc-64.c): Remove, replace by ...
9374 (powerpc-altivec64l.o, powerpc-altivec64l.c): ... these new rules.
9375 (clean): Update.
9376
9377 * linux-ppc-low.c (init_registers_ppc): Remove, replace by ...
9378 (init_registers_powerpc_32l): ... this new prototype.
9379 (init_registers_powerpc_32): Remove, replace by ...
9380 (init_registers_powerpc_altivec32l): ... this new prototype.
9381 (init_registers_powerpc_e500): Remove, replace by ...
9382 (init_registers_powerpc_e500l): ... this new prototype.
9383 (init_registers_ppc64): Remove, replace by ...
9384 (init_registers_powerpc_64l): ... this new prototype.
9385 (init_registers_powerpc_64): Remove, replace by ...
9386 (init_registers_powerpc_altivec64l): ... this new prototype.
9387 (ppc_num_regs): Set to 73.
9388 (PT_ORIG_R3, PT_TRAP): Define if necessary.
9389 (ppc_regmap, ppc_regmap_e500): Add values for orig_r3 and trap.
9390 (ppc_cannot_store_register): Handle orig_r3 and trap.
9391 (ppc_arch_setup): Update init_registers_... calls.
9392 (ppc_fill_gregset): Handle orig_r3 and trap.
9393
9394 * inferiors.c (clear_inferiors): Reset current_inferior.
9395
fdc59709
PB
93962008-04-23 Paolo Bonzini <bonzini@gnu.org>
9397
889bf7c5
PA
9398 * acinclude.m4: Add override.m4.
9399 * configure: Regenerate.
fdc59709 9400
c9b2f845
UW
94012008-04-21 Ulrich Weigand <uweigand@de.ibm.com>
9402
9403 * linux-ppc-low.c (ppc_arch_setup): Reset ppc_hwcap after the
9404 initial call to init_register_ppc64.
9405
550512b8
UW
94062008-04-21 Ulrich Weigand <uweigand@de.ibm.com>
9407
43aaf8b6
PA
9408 * configure.srv (powerpc64-*-linux*, powerpc-*-linux*): Merge into
9409 single powerpc*-*-linux* case.
550512b8
UW
9410 (s390-*-linux*, s390x-*-linux*): Merge into single s390*-*-linux* case.
9411
b6430ec3
UW
94122008-04-17 Ulrich Weigand <uweigand@de.ibm.com>
9413
9414 * configure.srv [powerpc64-*-linux*]: Remove powerpc-e500.o from
889bf7c5 9415 srv_regobj. Remove rs6000/powerpc-e500.xml and rs6000/power-spe.xml
b6430ec3
UW
9416 from reg_xmlfiles.
9417 * linux-ppc-low.c: Include <elf.h>.
9418 (PPC_FEATURE_HAS_ALTIVEC, PPC_FEATURE_HAS_SPE): Define.
9419 (ppc_hwcap): New global variable.
9420 (ppc_regmap): Remove __SPE__ #ifdef sections.
9421 (ppc_regmap_e500): New global variable.
9422 (ppc_cannot_store_register): Update __SPE__ special case.
9423 (ppc_get_hwcap): New function.
9424 (ppc_arch_setup): Use it to determine whether inferior supports
9425 AltiVec or SPE registers. Set the_low_target.regmap if appropriate.
9426 (ppc_fill_vrregset, ppc_store_vrregset): Define unconditionally.
9427 Do not access registers if target does not support AltiVec.
9428 (ppc_fill_evrregset, ppc_store_evrregset): Define unconditionally.
9429 Do not access registers if target does not support SPE.
9430 (target_regsets): Unconditionally include AltiVec and SPE regsets.
9431
52fa2412
UW
94322008-04-17 Daniel Jacobowitz <dan@codesourcery.com>
9433
9434 * linux-low.c (disabled_regsets, num_regsets): New.
9435 (use_regsets_p): Delete.
9436 (linux_wait_for_process): Clear disabled_regsets.
9437 (regsets_fetch_inferior_registers): Check and set it.
9438 (regsets_store_inferior_registers): Likewise.
9439 (linux_fetch_registers, linux_store_registers): Do not use
9440 use_regsets_p.
9441 (initialize_low): Allocate disabled_regsets.
9442
e28b3332
DJ
94432008-04-14 Daniel Jacobowitz <dan@codesourcery.com>
9444
9445 * Makefile.in (LIBOBJS): New.
9446 (OBS): Use LIBOBJS.
9447 (memmem.o): New rule.
9448 * configure.ac: Use AC_CONFIG_LIBOBJ_DIR and check for memmem.
9449 * configure: Regenerated.
9450
4536995d
UW
94512008-04-04 Ulrich Weigand <uweigand@de.ibm.com>
9452
9453 * server.c (handle_query): Never return "unsupported" for
9454 qXfer:features:read queries.
9455
221c031f
UW
94562008-03-27 Ulrich Weigand <uweigand@de.ibm.com>
9457
9458 * server.c (get_features_xml): Fix inverted condition.
9459 (handle_query): Always support qXfer:feature:read.
9460
ccd213ac
DJ
94612008-03-10 Daniel Jacobowitz <dan@codesourcery.com>
9462
9463 * server.c (wrapper_argv): New.
9464 (start_inferior): Handle wrapper_argv. If set, expect an extra
9465 trap.
9466 (gdbserver_usage): Document --wrapper.
9467 (main): Parse --wrapper.
9468
6fe305f7
UW
94692008-02-28 Ulrich Weigand <uweigand@de.ibm.com>
9470
9471 * configure.srv [powerpc64-*-linux*]: Add all files mentioned for
9472 powerpc-*-linux* to srv_regobj and reg_xmlfiles.
9473 * linux-ppc-low.c (ppc_get_pc): Support bi-arch operation.
9474 (ppc_set_pc): Likewise.
9475 (ppc_arch_setup): New function.
9476 (ppc_fill_gregset): Call ppc_collect_ptrace_register instead
9477 of collect_register.
889bf7c5 9478 (the_low_target): Use ppc_arch_setup as arch_setup initializer.
6fe305f7 9479
5b0a002e
UW
94802008-02-28 Ulrich Weigand <uweigand@de.ibm.com>
9481
9482 * configure.srv [powerpc64-*-linux*]: Use linux-ppc-low.o
9483 instead of linux-ppc64-low.o.
9484 * linux-ppc64-low.c: Remove file.
9485 * Makefile.in (SFILES): Remove linux-ppc64-low.c.
9486 (linux-ppc64-low.o): Remove rule.
9487
9488 * linux-ppc-low.c (init_registers_ppc64): Add prototype.
9489 (init_registers_powerpc_64): Likewise.
9490 (ppc_regmap): Conditionally define depending on __powerpc64__.
9491 (ppc_cannot_store_register): Do not special-case "fpscr" when
9492 compiled on __powerpc64__.
9493 (ppc_collect_ptrace_register): New function.
9494 (ppc_supply_ptrace_register): New function.
9495 (ppc_breakpoint): Change type to "unsigned int".
9496 (ppc_breakpoint_at): Change type of "insn" to "unsigned int".
9497 (the_low_target): Conditionally provide initializers for the
889bf7c5 9498 arch_setup member depending on __powerpc64__. Install
5b0a002e
UW
9499 collect_ptrace_register and supply_ptrace_register members.
9500
9b4b61c8
UW
95012008-02-28 Ulrich Weigand <uweigand@de.ibm.com>
9502
9503 * regcache.h (gdbserver_xmltarget): Add extern declaration.
9504 * server.c (gdbserver_xmltarget): Define.
9505 (get_features_xml): Use it to replace "target.xml" and arch_string.
9506
9507 * configure.srv: Remove srv_xmltarget. Add XML files that were
9508 mentioned there to srv_xmlfiles instead. Remove conditional tests
9509 on gdb_cv_arm_iwmmxt, gdb_cv_ppc_altivec, gdb_cv_ppc_spe; set
9510 srv_xmlfiles and srv_regobj to include all possible choices.
9511 * configure.ac (srv_xmltarget): Remove.
9512 (srv_xmlfiles): Do not add "target.xml".
9513 (gdb_cv_arm_iwmmxt, gdb_cv_ppc_altivec, gdb_cv_ppc_spe): Remove
9514 checks for supplementary target information.
9515 * configure: Regenerate.
9516 * Makefile.in (XML_TARGET): Remove.
9517 (target.xml): Remove rule.
9518 (clean): Do not clean up target.xml.
9519 (.PRECIOUS): Do not mention target.xml.
9520
9521 * target.h (struct target_ops): Remove arch_string member.
9522 * linux-low.c (linux_arch_string): Remove.
9523 (linux_target_ops): Remove arch_string initializer.
9524 * linux-low.h (struct linux_target_ops): Remove arch_string member.
9525 * linux-i386-low.c (the_low_target): Remove arch_string initializer.
9526 * linux-x86-64-low.c (the_low_target): Remove arch_string initializer.
9527 * spu-low.c (spu_arch_string): Remove.
9528 (spu_target_ops): Remove arch_string initializer.
9529 * win32-low.c (win32_arch_string): Remove.
9530 (win32_target_ops): Remove arch_string initializer.
9531 * win32-low.h (struct win32_target_ops): Remove arch_string member.
9532 * win32-arm-low.c (the_low_target): Remove arch_string initializer.
9533 * win32-i368-low.c (the_low_target): Remove arch_string initializer.
9534
ee1a7ae4
UW
95352008-02-27 Ulrich Weigand <uweigand@de.ibm.com>
9536
9537 * linux-low.h (struct linux_target_ops): Replace left_pad_xfer field
9538 by collect_ptrace_register and supply_ptrace_register hooks.
9539 * linux-low.c (fetch_register): Use supply_ptrace_register callback
9540 instead of checking for the_low_target.left_pad_xfer.
9541 (usr_store_inferior_registers): Use collect_ptrace_register callback
9542 instead of checking for the_low_target.left_pad_xfer.
9543
9544 * linux-s390-low.c (s390_collect_ptrace_register): New function.
9545 (s390_supply_ptrace_register): Likewise.
9546 (s390_fill_gregset): Call s390_collect_ptrace_register.
9547 (the_low_target): Update.
9548
9549 * linux-ppc64-low.c (ppc_collect_ptrace_register): New function.
9550 (ppc_supply_ptrace_register): Likewise.
9551 (the_low_target): Update.
9552
9553 * linux-i386-low.c (the_low_target): Update.
9554 * linux-x86-64-low.c (the_low_target): Update.
9555
d61ddec4
UW
95562008-02-27 Ulrich Weigand <uweigand@de.ibm.com>
9557
9558 * configure.srv [s390x-*-linux*]: Set srv_regobj to include both
9559 reg-s390.o and reg-s390x.o.
9560
9561 * linux-low.c (new_inferior): New global variable.
9562 (linux_create_inferior, linux_attach): Set it.
9563 (linux_wait_for_process): Call the_low_target.arch_setup after the
9564 target has stopped for the first time.
9565 (initialize_low): Do not call the_low_target.arch_setup.
9566
9567 * linux-s390-low.c (s390_get_pc): Support bi-arch operation.
9568 (s390_set_pc): Likewise.
9569 (s390_arch_setup): New function.
9570 (the_low_target): Use s390_arch_setup as arch_setup routine.
9571
9572 * regcache.c (realloc_register_cache): New function.
9573 (set_register_cache): Call it for each existing regcache.
9574
d05b4ac3
UW
95752008-02-27 Ulrich Weigand <uweigand@de.ibm.com>
9576
9577 * server.h (init_registers): Remove prototype.
9578
9579 * linux-low.h (struct linux_target_ops): Add arch_setup field.
9580 * linux-low.c (initialize_low): Call the_low_target.arch_setup ()
9581 instead of init_registers ().
9582 * linux-arm-low.c (init_registers_arm): Add prototype.
9583 (init_registers_arm_with_iwmmxt): Likewise.
9584 (the_low_target): Add initializer for arch_setup field.
9585 * linux-cris-low.c (init_registers_cris): Add prototype.
9586 (the_low_target): Add initializer for arch_setup field.
9587 * linux-crisv32-low.c (init_registers_crisv32): Add prototype.
9588 (the_low_target): Add initializer for arch_setup field.
9589 * linux-i386-low.c (init_registers_i386_linux): Add prototype.
9590 (the_low_target): Add initializer for arch_setup field.
9591 * linux-ia64-low.c (init_registers_ia64): Add prototype.
9592 (the_low_target): Add initializer for arch_setup field.
9593 * linux-m32r-low.c (init_registers_m32r): Add prototype.
9594 (the_low_target): Add initializer for arch_setup field.
9595 * linux-m68k-low.c (init_registers_m68k): Add prototype.
9596 (the_low_target): Add initializer for arch_setup field.
9597 * linux-mips-low.c (init_registers_mips_linux): Add prototype.
9598 (init_registers_mips64_linux): Likewise.
9599 (the_low_target): Add initializer for arch_setup field.
9600 * linux-ppc-low.c (init_registers_ppc): Add prototype.
9601 (init_registers_powerpc_32, init_registers_powerpc_e500): Likewise.
9602 (the_low_target): Add initializer for arch_setup field.
9603 * linux-ppc64-low.c (init_registers_ppc64): Add prototype.
9604 (init_registers_powerpc_64): Likewise.
9605 (the_low_target): Add initializer for arch_setup field.
9606 * linux-s390-low.c (init_registers_s390): Add prototype.
9607 (init_registers_s390x): Likewise.
9608 (the_low_target): Add initializer for arch_setup field.
9609 * linux-sh-low.c (init_registers_sh): Add prototype.
9610 (the_low_target): Add initializer for arch_setup field.
9611 * linux-x86-64-low.c (init_registers_x86_64_linux): Add prototype.
9612 (the_low_target): Add initializer for arch_setup field.
9613 * linux-xtensa-low.c (init_registers_xtensa): Add prototype.
9614 (the_low_target): Add initializer for arch_setup field.
9615
9616 * win32-low.h (struct win32_target_ops): Add arch_setup field.
9617 * win32-low.c (initialize_low): Call the_low_target.arch_setup ()
9618 instead of init_registers ().
9619 * win32-arm-low.c (init_registers_arm): Add prototype.
9620 (the_low_target): Add initializer for arch_setup field.
9621 * win32-i386-low.c (init_registers_i386): Add prototype.
9622 (the_low_target): Add initializer for arch_setup field.
9623
9624 * spu-low.c (init_registers_spu): Add prototype.
9625 (initialize_low): Call initialie_registers_spu () instead of
9626 initialize_registers ().
9627
fd96d250
PA
96282008-02-19 Pedro Alves <pedro@codesourcery.com>
9629
9630 * server.c (handle_v_requests): When handling the vRun and vAttach
9631 packets, if already debugging a process, don't kill it. Return an
9632 error instead.
9633
d41b6bb4
DJ
96342008-02-17 Daniel Jacobowitz <dan@codesourcery.com>
9635
9636 * server.c (handle_query): Correct length check.
9637
5ac588cf
PA
96382008-02-14 Pedro Alves <pedro_alves@portugalmail.pt>
9639
9640 * win32-low.c (do_initial_child_stuff): Add process handle
9641 parameter. Set current_process_handle and current_process_id from the
9642 parameters. Clear globals.
9643 (win32_create_inferior): Don't set current_process_handle and
9644 current_process_id here. Instead pass them on the call to
9645 do_initial_child_stuff.
9646 (win32_attach): Likewise.
9647 (win32_clear_inferiors): New.
9648 (win32_kill): Don't close the current process handle or the
9649 current thread handle here. Instead call win32_clear_inferiors.
9650 (win32_detach): Don't open a new handle to the process. Call
9651 win32_clear_inferiors.
9652 (win32_join): Don't rely on current_process_handle; open a new
9653 handle using the process id.
9654 (win32_wait): Call win32_clear_inferiors when the inferior process
9655 has exited.
9656
ecd7ecbc
DJ
96572008-02-14 Daniel Jacobowitz <dan@codesourcery.com>
9658
9659 * server.c (monitor_show_help): Add "exit".
9660
1525d545
MG
96612008-02-11 Maxim Grigoriev <maxim2405@gmail.com>
9662
ecd7ecbc 9663 * Makefile.in (SFILES): Add linux-xtensa-low.c.
1525d545
MG
9664 (clean): Add reg-xtensa.c.
9665 (linux-xtensa-low.o, reg-xtensa.o, reg-xtensa.c): New dependencies.
ecd7ecbc
DJ
9666 * configure.srv (xtensa*-*-linux*) New target.
9667 * linux-xtensa-low.c: New.
9668 * xtensa-xtregs.c: New.
1525d545 9669
59a016f0
PA
96702008-02-01 Pedro Alves <pedro_alves@portugalmail.pt>
9671
9672 * hostio.c: Don't include errno.h.
9673 (errno_to_fileio_errno): Move to hostio-errno.
9674 * hostio.c: (hostio_error): Remove the error parameter. Defer the
9675 error number outputting to the target->hostio_last_error callback.
9676 (hostio_packet_error): Use FILEIO_EINVAL directly.
9677 (handle_open, handle_pread, hostio_error, handle_unlink): Update
9678 calls to hostio_error.
9679 * hostio-errno.c: New.
9680 * server.h (hostio_last_error_from_errno): Declare.
9681 * target.h (target_ops): Add hostio_last_error member.
9682 * linux-low.c (linux_target_op): Register hostio_last_error_from_errno
9683 as hostio_last_error handler.
889bf7c5 9684 * spu-low.c (spu_target_ops): Likewise.
59a016f0
PA
9685 * win32-low.c [_WIN32_WCE] (win32_error_to_fileio_error)
9686 (wince_hostio_last_error): New functions.
9687 (win32_target_ops) [_WIN32_WCE]: Register wince_hostio_last_error
9688 as hostio_last_error handler.
9689 (win32_target_ops) [!_WIN32_WCE]: Register
9690 hostio_last_error_from_errno as hostio_last_error handler.
9691 * Makefile.in (SFILES): Add hostio.c and hostio-errno.c.
9692 (hostio-errno.o): New rule.
9693 * configure.ac (GDBSERVER_DEPFILES): Add $srv_hostio_err_objs.
9694 * configure.srv (srv_hostio_err_objs): New variable. Default to
9695 hostio-errno.o.
9696 (arm*-*-mingw32ce*): Set srv_hostio_err_objs to "".
9697 * configure: Regenerate.
9698
2d717e4f
DJ
96992008-01-29 Daniel Jacobowitz <dan@codesourcery.com>
9700
9701 * linux-low.c (linux_attach_lwp): Do not _exit after errors.
9702 (linux_kill, linux_detach): Clean up the process list.
9703 * remote-utils.c (remote_open): Improve port number parsing.
9704 (putpkt_binary, input_interrupt): Only send interrupts if the target
9705 is running.
9706 * server.c (extended_protocol): Make static.
9707 (attached): Define earlier.
9708 (exit_requested, response_needed, program_argv): New variables.
9709 (target_running): New.
9710 (start_inferior): Clear attached here.
9711 (attach_inferior): Set attached here.
9712 (require_running): Define.
9713 (handle_query): Use require_running and target_running. Implement
9714 "monitor exit".
9715 (handle_v_attach, handle_v_run): New.
9716 (handle_v_requests): Use require_running. Handle vAttach and vRun.
9717 (gdbserver_usage): Update.
9718 (main): Redo argument parsing. Handle --debug and --multi. Handle
9719 --attach along with other options or after the port. Save
9720 program_argv. Support no initial program. Resynchronize
9721 communication with GDB after an error. Handle "monitor exit".
9722 Use require_running and target_running. Always allow the extended
9723 protocol. Do not error out for Hc0 or Hc-1. Do not automatically
9724 restart in extended mode.
9725 * README: Refer to the GDB manual. Update --attach usage.
9726
7407e2de
AS
97272007-12-20 Andreas Schwab <schwab@suse.de>
9728
9729 * linux-low.c (STACK_SIZE): Define.
9730 (linux_tracefork_child): Use it. Use __clone2 on ia64.
9731 (linux_test_for_tracefork): Likewise.
9732
b65d95c5
DJ
97332007-12-18 Daniel Jacobowitz <dan@codesourcery.com>
9734
9735 * linux-low.c (linux_wait_for_event): Update messages. Do not
9736 reinsert auto-delete breakpoints.
9737 * mem-break.c (struct breakpoint): Change return type of handler to
9738 int.
9739 (set_breakpoint_at): Update handler type.
9740 (reinsert_breakpoint_handler): Return 1 instead of calling
9741 delete_breakpoint.
9742 (reinsert_breakpoint_by_bp): Check for the original breakpoint before
9743 setting a new one.
9744 (check_breakpoints): Delete auto-delete breakpoints and return 2.
9745 * mem-break.h (set_breakpoint_at): Update handler type.
9746 * thread-db.c (thread_db_create_event, thread_db_create_event): Update.
9747 * win32-low.c (auto_delete_breakpoint): New.
9748 (get_child_debug_event): Use it.
9749
4e799345
DJ
97502007-12-16 Daniel Jacobowitz <dan@codesourcery.com>
9751
9752 * configure.ac: Check for pread and pwrite.
9753 * hostio.c (handle_pread): Fall back to lseek and read.
9754 (handle_pwrite): Fall back to lseek and write.
9755 * config.in, configure: Regenerated.
9756
27524b67
DJ
97572007-12-07 Daniel Jacobowitz <dan@codesourcery.com>
9758
9759 * server.c (myresume): Add own_buf argument.
9760 (main): Update calls.
9761
a20d5e98
DJ
97622007-12-06 Daniel Jacobowitz <dan@codesourcery.com>
9763
9764 * linux-low.c (linux_wait, linux_resume): Do not handle async I/O.
9765 * remote-utils.c (remote_open): Do not call disable_async_io.
9766 (block_async_io): Delete.
9767 (unblock_async_io): Make static.
9768 (initialize_async_io): New.
9769 * server.c (handle_v_cont): Handle async I/O here.
9770 (myresume): Likewise. Move other common resume tasks here...
9771 (main): ... from here. Call initialize_async_io. Disable async
9772 I/O before the main loop.
9773 * server.h (initialize_async_io): Declare.
9774 (block_async_io, unblock_async_io): Delete prototypes.
9775 * spu-low.c (spu_resume, spu_wait): Do not handle async I/O here.
9776
b79d787e
DJ
97772007-12-06 Mick Davis <mickd@goanna.iinet.net.au>
9778
9779 * remote-utils.c (readchar): Allow binary data in received messages.
9780
d97903b2
PA
97812007-12-03 Pedro Alves <pedro_alves@portugalmail.pt>
9782
9783 * win32-low.c (attaching): New global.
9784 (win32_create_inferior): Clear the `attaching' global.
9785 (win32_attach): Set the `attaching' global.
9786 (get_child_debug_event) [_WIN32_WCE]: Stop the inferior when
9787 attaching. Only set a breakpoint at the entry point if not
9788 attaching.
9789
311de423
PA
97902007-12-03 Pedro Alves <pedro_alves@portugalmail.pt>
9791
9792 * server.c (main): Don't report dll events on the initial
9793 connection on attaches.
9794
6c2d16d2
PA
97952007-12-03 Pedro Alves <pedro_alves@portugalmail.pt>
9796
9797 * server.c (main): Relax numerical bases supported for the pid of
9798 the --attach command line argument.
9799
5ca906e6
PA
98002007-12-03 Pedro Alves <pedro_alves@portugalmail.pt>
9801
9802 * win32-low.c (win32_attach): Call OpenProcess before
9803 DebugActiveProcess, not after. Add last error output to error
9804 call.
9805
9c6c8194
PA
98062007-12-03 Pedro Alves <pedro_alves@portugalmail.pt>
9807
9808 * win32-low.c (win32_get_thread_context)
9809 (win32_set_thread_context): New functions.
9810 (thread_rec): Use win32_get_thread_context.
9811 (continue_one_thread, win32_resume): Use win32_set_thread_context.
9812 * win32-low.h (win32_thread_info) [_WIN32_WCE]: Add `base_context'
9813 field.
9814
4d5d1aaa
PA
98152007-12-03 Leo Zayas
9816 Pedro Alves <pedro_alves@portugalmail.pt>
9817
9818 * win32-low.c (soft_interrupt_requested, faked_breakpoint): New
9819 global variables.
9820 (child_add_thread): Minor cleanup.
9821 (child_continue): Resume artificially suspended threads before
9822 calling ContinueDebugEvent.
9823 (suspend_one_thread): New.
9824 (fake_breakpoint_event): New.
9825 (get_child_debug_event): Change return type to int. Check here if
9826 gdb sent an interrupt request. If a soft interrupt was requested,
9827 fake a breakpoint event. Return 0 if there is no event to handle,
9828 and 1 otherwise.
9829 (win32_wait): Don't check here if gdb sent an interrupt request.
9830 Ensure there is a valid event to handle.
9831 (win32_request_interrupt): Add soft interruption method as last
9832 resort.
9833
c436e841
PA
98342007-12-03 Leo Zayas
9835 Pedro Alves <pedro_alves@portugalmail.pt>
9836
9837 * win32-low.h (win32_thread_info): Add descriptions to the
9838 structure members. Replace `suspend_count' counter by a
9839 `suspended' flag.
9840 * win32-low.c (thread_rec): Update condition of when to get the
9841 context from the inferior. Rely on ContextFlags being set if it
9842 has already been retrieved. Only suspend the inferior thread if
9843 we haven't already. Warn if that fails.
9844 (continue_one_thread): s/suspend_count/suspended/. Only call
9845 ResumeThread once. Warn if that fails.
9846
e7b5fa67
PA
98472007-12-02 Pedro Alves <pedro_alves@portugalmail.pt>
9848
9849 * win32-low.c (win32_wait): Don't read from the inferior when it
9850 has already exited.
9851
a385171d
PA
98522007-12-02 Pedro Alves <pedro_alves@portugalmail.pt>
9853
9854 * Makefile.in (win32_low_h): New variable.
9855 (win32-low.o): Add dependency on $(win32_low_h).
9856 (win32-arm-low.o, win32-i386-low.o): New rules.
9857
f80c84b3
DJ
98582007-11-30 Daniel Jacobowitz <dan@codesourcery.com>
9859
9860 * hostio.c: Correct copyright year.
9861
a6b151f1
DJ
98622007-11-30 Daniel Jacobowitz <dan@codesourcery.com>
9863
9864 * Makefile.in (OBS): Add hostio.o.
9865 (hostio.o): New rule.
9866 * server.h (handle_vFile): Declare.
9867 * hostio.c: New file.
9868 * server.c (handle_v_requests): Take packet_len and new_packet_len
9869 for binary packets. Call handle_vFile.
9870 (main): Update call to handle_v_requests.
9871
f9387fc3
DJ
98722007-11-05 Daniel Jacobowitz <dan@codesourcery.com>
9873
9874 * linux-low.c: Include <sched.h>.
9875
51c2684e
DJ
98762007-11-01 Daniel Jacobowitz <dan@codesourcery.com>
9877
9878 * linux-low.c (linux_tracefork_grandchild): New.
9879 (linux_tracefork_child): Use clone.
9880 (linux_test_for_tracefork): Use clone; allocate and free a stack.
9881
75f83163
JB
98822007-10-31 Joel Brobecker <brobecker@adacore.com>
9883
9884 * Makefile.in: Use $(SHELL) instead of "sh" to call regdat.sh.
9885
da5898ce
DJ
98862007-10-24 Daniel Jacobowitz <dan@codesourcery.com>
9887
9888 * linux-low.c (handle_extended_wait): Handle unexpected signals.
9889
24a09b5f
DJ
98902007-10-23 Daniel Jacobowitz <dan@codesourcery.com>
9891
9892 * inferiors.c (change_inferior_id): Delete.
9893 (add_pid_to_list, pull_pid_from_list): New.
9894 * linux-low.c (PTRACE_SETOPTIONS, PTRACE_GETEVENTMSG)
9895 (PTRACE_O_TRACESYSGOOD, PTRACE_O_TRACEFORK, PTRACE_O_TRACEVFORK)
9896 (PTRACE_O_TRACECLONE, PTRACE_O_TRACEEXEC, PTRACE_O_TRACEVFORKDONE)
9897 (PTRACE_O_TRACEEXIT, PTRACE_EVENT_FORK, PTRACE_EVENT_VFORK)
9898 (PTRACE_EVENT_CLONE, PTRACE_EVENT_EXEC, PTRACE_EVENT_VFORK_DONE)
9899 (PTRACE_EVENT_EXIT, __WALL): Provide default definitions.
9900 (stopped_pids, thread_db_active, must_set_ptrace_flags): New variables.
9901 (using_threads): Always set to 1.
9902 (handle_extended_wait): New.
9903 (add_process): Do not set TID.
9904 (linux_create_inferior): Set must_set_ptrace_flags.
9905 (linux_attach_lwp): Remove TID argument. Do not check using_threads.
9906 Use PTRACE_SETOPTIONS. Call new_thread_notify. Update all callers.
9907 (linux_thread_alive): Rename TID argument to LWPID.
9908 (linux_wait_for_process): Handle unknown processes. Do not use TID.
9909 (linux_wait_for_event): Do not use TID or check using_threads. Update
9910 call to dead_thread_notify. Call handle_extended_wait.
9911 (linux_create_inferior): Use PTRACE_SETOPTIONS.
9912 (send_sigstop): Delete sigstop_sent.
9913 (wait_for_sigstop): Avoid TID.
9914 (linux_supports_tracefork_flag, linux_tracefork_child, my_waitpid)
9915 (linux_test_for_tracefork): New.
9916 (linux_lookup_signals): Use thread_db_active and
9917 linux_supports_tracefork_flag.
9918 (initialize_low): Use thread_db_active and linux_test_for_tracefork.
9919 * linux-low.h (get_process_thread): Avoid TID.
9920 (struct process_ifo): Move thread_known and tid to the end. Remove
9921 sigstop_sent.
9922 (linux_attach_lwp, thread_db_init): Update prototypes.
9923 * server.h (change_inferior_id): Delete prototype.
9924 (add_pid_to_list, pull_pid_from_list): New prototypes.
9925 * thread-db.c (thread_db_use_events): New.
9926 (find_first_thread): Rename to...
9927 (find_one_thread): ...this. Update callers and messages. Do not
9928 call fatal. Check thread_db_use_events. Do not call
9929 change_inferior_id or new_thread_notify.
9930 (maybe_attach_thread): Update. Do not call new_thread_notify.
9931 (thread_db_init): Set thread_db_use_events. Check use_events.
9932 * utils.c (fatal, warning): Correct message prefix.
9933
30ed0a8f
DJ
99342007-10-15 Daniel Jacobowitz <dan@codesourcery.com>
9935
9936 * Makefile.in (clean): Remove new files.
9937 (powerpc-32.o, powerpc-32.c, powerpc-e500.o, powerpc-e500.c)
9938 (powerpc-64.o, powerpc-64.c): New rules.
9939 * configure.srv: Use alternate register sets for powerpc64-*-linux*
9940 with AltiVec, powerpc-*-linux* with AltiVec, and powerpc-*-linux*
9941 with SPE.
9942 * linux-ppc-low.c (ppc_regmap): Do not fetch the FP registers for
9943 SPE targets.
9944 (ppc_cannot_store_register): Do not check for FPSCR for SPE targets.
9945 (PTRACE_GETVRREGS, PTRACE_SETVRREGS, SIZEOF_VRREGS, ppc_fill_vrregset)
9946 (ppc_store_vrregset, PTRACE_GETEVRREGS, PTRACE_SETEVRREGS)
9947 (struct gdb_evrregset_t, ppc_fill_evrregset, ppc_store_evrregset): New.
9948 (target_regsets): Add AltiVec and SPE register sets.
9949 * configure.ac: Check for AltiVec and SPE.
9950 * linux-ppc64-low.c (PTRACE_GETVRREGS, PTRACE_SETVRREGS, SIZEOF_VRREGS)
9951 (ppc_fill_vrregset, ppc_store_vrregset): New.
9952 (target_regsets): Add AltiVec register set.
9953 * configure: Regenerated.
9954
fd462a61
DJ
99552007-09-19 Daniel Jacobowitz <dan@codesourcery.com>
9956
9957 * linux-low.c (O_LARGEFILE): Define.
9958 (linux_read_memory): Use /proc/PID/mem.
9959 * configure.ac: Use AC_GNU_SOURCE. Check for pread64.
9960 * configure, config.in: Regenerated.
9961
69f223ed
DJ
99622007-09-04 Daniel Jacobowitz <dan@codesourcery.com>
9963
9964 * linux-low.c (linux_wait_for_event): Do not pass signals while
9965 single-stepping.
9966
aec18585
PA
99672007-09-03 Pedro Alves <pedro_alves@portugalmail.pt>
9968
9969 * win32-low.c (create_process): New.
9970 (win32_create_inferior): Use create_process instead of
9971 CreateProcess. If create_process failed retry appending an ".exe"
9972 suffix. Store the GetLastError result immediatelly after
9973 create_process calls and use it on the call to error.
9974
34d86ddd
PA
99752007-09-03 Pedro Alves <pedro_alves@portugalmail.pt>
9976
9977 * win32-low.c (handle_load_dll): Don't use toolhelp when waiting.
9978
5a0e3bd0
JB
99792007-08-23 Joel Brobecker <brobecker@adacore.com>
9980
9981 * configure.ac: Switch license to GPLv3.
9982
f88c79e6
MS
99832007-08-01 Michael Snyder <msnyder@access-company.com>
9984
9985 * remote-utils.c (putpkt_binary): Memory leak, free buf2.
9986
6b3d9b83
PA
99872007-07-31 Pedro Alves <pedro_alves@portugalmail.pt>
9988
9989 * win32-low.c (winapi_CloseToolhelp32Snapshot) [_WIN32_WCE]: New
9990 typedef.
9991 (win32_CloseToolhelp32Snapshot) [_WIN32_WCE]: New global var.
9992 (load_toolhelp) [_WIN32_WCE]: Load TOOLHELP.DLL. Get
9993 CloseToolhelp32Snapshot.
9994 (toolhelp_get_dll_name) [_WIN32_WCE]: Close the snapshot with
9995 CloseToolhelp32Snapshot.
9996
c588c53c
MS
99972007-07-27 Michael Snyder <michael.snyder@access-company.com>
9998
9999 * server.c (main): Check for inferior exit before main loop.
10000
aa0403d9
PA
100012007-07-18 Pedro Alves <pedro_alves@portugalmail.pt>
10002
10003 * remote-utils.c (remote_open): Set SO_KEEPALIVE on remote_desc
10004 instead of on tmp_desc.
10005
255e7678
DJ
100062007-07-17 Pedro Alves <pedro_alves@portugalmail.pt>
10007 Daniel Jacobowitz <dan@codesourcery.com>
10008
10009 * inferiors.c (all_dlls, dlls_changed, get_dll): New.
10010 (add_thread): Minor cleanups.
10011 (clear_inferiors): Move lower in the file. Clear the DLL
10012 list.
10013 (free_one_dll, match_dll, loaded_dll, unloaded_dll, clear_list): New.
10014 * remote-utils.c (prepare_resume_reply): Check dlls_changed.
10015 (xml_escape_text): New.
10016 * server.c (handle_query): Handle qXfer:libraries:read. Report it
10017 for qSupported.
10018 (handle_v_cont): Report errors.
10019 (gdbserver_version): Update.
10020 (main): Correct size of own_buf. Do not report initial DLL events.
10021 * server.h (struct dll_info, all_dlls, dlls_changed, loaded_dll)
10022 (unloaded_dll, xml_escape_text): New.
10023 * win32-low.c (enum target_waitkind): Update comments.
10024 (win32_add_one_solib, get_image_name, winapi_EnumProcessModules)
10025 (winapi_GetModuleInformation, winapi_GetModuleFileNameExA)
10026 (win32_EnumProcessModules, win32_GetModuleInformation)
10027 (win32_GetModuleFileNameExA, load_psapi, psapi_get_dll_name)
10028 (winapi_CreateToolhelp32Snapshot, winapi_Module32First)
10029 (winapi_Module32Next, win32_CreateToolhelp32Snapshot)
10030 (win32_Module32First, win32_Module32Next, load_toolhelp)
10031 (toolhelp_get_dll_name, handle_load_dll, handle_unload_dll): New.
10032 (get_child_debug_event): Handle DLL events.
10033 (win32_wait): Likewise.
10034
0d37add9
DJ
100352007-07-12 Daniel Jacobowitz <dan@codesourcery.com>
10036
10037 * configure.srv: Set srv_linux_regsets for sh*-*-linux*.
10038 * linux-sh-low.c (sh_fill_gregset, target_regsets): New.
10039
45e2715e
PA
100402007-07-08 Pedro Alves <pedro_alves@portugalmail.pt>
10041
10042 * win32-low.c (handle_output_debug_string): Ignore event if not
10043 waiting.
10044
c5674cf1
PA
100452007-07-08 Pedro Alves <pedro_alves@portugalmail.pt>
10046
10047 * win32-arm-low.c (arm_wince_breakpoint): Fix typo.
10048
2bbe3cc1
DJ
100492007-07-03 Daniel Jacobowitz <dan@codesourcery.com>
10050
10051 * remote-utils.c (look_up_one_symbol): Handle 'm' packets.
10052
ae13219e
DJ
100532007-07-02 Daniel Jacobowitz <dan@codesourcery.com>
10054
10055 * inferiors.c (change_inferior_id): Add comment.
10056 * linux-low.c (check_removed_breakpoint): Add an early
10057 prototype. Improve debug output.
10058 (linux_attach): Doc update.
10059 (linux_detach_one_process, linux_detach): Clean up before releasing
10060 each process.
10061 (send_sigstop, wait_for_sigstop): Improve comments and debug output.
10062 * linux-low.h (struct process_info): Doc improvement.
10063 * mem-break.c (delete_all_breakpoints): New.
10064 * mem-break.h (delete_all_breakpoints): New prototype.
10065 * thread-db.c (find_first_thread): New.
10066 (thread_db_create_event): Call it instead of
10067 thread_db_find_new_threads. Clean up unused variables.
10068 (maybe_attach_thread): Remove first thread handling.
10069 (thread_db_find_new_threads): Use find_first_thread.
10070 (thread_db_get_tls_address): Likewise.
10071
4105de34
DJ
100722007-06-27 Daniel Jacobowitz <dan@codesourcery.com>
10073
10074 * thread-db.c (thread_db_find_new_threads): Add prototype.
10075 (thread_db_create_event): Check for the main thread before adding
10076 a new thread.
10077 (maybe_attach_thread): Only enable event reporting if TID == 0.
10078 (thread_db_get_tls_address): Check for new threads.
10079
2b876972
DJ
100802007-06-20 Daniel Jacobowitz <dan@codesourcery.com>
10081
10082 * linux-low.c (linux_create_inferior): Try execv before execvp.
10083 * spu-low.c (spu_create_inferior): Likewise.
10084
7a245884
DJ
100852007-06-13 Mike Frysinger <vapier@gentoo.org>
10086
10087 * linux-low.c (linux_create_inferior): Change execv to execvp.
10088 * spu-low.c (spu_create_inferior): Likewies.
10089
117ce543
DJ
100902007-06-13 Daniel Jacobowitz <dan@codesourcery.com>
10091
10092 * Makefile.in (clean): Clean new files instead of deleted ones.
10093 (reg-mips.o, reg-mips.c, reg-mips64.o, reg-mips64.c): Delete.
10094 (mips-linux.o, mips-linux.c, mips64-linux.o, mips64-linux.c): New
10095 rules.
10096 * configure.srv: Specify XML files and new regformats for MIPS and
10097 MIPS64 GNU/Linux.
10098 * linux-mips-low.c (mips_num_regs): Set to only used registers.
10099 (mips_regmap): Do not fetch $0. Remove unused registers. Add
10100 an entry for the restart register.
10101 (mips_cannot_fetch_register, mips_cannot_store_register)
10102 (mips_reinsert_addr, mips_fill_fpregset, mips_store_fpregset): Update
10103 register names to match the XML descriptions.
10104 (mips_fill_gregset, mips_store_gregset): Likewise. Handle the
10105 restart register instead of $0.
10106
0e7f50da
UW
101072007-06-12 Ulrich Weigand <uweigand@de.ibm.com>
10108 Markus Deuling <deuling@de.ibm.com>
10109
10110 * remote-utils.c (decode_xfer_write): New function.
10111 * server.h (decode_xfer_write): Add prototype.
10112 * server.c (handle_query): Add PACKET_LEN argument. Support
10113 qXfer:spu:read and qXfer:spu:write packets.
10114 (main): Pass packet_len to handle_query.
10115 * spu-low.c (spu_target_ops): Add spu_proc_xfer_spu.
10116 * target.h (target_ops): Add qxfer_spu.
10117
374c1d38
UW
101182007-06-12 Ulrich Weigand <uweigand@de.ibm.com>
10119
10120 * spu-low.c (spu_proc_xfer_spu): Do not return failure when
10121 accessing non-seekable spufs files.
10122
bb63802a
UW
101232007-05-16 Markus Deuling <deuling@de.ibm.com>
10124
889bf7c5 10125 * server.c (handle_query): Add reply for qC packet.
bb63802a 10126
7390519e
PA
101272007-05-10 Pedro Alves <pedro_alves@portugalmail.pt>
10128 Leo Zayas <lerele@champenstudios@com>
10129
10130 * server.h (check_remote_input_interrupt_request): New function.
10131 * remote_utils.c (INVALID_DESCRIPTOR): New define.
10132 (remote_desc): Initialize with INVALID_DESCRIPTOR.
10133 (input_interrupt): Expose on USE_WIN32API too. Fix whitespace.
10134 (check_remote_input_interrupt_request): New function.
10135 * server.h (check_remote_input_interrupt_request): Declare.
3ecf0694 10136 * win32-low.c (winapi_DebugBreakProcess,
7390519e
PA
10137 winapi_GenerateConsoleCtrlEvent): New typedefs.
10138 (get_child_debug_event): Lower Win32 debug event polling from 1 sec
10139 to 250 ms.
10140 (win32_wait): Check for remote interrupt request
10141 with check_remote_input_interrupt_request.
10142 (win32_request_interrupt): New function.
10143 (win32_target_op): Set request_interrupt to win32_request_interrupt.
10144
34b34921
PA
101452007-05-10 Pedro Alves <pedro_alves@portugalmail.pt>
10146
10147 * win32-low.c (debug_registers_changed,
10148 debug_registers_used, CONTEXT_EXTENDED_REGISTERS,
10149 CONTEXT_FLOATING_POINT, CONTEXT_DEBUG_REGISTERS,
10150 CONTEXT_DEBUGGER, CONTEXT_DEBUGGER_DR): Delete.
10151 (thread_rec): Get context using the low target.
10152 (child_add_thread): Call thread_added on the low target,
10153 which does the same thing.
10154 (regptr): Delete.
10155 (do_initial_child_stuff): Remove debug registers references.
10156 Set context using the low target. Resume threads after
10157 setting the contexts.
10158 (child_continue): Remove dead variable. Remove debug
10159 registers references.
10160 (child_fetch_inferior_registers): Go through the low target.
10161 (do_child_store_inferior_registers): Remove.
10162 (child_store_inferior_registers): Go through the low target.
10163 (win32_resume): Remove debug registers references.
10164 Set context using the low target.
10165 (handle_exception): Change return type to void. Don't record
10166 context here. Set status to TARGET_WAITKIND_SPURIOUS on a
10167 first chance exception.
889bf7c5 10168 (get_child_debug_event): Change return type to void. Remove
34b34921
PA
10169 goto loop. Always return after waiting for debug event.
10170 (win32_wait): Convert to switch statement. Handle spurious
10171 events.
10172
10173 * win32-i386-low.c (debug_registers_changed,
10174 debug_registers_used): New.
10175 (initial_stuff): Rename to ...
10176 (i386_initial_stuff): ... this. Clear debug registers
10177 state variables.
10178 (store_debug_registers): Delete.
10179 (i386_get_thread_context): New.
10180 (load_debug_registers): Delete.
10181 (i386_set_thread_context): New.
10182 (i386_thread_added): New.
10183 (single_step): Rename to ...
10184 (i386_single_step): ... this.
10185 (do_fetch_inferior_registers): Rename to ...
10186 (i386_fetch_inferior_register): ... this.
10187 (i386_store_inferior_register): New.
10188 (the_low_target): Adapt to new interface.
10189
10190 * win32-arm-low.c (CONTEXT_FLOATING_POINT): Define.
10191 (arm_get_thread_context): New.
10192 (arm_set_thread_context): New.
10193 (regptr): New.
10194 (do_fetch_inferior_registers): Rename to ...
10195 (arm_fetch_inferior_register): ... this.
10196 (arm_store_inferior_register): New.
10197 (arm_wince_breakpoint): Reimplement as unsigned long.
10198 (arm_wince_breakpoint_len): Define.
10199 (the_low_target): Adapt to new interface.
10200
10201 * win32-low.h (target_ops): Remove regmap, store_debug_registers and
10202 load_debug_registers. Add get_thread_context, set_thread_context,
10203 thread_added and store_inferior_register. Rename
10204 fetch_inferior_registers to fetch_inferior_register.
10205 (regptr): Remove declaration.
10206
dd6953e1
PA
102072007-05-10 Pedro Alves <pedro_alves@portugalmail.pt>
10208
10209 * linux-low.c (linux_detach): Change return type to int. Return 0.
10210 * spu-low.c (spu_detach): Likewise.
10211
444d6139
PA
102122007-05-10 Pedro Alves <pedro_alves@portugalmail.pt>
10213
10214 * target.h (target_ops): Change return type of detach to int.
10215 Add join.
10216 (join_inferior): New.
10217 * server.c (main): Don't skip detach support on mingw32.
10218 If the inferior doesn't support detaching return error.
10219 Call join_inferior instead of using waitpid.
10220 * linux-low.c (linux_join): New.
10221 (linux_target_op): Add linux_join.
10222 * spu-low.c (spu_join): New.
10223 (spu_target_ops): Add spu_join.
10224 * win32-low.c (win32_detach): Adapt to new interface.
10225 Reopen current_process_handle before detaching. Issue a child
10226 resume before detaching.
10227 (win32_join): New.
10228 (win32_target_op): Add win32_join.
10229
1d5315fe
PA
102302007-05-10 Pedro Alves <pedro_alves@portugalmail.pt>
10231
10232 * win32-low.c (win32-attach): Fix return value.
10233 * target.h (target_ops): Describe ATTACH return values.
10234
bf914831
PA
102352007-05-10 Pedro Alves <pedro_alves@portugalmail.pt>
10236
10237 * win32-low.c (GETPROCADDRESS): Define.
10238 (winapi_DebugActiveProcessStop): Add WINAPI. typedef as pointer.
10239 (winapi_DebugSetProcessKillOnExit): Likewise.
10240 (win32_create_inferior): Force usage of ansi CreateProcessA.
10241 (win32_attach): Use GETPROCADDRESS.
10242 (win32_detach): Likewise.
10243
f72f3e60
PA
102442007-05-10 Pedro Alves <pedro_alves@portugalmail.pt>
10245
10246 * win32-low.c (win32_wait): Don't use WSTOPSIG.
10247
ed50f18f
PA
102482007-03-30 Pedro Alves <pedro_alves@portugalmail.pt>
10249
10250 * win32-low.c: Commit leftover changes from 2007-03-29.
10251
0c2ead7e
DJ
102522007-03-30 Daniel Jacobowitz <dan@codesourcery.com>
10253
10254 * i387-fp.c (struct i387_fsave, struct i387_fxsave): Make 16-bit
10255 fields short instead of int. Add explicit padding.
10256 (i387_cache_to_fsave): Remove unnecessary casts.
10257 (i387_fsave_to_cache): Doc fix.
10258 (i387_cache_to_fxsave): Remove unnecessary casts and masking.
10259
73725ff3
DJ
102602007-03-30 Daniel Jacobowitz <dan@codesourcery.com>
10261
10262 * i387-fp.c (i387_cache_to_fxsave): Reinitialize val2 before use.
10263 (i387_fxsave_to_cache): Check fp->ftag while building ftag value.
10264
d99f33d8
PA
102652007-03-29 Pedro Alves <pedro_alves@portugalmail.pt>
10266
10267 * configure.srv (arm*-*-mingw32ce*): Move near the other
10268 arm targets.
10269
68070c10
PA
102702007-03-29 Pedro Alves <pedro_alves@portugalmail.pt>
10271
2482afc6 10272 * configure.ac: Add errno checking.
68070c10
PA
10273 (AC_CHECK_HEADERS): Add errno.h, fcntl.h, signal.h,
10274 sys/file.h and malloc.h.
10275 (AC_CHECK_DECLS): Add perror.
10276 (srv_mingwce): Handle.
2482afc6 10277 * configure.srv (i[34567]86-*-cygwin*): Add
68070c10
PA
10278 win32-i386-low.o to srv_tgtobj.
10279 (i[34567]86-*-mingw*): Likewise.
10280 (arm*-*-mingw32ce*): Add case.
10281 * gdbreplay.c [HAVE_SYS_FILE_H, HAVE_SIGNAL_H,
10282 HAVE_FCNTL_H, HAVE_ERRNO_H, HAVE_MALLOC_H]: Check.
10283 [__MINGW32CE__] (strerror): New function.
10284 [__MINGW32CE__] (errno): Define to GetLastError.
10285 [__MINGW32CE__] (COUNTOF): New macro.
10286 (remote_open): Remove extra close call.
10287 * mem-break.c (delete_breakpoint_at): New function.
10288 * mem-break.h (delete_breakpoint_at): Declare.
10289 * remote-utils.c [HAVE_SYS_FILE_H, HAVE_SIGNAL_H,
10290 HAVE_FCNTL_H, HAVE_UNISTD_H, HAVE_ERRNO_H]: Check.
10291 [USE_WIN32API] (read, write): Add char* casts.
10292 * server.c [HAVE_UNISTD_H, HAVE_SIGNAL_H]: Check.
10293 * server.h: Include wincecompat.h on Windows CE.
10294 [HAVE_ERRNO_H]: Check.
10295 (perror): Declare if not declared.
10296 * utils.c: Add stdlib.h, errno.h and malloc.h includes.
10297 (perror_with_name): Remove errno declaration.
10298 * wincecompat.h: New.
10299 * wincecompat.c: New.
10300 * win32-low.h: New.
10301 * win32-arm-low.c: New.
10302 * win32-i386-low.c: New.
10303 (win32-low.c): Include mem-break.h and win32-low.h, and winnt.h.
10304 (OUTMSG2): Make it safe.
10305 (_T): New macro.
10306 (COUNTOF): New macro.
10307 (NUM_REGS): Get it from the low target.
10308 (CONTEXT_EXTENDED_REGISTERS, CONTEXT_FLOATING_POINT,
10309 CONTEXT_DEBUG_REGISTERS): Add fallbacks to 0.
10310 (thread_rec): Let low target handle debug registers.
10311 (child_add_thread): Likewise.
10312 (child_init_thread_list): Likewise.
10313 (continue_one_thread): Likewise.
10314 (regptr): New.
10315 (do_child_fetch_inferior_registers): Move to ...
10316 * win32-i386-low.c: ... here, and rename to ...
10317 (do_fetch_inferior_registers): ... this.
889bf7c5 10318 * win32-low.c (child_fetch_inferior_registers):
68070c10
PA
10319 Go through the low target.
10320 (do_child_store_inferior_registers): Use regptr.
10321 (strwinerror): New function.
10322 (win32_create_inferior): Handle Windows CE.
10323 Use strwinerror instead of strerror on Windows error
10324 codes. Add program to the error output.
10325 Don't close the main thread handle on Windows CE.
10326 (win32_attach): Use coredll.dll on Windows CE.
10327 (win32_kill): Close current process and current
10328 thread handles.
10329 (win32_detach): Use coredll.dll on Windows CE.
10330 (win32_resume): Let low target handle debug registers, and
10331 step request.
10332 (handle_exception): Add/Remove initial breakpoint. Avoid
10333 non-existant WSTOPSIG on Windows CE.
10334 (win32_read_inferior_memory): Cast to remove warning.
10335 (win32_arch_string): Go through the low target.
10336 (initialize_low): Call set_breakpoint_data with the low
10337 target's breakpoint.
10338 * win32-low.c (dr, FLAG_TRACE_BIT, FCS_REGNUM,
10339 FOP_REGNUM, mappings): Move to ...
10340 * win32-i386-low.c: ... here.
10341 * win32-low.c (win32_thread_info): Move to ...
10342 * win32-low.h: ... here.
10343 * Makefile.in (SFILES): Add win32-low.c, win32-i386-low.c,
10344 win32-arm-low.c and wincecompat.c.
10345 (all:): Add $EXEEXT.
10346 (install-only:): Likewise.
10347 (gdbserver:): Likewise.
10348 (gdbreplay:): Likewise.
10349 * config.in: Regenerate.
10350 * configure: Regenerate.
10351
41093d81
PA
103522007-03-28 Pedro Alves <pedro_alves@portugalmail.pt>
10353
10354 * win32-low.c: Rename typedef thread_info to
10355 win32_thread_info throughout.
10356
544afa54
PA
103572007-03-28 Pedro Alves <pedro_alves@portugalmail.pt>
10358
10359 * win32-i386-low.c: Rename to ...
10360 * win32-low.c: ... this.
10361 * configure.srv: Replace win32-i386-low.o with win32-low.o.
10362 * Makefile.in: Likewise.
10363
bce7165d
PA
103642007-03-27 Pedro Alves <pedro_alves@portugalmail.pt>
10365
10366 * remote-utils.c (monitor_output): Constify msg parameter.
10367 * server.h (monitor_output): Likewise.
10368 * win32-i386-low.c (handle_output_debug_string): New.
10369 (win32_kill): Handle OUTPUT_DEBUG_STRING_EVENT events using
10370 handle_output_debug_string.
10371 (get_child_debug_event): Likewise.
10372
506c7aa0
DJ
103732007-03-27 Mat Hostetter <mat@lcs.mit.edu>
10374
10375 * server.c (main): Correct strtoul check.
10376
42c81e2a
DJ
103772007-03-27 Jon Ringle <jon@ringle.org>
10378
10379 * linux-low.c: Check __ARCH_HAS_MMU__ also.
10380
9453113a
DJ
103812007-03-27 Brooks Moses <brooks.moses@codesourcery.com>
10382
10383 * Makefile.in: Add dummy "pdf" and "install-pdf" targets.
10384
64a69107
DJ
103852007-02-27 Daniel Jacobowitz <dan@codesourcery.com>
10386
10387 * terminal.h: Check HAVE_SGTTY_H.
10388
103892007-02-27 Mat Hostetter <mat@lcs.mit.edu>
6f8486da
DJ
10390
10391 * remote-utils.c (remote_open): Print out the assigned port number.
10392
c74d0ad8
DJ
103932007-02-26 Daniel Jacobowitz <dan@codesourcery.com>
10394
10395 * remote-utils.c (monitor_output): New function.
10396 * server.c (debug_threads): Define here.
10397 (monitor_show_help): New function.
10398 (handle_query): Handle qRcmd.
10399 (main): Do not handle 'd' packet.
10400 * server.h (debug_threads, remote_debug, monitor_output): Declare.
10401 * linux-low.c, spu-low.c, win32-i386-low.c: Remove definitions
10402 of debug_threads.
10403
de7c3b4a
PA
104042007-02-25 Pedro Alves <pedro_alves@portugalmail.pt>
10405
10406 * Makefile.in (EXEEXT): New.
10407 (clean): Use $(EXEEXT).
10408
ef57601b
PA
104092007-02-25 Pedro Alves <pedro_alves@portugalmail.pt>
10410
10411 * target.h (target_ops): Rename send_signal to request_interrupt,
10412 and remove enum target_signal parameter.
10413 * linux-low.c (linux_request_interrupt): Rename from
10414 linux_send_signal, and always send SIGINT.
10415 * spu-low.c (spu_request_interrupt): Rename from spu_send_signal,
10416 and always send SIGINT.
10417 * remote-utils.c (putpkt_binary): Call request_interrupt, instead
10418 of send_signal.
10419 (input_interrupt): Likewise.
10420
820f2bda
PA
104212007-02-25 Pedro Alves <pedro_alves@portugalmail.pt>
10422
10423 * server.c (get_features_xml): Check if target implemented
10424 arch_string.
10425 * win32-i386-low.c (win32_arch_string): New.
10426 (win32_target_ops): Add win32_arch_string as arch_string member.
10427
ab39bf24
UW
104282007-02-22 Markus Deuling <deuling@de.ibm.com>
10429
10430 * spu-low.c (spu_arch_string): New.
10431 (spu_target_ops): Add spu_arch_string.
10432
61ff6e04
DJ
104332007-02-16 Daniel Jacobowitz <dan@codesourcery.com>
10434
10435 * remote-utils.c: Remove HAVE_TERMINAL_H check.
10436 * configure.ac: Do not check for terminal.h.
10437 * configure, config.in: Regenerated.
10438
fb1e4ffc
DJ
104392007-02-08 Daniel Jacobowitz <dan@codesourcery.com>
10440
10441 * Makefile.in (OBS): Add $(XML_BUILTIN).
10442 (XML_DIR, XML_TARGET, XML_FILES, XML_BUILTIN): New.
10443 (clean): Update.
10444 (target.xml, xml-builtin.c, stamp-xml, arm-with-iwmmxt.o)
10445 (arm-with-iwmmxt.c): New.
10446 * config.in, configure: Regenerate.
10447 * configure.ac: Check for iWMMXt. Handle srv_xmltarget,
10448 srv_xmlbuiltin, and srv_xmlfiles. Define USE_XML.
10449 * configure.srv: Mention srv_xmltarget and srv_xmlfiles.
10450 (arm*-*-linux*): Add iWMMXt and regset support.
10451 * linux-arm-low.c (PTRACE_GETWMMXREGS, PTRACE_SETWMMXREGS): Define.
10452 (arm_fill_gregset, arm_store_gregset, arm_fill_wmmxregset)
10453 (arm_store_wmmxregset, target_regsets): New.
10454 * server.c (get_features_xml): Take annex argument. Check builtin
10455 XML documents.
10456 (handle_query): Handle multiple annexes.
10457
0f48aa01
DJ
104582007-01-29 Daniel Jacobowitz <dan@codesourcery.com>
10459
10460 * remote-utils.c [USE_WIN32API] (read, write): Define.
10461 (putpkt_binary, input_interrupt, readchar, getpkt): Use read and
10462 write.
10463
23181151
DJ
104642007-01-09 Daniel Jacobowitz <dan@codesourcery.com>
10465
10466 * linux-i386-low.c (the_low_target): Set arch_string.
10467 * linux-x86-64-low.c (the_low_target): Likewise.
10468 * linux-low.c (linux_arch_string): New.
10469 (linux_target_ops): Add it.
10470 * linux-low.h (struct linux_target_ops): Add arch_string.
10471 * server.c (write_qxfer_response): Use const void * for DATA.
10472 (get_features_xml): New.
10473 (handle_query): Handle qXfer:features:read. Report it for qSupported.
10474 * target.h (struct target_ops): Add arch_string method.
10475
9d606399
DJ
104762007-01-03 Denis Pilat <denis.pilat@st.com>
10477 Daniel Jacobowitz <dan@codesourcery.com>
10478
10479 * linux-low.c (linux_kill): Handle being called with no threads.
10480 * win32-i386-low.c (win32_kill): Likewise.
10481 (get_child_debug_event): Clear current_process_handle.
10482
104832006-12-30 Denis PILAT <denis.pilat@st.com>
8264bb58
DJ
10484 Daniel Jacobowitz <dan@codesourcery.com>
10485
10486 * remote-utils.c (remote_open): Check the type of specified
10487 serial port devices before opening them.
10488 * server.c (main): Kill the inferior if an error occurs during
10489 the first remote_open.
10490
a5e13d24
DJ
104912006-12-05 Markus Deuling <deuling@de.ibm.com>
10492
10493 * README: Update supported targets.
10494
186947f7
DJ
104952006-11-28 Daniel Jacobowitz <dan@codesourcery.com>
10496
10497 * Makefile.in (clean): Remove reg-mips64.c.
10498 (reg-mips64.c, reg-mips64.o): New rules.
10499 * configure.srv: Handle mips64. Include regset support for mips.
10500 * linux-mips-low.c (union mips_register): New.
10501 (mips_get_pc, mips_set_pc, mips_reinsert_addr): Use it.
10502 (mips_breakpoint, mips_breakpoint_at): Use int.
10503 (mips_collect_register, mips_supply_register)
10504 (mips_collect_register_32bit, mips_supply_register_32bit)
10505 (mips_fill_gregset, mips_store_gregset, mips_fill_fpregset)
10506 (mips_store_fpregset, target_regsets): New.
10507 * thread-db.c (thread_db_get_tls_address): Use uintptr_t.
10508
a13e2c95
UW
105092006-11-22 Ulrich Weigand <uweigand@de.ibm.com>
10510
10511 * configure.srv: Add target "spu*-*-*".
10512 * Makefile.in (clean): Remove reg-spu.c.
10513 (reg-spu.c, reg-spu.o, spu-low.o): Add dependencies.
10514 * spu-low.c: New file.
10515
cb7283db
DJ
105162006-11-16 Daniel Jacobowitz <dan@codesourcery.com>
10517
10518 * configure.ac: Correct td_thr_tls_get_addr test.
10519 * configure: Regenerated.
10520
89be2091
DJ
105212006-11-16 Daniel Jacobowitz <dan@codesourcery.com>
10522
10523 * linux-low.c (linux_wait_for_event): Reformat. Use the
10524 pass_signals array.
10525 * remote-utils.c (decode_address_to_semicolon): New.
10526 * server.c (pass_signals, handle_general_set): New.
10527 (handle_query): Mention QPassSignals for qSupported.
10528 (main): Call handle_general_set.
10529 * server.h (pass_signals, decode_address_to_semicolon): New.
10530
000ef4f0
DJ
105312006-11-06 Daniel Jacobowitz <dan@codesourcery.com>
10532
10533 * server.c (handle_query): Correct error handling for read_auxv.
10534
b7149293
UW
105352005-10-19 Ulrich Weigand <uweigand@de.ibm.com>
10536
10537 * configure.srv [s390-*-linux*, s390x-*-linux*]: Set srv_linux_regsets
10538 and srv_linux_thread_db to yes.
10539 * linux-s390-low.c (s390_fill_gregset): New function.
10540 (target_regsets): Define data structure.
10541
dae5f5cf
DJ
105422006-10-17 Daniel Jacobowitz <dan@codesourcery.com>
10543
10544 * acinclude.m4 (SRV_CHECK_TLS_GET_ADDR): New.
10545 * configure.ac: Use it. Define HAVE_TD_THR_TLS_GET_ADDR.
10546 * config.in, configure: Regenerated.
10547 * inferiors.c (gdb_id_to_thread): New function.
10548 (gdb_id_to_thread_id): Use it.
10549 * linux-low.c (linux_target_ops): Use thread_db_get_tls_address.
10550 * linux-low.h (struct process_info): Add th member.
10551 (thread_db_get_tls_address): New prototype.
10552 * remote-utils.c (decode_address): Make non-static.
10553 * server.c (handle_query): Handle qGetTLSAddr.
10554 * server.h (gdb_id_to_thread, decode_address): New prototypes.
10555 * target.h (struct target_ops): Add get_tls_address.
10556 * thread-db.c (maybe_attach_thread): Save the thread handle.
10557 (thread_db_get_tls_address): New.
10558
32ca6d61
DJ
105592006-09-28 Daniel Jacobowitz <dan@codesourcery.com>
10560
10561 * linux-low.c (PTRACE_GETSIGINFO, PTRACE_SETSIGINFO): Define.
10562 (linux_resume_one_process): Take a siginfo_t *. Update all
10563 callers. Queue it if necessary. Use PTRACE_SETSIGINFO.
10564 (struct pending_signals): Add a siginfo_t.
10565 (linux_wait_for_process): Always set last_status.
10566 (linux_wait_for_event): Use PTRACE_GETSIGINFO.
10567 (linux_queue_one_thread): Use PTRACE_GETSIGINFO.
10568 * linux-low.h (struct process_info): Add last_status.
10569
5ffff7c1
DJ
105702006-09-21 Daniel Jacobowitz <dan@codesourcery.com>
10571
10572 * remote-utils.c (try_rle): New function.
10573 (putpkt_binary): Use it.
10574
8695c747
DJ
105752006-08-19 Daniel Jacobowitz <dan@codesourcery.com>
10576
10577 * Makefile.in (clean): Clean reg-x86-64-linux.c.
10578 (reg-x86-64-linux.o, reg-x86-64-linux.c): New.
10579 * configure.srv (x86_64-*-linux*): Use reg-x86-64-linux.o.
10580 * linux-x86-64-low.c (x86_64_regmap): Include ORIG_RAX.
10581 (x86_64_fill_gregset, x86_64_store_gregset): Skip floating
10582 point registers.
10583
290fadea
RS
105842006-08-08 Richard Sandiford <richard@codesourcery.com>
10585
10586 * server.c (terminal_fd): New variable.
10587 (old_foreground_pgrp): Likewise.
10588 (restore_old_foreground_pgrp): New function.
10589 (start_inferior): Record the terminal file descriptor in terminal_fd
10590 and its original foreground group in old_foreground_pgrp. Register
10591 restore_old_foreground_pgrp with atexit().
10592
9f2e1e63
DJ
105932006-07-26 Daniel Jacobowitz <dan@codesourcery.com>
10594
10595 * server.c (handle_query): Correct qPart to qXfer.
10596
b80864fb
DJ
105972006-07-22 Daniel Jacobowitz <dan@codesourcery.com>
10598
10599 * configure.ac: Check for more headers which are missing on
10600 Windows. Automatically supply -lwsock32 and USE_WIN32API.
10601 * configure.srv: Add Cygwin and mingw32.
10602 * remote-utils.c: Don't include headers unconditionally which
10603 are missing on mingw32. Include <winsock.h> for mingw32.
10604 (remote_open): Adjust for mingw32 support. Flush
10605 standard error after writing to it.
10606 (remote_close, putpkt_binary, input_interrupt, block_async_io)
10607 (unblock_async_io, enable_async_io, disable_async_io)
10608 (readchar, getpkt): Update for Winsock support.
10609 (prepare_resume_reply): Expect a protocol signal number.
10610 * server.c: Disable <sys/wait.h> on mingw32.
10611 (start_inferior): Adjust for mingw32 support. Flush
10612 standard error after writing to it.
10613 (attach_inferior): Likewise. Use protocol signal
10614 numbers.
10615 (main): Skip 'D' packet on mingw32. Use protocol signal numbers
10616 and names.
10617 * win32-i386-low.c: New file.
10618 * Makefile.in (XM_CLIBS): Set.
10619 (gdbserver, gdbreplay): Use $(INTERNAL_CFLAGS).
10620 (win32-i386-low.o): New dependency rule.
10621 * linux-low.c (linux_wait): Use target signal numbers.
10622 * target.h (struct target_ops): Doc fix.
10623 * server.h (target_signal_to_name): New prototype.
10624 * gdbreplay.c: Don't include headers unconditionally which
10625 are missing on mingw32. Include <winsock.h> for mingw32.
10626 (remote_close, remote_open): Adjust for Winsock support.
10627 * configure, config.in: Regenerated.
10628
0876f84a
DJ
106292006-07-12 Daniel Jacobowitz <dan@codesourcery.com>
10630
10631 * server.c (decode_xfer_read, write_qxfer_response): New.
10632 (handle_query): Take a packet length argument. Handle
10633 qXfer:auxv:read instead of qPart:auxv:read. Mention it in
10634 the qSupported response.
10635 (main): Update call to handle_query.
10636
01f9e8fa
DJ
106372006-06-22 Daniel Jacobowitz <dan@codesourcery.com>
10638
10639 * remote-utils.c (remote_escape_output, remote_unescape_input): New.
10640 (putpkt_binary): Renamed from putpkt and adjusted for binary
10641 data.
10642 (putpkt): New wrapper for putpkt_binary.
10643 (readchar): Don't mask off the high bit.
10644 (decode_X_packet): New function.
10645 * server.c (main): Call putpkt_binary if a handler sets the packet
10646 length. Save the length of the incoming packet. Handle 'X'.
10647 * server.h (gdb_byte, remote_escape_output, decode_X_packet): New.
10648
be2a5f71
DJ
106492006-06-21 Daniel Jacobowitz <dan@codesourcery.com>
10650
10651 * server.c (handle_query): Handle qSupported.
10652
ea025f5f
DJ
106532006-05-30 Daniel Jacobowitz <dan@codesourcery.com>
10654
10655 * remote-utils.c (all_symbols_looked_up): New variable.
10656 (look_up_one_symbol): Check it.
10657 * server.h (look_up_one_symbol): New declaration.
10658 * thread-db.c (thread_db_init): Set all_symbols_looked_up.
10659
9308fc88
DJ
106602006-05-30 Daniel Jacobowitz <dan@codesourcery.com>
10661
10662 * Makefile.in (linux-arm-low.o): Update dependencies.
66f338c7 10663 * linux-arm-low.c: Include "gdb_proc_service.h".
9308fc88
DJ
10664 (PTRACE_GET_THREAD_AREA): Define.
10665 (ps_get_thread_area): New function.
10666
52fb6437
NS
106672006-05-09 Nathan Sidwell <nathan@codesourcery.com>
10668
10669 * configure.srv (m68k*-*-uclinux*): New target.
10670 * linux-low.c (linux_create_inferior): Use vfork on mmuless systems.
10671 (linux_resume_one_process): Remove extraneous cast.
10672 (linux_read_offsets): New.
10673 (linux_target_op): Add linux_read_offsets on mmuless systems.
10674 * server.c (handle_query): Add qOffsets logic.
10675 * target.h (struct target_ops): Add read_offsets.
10676
21b0f40c
DJ
106772006-03-15 Daniel Jacobowitz <dan@codesourcery.com>
10678
10679 * linux-mips-low.c: Include <sys/ptrace.h> and "gdb_proc_service.h".
10680 (PTRACE_GET_THREAD_AREA): Define.
10681 (ps_get_thread_area): New function.
10682 * Makefile.in (linux-i386-low.o, linux-mips-low.o)
10683 (linux-x86-64-low.o): Update.
10684
0050a760
DJ
106852006-03-15 Daniel Jacobowitz <dan@codesourcery.com>
10686
10687 * configure.ac: Remove checks for prfpregset_t.
10688 * gdb_proc_service.h: New file.
10689 * linux-i386-low.c, linux-x86-64-low.c, thread-db.c: Use the
10690 new "gdb_proc_service.h".
10691 * proc-service.c: Likewise.
10692 (ps_pglobal_lookup, ps_pdread, ps_pdwrite): Use psaddr_t.
10693 (ps_lgetfpregs, ps_lsetfpregs): Use a void* argument.
10694 * Makefile.in (gdb_proc_service_h): Updated.
10695 * configure, config.in: Regenerated.
10696
b92a518e
DJ
106972006-03-03 Daniel Jacobowitz <dan@codesourcery.com>
10698
10699 * remote-utils.c (prepare_resume_reply): Move declaration
10700 of gdb_id_from_wait to the top of the block.
10701
545587ee
DJ
107022006-02-15 Daniel Jacobowitz <dan@codesourcery.com>
10703
10704 * linux-low.c (regsets_store_inferior_registers): Read the regset
10705 from the target before filling it.
10706
9db87ebd
DJ
107072006-02-08 Daniel Jacobowitz <dan@codesourcery.com>
10708
10709 * server.c (attach_inferior): Return SIGTRAP for a successful
10710 attach.
10711
dd24457d
DJ
107122006-02-01 Daniel Jacobowitz <dan@codesourcery.com>
10713
10714 * Makefile.in (OBS): Add version.o.
10715 (STAGESTUFF): Delete.
10716 (version.o): Add dependencies.
10717 (version.c): Replace rule.
10718 (clean): Remove version.c.
10719 * server.c (gdbserver_version): New.
10720 (gdbserver_usage): Use printf.
10721 (main): Handle --version and --help.
10722 * server.h (version, host_name): Add declarations.
10723
6f0f660e
EZ
107242005-12-23 Eli Zaretskii <eliz@gnu.org>
10725
889bf7c5
PA
10726 * linux-arm-low.c:
10727 * linux-arm-low.c:
10728 * inferiors.c:
10729 * i387-fp.h:
10730 * i387-fp.c:
10731 * gdbreplay.c:
10732 * regcache.c:
10733 * proc-service.c:
10734 * mem-break.h:
10735 * mem-break.c:
10736 * linux-x86-64-low.c:
10737 * linux-sh-low.c:
10738 * linux-s390-low.c:
10739 * linux-ppc64-low.c:
10740 * linux-ppc-low.c:
10741 * linux-mips-low.c:
10742 * linux-m68k-low.c:
10743 * linux-m32r-low.c:
10744 * linux-low.h:
10745 * linux-low.c:
10746 * linux-ia64-low.c:
10747 * linux-i386-low.c:
10748 * linux-crisv32-low.c:
10749 * thread-db.c:
10750 * terminal.h:
10751 * target.h:
10752 * target.c:
10753 * server.h:
10754 * server.c:
10755 * remote-utils.c:
10756 * regcache.h:
10757 * utils.c:
10758 * Makefile.in:
10759 * configure.ac:
6f0f660e
EZ
10760 * gdbserver.1: Add (C) after Copyright. Update the FSF
10761 address.
10762
9d1fb177
DJ
107632005-11-13 Daniel Jacobowitz <dan@codesourcery.com>
10764
10765 * linux-arm-low.c (arm_eabi_breakpoint): New variable.
10766 (arm_breakpoint_at): Recognize both breakpoints.
10767 (the_low_target): Use the correct breakpoint instruction.
10768
011a70c2
DJ
107692005-11-02 Daniel Jacobowitz <dan@codesourcery.com>
10770
10771 * configure.srv (x86_64-*-linux*): Turn on thread_db support.
10772 * linux-x86-64-low.c (x86_64_breakpoint, x86_64_breakpoint_len)
10773 (x86_64_get_pc, x86_64_set_pc, x86_64_breakpoint_at): New.
10774 (the_low_target): Update.
10775
7fb85e41
AS
107762005-10-25 Andreas Schwab <schwab@suse.de>
10777
10778 * server.c (main): Allocate mem_buf with PBUFSIZ bytes.
10779
10780 * linux-ia64-low.c (ia64_regmap): Remove NAT registers.
10781 (ia64_num_regs): Reduce to 462.
10782
3db0444b
DJ
107832005-09-17 Daniel Jacobowitz <dan@codesourcery.com>
10784
10785 * acinclude.m4: Correct quoting.
10786 * aclocal.m4: Regenerated.
10787
10788 Suggested by SZOKOVACS Robert <szo@ies.hu>:
10789 * thread-db.c (thread_db_err_str): Handle TD_VERSION.
10790 (thread_db_init): Call thread_db_err_str.
10791 * configure.ac: Check for TD_VERSION.
10792 * config.in, configure: Regenerated.
10793
bee0189a
DJ
107942005-07-31 Kaveh R. Ghazi <ghazi@caip.rutgers.edu>
10795
10796 * server.h (error, fatal, warning): Add ATTR_FORMAT.
10797
e9d25b98
DJ
107982005-07-13 Daniel Jacobowitz <dan@codesourcery.com>
10799
10800 * configure.ac: Define HAVE_LINUX_REGSETS even if PTRACE_GETREGS
10801 is not available. Define HAVE_PTRACE_GETREGS if it is.
10802 * config.in, configure: Regenerated.
10803 * configure.srv: Set srv_linux_regsets for PowerPC and PowerPC64.
10804 * linux-i386-low.c, linux-m68k-low.c: Update to use
10805 HAVE_PTRACE_GETREGS.
10806 * linux-low.c (regsets_fetch_inferior_registers)
10807 (regsets_store_inferior_registers): Only return 0 if we processed
10808 GENERAL_REGS.
10809 * linux-ppc-low.c (ppc_fill_gregset, target_regsets): New.
10810 * linux-ppc64-low.c (ppc_fill_gregset, target_regsets): New.
10811
a06660f7
DJ
108122005-07-13 Daniel Jacobowitz <dan@codesourcery.com>
10813
10814 * inferiors.c (struct thread_info): Add gdb_id.
10815 (add_thread): Add gdb_id argument.
10816 (thread_id_to_gdb_id, thread_to_gdb_id, gdb_id_to_thread_id): New.
10817 * linux-low.c (linux_create_inferior, linux_attach_lwp): Update
10818 calls to add_thread.
10819 * remote-utils.c (prepare_resume_reply: Use thread_to_gdb_id.
10820 * server.c (handle_query): Use thread_to_gdb_id.
10821 (handle_v_cont, main): Use gdb_id_to_thread_id.
10822 * server.h (add_thread): Update prototype.
10823 (thread_id_to_gdb_id, thread_to_gdb_id, gdb_id_to_thread_id): New
10824 prototypes.
10825
5a1f5858
DJ
108262005-07-13 Daniel Jacobowitz <dan@codesourcery.com>
10827
10828 * linux-low.c (fetch_register, usr_store_inferior_registers): Handle
10829 left-padded registers.
10830 * linux-low.h (struct linux_target_ops): Add left_pad_xfer.
10831 * linux-ppc64-low.c (the_low_target): Set left_pad_xfer.
10832
e122f1f5
SE
108332005-07-01 Steve Ellcey <sje@cup.hp.com>
10834
10835 * configure.ac (BFD_NEED_DECLARATION): Replace with AC_CHECK_DECLS.
10836 * configure: Regenerate.
10837 * config.in: Regenerate.
10838 * server.h (NEED_DECLARATION_STRERROR):
10839 Replace with !HAVE_DECL_STRERROR.
10840
d592fa2f
DJ
108412005-06-16 Daniel Jacobowitz <dan@codesourcery.com>
10842
10843 * linux-low.c (linux_wait, linux_send_signal): Don't test
10844 an unsigned long variable for > 0 if it could be MAX_ULONG.
10845 * server.c (myresume): Likewise.
10846 * target.c (set_desired_inferior): Likewise.
10847
ccbd4912
MK
108482005-06-13 Mark Kettenis <kettenis@gnu.org>
10849
10850 * configure.ac: Simplify and improve check for socklen_t.
10851 * configure, config.in: Regenerate.
10852
f450004a
DJ
108532005-06-12 Daniel Jacobowitz <dan@codesourcery.com>
10854
10855 * acconfig.h: Remove.
10856 * configure.ac: Add a test for socklen_t. Use three-argument
10857 AC_DEFINE throughout.
10858 * config.in: Regenerated using autoheader 2.59.
10859 * configure: Regenerated.
10860
10861 * gdbreplay.c (socklen_t): Provide a default.
10862 (remote_open): Use socklen_t.
10863 * remote-utils.c (socklen_t): Provide a default.
10864 (remote_open): Use socklen_t.
10865 (convert_int_to_ascii, convert_ascii_to_int, decode_M_packet): Use
10866 unsigned char.
10867
10868 * i387-fp.c (struct i387_fsave, struct i387_fxsave): Use unsigned
10869 char for buffers.
10870 * linux-low.c (linux_read_memory, linux_write_memory)
10871 (linux_read_auxv): Likewise.
10872 * mem-break.c (breakpoint_data, set_breakpoint_data, check_mem_read)
10873 (check_mem_write): Likewise.
10874 * mem-break.h (set_breakpoint_data, check_mem_read, check_mem_write):
10875 Likewise.
10876 * regcache.c (struct inferior_rgcache_data, registers_to_string)
10877 (registers_from_string, register_data): Likewise.
10878 * server.c (handle_query, main): Likewise.
10879 * server.h (convert_ascii_to_int, convert_int_to_ascii)
10880 (decode_M_packet): Likewise.
10881 * target.c (read_inferior_memory, write_inferior_memory): Likewise.
10882 * target.h (struct target_ops): Update read_memory, write_memory,
10883 and read_auxv.
10884 (read_inferior_memory, write_inferior_memory): Update.
10885 * linux-low.h (struct linux_target_ops): Change type of breakpoint
10886 to unsigned char *.
10887 * linux-arm-low.c, linux-cris-low.c, linux-crisv32-low.c,
10888 linux-i386-low.c, linux-m32r-low.c, linux-m68k-low.c,
10889 linux-mips-low.c, linux-ppc-low.c, linux-ppc64-low.c,
10890 linux-s390-low.c, linux-sh-low.c: Update for changes in
10891 read_inferior_memory and the_low_target->breakpoint.
10892
eee84df1
DJ
108932005-05-28 Daniel Jacobowitz <dan@codesourcery.com>
10894
10895 * Makefile.in (SFILES): Add linux-ppc64-low.c.
10896 (linux-ppc64-low.o, reg-ppc64.c, reg-ppc64.o): New targets.
10897 * configure.srv: Add powerpc64-*-linux*.
10898 * linux-ppc64-low.c: New file.
10899
45b134e5
OF
109002005-05-23 Orjan Friberg <orjanf@axis.com>
10901
10902 * linux-cris-low.c: New file with support for CRIS.
10903 * linux-crisv32-low.c: Ditto for CRISv32.
10904 * Makefile.in (SFILES): Add linux-cris-low.c, linux-crisv32-low.c.
10905 (clean): Add reg-cris.c and reg-crisv32.c.
889bf7c5 10906 Add linux-cris-low.o, linux-crisv32-low.o, reg-cris.o, reg-cris.c,
45b134e5
OF
10907 reg-crisv32.o, and reg-crisv32.c to make rules.
10908 * configure.srv: Add cris-*-linux* and crisv32-*-linux* to list of
10909 recognized targets.
10910
48d93c75
UW
109112005-05-16 Ulrich Weigand <uweigand@de.ibm.com>
10912
10913 * linux-low.c (fetch_register): Ensure buffer size is a multiple
10914 of sizeof (PTRACE_XFER_TYPE).
10915 (usr_store_inferior_registers): Likewise. Zero out excess bytes.
10916
e013ee27
OF
109172005-05-12 Orjan Friberg <orjanf@axis.com>
10918
889bf7c5 10919 * target.h (struct target_ops): Add insert_watchpoint,
e013ee27
OF
10920 remove_watchpoint, stopped_by_watchpoint, stopped_data_address function
10921 pointers for hardware watchpoint support.
10922 * linux-low.h (struct linux_target_ops): Ditto.
10923 * linux-low.c (linux_insert_watchpoint, linux_remove_watchpoint)
10924 (linux_stopped_by_watchpoint, linux_stopped_data_address): New. Add
10925 to linux_target_ops.
10926 * remote-utils.c (prepare_resume_reply): Add watchpoint information to
10927 reply packet.
10928 * server.c (main): Recognize 'Z' and 'z' packets.
10929
b0ded00b
UW
109302005-05-10 Ulrich Weigand <uweigand@de.ibm.com>
10931
10932 * linux-s390-low.c (s390_breakpoint, s390_breakpoint_len): Define.
10933 (s390_get_pc, s390_set_pc, s390_breakpoint_at): New functions.
10934 (the_low_target): Add new members.
10935
8643e2ad
DJ
109362005-05-04 Daniel Jacobowitz <dan@codesourcery.com>
10937
10938 * proc-service.c (ps_lgetregs): Search all_processes instead of
10939 all_threads.
10940
fc620387
DJ
109412005-05-04 Daniel Jacobowitz <dan@codesourcery.com>
10942
10943 * server.c (start_inferior): Change return type to int.
10944 (attach_inferior): Change sigptr to int *.
10945 (handle_v_cont, handle_v_requests): Change signal to int *.
10946 (main): Change signal to int.
10947
109482005-04-15 Kei Sakamoto <sakamoto.kei@renesas.com>
7cfbc4a0
KI
10949
10950 * Makefile.in: Add linux-m32r-low.o, reg-m32r.c and reg-m32r.o.
10951 * configure.srv: Add m32r*-*-linux*.
10952 * linux-m32r-low.c: New file.
10953
e0e76420
DJ
109542005-03-04 Daniel Jacobowitz <dan@codesourcery.com>
10955
10956 * Makefile.in (stamp-h): Set CONFIG_HEADERS explicitly.
10957
a1928bad
DJ
109582005-03-03 Daniel Jacobowitz <dan@codesourcery.com>
10959
10960 * inferiors.c (change_inferior_id, add_thread, find_inferior_id):
10961 Take unsigned long arguments for PIDs.
10962 * linux-low.c (add_process, linux_attach_lwp, linux_attach)
10963 (linux_thread_alive, linux_wait_for_event, kill_lwp, send_sigstop)
10964 (wait_for_sigstop, linux_resume_one_process)
10965 (regsets_fetch_inferior_registers, linux_send_signal)
10966 (linux_read_auxv): Likewise. Update the types of variables holding
10967 PIDs. Update format string specifiers.
10968 * linux-low.h (struct process_info, linux_attach_lwp): Likewise.
10969 * remote-utils.c (prepare_resume_reply): Likewise.
10970 * server.c (cont_thread, general_thread, step_thread)
10971 (thread_from_wait, old_thread_from_wait, signal_pid): Change type to
10972 unsigned long.
10973 (handle_query): Update format specifiers.
10974 (handle_v_cont, main): Use strtoul for thread IDs.
10975 * server.h (struct inferior_list_entry): Use unsigned long for ID.
10976 (add_thread, find_inferior_id, change_inferior_id, cont_thread)
10977 (general_thread, step_thread, thread_from_wait)
10978 (old_thread_from_wait): Update.
10979 * target.h (struct thread_resume): Use unsigned long for THREAD.
10980 (struct target_ops): Use unsigned long for arguments to attach and
10981 thread_alive.
10982
dcdb98d2
DJ
109832005-02-24 Daniel Jacobowitz <dan@codesourcery.com>
10984
10985 * acinclude.m4: Include bfd/bfd.m4 directly.
10986 * configure.ac: Use AC_ARG_PROGRAM. Suggested by Aron Griffis
10987 <agriffis@toolchain.org>.
10988 * aclocal.m4, configure: Regenerated.
10989
bec39cab
AC
109902005-01-07 Andrew Cagney <cagney@gnu.org>
10991
10992 * configure.ac: Rename configure.in, require autoconf 2.59.
10993 * configure: Re-generate.
10994
434c4c77
DJ
109952004-12-08 Daniel Jacobowitz <dan@debian.org>
10996
10997 * acinclude.m4 (SRV_CHECK_THREAD_DB): Add ps_get_thread_area. Reset
10998 LIBS when finished.
10999 * aclocal.m4: Regenerated.
11000 * configure: Regenerated.
11001
db1d3e1b
AS
110022004-11-21 Andreas Schwab <schwab@suse.de>
11003
11004 * linux-m68k-low.c (m68k_num_gregs): Define.
11005 (m68k_fill_gregset, m68k_store_gregset, m68k_fill_fpregset)
11006 (m68k_store_fpregset, target_regsets) [HAVE_LINUX_REGSETS]: New.
11007 (m68k_breakpoint, m68k_breakpoint_len, m68k_get_pc, m68k_set_pc)
11008 (m68k_breakpoint_at): New. Add to the_low_target.
11009
11010 * configure.srv (m68*-*-linux*): Set srv_linux_regsets and
11011 srv_linux_thread_db to yes.
11012
43360365
JB
110132004-10-20 Joel Brobecker <brobecker@gnat.com>
11014
11015 * linux-x86-64-low.c (ARCH_SET_GS): Add definition if missing.
11016 (ARCH_SET_FS): Likewise.
11017 (ARCH_GET_FS): Likewise.
11018 (ARCH_GET_GS): Likewise.
11019
fd500816
DJ
110202004-10-16 Daniel Jacobowitz <dan@debian.org>
11021
11022 * linux-i386-low.c (ps_get_thread_area): New.
11023 * linux-x86-64-low.c (ps_get_thread_area): New.
11024 * linux-low.c: Include <sys/syscall.h>.
11025 (linux_kill_one_process): Don't kill the first thread here.
11026 (linux_kill): Kill the first thread here.
11027 (kill_lwp): New function.
11028 (send_sigstop, linux_send_signal): Use it.
11029 * proc-service.c: Clean up #ifdefs.
11030 (fpregset_info): Delete.
11031 (ps_lgetregs): Update and enable implementation.
11032 (ps_lsetregs, ps_lgetfpregs, ps_lsetfpregs): Remove disabled
11033 implementations.
11034 * remote-utils.c (struct sym_cache, symbol_cache): New.
11035 (input_interrupt): Print a clearer message.
11036 (async_io_enabled): New variable.
11037 (enable_async_io, disable_async_io): Use it. Update comments.
11038 (look_up_one_symbol): Use the symbol cache.
11039 * thread-db.c (thread_db_look_up_symbols): New function.
11040 (thread_db_init): Update comments. Call thread_db_look_up_symbols.
11041
f6de3c42
DJ
110422004-10-16 Daniel Jacobowitz <dan@debian.org>
11043
11044 * configure.in: Test for -rdynamic.
11045 * configure: Regenerated.
11046 * Makefile (INTERNAL_LDFLAGS): New.
11047 (gdbserver, gdbreplay): Use it.
11048
2c0fc042
AC
110492004-09-02 Andrew Cagney <cagney@gnu.org>
11050
11051 * Makefile.in (TAGS): Replace TM_FILE with DEPRECATED_TM_FILE.
11052
075b3282
DJ
110532004-03-23 Daniel Jacobowitz <drow@mvista.com>
11054
11055 * linux-low.c (linux_wait): Clear all_processes list also.
11056
fa6a77dc
DJ
110572004-03-12 Daniel Jacobowitz <drow@mvista.com>
11058
11059 * linux-low.c: Include <errno.h>. Remove extern declaration of
11060 errno.
11061
6d782a97
DJ
110622004-03-12 Daniel Jacobowitz <drow@mvista.com>
11063
11064 * gdbreplay.c, server.h, utils.c: Update copyright years.
11065
3a7fb99b
DJ
110662004-03-04 Nathan J. Williams <nathanw@wasabisystems.com>
11067
11068 * server.c (main): Print child status or termination signal from
11069 variable 'signal', not 'sig'.
11070
c3e735a6
DJ
110712004-03-04 Nathan J. Williams <nathanw@wasabisystems.com>
11072
11073 * linux-low.c (linux_read_memory): Change return type to
11074 int. Check for and return error from ptrace().
11075 * target.c (read_inferior_memory): Change return type to int. Pass
11076 back return status from the_target->read_memory().
11077 * target.h (struct target_ops): Adapt *read_memory() prototype.
11078 Update comment.
11079 (read_inferior_memory): Adapt prototype.
11080 * server.c (main): Return an error packet if
11081 read_inferior_memory() returns an error.
11082
a59d1c82
DJ
110832004-03-04 Daniel Jacobowitz <drow@mvista.com>
11084
11085 * Makefile.in (distclean): Remove config.h, stamp-h, and config.log.
11086 Unify with other clean targets.
11087
dc3f8883
DJ
110882004-02-29 Daniel Jacobowitz <drow@mvista.com>
11089
11090 * server.c (handle_v_cont): Call set_desired_inferior.
11091
89a208da
DJ
110922004-02-29 Daniel Jacobowitz <drow@mvista.com>
11093
11094 * remote-utils.c (prepare_resume_reply): Always supply "thread:".
11095
62ea82f5
DJ
110962004-02-29 Daniel Jacobowitz <drow@mvista.com>
11097
11098 * linux-low.c (linux_wait): Unblock async I/O.
11099 (linux_resume): Block and enable async I/O.
11100 * remote-utils.c (block_async_io, unblock_async_io): New functions.
11101 * server.h (block_async_io, unblock_async_io): Add prototypes.
11102
6910d122
DJ
111032004-02-29 Daniel Jacobowitz <drow@mvista.com>
11104
11105 * remote-utils.c (remote_open): Print a status notice after
11106 opening a TCP port.
11107 * server.c (attach_inferior): Print a status notice after
11108 attaching.
11109
111102004-02-29 Daniel Jacobowitz <drow@mvista.com>
d677d77d
DJ
11111
11112 * linux-arm-low.c (arm_get_pc): Print out stop PC in debug mode.
11113
c89dc5d4
DJ
111142004-02-26 Daniel Jacobowitz <drow@mvista.com>
11115
11116 * remote-utils.c (write_enn): Use "E01" instead of "ENN" for the
11117 error packet.
11118 * server.c, target.h: Update copyright years.
11119
4b8dad4a
RM
111202004-02-25 Roland McGrath <roland@redhat.com>
11121
11122 * target.h (struct target_ops): New member `read_auxv'.
11123 * server.c (handle_query): Handle qPart:auxv:read: query using that.
11124 * linux-low.c (linux_read_auxv): New function.
11125 (linux_target_ops): Initialize `read_auxv' member to that.
11126
d7446758
JB
111272004-02-17 Ulrich Weigand <Ulrich.Weigand@de.ibm.com>
11128
11129 Committed by Jim Blandy <jimb@redhat.com>.
11130
11131 * linux-s390-low.c (s390_num_regs): Update.
4b8dad4a 11132 (s390_regmap): Remove control registers. Use __s390x__ predefine
d7446758
JB
11133 instead of GPR_SIZE to distiguish s390 and s390x targets.
11134
5544ad89
DJ
111352004-01-31 Daniel Jacobowitz <drow@mvista.com>
11136
11137 * linux-low.c: Update copyright year.
11138 (check_removed_breakpoint): Clear pending_is_breakpoint.
11139 (linux_set_resume_request, linux_queue_one_thread)
11140 (resume_status_pending_p): New functions.
11141 (linux_continue_one_thread): Use process->resume.
11142 (linux_resume): Only resume threads if there are no pending events.
11143 * linux-low.h (struct process_info): Add resume request
11144 pointer.
11145
2a68b70e
DJ
111462004-01-30 Daniel Jacobowitz <drow@mvista.com>
11147
11148 * regcache.c (new_register_cache): Clear the allocated register
11149 buffer. Suggested by Atsushi Nemoto <anemo@mba.ocn.ne.jp>.
11150
64386c31
DJ
111512003-10-13 Daniel Jacobowitz <drow@mvista.com>
11152
11153 * linux-low.c (linux_resume): Take a struct thread_resume *
11154 argument.
11155 (linux_wait): Update call.
11156 (resume_ptr): New static variable.
11157 (linux_continue_one_thread): Renamed from
11158 linux_continue_one_process. Use resume_ptr.
11159 (linux_resume): Use linux_continue_one_thread.
11160 * server.c (handle_v_cont, handle_v_requests): New functions.
11161 (myresume): New function.
11162 (main): Handle 'v' case.
11163 * target.h (struct thread_resume): New type.
11164 (struct target_ops): Change argument of "resume" to struct
11165 thread_resume *.
11166 (myresume): Delete macro.
11167
c938e9b0
L
111682003-08-08 H.J. Lu <hongjiu.lu@intel.com>
11169
11170 * Makefile.in (install-only): Create dest dir. Support DESTDIR.
11171 (uninstall): Support DESTDIR.
11172
7f313d07
BC
11173Mon Jul 21 20:09:34 UTC 2003 Brendan Conoboy <blc@redhat.com>
11174
11175 * configure.srv: Add xscale*linux copy of arm*linux entry.
11176
3b2fc2ea
DJ
111772003-07-24 Daniel Jacobowitz <drow@mvista.com>
11178
11179 * linux-arm-low.c (arm_reinsert_addr): New function.
11180 (the_low_target): Add arm_reinsert_addr.
11181
1c0a559e
MK
111822003-07-08 Mark Kettenis <kettenis@gnu.org>
11183
11184 * mem-break.c: Remove whitespace at end of file.
11185
43d5792c
DJ
111862003-06-28 Daniel Jacobowitz <drow@mvista.com>
11187
11188 * configure.in: Check whether we need to prototype strerror.
11189 * server.h: Optionally prototype strerror.
11190 * gdbreplay.c (perror_with_name): Use strerror.
11191 * linux-low.c (linux_attach_lwp): Use strerror.
11192 * utils.c (perror_with_name): Use strerror.
11193 * config.in, configure: Regenerated.
11194
c8a86edf
DJ
111952003-06-28 Daniel Jacobowitz <drow@mvista.com>
11196
11197 * linux-sh-low.c (sh_regmap): Fix FP register offsets, reported by
11198 SUGIOKA Toshinobu <sugioka@itonet.co.jp>.
11199
73d37363
DJ
112002003-06-20 Daniel Jacobowitz <drow@mvista.com>
11201
11202 * Makefile.in (SFILES): Update.
11203 * low-hppabsd.c, low-lynx.c, low-nbsd.c, low-sim.c, low-sparc.c,
11204 low-sun3.c: Remove files.
11205
6ad8ae5c
DJ
112062003-06-17 Daniel Jacobowitz <drow@mvista.com>
11207
11208 * linux-low.c: Move comment to linux_thread_alive where it belonged.
11209 (linux_detach_one_process, linux_detach): New functions.
11210 (linux_target_ops): Add linux_detach.
11211 * server.c (main): Handle 'D' packet.
11212 * target.h (struct target_ops): Add "detach" member.
11213 (detach_inferior): Define.
11214
1581182a
MK
112152003-06-13 Mark Kettenis <kettenis@gnu.org>
11216
11217 From Kelley Cook <kelleycook@wideopenwest.com>:
11218 * configure.srv: Accept i[34567]86 variants.
11219
e5379b03
DJ
112202003-06-05 Daniel Jacobowitz <drow@mvista.com>
11221
11222 * linux-low.c (linux_wait_for_event): Correct comment typos.
11223 (linux_resume_one_process): Call check_removed_breakpoint.
11224 (linux_send_signal): New function.
11225 (linux_target_ops): Add linux_send_signal.
11226 * remote-utils.c (putpkt, input_interrupt): Use send_signal instead
11227 of kill.
11228 * target.h (struct target_ops): Add send_signal.
11229
2ff29de4
JB
112302003-05-29 Jim Blandy <jimb@redhat.com>
11231
11232 * linux-low.c (usr_store_inferior_registers): Transfer buf in
11233 PTRACE_XFER_TYPE-sized chunks, not int-sized chunks. Otherwise,
11234 if 'int' is smaller than PTRACE_XFER_TYPE, you end up throwing
11235 away part of the register's value.
11236
254787d4
DJ
112372003-03-26 Daniel Jacobowitz <drow@mvista.com>
11238
11239 * linux-low.c (linux_create_inferior): Use __SIGRTMIN.
11240 (linux_wait_for_event, linux_init_signals): Likewise.
11241
94e10508
DJ
112422003-03-17 Daniel Jacobowitz <drow@mvista.com>
11243
11244 * configure.in: Check for stdlib.h.
11245 * configure: Regenerated.
11246 * config.in: Regenerated.
11247
4c0711e0
DJ
112482003-01-04 Andreas Schwab <schwab@suse.de>
11249
11250 * linux-m68k-low.c (m68k_num_regs): Define to 29 instead of 31.
11251
ef66e766
AC
112522003-01-02 Andrew Cagney <ac131313@redhat.com>
11253
11254 * Makefile.in: Remove obsolete code.
11255
a1358604
DJ
112562002-11-20 Daniel Jacobowitz <drow@mvista.com>
11257
11258 * linux-s390-low.c (s390_regmap): Check GPR_SIZE instead of
11259 defined(PT_FPR0_HI).
11260
23ce3b1c
DJ
112612002-11-17 Stuart Hughes <seh@zee2.com>
11262
11263 * linux-arm-low.c (arm_num_regs): Increase.
11264 (arm_regmap): Include status register.
11265
112662002-11-17 Daniel Jacobowitz <drow@mvista.com>
11267
11268 * linux-low.c (register_addr): Remove incorrect -1 check.
11269
a9fa9f7d
DJ
112702002-08-29 Daniel Jacobowitz <drow@mvista.com>
11271
11272 * linux-low.c (linux_create_inferior): Call setpgid. Return
11273 the new PID.
11274 (unstopped_p, linux_signal_pid): Remove.
11275 (linux_target_ops): Remove linux_signal_pid.
11276 * remote-utils.c (putpkt, input_interrupt): Use signal_pid
11277 global instead of target method.
11278 * target.h (struct target_ops): Remove signal_pid. Update comment
11279 for create_inferior.
11280 * server.c (signal_pid): New variable.
11281 (create_inferior): Set signal_pid. Block SIGTTOU and SIGTTIN in
4b8dad4a 11282 gdbserver. Set the child to be the foreground process group.
a9fa9f7d
DJ
11283 (attach_inferior): Set signal_pid.
11284
17574093
DJ
112852002-08-23 Daniel Jacobowitz <drow@mvista.com>
11286
11287 * ChangeLog: New file, with entries from gdb/ChangeLog after GDB 5.2.
11288
112892002-08-20 Jim Blandy <jimb@redhat.com>
11290
11291 * Makefile.in (LDFLAGS): Allow the configure script to establish a
11292 default for this.
11293
112942002-08-01 Andrew Cagney <cagney@redhat.com>
11295
11296 * Makefile.in: Make chill references obsolete.
11297
112982002-07-24 Kevin Buettner <kevinb@redhat.com>
11299
11300 * configure.in (unistd.h): Add to AC_CHECK_HEADERS list.
11301 * configure: Regenerate.
11302 * config.in: Regenerate.
11303
113042002-07-09 David O'Brien <obrien@FreeBSD.org>
11305
11306 * gdbreplay.c (stdlib.h, unistd.h): Conditionaly include.
11307 (perror_with_name, remote_close, remote_open, expect, play): Static.
11308
113092002-07-04 Michal Ludvig <mludvig@suse.cz>
11310
4b8dad4a 11311 * linux-x86-64-low.c (x86_64_regmap): Make it an array of
17574093
DJ
11312 byte offsets instead of an array of indexes.
11313 (x86_64_store_gregset, x86_64_store_fpregset): Parameter made const.
11314
113152002-06-13 Daniel Jacobowitz <drow@mvista.com>
11316
11317 * regcache.c: Add comment.
11318
113192002-06-11 Daniel Jacobowitz <drow@mvista.com>
11320
11321 * thread-db.c: New file.
11322 * proc-service.c: New file.
11323 * acinclude.m4: New file.
11324 * Makefile.in: Add GDBSERVER_LIBS, gdb_proc_service_h,
11325 proc-service.o, and thread-db.o.
11326 (linux-low.o): Add USE_THREAD_DB.
11327 * acconfig.h: Add HAVE_PRGREGSET_T, HAVE_PRFPREGSET_T,
11328 HAVE_LWPID_T, HAVE_PSADDR_T, and PRFPREGSET_T_BROKEN.
11329 * aclocal.m4: Regenerated.
11330 * config.in: Regenerated.
11331 * configure: Regenerated.
11332 * configure.in: Check for proc_service.h, sys/procfs.h,
11333 thread_db.h, and linux/elf.h headrs.
11334 Check for lwpid_t, psaddr_t, prgregset_t, prfpregset_t, and
11335 PRFPREGSET_T_BROKEN. Introduce srv_thread_depfiles and USE_THREAD_DB.
11336 Check for -lthread_db and thread support.
11337 * configure.srv: Enable thread_db support for ARM, i386, MIPS,
11338 PowerPC, and SuperH.
11339 * i387-fp.c: Constify arguments.
11340 * i387-fp.h: Likewise.
11341 * inferiors.c: (struct thread_info): Renamed from
11342 `struct inferior_info'. Remove PID member. Use generic inferior
11343 list header. All uses updated.
11344 (inferiors, signal_pid): Removed.
11345 (all_threads): New variable.
11346 (get_thread): Define.
11347 (add_inferior_to_list): New function.
11348 (for_each_inferior): New function.
11349 (change_inferior_id): New function.
11350 (add_inferior): Removed.
11351 (remove_inferior): New function.
11352 (add_thread): New function.
11353 (free_one_thread): New function.
11354 (remove_thread): New function.
11355 (clear_inferiors): Use for_each_inferior and free_one_thread.
11356 (find_inferior): New function.
11357 (find_inferior_id): New function.
11358 (inferior_target_data): Update argument type.
11359 (set_inferior_target_data): Likewise.
11360 (inferior_regcache_data): Likewise.
11361 (set_inferior_regcache_data): Likewise.
11362 * linux-low.c (linux_bp_reinsert): Remove.
11363 (all_processes, stopping_threads, using_thrads)
11364 (struct pending_signals, debug_threads, pid_of): New.
11365 (inferior_pid): Replace with macro.
11366 (struct inferior_linux_data): Remove.
11367 (get_stop_pc, add_process): New functions.
11368 (linux_create_inferior): Restore SIGRTMIN+1 before calling exec.
11369 Use add_process and add_thread.
11370 (linux_attach_lwp): New function, based on old linux_attach. Use
11371 add_process and add_thread. Set stop_expected for new threads.
11372 (linux_attach): New function.
11373 (linux_kill_one_process): New function.
11374 (linux_kill): Kill all LWPs.
11375 (linux_thread_alive): Use find_inferior_id.
11376 (check_removed_breakpoints, status_pending_p): New functions.
11377 (linux_wait_for_process): Renamed from linux_wait_for_one_inferior.
11378 Update. Use WNOHANG. Wait for cloned processes also. Update process
11379 struct for the found process.
11380 (linux_wait_for_event): New function.
11381 (linux_wait): Use it. Support LWPs.
11382 (send_sigstop, wait_for_sigstop, stop_all_processes)
11383 (linux_resume_one_process, linux_continue_one_process): New functions.
11384 (linux_resume): Support LWPs.
11385 (REGISTER_RAW_SIZE): Remove.
11386 (fetch_register): Use register_size instead. Call supply_register.
11387 (usr_store_inferior_registers): Likewise. Call collect_register.
11388 Fix recursive case.
11389 (regsets_fetch_inferior_registers): Improve error message.
11390 (regsets_store_inferior_registers): Add debugging.
11391 (linux_look_up_symbols): Call thread_db_init if USE_THREAD_DB.
11392 (unstopped_p, linux_signal_pid): New functions.
11393 (linux_target_ops): Add linux_signal_pid.
11394 (linux_init_signals): New function.
11395 (initialize_low): Call it. Initialize using_threads.
11396 * regcache.c (inferior_regcache_data): Add valid
11397 flag.
11398 (get_regcache): Fetch registers lazily. Add fetch argument
11399 and update all callers.
11400 (regcache_invalidate_one, regcache_invalidate): New
11401 functions.
11402 (new_register_cache): Renamed from create_register_cache.
11403 Return the new regcache.
11404 (free_register_cache): Change argument to a void *.
11405 (registers_to_string, registers_from_string): Call get_regcache
11406 with fetch flag set.
11407 (register_data): Make static. Pass fetch flag to get_regcache.
11408 (supply_register): Call get_regcache with fetch flag clear.
11409 (collect_register): Call get_regcache with fetch flag set.
11410 (collect_register_as_string): New function.
11411 * regcache.h: Update.
11412 * remote-utils.c (putpkt): Flush after debug output and use
11413 stderr.
11414 Handle input interrupts while waiting for an ACK.
11415 (input_interrupt): Use signal_pid method.
11416 (getpkt): Flush after debug output and use stderr.
11417 (outreg): Use collect_register_as_string.
11418 (new_thread_notify, dead_thread_notify): New functions.
11419 (prepare_resume_reply): Check using_threads. Set thread_from_wait
11420 and general_thread.
11421 (look_up_one_symbol): Flush after debug output.
11422 * server.c (step_thread, server_waiting): New variables.
11423 (start_inferior): Don't use signal_pid. Update call to mywait.
11424 (attach_inferior): Update call to mywait.
11425 (handle_query): Handle qfThreadInfo and qsThreadInfo.
11426 (main): Don't fetch/store registers explicitly. Use
11427 set_desired_inferior. Support proposed ``Hs'' packet. Update
11428 calls to mywait.
11429 * server.h: Update.
11430 (struct inferior_list, struct_inferior_list_entry): New.
11431 * target.c (set_desired_inferior): New.
11432 (write_inferior_memory): Constify.
11433 (mywait): New function.
11434 * target.h: Update.
11435 (struct target_ops): New signal_pid method.
11436 (mywait): Removed macro, added prototype.
11437
11438 * linux-low.h (regset_func): Removed.
11439 (regset_fill_func, regset_store_func): New.
11440 (enum regset_type): New.
11441 (struct regset_info): Add type field. Use new operation types.
11442 (struct linux_target_ops): stop_pc renamed to get_pc.
11443 Add decr_pc_after_break and breakpoint_at.
11444 (get_process, get_thread_proess, get_process_thread)
11445 (strut process_info, all_processes, linux_attach_lwp)
11446 (thread_db_init): New.
11447
11448 * linux-arm-low.c (arm_get_pc, arm_set_pc,
11449 arm_breakpoint, arm_breakpoint_len, arm_breakpoint_at): New.
11450 (the_low_target): Add new members.
11451 * linux-i386-low.c (i386_store_gregset, i386_store_fpregset)
11452 (i386_store_fpxregset): Constify.
11453 (target_regsets): Add new kind identifier.
11454 (i386_get_pc): Renamed from i386_stop_pc. Simplify.
11455 (i386_set_pc): Add debugging.
11456 (i386_breakpoint_at): New function.
11457 (the_low_target): Add new members.
11458 * linux-mips-low.c (mips_get_pc, mips_set_pc)
11459 (mips_breakpoint, mips_breakpoint_len, mips_reinsert_addr)
11460 (mips_breakpoint_at): New.
11461 (the_low_target): Add new members.
11462 * linux-ppc-low.c (ppc_get_pc, ppc_set_pc)
11463 (ppc_breakpoint, ppc_breakpoint_len, ppc_breakpoint_at): New.
11464 (the_low_target): Add new members.
11465 * linux-sh-low.c (sh_get_pc, sh_set_pc)
11466 (sh_breakpoint, sh_breakpoint_len, sh_breakpoint_at): New.
11467 (the_low_target): Add new members.
11468 * linux-x86-64-low.c (target_regsets): Add new kind
11469 identifier.
11470
114712002-05-15 Daniel Jacobowitz <drow@mvista.com>
11472
11473 From Martin Pool <mbp@samba.org>:
11474 * server.c (gdbserver_usage): New function.
11475 (main): Call it.
11476
114772002-05-14 Daniel Jacobowitz <drow@mvista.com>
11478
11479 * mem-break.c (reinsert_breakpoint_by_bp): Correct typo
11480 stop_at -> stop_pc.
11481
114822002-05-04 Andrew Cagney <ac131313@redhat.com>
11483
11484 * Makefile.in: Remove obsolete code.
11485
114862002-04-24 Michal Ludvig <mludvig@suse.cz>
11487
11488 * linux-low.c (regsets_fetch_inferior_registers),
11489 (regsets_store_inferior_registers): Removed cast to int from
11490 ptrace() calls.
11491 * regcache.h: Added declaration of struct inferior_info.
11492
114932002-04-20 Daniel Jacobowitz <drow@mvista.com>
11494
11495 * inferiors.c (struct inferior_info): Add regcache_data.
11496 (add_inferior): Call create_register_cache.
11497 (clear_inferiors): Call free_register_cache.
11498 (inferior_regcache_data, set_inferior_regcache_data): New functions.
11499 * regcache.c (struct inferior_regcache_data): New.
11500 (registers): Remove.
11501 (get_regcache): New function.
11502 (create_register_cache, free_register_cache): New functions.
11503 (set_register_cache): Don't initialize the register cache here.
11504 (registers_to_string, registers_from_string, register_data): Call
11505 get_regcache.
11506 * regcache.h: Add prototypes.
11507 * server.h: Likewise.
11508
115092002-04-20 Daniel Jacobowitz <drow@mvista.com>
11510
11511 * mem-break.c: New file.
11512 * mem-break.h: New file.
11513 * Makefile.in: Add mem-break.o rule; update server.h
11514 dependencies.
11515 * inferiors.c (struct inferior_info): Add target_data
11516 member.
11517 (clear_inferiors): Free target_data member if set.
11518 (inferior_target_data, set_inferior_target_data): New functions.
11519 * linux-i386-low.c (i386_breakpoint, i386_breakpoint_len)
11520 (i386_stop_pc, i386_set_pc): New. Add to the_low_target.
11521 * linux-low.c (linux_bp_reinsert): New variable.
11522 (struct inferior_linux_data): New.
11523 (linux_create_inferior): Use set_inferior_target_data.
11524 (linux_attach): Likewise. Call add_inferior.
11525 (linux_wait_for_one_inferior): New function.
11526 (linux_wait): Call it.
11527 (linux_write_memory): Add const.
11528 (initialize_low): Call set_breakpoint_data.
11529 * linux-low.h (struct linux_target_ops): Add breakpoint
11530 handling members.
11531 * server.c (attach_inferior): Remove extra add_inferior
11532 call.
11533 * server.h: Include mem-break.h. Update inferior.c
11534 prototypes.
11535 * target.c (read_inferior_memory)
11536 (write_inferior_memory): New functions.
11537 * target.h (read_inferior_memory)
11538 (write_inferior_memory): Change macros to prototypes.
11539 (struct target_ops): Update comments. Add const to write_memory
11540 definition.
11541
115422002-04-11 Daniel Jacobowitz <drow@mvista.com>
11543
11544 * linux-low.c (usr_store_inferior_registers): Support
11545 registers which are allowed to fail to store.
11546 * linux-low.h (linux_target_ops): Likewise.
11547 * linux-ppc-low.c (ppc_regmap): Support FPSCR.
11548 (ppc_cannot_store_register): FPSCR may not be storable.
11549
115502002-04-09 Daniel Jacobowitz <drow@mvista.com>
11551
11552 * server.h: Include <string.h> if HAVE_STRING_H.
11553 * ChangeLog: Correct paths in last ChangeLog entry.
11554
115552002-04-09 Daniel Jacobowitz <drow@mvista.com>
11556
11557 * linux-low.h: Remove obsolete prototypes.
11558 (struct linux_target_ops): New.
11559 (extern the_low_target): New.
11560 * linux-low.c (num_regs, regmap): Remove declarations.
11561 (register_addr): Use the_low_target explicitly.
11562 (fetch_register): Likewise.
11563 (usr_fetch_inferior_registers): Likewise.
11564 (usr_store_inferior_registers): Likewise.
11565 * linux-arm-low.c (num_regs): Remove.
11566 (arm_num_regs): Define.
11567 (arm_regmap): Renamed from regmap, made static.
11568 (arm_cannot_fetch_register): Renamed from cannot_fetch_register,
11569 made static.
11570 (arm_cannot_store_register): Renamed from cannot_store_register,
11571 made static.
11572 (the_low_target): New.
11573 * linux-i386-low.c (num_regs): Remove.
11574 (i386_num_regs): Define.
11575 (i386_regmap): Renamed from regmap, made static.
11576 (i386_cannot_fetch_register): Renamed from cannot_fetch_register,
11577 made static.
11578 (i386_cannot_store_register): Renamed from cannot_store_register,
11579 made static.
11580 (the_low_target): New.
11581 * linux-ia64-low.c (num_regs): Remove.
11582 (ia64_num_regs): Define.
11583 (ia64_regmap): Renamed from regmap, made static.
11584 (ia64_cannot_fetch_register): Renamed from cannot_fetch_register,
11585 made static.
11586 (ia64_cannot_store_register): Renamed from cannot_store_register,
11587 made static.
11588 (the_low_target): New.
11589 * linux-m68k-low.c (num_regs): Remove.
11590 (m68k_num_regs): Define.
11591 (m68k_regmap): Renamed from regmap, made static.
11592 (m68k_cannot_fetch_register): Renamed from cannot_fetch_register,
11593 made static.
11594 (m68k_cannot_store_register): Renamed from cannot_store_register,
11595 made static.
11596 (the_low_target): New.
11597 * linux-mips-low.c (num_regs): Remove.
11598 (mips_num_regs): Define.
11599 (mips_regmap): Renamed from regmap, made static.
11600 (mips_cannot_fetch_register): Renamed from cannot_fetch_register,
11601 made static.
11602 (mips_cannot_store_register): Renamed from cannot_store_register,
11603 made static.
11604 (the_low_target): New.
11605 * linux-ppc-low.c (num_regs): Remove.
11606 (ppc_num_regs): Define.
11607 (ppc_regmap): Renamed from regmap, made static.
11608 (ppc_cannot_fetch_register): Renamed from cannot_fetch_register,
11609 made static.
11610 (ppc_cannot_store_register): Renamed from cannot_store_register,
11611 made static.
11612 (the_low_target): New.
11613 * linux-s390-low.c (num_regs): Remove.
11614 (s390_num_regs): Define.
11615 (s390_regmap): Renamed from regmap, made static.
11616 (s390_cannot_fetch_register): Renamed from cannot_fetch_register,
11617 made static.
11618 (s390_cannot_store_register): Renamed from cannot_store_register,
11619 made static.
11620 (the_low_target): New.
11621 * linux-sh-low.c (num_regs): Remove.
11622 (sh_num_regs): Define.
11623 (sh_regmap): Renamed from regmap, made static.
11624 (sh_cannot_fetch_register): Renamed from cannot_fetch_register,
11625 made static.
11626 (sh_cannot_store_register): Renamed from cannot_store_register,
11627 made static.
11628 (the_low_target): New.
11629 * linux-x86-64-low.c (x86_64_regmap): Renamed from regmap.
11630 (the_low_target): New.
11631
116322002-04-09 Daniel Jacobowitz <drow@mvista.com>
11633
11634 * Makefile.in: Add stamp-h target.
11635 * configure.in: Create stamp-h.
11636 * configure: Regenerated.
11637
116382002-04-09 Daniel Jacobowitz <drow@mvista.com>
11639
11640 * inferiors.c: New file.
11641 * target.c: New file.
11642 * target.h: New file.
11643 * Makefile.in: Add target.o and inferiors.o. Update
11644 dependencies.
11645 * linux-low.c (inferior_pid): New static variable,
11646 moved from server.c.
11647 (linux_create_inferior): Renamed from create_inferior.
11648 Call add_inferior. Return 0 on success instead of a PID.
11649 (linux_attach): Renamed from myattach.
11650 (linux_kill): Renamed from kill_inferior. Call clear_inferiors ().
11651 (linux_thread_alive): Renamed from mythread_alive.
11652 (linux_wait): Renamed from mywait. Call clear_inferiors () if the
11653 child dies.
11654 (linux_resume): Renamed from myresume. Add missing ``return 0''.
11655 (regsets_store_inferior_registers): Correct error message.
11656 Add missing ``return 0''.
11657 (linux_fetch_registers): Renamed from fetch_inferior_registers.
11658 (linux_store_registers): Renamed from store_inferior_registers.
11659 (linux_read_memory): Renamed from read_inferior_memory.
11660 (linux_write_memory): Renamed from write_inferior_memory.
11661 (linux_target_ops): New structure.
11662 (initialize_low): Call set_target_ops ().
11663 * remote-utils.c (unhexify): New function.
11664 (hexify): New function.
11665 (input_interrupt): Send signals to ``signal_pid''.
11666 * server.c (inferior_pid): Remove.
11667 (start_inferior): Update create_inferior call.
11668 (attach_inferior): Call add_inferior.
11669 (handle_query): New function.
11670 (main): Call handle_query for `q' packets.
11671 * server.h: Include "target.h". Remove obsolete prototypes.
11672 Add prototypes for "inferiors.c", "target.c", hexify, and unhexify.
11673
116742002-04-09 Daniel Jacobowitz <drow@mvista.com>
11675
11676 * Makefile.in: Add WARN_CFLAGS. Update configury
11677 dependencies.
11678 * configure.in: Check for <string.h>
11679 * configure: Regenerate.
11680 * config.in: Regenerate.
11681 * gdbreplay.c: Include needed system headers.
11682 (remote_open): Remove strchr prototype.
11683 * linux-low.h: Correct #ifdef to HAVE_LINUX_USRREGS.
11684 * regcache.c (supply_register): Change buf argument to const void *.
11685 (supply_register_by_name): Likewise.
11686 (collect_register): Change buf argument to void *.
11687 (collect_register_by_name): Likewise.
11688 * regcache.h: Add missing prototypes.
11689 * remote-utils.c: Include <arpa/inet.h> for inet_ntoa.
11690 * server.c (handle_query): New function.
11691 (attached): New static variable, moved out of main.
11692 (main): Quiet longjmp clobber warnings.
11693 * server.h: Add ATTR_NORETURN and ATTR_FORMAT. Update prototypes.
11694 * utils.c (error): Remove NORETURN.
11695 (fatal): Likewise.
This page took 1.857375 seconds and 4 git commands to generate.