Add pid argument in aarch64_get_debug_reg_state
[deliverable/binutils-gdb.git] / gdb / gdbserver / ChangeLog
CommitLineData
88e2cf7e
YQ
12015-08-25 Yao Qi <yao.qi@linaro.org>
2
3 * linux-aarch64-low.c (aarch64_get_debug_reg_state): Add argument pid.
4 Find proc_info by find_process_pid. All callers updated.
5
5e35436e
YQ
62015-08-25 Yao Qi <yao.qi@linaro.org>
7
8 * linux-aarch64-low.c (struct arch64_dr_update_callback_param):
9 Remove.
10 (debug_reg_change_callback): Remove.
11 (aarch64_notify_debug_reg_change): Remove.
12
4a8a7965
YQ
132015-08-25 Yao Qi <yao.qi@linaro.org>
14
15 * linux-aarch64-low.c (aarch64_notify_debug_reg_change):
16 Call current_lwp_ptid.
17
32a271ee
YQ
182015-08-25 Yao Qi <yao.qi@linaro.org>
19
20 * linux-aarch64-low.c (debug_reg_change_callback): Use
21 debug_printf.
22
0d51c8d7
YQ
232015-08-25 Yao Qi <yao.qi@linaro.org>
24
25 * linux-aarch64-low.c (debug_reg_change_callback): Use phex.
26
31a43dd5
YQ
272015-08-25 Yao Qi <yao.qi@linaro.org>
28
29 * linux-aarch64-low.c (debug_reg_change_callback): Remove comments.
30
8ee52567
YQ
312015-08-25 Yao Qi <yao.qi@linaro.org>
32
33 * linux-aarch64-low.c (debug_reg_change_callback): Re-indent
34 the code.
35
ff3f0f45
YQ
362015-08-25 Yao Qi <yao.qi@linaro.org>
37
38 * linux-aarch64-low.c (aarch64_dr_update_callback_param) <pid>:
39 Remove.
40 (debug_reg_change_callback): Remove argument entry and add argument
41 lwp. Remove local variable thread. Don't print thread id in the
42 debugging output. Don't check whether pid of thread equals to pid.
43 (aarch64_notify_debug_reg_change): Don't set param.pid. Call
44 iterate_over_lwps instead find_inferior.
45
3d40fbb5
PA
462015-08-24 Pedro Alves <palves@redhat.com>
47
48 * inferiors.c (get_first_process): New function.
49 * inferiors.h (get_first_process): New declaration.
50 * remote-utils.c (read_ptid): Default to the first process in the
51 list, instead of to the current thread's process.
52
438e1e42
PA
532015-08-24 Pedro Alves <palves@redhat.com>
54
55 * debug.c: Include gdb_sys_time.h instead of sys/time.h.
56 * event-loop.c: Likewise.
57 * remote-utils.c: Likewise.
58 * tracepoint.c: Likewise.
59
a8c6d4fc
PA
602015-08-24 Pedro Alves <palves@redhat.com>
61
62 * spu-low.c (spu_request_interrupt): Use lwpid_of instead of
63 ptid_get_lwp.
64
99b0bb12
PA
652015-08-21 Pedro Alves <palves@redhat.com>
66
67 * ax.c (gdb_eval_agent_expr): Return expr_eval_unhandled_opcode
68 instead of literal 1.
69
f8904751
PA
702015-08-21 Pedro Alves <palves@redhat.com>
71
72 * tdesc.c (default_description): Explicitly zero-initialize.
73
465a859e
PA
742015-08-21 Pedro Alves <palves@redhat.com>
75
76 PR gdb/18749
77 * inferiors.c (remove_thread): Discard any pending stop reply for
78 this thread.
79 * server.c (remove_all_on_match_pid): Rename to ...
80 (remove_all_on_match_ptid): ... this. Work with a filter ptid
81 instead of a pid.
82 (discard_queued_stop_replies): Change parameter to a ptid. Now
83 extern.
84 (handle_v_kill, kill_inferior_callback, captured_main)
85 (process_serial_event): Adjust.
86 * server.h (discard_queued_stop_replies): Declare.
87
f0db101d
PA
882015-08-21 Pedro Alves <palves@redhat.com>
89
90 * linux-low.c (wait_for_sigstop): Always switch to no thread
91 selected if the previously current thread dies.
92 * lynx-low.c (lynx_request_interrupt): Use the first thread's
93 process instead of the current thread's.
94 * remote-utils.c (input_interrupt): Don't check if there's no
95 current thread.
96 * server.c (gdb_read_memory, gdb_write_memory): If setting the
97 current thread to the general thread fails, error out.
98 (handle_qxfer_auxv, handle_qxfer_libraries)
99 (handle_qxfer_libraries_svr4, handle_qxfer_siginfo)
100 (handle_qxfer_spu, handle_qxfer_statictrace, handle_qxfer_fdpic)
101 (handle_query): Check if there's a thread selected instead of
102 checking whether there's any thread in the thread list.
103 (handle_qxfer_threads, handle_qxfer_btrace)
104 (handle_qxfer_btrace_conf): Don't error out early if there's no
105 thread in the thread list.
106 (handle_v_cont, myresume): Don't set the current thread to the
107 continue thread.
108 (process_serial_event) <Hg handling>: Also set thread_id if the
109 previous general thread is still alive.
110 (process_serial_event) <g/G handling>: If setting the current
111 thread to the general thread fails, error out.
112 * spu-low.c (spu_resume, spu_request_interrupt): Use the first
113 thread's lwp instead of the current thread's.
114 * target.c (set_desired_thread): If the desired thread was not
115 found, leave the current thread pointing to NULL. Return an int
116 (boolean) indicating success.
117 * target.h (set_desired_thread): Change return type to int.
118
40045d91
MF
1192015-08-20 Max Filippov <jcmvbkbc@gmail.com>
120
121 * configure.srv (xtensa*-*-linux*): Add srv_linux_thread_db=yes.
122 * linux-xtensa-low.c (arch/xtensa.h gdb_proc_service.h): New
123 #includes.
124 (ps_get_thread_area): New function.
125
45face3b
GB
1262015-08-19 Gary Benson <gbenson@redhat.com>
127
128 * hostio.c (handle_pread): Do not attempt to read more data
129 than hostio_reply_with_data can fit in a packet.
130
16d5f642
JB
1312015-08-18 Joel Brobecker <brobecker@adacore.com>
132
133 * linux-aarch32-low.c (NT_ARM_VFP): Define if not already defined.
134
a738da3a
MF
1352015-08-14 Matthew Fortune <matthew.fortune@imgtec.com>
136
137 * linux-low.c (get_r_debug): Handle DT_MIPS_RLD_MAP_REL.
138
33ebda9d
PA
1392015-08-06 Pedro Alves <palves@redhat.com>
140
141 * tracepoint.c (expr_eval_result): Now an int.
142
a44892be
PA
1432015-08-06 Pedro Alves <palves@redhat.com>
144
145 * gdbthread.h (struct regcache): Forward declare.
146 (struct thread_info) <regcache_data>: Now a struct regcache
147 pointer.
148 * inferiors.c (inferior_regcache_data)
149 (set_inferior_regcache_data): Now work with struct regcache
150 pointers.
151 * inferiors.h (struct regcache): Forward declare.
152 (inferior_regcache_data, set_inferior_regcache_data): Now work
153 with struct regcache pointers.
154 * regcache.c (get_thread_regcache, regcache_invalidate_thread)
155 (free_register_cache_thread): Remove struct regcache pointer
156 casts.
157
608a1e46
PA
1582015-08-06 Pedro Alves <palves@redhat.com>
159
160 * server.c (captured_main): On error, print the exception message
161 to stderr, and if run_once is set, throw a quit.
162
f0ce0d3a
PA
1632015-08-06 Pedro Alves <palves@redhat.com>
164
165 * linux-low.c (move_out_of_jump_pad_callback): Temporarily switch
166 the current thread.
167
bf47e248
PA
1682015-08-06 Pedro Alves <palves@redhat.com>
169
170 * linux-low.c (linux_write_memory): Rewrite debug output to avoid
171 reading beyond the passed in buffer length.
172
b6b9ffcc
PL
1732015-08-06 Pierre Langlois <pierre.langlois@arm.com>
174
175 * tracepoint.c (symbol_list) <required>: Remove.
176
863d01bd
PA
1772015-08-06 Pedro Alves <palves@redhat.com>
178
179 * linux-low.c (handle_extended_wait): Set the fork child's suspend
180 count if stopping and suspending threads.
181 (check_stopped_by_breakpoint): If stopped by trace, set the LWP's
182 stop reason to TARGET_STOPPED_BY_SINGLE_STEP.
183 (linux_detach): Complete an ongoing step-over.
184 (lwp_suspended_inc, lwp_suspended_decr): New functions. Use
185 throughout.
186 (resume_stopped_resumed_lwps): Don't resume a suspended thread.
187 (linux_wait_1): If passing a signal to the inferior after
188 finishing a step-over, unsuspend and re-resume all lwps. If we
189 see a single-step event but the thread should be continuing, don't
190 pass the trap to gdb.
191 (stuck_in_jump_pad_callback, move_out_of_jump_pad_callback): Use
192 internal_error instead of gdb_assert.
193 (enqueue_pending_signal): New function.
194 (check_ptrace_stopped_lwp_gone): Add debug output.
195 (start_step_over): Use internal_error instead of gdb_assert.
196 (complete_ongoing_step_over): New function.
197 (linux_resume_one_thread): Don't resume a suspended thread.
198 (proceed_one_lwp): If the LWP is stepping over a breakpoint, reset
199 it stepping.
200
00db26fa
PA
2012015-08-06 Pedro Alves <palves@redhat.com>
202
203 * linux-low.c (add_lwp): Set waitstatus to TARGET_WAITKIND_IGNORE.
204 (linux_thread_alive): Use lwp_is_marked_dead.
205 (extended_event_reported): Delete.
206 (linux_wait_1): Check if waitstatus is TARGET_WAITKIND_IGNORE
207 instead of extended_event_reported.
208 (mark_lwp_dead): Don't set the 'dead' flag. Store the waitstatus
209 as well.
210 (lwp_is_marked_dead): New function.
211 (lwp_running): Use lwp_is_marked_dead.
212 * linux-low.h: Delete 'dead' field, and update 'waitstatus's
213 comment.
214
ad071a30
PA
2152015-08-06 Pedro Alves <palves@redhat.com>
216
217 * linux-low.c (linux_wait_1): Move fork event output out of the
218 !report_to_gdb check. Pass event_child->waitstatus to
219 target_waitstatus_to_string instead of ourstatus.
220
524b57e6
YQ
2212015-08-04 Yao Qi <yao.qi@linaro.org>
222
223 * linux-aarch64-low.c (aarch64_supports_tracepoints): Return 0
224 if current_thread is 32 bit.
225
6085d6f6
YQ
2262015-08-04 Yao Qi <yao.qi@linaro.org>
227
228 * linux-aarch64-low.c (aarch64_supports_z_point_type): Return
229 0 for Z_PACKET_SW_BP if it may be used in multi-arch debugging.
230 * server.c (extended_protocol): Remove "static".
231 * server.h (extended_protocol): Declare it.
232
8a7e4587
YQ
2332015-08-04 Yao Qi <yao.qi@linaro.org>
234
235 * linux-aarch64-low.c (aarch64_get_pc): Get PC register on
236 both aarch64 and aarch32.
237 (aarch64_set_pc): Likewise.
238
3b53ae99
YQ
2392015-08-04 Yao Qi <yao.qi@linaro.org>
240
241 * configure.srv (case aarch64*-*-linux*): Append arm-with-neon.o
242 to srv_regobj and append arm-core.xml arm-vfpv3.xml and
243 arm-with-neon.xml to srv_xmlfiles.
244 * linux-aarch64-low.c: Include linux-aarch32-low.h.
245 (is_64bit_tdesc): New function.
246 (aarch64_linux_read_description): New function.
247 (aarch64_arch_setup): Call aarch64_linux_read_description.
248 (regs_info): Rename to regs_info_aarch64.
249 (aarch64_regs_info): Return right regs_info.
250 (initialize_low_arch): Call initialize_low_arch_aarch32.
251
bd9e6534
YQ
2522015-08-04 Yao Qi <yao.qi@linaro.org>
253
254 * configure.srv (srv_tgtobj): Add linux-aarch32-low.o.
255 * linux-aarch32-low.c: New file.
256 * linux-aarch32-low.h: New file.
257 * linux-arm-low.c (arm_fill_gregset): Move it to
258 linux-aarch32-low.c.
259 (arm_store_gregset): Likewise.
260 (arm_fill_vfpregset): Call arm_fill_vfpregset_num
261 (arm_store_vfpregset): Call arm_store_vfpregset_num.
262 (arm_arch_setup): Check if PTRACE_GETREGSET works.
263 (regs_info): Rename to regs_info_arm.
264 (arm_regs_info): Return regs_info_aarch32 if
265 have_ptrace_getregset is 1 and target description is
266 arm_with_neon or arm_with_vfpv3.
267 (initialize_low_arch): Don't call init_registers_arm_with_neon.
268 Call initialize_low_arch_aarch32 instead.
269
ded48a5e
YQ
2702015-08-04 Yao Qi <yao.qi@linaro.org>
271
272 * linux-x86-low.c (have_ptrace_getregset): Move it to ...
273 * linux-low.c: ... here.
274 * linux-low.h (have_ptrace_getregset): Declare it.
275
96e9210f
PA
2762015-08-04 Pedro Alves <palves@redhat.com>
277
278 * thread-db.c (struct thread_db): Use new typedefs.
279 (try_thread_db_load_1): Define local TDB_DLSYM macro and use it in
280 CHK calls.
281 (disable_thread_event_reporting): Cast result of dlsym to
282 destination function pointer type.
283 (thread_db_mourn): Use td_ta_delete_ftype.
284
af60a1ef
SL
2852015-08-03 Sandra Loosemore <sandra@codesourcery.com>
286
287 * linux-nios2-low.c (NIOS2_BREAKPOINT): Conditionalize for
288 arch variant.
289 (CDX_BREAKPOINT): Define for R2.
290 (nios2_breakpoint_at): Check for CDX_BREAKPOINT when R2.
291 (the_low_target): Add comments.
292
e8b41681
YQ
2932015-07-30 Yao Qi <yao.qi@linaro.org>
294
295 * linux-arm-low.c (arm_hwcap): Remove it.
296 (arm_read_description): New local variable arm_hwcap. Don't
297 set arm_hwcap to zero.
298
89abb039
YQ
2992015-07-30 Yao Qi <yao.qi@linaro.org>
300
301 * linux-arm-low.c (arm_fill_wmmxregset): Don't use arm_hwcap.
302 Use regcache->tdesc instead.
303 (arm_store_wmmxregset): Likewise.
304 (arm_fill_vfpregset): Likewise.
305 (arm_store_vfpregset): Likewise.
306
deca266c
YQ
3072015-07-30 Yao Qi <yao.qi@linaro.org>
308
309 * linux-arm-low.c: Include arch/arm.h.
310 (arm_fill_gregset): Don't use arm_num_regs and arm_regmap.
311 (arm_store_gregset): Likewise.
312
aa58a496
SM
3132015-07-29 Simon Marchi <simon.marchi@ericsson.com>
314
315 * linux-mips-low.c (mips_linux_prepare_to_resume): Add NULL as
316 ptrace's 4th parameter.
317
50904b25
YQ
3182015-07-27 Yao Qi <yao.qi@linaro.org>
319
320 * configure.srv (case aarch64*-*-linux*): Don't set
321 srv_linux_usrregs.
322
5826e159
PA
3232015-07-24 Pedro Alves <palves@redhat.c: Likewise.om>
324
325 * linux-aarch64-low.c: Include nat/gdb_ptrace.h instead of
326 sys/ptrace.h.
327 * linux-arm-low.c: Likewise.
328 * linux-cris-low.c: Likewise.
329 * linux-crisv32-low.c: Likewise.
330 * linux-low.c: Likewise.
331 * linux-m68k-low.c: Likewise.
332 * linux-mips-low.c: Likewise.
333 * linux-nios2-low.c: Likewise.
334 * linux-s390-low.c: Likewise.
335 * linux-sparc-low.c: Likewise.
336 * linux-tic6x-low.c: Likewise.
337 * linux-tile-low.c: Likewise.
338 * linux-x86-low.c: Likewise.
339
54019719
PA
3402015-07-24 Pedro Alves <palves@redhat.com>
341
342 * config.in: Regenerate.
343 * configure: Regenerate.
344
eb7aa561
PA
3452015-07-24 Pedro Alves <palves@redhat.com>
346
347 * acinclude.m4: Include ../ptrace.m4.
348 * configure.ac: Call GDB_AC_PTRACE.
349 * config.in, configure: Regenerate.
350
55d7b841
YQ
3512015-07-24 Yao Qi <yao.qi@linaro.org>
352
353 * linux-low.c (linux_create_inferior): Remove setting to
354 proc->priv->new_inferior.
355 (linux_attach): Likewise.
356 (linux_low_filter_event): Likewise.
357 * linux-low.h (struct process_info_private) <new_inferior>: Remove.
358
c06cbd92
YQ
3592015-07-24 Yao Qi <yao.qi@linaro.org>
360
361 * linux-low.c (linux_arch_setup): New function.
362 (linux_low_filter_event): If proc->tdesc is NULL and
363 proc->attached is true, call the_low_target.arch_setup.
364 Otherwise, keep status pending, and return.
365 (linux_resume_one_lwp_throw): Don't call get_pc if
366 thread->while_stepping isn't NULL. Don't call
367 get_thread_regcache if proc->tdesc is NULL.
368 (need_step_over_p): Return 0 if proc->tdesc is NULL.
369 (linux_target_ops): Install arch_setup.
370 * server.c (start_inferior): Call the_target->arch_setup.
371 * target.h (struct target_ops) <arch_setup>: New field.
372 (target_arch_setup): New marco.
373 * lynx-low.c (lynx_target_ops): Update.
374 * nto-low.c (nto_target_ops): Update.
375 * spu-low.c (spu_target_ops): Update.
376 * win32-low.c (win32_target_ops): Update.
377
5ae3ebba
YQ
3782015-07-24 Yao Qi <yao.qi@linaro.org>
379
380 * linux-low.c (linux_add_process): Don't set
381 proc->priv->new_inferior.
382 (linux_create_inferior): Set proc->priv->new_inferior to 1.
383 (linux_attach): Likewise.
384
eb97750b
YQ
3852015-07-24 Yao Qi <yao.qi@linaro.org>
386
387 * server.c (start_inferior): Code refactor.
388
51aee833
YQ
3892015-07-24 Yao Qi <yao.qi@linaro.org>
390
391 * server.c (process_serial_event): Set general_thread.
392
af1b22f3
YQ
3932015-07-21 Yao Qi <yao.qi@linaro.org>
394
395 * linux-aarch64-low.c (aarch64_arch_setup): Remove code and call
396 aarch64_linux_get_debug_reg_capacity.
397
554717a3
YQ
3982015-07-17 Yao Qi <yao.qi@linaro.org>
399
400 * Makefile.in (aarch64-linux-hw-point.o): New rule.
401 * configure.srv (srv_tgtobj): Append aarch64-linux-hw-point.o.
402 * linux-aarch64-low.c: Include nat/aarch64-linux-hw-point.h.
403 (AARCH64_HBP_MAX_NUM): Move to nat/aarch64-linux-hw-point.h.
404 (AARCH64_HWP_MAX_NUM, AARCH64_HBP_ALIGNMENT): Likewise.
405 (AARCH64_HWP_ALIGNMENT): Likewise.
406 (AARCH64_HWP_MAX_LEN_PER_REG): Likewise.
407 (AARCH64_DEBUG_NUM_SLOTS, AARCH64_DEBUG_ARCH): Likewise.
408 (aarch64_num_bp_regs, aarch64_num_wp_regs): Likewise.
409 (AARCH64_DEBUG_ARCH_V8, DR_MARK_ALL_CHANGED): Likewise.
410 (DR_MARK_N_CHANGED, DR_CLEAR_CHANGED): Likewise.
411 (DR_HAS_CHANGED, DR_N_HAS_CHANGE): Likewise.
412 (struct aarch64_debug_reg_state): Likewise.
413 (struct arch_lwp_info): Likewise.
414 (aarch64_align_watchpoint): Likewise.
415 (DR_CONTROL_ENABLED, DR_CONTROL_LENGTH): Likewise.
416 (aarch64_watchpoint_length): Likewise.
417 (aarch64_point_encode_ctrl_reg): Likewise
418 (aarch64_point_is_aligned): Likewise.
419 (aarch64_align_watchpoint): Likewise.
420 (aarch64_linux_set_debug_regs):
421 (aarch64_dr_state_insert_one_point): Likewise.
422 (aarch64_dr_state_remove_one_point): Likewise.
423 (aarch64_handle_breakpoint): Likewise.
424 (aarch64_handle_aligned_watchpoint): Likewise.
425 (aarch64_handle_unaligned_watchpoint): Likewise.
426 (aarch64_handle_watchpoint): Likewise.
427
c67ca4de
YQ
4282015-07-17 Yao Qi <yao.qi@linaro.org>
429
430 * linux-aarch64-low.c (aarch64_handle_breakpoint): Add argument state
431 and don't aarch64_get_debug_reg_state. All callers update.
432 (aarch64_handle_aligned_watchpoint): Likewise.
433 (aarch64_handle_unaligned_watchpoint): Likewise.
434 (aarch64_handle_watchpoint): Likewise.
435 (aarch64_insert_point): Call aarch64_get_debug_reg_state earlier.
436 (aarch64_remove_point): Likewise.
437
25abf979
YQ
4382015-07-17 Yao Qi <yao.qi@linaro.org>
439
440 * linux-aarch64-low.c (aarch64_show_debug_reg_state): Use
441 debug_printf.
442 (aarch64_handle_unaligned_watchpoint): Likewise.
443
db1ff28b
JK
4442015-07-15 Jan Kratochvil <jan.kratochvil@redhat.com>
445
446 Revert the previous 3 commits:
447 Move gdb_regex* to common/
448 Move linux_find_memory_regions_full & co.
449 gdbserver build-id attribute generator
450
700ca40f
JK
4512015-07-15 Aleksandar Ristovski <aristovski@qnx.com
452 Jan Kratochvil <jan.kratochvil@redhat.com>
453
454 gdbserver build-id attribute generator.
455 * linux-low.c (nat/linux-maps.h, search.h, rsp-low.h): Include.
456 (ElfXX_Ehdr, ElfXX_Phdr, ElfXX_Nhdr): New.
457 (ELFXX_FLD, ELFXX_SIZEOF, ELFXX_ROUNDUP, BUILD_ID_INVALID): New.
458 (find_phdr): New.
459 (get_dynamic): Use find_pdhr to traverse program headers.
460 (struct mapping_entry, mapping_entry_s, free_mapping_entry_vec)
461 (compare_mapping_entry_range, struct find_memory_region_callback_data)
462 (read_build_id, find_memory_region_callback, lrfind_mapping_entry)
463 (get_hex_build_id): New.
464 (linux_qxfer_libraries_svr4): Add optional build-id attribute
465 to reply XML document.
466
9904185c
JK
4672015-07-15 Aleksandar Ristovski <aristovski@qnx.com
468 Jan Kratochvil <jan.kratochvil@redhat.com>
469
470 * target.c: Include target/target-utils.h and fcntl.h.
471 (target_fileio_read_stralloc_1_pread, target_fileio_read_stralloc_1)
472 (target_fileio_read_stralloc): New functions.
473
6e5b4429
JK
4742015-07-15 Jan Kratochvil <jan.kratochvil@redhat.com>
475
476 * Makefile.in (OBS): Add gdb_regex.o.
477 (gdb_regex.o): New.
478 * config.in: Rebuilt.
479 * configure: Rebuilt.
480
ddc98fbf
JK
4812015-07-15 Aleksandar Ristovski <aristovski@qnx.com
482 Jan Kratochvil <jan.kratochvil@redhat.com>
483
484 Create empty nat/linux-maps.[ch] and common/target-utils.[ch].
485 * Makefile.in (OBS): Add target-utils.o.
486 (linux-maps.o, target-utils.o): New.
487 * configure.srv (srv_linux_obj): Add linux-maps.o.
488
e57bb7a0
PL
4892015-07-15 Pierre Langlois <pierre.langlois@arm.com>
490
491 * linux-aarch64-low.c (aarch64_supports_range_stepping): New
492 function, return 1.
493 (the_low_target): Install it.
494
586b02a9
PA
4952015-07-14 Pedro Alves <palves@redhat.com>
496
497 * linux-low.c (kill_wait_lwp): Don't assert if waitpid fails.
498 Instead, ignore ECHILD, and throw an error for other errnos.
499
58c1b36c
PA
5002015-07-10 Pedro Alves <palves@redhat.com>
501
502 * event-loop.c (struct callback_event) <data>: Change type to
503 gdb_client_data instance instead of gdb_client_data pointer.
504 (append_callback_event): Adjust.
505
421530db
PL
5062015-07-10 Pierre Langlois <pierre.langlois@arm.com>
507
508 * linux-aarch64-low.c: Add comments for each linux_target_ops
509 method. Remove comments already covered in target_ops and
510 linux_target_ops definitions.
511 (the_low_target): Add comments for each unimplemented method.
512
c2d65f38
YQ
5132015-07-09 Yao Qi <yao.qi@linaro.org>
514
515 * linux-aarch64-low.c (aarch64_regmap): Remove.
516 (aarch64_usrregs_info): Remove.
517 (regs_info): Set field usrregs to NULL.
518
b20a6524
MM
5192015-07-02 Markus Metzger <markus.t.metzger@intel.com>
520
521 * linux-low.c: Include "rsp-low.h"
522 (linux_low_encode_pt_config, linux_low_encode_raw): New.
523 (linux_low_read_btrace): Support BTRACE_FORMAT_PT.
524 (linux_low_btrace_conf): Support BTRACE_FORMAT_PT.
525 (handle_btrace_enable_pt): New.
526 (handle_btrace_general_set): Support "pt".
527 (handle_btrace_conf_general_set): Support "pt:size".
528
96c97461
PL
5292015-06-29 Pierre Langlois <pierre.langlois@arm.com>
530
531 * linux-aarch64-low.c (aarch64_supports_z_point_type): Enable for
532 Z_PACKET_SW_BP.
533
37d66942
PL
5342015-06-29 Pierre Langlois <pierre.langlois@arm.com>
535
536 * linux-aarch64-low.c: Remove comment about endianness.
537 (aarch64_breakpoint): Change type to gdb_byte[]. Set to "brk #0".
538 (aarch64_breakpoint_at): Change type of insn to gdb_byte[]. Use
539 memcmp.
540
dc06243f
GB
5412015-06-24 Gary Benson <gbenson@redhat.com>
542
543 * linux-i386-ipa.c (stdint.h): Do not include.
544 * lynx-i386-low.c (stdint.h): Likewise.
545 * lynx-ppc-low.c (stdint.h): Likewise.
546 * mem-break.c (stdint.h): Likewise.
547 * thread-db.c (stdint.h): Likewise.
548 * tracepoint.c (stdint.h): Likewise.
549 * win32-low.c (stdint.h): Likewise.
550
124e13d9
SM
5512015-06-18 Simon Marchi <simon.marchi@ericsson.com>
552
553 * server.c (write_qxfer_response): Update call to
554 remote_escape_output.
555
909c2cda
JK
5562015-06-15 Aleksandar Ristovski <aristovski@qnx.com
557 Jan Kratochvil <jan.kratochvil@redhat.com>
558
559 Merge multiple hex conversions.
560 * gdbreplay.c (tohex): Rename to 'fromhex'.
561 (logchar): Use fromhex.
562
24c05f46
JK
5632015-06-10 Jan Kratochvil <jan.kratochvil@redhat.com>
564
565 * server.c (handle_qxfer_libraries): Set `version' attribute for
566 <library-list>.
567
14d2069a
GB
5682015-06-10 Gary Benson <gbenson@redhat.com>
569
570 * target.h (struct target_ops) <multifs_open>: New field.
571 <multifs_unlink>: Likewise.
572 <multifs_readlink>: Likewise.
573 * linux-low.c (nat/linux-namespaces.h): New include.
574 (linux_target_ops): Initialize the_target->multifs_open,
575 the_target->multifs_unlink and the_target->multifs_readlink.
576 * hostio.h (hostio_handle_new_gdb_connection): New declaration.
577 * hostio.c (hostio_fs_pid): New static variable.
578 (hostio_handle_new_gdb_connection): New function.
579 (handle_setfs): Likewise.
580 (handle_open): Use the_target->multifs_open as appropriate.
581 (handle_unlink): Use the_target->multifs_unlink as appropriate.
582 (handle_readlink): Use the_target->multifs_readlink as
583 appropriate.
584 (handle_vFile): Handle vFile:setfs packets.
585 * server.c (handle_query): Call hostio_handle_new_gdb_connection
586 after target_handle_new_gdb_connection.
587
4b8b5e72
GB
5882015-06-10 Gary Benson <gbenson@redhat.com>
589
590 * configure.ac (AC_CHECK_FUNCS): Add setns.
591 * config.in: Regenerate.
592 * configure: Likewise.
593 * Makefile.in (SFILES): Add nat/linux-namespaces.c.
594 (linux-namespaces.o): New rule.
595 * configure.srv (srv_linux_obj): Add linux-namespaces.o.
596
3ac2e371
GB
5972015-06-09 Gary Benson <gbenson@redhat.com>
598
599 * hostio.c (handle_open): Process mode argument with
600 fileio_to_host_mode.
601
ca9b78ce
YQ
6022015-06-01 Yao Qi <yao.qi@linaro.org>
603
604 * linux-s390-low.c (PTRACE_GETREGSET, PTRACE_SETREGSET): Remove.
605 * linux-x86-low.c: Likewise.
606
bfacd19d
DB
6072015-05-28 Don Breazeal <donb@codesourcery.com>
608
609 * linux-low.c (handle_extended_wait): Initialize
610 thread_info.last_resume_kind for new fork children.
611
452003ef
PA
6122015-05-15 Pedro Alves <palves@redhat.com>
613
614 * target.h (target_handle_new_gdb_connection): Rewrite using if
615 wrapped in do/while.
616
1041a03c
JB
6172015-05-14 Joel Brobecker <brobecker@adacore.com>
618
619 * configure.ac: Add prfpregset_t BFD_HAVE_SYS_PROCFS_TYPE check.
620 * configure, config.in: Regenerate.
621 * gdb_proc_service.h [HAVE_PRFPREGSET_T] (prfpregset_t):
622 Declare typedef.
623
c269dbdb
DB
6242015-05-12 Don Breazeal <donb@codesourcery.com>
625
626 * linux-low.c (handle_extended_wait): Handle PTRACE_EVENT_FORK and
627 PTRACE_EVENT_VFORK_DONE.
628 (linux_low_ptrace_options, extended_event_reported): Add vfork
629 events.
630 * remote-utils.c (prepare_resume_reply): New stop reasons "vfork"
631 and "vforkdone" for RSP 'T' Stop Reply Packet.
632 * server.h (report_vfork_events): Declare
633 global variable.
634
3a8a0396
DB
6352015-05-12 Don Breazeal <donb@codesourcery.com>
636
637 * linux-aarch64-low.c (aarch64_linux_new_fork): New function.
638 (the_low_target) <new_fork>: Initialize new member.
639 * linux-arm-low.c (arm_new_fork): New function.
640 (the_low_target) <new_fork>: Initialize new member.
641 * linux-low.c (handle_extended_wait): Call new target function
642 new_fork.
643 * linux-low.h (struct linux_target_ops) <new_fork>: New member.
644 * linux-mips-low.c (mips_add_watchpoint): New function
645 extracted from mips_insert_point.
646 (the_low_target) <new_fork>: Initialize new member.
647 (mips_linux_new_fork): New function.
648 (mips_insert_point): Call mips_add_watchpoint.
649 * linux-x86-low.c (x86_linux_new_fork): New function.
650 (the_low_target) <new_fork>: Initialize new member.
651
de0d863e
DB
6522015-05-12 Don Breazeal <donb@codesourcery.com>
653
654 * linux-low.c (handle_extended_wait): Implement return value,
655 rename argument 'event_child' to 'event_lwp', handle
656 PTRACE_EVENT_FORK, call internal_error for unrecognized event.
657 (linux_low_ptrace_options): New function.
658 (linux_low_filter_event): Call linux_low_ptrace_options,
659 use different argument fo linux_enable_event_reporting,
660 use return value from handle_extended_wait.
661 (extended_event_reported): New function.
662 (linux_wait_1): Call extended_event_reported and set
663 status to report fork events.
664 (linux_write_memory): Add pid to debug message.
665 (reset_lwp_ptrace_options_callback): New function.
666 (linux_handle_new_gdb_connection): New function.
667 (linux_target_ops): Initialize new structure member.
668 * linux-low.h (struct lwp_info) <waitstatus>: New member.
669 * lynx-low.c: Initialize new structure member.
670 * remote-utils.c (prepare_resume_reply): Implement stop reason
671 "fork" for "T" stop message.
672 * server.c (handle_query): Call handle_new_gdb_connection.
673 * server.h (report_fork_events): Declare global flag.
674 * target.h (struct target_ops) <handle_new_gdb_connection>:
675 New member.
676 (target_handle_new_gdb_connection): New macro.
677 * win32-low.c: Initialize new structure member.
678
ddcbc397
DB
6792015-05-12 Don Breazeal <donb@codesourcery.com>
680
681 * mem-break.c (APPEND_TO_LIST): Define macro.
682 (clone_agent_expr): New function.
683 (clone_one_breakpoint): New function.
684 (clone_all_breakpoints): New function.
685 * mem-break.h: Declare new functions.
686
89245bc0
DB
6872015-05-12 Don Breazeal <donb@codesourcery.com>
688
689 * linux-low.c (linux_supports_fork_events): New function.
690 (linux_supports_vfork_events): New function.
691 (linux_target_ops): Initialize new structure members.
692 (initialize_low): Call linux_check_ptrace_features.
693 * lynx-low.c (lynx_target_ops): Initialize new structure
694 members.
695 * server.c (report_fork_events, report_vfork_events):
696 New global flags.
697 (handle_query): Add new features to qSupported packet and
698 response.
699 (captured_main): Initialize new global variables.
700 * target.h (struct target_ops) <supports_fork_events>:
701 New member.
702 <supports_vfork_events>: New member.
703 (target_supports_fork_events): New macro.
704 (target_supports_vfork_events): New macro.
705 * win32-low.c (win32_target_ops): Initialize new structure
706 members.
707
835205d0
GB
7082015-05-12 Gary Benson <gbenson@redhat.com>
709
710 * server.c (handle_qxfer_exec_file): Use current process
711 if annex is empty.
712
21e94bd9
SL
7132015-05-08 Sandra Loosemore <sandra@codesourcery.com>
714
715 * linux-nios2-low.c: Include elf/common.h. Adjust comments.
716 Remove HAVE_PTRACE_GETREGS conditionals.
717 (nios2_regsets): Use PTRACE_GETREGSET and PTRACE_SETREGSET
718 instead of PTRACE_GETREGS and PTRACE_SETREGS.
719
45614f15
YQ
7202015-05-08 Yao Qi <yao.qi@linaro.org>
721
722 * linux-low.c (linux_supports_conditional_breakpoints): New
723 function.
724 (linux_target_ops): Install new target method.
725 * lynx-low.c (lynx_target_ops): Install NULL hook for
726 supports_conditional_breakpoints.
727 * nto-low.c (nto_target_ops): Likewise.
728 * spu-low.c (spu_target_ops): Likewise.
729 * win32-low.c (win32_target_ops): Likewise.
730 * server.c (handle_query): Check
731 target_supports_conditional_breakpoints.
732 * target.h (struct target_ops) <supports_conditional_breakpoints>:
733 New field.
734 (target_supports_conditional_breakpoints): New macro.
735
80ad801e
PA
7362015-05-06 Pedro Alves <palves@redhat.com>
737
738 PR server/18081
739 * server.c (start_inferior): If the process exits, mourn it.
740
819843c7
GB
7412015-04-21 Gary Benson <gbenson@redhat.com>
742
743 * hostio.c (fileio_open_flags_to_host): Factored out to
744 fileio_to_host_openflags in common/fileio.c. Single use
745 updated.
746
a2d5a9d7
MF
7472015-04-17 Max Filippov <jcmvbkbc@gmail.com>
748
749 * linux-xtensa-low.c (xtensa_fill_gregset)
750 (xtensa_store_gregset): Check XCHAL_HAVE_LOOPS instead of
751 XCHAL_HAVE_LOOP.
752
deb44829
MF
7532015-04-17 Max Filippov <jcmvbkbc@gmail.com>
754
755 * linux-xtensa-low.c (xtensa_usrregs_info): Remove.
756 (regs_info): Replace usrregs pointer with NULL.
757
e57f1de3
GB
7582015-04-17 Gary Benson <gbenson@redhat.com>
759
760 * target.h (struct target_ops) <pid_to_exec_file>: New field.
761 * linux-low.c (linux_target_ops): Initialize pid_to_exec_file.
762 * server.c (handle_qxfer_exec_file): New function.
763 (qxfer_packets): Add exec-file entry.
764 (handle_query): Report qXfer:exec-file:read as supported packet.
765
62828379
RN
7662015-04-14 Romain Naour <romain.naour@openwide.fr> (tiny change)
767
768 * linux-low.c (linux_read_offsets): Remove get_thread_lwp.
769
b88bb450
GB
7702015-04-09 Gary Benson <gbenson@redhat.com>
771
772 * hostio-errno.c (errno_to_fileio_error): Remove function.
773 Update caller to use remote_fileio_to_fio_error.
774
c8f4bfdd
YQ
7752015-04-09 Yao Qi <yao.qi@linaro.org>
776
777 * linux-low.c (linux_insert_point): Call
778 insert_memory_breakpoint if TYPE is raw_bkpt_type_sw.
779 (linux_remove_point): Call remove_memory_breakpoint if type is
780 raw_bkpt_type_sw.
781 * linux-x86-low.c (x86_insert_point): Don't call
782 insert_memory_breakpoint.
783 (x86_remove_point): Don't call remove_memory_breakpoint.
784
41f98f02
PA
7852015-04-01 Pedro Alves <palves@redhat.com>
786 Cleber Rosa <crosa@redhat.com>
787
788 * server.c (gdbserver_usage): Reorganize and extend the usage
789 message.
790
2bf6fb9d
PA
7912015-03-24 Pedro Alves <palves@redhat.com>
792
793 * linux-low.c (check_stopped_by_breakpoint): Tweak debug log
794 output. Also dump TRAP_TRACE.
795 (linux_low_filter_event): In debug output, distinguish a
796 resume_stop SIGSTOP from a delayed SIGSTOP.
797
369f6daa
GB
7982015-03-24 Gary Benson <gbenson@redhat.com>
799
800 * linux-x86-low.c (x86_linux_new_thread): Moved to
801 nat/x86-linux.c.
802 (x86_linux_prepare_to_resume): Likewise.
803
8e5d4070
GB
8042015-03-24 Gary Benson <gbenson@redhat.com>
805
806 * Makefile.in (x86-linux-dregs.o): New rule.
807 * configure.srv: Add x86-linux-dregs.o to relevant targets.
808 * linux-x86-low.c: Include nat/x86-linux-dregs.h.
809 (u_debugreg_offset): Moved to nat/x86-linux-dregs.c.
810 (x86_linux_dr_get): Likewise.
811 (x86_linux_dr_set): Likewise.
812 (update_debug_registers_callback): Likewise.
813 (x86_linux_dr_set_addr): Likewise.
814 (x86_linux_dr_get_addr): Likewise.
815 (x86_linux_dr_set_control): Likewise.
816 (x86_linux_dr_get_control): Likewise.
817 (x86_linux_dr_get_status): Likewise.
818 (x86_linux_update_debug_registers): Likewise.
819
2b95d440
GB
8202015-03-24 Gary Benson <gbenson@redhat.com>
821
822 * linux-x86-low.c (x86_linux_update_debug_registers):
823 New function, factored out from...
824 (x86_linux_prepare_to_resume): ...this.
825
14b0bc68
GB
8262015-03-24 Gary Benson <gbenson@redhat.com>
827
828 * linux-x86-low.c (x86_linux_dr_get): Update comments.
829 (x86_linux_dr_set): Likewise.
830 (update_debug_registers_callback): Likewise.
831 (x86_linux_dr_set_addr): Likewise.
832 (x86_linux_dr_get_addr): Likewise.
833 (x86_linux_dr_set_control): Likewise.
834 (x86_linux_dr_get_control): Likewise.
835 (x86_linux_dr_get_status): Likewise.
836 (x86_linux_prepare_to_resume): Likewise.
837
5dfe6ca8
GB
8382015-03-24 Gary Benson <gbenson@redhat.com>
839
840 * linux-x86-low.c (x86_linux_dr_get): Add assertion.
841 Use perror_with_name. Pass string through gettext.
842 (x86_linux_dr_set): Likewise.
843
d33472ad
GB
8442015-03-24 Gary Benson <gbenson@redhat.com>
845
846 * linux-x86-low.c (x86_dr_low_set_addr): Rename to...
847 (x86_linux_dr_set_addr): ...this.
848 (x86_dr_low_get_addr): Rename to...
849 (x86_linux_dr_get_addr): ...this.
850 (x86_dr_low_set_control): Rename to...
851 (x86_linux_dr_set_control): ...this.
852 (x86_dr_low_get_control): Rename to...
853 (x86_linux_dr_get_control): ...this.
854 (x86_dr_low_get_status): Rename to...
855 (x86_linux_dr_get_status): ...this.
856 (x86_dr_low): Update with new function names.
857
4b134ca1
GB
8582015-03-24 Gary Benson <gbenson@redhat.com>
859
860 * Makefile.in (x86-linux.o): New rule.
861 * configure.srv: Add x86-linux.o to relevant targets.
862 * linux-low.c (lwp_set_arch_private_info): New function.
863 (lwp_arch_private_info): Likewise.
864 * linux-x86-low.c: Include nat/x86-linux.h.
865 (arch_lwp_info): Removed structure.
866 (update_debug_registers_callback):
867 Use lwp_set_debug_registers_changed.
868 (x86_linux_prepare_to_resume): Use lwp_debug_registers_changed
869 and lwp_set_debug_registers_changed.
870 (x86_linux_new_thread): Use lwp_set_debug_registers_changed.
871
34c703da
GB
8722015-03-24 Gary Benson <gbenson@redhat.com>
873
874 * linux-low.h (linux_target_ops) <new_thread>: Changed signature.
875 * linux-arm-low.c (arm_new_thread): Likewise.
876 * linux-aarch64-low.c (aarch64_linux_new_thread): Likewise.
877 * linux-mips-low.c (mips_linux_new_thread): Likewise.
878 * linux-x86-low.c (x86_linux_new_thread): Likewise.
879 * linux-low.c (add_lwp): Update the_low_target.new_thread call.
880
cff068da
GB
8812015-03-24 Gary Benson <gbenson@redhat.com>
882
883 * linux-low.c (ptid_of_lwp): New function.
884 (lwp_is_stopped): Likewise.
885 (lwp_stop_reason): Likewise.
886 * linux-x86-low.c (update_debug_registers_callback):
887 Use lwp_is_stopped.
888 (x86_linux_prepare_to_resume): Use ptid_of_lwp and
889 lwp_stop_reason.
890
b2f7c7e8
GB
8912015-03-24 Gary Benson <gbenson@redhat.com>
892
893 * linux-low.h (linux_stop_lwp): Remove declaration.
894
6d4ee8c6
GB
8952015-03-24 Gary Benson <gbenson@redhat.com>
896
897 * linux-low.h: Include nat/linux-nat.h.
898 * linux-low.c (iterate_over_lwps_args): New structure.
899 (iterate_over_lwps_filter): New function.
900 (iterate_over_lwps): Likewise.
901 * linux-x86-low.c (update_debug_registers_callback):
902 Update signature to what iterate_over_lwps expects.
903 Remove PID check that iterate_over_lwps now performs.
904 (x86_dr_low_set_addr): Use iterate_over_lwps.
905 (x86_dr_low_set_control): Likewise.
906
70a0bb6b
GB
9072015-03-24 Gary Benson <gbenson@redhat.com>
908
909 * linux-x86-low.c (x86_debug_reg_state): New function.
910 (x86_linux_prepare_to_resume): Use the above.
911
7b669087
GB
9122015-03-24 Gary Benson <gbenson@redhat.com>
913
914 * linux-low.c (current_lwp_ptid): New function.
915 * linux-x86-low.c: Include nat/linux-nat.h.
916 (x86_dr_low_get_addr): Use current_lwp_ptid.
917 (x86_dr_low_get_control): Likewise.
918 (x86_dr_low_get_status): Likewise.
919
eef49a3d
PA
9202015-03-20 Pedro Alves <palves@redhat.com>
921
922 * tracepoint.c (cmd_qtstatus): Make "str" const.
923
b2333d22
PA
9242015-03-20 Pedro Alves <palves@redhat.com>
925
926 * server.c (handle_general_set): Make "req_str" const.
927
23f238d3
PA
9282015-03-19 Pedro Alves <palves@redhat.com>
929
930 * linux-low.c (linux_resume_one_lwp): Rename to ...
931 (linux_resume_one_lwp_throw): ... this. Don't handle ESRCH here,
932 instead call perror_with_name.
933 (check_ptrace_stopped_lwp_gone): New function.
934 (linux_resume_one_lwp): Reimplement as wrapper around
935 linux_resume_one_lwp_throw that swallows errors if the LWP is
936 gone.
937
91baf43f
PA
9382015-03-19 Pedro Alves <palves@redhat.com>
939
940 * linux-low.c (count_events_callback, select_event_lwp_callback):
941 No longer check whether the thread has resume_stop as last resume
942 kind.
943
8bf3b159
PA
9442015-03-19 Pedro Alves <palves@redhat.com>
945
946 * linux-low.c (count_events_callback, select_event_lwp_callback):
947 Use the lwp's status_pending_p field, not the thread's.
948
b90fc188
PA
9492015-03-19 Pedro Alves <palves@redhat.com>
950
951 * linux-low.c (select_event_lwp_callback): Update comments to
952 no longer mention SIGTRAP.
953
464b0089
GB
9542015-03-18 Gary Benson <gbenson@redhat.com>
955
956 * server.c (handle_query): Do not report vFile:fstat as supported.
957
aa9e327f
GB
9582015-03-11 Gary Benson <gbenson@redhat.com>
959
960 * hostio.c (sys/types.h): New include.
961 (sys/stat.h): Likewise.
962 (common-remote-fileio.h): Likewise.
963 (handle_fstat): New function.
964 (handle_vFile): Handle vFile:fstat packets.
aa9e327f 965
791c0056
GB
9662015-03-11 Gary Benson <gbenson@redhat.com>
967
968 * configure.ac (AC_CHECK_MEMBERS): Add checks for
969 struct stat.st_blocks and struct stat.st_blksize.
970 * configure: Regenerate.
971 * config.in: Likewise.
972 * Makefile.in (SFILES): Add common/common-remote-fileio.c.
973 (OBS): Add common-remote-fileio.o.
974 (common-remote-fileio.o): New rule.
975
9a9df970
PA
9762015-03-09 Pedro Alves <palves@redhat.com>
977
978 * tracepoint.c (gdb_agent_helper_thread): Cast '&sockaddr' to
979 'struct sockaddr' pointer in 'accept' call.
980
9eb1356e
PA
9812015-03-09 Pedro Alves <palves@redhat.com>
982
983 Revert:
984 2015-03-07 Pedro Alves <palves@redhat.com>
985 * gdbreplay.c: No longer include <netinet/in.h>, <sys/socket.h>,
986 or <winsock2.h> here. Instead include "gdb_socket.h".
987 (remote_open): Use union gdb_sockaddr_u.
988 * remote-utils.c: No longer include <netinet/in.h>, <sys/socket.h>
989 or <winsock2.h> here. Instead include "gdb_socket.h".
990 (handle_accept_event, remote_prepare): Use union gdb_sockaddr_u.
991 * tracepoint.c: Include "gdb_socket.h" instead of <sys/socket.h>
992 or <sys/un.h>.
993 (init_named_socket, gdb_agent_helper_thread): Use union
994 gdb_sockaddr_u.
995
aac331e4
PA
9962015-03-07 Pedro Alves <palves@redhat.com>
997
998 * configure.ac (build_warnings): Move
999 -Wdeclaration-after-statement to the C-specific set.
1000 * configure: Regenerate.
1001
366c75fc
PA
10022015-03-07 Pedro Alves <palves@redhat.com>
1003
1004 * gdbreplay.c: No longer include <netinet/in.h>, <sys/socket.h>,
1005 or <winsock2.h> here. Instead include "gdb_socket.h".
1006 (remote_open): Use union gdb_sockaddr_u.
1007 * remote-utils.c: No longer include <netinet/in.h>, <sys/socket.h>
1008 or <winsock2.h> here. Instead include "gdb_socket.h".
1009 (handle_accept_event, remote_prepare): Use union gdb_sockaddr_u.
1010 * tracepoint.c: Include "gdb_socket.h" instead of <sys/socket.h>
1011 or <sys/un.h>.
1012 (init_named_socket, gdb_agent_helper_thread): Use union
1013 gdb_sockaddr_u.
1014
492d29ea
PA
10152015-03-07 Pedro Alves <palves@redhat.com>
1016
1017 Adjust all callers of TRY_CATCH to use TRY/CATCH/END_CATCH
1018 instead.
1019
60a191ed
YQ
10202015-03-06 Yao Qi <yao.qi@linaro.org>
1021
1022 * linux-aarch64-low.c (aarch64_insert_point): Use
1023 show_debug_regs as a boolean.
1024 (aarch64_remove_point): Likewise.
1025
f5771b1d
PA
10262015-03-05 Pedro Alves <palves@redhat.com>
1027
1028 * lynx-low.c (lynx_target_ops): Install NULL hooks for
1029 stopped_by_sw_breakpoint, supports_stopped_by_sw_breakpoint,
1030 stopped_by_hw_breakpoint, supports_stopped_by_hw_breakpoint.
1031 * nto-low.c (nto_target_ops): Likewise.
1032 * spu-low.c (spu_target_ops): Likewise.
1033 * win32-low.c (win32_target_ops): Likewise.
1034
3e572f71
PA
10352015-03-04 Pedro Alves <palves@redhat.com>
1036
72f4393d 1037 * linux-low.c (check_stopped_by_breakpoint) [USE_SIGTRAP_SIGINFO]:
3e572f71
PA
1038 Decide whether a breakpoint triggered based on the SIGTRAP's
1039 siginfo.si_code.
72f4393d
L
1040 (thread_still_has_status_pending_p) [USE_SIGTRAP_SIGINFO]: Don't check whether a
1041 breakpoint is inserted if relying on SIGTRAP's siginfo.si_code.
3e572f71
PA
1042 (linux_low_filter_event): Check for breakpoints before checking
1043 watchpoints.
1044 (linux_wait_1): Don't re-increment the PC if relying on SIGTRAP's
1045 siginfo.si_code.
72f4393d
L
1046 (linux_stopped_by_sw_breakpoint)
1047 (linux_supports_stopped_by_sw_breakpoint)
1048 (linux_stopped_by_hw_breakpoint)
1049 (linux_supports_stopped_by_hw_breakpoint): New functions.
1050 (linux_target_ops): Install new target methods.
3e572f71 1051
1ec68e26
PA
10522015-03-04 Pedro Alves <palves@redhat.com>
1053
1054 * remote-utils.c (prepare_resume_reply): Report swbreak/hbreak.
1055 * server.c (swbreak_feature, hwbreak_feature): New globals.
1056 (handle_query) <qSupported>: Handle "swbreak+" and "hwbreak+".
1057 (captured_main): Clear swbreak_feature and hwbreak_feature.
1058 * server.h (swbreak_feature, hwbreak_feature): Declare.
1059 * target.h (struct target_ops) <stopped_by_sw_breakpoint,
1060 supports_stopped_by_sw_breakpoint, stopped_by_hw_breakpoint,
1061 supports_stopped_by_hw_breakpoint>: New fields.
1062 (target_supports_stopped_by_sw_breakpoint)
1063 (target_stopped_by_sw_breakpoint)
1064 (target_supports_stopped_by_hw_breakpoint)
1065 (target_stopped_by_hw_breakpoint): Declare.
1066
15c66dd6
PA
10672015-03-04 Pedro Alves <palves@redhat.com>
1068
1069 enum lwp_stop_reason -> enum target_stop_reason
1070 * linux-low.c (check_stopped_by_breakpoint): Adjust.
1071 (thread_still_has_status_pending_p, check_stopped_by_watchpoint)
1072 (linux_wait_1, stuck_in_jump_pad_callback)
1073 (move_out_of_jump_pad_callback, linux_resume_one_lwp)
1074 (linux_stopped_by_watchpoint):
1075 * linux-low.h (enum lwp_stop_reason): Delete.
1076 (struct lwp_info) <stop_reason>: Now an enum target_stop_reason.
1077 * linux-x86-low.c (x86_linux_prepare_to_resume): Adjust.
1078
98fc70d6
YQ
10792015-03-04 Yao Qi <yao.qi@linaro.org>
1080
1081 * Makefile.in (SFILES): Add linux-aarch64-low.c.
1082
dd2ac174
GB
10832015-03-03 Gary Benson <gbenson@redhat.com>
1084
1085 * hostio.c (handle_vFile): Fix prefix lengths.
1086
d68e53f4
MM
10872015-03-03 Markus Metzger <markus.t.metzger@intel.com>
1088
1089 * linux-low.c (linux_low_enable_btrace): Do not overwrite non-zero
1090 ptr_bits.
1091
bf2d68ab
AA
10922015-03-02 Andreas Arnez <arnez@linux.vnet.ibm.com>
1093
1094 * Makefile.in (s390-vx-linux64.c, s390-tevx-linux64.c)
1095 (s390x-vx-linux64.c, s390x-tevx-linux64.c): New rules.
1096 (clean): Add "rm -f" for above C files.
1097 * configure.srv (srv_regobj): Add s390-vx-linux64.o,
1098 s390-tevx-linux64.o, s390x-vx-linux64.o, and s390x-tevx-linux64.o.
1099 (srv_xmlfiles): Add s390-vx-linux64.xml, s390-tevx-linux64.xml,
1100 s390x-vx-linux64.xml, s390x-tevx-linux64.xml, and s390-vx.xml.
1101 * linux-s390-low.c (HWCAP_S390_VX): New macro.
1102 (init_registers_s390_vx_linux64, init_registers_s390_tevx_linux64)
1103 (init_registers_s390x_vx_linux64)
1104 (init_registers_s390x_tevx_linux64)
1105 (tdesc_s390_vx_linux64, tdesc_s390_tevx_linux64)
1106 (tdesc_s390x_vx_linux64, tdesc_s390x_tevx_linux64): New extern
1107 declarations.
1108 (s390_fill_vxrs_low, s390_store_vxrs_low, s390_fill_vxrs_high)
1109 (s390_store_vxrs_high): New functions.
1110 (s390_regsets): Add entries for NT_S390_VXRS_LOW and
1111 NT_S390_VXRS_HIGH.
1112 (s390_arch_setup): Add logic for selecting one of the new target
1113 descriptions. Activate the new vector regsets if applicable.
1114 (initialize_low_arch): Also invoke init_registers_s390_vx_linux64,
1115 init_registers_s390_tevx_linux64, init_registers_s390x_vx_linux64,
1116 and init_registers_s390x_tevx_linux64.
1117
c966a859
PA
11182015-03-01 Pedro Alves <palves@redhat.com>
1119
1120 * linux-i386-ipa.c (gdb_agent_get_raw_reg): Constify 'raw_regs'
1121 parameter.
1122
4180215b
PA
11232015-02-27 Pedro Alves <palves@redhat.com>
1124
1125 * linux-x86-low.c (u_debugreg_offset): New function.
1126 (x86_linux_dr_get, x86_linux_dr_set): Use it.
1127
749bab01
PA
11282015-02-27 Pedro Alves <palves@redhat.com>
1129
1130 * gdb_proc_service.h: Wrap with EXTERN_C_PUSH/EXTERN_C_POP.
1131 [!HAVE_PROC_SERVICE_H] (struct ps_prochandle): Forward declare.
1132 [!HAVE_PROC_SERVICE_H] (ps_pdread, ps_pdwrite, ps_ptread)
1133 ps_ptwrite, ps_lgetregs, ps_lsetregs, ps_lgetfpregs)
1134 (ps_lsetfpregs, ps_getpid)
1135 (ps_get_thread_area, ps_pglobal_lookup, ps_pstop, ps_pcontinue)
1136 (ps_lstop, ps_lcontinue, ps_lgetxregsize, ps_lgetxregs)
1137 (ps_lsetxregs, ps_plog): Declare.
1138
3c14e5a3
PA
11392015-02-27 Pedro Alves <palves@redhat.com>
1140
1141 * linux-amd64-ipa.c (gdb_agent_get_raw_reg): Use
1142 IP_AGENT_EXPORT_FUNC.
1143 * linux-i386-ipa.c (gdb_agent_get_raw_reg): Use
1144 IP_AGENT_EXPORT_FUNC.
1145 * tracepoint.c (ATTR_USED, ATTR_NOINLINE, ATTR_CONSTRUCTOR)
1146 (IP_AGENT_EXPORT): Delete.
1147 (gdb_tp_heap_buffer, gdb_jump_pad_buffer, gdb_jump_pad_buffer_end)
1148 (gdb_trampoline_buffer, gdb_trampoline_buffer_end)
1149 (gdb_trampoline_buffer_error, collecting, gdb_collect)
1150 (stop_tracing, flush_trace_buffer, about_to_request_buffer_space)
1151 (trace_buffer_is_full, stopping_tracepoint, expr_eval_result)
1152 (error_tracepoint, tracepoints, tracing, trace_buffer_ctrl)
1153 (trace_buffer_ctrl_curr, trace_buffer_lo, trace_buffer_hi)
1154 (traceframe_read_count, traceframe_write_count)
1155 (traceframes_created, trace_state_variables, get_raw_reg)
1156 (get_trace_state_variable_value, set_trace_state_variable_value)
1157 (ust_loaded, helper_thread_id, cmd_buf): Use
1158 IPA_SYM_EXPORTED_NAME.
1159 (stop_tracing, flush_trace_buffer): Use IP_AGENT_EXPORT_FUNC.
1160 (tracepoints) Use IP_AGENT_EXPORT_VAR.
1161 (stopping_tracepoint, trace_buffer_is_full, expr_eval_result): Use
1162 IP_AGENT_EXPORT_VAR and wrap in EXTERN_C_PUSH/EXTERN_C_POP.
1163 (last_tracepoint): Move into !IN_PROCESS_AGENT block.
1164 (error_tracepoint): Use IP_AGENT_EXPORT_VAR and wrap in
1165 EXTERN_C_PUSH/EXTERN_C_POP.
1166 (trace_state_variables): Use IP_AGENT_EXPORT_VAR.
1167 (trace_buffer_lo, trace_buffer_hi): Use IP_AGENT_EXPORT_VAR and
1168 wrap in EXTERN_C_PUSH/EXTERN_C_POP.
1169 (trace_buffer_ctrl, trace_buffer_ctrl_curr)
1170 (traceframe_write_count, traceframe_read_count)
1171 (traceframes_created, tracing): Use IP_AGENT_EXPORT_VAR.
1172 (about_to_request_buffer_space, get_trace_state_variable_value)
1173 (set_trace_state_variable_value): Use IP_AGENT_EXPORT_FUNC.
1174 (collecting): Use IP_AGENT_EXPORT_VAR and wrap in
1175 EXTERN_C_PUSH/EXTERN_C_POP.
1176 (gdb_collect): Use IP_AGENT_EXPORT_FUNC.
1177 (ust_loaded, cmd_buf): Use IP_AGENT_EXPORT_VAR.
1178 (helper_thread_id, gdb_agent_capability): Use IP_AGENT_EXPORT_VAR
1179 and wrap in EXTERN_C_PUSH/EXTERN_C_POP.
1180 (gdb_tp_heap_buffer, gdb_jump_pad_buffer, gdb_jump_pad_buffer_end)
1181 (gdb_trampoline_buffer, gdb_trampoline_buffer_end)
1182 (gdb_trampoline_buffer_error): Use IP_AGENT_EXPORT_VAR.
1183 * tracepoint.h (ATTR_USED, ATTR_NOINLINE, EXPORTED_SYMBOL):
1184 Define.
1185 (IP_AGENT_EXPORT_FUNC, IP_AGENT_EXPORT_VAR)
1186 (IP_AGENT_EXPORT_VAR_DECL): Define.
1187 (tracing): Declare.
1188 (gdb_agent_get_raw_reg): Declare.
1189
fe978cb0
PA
11902015-02-27 Tom Tromey <tromey@redhat.com>
1191 Pedro Alves <palves@redhat.com>
1192
1193 Rename symbols whose names are reserved C++ keywords throughout.
1194
3bc3d82a
PA
11952015-02-27 Pedro Alves <palves@redhat.com>
1196
1197 * Makefile.in (COMPILER): New, get it from autoconf.
1198 (CXX): Get from autoconf instead.
1199 (COMPILE.pre): Use COMPILER.
1200 (CC-LD): Rename to ...
1201 (CC_LD): ... this. Use COMPILER.
1202 (gdbserver$(EXEEXT), gdbreplay$(EXEEXT), $(IPA_LIB)): Adjust.
1203 (CXX_FOR_TARGET): Default to g++ instead of gcc.
1204 * acinclude.m4: Include build-with-cxx.m4.
1205 * configure.ac: Call AC_PROG_CXX and GDB_AC_BUILD_WITH_CXX.
1206 Disable -Werror by default if building in C++ mode.
1207 (build_warnings): Add -Wno-sign-compare, -Wno-write-strings and
1208 -Wno-narrowing in C++ mode. Run supported-warning-flags tests with
1209 the C++ compiler. Save/restore CXXFLAGS too.
1210 * configure: Regenerate.
1211
07697489
PA
12122015-02-27 Pedro Alves <palves@redhat.com>
1213
1214 * acinclude.m4: Include libiberty.m4.
1215 * configure.ac: Call libiberty_INIT.
1216 * config.in, configure: Regenerate.
1217
9beb7c4e
PA
12182015-02-26 Pedro Alves <palves@redhat.com>
1219
1220 * linux-low.c (linux_wait_1): When incrementing the PC past a
1221 program breakpoint always use the_low_target.breakpoint_len as
1222 increment, rather than the maximum between that and
1223 the_low_target.decr_pc_after_break.
1224
8090aef2
PA
12252015-02-23 Pedro Alves <palves@redhat.com>
1226
1227 * linux-low.c (check_stopped_by_breakpoint): Don't check if the
1228 thread was doing a step-over; always adjust the PC if
1229 we stepped over a permanent breakpoint.
1230 (linux_wait_1): If we stepped over breakpoint that was on top of a
1231 permanent breakpoint, manually advance the PC past it.
1232
bc9540e8
PA
12332015-02-23 Pedro Alves <palves@redhat.com>
1234
1235 * linux-x86-low.c (REGSIZE): Define in both 32-bit and 64-bit
1236 modes.
1237 (x86_fill_gregset, x86_store_gregset): Use it when handling
1238 $orig_eax.
1239
2db9a427
PA
12402015-02-20 Pedro Alves <palves@redhat.com>
1241
1242 * thread-db.c: Include "nat/linux-procfs.h".
1243 (thread_db_init): Skip listing new threads if the kernel supports
1244 PTRACE_EVENT_CLONE and /proc/PID/task/ is accessible.
1245
afa8d396
PA
12462015-02-20 Pedro Alves <palves@redhat.com>
1247
1248 * linux-low.c (status_pending_p_callback): Use ptid_match.
1249
c9587f88
AT
12502015-02-19 Antoine Tremblay <antoine.tremblay@ericsson.com>
1251
1252 PR breakpoints/16812
1253 * linux-low.c (wstatus_maybe_breakpoint): Remove.
1254 (linux_low_filter_event): Update wstatus_maybe_breakpoint name.
1255 (linux_wait_1): Report SIGTRAP,SIGILL,SIGSEGV.
1256
b05ec7a5
AT
12572015-02-10 Antoine Tremblay <antoine.tremblay@ericsson.com>
1258
1259 PR breakpoints/15956
1260 * tracepoint.c (cmd_qtinit): Add check for current_thread.
1261
d33501a5
MM
12622015-02-09 Markus Metzger <markus.t.metzger@intel.com>
1263
1264 * linux-low.c (linux_low_btrace_conf): Print size.
1265 * server.c (handle_btrace_conf_general_set): New.
1266 (hanle_general_set): Call handle_btrace_conf_general_set.
1267 (handle_query): Report Qbtrace-conf:bts:size as supported.
1268
f4abbc16
MM
12692015-02-09 Markus Metzger <markus.t.metzger@intel.com>
1270
1271 * linux-low.c (linux_low_enable_btrace): Update parameters.
1272 (linux_low_btrace_conf): New.
1273 (linux_target_ops)<to_btrace_conf>: Initialize.
1274 * server.c (current_btrace_conf): New.
1275 (handle_btrace_enable): Rename to ...
1276 (handle_btrace_enable_bts): ... this. Pass &current_btrace_conf
1277 to target_enable_btrace. Update comment. Update users.
1278 (handle_qxfer_btrace_conf): New.
1279 (qxfer_packets): Add btrace-conf entry.
1280 (handle_query): Report qXfer:btrace-conf:read as supported packet.
1281 * target.h (target_ops)<enable_btrace>: Update parameters and comment.
1282 (target_ops)<read_btrace_conf>: New.
1283 (target_enable_btrace): Update parameters.
1284 (target_read_btrace_conf): New.
1285
043c3577
MM
12862015-02-09 Markus Metzger <markus.t.metzger@intel.com>
1287
1288 * server.c (handle_btrace_general_set): Remove call to
1289 target_supports_btrace.
1290 (supported_btrace_packets): New.
1291 (handle_query): Call supported_btrace_packets.
1292 * target.h: include btrace-common.h.
1293 (btrace_target_info): Removed.
1294 (supports_btrace, target_supports_btrace): Update parameters.
1295
734b0e4b
MM
12962015-02-09 Markus Metzger <markus.t.metzger@intel.com>
1297
1298 * Makefile.in (SFILES): Add common/btrace-common.c.
1299 (OBS): Add common/btrace-common.o.
1300 (btrace-common.o): Add build rules.
1301 * linux-low: Include btrace-common.h.
1302 (linux_low_read_btrace): Use struct btrace_data. Call
1303 btrace_data_init and btrace_data_fini.
1304
d6c146e9
PA
13052015-02-06 Pedro Alves <palves@redhat.com>
1306
1307 * thread-db.c (find_new_threads_callback): Add debug output.
1308
20ba1ce6
PA
13092015-02-04 Pedro Alves <palves@redhat.com>
1310
1311 * linux-low.c (handle_extended_wait): Don't resume LWPs here.
1312 (resume_stopped_resumed_lwps): New function.
1313 (linux_wait_for_event_filtered): Use it.
1314
8cc73a39
SDJ
13152015-01-15 Sergio Durigan Junior <sergiodj@redhat.com>
1316
1317 * Makefile.in (SFILES): Add linux-personality.c.
1318 (linux-personality.o): New rule.
1319 * configure.srv (srv_linux_obj): Add linux-personality.o to the
1320 list of objects to be built.
1321 * linux-low.c: Include nat/linux-personality.h.
1322 (linux_create_inferior): Remove code to disable address space
1323 randomization (moved to ../nat/linux-personality.c). Create
1324 cleanup to disable address space randomization.
1325
fb23d554
SDJ
13262015-01-15 Sergio Durigan Junior <sergiodj@redhat.com>
1327
1328 * Makefile.in (posix-strerror.o): New rule.
1329 (mingw-strerror.o): Likewise.
1330 * configure: Regenerated.
1331 * configure.ac: Source file ../common/common.host. Initialize new
1332 variable srv_host_obs. Add srv_host_obs to GDBSERVER_DEPFILES.
1333
cdf43629
YQ
13342015-01-14 Yao Qi <yao@codesourcery.com>
1335
1336 * Makefile.in (SFILES): Add nat/ppc-linux.c.
1337 (ppc-linux.o): New rule.
1338 * configure.srv (powerpc*-*-linux*): Add ppc-linux.o.
1339 * configure.ac: AC_CHECK_FUNCS(getauxval).
1340 * config.in: Re-generated.
1341 * configure: Re-generated.
1342 * linux-ppc-low.c (ppc_arch_setup) [__powerpc64__]: Call
1343 ppc64_64bit_inferior_p
1344
514c5338
YQ
13452015-01-14 Yao Qi <yao@codesourcery.com>
1346
1347 * linux-ppc-low.c: Include "nat/ppc-linux.h".
1348 (PPC_FEATURE_HAS_VSX): Move to nat/ppc-linux.h.
1349 (PPC_FEATURE_HAS_ALTIVEC, PPC_FEATURE_HAS_SPE): Likewise.
1350 (PT_ORIG_R3, PT_TRAP): Likewise.
1351 (PTRACE_GETVSXREGS, PTRACE_SETVSXREGS): Likewise.
1352 (PTRACE_GETVRREGS, PTRACE_SETVRREGS): Likewise.
1353 (PTRACE_GETEVRREGS, PTRACE_SETEVRREGS): Likewise.
1354
3368c1e5
JB
13552015-01-10 Joel Brobecker <brobecker@adacore.com>
1356
1357 * i387-fp.c (i387_cache_to_xsave): In look over
1358 num_avx512_zmmh_high_registers, replace use of struct i387_xsave
1359 zmmh_low_space field by use of zmmh_high_space.
1360
582511be
PA
13612015-01-09 Pedro Alves <palves@redhat.com>
1362
1363 * linux-low.c (step_over_bkpt): Move higher up in the file.
1364 (handle_extended_wait): Don't store the stop_pc here.
1365 (get_stop_pc): Adjust comments and rename to ...
1366 (check_stopped_by_breakpoint): ... this. Record whether the LWP
1367 stopped for a software breakpoint or hardware breakpoint.
1368 (thread_still_has_status_pending_p): New function.
1369 (status_pending_p_callback): Use
1370 thread_still_has_status_pending_p. If the event is no longer
1371 interesting, resume the LWP.
1372 (handle_tracepoints): Add assert.
1373 (maybe_move_out_of_jump_pad): Remove cancel_breakpoints call.
1374 (wstatus_maybe_breakpoint): New function.
1375 (cancel_breakpoint): Delete function.
1376 (check_stopped_by_watchpoint): New function, factored out from
1377 linux_low_filter_event.
1378 (lp_status_maybe_breakpoint): Delete function.
1379 (linux_low_filter_event): Remove filter_ptid argument.
1380 Leave thread group exits pending here. Store the LWP's stop PC.
1381 Always leave events pending.
1382 (linux_wait_for_event_filtered): Pull all events out of the
1383 kernel, and leave them all pending.
1384 (count_events_callback, select_event_lwp_callback): Consider all
1385 events.
1386 (cancel_breakpoints_callback, linux_cancel_breakpoints): Delete.
1387 (select_event_lwp): Only give preference to the stepping LWP in
1388 all-stop mode. Adjust comments.
1389 (ignore_event): New function.
1390 (linux_wait_1): Delete 'retry' label. Use ignore_event. Remove
1391 references to cancel_breakpoints. Adjust to renames. Also give
1392 equal priority to all LWPs that have had events in non-stop mode.
1393 If reporting a software breakpoint event, unadjust the LWP's PC.
1394 (linux_wait): If linux_wait_1 returned an ignored event, retry.
1395 (stuck_in_jump_pad_callback, move_out_of_jump_pad_callback):
1396 Adjust.
1397 (linux_resume_one_lwp): Store the LWP's PC. Adjust.
1398 (resume_status_pending_p): Use thread_still_has_status_pending_p.
1399 (linux_stopped_by_watchpoint): Adjust.
1400 (linux_target_ops): Remove reference to linux_cancel_breakpoints.
1401 * linux-low.h (enum lwp_stop_reason): New.
1402 (struct lwp_info) <stop_pc>: Adjust comment.
1403 <stopped_by_watchpoint>: Delete field.
1404 <stop_reason>: New field.
1405 * linux-x86-low.c (x86_linux_prepare_to_resume): Adjust.
1406 * mem-break.c (software_breakpoint_inserted_here)
1407 (hardware_breakpoint_inserted_here): New function.
1408 * mem-break.h (software_breakpoint_inserted_here)
1409 (hardware_breakpoint_inserted_here): Declare.
1410 * target.h (struct target_ops) <cancel_breakpoints>: Remove field.
1411 (cancel_breakpoints): Delete.
1412 * tracepoint.c (clear_installed_tracepoints, stop_tracing)
1413 (upload_fast_traceframes): Remove references to
1414 cancel_breakpoints.
1415
a33e3959
PA
14162015-01-09 Pedro Alves <palves@redhat.com>
1417
1418 * thread-db.c (find_new_threads_callback): Ignore thread if the
1419 kernel thread ID is -1.
1420
8784d563
PA
14212015-01-09 Pedro Alves <palves@redhat.com>
1422
1423 * linux-low.c (linux_attach_fail_reason_string): Move to
1424 nat/linux-ptrace.c, and rename.
1425 (linux_attach_lwp): Update comment.
1426 (attach_proc_task_lwp_callback): New function.
1427 (linux_attach): Adjust to rename and use
1428 linux_proc_attach_tgid_threads.
1429 (linux_attach_fail_reason_string): Delete declaration.
1430
76f2b779
JB
14312015-01-01 Joel Brobecker <brobecker@adacore.com>
1432
1433 * gdbreplay.c (gdbreplay_version): Update copyright year to 2015.
1434 * server.c (gdbserver_version): Likewise.
1435
fafcc06a
SDJ
14362014-12-29 Sergio Durigan Junior <sergiodj@redhat.com>
1437
1438 * remote-utils.c: Include ctype.h.
1439 (input_interrupt): Explicitly handle the case when the char
1440 received is the NUL byte. Improve the printing of non-ASCII
1441 characters.
1442
beed38b8
JB
14432014-12-16 Joel Brobecker <brobecker@adacore.com>
1444
1445 * linux-low.c (linux_low_filter_event): Update call to
1446 linux_enable_event_reporting following the addition of
1447 a new parameter to that function.
1448
bf330350
CU
14492014-12-16 Catalin Udma <catalin.udma@freescale.com>
1450
1451 PR server/17457
1452 * linux-aarch64-low.c (AARCH64_FPSR_REGNO): New define.
1453 (AARCH64_FPCR_REGNO): Likewise.
1454 (AARCH64_NUM_REGS): Update to include fpsr/fpcr registers.
1455 (aarch64_fill_fpregset): Add missing fpsr/fpcr registers.
1456 (aarch64_store_fpregset): Likewise.
1457
5227d625
JB
14582014-12-15 Joel Brobecker <brobecker@adacore.com>
1459
1460 * lynx-low.c (lynx_resume): Use PTRACE_SINGLESTEP_ONE if N == 1.
1461 Remove FIXME comment about assumption about N.
1462
f93b65a0
JB
14632014-12-13 Joel Brobecker <brobecker@adacore.com>
1464
1465 * configure.ac: If large-file support is disabled in GDBserver,
1466 pass --disable-largefile to ACX_CONFIGURE_DIR call for "gnulib".
1467 * configure: Regenerate.
1468
e5a9158d
AA
14692014-12-12 Andreas Arnez <arnez@linux.vnet.ibm.com>
1470
1471 * linux-low.c (regsets_fetch_inferior_registers): Suppress the
1472 warning upon ENODATA from ptrace.
1473 * linux-s390-low.c (s390_store_tdb): New.
1474 (s390_regsets): Add regset for NT_S390_TDB.
1475
feea5f36
AA
14762014-12-12 Andreas Arnez <arnez@linux.vnet.ibm.com>
1477
1478 * linux-low.c (regsets_store_inferior_registers): Skip regsets
1479 without a fill_function.
1480 * linux-s390-low.c (s390_fill_last_break): Remove.
1481 (s390_regsets): Set fill_function to NULL for NT_S390_LAST_BREAK.
1482 (s390_arch_setup): Use regset's size instead of fill_function for
1483 loop end condition.
1484
098dbe61
AA
14852014-12-12 Andreas Arnez <arnez@linux.vnet.ibm.com>
1486
1487 * linux-low.c (regsets_fetch_inferior_registers): Do not invoke
1488 the regset's store function when ptrace returned an error.
1489 * regcache.c (get_thread_regcache): Invalidate register cache
1490 before fetching inferior's registers.
1491
28eef672
AA
14922014-12-12 Andreas Arnez <arnez@linux.vnet.ibm.com>
1493
1494 * linux-low.c (regsets_fetch_inferior_registers): Rephrase
1495 while-loop as for-loop.
1496 (regsets_store_inferior_registers): Likewise.
1497
bdca27a2
YQ
14982014-11-28 Yao Qi <yao@codesourcery.com>
1499
1500 * configure.ac(AC_CHECK_FUNCS): Remove readlink.
1501 * config.in, configure: Re-generate.
1502 * hostio.c (handle_unlink): Remove code checking HAVE_READLINK
1503 is defined.
1504
9c232dda
YQ
15052014-11-21 Yao Qi <yao@codesourcery.com>
1506
1507 * configure.ac: Don't invoke AC_FUNC_ALLOCA.
1508 (AC_CHECK_HEADERS): Remove malloc.h.
1509 * configure: Re-generated.
1510 * config.in: Re-generated.
1511 * server.h: Don't include alloca.h and malloc.h.
1512 * gdbreplay.c: Don't check HAVE_ALLOCA_H is defined.
1513 Don't include malloc.h.
1514
43968415
JB
15152014-11-17 Joel Brobecker <brobecker@adacore.com>
1516
1517 * lynx-low.c (lynx_write_memory): Put lynx_read_memory and
1518 corresponding ERRNO check in same block.
1519
40e91bc7
PA
15202014-11-12 Pedro Alves <palves@redhat.com>
1521
1522 * server.c (cont_thread): Update comment.
1523 (start_inferior, attach_inferior): No longer clear cont_thread.
1524 (handle_v_cont): No longer set cont_thread.
1525 (captured_main): Clear cont_thread each time a GDB connects.
1526
c2c118cf
PA
15272014-11-12 Pedro Alves <palves@redhat.com>
1528
1529 * linux-low.c (linux_wait_1): Don't force a wait for the Hc
1530 thread, and don't resume all threads if the Hc thread has exited.
1531
78708b7c
PA
15322014-11-12 Pedro Alves <palves@redhat.com>
1533
1534 * linux-low.c (linux_request_interrupt): Always send a SIGINT to
1535 the process group instead of to a specific LWP.
1536
a2abc7de
PA
15372014-10-15 Pedro Alves <palves@redhat.com>
1538
1539 PR server/17487
1540 * win32-arm-low.c (arm_set_thread_context): Remove current_event
1541 parameter.
1542 (arm_set_thread_context): Delete.
1543 (the_low_target): Adjust.
1544 * win32-i386-low.c (debug_registers_changed)
1545 (debug_registers_used): Delete.
1546 (update_debug_registers_callback): New function.
1547 (x86_dr_low_set_addr, x86_dr_low_set_control): Mark all threads as
1548 needing to update their debug registers.
1549 (win32_get_current_dr): New function.
1550 (x86_dr_low_get_addr, x86_dr_low_get_control)
1551 (x86_dr_low_get_status): Fetch the debug register from the thread
1552 record's context.
1553 (i386_initial_stuff): Adjust.
1554 (i386_get_thread_context): Remove current_event parameter. Don't
1555 clear debug_registers_changed nor copy DR values to
1556 debug_reg_state.
1557 (i386_set_thread_context): Delete.
1558 (i386_prepare_to_resume): New function.
1559 (i386_thread_added): Mark the thread as needing to update irs
1560 debug registers.
1561 (the_low_target): Remove i386_set_thread_context and install
1562 i386_prepare_to_resume.
1563 * win32-low.c (win32_get_thread_context): Adjust.
1564 (win32_set_thread_context): Use SetThreadContext
1565 directly.
1566 (win32_prepare_to_resume): New function.
1567 (win32_require_context): New function, factored out from ...
1568 (thread_rec): ... this.
1569 (continue_one_thread): Call win32_prepare_to_resume on each thread
1570 we're about to continue.
1571 (win32_resume): Call win32_prepare_to_resume on the event thread.
1572 * win32-low.h (struct win32_thread_info)
1573 <debug_registers_changed>: New field.
1574 (struct win32_target_ops): Change prototype of set_thread_context,
1575 delete set_thread_context and add prepare_to_resume.
1576 (win32_require_context): New declaration.
1577
a442d071
GB
15782014-10-08 Gary Benson <gbenson@redhat.com>
1579
1580 * server.h: Do not include common-exceptions.h.
1581
6f1947e8
GB
15822014-10-08 Gary Benson <gbenson@redhat.com>
1583
1584 * server.h: Do not include cleanups.h.
1585
63b434a4
JH
15862014-09-30 James Hogan <james.hogan@imgtec.com>
1587
1588 * Makefile.in (clean): Add rm -f commands for mips-dsp-linux.c and
1589 mips64-dsp-linux.c.
1590
c4d9ceb6
YQ
15912014-09-23 Yao Qi <yao@codesourcery.com>
1592
1593 * linux-low.c (lp_status_maybe_breakpoint): New function.
1594 (linux_low_filter_event): Call lp_status_maybe_breakpoint.
1595 (count_events_callback): Likewise.
1596 (select_event_lwp_callback): Likewise.
1597 (cancel_breakpoints_callback): Likewise.
1598
89a5711c
DB
15992014-09-19 Don Breazeal <donb@codesourcery.com>
1600
1601 * linux-low.c (handle_extended_wait): Call
1602 linux_ptrace_get_extended_event.
1603 (get_stop_pc, get_detach_signal, linux_low_filter_event): Call
1604 linux_is_extended_waitstatus.
1605
bffc0964
JB
16062014-09-16 Joel Brobecker <brobecker@adacore.com>
1607
1608 * Makefile.in (CPPFLAGS): Define.
1609 (INTERNAL_CFLAGS_BASE): Add ${CPPFLAGS}.
1610 (IPAGENT_CFLAGS): Remove ${CPPFLAGS}.
1611
0bfdf32f
GB
16122014-09-16 Gary Benson <gbenson@redhat.com>
1613
1614 * inferiors.h (current_inferior): Renamed as...
1615 (current_thread): New variable. All uses updated.
1616 * linux-low.c (get_pc): Renamed saved_inferior as saved_thread.
1617 (maybe_move_out_of_jump_pad): Likewise.
1618 (cancel_breakpoint): Likewise.
1619 (linux_low_filter_event): Likewise.
1620 (wait_for_sigstop): Likewise.
1621 (linux_resume_one_lwp): Likewise.
1622 (need_step_over_p): Likewise.
1623 (start_step_over): Likewise.
1624 (linux_stabilize_threads): Renamed save_inferior as saved_thread.
1625 * linux-x86-low.c (x86_linux_update_xmltarget): Likewise.
1626 * proc-service.c (ps_lgetregs): Renamed reg_inferior as reg_thread
1627 and save_inferior as saved_thread.
1628 * regcache.c (get_thread_regcache): Renamed saved_inferior as
1629 saved_thread.
1630 (regcache_invalidate_thread): Likewise.
1631 * remote-utils.c (prepare_resume_reply): Likewise.
1632 * thread-db.c (thread_db_get_tls_address): Likewise.
1633 (disable_thread_event_reporting): Likewise.
1634 (remove_thread_event_breakpoints): Likewise.
1635 * tracepoint.c (gdb_agent_about_to_close): Renamed save_inferior
1636 as saved_thread.
1637 * target.h (set_desired_inferior): Renamed as...
1638 (set_desired_thread): New declaration. All uses updated.
1639 * server.c (myresume): Updated comment to reference thread instead
1640 of inferior.
1641 (handle_serial_event): Likewise.
1642 (handle_target_event): Likewise.
1643
361c8ade
GB
16442014-09-12 Tom Tromey <tromey@redhat.com>
1645 Gary Benson <gbenson@redhat.com>
1646
1647 * regcache.h: Include common-regcache.h.
1648 (regcache_read_pc): Don't declare.
1649 * regcache.c (get_thread_regcache_for_ptid): New function.
1650
bd9269f7
GB
16512014-09-11 Tom Tromey <tromey@redhat.com>
1652 Gary Benson <gbenson@redhat.com>
1653
1654 * symbol.c: New file.
1655 * Makefile.in (SFILES): Add symbol.c.
1656 (OBS): Add symbol.o.
1657
f8c1d06b
GB
16582014-09-11 Gary Benson <gbenson@redhat.com>
1659
1660 * target.c (target_stop_ptid, target_continue_ptid): New
1661 functions.
1662
721ec300
GB
16632014-09-11 Tom Tromey <tromey@redhat.com>
1664 Gary Benson <gbenson@redhat.com>
1665
1666 * target.h: Include target/target.h.
1667 * target.c (target_read_memory, target_read_uint32)
1668 (target_write_memory): New functions.
1669
c5e92cca
GB
16702014-09-11 Gary Benson <gbenson@redhat.com>
1671
1672 * server.h (debug_hw_points): Don't declare.
1673 * server.c (debug_hw_points): Don't define. Replace all uses
1674 with show_debug_regs.
1675 * linux-aarch64-low.c (debug_hw_points): Don't define. Replace
1676 all uses with show_debug_regs.
1677
2e4bb98a
EBM
16782014-09-08 Edjunior Barbosa Machado <emachado@linux.vnet.ibm.com>
1679
1680 * linux-ppc-low.c (ppc_collect_ptrace_register): Adjust routine to take
1681 endianness into account.
1682 (ppc_supply_ptrace_register): Likewise.
1683
ac740bc7
JH
16842014-09-03 James Hogan <james.hogan@imgtec.com>
1685
1686 * linux-mips-low.c (mips_read_description): Reset errno to 0 prior
1687 to reading DSP_CONTROL with PTRACE_PEEKUSER ptrace call.
1688
97ea6506
GB
16892014-09-03 Gary Benson <gbenson@redhat.com>
1690
1691 * linux-x86-low.c (x86_linux_prepare_to_resume): Use
1692 ALL_DEBUG_ADDRESS_REGISTERS.
1693
df7e5265
GB
16942014-09-02 Gary Benson <gbenson@redhat.com>
1695
1696 * i386-low.h: Renamed as...
1697 * x86-low.h: New file. All type, function and variable name
1698 prefixes changed from "i386_" to "x86_". All references updated.
1699 * i386-low.c: Renamed as...
1700 * x86-low.c: New file. All type, function and variable name
1701 prefixes changed from "i386_" to "x86_". All references updated.
1702
ed859da7
GB
17032014-09-02 Gary Benson <gbenson@redhat.com>
1704
1705 * linux-x86-low.c (x86_linux_new_process): Use XCNEW.
1706 (x86_linux_new_thread): Likewise.
1707
860789c7
GB
17082014-08-29 Gary Benson <gbenson@redhat.com>
1709
1710 * server.h (setjmp.h): Do not include.
1711 (toplevel): Do not declare.
1712 (common-exceptions.h): Include.
1713 (cleanups.h): Likewise.
1714 * server.c (toplevel): Do not define.
1715 (exit_code): New static global.
1716 (detach_or_kill_for_exit_cleanup): New function.
1717 (main): New function. Original main renamed to...
1718 (captured_main): New function.
1719 * utils.c (verror) [!IN_PROCESS_AGENT]: Use throw_verror.
1720
ff55e1b5
GB
17212014-08-29 Gary Benson <gbenson@redhat.com>
1722
1723 * Makefile.in (SFILES): Add common/common-exceptions.c.
1724 (OBS): Add common-exceptions.o.
1725 (common-exceptions.o): New rule.
1726 * utils.c (prepare_to_throw_exception): New function.
1727
e9bcb658
GB
17282014-08-29 Gary Benson <gbenson@redhat.com>
1729
1730 * config.in: Regenerate.
1731 * configure: Likewise.
1732
e3180625
GB
17332014-08-29 Gary Benson <gbenson@redhat.com>
1734
1735 * Makefile.in (SFILES): Add common/cleanups.c.
1736 (OBS): cleanups.o.
1737 (cleanups.o): New rule.
1738
e3d6ba5d
GB
17392014-08-29 Gary Benson <gbenson@redhat.com>
1740
1741 * utils.c (internal_vwarning): New function.
1742
7096e886
GB
17432014-08-28 Gary Benson <gbenson@redhat.com>
1744
1745 * utils.h (fatal): Remove declaration.
1746 * utils.c (fatal): Remove function.
1747
14ce3192
GB
17482014-08-28 Gary Benson <gbenson@redhat.com>
1749
1750 * tracepoint.c (gdb_agent_init): Replace fatal with
1751 perror_with_name.
1752 (initialize_tracepoint): Likewise.
1753
50278d59
GB
17542014-08-28 Gary Benson <gbenson@redhat.com>
1755
1756 * remote-utils.c (remote_prepare): Replace fatal with error.
1757
aa96c426
GB
17582014-08-28 Gary Benson <gbenson@redhat.com>
1759
1760 * linux-low.c (linux_async): Replace fatal with warning.
1761 Tidy up and return.
1762 (linux_start_non_stop): Return -1 if linux_async failed.
1763
f7160e97
GB
17642014-08-28 Gary Benson <gbenson@redhat.com>
1765
1766 * linux-x86-low.c (i386_dr_low_set_addr): Replace check with
1767 gdb_assert.
1768 (i386_dr_low_get_addr): Remove vague comment.
1769 * win32-i386-low.c (i386_dr_low_set_addr): Replace check with
1770 gdb_assert.
1771
38e08fca
GB
17722014-08-28 Gary Benson <gbenson@redhat.com>
1773
1774 * inferiors.c (get_thread_process): Replace check with gdb_assert.
1775 * linux-low.c (linux_wait_for_event_filtered): Replace fatal with
1776 internal_error.
1777 (linux_resume_one_lwp): Likewise.
1778 * linux-x86-low.c (x86_siginfo_fixup): Replace checks with
1779 gdb_assert.
1780 * mem-break.c (raw_bkpt_type_to_target_hw_bp_type): Replace fatal
1781 with internal_error.
1782 * regcache.c (get_thread_regcache): Replace check with gdb_assert.
1783 (init_register_cache): Replace fatal with gdb_assert_not_reached.
1784 (find_register_by_name): Replace fatal with internal_error.
1785 (find_regno): Likewise.
1786 * tdesc.c (init_target_desc): Replace check with gdb_assert.
1787 * thread-db.c (thread_db_create_event): Likewise.
1788 (thread_db_load_search): Likewise.
1789 (try_thread_db_load_1): Likewise.
1790 * tracepoint.c (get_jump_space_head): Replace fatal with
1791 internal_error.
1792 (claim_trampoline_space): Likewise.
1793 (have_fast_tracepoint_trampoline_buffer): Likewise.
1794 (cmd_qtstart): Likewise.
1795 (stop_tracing): Likewise.
1796 (fast_tracepoint_collecting): Likewise.
1797 (target_malloc): Likewise.
1798 (download_tracepoint): Likewise.
1799 (download_trace_state_variables): Replace check with gdb_assert.
1800 (upload_fast_traceframes): Replace fatal with internal_error.
1801
34abf635
GB
18022014-08-19 Tom Tromey <tromey@redhat.com>
1803 Gary Benson <gbenson@redhat.com>
1804
1805 * Makefile.in (SFILES): Add common/common-debug.c.
1806 (OBS): Add common-debug.o.
1807 (common-debug.o): New rule.
1808 * debug.h (debug_printf): Don't declare.
1809 * debug.c (debug_printf): Renamed and rewritten as...
1810 (debug_vprintf): New function.
1811
f6e94d78
GB
18122014-08-19 Gary Benson <gbenson@redhat.com>
1813
1814 * utils.h: Do not include print-utils.h.
1815
9239eeab
GB
18162014-08-19 Tom Tromey <tromey@redhat.com>
1817 Gary Benson <gbenson@redhat.com>
1818
1819 * server.h: Add static assertion.
1820 (gdb_byte, CORE_ADDR, LONGEST, ULONGEST): Remove.
1821
ef87c8bb
GB
18222014-08-19 Tom Tromey <tromey@redhat.com>
1823 Gary Benson <gbenson@redhat.com>
1824
1825 * Makefile.in (SFILES): Add common/errors.c.
1826 (OBS): Add errors.o.
1827 (IPA_OBS): Add errors-ipa.o.
1828 (errors.o): New rule.
1829 (errors-ipa.o): Likewise.
1830 * utils.h (perror_with_name, error, warning): Don't declare.
1831 * utils.c (warning): Renamed and rewritten as...
1832 (vwarning): New function.
1833 (error): Renamed and rewritten as...
1834 (verror): New function.
1835 (internal_error): Renamed and rewritten as...
1836 (internal_verror): New function.
1837
bb974a24
GB
18382014-08-07 Gary Benson <gbenson@redhat.com>
1839
1840 * configure.ac (AC_CHECK_HEADERS): Remove errno.h.
1841 * configure: Regenerate.
1842 * config.in: Likewise.
1843 * server.h: Do not include errno.h.
1844 * event-loop.c: Likewise.
1845 * hostio-errno.c: Likewise.
1846 * linux-low.c: Likewise.
1847 * remote-utils.c: Likewise.
1848 * spu-low.c: Likewise.
1849 * utils.c: Likewise.
1850 * gdbreplay.c: Unconditionally include errno.h.
1851
6d3d12eb
GB
18522014-08-07 Gary Benson <gbenson@redhat.com>
1853
1854 * server.h: Do not include string.h.
1855 * event-loop.c: Likewise.
1856 * linux-low.c: Likewise.
1857 * regcache.c: Likewise.
1858 * remote-utils.c: Likewise.
1859 * spu-low.c: Likewise.
1860 * utils.c: Likewise.
1861
dccbb609
GB
18622014-08-07 Gary Benson <gbenson@redhat.com>
1863
1864 * server.h: Do not include gdb_assert.h.
1865
e76df0d0
GB
18662014-08-07 Gary Benson <gbenson@redhat.com>
1867
1868 * server.h: Do not include common-utils.h.
1869
4cb9c816
GB
18702014-08-07 Gary Benson <gbenson@redhat.com>
1871
1872 * server.h: Do not include ptid.h.
1873 * notif.h: Likewise.
1874
3995eeee
GB
18752014-08-07 Gary Benson <gbenson@redhat.com>
1876
1877 * server.h: Do not include gdb_locale.h.
1878
cb9f1a9b
GB
18792014-08-07 Gary Benson <gbenson@redhat.com>
1880
1881 * server.h: Do not include gdb/signals.h.
1882 * win32-low.c: Likewise.
1883
a5fceff8
GB
18842014-08-07 Gary Benson <gbenson@redhat.com>
1885
1886 * server.h: Do not include pathmax.h.
1887
b9391142
GB
18882014-08-07 Gary Benson <gbenson@redhat.com>
1889
1890 * server.h: Do not include libiberty.h.
1891 * linux-bfin-low.c: Likewise.
1892
0e443c87
GB
18932014-08-07 Gary Benson <gbenson@redhat.com>
1894
1895 * server.h: Do not include ansidecl.h.
1896
8ebb3f56
GB
18972014-08-07 Gary Benson <gbenson@redhat.com>
1898
1899 * linux-x86-low.c: Do not include stddef.h.
1900 * lynx-ppc-low.c: Likewise.
1901 * tracepoint.c: Likewise.
1902
8980bdf6
GB
19032014-08-07 Gary Benson <gbenson@redhat.com>
1904
1905 * server.h: Do not include stdarg.h.
1906 * nto-low.c: Likewise.
1907
d7096f71
GB
19082014-08-07 Gary Benson <gbenson@redhat.com>
1909
1910 * server.h: Do not include stdlib.h.
1911 * inferiors.c: Likewise.
1912 * linux-low.c: Likewise.
1913 * regcache.c: Likewise.
1914 * spu-low.c: Likewise.
1915 * tracepoint.c: Likewise.
1916 * utils.c: Likewise.
1917
d02f550d
GB
19182014-08-07 Gary Benson <gbenson@redhat.com>
1919
1920 * server.h: Do not include stdio.h.
1921 * linux-low.c: Likewise.
1922 * remote-utils.c: Likewise.
1923 * spu-low.c: Likewise.
1924 * utils.c: Likewise.
1925 * wincecompat.c: Likewise.
1926
87f6c4e3
GB
19272014-08-06 Gary Benson <gbenson@redhat.com>
1928
1929 * regcache.c (init_register_cache): Move conditionals inside if.
1930
7089dca4
GB
19312014-08-06 Gary Benson <gbenson@redhat.com>
1932
1933 * linux-low.c (linux_supports_non_stop): Use target_is_async_p.
1934
462f517e
GB
19352014-07-31 Gary Benson <gbenson@redhat.com>
1936
1937 * ax.h: Do not include server.h.
1938 * gdbthread.h: Likewise.
1939 * lynx-low.h: Likewise.
1940 * notif.h: Likewise.
1941
976411d6
GB
19422014-07-30 Gary Benson <gbenson@redhat.com>
1943
1944 * server.h: Include common-defs.h.
1945 Do not include config.h or build-gnulib-gdbserver/config.h.
1946
d41f6d8e
GB
19472014-07-30 Gary Benson <gbenson@redhat.com>
1948
1949 * hostio-errno.c: Move server.h to top of includes list.
1950 * inferiors.c: Likewise.
1951 * linux-x86-low.c: Likewise.
1952 * notif.c: Include server.h.
1953
314c6a35
TT
19542014-07-24 Tom Tromey <tromey@redhat.com>
1955 Gary Benson <gbenson@redhat.com>
1956
1957 * server.h (CORE_ADDR): Now unsigned.
1958
69ff6be5
PA
19592014-07-16 Pedro Alves <palves@redhat.com>
1960
1961 * linux-low.c (linux_kill_one_lwp): Use kill_lwp, not kill.
1962
ce9e3fe7
PA
19632014-07-15 Pedro Alves <palves@redhat.com>
1964
1965 * linux-low.c (linux_kill_one_lwp): Save errno and work with saved
1966 copy.
1967
e76126e8
PA
19682014-07-11 Pedro Alves <palves@redhat.com>
1969
1970 * linux-low.c (kill_wait_lwp): New function, based on
1971 kill_one_lwp_callback, but use my_waitpid directly.
1972 (kill_one_lwp_callback, linux_kill): Use it.
1973
8e9db26e
PA
19742014-06-23 Pedro Alves <palves@redhat.com>
1975
1976 * linux-x86-low.c (x86_linux_prepare_to_resume): Clear DR_CONTROL
1977 before setting DR0..DR3.
1978
698b3e08
GB
19792014-06-20 Gary Benson <gbenson@redhat.com>
1980
1981 * configure.ac (AC_REPLACE_FUNCS) <vasprintf, vsnprintf>: Removed.
1982 * configure: Regenerated.
1983 * config.in: Likewise.
1984
125f8a3d
GB
19852014-06-20 Gary Benson <gbenson@redhat.com>
1986
1987 * Makefile.in (SFILES): Update locations for files moved
1988 from common to nat.
1989 (object file files): Reordered.
1990
42995dbd
GB
19912014-06-20 Gary Benson <gbenson@redhat.com>
1992
1993 * i386-low.h (i386_dr_low_can_set_addr): Removed.
1994 (i386_dr_low_set_addr): Likewise.
1995 (i386_dr_low_get_addr): Likewise.
1996 (i386_dr_low_can_set_control): Likewise.
1997 (i386_dr_low_set_control): Likewise.
1998 (i386_dr_low_get_control): Likewise.
1999 (i386_dr_low_get_status): Likewise.
2000 (i386_get_debug_register_length): Likewise.
2001 * linux-x86-low.c (i386_dr_low_set_addr):
2002 Changed signature. Made static.
2003 (i386_dr_low_get_addr): Likewise.
2004 (i386_dr_low_set_control): Likewise.
2005 (i386_dr_low_get_control): Likewise.
2006 (i386_dr_low_get_status): Likewise.
2007 (i386_dr_low): New global variable.
2008 * win32-i386-low.c (i386_dr_low_set_addr):
2009 Changed signature. Made static.
2010 (i386_dr_low_get_addr): Likewise.
2011 (i386_dr_low_set_control): Likewise.
2012 (i386_dr_low_get_control): Likewise.
2013 (i386_dr_low_get_status): Likewise.
2014 (i386_dr_low): New global variable.
2015
e1d2394b
MS
20162014-06-20 Marcus Shawcroft <marcus.shawcroft@arm.com>
2017
2018 * configure.ac: Invoke. AC_CHECK_TOOL(AR, ar).
2019 * Makefile.in (AR, AR_FLAGS): Define.
2020 * configure: Regenerate.
2021
3a8ee006
GB
20222014-06-19 Gary Benson <gbenson@redhat.com>
2023
2024 * Makefile.in (i386-dregs.o): New rule.
2025 * configure.srv: Add i386-dregs.o to all targets using i386-low.o.
2026 * i386-low.c (target.h): Remove include.
2027 (TARGET_HAS_DR_LEN_8): Now in i386-dregs.c.
2028 (DR_CONTROL_SHIFT): Likewise.
2029 (DR_CONTROL_SIZE): Likewise.
2030 (DR_RW_EXECUTE): Likewise.
2031 (DR_RW_WRITE): Likewise.
2032 (DR_RW_READ): Likewise.
2033 (DR_RW_IORW): Likewise.
2034 (DR_LEN_1): Likewise.
2035 (DR_LEN_2): Likewise.
2036 (DR_LEN_4): Likewise.
2037 (DR_LEN_8): Likewise.
2038 (DR_LOCAL_ENABLE_SHIFT): Likewise.
2039 (DR_GLOBAL_ENABLE_SHIFT): Likewise.
2040 (DR_ENABLE_SIZE): Likewise.
2041 (DR_LOCAL_SLOWDOWN): Likewise.
2042 (DR_GLOBAL_SLOWDOWN): Likewise.
2043 (DR_CONTROL_RESERVED): Likewise.
2044 (I386_DR_CONTROL_MASK): Likewise.
2045 (I386_DR_VACANT): Likewise.
2046 (I386_DR_LOCAL_ENABLE): Likewise.
2047 (I386_DR_GLOBAL_ENABLE): Likewise.
2048 (I386_DR_DISABLE): Likewise.
2049 (I386_DR_SET_RW_LEN): Likewise.
2050 (I386_DR_GET_RW_LEN): Likewise.
2051 (I386_DR_WATCH_HIT): Likewise.
2052 (i386_wp_op_t): Likewise.
2053 (i386_show_dr): Likewise.
2054 (i386_length_and_rw_bits): Likewise.
2055 (i386_insert_aligned_watchpoint): Likewise.
2056 (i386_remove_aligned_watchpoint): Likewise.
2057 (i386_handle_nonaligned_watchpoint): Likewise.
2058 i386_update_inferior_debug_regs(): Likewise.
2059 (i386_dr_insert_watchpoint): Likewise.
2060 (i386_dr_remove_watchpoint): Likewise.
2061 (i386_dr_region_ok_for_watchpoint): Likewise.
2062 (i386_dr_stopped_data_address): Likewise.
2063 (i386_dr_stopped_by_watchpoint): Likewise.
2064
8f26655c
GB
20652014-06-19 Gary Benson <gbenson@redhat.com>
2066
2067 * i386-low.c (i386_dr_show): Renamed to
2068 i386_show_dr and made static. All uses updated.
2069 (i386_dr_length_and_rw_bits): Renamed to
2070 i386_length_and_rw_bits and made static.
2071 All uses updated.
2072 (i386_dr_insert_aligned_watchpoint): Renamed to
2073 i386_insert_aligned_watchpoint and made static.
2074 All uses updated.
2075 (i386_dr_remove_aligned_watchpoint): Renamed to
2076 i386_remove_aligned_watchpoint and made static.
2077 All uses updated.
2078 (i386_dr_update_inferior_debug_regs): Renamed to
2079 i386_update_inferior_debug_regs and made static.
2080 All uses updated.
2081
b9228891
GB
20822014-06-18 Gary Benson <gbenson@redhat.com>
2083
5171def3
GB
2084 * i386-low.h (i386_dr_low_can_set_addr): New macro.
2085 (i386_dr_low_can_set_control): Likewise.
2086 (i386_get_debug_register_length): Likewise.
2087 * i386-low.c (i386_dr_low_can_set_addr): Now in i386-low.h.
2088 (i386_dr_low_can_set_control): Likewise.
2089 (i386_get_debug_register_length): Likewise.
2090
20912014-06-17 Gary Benson <gbenson@redhat.com>
2092
b9228891
GB
2093 * i386-low.h (i386-dregs.h): New include.
2094 (DR_FIRSTADDR): Now in i386-dregs.h.
2095 (DR_LASTADDR): Likewise.
2096 (DR_NADDR): Likewise.
2097 (DR_STATUS): Likewise.
2098 (DR_CONTROL): Likewise.
2099 (i386_debug_reg_state): Likewise.
2100 (i386_dr_insert_watchpoint): Likewise.
2101 (i386_dr_remove_watchpoint): Likewise.
2102 (i386_dr_region_ok_for_watchpoint): Likewise.
2103 (i386_dr_stopped_data_address): Likewise.
2104 (i386_dr_stopped_by_watchpoint): Likewise.
2105 * i386-low.c (ALL_DEBUG_REGISTERS): Likewise.
2106
4be83cc2
GB
21072014-06-18 Gary Benson <gbenson@redhat.com>
2108
2109 * i386-low.h (i386_low_insert_watchpoint): Renamed to
2110 i386_dr_insert_watchpoint.
2111 (i386_low_remove_watchpoint): Renamed to
2112 i386_dr_remove_watchpoint.
2113 (i386_low_region_ok_for_watchpoint): Renamed to
2114 i386_dr_region_ok_for_watchpoint.
2115 (i386_low_stopped_data_address): Renamed to
2116 i386_dr_stopped_data_address.
2117 (i386_low_stopped_by_watchpoint): Renamed to
2118 i386_dr_stopped_by_watchpoint.
2119 * i386-low.c (i386_show_dr): Renamed to
2120 i386_dr_show and made nonstatic. All uses updated.
2121 (i386_length_and_rw_bits): Renamed to
2122 i386_dr_length_and_rw_bits and made nonstatic.
2123 All uses updated.
2124 (i386_insert_aligned_watchpoint): Renamed to
2125 i386_dr_insert_aligned_watchpoint and made nonstatic.
2126 All uses updated.
2127 (i386_remove_aligned_watchpoint): Renamed to
2128 i386_dr_remove_aligned_watchpoint and made nonstatic.
2129 All uses updated.
2130 (i386_update_inferior_debug_regs): Renamed to
2131 i386_dr_update_inferior_debug_regs and made nonstatic.
2132 All uses updated.
2133 (i386_low_insert_watchpoint): Renamed to
2134 i386_dr_insert_watchpoint. All uses updated.
2135 (i386_low_remove_watchpoint): Renamed to
2136 i386_dr_remove_watchpoint. All uses updated.
2137 (i386_low_region_ok_for_watchpoint): Renamed to
2138 i386_dr_region_ok_for_watchpoint. All uses updated.
2139 (i386_low_stopped_data_address): Renamed to
2140 i386_dr_stopped_data_address. All uses updated.
2141 (i386_low_stopped_by_watchpoint): Renamed to
2142 i386_dr_stopped_by_watchpoint. All uses updated.
2143
131aa0d4
GB
21442014-06-18 Gary Benson <gbenson@redhat.com>
2145
2146 * i386-low.c (i386_dr_low_can_set_addr): New macro.
2147 (i386_dr_low_can_set_control): Likewise.
2148 (i386_insert_aligned_watchpoint): New check.
2149
d9305f7f
GB
21502014-06-18 Gary Benson <gbenson@redhat.com>
2151
2152 * i386-low.c (i386_update_inferior_debug_regs) <inf_state>:
2153 Renamed to state.
2154
e927c9fc
GB
21552014-06-18 Gary Benson <gbenson@redhat.com>
2156
2157 * i386-low.c (i386_length_and_rw_bits): Use internal_error
2158 instead of fatal and error.
2159 (i386_handle_nonaligned_watchpoint): Likewise.
2160
1b6d4134
GB
21612014-06-18 Gary Benson <gbenson@redhat.com>
2162
2163 * i386-low.c (i386_get_debug_register_length): New macro.
2164 (TARGET_HAS_DR_LEN_8): Remove conditional. Use above macro.
2165 (i386_show_dr): Use debug_printf instead of fprintf. Use
2166 phex to format values.
2167
6e62758f
GB
21682014-06-18 Gary Benson <gbenson@redhat.com>
2169
2170 * i386-low.h: Comment changes.
2171 * i386-low.c: Likewise.
2172
fc6e2f03
GB
21732014-06-18 Gary Benson <gbenson@redhat.com>
2174
2175 * i386-low.c: Whitespace changes.
2176
f9d1eeed
TT
21772014-06-12 Tom Tromey <tromey@redhat.com>
2178
2179 * utils.c (freeargv): Remove.
2180
0b04e523
TT
21812014-06-12 Tom Tromey <tromey@redhat.com>
2182
2183 * debug.c (debug_printf): Remove HAVE_GETTIMEOFDAY checks.
2184 * server.c (monitor_show_help): Remove HAVE_GETTIMEOFDAY check.
2185 (parse_debug_format_options): Likewise.
2186 (gdbserver_usage): Likewise.
2187 * Makefile.in (LIBIBERTY_BUILDDIR, LIBIBERTY): New variables.
2188 (SUBDIRS, REQUIRED_SUBDIRS): Add libiberty.
2189 (gdbserver$(EXEEXT), gdbreplay$(EXEEXT)): Depend on and link
2190 against libiberty.
2191 ($(LIBGNU)): Depend on libiberty.
2192 (all-lib): Recurse into all subdirs.
2193 (install-only): Invoke "install" target in subdirs.
2194 (vasprintf.o, vsnprintf.o, safe-ctype.o, lbasename.o): Remove
2195 targets.
2196 * configure: Rebuild.
2197 * configure.ac: Add ACX_CONFIGURE_DIR for libiberty. Don't check
2198 for vasprintf, vsnprintf, or gettimeofday.
2199 * configure.srv: Don't add safe-ctype.o or lbasename.o to
2200 srv_tgtobj.
2201
270c9937
JB
22022014-06-05 Joel Brobecker <brobecker@adacore.com>
2203
2204 * development.sh: Delete.
2205 * Makefile.in (config.status): Adjust dependency on development.sh.
2206 * configure.ac: Adjust development.sh source call.
2207 * configure: Regenerate.
2208
0a261ed8
PA
22092014-06-02 Pedro Alves <palves@redhat.com>
2210
2211 * ax.c (gdb_free_agent_expr): New function.
2212 * ax.h (gdb_free_agent_expr): New declaration.
2213 * mem-break.c (delete_gdb_breakpoint_1): Also clear the commands
2214 list.
2215 (clear_breakpoint_conditions, clear_breakpoint_commands): Make
2216 static.
2217 (clear_breakpoint_conditions_and_commands): New function.
2218 * mem-break.h (clear_breakpoint_conditions): Delete declaration.
2219 (clear_breakpoint_conditions_and_commands): New declaration.
2220
e9dae05e
RR
22212014-05-23 Ramana Radhakrishnan <ramana.radhakrishnan@arm.com>
2222
2223 * linux-aarch64-low.c (asm/ptrace.h): Include.
2224
5876f503
JK
22252014-05-21 Jan Kratochvil <jan.kratochvil@redhat.com>
2226
2227 Fix TLS access for -static -pthread.
2228 * gdbserver/thread-db.c (struct thread_db): Add td_thr_tlsbase_p.
2229 (thread_db_get_tls_address): Call it if LOAD_MODULE is zero.
2230 (thread_db_load_search, try_thread_db_load_1): Initialize it.
2231
802e8e6d
PA
22322014-05-20 Pedro Alves <palves@redhat.com>
2233
2234 * linux-aarch64-low.c (aarch64_insert_point)
2235 (aarch64_remove_point): No longer check whether the type is
2236 supported here. Adjust to new interface.
2237 (the_low_target): Install aarch64_supports_z_point_type as
2238 supports_z_point_type method.
2239 * linux-arm-low.c (raw_bkpt_type_to_arm_hwbp_type): New function.
2240 (arm_linux_hw_point_initialize): Take an enum raw_bkpt_type
2241 instead of a Z packet char. Adjust.
2242 (arm_supports_z_point_type): New function.
2243 (arm_insert_point, arm_remove_point): Adjust to new interface.
2244 (the_low_target): Install arm_supports_z_point_type.
2245 * linux-crisv32-low.c (cris_supports_z_point_type): New function.
2246 (cris_insert_point, cris_remove_point): Adjust to new interface.
2247 Don't check whether the type is supported here.
2248 (the_low_target): Install cris_supports_z_point_type.
2249 * linux-low.c (linux_supports_z_point_type): New function.
2250 (linux_insert_point, linux_remove_point): Adjust to new interface.
2251 * linux-low.h (struct linux_target_ops) <insert_point,
2252 remove_point>: Take an enum raw_bkpt_type instead of a char. Add
2253 raw_breakpoint pointer parameter.
2254 <supports_z_point_type>: New method.
2255 * linux-mips-low.c (mips_supports_z_point_type): New function.
2256 (mips_insert_point, mips_remove_point): Adjust to new interface.
2257 Use mips_supports_z_point_type.
2258 (the_low_target): Install mips_supports_z_point_type.
2259 * linux-ppc-low.c (the_low_target): Install NULL as
2260 supports_z_point_type method.
2261 * linux-s390-low.c (the_low_target): Install NULL as
2262 supports_z_point_type method.
2263 * linux-sparc-low.c (the_low_target): Install NULL as
2264 supports_z_point_type method.
2265 * linux-x86-low.c (x86_supports_z_point_type): New function.
2266 (x86_insert_point): Adjust to new insert_point interface. Use
2267 insert_memory_breakpoint. Adjust to new
2268 i386_low_insert_watchpoint interface.
2269 (x86_remove_point): Adjust to remove_point interface. Use
2270 remove_memory_breakpoint. Adjust to new
2271 i386_low_remove_watchpoint interface.
2272 (the_low_target): Install x86_supports_z_point_type.
2273 * lynx-low.c (lynx_target_ops): Install NULL as
2274 supports_z_point_type callback.
2275 * nto-low.c (nto_supports_z_point_type): New.
2276 (nto_insert_point, nto_remove_point): Adjust to new interface.
2277 (nto_target_ops): Install nto_supports_z_point_type.
2278 * mem-break.c: Adjust intro comment.
2279 (struct raw_breakpoint) <raw_type, size>: New fields.
2280 <inserted>: Update comment.
2281 <shlib_disabled>: Delete field.
2282 (enum bkpt_type) <gdb_breakpoint>: Delete value.
2283 <gdb_breakpoint_Z0, gdb_breakpoint_Z1, gdb_breakpoint_Z2,
2284 gdb_breakpoint_Z3, gdb_breakpoint_Z4>: New values.
2285 (raw_bkpt_type_to_target_hw_bp_type): New function.
2286 (find_enabled_raw_code_breakpoint_at): New function.
2287 (find_raw_breakpoint_at): New type and size parameters. Use them.
2288 (insert_memory_breakpoint): New function, based off
2289 set_raw_breakpoint_at.
2290 (remove_memory_breakpoint): New function.
2291 (set_raw_breakpoint_at): Reimplement.
2292 (set_breakpoint): New, based on set_breakpoint_at.
2293 (set_breakpoint_at): Reimplement.
2294 (delete_raw_breakpoint): Go through the_target->remove_point
2295 instead of assuming memory breakpoints.
2296 (find_gdb_breakpoint_at): Delete.
2297 (Z_packet_to_bkpt_type, Z_packet_to_raw_bkpt_type): New functions.
2298 (find_gdb_breakpoint): New function.
2299 (set_gdb_breakpoint_at): Delete.
2300 (z_type_supported): New function.
2301 (set_gdb_breakpoint_1): New function, loosely based off
2302 set_gdb_breakpoint_at.
2303 (check_gdb_bp_preconditions, set_gdb_breakpoint): New functions.
2304 (delete_gdb_breakpoint_at): Delete.
2305 (delete_gdb_breakpoint_1): New function, loosely based off
2306 delete_gdb_breakpoint_at.
2307 (delete_gdb_breakpoint): New function.
2308 (clear_gdb_breakpoint_conditions): Rename to ...
2309 (clear_breakpoint_conditions): ... this. Don't handle a NULL
2310 breakpoint.
2311 (add_condition_to_breakpoint): Make static.
2312 (add_breakpoint_condition): Take a struct breakpoint pointer
2313 instead of an address. Adjust.
2314 (gdb_condition_true_at_breakpoint): Rename to ...
2315 (gdb_condition_true_at_breakpoint_z_type): ... this, and add
2316 z_type parameter.
2317 (gdb_condition_true_at_breakpoint): Reimplement.
2318 (add_breakpoint_commands): Take a struct breakpoint pointer
2319 instead of an address. Adjust.
2320 (gdb_no_commands_at_breakpoint): Rename to ...
2321 (gdb_no_commands_at_breakpoint_z_type): ... this. Add z_type
2322 parameter. Return true if no breakpoint was found. Change debug
2323 output.
2324 (gdb_no_commands_at_breakpoint): Reimplement.
2325 (run_breakpoint_commands): Rename to ...
2326 (run_breakpoint_commands_z_type): ... this. Add z_type parameter,
2327 and change return type to boolean.
2328 (run_breakpoint_commands): New function.
2329 (gdb_breakpoint_here): Also check for Z1 breakpoints.
2330 (uninsert_raw_breakpoint): Don't try to reinsert a disabled
2331 breakpoint. Go through the_target->remove_point instead of
2332 assuming memory breakpoint.
2333 (uninsert_breakpoints_at, uninsert_all_breakpoints): Uninsert
2334 software and hardware breakpoints.
2335 (reinsert_raw_breakpoint): Go through the_target->insert_point
2336 instead of assuming memory breakpoint.
2337 (reinsert_breakpoints_at, reinsert_all_breakpoints): Reinsert
2338 software and hardware breakpoints.
2339 (check_breakpoints, breakpoint_here, breakpoint_inserted_here):
2340 Check both software and hardware breakpoints.
2341 (validate_inserted_breakpoint): Assert the breakpoint is a
2342 software breakpoint. Set the inserted flag to -1 instead of
2343 setting shlib_disabled.
2344 (delete_disabled_breakpoints): Adjust.
2345 (validate_breakpoints): Only validate software breakpoints.
2346 Adjust to inserted flag change.
2347 (check_mem_read, check_mem_write): Skip breakpoint types other
2348 than software breakpoints. Adjust to inserted flag change.
2349 * mem-break.h (enum raw_bkpt_type): New enum.
2350 (raw_breakpoint, struct process_info): Forward declare.
2351 (Z_packet_to_target_hw_bp_type): Delete declaration.
2352 (raw_bkpt_type_to_target_hw_bp_type, Z_packet_to_raw_bkpt_type)
2353 (set_gdb_breakpoint, delete_gdb_breakpoint)
2354 (clear_breakpoint_conditions): New declarations.
2355 (set_gdb_breakpoint_at, clear_gdb_breakpoint_conditions): Delete.
2356 (breakpoint_inserted_here): Update comment.
2357 (add_breakpoint_condition, add_breakpoint_commands): Replace
2358 address parameter with a breakpoint pointer parameter.
2359 (gdb_breakpoint_here): Update comment.
2360 (delete_gdb_breakpoint_at): Delete.
2361 (insert_memory_breakpoint, remove_memory_breakpoint): Declare.
2362 * server.c (process_point_options): Take a struct breakpoint
2363 pointer instead of an address. Adjust.
2364 (process_serial_event) <Z/z packets>: Use set_gdb_breakpoint and
2365 delete_gdb_breakpoint.
2366 * spu-low.c (spu_target_ops): Install NULL as
2367 supports_z_point_type method.
2368 * target.h: Include mem-break.h.
2369 (struct target_ops) <prepare_to_access_memory>: Update comment.
2370 <supports_z_point_type>: New field.
2371 <insert_point, remove_point>: Take an enum raw_bkpt_type argument
2372 instead of a char. Also take a raw breakpoint pointer.
2373 * win32-arm-low.c (the_low_target): Install NULL as
2374 supports_z_point_type.
2375 * win32-i386-low.c (i386_supports_z_point_type): New function.
2376 (i386_insert_point, i386_remove_point): Adjust to new interface.
2377 (the_low_target): Install i386_supports_z_point_type.
2378 * win32-low.c (win32_supports_z_point_type): New function.
2379 (win32_insert_point, win32_remove_point): Adjust to new interface.
2380 (win32_target_ops): Install win32_supports_z_point_type.
2381 * win32-low.h (struct win32_target_ops):
2382 <supports_z_point_type>: New method.
2383 <insert_point, remove_point>: Take an enum raw_bkpt_type argument
2384 instead of a char. Also take a raw breakpoint pointer.
2385
932539e3
PA
23862014-05-20 Pedro Alves <palves@redhat.com>
2387
2388 * mem-break.h: Include break-common.h.
2389 (Z_PACKET_SW_BP, Z_PACKET_HW_BP, Z_PACKET_WRITE_WP)
2390 (Z_PACKET_READ_WP, Z_PACKET_ACCESS_WP): New defines.
2391 (Z_packet_to_target_hw_bp_type): New declaration.
2392 * mem-break.c (Z_packet_to_target_hw_bp_type): New function.
2393 * i386-low.c (Z_PACKET_HW_BP, Z_PACKET_WRITE_WP, Z_PACKET_READ_WP)
2394 (Z_PACKET_ACCESS_WP): Delete macros.
2395 (Z_packet_to_hw_type): Delete function.
2396 * i386-low.h: Don't include break-common.h here.
2397 (Z_packet_to_hw_type): Delete declaration.
2398 * linux-x86-low.c (x86_insert_point, x86_insert_point): Call
2399 Z_packet_to_target_hw_bp_type instead of Z_packet_to_hw_type.
2400 * win32-i386-low.c (i386_insert_point, i386_remove_point): Call
2401 Z_packet_to_target_hw_bp_type instead of Z_packet_to_hw_type.
2402 * linux-aarch64-low.c: Don't include break-common.h here.
2403 (Z_PACKET_SW_BP, Z_PACKET_HW_BP, Z_PACKET_WRITE_WP)
2404 (Z_PACKET_READ_WP, Z_PACKET_ACCESS_WP): Delete macros.
2405 (Z_packet_to_target_hw_bp_type): Delete function.
2406 * linux-mips-low.c (rsp_bp_type_to_target_hw_bp_type): Delete
2407 function.
2408 (mips_insert_point, mips_remove_point): Use
2409 Z_packet_to_target_hw_bp_type.
2410
4ff0d3d8
PA
24112014-05-20 Pedro Alves <palves@redhat.com>
2412
2413 * linux-aarch64-low.c: Include break-common.h.
2414 (enum target_point_type): Delete.
2415 (Z_packet_to_point_type): Rename to ...
2416 (Z_packet_to_target_hw_bp_type): ... this, and return a
2417 target_hw_bp_type instead.
2418 (aarch64_show_debug_reg_state): Take an enum target_hw_bp_type
2419 instead of an enum target_point_type.
2420 (aarch64_point_encode_ctrl_reg): Likewise. Compute type mask from
2421 breakpoint type.
2422 (aarch64_dr_state_insert_one_point)
2423 (aarch64_dr_state_remove_one_point, aarch64_handle_breakpoint)
2424 (aarch64_handle_aligned_watchpoint)
2425 (aarch64_handle_unaligned_watchpoint, aarch64_handle_watchpoint):
2426 Take an enum target_hw_bp_type instead of an enum
2427 target_point_type.
2428 (aarch64_supports_z_point_type): New function.
2429 (aarch64_insert_point, aarch64_remove_point): Use it. Adjust to
2430 use Z_packet_to_target_hw_bp_type.
2431
786dc519
JB
24322014-05-20 Joel Brobecker <brobecker@adacore.com>
2433
2434 * configure.ac: Only use -Werror by default when DEVELOPMENT
2435 is true.
2436 * configure: Regenerate.
2437
9e0aa64f
JK
24382014-05-19 Jan Kratochvil <jan.kratochvil@redhat.com>
2439
2440 Fix gdbserver qGetTLSAddr for x86_64 -m32.
2441 * linux-x86-low.c (X86_64_USER_REGS): New.
2442 (x86_fill_gregset): Call memset for BUF first in x86_64 -m32 case.
2443
2b577b92
YQ
24442014-04-28 Yao Qi <yao@codesourcery.com>
2445
2446 * Makefile.in (i386-avx512.c): Fix the typo of generated file
2447 name.
2448
94611da2
PA
24492014-04-25 Pedro Alves <palves@redhat.com>
2450
2451 PR server/16255
2452 * linux-low.c (linux_attach_fail_reason_string): New function.
2453 (linux_attach_lwp): Delete.
2454 (linux_attach_lwp_1): Rename to ...
2455 (linux_attach_lwp): ... this. Take a ptid instead of a pid as
2456 argument. Remove "initial" parameter. Return int instead of
2457 void. Don't error or warn here.
2458 (linux_attach): Adjust to call linux_attach_lwp. Call error on
2459 failure to attach to the tgid. Call warning when failing to
2460 attach to an lwp.
2461 * linux-low.h (linux_attach_lwp): Take a ptid instead of a pid as
2462 argument. Remove "initial" parameter. Return int instead of
2463 void. Don't error or warn here.
2464 (linux_attach_fail_reason_string): New declaration.
2465 * thread-db.c (attach_thread): Adjust to linux_attach_lwp's
2466 interface change. Use linux_attach_fail_reason_string.
2467
01f9f808
MS
24682014-04-24 Michael Sturm <michael.sturm@mintel.com>
2469 Walfred Tedeschi <walfred.tedeschi@intel.com>
2470
2471 * Makefile.in: Added rules to handle new files
2472 i386-avx512.c i386-avx512-linux.c amd64-avx512.c
2473 amd64-avx512-linux.c x32-avx512.c x32-avx512-linux.c.
2474 * configure.srv (srv_i386_regobj): Add i386-avx512.o.
2475 (srv_i386_linux_regobj): Add i386-avx512-linux.o.
2476 (srv_amd64_regobj): Add amd64-avx512.o and x32-avx512.o.
2477 (srv_amd64_linux_regobj): Add amd64-avx512-linux.o and
2478 x32-avx512-linux.o.
2479 (srv_i386_32bit_xmlfiles): Add i386/32bit-avx512.xml.
2480 (srv_i386_64bit_xmlfiles): Add i386/64bit-avx512.xml.
2481 (srv_amd64_xmlfiles): Add i386/amd64-avx512.xml and
2482 i386/x32-avx512.xml.
2483 (srv_i386_linux_xmlfiles): Add i386/i386-avx512-linux.xml.
2484 (srv_amd64_linux_xmlfiles): Add i386/amd64-avx512-linux.xml and
2485 i386/x32-avx512-linux.xml.
2486 * i387-fp.c (num_avx512_k_registers): New constant for number
2487 of K registers.
2488 (num_avx512_zmmh_low_registers): New constant for number of
2489 lower ZMM registers (0-15).
2490 (num_avx512_zmmh_high_registers): New constant for number of
2491 higher ZMM registers (16-31).
2492 (num_avx512_ymmh_registers): New contant for number of higher
2493 YMM registers (ymm16-31 added by avx521 on x86_64).
2494 (num_avx512_xmm_registers): New constant for number of higher
2495 XMM registers (xmm16-31 added by AVX512 on x86_64).
2496 (struct i387_xsave): Add space for AVX512 registers.
2497 (i387_cache_to_xsave): Change raw buffer size to 64 characters.
2498 Add code to handle AVX512 registers.
2499 (i387_xsave_to_cache): Add code to handle AVX512 registers.
2500 * linux-x86-low.c (init_registers_amd64_avx512_linux): New
2501 prototypei from generated file.
2502 (tdesc_amd64_avx512_linux): Likewise.
2503 (init_registers_x32_avx512_linux): Likewise.
2504 (tdesc_x32_avx512_linux): Likewise.
2505 (init_registers_i386_avx512_linux): Likewise.
2506 (tdesc_i386_avx512_linux): Likewise.
2507 (x86_64_regmap): Add AVX512 registers.
2508 (x86_linux_read_description): Add code to handle AVX512 XSTATE
2509 mask.
2510 (initialize_low_arch): Add code to initialize AVX512 registers.
2511
51aa91f9
PA
25122014-04-23 Pedro Alves <palves@redhat.com>
2513
2514 * mem-break.c (find_gdb_breakpoint_at): Make static.
2515 * mem-break.h (find_gdb_breakpoint_at): Delete declaration.
2516
a4165e94
PA
25172014-04-23 Pedro Alves <palves@redhat.com>
2518
2519 * i386-low.c: Don't include break-common.h here.
2520 (i386_low_insert_watchpoint, i386_low_remove_watchpoint): Change
2521 prototype to take target_hw_bp_type as argument instead of a Z
2522 packet char.
2523 * i386-low.h: Include break-common.h here.
2524 (Z_packet_to_hw_type): Declare.
2525 (i386_low_insert_watchpoint, i386_low_remove_watchpoint): Change
2526 prototypes.
2527 * linux-x86-low.c (x86_insert_point): Convert the packet number to
2528 a target_hw_bp_type before calling i386_low_insert_watchpoint.
2529 (x86_remove_point): Convert the packet number to a
2530 target_hw_bp_type before calling i386_low_remove_watchpoint.
2531 * win32-i386-low.c (i386_insert_point): Convert the packet number
2532 to a target_hw_bp_type before calling i386_low_insert_watchpoint.
2533 (i386_remove_point): Convert the packet number to a
2534 target_hw_bp_type before calling i386_low_remove_watchpoint.
2535
b8acf843
PA
25362014-04-23 Pedro Alves <palves@redhat.com>
2537
2538 * utils.h (perror_with_name): Add ATTRIBUTE_NORETURN.
2539
d708bcd1
PA
25402014-04-10 Pedro Alves <palves@redhat.com>
2541
2542 * mem-break.c (add_breakpoint_condition, add_breakpoint_commands):
2543 Check if the condition or command is NULL before checking if the
2544 breakpoint is known. On success, return true.
2545 * mem-break.h (add_breakpoint_condition): Document return.
2546 (add_breakpoint_commands): Add describing comment.
2547 * server.c (skip_to_semicolon): New function.
2548 (process_point_options): Use it.
2549
2eec7d5b
PA
25502014-04-09 Pedro Alves <palves@redhat.com>
2551
2552 * linux-low.c (linux_read_loadmap): Pass current_inferior directly
2553 to lwpid_of.
2554
fa96cb38
PA
25552014-02-27 Pedro Alves <palves@redhat.com>
2556
2557 PR 12702
2558 * inferiors.h (A_I_NEXT, ALL_INFERIORS_TYPE, ALL_PROCESSES): New
2559 macros.
2560 * linux-low.c (delete_lwp, handle_extended_wait): Add debug
2561 output.
2562 (last_thread_of_process_p): Take a PID argument instead of a
2563 thread pointer.
2564 (linux_wait_for_lwp): Delete.
2565 (num_lwps, check_zombie_leaders, not_stopped_callback): New
2566 functions.
2567 (linux_low_filter_event): New function, party factored out from
2568 linux_wait_for_event.
2569 (linux_wait_for_event): Rename to ...
2570 (linux_wait_for_event_filtered): ... this. Add new filter ptid
2571 argument. Partly rewrite. Always use waitpid(-1, WNOHANG) and
2572 sigsuspend. Check for zombie leaders.
2573 (linux_wait_for_event): Reimplement as wrapper around
2574 linux_wait_for_event_filtered.
2575 (linux_wait_1): Handle TARGET_WAITKIND_NO_RESUMED. Assume that if
2576 a normal or signal exit is seen, it's the whole process exiting.
2577 (wait_for_sigstop): No longer a for_each_inferior callback.
2578 Rewrite on top of linux_wait_for_event_filtered.
2579 (stop_all_lwps): Call wait_for_sigstop directly.
2580 * server.c (resume, handle_target_event): Handle
2581 TARGET_WAITKIND_NO_RESUMED.
2582
d763de10
JB
25832014-02-26 Joel Brobecker <brobecker@adacore.com>
2584
2585 * win32-low.c (psapi_get_dll_name,
2586 * win32_CreateToolhelp32Snapshot): Delete.
2587 (win32_CreateToolhelp32Snapshot, win32_Module32First)
2588 (win32_Module32Next, load_toolhelp, toolhelp_get_dll_name):
2589 Delete.
2590 (handle_load_dll): Add function description.
2591 Remove code using psapi_get_dll_name and toolhelp_get_dll_name.
2592
850a0f76
JB
25932014-02-26 Joel Brobecker <brobecker@adacore.com>
2594
2595 * win32-low.c (win32_add_one_solib): Add 0x1000 to load_addr.
2596 Add comment.
2597 (win32_add_all_dlls): Remove 0x1000 offset applied to DLL
2598 base address when calling win32_add_one_solib.
2599 (handle_load_dll): Delete local variable load_addr.
2600 Remove 0x1000 offset applied to DLL base address when calling
2601 win32_add_one_solib.
2602 (handle_unload_dll): Add comment.
2603
f25b3fc3
JB
26042014-02-26 Joel Brobecker <brobecker@adacore.com>
2605
2606 * win32-low.c (win32_add_all_dlls): Renames
2607 win32_ensure_ntdll_loaded. Rewrite function documentation.
2608 Adjust implementation to always load all DLLs.
2609 Add 0x1000 offset to DLL base address when calling
2610 win32_add_one_solib.
2611 (child_initialization_done): New static global.
2612 (do_initial_child_stuff): Set child_initialization_done to
2613 zero during child initialization, and 1 after. Replace call
2614 to win32_ensure_ntdll_loaded by call to win32_add_all_dlls.
2615 Add comment.
2616 (match_dll_by_basename, dll_is_loaded_by_basename): Delete.
2617 (handle_unload_dll): Add function documentation.
2618 (get_child_debug_event): Ignore load and unload DLL events
2619 during child initialization.
2620
d86d4aaf
DE
26212014-02-20 Doug Evans <dje@google.com>
2622
3bc32da3 2623 Remove global all_lwps.
d86d4aaf
DE
2624 * inferiors.h (ptid_of): Move here from linux-low.h.
2625 (pid_of, lwpid_of): Ditto.
2626 * linux-aarch64-low.c (debug_reg_change_callback): Update, "entry"
2627 parameter is a struct thread_info * now.
2628 (aarch64_notify_debug_reg_change): Fetch pid from current_inferior
2629 directly. Pass &all_threads to find_inferior instead of &all_lwps.
2630 (aarch64_stopped_data_address): Fetch lwpid from current_inferior
2631 directly.
2632 (aarch64_linux_prepare_to_resume): Fetch ptid from thread.
2633 (aarch64_arch_setup): Fetch lwpid from current_inferior directly.
2634 * linux-arm-low.c (update_registers_callback): Update, "entry"
2635 parameter is a struct thread_info * now.
2636 Fetch lwpid from current_inferior directly.
2637 (arm_insert_point): Pass &all_threads to find_inferior instead of
2638 &all_lwps.
2639 (arm_remove_point): Ditto.
2640 (arm_stopped_by_watchpoint): Fetch lwp from current_inferior.
2641 (arm_prepare_to_resume): Fetch pid from thread.
2642 (arm_read_description): Fetch lwpid from current_inferior directly.
2643 * linux-low.c (all_lwps): Delete.
2644 (delete_lwp): Delete call to remove_inferior.
2645 (handle_extended_wait): Fetch lwpid from thread.
2646 (add_lwp): Don't set lwp->entry.id. Remove call to
2647 add_inferior_to_list.
2648 (linux_attach_lwp_1): Fetch pid from current_inferior directly.
2649 (linux_kill_one_lwp): Fetch ptid,lwpid from thread.
2650 (kill_one_lwp_callback): Ditto.
2651 (linux_kill): Don't dereference NULL pointer.
2652 Fetch ptid,lwpid from thread.
2653 (get_detach_signal): Fetch ptid from thread.
2654 (linux_detach_one_lwp): Fetch ptid,lwpid from thread.
2655 Simplify call to regcache_invalidate_thread.
2656 (delete_lwp_callback): Update, "entry" parameter is a
2657 struct thread_info * now. Fetch pid from thread.
2658 (linux_mourn): Pass &all_threads to find_inferior instead of &all_lwps.
2659 (status_pending_p_callback): Update, "entry" parameter is a
2660 struct thread_info * now. Fetch ptid from thread.
2661 (find_lwp_pid): Update, "entry" parameter is a
2662 struct thread_info * now.
2663 (linux_wait_for_lwp): Fetch pid from thread.
2664 (linux_fast_tracepoint_collecting): Fetch lwpid from thread.
2665 (maybe_move_out_of_jump_pad): Fetch lwpid from current_inferior.
2666 (enqueue_one_deferred_signal): Fetch lwpid from thread.
2667 (dequeue_one_deferred_signal): Ditto.
2668 (cancel_breakpoint): Fetch ptid from current_inferior.
2669 (linux_wait_for_event): Pass &all_threads to find_inferior,
2670 not &all_lwps. Fetch ptid, lwpid from thread.
2671 (count_events_callback): Update, "entry" parameter is a
2672 struct thread_info * now.
2673 (select_singlestep_lwp_callback): Ditto.
2674 (select_event_lwp_callback): Ditto.
2675 (cancel_breakpoints_callback): Ditto.
2676 (linux_cancel_breakpoints): Pass &all_threads to find_inferior,
2677 not &all_lwps.
2678 (select_event_lwp): Ditto. Fetch ptid from event_thread.
2679 (unsuspend_one_lwp): Update, "entry" parameter is a
2680 struct thread_info * now.
2681 (unsuspend_all_lwps): Pass &all_threads to find_inferior,
2682 not &all_lwps.
2683 (linux_stabilize_threads): Ditto. And for for_each_inferior.
2684 Fetch lwpid from thread, not lwp.
2685 (linux_wait_1): Fetch ptid, lwpid from current_inferior.
2686 Pass &all_threads to find_inferior, not &all_lwps.
2687 (send_sigstop): Fetch lwpid from thread, not lwp.
2688 (send_sigstop_callback): Update, "entry" parameter is a
2689 struct thread_info * now.
2690 (suspend_and_send_sigstop_callback): Ditto.
2691 (wait_for_sigstop): Ditto. Fetch ptid, lwpid from thread, lwp.
2692 (stuck_in_jump_pad_callback): Update, "entry" parameter is a
2693 struct thread_info * now.
2694 (move_out_of_jump_pad_callback): Ditto. Fetch ptid, lwpid
2695 from thread, lwp.
2696 (lwp_running): Update, "entry" parameter is a
2697 struct thread_info * now.
2698 (stop_all_lwps): Fetch ptid from thread.
2699 Pass &all_threads to find_inferior, for_each_inferior, not &all_lwps.
2700 (linux_resume_one_lwp): Fetch lwpid from thread.
2701 (linux_set_resume_request): Update, "entry" parameter is a
2702 struct thread_info * now. Fetch pid, lwpid from thread.
2703 (resume_status_pending_p): Update, "entry" parameter is a
2704 struct thread_info * now.
2705 (need_step_over_p): Ditto. Fetch lwpid from thread.
2706 (start_step_over): Fetch lwpid from thread.
2707 (linux_resume_one_thread): Update, "entry" parameter is a
2708 struct thread_info * now. Fetch lwpid from thread.
2709 (linux_resume): Pass &all_threads to find_inferior, not &all_lwps.
2710 (proceed_one_lwp): Update, "entry" parameter is a
2711 struct thread_info * now. Fetch lwpid from thread.
2712 (unsuspend_and_proceed_one_lwp): Update, "entry" parameter is a
2713 struct thread_info * now.
2714 (proceed_all_lwps): Pass &all_threads to find_inferior, not &all_lwps.
2715 (unstop_all_lwps): Ditto. Fetch lwpid from thread.
2716 (regsets_fetch_inferior_registers): Fetch lwpid from current_inferior
2717 directly.
2718 (regsets_store_inferior_registers): Ditto.
2719 (fetch_register, store_register): Ditto.
2720 (linux_read_memory, linux_write_memory): Ditto.
2721 (linux_request_interrupt): Ditto.
2722 (linux_read_auxv): Ditto.
2723 (linux_xfer_siginfo): Ditto.
2724 (linux_qxfer_spu): Ditto.
2725 (linux_qxfer_libraries_svr4): Ditto.
2726 * linux-low.h (ptid_of, pid_of, lwpid_of): Delete,
2727 moved to inferiors.h.
2728 (get_lwp): Delete.
2729 (get_thread_lwp): Update.
2730 (struct lwp_info): Delete member "entry". Simplify comment for
2731 member "thread".
2732 (all_lwps): Delete.
2733 * linux-mips-low.c (mips_read_description): Fetch lwpid from
2734 current_inferior directly.
2735 (update_watch_registers_callback): Update, "entry" parameter is a
2736 struct thread_info * now. Fetch pid from thread.
2737 (mips_linux_prepare_to_resume): Fetch ptid from thread.
2738 (mips_insert_point): Fetch lwpid from current_inferior.
2739 Pass &all_threads to find_inferior, not &all_lwps.
2740 (mips_remove_point): Pass &all_threads to find_inferior, not &all_lwps.
2741 (mips_stopped_by_watchpoint): Fetch lwpid from current_inferior
2742 directly.
2743 (mips_stopped_data_address): Ditto.
2744 * linux-s390-low.c (s390_arch_setup): Fetch pid from current_inferior
2745 directly.
2746 * linux-tile-low.c (tile_arch_setup): Ditto.
2747 * linux-x86-low.c (x86_get_thread_area): Fetch lwpid from thread.
2748 (update_debug_registers_callback): Update, "entry" parameter is a
2749 struct thread_info * now. Fetch pid from thread.
2750 (i386_dr_low_set_addr): Fetch pid from current_inferior directly.
2751 Pass &all_threads to find_inferior, not &all_lwps.
2752 (i386_dr_low_get_addr): Fetch ptid from current_inferior directly.
2753 (i386_dr_low_set_control): Fetch pid from current_inferior directly.
2754 Pass &all_threads to find_inferior, not &all_lwps.
2755 (i386_dr_low_get_control): Fetch ptid from current_inferior directly.
2756 (i386_dr_low_get_status): Ditto.
2757 (x86_linux_prepare_to_resume): Fetch ptid from thread.
2758 (x86_siginfo_fixup): Fetch lwpid from current_inferior directly.
2759 (x86_linux_read_description): Ditto.
2760 * proc-service.c (ps_getpid): Fetch pid from current_inferior directly.
2761
3b8361aa
DE
27622014-02-20 Doug Evans <dje@google.com>
2763
2764 * inferiors.c (get_first_inferior): Fix buglet.
2765
f7667f0d
DE
27662014-02-19 Doug Evans <dje@google.com>
2767
2768 * gdbthread.h (add_thread): Change result type to struct thread_info *.
2769 * inferiors.c (add_thread): Change result type to struct thread_info *.
2770 All callers updated.
2771 (add_lwp): Call add_thread here instead of in callers.
2772 All callers updated.
2773 * linux-low.h (get_lwp_thread): Rewrite.
2774 (struct lwp_info): New member "thread".
2775
b3312d80
DE
27762014-02-19 Doug Evans <dje@google.com>
2777
2778 * linux-low.c (add_lwp): Change result to struct lwp_info *.
2779 All callers updated.
2780
ecc6f45c
DE
27812014-02-19 Doug Evans <dje@google.com>
2782
2783 * inferiors.c (add_thread): Fix whitespace.
2784
649ebbca
DE
27852014-02-19 Doug Evans <dje@google.com>
2786
2787 * dll.c (clear_dlls): Replace accessing list implemention details
2788 with API function.
2789 * gdbthread.h (get_first_thread): Declare.
2790 * inferiors.c (for_each_inferior_with_data): New function.
2791 (get_first_thread): New function.
2792 (find_thread_ptid): Simplify.
2793 (get_first_inferior): New function.
2794 (clear_list): Delete.
2795 (one_inferior_p): New function.
2796 (clear_inferior_list): New function.
2797 (clear_inferiors): Update.
2798 * inferiors.h (for_each_inferior_with_data): Declare.
2799 (clear_inferior_list): Declare.
2800 (one_inferior_p): Declare.
2801 (get_first_inferior): Declare.
2802 * linux-low.c (linux_wait_for_event): Replace accessing list
2803 implemention details with API function.
2804 * server.c (target_running): Ditto.
2805 (accumulate_file_name_length): New function.
2806 (emit_dll_description): New function.
2807 (handle_qxfer_libraries): Replace accessing list implemention
2808 details with API function.
2809 (handle_qxfer_threads_worker): New function.
2810 (handle_qxfer_threads_proper): Replace accessing list implemention
2811 details with API function.
2812 (handle_query): Ditto.
2813 (visit_actioned_threads_callback_ftype): New typedef.
2814 (visit_actioned_threads_data): New struct.
2815 (visit_actioned_threads): Rewrite to be find_inferior callback.
2816 (resume): Call find_inferior.
2817 (handle_status): Replace accessing list implemention
2818 details with API function.
2819 (process_serial_event): Replace accessing list implemention details
2820 with API function.
2821 * target.c (set_desired_inferior): Replace accessing list implemention
2822 details with API function.
2823 * tracepoint.c (same_process_p): New function.
2824 (gdb_agent_about_to_close): Replace accessing list implemention
2825 details with API function.
2826 * win32-low.c (child_delete_thread): Replace accessing list
2827 implemention details with API function.
2828 (match_dll_by_basename): New function.
2829 (dll_is_loaded_by_basename): New function.
2830 (win32_ensure_ntdll_loaded): Replace accessing list implemention
2831 details call to dll_is_loaded_by_basename.
2832
80894984
DE
28332014-02-19 Doug Evans <dje@google.com>
2834
2835 * dll.h (struct dll_info): Add comment.
2836 * gdbthread.h (struct thread_info): Add comment.
2837 (current_ptid): Simplify.
2838 * inferiors.c (add_process): Update.
2839 (remove_process): Update.
2840 * inferiors.h (struct process_info): Rename member "head" to "entry".
2841 * linux-low.c (delete_lwp): Update.
2842 (add_lwp): Update.
2843 (last_thread_of_process_p): Update.
2844 (kill_one_lwp_callback, linux_kill): Update.
2845 (status_pending_p_callback): Update.
2846 (wait_for_sigstop): Update. Simplify read of ptid.
2847 (start_step_over): Update.
2848 * linux-low.h (ptid_of, pid_of, lwpid_of): Update.
2849 (get_lwp_thread): Update.
2850 (struct lwp_info): Rename member "head" to "entry".
2851 * regcache.h (inferior_list_entry): Delete.
2852 * server.c (kill_inferior_callback): Update.
2853 (detach_or_kill_inferior_callback): Update.
2854 (print_started_pid): Update.
2855 (print_attached_pid): Update.
2856 (process_serial_event): Simplify read of ptid.
2857 * thread-db.c (thread_db_create_event): Update.
2858 (thread_db_get_tls_address): Update.
2859 * win32-low.c (current_inferior_ptid): Simplify.
2860
46917d26
TT
28612014-02-19 Tom Tromey <tromey@redhat.com>
2862
2863 * target.h (struct target_ops) <supports_btrace>: Add target_ops
2864 argument.
2865 (target_supports_btrace): Update.
2866
0759a81e
YQ
28672014-02-14 Yao Qi <yao@codesourcery.com>
2868
2869 * Makefile.in (IPA_OBJS): Append rsp-low-ipa.o.
2870 (rsp-low-ipa.o): New target.
2871
a7191e8b
TT
28722014-02-12 Tom Tromey <tromey@redhat.com>
2873
2874 * ax.c (gdb_parse_agent_expr): Use hex2bin, not
2875 convert_ascii_to_int.
2876 * regcache.c (registers_to_string): Likewise.
2877 * remote-utils.c (decode_M_packet): Likewise.
2878 * server.c (process_serial_event): Likewise.
2879
ff0e980e
TT
28802014-02-12 Tom Tromey <tromey@redhat.com>
2881
2882 * server.c (handle_query, handle_v_run): Use hex2bin, not
2883 unhexify.
2884 * tracepoint.c (cmd_qtdpsrc, cmd_qtdv, cmd_qtnotes): Likewise.
2885
e9371aff
TT
28862014-02-12 Tom Tromey <tromey@redhat.com>
2887
2888 * ax.c (gdb_unparse_agent_expr): Use bin2hex, not
2889 convert_int_to_ascii.
2890 * regcache.c (registers_to_string, collect_register_as_string):
2891 Likewise.
2892 * remote-utils.c (look_up_one_symbol, relocate_instruction):
2893 Likewise.
2894 * server.c (process_serial_event): Likewise.
2895 * tracepoint.c (cmd_qtstatus, response_source, response_tsv)
2896 (cmd_qtbuffer, cstr_to_hexstr): Likewise.
2897
971dc0b8
TT
28982014-02-12 Tom Tromey <tromey@redhat.com>
2899
2900 * remote-utils.c (look_up_one_symbol, monitor_output): Use
2901 bin2hex, not hexify.
2902 * tracepoint.c (cmd_qtstatus): Likewise.
2903
0a822afb
TT
29042014-02-12 Tom Tromey <tromey@redhat.com>
2905
2906 * remote-utils.c (monitor_output): Pass explicit length to
2907 hexify.
2908
9c3d6531
TT
29092014-02-12 Tom Tromey <tromey@redhat.com>
2910
2911 * tracepoint.c: Include rsp-low.h.
2912 * server.c: Include rsp-low.h.
2913 * remote-utils.h (convert_ascii_to_int, convert_int_to_ascii)
2914 (unhexify, hexify, remote_escape_output, unpack_varlen_hex): Don't
2915 declare.
2916 * remote-utils.c: Include rsp-low.h.
2917 (fromhex, hexchars, ishex, unhexify, tohex, hexify)
2918 (remote_escape_output, remote_unescape_input, unpack_varlen_hex)
2919 (convert_int_to_ascii, convert_ascii_to_int): Move to
2920 common/rsp-low.c.
2921 * regcache.c: Include rsp-low.h.
2922 * ax.c: Include rsp-low.h.
2923 * Makefile.in (SFILES): Add common/rsp-low.c.
2924 (OBS): Add rsp-low.o.
2925 (rsp-low.o): New target.
2926
01fd3ea5
TT
29272014-02-12 Tom Tromey <tromey@redhat.com>
2928
2929 * utils.h (pulongest, plongest, phex_nz): Don't declare.
2930 Include print-utils.h.
2931 * utils.c (NUMCELLS, CELLSIZE, get_cell, decimal2str, pulongest)
2932 (plongest, thirty_two, phex_nz): Remove.
2933 * Makefile.in (SFILES): Add common/print-utils.c.
2934 (OBS): Add print-utils.o.
2935 (print-utils-ipa.o): New target.
2936 (print-utils.o): New target.
2937 (IPA_OBJS): Add print-utils-ipa.o.
2938
e99dc820
TT
29392014-02-06 Tom Tromey <tromey@redhat.com>
2940
2941 * Makefile.in (SFILES): Fix indentation.
2942
ee1e2d4f
DE
29432014-02-05 Doug Evans <dje@google.com>
2944
2945 * linux-low.c (linux_wait_for_event): Improve comment.
2946 (linux_wait_1): Keep current_inferior in sync with event_child.
2947
f5a02773
DE
29482014-01-22 Doug Evans <dje@google.com>
2949
2950 * gdbthread.h (gdb_id_to_thread): Delete, unused.
2951
87ce2a04
DE
29522014-01-22 Doug Evans <dje@google.com>
2953
2954 * configure.ac (AC_CHECK_FUNCS): Add test for gettimeofday.
2955 * configure: Regenerate.
2956 * config.in: Regenerate.
2957 * Makefile.in (SFILES): Add debug.c.
2958 (OBS): Add debug.o.
2959 * debug.c: New file.
2960 * debug.h: New file.
2961 * linux-aarch64-low.c (*): Update all debugging printfs to use
2962 debug_printf instead of fprintf.
2963 * linux-arm-low.c (*): Ditto.
2964 * linux-cris-low.c (*): Ditto.
2965 * linux-crisv32-low.c (*): Ditto.
2966 * linux-m32r-low.c (*): Ditto.
2967 * linux-sparc-low.c (*): Ditto.
2968 * linux-x86.c (*): Ditto.
2969 * linux-low.c (*): Ditto.
2970 (linux_wait_1): Add calls to debug_enter, debug_exit.
2971 (linux_wait): Remove redundant debugging printf.
2972 (stop_all_lwps): Add calls to debug_enter, debug_exit.
2973 (linux_resume, unstop_all_lwps): Ditto.
2974 * mem-break.c (*): Update all debugging printfs to use
2975 debug_printf instead of fprintf.
2976 * remote-utils.c (*): Ditto.
2977 * thread-db.c (*): Ditto.
2978 * server.c #include <ctype.h>, "gdb_vecs.h".
2979 (debug_threads): Moved to debug.c.
2980 (*): Update all debugging printfs to use debug_printf instead of
2981 fprintf.
2982 (start_inferior): Replace call to fflush with call to debug_flush.
2983 (monitor_show_help): Mention set debug-format.
2984 (parse_debug_format_options): New function.
2985 (handle_monitor_command): Handle "monitor set debug-format".
2986 (gdbserver_usage): Mention --debug-format.
2987 (main): Parse --debug-format.
2988 * server.h (debug_threads): Declaration moved to debug.h.
2989 #include "debug.h".
2990 * tracepoint.c (trace_debug_1) [!IN_PROCESS_AGENT]: Add version of
2991 trace_debug_1 that uses debug_printf.
2992 (tracepoint_look_up_symbols): Update all debugging printfs to use
2993 debug_printf instead of fprintf.
2994
e671835b
BS
29952014-01-20 Baruch Siach <baruch@tkos.co.il>
2996
2997 * linux-xtensa-low.c: Include asm/ptrace.h instead of
2998 sys/ptrace.h.
2999
b5737fa9
PA
30002014-01-17 Pedro Alves <palves@redhat.com>
3001
ea38d2a9 3002 PR build/16445
c7faa97a
PA
3003 * linux-x86-low.c: Don't include elf/common.h if ELFMAG0 is
3004 defined after including gdb_proc_service.h.
b5737fa9 3005
40ed484e
DE
30062014-01-16 Doug Evans <dje@google.com>
3007
3008 * dll.c (UNSPECIFIED_CORE_ADDR): New macro.
3009 (match_dll): Use it.
3010
969c39fb
MM
30112014-01-16 Markus Metzger <markus.t.metzger@intel.com>
3012
3013 * target.h (target_ops) <read_btrace>: Change parameters and
3014 return type to allow error reporting.
3015 * server.c (handle_qxfer_btrace): Support delta reads. Pass
3016 trace reading errors on.
3017 * linux-low.c (linux_low_read_btrace): Pass trace reading
3018 errors on.
3019 (linux_low_disable_btrace): New.
3020
ab7f45ba
DE
30212014-01-15 Doug Evans <dje@google.com>
3022
3023 * inferiors.c (thread_id_to_gdb_id): Delete.
3024 * inferiors.h (thread_id_to_gdb_id): Delete.
3025
66af0f44
EZ
30262014-01-13 Eli Zaretskii <eliz@gnu.org>
3027
3028 * Makefile.in (INCLUDE_CFLAGS): Remove trailing slash from
3029 "-I$(srcdir)/../". Fixes MinGW compilation errors with old GCC
3030 versions.
3031
9939e131
PA
30322014-01-08 Pedro Alves <palves@redhat.com>
3033
3034 * server.c (handle_status): Don't discard previous queued stop
3035 replies or thread's pending status here.
3036 (main) <disconnection>: Do it here instead.
3037
b7ea362b
PA
30382014-01-08 Pedro Alves <palves@redhat.com>
3039
3040 * gdbthread.h (struct thread_info) <status_pending_p>: New field.
3041 * server.c (visit_actioned_threads, handle_pending_status): New
3042 function.
3043 (handle_v_cont): Factor out parts to ...
3044 (resume): ... this new function. If in all-stop, and a thread
3045 being resumed has a pending status, report it without actually
3046 resuming.
3047 (myresume): Adjust to use the new 'resume' function.
3048 (clear_pending_status_callback, set_pending_status_callback)
3049 (find_status_pending_thread_callback): New functions.
3050 (handle_status): Handle the case of multiple threads having
3051 interesting statuses to report. Report threads' real last signal
3052 instead of always reporting GDB_SIGNAL_TRAP. Look for a thread
3053 with an interesting thread to report the status for, instead of
3054 always reporting the status of the first thread.
3055
28498c42
JB
30562014-01-01 Joel Brobecker <brobecker@adacore.com>
3057
3058 * gdbserver.c (gdbserver_version): Set copyright year to 2014.
3059 * gdbreplay.c (gdbreplay_version): Likewise.
3060
f45c82da
YZ
30612013-12-18 Yufeng Zhang <yufeng.zhang@arm.com>
3062
3063 * linux-aarch64-low.c (aarch64_linux_set_debug_regs): Set
3064 iov.iov_len with the real length in use.
3065
379a5e2d
JB
30662013-12-13 Joel Brobecker <brobecker@adacore.com>
3067
3068 * Makefile.in (safe-ctype.o, lbasename.o): New rules.
3069 * configure.srv: Add safe-ctype.o and lbasename.o to srv_tgtobj
3070 for all targets that use win32-low.c.
3071 * win32-low.c (win32_ensure_ntdll_loaded): New function.
3072 (do_initial_child_stuff): Add call to win32_ensure_ntdll_loaded.
3073
4210d83e
PA
30742013-12-13 Pedro Alves <palves@redhat.com>
3075
3076 * target.c (mywait): Set OURSTATUS->KIND to TARGET_WAITKIND_STOPPED
3077 if equal to TARGET_WAITKIND_LOADED.
3078 * win32-low.c (cached_status): New static global.
3079 (win32_wait): Add declaration.
3080 (do_initial_child_stuff): Flush all initial pending debug events
3081 up to the initial breakpoint.
3082 (win32_wait): If CACHED_STATUS was set, return that instead
3083 of doing a real wait. Remove the code resuming the execution
3084 of the inferior after receiving a TARGET_WAITKIND_LOADED event
3085 during the initial phase. Also remove the code changing
3086 OURSTATUS->KIND from TARGET_WAITKIND_LOADED to
3087 TARGET_WAITKIND_STOPPED.
3088
e7f0d979
YQ
30892013-12-11 Yao Qi <yao@codesourcery.com>
3090
3091 * notif.c (handle_notif_ack): Return 0 if no notification
3092 matches.
3093
ebcf782c
DE
30942013-11-20 Doug Evans <dje@google.com>
3095
3096 * linux-low.c (linux_set_resume_request): Fix comment.
3097
20ad9378
DE
30982013-11-20 Doug Evans <dje@google.com>
3099
3100 * linux-low.c (resume_status_pending_p): Tweak comment.
3101
a196ebeb
WT
31022013-11-20 Walfred Tedeschi <walfred.tedeschi@intel.com>
3103
3104 * Makefile.in: Add i386-mpx.c, i386-mpx-linux.c, amd64-mpx.c,
3105 amd64-mpx-linux.c, x32-mpx.c and x32-mpx-linux.c generation.
3106 * configure.srv (srv_i386_regobj): Add i386-mpx.o.
3107 (srv_i386_linux_regobj): Add i386-mpx-linux.o.
3108 (srv_amd64_regobj): Add amd64-mpx.o.
3109 (srv_amd64_linux_regobj): Add amd64-mpx-linux.o.
3110 (srv_i386_32bit_xmlfiles): Add i386/32bit-mpx.xml.
3111 (srv_i386_64bit_xmlfiles): Add i386/64bit-mpx.xml.
3112 * i387-fp.c (num_pl_bnd_register) Added constant.
3113 (num_pl_bnd_cfg_registers) Added constant.
3114 (struct i387_xsave) Added reserved area and MPX fields.
3115 (i387_cache_to_xsave, i387_xsave_to_cache) Add MPX.
3116 * linux-x86-low.c (init_registers_i386_mpx_linux): Declare new
3117 function.
3118 (tdesc_i386_mpx_linux): Add MPX amd64 target.
3119 (init_registers_amd64_mpx_linux): Declare new function.
3120 (tdesc_amd64_mpx_linux): Add MPX amd64 target.
3121 (x86_64_regmap): Add MPX registers.
3122 (x86_linux_read_description): Add MPX case.
3123 (initialize_low_arch): Initialize MPX targets.
3124
0080a2f6
TT
31252013-11-18 Tom Tromey <tromey@redhat.com>
3126
3127 * configure: Rebuild.
3128 * configure.ac: Don't check for stdlib.h.
3129 * gdbreplay.c: Unconditionally include stdlib.h.
3130
2978b111
TT
31312013-11-18 Tom Tromey <tromey@redhat.com>
3132
3133 * config.in: Rebuild.
3134 * configure: Rebuild.
3135 * configure.ac: Don't use AC_HEADER_DIRENT.
3136
a3d08894
TT
31372013-11-18 Tom Tromey <tromey@redhat.com>
3138
3139 * server.h: Don't check HAVE_STRING_H.
3140 * gdbreplay.c: Don't check HAVE_STRING_H.
3141 * configure: Rebuild.
3142
0a5dd17d
TT
31432013-11-18 Tom Tromey <tromey@redhat.com>
3144
3145 * Makefile.in (gdbreplay$(EXEEXT)): Depend on and link against
3146 LIBGNU.
3147
1bd2f0ba
TT
31482013-11-08 Tom Tromey <tromey@redhat.com>
3149
3150 * configure, config.in: Rebuild.
3151 * configure.ac: Remove unused configury.
3152
3266f10b
TT
31532013-11-08 Tom Tromey <tromey@redhat.com>
3154
3155 * acinclude.m4: Include common.m4, codeset.m4.
3156 * configure, config.in: Rebuild.
3157 * configure.ac: Use GDB_AC_COMMON.
3158
6682d959
AA
31592013-11-06 Andreas Arnez <arnez@linux.vnet.ibm.com>
3160
3161 * linux-s390-low.c (HWCAP_S390_TE): New define.
3162 (s390_arch_setup): Consider the TE field in the HWCAP for
3163 determining 'have_regset_tdb'.
3164
fd0a4d76
SDJ
31652013-10-16 Sergio Durigan Junior <sergiodj@redhat.com>
3166
3167 PR gdb/16014
3168 * tracepoint.c (download_tracepoint_1): Remove unnecessary double
3169 call to sizeof.
3170
1a3d890b
PA
31712013-10-02 Pedro Alves <palves@redhat.com>
3172
3173 * server.c (process_serial_event): Don't output "GDBserver
3174 exiting" if GDB is connected through stdio.
3175 * target.c (mywait): Likewise, be silent if GDB is connected
3176 through stdio.
3177
97ad4581
JB
31782013-10-01 Joel Brobecker <brobecker@adacore.com>
3179
3180 * lynx-low.c (lynx_add_threads_after_attach): New function.
3181 (lynx_attach): Remove call to add_thread. Add call to
3182 lynx_add_threads_after_attach instead.
3183
5b4e221c
MF
31842013-09-28 Mike Frysinger <vapier@gentoo.org>
3185
3186 * configure.ac (AC_CHECK_HEADERS): Add sys/syscall.h
3187 * config.in, configure: Regenerated.
3188
ee47b2f8
YQ
31892013-09-18 Yao Qi <yao@codesourcery.com>
3190
3191 PR server/15959
3192 * server.c (start_inferior): Clear 'resume_info'.
3193
d6707650 31942013-09-16 Jiong Wang <jiwang@tilera.com>
0f63d4db 3195
d6707650
JW
3196 * linux-tile-low.c (tile_regsets): Modify the size field to 64-bit
3197 for each register.
3198
9243dd0e 31992013-09-16 Jiong Wang <jiwang@tilera.com>
0f63d4db 3200
9243dd0e
JW
3201 * configure.srv <tilegx*-*-linux*>: Remove linux-osdata.o from and add
3202 linux-tile-low.o to srv_tgtobj.
3203
c623a6ef
WN
32042013-09-16 Will Newton <will.newton@linaro.org>
3205
3206 * linux-aarch64-low.c (aarch64_linux_set_debug_regs): Zero
3207 out regs.
3208
fb71d39e
PA
32092013-09-06 Pedro Alves <palves@redhat.com>
3210
3211 * Makefile.in (gdb_proc_service_h, regdef_h, regcache_h)
3212 (signals_def, signals_h, ptid_h, ax_h, agent_h, linux_btrace_h)
3213 (linux_osdata_h, vec_h, gdb_vecs_h, host_defs_h, libiberty_h)
3214 (server_h, gdbthread_h, linux_low_h, linux_ptrace_h)
3215 (gdb_thread_db_h, linux_procfs_h, lynx_low_h, nto_low_h)
3216 (mips_linux_watch_h, i386_low_h, win32_low_h): Delete.
3217
8e7e9910
PA
32182013-09-06 Pedro Alves <palves@redhat.com>
3219
3220 * Makefile.in (linux-btrace.o, mips-linux-watch.o): Remove
3221 explicit header dependencies and use $COMPILE/$POSTCOMPILE.
3222
7c3a12ca
PA
32232013-09-06 Pedro Alves <palves@redhat.com>
3224
3225 * linux-amd64-ipa.c: Include tracepoint.h.
3226 * linux-i386-ipa.c: Include tracepoint.h.
3227
8eb3d7b6
RW
32282013-09-06 Ricard Wanderlof <ricardw@axis.com>
3229
3230 * linux-crisv32-low.c (PTRACE_GET_THREAD_AREA): New macro.
3231 (ps_get_thread_area): New function.
3232
eddddb9d
RW
32332013-09-06 Ricard Wanderlof <ricardw@axis.com>
3234
3235 * linux-crisv32-low.c (elf_gregset_t): Delete typedef.
3236 (initialize_low_arch): Call init_registers_crisv32 rather than
3237 init_register_crisv32.
3238
533b0600
PA
32392013-09-05 Pedro Alves <palves@redhat.com>
3240
3241 * server.h (handle_vFile, hostio_last_error_from_errno): Move
3242 to ...
3243 * hostio.h: ... this new file.
3244 * hostio.c, server.c, linux-low.c, nto-low.c, spu-low,
3245 win32-low.c: Include hostio.h.
3246
0ce3d3b5
PA
32472013-09-05 Pedro Alves <palves@redhat.com>
3248
3249 * server.h (gdb_client_data, handler_func, callback_handler_func)
3250 (delete_file_handler, add_file_handler, append_callback_event)
3251 (delete_callback_event, start_event_loop, initialize_event_loop):
3252 Move to event-loop.h and include it.
3253 * event-loop.h: New file.
3254
799cdc37
PA
32552013-09-05 Pedro Alves <palves@redhat.com>
3256
3257 * dll.c, inferiors.c, remote-utils.c, server.c: Include "dll.h".
3258 * server.h (struct dll_info, all_dlls, dlls_changed, clear_dlls)
3259 (loaded_dll, unloaded_dll): Move to ...
3260 * dll.h: ... this new file.
3261 * inferiors.c, remote-utils.c, win32-low.c: Include "dll.h".
3262
6a6bbd9d
PA
32632013-09-05 Pedro Alves <palves@redhat.com>
3264
3265 * server.h (current_process, get_thread_process, all_processes)
3266 (add_inferior_to_list, for_each_inferior, current_inferior)
3267 (remove_inferior, add_process, remove_process, find_process_pid)
3268 (have_started_inferiors_p, have_attached_inferiors_p)
3269 (thread_id_to_gdb_id, thread_to_gdb_id, gdb_id_to_thread_id)
3270 (clear_inferiors, find_inferior, find_inferior_id)
3271 (inferior_target_data, set_inferior_target_data)
3272 (inferior_regcache_data, set_inferior_regcache_data): Move to
3273 inferiors.h, and include it.
3274 * inferiors.h: New file.
3275
f699aaba
PA
32762013-09-05 Pedro Alves <palves@redhat.com>
3277
3278 * server.h (struct emit_ops, current_insn_ptr, emit_error):
3279 Move ...
72f4393d 3280 * ax.h: ... here.
f699aaba 3281
c144c7a0
PA
32822013-09-05 Pedro Alves <palves@redhat.com>
3283
3284 * ax.c, linux-low.c, linux-x86-low.c, server.c: Include
3285 tracepoint.h.
3286 * server.h (IPA_BUFSIZ, initialize_tracepoint, tracing)
3287 (disconnected_tracing, tracepoint_look_up_symbols, stop_tracing
3288 (handle_tracepoint_general_set, handle_tracepoint_query)
3289 (tracepoint_finished_step, tracepoint_was_hit)
3290 (release_while_stepping_state_list, current_traceframe)
3291 (in_readonly_region, traceframe_read_mem)
3292 (fetch_traceframe_registers, traceframe_read_sdata)
3293 (traceframe_read_info, struct fast_tpoint_collect_status)
3294 (fast_tracepoint_collecting, force_unlock_trace_buffer)
3295 (handle_tracepoit_bkpts, initialize_low_tracepoint)
3296 (supply_fast_tracepoint_registers)
3297 (supply_static_tracepoint_registers, set_trampoline_buffer_space)
3298 (ipa_tdesc, claim_trampoline_space)
3299 (have_fast_tracepoint_trampoline_buffer, gdb_agent_about_to_close)
3300 (agent_mem_read, agent_get_trace_state_variable_value)
3301 (agent_set_trace_state_variable_value, agent_tsv_read)
3302 (agent_mem_read_string, get_raw_reg_func_addr)
3303 (get_get_tsv_func_addr, get_set_tsv_func_addr): Move to ...
3304 * tracepoint.h: ... this new file.
3305
ff42e6ab
PA
33062013-09-05 Pedro Alves <palves@redhat.com>
3307
3308 * server.h (perror_with_name, error, fatal, warning, paddress)
3309 (pulongest, plongest, phex_nz, pfildes): Move to utils.h, and
3310 include it.
3311 * utils.h: New file.
3312
541af0f4
PA
33132013-09-05 Pedro Alves <palves@redhat.com>
3314
3315 * server.h (remote_debug, noack_mode, transport_is_reliable)
3316 (gdb_connected, STDIO_CONNECTION_NAME, remote_connection_is_stdio)
3317 (read_ptid, write_ptid, putpkt, putpkt_binary, putpkt_notif)
3318 (getpkt, remote_prepare, remote_open, remote_close, write_ok)
3319 (write_enn, initialize_async_io, enable_async_io)
3320 (disable_async_io, check_remote_input_interrupt_request)
3321 (convert_ascii_to_int, convert_int_to_ascii, new_thread_notify)
3322 (dead_thread_notify, prepare_resume_reply)
3323 (decode_address_to_semicolon, decode_address, decode_m_packet)
3324 (decode_M_packet, decode_X_packet, decode_xfer_write)
3325 (decode_search_memory_packet, unhexify, hexify)
3326 (remote_escape_output, unpack_varlen_hex, clear_symbol_cache)
3327 (look_up_one_symbol, relocate_instruction)
3328 (monitor_output): Move to remote-utils.h, and include it.
3329 * remote-utils.h: New file.
3330
eebdf26b
PA
33312013-09-05 Pedro Alves <palves@redhat.com>
3332
3333 * server.h (_): Delete.
3334
3aafd2ff
PA
33352013-09-02 Pedro Alves <palves@redhat.com>
3336
3337 * tracepoint.c (TRACEFRAME_EOB_MARKER_SIZE): New macro.
3338 (init_trace_buffer): Ensure at least TRACEFRAME_EOB_MARKER_SIZE is
3339 allocated.
3340 (trace_buffer_alloc): Use TRACEFRAME_EOB_MARKER_SIZE.
3341
cee83bcb
PM
33422013-09-02 Pierre Muller <muller@sourceware.org>
3343
3344 * win32-low.c (child_xfer_memory): Check if ReadProcessMemory
3345 or WriteProcessMemory complete successfully and handle
3346 ERROR_PARTIAL_COPY error.
3347
9a13b2fa
PA
33482013-09-02 Pedro Alves <palves@redhat.com>
3349
3350 * server.c (gdb_read_memory): Return -1 on traceframe memory read
3351 error instead of EIO.
3352
602e3198
JK
33532013-08-28 Jan Kratochvil <jan.kratochvil@redhat.com>
3354
3355 PR server/15604
3356 * linux-low.c: Include filestuff.h.
3357 (linux_create_inferior) <pid == 0>: Call close_most_fds.
3358 * lynx-low.c: Include filestuff.h.
3359 (lynx_create_inferior) <pid == 0>: Call close_most_fds.
3360 * server.c: Include filestuff.h.
3361 (main): Call notice_open_fds.
3362 * spu-low.c: Include filestuff.h.
3363 (spu_create_inferior) <pid == 0>: Call close_most_fds.
3364
96d7229d
LM
33652013-08-22 Luis Machado <lgustavo@codesourcery.com>
3366
3367 * Makefile.in: Explain why ../target and ../nat are not
3368 listed as include file search paths.
3369 (linux-waitpid.o): New object file rule.
3370 * configure.srv (srv_native_linux_obj): New variable.
3371 Replace all occurrences of linux native object files with
3372 $srv_native_linux_obj.
3373 * linux-low.c: Include nat/linux-nat.h and nat/linux-waitpid.h.
3374 (HAS_NOMMU): Move defining logic to common/linux-ptrace.c.
3375 (linux_enable_event_reporting): Remove declaration.
3376 (my_waitpid): Moved to common/linux-waitpid.c.
3377 (linux_wait_for_event): Pass ptid when calling
3378 linux_enable_event_reporting.
3379 (linux_supports_tracefork_flag): Remove.
3380 (linux_enable_event_reporting): Likewise.
3381 (linux_tracefork_grandchild): Remove.
3382 (STACK_SIZE): Moved to common/linux-ptrace.c.
3383 (linux_tracefork_child): Remove.
3384 (linux_test_for_tracefork): Remove.
3385 (linux_look_up_symbols): Call linux_supports_traceclone.
3386 (initialize_low): Remove call to linux_test_for_tracefork.
3387 * linux-low.h (PTRACE_TYPE_ARG3): Move to
3388 common/linux-ptrace.h.
3389 (PTRACE_TYPE_ARG4): Likewise.
3390 Include linux-ptrace.h.
3391
32940073
PA
33922013-08-21 Pedro Alves <palves@redhat.com>
3393
3394 * config.in: Renegerate.
3395
33b60d58 33962013-08-19 Luis Machado <lgustavo@codesourcery.com>
a261b8f5 3397
33b60d58
LM
3398 * Makefile.in (INCLUDE_CFLAGS): Include -I$(srcdir)/../.
3399 (SFILES): Remove $(srcdir)/common/target-common.c and
3400 add $(srcdir)/target/waitstatus.c.
3401 (OBS): Remove target-common.o and add waitstatus.o.
3402 (server_h): Remove $(srcdir)/../common/target-common.h and
3403 add $(srcdir)/../target/resume.h, $(srcdir)/../target/wait.h
3404 and $(srcdir)/../target/waitstatus.h.
3405 (target-common.o): Remove.
3406 (waitstatus.o): New target object file.
3407 * target.h: Do not include target-common.h and
3408 include target/resume.h, target/wait.h and
3409 target/waitstatus.h.
3410
b8e1b30e
LM
34112013-08-13 Luis Machado <lgustavo@codesourcery.com>
3412
3413 * linux-arm-low.c: Rename all occurrences of PTRACE_ARG3_TYPE
3414 to PTRACE_TYPE_ARG3.
3415 * linux-low.c: Rename all occurrences of PTRACE_ARG3_TYPE
3416 to PTRACE_TYPE_ARG3 and PTRACE_ARG4_TYPE to
3417 PTRACE_TYPE_ARG4.
3418 * linux-low.h (PTRACE_ARG3_TYPE): Rename to PTRACE_TYPE_ARG3.
3419 (PTRACE_ARG4_TYPE): Rename to PTRACE_TYPE_ARG4.
3420
7a60ad40
YQ
34212013-07-27 Jie Zhang <jie@codesourcery.com>
3422 Daniel Jacobowitz <dan@codesourcery.com>
3423 Yao Qi <yao@codesourcery.com>
3424
3425 * Makefile.in (SFILES): Add common/mips-linux-watch.c.
3426 (mips-linux-watch.o): New rule.
3427 (mips_linux_watch_h): New variable.
3428 * configure.srv <mips*-*-linux*>: Add mips-linux-watch.o to
3429 srv_tgtobj.
3430 * linux-mips-low.c: Include mips-linux-watch.h.
3431 (struct arch_process_info, struct arch_lwp_info): New.
3432 (update_watch_registers_callback): New function.
3433 (mips_linux_new_process, mips_linux_new_thread) New functions.
3434 (mips_linux_prepare_to_resume, mips_insert_point): New
3435 functions.
3436 (mips_remove_point, mips_stopped_by_watchpoint): New
3437 functions.
3438 (rsp_bp_type_to_target_hw_bp_type): New function.
3439 (mips_stopped_data_address): New function.
3440 (the_low_target): Add watchpoint support functions.
3441
de6f69ad
YQ
34422013-07-27 Yao Qi <yao@codesourcery.com>
3443
3444 * i386-low.c: Include break-common.h.
3445 (enum target_hw_bp_type): Remove.
3446
3360c0bf
LM
34472013-07-24 Luis Machado <lgustavo@codesourcery.com>
3448
3449 * Makefile.in (SFILES): /common/target-common.c.
3450 (OBS): Add target-common.o.
3451 (server_h): Add $(srcdir)/../common/target-common.h.
3452 (target-common.o): New target.
3453 * server.c (queue_stop_reply_callback): Free
3454 status string after use.
3455 * target.c (target_waitstatus_to_string): Remove.
3456 * target.h: Include target-common.h.
3457 (resume_kind): Likewise.
3458 (target_waitkind): Likewise.
3459 (target_waitstatus): Likewise.
3460 (TARGET_WNOHANG): Likewise.
3461
bd885420
YQ
34622013-07-04 Yao Qi <yao@codesourcery.com>
3463
3464 * Makefile.in (host_alias): Use @host_noncanonical@.
3465 (target_alias): Use @target_noncanonical@.
3466 * configure.ac: Use ACX_NONCANONICAL_TARGET and
3467 ACX_NONCANONICAL_HOST.
3468 * configure: Regenerated.
3469
3470 Revert:
3471 2013-06-28 Mircea Gherzan <mircea.gherzan@intel.com>
3472
3473 * configure.ac (version_host, version_target): Set and AC_SUBST them.
3474 * configure: Rebuild.
3475 * Makefile.in (version_host, version_target): Get from configure.
3476 (version.c): Use $(version_host) and $(version_target).
3477
17ef446e
PA
34782013-07-03 Pedro Alves <palves@redhat.com>
3479
3480 * Makefile.in (config.status): Depend on development.sh.
3481 * acinclude.m4: Include libmcheck.m4.
3482 * configure: Regenerate.
3483
7a9a7487
MG
34842013-07-02 Mircea Gherzan <mircea.gherzan@intel.com>
3485
3486 * win32-low.c (winapi_DebugActiveProcessStop): Move the WINAPI
3487 attribute inside the parentheses.
3488 (winapi_DebugSetProcessKillOnExit): Ditto.
3489 (winapi_DebugBreakProcess): Ditto.
3490 (winapi_GenerateConsoleCtrlEvent): Ditto.
a261b8f5 3491
49b64de6
MG
34922013-07-02 Mircea Gherzan <mircea.gherzan@intel.com>
3493
3494 * notif.h (notif_event): Add a dummy member to avoid compiler
3495 errors.
3496
d5749ee7
PA
34972013-07-01 Pedro Alves <palves@redhat.com>
3498
3499 * hostio.c (HOSTIO_PATH_MAX): Define.
3500 (require_filename, handle_open, handle_unlink, handle_readlink):
3501 Use it.
3502
d8d2a3ee
PA
35032013-07-01 Pedro Alves <palves@redhat.com>
3504
3505 * server.h: Include "pathmax.h".
3506 * linux-low.c: Don't include sys/param.h.
3507 (linux_pid_exe_is_elf_64_file): Use PATH_MAX instead of
3508 MAXPATHLEN.
3509 * win32-low.c: Don't include sys/param.h.
3510 (win32_create_inferior): Use PATH_MAX instead of MAXPATHLEN.
3511
bc7dea8d
PA
35122013-07-01 Pedro Alves <palves@redhat.com>
3513
3514 * event-loop.c: Don't check HAVE_UNISTD_H before including
3515 <unistd.h>.
3516 * gdbreplay.c: Likewise.
3517 * remote-utils.c: Likewise.
3518 * server.c: Likewise.
3519 * configure.ac: Don't check for unistd.h.
3520 * configure: Regenerate.
3521
d6c2da54
TT
35222013-06-28 Tom Tromey <tromey@redhat.com>
3523
3524 * Makefile.in (version.c): Use version.in, not
3525 common/version.in.
3526
257b6bec
MG
35272013-06-28 Mircea Gherzan <mircea.gherzan@intel.com>
3528
3529 * configure.ac (version_host, version_target): Set and AC_SUBST them.
3530 * configure: Rebuild.
3531 * Makefile.in (version_host, version_target): Get from configure.
3532 (version.c): Use $(version_host) and $(version_target).
3533
86ebe149
DK
35342013-06-10 Dmitry Kozlov <ddk@codesourcery.com>
3535
3536 Fix trace-status to output user name without trailing colon.
3537 * tracepoint.c (cmd_qtstatus): Remove unnecessary colon from user name.
3538
f30aa5af
DK
35392013-06-10 Dmitry Kozlov <ddk@codesourcery.com>
3540
3541 Fix trace-status to output proper start-time and stop-time.
3542 * tracepoint.c (cmd_qtstatus): Modify trace-status output to
3543 output start time and stop time in hex as gdb expects.
3544
28a93511
YQ
35452013-06-26 Pedro Alves <pedro@codesourcery.com>
3546
3547 * tracepoint.c (build_traceframe_info_xml): Output trace state
3548 variables present in the trace buffer.
3549
01208463
TT
35502013-06-24 Tom Tromey <tromey@redhat.com>
3551
3552 * Makefile.in (version.c): Use bfd/version.h, common/version.in,
3553 create-version.sh.
3554 (version.o): Remove.
3555 * gdbreplay.c: Include version.h.
3556 (version, host_name): Don't declare.
3557 * server.h: Include version.h.
3558 (version, host_name): Don't declare.
3559
760256f9
PA
35602013-06-12 Pedro Alves <palves@redhat.com>
3561
3562 * linux-x86-low.c (linux_is_elf64): Delete global.
3563 (x86_siginfo_fixup): Replace reference to `linux_is_elf64' global
3564 with local linux_pid_exe_is_elf_64_file use.
3565
030031ee
PA
35662013-06-11 Pedro Alves <palves@redhat.com>
3567
3568 * linux-low.c (regset_disabled, disable_regset): New functions.
3569 (regsets_fetch_inferior_registers)
3570 (regsets_store_inferior_registers): Use them.
3571 (initialize_regsets_info); Don't allocate the disabled_regsets
3572 array here.
3573 * linux-low.h (struct regsets_info) <disabled_regsets>: Extend
3574 comment.
3575
5da6eb0a
PA
35762013-06-11 Pedro Alves <palves@redhat.com>
3577
3578 * linux-low.c (initialize_regsets_info): Use xcalloc instead of
3579 xmalloc.
3580
7e5aaa09
PA
35812013-06-11 Pedro Alves <palves@redhat.com>
3582
3583 * linux-x86-low.c (initialize_low_arch): Call
3584 init_registers_x32_avx_linux.
3585
d878444c
JK
35862013-06-09 Jan Kratochvil <jan.kratochvil@redhat.com>
3587
3588 Fix compatibility with Android Bionic.
3589 * linux-low.c (linux_qxfer_libraries_svr4): Ignore first entry even if
3590 it is not empty.
3591
3aee8918
PA
35922013-06-07 Pedro Alves <palves@redhat.com>
3593
5f2b57b5 3594 PR server/14823
3aee8918
PA
3595 * Makefile.in (OBS): Add tdesc.o.
3596 (IPA_OBJS): Add tdesc-ipa.o.
3597 (tdesc-ipa.o): New rule.
3598 * ax.c (gdb_eval_agent_expr): Adjust register_size call to new
3599 interface.
3600 * linux-low.c (new_inferior): Delete.
3601 (disabled_regsets, num_regsets): Delete.
3602 (linux_add_process): Adjust to set the new per-process
3603 new_inferior flag.
3604 (linux_detach_one_lwp): Adjust to call regcache_invalidate_thread.
3605 (linux_wait_for_lwp): Adjust. Only call arch_setup if the event
3606 was a stop. When calling arch_setup, switch the current inferior
3607 to the thread that got an event.
3608 (linux_resume_one_lwp): Adjust to call regcache_invalidate_thread.
3609 (regsets_fetch_inferior_registers)
3610 (regsets_store_inferior_registers): New regsets_info parameter.
3611 Adjust to use it.
3612 (linux_register_in_regsets): New regs_info parameter. Adjust to
3613 use it.
3614 (register_addr, fetch_register, store_register): New usrregs_info
3615 parameter. Adjust to use it.
3616 (usr_fetch_inferior_registers, usr_store_inferior_registers): New
3617 parameter regs_info. Adjust to use it.
3618 (linux_fetch_registers): Get the current inferior's regs_info, and
3619 adjust to use it.
3620 (linux_store_registers): Ditto.
3621 [HAVE_LINUX_REGSETS] (initialize_regsets_info): New.
3622 (initialize_low): Don't initialize the target_regsets here. Call
3623 initialize_low_arch.
3624 * linux-low.h (target_regsets): Delete declaration.
3625 (struct regsets_info): New.
3626 (struct usrregs_info): New.
3627 (struct regs_info): New.
3628 (struct process_info_private) <new_inferior>: New field.
3629 (struct linux_target_ops): Delete the num_regs, regmap, and
3630 regset_bitmap fields. New field regs_info.
3631 [HAVE_LINUX_REGSETS] (initialize_regsets_info): Declare.
3632 * i387-fp.c (num_xmm_registers): Delete.
3633 (i387_cache_to_fsave, i387_fsave_to_cache): Adjust find_regno
3634 calls to new interface.
3635 (i387_cache_to_fxsave, i387_cache_to_xsave, i387_fxsave_to_cache)
3636 (i387_xsave_to_cache): Adjust find_regno calls to new interface.
3637 Infer the number of xmm registers from the regcache's target
3638 description.
3639 * i387-fp.h (num_xmm_registers): Delete.
3640 * inferiors.c (add_thread): Don't install the thread's regcache
3641 here.
3642 * proc-service.c (gregset_info): Fetch the current inferior's
3643 regs_info. Adjust to use it.
3644 * regcache.c: Include tdesc.h.
3645 (register_bytes, reg_defs, num_registers)
3646 (gdbserver_expedite_regs): Delete.
3647 (get_thread_regcache): If the thread doesn't have a regcache yet,
3648 create one, instead of aborting gdbserver.
3649 (regcache_invalidate_one): Rename to ...
3650 (regcache_invalidate_thread): ... this.
3651 (regcache_invalidate_one): New.
3652 (regcache_invalidate): Only invalidate registers of the current
3653 process.
3654 (init_register_cache): Add target_desc parameter, and use it.
3655 (new_register_cache): Ditto. Assert the target description has a
3656 non zero registers_size.
3657 (regcache_cpy): Add assertions. Adjust.
3658 (realloc_register_cache, set_register_cache): Delete.
3659 (registers_to_string, registers_from_string): Adjust.
3660 (find_register_by_name, find_regno, find_register_by_number)
3661 (register_cache_size): Add target_desc parameter, and use it.
3662 (free_register_cache_thread, free_register_cache_thread_one)
3663 (regcache_release, register_cache_size): New.
3664 (register_size): Add target_desc parameter, and use it.
3665 (register_data, supply_register, supply_register_zeroed)
3666 (supply_regblock, supply_register_by_name, collect_register)
3667 (collect_register_as_string, collect_register_by_name): Adjust.
3668 * regcache.h (struct target_desc): Forward declare.
3669 (struct regcache) <tdesc>: New field.
3670 (init_register_cache, new_register_cache): Add target_desc
3671 parameter.
3672 (regcache_invalidate_thread): Declare.
3673 (regcache_invalidate_one): Delete declaration.
3674 (regcache_release): Declare.
3675 (find_register_by_number, register_cache_size, register_size)
3676 (find_regno): Add target_desc parameter.
3677 (gdbserver_expedite_regs, gdbserver_xmltarget): Delete
3678 declarations.
3679 * remote-utils.c: Include tdesc.h.
3680 (outreg, prepare_resume_reply): Adjust.
3681 * server.c: Include tdesc.h.
3682 (gdbserver_xmltarget): Delete declaration.
3683 (get_features_xml, process_serial_event): Adjust.
3684 * server.h [IN_PROCESS_AGENT] (struct target_desc): Forward
3685 declare.
3686 (struct process_info) <tdesc>: New field.
3687 (ipa_tdesc): Declare.
3688 * tdesc.c: New file.
3689 * tdesc.h: New file.
3690 * tracepoint.c: Include tdesc.h.
3691 [IN_PROCESS_AGENT] (ipa_tdesc): Define.
3692 (get_context_regcache): Adjust to pass ipa_tdesc down.
3693 (do_action_at_tracepoint): Adjust to get the register cache size
3694 from the context regcache's description.
3695 (traceframe_walk_blocks): Adjust to get the register cache size
3696 from the current trace frame's description.
3697 (traceframe_get_pc): Adjust to get current trace frame's
3698 description and pass it down.
3699 (gdb_collect): Adjust to get the register cache size from the
3700 IPA's description.
3701 * linux-amd64-ipa.c (tdesc_amd64_linux): Declare.
3702 (gdbserver_xmltarget): Delete.
3703 (initialize_low_tracepoint): Set the ipa's target description.
3704 * linux-i386-ipa.c (tdesc_i386_linux): Declare.
3705 (initialize_low_tracepoint): Set the ipa's target description.
3706 * linux-x86-low.c: Include tdesc.h.
3707 [__x86_64__] (is_64bit_tdesc): New.
3708 (ps_get_thread_area, x86_get_thread_area): Use it.
3709 (i386_cannot_store_register): Rename to ...
3710 (x86_cannot_store_register): ... this. Use is_64bit_tdesc.
3711 (i386_cannot_fetch_register): Rename to ...
3712 (x86_cannot_fetch_register): ... this. Use is_64bit_tdesc.
3713 (x86_fill_gregset, x86_store_gregset): Adjust register_size calls
3714 to new interface.
3715 (target_regsets): Rename to ...
3716 (x86_regsets): ... this.
3717 (x86_get_pc, x86_set_pc): Adjust register_size calls to new
3718 interface.
3719 (x86_siginfo_fixup): Use is_64bit_tdesc.
3720 [__x86_64__] (tdesc_amd64_linux, tdesc_amd64_avx_linux)
3721 (tdesc_x32_avx_linux, tdesc_x32_linux)
3722 (tdesc_i386_linux, tdesc_i386_mmx_linux, tdesc_i386_avx_linux):
3723 Declare.
3724 (x86_linux_update_xmltarget): Delete.
3725 (I386_LINUX_XSAVE_XCR0_OFFSET): Define.
3726 (have_ptrace_getfpxregs, have_ptrace_getregset): New.
3727 (AMD64_LINUX_USER64_CS): New.
3728 (x86_linux_read_description): New, based on
3729 x86_linux_update_xmltarget.
3730 (same_process_callback): New.
3731 (x86_arch_setup_process_callback): New.
3732 (x86_linux_update_xmltarget): New.
3733 (x86_regsets_info): New.
3734 (amd64_linux_regs_info): New.
3735 (i386_linux_usrregs_info): New.
3736 (i386_linux_regs_info): New.
3737 (x86_linux_regs_info): New.
3738 (x86_arch_setup): Reimplement.
3739 (x86_install_fast_tracepoint_jump_pad): Use is_64bit_tdesc.
3740 (x86_emit_ops): Ditto.
3741 (the_low_target): Adjust. Install x86_linux_regs_info,
3742 x86_cannot_fetch_register, and x86_cannot_store_register.
3743 (initialize_low_arch): New.
3744 * linux-ia64-low.c (tdesc_ia64): Declare.
3745 (ia64_fetch_register): Adjust.
3746 (ia64_usrregs_info, regs_info): New globals.
3747 (ia64_regs_info): New function.
3748 (the_low_target): Adjust.
3749 (initialize_low_arch): New function.
3750 * linux-sparc-low.c (tdesc_sparc64): Declare.
3751 (sparc_fill_gregset_to_stack, sparc_store_gregset_from_stack):
3752 Adjust.
3753 (sparc_arch_setup): New function.
3754 (sparc_regsets_info, sparc_usrregs_info, regs_info): New globals.
3755 (the_low_target): Adjust.
3756 (initialize_low_arch): New function.
3757 * linux-ppc-low.c (tdesc_powerpc_32l, tdesc_powerpc_altivec32l)
3758 (tdesc_powerpc_cell32l, tdesc_powerpc_vsx32l)
3759 (tdesc_powerpc_isa205_32l, tdesc_powerpc_isa205_altivec32l)
3760 (tdesc_powerpc_isa205_vsx32l, tdesc_powerpc_e500l)
3761 (tdesc_powerpc_64l, tdesc_powerpc_altivec64l)
3762 (tdesc_powerpc_cell64l, tdesc_powerpc_vsx64l)
3763 (tdesc_powerpc_isa205_64l, tdesc_powerpc_isa205_altivec64l)
3764 (tdesc_powerpc_isa205_vsx64l): Declare.
3765 (ppc_cannot_store_register, ppc_collect_ptrace_register)
3766 (ppc_supply_ptrace_register, parse_spufs_run, ppc_get_pc)
3767 (ppc_set_pc, ppc_get_hwcap): Adjust.
3768 (ppc_usrregs_info): Forward declare.
3769 (!__powerpc64__) ppc_regmap_adjusted: New global.
3770 (ppc_arch_setup): Adjust to the current process'es target
3771 description.
3772 (ppc_fill_vsxregset, ppc_store_vsxregset, ppc_fill_vrregset)
3773 (ppc_store_vrregset, ppc_fill_evrregset, ppc_store_evrregse)
3774 (ppc_store_evrregset): Adjust.
3775 (target_regsets): Rename to ...
3776 (ppc_regsets): ... this, and make static.
3777 (ppc_usrregs_info, ppc_regsets_info, regs_info): New globals.
3778 (ppc_regs_info): New function.
3779 (the_low_target): Adjust.
3780 (initialize_low_arch): New function.
3781 * linux-s390-low.c (tdesc_s390_linux32, tdesc_s390_linux32v1)
3782 (tdesc_s390_linux32v2, tdesc_s390_linux64, tdesc_s390_linux64v1)
3783 (tdesc_s390_linux64v2, tdesc_s390x_linux64, tdesc_s390x_linux64v1)
3784 (tdesc_s390x_linux64v2): Declare.
3785 (s390_collect_ptrace_register, s390_supply_ptrace_register)
3786 (s390_fill_gregset, s390_store_last_break): Adjust.
3787 (target_regsets): Rename to ...
3788 (s390_regsets): ... this, and make static.
3789 (s390_get_pc, s390_set_pc): Adjust.
3790 (s390_get_hwcap): New target_desc parameter, and use it.
3791 [__s390x__] (have_hwcap_s390_high_gprs): New global.
3792 (s390_arch_setup): Adjust to set the current process'es target
3793 description. Don't adjust the regmap.
3794 (s390_usrregs_info, s390_regsets_info, regs_info): New globals.
3795 [__s390x__] (s390_usrregs_info_3264, s390_regsets_info_3264)
3796 (regs_info_3264): New globals.
3797 (s390_regs_info): New function.
3798 (the_low_target): Adjust.
3799 (initialize_low_arch): New function.
3800 * linux-mips-low.c (tdesc_mips_linux, tdesc_mips_dsp_linux)
3801 (tdesc_mips64_linux, tdesc_mips64_dsp_linux): Declare.
3802 [__mips64] (init_registers_mips_linux)
3803 (init_registers_mips_dsp_linux): Delete defines.
3804 [__mips64] (tdesc_mips_linux, tdesc_mips_dsp_linux): New defines.
3805 (have_dsp): New global.
3806 (mips_read_description): New, based on mips_arch_setup.
3807 (mips_arch_setup): Reimplement.
3808 (get_usrregs_info): New function.
3809 (mips_cannot_fetch_register, mips_cannot_store_register)
3810 (mips_get_pc, mips_set_pc, mips_fill_gregset, mips_store_gregset)
3811 (mips_fill_fpregset, mips_store_fpregset): Adjust.
3812 (target_regsets): Rename to ...
3813 (mips_regsets): ... this, and make static.
3814 (mips_regsets_info, mips_dsp_usrregs_info, mips_usrregs_info)
3815 (dsp_regs_info, regs_info): New globals.
3816 (mips_regs_info): New function.
3817 (the_low_target): Adjust.
3818 (initialize_low_arch): New function.
3819 * linux-arm-low.c (tdesc_arm, tdesc_arm_with_iwmmxt)
3820 (tdesc_arm_with_vfpv2, tdesc_arm_with_vfpv3, tdesc_arm_with_neon):
3821 Declare.
3822 (arm_fill_vfpregset, arm_store_vfpregset): Adjust.
3823 (arm_read_description): New, with bits factored from
3824 arm_arch_setup.
3825 (arm_arch_setup): Reimplement.
3826 (target_regsets): Rename to ...
3827 (arm_regsets): ... this, and make static.
3828 (arm_regsets_info, arm_usrregs_info, regs_info): New globals.
3829 (arm_regs_info): New function.
3830 (the_low_target): Adjust.
3831 (initialize_low_arch): New function.
3832 * linux-m68k-low.c (tdesc_m68k): Declare.
3833 (target_regsets): Rename to ...
3834 (m68k_regsets): ... this, and make static.
3835 (m68k_regsets_info, m68k_usrregs_info, regs_info): New globals.
3836 (m68k_regs_info): New function.
3837 (m68k_arch_setup): New function.
3838 (the_low_target): Adjust.
3839 (initialize_low_arch): New function.
3840 * linux-sh-low.c (tdesc_sharch): Declare.
3841 (target_regsets): Rename to ...
3842 (sh_regsets): ... this, and make static.
3843 (sh_regsets_info, sh_usrregs_info, regs_info): New globals.
3844 (sh_regs_info, sh_arch_setup): New functions.
3845 (the_low_target): Adjust.
3846 (initialize_low_arch): New function.
3847 * linux-bfin-low.c (tdesc_bfin): Declare.
3848 (bfin_arch_setup): New function.
3849 (bfin_usrregs_info, regs_info): New globals.
3850 (bfin_regs_info): New function.
3851 (the_low_target): Adjust.
3852 (initialize_low_arch): New function.
3853 * linux-cris-low.c (tdesc_cris): Declare.
3854 (cris_arch_setup): New function.
3855 (cris_usrregs_info, regs_info): New globals.
3856 (cris_regs_info): New function.
3857 (the_low_target): Adjust.
3858 (initialize_low_arch): New function.
3859 * linux-cris-low.c (tdesc_crisv32): Declare.
3860 (cris_arch_setup): New function.
3861 (cris_regsets_info, cris_usrregs_info, regs_info): New globals.
3862 (cris_regs_info): New function.
3863 (the_low_target): Adjust.
3864 (initialize_low_arch): New function.
3865 * linux-m32r-low.c (tdesc_m32r): Declare.
3866 (m32r_arch_setup): New function.
3867 (m32r_usrregs_info, regs_info): New globals.
3868 (m32r_regs_info): Adjust.
3869 (initialize_low_arch): New function.
3870 * linux-tic6x-low.c (tdesc_tic6x_c64xp_linux)
3871 (tdesc_tic6x_c64x_linux, tdesc_tic6x_c62x_linux): Declare.
3872 (tic6x_usrregs_info): Forward declare.
3873 (tic6x_read_description): New function, based on ...
3874 (tic6x_arch_setup): ... this. Reimplement.
3875 (target_regsets): Rename to ...
3876 (tic6x_regsets): ... this, and make static.
3877 (tic6x_regsets_info, tic6x_usrregs_info, regs_info): New globals.
3878 (tic6x_regs_info): New function.
3879 (the_low_target): Adjust.
3880 (initialize_low_arch): New function.
3881 * linux-xtensa-low.c (tdesc_xtensa): Declare.
3882 (xtensa_fill_gregset, xtensa_store_gregset): Adjust.
3883 (target_regsets): Rename to ...
3884 (xtensa_regsets): ... this, and make static.
3885 (xtensa_regsets_info, xtensa_usrregs_info, regs_info): New
3886 globals.
3887 (xtensa_arch_setup, xtensa_regs_info): New functions.
3888 (the_low_target): Adjust.
3889 (initialize_low_arch): New function.
3890 * linux-nios2-low.c (tdesc_nios2_linux): Declare.
3891 (nios2_arch_setup): Set the current process'es tdesc.
3892 (target_regsets): Rename to ...
3893 (nios2_regsets): ... this.
3894 (nios2_regsets_info, nios2_usrregs_info, regs_info): New globals.
3895 (nios2_regs_info): New function.
3896 (the_low_target): Adjust.
3897 (initialize_low_arch): New function.
a261b8f5
PA
3898 * linux-aarch64-low.c (tdesc_aarch64): Declare.
3899 (aarch64_arch_setup): Set the current process'es tdesc.
3900 (target_regsets): Rename to ...
3901 (aarch64_regsets): ... this.
3902 (aarch64_regsets_info, aarch64_usrregs_info, regs_info): New globals.
3903 (aarch64_regs_info): New function.
3904 (the_low_target): Adjust.
3905 (initialize_low_arch): New function.
3aee8918
PA
3906 * linux-tile-low.c (tdesc_tilegx, tdesc_tilegx32): Declare
3907 globals.
3908 (target_regsets): Rename to ...
3909 (tile_regsets): ... this.
3910 (tile_regsets_info, tile_usrregs_info, regs_info): New globals.
3911 (tile_regs_info): New function.
3912 (tile_arch_setup): Set the current process'es tdesc.
3913 (the_low_target): Adjust.
3914 (initialize_low_arch): New function.
3915 * spu-low.c (tdesc_spu): Declare.
3916 (spu_create_inferior, spu_attach): Set the new process'es tdesc.
3917 * win32-arm-low.c (tdesc_arm): Declare.
3918 (arm_arch_setup): New function.
3919 (the_low_target): Install arm_arch_setup instead of
3920 init_registers_arm.
3921 * win32-i386-low.c (tdesc_i386, tdesc_amd64): Declare.
3922 (init_windows_x86): Rename to ...
3923 (i386_arch_setup): ... this. Set `win32_tdesc'.
3924 (the_low_target): Adjust.
3925 * win32-low.c (win32_tdesc): New global.
3926 (child_add_thread): Don't create the thread cache here.
3927 (do_initial_child_stuff): Set the new process'es tdesc.
3928 * win32-low.h (struct target_desc): Forward declare.
3929 (win32_tdesc): Declare.
3930 * lynx-i386-low.c (tdesc_i386): Declare global.
3931 (lynx_i386_arch_setup): Set `lynx_tdesc'.
3932 * lynx-low.c (lynx_tdesc): New global.
3933 (lynx_add_process): Set the new process'es tdesc.
3934 * lynx-low.h (struct target_desc): Forward declare.
3935 (lynx_tdesc): Declare global.
3936 * lynx-ppc-low.c (tdesc_powerpc_32): Declare global.
3937 (lynx_ppc_arch_setup): Set `lynx_tdesc'.
3938 * nto-low.c (nto_tdesc): New global.
3939 (do_attach): Set the new process'es tdesc.
3940 * nto-low.h (struct target_desc): Forward declare.
3941 (nto_tdesc): Declare.
3942 * nto-x86-low.c (tdesc_i386): Declare.
3943 (nto_x86_arch_setup): Set `nto_tdesc'.
3944
b1fbec62
GB
39452013-06-04 Gary Benson <gbenson@redhat.com>
3946
3947 * server.c (handle_query): Add "augmented-libraries-svr4-read+"
3948 to qSupported response when appropriate.
3949 (handle_qxfer_libraries_svr4): Allow qXfer:libraries-svr4:read
3950 with nonzero-length annex.
3951 * linux-low.c (linux_qxfer_libraries_svr4): Parse and handle
3952 arguments supplied in annex.
3953
d1ec4ce7
DE
39542013-05-31 Doug Evans <dje@google.com>
3955
ac44adcb 3956 PR server/15594
d1ec4ce7
DE
3957 * linux-x86-low.c (ps_get_thread_area): Properly extend address to
3958 64 bits in 64-cross-32 environment.
3959
9b25f2d3
PA
39602013-05-28 Pedro Alves <palves@redhat.com>
3961
3962 * Makefile.in (clean): Remove reference to aarch64-without-fpu.c.
3963 (aarch64-without-fpu.c): Delete rule.
3964 * configure.srv (aarch64*-*-linux*): Remove references to
3965 aarch64-without-fpu.o and aarch64-without-fpu.xml.
3966 * linux-aarch64-low.c (init_registers_aarch64_without_fpu): Remove
3967 declaration.
3968
6740dc9c
PA
39692013-05-24 Pedro Alves <palves@redhat.com>
3970
3971 * server.c (handle_v_cont) <vCont;r>: Use unpack_varlen_hex
3972 instead of strchr/decode_address. Error if the range isn't split
3973 with a ','. Don't assume there's be a ':' in the action.
3974
c2d6af84
PA
39752013-05-23 Yao Qi <yao@codesourcery.com>
3976 Pedro Alves <palves@redhat.com>
3977
3978 * linux-low.c (lwp_in_step_range): New function.
3979 (linux_wait_1): If the thread was range stepping and stopped
3980 outside the stepping range, report the stop to GDB. Otherwise,
3981 continue stepping. Add range stepping debug output.
3982 (linux_set_resume_request): Copy the step range from the resume
3983 request to the lwp.
3984 (linux_supports_range_stepping): New.
3985 (linux_target_ops) <supports_range_stepping>: Set to
3986 linux_supports_range_stepping.
3987 * linux-low.h (struct linux_target_ops)
3988 <supports_range_stepping>: New field.
3989 (struct lwp_info) <step_range_start, step_range_end>: New fields.
3990 * linux-x86-low.c (x86_supports_range_stepping): New.
3991 (the_low_target) <supports_range_stepping>: Set to
3992 x86_supports_range_stepping.
3993 * server.c (handle_v_cont): Handle 'r' action.
3994 (handle_v_requests): Append ";r" if the target supports range
3995 stepping.
3996 * target.h (struct thread_resume) <step_range_start,
3997 step_range_end>: New fields.
3998 (struct target_ops) <supports_range_stepping>:
3999 New field.
4000 (target_supports_range_stepping): New macro.
4001
58794e1a
JB
40022013-05-17 Joel Brobecker <brobecker@adacore.com>
4003
4004 * lynx-low.c (lynx_resume): Fix null_ptid/minus_one_ptid
4005 confusion in comment.
4006
d631c5a7
JB
40072013-05-17 Joel Brobecker <brobecker@adacore.com>
4008
4009 * lynx-low.c (struct process_info_private): New type.
4010 (lynx_add_process): New function.
4011 (lynx_create_inferior, lynx_attach): Replace calls to
4012 add_process by calls to lynx_add_process.
4013 (lynx_resume): If PTID is null, then try using
4014 current_process()->private->last_wait_event_ptid.
4015 Add comments.
4016 (lynx_clear_inferiors): Delete. The contents of that function
4017 has been inlined in lynx_mourn;
4018 (lynx_wait_1): Save the ptid in the process's private data.
4019 (lynx_mourn): Free the process' private data. Replace call
4020 to lynx_clear_inferiors by call to clear_inferiors.
4021
96f7a20f
YQ
40222013-05-17 Yao Qi <yao@codesourcery.com>
4023
4024 * i386-low.c (i386_length_and_rw_bits): Move the comment to
4025 the right place.
4026
db0dfaa0
LM
40272013-05-16 Luis Machado <lgustavo@codesourcery.com>
4028
4029 * linux-low.c: Move definition checks upwards for PT_TEXT_ADDR,
4030 PT_DATA_ADDR and PT_TEXT_END_ADDR. Update comments.
4031 (linux_read_offsets): Remove PT_TEXT_ADDR, PT_DATA_ADDR and
4032 PT_TEXT_END_ADDR guards. Update comments.
4033 (linux_target_op) <read_offsets>: Conditionally define to
4034 linux_read_offsets if the target is UCLIBC and if it defines
4035 PT_TEXT_ADDR, PT_DATA_ADDR and PT_TEXT_END_ADDR.
4036
68f5f838
SL
40372013-05-06 Sandra Loosemore <sandra@codesourcery.com>
4038 Andrew Jenner <andrew@codesourcery.com>
4039
4040 * Makefile.in (SFILES): Add linux-nios2-low.c.
4041 (clean): Add action to delete nios2-linux.c.
4042 (nios2-linux.c): New rule.
4043 * configure.srv: Add nios2*-*-linux*.
4044 * linux-nios2-low.c: New.
4045
1ebff1fd
HAQ
40462013-05-03 Hafiz Abid Qadeer <abidh@codesourcery.com>
4047
4048 * tracepoint.c (cmd_qtinit): Call 'stop_tracing'.
4049
f6150862
HZ
40502013-04-25 Hui Zhu <hui@codesourcery.com>
4051
4052 PR gdb/15186
f6150862
HZ
4053 * ax.c (ax_printf): Add fflush.
4054
614c279d
TT
40552013-04-22 Tom Tromey <tromey@redhat.com>
4056
4057 * Makefile.in (SFILES): Add filestuff.c.
4058 (OBS): Add filestuff.o.
4059 (filestuff.o): New target.
4060 * config.in, configure: Rebuild.
4061 * configure.ac: Check for fdwalk, pipe2.
4062
7d4e5717
PA
40632013-04-17 Pedro Alves <palves@redhat.com>
4064
4065 * configure.ac (USE_THREAD_DB): Delete variable.
4066 (if test "$srv_linux_thread_db" = "yes"): AC_DEFINE USE_THREAD_DB.
4067 Don't AC_SUBST USE_THREAD_DB.
4068 * Makefile.in (INTERNAL_CFLAGS): Remove @USE_THREAD_DB@.
4069 * config.in, configure: Regenerate.
4070
d5c93e41
PA
40712013-04-16 Pedro Alves <palves@redhat.com>
4072
4073 * linux-low.h (struct lwp_info) <thread_known>: Move under
4074 the USE_THREAD_DB #ifdef.
4075
04f5fe89
PA
40762013-04-16 Pedro Alves <palves@redhat.com>
4077
4078 * Makefile.in (INTERNAL_CFLAGS): Add @USE_THREAD_DB@.
4079 (linux-low.o): Delete rule.
4080 * linux-low.h: Always include "gdb_thread_db.h" instead of
4081 conditionally including thread_db.h.
4082 (struct lwp_info) <th>: Guard with #ifdef USE_THREAD_DB instead of
4083 HAVE_THREAD_DB_H.
4084
480b27bf
JK
40852013-04-07 Jan Kratochvil <jan.kratochvil@redhat.com>
4086
4087 * Makefile.in (install-only): Fix make install regression.
4088
43662968
JK
40892013-04-05 Jan Kratochvil <jan.kratochvil@redhat.com>
4090
4091 Convert man pages to texinfo, new gdbinit.5 texinfo page.
4092 * Makefile.in (install-only): Remove $(man1dir) and gdbserver.1
4093 installation.
4094 * gdbserver.1: Remove.
4095
3e74e146
PA
40962013-03-22 Pedro Alves <palves@redhat.com>
4097
4098 * linux-low.c (handle_extended_wait): Don't call
4099 linux_enable_event_reporting.
4100
a8347a2a
TT
41012013-03-15 Tony Theodore <tonyt@logyst.com>
4102
4103 PR build/9098:
4104 * Makefile.in (SHELL): Use @SHELL@.
4105
eeb56fa7
SDJ
41062013-03-14 Sergio Durigan Junior <sergiodj@redhat.com>
4107
4108 * tracepoint.c (cmd_qtv): Initialize `val' with zero, silencing
4109 compiler warning.
4110
4fa7e2ff
JB
41112013-03-13 Joel Brobecker <brobecker@adacore.com>
4112
4113 * linux-low.c (linux_target_ops) [!HAVE_LINUX_BTRACE]:
4114 Remove extraneous NULL element.
4115
8ddb1965
YQ
41162013-03-13 Yao Qi <yao@codesourcery.com>
4117
4118 * tracepoint.c (traceframe_read_tsv): Look for the last matched
4119 'V' block in trace frame.
4120
9accd112
MM
41212013-03-11 Markus Metzger <markus.t.metzger@intel.com>
4122
4123 * target.h (struct target_ops): Add btrace ops.
4124 (target_supports_btrace): New macro.
4125 (target_enable_btrace): New macro.
4126 (target_disable_btrace): New macro.
4127 (target_read_btrace): New macro.
4128 * gdbthread.h (struct thread_info): Add btrace field.
4129 * server.c: Include btrace-common.h.
4130 (handle_btrace_general_set): New function.
4131 (handle_btrace_enable): New function.
4132 (handle_btrace_disable): New function.
4133 (handle_general_set): Call handle_btrace_general_set.
4134 (handle_qxfer_btrace): New function.
4135 (struct qxfer qxfer_packets[]): Add btrace entry.
4136 * inferiors.c (remove_thread): Disable btrace.
4137 * linux-low: Include linux-btrace.h.
4138 (linux_low_enable_btrace): New function.
4139 (linux_low_read_btrace): New function.
4140 (linux_target_ops): Add btrace ops.
4141 * configure.srv (i[34567]86-*-linux*): Add linux-btrace.o.
4142 Add srv_linux_btrace=yes.
4143 (x86_64-*-linux*): Add linux-btrace.o.
4144 Add srv_linux_btrace=yes.
4145 * configure.ac: Define HAVE_LINUX_BTRACE.
4146 * config.in: Regenerated.
4147 * configure: Regenerated.
4148
5cc22e4c
MM
41492013-03-11 Markus Metzger <markus.t.metzger@intel.com>
4150
4151 * server.c (handle_qxfer): Preserve error message if -3 is
4152 returned.
4153 (qxfer): Document the -3 return value.
4154
7c97f91e
MM
41552013-03-11 Markus Metzger <markus.t.metzger@intel.com>
4156
4157 * Makefile.in (SFILES): Add $(srcdir)/common/linux-btrace.c.
4158 (linux_btrace_h): New variable.
4159 (linux-btrace.o): New rule.
4160
be9a119c 41612013-03-08 Stan Shebs <stan@codesourcery.com>
f6f899bf
HAQ
4162 Hafiz Abid Qadeer <abidh@codesourcery.com>
4163
4164 * tracepoint.c (trace_buffer_size): New global.
4165 (DEFAULT_TRACE_BUFFER_SIZE): New define.
4166 (init_trace_buffer): Change to one-argument function. Allocate
4167 trace buffer memory.
4168 (handle_tracepoint_general_set): Call cmd_bigqtbuffer_size to
4169 handle QTBuffer:size packet.
4170 (cmd_bigqtbuffer_size): New function.
4171 (initialize_tracepoint): Call init_trace_buffer with
4172 DEFAULT_TRACE_BUFFER_SIZE.
4173 * server.c (handle_query): Add QTBuffer:size in the
4174 supported packets.
4175
e64f7499
YQ
41762013-03-07 Yao Qi <yao@codesourcery.com>
4177
4178 * tracepoint.c (cur_action, cur_step_action): Make them unsigned.
4179 (cmd_qtfp): Initialize cur_action and cur_step_action 0 instead
4180 of -1.
4181 (cmd_qtsp): Adjust condition. Do post increment.
4182 Set cur_action and cur_step_action back to 0.
4183
f0ae6fc3
PA
41842013-03-07 Jeremy Bennett <jeremy.bennett@embecosm.com>
4185
4186 PR server/15236
4187 * linux-low.c (linux_write_memory): Return early success if LEN is
4188 zero.
4189
b5b0b0af
CV
41902013-03-05 Corinna Vinschen <vinschen@redhat.de>
4191
334ad4a8 4192 * configure.srv: Add x86_64-*-cygwin* as target.
b5b0b0af 4193
589bc927
TT
41942013-02-28 Tom Tromey <tromey@redhat.com>
4195
4196 * configure.ac: Invoke AC_SYS_LARGEFILE.
4197 * configure, config.in: Rebuild.
4198
dfe07582
CV
41992013-02-28 Corinna Vinschen <vinschen@redhat.com>
4200
4201 * win32-low.c: Throughout, fix format strings and casts of
4202 printf-like functions to avoid type related warnings on all
4203 platforms.
4204 (get_child_debug_event): Print dwDebugEventCode as hex since
4205 that's how it's usually documented.
4206
736cd585
YQ
42072013-02-28 Yao Qi <yao@codesourcery.com>
4208
4209 * tracepoint.c (cmd_qtbuffer): Call phex_nz instead of
4210 pulongest.
4211
e1f58301
JW
42122013-02-27 Jiong Wang <jiwang@tilera.com>
4213
4214 * Makefile.in (clean): Remove reg-tilegx.c, reg-tilegx32.c.
4215 (reg-tilegx32.c): New rule.
4216 * configure.srv (tilegx-*-linux*): Add reg-tilegx32.o to srv_regobj.
4217 * linux-tile-low.c (tile_arch_setup): New function. Invoke
4218 different register info initializer according to elf class.
4219 (init_registers_tilgx32): New function. The tilegx32 register info
4220 initializer.
4221 (tile_fill_gregset): Use "uint_reg_t" to represent register size.
4222 (tile_store_gregset): Likewise.
4223
d171ca78
YQ
42242013-02-27 Yao Qi <yao@codesourcery.com>
4225
4226 * server.c (process_point_options): Print debug message when
4227 debug_threads is true.
4228
282bbdf3
YQ
42292013-02-26 Yao Qi <yao@codesourcery.com>
4230
4231 * tracepoint.c (cmd_qtbuffer): Don't set '\0' in OWN_BUF.
4232
aca22551
PA
42332013-02-19 Pedro Alves <palves@redhat.com>
4234 Kai Tietz <ktietz@redhat.com>
4235
4236 PR gdb/15161
4237
4238 * server.c (handle_query) <CRC check>: Use unpack_varlen_hex
4239 instead of strtoul to extract address from packet.
4240 (process_serial_event) <'z'>: Likewise.
4241
4f3cee1c
YQ
42422013-02-18 Yao Qi <yao@codesourcery.com>
4243
4244 * linux-bfin-low.c (the_low_target): Use NULL instead of 0.
4245
8e1d55a3
PA
42462013-02-14 Pedro Alves <palves@redhat.com>
4247
4248 Plug memory leak.
4249
4250 * tracepoint.c (cmd_qtnotes): Free TRACING_USER_NAME,
4251 TRACING_NOTES and TRACING_STOP_NOTE before clobbering.
4252
458820da
PA
42532013-02-14 Pedro Alves <palves@redhat.com>
4254
4255 * tracepoint.c (cmd_qtdpsrc): Use savestring.
4256
baea0dae
PA
42572013-02-14 Pedro Alves <palves@redhat.com>
4258
4259 * tracepoint.c (save_string): Delete.
4260 (add_tracepoint_action): Use savestring instead of save_string.
4261
0b1afbb3
PA
42622013-02-12 Pedro Alves <palves@redhat.com>
4263
4264 * linux-xtensa-low.c: Ditto.
4265 * xtensa-xtregs.c: Ditto.
4266
8a4ac37e
PA
42672013-02-12 Sanimir Agovic <sanimir.agovic@intel.com>
4268
4269 * thread-db.c (thread_db_get_tls_address): NULL pointer check
4270 thread_db.
4271
148de6bb
MS
42722013-02-07 Marcus Shawcroft <marcus.shawcroft@arm.com>
4273
4274 * linux-aarch64-low.c (aarch64_arch_setup): Clamp
4275 aarch64_num_wp_regs and aarch64_num_bp_regs to
4276 AARCH64_HWP_MAX_NUM and AARCH64_HBP_MAX_NUM respectively.
4277
55fac6e0
MS
42782013-02-07 Marcus Shawcroft <marcus.shawcroft@arm.com>
4279
4280 * linux-aarch64-low.c (ps_get_thread_area): Replace
4281 PTRACE_GET_THREAD_AREA with PTRACE_GETREGSET.
4282
176eb98c
MS
42832013-02-04 Jim MacArthur <jim.macarthur@arm.com>
4284 Marcus Shawcroft <marcus.shawcroft@arm.com>
4285 Nigel Stephens <nigel.stephens@arm.com>
4286 Yufeng Zhang <yufeng.zhang@arm.com>
4287
4288 * Makefile.in (clean): Remove aarch64.c and aarch64-without-fpu.c.
4289 (aarch64.c, aarch64-without-fpu.c): New targets.
4290 * configure.srv (aarch64*-*-linux*): New.
4291 * linux-aarch64-low.c: New file.
4292
56f7af9c
MS
42932013-02-04 Marcus Shawcroft <marcus.shawcroft@arm.com>
4294
43aaf8b6 4295 * linux-low.c (handle_extended_wait, linux_create_inferior)
56f7af9c
MS
4296 (linux_attach_lwp_1, linux_kill_one_lwp, linux_attach_one_lwp)
4297 (dequeue_one_deferred_signal, linux_resume_one_thread)
4298 (fetch_register, linux_write_memory, linux_enable_event_reporting)
4299 (linux_tracefork_grandchild, linux_test_for_tracefork)
4300 (linux_read_offsets, linux_xfer_siginfo, linux_xfer_siginfo): Add
4301 PTRACE_ARG3_TYPE and PTRACE_ARG4_TYPE cast to ptrace arguments
4302 where the argument is 0.
4303
60f662b0
YQ
43042013-01-25 Yao Qi <yao@codesourcery.com>
4305
4306 * event-loop.c: Include "queue.h".
4307 (gdb_event_p): New typedef.
4308 (struct gdb_event) <next_event>: Remove.
4309 (event_queue): Change to QUEUE(gdb_event_p).
4310 (async_queue_event): Remove.
4311 (gdb_event_xfree): New.
4312 (initialize_event_loop): New.
4313 (process_event): Use API from QUEUE.
4314 (wait_for_event): Likewise.
4315 * server.c (main): Call initialize_event_loop.
4316 * server.h (initialize_event_loop): Declare.
4317
5ae4861a
YQ
43182013-01-18 Yao Qi <yao@codesourcery.com>
4319
4320 * ax.h (struct eval_agent_expr_context): New.
4321 (gdb_eval_agent_expr): Update declaration.
4322 * ax.c (gdb_eval_agent_expr): Remove argument REGCACHE and
4323 TFRAME. Add new argument CTX.
4324 * server.h (struct eval_agent_expr_context): Declare.
4325 (agent_mem_read, agent_tsv_read): Update declaration.
4326 (agent_mem_read_string): Likewise.
4327 * tracepoint.c (eval_tracepoint_agent_expr): Remove.
4328 (add_traceframe_block): Add new argument TPOINT.
4329 Increase TPOINT->traceframe_usage.
4330 (do_action_at_tracepoint): Call gdb_eval_agent_expr instead of
4331 eval_tracepoint_agent_expr.
4332 (condition_true_at_tracepoint): Likewise.
4333 (agent_mem_read): Remove argument TFRAME. Add argument CTX.
4334 (agent_mem_read_string, agent_tsv_read): Likewise.
4335
85e00e85
YQ
43362013-01-16 Yao Qi <yao@codesourcery.com>
4337
4338 * linux-low.c (linux_resume_one_lwp): Don't check
4339 'lwp->bp_reinsert != 0'.
4340
4039cf45
JB
43412013-01-07 Joel Brobecker <brobecker@adacore.com>
4342 Pedro Alves <palves@redhat.com>
4343
4344 * lynx-low.c (ptrace_request_to_str): Define a temporary
4345 macro and use it to simplify this function's implementation.
4346
9044dee2
JB
43472013-01-07 Joel Brobecker <brobecker@adacore.com>
4348
4349 * lynx-low.c (lynx_resume): Call perror_with_name if lynx_ptrace
4350 sets errno.
4351
e6352c8f
JB
43522013-01-07 Joel Brobecker <brobecker@adacore.com>
4353
4354 * configure.srv (i[34567]86-*-lynxos*): Set srv_xmlfiles.
4355
50681a27
JB
43562013-01-07 Joel Brobecker <brobecker@adacore.com>
4357
4358 * configure.srv (powerpc-*-lynxos*): Set srv_xmlfiles.
4359
3f6e77ef
JB
43602013-01-07 Joel Brobecker <brobecker@adacore.com>
4361
4362 * lynx-low.c (lynx_resume): Use the resume_info parameter
4363 to determine the ptid for the lynx_ptrace call, unless
4364 it is equal to minus_one_ptid, in which case we use the
4365 ptid of the current_inferior.
4366 (lynx_wait_1): After having received a thread create/exit
4367 event, resume the inferior's execution using the signaling
4368 thread's ptid, rather than the old ptid.
4369
7fda33ae
JB
43702013-01-07 Joel Brobecker <brobecker@adacore.com>
4371
4372 * lynx-low.c (lynx_resume): Delete variable ret.
4373
b9786c74
JB
43742013-01-01 Joel Brobecker <brobecker@adacore.com>
4375
4376 * gdbreplay.c (gdbreplay_version): Update copyright year.
4377 * server.c (gdbserver_version): Likewise.
4378
8b93d60f
JB
43792012-12-17 Joel Brobecker <brobecker@adacore.com>
4380
4381 * lynx-low.c (lynx_wait_1): Add debug trace before adding
4382 new thread.
4383
037335a7
JB
43842012-12-17 Joel Brobecker <brobecker@adacore.com>
4385
4386 * lynx-low.c (ptrace_request_to_str): Add handling for
4387 PTRACE_GETTRACESIG.
4388
52d4cbd8
JB
43892012-12-17 Joel Brobecker <brobecker@adacore.com>
4390
4391 * lynx-low.c (lynx_attach): Delete variable new_process.
4392
ab8f6ca9
JB
43932012-12-17 Joel Brobecker <brobecker@adacore.com>
4394
4395 * lynx-low.c (lynx_create_inferior): Delete variable
4396 new_process.
4397
78cbc024
JB
43982012-12-17 Joel Brobecker <brobecker@adacore.com>
4399
4400 * lynx-low.c (ptrace_request_to_str): Do not handle
4401 PTRACE_GETTHREADLIST if this macro does not exist.
4402
14a00470
YQ
44032012-12-15 Yao Qi <yao@codesourcery.com>
4404
4405 * Makefile.in (OBS): Add notif.o.
4406 * notif.c, notif.h: New.
4407 * server.c: Include "notif.h".
4408 (struct vstop_notif) <next>: Remove.
4409 <base>: New field.
4410 (queue_stop_reply): Update.
4411 (push_event, send_next_stop_reply): Remove.
4412 (discard_queued_stop_replies): Update.
4413 (notif_stop): New variable.
4414 (handle_v_stopped): Remove.
4415 (handle_v_requests): Don't call handle_v_stopped. Call
4416 handle_ack_notif instead.
4417 (queue_stop_reply_callback): Call notif_event_enque instead
4418 of queue_stop_reply.
4419 (handle_status): Don't call send_next_stop_reply, call
4420 notif_write_event instead.
4421 (kill_inferior_callback): Likewise.
4422 (detach_or_kill_inferior_callback): Likewise.
4423 (main): Call initialize_notif.
4424 (process_serial_event): Call QUEUE_is_empty.
4425 (handle_target_event): Call notif_push instead of push event.
4426 * server.h (push_event): Remove declaration.
4427
61c125b9
TT
44282012-12-10 Tom Tromey <tromey@redhat.com>
4429
4430 * Makefile.in (DEPMODE, DEPDIR, depcomp, COMPILE.pre)
4431 (COMPILE.post, COMPILE, POSTCOMPILE, IPAGENT_COMPILE): New
4432 macros.
4433 (.c.o): Rewrite.
4434 (ax-ipa.o, tracepoint-ipa.o, utils-ipa.o, format-ipa.o)
4435 (common-utils-ipa.o, remote-utils-ipa.o, regcache-ipa.o)
4436 (i386-linux-ipa.o, linux-i386-ipa.o, linux-amd64-ipa.o)
4437 (amd64-linux-ipa.o, ax.o): Rewrite.
4438 (event-loop.o, hostio.o, hostio-errno.o, inferiors.o, mem-break.o)
4439 (proc-service.o, regcache.o, remote-utils.o, server.o, target.o)
4440 (thread-db.o, tracepoint.o, utils.o, gdbreplay.o, dll.o): Remove.
4441 (signals.o, linux-procfs.o, linux-ptrace.o, common-utils.o, vec.o)
4442 (gdb_vecs.o, xml-utils.o, linux-osdata.o, ptid.o, buffer.o)
4443 (format.o, agent.o, vasprintf.o, vsnprintf.o): Rewrite.
4444 (i386-low.o, i387-fp.o, linux-low.o, linux-arm-low.o)
4445 (linux-bfin-low.o, linux-cris-low.o, linux-crisv32-low.o)
4446 (linux-ia64-low.o, linux-m32r-low.o, linux-mips-low.o)
4447 (linux-ppc-low.o, linux-s390-low.o, linux-sh-low.o)
4448 (linux-tic6x-low.o, linux-x86-low.o, linux-xtensa-low.o)
4449 (linux-tile-low.o, lynx-low.o, lynx-ppc-low.o, nto-low.o)
4450 (nto-x86-low.o, linux-low.o, win32-low.o, win32-arm-low.o)
4451 (win32-i386-low.o, spu-low.o, reg-arm.o, arm-with-iwmmxt.o)
4452 (arm-with-vfpv2.o, arm-with-vfpv3.o, arm-with-neon.o, reg-bfin.o)
4453 (reg-cris.o, reg-crisv32.o, i386.o, i386-linux.o, i386-avx.o)
4454 (i386-avx-linux.o, i386-mmx.o, i386-mmx-linux.o, reg-ia64.o)
4455 (reg-m32r.o, reg-m68k.o, reg-cf.o, mips-linux.o, mips-dsp-linux.o)
4456 (mips64-linux.o, mips64-dsp-linux.o, powerpc-32.o, powerpc-32l.o)
4457 (powerpc-altivec32l.o, powerpc-cell32l.o, powerpc-vsx32l.o)
4458 (powerpc-isa205-32l.o, powerpc-isa205-altivec32l.o)
4459 (powerpc-isa205-vsx32l.o, powerpc-e500l.o, powerpc-64l.o)
4460 (powerpc-altivec64l.o, powerpc-cell64l.o, powerpc-vsx64l.o)
4461 (powerpc-isa205-64l.o, powerpc-isa205-altivec64l.o)
4462 (powerpc-isa205-vsx64l.o, s390-linux32.o, s390-linux32v1.o)
4463 (s390-linux32v2.o, s390-linux64.o, s390-linux64v1.o)
4464 (s390-linux64v2.o, s390x-linux64.o, s390x-linux64v1.o)
4465 (s390x-linux64v2.o, tic6x-c64xp-linux.o, tic6x-c64x-linux.o)
4466 (tic6x-c62x-linux.o, reg-sh.o, reg-sparc64.o, reg-spu.o, amd64.o)
4467 (amd64-linux.o, amd64-avx.o, amd64-avx-linux.o, x32.o)
4468 (x32-linux.o, x32-avx.o, x32-avx-linux.o, reg-xtensa.o)
4469 (reg-tilegx.o): Remove.
4470 (all_object_files): New macro.
4471 Include .deps files.
4472 * aclocal.m4, configure: Rebuild.
4473 * acinclude.m4: Include depstand.m4, lead-dot.m4.
4474 * configure.ac: Invoke ZW_CREATE_DEPDIR,
4475 ZW_PROG_COMPILER_DEPENDENCIES. Compute GMAKE condition.
4476
e90e9ad9
TT
44772012-12-05 Tom Tromey <tromey@redhat.com>
4478
4479 PR gdb/14917:
4480 * server.h (current_insn_ptr, emit_error): Declare 'extern'.
4481
02d403bf 44822012-11-28 Markus Metzger <markus.t.metzger@intel.com>
945bf713
MM
4483
4484 * configure.ac: Check for linux/perf_event.h.
4485 * config.in: Regenerated.
4486 * configure: Regenerated.
4487
0270a750
PA
44882012-11-26 Maxime Villard <rustyBSD@gmx.fr>
4489
4490 * hostio.c (handle_readlink): Decrease buffer size
4491 parameter passed to readlink by one byte.
4492
8c29b58e
YQ
44932012-11-26 Yao Qi <yao@codesourcery.com>
4494
4495 * configure.ac (build_warnings): Append '-Wempty-body'.
4496 * configure: Regenerated.
4497 * linux-low.c (linux_create_inferior): Use braces for empty 'if'
4498 body.
4499
8bdce1ff
PM
45002012-11-15 Pierre Muller <muller@sourceware.org>
4501
4502 * configure.ac (AC_CHECK_HEADERS): Add wait.h header.
4503 * config.in: Regenerate.
4504 * configure: Regenerate.
4505 * linux-low.c: Use "gdb_stat.h" header instead of <sys/stat.h> header.
4506 Use "gdb_wait.h" header instead of <sys/wait.h> header.
4507 * lynx-low.c: Use "gdb_wait.h" header instead of <sys/wait.h> header.
4508 * remote-utils.c: Use "gdb_stat.h" header instead of <sys/stat.h>
4509 header.
4510 * server.c: Remove HAVE_WAIT_H conditional. Use "gdb_wait.h" header
4511 instead of <sys/wait.h> header.
4512 * spu-low.c: Use "gdb_wait.h" header instead of <sys/wait.h> header.
4513
02d403bf 45142012-11-13 Markus Metzger <markus.t.metzger@intel.com>
3ba6ad0f
MM
4515
4516 * Makefile.in: (INTERNAL_CFLAGS): Add -DGDBSERVER
4517 (various make rules): Remove -DGDBSERVER
4518
fbd5db48
YQ
45192012-11-09 Yao Qi <yao@codesourcery.com>
4520
4521 * spu-low.c (current_ptid): Move it to ..
4522 * gdbthread.h: ... here. New.
4523 * remote-utils.c (read_ptid): Use macro 'current_ptid'.
4524 * server.c (myresume, process_serial_event): Likewise.
4525 * thread-db.c (thread_db_find_new_threads): Likewise.
4526 * tracepoint.c (run_inferior_command): Likewise.
4527
b3dc46ff
AB
45282012-10-01 Andrew Burgess <aburgess@broadcom.com>
4529
4530 * server.c (handle_search_memory_1): Include access length in
4531 warning message.
4532
07c04788
HPN
45332012-09-05 Michael Brandt <michael.brandt@axis.com>
4534
4535 * linux-crisv32-low.c: Fix compile errors.
4536
918d227b
YQ
45372012-09-04 Yao Qi <yao@codesourcery.com>
4538
4539 * tracepoint.c (cmd_qtsv): Adjust debug message.
4540 Don't check CUR_TPOINT.
4541
18c1b81a
YQ
45422012-08-28 Yao Qi <yao@codesourcery.com>
4543
4544 * ax.c, tracepoint.c: Replace ATTR_FORMAT with ATTRIBUTE_PRINTF.
4545 * server.h: Include 'libiberty.h' and 'ansidecl.h'.
4546 (ATTR_NORETURN, ATTR_FORMAT, ATTR_MALLOC): Remove.
4547 Remove declarations of xmalloc, xreallloc, xstrdup and
4548 freeargv.
4549 * Makefile.in (libiberty_h): New.
4550 (server_h): Append dependencies 'libiberty.h' and 'ansidecl.h'.
4551 (linux-bfin-low.o): Append dependency 'libiberty.h'.
4552
dc82f37b
YQ
45532012-08-23 Yao Qi <yao@codesourcery.com>
4554
4555 * server.h: Remove declaration of 'xsnprintf'.
4556
406b1477
KS
45572012-08-22 Keith Seitz <keiths@redhat.com>
4558
4559 * server.h: Include build-gnulib-gbserver/config.h.
4560 * gdbreplay.c: Likewise.
4561
e6712ff1
DE
45622012-08-08 Doug Evans <dje@google.com>
4563
4564 * Makefile.in (SFILES): Add gdb_vecs.c.
4565 (OBS): Add gdb_vecs.o.
4566 (gdb_vecs_h, host_defs_h): New variables.
4567 (thread-db.o): Add $(gdb_vecs_h) dependency.
4568 (gdb_vecs.o): New rule.
4569 * thread-db.c: #include "gdb_vecs.h".
4570 (thread_db_load_search): Use a vector to iterate over path elements.
4571 Handle text appearing after "$pdir".
4572
4573 * configure.ac: Add check for strstr.
4574 * config.in: Regenerate.
4575 * configure: Regenerate.
4576
7c3270ae
UW
45772012-08-02 Ulrich Weigand <ulrich.weigand@linaro.org>
4578
4579 * hostio.c (handle_pread): If pread fails, fall back to attempting
4580 lseek/read.
4581 (handle_pwrite): Likewise for pwrite.
4582
b62e2b27
UW
45832012-08-01 Ulrich Weigand <ulrich.weigand@linaro.org>
4584
4585 * linux-arm-low.c (arm_linux_hw_point_initialize): Distinguish
4586 between unsupported TYPE and unimplementable ADDR/LEN combination.
4587 (arm_insert_point): Act on new return value.
4588
78a99e91
PA
45892012-07-31 Pedro Alves <palves@redhat.com>
4590
4591 * server.c (process_point_options): Only skip tokens if we find
4592 one that is unrecognized. Don't treat 'X' specially while
4593 skipping unrecognized tokens.
4594
fcf303ab
UW
45952012-07-30 Ulrich Weigand <ulrich.weigand@linaro.org>
4596
4597 * linux-arm-low.c (arm_linux_hw_point_initialize): Do not attempt
4598 to 4-byte-align HW breakpoint addresses for Thumb.
4599
7255706c
YQ
46002012-07-27 Yao Qi <yao@codesourcery.com>
4601
4602 PR remote/14161.
4603
4604 * server.h: Declare gdb_agent_about_to_close.
4605 * target.c (kill_inferior): Include "agent.h".
4606 New. Send command 'kill'.
4607 * target.h (kill_inferior): Removed macro.
4608 * tracepoint.c (gdb_agent_about_to_close): New.
4609 (gdb_agent_helper_thread): Handle command 'close'.
4610 Wait endlessly until the inferior stops.
4611 Install gdb_agent_remove_socket to atexit hook.
4612 (agent_socket_name): New static variable.
4613 (gdb_agent_socket_init): Replace local variable 'name' with
4614 'agent_socket_name'.
4615 (gdb_agent_remove_socket): New.
4616
5a3f286f
YQ
46172012-07-27 Yao Qi <yao@codesourcery.com>
4618
4619 * server.c (process_point_options): Stop at 'X' when parsing.
4620
961bd387
ME
46212012-07-19 Michael Eager <eager@eagercon.com>
4622
a261b8f5 4623 * i386-low.c (Z_packet_to_hw_type): Add Z_PACKET_HW_BP, translate
961bd387
ME
4624 to hw_execute.
4625 * linux-x86-low.c (x86_insert_point, x86_remove_point):
4626 Call i386_low_insert_watchpoint, i386_low_remove_watchpoint to add/del
4627 hardware breakpoint.
4628
aa7c7447
JK
46292012-07-07 Jan Kratochvil <jan.kratochvil@redhat.com>
4630
4631 * gdbserver/linux-low.c (initialize_low): Call
4632 linux_ptrace_init_warnings.
4633
7f216e7c
DE
46342012-07-02 Doug Evans <dje@google.com>
4635
4636 * mem-break.c (gdb_no_commands_at_breakpoint): Fix cast from
4637 pointer to int.
4638
d3ce09f5
SS
46392012-07-02 Stan Shebs <stan@codesourcery.com>
4640
4641 * Makefile.in (WARN_CFLAGS_NO_FORMAT): Define.
4642 (ax.o): Add it to build rule.
4643 (ax-ipa.o): Ditto.
4644 (OBS): Add format.o.
4645 (IPA_OBS): Add format.o.
4646 * server.c (handle_query): Claim support for breakpoint commands.
4647 (process_point_options): Add command case.
4648 (process_serial_event): Leave running if there are printfs in
4649 effect.
4650 * mem-break.h (any_persistent_commands): Declare.
4651 (add_breakpoint_commands): Declare.
4652 (gdb_no_commands_at_breakpoint): Declare.
4653 (run_breakpoint_commands): Declare.
4654 * mem-break.c (struct point_command_list): New struct.
4655 (struct breakpoint): New field command_list.
4656 (any_persistent_commands): New function.
4657 (add_commands_to_breakpoint): New function.
4658 (add_breakpoint_commands): New function.
4659 (gdb_no_commands_at_breakpoint): New function.
4660 (run_breakpoint_commands): New function.
4661 * linux-low.c (linux_wait_1): Test for and run breakpoint commands
4662 locally.
4663 * ax.c: Include format.h.
4664 (ax_printf): New function.
4665 (gdb_eval_agent_expr): Add printf opcode.
4666
2f8f6aed
YQ
46672012-06-13 Yao Qi <yao@codesourcery.com>
4668
4669 * server.c (start_inferior): Remove duplicated writes to fields
4670 'last_resume_kind' and 'last_status' of 'current_inferior'.
4671
0c9070b3
YQ
46722012-06-12 Yao Qi <yao@codesourcery.com>
4673 Pedro Alves <palves@redhat.com>
4674
4675 * linux-low.c (linux_set_resume_request): Simplify predicate. Add
4676 comment.
4677 * server.c (handle_v_cont): Extend comment.
4678
c52daf70
YQ
46792012-06-11 Yao Qi <yao@codesourcery.com>
4680
4681 * linux-low.c (linux_attach): Add 'static'.
4682
d38bbb0a
YQ
46832012-06-06 Yao Qi <yao@codesourcery.com>
4684
4685 * ax.c (gdb_eval_agent_expr): Print `top' in hex.
4686
89dc0afd
JK
46872012-06-01 Jan Kratochvil <jan.kratochvil@redhat.com>
4688
4689 Fix gcc -flto compilation warning.
4690 * server.c (main): Make variable multi_mode and attach volatile.
4691
75f62ce7
TJB
46922012-05-30 Thiago Jung Bauermann <thiago.bauermann@linaro.org>
4693
4694 * linux-low.c (get_r_debug): Disable code using DT_MIPS_RLD_MAP
4695 if the platform doesn't know about it.
4696
65f479b6
PA
46972012-05-30 Jeff Kenton <jkenton@tilera.com>
4698
4699 * Makefile.in (SFILES): Add linux-tile-low.c.
4700 (linux-tile-low.o, reg-tilegx.o, reg-tilegx.c): New rules.
4701 * configure.srv: Handle tilegx-*-linux*.
4702 * linux-tile-low.c: New file.
4703
0c5bf5a9
JK
47042012-05-28 Jan Kratochvil <jan.kratochvil@redhat.com>
4705
4706 * linux-low.c (linux_qxfer_libraries_svr4): Return -1 if R_DEBUG is -1.
4707
a493e3e2
PA
47082012-05-24 Pedro Alves <palves@redhat.com>
4709
4710 PR gdb/7205
4711
43aaf8b6 4712 Replace TARGET_SIGNAL_ with GDB_SIGNAL_ throughout.
a493e3e2 4713
2ea28649
PA
47142012-05-24 Pedro Alves <palves@redhat.com>
4715
4716 PR gdb/7205
4717
4718 Replace target_signal with gdb_signal throughout.
4719
8d409d16
MR
47202012-05-22 Maciej W. Rozycki <macro@codesourcery.com>
4721
4722 * linux-low.c (linux_store_registers): Avoid the copying sequence
4723 when no data has been retrieved by ptrace.
4724
23512c01
MGD
47252012-05-22 Will Deacon <will.deacon@arm.com>
4726
4727 * linux-low (__UCLIBC__ && !(__UCLIBC_HAS_MMU__ || __ARCH_HAS_MMU__)):
4728 Include asm/ptrace.h.
4729 (PT_TEXT_ADDR, PT_DATA_ADDR, PT_TEXT_END_ADDR): Define only if not
4730 already defined.
4731
4934b29e
MR
47322012-05-21 Maciej W. Rozycki <macro@codesourcery.com>
4733
4734 * linux-low.c (linux_store_registers): Don't re-retrieve data
4735 with ptrace that has already been obtained from /proc. Always
4736 copy any data retrieved with ptrace to the buffer supplied.
4737
bde24c0a
PA
47382012-05-11 Yao Qi <yao@codesourcery.com>
4739 Pedro Alves <palves@redhat.com>
4740
4741 * linux-low.c (enum stopping_threads_kind): New.
4742 (stopping_threads): Change type to `enum stopping_threads_kind'.
4743 (handle_extended_wait): If stopping and suspending threads, leave
4744 the new_lwp suspended too.
4745 (linux_wait_for_event): Adjust.
4746 (stop_all_lwps): Set `stopping_threads' to
4747 STOPPING_AND_SUSPENDING_THREADS or STOPPING_THREADS depending on
4748 whether we're suspending threads or just stopping them. Assert no
4749 recursion happens.
4750
623b6bdf
YQ
47512012-04-29 Yao Qi <yao@codesourcery.com>
4752
4753 * server.h: Move some code to ...
4754 * gdbthread.h: ... here. New.
4755 * Makefile.in (inferiors.o, regcache.o): Depends on gdbthread.h
4756 (remote-utils.o, server.o, target.o tracepoint.o): Likewise.
4757 (nto-low.o, win32-low.o): Likewise.
4758 * inferiors.c, linux-low.h, nto-low.c: Include gdbthread.h.
4759 * regcache.c, remote-utils.c, server.c: Likewise.
4760 * target.c, tracepoint.c, win32-low.c: Likewise.
4761
f15f9948
TJB
47622012-04-24 Thiago Jung Bauermann <thiago.bauermann@linaro.org>
4763
4764 * linux-low.h (PTRACE_ARG3_TYPE): Move macro from linux-low.c.
4765 (PTRACE_ARG4_TYPE): Likewise.
4766 (PTRACE_XFER_TYPE): Likewise.
4767 * linux-arm-low.c (arm_prepare_to_resume): Cast third argument of
4768 ptrace to PTRACE_ARG3_TYPE.
4769 * linux-low.c (PTRACE_ARG3_TYPE): Move macro to linux-low.h.
4770 (PTRACE_ARG4_TYPE): Likewise.
4771 (PTRACE_XFER_TYPE): Likewise.
4772 (linux_detach_one_lwp): Cast fourth argument of
4773 ptrace to long then PTRACE_ARG4_TYPE.
4774 (regsets_fetch_inferior_registers): Cast third argument of
4775 ptrace to long then PTRACE_ARG3_TYPE.
4776 (regsets_store_inferior_registers): Likewise.
4777
38ea300a
PA
47782012-04-20 Pedro Alves <palves@redhat.com>
4779
4780 * configure: Regenerate.
4781
c971b7fa
PA
47822012-04-19 Pedro Alves <palves@redhat.com>
4783
43aaf8b6 4784 * Makefile.in (GNULIB_BUILDDIR): New.
c971b7fa 4785 (LIBGNU, INCGNU, GNULIB_H): Adjust.
43aaf8b6
PA
4786 (SUBDIRS, CLEANDIRS, REQUIRED_SUBDIRS): New.
4787 (all, install-only, uninstall, clean-info, all-lib, clean): No
4788 longer pass GNULIB_FLAGS_TO_PASS. Use subdir_do.
4789 (maintainer-clean realclean distclean): Use subdir_do.
4790 (subdir_do): New.
4791 (gnulib/import/Makefile): Adjust. Replace gnulib/import with
c971b7fa 4792 $(GNULIB_BUILDDIR). Don't pass argument to config.status.
43aaf8b6
PA
4793 * acinclude.m4: Include acx_configure_dir.m4.
4794 * configure.ac: Remove gl_EARLY, gl_INIT, and AM_INIT_AUTOMAKE
4795 calls. Call AC_PROG_RANLIB. Configure gnulib using
4796 ACX_CONFIGURE_DIR.
4797 (GNULIB): New.
4798 (GNULIB_STDINT_H): Adjust.
4799 (AC_OUTPUT): Don't output gnulib/Makefile anymore.
4800 * gdbreplay.c: Include build-gnulib/config.h.
4801 * server.h: Likewise.
4802 * aclocal.m4: Regenerate.
4803 * config.in: Regenerate.
4804 * configure: Regenerate.
c971b7fa 4805
809277f8
PA
48062012-04-19 Pedro Alves <palves@redhat.com>
4807
4808 * Makefile.in (LIBGNU, INCGNU): Adjust.
4809 (GNULIB_FLAGS_TO_PASS, GNULIB_H): Adjust.
4810 (all, install-only, uninstall, clean-info, all-lib, clean)
4811 (maintainer-clean, Makefile, gnulib/Makefile): Adjust.
4812 * configure.ac: Adjust AC_OUTPUT output.
4813 * aclocal.m4: Regenerate.
4814 * configure: Regenerate.
4815
fd9bb8b8
PA
48162012-04-19 Pedro Alves <palves@redhat.com>
4817
4818 * Makefile.in (generated_files): New.
4819 (server_h): Remove the explicit dependency on config.h, and depend
4820 on $generated_files.
4821
1c298c66
PA
48222012-04-19 Pedro Alves <palves@redhat.com>
4823
4824 * Makefile.in (INCGNU): Add -Ignulib.
4825
57c4b50b
PA
48262012-04-19 Pedro Alves <palves@redhat.com>
4827
4828 * Makefile.in (GNULIB_INCLUDE_DIR): Rename to ...
4829 (INCGNU): ... this, and spell out -I here.
4830 (GNULIB_LIB): Rename to ...
4831 (LIBGNU): ... this.
4832 (INCLUDE_CFLAGS, gdbserver$(EXEEXT), $(GNULIB_LIB) rule): Adjust.
4833
1030e047
PA
48342012-04-19 Pedro Alves <palves@redhat.com>
4835
4836 * config.in: Regenerate.
4837
447d4319
PA
48382012-04-19 Pedro Alves <palves@redhat.com>
4839
4840 * configure.ac: Remove AC_CHECK_DECLS check for memmem.
4841 * server.h (memmem): Remove declaration.
4842 * config.in: Regenerate.
4843 * configure: Regenerate.
4844
aad9eab9
YQ
48452012-04-19 Yao Qi <yao@codesourcery.com>
4846
4847 * Makefile.in (SFILES): Add common/vec.c.
4848 (OBS): Add vec.o.
4849 (vec.o): New rule.
4850
3e10640f
YQ
48512012-04-19 Yao Qi <yao@codesourcery.com>
4852
4853 * remote-utils.c (prepare_resume_reply): Replace with macro
4854 target_core_of_thread.
4855 * server.c (handle_qxfer_threads_proper): Likewise.
4856 * target.h (traget_core_of_thread): New macro.
4857
71622373
PA
48582012-04-18 Pedro Alves <palves@redhat.com>
4859
4860 * aclocal.m4: Regenerate.
4861 * configure: Regenerate.
4862
80d26939
YQ
48632012-04-16 Yao Qi <yao@codesourcery.com>
4864
4865 * tracepoint.c (cmd_qtstart): Download tracepoints even when they are
4866 duplicated on address.
4867
42476b70
YQ
48682012-04-16 Yao Qi <yao@codesourcery.com>
4869
4870 * tracepoint.c (COPY_FIELD_TO_BUF): New macro.
4871 (struct tracepoint_action_ops) <send>: New field.
4872 (m_tracepoint_action_send, r_tracepoint_action_send): New.
4873 (agent_expr_send, x_tracepoint_action_send): New.
4874 (l_tracepoint_action_send): New.
4875 (cmd_qtdp): Download and install tracepoint
4876 according to `use_agent'.
4877 (run_inferior_command): Add one more parameter `len'.
4878 Update callers.
4879 (tracepoint_send_agent): New.
4880 (cmd_qtdp, cmd_qtstart): Call tracepoint_send_agent.
4881
7bc83639
YQ
48822012-04-16 Yao Qi <yao@codesourcery.com>
4883
4884 * tracepoint.c (download_tracepoints): Moved to ...
4885 (cmd_qtstart): ... here.
4886
5f18041e
YQ
48872012-04-14 Yao Qi <yao@codesourcery.com>
4888
4889 * tracepoint.c: Include inttypes.h.
4890 (struct collect_memory_action): Use sized types.
4891 (struct tracepoint): Likewise.
4892 (cmd_qtdp, stop_tracing): Update print specifiers.
4893 (cmd_qtp, response_tracepoint): Likewise.
4894 (collect_data_at_tracepoint): Likewise.
4895 (collect_data_at_step): Likewise.
4896
55a8c076
YQ
48972012-04-14 Yao Qi <yao@codesourcery.com>
4898
4899 Import gnulib module inttypes.
4900 * aclocal.m4, config.in, configure: Regenerated.
4901
dc750257
YQ
49022012-04-14 Yao Qi <yao@codesourcery.com>
4903
4904 * Makefile.in (maintainer-clean, realclean, distclean): Remove
4905 Makefile and config.status at last.
4906
0ab5faf9
YQ
49072012-04-13 Yao Qi <yao@codesourcery.com>
4908
4909 * tracepoint.c: Include stdint.h unconditionally.
4910
18f5fd81
TJB
49112012-04-13 Thiago Jung Bauermann <thiago.bauermann@linaro.org>
4912
4913 * acinclude.m4 (GDBSERVER_HAVE_THREAD_DB_TYPE): New macro based
4914 on BFD_HAVE_SYS_PROCFS_TYPE.
4915 * configure.ac: Look for lwpid_t and psaddr_t in libthread_db.h.
4916 * configure: Regenerate.
4917 * config.in: Likewise.
4918
4d47af5c
L
49192012-04-13 H.J. Lu <hongjiu.lu@intel.com>
4920
4921 * Makefile.in (clean): Also remove x32.c x32-linux.c
4922 x32-avx.c x32-avx-linux.c.
4923 (x32.o): New target.
4924 (x32.c): Likewise.
4925 (x32-linux.o): Likewise.
4926 (x32-linux.c): Likewise.
4927 (x32-avx.o): Likewise.
4928 (x32-avx.c): Likewise.
4929 (x32-avx-linux.o): Likewise.
4930 (x32-avx-linux.c): Likewise.
4931
4932 * configure.srv (srv_amd64_regobj): Add x32.o x32-avx.o.
4933 (srv_amd64_linux_regobj): Add x32-linux.o x32-avx-linux.o.
4934 (srv_i386_64bit_xmlfiles): Add i386/x32-core.xml.
4935 (srv_amd64_xmlfiles): Add i386/x32.xml i386/x32-avx.xml.
4936 (srv_amd64_linux_xmlfiles): Add i386/x32-linux.xml
4937 i386/x32-avx-linux.xml.
4938
4939 * linux-x86-low.c (init_registers_x32_linux): New prototype.
4940 (init_registers_x32_avx_linux): Likwise.
4941 (x86_linux_update_xmltarget): Call init_registers_x32_linux
4942 or init_registers_x32_avx_linux if linux_is_elf64 is false.
4943
ecedbe58
PA
49442012-04-13 Pedro Alves <palves@redhat.com>
4945
4946 * Makefile.in (GNULIB_FLAGS_TO_PASS): New.
4947 (FLAGS_TO_PASS): Don't change or set $top_srcdir, $srcdir and VPATH.
4948 (all, uninstall, clean-info, all-lib, clean, maintainer-clean)
4949 (realclean, distclean): Explicitly pass $GNULIB_FLAGS_TO_PASS to
4950 the sub-make.
4951
c92b5177
L
49522012-04-12 H.J. Lu <hongjiu.lu@intel.com>
4953
4954 * linux-x86-low.c (compat_x32_clock_t): New.
4955 (compat_x32_siginfo_t): Likewise.
4956 (compat_x32_siginfo_from_siginfo): Likewise.
4957 (siginfo_from_compat_x32_siginfo): Likewise.
4958 (linux_is_elf64): Likewise.
4959 (x86_siginfo_fixup): Call compat_x32_siginfo_from_siginfo
4960 and siginfo_from_compat_x32_siginfo for x32.
4961 (x86_arch_setup): Set linux_is_elf64.
4962
214d508e
L
49632012-04-12 H.J. Lu <hongjiu.lu@intel.com>
4964
4965 PR gdb/13969
4966 * linux-low.c (linux_pid_exe_is_elf_64_file): Also return the
4967 e_machine field.
4968 (linux_qxfer_libraries_svr4): Update call to elf_64_file_p.
4969 * linux-low.h (linux_pid_exe_is_elf_64_file): Updated.
4970 * linux-x86-low.c (x86_arch_setup): Check if GDBserver is
4971 compatible with process.
4972
c9a1864a
YQ
49732012-04-12 Yao Qi <yao@codesourcery.com>
4974
4975 * Makefile.in: Define abs_top_srcdir and abs_srcdir.
4976 (INCLUDE_CFLAGS): Append GNULIB_INCLUDE_DIR.
4977 (install-only, install-info, clean): Handle sub dir gnulib.
4978 (all-lib, am--refresh): New targets.
4979 (memmem.o): Remove target.
4980 * configure.ac: Remove AC_CONFIG_LIBOBJ_DIR.
4981 Invoke gl_EARLY. Invoke AC_CHECK_PROGS for make.
4982 (AC_REPLACE_FUNCS): Remove memmem.
4983 Invoke gl_INIT and AM_INIT_AUTOMAKE.
4984 (AC_OUTPUT): Generate Makefile in gnulib/.
4985 * aclocal.m4, config.in, configure: Regenerated.
4986
367ba2c2
MR
49872012-04-10 Maciej W. Rozycki <macro@codesourcery.com>
4988
4989 * linux-low.c (get_r_debug): Handle DT_MIPS_RLD_MAP.
4990
9d236627
PA
49912012-04-05 Pedro Alves <palves@redhat.com>
4992
4993 -Werror=strict-aliasing
4994
4995 * spu-low.c (parse_spufs_run): Avoid dereferencing type-punned
4996 pointer.
4997
111217b3
PA
49982012-04-04 Pedro Alves <palves@redhat.com>
4999
5000 * linux-sparc-low.c (sparc_fill_gregset_to_stack)
5001 (sparc_store_gregset_from_stack, sparc_store_gregset)
5002 (sparc_breakpoint_at): Fix formatting.
5003
8365dcf5
TJB
50042012-03-30 Thiago Jung Bauermann <thiago.bauermann@linaro.org>
5005
5006 * configure.ac: Check whether Elf32_auxv_t and Elf64_auxv_t
5007 are available.
5008 * linux-low.c [HAVE_ELF32_AUXV_T] (Elf32_auxv_t): Add typedef.
5009 [HAVE_ELF64_AUXV_T] (Elf64_auxv_t): Likewise.
5010 * config.in: Regenerate.
5011 * configure: Likewise.
5012
689cc2ae
PA
50132012-03-29 Pedro Alves <palves@redhat.com>
5014
5015 * linux-low.c (regsets_store_inferior_registers) [__sparc__]:
5016 Correct ptrace arguments.
5017
c14dfd32
PA
50182012-03-28 Pedro Alves <palves@redhat.com>
5019
5020 * linux-ia64-low.c (ia64_regmap): Map IA64_EC_REGNUM to PT_AR_EC.
5021 (IA64_GR0_REGNUM, IA64_FR0_REGNUM)
5022 (IA64_FR1_REGNUM): New defines.
5023 (ia64_fetch_register): New.
5024 (the_low_target): Install it.
5025 * linux-low.h (struct linux_target_ops) <fetch_register>: New
5026 field.
5027 * linux-low.c (linux_fetch_registers): Try the
5028 the_low_target.fetch_register hook first.
5029
5030 * linux-arm-low.c (the_low_target): Adjust.
5031 * linux-bfin-low.c (the_low_target): Adjust.
5032 * linux-cris-low.c (the_low_target): Adjust.
5033 * linux-crisv32-low.c (the_low_target): Adjust.
5034 * linux-m32r-low.c (the_low_target): Adjust.
5035 * linux-m68k-low.c (the_low_target): Adjust.
5036 * linux-mips-low.c (the_low_target): Adjust.
5037 * linux-ppc-low.c (the_low_target): Adjust.
5038 * linux-s390-low.c (the_low_target): Adjust.
5039 * linux-sh-low.c (the_low_target): Adjust.
5040 * linux-sparc-low.c (the_low_target): Adjust.
5041 * linux-tic6x-low.c (the_low_target): Adjust.
5042 * linux-x86-low.c (the_low_target): Adjust.
5043 * linux-xtensa-low.c (the_low_target): Adjust.
5044
63c88e13
PA
50452012-03-26 Pedro Alves <palves@redhat.com>
5046
5047 * server.c (handle_qxfer_libraries): Don't bail early if
5048 the_target->qxfer_libraries_svr4 is not NULL.
5049
fb723180
PA
50502012-03-26 Pedro Alves <palves@redhat.com>
5051
5052 * linux-low.c (linux_qxfer_libraries_svr4): Fix pasto in comment.
5053
0afae3cf
PA
50542012-03-23 Pedro Alves <palves@redhat.com>
5055
5056 * linux-low.c (linux_qxfer_libraries_svr4): Terminate the
5057 "library-list-svr4" element's start tag when the the DSO list is
5058 empty.
5059
485f1ee4
PA
50602012-03-23 Pedro Alves <palves@redhat.com>
5061
5062 * linux-low.c (read_one_ptr): Read the inferior's pointer through
5063 a variable whose type size is the same as the inferior's pointer
5064 size.
5065
a5362b9a
TS
50662012-03-21 Thomas Schwinge <thomas@codesourcery.com>
5067
5068 * linux-arm-low.c (arm_stopped_by_watchpoint): Use siginfo_t instead of
5069 struct siginfo.
5070 * linux-low.c (siginfo_fixup, linux_xfer_siginfo): Likewise.
5071 * linux-x86-low.c (x86_siginfo_fixup): Likewise.
5072 * linux-low.h: Include <signal.h>.
5073 (struct siginfo): Remove forward declaration.
5074 (struct linux_target_ops) <siginfo_fixup>: Use siginfo_t instead of
5075 struct siginfo.
5076
d226c142
MF
50772012-03-21 Mike Frysinger <vapier@gentoo.org>
5078
5079 * .gitignore: Ignore more files.
5080
122f36ef
PA
50812012-03-19 Pedro Alves <palves@redhat.com>
5082 Jan Kratochvil <jan.kratochvil@redhat.com>
5083
5084 * server.c (cont_thread, general_thread): Add describing comments.
5085 (start_inferior): Clear `cont_thread'.
5086 (handle_v_cont): Don't set `cont_thread' if resuming all threads
5087 of a process.
5088
fc3e5175
YQ
50892012-03-15 Yao Qi <yao@codesourcery.com>
5090
5091 * tracepoint.c (install_tracepoint): Move duplicated tracepoint
5092 handling to ...
5093 (cmd_qtdp): ... here.
5094
8d0d92cd
YQ
50952012-03-15 Yao Qi <yao@codesourcery.com>
5096
5097 * tracepoint.c (struct tracepoint_action_ops): New.
5098 (struct tracepoint_action) [!IN_PROCESS_AGENT] <ops>: New field.
5099 (m_tracepoint_action_download): New.
5100 (r_tracepoint_action_download): New.
5101 (x_tracepoint_action_download): New.
5102 (l_tracepoint_action_download): New.
5103 (add_tracepoint_action): Install `action->ops' according type.
5104 (download_tracepoint_1): Move code `download' function pointer
5105 of various tracepoint_action_ops.
5106
87b0bb13
JK
51072012-03-13 Jan Kratochvil <jan.kratochvil@redhat.com>
5108
5109 * linux-low.c (linux_attach_lwp_1): New variable buffer. Call
5110 linux_ptrace_attach_warnings.
5111
5f572dec
JK
51122012-03-13 Jan Kratochvil <jan.kratochvil@redhat.com>
5113
5114 * Makefile.in (linux-ptrace.o): New.
5115 * configure.srv (arm*-*-linux*, bfin-*-*linux*, crisv32-*-linux*)
5116 (cris-*-linux*, i[34567]86-*-linux*, ia64-*-linux*, m32r*-*-linux*)
5117 (m68*-*-linux*, m68*-*-uclinux*, mips*-*-linux*, powerpc*-*-linux*)
5118 (s390*-*-linux*, sh*-*-linux*, sparc*-*-linux*, tic6x-*-uclinux)
5119 (x86_64-*-linux*, xtensa*-*-linux*): Add linux-ptrace.o to SRV_TGTOBJ
5120 of these targets.
5121 * linux-low.c (linux_attach_lwp_1): Remove redundent else clause.
5122
f4647387
YQ
51232012-03-08 Yao Qi <yao@codesourcery.com>
5124 Pedro Alves <palves@redhat.com>
5125
5126 Fix PR server/13392.
5127 * linux-x86-low.c (amd64_install_fast_tracepoint_jump_pad): Check
5128 offset of JMP insn.
5129 * tracepoint.c (remove_tracepoint): New.
5130 (cmd_qtdp): Call remove_tracepoint when failed to install.
5131
9b224c5e
PA
51322012-03-07 Pedro Alves <palves@redhat.com>
5133
5134 * linux-low.c (get_detach_signal): New.
5135 (linux_detach_one_lwp): Get rid of a pending SIGSTOP with SIGCONT.
5136 Pass on pending signals to PTRACE_DETACH. Check the result of the
5137 ptrace call.
5138 * server.c (program_signals, program_signals_p): New.
5139 (handle_general_set): Handle QProgramSignals.
5140 * server.h (program_signals, program_signals_p): Declare.
5141
e237a7e2
JK
51422012-03-05 Pedro Alves <palves@redhat.com>
5143 Jan Kratochvil <jan.kratochvil@redhat.com>
5144
5145 * linux-low.c (get_dynamic): Don't warn when PT_PHDR isn't found.
5146 New comment why.
5147
5808517f
YQ
51482012-03-03 Yao Qi <yao@codesourcery.com>
5149
5150 * tracepoint.c (tracepoint_look_up_symbols): Update call to
5151 agent_look_up_symbols.
5152
58b4daa5
YQ
51532012-03-03 Yao Qi <yao@codesourcery.com>
5154
5155 * Makefile.in (linux-low.o): Keep dependence on agent.h.
5156 (linux-x86-low.o): Likewise.
5157 * server.h: Remove in_process_agent_loaded.
5158 * tracepoint.c (in_process_agent_loaded): Removed. Moved it
5159 common/agent.c.
5160 Update callers.
5161
8ffcbaaf
YQ
51622012-03-03 Yao Qi <yao@codesourcery.com>
5163
5164 * tracepoint.c (gdb_agent_capability): New global.
5165 (in_process_agent_loaded_ust): Renamed to
5166 `in_process_agent_supports_ust'.
5167 Update callers.
5168 (in_process_agent_supports_ust): Call agent_capability_check.
5169 (clear_installed_tracepoints): Assert that agent supports
5170 agent.
5171
d1feda86
YQ
51722012-03-03 Yao Qi <yao@codesourcery.com>
5173
5174 * linux-low.c (linux_supports_agent): New.
5175 (linux_target_ops): Initialize field `supports_agent' with
5176 linux_supports_agent.
5177 * target.h (struct target_ops) <supports_agent>: New.
5178 (target_supports_agent): New macro.
5179 * server.c (handle_general_set): Handle packet 'QAgent'.
5180 (handle_query): Send `QAgent+'.
5181 * Makefile.in (server.o): Depends on agent.h.
5182
2fa291ac
YQ
51832012-03-03 Yao Qi <yao@codesourcery.com>
5184
5185 * Makefile.in (OBS): Add agent.o.
5186 Add new rule for agent.o.
5187 Track dependence of tracepoint.c on agent.h.
5188 * tracepoint.c (run_inferior_command_1):
5189 (run_inferior_command): Call agent_run_command.
5190 (gdb_ust_connect_sync_socket): Deleted. Move it to
5191 common/agent.c.
5192 (resume_thread, stop_thread): Likewise.
5193 (gdb_ust_socket_init): Renamed to ...
5194 (gdb_agent_socket_init): ... New.
5195 (gdb_ust_thread): Renamed to ...
5196 (gdb_agent_helper_thread): ... New.
5197 (gdb_ust_init): Move some code to ...
5198 (gdb_agent_init): ... here. New.
5199 [HAVE_UST]: Call gdb_ust_init.
5200 (initialize_tracepoint_ftlib): Call gdb_agent_init.
5201 * configure.ac: Add `sys/un.h' to AC_CHECK_HEADERS.
5202 * config.in, configure: Regenerated.
5203
05044653
PA
52042012-03-02 Pedro Alves <palves@redhat.com>
5205
5206 * inferiors.c (add_pid_to_list, pull_pid_from_list): Delete.
5207 * linux-low.c (struct simple_pid_list): New.
5208 (stopped_pids): New a struct simple_pid_list pointer.
5209 (add_to_pid_list, pull_pid_from_list): New.
5210 (handle_extended_wait): Don't assume the first signal new children
5211 report is SIGSTOP. Adjust call to pull_pid_from_list.
5212 (linux_wait_for_lwp): Adjust.
5213
8d00225b
YQ
52142012-03-02 Yao Qi <yao@codesourcery.com>
5215
5216 * tracepoint.c (do_action_at_tracepoint): Write `stop_pc' in
5217 debug log.
5218
19560ba5
YQ
52192012-03-02 Yao Qi <yao@codesourcery.com>
5220
5221 * tracepoint.c (collect_ust_data_at_tracepoint): Remove parameters
5222 `stop_pc' and `tpoint'. Update caller.
5223
1faeff08
MR
52242012-03-01 Maciej W. Rozycki <macro@codesourcery.com>
5225
5226 * linux-low.h (linux_target_ops): Add regset_bitmap member.
5227 * linux-low.c (use_linux_regsets): New macro.
5228 [!HAVE_LINUX_REGSETS] (regsets_fetch_inferior_registers): Likewise.
5229 [!HAVE_LINUX_REGSETS] (regsets_store_inferior_registers): Likewise.
5230 (linux_register_in_regsets): New function.
5231 (usr_fetch_inferior_registers): Skip registers covered by
5232 regsets.
5233 (usr_store_inferior_registers): Likewise.
5234 (usr_fetch_inferior_registers): New macro.
5235 (usr_store_inferior_registers): Likewise.
5236 (linux_fetch_registers): Handle mixed regset/non-regset targets.
5237 (linux_store_registers): Likewise.
5238 * linux-mips-low.c (init_registers_mips_dsp_linux): New
5239 prototype.
5240 (init_registers_mips64_dsp_linux): Likewise.
5241 (init_registers_mips_linux): New macro.
5242 (init_registers_mips_dsp_linux): Likewise.
5243 (mips_dsp_num_regs): Likewise.
5244 (DSP_BASE, DSP_CONTROL): New fallback macros.
5245 (mips_base_regs): New macro.
5246 (mips_regmap): Use it. Fix the size.
5247 (mips_dsp_regmap): New variable.
5248 (mips_dsp_regset_bitmap): Likewise.
5249 (mips_arch_setup): New function.
5250 (mips_cannot_fetch_register): Use the_low_target.regmap rather
5251 than mips_regmap.
5252 (mips_cannot_store_register): Likewise.
5253 (the_low_target): Update .arch_setup, .num_regs and .regmap
5254 initializers. Add .regset_bitmap initializer.
5255 * linux-arm-low.c (the_low_target): Add .regset_bitmap
5256 initializer.
5257 * linux-bfin-low.c (the_low_target): Likewise.
5258 * linux-cris-low.c (the_low_target): Likewise.
5259 * linux-crisv32-low.c (the_low_target): Likewise.
5260 * linux-ia64-low.c (the_low_target): Likewise.
5261 * linux-m32r-low.c (the_low_target): Likewise.
5262 * linux-m68k-low.c (the_low_target): Likewise.
5263 * linux-ppc-low.c (the_low_target): Likewise.
5264 * linux-s390-low.c (the_low_target): Likewise.
5265 * linux-sh-low.c (the_low_target): Likewise.
5266 * linux-sparc-low.c (the_low_target): Likewise.
5267 * linux-tic6x-low.c (the_low_target): Likewise.
5268 * linux-x86-low.c (the_low_target): Likewise.
5269 * linux-xtensa-low.c (the_low_target): Likewise.
5270 * configure.srv <mips*-*-linux*>: Add mips-dsp-linux.o and
5271 mips64-dsp-linux.o to srv_regobj. Add mips-dsp-linux.xml,
5272 mips64-dsp-linux.xml, mips-dsp.xml and mips64-dsp.xml to
5273 srv_xmlfiles.
5274 * Makefile.in (mips-dsp-linux.o, mips-dsp-linux.c): New targets.
5275 (mips64-dsp-linux.o, mips64-dsp-linux.c): Likewise.
5276
c03e6ccc
YQ
52772012-02-29 Yao Qi <yao@codesourcery.com>
5278 Pedro Alves <palves@redhat.com>
5279
5280 * linux-low.c: (linux_wait_1): Call unsuspend_all_lwps when
5281 `step_over_finished' is true.
5282
644cebc9
PA
52832012-02-27 Pedro Alves <palves@redhat.com>
5284
5285 * linux-low.c (pid_is_stopped): Delete, moved to common/.
5286 (linux_attach_lwp_1): Adjust to use linux_proc_pid_is_stopped.
5287
c14d7ab2
PA
52882012-02-27 Pedro Alves <palves@redhat.com>
5289
5290 PR server/9684
5291 * linux-low.c (pid_is_stopped): New.
5292 (linux_attach_lwp_1): Handle attaching to 'T (stopped)' processes.
5293
412c89dd
LM
52942012-02-25 Luis Machado <lgustavo@codesourcery.com>
5295
5296 * mem-break.c (clear_gdb_breakpoint_conditions): Fix de-allocation
5297 of conditions.
5298
b745defe
MR
52992012-02-24 Maciej W. Rozycki <macro@codesourcery.com>
5300
5301 * linux-mips-low.c (mips_regmap): Correct the index of $f9.
5302
9f3a5c85
LM
53032012-02-24 Luis Machado <lgustavo@codesourcery>
5304
5305 * server.c (handle_query): Advertise support for target-side
5306 breakpoint condition evaluation.
5307 (process_point_options): New function.
5308 (process_serial_event): When inserting a breakpoint, check for
5309 a target-side condition that should be evaluated.
5310
5311 * mem-break.c: Include regcache.h and ax.h.
5312 (point_cond_list_t): New data structure.
5313 (breakpoint) <cond_list>: New field.
5314 (find_gdb_breakpoint_at): Make non-static.
5315 (delete_gdb_breakpoint_at): Clear any target-side
5316 conditions.
5317 (clear_gdb_breakpoint_conditions): New function.
5318 (add_condition_to_breakpoint): Likewise.
5319 (add_breakpoint_condition): Likewise.
5320 (gdb_condition_true_at_breakpoint): Likewise.
5321 (gdb_breakpoint_here): Return result directly instead
5322 of going through a local variable.
5323
5324 * mem-break.h (find_gdb_breakpoint_at): New prototype.
5325 (clear_gdb_breakpoint_conditions): Likewise.
5326 (add_breakpoint_condition): Likewise.
5327 (gdb_condition_true_at_breakpoint): Likewise.
5328
5329 * linux-low.c (linux_wait_1): Evaluate target-side breakpoint condition.
5330 (need_step_over_p): Take target-side breakpoint condition into
5331 consideration.
5332
5e1dc496
LM
53332012-02-24 Luis Machado <lgustavo@codesourcery>
5334
5335 * server.h: Include tracepoint.h.
5336 (agent_mem_read, agent_get_trace_state_variable_value,
5337 agent_set_trace_state_variable_value,
5338 agent_tsv_read, agent_mem_read_string, get_get_tsv_func_addr,
5339 get_set_tsv_func_addr): New prototypes.
5340
5341 * ax.h: New include file.
5342 * ax.c: New source file.
5343
5344 * tracepoint.c: Include ax.h.
5345 (gdb_agent_op, gdb_agent_op_names, gdb_agent_op_sizes,
5346 agent_expr, eval_result_type): Move to ax.h.
5347 (parse_agent_expr): Rename to ...
5348 (gdb_parse_agent_expr): ... this, make it non-static and move
5349 to ax.h.
5350 (unparse_agent_expr) Rename to ...
5351 (gdb_unparse_agent_expr): ... this, make it non-static and move
5352 to ax.h.
5353 (eval_agent_expr): Rename to ...
5354 (eval_tracepoint_agent_expr): ... this.
5355 (agent_mem_read, agent_mem_read_string, agent_tsv_read): Remove
5356 forward declarations.
5357 (add_tracepoint_action): Call gdb_parse_agent_expr (...).
5358 (agent_get_trace_state_variable_value): New function.
5359 (agent_set_trace_state_variable_value): New function.
5360 (cmd_qtdp): Call gdb_parse_agent_expr (...).
5361 (response_tracepoint): Call gdb_unparse_agent_expr (...).
5362 (do_action_at_tracepoint): Call eval_tracepoint_agent_expr (...).
5363 (condition_true_at_tracepoint): Likewise.
5364 (parse_agent_expr): Rename to ...
5365 (gdb_parse_agent_expr): ... this and move to ax.c.
5366 (unparse_agent_expr): Rename to ...
5367 (gdb_unparse_agent_expr): ... this and move to ax.c.
5368 (gdb_agent_op_name): Move to ax.c.
5369 (eval_agent_expr): Rename to ...
5370 (gdb_eval_agent_expr): ... this, use regcache passed as parameter
5371 and move to ax.c.
5372 (eval_tracepoint_agent_expr): New function.
5373 (agent_mem_read, agent_mem_read_string, agent_tsv_read): Make
43aaf8b6 5374 non-static.
5e1dc496
LM
5375 (current_insn_ptr, emit_error, struct bytecode_address): Move to
5376 ax.c.
5377 (emit_prologue, emit_epilogue, emit_add, emit_sub, emit_mul, emit_lsh,
5378 emit_rsh_signed, emit_rsh_unsigned, emit_ext, emit_log_not,
5379 emit_bit_and, emit_bit_or, emit_bit_xor, emit_bit_not, emit_equal,
5380 emit_less_signed, emit_less_unsigned, emit_ref, emit_if_goto,
5381 emit_goto, write_goto_address, emit_const, emit_reg, emit_pop,
5382 emit_stack, emit_zero_ext, emit_swap, emit_stack_adjust,
5383 emit_int_call_1, emit_void_call_2, emit_eq_goto, emit_ne_goto,
5384 emit_lt_goto, emit_ge_goto, emit_gt_goto, emit_le_goto): Move to ax.c.
5385 (get_get_tsv_func_addr, get_set_tsv_func_addr): New functions.
5386 (compile_bytecodes): Remove forward declaration.
5387 (is_goto_target): Move to ax.c.
5388 (compile_bytecodes): Move to ax.c and call
5389 agent_get_trace_state_variable_value (...) and
5390 agent_set_trace_state_variable_value (...).
5391
5392 * Makefile.in: Update ax.c and IPA dependencies.
5393
277e4e52
PA
53942012-02-24 Pedro Alves <palves@redhat.com>
5395
5396 * tracepoint.c (cmd_bigqtbuffer): Rename as ...
5397 (cmd_bigqtbuffer_circular): ... this. Only handle
5398 'QTBuffer:circular:'.
5399 (handle_tracepoint_general_set): Adjust.
5400
bf4c19f7
YQ
54012012-02-16 Yao Qi <yao@codesourcery.com>
5402
5403 * inferiors.c: Move code to ...
5404 * dll.c: .... here. New.
5405 * server.h: Declare clear_dlls.
5406 * Makefile.in (SFILES): Add dll.c.
5407 (OBS): Add dll.o
5408 (dll.o): New rule.
5409
d73f2619
YQ
54102012-02-11 Yao Qi <yao@codesourcery.com>
5411
5412 * server.c: (handle_monitor_command): Add a new parameter
5413 `own_buf'.
5414 (handle_query): Update caller.
5415
f8255c2a
JB
54162012-02-09 Joel Brobecker <brobecker@adacore.com>
5417
5418 * configure.ac: Add readlink to AC_CHECK_FUNCS list.
5419 * configure, config.in: Regenerate.
5420 * hostio.c: Provide an alternate implementation if HAVE_READLINK
5421 is not defined.
5422
da84f473
PA
54232012-02-02 Pedro Alves <palves@redhat.com>
5424
5425 Try SIGKILL first, then PTRACE_KILL.
5426 * linux-low.c (linux_kill_one_lwp): New.
5427 (linux_kill_one_lwp): Rename to ...
5428 (kill_one_lwp_callback): ... this. Use the new
5429 linux_kill_one_lwp.
5430
e886a173
PA
54312012-02-02 Pedro Alves <palves@redhat.com>
5432
5433 * tracepoint.c (cmd_qtminftpilen): Return 0 if there's no current
5434 inferior.
5435
be07f1a2
PA
54362012-01-27 Pedro Alves <palves@redhat.com>
5437
5438 * linux-low.c (linux_child_pid_to_exec_file): Delete.
5439 (elf_64_file_p): Make static.
5440 (linux_pid_exe_is_elf_64_file): New.
5441 * linux-low.h (linux_child_pid_to_exec_file, elf_64_file_p):
5442 Delete declarations.
5443 (linux_pid_exe_is_elf_64_file): Declare.
5444 * linux-x86-low.c (x86_arch_setup): Use
5445 linux_pid_exe_is_elf_64_file.
5446
d8301ad1
JK
54472012-01-25 Jan Kratochvil <jan.kratochvil@redhat.com>
5448
5449 * linux-low.c (linux_wait_for_event_1): Rename to ...
5450 (linux_wait_for_event): ... here and merge it with former
5451 linux_wait_for_event - new variable wait_ptid, use it.
5452 (linux_wait_for_event): Remove - merge it to linux_wait_for_event_1.
5453
01b17894
PA
54542012-01-23 Pedro Alves <palves@redhat.com>
5455
5456 * server.c (main): Avoid yet another case of infinite loop while
5457 detaching/killing after a longjmp.
5458
e825046f
JK
54592012-01-20 Jan Kratochvil <jan.kratochvil@redhat.com>
5460
5461 Code cleanup.
5462 * linux-low.c (linux_wait_for_event_1): Use ptid_is_pid.
5463
b9e7b9c3
UW
54642012-01-20 Ulrich Weigand <ulrich.weigand@linaro.org>
5465
5466 * hostio.c (handle_readlink): New function.
5467 (handle_vFile): Call it to handle "vFile:readlink" packets.
5468
901f9912
UW
54692012-01-20 Pedro Alves <palves@redhat.com>
5470 Ulrich Weigand <ulrich.weigand@linaro.org>
5471
5472 * server.c (handle_v_requests): Only support vAttach and vRun to
5473 start multiple processes when in extended protocol mode.
5474
fc1ab1a0
PA
54752012-01-17 Pedro Alves <palves@redhat.com>
5476
5477 * tracepoint.c (initialize_tracepoint): Use mmap instead of
5478 memalign plus mprotect to allocate the scratch buffer.
5479
7d5d4e98
PA
54802012-01-13 Pedro Alves <palves@redhat.com>
5481
5482 * server.c (attach_inferior): Clear `cont_thread'.
5483
f128d5e9
PA
54842012-01-13 Pedro Alves <palves@redhat.com>
5485
5486 * server.c (main): Avoid infinite loop while detaching/killing
5487 after a longjmp.
5488
06db92f0
DE
54892012-01-09 Doug Evans <dje@google.com>
5490
5491 * server.c (start_inferior): Set last_ptid in --wrapper case.
5492
32d92999
YQ
54932012-01-06 Yao Qi <yao@codesourcery.com>
5494
5495 * tracepoint.c [IN_PROCESS_AGENT] (debug_threads): Macro
5496 defined.
5497 [IN_PROCESS_AGENT] (debug_agent): New global variable.
5498
5e0a92a9
YQ
54992012-01-04 Yao Qi <yao@codesourcery.com>
5500
5501 * tracepoint.c (cmd_qtdp): Print debug message
5502 for static tracepoint.
5503
ae639e8c
YQ
55042012-01-04 Yao Qi <yao@codesourcery.com>
5505
5506 * tracepoint.c (trace_vdebug): Differentiate debug message
5507 between gdbserver and IPA.
5508
f72429c5
YQ
55092012-01-03 Yao Qi <yao@codesourcery.com>
5510
5511 * tracepoint.c (tracepoint_was_hit): Don't collect for
5512 static tracepoint.
5513
12c3e59c
JB
55142012-01-02 Joel Brobecker <brobecker@adacore.com>
5515
5516 * terminal.h: Reformat copyright header.
5517
67827812
JB
55182012-01-02 Joel Brobecker <brobecker@adacore.com>
5519
5520 * server.c (gdbserver_version): Update copyright year.
5521 * gdbreplay.c (gdbreplay_version): Likewise.
5522
3e52c33d
JK
55232011-12-18 Jan Kratochvil <jan.kratochvil@redhat.com>
5524
5525 * linux-low.c (linux_create_inferior): Put empty if clause for write.
5526
5527 Revert:
5528 2011-12-18 Hui Zhu <teawater@gmail.com>
5529 * linux-low.c (linux_create_inferior): Save return value to ret.
5530
66f1260e
HZ
55312011-12-18 Hui Zhu <teawater@gmail.com>
5532
5533 * linux-low.c (linux_create_inferior): Save return value to ret.
5534
e77616d7
DE
55352011-12-16 Doug Evans <dje@google.com>
5536
e7b06c57
DE
5537 * linux-low.c (linux_create_inferior): If stdio connection,
5538 redirect stdin from /dev/null, stdout to stderr.
5539 * remote-utils.c (remote_is_stdio): New static global.
5540 (remote_connection_is_stdio): New function.
5541 (remote_prepare): Handle stdio connection.
5542 (remote_open): Ditto.
5543 (remote_close): Don't close stdin for stdio connections.
5544 (read_prim,write_prim): New functions. Replace all calls to
5545 read/write to these.
5546 * server.c (main): Watch for "-" argument. Move call to
5547 remote_prepare before start_inferior.
5548 * server.h (STDIO_CONNECTION_NAME): New macro.
5549 (remote_connection_is_stdio): Declare.
5550
e77616d7
DE
5551 * remote-utils.c (prepare_resume_reply): Remove extraneous \n
5552 in debugging output.
5553
82067193
YQ
55542011-12-15 Yao Qi <yao@codesourcery.com>
5555
5556 * tracepoint.c: Include sys/syscall.h.
5557 (gdb_ust_thread): Remove preprocessor conditional.
5558
82bfbe7e
PA
55592011-12-14 Pedro Alves <pedro@codesourcery.com>
5560
5561 * linux-low.c (linux_detach_one_lwp): Call
5562 the_low_target.prepare_to_resume before detaching.
5563
712c6575
YQ
55642011-12-14 Yao Qi <yao@codesourcery.com>
5565
5566 * tracepoint.c (gdb_ust_thread): Don't ignore return value
5567 of write.
5568
d54d1edf
YQ
55692011-12-14 Yao Qi <yao@codesourcery.com>
5570
5571 * i386-low.c (i386_low_stopped_data_address): Initialize local
5572 variable `control'.
5573
6210a125
PA
55742011-12-13 Pedro Alves <pedro@codesourcery.com>
5575
5576 PR remote/13492
5577
5578 * i386-low.c (i386_low_stopped_data_address): Avoid fetching
5579 DR_CONTROL unless necessary. Extend comments.
5580 * linux-x86-low.c (x86_linux_prepare_to_resume): Don't write to
5581 DR0-3 if not used. If any watchpoint was set, clear DR_STATUS.
5582
2ece8244
YQ
55832011-12-13 Yao Qi <yao@codesourcery.com>
5584
5585 * tracepoint.c (trace_buffer_alloc): Replace magic numbers with
5586 macros.
5587 (upload_fast_traceframes, upload_fast_traceframes): Likewise.
5588
784867a5
JK
55892011-12-08 Jan Kratochvil <jan.kratochvil@redhat.com>
5590
5591 * linux-low.c (linux_kill): Skip PTRACE_KILL if LWP does not exist.
5592 Print new debug message for such case.
5593
6bf36717
JK
55942011-12-06 Jan Kratochvil <jan.kratochvil@redhat.com>
5595
5596 Fix overlapping memcpy.
5597 * mem-break.c (set_raw_breakpoint_at): New variable buf. Use it for
5598 the read_inferior_memory transfer.
5599 (delete_fast_tracepoint_jump): New variable buf. Use it for the
5600 write_inferior_memory transfer.
5601 (set_fast_tracepoint_jump): New variable buf. Use it for the
5602 read_inferior_memory and write_inferior_memory transfers.
5603 (uninsert_fast_tracepoint_jumps_at, reinsert_fast_tracepoint_jumps_at)
5604 (delete_raw_breakpoint, uninsert_raw_breakpoint): New variable buf.
5605 Use it for the write_inferior_memory transfer.
5606 (check_mem_read, check_mem_write): New gdb_asserts for overlapping
5607 buffers.
5608
50275556
MR
56092011-12-06 Maciej W. Rozycki <macro@codesourcery.com>
5610
5611 * linux-low.c (fetch_register, store_register): Make code
5612 consistent, fix formatting.
5613
7325beb4
MR
56142011-12-06 Maciej W. Rozycki <macro@codesourcery.com>
5615
5616 * linux-low.c (usr_store_inferior_registers): Factor out code
5617 to handle individual registers into...
5618 (store_register): ... this new function.
5619
c642a434
UW
56202011-12-06 Ulrich Weigand <uweigand@de.ibm.com>
5621
5622 * Makefile.in (s390-linux32v1.o, s390-linux32v1.c): New rules.
5623 (s390-linux32v2.o, s390-linux32v2.c): Likewise.
5624 (s390-linux64v1.o, s390-linux64v1.c): Likewise.
5625 (s390-linux64v2.o, s390-linux64v2.c): Likewise.
5626 (s390x-linux64v1.o, s390x-linux64v1.c): Likewise.
5627 (s390x-linux64v2.o, s390x-linux64v2.c): Likewise.
5628 * configure.srv [s390*-*-linux*] (srv_regobj): Add new objects.
5629 (srv_xmlfiles): Add new XML files.
5630
5631 * linux-s390-low.c: Include "elf/common.h", <sys/ptrace.h>,
5632 and <sys/uio.h>.
5633 (PTRACE_GETREGSET, PTRACE_SETREGSET): Define if undefined.
5634 (init_registers_s390_linux32v1): Add prototype.
5635 (init_registers_s390_linux32v2): Likewise.
5636 (init_registers_s390_linux64v1): Likewise.
5637 (init_registers_s390_linux64v2): Likewise.
5638 (init_registers_s390x_linux64v1): Likewise.
5639 (init_registers_s390x_linux64v2): Likewise.
5640 (s390_num_regs): Increment to 52.
5641 (s390_regmap): Add orig_r2 register.
5642 (s390_num_regs_3264): Increment to 68.
5643 (s390_regmap_3264): Add orig_r2 register.
5644 (s390_collect_ptrace_register): Handle orig_r2 register.
5645 (s390_supply_ptrace_register): Likewise.
5646 (s390_fill_last_break): New function.
5647 (s390_store_last_break): Likewise.
5648 (s390_fill_system_call): New function.
5649 (s390_store_system_call): Likewise.
5650 (target_regsets): Handle NT_S390_LAST_BREAK and NT_S390_SYSTEM_CALL
5651 register sets.
5652 (s390_check_regset): New function.
5653 (s390_arch_setup): Check for presence of NT_S390_LAST_BREAK and
5654 NT_S390_SYSTEM_CALL regsets and use appropriate description.
5655 Update target_regsets for available register sets.
5656
2268b414
JK
56572011-12-02 Paul Pluzhnikov <ppluzhnikov@google.com>
5658 Jan Kratochvil <jan.kratochvil@redhat.com>
5659
5660 * linux-low.c (get_phdr_phnum_from_proc_auxv, get_dynamic, get_r_debug)
5661 (read_one_ptr, struct link_map_offsets, linux_qxfer_libraries_svr4):
5662 New.
5663 (struct linux_target_ops): Install linux_qxfer_libraries_svr4.
5664 * linux-low.h (struct process_info_private): New member r_debug.
5665 * server.c (handle_qxfer_libraries): Call
5666 the_target->qxfer_libraries_svr4.
5667 (handle_qxfer_libraries_svr4): New function.
5668 (qxfer_packets): New entry "libraries-svr4".
5669 (handle_query): Check QXFER_LIBRARIES_SVR4 and report libraries-svr4.
5670 * target.h (struct target_ops): New member qxfer_libraries_svr4.
5671 * remote.c (remote_xfer_partial): Call add_packet_config_cmd for
5672 PACKET_qXfer_libraries_svr4.
5673
d6db1fab
UW
56742011-11-30 Ulrich Weigand <uweigand@de.ibm.com>
5675
5676 * linux-s390-low.c (s390_collect_ptrace_register): Fully convert
5677 PSW address/mask between 8-byte and 16-byte formats.
5678 (s390_supply_ptrace_register): Likewise.
5679 (s390_get_pc, s390_set_pc): 4-byte PSW address always includes
5680 basic addressing mode bit.
5681
242f5f1c
SS
56822011-11-24 Stan Shebs <stan@codesourcery.com>
5683
5684 * tracepoint.c (cmd_qtstatus): Use plongest instead of %llx.
5685
f196051f
SS
56862011-11-17 Stan Shebs <stan@codesourcery.com>
5687
5688 * tracepoint.c (struct tracepoint): New field traceframe_usage.
5689 (tracing_start_time): New global.
5690 (tracing_stop_time): New global.
5691 (tracing_user_name): New global.
5692 (tracing_notes): New global.
5693 (tracing_stop_note): New global.
5694 (cmd_qtstart): Set traceframe_usage, start_time.
5695 (stop_tracing): Set stop_time.
5696 (cmd_qtstatus): Report additional status.
5697 (cmd_qtp): New function.
5698 (handle_tracepoint_query): Call it.
5699 (cmd_qtnotes): New function.
5700 (handle_tracepoint_general_set): Call it.
5701 (get_timestamp): Rename from tsv_get_timestamp.
5702
405f8e94
SS
57032011-11-14 Stan Shebs <stan@codesourcery.com>
5704 Kwok Cheung Yeung <kcy@codesourcery.com>
5705
5706 * linux-x86-low.c (small_jump_insn): New.
5707 (i386_install_fast_tracepoint_jump_pad): Add arguments for
5708 trampoline and error message, build a trampoline and issue a small
5709 jump instruction to it.
5710 (x86_install_fast_tracepoint_jump_pad): Add arguments for
5711 trampoline and error message.
5712 (x86_get_min_fast_tracepoint_insn_len): New.
5713 (the_low_target): Add call to x86_get_min_fast_tracepoint_insn_len.
5714 * linux-low.h (struct linux_target_ops): Add arguments to
5715 install_fast_tracepoint_jump_pad operation, add new operation.
5716 * linux-low.c (linux_install_fast_tracepoint_jump_pad): Add
5717 arguments.
5718 (linux_get_min_fast_tracepoint_insn_len): New function.
5719 (linux_target_op): Add new operation.
5720 * tracepoint.c (gdb_trampoline_buffer): New IPA variable.
5721 (gdb_trampoline_buffer_end): Ditto.
5722 (gdb_trampoline_buffer_error): Ditto.
5723 (struct ipa_sym_addresses): Add fields for new IPA variables.
5724 (symbol_list): Add entries for new IPA variables.
5725 (struct tracepoint): Add fields to hold the address range of the
5726 trampoline used by the tracepoint.
5727 (trampoline_buffer_head): New static variable.
5728 (trampoline_buffer_tail): Ditto.
5729 (claim_trampoline_space): New function.
5730 (have_fast_tracepoint_trampoline_buffer): New function.
5731 (clone_fast_tracepoint): Fill in trampoline fields of tracepoint
5732 structure.
5733 (install_fast_tracepoint): Ditto, also add error buffer argument.
5734 (cmd_qtminftpilen): New function.
5735 (handle_tracepoint_query): Add response to qTMinFTPILen packet.
5736 (fast_tracepoint_from_trampoline_address): New function.
5737 (fast_tracepoint_collecting): Handle trampoline as part of jump
5738 pad space.
5739 (set_trampoline_buffer_space): New function.
5740 (initialize_tracepoint): Initialize new IPA variables.
5741 * target.h (struct target_ops): Add arguments to
5742 install_fast_tracepoint_jump_pad operation, add new
5743 get_min_fast_tracepoint_insn_len operation.
5744 (target_get_min_fast_tracepoint_insn_len): New.
5745 (install_fast_tracepoint_jump_pad): Add arguments.
5746 * server.h (IPA_BUFSIZ): Define.
5747 * linux-i386-ipa.c: Include extra header files.
5748 (initialize_fast_tracepoint_trampoline_buffer): New function.
5749 (initialize_low_tracepoint): Call it.
5750 * server.h (set_trampoline_buffer_space): Declare.
5751 (claim_trampoline_space): Ditto.
5752 (have_fast_tracepoint_trampoline_buffer): Ditto.
5753
1e4d1764
YQ
57542011-11-14 Yao Qi <yao@codesourcery.com>
5755
5756 * server.c (handle_query): Handle InstallInTrace for qSupported.
5757 * tracepoint.c (add_tracepoint): Sort list.
5758 (install_tracepoint, download_tracepoint): New.
5759 (cmd_qtdp): Call them to install and download tracepoints.
5760 (sort_tracepoints): Removed.
5761 (cmd_qtstart): Update.
5762
5c73ff4e
YQ
57632011-11-14 Yao Qi <yao@codesourcery.com>
5764
5765 * mem-break.c (inc_ref_fast_tracepoint_jump): New.
5766 * mem-break.h: Declare.
5767 * tracepoint.c (cmd_qtstart): Move some code to ...
5768 (clone_fast_tracepoint, install_fast_tracepoint): ... here.
5769 New.
5770 (download_tracepoints): Move some code to ...
5771 (download_tracepoint_1): ... here. New.
5772
86a30030
YQ
57732011-11-08 Yao Qi <yao@codesourcery.com>
5774
5775 * remote-utils.c (relocate_instruction): A comment fix.
5776
8d26e50c
JB
57772011-11-07 Joel Brobecker <brobecker@adacore.com>
5778
5779 * win32-i386-low.c (dr_status_mirror, dr_control_mirror): Delete.
5780 (i386_dr_low_get_control, i386_dr_low_get_status): Use
5781 dr_status_mirror and dr_control_mirror from debug_reg_state.
5782 (i386_dr_low_get_status): Use debug_reg_state.dr_status_mirror
5783 (i386_initial_stuff): Remove use of deleted globals.
5784 (i386_get_thread_context, i386_set_thread_context,
5785 i386_thread_added): Use dr_status_mirror and dr_control_mirror
5786 from debug_reg_state.
5787
a59306a3
YQ
57882011-11-05 Yao Qi <yao@codesourcery.com>
5789
5790 * tracepoint.c (gdb_collect): Loop over tracepoints of same
5791 address as TPOINT's.
5792
3065dfb6
SS
57932011-11-02 Stan Shebs <stan@codesourcery.com>
5794
5795 * tracepoint.c (agent_mem_read_string): New function.
5796 (eval_agent_expr): Call it for tracenz.
5797 * server.c (handle_query): Report support for tracenz.
5798
fd0d8c7c
YQ
57992011-11-02 Yao Qi <yao@codesourcery.com>
5800
5801 * tracepoint.c (cmd_qtstart): Remove unused local variables.
5802
609086b1
YQ
58032011-11-02 Yao Qi <yao@codesourcery.com>
5804
5805 * target.h: Fix a typo in comment.
5806
b9fd1791
PA
58072011-10-31 Pedro Alves <pedro@codesourcery.com>
5808
5809 * mem-break.c (check_mem_write): Add `myaddr' parameter. Don't
5810 clobber the breakpoints' shadows with fast tracepoint jumps.
5811 * mem-break.h (check_mem_write): Add `myaddr' parameter.
5812 * target.c (write_inferior_memory): Also pass MYADDR down to
5813 check_mem_write.
5814
03583c20
UW
58152011-10-07 Ulrich Weigand <ulrich.weigand@linaro.org>
5816
5817 * configure.ac: Check support for personality routine.
5818 * configure: Regenerate.
5819 * config.in: Likewise.
5820 * linux-low.c: Include <sys/personality.h>.
5821 Define ADDR_NO_RANDOMIZE if necessary.
5822 (linux_create_inferior): Disable address space randomization when
5823 forking inferior, if requested.
5824 (linux_supports_disable_randomization): New function.
5825 (linux_target_ops): Install it.
5826 * server.h (disable_randomization): Declare.
5827 * server.c (disable_randomization): New global variable.
5828 (handle_general_set): Handle QDisableRandomization.
5829 (handle_query): Likewise for qSupported.
5830 (main): Support --disable-randomization and --no-disable-randomization
5831 command line arguments.
5832 * target.h (struct target_ops): Add supports_disable_randomization.
5833 (target_supports_disable_randomization): New macro.
5834
723b724b
MF
58352011-09-29 Mike Frysinger <vapier@gentoo.org>
5836
5837 * linux-low.c (target_loadseg): Add defined PTRACE_GETFDPIC to the
5838 ifdef check.
5839 [PT_GETDSBT] (target_loadmap): Wrap in a defined PT_GETDSBT check.
5840 [!PT_GETDSBT] (target_loadmap): New definition.
5841 (LINUX_LOADMAP, LINUX_LOADMAP_EXEC, LINUX_LOADMAP_INTERP): Define.
5842 (linux_read_loadmap): Change PTRACE_GETDSBT_EXEC to
5843 LINUX_LOADMAP_EXEC, PTRACE_GETDSBT_INTERP to LINUX_LOADMAP_INTERP,
5844 and PT_GETDSBT to LINUX_LOADMAP.
5845 [!PT_GETDSBT] (linux_read_loadmap): Define to NULL.
5846 (linux_target_ops): Delete unnecessary ifdef PT_GETDSBT check.
5847
55329a5c 58482011-09-21 Ulrich Weigand <ulrich.weigand@linaro.org>
71487fd7
UW
5849
5850 * linux-arm-low.c (struct arm_linux_hwbp_cap): Remove.
5851 (arm_linux_hwbp_cap): New static variable.
5852 (arm_linux_get_hwbp_cap): Replace by ...
5853 (arm_linux_init_hwbp_cap): ... this new function.
5854 (arm_linux_get_hw_breakpoint_count): Use arm_linux_hwbp_cap.
5855 (arm_linux_get_hw_watchpoint_count): Likewise.
5856 (arm_linux_get_hw_watchpoint_max_length): Likewise.
5857 (arm_arch_setup): Call arm_linux_init_hwbp_cap.
5858 (arm_prepare_to_resume): Use perror_with_name instead of error.
5859
55329a5c 58602011-09-21 Ulrich Weigand <ulrich.weigand@linaro.org>
09b4ad9f
UW
5861
5862 * linux-arm-low.c: Include <signal.h>.
5863 (PTRACE_GETHBPREGS, PTRACE_SETHBPREGS): Define if necessary.
5864 (struct arm_linux_hwbp_cap): New data type.
5865 (arm_hwbp_type, arm_hwbp_control_t): New typedefs.
5866 (struct arm_linux_hw_breakpoint): New data type.
5867 (MAX_BPTS, MAX_WPTS): Define.
5868 (struct arch_process_info, struct arch_lwp_info): New data types.
5869 (arm_linux_get_hwbp_cap): New function.
5870 (arm_linux_get_hw_breakpoint_count): Likewise.
5871 (arm_linux_get_hw_watchpoint_count): Likewise.
5872 (arm_linux_get_hw_watchpoint_max_length): Likewise.
5873 (arm_hwbp_control_initialize): Likewise.
5874 (arm_hwbp_control_is_enabled): Likewise.
5875 (arm_hwbp_control_is_initialized): Likewise.
5876 (arm_hwbp_control_disable): Likewise.
5877 (arm_linux_hw_breakpoint_equal): Likewise.
5878 (arm_linux_hw_point_initialize): Likewise.
5879 (struct update_registers_data): New data structure.
5880 (update_registers_callback: New function.
5881 (arm_insert_point): Likewise.
5882 (arm_remove_point): Likewise.
5883 (arm_stopped_by_watchpoint): Likewise.
5884 (arm_stopped_data_address): Likewise.
5885 (arm_new_process): Likewise.
5886 (arm_new_thread): Likewise.
5887 (arm_prepare_to_resume): Likewise.
5888 (the_low_target): Register arm_insert_point, arm_remove_point,
5889 arm_stopped_by_watchpoint, arm_stopped_data_address, arm_new_process,
5890 arm_new_thread, and arm_prepare_to_resume.
5891
6b9801d4
SS
58922011-09-15 Stan Shebs <stan@codesourcery.com>
5893
5894 * server.h (struct emit_ops): Add compare-goto fields.
5895 * tracepoint.c (gdb_agent_op_sizes): New table.
5896 (emit_eq_goto): New function.
5897 (emit_ne_goto): New function.
5898 (emit_lt_goto): New function.
5899 (emit_le_goto): New function.
5900 (emit_gt_goto): New function.
5901 (emit_ge_goto): New function.
5902 (is_goto_target): New function.
5903 (compile_bytecodes): Recognize special cases of compare-goto
5904 combinations and call specialized emitters for them.
5905 * linux-x86-low.c (amd64_emit_eq_goto): New function.
5906 (amd64_emit_ne_goto): New function.
5907 (amd64_emit_lt_goto): New function.
5908 (amd64_emit_le_goto): New function.
5909 (amd64_emit_gt_goto): New function.
5910 (amd64_emit_ge_goto): New function.
5911 (amd64_emit_ops): Add the new functions.
5912 (i386_emit_eq_goto): New function.
5913 (i386_emit_ne_goto): New function.
5914 (i386_emit_lt_goto): New function.
5915 (i386_emit_le_goto): New function.
5916 (i386_emit_gt_goto): New function.
5917 (i386_emit_ge_goto): New function.
5918 (i386_emit_ops): Add the new functions.
5919
bf15cbda
SS
59202011-09-08 Stan Shebs <stan@codesourcery.com>
5921
5922 * linux-x86-low.c (i386_emit_prologue): Save %ebx.
5923 (i386_emit_epilogue): Restore %ebx.
5924
943ca1dd
JZ
59252011-08-31 Jie Zhang <jzhang918@gmail.com>
5926
5927 * server.c (step_thread): Remove definition.
5928 (process_serial_event): Don't handle Hs.
5929 * server.h (step_thread): Remove declaration.
5930 * target.c (set_desired_inferior): Remove use of step_thread.
5931
e3deef73
LM
59322011-08-24 Luis Machado <lgustavo@codesourcery.com>
5933
5934 * linux-low.c: Include linux-procfs.h.
5935 (linux_attach_lwp_1): Update comments.
5936 (linux_attach): Scan for existing threads when attaching to a
5937 process that is the tgid.
5938 * Makefile.in: Update dependencies.
5939
13da1c97
LM
59402011-08-24 Luis Machado <lgustavo@codesourcery.com>
5941
5942 * configure.srv: Add linux-procfs.o dependencies.
5943
881127c9
YQ
59442011-08-14 Yao Qi <yao@codesourcery.com>
5945
5946 * target.h (struct target_ops): Fix indent.
5947 * win32-low.c (win32_target_ops): Fix comment.
5948
58dbd541
YQ
59492011-08-14 Andrew Jenner <andrew@codesourcery.com>
5950 Yao Qi <yao@codesourcery.com>
5951
5952 * Makefile.in (clean): Remove tic6x-*.c files.
5953 (linux-tic6x-low.o, tic6x-c62x-linux.o, tic6x-c64x-linux.o): New rules.
5954 (tic6x-c64xp-linux.o, tic6x-c62x-linux.c, tic6x-c64x-linux.c): Likewise.
5955 (tic6x-c64xp-linux.c): Likewise.
5956 * configure.srv: Add support for tic6x-*-uclinux.
5957 * linux-tic6x-low.c: New.
5958 * linux-low.c (PT_TEXT_ADDR, PT_DATA_ADDR, PT_TEXT_END_ADDR): Define.
5959
78d85199
YQ
59602011-08-14 Andrew Stubbs <ams@codesourcery.com>
5961 Yao Qi <yao@codesourcery.com>
5962
5963 * target.h (struct target_ops): Add read_loadmap.
5964 * linux-low.c (struct target_loadseg): New type.
5965 (struct target_loadmap): New type.
5966 (linux_read_loadmap): New function.
5967 (linux_target_ops): Add linux_read_loadmap.
5968 * server.c (handle_query): Support qXfer:fdpic:read packet.
43aaf8b6
PA
5969 * win32-low.c (win32_target_ops): Initialize field `read_loadmap'
5970 to NULL.
78d85199 5971
a959a88d
EZ
59722011-08-05 Eli Zaretskii <eliz@gnu.org>
5973
5974 * win32-low.c: Include <stdint.h>.
5975
1ced966e
PA
59762011-07-22 Pedro Alves <pedro@codesourcery.com>
5977
5978 * i386-low.c (i386_insert_aligned_watchpoint): Don't pass the info
5979 to the inferior here.
5980 (i386_remove_aligned_watchpoint): Ditto.
5981 (i386_handle_nonaligned_watchpoint): Return immediate on fail to
5982 fit part of the watchpoint in the debug registers.
5983 (i386_update_inferior_debug_regs): New.
5984 (i386_low_insert_watchpoint): Work on a local mirror of the debug
5985 registers, and only update the inferior on success.
5986 (i386_low_remove_watchpoint): Ditto.
5987
d26e3629
KY
59882011-07-22 Kwok Cheung Yeung <kcy@codesourcery.com>
5989
5990 * linux-low.c (compare_ints, unique, list_threads, show_process,
5991 linux_core_of_thread): Delete.
5992 (linux_target_ops): Change linux_core_of_thread to
5993 linux_common_core_of_thread.
5994 (linux_qxfer_osdata): Defer to linux_common_xfer_osdata.
5995 * utils.c (malloc_failure): Change type of argument.
5996 (xmalloc, xrealloc, xcalloc, xsnprintf): Delete.
5997 * Makefile.in (SFILES): Add common/common-utils.c, common/xml-utils.c,
5998 common/linux-osdata.c, common/ptid.c and common/buffer.c.
5999 (OBS): Add xml-utils.o, common-utils.o, ptid.o and buffer.o.
6000 (IPA_OBJS): Add common-utils-ipa.o.
6001 (ptid_h, linux_osdata_h): New macros.
6002 (server_h): Add common/common-utils.h, common/xml-utils.h,
6003 common/buffer.h, common/gdb_assert.h, common/gdb_locale.h and
6004 common/ptid.h.
6005 (common-utils-ipa.o, common-utils.o, xml-utils.o, linux-osdata.o,
6006 ptid.o, buffer.o): New rules.
6007 (linux-low.o): Add common/linux-osdata.h as a dependency.
6008 * configure.srv (srv_tgtobj): Add linux-osdata.o to Linux targets.
6009 * configure.ac: Add AC_HEADER_DIRENT check.
6010 * config.in: Regenerate.
6011 * configure: Regenerate.
6012 * remote-utils.c (xml_escape_text): Delete.
6013 (buffer_grow, buffer_free, buffer_init, buffer_finish,
6014 buffer_xml_printf): Move to common/buffer.c.
6015 * server.c (main): Remove call to initialize_inferiors.
6016 * server.h (struct ptid, ptid_t, minus_one_ptid, null_ptid,
6017 ptid_build, pid_to_ptid, ptid_get_pid, ptid_get_lwp, ptid_get_tid,
6018 ptid_equal, ptid_is_pid, initialize_inferiors, xml_escape_text,
6019 internal_error, gdb_assert, gdb_assert_fail): Delete.
6020 (struct buffer, buffer_grow, buffer_free, buffer_init, buffer_finish,
6021 buffer_xml_printf, buffer_grow_str, buffer_grow_str0): Move to
6022 common/buffer.h.
6023 * inferiors.c (null_ptid, minus_one_ptid, ptid_build, pid_to_ptid,
6024 ptid_get_pid, ptid_get_lwp, ptid_get_tid, ptid_equal, ptid_is_pid,
6025 initialize_inferiors): Delete.
6026
2275a1a7
PA
60272011-07-20 Pedro Alves <pedro@codesourcery.com>
6028
6029 * tracepoint.c (tracepoint_look_up_symbols): Return upon the first
6030 symbol error.
6031
0a5b1e09
PA
60322011-05-31 Pedro Alves <pedro@codesourcery.com>
6033
6034 * linux-x86-low.c (i386_dr_low_get_addr): Fix off by one in
6035 assertion.
6036 * win32-i386-low.c (i386_dr_low_get_addr): Ditto.
6037
6938fd34
YQ
60382011-05-26 Yao Qi <yao@codesourcery.com>
6039
6040 * Makefile.in (thread-db.o): Track dependence to
6041 common/gdb_thread_db.h.
6042 * thread-db.c: include gdb_thread_db.h from right place.
6043
b481f9e0
TT
60442011-05-16 Adrian Cornish <gnu@bluedreamer.com>
6045
6046 * linux-i386-ipa.c (supply_static_tracepoint_registers): Pass
6047 __FILE__ and __LINE__ to internal_error.
6048
98a5dd13
DE
60492011-05-13 Doug Evans <dje@google.com>
6050
6051 * thread-db.c (try_thread_db_load_from_sdir): New function.
6052 (try_thread_db_load_from_dir): New function.
6053 (thread_db_load_search): Handle $sdir, ignore $pdir.
6054 Remove trying of system directories if search of
6055 libthread-db-search-path fails, that is now done via $sdir.
6056
d248b706
KY
60572011-05-12 Kwok Cheung Yeung <kcy@codesourcery.com>
6058
6059 * server.c (handle_query): Add EnableDisableTracepoints to the list
6060 of supported features.
43aaf8b6 6061 * tracepoint.c (clear_installed_tracepoints): Uninstall disabled
d248b706 6062 tracepoints.
43aaf8b6
PA
6063 (cmd_qtenable_disable): New.
6064 (cmd_qtstart): Install tracepoints even if disabled.
6065 (handle_tracepoint_general_set): Add call to cmd_qtenable_disable on
6066 receiving a QTEnable or QTDisable packet.
6067 (gdb_collect): Skip data collection if fast tracepoint is disabled.
6068 (ust_marker_to_static_tracepoint): Do not ignore disabled static
6069 tracepoints.
6070 (gdb_probe): Skip data collection if static tracepoint is disabled.
d248b706 6071
84e578fb
DE
60722011-05-10 Doug Evans <dje@google.com>
6073
6074 * thread-db.c (thread_db_handle_monitor_command): Handle elided path.
6075
71f55dd8
DE
60762011-05-04 Doug Evans <dje@google.com>
6077
6078 * linux-low.c (linux_join): Skip process lookup.
6079 * spu-low.c (spu_join): Ditto.
6080 * server.c (join_inferiors_callback): Delete.
6081 (process_serial_event): For 'D' packet (detach) call join_inferior
6082 directly.
6083
4d393d60
JM
60842011-05-04 Joseph Myers <joseph@codesourcery.com>
6085
6086 * README: Don't mention xscale*-*-linux*.
6087 * configure.srv (xscale*-*-linux*): Don't handle target.
6088
b00ad6ff
NF
60892011-04-27 Nathan Froyd <froydnj@codesourcery.com>
6090
6091 * linux-x86-low.c (amd64_emit_const): Call memcpy instead of
6092 casting pointers.
6093 (amd64_emit_reg, amd64_emit_int_call_1, amd64_emit_void_call_2):
6094 (i386_emit_const, i386_emit_reg, i386_emit_int_call_1):
6095 (i386_emit_void_call_2): Likewise.
6096
af96c192
YQ
60972011-04-26 Yao Qi <yao@codesourcery.com>
6098
43aaf8b6
PA
6099 * linux-low.c: Move common macros to linux-ptrace.h.
6100 Include linux-ptrace.h.
af96c192
YQ
6101 * Makefile.in (linux_ptrace_h): New.
6102 (linux-low.o): Depends on linux-ptrace.h.
6103
03f2bd59
JK
61042011-04-24 Jan Kratochvil <jan.kratochvil@redhat.com>
6105
6106 * remote-utils.c (handle_accept_event): Close LISTEN_DESC only if
6107 RUN_ONCE. Comment for the LISTEN_DESC delete_file_handler call.
6108 (remote_prepare): New function with most of the TCP code from ...
6109 (remote_open): ... here. Detect PORT here unconditionally. Move also
6110 setting transport_is_reliable.
6111 * server.c (run_once): New variable.
6112 (gdbserver_usage): Document it.
6113 (main): Set run_once for `--once'. Call remote_prepare. Exit after
6114 the first run if RUN_ONCE.
6115 * server.h (run_once, remote_prepare): New declarations.
6116
7a9dd1b2
TT
61172011-04-19 Tom Tromey <tromey@redhat.com>
6118
6119 * win32-low.c (handle_load_dll): Remove duplicate "the".
6120
81239425
PM
61212011-04-07 Pierre Muller <muller@ics.u-strasbg.fr>
6122
6123 Remove support for old Cygwin 1.5 versions.
6124 * win32-low.c (win32_create_inferior): Use new cygwin_path_list
6125 function to avoid warning.
6126 (win32_add_one_solib): Use cygwin_conv_path function to avoid
6127 warning.
6128
9e0627f1
PM
61292011-03-18 Pierre Muller <muller@ics.u-strasbg.fr>
6130
6131 * gdbserver/server.h (Macro _): Define it if not available.
6132
588eebee
MS
61332011-03-14 Michael Snyder <msnyder@vmware.com>
6134
348af9f7 6135 * hostio.c (handle_close): Remove unnecessary null test.
588eebee 6136
43f70d4c
JB
61372011-03-10 Joel Brobecker <brobecker@adacore.com>
6138
6139 * Makefile.in (maintainer-clean realclean distclean): Remove
6140 "make ... subdir_do" command.
6141
348af9f7
MS
61422011-03-10 Michael Snyder <msnyder@vmware.com>
6143
6144 * tracepoint.c (tracepoint_finish_step): Fix loop variable.
6145
6146 * server.c (handle_v_run): Free alloced buffer on early return.
6147
e637a4f5
YQ
61482011-03-09 Yao Qi <yao@codesourcery.com>
6149
6150 Revert:
6151 2011-03-04 Yao Qi <yao@codesourcery.com>
6152
6153 * Makefile.in: Remove GNU make feature --directory.
6154
6155 2011-03-05 Yao Qi <yao@codesourcery.com>
6156
6157 * Makefile.in (CLEANDIRS, REQUIRED_SUBDIRS): New variable.
6158 (subdir_do): New make target. Copied from gdb/Makefile.
6159 (maintainer-clean, realclean, distclean, clean): Call corresponding
6160 make targets in common/Makefile.
6161
6162 2011-02-11 Yao Qi <yao@codesourcery.com>
6163
6164 * configure.ac: Call AC_PROG_RANLIB.
6165 * Makefile.in: Remove signals.o from OBS. Link libcommon.a.
6166 * configure: Regenerate.
6167
e6edda56
JK
61682011-03-07 Jan Kratochvil <jan.kratochvil@redhat.com>
6169
6170 * remote-utils.c (putpkt_binary_1): Calculate BUF2 size dynamically.
6171
e5141119
JB
61722011-03-06 Yao Qi <yao@codesourcery.com>
6173
6174 * Makefile.in (REQUIRED_SUBDIRS): Remove $(LIBCOMMON_DIR).
6175
64794aa4
JB
61762011-03-05 Yao Qi <yao@codesourcery.com>
6177
6178 * Makefile.in (CLEANDIRS, REQUIRED_SUBDIRS): New variable.
6179 (subdir_do): New make target. Copied from gdb/Makefile.
6180 (maintainer-clean, realclean, distclean, clean): Call corresponding
6181 make targets in common/Makefile.
6182
7a762829
YQ
61832011-03-04 Yao Qi <yao@codesourcery.com>
6184
6185 * Makefile.in: Remove GNU make feature --directory.
6186
348af9f7
MS
61872011-03-04 Michael Snyder <msnyder@vmware.com>
6188
6189 * server.c (queue_stop_reply): Call xmalloc not malloc.
6190
61912011-03-02 Michael Snyder <msnyder@vmware.com>
6192
6193 * linux-arm-low.c (arm_arch_setup): Replace malloc with xmalloc.
6194
9f72fee2
MS
61952011-02-28 Michael Snyder <msnyder@vmware.com>
6196
588eebee
MS
6197 * tracepoint.c (cmd_qtv): Discard unused value 'packet'.
6198 (cmd_qtframe): Ditto.
6199 (cmd_qtbuffer): Ditto.
6200 (cmd_bigqtbuffer): Ditto.
6201
9f72fee2
MS
6202 * utils.c (decimal2str): Initialize 'width' to nine, then
6203 don't mess with it.
6204
8040bd49
UW
62052011-02-28 Ulrich Weigand <uweigand@de.ibm.com>
6206
6207 * hostio.c (require_data): Free *data, not data.
6208
7e52cbd0
JK
62092011-02-28 Jan Kratochvil <jan.kratochvil@redhat.com>
6210
6211 * hostio.c (require_data): Use free, not xfree.
6212
9130f83e
MS
62132011-02-27 Michael Snyder <msnyder@vmware.com>
6214
4b812f4e
MS
6215 * server.c (handle_query): Discard unused value.
6216
9130f83e
MS
6217 * hostio.c (require_data): Free malloc memory before returning
6218 error.
6219
69d37113
MS
62202011-02-26 Michael Snyder <msnyder@vmware.com>
6221
6222 * linux-low.c (list_threads): Call closedir for dirent.
6223
35f5825a
MS
62242011-02-27 Michael Snyder <msnyder@vmware.com>
6225
2a589cef
MS
6226 * i386-low.c (i386-length_and_rw_bits): Comment the fact that
6227 a case statement falls through.
6228
0adea5f7
MS
6229 * linux-low.c (linux_xfer_siginfo): Fix fencepost error.
6230
35f5825a
MS
6231 * linux-amd64-ipa.c (gdb_agent_get_raw_reg): Fix fencepost error
6232 in comparison.
6233
238f1c74
MS
62342011-02-26 Michael Snyder <msnyder@vmware.com>
6235
6236 * utils.c (decimal2str): Eliminate dead code and dead param.
6237 (pulongest): Drop dead param from call to decimal2str.
6238 (plongest): Ditto.
6239
633ff500
JB
62402011-02-24 Joel Brobecker <brobecker@adacore.com>
6241
6242 Revert the following patch (not approved yet):
6243 2011-02-21 Hui Zhu <teawater@gmail.com>
6244 * tracepoint.c (tp_printf): New function.
6245 (eval_agent_expr): Handle gdb_agent_op_printf.
6246
f9c6ff72
HZ
62472011-02-21 Hui Zhu <teawater@gmail.com>
6248
6249 * tracepoint.c (tp_printf): New function.
6250 (eval_agent_expr): Handle gdb_agent_op_printf.
6251
94d5e490
TT
62522011-02-18 Tom Tromey <tromey@redhat.com>
6253
6254 * Makefile.in (tracepoint-ipa.o): Depend on ax.def.
6255 (tracepoint.o): Likewise.
6256 * tracepoint.c (enum gdb_agent_op): Use ax.def.
6257 (gdb_agent_op_names): Likewise.
6258
c7f96d2b
TT
62592011-02-18 Tom Tromey <tromey@redhat.com>
6260
6261 * tracepoint.c (enum gdb_agent_op) <gdb_agent_op_pick,
6262 gdb_agent_op_rot>: New constants.
6263 (gdb_agent_op_names): Add pick and roll.
6264 (eval_agent_expr) <gdb_agent_op_pick, gdb_agent_op_rot>: New
6265 cases.
6266
0feedb2c
JK
62672011-02-15 Jan Kratochvil <jan.kratochvil@redhat.com>
6268
6269 * aclocal.m4: Regenerated with aclocal-1.11.1.
6270
b3b9301e
PA
62712011-02-14 Pedro Alves <pedro@codesourcery.com>
6272
6273 * server.c (handle_qxfer_traceframe_info): New.
6274 (qxfer_packets): Register "traceframe-info".
6275 (handle_query): Report support for qXfer:traceframe-info:read+.
6276 * tracepoint.c (match_blocktype): New.
6277 (traceframe_find_block_type): Rename to ...
6278 (traceframe_walk_blocks): ... this. Add callback filter argument,
6279 and use it.
6280 (traceframe_find_block_type): New, reimplemented on top of
6281 traceframe_walk_blocks.
6282 (build_traceframe_info_xml): New.
6283 (traceframe_read_info): New.
6284 * server.h (traceframe_read_info): Declare.
6285
4f3e6fb7
YQ
62862011-02-11 Yao Qi <yao@codesourcery.com>
6287
6288 * configure.ac: Call AC_PROG_RANLIB.
6289 * Makefile.in: Remove signals.o from OBS. Link libcommon.a.
6290 * configure: Regenerate.
6291
764880b7
PA
62922011-02-07 Pedro Alves <pedro@codesourcery.com>
6293
6294 * server.c (gdb_read_memory): Change return semantics to allow
6295 partial transfers.
6296 (handle_search_memory_1): Adjust.
6297 (process_serial_event) <'m' packet>: Handle partial transfers.
6298 * tracepoint.c (traceframe_read_mem): Handle partial transfers.
6299
1c79eb8a
PA
63002011-01-28 Pedro Alves <pedro@codesourcery.com>
6301
6302 * regcache.c (init_register_cache): Initialize
6303 regcache->register_status.
6304 (free_register_cache): Release regcache->register_status.
6305 (regcache_cpy): Copy register_status.
6306 (registers_to_string): Print 'x's for unavailable registers.
6307 (supply_register): Mark the register's status valid or
6308 unavailable, depending on whether a buffer was passed in or not.
6309 (supply_register_zeroed): New.
6310 (supply_regblock): Mark the registers' status valid or
6311 unavailable, depending on whether a buffer was passed in or not.
6312 * regcache.h (REG_UNAVAILABLE, REG_VALID): New defines.
6313 (struct regcache): New `register_status' field.
6314 (supply_register_zeroed): Declare.
6315 * i387-fp.c (i387_xsave_to_cache): Zero out registers using
6316 supply_register_zeroed, rather than passing a NULL buffer to
6317 supply_register.
6318 * tracepoint.c (fetch_traceframe_registers): Update comment.
6319
85724a0e
PA
63202011-01-28 Pedro Alves <pedro@codesourcery.com>
6321
6322 * i387-fp.c (i387_xsave_to_cache): Make passing NULL as register
6323 buffer explicit.
6324
d08aafef
PA
63252011-01-25 Pedro Alves <pedro@codesourcery.com>
6326
6327 * server.h (decode_xfer_write): Change prototype.
6328 * remote-utils.c (decode_xfer_write): Remove `annex' parameter,
6329 and don't extract the annex here.
6330 * server.c (decode_xfer_read): Remove `annex' parameter,
6331 and don't extract the annex here.
6332 (decode_xfer): New.
6333 (struct qxfer): New.
6334 (handle_qxfer_auxv, handle_qxfer_features, handle_qxfer_libraries)
6335 (handle_qxfer_osdata, handle_qxfer_siginfo, handle_qxfer_spu)
6336 (handle_qxfer_statictrace): New functions, abstracted out from
6337 handle_query, and made to use the struct qxfer interface.
6338 (handle_threads_qxfer_proper): Rename to ...
6339 (handle_qxfer_threads_proper): ... this.
6340 (handle_threads_qxfer): Rename to ...
6341 (handle_qxfer_threads): ... this. Adjust.
6342 (qxfer_packets): New array.
6343 (handle_qxfer): New function.
6344 (handle_query): Use handle_qxfer.
6345
493e2a69
MS
63462011-01-05 Michael Snyder <msnyder@msnyder-server.eng.vmware.com>
6347
6348 * gdbreplay.c: Shorten lines of >= 80 columns.
6349 * linux-low.c: Ditto.
6350 * linux-ppc-low.c: Ditto.
6351 * linux-s390-low.c: Ditto.
6352 * linux-sparc-low.c: Ditto.
6353 * linux-x86-low.c: Ditto.
6354 * linux-xtensa-low.c: Ditto.
6355 * mem-break.c: Ditto.
6356 * nto-low.c: Ditto.
6357 * regcache.h: Ditto.
6358 * remote-utils.c: Ditto.
6359 * server.c: Ditto.
6360 * server.h: Ditto.
6361 * thread-db.c: Ditto.
6362 * tracepoint.c: Ditto.
6363 * utils.c: Ditto.
6364 * win32-low.h: Ditto.
6365
44944448
JB
63662011-01-05 Joel Brobecker <brobecker@adacore.com>
6367
6368 * gdbserver/configure.ac, gdbserver/gdbserver.1: Copyright year
6369 update.
6370
71ce852c
JB
63712011-01-01 Joel Brobecker <brobecker@adacore.com>
6372
6373 * server.c (gdbserver_version): Update copyright year in version
6374 output.
6375 * gdbreplay.c (gdbreplay_version): Ditto.
6376
eb826dc6
MF
63772010-12-29 Jie Zhang <jie.zhang@analog.com>
6378
6379 * configure.srv (bfin-*-*linux*): Handle Blackfin/Linux targets.
6380 * linux-bfin-low.c: New file.
6381 * linux-low.c: Define PT_TEXT_ADDR, PT_TEXT_END_ADDR, and
6382 PT_DATA_ADDR for BFIN targets.
6383 * Makefile.in (SFILES): Add linux-bfin-low.c.
6384 (clean): Remove reg-bfin.c.
6385 (linux-bfin-low.o, reg-bfin.o, reg-bfin.c): New targets.
6386 * README: Mention supported Blackfin targets.
6387
39ab222a
MF
63882010-12-23 Mike Frysinger <vapier@gentoo.org>
6389
6390 * .gitignore: New file.
6391
a1f2ce7d
MF
63922010-11-16 Mike Frysinger <vapier@gentoo.org>
6393
6394 * linux-low.c (linux_tracefork_child): Add char* cast to arg.
6395
f474844c
JZ
63962010-10-22 Jie Zhang <jie@codesourcery.com>
6397
6398 * Makefile.in: Add FLAGS_TO_PASS variable.
6399 (install): Remove dependency of install-only and recursively
6400 invoke make for install-only.
6401
f1048712
DE
64022010-10-04 Doug Evans <dje@google.com>
6403
6404 * Makefile.in (uninstall): Use $(DESTDIR).
6405
b53a1623
PA
64062010-09-24 Pedro Alves <pedro@codesourcery.com>
6407
e6ee044d
PA
6408 PR gdb/11842
6409
b53a1623
PA
6410 * linux-x86-low.c (compat_siginfo_from_siginfo)
6411 (siginfo_from_compat_siginfo): Also copy si_pid and si_uid when
6412 si_code is < 0. Check for si_code == SI_TIMER before checking for
6413 si_code < 0.
6414
fa1bd1e4
JB
64152010-09-13 Joel Brobecker <brobecker@adacore.com>
6416
6417 * lynx-i386-low.c: New file.
6418 * configure.srv: Add handling of i[34567]86-*-lynxos* targets.
6419
47fac8f8
JB
64202010-09-13 Joel Brobecker <brobecker@adacore.com>
6421
6422 * lynx-low.c (ptrace_request_to_str): Remove handling for
6423 request values that have been removed in LynxOS 5.x.
6424
1adfc54d
JB
64252010-09-13 Joel Brobecker <brobecker@adacore.com>
6426
6427 * lynx-low.c, lynx-ppc-loc.c: Include <sys/ptrace.h> instead of
6428 <ptrace.h>
6429
c2a66c29
NS
64302010-09-09 Nathan Sidwell <nathan@codesourcery.com>
6431
6432 * configure.ac: Add --enable-inprocess-agent option.
6433 * configure: Rebuilt.
6434
32fcada3
YQ
64352010-09-06 Yao Qi <yao@codesourcery.com>
6436
6437 * linux-low.c (linux_kill): Remove unused variable.
6438 (linux_stabilize_threads): Likewise.
6439 * server.c (start_inferior): Likewise.
6440 (queue_stop_reply_callback): Likewise.
6441 * tracepoint.c (do_action_at_tracepoint): Likewise.
6442
0cccb683
YQ
64432010-09-06 Yao Qi <yao@codesourcery.com>
6444
6445 * linux-low.c (maybe_move_out_of_jump_pad): Restore current_inferior
6446 on return.
6447
423ec54c
JK
64482010-09-06 Jan Kratochvil <jan.kratochvil@redhat.com>
6449
6450 * target.c (mywait) <TARGET_WAITKIND_EXITED>: Fix to use INTEGER.
6451
12ac6819
PA
64522010-09-06 Pedro Alves <pedro@codesourcery.com>
6453
6454 * Makefile.in (install-only): Replace $IPA_DEPFILES with
6455 "$(IPA_DEPFILES)".
6456
8ed54b31
JB
64572010-09-01 Joel Brobecker <brobecker@adacore.com>
6458
6459 * gdbserver/lynx-low.c, gdbserver/lynx-low.h,
6460 gdbserver/lynx-ppc-low.c: New files.
6461 * Makefile.in (lynx_low_h): New variable.
6462 (lynx-low.o, lynx-ppc-low.o): New rules.
6463 * configure.ac: On LynxOS, link with -lnetinet.
6464 * configure.srv: Add handling of powerpc-*-lynxos* targets.
6465 * configure: regenerate.
6466
bb0116a4
JB
64672010-09-01 Joel Brobecker <brobecker@adacore.com>
6468
6469 * Makefile.in (vasprintf.o, vsnprintf.o): New rules.
6470 * configure.ac: Add check for vasprintf and vsnprintf.
6471 * configure, config.in: Regenerate.
6472 * server.h (vasprintf, vsnprintf): Add conditional declarations.
6473
a778ab81 64742010-09-01 Joel Brobecker <brobecker@adacore.com>
6475
6476 * gdbreplay.c: Move include of alloca.h up, next to include of
6477 malloc.h.
6478 * server.h: Add include of malloc.h.
6479 * mem-break.c: Remove include of malloc.h.
6480 * server.c, tracepoint.c, utils.c, win32-low.c: Likewise.
6481
8b034a19 64822010-09-01 Joel Brobecker <brobecker@adacore.com>
6483
6484 * Makefile.in (memmem.o): Build with -Wno-error.
6485
64862010-09-01 Joel Brobecker <brobecker@adacore.com>
6487
6488 * utils.c (xsnprintf): Make non-static.
6489 * server.h: Add xsnprintf declaration.
6490 * linux-low.c, nto-low.c, target.c, thread-db.c, tracepoint.c:
6491 replace calls to snprintf by calls to xsnprintf throughout.
6492
64932010-09-01 Joel Brobecker <brobecker@adacore.com>
6494
6495 * configure.ac: Add configure check for alloca.
6496 * configure, config.in: Regenerate.
6497 * server.h: Include alloca.h if it exists.
6498 * gdbreplay.c: Include alloca.h if it exists.
6499
1a981360
PA
65002010-08-28 Pedro Alves <pedro@codesourcery.com>
6501
6502 * linux-low.c (__SIGRTMIN): Define if not already defined.
6503 (linux_create_inferior): Check for __ANDROID__ rather than
6504 __SIGRTMIN.
6505 (enqueue_one_deferred_signal): Don't requeue non-RT signals that
6506 are already deferred.
6507 (linux_wait_1): Check for __ANDROID__ rather than __SIGRTMIN.
6508 (linux_resume_one_thread): Don't queue a SIGSTOP if the lwp is
6509 stopped and already has a pending signal to report.
6510 (proceed_one_lwp): : Don't queue a SIGSTOP if the lwp already has
6511 a pending signal to report or is moving out of a jump pad.
6512 (linux_init_signals): Check for __ANDROID__ rather than
6513 __SIGRTMIN.
6514
b4d51a55
PA
65152010-08-28 Pedro Alves <pedro@codesourcery.com>
6516
6517 * linux-low.c (linux_stabilize_threads): Wrap debug output in a
6518 debug_threads check. Avoid a linear search when not doing debug
6519 output.
6520
ec48365d
PA
65212010-08-27 Pedro Alves <pedro@codesourcery.com>
6522
6523 * event-loop.c (event_handle_func): Adjust to use gdb_fildes_t.
6524 (struct gdb_event) <fd>: Change type to gdb_fildes_t.
6525 (struct file_handler) <fd>: Change type to gdb_fildes_t.
6526 (process_event): Change local fd's type to gdb_fildes_t.
6527 (create_file_handler): Adjust prototype.
6528 (delete_file_handler): Adjust prototype.
6529 (handle_file_event): Adjust prototype. Use pfildes.
6530 (create_file_event): Adjsut prototype.
6531 * remote-utils.c (remote_desc, listen_desc): Change type to
6532 gdb_fildes_t.
6533 * server.h: New gdb_fildes_t typedef.
6534 [USE_WIN32API]: Include winsock2.h.
6535 (delete_file_handler, add_file_handler): Adjust prototypes.
6536 (pfildes): Declare.
6537 * utils.c (pfildes): New.
6538
854d88f0
PA
65392010-08-27 Pedro Alves <pedro@codesourcery.com>
6540
6541 * configure.ac (build_warnings): Add -Wno-char-subscripts.
6542 * configure: Regenerate.
6543
0146f85b
PA
65442010-08-27 Pedro Alves <pedro@codesourcery.com>
6545
6546 * linux-low.c (linux_unprepare_to_access_memory): Rename to ...
6547 (linux_done_accessing_memory): ... this.
6548 (linux_target_ops): Adjust.
6549 * linux-x86-low.c (x86_insert_point, x86_remove_point): Adjust.
6550 * nto-low.c (nto_target_ops): Adjust comment.
6551 * server.c (gdb_read_memory, gdb_write_memory): Adjust.
6552 * spu-low.c (spu_target_ops): Adjust comment.
6553 * target.h (target_ops): Rename unprepare_to_access_memory field
6554 to done_accessing_memory.
6555 (unprepare_to_access_memory): Rename to ...
6556 (done_accessing_memory): ... this.
6557
90d74c30
PA
65582010-08-26 Pedro Alves <pedro@codesourcery.com>
6559
6560 * linux-low.c (linux_prepare_to_access_memory): New.
6561 (linux_unprepare_to_access_memory): New.
6562 (linux_target_ops): Install them.
6563 * server.c (read_memory): Rename to ...
6564 (gdb_read_memory): ... this. Use
6565 prepare_to_access_memory/prepare_to_access_memory.
6566 (write_memory): Rename to ...
6567 (gdb_write_memory): ... this. Use
6568 prepare_to_access_memory/prepare_to_access_memory.
6569 (handle_search_memory_1): Adjust.
6570 (process_serial_event): Adjust.
6571 * target.h (struct target_ops): New fields
6572 prepare_to_access_memory and unprepare_to_access_memory.
6573 (prepare_to_access_memory, unprepare_to_access_memory): New.
6574 * linux-x86-low.c (x86_insert_point, x86_remove_point): Use
6575 prepare_to_access_memory/prepare_to_access_memory.
6576 * nto-low.c (nto_target_ops): Adjust.
6577 * spu-low.c (spu_target_ops): Adjust.
6578 * win32-low.c (win32_target_ops): Adjust.
6579
fd467969
PA
65802010-08-26 Pedro Alves <pedro@codesourcery.com>
6581
6582 * Makefile.in (WARN_CFLAGS): Get it from configure.
6583 (WERROR_CFLAGS): New.
6584 (INTERNAL_CFLAGS): Add WERROR_CFLAGS.
6585 * configure.ac: Introduce --enable-werror, which adds -Werror to
6586 the compiler command line. Enabled by default. Disable with
6587 --disable-werror. Add -Wdeclaration-after-statement
6588 Wpointer-arith and -Wformat-nonliteral to warning flags.
6589 * configure: Regenerate.
6590
331e2f5f
PA
65912010-08-26 Pedro Alves <pedro@codesourcery.com>
6592
6593 * mem-break.c [HAVE_MALLOC_H]: Include malloc.h.
6594
e581f2b4
PA
65952010-08-26 Pedro Alves <pedro@codesourcery.com>
6596
6597 * gdbreplay.c (remote_error): New.
6598 (gdbchar): New.
6599 (expect): Use gdbchar. Check for error reading from GDB.
6600 Clarify sync error output.
6601 (play): Check for errors writing to GDB.
6602 * linux-low.c (sigchld_handler): Really ignore `write' errors.
6603 * remote-utils.c (getpkt): Check for errors writing to the remote
6604 descriptor.
6605
3c11dd79
PA
66062010-08-25 Pedro Alves <pedro@codesourcery.com>
6607
6608 * linux-low.c (linux_wait_1): Move non-debugging code out of
6609 `debug_threads' control.
6610
d20a8ad9
PA
66112010-08-25 Pedro Alves <pedro@codesourcery.com>
6612
6613 * linux-low.c (linux_wait_1): Don't set last_status here.
6614 * server.c (push_event, queue_stop_reply_callback): Assert we're
6615 not pushing a TARGET_WAITKIND_IGNORE event.
6616 (start_inferior, start_inferior, attach_inferior, handle_v_cont)
6617 (myresume, handle_target_event): Set the thread's last_resume_kind
6618 and last_status from the target returned status.
6619
964e4306
PA
66202010-08-25 Pedro Alves <pedro@codesourcery.com>
6621
6622 PR threads/10729
6623
6624 * linux-x86-low.c (update_debug_registers_callback): New.
6625 (i386_dr_low_set_addr): Use it.
6626 (i386_dr_low_get_addr): New.
6627 (i386_dr_low_set_control): Use update_debug_registers_callback.
6628 (i386_dr_low_get_control): New.
6629 (i386_dr_low_get_status): Adjust.
6630 * linux-low.c (linux_stop_lwp): New.
6631 * linux-low.h (linux_stop_lwp): Declare.
6632
6633 * i386-low.c (I386_DR_GET_RW_LEN): Take the dr7 contents as
6634 argument instead of a i386_debug_reg_state.
6635 (I386_DR_WATCH_HIT): Take the dr6 contents as argument instead of
6636 a i386_debug_reg_state.
6637 (i386_insert_aligned_watchpoint): Adjust.
6638 (i386_remove_aligned_watchpoint): Adjust.
6639 (i386_low_stopped_data_address): Read the debug registers from the
6640 inferior instead of from the mirrors.
6641 * i386-low.h (struct i386_debug_reg_state): Extend comment.
6642 (i386_dr_low_get_addr): Declare.
6643 (i386_dr_low_get_control): Declare.
6644 (i386_dr_low_get_status): Change prototype.
6645
6646 * win32-i386-low.c (dr_status_mirror, dr_control_mirror): New globals.
6647 (i386_dr_low_get_addr): New.
6648 (i386_dr_low_get_control): New.
6649 (i386_dr_low_get_status): Adjust prototype. Return
6650 dr_status_mirror.
6651 (i386_initial_stuff): Clear dr_status_mirror and
6652 dr_control_mirror.
6653 (i386_get_thread_context): Adjust.
6654 (i386_set_thread_context): Adjust.
6655 (i386_thread_added): Adjust.
6656
5f21a75b
PA
66572010-08-24 Pedro Alves <pedro@codesourcery.com>
6658
6659 * linux-low.h (linux_thread_area): Delete declaration.
6660
3e4c1235
TS
66612010-08-11 Thomas Schwinge <thomas@codesourcery.com>
6662
6663 * linux-low.c (linux_wait_1): Correctly return the ptid of the child
6664 after its termination.
6665
1971b033
PA
66662010-08-09 Pedro Alves <pedro@codesourcery.com>
6667
6668 * linux-low.c (gdb_wants_lwp_stopped): Delete.
6669 (gdb_wants_all_stopped): Delete.
6670 (linux_wait_1): Don't call them.
6671 * server.c (handle_v_cont): Tag all threads as want-stopped.
6672 (gdb_wants_thread_stopped): Fix comments. Tag the thread that
6673 stopped as "client-wants-stopped".
6674
310444ac
PA
66752010-07-31 Pedro Alves <pedro@codesourcery.com>
6676
6677 * Makefile.in (signals_h): New.
6678 (server_h): Depend on it.
6679 (server.o): Don't depend on $(signals_def).
6680 (signals.o): Depend on $(signals_def).
6681
a19cae16
JK
66822010-07-31 Jan Kratochvil <jan.kratochvil@redhat.com>
6683
6684 * Makefile.in (signals_def): New.
6685 (server_h): Append include/gdb/signals.h and signals_def.
6686 (server.o): Append signals_def.
6687
30d50328
JK
66882010-07-25 Jan Kratochvil <jan.kratochvil@redhat.com>
6689
6690 * server.c (handle_target_event): Use target_signal_to_host for
6691 resume_info.sig initialization.
6692 * target.h (struct thread_resume) <sig>: New comment.
6693
5c3216e2
OS
66942010-07-20 Ozkan Sezer <sezeroz@gmail.com>
6695
c6f46ca0
OS
6696 * server.c (handle_query): strcpy() the returned string from paddress()
6697 instead of sprintf().
5c3216e2
OS
6698 * utils.c (paddress): Return phex_nz().
6699
6bd31874
JB
67002010-07-07 Joel Brobecker <brobecker@adacore.com>
6701
6702 * server.c (handle_v_cont): Call mourn_inferior if process
6703 just exited.
6704 (myresume): Likewise.
6705
0fb4aa4b
PA
67062010-07-01 Pedro Alves <pedro@codesourcery.com>
6707
6708 Static tracepoints, and integration with UST.
6709
6710 * configure.ac: Handle --with-ust. substitute ustlibs and ustinc.
6711 * mem-break.c (uninsert_all_breakpoints)
6712 (reinsert_all_breakpoints): New.
6713 * mem-break.h (reinsert_all_breakpoints, uninsert_all_breakpoints):
6714 * tracepoint.c (ust_loaded, helper_thread_id, cmd_buf): New.
6715 (gdb_agent_ust_loaded, helper_thread_id)
6716 (gdb_agent_helper_thread_id): New macros.
6717 (struct ipa_sym_addresses): Add addr_ust_loaded,
6718 addr_helper_thread_id, addr_cmd_buf.
6719 (symbol_list): Add ust_loaded, helper_thread_id, cmd_buf.
6720 (in_process_agent_loaded_ust): New.
6721 (write_e_ust_not_loaded): New.
6722 (maybe_write_ipa_ust_not_loaded): New.
6723 (struct collect_static_trace_data_action): New.
6724 (enum tracepoint_type) <static_tracepoint>: New.
6725 (struct tracepoint) <handle>: Mention static tracepoints.
6726 (struct static_tracepoint_ctx): New.
6727 (CMD_BUF_SIZE): New.
6728 (add_tracepoint_action): Handle static tracepoint actions.
6729 (unprobe_marker_at): New.
6730 (clear_installed_tracepoints): Handle static tracepoints.
6731 (cmd_qtdp): Handle static tracepoints.
6732 (probe_marker_at): New.
6733 (cmd_qtstart): Handle static tracepoints.
6734 (response_tracepoint): Handle static tracepoints.
6735 (cmd_qtfstm, cmd_qtsstm, cmd_qtstmat): New.
6736 (handle_tracepoint_query): Handle qTfSTM, qTsSTM and qTSTMat.
6737 (get_context_regcache): Handle static tracepoints.
6738 (do_action_at_tracepoint): Handle static tracepoint actions.
6739 (traceframe_find_block_type): Handle static trace data blocks.
6740 (traceframe_read_sdata): New.
6741 (download_tracepoints): Download static tracepoint actions.
6742 [HAVE_UST] Include ust/ust.h, dlfcn.h, sys/socket.h, and sys/un.h.
6743 (GDB_PROBE_NAME): New.
6744 (ust_ops): New.
6745 (GET_UST_SYM): New.
6746 (USTF): New.
6747 (dlsym_ust): New.
6748 (ust_marker_to_static_tracepoint): New.
6749 (gdb_probe): New.
6750 (collect_ust_data_at_tracepoint): New.
6751 (gdb_ust_probe): New.
6752 (UNIX_PATH_MAX, SOCK_DIR): New.
6753 (gdb_ust_connect_sync_socket): New.
6754 (resume_thread, stop_thread): New.
6755 (run_inferior_command): New.
6756 (init_named_socket): New.
6757 (gdb_ust_socket_init): New.
6758 (cstr_to_hexstr): New.
6759 (next_st): New.
6760 (first_marker, next_marker): New.
6761 (response_ust_marker): New.
6762 (cmd_qtfstm, cmd_qtsstm): New.
6763 (unprobe_marker_at, probe_marker_at): New.
6764 (cmd_qtstmat, gdb_ust_thread): New.
6765 (gdb_ust_init): New.
6766 (initialize_tracepoint_ftlib): Call gdb_ust_init.
6767 * linux-amd64-ipa.c [HAVE_UST]: Include ust/processor.h
6768 (ST_REGENTRY): New.
6769 (x86_64_st_collect_regmap): New.
6770 (X86_64_NUM_ST_COLLECT_GREGS): New.
6771 (AMD64_RIP_REGNUM): New.
6772 (supply_static_tracepoint_registers): New.
6773 * linux-i386-ipa.c [HAVE_UST]: Include ust/processor.h
6774 (ST_REGENTRY): New.
6775 (i386_st_collect_regmap): New.
6776 (i386_NUM_ST_COLLECT_GREGS): New.
6777 (supply_static_tracepoint_registers): New.
6778 * server.c (handle_query): Handle qXfer:statictrace:read.
6779 <qSupported>: Report support for StaticTracepoints, and
6780 qXfer:statictrace:read features.
6781 * server.h (traceframe_read_sdata)
6782 (supply_static_tracepoint_registers): Declare.
6783 * remote-utils.c (convert_int_to_ascii, hexchars, ishex, tohex)
6784 (unpack_varlen_hex): Include in IPA build.
6785 * Makefile.in (ustlibs, ustinc): New.
6786 (IPA_OBJS): Add remote-utils-ipa.o.
6787 ($(IPA_LIB)): Link -ldl and -lpthread.
6788 (UST_CFLAGS): New.
6789 (IPAGENT_CFLAGS): Add UST_CFLAGS.
6790 * config.in, configure: Regenerate.
6791
9e4344e5
PA
67922010-06-20 Ian Lance Taylor <iant@google.com>
6793 Pedro Alves <pedro@codesourcery.com>
6794
6795 * linux-x86-low.c (always_true): Delete.
6796 (EMIT_ASM, EMIT_ASM32): Use an uncondition asm jmp instead of
6797 trying to fool the compiler with always_true.
6798
c6beb2cb
PA
67992010-06-20 Pedro Alves <pedro@codesourcery.com>
6800
6801 * tracepoint.c (condition_true_at_tracepoint): Don't run compiled
6802 conditions in gdbserver.
6803
d2ed6730
UW
68042010-06-19 Ulrich Weigand <uweigand@de.ibm.com>
6805
6806 * spu-low.c (spu_read_memory): Wrap around local store limit.
6807 (spu_write_memory): Likewise.
6808
4e29fb54
PA
68092010-06-15 Pedro Alves <pedro@codesourcery.com>
6810
6811 * linux-x86-low.c (amd64_emit_const, amd64_emit_void_call_2)
6812 (i386_emit_const, i386_emit_void_call_2): Replace int64_t uses with
6813 LONGEST uses.
6814 * server.h (struct emit_ops): Replace int64_t uses with LONGEST
6815 uses.
6816 * tracepoint.c (emit_const, emit_void_call_2): Replace int64_t
6817 uses with LONGEST uses.
6818
6a271cae
PA
68192010-06-14 Stan Shebs <stan@codesourcery.com>
6820 Pedro Alves <pedro@codesourcery.com>
6821
6822 Bytecode compiler.
6823
6824 * linux-x86-low.c: Include limits.h.
6825 (add_insns): New.
6826 (always_true): New.
6827 (EMIT_ASM): New.
6828 (EMIT_ASM32): New.
6829 (amd64_emit_prologue, amd64_emit_epilogue, amd64_emit_add)
6830 (amd64_emit_sub, amd64_emit_mul, amd64_emit_lsh)
6831 (amd64_emit_rsh_signed, amd64_emit_rsh_unsigned, amd64_emit_ext,
6832 (amd64_emit_log_not, amd64_emit_bit_and, amd64_emit_bit_or)
6833 (amd64_emit_bit_xor, amd64_emit_bit_not, amd64_emit_equal,
6834 (amd64_emit_less_signed, amd64_emit_less_unsigned, amd64_emit_ref,
6835 (amd64_emit_if_goto, amd64_emit_goto, amd64_write_goto_address)
6836 (amd64_emit_const, amd64_emit_call, amd64_emit_reg)
6837 (amd64_emit_pop, amd64_emit_stack_flush, amd64_emit_zero_ext)
6838 (amd64_emit_swap, amd64_emit_stack_adjust, amd64_emit_int_call_1)
6839 (amd64_emit_void_call_2): New.
6840 (amd64_emit_ops): New.
6841 (i386_emit_prologue, i386_emit_epilogue, i386_emit_add)
6842 (i386_emit_sub,i386_emit_mul, i386_emit_lsh, i386_emit_rsh_signed)
6843 (i386_emit_rsh_unsigned, i386_emit_ext, i386_emit_log_not)
6844 (i386_emit_bit_and, i386_emit_bit_or, i386_emit_bit_xor)
6845 (i386_emit_bit_not, i386_emit_equal, i386_emit_less_signed)
6846 (i386_emit_less_unsigned, i386_emit_ref, i386_emit_if_goto)
6847 (i386_emit_goto, i386_write_goto_address, i386_emit_const)
6848 (i386_emit_call, i386_emit_reg, i386_emit_pop)
6849 (i386_emit_stack_flush, i386_emit_zero_ext, i386_emit_swap)
6850 (i386_emit_stack_adjust, i386_emit_int_call_1)
6851 (i386_emit_void_call_2): New.
6852 (i386_emit_ops): New.
6853 (x86_emit_ops): New.
6854 (the_low_target): Install x86_emit_ops.
6855 * server.h (struct emit_ops): New.
6856 (get_raw_reg_func_addr): Declare.
6857 (current_insn_ptr, emit_error): Declare.
6858 * tracepoint.c (get_raw_reg, get_trace_state_variable_value)
6859 (set_trace_state_variable_value): New defines.
6860 (struct ipa_sym_addresses): New fields addr_get_raw_reg,
6861 addr_get_trace_state_variable_value and
6862 addr_set_trace_state_variable_value.
6863 (symbol_list): New fields for get_raw_reg,
6864 get_trace_state_variable_value and set_trace_state_variable_value.
6865 (condfn): New typedef.
6866 (struct tracepoint): New field `compiled_cond'.
6867 (do_action_at_tracepoint): Clear compiled_cond.
6868 (get_trace_state_variable_value, set_trace_state_variable_value):
6869 Export in the IPA.
6870 (condition_true_at_tracepoint): If there's a compiled condition,
6871 run that.
6872 (current_insn_ptr, emit_error): New globals.
6873 (struct bytecode_address): New.
6874 (get_raw_reg_func_addr): New.
6875 (emit_prologue, emit_epilogue, emit_add, emit_sub, emit_mul)
6876 (emit_lsh, emit_rsh_signed, emit_rsh_unsigned, emit_ext)
6877 (emit_log_not, emit_bit_and, emit_bit_or, emit_bit_xor)
6878 (emit_bit_not, emit_equal, emit_less_signed, emit_less_unsigned)
6879 (emit_ref, emit_if_goto, emit_goto, write_goto_address, emit_const)
6880 (emit_reg, emit_pop, emit_stack_flush, emit_zero_ext, emit_swap)
6881 (emit_stack_adjust, emit_int_call_1, emit_void_call_2): New.
6882 (compile_tracepoint_condition, compile_bytecodes): New.
6883 * target.h (emit_ops): Forward declare.
6884 (struct target_ops): New field emit_ops.
6885 (target_emit_ops): New.
6886 * linux-amd64-ipa.c (gdb_agent_get_raw_reg): New.
6887 * linux-i386-ipa.c (gdb_agent_get_raw_reg): New.
6888 * linux-low.c (linux_emit_ops): New.
6889 (linux_target_ops): Install it.
6890 * linux-low.h (struct linux_target_ops): New field emit_ops.
6891
92b72907
UW
68922010-06-14 Ulrich Weigand <uweigand@de.ibm.com>
6893
6894 * linux-ppc-low.c (ppc_arch_setup): Use private regcache to test MSR.
6895 * linux-s390-low.c (ppc_arch_setup): Use private regcache to test PSW.
6896
fa593d66
PA
68972010-06-01 Pedro Alves <pedro@codesourcery.com>
6898 Stan Shebs <stan@codesourcery.com>
6899
6900 * Makefile.in (IPA_DEPFILES, extra_libraries): New.
6901 (all): Depend on $(extra_libraries).
6902 (install-only): Install the IPA.
6903 (IPA_OBJS, IPA_LIB): New.
6904 (clean): Remove the IPA lib.
6905 (IPAGENT_CFLAGS): New.
6906 (tracepoint-ipa.o, utils-ipa.o, remote-utils-ipa.o)
6907 (regcache-ipa.o, i386-linux-ipa.o, linux-i386-ipa.o)
6908 (linux-amd64-ipa.o, amd64-linux-ipa.o): New rules.
6909 * linux-amd64-ipa.c, linux-i386-ipa.c: New files.
6910 * configure.ac: Check for atomic builtins support in the compiler.
6911 (IPA_DEPFILES, extra_libraries): Define.
6912 * configure.srv (ipa_obj): Add description.
6913 (ipa_i386_linux_regobj, ipa_amd64_linux_regobj): Define.
6914 (i[34567]86-*-linux*): Set ipa_obj.
6915 (x86_64-*-linux*): Set ipa_obj.
6916 * linux-low.c (stabilizing_threads): New.
6917 (supports_fast_tracepoints): New.
6918 (linux_detach): Stabilize threads before detaching.
6919 (handle_tracepoints): Handle internal tracing breakpoints. Assert
6920 the lwp is either not stabilizing, or is moving out of a jump pad.
6921 (linux_fast_tracepoint_collecting): New.
6922 (maybe_move_out_of_jump_pad): New.
6923 (enqueue_one_deferred_signal): New.
6924 (dequeue_one_deferred_signal): New.
6925 (linux_wait_for_event_1): If moving out of a jump pad, defer
6926 pending signals to later.
6927 (linux_stabilize_threads): New.
6928 (linux_wait_1): Check if threads need moving out of jump pads, and
6929 do it if so.
6930 (stuck_in_jump_pad_callback): New.
6931 (move_out_of_jump_pad_callback): New.
6932 (lwp_running): New.
6933 (linux_resume_one_lwp): Handle moving out of jump pads.
6934 (linux_set_resume_request): Dequeue deferred signals.
6935 (need_step_over_p): Also step over fast tracepoint jumps.
6936 (start_step_over): Also uninsert fast tracepoint jumps.
6937 (finish_step_over): Also reinsert fast tracepoint jumps.
6938 (linux_install_fast_tracepoint_jump): New.
6939 (linux_target_ops): Install linux_stabilize_threads and
6940 linux_install_fast_tracepoint_jump_pad.
6941 * linux-low.h (linux_target_ops) <get_thread_area,
6942 install_fast_tracepoint_jump_pad>: New fields.
6943 (struct lwp_info) <collecting_fast_tracepoint,
6944 pending_signals_to_report, exit_jump_pad_bkpt>: New fields.
6945 (linux_get_thread_area): Declare.
6946 * linux-x86-low.c (jump_insn): New.
6947 (x86_get_thread_area): New.
6948 (append_insns): New.
6949 (push_opcode): New.
6950 (amd64_install_fast_tracepoint_jump_pad): New.
6951 (i386_install_fast_tracepoint_jump_pad): New.
6952 (x86_install_fast_tracepoint_jump_pad): New.
6953 (the_low_target): Install x86_get_thread_area and
6954 x86_install_fast_tracepoint_jump_pad.
6955 * mem-break.c (set_raw_breakpoint_at): Use read_inferior_memory.
6956 (struct fast_tracepoint_jump): New.
6957 (fast_tracepoint_jump_insn): New.
6958 (fast_tracepoint_jump_shadow): New.
6959 (find_fast_tracepoint_jump_at): New.
6960 (fast_tracepoint_jump_here): New.
6961 (delete_fast_tracepoint_jump): New.
6962 (set_fast_tracepoint_jump): New.
6963 (uninsert_fast_tracepoint_jumps_at): New.
6964 (reinsert_fast_tracepoint_jumps_at): New.
6965 (set_breakpoint_at): Use write_inferior_memory.
6966 (uninsert_raw_breakpoint): Use write_inferior_memory.
6967 (check_mem_read): Mask out fast tracepoint jumps.
6968 (check_mem_write): Mask out fast tracepoint jumps.
6969 * mem-break.h (struct fast_tracepoint_jump): Forward declare.
6970 (set_fast_tracepoint_jump): Declare.
6971 (delete_fast_tracepoint_jump)
6972 (fast_tracepoint_jump_here, uninsert_fast_tracepoint_jumps_at)
6973 (reinsert_fast_tracepoint_jumps_at): Declare.
6974 * regcache.c: Don't compile many functions when building the
6975 in-process agent library.
6976 (init_register_cache) [IN_PROCESS_AGENT]: Don't allow allocating
6977 the register buffer in the heap.
6978 (free_register_cache): If the register buffer isn't owned by the
6979 regcache, don't free it.
6980 (set_register_cache) [IN_PROCESS_AGENT]: Don't re-alocate
6981 pre-existing register caches.
6982 * remote-utils.c (convert_int_to_ascii): Constify `from' parameter
6983 type.
6984 (convert_ascii_to_int): : Constify `from' parameter type.
6985 (decode_M_packet, decode_X_packet): Replace the `to' parameter by
6986 a `to_p' pointer to pointer parameter. If TO_P is NULL, malloc
6987 the needed buffer in-place.
6988 (relocate_instruction): New.
6989 * server.c (handle_query) <qSymbols>: If the target supports
6990 tracepoints, give it a chance of looking up symbols. Report
6991 support for fast tracepoints.
6992 (handle_status): Stabilize threads.
6993 (process_serial_event): Adjust.
6994 * server.h (struct fast_tracepoint_jump): Forward declare.
6995 (struct process_info) <fast_tracepoint_jumps>: New field.
6996 (convert_ascii_to_int, convert_int_to_ascii): Adjust.
6997 (decode_X_packet, decode_M_packet): Adjust.
6998 (relocate_instruction): Declare.
6999 (in_process_agent_loaded): Declare.
7000 (tracepoint_look_up_symbols): Declare.
7001 (struct fast_tpoint_collect_status): Declare.
7002 (fast_tracepoint_collecting): Declare.
7003 (force_unlock_trace_buffer): Declare.
7004 (handle_tracepoint_bkpts): Declare.
7005 (initialize_low_tracepoint)
7006 (supply_fast_tracepoint_registers) [IN_PROCESS_AGENT]: Declare.
7007 * target.h (struct target_ops) <stabilize_threads,
7008 install_fast_tracepoint_jump_pad>: New fields.
7009 (stabilize_threads, install_fast_tracepoint_jump_pad): New.
7010 * tracepoint.c [HAVE_MALLOC_H]: Include malloc.h.
7011 [HAVE_STDINT_H]: Include stdint.h.
7012 (trace_debug_1): Rename to ...
7013 (trace_vdebug): ... this.
7014 (trace_debug): Rename to ...
7015 (trace_debug_1): ... this. Add `level' parameter.
7016 (trace_debug): New.
7017 (ATTR_USED, ATTR_NOINLINE): New.
7018 (IP_AGENT_EXPORT): New.
7019 (gdb_tp_heap_buffer, gdb_jump_pad_buffer, gdb_jump_pad_buffer_end)
7020 (collecting, gdb_collect, stop_tracing, flush_trace_buffer)
7021 (about_to_request_buffer_space, trace_buffer_is_full)
7022 (stopping_tracepoint, expr_eval_result, error_tracepoint)
7023 (tracepoints, tracing, trace_buffer_ctrl, trace_buffer_ctrl_curr)
7024 (trace_buffer_lo, trace_buffer_hi, traceframe_read_count)
7025 (traceframe_write_count, traceframes_created)
7026 (trace_state_variables)
7027 New renaming defines.
7028 (struct ipa_sym_addresses): New.
7029 (STRINGIZE_1, STRINGIZE, IPA_SYM): New.
7030 (symbol_list): New.
7031 (ipa_sym_addrs): New.
7032 (all_tracepoint_symbols_looked_up): New.
7033 (in_process_agent_loaded): New.
7034 (write_e_ipa_not_loaded): New.
7035 (maybe_write_ipa_not_loaded): New.
7036 (tracepoint_look_up_symbols): New.
7037 (debug_threads) [IN_PROCESS_AGENT]: New.
7038 (read_inferior_memory) [IN_PROCESS_AGENT]: New.
7039 (UNKNOWN_SIDE_EFFECTS): New.
7040 (stop_tracing): New.
7041 (flush_trace_buffer): New.
7042 (stop_tracing_bkpt): New.
7043 (flush_trace_buffer_bkpt): New.
7044 (read_inferior_integer): New.
7045 (read_inferior_uinteger): New.
7046 (read_inferior_data_pointer): New.
7047 (write_inferior_data_pointer): New.
7048 (write_inferior_integer): New.
7049 (write_inferior_uinteger): New.
7050 (struct collect_static_trace_data_action): Delete.
7051 (enum tracepoint_type): New.
7052 (struct tracepoint) <type>: New field `type'.
43aaf8b6
PA
7053 <actions_str, step_actions, step_actions_str>: Only include in
7054 GDBserver.
fa593d66
PA
7055 <orig_size, obj_addr_on_target, adjusted_insn_addr>
7056 <adjusted_insn_addr_end, jump_pad, jump_pad_end>: New fields.
7057 (tracepoints): Use IP_AGENT_EXPORT.
7058 (last_tracepoint): Don't include in the IPA.
7059 (stopping_tracepoint): Use IP_AGENT_EXPORT.
7060 (trace_buffer_is_full): Use IP_AGENT_EXPORT.
7061 (alloced_trace_state_variables): New.
7062 (trace_state_variables): Use IP_AGENT_EXPORT.
7063 (traceframe_t): Delete unused variable.
7064 (circular_trace_buffer): Don't include in the IPA.
7065 (trace_buffer_start): Delete.
7066 (struct trace_buffer_control): New.
7067 (trace_buffer_free): Delete.
7068 (struct ipa_trace_buffer_control): New.
7069 (GDBSERVER_FLUSH_COUNT_MASK, GDBSERVER_FLUSH_COUNT_MASK_PREV)
7070 (GDBSERVER_FLUSH_COUNT_MASK_CURR, GDBSERVER_UPDATED_FLUSH_COUNT_BIT):
7071 New.
7072 (trace_buffer_ctrl): New.
7073 (TRACE_BUFFER_CTRL_CURR): New.
7074 (trace_buffer_start, trace_buffer_free, trace_buffer_end_free):
7075 Reimplement as macros.
7076 (trace_buffer_wrap): Delete.
7077 (traceframe_write_count, traceframe_read_count)
7078 (traceframes_created, tracing): Use IP_AGENT_EXPORT.
7079 (struct tracepoint_hit_ctx) <type>: New field.
7080 (struct fast_tracepoint_ctx): New.
7081 (memory_barrier): New.
7082 (cmpxchg): New.
7083 (record_tracepoint_error): Update atomically in the IPA.
7084 (clear_inferior_trace_buffer): New.
7085 (about_to_request_buffer_space): New.
7086 (trace_buffer_alloc): Handle GDBserver and inferior simulatenous
7087 updating the same buffer.
7088 (add_tracepoint): Default the tracepoint's type to trap
7089 tracepoint, and orig_size to -1.
7090 (get_trace_state_variable) [IN_PROCESS_AGENT]: Handle allocated
7091 internal variables.
7092 (create_trace_state_variable): New parameter `gdb'. Handle it.
7093 (clear_installed_tracepoints): Clear fast tracepoint jumps.
7094 (cmd_qtdp): Handle fast tracepoints.
7095 (cmd_qtdv): Adjust.
7096 (max_jump_pad_size): New.
7097 (gdb_jump_pad_head): New.
7098 (get_jump_space_head): New.
7099 (claim_jump_space): New.
7100 (sort_tracepoints): New.
7101 (MAX_JUMP_SIZE): New.
7102 (cmd_qtstart): Handle fast tracepoints. Sync tracepoints with the
7103 IPA.
7104 (stop_tracing) [IN_PROCESS_AGENT]: Don't include the tdisconnected
7105 support. Upload fast traceframes, and delete internal IPA
7106 breakpoints.
7107 (stop_tracing_handler): New.
7108 (flush_trace_buffer_handler): New.
7109 (cmd_qtstop): Upload fast tracepoints.
7110 (response_tracepoint): Handle fast tracepoints.
7111 (tracepoint_finished_step): Upload fast traceframes. Set the
7112 tracepoint hit context's tracepoint type.
7113 (handle_tracepoint_bkpts): New.
7114 (tracepoint_was_hit): Set the tracepoint hit context's tracepoint
7115 type. Add comment about fast tracepoints.
7116 (collect_data_at_tracepoint) [IN_PROCESS_AGENT]: Don't access the
7117 non-existing action_str field.
7118 (get_context_regcache): Handle fast tracepoints.
7119 (do_action_at_tracepoint) [!IN_PROCESS_AGENT]: Don't write the PC
7120 to the regcache.
7121 (fast_tracepoint_from_jump_pad_address): New.
7122 (fast_tracepoint_from_ipa_tpoint_address): New.
7123 (collecting_t): New.
7124 (force_unlock_trace_buffer): New.
7125 (fast_tracepoint_collecting): New.
7126 (collecting): New.
7127 (gdb_collect): New.
7128 (write_inferior_data_ptr): New.
7129 (target_tp_heap): New.
7130 (target_malloc): New.
7131 (download_agent_expr): New.
7132 (UALIGN): New.
7133 (download_tracepoints): New.
7134 (download_trace_state_variables): New.
7135 (upload_fast_traceframes): New.
7136 (IPA_FIRST_TRACEFRAME): New.
7137 (IPA_NEXT_TRACEFRAME_1): New.
7138 (IPA_NEXT_TRACEFRAME): New.
7139 [IN_PROCESS_AGENT]: Include sys/mman.h and fcntl.h.
7140 [IN_PROCESS_AGENT] (gdb_tp_heap_buffer, gdb_jump_pad_buffer)
7141 (gdb_jump_pad_buffer_end): New.
7142 [IN_PROCESS_AGENT] (initialize_tracepoint_ftlib): New.
7143 (initialize_tracepoint): Adjust.
7144 [IN_PROCESS_AGENT]: Allocate the IPA heap, and jump pad scratch
7145 buffer. Initialize the low module.
7146 * utils.c (PREFIX, TOOLNAME): New.
7147 (malloc_failure): Use PREFIX.
7148 (error): In the IPA, an error causes an exit.
7149 (fatal, warning): Use PREFIX.
7150 (internal_error): Use TOOLNAME.
7151 (NUMCELLS): Increase to 10.
7152 * configure, config.in: Regenerate.
7153
d149dd1d
PA
71542010-06-01 Pedro Alves <pedro@codesourcery.com>
7155
7156 * server.c (handle_query) <qSupported>: Do two passes over the
7157 qSupported string to avoid nesting strtok.
7158
f6528abd
JK
71592010-05-28 Jan Kratochvil <jan.kratochvil@redhat.com>
7160
7161 * Makefile.in (SFILES): Add $(srcdir)/proc-service.list.
7162 (CDEPS): New.
7163 * configure.ac (RDYNAMIC): New AC_MSG_CHECKING wrapping. Test also
7164 -Wl,--dynamic-list.
7165 * configure: Regenerate.
7166 * proc-service.list: New.
7167
ca2a87a0
JK
71682010-05-28 Jan Kratochvil <jan.kratochvil@redhat.com>
7169
7170 * linux-low.c (linux_core_of_thread): Fix crash on invalid CONTENT.
7171 New comment.
7172
363a6e9f
OS
71732010-05-26 Ozkan Sezer <sezeroz@gmail.com>
7174
7175 * gdbreplay.c (remote_open): Check error return from socket() call by
7176 its equality to -1 not by it being negative.
7177 * remote-utils.c (remote_open): Likewise.
7178
d23b6cb1
PA
71792010-05-23 Pedro Alves <pedro@codesourcery.com>
7180
7181 * config.h: Regenerate.
7182
28d3cf85
MK
71832010-05-19 Maxim Kuvyrkov <maxim@codesourcery.com>
7184
7185 * linux-m68k-low.c (ps_get_thread_area): Don't define if kernel
7186 doesn't provide PTRACE_GET_THREAD_AREA.
7187
fea36a59
MK
71882010-05-19 Maxim Kuvyrkov <maxim@codesourcery.com>
7189
7190 * linux-m68k-low.c: Include <asm/ptrace.h>
7191 (ps_get_thread_area): Implement.
7192
24b066ba
DE
71932010-05-03 Doug Evans <dje@google.com>
7194
7195 * event-loop.c (struct callback_event): New struct.
7196 (callback_list): New global.
7197 (append_callback_event, delete_callback_event): New functions.
7198 (process_callback): New function.
7199 (start_event_loop): Call it.
7200 * remote-utils.c (NOT_SCHEDULED): Define.
7201 (readchar_buf, readchar_bufcnt, readchar_bufp): New static globals,
7202 moved out of readchar.
7203 (readchar): Rewrite. Call reschedule before returning.
7204 (reset_readchar): New function.
7205 (remote_close): Call it.
7206 (process_remaining, reschedule): New functions.
7207 * server.h (callback_handler_func): New typedef.
7208 (append_callback_event, delete_callback_event): Declare.
7209
9836d6ea
PA
72102010-05-03 Pedro Alves <pedro@codesourcery.com>
7211
7212 * proc-service.c (ps_pglobal_lookup): Use
7213 thread_db_look_up_one_symbol.
7214 * remote-utils.c (look_up_one_symbol): Add new `may_ask_gdb'
7215 parameter. Use it instead of all_symbols_looked_up.
7216 * server.h (struct process_info) <all_symbols_looked_up>: Delete
7217 field.
7218 (all_symbols_looked_up): Don't declare.
7219 (look_up_one_symbol): Add new `may_ask_gdb' parameter.
7220 * thread-db.c (struct thread_db) <all_symbols_looked_up>: New
7221 field.
7222 (thread_db_look_up_symbols): Adjust call to look_up_one_symbol.
7223 Set all_symbols_looked_up here.
7224 (thread_db_look_up_one_symbol): New.
7225 (thread_db_get_tls_address): Adjust.
7226 (thread_db_load_search, try_thread_db_load_1): Always allocate the
7227 thread_db object on the heap, and tentatively set it in the
7228 process structure.
7229 (thread_db_init): Don't set all_symbols_looked_up here.
7230 * linux-low.h (thread_db_look_up_one_symbol): Declare.
7231
7984d532
PA
72322010-05-03 Pedro Alves <pedro@codesourcery.com>
7233
7234 * linux-low.c (linux_kill, linux_detach): Adjust.
7235 (status_pending_p_callback): Remove redundant statement. Check
7236 for !TARGET_WAITIKIND_IGNORE, instead of
7237 TARGET_WAITKIND_STOPPED.
7238 (handle_tracepoints): Make sure LWP is locked. Adjust.
7239 (linux_wait_for_event_1): Adjust.
7240 (linux_cancel_breakpoints): New.
7241 (unsuspend_one_lwp): New.
7242 (unsuspend_all_lwps): New.
7243 (linux_wait_1): If finishing a step-over, unsuspend all lwps.
7244 (send_sigstop_callback): Change return type to int, add new
7245 `except' parameter and handle it.
7246 (suspend_and_send_sigstop_callback): New.
7247 (stop_all_lwps): Add new `suspend' and `expect' parameters, and
7248 pass them down. If SUSPEND, also increment the lwp's suspend
7249 count.
7250 (linux_resume_one_lwp): Add notice about resuming a suspended LWP.
7251 (need_step_over_p): Don't consider suspended LWPs.
7252 (start_step_over): Adjust.
7253 (proceed_one_lwp): Change return type to int, add new `except'
7254 parameter and handle it.
7255 (unsuspend_and_proceed_one_lwp): New.
7256 (proceed_all_lwps): Use find_inferior instead of
7257 for_each_inferior.
7258 (unstop_all_lwps): Add `unsuspend' parameter. If UNSUSPEND, them
7259 also decrement the suspend count of LWPs. Pass `except' down,
7260 instead of hacking its suspend count.
7261 (linux_pause_all): Add `freeze' parameter. Adjust.
7262 (linux_unpause_all): New.
7263 (linux_target_ops): Install linux_unpause_all.
7264 * server.c (handle_status): Adjust.
7265 * target.h (struct target_ops): New fields `unpause_all' and
7266 `cancel_breakpoints'. Add new parameter to `pause_all'.
7267 (pause_all): Add new `freeze' parameter.
7268 (unpause_all): New.
7269 (cancel_breakpoints): New.
7270 * tracepoint.c (clear_installed_tracepoints): Pause threads, and
7271 cancel breakpoints.
7272 (cmd_qtstart): Pause threads.
7273 (stop_tracing): Pause threads, and cancel breakpoints.
7274 * win32-low.c (win32_target_ops): Adjust.
7275
e471f25b
PA
72762010-05-03 Pedro Alves <pedro@codesourcery.com>
7277
7278 * linux-low.c (linux_wait_for_event_1): Move passing the signal to
7279 the inferior right away from here...
7280 (linux_wait_1): ... to here, and adjust to check the thread's
7281 last_resume_kind instead of the lwp's step or stop_expected flags.
7282
1915ef4f
PA
72832010-05-02 Pedro Alves <pedro@codesourcery.com>
7284
7285 * README: Use consistent `GDB' and `GDBserver' spellings.
7286
f9e39928
PA
72872010-05-02 Pedro Alves <pedro@codesourcery.com>
7288
7289 * linux-low.c (linux_kill_one_lwp): Assume the lwp is stopped.
7290 (linux_kill): Stop all lwps here. Don't delete the main lwp here.
7291 (linux_detach_one_lwp): Assume the lwp is stopped.
7292 (any_thread_of): Delete.
7293 (linux_detach): Stop all lwps here. Don't blindly delete all
7294 breakpoints.
7295 (delete_lwp_callback): New.
7296 (linux_mourn): Delete all lwps of the process that is gone.
7297 (linux_wait_1): Don't delete the last lwp of the process here.
7298 * mem-break.h (mark_breakpoints_out): Declare.
7299 * mem-break.c (mark_breakpoints_out): New.
7300 (free_all_breakpoints): Use it.
7301 * server.c (handle_target_event): If the process is gone, mark
7302 breakpoints out.
7303 * thread-db.c (struct thread_db) <create_bp>: New field.
7304 (thread_db_enable_reporting): Fix prototype. Store a thread event
7305 breakpoint reference in the thread_db struct.
7306 (thread_db_load_search): Clear the thread_db object.
7307 (try_thread_db_load_1): Ditto.
7308 (switch_to_process): New.
7309 (disable_thread_event_reporting): Use it.
7310 (remove_thread_event_breakpoints): New.
7311 (thread_db_detach, thread_db_mourn): Use it.
7312
1e7fc18c
PA
73132010-05-01 Pedro Alves <pedro@codesourcery.com>
7314
7315 * linux-low.c (linux_enable_event_reporting): New.
7316 (linux_wait_for_event_1, handle_extended_wait): Use it.
7317
02fc4de7
PA
73182010-04-30 Pedro Alves <pedro@codesourcery.com>
7319
7320 * linux-low.c (linux_kill_one_lwp, linux_kill)
7321 (linux_detach_one_lwp): Adjust to send_sigstop interface change.
7322 (send_sigstop): Take an lwp_info as parameter instead. Queue a
7323 SIGSTOP even if the LWP is stopped.
7324 (send_sigstop_callback): New.
7325 (stop_all_lwps): Use send_sigstop_callback instead.
7326 (linux_resume_one_thread): Adjust.
7327 (proceed_one_lwp): Still proceed an LWP that the client has
7328 requested to stop, if we haven't reported it as stopped yet. Make
7329 sure that LWPs the client want stopped, have a pending SIGSTOP.
7330
bc3b5632
DE
73312010-04-26 Doug Evans <dje@google.com>
7332
ae1ada35
DE
7333 * server.c (handle_general_set): Make static.
7334
bc3b5632
DE
7335 * remote-utils.c (putpkt_binary_1): Call readchar instead of read.
7336 Print received char after testing for error/eof instead of before.
7337 (input_interrupt): Tweak comment.
7338
65730243
DE
73392010-04-23 Doug Evans <dje@google.com>
7340
7341 * server.c (start_inferior): Print inferior argv if --debug.
7342
a8ae7dc0
AR
73432010-04-21 Aleksandar Ristovski <aristovski@qnx.com>
7344
7345 * Makefile.in (nto_low_h nto-low.o nto-x86-low.o): New dependency lists.
7346 * nto-x86-low.c: Include server.h
7347
1c07cc19
PM
73482010-04-20 Pierre Muller <muller@ics.u-strasbg.fr>
7349
7350 * win32-i386-low.c: Use __x86_64__ macro instead of __x86_64 to
7351 be consistent with other sources of this directory.
7352 (init_registers_amd64): Correct name of source file of this function
7353 in the comment.
7354
e0a61e09
PM
73552010-04-19 Pierre Muller <muller@ics.u-strasbg.fr>
7356
7357 * configure.srv (x86_64-*-mingw*): New configuration for Windows
7358 64-bit executables.
7359
54709339
PM
73602010-04-19 Pierre Muller <muller@ics.u-strasbg.fr>
7361
7362 * win32-i386-low.c: Add 64-bit support.
7363 (CONTEXT_EXTENDED_REGISTERS): Set macro to zero if not exisiting.
7364 (init_registers_amd64): Declare.
7365 (mappings): Add 64-bit version of array.
7366 (init_windows_x86): New function.
7367 (the_low_target): Change init_arch field to init_windows_x86.
7368
e8f0053d
PM
73692010-04-19 Pierre Muller <muller@ics.u-strasbg.fr>
7370
7371 * win32-low.c: Adapt to support also 64-bit architecture.
7372 (child_xfer_memory): Use uintptr_t type for local variable `addr'.
7373 (get_image_name): Use SIZE_T type for local variable `done'.
7374 (psapi_get_dll_name): Use LPVOID type for parameter `BaseAddress'.
7375 (toolhelp_get_dll_name): Idem.
7376 (handle_load_dll): Use CORE_ADDR type for local variable `load_addr'.
7377 Use uintptr_t typecast to avoid warning.
7378 (handle_unload_dll): Use uintptr_t typecast to avoid warning.
7379 (handle_exception): Use phex_nz to avoid warning.
7380 (win32_wait): Remove unused local variable `process'.
7381
c481e77e
PM
73822010-04-19 Pierre Muller <muller@ics.u-strasbg.fr>
7383
7384 * configure.srv (srv_amd64_regobj): Replace `x86-64-avx.o' by
7385 `amd64-avx.o'.
7386
12ea4b69
PM
73872010-04-17 Pierre Muller <muller@ics.u-strasbg.fr>
7388
7389 * configure.ac: Use `ws2_32' library for srv_mingw.
7390 * configure: Regenerate.
7391 * gdbreplay.c: Include winsock2.h instead of winsock.h.
7392 * remote-utils.c: Likewise.
7393
f6d1620c
L
73942010-04-17 H.J. Lu <hongjiu.lu@intel.com>
7395
7396 * linux-x86-low.c (xmltarget_amd64_linux_no_xml): Define only
7397 if __x86_64__ is defined.
7398
8e642873
PM
73992010-04-16 Pierre Muller <muller@ics.u-strasbg.fr>
7400
7401 * configure: Regenerate.
7402
711e434b
PM
74032010-04-16 Pierre Muller <muller@ics.u-strasbg.fr>
7404
7405 * server.c (handle_query): Handle 'qGetTIBAddr' query.
7406 * target.h (target_ops): New get_tib_address field.
7407 * win32-low.h (win32_thread_info): Add thread_local_base field.
7408 * win32-low.c (child_add_thread): Add tlb argument.
7409 Set thread_local_base field to TLB.
7410 (get_child_debug_event): Adapt to child_add_thread change.
7411 (win32_get_tib_address): New function.
7412 (win32_target_ops): Set get_tib_address field to
7413 win32_get_tib_address.
7414 * linux-low.c (linux_target_ops): Set get_tib_address field to NULL.
7415
505106cd
PA
74162010-04-12 Pedro Alves <pedro@codesourcery.com>
7417
505106cd
PA
7418 * linux-low.c (linux_mourn): Also remove the process.
7419 * server.c (handle_target_event): Don't remove the process here.
7420 * nto-low.c (nto_mourn): New.
7421 (nto_target_ops): Install it.
7422 * spu-low.c (spu_mourn): New.
7423 (spu_target_ops): Install it.
7424 * win32-low.c (win32_mourn): New.
7425 (win32_target_ops): Install it.
7426
e8470a06
PA
74272010-04-12 Pedro Alves <pedro@codesourcery.com>
7428
7429 * server.h (buffer_xml_printf): Remove redundant `;'.
7430
45ba0d02
PA
74312010-04-12 Pedro Alves <pedro@codesourcery.com>
7432
7433 * regcache.c (set_register_cache): Invalidate regcaches before
7434 changing the register cache layout.
7435 (regcache_invalidate_one): Allow a NULL regcache.
7436 * linux-x86-low.c (x86_linux_update_xmltarget): Invalidate
7437 regcaches before changing the register cache layout or the target
7438 regsets.
7439
59e04013
L
74402010-04-12 H.J. Lu <hongjiu.lu@intel.com>
7441
7442 * linux-x86-low.c (x86_linux_update_xmltarget): Avoid unused
7443 variable warning on Linux/x86-64.
7444
8336d594
PA
74452010-04-11 Pedro Alves <pedro@codesourcery.com>
7446
7447 GDBserver disconnected tracing support.
7448
7449 * linux-low.c (linux_remove_process): Delete.
7450 (add_lwp): Don't set last_resume_kind here.
7451 (linux_kill): Use `mourn'.
7452 (linux_detach): Use `thread_db_detach', and `mourn'.
7453 (linux_mourn): New.
7454 (linux_attach_lwp_1): Adjust comment.
7455 (linux_attach): last_resume_kind moved the thread_info; adjust.
7456 (status_pending_p_callback): Adjust.
7457 (linux_wait_for_event_1): Adjust.
7458 (count_events_callback, select_singlestep_lwp_callback)
7459 (select_event_lwp_callback, cancel_breakpoints_callback)
7460 (db_wants_lwp_stopped, linux_wait_1, need_step_over_p)
7461 (proceed_one_lwp): Adjust.
7462 (linux_async): Add debug output.
7463 (linux_thread_stopped): New.
7464 (linux_pause_all): New.
7465 (linux_target_ops): Install linux_mourn, linux_thread_stopped and
7466 linux_pause_all.
7467 * linux-low.h (struct lwp_info): Delete last_resume_kind field.
7468 (thread_db_free): Delete declaration.
7469 (thread_db_detach, thread_db_mourn): Declare.
7470 * thread-db.c (thread_db_init): Use thread_db_mourn.
7471 (thread_db_free): Delete, split in two.
7472 (disable_thread_event_reporting): New.
7473 (thread_db_detach): New.
7474 (thread_db_mourn): New.
7475
7476 * server.h (struct thread_info) <last_resume_kind>: New field.
7477 <attached>: Add comment.
7478 <gdb_detached>: New field.
7479 (handler_func): Change return type to int.
7480 (handle_serial_event, handle_target_event): Ditto.
7481 (gdb_connected): Declare.
7482 (tracing): Delete.
7483 (disconnected_tracing): Declare.
7484 (stop_tracing): Declare.
7485
7486 * server.c (handle_query) <qSupported>: Report support for
7487 disconnected tracing.
7488 (queue_stop_reply_callback): Account for running threads.
7489 (gdb_wants_thread_stopped): New.
7490 (gdb_wants_all_threads_stopped): New.
7491 (gdb_reattached_process): New.
7492 (handle_status): Clear the `gdb_detached' flag of all processes.
7493 In all-stop, stop all threads.
7494 (main): Be sure to leave tfind mode. Handle disconnected tracing.
7495 (process_serial_event): If the remote connection breaks, or if an
7496 exit was forced with "monitor exit", force an event loop exit.
7497 Handle disconnected tracing on detach.
7498 (handle_serial_event): Adjust.
7499 (handle_target_event): If GDB isn't connected, forward events back
7500 to the inferior, unless the last process exited, in which case,
7501 exit gdbserver. Adjust interface.
7502
7503 * remote-utils.c (remote_open): Don't block in accept. Instead
7504 register an event loop source on the listen socket file
7505 descriptor. Refactor bits into ...
7506 (listen_desc): ... this new global.
7507 (gdb_connected): ... this new function.
7508 (enable_async_notification): ... this new function.
7509 (handle_accept_event): ... this new function.
7510 (remote_close): Clear remote_desc.
7511
7512 * inferiors.c (add_thread): Set the new thread's last_resume_kind.
7513
7514 * target.h (struct target_ops) <mourn, thread_stopped, pause_all>:
7515 New fields.
7516 (mourn_inferior): Define.
7517 (target_process_qsupported): Avoid the dangling else problem.
7518 (thread_stopped): Define.
7519 (pause_all): Define.
7520 (target_waitstatus_to_string): Declare.
7521 * target.c (target_waitstatus_to_string): New.
7522
7523 * tracepoint.c (tracing): Make extern.
7524 (disconnected_tracing): New.
7525 (stop_tracing): Make extern. Handle tracing stops due to GDB
7526 disconnecting.
7527 (cmd_qtdisconnected): New.
7528 (cmd_qtstatus): Report disconnected tracing status in trace reply.
7529 (handle_tracepoint_general_set): Handle QTDisconnected.
7530
7531 * event-loop.c (event_handler_func): Change return type to int.
7532 (process_event): Bail out if the event handler wants the event
7533 loop to stop.
7534 (handle_file_event): Ditto.
7535 (start_event_loop): Bail out if the event handler wants the event
7536 loop to stop.
7537
7538 * nto-low.c (nto_target_ops): Adjust.
7539 * spu-low.c (spu_wait): Don't remove the process here.
7540 (spu_target_ops): Adjust.
7541 * win32-low.c (win32_wait): Don't remove the process here.
7542 (win32_target_ops): Adjust.
7543
5d267c4c
PA
75442010-04-11 Pedro Alves <pedro@codesourcery.com>
7545
7546 * regcache.c (realloc_register_cache): Invalidate inferior's
7547 regcache before recreating it.
7548
623ccd72
PA
75492010-04-09 Pedro Alves <pedro@codesourcery.com>
7550
7551 * tracepoint.c (cmd_qtstatus): Report trace buffer circularity.
7552
219f2f23
PA
75532010-04-09 Stan Shebs <stan@codesourcery.com>
7554 Pedro Alves <pedro@codesourcery.com>
7555
7556 * server.h (LONGEST): New.
7557 (struct thread_info) <while_stepping>: New field.
7558 (unpack_varlen_hex, xrealloc, pulongest, plongest, phex_nz):
7559 Declare.
7560 (initialize_tracepoint, handle_tracepoint_general_set)
7561 (handle_tracepoint_query, tracepoint_finished_step)
7562 (tracepoint_was_hit, release_while_stepping_state_list):
7563 (current_traceframe): Declare.
7564 * server.c (handle_general_set): Handle tracepoint packets.
7565 (read_memory): New.
7566 (write_memory): New.
7567 (handle_search_memory_1): Use read_memory.
7568 (handle_query): Report support for conditional tracepoints, trace
7569 state variables, and tracepoint sources. Handle tracepoint
7570 queries.
7571 (main): Initialize the tracepoints module.
7572 (process_serial_event): Handle traceframe reads/writes.
7573
7574 * linux-low.c (handle_tracepoints): New.
7575 (linux_wait_1): Call it.
7576 (linux_resume_one_lwp): Handle while-stepping.
7577 (linux_supports_tracepoints, linux_read_pc, linux_write_pc): New.
7578 (linux_target_ops): Install them.
7579 * linux-low.h (struct linux_target_ops) <supports_tracepoints>:
7580 New field.
7581 * linux-x86-low.c (x86_supports_tracepoints): New.
7582 (the_low_target). Install it.
7583
7584 * mem-break.h (delete_breakpoint): Declare.
7585 * mem-break.c (delete_breakpoint): Make external.
7586
7587 * target.h (struct target_ops): Add `supports_tracepoints',
7588 `read_pc', and `write_pc' fields.
7589 (target_supports_tracepoints): Define.
7590 * utils.c (xrealloc, decimal2str, pulongest, plongest, thirty_two)
7591 (phex_nz): New.
7592
7593 * regcache.h (struct regcache) <registers_owned>: New field.
7594 (init_register_cache, regcache_cpy): Declare.
7595 (regcache_read_pc, regcache_write_pc): Declare.
7596 (register_cache_size): Declare.
7597 (supply_regblock): Declare.
7598 * regcache.c (init_register_cache): New.
7599 (new_register_cache): Use it.
7600 (regcache_cpy): New.
7601 (register_cache_size): New.
7602 (supply_regblock): New.
7603 (regcache_read_pc, regcache_write_pc): New.
889bf7c5 7604
219f2f23
PA
7605 * tracepoint.c: New.
7606
7607 * Makefile.in (OBS): Add tracepoint.o.
7608 (tracepoint.o): New rule.
7609
3a13a53b
L
76102010-04-08 H.J. Lu <hongjiu.lu@intel.com>
7611
7612 * Makefile.in (clean): Also remove i386-mmx.c i386-mmx-linux.c.
7613 (i386-mmx.o): New.
7614 (i386-mmx.c): Likewise.
7615 (i386-mmx-linux.o): Likewise.
7616 (i386-mmx-linux.c): Likewise.
7617
7618 * configure.srv (srv_i386_regobj): Add i386-mmx.o.
7619 (srv_i386_linux_regobj): Add i386-mmx-linux.o.
7620 (srv_i386_xmlfiles): Add i386/i386-mmx.xml.
7621 (srv_i386_linux_xmlfiles): Add i386/i386-mmx-linux.xml.
7622
7623 * linux-x86-low.c (init_registers_i386_mmx_linux): New.
7624 (x86_linux_update_xmltarget): Call init_registers_i386_mmx_linux
7625 and return if ptrace PTRACE_GETFPXREGS failed in 32bit.
7626
1570b33e
L
76272010-04-07 H.J. Lu <hongjiu.lu@intel.com>
7628
7629 * Makefile.in (clean): Updated.
7630 (i386-avx.o): New.
7631 (i386-avx.c): Likewise.
7632 (i386-avx-linux.o): Likewise.
7633 (i386-avx-linux.c): Likewise.
7634 (amd64-avx.o): Likewise.
7635 (amd64-avx.c): Likewise.
7636 (amd64-avx-linux.o): Likewise.
7637 (amd64-avx-linux.c): Likewise.
7638
7639 * configure.srv (srv_i386_regobj): Add i386-avx.o.
7640 (srv_i386_linux_regobj): Add i386-avx-linux.o.
7641 (srv_amd64_regobj): Add amd64-avx.o.
7642 (srv_amd64_linux_regobj): Add amd64-avx-linux.o.
7643 (srv_i386_32bit_xmlfiles): Add i386/32bit-avx.xml.
7644 (srv_i386_64bit_xmlfiles): Add i386/64bit-avx.xml.
7645 (srv_i386_xmlfiles): Add i386/i386-avx.xml.
7646 (srv_amd64_xmlfiles): Add i386/amd64-avx.xml.
7647 (srv_i386_linux_xmlfiles): Add i386/i386-avx-linux.xml.
7648 (srv_amd64_linux_xmlfiles): Add i386/amd64-avx-linux.xml.
7649
7650 * i387-fp.c: Include "i386-xstate.h".
7651 (i387_xsave): New.
7652 (i387_cache_to_xsave): Likewise.
7653 (i387_xsave_to_cache): Likewise.
7654 (x86_xcr0): Likewise.
7655
7656 * i387-fp.h (i387_cache_to_xsave): Likewise.
7657 (i387_xsave_to_cache): Likewise.
7658 (x86_xcr0): Likewise.
7659
7660 * linux-arm-low.c (target_regsets): Initialize nt_type to 0.
7661 * linux-crisv32-low.c (target_regsets): Likewise.
7662 * linux-m68k-low.c (target_regsets): Likewise.
7663 * linux-mips-low.c (target_regsets): Likewise.
7664 * linux-ppc-low.c (target_regsets): Likewise.
7665 * linux-s390-low.c (target_regsets): Likewise.
7666 * linux-sh-low.c (target_regsets): Likewise.
7667 * linux-sparc-low.c (target_regsets): Likewise.
7668 * linux-xtensa-low.c (target_regsets): Likewise.
7669
7670 * linux-low.c: Include <sys/uio.h>.
7671 (regsets_fetch_inferior_registers): Support nt_type.
7672 (regsets_store_inferior_registers): Likewise.
7673 (linux_process_qsupported): New.
7674 (linux_target_ops): Add linux_process_qsupported.
7675
7676 * linux-low.h (regset_info): Add nt_type.
7677 (linux_target_ops): Add process_qsupported.
7678
7679 * linux-x86-low.c: Include "i386-xstate.h", "elf/common.h"
7680 and <sys/uio.h>.
7681 (init_registers_i386_avx_linux): New.
7682 (init_registers_amd64_avx_linux): Likewise.
7683 (xmltarget_i386_linux_no_xml): Likewise.
7684 (xmltarget_amd64_linux_no_xml): Likewise.
7685 (PTRACE_GETREGSET): Likewise.
7686 (PTRACE_SETREGSET): Likewise.
7687 (x86_fill_xstateregset): Likewise.
7688 (x86_store_xstateregset): Likewise.
7689 (use_xml): Likewise.
7690 (x86_linux_update_xmltarget): Likewise.
7691 (x86_linux_process_qsupported): Likewise.
7692 (target_regsets): Add NT_X86_XSTATE entry and Initialize nt_type.
7693 (x86_arch_setup): Don't call init_registers_amd64_linux nor
7694 init_registers_i386_linux here. Call
7695 x86_linux_update_xmltarget.
7696 (the_low_target): Add x86_linux_process_qsupported.
7697
7698 * server.c (handle_query): Call target_process_qsupported.
7699
7700 * target.h (target_ops): Add process_qsupported.
7701 (target_process_qsupported): New.
7702
fc7238bb
PA
77032010-04-03 Pedro Alves <pedro@codesourcery.com>
7704
7705 * inferiors.c (add_thread): Set last_status kind to
7706 TARGET_WAITKIND_IGNORE.
7707 * linux-low.c (cancel_breakpoint): Remove unnecessary regcache
7708 fetch. Use ptid_of. Avoid unnecessary get_lwp_thread calls.
7709 (linux_wait_1): Move `thread' local definition to block that uses
7710 it. Don't NULL initialize `event_child'.
7711 (linux_resume_one_thread): Avoid unnecessary get_lwp_thread calls.
7712 Alway set the thread's last_status to TARGET_WAITKIND_IGNORE.
7713 * linux-x86-low.c (x86_breakpoint_at): Read raw memory.
7714
bdabb078
PA
77152010-04-01 Pedro Alves <pedro@codesourcery.com>
7716
7717 * linux-low.c (get_stop_pc): Don't adjust the PC if stopped with
7718 an extended waitstatus, or by a watchpoint.
7719 (cancel_breakpoints_callback): Don't cancel a breakpoint if the
7720 thread was stepping or has been stopped by a watchpoint.
7721
d3bbe7a0
PA
77222010-04-01 Pedro Alves <pedro@codesourcery.com>
7723
7724 * mem-break.c (struct raw_breakpoint): New field shlib_disabled.
7725 (set_gdb_breakpoint_at): If GDB is inserting a breakpoint on top
7726 of another, then delete the previous, and validate all
7727 breakpoints.
7728 (validate_inserted_breakpoint): New.
7729 (delete_disabled_breakpoints): New.
7730 (validate_breakpoints): New.
7731 (check_mem_read): Validate breakpoints before trusting their
7732 shadow. Delete disabled breakpoints.
7733 (check_mem_write): Validate breakpoints before trusting they
7734 should be inserted. Delete disabled breakpoints.
7735 * mem-break.h (validate_breakpoints):
7736 * server.c (handle_query): Validate breakpoints when we see a
7737 qSymbol query.
7738
8b07ae33
PA
77392010-04-01 Pedro Alves <pedro@codesourcery.com>
7740
7741 * linux-low.c (linux_wait_1): Avoid setting need_step_over is
7742 there's a GDB breakpoint at stop_pc. Always report a trap to GDB
7743 if we could tell there's a GDB breakpoint at stop_pc.
7744 (need_step_over_p): Don't do a step over if we find a GDB
7745 breakpoint at the resume PC.
7746
7747 * mem-break.c (struct raw_breakpoint): New.
7748 (enum bkpt_type): New type `gdb_breakpoint'.
7749 (struct breakpoint): Delete the `PC', `old_data' and `inserted'
7750 fields. New field `raw'.
7751 (find_raw_breakpoint_at): New.
7752 (set_raw_breakpoint_at): Handle refcounting. Create a raw
7753 breakpoint instead.
7754 (set_breakpoint_at): Adjust.
7755 (delete_raw_breakpoint): New.
7756 (release_breakpoint): New.
7757 (delete_breakpoint): Rename to...
7758 (delete_breakpoint_1): ... this. Add proc parameter. Use
7759 release_breakpoint. Return ENOENT.
7760 (delete_breakpoint): Reimplement.
7761 (find_breakpoint_at): Delete.
7762 (find_gdb_breakpoint_at): New.
7763 (delete_breakpoint_at): Delete.
7764 (set_gdb_breakpoint_at): New.
7765 (delete_gdb_breakpoint_at): New.
7766 (gdb_breakpoint_here): New.
7767 (set_reinsert_breakpoint): Use release_breakpoint.
7768 (uninsert_breakpoint): Rename to ...
7769 (uninsert_raw_breakpoint): ... this.
7770 (uninsert_breakpoints_at): Adjust to handle raw breakpoints.
7771 (reinsert_raw_breakpoint): Change parameter type to
7772 raw_breakpoint.
7773 (reinsert_breakpoints_at): Adjust to handle raw breakpoints
7774 instead.
7775 (check_breakpoints): Adjust. Use release_breakpoint.
7776 (breakpoint_here): Rewrite using find_raw_breakpoint_at.
7777 (breakpoint_inserted_here): Ditto.
7778 (check_mem_read): Adjust to iterate over raw breakpoints instead.
7779 Don't trust the breakpoint's shadow if it is not inserted.
7780 (check_mem_write): Adjust to iterate over raw breakpoints instead.
7781 (delete_all_breakpoints): Adjust.
7782 (free_all_breakpoints): Mark all breakpoints as uninserted, and
7783 use delete_breakpoint_1.
7784
7785 * mem-break.h (breakpoints_supported): Delete declaration.
7786 (set_gdb_breakpoint_at): Declare.
7787 (gdb_breakpoint_here): Declare.
7788 (delete_breakpoint_at): Delete.
7789 (delete_gdb_breakpoint_at): Declare.
7790
7791 * server.h (struct raw_breakpoint): Forward declare.
7792 (struct process_info): New field `raw_breakpoints'.
7793
7794 * linux-x86-low.c (x86_insert_point, x86_remote_point): Handle Z0
7795 breakpoints.
7796
6bf5e0ba
PA
77972010-03-24 Pedro Alves <pedro@codesourcery.com>
7798
7799 * linux-low.c (status_pending_p_callback): Fix comment.
7800 (linux_wait_for_event_1): Move most of the internal breakpoint
7801 handling from here...
7802 (linux_wait_1): ... to here.
7803 (count_events_callback): New.
7804 (select_singlestep_lwp_callback): New.
7805 (select_event_lwp_callback): New.
7806 (cancel_breakpoints_callback): New.
7807 (select_event_lwp): New.
7808 (linux_wait_1): Simplify internal breakpoint handling. Give equal
7809 priority to all LWPs that have had events that should be reported
7810 to the client. Cancel breakpoints when about to reporting the
7811 event to the client, not while stopping lwps. No longer cancel
7812 finished single-steps here.
7813 (cancel_finished_single_step): Delete.
7814 (cancel_finished_single_steps): Delete.
7815
414a389f
PA
78162010-03-24 Pedro Alves <pedro@codesourcery.com>
7817
7818 * mem-break.c (enum bkpt_type): New.
7819 (struct breakpoint): New field `type'.
7820 (set_breakpoint_at): Change return type to struct breakpoint
7821 pointer. Set type to `other_breakpoint' by default.
7822 (delete_breakpoint): Rewrite, supporting more than one breakpoint
7823 in the breakpoint list.
7824 (delete_reinsert_breakpoints): Only delete reinsert breakpoints.
7825 (reinsert_breakpoint): Rename to ...
7826 (reinsert_raw_breakpoint): ... this.
7827 (reinsert_breakpoints_at): Adjust.
7828 * mem-break.h (struct breakpoint): Declare.
7829 (set_breakpoint_at): Change return type to struct breakpoint
7830 pointer.
7831
2280c721
PA
78322010-03-24 Pedro Alves <pedro@codesourcery.com>
7833
7834 * server.c (handle_query): Assign, not compare.
7835
d50171e4
PA
78362010-03-24 Pedro Alves <pedro@codesourcery.com>
7837
7838 Teach linux gdbserver to step-over-breakpoints.
7839
7840 * linux-low.c (can_hardware_single_step): New.
7841 (supports_breakpoints): New.
7842 (handle_extended_wait): If stopping threads, read the stop pc of
7843 the new cloned LWP.
7844 (get_pc): New.
7845 (get_stop_pc): Add `lwp' parameter. Handle it. Bail out if the
7846 low target doesn't support retrieving the PC.
7847 (add_lwp): Set last_resume_kind to resume_continue.
7848 (linux_attach_lwp_1): Adjust comments. Always set stop_expected.
7849 (linux_attach): Don't clear stop_expected. Set the lwp's
7850 last_resume_kind to resume_stop.
7851 (linux_detach_one_lwp): Don't check for removed breakpoints.
7852 (check_removed_breakpoint): Delete.
7853 (status_pending_p): Rename to ...
7854 (status_pending_p_callback): ... this. Don't check for removed
7855 breakpoints. Don't consider threads that are stopped from GDB's
7856 perspective.
7857 (linux_wait_for_lwp): Always read the stop_pc here.
7858 (cancel_breakpoint): New.
7859 (step_over_bkpt): New global.
7860 (linux_wait_for_event_1): Implement stepping over breakpoints.
7861 (gdb_wants_lwp_stopped): New.
7862 (gdb_wants_all_stopped): New.
7863 (linux_wait_1): Tag threads as gdb-wants-stopped. Cancel finished
7864 single-step traps here. Store the thread's last reported target
7865 wait status.
7866 (send_sigstop): Don't clear stop_expected. Always set it,
7867 instead.
7868 (mark_lwp_dead): Remove reference to pending_is_breakpoint.
7869 (cancel_finished_single_step): New.
7870 (cancel_finished_single_steps): New.
7871 (wait_for_sigstop): Don't cancel finished single-step traps here.
7872 (linux_resume_one_lwp): Don't check for removed breakpoints.
7873 Don't set `step' on non-hardware step archs.
7874 (linux_set_resume_request): Ignore resume_stop requests if already
7875 stopping or stopped. Set the lwp's last_resume_kind.
7876 (resume_status_pending_p): Don't check for removed breakpoints.
7877 (need_step_over_p): New.
7878 (start_step_over): New.
7879 (finish_step_over): New.
7880 (linux_resume_one_thread): Always queue a sigstop for resume_stop
7881 requests. Clear the thread's last reported target waitstatus.
7882 Don't use the `suspended' flag. Don't consider pending breakpoints.
7883 (linux_resume): Start a step-over if necessary.
7884 (proceed_one_lwp): New.
7885 (proceed_all_lwps): New.
7886 (unstop_all_lwps): New.
7887 * linux-low.h (struct lwp_info): Rewrite comment for the
7888 `suspended' flag. Add the `stop_pc' field. Delete the
7889 `pending_stop_pc' field. Tweak the `stepping' flag's comment.
7890 Add `'last_resume_kind' and `need_step_over' fields.
7891 * inferiors.c (struct thread_info): Delete, moved elsewhere.
7892 * mem-break.c (struct breakpoint): Delete `reinserting' flag.
7893 Delete `breakpoint_to_reinsert' field. New flag `inserted'.
7894 (set_raw_breakpoint_at): New.
7895 (set_breakpoint_at): Rewrite to use it.
7896 (reinsert_breakpoint_handler): Delete.
7897 (set_reinsert_breakpoint): New.
7898 (reinsert_breakpoint_by_bp): Delete.
7899 (delete_reinsert_breakpoints): New.
7900 (uninsert_breakpoint): Rewrite.
7901 (uninsert_breakpoints_at): New.
7902 (reinsert_breakpoint): Rewrite.
7903 (reinsert_breakpoints_at): New.
7904 (check_breakpoints): Rewrite.
7905 (breakpoint_here): New.
7906 (breakpoint_inserted_here): New.
7907 (check_mem_read): Adjust.
7908 * mem-break.h (breakpoints_supported, breakpoint_here)
7909 (breakpoint_inserted_here, set_reinsert_breakpoint): Declare.
7910 (reinsert_breakpoint_by_bp): Delete declaration.
7911 (delete_reinsert_breakpoints): Declare.
7912 (reinsert_breakpoint): Delete declaration.
7913 (reinsert_breakpoints_at): Declare.
7914 (uninsert_breakpoint): Delete declaration.
7915 (uninsert_breakpoints_at): Declare.
7916 (check_breakpoints): Adjust prototype.
7917 * server.h: Adjust include order.
7918 (struct thread_info): Declare here. Add a `last_status' field.
7919
30ba68cb
MS
79202010-03-23 Michael Snyder <msnyder@vmware.com>
7921
7922 * server.c (crc32): New function.
7923 (handle_query): Add handling for 'qCRC:' request.
7924
b9a881c2
PA
79252010-03-23 Pedro Alves <pedro@codesourcery.com>
7926
7927 * linux-x86-low.c (x86_linux_prepare_to_resume): Clear DR6 if the
7928 lwp had been stopped by a watchpoint.
7929
e92d13d5
PA
79302010-03-16 Pedro Alves <pedro@codesourcery.com>
7931
7932 * server.h (internal_error): Declare.
7933 (gdb_assert, ASSERT_FUNCTION, gdb_assert_fail): Define.
7934 * utils.c (internal_error): New function.
7935
64daa791
AS
79362010-03-15 Andreas Schwab <schwab@redhat.com>
7937
7938 * configure.srv: Fix typo setting srv_regobj.
7939
f52cd8cd
PA
79402010-03-15 Pedro Alves <pedro@codesourcery.com>
7941
7942 * linux-low.c (fetch_register): Avoid passing a non string literal
7943 format to `error'.
7944 (usr_store_inferior_registers): Ditto.
7945
93ae6fdc
PA
79462010-03-14 Pedro Alves <pedro@codesourcery.com>
7947
7948 * linux-low.c (linux_write_memory): Bail out early if peeking
7949 memory failed.
7950
c3adc08c
PA
79512010-03-14 Pedro Alves <pedro@codesourcery.com>
7952
7953 * linux-low.h (struct lwp_info): New fields
7954 `stopped_by_watchpoint' and `stopped_data_address'.
7955 * linux-low.c (linux_wait_for_lwp): Check for watchpoint triggers
7956 here, and cache them in the lwp object.
7957 (wait_for_sigstop): Check stopped_by_watchpoint lwp field
7958 directly.
7959 (linux_resume_one_lwp): Clear the lwp's stopped_by_watchpoint
7960 field.
7961 (linux_stopped_by_watchpoint): Rewrite.
7962 (linux_stopped_data_address): Rewrite.
7963
bce522a2
PA
79642010-03-06 Simo Melenius <simo.melenius@iki.fi>
7965
7966 * linux-low.c (linux_wait_for_lwp): Fetch the regcache after
7967 switching the current inferior, not before.
7968
90884b2b
L
79692010-03-01 H.J. Lu <hongjiu.lu@intel.com>
7970
7971 * Makefile.in (clean): Replace reg-i386.c, reg-x86-64.c,
7972 reg-i386-linux.c and reg-x86-64-linux.c with i386.c, amd64.c,
7973 i386-linux.c and amd64-linux.c.
7974 (reg-i386.o): Removed.
7975 (reg-i386.c): Likewise.
7976 (reg-i386-linux.o): Likewise.
7977 (reg-i386-linux.c): Likewise.
7978 (reg-x86-64.o): Likewise.
7979 (reg-x86-64.c): Likewise.
7980 (reg-x86-64-linux.o): Likewise.
7981 (reg-x86-64-linux.c): Likewise.
7982 (i386.o): New.
7983 (i386.c): Likewise.
7984 (i386-linux.o): Likewise.
7985 (i386-linux.c): Likewise.
7986 (amd64.o): Likewise.
7987 (amd64.c): Likewise.
7988 (amd64-linux.o): Likewise.
7989 (amd64-linux.c): Likewise.
7990
7991 * configure.srv (srv_i386_regobj): New.
7992 (srv_i386_linux_regobj): Likewise.
7993 (srv_amd64_regobj): Likewise.
7994 (srv_amd64_linux_regobj): Likewise.
7995 (srv_i386_32bit_xmlfiles): Likewise.
7996 (srv_i386_64bit_xmlfiles): Likewise.
7997 (srv_i386_xmlfiles): Likewise.
7998 (srv_amd64_xmlfiles): Likewise.
7999 (srv_i386_linux_xmlfiles): Likewise.
8000 (srv_amd64_linux_xmlfiles): Likewise.
8001 (i[34567]86-*-cygwin*): Set srv_regobj to $srv_i386_regobj. Set
8002 srv_xmlfiles to $srv_i386_xmlfiles.
8003 (i[34567]86-*-mingw32ce*): Likewise.
8004 (i[34567]86-*-mingw*): Likewise.
8005 (i[34567]86-*-nto*): Likewise.
8006 (i[34567]86-*-linux*): Set srv_regobj to $srv_i386_linux_regobj
8007 and $srv_amd64_linux_regobj. Set srv_xmlfiles to
8008 $srv_i386_linux_xmlfiles and $srv_amd64_linux_xmlfiles.
8009 (x86_64-*-linux*): Likewise.
8010
8011 * linux-x86-low.c (init_registers_x86_64_linux): Removed.
8012 (init_registers_amd64_linux): New.
8013 (x86_arch_setup): Replace init_registers_x86_64_linux with
8014 init_registers_amd64_linux.
8015
193f13e6
MK
80162010-02-23 Maxim Kuvyrkov <maxim@codesourcery.com>
8017
8018 * configure.ac: Check for libdl. If it is not available link against
8019 static libthread_db.
8020 * configure: Regenerate.
8021
85d721b8
PA
80222010-02-22 Pedro Alves <pedro@codesourcery.com>
8023
8024 PR9605
8025
8026 * i386-low.c (i386_length_and_rw_bits): Throw a fatal error if
8027 handing a read watchpoint.
8028 (i386_low_insert_watchpoint): Read watchpoints aren't supported.
8029
6076632b
DE
80302010-02-12 Doug Evans <dje@google.com>
8031
8032 * linux-low.c (linux_supports_tracefork_flag): Document.
8033 (linux_look_up_symbols): Add comment.
8034
3327ccf7
L
80352010-02-03 H.J. Lu <hongjiu.lu@intel.com>
8036
8037 * regcache.c (supply_register): Clear regcache if buf is NULL.
8038
0718675c 80392010-02-02 Nicolas Roche <roche@sourceware.org>
3327ccf7 8040 Joel Brobecker <brobecker@adacore.com>
0718675c
JB
8041
8042 * inferiors.c (find_inferior): Add function documentation.
8043 (unloaded_dll): Handle the case where the unloaded dll has not
8044 been previously registered in the dll list.
8045
177321bd
DJ
80462010-02-01 Daniel Jacobowitz <dan@codesourcery.com>
8047
8048 * linux-arm-low.c (thumb_breakpoint_len): Delete.
8049 (thumb2_breakpoint): New.
8050 (arm_breakpoint_at): Check for Thumb-2 breakpoints.
8051
2b009048
DJ
80522010-01-29 Daniel Jacobowitz <dan@codesourcery.com>
8053
8054 * linux-low.c (get_stop_pc): Check for SIGTRAP.
8055 (linux_wait_for_event_1): Handle SIGILL and SIGSEGV as possible
8056 breakpoints.
8057
3be029c7
PA
80582010-01-21 Pedro Alves <pedro@codesourcery.com>
8059
8060 * linux-ppc-low.c (ppc_arch_setup): Adjust to regcache changes.
8061
18f5de3b
JK
80622010-01-21 Jan Kratochvil <jan.kratochvil@redhat.com>
8063
8064 * linux-s390-low.c (s390_collect_ptrace_register)
8065 (s390_supply_ptrace_register): Adjust it for the new regcache parameter.
8066
3743bb4f
DE
80672010-01-21 Doug Evans <dje@google.com>
8068
14ce3065
DE
8069 * linux-low.c (PTRACE_ARG3_TYPE): Change from long to void*.
8070 (PTRACE_ARG4_TYPE): New macro.
8071 (handle_extended_wait): Cast ptrace arg4 to PTRACE_ARG4_TYPE.
8072 (linux_wait_for_event_1, linux_resume_one_lwp): Ditto.
8073 (fetch_register): Cast to uintptr_t before casting to PTRACE_ARG3_TYPE.
8074 (usr_store_inferior_registers): Ditto.
8075 (linux_read_memory, linux_write_memory): Ditto.
8076 (linux_test_for_tracefork): Ditto.
8077
3743bb4f
DE
8078 * linux-arm-low.c: Remove redundant include of gdb_proc_service.h.
8079 Only include elf.h if gdb_proc_service.h didn't include linux/elf.h.
8080
8b315be5
PA
80812010-01-21 Pedro Alves <pedro@codesourcery.com>
8082
8083 * proc-service.c (ps_lgetregs): Don't refetch registers from the
8084 target.
8085
85492558
PA
80862010-01-21 Pedro Alves <pedro@codesourcery.com>
8087
8088 * spu-low.c (spu_fetch_registers, spu_store_registers): Change
8089 prototype to take a regcache. Adjust.
8090
442ea881
PA
80912010-01-20 Pedro Alves <pedro@codesourcery.com>
8092
8093 * regcache.h (struct thread_info): Forward declare.
8094 (struct regcache): New.
8095 (new_register_cache): Adjust prototype.
8096 (get_thread_regcache): Declare.
8097 (free_register_cache): Adjust prototype.
8098 (registers_to_string, registers_from_string): Ditto.
8099 (supply_register, supply_register_by_name, collect_register)
8100 (collect_register_as_string, collect_register_by_name): Ditto.
8101 * regcache.c (struct inferior_regcache_data): Delete.
8102 (get_regcache): Rename to ...
8103 (get_thread_regcache): ... this. Adjust. Switch inferior before
8104 fetching registers.
8105 (regcache_invalidate_one): Adjust.
8106 (regcache_invalidate): Fix prototype.
8107 (new_register_cache): Return the new register cache.
8108 (free_register_cache): Change prototype.
8109 (realloc_register_cache): Adjust.
8110 (registers_to_string): Change prototype to take a regcache. Adjust.
8111 (registers_from_string): Ditto.
8112 (register_data): Ditto.
8113 (supply_register): Ditto.
8114 (supply_register_by_name): Ditto.
8115 (collect_register): Ditto.
8116 (collect_register_as_string): Ditto.
8117 (collect_register_by_name): Ditto.
8118 * server.c (process_serial_event): Adjust.
8119 * linux-low.h (regset_fill_func, regset_store_func): Change
8120 prototype.
8121 (get_pc, set_pc, collect_ptrace_register, supply_ptrace_register):
8122 Change prototype.
8123 * linux-low.c (get_stop_pc): Adjust.
8124 (check_removed_breakpoint): Adjust.
8125 (linux_wait_for_event): Adjust.
8126 (linux_resume_one_lwp): Adjust.
8127 (fetch_register): Add regcache parameter. Adjust.
8128 (usr_store_inferior_registers): Ditto.
8129 (regsets_fetch_inferior_registers): Ditto.
8130 (regsets_store_inferior_registers): Ditto.
8131 (linux_fetch_registers, linux_store_registers): Ditto.
8132 * i387-fp.c (i387_cache_to_fsave): Change prototype to take a
8133 regcache. Adjust.
43aaf8b6
PA
8134 (i387_fsave_to_cache, i387_cache_to_fxsave, i387_fxsave_to_cache):
8135 Ditto.
442ea881
PA
8136 * i387-fp.h (i387_cache_to_fsave, i387_fsave_to_cache): Change
8137 prototype to take a regcache.
8138 (i387_cache_to_fxsave, i387_fxsave_to_cache): Ditto.
8139 * remote-utils.c (convert_ascii_to_int, outreg)
8140 (prepare_resume_reply): Change prototype to take a regcache.
8141 Adjust.
8142 * target.h (struct target_ops) <fetch_registers, store_registers>:
8143 Change prototype to take a regcache.
8144 (fetch_inferior_registers, store_inferior_registers): Change
8145 prototype to take a regcache. Adjust.
8146 * proc-service.c (ps_lgetregs): Adjust.
8147 * linux-x86-low.c (x86_fill_gregset, x86_store_gregset)
8148 (x86_fill_fpregset, x86_store_fpregset, x86_fill_fpxregset)
8149 (x86_store_fpxregset, x86_get_pc, x86_set_pc): Change prototype to
8150 take a regcache. Adjust.
8151 * linux-arm-low.c (arm_fill_gregset, arm_store_gregset)
8152 (arm_fill_wmmxregset, arm_store_wmmxregset, arm_fill_vfpregset)
8153 (arm_store_vfpregset, arm_get_pc, arm_set_pc):
8154 (arm_breakpoint_at): Change prototype to take a regcache. Adjust.
8155 * linux-cris-low.c (cris_get_pc, cris_set_pc)
8156 (cris_cannot_fetch_register):
8157 (cris_breakpoint_at): Change prototype to take a regcache.
8158 Adjust.
8159 * linux-crisv32-low.c (cris_get_pc, cris_set_pc,
8160 cris_reinsert_addr, cris_write_data_breakpoint): Change prototype
8161 to take a regcache. Adjust.
8162 (cris_breakpoint_at, cris_insert_point, cris_remove_point):
8163 Adjust.
8164 * linux-m32r-low.c (m32r_get_pc, m32r_set_pc): Change prototype to
8165 take a regcache. Adjust.
8166 * linux-m68k-low.c (m68k_fill_gregset, m68k_store_gregset)
8167 (m68k_fill_fpregset, m68k_store_fpregset, m68k_get_pc,
8168 (m68k_set_pc): Change prototype to take a regcache. Adjust.
8169 * linux-mips-low.c (mips_get_pc):
8170 (mips_set_pc): Change prototype to take a regcache. Adjust.
8171 (mips_reinsert_addr): Adjust.
8172 (mips_collect_register): Change prototype to take a regcache.
8173 Adjust.
8174 (mips_supply_register):
8175 (mips_collect_register_32bit, mips_supply_register_32bit)
8176 (mips_fill_gregset, mips_store_gregset, mips_fill_fpregset)
8177 (mips_store_fpregset): Ditto.
43aaf8b6
PA
8178 * linux-ppc-low.c (ppc_supply_ptrace_register)
8179 (ppc_supply_ptrace_register): Ditto.
442ea881
PA
8180 (parse_spufs_run): Adjust.
8181 (ppc_get_pc, ppc_set_pc, ppc_fill_gregset, ppc_fill_vsxregset)
8182 (ppc_store_vsxregset, ppc_fill_vrregset, ppc_store_vrregset)
8183 (ppc_fill_evrregset, ppc_store_evrregset): Change prototype to
8184 take a regcache. Adjust.
8185 * linux-s390-low.c (s390_collect_ptrace_register)
8186 (s390_supply_ptrace_register, s390_fill_gregset, s390_get_pc)
8187 (s390_set_pc): Change prototype to take a regcache. Adjust.
8188 (s390_arch_setup): Adjust.
8189 * linux-sh-low.c (sh_get_pc, sh_breakpoint_at)
8190 (sh_fill_gregset): Change prototype to take a regcache. Adjust.
8191 * linux-sparc-low.c (sparc_fill_gregset_to_stack)
8192 (sparc_fill_gregset, sparc_store_gregset_from_stack)
8193 (sparc_store_gregset, sparc_get_pc): Change prototype to take a
8194 regcache. Adjust.
8195 (sparc_breakpoint_at): Adjust.
8196 * linux-xtensa-low.c (xtensa_fill_gregset):
8197 (xtensa_store_gregset):
8198 (xtensa_fill_xtregset, xtensa_store_xtregset, xtensa_get_pc)
8199 (xtensa_set_pc): Change prototype to take a regcache. Adjust.
8200 * nto-low.c (nto_fetch_registers, nto_store_registers): Change
8201 prototype to take a regcache. Adjust.
8202 * win32-arm-low.c (arm_fetch_inferior_register)
8203 (arm_store_inferior_register): Change prototype to take a
8204 regcache. Adjust.
8205 * win32-i386-low.c (i386_fetch_inferior_register)
8206 (i386_store_inferior_register): Change prototype to take a
8207 regcache. Adjust.
8208 * win32-low.c (child_fetch_inferior_registers)
8209 (child_store_inferior_registers): Change prototype to take a
8210 regcache. Adjust.
8211 (win32_wait): Adjust.
8212 (win32_fetch_inferior_registers): Change prototype to take a
8213 regcache. Adjust.
8214 (win32_store_inferior_registers): Adjust.
8215 * win32-low.h (struct win32_target_ops) <fetch_inferior_register,
8216 store_inferior_register>: Change prototype to take a regcache.
8217
60c3d7b0
DE
82182010-01-20 Doug Evans <dje@google.com>
8219
8220 * linux-low.c (linux_create_inferior): Wrap use of __SIGRTMIN in
8221 #ifdef.
8222 (linux_wait_for_event1, linux_init_signals): Ditto.
ec8ebe72 8223 (W_STOPCODE): Provide definition if missing.
60c3d7b0 8224
dc146f7c
VP
82252010-01-13 Vladimir Prus <vladimir@codesourcery.com>
8226
8227 * linux-low.c (linux_core_of_thread): New.
8228 (compare_ints, show_process, list_threads): New.
8229 (linux_qxfer_osdata): Report threads and cores.
8230 (linux_target_op): Register linux_core_of_thread.
8231 * remote-utils.c (prepare_resume_reply): Report the core.
8232 (buffer_xml_printf): Support %d specifier.
8233 * server.c (handle_threads_qxfer_proper, handle_threads_qxfer):
8234 New.
8235 (handle_query): Handle qXfer:threads. Announce availability
8236 thereof.
8237 * target.h (struct target_ops): New field core_of_thread.
8238
7803799a
UW
82392010-01-04 Ulrich Weigand <uweigand@de.ibm.com>
8240
8241 * Makefile.in (clean): Remove new generated files.
8242 (reg-s390.o, reg-s390.c): Remove rules.
8243 (reg-s390x.o, reg-s390x.c): Likewise.
8244 (s390-linux32.o, s390-linux32.c): Add rules.
8245 (s390-linux64.o, s390-linux64.c): Likewise.
8246 (s390x-linux64.o, s390x-linux64.c): Likewise.
8247 * configure.srv (s390*-*-linux*): Update srv_regobj and srv_xmlfiles.
8248 * linux-s390-low.c: Include <elf.h>.
8249 (HWCAP_S390_HIGH_GPRS): Define if undefined.
8250 (init_registers_s390): Remove prototype.
8251 (init_registers_s390x): Likewise.
8252 (init_registers_s390_linux32): Add prototype.
8253 (init_registers_s390_linux64): Likewise.
8254 (init_registers_s390x_linux64): Likewise.
8255 (s390_num_regs_3264): New define.
8256 (s390_regmap_3264): New global variable.
8257 (s390_cannot_fetch_register): Remove obsolete check.
8258 (s390_cannot_store_register): Likewise.
8259 (s390_collect_ptrace_register): Handle upper/lower register halves.
8260 (s390_supply_ptrace_register): Likewise.
8261 (s390_fill_gregset): Update to register number changes.
8262 (s390_get_hwcap): New routine.
8263 (s390_arch_setup): Detect 32-bit process running on 64-bit system.
8264 Install appropriate regmap and register set.
8265
6e7ffa39
JB
82662010-01-01 Joel Brobecker <brobecker@adacore.com>
8267
8268 * server.c (gdbserver_version): Update copyright year to 2010.
8269 * gdbreplay.c (gdbreplay_version): Likewise.
8270
957f3f49
DE
82712009-12-28 Doug Evans <dje@google.com>
8272
8273 * linux-low.c: Delete inclusion of ansidecl.h, elf/common.h,
8274 elf/external.h. Include <elf.h> instead but only if necessary.
8275
ca5c370d
PA
82762009-12-28 Pedro Alves <pedro@codesourcery.com>
8277
8278 * linux-low.c (linux_remove_process): Remove `detaching'
8279 parameter. Don't release/detach from thread_db here.
8280 (linux_kill): Release/detach from thread_db here, ...
8281 (linux_detach): ... and here, before actually detaching.
8282 (linux_wait_1): ... and here, when a process exits.
8283 * thread-db.c (any_thread_of): New.
8284 (thread_db_free): Switch the current inferior to a thread of the
8285 passed in process.
8286
4ee62156
DE
82872009-12-21 Doug Evans <dje@google.com>
8288
d90e6a88
DE
8289 * linux-x86-low.c: Delete outdated comment about Elf32_Phdr.
8290
c5f62d5f
DE
8291 * linux-low.c (kill_lwp): Use __NR_tkill instead of SYS_tkill.
8292 Move definition of tkill_failed to ifdef __NR_tkill to avoid gcc
8293 warning ifndef __NR_tkill. Move setting of errno there too.
8294 Delete unnecessary resetting of errno after syscall.
8295 Minor comment changes to match gdb/linux-nat.c:kill_lwp.
8296
10e86dd7
DE
8297 * configure.ac: Check for dladdr.
8298 * config.in: Regenerate.
8299 * configure: Regenerate.
8300 * thread-db.c (dladdr_to_soname): Only define ifdef HAVE_DLADDR.
8301 (try_thread_db_load): Update.
8302
4ee62156
DE
8303 * linux-low.c (my_waitpid): Delete unnecessary prototype.
8304
00f515da
DE
83052009-12-18 Doug Evans <dje@google.com>
8306
e9464885
DE
8307 * event-loop.c: Include unistd.h if it exists.
8308
07d4f67e
DE
8309 * linux-low.c (my_waitpid): Move definition away from being in
8310 between linux_tracefork_child/linux_test_for_tracefork.
8311
00f515da
DE
8312 * gdb_proc_service.h (psaddr_t): Fix type.
8313 * thread-db.c (thread_db_info.td_thr_tls_get_addr_p): Fix
8314 signature to match glibc.
8315
1de1badb
DE
83162009-12-16 Doug Evans <dje@google.com>
8317
8318 * linux-low.c (linux_read_memory): Fix argument to read.
8319
aeeb81d1
PA
83202009-11-26 Pedro Alves <pedro@codesourcery.com>
8321
8322 * win32-low.c (get_child_debug_event): On EXIT_THREAD_DEBUG_EVENT
8323 events, don't leave current_inferior pointing at null.
8324
10357975
PA
83252009-11-26 Pedro Alves <pedro@codesourcery.com>
8326
8327 * win32-low.c (LOG): Delete.
8328 (OUTMSG): Output to stderr.
8329 (OUTMSG2): Conditionalize on `debug_threads' variable, instead of
8330 on compile time LOG macro.
8331 (win32_wait): Fix debug output.
8332
cf6e3471
PA
83332009-11-26 Pedro Alves <pedro@codesourcery.com>
8334
8335 * win32-low.c (win32_add_one_solib): If the dll name is
8336 "ntdll.dll", prepend the system directory to the dll path.
8337
0c85e18e
MK
83382009-11-17 Daniel Jacobowitz <dan@codesourcery.com>
8339
8340 * m68k-tdep.c (m68k_gdbarch_init): Reuse previous initialization.
8341
9ac544ce 83422009-11-17 Nathan Sidwell <nathan@codesourcery.com>
889bf7c5 8343 Vladimir Prus <vladimir@codesourcery.com>
9ac544ce
MK
8344
8345 * Makefile.in (reg-cf.o, reg-cf.c): New targets.
8346 * configure.ac: Check for __mcoldfire__ and set
8347 gdb_cv_m68k_is_coldfire.
8348 * configure.srv: Use gdb_cv_m68k_is_coldfire to select between
8349 reg-cf.o and reg-m68k.o.
8350 * configure: Regenerated.
8351
fd7dd3e6
PA
83522009-11-16 Pedro Alves <pedro@codesourcery.com>
8353
8354 * linux-low.c (linux_remove_process): Add `detaching' parameter.
8355 Pass it to thread_db_free.
8356 (linux_kill, linux_detach, linux_wait_1): Adjust to pass the
8357 proper `detaching' argument to linux_remove_process.
8358 * linux-low.h (thread_db_free): Add `detaching' parameter.
8359 * thread-db.c (thread_db_init): Pass false as `detaching' argument
8360 to thread_db_free.
8361 (thread_db_free): Add `detaching' parameter. Only
8362 call td_ta_clear_event if detaching from process.
8363
75aa492e
MK
83642009-11-12 Maxim Kuvyrkov <maxim@codesourcery.com>
8365
8366 * thread-db.c (thread_db_free): Fix typo.
8367
21e1bee4
PP
83682009-11-11 Paul Pluzhnikov <ppluzhnikov@google.com>
8369
8370 PR gdb/10838
8371 * thread-db.c (thread_db_free): Call td_ta_clear_event.
8372
8838b45e
NS
83732009-11-03 Nathan Sidwell <nathan@codesourcery.com>
8374
8375 * configure.ac (i[34567]86-*): Check if we're targetting x86-64
8376 with an i686 compiler.
8377 * configure.srv (i[34567]86-*-linux*): Pull in x86-64 handling if
8378 needed.
8379 * configure: Rebuilt.
8380
8a35fb51
SL
83812009-10-29 Sandra Loosemore <sandra@codesourcery.com>
8382
8383 PR gdb/10783
8384
8385 * server.c (handle_search_memory_1): Correct read_addr initialization
8386 in loop for searching subsequent chunks.
8387
96f15937
PP
83882009-10-29 Paul Pluzhnikov <ppluzhnikov@google.com>
8389
8390 * configure.ac: New --with-libthread-db option.
8391 * thread-db.c: Allow direct dependence on libthread_db.
8392 (thread_db_free): Adjust.
8393 * config.in: Regenerate.
8394 * configure: Likewise.
889bf7c5 8395
5f7d1694
PP
83962009-10-28 Paul Pluzhnikov <ppluzhnikov@google.com>
8397
8398 PR gdb/10757
8399 * thread-db.c (attach_thread): New function.
8400 (maybe_attach_thread): Return success/failure.
8401 (find_new_threads_callback): Adjust.
889bf7c5
PA
8402 (thread_db_find_new_threads): Loop until no new threads.
8403
88e3b899
PA
84042009-10-13 Pedro Alves <pedro@codesourcery.com>
8405
8406 * proc-service.c (ps_lgetregs): Formatting.
8407
cdbfd419
PP
84082009-10-08 Paul Pluzhnikov <ppluzhnikov@google.com>
8409
8410 * acinclude.m4: (SRV_CHECK_THREAD_DB, SRV_CHECK_TLS_GET_ADDR): Remove.
8411 * configure.ac: Adjust.
8412 * linux-low.h (struct process_info_private): Move members to struct
8413 thread_db.
8414 (thread_db_free, thread_db_handle_monitor_command): New prototype.
8415 * linux-low.c (linux_remove_process): Adjust.
8416 (linux_wait_for_event_1, linux_look_up_symbols): Likewise.
8417 * server.c (handle_query): Move code ...
8418 (handle_monitor_command): ... here. New function.
8419 * target.h (struct target_ops): New member.
8420 * thread-db.c (struct thread_db): New.
8421 (libthread_db_search_path): New variable.
8422 (thread_db_create_event, thread_db_enable_reporting)
8423 (find_one_thread, maybe_attach_thread, find_new_threads_callback)
8424 (thread_db_find_new_threads, (thread_db_get_tls_address): Adjust.
8425 (try_thread_db_load_1, dladdr_to_soname): New functions.
8426 (try_thread_db_load, thread_db_load_search): New functions.
8427 (thread_db_init): Search for libthread_db.
8428 (thread_db_free): New function.
8429 (thread_db_handle_monitor_command): Likewise.
8430 * config.in: Regenerate.
8431 * configure: Regenerate.
889bf7c5 8432
4168d2d6
UW
84332009-09-27 Ulrich Weigand <uweigand@de.ibm.com>
8434
8435 * spu-low.c (spu_kill): Wait for inferior to terminate.
8436 Call clear_inferiors.
8437 (spu_detach): Call clear_inferiors.
8438
81ecdfbb
RW
84392009-08-22 Ralf Wildenhues <Ralf.Wildenhues@gmx.de>
8440
8441 * aclocal.m4: Regenerate.
8442 * config.in: Likewise.
8443 * configure: Likewise.
8444
0b9ff2c0
UW
84452009-07-31 Ulrich Weigand <uweigand@de.ibm.com>
8446
8447 * linux-ppc-low.c (INSTR_SC, NR_spu_run): Define.
8448 (parse_spufs_run): New function.
8449 (ppc_get_pc, ppc_set_pc): Detect and handle SPU PC.
8450 (ppc_breakpoint_at): Handle SPU breakpoints.
8451
efcbbd14
UW
84522009-07-31 Ulrich Weigand <uweigand@de.ibm.com>
8453
8454 * linux-low.c: Include <sys/stat.h> and <sys/vfs.h>.
8455 (SPUFS_MAGIC): Define.
8456 (spu_enumerate_spu_ids): New function.
8457 (linux_qxfer_spu): New function.
8458 (linux_target_ops): Install linux_qxfer_spu.
8459
f4d9bade
UW
84602009-07-31 Ulrich Weigand <uweigand@de.ibm.com>
8461
8462 * configure.srv (powerpc*-*-linux*): Add powerpc-cell32l.o
8463 and powerpc-cell64l.o to srv_regobj. Add rs6000/powerpc-cell32l.xml
8464 and rs6000/powerpc-cell64l.xml to srv_xmlfiles.
8465 * Makefile.in (powerpc-cell32l.o, powerpc-cell32l.c): New rules.
8466 (powerpc-cell64l.o, powerpc-cell64l.c): Likewise.
8467 (clean): Handle powerpc-cell32l.c and powerpc-cell64l.c.
8468 * linux-ppc-low.c (PPC_FEATURE_CELL): Define.
8469 (init_registers_powerpc_cell32l): Add prototype.
8470 (init_registers_powerpc_cell64l): Likewise.
8471 (ppc_arch_setup): Detect Cell/B.E. architecture.
8472
96e946ca
RW
84732009-07-30 Ralf Wildenhues <Ralf.Wildenhues@gmx.de>
8474
8475 * Makefile.in (datarootdir): New variable.
8476
58d6951d
DJ
84772009-07-28 Daniel Jacobowitz <dan@codesourcery.com>
8478
8479 * linux-low.c (linux_write_memory): Update debugging output.
8480 * Makefile.in (clean): Add new descriptions.
8481 (arm-with-vfpv2.o, arm-with-vfpv2.c, arm-with-vfpv3.o)
8482 (arm-with-vfpv3.c, arm-with-neon.o, arm-with-neon.c): New rules.
8483 * configure.srv: Add new files for arm*-*-linux*.
8484 * linux-arm-low.c: Add new declarations.
8485 (PTRACE_GETVFPREGS, PTRACE_SETVFPREGS): Define if undefined.
8486 (arm_hwcap, HWCAP_VFP, HWCAP_IWMMXT, HWCAP_NEON, HWCAP_VFPv3)
8487 (HWCAP_VFPv3D16): New.
8488 (arm_fill_wmmxregset, arm_store_wmmxregset): Check HWCAP_IWMMXT
8489 instead of __IWMMXT__.
8490 (arm_fill_vfpregset, arm_store_vfpregset, arm_get_hwcap)
8491 (arm_arch_setup): New.
8492 (target_regsets): Remove #ifdef. Add VFP regset.
8493 (the_low_target): Use arm_arch_setup.
8494
12b42a12
DJ
84952009-07-28 Daniel Jacobowitz <dan@codesourcery.com>
8496
8497 * linux-low.c (linux_kill_one_lwp): Adjust kernel workaround to skip
8498 the main thread again.
8499
ac8c974e
AR
85002009-07-06 Aleksandar Ristovski <aristovski@qnx.com>
8501
8502 Adding Neutrino gdbserver.
8503 * configure: Regenerated.
8504 * configure.ac: Add case for srv_qnx and set LIBS accordingly.
8505 * configure.srv (i[34567]86-*-nto*): New target.
8506 * nto-low.c, nto-low.h, nto-x86-low.c: New files.
8507 * remote-utils.c [__QNX__]: Include sys/iomgr.h
8508 (nto_comctrl) [__QNX__]: New function.
8509 (enable_async_io, disable_async_io) [__QNX__]: Call nto_comctrl.
8510
4424e0c3 85112009-07-05 Danny Backx <dannybackx@users.sourceforge.net>
7437790a
PA
8512
8513 * configure.srv (i[34567]86-*-mingw32ce*): Add i386-low.o to
8514 srv_tgtobj.
8515
912cf4ba
PA
85162009-07-04 Danny Backx <dannybackx@users.sourceforge.net>
8517 Pedro Alves <pedro@codesourcery.com>
8518
8519 * win32-i386-low.c (i386_get_thread_context): Handle systems that
8520 don't support CONTEXT_EXTENDED_REGISTERS.
8521 (i386_win32_breakpoint, i386_win32_breakpoint_len): New.
8522 (the_low_target): Install them.
8523 * win32-low.c (get_child_debug_event): Handle WaitForDebugEvent
8524 failing with ERROR_PIPE_NOT_CONNECTED.
8525
aa5ca48f
DE
85262009-06-30 Doug Evans <dje@google.com>
8527 Pierre Muller <muller@ics.u-strasbg.fr>
8528
8529 Add h/w watchpoint support to x86-linux, win32-i386.
8530 * Makefile.in (SFILES): Add i386-low.c
8531 (i386_low_h): Define.
8532 (i386-low.o): Add dependencies.
8533 (linux-x86-low.o): Add i386-low.h dependency.
8534 (win32-i386-low.o): Ditto.
8535 * i386-low.c: New file.
8536 * i386-low.h: New file.
8537 * configure.srv (i[34567]86-*-cygwin*): Add i386-low.o to srv_tgtobj.
8538 (i[34567]86-*-linux*, i[34567]86-*-mingw*, x86_64-*-linux*): Ditto.
8539 * linux-low.c (linux_add_process): Initialize arch_private.
8540 (linux_remove_process): Free arch_private.
8541 (add_lwp): Initialize arch_private.
8542 (delete_lwp): Free arch_private.
8543 (linux_resume_one_lwp): Call the_low_target.prepare_to_resume if
8544 provided.
8545 * linux-low.h (process_info_private): New member arch_private.
8546 (lwp_info): New member arch_private.
8547 (linux_target_ops): New members new_process, new_thread,
8548 prepare_to_resume.
8549 (ptid_of): New macro.
8550 * linux-x86-low.c: Include stddef.h, i386-low.h.
8551 (arch_process_info): New struct.
8552 (arch_lwp_info): New struct.
8553 (x86_linux_dr_get, x86_linux_dr_set): New functions.
8554 (i386_dr_low_set_addr, i386_dr_low_set_control): New functions.
8555 (i386_dr_low_get_status): New function.
8556 (x86_insert_point, x86_remove_point): New functions.
8557 (x86_stopped_by_watchpoint): New function.
8558 (x86_stopped_data_address): New function.
8559 (x86_linux_new_process, x86_linux_new_thread): New functions.
8560 (x86_linux_prepare_to_resume): New function.
8561 (the_low_target): Add entries for insert_point, remove_point,
8562 stopped_by_watchpoint, stopped_data_address, new_process, new_thread,
8563 prepare_to_resume.
8564 * server.c (debug_hw_points): New global.
8565 (monitor_show_help): Document set debug-hw-points.
8566 (handle_query): Process "set debug-hw-points".
8567 * server.h (debug_hw_points): Declare.
8568 (paddress): Declare.
8569 * utils.c (NUMCELLS, CELLSIZE): New macros.
8570 (get_sell, xsnprintf, paddress): New functions.
8571 * win32-arm-low.c (the_low_target): Add entries for insert_point,
8572 remove_point, stopped_by_watchpoint, stopped_data_address.
8573 * win32-i386-low.c: Include i386-low.h.
8574 (debug_reg_state): Replaces dr.
8575 (i386_dr_low_set_addr, i386_dr_low_set_control): New functions.
8576 (i386_dr_low_get_status): New function.
8577 (i386_insert_point, i386_remove_point): New functions.
8578 (i386_stopped_by_watchpoint): New function.
8579 (i386_stopped_data_address): New function.
8580 (i386_initial_stuff): Update.
8581 (get_thread_context,set_thread_context,i386_thread_added): Update.
8582 (the_low_target): Add entries for insert_point,
8583 remove_point, stopped_by_watchpoint, stopped_data_address.
8584 * win32-low.c (win32_insert_watchpoint): New function.
8585 (win32_remove_watchpoint): New function.
8586 (win32_stopped_by_watchpoint): New function.
8587 (win32_stopped_data_address): New function.
8588 (win32_target_ops): Add entries for insert_watchpoint,
8589 remove_watchpoint, stopped_by_watchpoint, stopped_data_address.
8590 * win32-low.h (win32_target_ops): New members insert_point,
8591 remove_point, stopped_by_watchpoint, stopped_data_address.
8592
d993e290
PA
85932009-06-25 Pedro Alves <pedro@codesourcery.com>
8594
8595 * server.c (process_serial_event): Re-return unsupported, not
8596 error, if the type isn't recognized. Re-allow supporting only
8597 insert or remove packets. Also call require_running for
8598 breakpoints. Add missing break statement to default case. Tidy.
8599 * target.h (struct target_ops): Rename insert_watchpoint to
8600 insert_point, and remove_watchpoint to remove_point.
8601
8602 * linux-low.h (struct linux_target_ops): Likewise.
8603 * linux-low.c (linux_insert_watchpoint): Rename to ...
8604 (linux_insert_point): ... this. Adjust.
8605 (linux_remove_watchpoint): Rename to ...
8606 (linux_remove_point): ... this. Adjust.
8607 (linux_target_ops): Adjust.
8608 * linux-crisv32-low.c (cris_insert_watchpoint): Rename to ...
8609 (cris_insert_point): ... this.
8610 (cris_remove_watchpoint): Rename to ...
8611 (cris_remove_point): ... this.
8612 (the_low_target): Adjust.
8613
0f54c268
PM
86142009-06-24 Pierre Muller <muller@ics.u-strasbg.fr>
8615
8616 * server.c (handle_v_kill): Pass signal_pid to
8617 kill_inferior if multi_process is zero.
8618
c6314022
AR
86192009-06-23 Aleksandar Ristovski <aristovski@qnx.com>
8620
8621 * server.c (process_serial_event): Add support for Z0 and Z1 packet.
8622 * target.h (target_ops): Comment for *_watchpoint to make it clear
8623 the functions can get types '0' and '1'.
8624
4463ce24
AR
86252009-06-22 Aleksandar Ristovski <aristovski@qnx.com>
8626
8627 * linux-low.c (usr_fetch_inferior_registers): Remove check for regno 0.
8628 * proc-service.c (ps_lgetregs): Pass -1 to fetch all registers.
8629 * regcache.c (get_regcache): Likewise.
8630 * spu-low.c (spu_fetch_registers): Remove 0 to -1 conversion.
8631 * win32-low.c (child_fetch_inferior_registers): Remove check for
8632 regno 0.
8633
cf8fd78b
PA
86342009-06-19 Aleksandar Ristovski <aristovski@qnx.com>
8635 Pedro Alves <pedro@codesourcery.com>
8636
8637 * target.h (struct target_ops) <supports_multi_process>: New
8638 callback.
8639 (target_supports_multi_process): New.
8640 * server.c (handle_query): Even if GDB reports support, only
8641 enable multi-process if the target also supports it. Report
8642 multi-process support only if the target backend supports it.
8643 * linux-low.c (linux_supports_multi_process): New function.
8644 (linux_target_ops): Install it as target_supports_multi_process
8645 callback.
8646
47c0c975
DE
86472009-05-24 Doug Evans <dje@google.com>
8648
e09875d4
DE
8649 Global renaming of find_thread_pid to find_thread_ptid.
8650 * server.h (find_thread_ptid): Renamed from find_thread_pid.
8651 * inferiors.c (find_thread_ptid): Renamed from find_thread_pid.
8652 All callers updated.
8653
e27d73f6
DE
8654 * linux-low.c (handle_extended_wait): Use linux_resume_one_lwp
8655 to resume the newly created thread, don't call ptrace (PTRACE_CONT)
8656 directly.
8657
47c0c975
DE
8658 * linux-low.c (get_stop_pc): Print pc if debug_threads.
8659 (check_removed_breakpoint, linux_wait_for_lwp): Ditto.
8660 (linux_resume_one_lwp): Ditto.
8661
2acc282a
DE
86622009-05-23 Doug Evans <dje@google.com>
8663
8664 * linux-low.c (linux_resume_one_lwp): Change type of first arg
8665 from struct inferior_list_entry * to struct lwp_info *.
8666 All callers updated.
8667
9f1036c1
DE
86682009-05-13 Doug Evans <dje@google.com>
8669
8670 * linux-x86-low.c: Don't include assert.h.
8671 (x86_siginfo_fixup): Use fatal, not assert.
8672 (x86_arch_setup): Fix comment.
8673
d0722149
DE
86742009-05-12 Doug Evans <dje@google.com>
8675
8676 Biarch support for i386/amd64 gdbserver.
8677 * Makefile.in (SFILES): Remove linux-i386-low.c, linux-x86-64-low.c.
8678 Add linux-x86-low.c.
8679 (linux-i386-low.o, linux-x86-64-low.o): Delete.
8680 (linux-x86-low.o): Add.
8681 * linux-x86-64-low.c: Delete.
8682 * linux-i386-low.c: Delete.
8683 * linux-x86-low.c: New file.
8684 * configure.srv (i?86-linux srv_tgtobj): Replace linux-i386-low.o with
8685 linux-x86-low.o.
8686 (x86_64-linux srv_tgtobj): Replace linux-x86-64-low.o with
8687 linux-x86-low.o.
8688 (x86_64-linux srv_regobj): Add reg-i386-linux.o.
8689 * linux-low.c: Include ansidecl.h, elf/common.h, elf/external.h.
8690 (linux_child_pid_to_exec_file): New function.
8691 (elf_64_header_p, elf_64_file_p): New functions.
8692 (siginfo_fixup): New function.
8693 (linux_xfer_siginfo): New local inf_siginfo. Call siginfo_fixup to
8694 give target a chance to convert layout.
8695 * linux-low.h (linux_target_ops): New member siginfo_fixup.
8696 (linux_child_pid_to_exec_file, elf_64_file_p): Declare.
8697
fdeb2a12
DE
86982009-05-07 Doug Evans <dje@google.com>
8699
8700 * linux-low.c (regsets_fetch_inferior_registers): Fix memory leak.
8701 (regsets_store_inferior_registers): Ditto.
8702
a6dbe5df
PA
87032009-05-06 Pedro Alves <pedro@codesourcery.com>
8704
8705 PR server/10048
8706
8707 * linux-low.c (must_set_ptrace_flags): Delete.
8708 (linux_create_inferior): Set `lwp->must_set_ptrace_flags' instead
8709 of the global.
8710 (linux_attach_lwp_1): Don't set PTRACE_SETOPTIONS here. Set
8711 `lwp->must_set_ptrace_flags' instead.
ba42693b 8712 (linux_wait_for_event_1): Set ptrace options here.
a6dbe5df
PA
8713 (linux_wait_1): ... not here.
8714
5091eb23
DE
87152009-04-30 Doug Evans <dje@google.com>
8716
9f767825
DE
8717 * inferiors.c (started_inferior_callback): New function.
8718 (attached_inferior_callback): New function.
8719 (have_started_inferiors_p, have_attached_inferiors_p): New functions.
8720 * server.c (print_started_pid, print_attached_pid): New functions.
8721 (detach_or_kill_for_exit): New function.
8722 (main): Call it instead of for_each_inferior (kill_inferior_callback).
8723 * server.h (have_started_inferiors_p): Declare.
8724 (have_attached_inferiors_p): Declare.
8725
5091eb23
DE
8726 * inferiors.c (remove_process): Fix memory leak, free process.
8727 * linux-low.c (linux_remove_process): New function.
8728 (linux_kill): Call it instead of remove_process.
8729 (linux_detach, linux_wait_1): Ditto.
8730
155c8968
PA
87312009-04-19 Danny Backx <dannybackx@users.sourceforge.net>
8732
8733 * configure.srv: Add x86 Windows CE target.
8734
7fe519cb
UW
87352009-04-03 Ulrich Weigand <uweigand@de.ibm.com>
8736
8737 * inferiors.c (get_thread_process): Make global.
8738 * server.h (get_thread_process): Add prototype.
8739 * thread-db.c (find_one_thread): Use get_thread_process
8740 instead of current_process.
8741 (thread_db_get_tls_address): Do not crash if called when
8742 thread layer is not yet initialized.
8743
5472f405
UW
87442009-04-03 Ulrich Weigand <uweigand@de.ibm.com>
8745
8746 * remote-utils.c (prepare_resume_reply): Null-terminate packet.
8747 * spu-low.c (current_tid): Rename to ...
8748 (current_ptid): ... this.
8749 (fetch_ppc_register, fetch_ppc_memory, store_ppc_memory,
8750 spu_proc_xfer_spu, spu_resume, spu_request_interrupt): Use
8751 ptid_get_lwp (current_ptid) instead of current_tid.
8752 (spu_kill, spu_detach, spu_join, spu_wait): Use pid argument
8753 instead of current_tid. Use find_process_pid to verify pid
8754 argument is valid. Pass proper argument to remove_process.
8755 (spu_thread_alive): Compare current_ptid instead of current_tid.
8756 (spu_resume): Likewise.
8757
55ac2b99
PA
87582009-04-02 Pedro Alves <pedro@codesourcery.com>
8759
8760 * linux-low.c (usr_store_inferior_registers): Declare local `pid'
8761 variable.
8762
95954743
PA
87632009-04-01 Pedro Alves <pedro@codesourcery.com>
8764
8765 Implement the multiprocess extensions, and add linux multiprocess
8766 support.
8767
8768 * server.h (ULONGEST): Declare.
8769 (struct ptid, ptid_t): New.
8770 (minus_one_ptid, null_ptid): Declare.
8771 (ptid_build, pid_to_ptid, ptid_get_pid, ptid_get_lwp)
8772 (ptid_get_tid, ptid_equal, ptid_is_pid): Declare.
8773 (struct inferior_list_entry): Change `id' type from unsigned from
8774 to ptid_t.
8775 (struct sym_cache, struct breakpoint, struct
8776 process_info_private): Forward declare.
8777 (struct process_info): Declare.
8778 (current_process): Declare.
8779 (all_processes): Declare.
8780 (initialize_inferiors): Declare.
8781 (add_thread): Adjust to use ptid_t.
8782 (thread_id_to_gdb_id, thread_to_gdb_id, gdb_id_to_thread_id): Ditto.
8783 (add_process, remove_process, find_thread_pid): Declare.
8784 (find_inferior_id): Adjust to use ptid_t.
8785 (cont_thread, general_thread, step_thread): Change type to ptid_t.
8786 (multi_process): Declare.
8787 (push_event): Adjust to use ptid_t.
8788 (read_ptid, write_ptid): Declare.
8789 (prepare_resume_reply): Adjust to use ptid_t.
8790 (clear_symbol_cache): Declare.
8791 * inferiors.c (all_processes): New.
8792 (null_ptid, minus_one_ptid): New.
8793 (ptid_build, pid_to_ptid, ptid_get_pid, ptid_get_lwp)
8794 (ptid_get_tid, ptid_equal, ptid_is_pid): New.
8795 (add_thread): Change unsigned long to ptid. Remove gdb_id
8796 parameter. Adjust.
8797 (thread_id_to_gdb_id, thread_to_gdb_id): Change unsigned long to ptid.
8798 (gdb_id_to_thread): Rename to ...
8799 (find_thread_pid): ... this. Change unsigned long to ptid.
8800 (gdb_id_to_thread_id, find_inferior_id): Change unsigned long to ptid.
8801 (loaded_dll, pull_pid_from_list): Adjust.
8802 (add_process, remove_process, find_process_pid)
8803 (get_thread_process, current_process, initialize_inferiors): New.
8804 * target.h (struct thread_resume) <thread>: Change type to ptid_t.
8805 (struct target_waitstatus) <related_pid>: Ditto.
8806 (struct target_ops) <kill, detach>: Add `pid' argument. Change
8807 return type to int.
8808 (struct target_ops) <join>: Add `pid' argument.
8809 (struct target_ops) <thread_alive>: Change pid's type to ptid_t.
8810 (struct target_ops) <wait>: Add `ptid' field. Change return type
8811 to ptid.
8812 (kill_inferior, detach_inferior, join_inferior): Add `pid' argument.
8813 (mywait): Add `ptid' argument. Change return type to ptid_t.
8814 (target_pid_to_str): Declare.
8815 * target.c (set_desired_inferior): Adjust to use ptids.
8816 (mywait): Add new `ptid' argument. Adjust.
8817 (target_pid_to_str): New.
8818 * mem-break.h (free_all_breakpoints): Declare.
8819 * mem-break.c (breakpoints): Delelete.
8820 (set_breakpoint_at, delete_breakpoint, find_breakpoint_at)
8821 (check_mem_read, check_mem_write, delete_all_breakpoints): Adjust
8822 to use per-process breakpoint list.
8823 (free_all_breakpoints): New.
8824 * remote-utils.c (struct sym_cache) <name>: Drop `const'.
8825 (symbol_cache, all_symbols_looked_up): Delete.
8826 (hexchars): New.
8827 (ishex, unpack_varlen_hex, write_ptid, hex_or_minus_one,
8828 read_ptid): New.
8829 (prepare_resume_reply): Change ptid argument's type from unsigned
8830 long to ptid_t. Adjust. Implement W;process and X;process.
8831 (free_sym_cache, clear_symbol_cache): New.
8832 (look_up_one_symbol): Adjust to per-process symbol cache. *
8833 * server.c (cont_thread, general_thread, step_thread): Change type
8834 to ptid_t.
8835 (attached): Delete.
8836 (multi_process): New.
8837 (last_ptid): Change type to ptid_t.
8838 (struct vstop_notif) <ptid>: Change type to ptid_t.
8839 (queue_stop_reply, push_event): Change `ptid' argument's type to
8840 ptid_t.
8841 (discard_queued_stop_replies): Add `pid' argument.
8842 (start_inferior): Adjust to use ptids. Adjust to mywait interface
8843 changes. Don't reference the `attached' global.
8844 (attach_inferior): Adjust to mywait interface changes.
8845 (handle_query): Adjust to use ptids. Parse GDB's qSupported
8846 features. Handle and report "multiprocess+". Handle
8847 "qAttached:PID".
8848 (handle_v_cont): Adjust to use ptids. Adjust to mywait interface
8849 changes.
8850 (handle_v_kill): New.
8851 (handle_v_stopped): Adjust to use target_pid_to_str.
8852 (handle_v_requests): Allow multiple attaches and runs when
8853 multiprocess extensions are in effect. Handle "vKill".
8854 (myresume): Adjust to use ptids.
8855 (queue_stop_reply_callback): Add `arg' parameter. Handle it.
8856 (handle_status): Adjust to discard_queued_stop_replies interface
8857 change.
8858 (first_thread_of, kill_inferior_callback)
8859 (detach_or_kill_inferior_callback, join_inferiors_callback): New.
8860 (main): Call initialize_inferiors. Adjust to use ptids, killing
8861 and detaching from all inferiors. Handle multiprocess packet
8862 variants.
8863 * linux-low.h: Include gdb_proc_service.h.
8864 (struct process_info_private): New.
8865 (struct linux_target_ops) <pid_of>: Use ptid_get_pid.
8866 <lwpid_of>: Use ptid_get_lwp.
8867 (get_lwp_thread): Adjust.
8868 (struct lwp_info): Add `dead' member.
8869 (find_lwp_pid): Declare.
8870 * linux-low.c (thread_db_active): Delete.
8871 (new_inferior): Adjust comment.
8872 (inferior_pid): Delete.
8873 (linux_add_process): New.
8874 (handle_extended_wait): Adjust.
8875 (add_lwp): Change unsigned long to ptid.
8876 (linux_create_inferior): Add process to processes table. Adjust
8877 to use ptids. Don't set new_inferior here.
8878 (linux_attach_lwp): Rename to ...
8879 (linux_attach_lwp_1): ... this. Add `initial' argument. Handle
8880 it. Adjust to use ptids.
8881 (linux_attach_lwp): New.
8882 (linux_attach): Add process to processes table. Don't set
8883 new_inferior here.
8884 (struct counter): New.
8885 (second_thread_of_pid_p, last_thread_of_process_p): New.
8886 (linux_kill_one_lwp): Add `args' parameter. Handle it. Adjust to
8887 multiple processes.
8888 (linux_kill): Add `pid' argument. Handle it. Adjust to multiple
8889 processes. Remove process from process table.
8890 (linux_detach_one_lwp): Add `args' parameter. Handle it. Adjust
8891 to multiple processes.
8892 (any_thread_of): New.
8893 (linux_detach): Add `pid' argument, and handle it. Remove process
8894 from processes table.
8895 (linux_join): Add `pid' argument. Handle it.
8896 (linux_thread_alive): Change unsighed long argument to ptid_t.
8897 Consider dead lwps as not being alive.
8898 (status_pending_p): Rename `dummy' argument to `arg'. Filter out
8899 threads we're not interested in.
8900 (same_lwp, find_lwp_pid): New.
8901 (linux_wait_for_lwp): Change `pid' argument's type from int to
8902 ptid_t. Adjust.
8903 (linux_wait_for_event): Rename to ...
8904 (linux_wait_for_event_1): ... this. Change `pid' argument's type
8905 from int to ptid_t. Adjust.
8906 (linux_wait_for_event): New.
8907 (linux_wait_1): Add `ptid' argument. Change return type to
8908 ptid_t. Adjust. Use last_thread_of_process_p. Remove processes
8909 that exit from the process table.
8910 (linux_wait): Add `ptid' argument. Change return type to ptid_t.
8911 Adjust.
8912 (mark_lwp_dead): New.
8913 (wait_for_sigstop): Adjust to use ptids. If a process exits while
8914 stopping all threads, mark its main lwp as dead.
8915 (linux_set_resume_request, linux_resume_one_thread): Adjust to use
8916 ptids.
8917 (fetch_register, usr_store_inferior_registers)
8918 (regsets_fetch_inferior_registers)
8919 (regsets_store_inferior_registers, linux_read_memory)
8920 (linux_write_memory): Inline `inferior_pid'.
8921 (linux_look_up_symbols): Adjust to use per-process
8922 `thread_db_active'.
8923 (linux_request_interrupt): Adjust to use ptids.
8924 (linux_read_auxv): Inline `inferior_pid'.
8925 (initialize_low): Don't reference thread_db_active.
8926 * gdb_proc_service.h (struct ps_prochandle) <pid>: Remove.
8927 * proc-service.c (ps_lgetregs): Use find_lwp_pid.
8928 (ps_getpid): Return the pid of the current inferior.
8929 * thread-db.c (proc_handle, thread_agent): Delete.
8930 (thread_db_create_event, thread_db_enable_reporting): Adjust to
8931 per-process data.
8932 (find_one_thread): Change argument type to ptid_t. Adjust to
8933 per-process data.
8934 (maybe_attach_thread): Adjust to per-process data and ptids.
8935 (thread_db_find_new_threads): Ditto.
8936 (thread_db_init): Ditto.
8937 * spu-low.c (spu_create_inferior, spu_attach): Add process to
8938 processes table. Adjust to use ptids.
8939 (spu_kill, spu_detach): Adjust interface. Remove process from
8940 processes table.
8941 (spu_join, spu_thread_alive): Adjust interface.
8942 (spu_wait): Adjust interface. Remove process from processes
8943 table. Adjust to use ptids.
8944 * win32-low.c (current_inferior_tid): Delete.
8945 (current_inferior_ptid): New.
8946 (debug_event_ptid): New.
8947 (thread_rec): Take a ptid. Adjust.
8948 (child_add_thread): Add `pid' argument. Adjust to use ptids.
8949 (child_delete_thread): Ditto.
8950 (do_initial_child_stuff): Add `attached' argument. Add process to
8951 processes table.
8952 (child_fetch_inferior_registers, child_store_inferior_registers):
8953 Adjust.
8954 (win32_create_inferior): Pass 0 to do_initial_child_stuff.
8955 (win32_attach): Pass 1 to do_initial_child_stuff.
8956 (win32_kill): Adjust interface. Remove process from processes
8957 table.
8958 (win32_detach): Ditto.
8959 (win32_join): Adjust interface.
8960 (win32_thread_alive): Take a ptid.
8961 (win32_resume): Adjust to use ptids.
8962 (get_child_debug_event): Ditto.
8963 (win32_wait): Adjust interface. Remove exiting process from
8964 processes table.
8965
bd99dc85
PA
89662009-04-01 Pedro Alves <pedro@codesourcery.com>
8967
8968 Non-stop mode support.
8969
8970 * server.h (non_stop): Declare.
8971 (gdb_client_data, handler_func): Declare.
8972 (delete_file_handler, add_file_handler, start_event_loop):
8973 Declare.
8974 (handle_serial_event, handle_target_event, push_event)
8975 (putpkt_notif): Declare.
8976 * target.h (enum resume_kind): New.
8977 (struct thread_resume): Replace `step' field by `kind' field.
8978 (TARGET_WNOHANG): Define.
8979 (struct target_ops) <wait>: Add `options' argument.
8980 <supports_non_stop, async, start_non_stop>: New fields.
8981 (target_supports_non_stop, target_async): New.
8982 (start_non_stop): Declare.
8983 (mywait): Add `options' argument.
8984 * target.c (mywait): Add `options' argument. Print child exit
8985 notifications here.
8986 (start_non_stop): New.
8987 * server.c (non_stop, own_buf, mem_buf): New globals.
8988 (struct vstop_notif): New.
8989 (notif_queue): New global.
8990 (queue_stop_reply, push_event, discard_queued_stop_replies)
8991 (send_next_stop_reply): New.
8992 (start_inferior): Adjust to use resume_kind. Adjust to mywait
8993 interface changes.
8994 (attach_inferior): In non-stop mode, don't wait for the target
8995 here.
8996 (handle_general_set): Handle QNonStop.
8997 (handle_query): When handling qC, return the current general
8998 thread, instead of the first thread of the list.
8999 (handle_query): If the backend supports non-stop mode, include
9000 QNonStop+ in the qSupported query response.
9001 (handle_v_cont): Adjust to use resume_kind. Handle resume_stop
9002 and non-stop mode.
9003 (handle_v_attach, handle_v_run): Handle non-stop mode.
9004 (handle_v_stopped): New.
9005 (handle_v_requests): Report support for vCont;t. Handle vStopped.
9006 (myresume): Adjust to use resume_kind. Handle non-stop.
9007 (queue_stop_reply_callback): New.
9008 (handle_status): Handle non-stop mode.
9009 (main): Clear non_stop flag on reconnection. Use the event-loop.
9010 Refactor serial protocol handling from here ...
9011 (process_serial_event): ... to this new function. When GDB
9012 selects any thread, select one here. In non-stop mode, wait until
9013 GDB acks all pending events before exiting.
9014 (handle_serial_event, handle_target_event): New.
9015 * remote-utils.c (remote_open): Install remote_desc in the event
9016 loop.
9017 (remote_close): Remove remote_desc from the event loop.
9018 (putpkt_binary): Rename to...
9019 (putpkt_binary_1): ... this. Add `is_notic' argument. Handle it.
9020 (putpkt_binary): New as wrapper around putpkt_binary_1.
9021 (putpkt_notif): New.
9022 (prepare_resume_reply): In non-stop mode, don't change the
9023 general_thread.
9024 * event-loop.c: New.
9025 * Makefile.in (OBJ): Add event-loop.o.
9026 (event-loop.o): New rule.
9027
9028 * linux-low.h (pid_of): Moved here.
9029 (lwpid_of): New.
9030 (get_lwp_thread): Use lwpid_of.
9031 (struct lwp_info): Delete `lwpid' field. Add `suspended' field.
9032 * linux-low.c (pid_of): Delete.
9033 (inferior_pid): Use lwpid_of.
9034 (linux_event_pipe): New.
9035 (target_is_async_p): New.
9036 (delete_lwp): New.
9037 (handle_extended_wait): Use lwpid_of.
9038 (add_lwp): Don't set lwpid field.
9039 (linux_attach_lwp): Adjust debug output. Use lwpid_of.
9040 (linux_kill_one_lwp): If killing a running lwp, stop it first.
9041 Use lwpid_of. Adjust to linux_wait_for_event interface changes.
9042 (linux_detach_one_lwp): If detaching from a running lwp, stop it
9043 first. Adjust to linux_wait_for_event interface changes. Use
9044 lwpid_of.
9045 (linux_detach): Don't delete the main lwp here.
9046 (linux_join): Use my_waitpid. Avoid signal_pid. Use lwpid_of.
9047 (status_pending_p): Don't consider explicitly suspended lwps.
9048 (linux_wait_for_lwp): Take an integer pid instead of a lwp_info
9049 pointer. Add OPTIONS argument. Change return type to int. Use
9050 my_waitpid instead of sleeping. Handle WNOHANG. Use lwpid_of.
9051 (linux_wait_for_event): Take an integer pid instead of a lwp_info
9052 pointer. Add status pointer argument. Return a pid instead of a
9053 status. Use lwpid_of. Adjust to linux_wait_for_lwp interface
9054 changes. In non-stop mode, don't switch to a random thread.
9055 (linux_wait): Rename to...
9056 (linux_wait_1): ... this. Add target_options argument, and handle
9057 it. Adjust to use resume_kind. Use lwpid_of. In non-stop mode,
9058 don't handle the continue thread. Handle TARGET_WNOHANG. Merge
9059 clean exit and signal exit code. Don't stop all threads in
9060 non-stop mode. In all-stop mode, only stop all threads when
9061 reporting a stop to GDB. Handle explicit thread stop requests.
9062 (async_file_flush, async_file_mark): New.
9063 (linux_wait): New.
9064 (send_sigstop): Use lwpid_of.
9065 (wait_for_sigstop): Use lwpid_of. Adjust to linux_wait_for_event
9066 interface changes. In non-stop mode, don't switch to a random
9067 thread.
9068 (linux_resume_one_lwp): Use lwpid_of.
9069 (linux_continue_one_thread, linux_queue_one_thread): Merge into ...
9070 (linux_resume_one_thread): ... this. Handle resume_stop. In
9071 non-stop mode, don't look for pending flag in all threads.
9072 (resume_status_pending_p): Don't consider explicitly suspended
9073 threads.
9074 (my_waitpid): Reimplement. Emulate __WALL.
9075 (linux_request_interrupt, linux_read_offsets, linux_xfer_siginfo):
9076 Use lwpid_of.
9077 (sigchld_handler, linux_supports_non_stop, linux_async)
9078 (linux_start_non_stop): New.
9079 (linux_target_ops): Register linux_supports_non_stop, linux_async
9080 and linux_start_non_stop.
9081 (initialize_low): Install SIGCHLD handler.
9082 * thread-db.c (thread_db_create_event, find_one_thread)
9083 (thread_db_get_tls_address): Use lwpid_of.
9084 * win32-low.c (win32_detach): Adjust to use resume_kind.
9085 (win32_wait): Add `options' argument.
9086 * spu-low.c (spu_resume): Adjust to use resume_kind.
9087 (spu_wait): Add `options' argument.
9088
5b1c542e
PA
90892009-04-01 Pedro Alves <pedro@codesourcery.com>
9090
9091 Decouple target code from remote protocol.
9092
9093 * target.h (enum target_waitkind): New.
9094 (struct target_waitstatus): New.
9095 (struct target_ops) <wait>: Return an unsigned long. Take a
9096 target_waitstatus pointer instead of a char pointer.
9097 (mywait): Likewise.
9098 * target.c (mywait): Change prototype to return an unsigned long.
9099 Take a target_waitstatus pointer instead of a char pointer. Adjust.
9100 * server.h (thread_from_wait, old_thread_from_wait): Delete
9101 declarations.
9102 (prepare_resume_reply): Change prototype to take a
9103 target_waitstatus.
9104 * server.c (thread_from_wait, old_thread_from_wait): Delete.
9105 (last_status, last_ptid): New.
9106 (start_inferior): Remove "statusptr" argument. Adjust. Return a
9107 pid instead of a signal.
9108 (attach_inferior): Remove "status" and "signal" parameters.
9109 Adjust.
9110 (handle_query): For qGetTLSAddr, parse the thread id with strtol,
9111 not as an address.
9112 (handle_v_cont, handle_v_attach, handle_v_run, handle_v_kill)
9113 (handle_v_requests, myresume): Remove "status" and "signal"
9114 parameters. Adjust.
9115 (handle_status): New.
9116 (main): Delete local `status'. Adjust.
9117 * remote-utils.c: Include target.h.
9118 (prepare_resume_reply): Change prototype to take a
9119 target_waitstatus. Adjust.
9120
9121 * linux-low.c (linux_wait): Adjust to new target_ops->wait
9122 interface.
9123 * spu-low.c (spu_wait): Adjust.
9124 * win32-low.c (enum target_waitkind, struct target_waitstatus):
9125 Delete.
9126 (win32_wait): Adjust.
9127
2bd7c093
PA
91282009-04-01 Pedro Alves <pedro@codesourcery.com>
9129
9130 * target.h (struct thread_resume): Delete leave_stopped member.
9131 (struct target_ops): Add a `n' argument to the `resume' callback.
9132 * server.c (start_inferior): Adjust.
9133 (handle_v_cont, myresume): Adjust.
9134 * linux-low.c (check_removed_breakpoint): Adjust to resume
9135 interface change, and to removed leave_stopped field.
9136 (resume_ptr): Delete.
9137 (struct thread_resume_array): New.
9138 (linux_set_resume_request): Add new `arg' parameter. Adjust to
9139 resume interface change.
9140 (linux_continue_one_thread, linux_queue_one_thread)
9141 (resume_status_pending_p): Check if the resume field is NULL
9142 instead of checking the leave_stopped member.
9143 (linux_resume): Adjust to the target resume interface change.
9144 * spu-low.c (spu_resume): Adjust to the target resume interface
9145 change.
9146 * win32-low.c (win32_detach, win32_resume): Ditto.
9147
c35fafde
PA
91482009-04-01 Pedro Alves <pedro@codesourcery.com>
9149
9150 * linux-low.c (linux_wait_for_event): Don't clear the `stepping'
9151 flag.
9152 (wait_for_sigstop): Don't leave a finished single-step SIGTRAP
9153 pending.
9154 (linux_continue_one_thread): Only preserve the stepping flag if
9155 there's a pending breakpoint.
9156
0a59d50b
PA
91572009-03-31 Pedro Alves <pedro@codesourcery.com>
9158
9159 * server.c (main): After the inferior having exited, call
9160 remote_close before exiting gdbserver.
9161
f04c6d38
TJB
91622009-03-25 Thiago Jung Bauermann <bauerman@br.ibm.com>
9163
9164 Fix size of FPSCR in Power 7 processors.
9165 * linux-ppc-low.c (PPC_FEATURE_ARCH_2_05): Remove #define.
9166 (PPC_FEATURE_HAS_DFP): New #define.
9167 (ppc_arch_setup): Check for DFP feature instead of ISA 2.05 to decide on
9168 size of the FPSCR.
9169
78e5cee6
PA
91702009-03-23 Pedro Alves <pedro@codesourcery.com>
9171
9172 * server.c (handle_query) Whitespace and formatting.
9173
1b3f6016
PA
91742009-03-22 Pedro Alves <pedro@codesourcery.com>
9175
9176 * i387-fp.c, linux-arm-low.c, linux-cris-low.c,
9177 linux-crisv32-low.c, linux-i386-low.c, linux-low.c,
9178 linux-mips-low.c, linux-s390-low.c, linux-sparc-low.c,
9179 linux-x86-64-low.c, linux-xtensa-low.c, proc-service.c,
9180 regcache.c, remote-utils.c, server.c, spu-low.c, target.h,
9181 thread-db.c, win32-low.c, xtensa-xtregs.c, gdbreplay.c,
9182 Makefile.in, configure.ac: Fix whitespace throughout.
9183 * configure: Regenerate.
9184
a07b2135
PA
91852009-03-22 Pedro Alves <pedro@codesourcery.com>
9186
9187 * inferiors.c (find_inferior): Make it safe for the callback
9188 function to delete the currently iterated inferior.
9189
67cc2626
PA
91902009-03-22 Pedro Alves <pedro@codesourcery.com>
9191
9192 * Makefile.in (linuw_low_h): Move higher.
9193 (thread-db.o): Depend on $(linux_low_h).
9194
54a0b537
PA
91952009-03-17 Pedro Alves <pedro@codesourcery.com>
9196
9197 Rename "process" to "lwp" throughout.
9198
9199 * linux-low.c (all_processes): Rename to...
9200 (all_lwps): ... this.
9201 (inferior_pid, handle_extended_wait, get_stop_pc): Adjust.
9202 (add_process): Rename to ...
9203 (add_lwp): ... this. Adjust.
9204 (linux_create_inferior): Adjust.
9205 (linux_attach_lwp): Adjust.
9206 (linux_attach): Adjust.
9207 (linux_kill_one_process): Rename to ...
9208 (linux_kill_one_lwp): ... this. Adjust.
9209 (linux_kill): Adjust.
9210 (linux_detach_one_process): Rename to ...
9211 (linux_detach_one_lwp): ... this. Adjust.
9212 (linux_detach): Adjust.
9213 (check_removed_breakpoint): Adjust.
9214 (status_pending_p): Adjust.
9215 (linux_wait_for_process): Rename to ...
9216 (linux_wait_for_lwp): ... this. Adjust.
9217 (linux_wait_for_event): Adjust.
9218 (send_sigstop): Adjust.
9219 (wait_for_sigstop): Adjust.
9220 (stop_all_processes): Rename to ...
9221 (stop_all_lwps): ... this.
9222 (linux_resume_one_process): Rename to ...
9223 (linux_resume_one_lwp): ... this. Adjust.
9224 (linux_set_resume_request, linux_continue_one_thread)
9225 (linux_queue_one_thread, resume_status_pending_p)
9226 (usr_store_inferior_registers, regsets_store_inferior_registers)
9227 (linux_request_interrupt, linux_read_offsets, linux_xfer_siginfo):
9228 Adjust.
9229 * linux-low.h (get_process): Rename to ...
9230 (get_lwp): ... this. Adjust.
9231 (get_thread_process): Rename to ...
9232 (get_thread_lwp): ... this. Adjust.
9233 (get_process_thread): Rename to ...
9234 (get_lwp_thread): ... this. Adjust.
9235 (struct process_info): Rename to ...
9236 (struct lwp_info): ... this.
9237 (all_processes): Rename to ...
9238 (all_lwps): ... this.
9239 * proc-service.c (ps_lgetregs): Adjust.
9240 * thread-db.c (thread_db_create_event, find_one_thread)
9241 (maybe_attach_thread, thread_db_get_tls_address): Adjust.
9242
0b16c5cf
PA
92432009-03-14 Pedro Alves <pedro@codesourcery.com>
9244
9245 * server.c (handle_query): Handle "qAttached".
9246
32de4b9d
NS
92472009-03-13 Nathan Sidwell <nathan@codesourcery.com>
9248
9249 * Makefile.in, hostio-errno.c, errno.c, xtensa-xtregs.c: Change to
9250 GPLv3, update license URL.
9251
2aecd87f
DE
92522009-03-01 Doug Evans <dje@google.com>
9253
93efd302 9254 * Makefile.in (INCLUDE_CFLAGS): Add -I$(srcdir)/../common.
2aecd87f
DE
9255 (server_h): Add gdb_signals.h.
9256 (signals.o): Update.
9257 * server.h (target_signal_from_host,target_signal_to_host_p)
9258 (target_signal_to_host,target_signal_to_name): Moved to gdb_signals.h.
9259
86b1f9c5
PM
92602009-02-14 Pierre Muller <muller@ics.u-strasbg.fr>
9261
9262 * remote-utils.c (getpkt): Also generate remote-debug
9263 information if noack_mode is set.
9264
4aa995e1
PA
92652009-02-06 Pedro Alves <pedro@codesourcery.com>
9266
9267 * server.c (handle_query): Report qXfer:siginfo:read and
9268 qXfer:siginfo:write as supported and handle them.
9269 * target.h (struct target_ops) <qxfer_siginfo>: New field.
9270 * linux-low.c (linux_xfer_siginfo): New.
9271 (linux_target_ops): Set it.
9272
62709adf
PA
92732009-01-26 Pedro Alves <pedro@codesourcery.com>
9274
9275 * server.c (gdbserver_usage): Mention --remote-debug.
9276 (main): Accept '--remote-debug' switch.
9277
aef93bd7
DE
92782009-01-18 Doug Evans <dje@google.com>
9279
9280 * regcache.c (new_register_cache): No need to check result of xcalloc.
9281 * server.c (handle_search_memory): Back out calls to xmalloc,
9282 result is checked and error is returned to user upon failure.
9283 (handle_query): Ditto. Add more checks for result of malloc.
9284 (handle_v_cont): Check result of malloc, report error back to
9285 user upon failure.
9286 (handle_v_run): Ditto. Call freeargv.
9287 * server.h (freeargv): Declare.
9288 * utils.c (freeargv): New fn.
9289
54363045
DE
92902009-01-15 Doug Evans <dje@google.com>
9291
f626972c
DE
9292 * gdbreplay.c (perror_with_name): Make arg const char *.
9293 * server.h (target_signal_to_name): Make return type const char *.
0842e787 9294 * thread-db.c (thread_db_err_str): Make return type const char *.
f626972c 9295 * utils.c (perror_with_name): Make arg const char *.
54363045 9296
18aae699
PA
92972009-01-14 Pedro Alves <pedro@codesourcery.com>
9298
9299 * win32-low.c (get_child_debug_event): Issue a final DBG_CONTINUE
9300 when handling a EXIT_PROCESS_DEBUG_EVENT.
9301
ff703abe
JB
93022009-01-06 Joel Brobecker <brobecker@adacore.com>
9303
9304 * gdbreplay.c (gdbreplay_version): Update copyright year.
9305 * server.c (gdbserver_version): Likewise.
9306
f21cc1a2 93072009-01-05 Doug Evans <dje@google.com>
0e21c1ec
DE
9308
9309 * linux-low.c (linux_attach_lwp): Add some comments/fixmes.
f21cc1a2 9310 (handle_extended_wait): Improve comment.
0e21c1ec 9311
bca929d3
DE
93122008-12-13 Doug Evans <dje@google.com>
9313
9314 * utils.c (xmalloc,xcalloc,xstrdup): New fns.
9315 * server.h (ATTR_MALLOC): New macro.
9316 (xmalloc,xcalloc,xstrdup): Declare.
9317 * hostio.c: Replace malloc,calloc,strdup with xmalloc,xcalloc,xstrdup.
9318 * inferiors.c: Ditto.
9319 * linux-low.c: Ditto.
9320 * mem-break.c: Ditto.
9321 * regcache.c: Ditto.
9322 * remote-utils.c: Ditto.
9323 * server.c: Ditto.
9324 * target.c: Ditto.
9325 * win32-low.c: Ditto.
9326
97438e3f
DE
93272008-12-12 Doug Evans <dje@google.com>
9328
896c7fbb
DE
9329 * linux-low.c (linux_wait_for_process): Don't clobber current_inferior
9330 in debugging printf.
9331
97438e3f
DE
9332 * linux-low.c (handle_extended_wait): Simplify, use my_waitpid.
9333
e3b886f8
DE
93342008-12-09 Doug Evans <dje@google.com>
9335
9336 * linux-low.h (struct process_info): Delete member tid, unused.
9337 * thread-db.c (find_one_thread): Update.
9338 (maybe_attach_thread): Update.
9339
07e059b5
VP
93402008-12-02 Pedro Alves <pedro@codesourcery.com>
9341
889bf7c5
PA
9342 * target.h (struct target_ops): Add qxfer_osdata member.
9343 * linux-low.c: Include ctype.h and pwd.h and sys/types.h
9344 and dirent.h.
9345 (linux_qxfer_osdata): New functions.
9346 (linux_target_ops): Register linux_qxfer_osdata as qxfer_osdata
9347 callback.
9348 * server.c (handle_query): Handle "qXfer:osdata:read:".
9349 * remote-utils.c (buffer_grow, buffer_free, buffer_init, buffer_finish)
9350 (buffer_xml_printf): New functions.
9351 * server.h (struct buffer): New.
9352 (buffer_grow_str, buffer_grow_str0): New macros.
9353 (buffer_grow, buffer_free, buffer_init, buffer_finish)
9354 (buffer_xml_printf): Declare.
07e059b5 9355
4cab47ab
DE
93562008-11-24 Doug Evans <dje@google.com>
9357
9358 * Makefile.in (VERSION,DIST,LINT,LINTFLAGS): Delete, unused.
9359
f142445f
DJ
93602008-11-24 Daniel Jacobowitz <dan@codesourcery.com>
9361
9362 * server.c (handle_v_run): Always use the supplied argument list.
9363
d0107bb6 93642008-11-19 Bob Wilson <bob.wilson@acm.org>
889bf7c5 9365
d0107bb6
BW
9366 * xtensa-xtregs.c (XTENSA_ELF_XTREG_SIZE): Change to 4.
9367 (xtensa_regmap_table): Add entry for scompare1.
889bf7c5 9368
2c4ad781
TJB
93692008-11-18 Thiago Jung Bauermann <bauerman@br.ibm.com>
9370
9371 * Makefile.in (powerpc-isa205-32l.o, powerpc-isa205-32l.c,
9372 powerpc-isa205-altivec32l.o, powerpc-isa205-altivec32l.c,
9373 powerpc-isa205-vsx32l.o, powerpc-isa205-vsx32l.c,
9374 powerpc-isa205-64l.o, powerpc-isa205-64l.c,
9375 powerpc-isa205-altivec64l.o, powerpc-isa205-altivec64l.c,
9376 powerpc-isa205-vsx64l.o, powerpc-isa205-vsx64l.c): New targets.
9377 * configure.srv (powerpc*-*-linux*): Add ISA 2.05 object files and
9378 XML target descriptions.
9379 * linux-ppc-low.c (ppc_arch_setup): Init registers with 64-bit FPSCR
9380 when inferior is running on an ISA 2.05 or later processor. Add
9381 special case to return offset for full 64-bit slot of FPSCR when
9382 in 32-bits.
9383
dfb64f85
DJ
93842008-11-14 Daniel Gutson <dgutson@codesourcery.com>
9385
9386 * Makefile.in (SFILES, clean): Added sparc64 files.
9387 (reg-sparc64.o, reg-sparc64.c): New.
9388 * configure.srv (sparc*-*-linux*): New configuration.
9389 * linux-low.c (regsets_fetch_inferior_registers): Swap ptrace
9390 syscall arguments for SPARC.
9391 (regsets_store_inferior_registers): Likewise.
9392 * linux-sparc-low.c: New file.
9393
66b6e1dd
DE
93942008-10-21 Doug Evans <dje@google.com>
9395
9396 * Makefile.in (BFD_DIR,BFD,BFD_SRC,BFD_CFLAGS): Delete.
9397 (READLINE_DIR,READLINE_DEP): Delete.
9398 (INTERNAL_CFLAGS): Update.
9399 (LINTFLAGS): Update.
9400
9b710a42
PA
94012008-10-10 Pedro Alves <pedro@codesourcery.com>
9402
9403 * server.c (handle_v_run): If GDB didn't specify an argv, use the
9404 whole argv from the last run, not just argv[0].
9405
5822d809
PA
94062008-09-08 Pedro Alves <pedro@codesourcery.com>
9407
9408 * regcache.c (new_register_cache): Return NULL if the register
9409 cache size isn't known yet.
9410 (free_register_cache): Avoid dereferencing a NULL regcache.
9411
74aac56f
DJ
94122008-09-04 Daniel Jacobowitz <dan@codesourcery.com>
9413
9414 * configure.srv: Merge MIPS and MIPS64.
9415
400b20f5
MR
94162008-08-24 Maciej W. Rozycki <macro@linux-mips.org>
9417
9418 * Makefile.in (uninstall): Apply $(EXEEXT) too.
9419
677c5bb1
LM
94202008-08-18 Luis Machado <luisgpm@br.ibm.com>
9421
9422 * Makefile.in: Add required vsx dependencies.
9423
9424 * linux-ppc-low: Define PPC_FEATURE_HAS_VSX.
9425 Declare init_registers_powerpc_vsx32l.
9426 Declare init_registers_powerpc_vsx64l.
9427 Define PTRACE_GETVSXREGS and PTRACE_SETVSXREGS.
9428 (ppc_arch_setup): Check for VSX in hwcap.
9429 (ppc_fill_vsxregset): New function.
9430 (ppc_store_vsxregset): New function.
9431 Add new VSX entry in regset_info target_regsets.
9432
9433 * configure.srv: Add new VSX dependencies.
9434
a6f3e723
SL
94352008-08-12 Pedro Alves <pedro@codesourcery.com>
9436
9437 * remote-utils.c (noack_mode, transport_is_reliable): New globals.
9438 (remote_open): Set or clear transport_is_reliable.
9439 (putpkt_binary): Don't expect acks in noack mode.
9440 (getpkt): Don't send ack/nac in noack mode.
9441 * server.c (handle_general_set): Handle QStartNoAckMode.
9442 (handle_query): If connected by tcp pass QStartNoAckMode+ in
9443 qSupported.
9444 (main): Reset noack_mode on every connection.
9445 * server.h (noack_mode): Declare.
9446
a417dc56
RW
94472008-08-07 Ralf Wildenhues <Ralf.Wildenhues@gmx.de>
9448
9449 * Makefile.in (GDBREPLAY_OBS): New variable.
9450 (gdbreplay$(EXEEXT)): Use it to avoid unportable $^.
9451
3221518c
UW
94522008-08-05 Ulrich Weigand <uweigand@de.ibm.com>
9453 Daniel Jacobowitz <dan@codesourcery.com>
9454
9455 * linux-low.c (linux_resume_one_process): Ignore ESRCH.
9456 (usr_store_inferior_registers): Likewise.
9457 (regsets_store_inferior_registers): Likewise.
9458
ec56be1b
PA
94592008-07-31 Rolf Jansen <rj@surtec.com>
9460 Pedro Alves <pedro@codesourcery.com>
9461
9462 * configure.ac: Check for memmem declaration.
9463 * server.c [HAVE_MALLOC_H]: Include malloc.h.
9464 (disable_packet_vCont, disable_packet_Tthread, disable_packet_qC)
9465 (disable_packet_qfThreadInfo): Unconditionally compile.
9466 * server.h [!HAVE_DECL_MEMMEM]: Declare memmem.
9467 * configure, config.in: Regenerate.
9468
2fe5e3ff
DE
94692008-07-28 Doug Kwan <dougkwan@google.com>
9470
9471 * linux-low.c (sys/dir.h, sys/user.h): Remove includes.
9472 (linux_write_memory): Remove declaration of errno.
9473
836acd6d
UW
94742008-07-12 Ulrich Weigand <uweigand@de.ibm.com>
9475
9476 * linux-low.c (handle_extended_wait): Do not use "status"
9477 variable uninitialized.
9478
aeba519e
PA
94792008-07-07 Pedro Alves <pedro@codesourcery.com>
9480
9481 * server.c (handle_v_attach): Inhibit reporting dll changes.
9482
db42f210
PA
94832008-06-27 Pedro Alves <pedro@codesourcery.com>
9484
9485 * remote-utils.c (prepare_resume_reply): If requested, don't
9486 output "thread:TID" in the T stop reply.
9487
9488 * server.c (disable_packet_vCont, disable_packet_Tthread)
9489 (disable_packet_qC, disable_packet_qfThreadInfo): New globals.
9490 (handle_query): If requested, disable support for qC, qfThreadInfo
9491 and qsThreadInfo.
9492 (handle_v_requests): If requested, disable support for vCont.
9493 (gdbserver_show_disableable): New.
9494 (main): Handle --disable-packet and --disable-packet=LIST.
9495
9496 * server.h (disable_packet_vCont, disable_packet_Tthread)
9497 (disable_packet_qC, disable_packet_qfThreadInfo): Declare.
9498
8e4c5421
CD
94992008-06-20 Carlos O'Donell <carlos@codesourcery.com>
9500
9501 * server.c (gdbserver_usage): Mention --version.
9502
6e23a804
DJ
95032008-06-06 Daniel Jacobowitz <dan@codesourcery.com>
9504
9505 * Makefile.in (gdbreplay.o): New rule.
9506
90aa6a40
JM
95072008-06-06 Joseph Myers <joseph@codesourcery.com>
9508
9509 * gdbreplay.c (gdbreplay_version): Say gdbreplay in version
9510 message, not gdbserver.
9511
c16158bc 95122008-06-05 Vladimir Prus <vladimir@codesourcery.com>
889bf7c5
PA
9513 Nathan Sidwell <nathan@codesourcery.com>
9514 Joseph Myers <joseph@codesourcery.com>
c16158bc
JM
9515
9516 * acinclude.m4: Include ../../config/acx.m4.
9517 * configure.ac: Use ACX_PKGVERSION and ACX_BUGURL.
9518 * configure, config.in: Regenerate.
9519 * Makefile.in (gdbreplay$(EXEEXT)): Add version.o.
9520 * server.c (gdbserver_version): Print PKGVERSION.
9521 (gdbsrever_usage): Add stream parameter. Print REPORT_BUGS_TO.
9522 (main): Adjust gdbserver_usage calls.
9523 * gdbreplay.c (version, host_name): Add declarations.
9524 (gdbreplay_version, gdbreplay_usage): New.
9525 (main): Accept --version and --help options.
9526
aeb75bf5
DJ
95272008-06-04 Daniel Jacobowitz <dan@codesourcery.com>
9528
9529 * linux-arm-low.c (thumb_breakpoint, thumb_breakpoint_len): New.
9530 (arm_breakpoint_at): Handle Thumb.
9531 (the_low_target): Add comment.
9532
76b233dd
UW
95332008-05-29 Ulrich Weigand <uweigand@de.ibm.com>
9534
9535 * linux-ppc-low.c (ppc_collect_ptrace_register): Clear buffer.
9536
08388c79
DE
95372008-05-09 Doug Evans <dje@google.com>
9538
a3c83fae
DE
9539 * server.h (decode_search_memory_packet): Declare.
9540 * remote-utils.c (decode_search_memory_packet): New fn.
9541 * server.c (handle_search_memory_1): New fn.
08388c79
DE
9542 (handle_search_memory): New fn.
9543 (handle_query): Process qSearch:memory packets.
9544
bb9c3d36
UW
95452008-05-08 Ulrich Weigand <uweigand@de.ibm.com>
9546
9547 * regcache.c (registers_length): Remove.
9548 (set_register_cache): Verify that PBUFSIZ is large enough to hold a
9549 full register packet.
9550 * regcache.h (registers_length): Remove prototype.
9551 * server.h (PBUFSIZ): Define to 16384.
9552
7284e1be
UW
95532008-05-03 Ulrich Weigand <uweigand@de.ibm.com>
9554
9555 * configure.srv (powerpc*-*-linux*): Set srv_regobj to
9556 powerpc-32l.o, powerpc-altivec32l.o, powerpc-e500l.o,
9557 powerpc-64l.o, and powerpc-altivec64l.o.
9558 Remove rs6000/powerpc-32.xml, rs6000/powerpc-64.xml, and
9559 rs6000/powerpc-e500.xml; add rs6000/powerpc-32l.xml,
9560 rs6000/powerpc-altivec32l.xml, rs6000/powerpc-e500l.xml,
9561 rs6000/powerpc-64l.xml, rs6000/powerpc-altivec64l.xml,
9562 rs6000/power-linux.xml, and rs6000/power64-linux.xml
9563 to srv_xmlfiles.
9564
9565 * Makefile.in (reg-ppc.o, reg-ppc.c): Remove, replace by ...
9566 (powerpc-32l.o, powerpc-32l.c): ... these new rules.
9567 (powerpc-32.o, powerpc-32.c): Remove, replace by ...
9568 (powerpc-altivec32l.o, powerpc-altivec32l.c): ... these new rules.
9569 (powerpc-e500.o, powerpc-e500.c): Remove, replace by ...
9570 (powerpc-e500l.o, powerpc-e500l.c): ... these new rules.
9571 (reg-ppc64.o, reg-ppc64.c): Remove, replace by ...
9572 (powerpc-64l.o, powerpc-64l.c): ... these new rules.
9573 (powerpc-64.o, powerpc-64.c): Remove, replace by ...
9574 (powerpc-altivec64l.o, powerpc-altivec64l.c): ... these new rules.
9575 (clean): Update.
9576
9577 * linux-ppc-low.c (init_registers_ppc): Remove, replace by ...
9578 (init_registers_powerpc_32l): ... this new prototype.
9579 (init_registers_powerpc_32): Remove, replace by ...
9580 (init_registers_powerpc_altivec32l): ... this new prototype.
9581 (init_registers_powerpc_e500): Remove, replace by ...
9582 (init_registers_powerpc_e500l): ... this new prototype.
9583 (init_registers_ppc64): Remove, replace by ...
9584 (init_registers_powerpc_64l): ... this new prototype.
9585 (init_registers_powerpc_64): Remove, replace by ...
9586 (init_registers_powerpc_altivec64l): ... this new prototype.
9587 (ppc_num_regs): Set to 73.
9588 (PT_ORIG_R3, PT_TRAP): Define if necessary.
9589 (ppc_regmap, ppc_regmap_e500): Add values for orig_r3 and trap.
9590 (ppc_cannot_store_register): Handle orig_r3 and trap.
9591 (ppc_arch_setup): Update init_registers_... calls.
9592 (ppc_fill_gregset): Handle orig_r3 and trap.
9593
9594 * inferiors.c (clear_inferiors): Reset current_inferior.
9595
fdc59709
PB
95962008-04-23 Paolo Bonzini <bonzini@gnu.org>
9597
889bf7c5
PA
9598 * acinclude.m4: Add override.m4.
9599 * configure: Regenerate.
fdc59709 9600
c9b2f845
UW
96012008-04-21 Ulrich Weigand <uweigand@de.ibm.com>
9602
9603 * linux-ppc-low.c (ppc_arch_setup): Reset ppc_hwcap after the
9604 initial call to init_register_ppc64.
9605
550512b8
UW
96062008-04-21 Ulrich Weigand <uweigand@de.ibm.com>
9607
43aaf8b6
PA
9608 * configure.srv (powerpc64-*-linux*, powerpc-*-linux*): Merge into
9609 single powerpc*-*-linux* case.
550512b8
UW
9610 (s390-*-linux*, s390x-*-linux*): Merge into single s390*-*-linux* case.
9611
b6430ec3
UW
96122008-04-17 Ulrich Weigand <uweigand@de.ibm.com>
9613
9614 * configure.srv [powerpc64-*-linux*]: Remove powerpc-e500.o from
889bf7c5 9615 srv_regobj. Remove rs6000/powerpc-e500.xml and rs6000/power-spe.xml
b6430ec3
UW
9616 from reg_xmlfiles.
9617 * linux-ppc-low.c: Include <elf.h>.
9618 (PPC_FEATURE_HAS_ALTIVEC, PPC_FEATURE_HAS_SPE): Define.
9619 (ppc_hwcap): New global variable.
9620 (ppc_regmap): Remove __SPE__ #ifdef sections.
9621 (ppc_regmap_e500): New global variable.
9622 (ppc_cannot_store_register): Update __SPE__ special case.
9623 (ppc_get_hwcap): New function.
9624 (ppc_arch_setup): Use it to determine whether inferior supports
9625 AltiVec or SPE registers. Set the_low_target.regmap if appropriate.
9626 (ppc_fill_vrregset, ppc_store_vrregset): Define unconditionally.
9627 Do not access registers if target does not support AltiVec.
9628 (ppc_fill_evrregset, ppc_store_evrregset): Define unconditionally.
9629 Do not access registers if target does not support SPE.
9630 (target_regsets): Unconditionally include AltiVec and SPE regsets.
9631
52fa2412
UW
96322008-04-17 Daniel Jacobowitz <dan@codesourcery.com>
9633
9634 * linux-low.c (disabled_regsets, num_regsets): New.
9635 (use_regsets_p): Delete.
9636 (linux_wait_for_process): Clear disabled_regsets.
9637 (regsets_fetch_inferior_registers): Check and set it.
9638 (regsets_store_inferior_registers): Likewise.
9639 (linux_fetch_registers, linux_store_registers): Do not use
9640 use_regsets_p.
9641 (initialize_low): Allocate disabled_regsets.
9642
e28b3332
DJ
96432008-04-14 Daniel Jacobowitz <dan@codesourcery.com>
9644
9645 * Makefile.in (LIBOBJS): New.
9646 (OBS): Use LIBOBJS.
9647 (memmem.o): New rule.
9648 * configure.ac: Use AC_CONFIG_LIBOBJ_DIR and check for memmem.
9649 * configure: Regenerated.
9650
4536995d
UW
96512008-04-04 Ulrich Weigand <uweigand@de.ibm.com>
9652
9653 * server.c (handle_query): Never return "unsupported" for
9654 qXfer:features:read queries.
9655
221c031f
UW
96562008-03-27 Ulrich Weigand <uweigand@de.ibm.com>
9657
9658 * server.c (get_features_xml): Fix inverted condition.
9659 (handle_query): Always support qXfer:feature:read.
9660
ccd213ac
DJ
96612008-03-10 Daniel Jacobowitz <dan@codesourcery.com>
9662
9663 * server.c (wrapper_argv): New.
9664 (start_inferior): Handle wrapper_argv. If set, expect an extra
9665 trap.
9666 (gdbserver_usage): Document --wrapper.
9667 (main): Parse --wrapper.
9668
6fe305f7
UW
96692008-02-28 Ulrich Weigand <uweigand@de.ibm.com>
9670
9671 * configure.srv [powerpc64-*-linux*]: Add all files mentioned for
9672 powerpc-*-linux* to srv_regobj and reg_xmlfiles.
9673 * linux-ppc-low.c (ppc_get_pc): Support bi-arch operation.
9674 (ppc_set_pc): Likewise.
9675 (ppc_arch_setup): New function.
9676 (ppc_fill_gregset): Call ppc_collect_ptrace_register instead
9677 of collect_register.
889bf7c5 9678 (the_low_target): Use ppc_arch_setup as arch_setup initializer.
6fe305f7 9679
5b0a002e
UW
96802008-02-28 Ulrich Weigand <uweigand@de.ibm.com>
9681
9682 * configure.srv [powerpc64-*-linux*]: Use linux-ppc-low.o
9683 instead of linux-ppc64-low.o.
9684 * linux-ppc64-low.c: Remove file.
9685 * Makefile.in (SFILES): Remove linux-ppc64-low.c.
9686 (linux-ppc64-low.o): Remove rule.
9687
9688 * linux-ppc-low.c (init_registers_ppc64): Add prototype.
9689 (init_registers_powerpc_64): Likewise.
9690 (ppc_regmap): Conditionally define depending on __powerpc64__.
9691 (ppc_cannot_store_register): Do not special-case "fpscr" when
9692 compiled on __powerpc64__.
9693 (ppc_collect_ptrace_register): New function.
9694 (ppc_supply_ptrace_register): New function.
9695 (ppc_breakpoint): Change type to "unsigned int".
9696 (ppc_breakpoint_at): Change type of "insn" to "unsigned int".
9697 (the_low_target): Conditionally provide initializers for the
889bf7c5 9698 arch_setup member depending on __powerpc64__. Install
5b0a002e
UW
9699 collect_ptrace_register and supply_ptrace_register members.
9700
9b4b61c8
UW
97012008-02-28 Ulrich Weigand <uweigand@de.ibm.com>
9702
9703 * regcache.h (gdbserver_xmltarget): Add extern declaration.
9704 * server.c (gdbserver_xmltarget): Define.
9705 (get_features_xml): Use it to replace "target.xml" and arch_string.
9706
9707 * configure.srv: Remove srv_xmltarget. Add XML files that were
9708 mentioned there to srv_xmlfiles instead. Remove conditional tests
9709 on gdb_cv_arm_iwmmxt, gdb_cv_ppc_altivec, gdb_cv_ppc_spe; set
9710 srv_xmlfiles and srv_regobj to include all possible choices.
9711 * configure.ac (srv_xmltarget): Remove.
9712 (srv_xmlfiles): Do not add "target.xml".
9713 (gdb_cv_arm_iwmmxt, gdb_cv_ppc_altivec, gdb_cv_ppc_spe): Remove
9714 checks for supplementary target information.
9715 * configure: Regenerate.
9716 * Makefile.in (XML_TARGET): Remove.
9717 (target.xml): Remove rule.
9718 (clean): Do not clean up target.xml.
9719 (.PRECIOUS): Do not mention target.xml.
9720
9721 * target.h (struct target_ops): Remove arch_string member.
9722 * linux-low.c (linux_arch_string): Remove.
9723 (linux_target_ops): Remove arch_string initializer.
9724 * linux-low.h (struct linux_target_ops): Remove arch_string member.
9725 * linux-i386-low.c (the_low_target): Remove arch_string initializer.
9726 * linux-x86-64-low.c (the_low_target): Remove arch_string initializer.
9727 * spu-low.c (spu_arch_string): Remove.
9728 (spu_target_ops): Remove arch_string initializer.
9729 * win32-low.c (win32_arch_string): Remove.
9730 (win32_target_ops): Remove arch_string initializer.
9731 * win32-low.h (struct win32_target_ops): Remove arch_string member.
9732 * win32-arm-low.c (the_low_target): Remove arch_string initializer.
9733 * win32-i368-low.c (the_low_target): Remove arch_string initializer.
9734
ee1a7ae4
UW
97352008-02-27 Ulrich Weigand <uweigand@de.ibm.com>
9736
9737 * linux-low.h (struct linux_target_ops): Replace left_pad_xfer field
9738 by collect_ptrace_register and supply_ptrace_register hooks.
9739 * linux-low.c (fetch_register): Use supply_ptrace_register callback
9740 instead of checking for the_low_target.left_pad_xfer.
9741 (usr_store_inferior_registers): Use collect_ptrace_register callback
9742 instead of checking for the_low_target.left_pad_xfer.
9743
9744 * linux-s390-low.c (s390_collect_ptrace_register): New function.
9745 (s390_supply_ptrace_register): Likewise.
9746 (s390_fill_gregset): Call s390_collect_ptrace_register.
9747 (the_low_target): Update.
9748
9749 * linux-ppc64-low.c (ppc_collect_ptrace_register): New function.
9750 (ppc_supply_ptrace_register): Likewise.
9751 (the_low_target): Update.
9752
9753 * linux-i386-low.c (the_low_target): Update.
9754 * linux-x86-64-low.c (the_low_target): Update.
9755
d61ddec4
UW
97562008-02-27 Ulrich Weigand <uweigand@de.ibm.com>
9757
9758 * configure.srv [s390x-*-linux*]: Set srv_regobj to include both
9759 reg-s390.o and reg-s390x.o.
9760
9761 * linux-low.c (new_inferior): New global variable.
9762 (linux_create_inferior, linux_attach): Set it.
9763 (linux_wait_for_process): Call the_low_target.arch_setup after the
9764 target has stopped for the first time.
9765 (initialize_low): Do not call the_low_target.arch_setup.
9766
9767 * linux-s390-low.c (s390_get_pc): Support bi-arch operation.
9768 (s390_set_pc): Likewise.
9769 (s390_arch_setup): New function.
9770 (the_low_target): Use s390_arch_setup as arch_setup routine.
9771
9772 * regcache.c (realloc_register_cache): New function.
9773 (set_register_cache): Call it for each existing regcache.
9774
d05b4ac3
UW
97752008-02-27 Ulrich Weigand <uweigand@de.ibm.com>
9776
9777 * server.h (init_registers): Remove prototype.
9778
9779 * linux-low.h (struct linux_target_ops): Add arch_setup field.
9780 * linux-low.c (initialize_low): Call the_low_target.arch_setup ()
9781 instead of init_registers ().
9782 * linux-arm-low.c (init_registers_arm): Add prototype.
9783 (init_registers_arm_with_iwmmxt): Likewise.
9784 (the_low_target): Add initializer for arch_setup field.
9785 * linux-cris-low.c (init_registers_cris): Add prototype.
9786 (the_low_target): Add initializer for arch_setup field.
9787 * linux-crisv32-low.c (init_registers_crisv32): Add prototype.
9788 (the_low_target): Add initializer for arch_setup field.
9789 * linux-i386-low.c (init_registers_i386_linux): Add prototype.
9790 (the_low_target): Add initializer for arch_setup field.
9791 * linux-ia64-low.c (init_registers_ia64): Add prototype.
9792 (the_low_target): Add initializer for arch_setup field.
9793 * linux-m32r-low.c (init_registers_m32r): Add prototype.
9794 (the_low_target): Add initializer for arch_setup field.
9795 * linux-m68k-low.c (init_registers_m68k): Add prototype.
9796 (the_low_target): Add initializer for arch_setup field.
9797 * linux-mips-low.c (init_registers_mips_linux): Add prototype.
9798 (init_registers_mips64_linux): Likewise.
9799 (the_low_target): Add initializer for arch_setup field.
9800 * linux-ppc-low.c (init_registers_ppc): Add prototype.
9801 (init_registers_powerpc_32, init_registers_powerpc_e500): Likewise.
9802 (the_low_target): Add initializer for arch_setup field.
9803 * linux-ppc64-low.c (init_registers_ppc64): Add prototype.
9804 (init_registers_powerpc_64): Likewise.
9805 (the_low_target): Add initializer for arch_setup field.
9806 * linux-s390-low.c (init_registers_s390): Add prototype.
9807 (init_registers_s390x): Likewise.
9808 (the_low_target): Add initializer for arch_setup field.
9809 * linux-sh-low.c (init_registers_sh): Add prototype.
9810 (the_low_target): Add initializer for arch_setup field.
9811 * linux-x86-64-low.c (init_registers_x86_64_linux): Add prototype.
9812 (the_low_target): Add initializer for arch_setup field.
9813 * linux-xtensa-low.c (init_registers_xtensa): Add prototype.
9814 (the_low_target): Add initializer for arch_setup field.
9815
9816 * win32-low.h (struct win32_target_ops): Add arch_setup field.
9817 * win32-low.c (initialize_low): Call the_low_target.arch_setup ()
9818 instead of init_registers ().
9819 * win32-arm-low.c (init_registers_arm): Add prototype.
9820 (the_low_target): Add initializer for arch_setup field.
9821 * win32-i386-low.c (init_registers_i386): Add prototype.
9822 (the_low_target): Add initializer for arch_setup field.
9823
9824 * spu-low.c (init_registers_spu): Add prototype.
9825 (initialize_low): Call initialie_registers_spu () instead of
9826 initialize_registers ().
9827
fd96d250
PA
98282008-02-19 Pedro Alves <pedro@codesourcery.com>
9829
9830 * server.c (handle_v_requests): When handling the vRun and vAttach
9831 packets, if already debugging a process, don't kill it. Return an
9832 error instead.
9833
d41b6bb4
DJ
98342008-02-17 Daniel Jacobowitz <dan@codesourcery.com>
9835
9836 * server.c (handle_query): Correct length check.
9837
5ac588cf
PA
98382008-02-14 Pedro Alves <pedro_alves@portugalmail.pt>
9839
9840 * win32-low.c (do_initial_child_stuff): Add process handle
9841 parameter. Set current_process_handle and current_process_id from the
9842 parameters. Clear globals.
9843 (win32_create_inferior): Don't set current_process_handle and
9844 current_process_id here. Instead pass them on the call to
9845 do_initial_child_stuff.
9846 (win32_attach): Likewise.
9847 (win32_clear_inferiors): New.
9848 (win32_kill): Don't close the current process handle or the
9849 current thread handle here. Instead call win32_clear_inferiors.
9850 (win32_detach): Don't open a new handle to the process. Call
9851 win32_clear_inferiors.
9852 (win32_join): Don't rely on current_process_handle; open a new
9853 handle using the process id.
9854 (win32_wait): Call win32_clear_inferiors when the inferior process
9855 has exited.
9856
ecd7ecbc
DJ
98572008-02-14 Daniel Jacobowitz <dan@codesourcery.com>
9858
9859 * server.c (monitor_show_help): Add "exit".
9860
1525d545
MG
98612008-02-11 Maxim Grigoriev <maxim2405@gmail.com>
9862
ecd7ecbc 9863 * Makefile.in (SFILES): Add linux-xtensa-low.c.
1525d545
MG
9864 (clean): Add reg-xtensa.c.
9865 (linux-xtensa-low.o, reg-xtensa.o, reg-xtensa.c): New dependencies.
ecd7ecbc
DJ
9866 * configure.srv (xtensa*-*-linux*) New target.
9867 * linux-xtensa-low.c: New.
9868 * xtensa-xtregs.c: New.
1525d545 9869
59a016f0
PA
98702008-02-01 Pedro Alves <pedro_alves@portugalmail.pt>
9871
9872 * hostio.c: Don't include errno.h.
9873 (errno_to_fileio_errno): Move to hostio-errno.
9874 * hostio.c: (hostio_error): Remove the error parameter. Defer the
9875 error number outputting to the target->hostio_last_error callback.
9876 (hostio_packet_error): Use FILEIO_EINVAL directly.
9877 (handle_open, handle_pread, hostio_error, handle_unlink): Update
9878 calls to hostio_error.
9879 * hostio-errno.c: New.
9880 * server.h (hostio_last_error_from_errno): Declare.
9881 * target.h (target_ops): Add hostio_last_error member.
9882 * linux-low.c (linux_target_op): Register hostio_last_error_from_errno
9883 as hostio_last_error handler.
889bf7c5 9884 * spu-low.c (spu_target_ops): Likewise.
59a016f0
PA
9885 * win32-low.c [_WIN32_WCE] (win32_error_to_fileio_error)
9886 (wince_hostio_last_error): New functions.
9887 (win32_target_ops) [_WIN32_WCE]: Register wince_hostio_last_error
9888 as hostio_last_error handler.
9889 (win32_target_ops) [!_WIN32_WCE]: Register
9890 hostio_last_error_from_errno as hostio_last_error handler.
9891 * Makefile.in (SFILES): Add hostio.c and hostio-errno.c.
9892 (hostio-errno.o): New rule.
9893 * configure.ac (GDBSERVER_DEPFILES): Add $srv_hostio_err_objs.
9894 * configure.srv (srv_hostio_err_objs): New variable. Default to
9895 hostio-errno.o.
9896 (arm*-*-mingw32ce*): Set srv_hostio_err_objs to "".
9897 * configure: Regenerate.
9898
2d717e4f
DJ
98992008-01-29 Daniel Jacobowitz <dan@codesourcery.com>
9900
9901 * linux-low.c (linux_attach_lwp): Do not _exit after errors.
9902 (linux_kill, linux_detach): Clean up the process list.
9903 * remote-utils.c (remote_open): Improve port number parsing.
9904 (putpkt_binary, input_interrupt): Only send interrupts if the target
9905 is running.
9906 * server.c (extended_protocol): Make static.
9907 (attached): Define earlier.
9908 (exit_requested, response_needed, program_argv): New variables.
9909 (target_running): New.
9910 (start_inferior): Clear attached here.
9911 (attach_inferior): Set attached here.
9912 (require_running): Define.
9913 (handle_query): Use require_running and target_running. Implement
9914 "monitor exit".
9915 (handle_v_attach, handle_v_run): New.
9916 (handle_v_requests): Use require_running. Handle vAttach and vRun.
9917 (gdbserver_usage): Update.
9918 (main): Redo argument parsing. Handle --debug and --multi. Handle
9919 --attach along with other options or after the port. Save
9920 program_argv. Support no initial program. Resynchronize
9921 communication with GDB after an error. Handle "monitor exit".
9922 Use require_running and target_running. Always allow the extended
9923 protocol. Do not error out for Hc0 or Hc-1. Do not automatically
9924 restart in extended mode.
9925 * README: Refer to the GDB manual. Update --attach usage.
9926
7407e2de
AS
99272007-12-20 Andreas Schwab <schwab@suse.de>
9928
9929 * linux-low.c (STACK_SIZE): Define.
9930 (linux_tracefork_child): Use it. Use __clone2 on ia64.
9931 (linux_test_for_tracefork): Likewise.
9932
b65d95c5
DJ
99332007-12-18 Daniel Jacobowitz <dan@codesourcery.com>
9934
9935 * linux-low.c (linux_wait_for_event): Update messages. Do not
9936 reinsert auto-delete breakpoints.
9937 * mem-break.c (struct breakpoint): Change return type of handler to
9938 int.
9939 (set_breakpoint_at): Update handler type.
9940 (reinsert_breakpoint_handler): Return 1 instead of calling
9941 delete_breakpoint.
9942 (reinsert_breakpoint_by_bp): Check for the original breakpoint before
9943 setting a new one.
9944 (check_breakpoints): Delete auto-delete breakpoints and return 2.
9945 * mem-break.h (set_breakpoint_at): Update handler type.
9946 * thread-db.c (thread_db_create_event, thread_db_create_event): Update.
9947 * win32-low.c (auto_delete_breakpoint): New.
9948 (get_child_debug_event): Use it.
9949
4e799345
DJ
99502007-12-16 Daniel Jacobowitz <dan@codesourcery.com>
9951
9952 * configure.ac: Check for pread and pwrite.
9953 * hostio.c (handle_pread): Fall back to lseek and read.
9954 (handle_pwrite): Fall back to lseek and write.
9955 * config.in, configure: Regenerated.
9956
27524b67
DJ
99572007-12-07 Daniel Jacobowitz <dan@codesourcery.com>
9958
9959 * server.c (myresume): Add own_buf argument.
9960 (main): Update calls.
9961
a20d5e98
DJ
99622007-12-06 Daniel Jacobowitz <dan@codesourcery.com>
9963
9964 * linux-low.c (linux_wait, linux_resume): Do not handle async I/O.
9965 * remote-utils.c (remote_open): Do not call disable_async_io.
9966 (block_async_io): Delete.
9967 (unblock_async_io): Make static.
9968 (initialize_async_io): New.
9969 * server.c (handle_v_cont): Handle async I/O here.
9970 (myresume): Likewise. Move other common resume tasks here...
9971 (main): ... from here. Call initialize_async_io. Disable async
9972 I/O before the main loop.
9973 * server.h (initialize_async_io): Declare.
9974 (block_async_io, unblock_async_io): Delete prototypes.
9975 * spu-low.c (spu_resume, spu_wait): Do not handle async I/O here.
9976
b79d787e
DJ
99772007-12-06 Mick Davis <mickd@goanna.iinet.net.au>
9978
9979 * remote-utils.c (readchar): Allow binary data in received messages.
9980
d97903b2
PA
99812007-12-03 Pedro Alves <pedro_alves@portugalmail.pt>
9982
9983 * win32-low.c (attaching): New global.
9984 (win32_create_inferior): Clear the `attaching' global.
9985 (win32_attach): Set the `attaching' global.
9986 (get_child_debug_event) [_WIN32_WCE]: Stop the inferior when
9987 attaching. Only set a breakpoint at the entry point if not
9988 attaching.
9989
311de423
PA
99902007-12-03 Pedro Alves <pedro_alves@portugalmail.pt>
9991
9992 * server.c (main): Don't report dll events on the initial
9993 connection on attaches.
9994
6c2d16d2
PA
99952007-12-03 Pedro Alves <pedro_alves@portugalmail.pt>
9996
9997 * server.c (main): Relax numerical bases supported for the pid of
9998 the --attach command line argument.
9999
5ca906e6
PA
100002007-12-03 Pedro Alves <pedro_alves@portugalmail.pt>
10001
10002 * win32-low.c (win32_attach): Call OpenProcess before
10003 DebugActiveProcess, not after. Add last error output to error
10004 call.
10005
9c6c8194
PA
100062007-12-03 Pedro Alves <pedro_alves@portugalmail.pt>
10007
10008 * win32-low.c (win32_get_thread_context)
10009 (win32_set_thread_context): New functions.
10010 (thread_rec): Use win32_get_thread_context.
10011 (continue_one_thread, win32_resume): Use win32_set_thread_context.
10012 * win32-low.h (win32_thread_info) [_WIN32_WCE]: Add `base_context'
10013 field.
10014
4d5d1aaa
PA
100152007-12-03 Leo Zayas
10016 Pedro Alves <pedro_alves@portugalmail.pt>
10017
10018 * win32-low.c (soft_interrupt_requested, faked_breakpoint): New
10019 global variables.
10020 (child_add_thread): Minor cleanup.
10021 (child_continue): Resume artificially suspended threads before
10022 calling ContinueDebugEvent.
10023 (suspend_one_thread): New.
10024 (fake_breakpoint_event): New.
10025 (get_child_debug_event): Change return type to int. Check here if
10026 gdb sent an interrupt request. If a soft interrupt was requested,
10027 fake a breakpoint event. Return 0 if there is no event to handle,
10028 and 1 otherwise.
10029 (win32_wait): Don't check here if gdb sent an interrupt request.
10030 Ensure there is a valid event to handle.
10031 (win32_request_interrupt): Add soft interruption method as last
10032 resort.
10033
c436e841
PA
100342007-12-03 Leo Zayas
10035 Pedro Alves <pedro_alves@portugalmail.pt>
10036
10037 * win32-low.h (win32_thread_info): Add descriptions to the
10038 structure members. Replace `suspend_count' counter by a
10039 `suspended' flag.
10040 * win32-low.c (thread_rec): Update condition of when to get the
10041 context from the inferior. Rely on ContextFlags being set if it
10042 has already been retrieved. Only suspend the inferior thread if
10043 we haven't already. Warn if that fails.
10044 (continue_one_thread): s/suspend_count/suspended/. Only call
10045 ResumeThread once. Warn if that fails.
10046
e7b5fa67
PA
100472007-12-02 Pedro Alves <pedro_alves@portugalmail.pt>
10048
10049 * win32-low.c (win32_wait): Don't read from the inferior when it
10050 has already exited.
10051
a385171d
PA
100522007-12-02 Pedro Alves <pedro_alves@portugalmail.pt>
10053
10054 * Makefile.in (win32_low_h): New variable.
10055 (win32-low.o): Add dependency on $(win32_low_h).
10056 (win32-arm-low.o, win32-i386-low.o): New rules.
10057
f80c84b3
DJ
100582007-11-30 Daniel Jacobowitz <dan@codesourcery.com>
10059
10060 * hostio.c: Correct copyright year.
10061
a6b151f1
DJ
100622007-11-30 Daniel Jacobowitz <dan@codesourcery.com>
10063
10064 * Makefile.in (OBS): Add hostio.o.
10065 (hostio.o): New rule.
10066 * server.h (handle_vFile): Declare.
10067 * hostio.c: New file.
10068 * server.c (handle_v_requests): Take packet_len and new_packet_len
10069 for binary packets. Call handle_vFile.
10070 (main): Update call to handle_v_requests.
10071
f9387fc3
DJ
100722007-11-05 Daniel Jacobowitz <dan@codesourcery.com>
10073
10074 * linux-low.c: Include <sched.h>.
10075
51c2684e
DJ
100762007-11-01 Daniel Jacobowitz <dan@codesourcery.com>
10077
10078 * linux-low.c (linux_tracefork_grandchild): New.
10079 (linux_tracefork_child): Use clone.
10080 (linux_test_for_tracefork): Use clone; allocate and free a stack.
10081
75f83163
JB
100822007-10-31 Joel Brobecker <brobecker@adacore.com>
10083
10084 * Makefile.in: Use $(SHELL) instead of "sh" to call regdat.sh.
10085
da5898ce
DJ
100862007-10-24 Daniel Jacobowitz <dan@codesourcery.com>
10087
10088 * linux-low.c (handle_extended_wait): Handle unexpected signals.
10089
24a09b5f
DJ
100902007-10-23 Daniel Jacobowitz <dan@codesourcery.com>
10091
10092 * inferiors.c (change_inferior_id): Delete.
10093 (add_pid_to_list, pull_pid_from_list): New.
10094 * linux-low.c (PTRACE_SETOPTIONS, PTRACE_GETEVENTMSG)
10095 (PTRACE_O_TRACESYSGOOD, PTRACE_O_TRACEFORK, PTRACE_O_TRACEVFORK)
10096 (PTRACE_O_TRACECLONE, PTRACE_O_TRACEEXEC, PTRACE_O_TRACEVFORKDONE)
10097 (PTRACE_O_TRACEEXIT, PTRACE_EVENT_FORK, PTRACE_EVENT_VFORK)
10098 (PTRACE_EVENT_CLONE, PTRACE_EVENT_EXEC, PTRACE_EVENT_VFORK_DONE)
10099 (PTRACE_EVENT_EXIT, __WALL): Provide default definitions.
10100 (stopped_pids, thread_db_active, must_set_ptrace_flags): New variables.
10101 (using_threads): Always set to 1.
10102 (handle_extended_wait): New.
10103 (add_process): Do not set TID.
10104 (linux_create_inferior): Set must_set_ptrace_flags.
10105 (linux_attach_lwp): Remove TID argument. Do not check using_threads.
10106 Use PTRACE_SETOPTIONS. Call new_thread_notify. Update all callers.
10107 (linux_thread_alive): Rename TID argument to LWPID.
10108 (linux_wait_for_process): Handle unknown processes. Do not use TID.
10109 (linux_wait_for_event): Do not use TID or check using_threads. Update
10110 call to dead_thread_notify. Call handle_extended_wait.
10111 (linux_create_inferior): Use PTRACE_SETOPTIONS.
10112 (send_sigstop): Delete sigstop_sent.
10113 (wait_for_sigstop): Avoid TID.
10114 (linux_supports_tracefork_flag, linux_tracefork_child, my_waitpid)
10115 (linux_test_for_tracefork): New.
10116 (linux_lookup_signals): Use thread_db_active and
10117 linux_supports_tracefork_flag.
10118 (initialize_low): Use thread_db_active and linux_test_for_tracefork.
10119 * linux-low.h (get_process_thread): Avoid TID.
10120 (struct process_ifo): Move thread_known and tid to the end. Remove
10121 sigstop_sent.
10122 (linux_attach_lwp, thread_db_init): Update prototypes.
10123 * server.h (change_inferior_id): Delete prototype.
10124 (add_pid_to_list, pull_pid_from_list): New prototypes.
10125 * thread-db.c (thread_db_use_events): New.
10126 (find_first_thread): Rename to...
10127 (find_one_thread): ...this. Update callers and messages. Do not
10128 call fatal. Check thread_db_use_events. Do not call
10129 change_inferior_id or new_thread_notify.
10130 (maybe_attach_thread): Update. Do not call new_thread_notify.
10131 (thread_db_init): Set thread_db_use_events. Check use_events.
10132 * utils.c (fatal, warning): Correct message prefix.
10133
30ed0a8f
DJ
101342007-10-15 Daniel Jacobowitz <dan@codesourcery.com>
10135
10136 * Makefile.in (clean): Remove new files.
10137 (powerpc-32.o, powerpc-32.c, powerpc-e500.o, powerpc-e500.c)
10138 (powerpc-64.o, powerpc-64.c): New rules.
10139 * configure.srv: Use alternate register sets for powerpc64-*-linux*
10140 with AltiVec, powerpc-*-linux* with AltiVec, and powerpc-*-linux*
10141 with SPE.
10142 * linux-ppc-low.c (ppc_regmap): Do not fetch the FP registers for
10143 SPE targets.
10144 (ppc_cannot_store_register): Do not check for FPSCR for SPE targets.
10145 (PTRACE_GETVRREGS, PTRACE_SETVRREGS, SIZEOF_VRREGS, ppc_fill_vrregset)
10146 (ppc_store_vrregset, PTRACE_GETEVRREGS, PTRACE_SETEVRREGS)
10147 (struct gdb_evrregset_t, ppc_fill_evrregset, ppc_store_evrregset): New.
10148 (target_regsets): Add AltiVec and SPE register sets.
10149 * configure.ac: Check for AltiVec and SPE.
10150 * linux-ppc64-low.c (PTRACE_GETVRREGS, PTRACE_SETVRREGS, SIZEOF_VRREGS)
10151 (ppc_fill_vrregset, ppc_store_vrregset): New.
10152 (target_regsets): Add AltiVec register set.
10153 * configure: Regenerated.
10154
fd462a61
DJ
101552007-09-19 Daniel Jacobowitz <dan@codesourcery.com>
10156
10157 * linux-low.c (O_LARGEFILE): Define.
10158 (linux_read_memory): Use /proc/PID/mem.
10159 * configure.ac: Use AC_GNU_SOURCE. Check for pread64.
10160 * configure, config.in: Regenerated.
10161
69f223ed
DJ
101622007-09-04 Daniel Jacobowitz <dan@codesourcery.com>
10163
10164 * linux-low.c (linux_wait_for_event): Do not pass signals while
10165 single-stepping.
10166
aec18585
PA
101672007-09-03 Pedro Alves <pedro_alves@portugalmail.pt>
10168
10169 * win32-low.c (create_process): New.
10170 (win32_create_inferior): Use create_process instead of
10171 CreateProcess. If create_process failed retry appending an ".exe"
10172 suffix. Store the GetLastError result immediatelly after
10173 create_process calls and use it on the call to error.
10174
34d86ddd
PA
101752007-09-03 Pedro Alves <pedro_alves@portugalmail.pt>
10176
10177 * win32-low.c (handle_load_dll): Don't use toolhelp when waiting.
10178
5a0e3bd0
JB
101792007-08-23 Joel Brobecker <brobecker@adacore.com>
10180
10181 * configure.ac: Switch license to GPLv3.
10182
f88c79e6
MS
101832007-08-01 Michael Snyder <msnyder@access-company.com>
10184
10185 * remote-utils.c (putpkt_binary): Memory leak, free buf2.
10186
6b3d9b83
PA
101872007-07-31 Pedro Alves <pedro_alves@portugalmail.pt>
10188
10189 * win32-low.c (winapi_CloseToolhelp32Snapshot) [_WIN32_WCE]: New
10190 typedef.
10191 (win32_CloseToolhelp32Snapshot) [_WIN32_WCE]: New global var.
10192 (load_toolhelp) [_WIN32_WCE]: Load TOOLHELP.DLL. Get
10193 CloseToolhelp32Snapshot.
10194 (toolhelp_get_dll_name) [_WIN32_WCE]: Close the snapshot with
10195 CloseToolhelp32Snapshot.
10196
c588c53c
MS
101972007-07-27 Michael Snyder <michael.snyder@access-company.com>
10198
10199 * server.c (main): Check for inferior exit before main loop.
10200
aa0403d9
PA
102012007-07-18 Pedro Alves <pedro_alves@portugalmail.pt>
10202
10203 * remote-utils.c (remote_open): Set SO_KEEPALIVE on remote_desc
10204 instead of on tmp_desc.
10205
255e7678
DJ
102062007-07-17 Pedro Alves <pedro_alves@portugalmail.pt>
10207 Daniel Jacobowitz <dan@codesourcery.com>
10208
10209 * inferiors.c (all_dlls, dlls_changed, get_dll): New.
10210 (add_thread): Minor cleanups.
10211 (clear_inferiors): Move lower in the file. Clear the DLL
10212 list.
10213 (free_one_dll, match_dll, loaded_dll, unloaded_dll, clear_list): New.
10214 * remote-utils.c (prepare_resume_reply): Check dlls_changed.
10215 (xml_escape_text): New.
10216 * server.c (handle_query): Handle qXfer:libraries:read. Report it
10217 for qSupported.
10218 (handle_v_cont): Report errors.
10219 (gdbserver_version): Update.
10220 (main): Correct size of own_buf. Do not report initial DLL events.
10221 * server.h (struct dll_info, all_dlls, dlls_changed, loaded_dll)
10222 (unloaded_dll, xml_escape_text): New.
10223 * win32-low.c (enum target_waitkind): Update comments.
10224 (win32_add_one_solib, get_image_name, winapi_EnumProcessModules)
10225 (winapi_GetModuleInformation, winapi_GetModuleFileNameExA)
10226 (win32_EnumProcessModules, win32_GetModuleInformation)
10227 (win32_GetModuleFileNameExA, load_psapi, psapi_get_dll_name)
10228 (winapi_CreateToolhelp32Snapshot, winapi_Module32First)
10229 (winapi_Module32Next, win32_CreateToolhelp32Snapshot)
10230 (win32_Module32First, win32_Module32Next, load_toolhelp)
10231 (toolhelp_get_dll_name, handle_load_dll, handle_unload_dll): New.
10232 (get_child_debug_event): Handle DLL events.
10233 (win32_wait): Likewise.
10234
0d37add9
DJ
102352007-07-12 Daniel Jacobowitz <dan@codesourcery.com>
10236
10237 * configure.srv: Set srv_linux_regsets for sh*-*-linux*.
10238 * linux-sh-low.c (sh_fill_gregset, target_regsets): New.
10239
45e2715e
PA
102402007-07-08 Pedro Alves <pedro_alves@portugalmail.pt>
10241
10242 * win32-low.c (handle_output_debug_string): Ignore event if not
10243 waiting.
10244
c5674cf1
PA
102452007-07-08 Pedro Alves <pedro_alves@portugalmail.pt>
10246
10247 * win32-arm-low.c (arm_wince_breakpoint): Fix typo.
10248
2bbe3cc1
DJ
102492007-07-03 Daniel Jacobowitz <dan@codesourcery.com>
10250
10251 * remote-utils.c (look_up_one_symbol): Handle 'm' packets.
10252
ae13219e
DJ
102532007-07-02 Daniel Jacobowitz <dan@codesourcery.com>
10254
10255 * inferiors.c (change_inferior_id): Add comment.
10256 * linux-low.c (check_removed_breakpoint): Add an early
10257 prototype. Improve debug output.
10258 (linux_attach): Doc update.
10259 (linux_detach_one_process, linux_detach): Clean up before releasing
10260 each process.
10261 (send_sigstop, wait_for_sigstop): Improve comments and debug output.
10262 * linux-low.h (struct process_info): Doc improvement.
10263 * mem-break.c (delete_all_breakpoints): New.
10264 * mem-break.h (delete_all_breakpoints): New prototype.
10265 * thread-db.c (find_first_thread): New.
10266 (thread_db_create_event): Call it instead of
10267 thread_db_find_new_threads. Clean up unused variables.
10268 (maybe_attach_thread): Remove first thread handling.
10269 (thread_db_find_new_threads): Use find_first_thread.
10270 (thread_db_get_tls_address): Likewise.
10271
4105de34
DJ
102722007-06-27 Daniel Jacobowitz <dan@codesourcery.com>
10273
10274 * thread-db.c (thread_db_find_new_threads): Add prototype.
10275 (thread_db_create_event): Check for the main thread before adding
10276 a new thread.
10277 (maybe_attach_thread): Only enable event reporting if TID == 0.
10278 (thread_db_get_tls_address): Check for new threads.
10279
2b876972
DJ
102802007-06-20 Daniel Jacobowitz <dan@codesourcery.com>
10281
10282 * linux-low.c (linux_create_inferior): Try execv before execvp.
10283 * spu-low.c (spu_create_inferior): Likewise.
10284
7a245884
DJ
102852007-06-13 Mike Frysinger <vapier@gentoo.org>
10286
10287 * linux-low.c (linux_create_inferior): Change execv to execvp.
10288 * spu-low.c (spu_create_inferior): Likewies.
10289
117ce543
DJ
102902007-06-13 Daniel Jacobowitz <dan@codesourcery.com>
10291
10292 * Makefile.in (clean): Clean new files instead of deleted ones.
10293 (reg-mips.o, reg-mips.c, reg-mips64.o, reg-mips64.c): Delete.
10294 (mips-linux.o, mips-linux.c, mips64-linux.o, mips64-linux.c): New
10295 rules.
10296 * configure.srv: Specify XML files and new regformats for MIPS and
10297 MIPS64 GNU/Linux.
10298 * linux-mips-low.c (mips_num_regs): Set to only used registers.
10299 (mips_regmap): Do not fetch $0. Remove unused registers. Add
10300 an entry for the restart register.
10301 (mips_cannot_fetch_register, mips_cannot_store_register)
10302 (mips_reinsert_addr, mips_fill_fpregset, mips_store_fpregset): Update
10303 register names to match the XML descriptions.
10304 (mips_fill_gregset, mips_store_gregset): Likewise. Handle the
10305 restart register instead of $0.
10306
0e7f50da
UW
103072007-06-12 Ulrich Weigand <uweigand@de.ibm.com>
10308 Markus Deuling <deuling@de.ibm.com>
10309
10310 * remote-utils.c (decode_xfer_write): New function.
10311 * server.h (decode_xfer_write): Add prototype.
10312 * server.c (handle_query): Add PACKET_LEN argument. Support
10313 qXfer:spu:read and qXfer:spu:write packets.
10314 (main): Pass packet_len to handle_query.
10315 * spu-low.c (spu_target_ops): Add spu_proc_xfer_spu.
10316 * target.h (target_ops): Add qxfer_spu.
10317
374c1d38
UW
103182007-06-12 Ulrich Weigand <uweigand@de.ibm.com>
10319
10320 * spu-low.c (spu_proc_xfer_spu): Do not return failure when
10321 accessing non-seekable spufs files.
10322
bb63802a
UW
103232007-05-16 Markus Deuling <deuling@de.ibm.com>
10324
889bf7c5 10325 * server.c (handle_query): Add reply for qC packet.
bb63802a 10326
7390519e
PA
103272007-05-10 Pedro Alves <pedro_alves@portugalmail.pt>
10328 Leo Zayas <lerele@champenstudios@com>
10329
10330 * server.h (check_remote_input_interrupt_request): New function.
10331 * remote_utils.c (INVALID_DESCRIPTOR): New define.
10332 (remote_desc): Initialize with INVALID_DESCRIPTOR.
10333 (input_interrupt): Expose on USE_WIN32API too. Fix whitespace.
10334 (check_remote_input_interrupt_request): New function.
10335 * server.h (check_remote_input_interrupt_request): Declare.
3ecf0694 10336 * win32-low.c (winapi_DebugBreakProcess,
7390519e
PA
10337 winapi_GenerateConsoleCtrlEvent): New typedefs.
10338 (get_child_debug_event): Lower Win32 debug event polling from 1 sec
10339 to 250 ms.
10340 (win32_wait): Check for remote interrupt request
10341 with check_remote_input_interrupt_request.
10342 (win32_request_interrupt): New function.
10343 (win32_target_op): Set request_interrupt to win32_request_interrupt.
10344
34b34921
PA
103452007-05-10 Pedro Alves <pedro_alves@portugalmail.pt>
10346
10347 * win32-low.c (debug_registers_changed,
10348 debug_registers_used, CONTEXT_EXTENDED_REGISTERS,
10349 CONTEXT_FLOATING_POINT, CONTEXT_DEBUG_REGISTERS,
10350 CONTEXT_DEBUGGER, CONTEXT_DEBUGGER_DR): Delete.
10351 (thread_rec): Get context using the low target.
10352 (child_add_thread): Call thread_added on the low target,
10353 which does the same thing.
10354 (regptr): Delete.
10355 (do_initial_child_stuff): Remove debug registers references.
10356 Set context using the low target. Resume threads after
10357 setting the contexts.
10358 (child_continue): Remove dead variable. Remove debug
10359 registers references.
10360 (child_fetch_inferior_registers): Go through the low target.
10361 (do_child_store_inferior_registers): Remove.
10362 (child_store_inferior_registers): Go through the low target.
10363 (win32_resume): Remove debug registers references.
10364 Set context using the low target.
10365 (handle_exception): Change return type to void. Don't record
10366 context here. Set status to TARGET_WAITKIND_SPURIOUS on a
10367 first chance exception.
889bf7c5 10368 (get_child_debug_event): Change return type to void. Remove
34b34921
PA
10369 goto loop. Always return after waiting for debug event.
10370 (win32_wait): Convert to switch statement. Handle spurious
10371 events.
10372
10373 * win32-i386-low.c (debug_registers_changed,
10374 debug_registers_used): New.
10375 (initial_stuff): Rename to ...
10376 (i386_initial_stuff): ... this. Clear debug registers
10377 state variables.
10378 (store_debug_registers): Delete.
10379 (i386_get_thread_context): New.
10380 (load_debug_registers): Delete.
10381 (i386_set_thread_context): New.
10382 (i386_thread_added): New.
10383 (single_step): Rename to ...
10384 (i386_single_step): ... this.
10385 (do_fetch_inferior_registers): Rename to ...
10386 (i386_fetch_inferior_register): ... this.
10387 (i386_store_inferior_register): New.
10388 (the_low_target): Adapt to new interface.
10389
10390 * win32-arm-low.c (CONTEXT_FLOATING_POINT): Define.
10391 (arm_get_thread_context): New.
10392 (arm_set_thread_context): New.
10393 (regptr): New.
10394 (do_fetch_inferior_registers): Rename to ...
10395 (arm_fetch_inferior_register): ... this.
10396 (arm_store_inferior_register): New.
10397 (arm_wince_breakpoint): Reimplement as unsigned long.
10398 (arm_wince_breakpoint_len): Define.
10399 (the_low_target): Adapt to new interface.
10400
10401 * win32-low.h (target_ops): Remove regmap, store_debug_registers and
10402 load_debug_registers. Add get_thread_context, set_thread_context,
10403 thread_added and store_inferior_register. Rename
10404 fetch_inferior_registers to fetch_inferior_register.
10405 (regptr): Remove declaration.
10406
dd6953e1
PA
104072007-05-10 Pedro Alves <pedro_alves@portugalmail.pt>
10408
10409 * linux-low.c (linux_detach): Change return type to int. Return 0.
10410 * spu-low.c (spu_detach): Likewise.
10411
444d6139
PA
104122007-05-10 Pedro Alves <pedro_alves@portugalmail.pt>
10413
10414 * target.h (target_ops): Change return type of detach to int.
10415 Add join.
10416 (join_inferior): New.
10417 * server.c (main): Don't skip detach support on mingw32.
10418 If the inferior doesn't support detaching return error.
10419 Call join_inferior instead of using waitpid.
10420 * linux-low.c (linux_join): New.
10421 (linux_target_op): Add linux_join.
10422 * spu-low.c (spu_join): New.
10423 (spu_target_ops): Add spu_join.
10424 * win32-low.c (win32_detach): Adapt to new interface.
10425 Reopen current_process_handle before detaching. Issue a child
10426 resume before detaching.
10427 (win32_join): New.
10428 (win32_target_op): Add win32_join.
10429
1d5315fe
PA
104302007-05-10 Pedro Alves <pedro_alves@portugalmail.pt>
10431
10432 * win32-low.c (win32-attach): Fix return value.
10433 * target.h (target_ops): Describe ATTACH return values.
10434
bf914831
PA
104352007-05-10 Pedro Alves <pedro_alves@portugalmail.pt>
10436
10437 * win32-low.c (GETPROCADDRESS): Define.
10438 (winapi_DebugActiveProcessStop): Add WINAPI. typedef as pointer.
10439 (winapi_DebugSetProcessKillOnExit): Likewise.
10440 (win32_create_inferior): Force usage of ansi CreateProcessA.
10441 (win32_attach): Use GETPROCADDRESS.
10442 (win32_detach): Likewise.
10443
f72f3e60
PA
104442007-05-10 Pedro Alves <pedro_alves@portugalmail.pt>
10445
10446 * win32-low.c (win32_wait): Don't use WSTOPSIG.
10447
ed50f18f
PA
104482007-03-30 Pedro Alves <pedro_alves@portugalmail.pt>
10449
10450 * win32-low.c: Commit leftover changes from 2007-03-29.
10451
0c2ead7e
DJ
104522007-03-30 Daniel Jacobowitz <dan@codesourcery.com>
10453
10454 * i387-fp.c (struct i387_fsave, struct i387_fxsave): Make 16-bit
10455 fields short instead of int. Add explicit padding.
10456 (i387_cache_to_fsave): Remove unnecessary casts.
10457 (i387_fsave_to_cache): Doc fix.
10458 (i387_cache_to_fxsave): Remove unnecessary casts and masking.
10459
73725ff3
DJ
104602007-03-30 Daniel Jacobowitz <dan@codesourcery.com>
10461
10462 * i387-fp.c (i387_cache_to_fxsave): Reinitialize val2 before use.
10463 (i387_fxsave_to_cache): Check fp->ftag while building ftag value.
10464
d99f33d8
PA
104652007-03-29 Pedro Alves <pedro_alves@portugalmail.pt>
10466
10467 * configure.srv (arm*-*-mingw32ce*): Move near the other
10468 arm targets.
10469
68070c10
PA
104702007-03-29 Pedro Alves <pedro_alves@portugalmail.pt>
10471
2482afc6 10472 * configure.ac: Add errno checking.
68070c10
PA
10473 (AC_CHECK_HEADERS): Add errno.h, fcntl.h, signal.h,
10474 sys/file.h and malloc.h.
10475 (AC_CHECK_DECLS): Add perror.
10476 (srv_mingwce): Handle.
2482afc6 10477 * configure.srv (i[34567]86-*-cygwin*): Add
68070c10
PA
10478 win32-i386-low.o to srv_tgtobj.
10479 (i[34567]86-*-mingw*): Likewise.
10480 (arm*-*-mingw32ce*): Add case.
10481 * gdbreplay.c [HAVE_SYS_FILE_H, HAVE_SIGNAL_H,
10482 HAVE_FCNTL_H, HAVE_ERRNO_H, HAVE_MALLOC_H]: Check.
10483 [__MINGW32CE__] (strerror): New function.
10484 [__MINGW32CE__] (errno): Define to GetLastError.
10485 [__MINGW32CE__] (COUNTOF): New macro.
10486 (remote_open): Remove extra close call.
10487 * mem-break.c (delete_breakpoint_at): New function.
10488 * mem-break.h (delete_breakpoint_at): Declare.
10489 * remote-utils.c [HAVE_SYS_FILE_H, HAVE_SIGNAL_H,
10490 HAVE_FCNTL_H, HAVE_UNISTD_H, HAVE_ERRNO_H]: Check.
10491 [USE_WIN32API] (read, write): Add char* casts.
10492 * server.c [HAVE_UNISTD_H, HAVE_SIGNAL_H]: Check.
10493 * server.h: Include wincecompat.h on Windows CE.
10494 [HAVE_ERRNO_H]: Check.
10495 (perror): Declare if not declared.
10496 * utils.c: Add stdlib.h, errno.h and malloc.h includes.
10497 (perror_with_name): Remove errno declaration.
10498 * wincecompat.h: New.
10499 * wincecompat.c: New.
10500 * win32-low.h: New.
10501 * win32-arm-low.c: New.
10502 * win32-i386-low.c: New.
10503 (win32-low.c): Include mem-break.h and win32-low.h, and winnt.h.
10504 (OUTMSG2): Make it safe.
10505 (_T): New macro.
10506 (COUNTOF): New macro.
10507 (NUM_REGS): Get it from the low target.
10508 (CONTEXT_EXTENDED_REGISTERS, CONTEXT_FLOATING_POINT,
10509 CONTEXT_DEBUG_REGISTERS): Add fallbacks to 0.
10510 (thread_rec): Let low target handle debug registers.
10511 (child_add_thread): Likewise.
10512 (child_init_thread_list): Likewise.
10513 (continue_one_thread): Likewise.
10514 (regptr): New.
10515 (do_child_fetch_inferior_registers): Move to ...
10516 * win32-i386-low.c: ... here, and rename to ...
10517 (do_fetch_inferior_registers): ... this.
889bf7c5 10518 * win32-low.c (child_fetch_inferior_registers):
68070c10
PA
10519 Go through the low target.
10520 (do_child_store_inferior_registers): Use regptr.
10521 (strwinerror): New function.
10522 (win32_create_inferior): Handle Windows CE.
10523 Use strwinerror instead of strerror on Windows error
10524 codes. Add program to the error output.
10525 Don't close the main thread handle on Windows CE.
10526 (win32_attach): Use coredll.dll on Windows CE.
10527 (win32_kill): Close current process and current
10528 thread handles.
10529 (win32_detach): Use coredll.dll on Windows CE.
10530 (win32_resume): Let low target handle debug registers, and
10531 step request.
10532 (handle_exception): Add/Remove initial breakpoint. Avoid
10533 non-existant WSTOPSIG on Windows CE.
10534 (win32_read_inferior_memory): Cast to remove warning.
10535 (win32_arch_string): Go through the low target.
10536 (initialize_low): Call set_breakpoint_data with the low
10537 target's breakpoint.
10538 * win32-low.c (dr, FLAG_TRACE_BIT, FCS_REGNUM,
10539 FOP_REGNUM, mappings): Move to ...
10540 * win32-i386-low.c: ... here.
10541 * win32-low.c (win32_thread_info): Move to ...
10542 * win32-low.h: ... here.
10543 * Makefile.in (SFILES): Add win32-low.c, win32-i386-low.c,
10544 win32-arm-low.c and wincecompat.c.
10545 (all:): Add $EXEEXT.
10546 (install-only:): Likewise.
10547 (gdbserver:): Likewise.
10548 (gdbreplay:): Likewise.
10549 * config.in: Regenerate.
10550 * configure: Regenerate.
10551
41093d81
PA
105522007-03-28 Pedro Alves <pedro_alves@portugalmail.pt>
10553
10554 * win32-low.c: Rename typedef thread_info to
10555 win32_thread_info throughout.
10556
544afa54
PA
105572007-03-28 Pedro Alves <pedro_alves@portugalmail.pt>
10558
10559 * win32-i386-low.c: Rename to ...
10560 * win32-low.c: ... this.
10561 * configure.srv: Replace win32-i386-low.o with win32-low.o.
10562 * Makefile.in: Likewise.
10563
bce7165d
PA
105642007-03-27 Pedro Alves <pedro_alves@portugalmail.pt>
10565
10566 * remote-utils.c (monitor_output): Constify msg parameter.
10567 * server.h (monitor_output): Likewise.
10568 * win32-i386-low.c (handle_output_debug_string): New.
10569 (win32_kill): Handle OUTPUT_DEBUG_STRING_EVENT events using
10570 handle_output_debug_string.
10571 (get_child_debug_event): Likewise.
10572
506c7aa0
DJ
105732007-03-27 Mat Hostetter <mat@lcs.mit.edu>
10574
10575 * server.c (main): Correct strtoul check.
10576
42c81e2a
DJ
105772007-03-27 Jon Ringle <jon@ringle.org>
10578
10579 * linux-low.c: Check __ARCH_HAS_MMU__ also.
10580
9453113a
DJ
105812007-03-27 Brooks Moses <brooks.moses@codesourcery.com>
10582
10583 * Makefile.in: Add dummy "pdf" and "install-pdf" targets.
10584
64a69107
DJ
105852007-02-27 Daniel Jacobowitz <dan@codesourcery.com>
10586
10587 * terminal.h: Check HAVE_SGTTY_H.
10588
105892007-02-27 Mat Hostetter <mat@lcs.mit.edu>
6f8486da
DJ
10590
10591 * remote-utils.c (remote_open): Print out the assigned port number.
10592
c74d0ad8
DJ
105932007-02-26 Daniel Jacobowitz <dan@codesourcery.com>
10594
10595 * remote-utils.c (monitor_output): New function.
10596 * server.c (debug_threads): Define here.
10597 (monitor_show_help): New function.
10598 (handle_query): Handle qRcmd.
10599 (main): Do not handle 'd' packet.
10600 * server.h (debug_threads, remote_debug, monitor_output): Declare.
10601 * linux-low.c, spu-low.c, win32-i386-low.c: Remove definitions
10602 of debug_threads.
10603
de7c3b4a
PA
106042007-02-25 Pedro Alves <pedro_alves@portugalmail.pt>
10605
10606 * Makefile.in (EXEEXT): New.
10607 (clean): Use $(EXEEXT).
10608
ef57601b
PA
106092007-02-25 Pedro Alves <pedro_alves@portugalmail.pt>
10610
10611 * target.h (target_ops): Rename send_signal to request_interrupt,
10612 and remove enum target_signal parameter.
10613 * linux-low.c (linux_request_interrupt): Rename from
10614 linux_send_signal, and always send SIGINT.
10615 * spu-low.c (spu_request_interrupt): Rename from spu_send_signal,
10616 and always send SIGINT.
10617 * remote-utils.c (putpkt_binary): Call request_interrupt, instead
10618 of send_signal.
10619 (input_interrupt): Likewise.
10620
820f2bda
PA
106212007-02-25 Pedro Alves <pedro_alves@portugalmail.pt>
10622
10623 * server.c (get_features_xml): Check if target implemented
10624 arch_string.
10625 * win32-i386-low.c (win32_arch_string): New.
10626 (win32_target_ops): Add win32_arch_string as arch_string member.
10627
ab39bf24
UW
106282007-02-22 Markus Deuling <deuling@de.ibm.com>
10629
10630 * spu-low.c (spu_arch_string): New.
10631 (spu_target_ops): Add spu_arch_string.
10632
61ff6e04
DJ
106332007-02-16 Daniel Jacobowitz <dan@codesourcery.com>
10634
10635 * remote-utils.c: Remove HAVE_TERMINAL_H check.
10636 * configure.ac: Do not check for terminal.h.
10637 * configure, config.in: Regenerated.
10638
fb1e4ffc
DJ
106392007-02-08 Daniel Jacobowitz <dan@codesourcery.com>
10640
10641 * Makefile.in (OBS): Add $(XML_BUILTIN).
10642 (XML_DIR, XML_TARGET, XML_FILES, XML_BUILTIN): New.
10643 (clean): Update.
10644 (target.xml, xml-builtin.c, stamp-xml, arm-with-iwmmxt.o)
10645 (arm-with-iwmmxt.c): New.
10646 * config.in, configure: Regenerate.
10647 * configure.ac: Check for iWMMXt. Handle srv_xmltarget,
10648 srv_xmlbuiltin, and srv_xmlfiles. Define USE_XML.
10649 * configure.srv: Mention srv_xmltarget and srv_xmlfiles.
10650 (arm*-*-linux*): Add iWMMXt and regset support.
10651 * linux-arm-low.c (PTRACE_GETWMMXREGS, PTRACE_SETWMMXREGS): Define.
10652 (arm_fill_gregset, arm_store_gregset, arm_fill_wmmxregset)
10653 (arm_store_wmmxregset, target_regsets): New.
10654 * server.c (get_features_xml): Take annex argument. Check builtin
10655 XML documents.
10656 (handle_query): Handle multiple annexes.
10657
0f48aa01
DJ
106582007-01-29 Daniel Jacobowitz <dan@codesourcery.com>
10659
10660 * remote-utils.c [USE_WIN32API] (read, write): Define.
10661 (putpkt_binary, input_interrupt, readchar, getpkt): Use read and
10662 write.
10663
23181151
DJ
106642007-01-09 Daniel Jacobowitz <dan@codesourcery.com>
10665
10666 * linux-i386-low.c (the_low_target): Set arch_string.
10667 * linux-x86-64-low.c (the_low_target): Likewise.
10668 * linux-low.c (linux_arch_string): New.
10669 (linux_target_ops): Add it.
10670 * linux-low.h (struct linux_target_ops): Add arch_string.
10671 * server.c (write_qxfer_response): Use const void * for DATA.
10672 (get_features_xml): New.
10673 (handle_query): Handle qXfer:features:read. Report it for qSupported.
10674 * target.h (struct target_ops): Add arch_string method.
10675
9d606399
DJ
106762007-01-03 Denis Pilat <denis.pilat@st.com>
10677 Daniel Jacobowitz <dan@codesourcery.com>
10678
10679 * linux-low.c (linux_kill): Handle being called with no threads.
10680 * win32-i386-low.c (win32_kill): Likewise.
10681 (get_child_debug_event): Clear current_process_handle.
10682
106832006-12-30 Denis PILAT <denis.pilat@st.com>
8264bb58
DJ
10684 Daniel Jacobowitz <dan@codesourcery.com>
10685
10686 * remote-utils.c (remote_open): Check the type of specified
10687 serial port devices before opening them.
10688 * server.c (main): Kill the inferior if an error occurs during
10689 the first remote_open.
10690
a5e13d24
DJ
106912006-12-05 Markus Deuling <deuling@de.ibm.com>
10692
10693 * README: Update supported targets.
10694
186947f7
DJ
106952006-11-28 Daniel Jacobowitz <dan@codesourcery.com>
10696
10697 * Makefile.in (clean): Remove reg-mips64.c.
10698 (reg-mips64.c, reg-mips64.o): New rules.
10699 * configure.srv: Handle mips64. Include regset support for mips.
10700 * linux-mips-low.c (union mips_register): New.
10701 (mips_get_pc, mips_set_pc, mips_reinsert_addr): Use it.
10702 (mips_breakpoint, mips_breakpoint_at): Use int.
10703 (mips_collect_register, mips_supply_register)
10704 (mips_collect_register_32bit, mips_supply_register_32bit)
10705 (mips_fill_gregset, mips_store_gregset, mips_fill_fpregset)
10706 (mips_store_fpregset, target_regsets): New.
10707 * thread-db.c (thread_db_get_tls_address): Use uintptr_t.
10708
a13e2c95
UW
107092006-11-22 Ulrich Weigand <uweigand@de.ibm.com>
10710
10711 * configure.srv: Add target "spu*-*-*".
10712 * Makefile.in (clean): Remove reg-spu.c.
10713 (reg-spu.c, reg-spu.o, spu-low.o): Add dependencies.
10714 * spu-low.c: New file.
10715
cb7283db
DJ
107162006-11-16 Daniel Jacobowitz <dan@codesourcery.com>
10717
10718 * configure.ac: Correct td_thr_tls_get_addr test.
10719 * configure: Regenerated.
10720
89be2091
DJ
107212006-11-16 Daniel Jacobowitz <dan@codesourcery.com>
10722
10723 * linux-low.c (linux_wait_for_event): Reformat. Use the
10724 pass_signals array.
10725 * remote-utils.c (decode_address_to_semicolon): New.
10726 * server.c (pass_signals, handle_general_set): New.
10727 (handle_query): Mention QPassSignals for qSupported.
10728 (main): Call handle_general_set.
10729 * server.h (pass_signals, decode_address_to_semicolon): New.
10730
000ef4f0
DJ
107312006-11-06 Daniel Jacobowitz <dan@codesourcery.com>
10732
10733 * server.c (handle_query): Correct error handling for read_auxv.
10734
b7149293
UW
107352005-10-19 Ulrich Weigand <uweigand@de.ibm.com>
10736
10737 * configure.srv [s390-*-linux*, s390x-*-linux*]: Set srv_linux_regsets
10738 and srv_linux_thread_db to yes.
10739 * linux-s390-low.c (s390_fill_gregset): New function.
10740 (target_regsets): Define data structure.
10741
dae5f5cf
DJ
107422006-10-17 Daniel Jacobowitz <dan@codesourcery.com>
10743
10744 * acinclude.m4 (SRV_CHECK_TLS_GET_ADDR): New.
10745 * configure.ac: Use it. Define HAVE_TD_THR_TLS_GET_ADDR.
10746 * config.in, configure: Regenerated.
10747 * inferiors.c (gdb_id_to_thread): New function.
10748 (gdb_id_to_thread_id): Use it.
10749 * linux-low.c (linux_target_ops): Use thread_db_get_tls_address.
10750 * linux-low.h (struct process_info): Add th member.
10751 (thread_db_get_tls_address): New prototype.
10752 * remote-utils.c (decode_address): Make non-static.
10753 * server.c (handle_query): Handle qGetTLSAddr.
10754 * server.h (gdb_id_to_thread, decode_address): New prototypes.
10755 * target.h (struct target_ops): Add get_tls_address.
10756 * thread-db.c (maybe_attach_thread): Save the thread handle.
10757 (thread_db_get_tls_address): New.
10758
32ca6d61
DJ
107592006-09-28 Daniel Jacobowitz <dan@codesourcery.com>
10760
10761 * linux-low.c (PTRACE_GETSIGINFO, PTRACE_SETSIGINFO): Define.
10762 (linux_resume_one_process): Take a siginfo_t *. Update all
10763 callers. Queue it if necessary. Use PTRACE_SETSIGINFO.
10764 (struct pending_signals): Add a siginfo_t.
10765 (linux_wait_for_process): Always set last_status.
10766 (linux_wait_for_event): Use PTRACE_GETSIGINFO.
10767 (linux_queue_one_thread): Use PTRACE_GETSIGINFO.
10768 * linux-low.h (struct process_info): Add last_status.
10769
5ffff7c1
DJ
107702006-09-21 Daniel Jacobowitz <dan@codesourcery.com>
10771
10772 * remote-utils.c (try_rle): New function.
10773 (putpkt_binary): Use it.
10774
8695c747
DJ
107752006-08-19 Daniel Jacobowitz <dan@codesourcery.com>
10776
10777 * Makefile.in (clean): Clean reg-x86-64-linux.c.
10778 (reg-x86-64-linux.o, reg-x86-64-linux.c): New.
10779 * configure.srv (x86_64-*-linux*): Use reg-x86-64-linux.o.
10780 * linux-x86-64-low.c (x86_64_regmap): Include ORIG_RAX.
10781 (x86_64_fill_gregset, x86_64_store_gregset): Skip floating
10782 point registers.
10783
290fadea
RS
107842006-08-08 Richard Sandiford <richard@codesourcery.com>
10785
10786 * server.c (terminal_fd): New variable.
10787 (old_foreground_pgrp): Likewise.
10788 (restore_old_foreground_pgrp): New function.
10789 (start_inferior): Record the terminal file descriptor in terminal_fd
10790 and its original foreground group in old_foreground_pgrp. Register
10791 restore_old_foreground_pgrp with atexit().
10792
9f2e1e63
DJ
107932006-07-26 Daniel Jacobowitz <dan@codesourcery.com>
10794
10795 * server.c (handle_query): Correct qPart to qXfer.
10796
b80864fb
DJ
107972006-07-22 Daniel Jacobowitz <dan@codesourcery.com>
10798
10799 * configure.ac: Check for more headers which are missing on
10800 Windows. Automatically supply -lwsock32 and USE_WIN32API.
10801 * configure.srv: Add Cygwin and mingw32.
10802 * remote-utils.c: Don't include headers unconditionally which
10803 are missing on mingw32. Include <winsock.h> for mingw32.
10804 (remote_open): Adjust for mingw32 support. Flush
10805 standard error after writing to it.
10806 (remote_close, putpkt_binary, input_interrupt, block_async_io)
10807 (unblock_async_io, enable_async_io, disable_async_io)
10808 (readchar, getpkt): Update for Winsock support.
10809 (prepare_resume_reply): Expect a protocol signal number.
10810 * server.c: Disable <sys/wait.h> on mingw32.
10811 (start_inferior): Adjust for mingw32 support. Flush
10812 standard error after writing to it.
10813 (attach_inferior): Likewise. Use protocol signal
10814 numbers.
10815 (main): Skip 'D' packet on mingw32. Use protocol signal numbers
10816 and names.
10817 * win32-i386-low.c: New file.
10818 * Makefile.in (XM_CLIBS): Set.
10819 (gdbserver, gdbreplay): Use $(INTERNAL_CFLAGS).
10820 (win32-i386-low.o): New dependency rule.
10821 * linux-low.c (linux_wait): Use target signal numbers.
10822 * target.h (struct target_ops): Doc fix.
10823 * server.h (target_signal_to_name): New prototype.
10824 * gdbreplay.c: Don't include headers unconditionally which
10825 are missing on mingw32. Include <winsock.h> for mingw32.
10826 (remote_close, remote_open): Adjust for Winsock support.
10827 * configure, config.in: Regenerated.
10828
0876f84a
DJ
108292006-07-12 Daniel Jacobowitz <dan@codesourcery.com>
10830
10831 * server.c (decode_xfer_read, write_qxfer_response): New.
10832 (handle_query): Take a packet length argument. Handle
10833 qXfer:auxv:read instead of qPart:auxv:read. Mention it in
10834 the qSupported response.
10835 (main): Update call to handle_query.
10836
01f9e8fa
DJ
108372006-06-22 Daniel Jacobowitz <dan@codesourcery.com>
10838
10839 * remote-utils.c (remote_escape_output, remote_unescape_input): New.
10840 (putpkt_binary): Renamed from putpkt and adjusted for binary
10841 data.
10842 (putpkt): New wrapper for putpkt_binary.
10843 (readchar): Don't mask off the high bit.
10844 (decode_X_packet): New function.
10845 * server.c (main): Call putpkt_binary if a handler sets the packet
10846 length. Save the length of the incoming packet. Handle 'X'.
10847 * server.h (gdb_byte, remote_escape_output, decode_X_packet): New.
10848
be2a5f71
DJ
108492006-06-21 Daniel Jacobowitz <dan@codesourcery.com>
10850
10851 * server.c (handle_query): Handle qSupported.
10852
ea025f5f
DJ
108532006-05-30 Daniel Jacobowitz <dan@codesourcery.com>
10854
10855 * remote-utils.c (all_symbols_looked_up): New variable.
10856 (look_up_one_symbol): Check it.
10857 * server.h (look_up_one_symbol): New declaration.
10858 * thread-db.c (thread_db_init): Set all_symbols_looked_up.
10859
9308fc88
DJ
108602006-05-30 Daniel Jacobowitz <dan@codesourcery.com>
10861
10862 * Makefile.in (linux-arm-low.o): Update dependencies.
66f338c7 10863 * linux-arm-low.c: Include "gdb_proc_service.h".
9308fc88
DJ
10864 (PTRACE_GET_THREAD_AREA): Define.
10865 (ps_get_thread_area): New function.
10866
52fb6437
NS
108672006-05-09 Nathan Sidwell <nathan@codesourcery.com>
10868
10869 * configure.srv (m68k*-*-uclinux*): New target.
10870 * linux-low.c (linux_create_inferior): Use vfork on mmuless systems.
10871 (linux_resume_one_process): Remove extraneous cast.
10872 (linux_read_offsets): New.
10873 (linux_target_op): Add linux_read_offsets on mmuless systems.
10874 * server.c (handle_query): Add qOffsets logic.
10875 * target.h (struct target_ops): Add read_offsets.
10876
21b0f40c
DJ
108772006-03-15 Daniel Jacobowitz <dan@codesourcery.com>
10878
10879 * linux-mips-low.c: Include <sys/ptrace.h> and "gdb_proc_service.h".
10880 (PTRACE_GET_THREAD_AREA): Define.
10881 (ps_get_thread_area): New function.
10882 * Makefile.in (linux-i386-low.o, linux-mips-low.o)
10883 (linux-x86-64-low.o): Update.
10884
0050a760
DJ
108852006-03-15 Daniel Jacobowitz <dan@codesourcery.com>
10886
10887 * configure.ac: Remove checks for prfpregset_t.
10888 * gdb_proc_service.h: New file.
10889 * linux-i386-low.c, linux-x86-64-low.c, thread-db.c: Use the
10890 new "gdb_proc_service.h".
10891 * proc-service.c: Likewise.
10892 (ps_pglobal_lookup, ps_pdread, ps_pdwrite): Use psaddr_t.
10893 (ps_lgetfpregs, ps_lsetfpregs): Use a void* argument.
10894 * Makefile.in (gdb_proc_service_h): Updated.
10895 * configure, config.in: Regenerated.
10896
b92a518e
DJ
108972006-03-03 Daniel Jacobowitz <dan@codesourcery.com>
10898
10899 * remote-utils.c (prepare_resume_reply): Move declaration
10900 of gdb_id_from_wait to the top of the block.
10901
545587ee
DJ
109022006-02-15 Daniel Jacobowitz <dan@codesourcery.com>
10903
10904 * linux-low.c (regsets_store_inferior_registers): Read the regset
10905 from the target before filling it.
10906
9db87ebd
DJ
109072006-02-08 Daniel Jacobowitz <dan@codesourcery.com>
10908
10909 * server.c (attach_inferior): Return SIGTRAP for a successful
10910 attach.
10911
dd24457d
DJ
109122006-02-01 Daniel Jacobowitz <dan@codesourcery.com>
10913
10914 * Makefile.in (OBS): Add version.o.
10915 (STAGESTUFF): Delete.
10916 (version.o): Add dependencies.
10917 (version.c): Replace rule.
10918 (clean): Remove version.c.
10919 * server.c (gdbserver_version): New.
10920 (gdbserver_usage): Use printf.
10921 (main): Handle --version and --help.
10922 * server.h (version, host_name): Add declarations.
10923
6f0f660e
EZ
109242005-12-23 Eli Zaretskii <eliz@gnu.org>
10925
889bf7c5
PA
10926 * linux-arm-low.c:
10927 * linux-arm-low.c:
10928 * inferiors.c:
10929 * i387-fp.h:
10930 * i387-fp.c:
10931 * gdbreplay.c:
10932 * regcache.c:
10933 * proc-service.c:
10934 * mem-break.h:
10935 * mem-break.c:
10936 * linux-x86-64-low.c:
10937 * linux-sh-low.c:
10938 * linux-s390-low.c:
10939 * linux-ppc64-low.c:
10940 * linux-ppc-low.c:
10941 * linux-mips-low.c:
10942 * linux-m68k-low.c:
10943 * linux-m32r-low.c:
10944 * linux-low.h:
10945 * linux-low.c:
10946 * linux-ia64-low.c:
10947 * linux-i386-low.c:
10948 * linux-crisv32-low.c:
10949 * thread-db.c:
10950 * terminal.h:
10951 * target.h:
10952 * target.c:
10953 * server.h:
10954 * server.c:
10955 * remote-utils.c:
10956 * regcache.h:
10957 * utils.c:
10958 * Makefile.in:
10959 * configure.ac:
6f0f660e
EZ
10960 * gdbserver.1: Add (C) after Copyright. Update the FSF
10961 address.
10962
9d1fb177
DJ
109632005-11-13 Daniel Jacobowitz <dan@codesourcery.com>
10964
10965 * linux-arm-low.c (arm_eabi_breakpoint): New variable.
10966 (arm_breakpoint_at): Recognize both breakpoints.
10967 (the_low_target): Use the correct breakpoint instruction.
10968
011a70c2
DJ
109692005-11-02 Daniel Jacobowitz <dan@codesourcery.com>
10970
10971 * configure.srv (x86_64-*-linux*): Turn on thread_db support.
10972 * linux-x86-64-low.c (x86_64_breakpoint, x86_64_breakpoint_len)
10973 (x86_64_get_pc, x86_64_set_pc, x86_64_breakpoint_at): New.
10974 (the_low_target): Update.
10975
7fb85e41
AS
109762005-10-25 Andreas Schwab <schwab@suse.de>
10977
10978 * server.c (main): Allocate mem_buf with PBUFSIZ bytes.
10979
10980 * linux-ia64-low.c (ia64_regmap): Remove NAT registers.
10981 (ia64_num_regs): Reduce to 462.
10982
3db0444b
DJ
109832005-09-17 Daniel Jacobowitz <dan@codesourcery.com>
10984
10985 * acinclude.m4: Correct quoting.
10986 * aclocal.m4: Regenerated.
10987
10988 Suggested by SZOKOVACS Robert <szo@ies.hu>:
10989 * thread-db.c (thread_db_err_str): Handle TD_VERSION.
10990 (thread_db_init): Call thread_db_err_str.
10991 * configure.ac: Check for TD_VERSION.
10992 * config.in, configure: Regenerated.
10993
bee0189a
DJ
109942005-07-31 Kaveh R. Ghazi <ghazi@caip.rutgers.edu>
10995
10996 * server.h (error, fatal, warning): Add ATTR_FORMAT.
10997
e9d25b98
DJ
109982005-07-13 Daniel Jacobowitz <dan@codesourcery.com>
10999
11000 * configure.ac: Define HAVE_LINUX_REGSETS even if PTRACE_GETREGS
11001 is not available. Define HAVE_PTRACE_GETREGS if it is.
11002 * config.in, configure: Regenerated.
11003 * configure.srv: Set srv_linux_regsets for PowerPC and PowerPC64.
11004 * linux-i386-low.c, linux-m68k-low.c: Update to use
11005 HAVE_PTRACE_GETREGS.
11006 * linux-low.c (regsets_fetch_inferior_registers)
11007 (regsets_store_inferior_registers): Only return 0 if we processed
11008 GENERAL_REGS.
11009 * linux-ppc-low.c (ppc_fill_gregset, target_regsets): New.
11010 * linux-ppc64-low.c (ppc_fill_gregset, target_regsets): New.
11011
a06660f7
DJ
110122005-07-13 Daniel Jacobowitz <dan@codesourcery.com>
11013
11014 * inferiors.c (struct thread_info): Add gdb_id.
11015 (add_thread): Add gdb_id argument.
11016 (thread_id_to_gdb_id, thread_to_gdb_id, gdb_id_to_thread_id): New.
11017 * linux-low.c (linux_create_inferior, linux_attach_lwp): Update
11018 calls to add_thread.
11019 * remote-utils.c (prepare_resume_reply: Use thread_to_gdb_id.
11020 * server.c (handle_query): Use thread_to_gdb_id.
11021 (handle_v_cont, main): Use gdb_id_to_thread_id.
11022 * server.h (add_thread): Update prototype.
11023 (thread_id_to_gdb_id, thread_to_gdb_id, gdb_id_to_thread_id): New
11024 prototypes.
11025
5a1f5858
DJ
110262005-07-13 Daniel Jacobowitz <dan@codesourcery.com>
11027
11028 * linux-low.c (fetch_register, usr_store_inferior_registers): Handle
11029 left-padded registers.
11030 * linux-low.h (struct linux_target_ops): Add left_pad_xfer.
11031 * linux-ppc64-low.c (the_low_target): Set left_pad_xfer.
11032
e122f1f5
SE
110332005-07-01 Steve Ellcey <sje@cup.hp.com>
11034
11035 * configure.ac (BFD_NEED_DECLARATION): Replace with AC_CHECK_DECLS.
11036 * configure: Regenerate.
11037 * config.in: Regenerate.
11038 * server.h (NEED_DECLARATION_STRERROR):
11039 Replace with !HAVE_DECL_STRERROR.
11040
d592fa2f
DJ
110412005-06-16 Daniel Jacobowitz <dan@codesourcery.com>
11042
11043 * linux-low.c (linux_wait, linux_send_signal): Don't test
11044 an unsigned long variable for > 0 if it could be MAX_ULONG.
11045 * server.c (myresume): Likewise.
11046 * target.c (set_desired_inferior): Likewise.
11047
ccbd4912
MK
110482005-06-13 Mark Kettenis <kettenis@gnu.org>
11049
11050 * configure.ac: Simplify and improve check for socklen_t.
11051 * configure, config.in: Regenerate.
11052
f450004a
DJ
110532005-06-12 Daniel Jacobowitz <dan@codesourcery.com>
11054
11055 * acconfig.h: Remove.
11056 * configure.ac: Add a test for socklen_t. Use three-argument
11057 AC_DEFINE throughout.
11058 * config.in: Regenerated using autoheader 2.59.
11059 * configure: Regenerated.
11060
11061 * gdbreplay.c (socklen_t): Provide a default.
11062 (remote_open): Use socklen_t.
11063 * remote-utils.c (socklen_t): Provide a default.
11064 (remote_open): Use socklen_t.
11065 (convert_int_to_ascii, convert_ascii_to_int, decode_M_packet): Use
11066 unsigned char.
11067
11068 * i387-fp.c (struct i387_fsave, struct i387_fxsave): Use unsigned
11069 char for buffers.
11070 * linux-low.c (linux_read_memory, linux_write_memory)
11071 (linux_read_auxv): Likewise.
11072 * mem-break.c (breakpoint_data, set_breakpoint_data, check_mem_read)
11073 (check_mem_write): Likewise.
11074 * mem-break.h (set_breakpoint_data, check_mem_read, check_mem_write):
11075 Likewise.
11076 * regcache.c (struct inferior_rgcache_data, registers_to_string)
11077 (registers_from_string, register_data): Likewise.
11078 * server.c (handle_query, main): Likewise.
11079 * server.h (convert_ascii_to_int, convert_int_to_ascii)
11080 (decode_M_packet): Likewise.
11081 * target.c (read_inferior_memory, write_inferior_memory): Likewise.
11082 * target.h (struct target_ops): Update read_memory, write_memory,
11083 and read_auxv.
11084 (read_inferior_memory, write_inferior_memory): Update.
11085 * linux-low.h (struct linux_target_ops): Change type of breakpoint
11086 to unsigned char *.
11087 * linux-arm-low.c, linux-cris-low.c, linux-crisv32-low.c,
11088 linux-i386-low.c, linux-m32r-low.c, linux-m68k-low.c,
11089 linux-mips-low.c, linux-ppc-low.c, linux-ppc64-low.c,
11090 linux-s390-low.c, linux-sh-low.c: Update for changes in
11091 read_inferior_memory and the_low_target->breakpoint.
11092
eee84df1
DJ
110932005-05-28 Daniel Jacobowitz <dan@codesourcery.com>
11094
11095 * Makefile.in (SFILES): Add linux-ppc64-low.c.
11096 (linux-ppc64-low.o, reg-ppc64.c, reg-ppc64.o): New targets.
11097 * configure.srv: Add powerpc64-*-linux*.
11098 * linux-ppc64-low.c: New file.
11099
45b134e5
OF
111002005-05-23 Orjan Friberg <orjanf@axis.com>
11101
11102 * linux-cris-low.c: New file with support for CRIS.
11103 * linux-crisv32-low.c: Ditto for CRISv32.
11104 * Makefile.in (SFILES): Add linux-cris-low.c, linux-crisv32-low.c.
11105 (clean): Add reg-cris.c and reg-crisv32.c.
889bf7c5 11106 Add linux-cris-low.o, linux-crisv32-low.o, reg-cris.o, reg-cris.c,
45b134e5
OF
11107 reg-crisv32.o, and reg-crisv32.c to make rules.
11108 * configure.srv: Add cris-*-linux* and crisv32-*-linux* to list of
11109 recognized targets.
11110
48d93c75
UW
111112005-05-16 Ulrich Weigand <uweigand@de.ibm.com>
11112
11113 * linux-low.c (fetch_register): Ensure buffer size is a multiple
11114 of sizeof (PTRACE_XFER_TYPE).
11115 (usr_store_inferior_registers): Likewise. Zero out excess bytes.
11116
e013ee27
OF
111172005-05-12 Orjan Friberg <orjanf@axis.com>
11118
889bf7c5 11119 * target.h (struct target_ops): Add insert_watchpoint,
e013ee27
OF
11120 remove_watchpoint, stopped_by_watchpoint, stopped_data_address function
11121 pointers for hardware watchpoint support.
11122 * linux-low.h (struct linux_target_ops): Ditto.
11123 * linux-low.c (linux_insert_watchpoint, linux_remove_watchpoint)
11124 (linux_stopped_by_watchpoint, linux_stopped_data_address): New. Add
11125 to linux_target_ops.
11126 * remote-utils.c (prepare_resume_reply): Add watchpoint information to
11127 reply packet.
11128 * server.c (main): Recognize 'Z' and 'z' packets.
11129
b0ded00b
UW
111302005-05-10 Ulrich Weigand <uweigand@de.ibm.com>
11131
11132 * linux-s390-low.c (s390_breakpoint, s390_breakpoint_len): Define.
11133 (s390_get_pc, s390_set_pc, s390_breakpoint_at): New functions.
11134 (the_low_target): Add new members.
11135
8643e2ad
DJ
111362005-05-04 Daniel Jacobowitz <dan@codesourcery.com>
11137
11138 * proc-service.c (ps_lgetregs): Search all_processes instead of
11139 all_threads.
11140
fc620387
DJ
111412005-05-04 Daniel Jacobowitz <dan@codesourcery.com>
11142
11143 * server.c (start_inferior): Change return type to int.
11144 (attach_inferior): Change sigptr to int *.
11145 (handle_v_cont, handle_v_requests): Change signal to int *.
11146 (main): Change signal to int.
11147
111482005-04-15 Kei Sakamoto <sakamoto.kei@renesas.com>
7cfbc4a0
KI
11149
11150 * Makefile.in: Add linux-m32r-low.o, reg-m32r.c and reg-m32r.o.
11151 * configure.srv: Add m32r*-*-linux*.
11152 * linux-m32r-low.c: New file.
11153
e0e76420
DJ
111542005-03-04 Daniel Jacobowitz <dan@codesourcery.com>
11155
11156 * Makefile.in (stamp-h): Set CONFIG_HEADERS explicitly.
11157
a1928bad
DJ
111582005-03-03 Daniel Jacobowitz <dan@codesourcery.com>
11159
11160 * inferiors.c (change_inferior_id, add_thread, find_inferior_id):
11161 Take unsigned long arguments for PIDs.
11162 * linux-low.c (add_process, linux_attach_lwp, linux_attach)
11163 (linux_thread_alive, linux_wait_for_event, kill_lwp, send_sigstop)
11164 (wait_for_sigstop, linux_resume_one_process)
11165 (regsets_fetch_inferior_registers, linux_send_signal)
11166 (linux_read_auxv): Likewise. Update the types of variables holding
11167 PIDs. Update format string specifiers.
11168 * linux-low.h (struct process_info, linux_attach_lwp): Likewise.
11169 * remote-utils.c (prepare_resume_reply): Likewise.
11170 * server.c (cont_thread, general_thread, step_thread)
11171 (thread_from_wait, old_thread_from_wait, signal_pid): Change type to
11172 unsigned long.
11173 (handle_query): Update format specifiers.
11174 (handle_v_cont, main): Use strtoul for thread IDs.
11175 * server.h (struct inferior_list_entry): Use unsigned long for ID.
11176 (add_thread, find_inferior_id, change_inferior_id, cont_thread)
11177 (general_thread, step_thread, thread_from_wait)
11178 (old_thread_from_wait): Update.
11179 * target.h (struct thread_resume): Use unsigned long for THREAD.
11180 (struct target_ops): Use unsigned long for arguments to attach and
11181 thread_alive.
11182
dcdb98d2
DJ
111832005-02-24 Daniel Jacobowitz <dan@codesourcery.com>
11184
11185 * acinclude.m4: Include bfd/bfd.m4 directly.
11186 * configure.ac: Use AC_ARG_PROGRAM. Suggested by Aron Griffis
11187 <agriffis@toolchain.org>.
11188 * aclocal.m4, configure: Regenerated.
11189
bec39cab
AC
111902005-01-07 Andrew Cagney <cagney@gnu.org>
11191
11192 * configure.ac: Rename configure.in, require autoconf 2.59.
11193 * configure: Re-generate.
11194
434c4c77
DJ
111952004-12-08 Daniel Jacobowitz <dan@debian.org>
11196
11197 * acinclude.m4 (SRV_CHECK_THREAD_DB): Add ps_get_thread_area. Reset
11198 LIBS when finished.
11199 * aclocal.m4: Regenerated.
11200 * configure: Regenerated.
11201
db1d3e1b
AS
112022004-11-21 Andreas Schwab <schwab@suse.de>
11203
11204 * linux-m68k-low.c (m68k_num_gregs): Define.
11205 (m68k_fill_gregset, m68k_store_gregset, m68k_fill_fpregset)
11206 (m68k_store_fpregset, target_regsets) [HAVE_LINUX_REGSETS]: New.
11207 (m68k_breakpoint, m68k_breakpoint_len, m68k_get_pc, m68k_set_pc)
11208 (m68k_breakpoint_at): New. Add to the_low_target.
11209
11210 * configure.srv (m68*-*-linux*): Set srv_linux_regsets and
11211 srv_linux_thread_db to yes.
11212
43360365
JB
112132004-10-20 Joel Brobecker <brobecker@gnat.com>
11214
11215 * linux-x86-64-low.c (ARCH_SET_GS): Add definition if missing.
11216 (ARCH_SET_FS): Likewise.
11217 (ARCH_GET_FS): Likewise.
11218 (ARCH_GET_GS): Likewise.
11219
fd500816
DJ
112202004-10-16 Daniel Jacobowitz <dan@debian.org>
11221
11222 * linux-i386-low.c (ps_get_thread_area): New.
11223 * linux-x86-64-low.c (ps_get_thread_area): New.
11224 * linux-low.c: Include <sys/syscall.h>.
11225 (linux_kill_one_process): Don't kill the first thread here.
11226 (linux_kill): Kill the first thread here.
11227 (kill_lwp): New function.
11228 (send_sigstop, linux_send_signal): Use it.
11229 * proc-service.c: Clean up #ifdefs.
11230 (fpregset_info): Delete.
11231 (ps_lgetregs): Update and enable implementation.
11232 (ps_lsetregs, ps_lgetfpregs, ps_lsetfpregs): Remove disabled
11233 implementations.
11234 * remote-utils.c (struct sym_cache, symbol_cache): New.
11235 (input_interrupt): Print a clearer message.
11236 (async_io_enabled): New variable.
11237 (enable_async_io, disable_async_io): Use it. Update comments.
11238 (look_up_one_symbol): Use the symbol cache.
11239 * thread-db.c (thread_db_look_up_symbols): New function.
11240 (thread_db_init): Update comments. Call thread_db_look_up_symbols.
11241
f6de3c42
DJ
112422004-10-16 Daniel Jacobowitz <dan@debian.org>
11243
11244 * configure.in: Test for -rdynamic.
11245 * configure: Regenerated.
11246 * Makefile (INTERNAL_LDFLAGS): New.
11247 (gdbserver, gdbreplay): Use it.
11248
2c0fc042
AC
112492004-09-02 Andrew Cagney <cagney@gnu.org>
11250
11251 * Makefile.in (TAGS): Replace TM_FILE with DEPRECATED_TM_FILE.
11252
075b3282
DJ
112532004-03-23 Daniel Jacobowitz <drow@mvista.com>
11254
11255 * linux-low.c (linux_wait): Clear all_processes list also.
11256
fa6a77dc
DJ
112572004-03-12 Daniel Jacobowitz <drow@mvista.com>
11258
11259 * linux-low.c: Include <errno.h>. Remove extern declaration of
11260 errno.
11261
6d782a97
DJ
112622004-03-12 Daniel Jacobowitz <drow@mvista.com>
11263
11264 * gdbreplay.c, server.h, utils.c: Update copyright years.
11265
3a7fb99b
DJ
112662004-03-04 Nathan J. Williams <nathanw@wasabisystems.com>
11267
11268 * server.c (main): Print child status or termination signal from
11269 variable 'signal', not 'sig'.
11270
c3e735a6
DJ
112712004-03-04 Nathan J. Williams <nathanw@wasabisystems.com>
11272
11273 * linux-low.c (linux_read_memory): Change return type to
11274 int. Check for and return error from ptrace().
11275 * target.c (read_inferior_memory): Change return type to int. Pass
11276 back return status from the_target->read_memory().
11277 * target.h (struct target_ops): Adapt *read_memory() prototype.
11278 Update comment.
11279 (read_inferior_memory): Adapt prototype.
11280 * server.c (main): Return an error packet if
11281 read_inferior_memory() returns an error.
11282
a59d1c82
DJ
112832004-03-04 Daniel Jacobowitz <drow@mvista.com>
11284
11285 * Makefile.in (distclean): Remove config.h, stamp-h, and config.log.
11286 Unify with other clean targets.
11287
dc3f8883
DJ
112882004-02-29 Daniel Jacobowitz <drow@mvista.com>
11289
11290 * server.c (handle_v_cont): Call set_desired_inferior.
11291
89a208da
DJ
112922004-02-29 Daniel Jacobowitz <drow@mvista.com>
11293
11294 * remote-utils.c (prepare_resume_reply): Always supply "thread:".
11295
62ea82f5
DJ
112962004-02-29 Daniel Jacobowitz <drow@mvista.com>
11297
11298 * linux-low.c (linux_wait): Unblock async I/O.
11299 (linux_resume): Block and enable async I/O.
11300 * remote-utils.c (block_async_io, unblock_async_io): New functions.
11301 * server.h (block_async_io, unblock_async_io): Add prototypes.
11302
6910d122
DJ
113032004-02-29 Daniel Jacobowitz <drow@mvista.com>
11304
11305 * remote-utils.c (remote_open): Print a status notice after
11306 opening a TCP port.
11307 * server.c (attach_inferior): Print a status notice after
11308 attaching.
11309
113102004-02-29 Daniel Jacobowitz <drow@mvista.com>
d677d77d
DJ
11311
11312 * linux-arm-low.c (arm_get_pc): Print out stop PC in debug mode.
11313
c89dc5d4
DJ
113142004-02-26 Daniel Jacobowitz <drow@mvista.com>
11315
11316 * remote-utils.c (write_enn): Use "E01" instead of "ENN" for the
11317 error packet.
11318 * server.c, target.h: Update copyright years.
11319
4b8dad4a
RM
113202004-02-25 Roland McGrath <roland@redhat.com>
11321
11322 * target.h (struct target_ops): New member `read_auxv'.
11323 * server.c (handle_query): Handle qPart:auxv:read: query using that.
11324 * linux-low.c (linux_read_auxv): New function.
11325 (linux_target_ops): Initialize `read_auxv' member to that.
11326
d7446758
JB
113272004-02-17 Ulrich Weigand <Ulrich.Weigand@de.ibm.com>
11328
11329 Committed by Jim Blandy <jimb@redhat.com>.
11330
11331 * linux-s390-low.c (s390_num_regs): Update.
4b8dad4a 11332 (s390_regmap): Remove control registers. Use __s390x__ predefine
d7446758
JB
11333 instead of GPR_SIZE to distiguish s390 and s390x targets.
11334
5544ad89
DJ
113352004-01-31 Daniel Jacobowitz <drow@mvista.com>
11336
11337 * linux-low.c: Update copyright year.
11338 (check_removed_breakpoint): Clear pending_is_breakpoint.
11339 (linux_set_resume_request, linux_queue_one_thread)
11340 (resume_status_pending_p): New functions.
11341 (linux_continue_one_thread): Use process->resume.
11342 (linux_resume): Only resume threads if there are no pending events.
11343 * linux-low.h (struct process_info): Add resume request
11344 pointer.
11345
2a68b70e
DJ
113462004-01-30 Daniel Jacobowitz <drow@mvista.com>
11347
11348 * regcache.c (new_register_cache): Clear the allocated register
11349 buffer. Suggested by Atsushi Nemoto <anemo@mba.ocn.ne.jp>.
11350
64386c31
DJ
113512003-10-13 Daniel Jacobowitz <drow@mvista.com>
11352
11353 * linux-low.c (linux_resume): Take a struct thread_resume *
11354 argument.
11355 (linux_wait): Update call.
11356 (resume_ptr): New static variable.
11357 (linux_continue_one_thread): Renamed from
11358 linux_continue_one_process. Use resume_ptr.
11359 (linux_resume): Use linux_continue_one_thread.
11360 * server.c (handle_v_cont, handle_v_requests): New functions.
11361 (myresume): New function.
11362 (main): Handle 'v' case.
11363 * target.h (struct thread_resume): New type.
11364 (struct target_ops): Change argument of "resume" to struct
11365 thread_resume *.
11366 (myresume): Delete macro.
11367
c938e9b0
L
113682003-08-08 H.J. Lu <hongjiu.lu@intel.com>
11369
11370 * Makefile.in (install-only): Create dest dir. Support DESTDIR.
11371 (uninstall): Support DESTDIR.
11372
7f313d07
BC
11373Mon Jul 21 20:09:34 UTC 2003 Brendan Conoboy <blc@redhat.com>
11374
11375 * configure.srv: Add xscale*linux copy of arm*linux entry.
11376
3b2fc2ea
DJ
113772003-07-24 Daniel Jacobowitz <drow@mvista.com>
11378
11379 * linux-arm-low.c (arm_reinsert_addr): New function.
11380 (the_low_target): Add arm_reinsert_addr.
11381
1c0a559e
MK
113822003-07-08 Mark Kettenis <kettenis@gnu.org>
11383
11384 * mem-break.c: Remove whitespace at end of file.
11385
43d5792c
DJ
113862003-06-28 Daniel Jacobowitz <drow@mvista.com>
11387
11388 * configure.in: Check whether we need to prototype strerror.
11389 * server.h: Optionally prototype strerror.
11390 * gdbreplay.c (perror_with_name): Use strerror.
11391 * linux-low.c (linux_attach_lwp): Use strerror.
11392 * utils.c (perror_with_name): Use strerror.
11393 * config.in, configure: Regenerated.
11394
c8a86edf
DJ
113952003-06-28 Daniel Jacobowitz <drow@mvista.com>
11396
11397 * linux-sh-low.c (sh_regmap): Fix FP register offsets, reported by
11398 SUGIOKA Toshinobu <sugioka@itonet.co.jp>.
11399
73d37363
DJ
114002003-06-20 Daniel Jacobowitz <drow@mvista.com>
11401
11402 * Makefile.in (SFILES): Update.
11403 * low-hppabsd.c, low-lynx.c, low-nbsd.c, low-sim.c, low-sparc.c,
11404 low-sun3.c: Remove files.
11405
6ad8ae5c
DJ
114062003-06-17 Daniel Jacobowitz <drow@mvista.com>
11407
11408 * linux-low.c: Move comment to linux_thread_alive where it belonged.
11409 (linux_detach_one_process, linux_detach): New functions.
11410 (linux_target_ops): Add linux_detach.
11411 * server.c (main): Handle 'D' packet.
11412 * target.h (struct target_ops): Add "detach" member.
11413 (detach_inferior): Define.
11414
1581182a
MK
114152003-06-13 Mark Kettenis <kettenis@gnu.org>
11416
11417 From Kelley Cook <kelleycook@wideopenwest.com>:
11418 * configure.srv: Accept i[34567]86 variants.
11419
e5379b03
DJ
114202003-06-05 Daniel Jacobowitz <drow@mvista.com>
11421
11422 * linux-low.c (linux_wait_for_event): Correct comment typos.
11423 (linux_resume_one_process): Call check_removed_breakpoint.
11424 (linux_send_signal): New function.
11425 (linux_target_ops): Add linux_send_signal.
11426 * remote-utils.c (putpkt, input_interrupt): Use send_signal instead
11427 of kill.
11428 * target.h (struct target_ops): Add send_signal.
11429
2ff29de4
JB
114302003-05-29 Jim Blandy <jimb@redhat.com>
11431
11432 * linux-low.c (usr_store_inferior_registers): Transfer buf in
11433 PTRACE_XFER_TYPE-sized chunks, not int-sized chunks. Otherwise,
11434 if 'int' is smaller than PTRACE_XFER_TYPE, you end up throwing
11435 away part of the register's value.
11436
254787d4
DJ
114372003-03-26 Daniel Jacobowitz <drow@mvista.com>
11438
11439 * linux-low.c (linux_create_inferior): Use __SIGRTMIN.
11440 (linux_wait_for_event, linux_init_signals): Likewise.
11441
94e10508
DJ
114422003-03-17 Daniel Jacobowitz <drow@mvista.com>
11443
11444 * configure.in: Check for stdlib.h.
11445 * configure: Regenerated.
11446 * config.in: Regenerated.
11447
4c0711e0
DJ
114482003-01-04 Andreas Schwab <schwab@suse.de>
11449
11450 * linux-m68k-low.c (m68k_num_regs): Define to 29 instead of 31.
11451
ef66e766
AC
114522003-01-02 Andrew Cagney <ac131313@redhat.com>
11453
11454 * Makefile.in: Remove obsolete code.
11455
a1358604
DJ
114562002-11-20 Daniel Jacobowitz <drow@mvista.com>
11457
11458 * linux-s390-low.c (s390_regmap): Check GPR_SIZE instead of
11459 defined(PT_FPR0_HI).
11460
23ce3b1c
DJ
114612002-11-17 Stuart Hughes <seh@zee2.com>
11462
11463 * linux-arm-low.c (arm_num_regs): Increase.
11464 (arm_regmap): Include status register.
11465
114662002-11-17 Daniel Jacobowitz <drow@mvista.com>
11467
11468 * linux-low.c (register_addr): Remove incorrect -1 check.
11469
a9fa9f7d
DJ
114702002-08-29 Daniel Jacobowitz <drow@mvista.com>
11471
11472 * linux-low.c (linux_create_inferior): Call setpgid. Return
11473 the new PID.
11474 (unstopped_p, linux_signal_pid): Remove.
11475 (linux_target_ops): Remove linux_signal_pid.
11476 * remote-utils.c (putpkt, input_interrupt): Use signal_pid
11477 global instead of target method.
11478 * target.h (struct target_ops): Remove signal_pid. Update comment
11479 for create_inferior.
11480 * server.c (signal_pid): New variable.
11481 (create_inferior): Set signal_pid. Block SIGTTOU and SIGTTIN in
4b8dad4a 11482 gdbserver. Set the child to be the foreground process group.
a9fa9f7d
DJ
11483 (attach_inferior): Set signal_pid.
11484
17574093
DJ
114852002-08-23 Daniel Jacobowitz <drow@mvista.com>
11486
11487 * ChangeLog: New file, with entries from gdb/ChangeLog after GDB 5.2.
11488
114892002-08-20 Jim Blandy <jimb@redhat.com>
11490
11491 * Makefile.in (LDFLAGS): Allow the configure script to establish a
11492 default for this.
11493
114942002-08-01 Andrew Cagney <cagney@redhat.com>
11495
11496 * Makefile.in: Make chill references obsolete.
11497
114982002-07-24 Kevin Buettner <kevinb@redhat.com>
11499
11500 * configure.in (unistd.h): Add to AC_CHECK_HEADERS list.
11501 * configure: Regenerate.
11502 * config.in: Regenerate.
11503
115042002-07-09 David O'Brien <obrien@FreeBSD.org>
11505
11506 * gdbreplay.c (stdlib.h, unistd.h): Conditionaly include.
11507 (perror_with_name, remote_close, remote_open, expect, play): Static.
11508
115092002-07-04 Michal Ludvig <mludvig@suse.cz>
11510
4b8dad4a 11511 * linux-x86-64-low.c (x86_64_regmap): Make it an array of
17574093
DJ
11512 byte offsets instead of an array of indexes.
11513 (x86_64_store_gregset, x86_64_store_fpregset): Parameter made const.
11514
115152002-06-13 Daniel Jacobowitz <drow@mvista.com>
11516
11517 * regcache.c: Add comment.
11518
115192002-06-11 Daniel Jacobowitz <drow@mvista.com>
11520
11521 * thread-db.c: New file.
11522 * proc-service.c: New file.
11523 * acinclude.m4: New file.
11524 * Makefile.in: Add GDBSERVER_LIBS, gdb_proc_service_h,
11525 proc-service.o, and thread-db.o.
11526 (linux-low.o): Add USE_THREAD_DB.
11527 * acconfig.h: Add HAVE_PRGREGSET_T, HAVE_PRFPREGSET_T,
11528 HAVE_LWPID_T, HAVE_PSADDR_T, and PRFPREGSET_T_BROKEN.
11529 * aclocal.m4: Regenerated.
11530 * config.in: Regenerated.
11531 * configure: Regenerated.
11532 * configure.in: Check for proc_service.h, sys/procfs.h,
11533 thread_db.h, and linux/elf.h headrs.
11534 Check for lwpid_t, psaddr_t, prgregset_t, prfpregset_t, and
11535 PRFPREGSET_T_BROKEN. Introduce srv_thread_depfiles and USE_THREAD_DB.
11536 Check for -lthread_db and thread support.
11537 * configure.srv: Enable thread_db support for ARM, i386, MIPS,
11538 PowerPC, and SuperH.
11539 * i387-fp.c: Constify arguments.
11540 * i387-fp.h: Likewise.
11541 * inferiors.c: (struct thread_info): Renamed from
11542 `struct inferior_info'. Remove PID member. Use generic inferior
11543 list header. All uses updated.
11544 (inferiors, signal_pid): Removed.
11545 (all_threads): New variable.
11546 (get_thread): Define.
11547 (add_inferior_to_list): New function.
11548 (for_each_inferior): New function.
11549 (change_inferior_id): New function.
11550 (add_inferior): Removed.
11551 (remove_inferior): New function.
11552 (add_thread): New function.
11553 (free_one_thread): New function.
11554 (remove_thread): New function.
11555 (clear_inferiors): Use for_each_inferior and free_one_thread.
11556 (find_inferior): New function.
11557 (find_inferior_id): New function.
11558 (inferior_target_data): Update argument type.
11559 (set_inferior_target_data): Likewise.
11560 (inferior_regcache_data): Likewise.
11561 (set_inferior_regcache_data): Likewise.
11562 * linux-low.c (linux_bp_reinsert): Remove.
11563 (all_processes, stopping_threads, using_thrads)
11564 (struct pending_signals, debug_threads, pid_of): New.
11565 (inferior_pid): Replace with macro.
11566 (struct inferior_linux_data): Remove.
11567 (get_stop_pc, add_process): New functions.
11568 (linux_create_inferior): Restore SIGRTMIN+1 before calling exec.
11569 Use add_process and add_thread.
11570 (linux_attach_lwp): New function, based on old linux_attach. Use
11571 add_process and add_thread. Set stop_expected for new threads.
11572 (linux_attach): New function.
11573 (linux_kill_one_process): New function.
11574 (linux_kill): Kill all LWPs.
11575 (linux_thread_alive): Use find_inferior_id.
11576 (check_removed_breakpoints, status_pending_p): New functions.
11577 (linux_wait_for_process): Renamed from linux_wait_for_one_inferior.
11578 Update. Use WNOHANG. Wait for cloned processes also. Update process
11579 struct for the found process.
11580 (linux_wait_for_event): New function.
11581 (linux_wait): Use it. Support LWPs.
11582 (send_sigstop, wait_for_sigstop, stop_all_processes)
11583 (linux_resume_one_process, linux_continue_one_process): New functions.
11584 (linux_resume): Support LWPs.
11585 (REGISTER_RAW_SIZE): Remove.
11586 (fetch_register): Use register_size instead. Call supply_register.
11587 (usr_store_inferior_registers): Likewise. Call collect_register.
11588 Fix recursive case.
11589 (regsets_fetch_inferior_registers): Improve error message.
11590 (regsets_store_inferior_registers): Add debugging.
11591 (linux_look_up_symbols): Call thread_db_init if USE_THREAD_DB.
11592 (unstopped_p, linux_signal_pid): New functions.
11593 (linux_target_ops): Add linux_signal_pid.
11594 (linux_init_signals): New function.
11595 (initialize_low): Call it. Initialize using_threads.
11596 * regcache.c (inferior_regcache_data): Add valid
11597 flag.
11598 (get_regcache): Fetch registers lazily. Add fetch argument
11599 and update all callers.
11600 (regcache_invalidate_one, regcache_invalidate): New
11601 functions.
11602 (new_register_cache): Renamed from create_register_cache.
11603 Return the new regcache.
11604 (free_register_cache): Change argument to a void *.
11605 (registers_to_string, registers_from_string): Call get_regcache
11606 with fetch flag set.
11607 (register_data): Make static. Pass fetch flag to get_regcache.
11608 (supply_register): Call get_regcache with fetch flag clear.
11609 (collect_register): Call get_regcache with fetch flag set.
11610 (collect_register_as_string): New function.
11611 * regcache.h: Update.
11612 * remote-utils.c (putpkt): Flush after debug output and use
11613 stderr.
11614 Handle input interrupts while waiting for an ACK.
11615 (input_interrupt): Use signal_pid method.
11616 (getpkt): Flush after debug output and use stderr.
11617 (outreg): Use collect_register_as_string.
11618 (new_thread_notify, dead_thread_notify): New functions.
11619 (prepare_resume_reply): Check using_threads. Set thread_from_wait
11620 and general_thread.
11621 (look_up_one_symbol): Flush after debug output.
11622 * server.c (step_thread, server_waiting): New variables.
11623 (start_inferior): Don't use signal_pid. Update call to mywait.
11624 (attach_inferior): Update call to mywait.
11625 (handle_query): Handle qfThreadInfo and qsThreadInfo.
11626 (main): Don't fetch/store registers explicitly. Use
11627 set_desired_inferior. Support proposed ``Hs'' packet. Update
11628 calls to mywait.
11629 * server.h: Update.
11630 (struct inferior_list, struct_inferior_list_entry): New.
11631 * target.c (set_desired_inferior): New.
11632 (write_inferior_memory): Constify.
11633 (mywait): New function.
11634 * target.h: Update.
11635 (struct target_ops): New signal_pid method.
11636 (mywait): Removed macro, added prototype.
11637
11638 * linux-low.h (regset_func): Removed.
11639 (regset_fill_func, regset_store_func): New.
11640 (enum regset_type): New.
11641 (struct regset_info): Add type field. Use new operation types.
11642 (struct linux_target_ops): stop_pc renamed to get_pc.
11643 Add decr_pc_after_break and breakpoint_at.
11644 (get_process, get_thread_proess, get_process_thread)
11645 (strut process_info, all_processes, linux_attach_lwp)
11646 (thread_db_init): New.
11647
11648 * linux-arm-low.c (arm_get_pc, arm_set_pc,
11649 arm_breakpoint, arm_breakpoint_len, arm_breakpoint_at): New.
11650 (the_low_target): Add new members.
11651 * linux-i386-low.c (i386_store_gregset, i386_store_fpregset)
11652 (i386_store_fpxregset): Constify.
11653 (target_regsets): Add new kind identifier.
11654 (i386_get_pc): Renamed from i386_stop_pc. Simplify.
11655 (i386_set_pc): Add debugging.
11656 (i386_breakpoint_at): New function.
11657 (the_low_target): Add new members.
11658 * linux-mips-low.c (mips_get_pc, mips_set_pc)
11659 (mips_breakpoint, mips_breakpoint_len, mips_reinsert_addr)
11660 (mips_breakpoint_at): New.
11661 (the_low_target): Add new members.
11662 * linux-ppc-low.c (ppc_get_pc, ppc_set_pc)
11663 (ppc_breakpoint, ppc_breakpoint_len, ppc_breakpoint_at): New.
11664 (the_low_target): Add new members.
11665 * linux-sh-low.c (sh_get_pc, sh_set_pc)
11666 (sh_breakpoint, sh_breakpoint_len, sh_breakpoint_at): New.
11667 (the_low_target): Add new members.
11668 * linux-x86-64-low.c (target_regsets): Add new kind
11669 identifier.
11670
116712002-05-15 Daniel Jacobowitz <drow@mvista.com>
11672
11673 From Martin Pool <mbp@samba.org>:
11674 * server.c (gdbserver_usage): New function.
11675 (main): Call it.
11676
116772002-05-14 Daniel Jacobowitz <drow@mvista.com>
11678
11679 * mem-break.c (reinsert_breakpoint_by_bp): Correct typo
11680 stop_at -> stop_pc.
11681
116822002-05-04 Andrew Cagney <ac131313@redhat.com>
11683
11684 * Makefile.in: Remove obsolete code.
11685
116862002-04-24 Michal Ludvig <mludvig@suse.cz>
11687
11688 * linux-low.c (regsets_fetch_inferior_registers),
11689 (regsets_store_inferior_registers): Removed cast to int from
11690 ptrace() calls.
11691 * regcache.h: Added declaration of struct inferior_info.
11692
116932002-04-20 Daniel Jacobowitz <drow@mvista.com>
11694
11695 * inferiors.c (struct inferior_info): Add regcache_data.
11696 (add_inferior): Call create_register_cache.
11697 (clear_inferiors): Call free_register_cache.
11698 (inferior_regcache_data, set_inferior_regcache_data): New functions.
11699 * regcache.c (struct inferior_regcache_data): New.
11700 (registers): Remove.
11701 (get_regcache): New function.
11702 (create_register_cache, free_register_cache): New functions.
11703 (set_register_cache): Don't initialize the register cache here.
11704 (registers_to_string, registers_from_string, register_data): Call
11705 get_regcache.
11706 * regcache.h: Add prototypes.
11707 * server.h: Likewise.
11708
117092002-04-20 Daniel Jacobowitz <drow@mvista.com>
11710
11711 * mem-break.c: New file.
11712 * mem-break.h: New file.
11713 * Makefile.in: Add mem-break.o rule; update server.h
11714 dependencies.
11715 * inferiors.c (struct inferior_info): Add target_data
11716 member.
11717 (clear_inferiors): Free target_data member if set.
11718 (inferior_target_data, set_inferior_target_data): New functions.
11719 * linux-i386-low.c (i386_breakpoint, i386_breakpoint_len)
11720 (i386_stop_pc, i386_set_pc): New. Add to the_low_target.
11721 * linux-low.c (linux_bp_reinsert): New variable.
11722 (struct inferior_linux_data): New.
11723 (linux_create_inferior): Use set_inferior_target_data.
11724 (linux_attach): Likewise. Call add_inferior.
11725 (linux_wait_for_one_inferior): New function.
11726 (linux_wait): Call it.
11727 (linux_write_memory): Add const.
11728 (initialize_low): Call set_breakpoint_data.
11729 * linux-low.h (struct linux_target_ops): Add breakpoint
11730 handling members.
11731 * server.c (attach_inferior): Remove extra add_inferior
11732 call.
11733 * server.h: Include mem-break.h. Update inferior.c
11734 prototypes.
11735 * target.c (read_inferior_memory)
11736 (write_inferior_memory): New functions.
11737 * target.h (read_inferior_memory)
11738 (write_inferior_memory): Change macros to prototypes.
11739 (struct target_ops): Update comments. Add const to write_memory
11740 definition.
11741
117422002-04-11 Daniel Jacobowitz <drow@mvista.com>
11743
11744 * linux-low.c (usr_store_inferior_registers): Support
11745 registers which are allowed to fail to store.
11746 * linux-low.h (linux_target_ops): Likewise.
11747 * linux-ppc-low.c (ppc_regmap): Support FPSCR.
11748 (ppc_cannot_store_register): FPSCR may not be storable.
11749
117502002-04-09 Daniel Jacobowitz <drow@mvista.com>
11751
11752 * server.h: Include <string.h> if HAVE_STRING_H.
11753 * ChangeLog: Correct paths in last ChangeLog entry.
11754
117552002-04-09 Daniel Jacobowitz <drow@mvista.com>
11756
11757 * linux-low.h: Remove obsolete prototypes.
11758 (struct linux_target_ops): New.
11759 (extern the_low_target): New.
11760 * linux-low.c (num_regs, regmap): Remove declarations.
11761 (register_addr): Use the_low_target explicitly.
11762 (fetch_register): Likewise.
11763 (usr_fetch_inferior_registers): Likewise.
11764 (usr_store_inferior_registers): Likewise.
11765 * linux-arm-low.c (num_regs): Remove.
11766 (arm_num_regs): Define.
11767 (arm_regmap): Renamed from regmap, made static.
11768 (arm_cannot_fetch_register): Renamed from cannot_fetch_register,
11769 made static.
11770 (arm_cannot_store_register): Renamed from cannot_store_register,
11771 made static.
11772 (the_low_target): New.
11773 * linux-i386-low.c (num_regs): Remove.
11774 (i386_num_regs): Define.
11775 (i386_regmap): Renamed from regmap, made static.
11776 (i386_cannot_fetch_register): Renamed from cannot_fetch_register,
11777 made static.
11778 (i386_cannot_store_register): Renamed from cannot_store_register,
11779 made static.
11780 (the_low_target): New.
11781 * linux-ia64-low.c (num_regs): Remove.
11782 (ia64_num_regs): Define.
11783 (ia64_regmap): Renamed from regmap, made static.
11784 (ia64_cannot_fetch_register): Renamed from cannot_fetch_register,
11785 made static.
11786 (ia64_cannot_store_register): Renamed from cannot_store_register,
11787 made static.
11788 (the_low_target): New.
11789 * linux-m68k-low.c (num_regs): Remove.
11790 (m68k_num_regs): Define.
11791 (m68k_regmap): Renamed from regmap, made static.
11792 (m68k_cannot_fetch_register): Renamed from cannot_fetch_register,
11793 made static.
11794 (m68k_cannot_store_register): Renamed from cannot_store_register,
11795 made static.
11796 (the_low_target): New.
11797 * linux-mips-low.c (num_regs): Remove.
11798 (mips_num_regs): Define.
11799 (mips_regmap): Renamed from regmap, made static.
11800 (mips_cannot_fetch_register): Renamed from cannot_fetch_register,
11801 made static.
11802 (mips_cannot_store_register): Renamed from cannot_store_register,
11803 made static.
11804 (the_low_target): New.
11805 * linux-ppc-low.c (num_regs): Remove.
11806 (ppc_num_regs): Define.
11807 (ppc_regmap): Renamed from regmap, made static.
11808 (ppc_cannot_fetch_register): Renamed from cannot_fetch_register,
11809 made static.
11810 (ppc_cannot_store_register): Renamed from cannot_store_register,
11811 made static.
11812 (the_low_target): New.
11813 * linux-s390-low.c (num_regs): Remove.
11814 (s390_num_regs): Define.
11815 (s390_regmap): Renamed from regmap, made static.
11816 (s390_cannot_fetch_register): Renamed from cannot_fetch_register,
11817 made static.
11818 (s390_cannot_store_register): Renamed from cannot_store_register,
11819 made static.
11820 (the_low_target): New.
11821 * linux-sh-low.c (num_regs): Remove.
11822 (sh_num_regs): Define.
11823 (sh_regmap): Renamed from regmap, made static.
11824 (sh_cannot_fetch_register): Renamed from cannot_fetch_register,
11825 made static.
11826 (sh_cannot_store_register): Renamed from cannot_store_register,
11827 made static.
11828 (the_low_target): New.
11829 * linux-x86-64-low.c (x86_64_regmap): Renamed from regmap.
11830 (the_low_target): New.
11831
118322002-04-09 Daniel Jacobowitz <drow@mvista.com>
11833
11834 * Makefile.in: Add stamp-h target.
11835 * configure.in: Create stamp-h.
11836 * configure: Regenerated.
11837
118382002-04-09 Daniel Jacobowitz <drow@mvista.com>
11839
11840 * inferiors.c: New file.
11841 * target.c: New file.
11842 * target.h: New file.
11843 * Makefile.in: Add target.o and inferiors.o. Update
11844 dependencies.
11845 * linux-low.c (inferior_pid): New static variable,
11846 moved from server.c.
11847 (linux_create_inferior): Renamed from create_inferior.
11848 Call add_inferior. Return 0 on success instead of a PID.
11849 (linux_attach): Renamed from myattach.
11850 (linux_kill): Renamed from kill_inferior. Call clear_inferiors ().
11851 (linux_thread_alive): Renamed from mythread_alive.
11852 (linux_wait): Renamed from mywait. Call clear_inferiors () if the
11853 child dies.
11854 (linux_resume): Renamed from myresume. Add missing ``return 0''.
11855 (regsets_store_inferior_registers): Correct error message.
11856 Add missing ``return 0''.
11857 (linux_fetch_registers): Renamed from fetch_inferior_registers.
11858 (linux_store_registers): Renamed from store_inferior_registers.
11859 (linux_read_memory): Renamed from read_inferior_memory.
11860 (linux_write_memory): Renamed from write_inferior_memory.
11861 (linux_target_ops): New structure.
11862 (initialize_low): Call set_target_ops ().
11863 * remote-utils.c (unhexify): New function.
11864 (hexify): New function.
11865 (input_interrupt): Send signals to ``signal_pid''.
11866 * server.c (inferior_pid): Remove.
11867 (start_inferior): Update create_inferior call.
11868 (attach_inferior): Call add_inferior.
11869 (handle_query): New function.
11870 (main): Call handle_query for `q' packets.
11871 * server.h: Include "target.h". Remove obsolete prototypes.
11872 Add prototypes for "inferiors.c", "target.c", hexify, and unhexify.
11873
118742002-04-09 Daniel Jacobowitz <drow@mvista.com>
11875
11876 * Makefile.in: Add WARN_CFLAGS. Update configury
11877 dependencies.
11878 * configure.in: Check for <string.h>
11879 * configure: Regenerate.
11880 * config.in: Regenerate.
11881 * gdbreplay.c: Include needed system headers.
11882 (remote_open): Remove strchr prototype.
11883 * linux-low.h: Correct #ifdef to HAVE_LINUX_USRREGS.
11884 * regcache.c (supply_register): Change buf argument to const void *.
11885 (supply_register_by_name): Likewise.
11886 (collect_register): Change buf argument to void *.
11887 (collect_register_by_name): Likewise.
11888 * regcache.h: Add missing prototypes.
11889 * remote-utils.c: Include <arpa/inet.h> for inet_ntoa.
11890 * server.c (handle_query): New function.
11891 (attached): New static variable, moved out of main.
11892 (main): Quiet longjmp clobber warnings.
11893 * server.h: Add ATTR_NORETURN and ATTR_FORMAT. Update prototypes.
11894 * utils.c (error): Remove NORETURN.
11895 (fatal): Likewise.
This page took 2.070525 seconds and 4 git commands to generate.