Use phex debug_reg_change_callback
[deliverable/binutils-gdb.git] / gdb / gdbserver / ChangeLog
CommitLineData
0d51c8d7
YQ
12015-08-25 Yao Qi <yao.qi@linaro.org>
2
3 * linux-aarch64-low.c (debug_reg_change_callback): Use phex.
4
31a43dd5
YQ
52015-08-25 Yao Qi <yao.qi@linaro.org>
6
7 * linux-aarch64-low.c (debug_reg_change_callback): Remove comments.
8
8ee52567
YQ
92015-08-25 Yao Qi <yao.qi@linaro.org>
10
11 * linux-aarch64-low.c (debug_reg_change_callback): Re-indent
12 the code.
13
ff3f0f45
YQ
142015-08-25 Yao Qi <yao.qi@linaro.org>
15
16 * linux-aarch64-low.c (aarch64_dr_update_callback_param) <pid>:
17 Remove.
18 (debug_reg_change_callback): Remove argument entry and add argument
19 lwp. Remove local variable thread. Don't print thread id in the
20 debugging output. Don't check whether pid of thread equals to pid.
21 (aarch64_notify_debug_reg_change): Don't set param.pid. Call
22 iterate_over_lwps instead find_inferior.
23
3d40fbb5
PA
242015-08-24 Pedro Alves <palves@redhat.com>
25
26 * inferiors.c (get_first_process): New function.
27 * inferiors.h (get_first_process): New declaration.
28 * remote-utils.c (read_ptid): Default to the first process in the
29 list, instead of to the current thread's process.
30
438e1e42
PA
312015-08-24 Pedro Alves <palves@redhat.com>
32
33 * debug.c: Include gdb_sys_time.h instead of sys/time.h.
34 * event-loop.c: Likewise.
35 * remote-utils.c: Likewise.
36 * tracepoint.c: Likewise.
37
a8c6d4fc
PA
382015-08-24 Pedro Alves <palves@redhat.com>
39
40 * spu-low.c (spu_request_interrupt): Use lwpid_of instead of
41 ptid_get_lwp.
42
99b0bb12
PA
432015-08-21 Pedro Alves <palves@redhat.com>
44
45 * ax.c (gdb_eval_agent_expr): Return expr_eval_unhandled_opcode
46 instead of literal 1.
47
f8904751
PA
482015-08-21 Pedro Alves <palves@redhat.com>
49
50 * tdesc.c (default_description): Explicitly zero-initialize.
51
465a859e
PA
522015-08-21 Pedro Alves <palves@redhat.com>
53
54 PR gdb/18749
55 * inferiors.c (remove_thread): Discard any pending stop reply for
56 this thread.
57 * server.c (remove_all_on_match_pid): Rename to ...
58 (remove_all_on_match_ptid): ... this. Work with a filter ptid
59 instead of a pid.
60 (discard_queued_stop_replies): Change parameter to a ptid. Now
61 extern.
62 (handle_v_kill, kill_inferior_callback, captured_main)
63 (process_serial_event): Adjust.
64 * server.h (discard_queued_stop_replies): Declare.
65
f0db101d
PA
662015-08-21 Pedro Alves <palves@redhat.com>
67
68 * linux-low.c (wait_for_sigstop): Always switch to no thread
69 selected if the previously current thread dies.
70 * lynx-low.c (lynx_request_interrupt): Use the first thread's
71 process instead of the current thread's.
72 * remote-utils.c (input_interrupt): Don't check if there's no
73 current thread.
74 * server.c (gdb_read_memory, gdb_write_memory): If setting the
75 current thread to the general thread fails, error out.
76 (handle_qxfer_auxv, handle_qxfer_libraries)
77 (handle_qxfer_libraries_svr4, handle_qxfer_siginfo)
78 (handle_qxfer_spu, handle_qxfer_statictrace, handle_qxfer_fdpic)
79 (handle_query): Check if there's a thread selected instead of
80 checking whether there's any thread in the thread list.
81 (handle_qxfer_threads, handle_qxfer_btrace)
82 (handle_qxfer_btrace_conf): Don't error out early if there's no
83 thread in the thread list.
84 (handle_v_cont, myresume): Don't set the current thread to the
85 continue thread.
86 (process_serial_event) <Hg handling>: Also set thread_id if the
87 previous general thread is still alive.
88 (process_serial_event) <g/G handling>: If setting the current
89 thread to the general thread fails, error out.
90 * spu-low.c (spu_resume, spu_request_interrupt): Use the first
91 thread's lwp instead of the current thread's.
92 * target.c (set_desired_thread): If the desired thread was not
93 found, leave the current thread pointing to NULL. Return an int
94 (boolean) indicating success.
95 * target.h (set_desired_thread): Change return type to int.
96
40045d91
MF
972015-08-20 Max Filippov <jcmvbkbc@gmail.com>
98
99 * configure.srv (xtensa*-*-linux*): Add srv_linux_thread_db=yes.
100 * linux-xtensa-low.c (arch/xtensa.h gdb_proc_service.h): New
101 #includes.
102 (ps_get_thread_area): New function.
103
45face3b
GB
1042015-08-19 Gary Benson <gbenson@redhat.com>
105
106 * hostio.c (handle_pread): Do not attempt to read more data
107 than hostio_reply_with_data can fit in a packet.
108
16d5f642
JB
1092015-08-18 Joel Brobecker <brobecker@adacore.com>
110
111 * linux-aarch32-low.c (NT_ARM_VFP): Define if not already defined.
112
a738da3a
MF
1132015-08-14 Matthew Fortune <matthew.fortune@imgtec.com>
114
115 * linux-low.c (get_r_debug): Handle DT_MIPS_RLD_MAP_REL.
116
33ebda9d
PA
1172015-08-06 Pedro Alves <palves@redhat.com>
118
119 * tracepoint.c (expr_eval_result): Now an int.
120
a44892be
PA
1212015-08-06 Pedro Alves <palves@redhat.com>
122
123 * gdbthread.h (struct regcache): Forward declare.
124 (struct thread_info) <regcache_data>: Now a struct regcache
125 pointer.
126 * inferiors.c (inferior_regcache_data)
127 (set_inferior_regcache_data): Now work with struct regcache
128 pointers.
129 * inferiors.h (struct regcache): Forward declare.
130 (inferior_regcache_data, set_inferior_regcache_data): Now work
131 with struct regcache pointers.
132 * regcache.c (get_thread_regcache, regcache_invalidate_thread)
133 (free_register_cache_thread): Remove struct regcache pointer
134 casts.
135
608a1e46
PA
1362015-08-06 Pedro Alves <palves@redhat.com>
137
138 * server.c (captured_main): On error, print the exception message
139 to stderr, and if run_once is set, throw a quit.
140
f0ce0d3a
PA
1412015-08-06 Pedro Alves <palves@redhat.com>
142
143 * linux-low.c (move_out_of_jump_pad_callback): Temporarily switch
144 the current thread.
145
bf47e248
PA
1462015-08-06 Pedro Alves <palves@redhat.com>
147
148 * linux-low.c (linux_write_memory): Rewrite debug output to avoid
149 reading beyond the passed in buffer length.
150
b6b9ffcc
PL
1512015-08-06 Pierre Langlois <pierre.langlois@arm.com>
152
153 * tracepoint.c (symbol_list) <required>: Remove.
154
863d01bd
PA
1552015-08-06 Pedro Alves <palves@redhat.com>
156
157 * linux-low.c (handle_extended_wait): Set the fork child's suspend
158 count if stopping and suspending threads.
159 (check_stopped_by_breakpoint): If stopped by trace, set the LWP's
160 stop reason to TARGET_STOPPED_BY_SINGLE_STEP.
161 (linux_detach): Complete an ongoing step-over.
162 (lwp_suspended_inc, lwp_suspended_decr): New functions. Use
163 throughout.
164 (resume_stopped_resumed_lwps): Don't resume a suspended thread.
165 (linux_wait_1): If passing a signal to the inferior after
166 finishing a step-over, unsuspend and re-resume all lwps. If we
167 see a single-step event but the thread should be continuing, don't
168 pass the trap to gdb.
169 (stuck_in_jump_pad_callback, move_out_of_jump_pad_callback): Use
170 internal_error instead of gdb_assert.
171 (enqueue_pending_signal): New function.
172 (check_ptrace_stopped_lwp_gone): Add debug output.
173 (start_step_over): Use internal_error instead of gdb_assert.
174 (complete_ongoing_step_over): New function.
175 (linux_resume_one_thread): Don't resume a suspended thread.
176 (proceed_one_lwp): If the LWP is stepping over a breakpoint, reset
177 it stepping.
178
00db26fa
PA
1792015-08-06 Pedro Alves <palves@redhat.com>
180
181 * linux-low.c (add_lwp): Set waitstatus to TARGET_WAITKIND_IGNORE.
182 (linux_thread_alive): Use lwp_is_marked_dead.
183 (extended_event_reported): Delete.
184 (linux_wait_1): Check if waitstatus is TARGET_WAITKIND_IGNORE
185 instead of extended_event_reported.
186 (mark_lwp_dead): Don't set the 'dead' flag. Store the waitstatus
187 as well.
188 (lwp_is_marked_dead): New function.
189 (lwp_running): Use lwp_is_marked_dead.
190 * linux-low.h: Delete 'dead' field, and update 'waitstatus's
191 comment.
192
ad071a30
PA
1932015-08-06 Pedro Alves <palves@redhat.com>
194
195 * linux-low.c (linux_wait_1): Move fork event output out of the
196 !report_to_gdb check. Pass event_child->waitstatus to
197 target_waitstatus_to_string instead of ourstatus.
198
524b57e6
YQ
1992015-08-04 Yao Qi <yao.qi@linaro.org>
200
201 * linux-aarch64-low.c (aarch64_supports_tracepoints): Return 0
202 if current_thread is 32 bit.
203
6085d6f6
YQ
2042015-08-04 Yao Qi <yao.qi@linaro.org>
205
206 * linux-aarch64-low.c (aarch64_supports_z_point_type): Return
207 0 for Z_PACKET_SW_BP if it may be used in multi-arch debugging.
208 * server.c (extended_protocol): Remove "static".
209 * server.h (extended_protocol): Declare it.
210
8a7e4587
YQ
2112015-08-04 Yao Qi <yao.qi@linaro.org>
212
213 * linux-aarch64-low.c (aarch64_get_pc): Get PC register on
214 both aarch64 and aarch32.
215 (aarch64_set_pc): Likewise.
216
3b53ae99
YQ
2172015-08-04 Yao Qi <yao.qi@linaro.org>
218
219 * configure.srv (case aarch64*-*-linux*): Append arm-with-neon.o
220 to srv_regobj and append arm-core.xml arm-vfpv3.xml and
221 arm-with-neon.xml to srv_xmlfiles.
222 * linux-aarch64-low.c: Include linux-aarch32-low.h.
223 (is_64bit_tdesc): New function.
224 (aarch64_linux_read_description): New function.
225 (aarch64_arch_setup): Call aarch64_linux_read_description.
226 (regs_info): Rename to regs_info_aarch64.
227 (aarch64_regs_info): Return right regs_info.
228 (initialize_low_arch): Call initialize_low_arch_aarch32.
229
bd9e6534
YQ
2302015-08-04 Yao Qi <yao.qi@linaro.org>
231
232 * configure.srv (srv_tgtobj): Add linux-aarch32-low.o.
233 * linux-aarch32-low.c: New file.
234 * linux-aarch32-low.h: New file.
235 * linux-arm-low.c (arm_fill_gregset): Move it to
236 linux-aarch32-low.c.
237 (arm_store_gregset): Likewise.
238 (arm_fill_vfpregset): Call arm_fill_vfpregset_num
239 (arm_store_vfpregset): Call arm_store_vfpregset_num.
240 (arm_arch_setup): Check if PTRACE_GETREGSET works.
241 (regs_info): Rename to regs_info_arm.
242 (arm_regs_info): Return regs_info_aarch32 if
243 have_ptrace_getregset is 1 and target description is
244 arm_with_neon or arm_with_vfpv3.
245 (initialize_low_arch): Don't call init_registers_arm_with_neon.
246 Call initialize_low_arch_aarch32 instead.
247
ded48a5e
YQ
2482015-08-04 Yao Qi <yao.qi@linaro.org>
249
250 * linux-x86-low.c (have_ptrace_getregset): Move it to ...
251 * linux-low.c: ... here.
252 * linux-low.h (have_ptrace_getregset): Declare it.
253
96e9210f
PA
2542015-08-04 Pedro Alves <palves@redhat.com>
255
256 * thread-db.c (struct thread_db): Use new typedefs.
257 (try_thread_db_load_1): Define local TDB_DLSYM macro and use it in
258 CHK calls.
259 (disable_thread_event_reporting): Cast result of dlsym to
260 destination function pointer type.
261 (thread_db_mourn): Use td_ta_delete_ftype.
262
af60a1ef
SL
2632015-08-03 Sandra Loosemore <sandra@codesourcery.com>
264
265 * linux-nios2-low.c (NIOS2_BREAKPOINT): Conditionalize for
266 arch variant.
267 (CDX_BREAKPOINT): Define for R2.
268 (nios2_breakpoint_at): Check for CDX_BREAKPOINT when R2.
269 (the_low_target): Add comments.
270
e8b41681
YQ
2712015-07-30 Yao Qi <yao.qi@linaro.org>
272
273 * linux-arm-low.c (arm_hwcap): Remove it.
274 (arm_read_description): New local variable arm_hwcap. Don't
275 set arm_hwcap to zero.
276
89abb039
YQ
2772015-07-30 Yao Qi <yao.qi@linaro.org>
278
279 * linux-arm-low.c (arm_fill_wmmxregset): Don't use arm_hwcap.
280 Use regcache->tdesc instead.
281 (arm_store_wmmxregset): Likewise.
282 (arm_fill_vfpregset): Likewise.
283 (arm_store_vfpregset): Likewise.
284
deca266c
YQ
2852015-07-30 Yao Qi <yao.qi@linaro.org>
286
287 * linux-arm-low.c: Include arch/arm.h.
288 (arm_fill_gregset): Don't use arm_num_regs and arm_regmap.
289 (arm_store_gregset): Likewise.
290
aa58a496
SM
2912015-07-29 Simon Marchi <simon.marchi@ericsson.com>
292
293 * linux-mips-low.c (mips_linux_prepare_to_resume): Add NULL as
294 ptrace's 4th parameter.
295
50904b25
YQ
2962015-07-27 Yao Qi <yao.qi@linaro.org>
297
298 * configure.srv (case aarch64*-*-linux*): Don't set
299 srv_linux_usrregs.
300
5826e159
PA
3012015-07-24 Pedro Alves <palves@redhat.c: Likewise.om>
302
303 * linux-aarch64-low.c: Include nat/gdb_ptrace.h instead of
304 sys/ptrace.h.
305 * linux-arm-low.c: Likewise.
306 * linux-cris-low.c: Likewise.
307 * linux-crisv32-low.c: Likewise.
308 * linux-low.c: Likewise.
309 * linux-m68k-low.c: Likewise.
310 * linux-mips-low.c: Likewise.
311 * linux-nios2-low.c: Likewise.
312 * linux-s390-low.c: Likewise.
313 * linux-sparc-low.c: Likewise.
314 * linux-tic6x-low.c: Likewise.
315 * linux-tile-low.c: Likewise.
316 * linux-x86-low.c: Likewise.
317
54019719
PA
3182015-07-24 Pedro Alves <palves@redhat.com>
319
320 * config.in: Regenerate.
321 * configure: Regenerate.
322
eb7aa561
PA
3232015-07-24 Pedro Alves <palves@redhat.com>
324
325 * acinclude.m4: Include ../ptrace.m4.
326 * configure.ac: Call GDB_AC_PTRACE.
327 * config.in, configure: Regenerate.
328
55d7b841
YQ
3292015-07-24 Yao Qi <yao.qi@linaro.org>
330
331 * linux-low.c (linux_create_inferior): Remove setting to
332 proc->priv->new_inferior.
333 (linux_attach): Likewise.
334 (linux_low_filter_event): Likewise.
335 * linux-low.h (struct process_info_private) <new_inferior>: Remove.
336
c06cbd92
YQ
3372015-07-24 Yao Qi <yao.qi@linaro.org>
338
339 * linux-low.c (linux_arch_setup): New function.
340 (linux_low_filter_event): If proc->tdesc is NULL and
341 proc->attached is true, call the_low_target.arch_setup.
342 Otherwise, keep status pending, and return.
343 (linux_resume_one_lwp_throw): Don't call get_pc if
344 thread->while_stepping isn't NULL. Don't call
345 get_thread_regcache if proc->tdesc is NULL.
346 (need_step_over_p): Return 0 if proc->tdesc is NULL.
347 (linux_target_ops): Install arch_setup.
348 * server.c (start_inferior): Call the_target->arch_setup.
349 * target.h (struct target_ops) <arch_setup>: New field.
350 (target_arch_setup): New marco.
351 * lynx-low.c (lynx_target_ops): Update.
352 * nto-low.c (nto_target_ops): Update.
353 * spu-low.c (spu_target_ops): Update.
354 * win32-low.c (win32_target_ops): Update.
355
5ae3ebba
YQ
3562015-07-24 Yao Qi <yao.qi@linaro.org>
357
358 * linux-low.c (linux_add_process): Don't set
359 proc->priv->new_inferior.
360 (linux_create_inferior): Set proc->priv->new_inferior to 1.
361 (linux_attach): Likewise.
362
eb97750b
YQ
3632015-07-24 Yao Qi <yao.qi@linaro.org>
364
365 * server.c (start_inferior): Code refactor.
366
51aee833
YQ
3672015-07-24 Yao Qi <yao.qi@linaro.org>
368
369 * server.c (process_serial_event): Set general_thread.
370
af1b22f3
YQ
3712015-07-21 Yao Qi <yao.qi@linaro.org>
372
373 * linux-aarch64-low.c (aarch64_arch_setup): Remove code and call
374 aarch64_linux_get_debug_reg_capacity.
375
554717a3
YQ
3762015-07-17 Yao Qi <yao.qi@linaro.org>
377
378 * Makefile.in (aarch64-linux-hw-point.o): New rule.
379 * configure.srv (srv_tgtobj): Append aarch64-linux-hw-point.o.
380 * linux-aarch64-low.c: Include nat/aarch64-linux-hw-point.h.
381 (AARCH64_HBP_MAX_NUM): Move to nat/aarch64-linux-hw-point.h.
382 (AARCH64_HWP_MAX_NUM, AARCH64_HBP_ALIGNMENT): Likewise.
383 (AARCH64_HWP_ALIGNMENT): Likewise.
384 (AARCH64_HWP_MAX_LEN_PER_REG): Likewise.
385 (AARCH64_DEBUG_NUM_SLOTS, AARCH64_DEBUG_ARCH): Likewise.
386 (aarch64_num_bp_regs, aarch64_num_wp_regs): Likewise.
387 (AARCH64_DEBUG_ARCH_V8, DR_MARK_ALL_CHANGED): Likewise.
388 (DR_MARK_N_CHANGED, DR_CLEAR_CHANGED): Likewise.
389 (DR_HAS_CHANGED, DR_N_HAS_CHANGE): Likewise.
390 (struct aarch64_debug_reg_state): Likewise.
391 (struct arch_lwp_info): Likewise.
392 (aarch64_align_watchpoint): Likewise.
393 (DR_CONTROL_ENABLED, DR_CONTROL_LENGTH): Likewise.
394 (aarch64_watchpoint_length): Likewise.
395 (aarch64_point_encode_ctrl_reg): Likewise
396 (aarch64_point_is_aligned): Likewise.
397 (aarch64_align_watchpoint): Likewise.
398 (aarch64_linux_set_debug_regs):
399 (aarch64_dr_state_insert_one_point): Likewise.
400 (aarch64_dr_state_remove_one_point): Likewise.
401 (aarch64_handle_breakpoint): Likewise.
402 (aarch64_handle_aligned_watchpoint): Likewise.
403 (aarch64_handle_unaligned_watchpoint): Likewise.
404 (aarch64_handle_watchpoint): Likewise.
405
c67ca4de
YQ
4062015-07-17 Yao Qi <yao.qi@linaro.org>
407
408 * linux-aarch64-low.c (aarch64_handle_breakpoint): Add argument state
409 and don't aarch64_get_debug_reg_state. All callers update.
410 (aarch64_handle_aligned_watchpoint): Likewise.
411 (aarch64_handle_unaligned_watchpoint): Likewise.
412 (aarch64_handle_watchpoint): Likewise.
413 (aarch64_insert_point): Call aarch64_get_debug_reg_state earlier.
414 (aarch64_remove_point): Likewise.
415
25abf979
YQ
4162015-07-17 Yao Qi <yao.qi@linaro.org>
417
418 * linux-aarch64-low.c (aarch64_show_debug_reg_state): Use
419 debug_printf.
420 (aarch64_handle_unaligned_watchpoint): Likewise.
421
db1ff28b
JK
4222015-07-15 Jan Kratochvil <jan.kratochvil@redhat.com>
423
424 Revert the previous 3 commits:
425 Move gdb_regex* to common/
426 Move linux_find_memory_regions_full & co.
427 gdbserver build-id attribute generator
428
700ca40f
JK
4292015-07-15 Aleksandar Ristovski <aristovski@qnx.com
430 Jan Kratochvil <jan.kratochvil@redhat.com>
431
432 gdbserver build-id attribute generator.
433 * linux-low.c (nat/linux-maps.h, search.h, rsp-low.h): Include.
434 (ElfXX_Ehdr, ElfXX_Phdr, ElfXX_Nhdr): New.
435 (ELFXX_FLD, ELFXX_SIZEOF, ELFXX_ROUNDUP, BUILD_ID_INVALID): New.
436 (find_phdr): New.
437 (get_dynamic): Use find_pdhr to traverse program headers.
438 (struct mapping_entry, mapping_entry_s, free_mapping_entry_vec)
439 (compare_mapping_entry_range, struct find_memory_region_callback_data)
440 (read_build_id, find_memory_region_callback, lrfind_mapping_entry)
441 (get_hex_build_id): New.
442 (linux_qxfer_libraries_svr4): Add optional build-id attribute
443 to reply XML document.
444
9904185c
JK
4452015-07-15 Aleksandar Ristovski <aristovski@qnx.com
446 Jan Kratochvil <jan.kratochvil@redhat.com>
447
448 * target.c: Include target/target-utils.h and fcntl.h.
449 (target_fileio_read_stralloc_1_pread, target_fileio_read_stralloc_1)
450 (target_fileio_read_stralloc): New functions.
451
6e5b4429
JK
4522015-07-15 Jan Kratochvil <jan.kratochvil@redhat.com>
453
454 * Makefile.in (OBS): Add gdb_regex.o.
455 (gdb_regex.o): New.
456 * config.in: Rebuilt.
457 * configure: Rebuilt.
458
ddc98fbf
JK
4592015-07-15 Aleksandar Ristovski <aristovski@qnx.com
460 Jan Kratochvil <jan.kratochvil@redhat.com>
461
462 Create empty nat/linux-maps.[ch] and common/target-utils.[ch].
463 * Makefile.in (OBS): Add target-utils.o.
464 (linux-maps.o, target-utils.o): New.
465 * configure.srv (srv_linux_obj): Add linux-maps.o.
466
e57bb7a0
PL
4672015-07-15 Pierre Langlois <pierre.langlois@arm.com>
468
469 * linux-aarch64-low.c (aarch64_supports_range_stepping): New
470 function, return 1.
471 (the_low_target): Install it.
472
586b02a9
PA
4732015-07-14 Pedro Alves <palves@redhat.com>
474
475 * linux-low.c (kill_wait_lwp): Don't assert if waitpid fails.
476 Instead, ignore ECHILD, and throw an error for other errnos.
477
58c1b36c
PA
4782015-07-10 Pedro Alves <palves@redhat.com>
479
480 * event-loop.c (struct callback_event) <data>: Change type to
481 gdb_client_data instance instead of gdb_client_data pointer.
482 (append_callback_event): Adjust.
483
421530db
PL
4842015-07-10 Pierre Langlois <pierre.langlois@arm.com>
485
486 * linux-aarch64-low.c: Add comments for each linux_target_ops
487 method. Remove comments already covered in target_ops and
488 linux_target_ops definitions.
489 (the_low_target): Add comments for each unimplemented method.
490
c2d65f38
YQ
4912015-07-09 Yao Qi <yao.qi@linaro.org>
492
493 * linux-aarch64-low.c (aarch64_regmap): Remove.
494 (aarch64_usrregs_info): Remove.
495 (regs_info): Set field usrregs to NULL.
496
b20a6524
MM
4972015-07-02 Markus Metzger <markus.t.metzger@intel.com>
498
499 * linux-low.c: Include "rsp-low.h"
500 (linux_low_encode_pt_config, linux_low_encode_raw): New.
501 (linux_low_read_btrace): Support BTRACE_FORMAT_PT.
502 (linux_low_btrace_conf): Support BTRACE_FORMAT_PT.
503 (handle_btrace_enable_pt): New.
504 (handle_btrace_general_set): Support "pt".
505 (handle_btrace_conf_general_set): Support "pt:size".
506
96c97461
PL
5072015-06-29 Pierre Langlois <pierre.langlois@arm.com>
508
509 * linux-aarch64-low.c (aarch64_supports_z_point_type): Enable for
510 Z_PACKET_SW_BP.
511
37d66942
PL
5122015-06-29 Pierre Langlois <pierre.langlois@arm.com>
513
514 * linux-aarch64-low.c: Remove comment about endianness.
515 (aarch64_breakpoint): Change type to gdb_byte[]. Set to "brk #0".
516 (aarch64_breakpoint_at): Change type of insn to gdb_byte[]. Use
517 memcmp.
518
dc06243f
GB
5192015-06-24 Gary Benson <gbenson@redhat.com>
520
521 * linux-i386-ipa.c (stdint.h): Do not include.
522 * lynx-i386-low.c (stdint.h): Likewise.
523 * lynx-ppc-low.c (stdint.h): Likewise.
524 * mem-break.c (stdint.h): Likewise.
525 * thread-db.c (stdint.h): Likewise.
526 * tracepoint.c (stdint.h): Likewise.
527 * win32-low.c (stdint.h): Likewise.
528
124e13d9
SM
5292015-06-18 Simon Marchi <simon.marchi@ericsson.com>
530
531 * server.c (write_qxfer_response): Update call to
532 remote_escape_output.
533
909c2cda
JK
5342015-06-15 Aleksandar Ristovski <aristovski@qnx.com
535 Jan Kratochvil <jan.kratochvil@redhat.com>
536
537 Merge multiple hex conversions.
538 * gdbreplay.c (tohex): Rename to 'fromhex'.
539 (logchar): Use fromhex.
540
24c05f46
JK
5412015-06-10 Jan Kratochvil <jan.kratochvil@redhat.com>
542
543 * server.c (handle_qxfer_libraries): Set `version' attribute for
544 <library-list>.
545
14d2069a
GB
5462015-06-10 Gary Benson <gbenson@redhat.com>
547
548 * target.h (struct target_ops) <multifs_open>: New field.
549 <multifs_unlink>: Likewise.
550 <multifs_readlink>: Likewise.
551 * linux-low.c (nat/linux-namespaces.h): New include.
552 (linux_target_ops): Initialize the_target->multifs_open,
553 the_target->multifs_unlink and the_target->multifs_readlink.
554 * hostio.h (hostio_handle_new_gdb_connection): New declaration.
555 * hostio.c (hostio_fs_pid): New static variable.
556 (hostio_handle_new_gdb_connection): New function.
557 (handle_setfs): Likewise.
558 (handle_open): Use the_target->multifs_open as appropriate.
559 (handle_unlink): Use the_target->multifs_unlink as appropriate.
560 (handle_readlink): Use the_target->multifs_readlink as
561 appropriate.
562 (handle_vFile): Handle vFile:setfs packets.
563 * server.c (handle_query): Call hostio_handle_new_gdb_connection
564 after target_handle_new_gdb_connection.
565
4b8b5e72
GB
5662015-06-10 Gary Benson <gbenson@redhat.com>
567
568 * configure.ac (AC_CHECK_FUNCS): Add setns.
569 * config.in: Regenerate.
570 * configure: Likewise.
571 * Makefile.in (SFILES): Add nat/linux-namespaces.c.
572 (linux-namespaces.o): New rule.
573 * configure.srv (srv_linux_obj): Add linux-namespaces.o.
574
3ac2e371
GB
5752015-06-09 Gary Benson <gbenson@redhat.com>
576
577 * hostio.c (handle_open): Process mode argument with
578 fileio_to_host_mode.
579
ca9b78ce
YQ
5802015-06-01 Yao Qi <yao.qi@linaro.org>
581
582 * linux-s390-low.c (PTRACE_GETREGSET, PTRACE_SETREGSET): Remove.
583 * linux-x86-low.c: Likewise.
584
bfacd19d
DB
5852015-05-28 Don Breazeal <donb@codesourcery.com>
586
587 * linux-low.c (handle_extended_wait): Initialize
588 thread_info.last_resume_kind for new fork children.
589
452003ef
PA
5902015-05-15 Pedro Alves <palves@redhat.com>
591
592 * target.h (target_handle_new_gdb_connection): Rewrite using if
593 wrapped in do/while.
594
1041a03c
JB
5952015-05-14 Joel Brobecker <brobecker@adacore.com>
596
597 * configure.ac: Add prfpregset_t BFD_HAVE_SYS_PROCFS_TYPE check.
598 * configure, config.in: Regenerate.
599 * gdb_proc_service.h [HAVE_PRFPREGSET_T] (prfpregset_t):
600 Declare typedef.
601
c269dbdb
DB
6022015-05-12 Don Breazeal <donb@codesourcery.com>
603
604 * linux-low.c (handle_extended_wait): Handle PTRACE_EVENT_FORK and
605 PTRACE_EVENT_VFORK_DONE.
606 (linux_low_ptrace_options, extended_event_reported): Add vfork
607 events.
608 * remote-utils.c (prepare_resume_reply): New stop reasons "vfork"
609 and "vforkdone" for RSP 'T' Stop Reply Packet.
610 * server.h (report_vfork_events): Declare
611 global variable.
612
3a8a0396
DB
6132015-05-12 Don Breazeal <donb@codesourcery.com>
614
615 * linux-aarch64-low.c (aarch64_linux_new_fork): New function.
616 (the_low_target) <new_fork>: Initialize new member.
617 * linux-arm-low.c (arm_new_fork): New function.
618 (the_low_target) <new_fork>: Initialize new member.
619 * linux-low.c (handle_extended_wait): Call new target function
620 new_fork.
621 * linux-low.h (struct linux_target_ops) <new_fork>: New member.
622 * linux-mips-low.c (mips_add_watchpoint): New function
623 extracted from mips_insert_point.
624 (the_low_target) <new_fork>: Initialize new member.
625 (mips_linux_new_fork): New function.
626 (mips_insert_point): Call mips_add_watchpoint.
627 * linux-x86-low.c (x86_linux_new_fork): New function.
628 (the_low_target) <new_fork>: Initialize new member.
629
de0d863e
DB
6302015-05-12 Don Breazeal <donb@codesourcery.com>
631
632 * linux-low.c (handle_extended_wait): Implement return value,
633 rename argument 'event_child' to 'event_lwp', handle
634 PTRACE_EVENT_FORK, call internal_error for unrecognized event.
635 (linux_low_ptrace_options): New function.
636 (linux_low_filter_event): Call linux_low_ptrace_options,
637 use different argument fo linux_enable_event_reporting,
638 use return value from handle_extended_wait.
639 (extended_event_reported): New function.
640 (linux_wait_1): Call extended_event_reported and set
641 status to report fork events.
642 (linux_write_memory): Add pid to debug message.
643 (reset_lwp_ptrace_options_callback): New function.
644 (linux_handle_new_gdb_connection): New function.
645 (linux_target_ops): Initialize new structure member.
646 * linux-low.h (struct lwp_info) <waitstatus>: New member.
647 * lynx-low.c: Initialize new structure member.
648 * remote-utils.c (prepare_resume_reply): Implement stop reason
649 "fork" for "T" stop message.
650 * server.c (handle_query): Call handle_new_gdb_connection.
651 * server.h (report_fork_events): Declare global flag.
652 * target.h (struct target_ops) <handle_new_gdb_connection>:
653 New member.
654 (target_handle_new_gdb_connection): New macro.
655 * win32-low.c: Initialize new structure member.
656
ddcbc397
DB
6572015-05-12 Don Breazeal <donb@codesourcery.com>
658
659 * mem-break.c (APPEND_TO_LIST): Define macro.
660 (clone_agent_expr): New function.
661 (clone_one_breakpoint): New function.
662 (clone_all_breakpoints): New function.
663 * mem-break.h: Declare new functions.
664
89245bc0
DB
6652015-05-12 Don Breazeal <donb@codesourcery.com>
666
667 * linux-low.c (linux_supports_fork_events): New function.
668 (linux_supports_vfork_events): New function.
669 (linux_target_ops): Initialize new structure members.
670 (initialize_low): Call linux_check_ptrace_features.
671 * lynx-low.c (lynx_target_ops): Initialize new structure
672 members.
673 * server.c (report_fork_events, report_vfork_events):
674 New global flags.
675 (handle_query): Add new features to qSupported packet and
676 response.
677 (captured_main): Initialize new global variables.
678 * target.h (struct target_ops) <supports_fork_events>:
679 New member.
680 <supports_vfork_events>: New member.
681 (target_supports_fork_events): New macro.
682 (target_supports_vfork_events): New macro.
683 * win32-low.c (win32_target_ops): Initialize new structure
684 members.
685
835205d0
GB
6862015-05-12 Gary Benson <gbenson@redhat.com>
687
688 * server.c (handle_qxfer_exec_file): Use current process
689 if annex is empty.
690
21e94bd9
SL
6912015-05-08 Sandra Loosemore <sandra@codesourcery.com>
692
693 * linux-nios2-low.c: Include elf/common.h. Adjust comments.
694 Remove HAVE_PTRACE_GETREGS conditionals.
695 (nios2_regsets): Use PTRACE_GETREGSET and PTRACE_SETREGSET
696 instead of PTRACE_GETREGS and PTRACE_SETREGS.
697
45614f15
YQ
6982015-05-08 Yao Qi <yao.qi@linaro.org>
699
700 * linux-low.c (linux_supports_conditional_breakpoints): New
701 function.
702 (linux_target_ops): Install new target method.
703 * lynx-low.c (lynx_target_ops): Install NULL hook for
704 supports_conditional_breakpoints.
705 * nto-low.c (nto_target_ops): Likewise.
706 * spu-low.c (spu_target_ops): Likewise.
707 * win32-low.c (win32_target_ops): Likewise.
708 * server.c (handle_query): Check
709 target_supports_conditional_breakpoints.
710 * target.h (struct target_ops) <supports_conditional_breakpoints>:
711 New field.
712 (target_supports_conditional_breakpoints): New macro.
713
80ad801e
PA
7142015-05-06 Pedro Alves <palves@redhat.com>
715
716 PR server/18081
717 * server.c (start_inferior): If the process exits, mourn it.
718
819843c7
GB
7192015-04-21 Gary Benson <gbenson@redhat.com>
720
721 * hostio.c (fileio_open_flags_to_host): Factored out to
722 fileio_to_host_openflags in common/fileio.c. Single use
723 updated.
724
a2d5a9d7
MF
7252015-04-17 Max Filippov <jcmvbkbc@gmail.com>
726
727 * linux-xtensa-low.c (xtensa_fill_gregset)
728 (xtensa_store_gregset): Check XCHAL_HAVE_LOOPS instead of
729 XCHAL_HAVE_LOOP.
730
deb44829
MF
7312015-04-17 Max Filippov <jcmvbkbc@gmail.com>
732
733 * linux-xtensa-low.c (xtensa_usrregs_info): Remove.
734 (regs_info): Replace usrregs pointer with NULL.
735
e57f1de3
GB
7362015-04-17 Gary Benson <gbenson@redhat.com>
737
738 * target.h (struct target_ops) <pid_to_exec_file>: New field.
739 * linux-low.c (linux_target_ops): Initialize pid_to_exec_file.
740 * server.c (handle_qxfer_exec_file): New function.
741 (qxfer_packets): Add exec-file entry.
742 (handle_query): Report qXfer:exec-file:read as supported packet.
743
62828379
RN
7442015-04-14 Romain Naour <romain.naour@openwide.fr> (tiny change)
745
746 * linux-low.c (linux_read_offsets): Remove get_thread_lwp.
747
b88bb450
GB
7482015-04-09 Gary Benson <gbenson@redhat.com>
749
750 * hostio-errno.c (errno_to_fileio_error): Remove function.
751 Update caller to use remote_fileio_to_fio_error.
752
c8f4bfdd
YQ
7532015-04-09 Yao Qi <yao.qi@linaro.org>
754
755 * linux-low.c (linux_insert_point): Call
756 insert_memory_breakpoint if TYPE is raw_bkpt_type_sw.
757 (linux_remove_point): Call remove_memory_breakpoint if type is
758 raw_bkpt_type_sw.
759 * linux-x86-low.c (x86_insert_point): Don't call
760 insert_memory_breakpoint.
761 (x86_remove_point): Don't call remove_memory_breakpoint.
762
41f98f02
PA
7632015-04-01 Pedro Alves <palves@redhat.com>
764 Cleber Rosa <crosa@redhat.com>
765
766 * server.c (gdbserver_usage): Reorganize and extend the usage
767 message.
768
2bf6fb9d
PA
7692015-03-24 Pedro Alves <palves@redhat.com>
770
771 * linux-low.c (check_stopped_by_breakpoint): Tweak debug log
772 output. Also dump TRAP_TRACE.
773 (linux_low_filter_event): In debug output, distinguish a
774 resume_stop SIGSTOP from a delayed SIGSTOP.
775
369f6daa
GB
7762015-03-24 Gary Benson <gbenson@redhat.com>
777
778 * linux-x86-low.c (x86_linux_new_thread): Moved to
779 nat/x86-linux.c.
780 (x86_linux_prepare_to_resume): Likewise.
781
8e5d4070
GB
7822015-03-24 Gary Benson <gbenson@redhat.com>
783
784 * Makefile.in (x86-linux-dregs.o): New rule.
785 * configure.srv: Add x86-linux-dregs.o to relevant targets.
786 * linux-x86-low.c: Include nat/x86-linux-dregs.h.
787 (u_debugreg_offset): Moved to nat/x86-linux-dregs.c.
788 (x86_linux_dr_get): Likewise.
789 (x86_linux_dr_set): Likewise.
790 (update_debug_registers_callback): Likewise.
791 (x86_linux_dr_set_addr): Likewise.
792 (x86_linux_dr_get_addr): Likewise.
793 (x86_linux_dr_set_control): Likewise.
794 (x86_linux_dr_get_control): Likewise.
795 (x86_linux_dr_get_status): Likewise.
796 (x86_linux_update_debug_registers): Likewise.
797
2b95d440
GB
7982015-03-24 Gary Benson <gbenson@redhat.com>
799
800 * linux-x86-low.c (x86_linux_update_debug_registers):
801 New function, factored out from...
802 (x86_linux_prepare_to_resume): ...this.
803
14b0bc68
GB
8042015-03-24 Gary Benson <gbenson@redhat.com>
805
806 * linux-x86-low.c (x86_linux_dr_get): Update comments.
807 (x86_linux_dr_set): Likewise.
808 (update_debug_registers_callback): Likewise.
809 (x86_linux_dr_set_addr): Likewise.
810 (x86_linux_dr_get_addr): Likewise.
811 (x86_linux_dr_set_control): Likewise.
812 (x86_linux_dr_get_control): Likewise.
813 (x86_linux_dr_get_status): Likewise.
814 (x86_linux_prepare_to_resume): Likewise.
815
5dfe6ca8
GB
8162015-03-24 Gary Benson <gbenson@redhat.com>
817
818 * linux-x86-low.c (x86_linux_dr_get): Add assertion.
819 Use perror_with_name. Pass string through gettext.
820 (x86_linux_dr_set): Likewise.
821
d33472ad
GB
8222015-03-24 Gary Benson <gbenson@redhat.com>
823
824 * linux-x86-low.c (x86_dr_low_set_addr): Rename to...
825 (x86_linux_dr_set_addr): ...this.
826 (x86_dr_low_get_addr): Rename to...
827 (x86_linux_dr_get_addr): ...this.
828 (x86_dr_low_set_control): Rename to...
829 (x86_linux_dr_set_control): ...this.
830 (x86_dr_low_get_control): Rename to...
831 (x86_linux_dr_get_control): ...this.
832 (x86_dr_low_get_status): Rename to...
833 (x86_linux_dr_get_status): ...this.
834 (x86_dr_low): Update with new function names.
835
4b134ca1
GB
8362015-03-24 Gary Benson <gbenson@redhat.com>
837
838 * Makefile.in (x86-linux.o): New rule.
839 * configure.srv: Add x86-linux.o to relevant targets.
840 * linux-low.c (lwp_set_arch_private_info): New function.
841 (lwp_arch_private_info): Likewise.
842 * linux-x86-low.c: Include nat/x86-linux.h.
843 (arch_lwp_info): Removed structure.
844 (update_debug_registers_callback):
845 Use lwp_set_debug_registers_changed.
846 (x86_linux_prepare_to_resume): Use lwp_debug_registers_changed
847 and lwp_set_debug_registers_changed.
848 (x86_linux_new_thread): Use lwp_set_debug_registers_changed.
849
34c703da
GB
8502015-03-24 Gary Benson <gbenson@redhat.com>
851
852 * linux-low.h (linux_target_ops) <new_thread>: Changed signature.
853 * linux-arm-low.c (arm_new_thread): Likewise.
854 * linux-aarch64-low.c (aarch64_linux_new_thread): Likewise.
855 * linux-mips-low.c (mips_linux_new_thread): Likewise.
856 * linux-x86-low.c (x86_linux_new_thread): Likewise.
857 * linux-low.c (add_lwp): Update the_low_target.new_thread call.
858
cff068da
GB
8592015-03-24 Gary Benson <gbenson@redhat.com>
860
861 * linux-low.c (ptid_of_lwp): New function.
862 (lwp_is_stopped): Likewise.
863 (lwp_stop_reason): Likewise.
864 * linux-x86-low.c (update_debug_registers_callback):
865 Use lwp_is_stopped.
866 (x86_linux_prepare_to_resume): Use ptid_of_lwp and
867 lwp_stop_reason.
868
b2f7c7e8
GB
8692015-03-24 Gary Benson <gbenson@redhat.com>
870
871 * linux-low.h (linux_stop_lwp): Remove declaration.
872
6d4ee8c6
GB
8732015-03-24 Gary Benson <gbenson@redhat.com>
874
875 * linux-low.h: Include nat/linux-nat.h.
876 * linux-low.c (iterate_over_lwps_args): New structure.
877 (iterate_over_lwps_filter): New function.
878 (iterate_over_lwps): Likewise.
879 * linux-x86-low.c (update_debug_registers_callback):
880 Update signature to what iterate_over_lwps expects.
881 Remove PID check that iterate_over_lwps now performs.
882 (x86_dr_low_set_addr): Use iterate_over_lwps.
883 (x86_dr_low_set_control): Likewise.
884
70a0bb6b
GB
8852015-03-24 Gary Benson <gbenson@redhat.com>
886
887 * linux-x86-low.c (x86_debug_reg_state): New function.
888 (x86_linux_prepare_to_resume): Use the above.
889
7b669087
GB
8902015-03-24 Gary Benson <gbenson@redhat.com>
891
892 * linux-low.c (current_lwp_ptid): New function.
893 * linux-x86-low.c: Include nat/linux-nat.h.
894 (x86_dr_low_get_addr): Use current_lwp_ptid.
895 (x86_dr_low_get_control): Likewise.
896 (x86_dr_low_get_status): Likewise.
897
eef49a3d
PA
8982015-03-20 Pedro Alves <palves@redhat.com>
899
900 * tracepoint.c (cmd_qtstatus): Make "str" const.
901
b2333d22
PA
9022015-03-20 Pedro Alves <palves@redhat.com>
903
904 * server.c (handle_general_set): Make "req_str" const.
905
23f238d3
PA
9062015-03-19 Pedro Alves <palves@redhat.com>
907
908 * linux-low.c (linux_resume_one_lwp): Rename to ...
909 (linux_resume_one_lwp_throw): ... this. Don't handle ESRCH here,
910 instead call perror_with_name.
911 (check_ptrace_stopped_lwp_gone): New function.
912 (linux_resume_one_lwp): Reimplement as wrapper around
913 linux_resume_one_lwp_throw that swallows errors if the LWP is
914 gone.
915
91baf43f
PA
9162015-03-19 Pedro Alves <palves@redhat.com>
917
918 * linux-low.c (count_events_callback, select_event_lwp_callback):
919 No longer check whether the thread has resume_stop as last resume
920 kind.
921
8bf3b159
PA
9222015-03-19 Pedro Alves <palves@redhat.com>
923
924 * linux-low.c (count_events_callback, select_event_lwp_callback):
925 Use the lwp's status_pending_p field, not the thread's.
926
b90fc188
PA
9272015-03-19 Pedro Alves <palves@redhat.com>
928
929 * linux-low.c (select_event_lwp_callback): Update comments to
930 no longer mention SIGTRAP.
931
464b0089
GB
9322015-03-18 Gary Benson <gbenson@redhat.com>
933
934 * server.c (handle_query): Do not report vFile:fstat as supported.
935
aa9e327f
GB
9362015-03-11 Gary Benson <gbenson@redhat.com>
937
938 * hostio.c (sys/types.h): New include.
939 (sys/stat.h): Likewise.
940 (common-remote-fileio.h): Likewise.
941 (handle_fstat): New function.
942 (handle_vFile): Handle vFile:fstat packets.
aa9e327f 943
791c0056
GB
9442015-03-11 Gary Benson <gbenson@redhat.com>
945
946 * configure.ac (AC_CHECK_MEMBERS): Add checks for
947 struct stat.st_blocks and struct stat.st_blksize.
948 * configure: Regenerate.
949 * config.in: Likewise.
950 * Makefile.in (SFILES): Add common/common-remote-fileio.c.
951 (OBS): Add common-remote-fileio.o.
952 (common-remote-fileio.o): New rule.
953
9a9df970
PA
9542015-03-09 Pedro Alves <palves@redhat.com>
955
956 * tracepoint.c (gdb_agent_helper_thread): Cast '&sockaddr' to
957 'struct sockaddr' pointer in 'accept' call.
958
9eb1356e
PA
9592015-03-09 Pedro Alves <palves@redhat.com>
960
961 Revert:
962 2015-03-07 Pedro Alves <palves@redhat.com>
963 * gdbreplay.c: No longer include <netinet/in.h>, <sys/socket.h>,
964 or <winsock2.h> here. Instead include "gdb_socket.h".
965 (remote_open): Use union gdb_sockaddr_u.
966 * remote-utils.c: No longer include <netinet/in.h>, <sys/socket.h>
967 or <winsock2.h> here. Instead include "gdb_socket.h".
968 (handle_accept_event, remote_prepare): Use union gdb_sockaddr_u.
969 * tracepoint.c: Include "gdb_socket.h" instead of <sys/socket.h>
970 or <sys/un.h>.
971 (init_named_socket, gdb_agent_helper_thread): Use union
972 gdb_sockaddr_u.
973
aac331e4
PA
9742015-03-07 Pedro Alves <palves@redhat.com>
975
976 * configure.ac (build_warnings): Move
977 -Wdeclaration-after-statement to the C-specific set.
978 * configure: Regenerate.
979
366c75fc
PA
9802015-03-07 Pedro Alves <palves@redhat.com>
981
982 * gdbreplay.c: No longer include <netinet/in.h>, <sys/socket.h>,
983 or <winsock2.h> here. Instead include "gdb_socket.h".
984 (remote_open): Use union gdb_sockaddr_u.
985 * remote-utils.c: No longer include <netinet/in.h>, <sys/socket.h>
986 or <winsock2.h> here. Instead include "gdb_socket.h".
987 (handle_accept_event, remote_prepare): Use union gdb_sockaddr_u.
988 * tracepoint.c: Include "gdb_socket.h" instead of <sys/socket.h>
989 or <sys/un.h>.
990 (init_named_socket, gdb_agent_helper_thread): Use union
991 gdb_sockaddr_u.
992
492d29ea
PA
9932015-03-07 Pedro Alves <palves@redhat.com>
994
995 Adjust all callers of TRY_CATCH to use TRY/CATCH/END_CATCH
996 instead.
997
60a191ed
YQ
9982015-03-06 Yao Qi <yao.qi@linaro.org>
999
1000 * linux-aarch64-low.c (aarch64_insert_point): Use
1001 show_debug_regs as a boolean.
1002 (aarch64_remove_point): Likewise.
1003
f5771b1d
PA
10042015-03-05 Pedro Alves <palves@redhat.com>
1005
1006 * lynx-low.c (lynx_target_ops): Install NULL hooks for
1007 stopped_by_sw_breakpoint, supports_stopped_by_sw_breakpoint,
1008 stopped_by_hw_breakpoint, supports_stopped_by_hw_breakpoint.
1009 * nto-low.c (nto_target_ops): Likewise.
1010 * spu-low.c (spu_target_ops): Likewise.
1011 * win32-low.c (win32_target_ops): Likewise.
1012
3e572f71
PA
10132015-03-04 Pedro Alves <palves@redhat.com>
1014
72f4393d 1015 * linux-low.c (check_stopped_by_breakpoint) [USE_SIGTRAP_SIGINFO]:
3e572f71
PA
1016 Decide whether a breakpoint triggered based on the SIGTRAP's
1017 siginfo.si_code.
72f4393d
L
1018 (thread_still_has_status_pending_p) [USE_SIGTRAP_SIGINFO]: Don't check whether a
1019 breakpoint is inserted if relying on SIGTRAP's siginfo.si_code.
3e572f71
PA
1020 (linux_low_filter_event): Check for breakpoints before checking
1021 watchpoints.
1022 (linux_wait_1): Don't re-increment the PC if relying on SIGTRAP's
1023 siginfo.si_code.
72f4393d
L
1024 (linux_stopped_by_sw_breakpoint)
1025 (linux_supports_stopped_by_sw_breakpoint)
1026 (linux_stopped_by_hw_breakpoint)
1027 (linux_supports_stopped_by_hw_breakpoint): New functions.
1028 (linux_target_ops): Install new target methods.
3e572f71 1029
1ec68e26
PA
10302015-03-04 Pedro Alves <palves@redhat.com>
1031
1032 * remote-utils.c (prepare_resume_reply): Report swbreak/hbreak.
1033 * server.c (swbreak_feature, hwbreak_feature): New globals.
1034 (handle_query) <qSupported>: Handle "swbreak+" and "hwbreak+".
1035 (captured_main): Clear swbreak_feature and hwbreak_feature.
1036 * server.h (swbreak_feature, hwbreak_feature): Declare.
1037 * target.h (struct target_ops) <stopped_by_sw_breakpoint,
1038 supports_stopped_by_sw_breakpoint, stopped_by_hw_breakpoint,
1039 supports_stopped_by_hw_breakpoint>: New fields.
1040 (target_supports_stopped_by_sw_breakpoint)
1041 (target_stopped_by_sw_breakpoint)
1042 (target_supports_stopped_by_hw_breakpoint)
1043 (target_stopped_by_hw_breakpoint): Declare.
1044
15c66dd6
PA
10452015-03-04 Pedro Alves <palves@redhat.com>
1046
1047 enum lwp_stop_reason -> enum target_stop_reason
1048 * linux-low.c (check_stopped_by_breakpoint): Adjust.
1049 (thread_still_has_status_pending_p, check_stopped_by_watchpoint)
1050 (linux_wait_1, stuck_in_jump_pad_callback)
1051 (move_out_of_jump_pad_callback, linux_resume_one_lwp)
1052 (linux_stopped_by_watchpoint):
1053 * linux-low.h (enum lwp_stop_reason): Delete.
1054 (struct lwp_info) <stop_reason>: Now an enum target_stop_reason.
1055 * linux-x86-low.c (x86_linux_prepare_to_resume): Adjust.
1056
98fc70d6
YQ
10572015-03-04 Yao Qi <yao.qi@linaro.org>
1058
1059 * Makefile.in (SFILES): Add linux-aarch64-low.c.
1060
dd2ac174
GB
10612015-03-03 Gary Benson <gbenson@redhat.com>
1062
1063 * hostio.c (handle_vFile): Fix prefix lengths.
1064
d68e53f4
MM
10652015-03-03 Markus Metzger <markus.t.metzger@intel.com>
1066
1067 * linux-low.c (linux_low_enable_btrace): Do not overwrite non-zero
1068 ptr_bits.
1069
bf2d68ab
AA
10702015-03-02 Andreas Arnez <arnez@linux.vnet.ibm.com>
1071
1072 * Makefile.in (s390-vx-linux64.c, s390-tevx-linux64.c)
1073 (s390x-vx-linux64.c, s390x-tevx-linux64.c): New rules.
1074 (clean): Add "rm -f" for above C files.
1075 * configure.srv (srv_regobj): Add s390-vx-linux64.o,
1076 s390-tevx-linux64.o, s390x-vx-linux64.o, and s390x-tevx-linux64.o.
1077 (srv_xmlfiles): Add s390-vx-linux64.xml, s390-tevx-linux64.xml,
1078 s390x-vx-linux64.xml, s390x-tevx-linux64.xml, and s390-vx.xml.
1079 * linux-s390-low.c (HWCAP_S390_VX): New macro.
1080 (init_registers_s390_vx_linux64, init_registers_s390_tevx_linux64)
1081 (init_registers_s390x_vx_linux64)
1082 (init_registers_s390x_tevx_linux64)
1083 (tdesc_s390_vx_linux64, tdesc_s390_tevx_linux64)
1084 (tdesc_s390x_vx_linux64, tdesc_s390x_tevx_linux64): New extern
1085 declarations.
1086 (s390_fill_vxrs_low, s390_store_vxrs_low, s390_fill_vxrs_high)
1087 (s390_store_vxrs_high): New functions.
1088 (s390_regsets): Add entries for NT_S390_VXRS_LOW and
1089 NT_S390_VXRS_HIGH.
1090 (s390_arch_setup): Add logic for selecting one of the new target
1091 descriptions. Activate the new vector regsets if applicable.
1092 (initialize_low_arch): Also invoke init_registers_s390_vx_linux64,
1093 init_registers_s390_tevx_linux64, init_registers_s390x_vx_linux64,
1094 and init_registers_s390x_tevx_linux64.
1095
c966a859
PA
10962015-03-01 Pedro Alves <palves@redhat.com>
1097
1098 * linux-i386-ipa.c (gdb_agent_get_raw_reg): Constify 'raw_regs'
1099 parameter.
1100
4180215b
PA
11012015-02-27 Pedro Alves <palves@redhat.com>
1102
1103 * linux-x86-low.c (u_debugreg_offset): New function.
1104 (x86_linux_dr_get, x86_linux_dr_set): Use it.
1105
749bab01
PA
11062015-02-27 Pedro Alves <palves@redhat.com>
1107
1108 * gdb_proc_service.h: Wrap with EXTERN_C_PUSH/EXTERN_C_POP.
1109 [!HAVE_PROC_SERVICE_H] (struct ps_prochandle): Forward declare.
1110 [!HAVE_PROC_SERVICE_H] (ps_pdread, ps_pdwrite, ps_ptread)
1111 ps_ptwrite, ps_lgetregs, ps_lsetregs, ps_lgetfpregs)
1112 (ps_lsetfpregs, ps_getpid)
1113 (ps_get_thread_area, ps_pglobal_lookup, ps_pstop, ps_pcontinue)
1114 (ps_lstop, ps_lcontinue, ps_lgetxregsize, ps_lgetxregs)
1115 (ps_lsetxregs, ps_plog): Declare.
1116
3c14e5a3
PA
11172015-02-27 Pedro Alves <palves@redhat.com>
1118
1119 * linux-amd64-ipa.c (gdb_agent_get_raw_reg): Use
1120 IP_AGENT_EXPORT_FUNC.
1121 * linux-i386-ipa.c (gdb_agent_get_raw_reg): Use
1122 IP_AGENT_EXPORT_FUNC.
1123 * tracepoint.c (ATTR_USED, ATTR_NOINLINE, ATTR_CONSTRUCTOR)
1124 (IP_AGENT_EXPORT): Delete.
1125 (gdb_tp_heap_buffer, gdb_jump_pad_buffer, gdb_jump_pad_buffer_end)
1126 (gdb_trampoline_buffer, gdb_trampoline_buffer_end)
1127 (gdb_trampoline_buffer_error, collecting, gdb_collect)
1128 (stop_tracing, flush_trace_buffer, about_to_request_buffer_space)
1129 (trace_buffer_is_full, stopping_tracepoint, expr_eval_result)
1130 (error_tracepoint, tracepoints, tracing, trace_buffer_ctrl)
1131 (trace_buffer_ctrl_curr, trace_buffer_lo, trace_buffer_hi)
1132 (traceframe_read_count, traceframe_write_count)
1133 (traceframes_created, trace_state_variables, get_raw_reg)
1134 (get_trace_state_variable_value, set_trace_state_variable_value)
1135 (ust_loaded, helper_thread_id, cmd_buf): Use
1136 IPA_SYM_EXPORTED_NAME.
1137 (stop_tracing, flush_trace_buffer): Use IP_AGENT_EXPORT_FUNC.
1138 (tracepoints) Use IP_AGENT_EXPORT_VAR.
1139 (stopping_tracepoint, trace_buffer_is_full, expr_eval_result): Use
1140 IP_AGENT_EXPORT_VAR and wrap in EXTERN_C_PUSH/EXTERN_C_POP.
1141 (last_tracepoint): Move into !IN_PROCESS_AGENT block.
1142 (error_tracepoint): Use IP_AGENT_EXPORT_VAR and wrap in
1143 EXTERN_C_PUSH/EXTERN_C_POP.
1144 (trace_state_variables): Use IP_AGENT_EXPORT_VAR.
1145 (trace_buffer_lo, trace_buffer_hi): Use IP_AGENT_EXPORT_VAR and
1146 wrap in EXTERN_C_PUSH/EXTERN_C_POP.
1147 (trace_buffer_ctrl, trace_buffer_ctrl_curr)
1148 (traceframe_write_count, traceframe_read_count)
1149 (traceframes_created, tracing): Use IP_AGENT_EXPORT_VAR.
1150 (about_to_request_buffer_space, get_trace_state_variable_value)
1151 (set_trace_state_variable_value): Use IP_AGENT_EXPORT_FUNC.
1152 (collecting): Use IP_AGENT_EXPORT_VAR and wrap in
1153 EXTERN_C_PUSH/EXTERN_C_POP.
1154 (gdb_collect): Use IP_AGENT_EXPORT_FUNC.
1155 (ust_loaded, cmd_buf): Use IP_AGENT_EXPORT_VAR.
1156 (helper_thread_id, gdb_agent_capability): Use IP_AGENT_EXPORT_VAR
1157 and wrap in EXTERN_C_PUSH/EXTERN_C_POP.
1158 (gdb_tp_heap_buffer, gdb_jump_pad_buffer, gdb_jump_pad_buffer_end)
1159 (gdb_trampoline_buffer, gdb_trampoline_buffer_end)
1160 (gdb_trampoline_buffer_error): Use IP_AGENT_EXPORT_VAR.
1161 * tracepoint.h (ATTR_USED, ATTR_NOINLINE, EXPORTED_SYMBOL):
1162 Define.
1163 (IP_AGENT_EXPORT_FUNC, IP_AGENT_EXPORT_VAR)
1164 (IP_AGENT_EXPORT_VAR_DECL): Define.
1165 (tracing): Declare.
1166 (gdb_agent_get_raw_reg): Declare.
1167
fe978cb0
PA
11682015-02-27 Tom Tromey <tromey@redhat.com>
1169 Pedro Alves <palves@redhat.com>
1170
1171 Rename symbols whose names are reserved C++ keywords throughout.
1172
3bc3d82a
PA
11732015-02-27 Pedro Alves <palves@redhat.com>
1174
1175 * Makefile.in (COMPILER): New, get it from autoconf.
1176 (CXX): Get from autoconf instead.
1177 (COMPILE.pre): Use COMPILER.
1178 (CC-LD): Rename to ...
1179 (CC_LD): ... this. Use COMPILER.
1180 (gdbserver$(EXEEXT), gdbreplay$(EXEEXT), $(IPA_LIB)): Adjust.
1181 (CXX_FOR_TARGET): Default to g++ instead of gcc.
1182 * acinclude.m4: Include build-with-cxx.m4.
1183 * configure.ac: Call AC_PROG_CXX and GDB_AC_BUILD_WITH_CXX.
1184 Disable -Werror by default if building in C++ mode.
1185 (build_warnings): Add -Wno-sign-compare, -Wno-write-strings and
1186 -Wno-narrowing in C++ mode. Run supported-warning-flags tests with
1187 the C++ compiler. Save/restore CXXFLAGS too.
1188 * configure: Regenerate.
1189
07697489
PA
11902015-02-27 Pedro Alves <palves@redhat.com>
1191
1192 * acinclude.m4: Include libiberty.m4.
1193 * configure.ac: Call libiberty_INIT.
1194 * config.in, configure: Regenerate.
1195
9beb7c4e
PA
11962015-02-26 Pedro Alves <palves@redhat.com>
1197
1198 * linux-low.c (linux_wait_1): When incrementing the PC past a
1199 program breakpoint always use the_low_target.breakpoint_len as
1200 increment, rather than the maximum between that and
1201 the_low_target.decr_pc_after_break.
1202
8090aef2
PA
12032015-02-23 Pedro Alves <palves@redhat.com>
1204
1205 * linux-low.c (check_stopped_by_breakpoint): Don't check if the
1206 thread was doing a step-over; always adjust the PC if
1207 we stepped over a permanent breakpoint.
1208 (linux_wait_1): If we stepped over breakpoint that was on top of a
1209 permanent breakpoint, manually advance the PC past it.
1210
bc9540e8
PA
12112015-02-23 Pedro Alves <palves@redhat.com>
1212
1213 * linux-x86-low.c (REGSIZE): Define in both 32-bit and 64-bit
1214 modes.
1215 (x86_fill_gregset, x86_store_gregset): Use it when handling
1216 $orig_eax.
1217
2db9a427
PA
12182015-02-20 Pedro Alves <palves@redhat.com>
1219
1220 * thread-db.c: Include "nat/linux-procfs.h".
1221 (thread_db_init): Skip listing new threads if the kernel supports
1222 PTRACE_EVENT_CLONE and /proc/PID/task/ is accessible.
1223
afa8d396
PA
12242015-02-20 Pedro Alves <palves@redhat.com>
1225
1226 * linux-low.c (status_pending_p_callback): Use ptid_match.
1227
c9587f88
AT
12282015-02-19 Antoine Tremblay <antoine.tremblay@ericsson.com>
1229
1230 PR breakpoints/16812
1231 * linux-low.c (wstatus_maybe_breakpoint): Remove.
1232 (linux_low_filter_event): Update wstatus_maybe_breakpoint name.
1233 (linux_wait_1): Report SIGTRAP,SIGILL,SIGSEGV.
1234
b05ec7a5
AT
12352015-02-10 Antoine Tremblay <antoine.tremblay@ericsson.com>
1236
1237 PR breakpoints/15956
1238 * tracepoint.c (cmd_qtinit): Add check for current_thread.
1239
d33501a5
MM
12402015-02-09 Markus Metzger <markus.t.metzger@intel.com>
1241
1242 * linux-low.c (linux_low_btrace_conf): Print size.
1243 * server.c (handle_btrace_conf_general_set): New.
1244 (hanle_general_set): Call handle_btrace_conf_general_set.
1245 (handle_query): Report Qbtrace-conf:bts:size as supported.
1246
f4abbc16
MM
12472015-02-09 Markus Metzger <markus.t.metzger@intel.com>
1248
1249 * linux-low.c (linux_low_enable_btrace): Update parameters.
1250 (linux_low_btrace_conf): New.
1251 (linux_target_ops)<to_btrace_conf>: Initialize.
1252 * server.c (current_btrace_conf): New.
1253 (handle_btrace_enable): Rename to ...
1254 (handle_btrace_enable_bts): ... this. Pass &current_btrace_conf
1255 to target_enable_btrace. Update comment. Update users.
1256 (handle_qxfer_btrace_conf): New.
1257 (qxfer_packets): Add btrace-conf entry.
1258 (handle_query): Report qXfer:btrace-conf:read as supported packet.
1259 * target.h (target_ops)<enable_btrace>: Update parameters and comment.
1260 (target_ops)<read_btrace_conf>: New.
1261 (target_enable_btrace): Update parameters.
1262 (target_read_btrace_conf): New.
1263
043c3577
MM
12642015-02-09 Markus Metzger <markus.t.metzger@intel.com>
1265
1266 * server.c (handle_btrace_general_set): Remove call to
1267 target_supports_btrace.
1268 (supported_btrace_packets): New.
1269 (handle_query): Call supported_btrace_packets.
1270 * target.h: include btrace-common.h.
1271 (btrace_target_info): Removed.
1272 (supports_btrace, target_supports_btrace): Update parameters.
1273
734b0e4b
MM
12742015-02-09 Markus Metzger <markus.t.metzger@intel.com>
1275
1276 * Makefile.in (SFILES): Add common/btrace-common.c.
1277 (OBS): Add common/btrace-common.o.
1278 (btrace-common.o): Add build rules.
1279 * linux-low: Include btrace-common.h.
1280 (linux_low_read_btrace): Use struct btrace_data. Call
1281 btrace_data_init and btrace_data_fini.
1282
d6c146e9
PA
12832015-02-06 Pedro Alves <palves@redhat.com>
1284
1285 * thread-db.c (find_new_threads_callback): Add debug output.
1286
20ba1ce6
PA
12872015-02-04 Pedro Alves <palves@redhat.com>
1288
1289 * linux-low.c (handle_extended_wait): Don't resume LWPs here.
1290 (resume_stopped_resumed_lwps): New function.
1291 (linux_wait_for_event_filtered): Use it.
1292
8cc73a39
SDJ
12932015-01-15 Sergio Durigan Junior <sergiodj@redhat.com>
1294
1295 * Makefile.in (SFILES): Add linux-personality.c.
1296 (linux-personality.o): New rule.
1297 * configure.srv (srv_linux_obj): Add linux-personality.o to the
1298 list of objects to be built.
1299 * linux-low.c: Include nat/linux-personality.h.
1300 (linux_create_inferior): Remove code to disable address space
1301 randomization (moved to ../nat/linux-personality.c). Create
1302 cleanup to disable address space randomization.
1303
fb23d554
SDJ
13042015-01-15 Sergio Durigan Junior <sergiodj@redhat.com>
1305
1306 * Makefile.in (posix-strerror.o): New rule.
1307 (mingw-strerror.o): Likewise.
1308 * configure: Regenerated.
1309 * configure.ac: Source file ../common/common.host. Initialize new
1310 variable srv_host_obs. Add srv_host_obs to GDBSERVER_DEPFILES.
1311
cdf43629
YQ
13122015-01-14 Yao Qi <yao@codesourcery.com>
1313
1314 * Makefile.in (SFILES): Add nat/ppc-linux.c.
1315 (ppc-linux.o): New rule.
1316 * configure.srv (powerpc*-*-linux*): Add ppc-linux.o.
1317 * configure.ac: AC_CHECK_FUNCS(getauxval).
1318 * config.in: Re-generated.
1319 * configure: Re-generated.
1320 * linux-ppc-low.c (ppc_arch_setup) [__powerpc64__]: Call
1321 ppc64_64bit_inferior_p
1322
514c5338
YQ
13232015-01-14 Yao Qi <yao@codesourcery.com>
1324
1325 * linux-ppc-low.c: Include "nat/ppc-linux.h".
1326 (PPC_FEATURE_HAS_VSX): Move to nat/ppc-linux.h.
1327 (PPC_FEATURE_HAS_ALTIVEC, PPC_FEATURE_HAS_SPE): Likewise.
1328 (PT_ORIG_R3, PT_TRAP): Likewise.
1329 (PTRACE_GETVSXREGS, PTRACE_SETVSXREGS): Likewise.
1330 (PTRACE_GETVRREGS, PTRACE_SETVRREGS): Likewise.
1331 (PTRACE_GETEVRREGS, PTRACE_SETEVRREGS): Likewise.
1332
3368c1e5
JB
13332015-01-10 Joel Brobecker <brobecker@adacore.com>
1334
1335 * i387-fp.c (i387_cache_to_xsave): In look over
1336 num_avx512_zmmh_high_registers, replace use of struct i387_xsave
1337 zmmh_low_space field by use of zmmh_high_space.
1338
582511be
PA
13392015-01-09 Pedro Alves <palves@redhat.com>
1340
1341 * linux-low.c (step_over_bkpt): Move higher up in the file.
1342 (handle_extended_wait): Don't store the stop_pc here.
1343 (get_stop_pc): Adjust comments and rename to ...
1344 (check_stopped_by_breakpoint): ... this. Record whether the LWP
1345 stopped for a software breakpoint or hardware breakpoint.
1346 (thread_still_has_status_pending_p): New function.
1347 (status_pending_p_callback): Use
1348 thread_still_has_status_pending_p. If the event is no longer
1349 interesting, resume the LWP.
1350 (handle_tracepoints): Add assert.
1351 (maybe_move_out_of_jump_pad): Remove cancel_breakpoints call.
1352 (wstatus_maybe_breakpoint): New function.
1353 (cancel_breakpoint): Delete function.
1354 (check_stopped_by_watchpoint): New function, factored out from
1355 linux_low_filter_event.
1356 (lp_status_maybe_breakpoint): Delete function.
1357 (linux_low_filter_event): Remove filter_ptid argument.
1358 Leave thread group exits pending here. Store the LWP's stop PC.
1359 Always leave events pending.
1360 (linux_wait_for_event_filtered): Pull all events out of the
1361 kernel, and leave them all pending.
1362 (count_events_callback, select_event_lwp_callback): Consider all
1363 events.
1364 (cancel_breakpoints_callback, linux_cancel_breakpoints): Delete.
1365 (select_event_lwp): Only give preference to the stepping LWP in
1366 all-stop mode. Adjust comments.
1367 (ignore_event): New function.
1368 (linux_wait_1): Delete 'retry' label. Use ignore_event. Remove
1369 references to cancel_breakpoints. Adjust to renames. Also give
1370 equal priority to all LWPs that have had events in non-stop mode.
1371 If reporting a software breakpoint event, unadjust the LWP's PC.
1372 (linux_wait): If linux_wait_1 returned an ignored event, retry.
1373 (stuck_in_jump_pad_callback, move_out_of_jump_pad_callback):
1374 Adjust.
1375 (linux_resume_one_lwp): Store the LWP's PC. Adjust.
1376 (resume_status_pending_p): Use thread_still_has_status_pending_p.
1377 (linux_stopped_by_watchpoint): Adjust.
1378 (linux_target_ops): Remove reference to linux_cancel_breakpoints.
1379 * linux-low.h (enum lwp_stop_reason): New.
1380 (struct lwp_info) <stop_pc>: Adjust comment.
1381 <stopped_by_watchpoint>: Delete field.
1382 <stop_reason>: New field.
1383 * linux-x86-low.c (x86_linux_prepare_to_resume): Adjust.
1384 * mem-break.c (software_breakpoint_inserted_here)
1385 (hardware_breakpoint_inserted_here): New function.
1386 * mem-break.h (software_breakpoint_inserted_here)
1387 (hardware_breakpoint_inserted_here): Declare.
1388 * target.h (struct target_ops) <cancel_breakpoints>: Remove field.
1389 (cancel_breakpoints): Delete.
1390 * tracepoint.c (clear_installed_tracepoints, stop_tracing)
1391 (upload_fast_traceframes): Remove references to
1392 cancel_breakpoints.
1393
a33e3959
PA
13942015-01-09 Pedro Alves <palves@redhat.com>
1395
1396 * thread-db.c (find_new_threads_callback): Ignore thread if the
1397 kernel thread ID is -1.
1398
8784d563
PA
13992015-01-09 Pedro Alves <palves@redhat.com>
1400
1401 * linux-low.c (linux_attach_fail_reason_string): Move to
1402 nat/linux-ptrace.c, and rename.
1403 (linux_attach_lwp): Update comment.
1404 (attach_proc_task_lwp_callback): New function.
1405 (linux_attach): Adjust to rename and use
1406 linux_proc_attach_tgid_threads.
1407 (linux_attach_fail_reason_string): Delete declaration.
1408
76f2b779
JB
14092015-01-01 Joel Brobecker <brobecker@adacore.com>
1410
1411 * gdbreplay.c (gdbreplay_version): Update copyright year to 2015.
1412 * server.c (gdbserver_version): Likewise.
1413
fafcc06a
SDJ
14142014-12-29 Sergio Durigan Junior <sergiodj@redhat.com>
1415
1416 * remote-utils.c: Include ctype.h.
1417 (input_interrupt): Explicitly handle the case when the char
1418 received is the NUL byte. Improve the printing of non-ASCII
1419 characters.
1420
beed38b8
JB
14212014-12-16 Joel Brobecker <brobecker@adacore.com>
1422
1423 * linux-low.c (linux_low_filter_event): Update call to
1424 linux_enable_event_reporting following the addition of
1425 a new parameter to that function.
1426
bf330350
CU
14272014-12-16 Catalin Udma <catalin.udma@freescale.com>
1428
1429 PR server/17457
1430 * linux-aarch64-low.c (AARCH64_FPSR_REGNO): New define.
1431 (AARCH64_FPCR_REGNO): Likewise.
1432 (AARCH64_NUM_REGS): Update to include fpsr/fpcr registers.
1433 (aarch64_fill_fpregset): Add missing fpsr/fpcr registers.
1434 (aarch64_store_fpregset): Likewise.
1435
5227d625
JB
14362014-12-15 Joel Brobecker <brobecker@adacore.com>
1437
1438 * lynx-low.c (lynx_resume): Use PTRACE_SINGLESTEP_ONE if N == 1.
1439 Remove FIXME comment about assumption about N.
1440
f93b65a0
JB
14412014-12-13 Joel Brobecker <brobecker@adacore.com>
1442
1443 * configure.ac: If large-file support is disabled in GDBserver,
1444 pass --disable-largefile to ACX_CONFIGURE_DIR call for "gnulib".
1445 * configure: Regenerate.
1446
e5a9158d
AA
14472014-12-12 Andreas Arnez <arnez@linux.vnet.ibm.com>
1448
1449 * linux-low.c (regsets_fetch_inferior_registers): Suppress the
1450 warning upon ENODATA from ptrace.
1451 * linux-s390-low.c (s390_store_tdb): New.
1452 (s390_regsets): Add regset for NT_S390_TDB.
1453
feea5f36
AA
14542014-12-12 Andreas Arnez <arnez@linux.vnet.ibm.com>
1455
1456 * linux-low.c (regsets_store_inferior_registers): Skip regsets
1457 without a fill_function.
1458 * linux-s390-low.c (s390_fill_last_break): Remove.
1459 (s390_regsets): Set fill_function to NULL for NT_S390_LAST_BREAK.
1460 (s390_arch_setup): Use regset's size instead of fill_function for
1461 loop end condition.
1462
098dbe61
AA
14632014-12-12 Andreas Arnez <arnez@linux.vnet.ibm.com>
1464
1465 * linux-low.c (regsets_fetch_inferior_registers): Do not invoke
1466 the regset's store function when ptrace returned an error.
1467 * regcache.c (get_thread_regcache): Invalidate register cache
1468 before fetching inferior's registers.
1469
28eef672
AA
14702014-12-12 Andreas Arnez <arnez@linux.vnet.ibm.com>
1471
1472 * linux-low.c (regsets_fetch_inferior_registers): Rephrase
1473 while-loop as for-loop.
1474 (regsets_store_inferior_registers): Likewise.
1475
bdca27a2
YQ
14762014-11-28 Yao Qi <yao@codesourcery.com>
1477
1478 * configure.ac(AC_CHECK_FUNCS): Remove readlink.
1479 * config.in, configure: Re-generate.
1480 * hostio.c (handle_unlink): Remove code checking HAVE_READLINK
1481 is defined.
1482
9c232dda
YQ
14832014-11-21 Yao Qi <yao@codesourcery.com>
1484
1485 * configure.ac: Don't invoke AC_FUNC_ALLOCA.
1486 (AC_CHECK_HEADERS): Remove malloc.h.
1487 * configure: Re-generated.
1488 * config.in: Re-generated.
1489 * server.h: Don't include alloca.h and malloc.h.
1490 * gdbreplay.c: Don't check HAVE_ALLOCA_H is defined.
1491 Don't include malloc.h.
1492
43968415
JB
14932014-11-17 Joel Brobecker <brobecker@adacore.com>
1494
1495 * lynx-low.c (lynx_write_memory): Put lynx_read_memory and
1496 corresponding ERRNO check in same block.
1497
40e91bc7
PA
14982014-11-12 Pedro Alves <palves@redhat.com>
1499
1500 * server.c (cont_thread): Update comment.
1501 (start_inferior, attach_inferior): No longer clear cont_thread.
1502 (handle_v_cont): No longer set cont_thread.
1503 (captured_main): Clear cont_thread each time a GDB connects.
1504
c2c118cf
PA
15052014-11-12 Pedro Alves <palves@redhat.com>
1506
1507 * linux-low.c (linux_wait_1): Don't force a wait for the Hc
1508 thread, and don't resume all threads if the Hc thread has exited.
1509
78708b7c
PA
15102014-11-12 Pedro Alves <palves@redhat.com>
1511
1512 * linux-low.c (linux_request_interrupt): Always send a SIGINT to
1513 the process group instead of to a specific LWP.
1514
a2abc7de
PA
15152014-10-15 Pedro Alves <palves@redhat.com>
1516
1517 PR server/17487
1518 * win32-arm-low.c (arm_set_thread_context): Remove current_event
1519 parameter.
1520 (arm_set_thread_context): Delete.
1521 (the_low_target): Adjust.
1522 * win32-i386-low.c (debug_registers_changed)
1523 (debug_registers_used): Delete.
1524 (update_debug_registers_callback): New function.
1525 (x86_dr_low_set_addr, x86_dr_low_set_control): Mark all threads as
1526 needing to update their debug registers.
1527 (win32_get_current_dr): New function.
1528 (x86_dr_low_get_addr, x86_dr_low_get_control)
1529 (x86_dr_low_get_status): Fetch the debug register from the thread
1530 record's context.
1531 (i386_initial_stuff): Adjust.
1532 (i386_get_thread_context): Remove current_event parameter. Don't
1533 clear debug_registers_changed nor copy DR values to
1534 debug_reg_state.
1535 (i386_set_thread_context): Delete.
1536 (i386_prepare_to_resume): New function.
1537 (i386_thread_added): Mark the thread as needing to update irs
1538 debug registers.
1539 (the_low_target): Remove i386_set_thread_context and install
1540 i386_prepare_to_resume.
1541 * win32-low.c (win32_get_thread_context): Adjust.
1542 (win32_set_thread_context): Use SetThreadContext
1543 directly.
1544 (win32_prepare_to_resume): New function.
1545 (win32_require_context): New function, factored out from ...
1546 (thread_rec): ... this.
1547 (continue_one_thread): Call win32_prepare_to_resume on each thread
1548 we're about to continue.
1549 (win32_resume): Call win32_prepare_to_resume on the event thread.
1550 * win32-low.h (struct win32_thread_info)
1551 <debug_registers_changed>: New field.
1552 (struct win32_target_ops): Change prototype of set_thread_context,
1553 delete set_thread_context and add prepare_to_resume.
1554 (win32_require_context): New declaration.
1555
a442d071
GB
15562014-10-08 Gary Benson <gbenson@redhat.com>
1557
1558 * server.h: Do not include common-exceptions.h.
1559
6f1947e8
GB
15602014-10-08 Gary Benson <gbenson@redhat.com>
1561
1562 * server.h: Do not include cleanups.h.
1563
63b434a4
JH
15642014-09-30 James Hogan <james.hogan@imgtec.com>
1565
1566 * Makefile.in (clean): Add rm -f commands for mips-dsp-linux.c and
1567 mips64-dsp-linux.c.
1568
c4d9ceb6
YQ
15692014-09-23 Yao Qi <yao@codesourcery.com>
1570
1571 * linux-low.c (lp_status_maybe_breakpoint): New function.
1572 (linux_low_filter_event): Call lp_status_maybe_breakpoint.
1573 (count_events_callback): Likewise.
1574 (select_event_lwp_callback): Likewise.
1575 (cancel_breakpoints_callback): Likewise.
1576
89a5711c
DB
15772014-09-19 Don Breazeal <donb@codesourcery.com>
1578
1579 * linux-low.c (handle_extended_wait): Call
1580 linux_ptrace_get_extended_event.
1581 (get_stop_pc, get_detach_signal, linux_low_filter_event): Call
1582 linux_is_extended_waitstatus.
1583
bffc0964
JB
15842014-09-16 Joel Brobecker <brobecker@adacore.com>
1585
1586 * Makefile.in (CPPFLAGS): Define.
1587 (INTERNAL_CFLAGS_BASE): Add ${CPPFLAGS}.
1588 (IPAGENT_CFLAGS): Remove ${CPPFLAGS}.
1589
0bfdf32f
GB
15902014-09-16 Gary Benson <gbenson@redhat.com>
1591
1592 * inferiors.h (current_inferior): Renamed as...
1593 (current_thread): New variable. All uses updated.
1594 * linux-low.c (get_pc): Renamed saved_inferior as saved_thread.
1595 (maybe_move_out_of_jump_pad): Likewise.
1596 (cancel_breakpoint): Likewise.
1597 (linux_low_filter_event): Likewise.
1598 (wait_for_sigstop): Likewise.
1599 (linux_resume_one_lwp): Likewise.
1600 (need_step_over_p): Likewise.
1601 (start_step_over): Likewise.
1602 (linux_stabilize_threads): Renamed save_inferior as saved_thread.
1603 * linux-x86-low.c (x86_linux_update_xmltarget): Likewise.
1604 * proc-service.c (ps_lgetregs): Renamed reg_inferior as reg_thread
1605 and save_inferior as saved_thread.
1606 * regcache.c (get_thread_regcache): Renamed saved_inferior as
1607 saved_thread.
1608 (regcache_invalidate_thread): Likewise.
1609 * remote-utils.c (prepare_resume_reply): Likewise.
1610 * thread-db.c (thread_db_get_tls_address): Likewise.
1611 (disable_thread_event_reporting): Likewise.
1612 (remove_thread_event_breakpoints): Likewise.
1613 * tracepoint.c (gdb_agent_about_to_close): Renamed save_inferior
1614 as saved_thread.
1615 * target.h (set_desired_inferior): Renamed as...
1616 (set_desired_thread): New declaration. All uses updated.
1617 * server.c (myresume): Updated comment to reference thread instead
1618 of inferior.
1619 (handle_serial_event): Likewise.
1620 (handle_target_event): Likewise.
1621
361c8ade
GB
16222014-09-12 Tom Tromey <tromey@redhat.com>
1623 Gary Benson <gbenson@redhat.com>
1624
1625 * regcache.h: Include common-regcache.h.
1626 (regcache_read_pc): Don't declare.
1627 * regcache.c (get_thread_regcache_for_ptid): New function.
1628
bd9269f7
GB
16292014-09-11 Tom Tromey <tromey@redhat.com>
1630 Gary Benson <gbenson@redhat.com>
1631
1632 * symbol.c: New file.
1633 * Makefile.in (SFILES): Add symbol.c.
1634 (OBS): Add symbol.o.
1635
f8c1d06b
GB
16362014-09-11 Gary Benson <gbenson@redhat.com>
1637
1638 * target.c (target_stop_ptid, target_continue_ptid): New
1639 functions.
1640
721ec300
GB
16412014-09-11 Tom Tromey <tromey@redhat.com>
1642 Gary Benson <gbenson@redhat.com>
1643
1644 * target.h: Include target/target.h.
1645 * target.c (target_read_memory, target_read_uint32)
1646 (target_write_memory): New functions.
1647
c5e92cca
GB
16482014-09-11 Gary Benson <gbenson@redhat.com>
1649
1650 * server.h (debug_hw_points): Don't declare.
1651 * server.c (debug_hw_points): Don't define. Replace all uses
1652 with show_debug_regs.
1653 * linux-aarch64-low.c (debug_hw_points): Don't define. Replace
1654 all uses with show_debug_regs.
1655
2e4bb98a
EBM
16562014-09-08 Edjunior Barbosa Machado <emachado@linux.vnet.ibm.com>
1657
1658 * linux-ppc-low.c (ppc_collect_ptrace_register): Adjust routine to take
1659 endianness into account.
1660 (ppc_supply_ptrace_register): Likewise.
1661
ac740bc7
JH
16622014-09-03 James Hogan <james.hogan@imgtec.com>
1663
1664 * linux-mips-low.c (mips_read_description): Reset errno to 0 prior
1665 to reading DSP_CONTROL with PTRACE_PEEKUSER ptrace call.
1666
97ea6506
GB
16672014-09-03 Gary Benson <gbenson@redhat.com>
1668
1669 * linux-x86-low.c (x86_linux_prepare_to_resume): Use
1670 ALL_DEBUG_ADDRESS_REGISTERS.
1671
df7e5265
GB
16722014-09-02 Gary Benson <gbenson@redhat.com>
1673
1674 * i386-low.h: Renamed as...
1675 * x86-low.h: New file. All type, function and variable name
1676 prefixes changed from "i386_" to "x86_". All references updated.
1677 * i386-low.c: Renamed as...
1678 * x86-low.c: New file. All type, function and variable name
1679 prefixes changed from "i386_" to "x86_". All references updated.
1680
ed859da7
GB
16812014-09-02 Gary Benson <gbenson@redhat.com>
1682
1683 * linux-x86-low.c (x86_linux_new_process): Use XCNEW.
1684 (x86_linux_new_thread): Likewise.
1685
860789c7
GB
16862014-08-29 Gary Benson <gbenson@redhat.com>
1687
1688 * server.h (setjmp.h): Do not include.
1689 (toplevel): Do not declare.
1690 (common-exceptions.h): Include.
1691 (cleanups.h): Likewise.
1692 * server.c (toplevel): Do not define.
1693 (exit_code): New static global.
1694 (detach_or_kill_for_exit_cleanup): New function.
1695 (main): New function. Original main renamed to...
1696 (captured_main): New function.
1697 * utils.c (verror) [!IN_PROCESS_AGENT]: Use throw_verror.
1698
ff55e1b5
GB
16992014-08-29 Gary Benson <gbenson@redhat.com>
1700
1701 * Makefile.in (SFILES): Add common/common-exceptions.c.
1702 (OBS): Add common-exceptions.o.
1703 (common-exceptions.o): New rule.
1704 * utils.c (prepare_to_throw_exception): New function.
1705
e9bcb658
GB
17062014-08-29 Gary Benson <gbenson@redhat.com>
1707
1708 * config.in: Regenerate.
1709 * configure: Likewise.
1710
e3180625
GB
17112014-08-29 Gary Benson <gbenson@redhat.com>
1712
1713 * Makefile.in (SFILES): Add common/cleanups.c.
1714 (OBS): cleanups.o.
1715 (cleanups.o): New rule.
1716
e3d6ba5d
GB
17172014-08-29 Gary Benson <gbenson@redhat.com>
1718
1719 * utils.c (internal_vwarning): New function.
1720
7096e886
GB
17212014-08-28 Gary Benson <gbenson@redhat.com>
1722
1723 * utils.h (fatal): Remove declaration.
1724 * utils.c (fatal): Remove function.
1725
14ce3192
GB
17262014-08-28 Gary Benson <gbenson@redhat.com>
1727
1728 * tracepoint.c (gdb_agent_init): Replace fatal with
1729 perror_with_name.
1730 (initialize_tracepoint): Likewise.
1731
50278d59
GB
17322014-08-28 Gary Benson <gbenson@redhat.com>
1733
1734 * remote-utils.c (remote_prepare): Replace fatal with error.
1735
aa96c426
GB
17362014-08-28 Gary Benson <gbenson@redhat.com>
1737
1738 * linux-low.c (linux_async): Replace fatal with warning.
1739 Tidy up and return.
1740 (linux_start_non_stop): Return -1 if linux_async failed.
1741
f7160e97
GB
17422014-08-28 Gary Benson <gbenson@redhat.com>
1743
1744 * linux-x86-low.c (i386_dr_low_set_addr): Replace check with
1745 gdb_assert.
1746 (i386_dr_low_get_addr): Remove vague comment.
1747 * win32-i386-low.c (i386_dr_low_set_addr): Replace check with
1748 gdb_assert.
1749
38e08fca
GB
17502014-08-28 Gary Benson <gbenson@redhat.com>
1751
1752 * inferiors.c (get_thread_process): Replace check with gdb_assert.
1753 * linux-low.c (linux_wait_for_event_filtered): Replace fatal with
1754 internal_error.
1755 (linux_resume_one_lwp): Likewise.
1756 * linux-x86-low.c (x86_siginfo_fixup): Replace checks with
1757 gdb_assert.
1758 * mem-break.c (raw_bkpt_type_to_target_hw_bp_type): Replace fatal
1759 with internal_error.
1760 * regcache.c (get_thread_regcache): Replace check with gdb_assert.
1761 (init_register_cache): Replace fatal with gdb_assert_not_reached.
1762 (find_register_by_name): Replace fatal with internal_error.
1763 (find_regno): Likewise.
1764 * tdesc.c (init_target_desc): Replace check with gdb_assert.
1765 * thread-db.c (thread_db_create_event): Likewise.
1766 (thread_db_load_search): Likewise.
1767 (try_thread_db_load_1): Likewise.
1768 * tracepoint.c (get_jump_space_head): Replace fatal with
1769 internal_error.
1770 (claim_trampoline_space): Likewise.
1771 (have_fast_tracepoint_trampoline_buffer): Likewise.
1772 (cmd_qtstart): Likewise.
1773 (stop_tracing): Likewise.
1774 (fast_tracepoint_collecting): Likewise.
1775 (target_malloc): Likewise.
1776 (download_tracepoint): Likewise.
1777 (download_trace_state_variables): Replace check with gdb_assert.
1778 (upload_fast_traceframes): Replace fatal with internal_error.
1779
34abf635
GB
17802014-08-19 Tom Tromey <tromey@redhat.com>
1781 Gary Benson <gbenson@redhat.com>
1782
1783 * Makefile.in (SFILES): Add common/common-debug.c.
1784 (OBS): Add common-debug.o.
1785 (common-debug.o): New rule.
1786 * debug.h (debug_printf): Don't declare.
1787 * debug.c (debug_printf): Renamed and rewritten as...
1788 (debug_vprintf): New function.
1789
f6e94d78
GB
17902014-08-19 Gary Benson <gbenson@redhat.com>
1791
1792 * utils.h: Do not include print-utils.h.
1793
9239eeab
GB
17942014-08-19 Tom Tromey <tromey@redhat.com>
1795 Gary Benson <gbenson@redhat.com>
1796
1797 * server.h: Add static assertion.
1798 (gdb_byte, CORE_ADDR, LONGEST, ULONGEST): Remove.
1799
ef87c8bb
GB
18002014-08-19 Tom Tromey <tromey@redhat.com>
1801 Gary Benson <gbenson@redhat.com>
1802
1803 * Makefile.in (SFILES): Add common/errors.c.
1804 (OBS): Add errors.o.
1805 (IPA_OBS): Add errors-ipa.o.
1806 (errors.o): New rule.
1807 (errors-ipa.o): Likewise.
1808 * utils.h (perror_with_name, error, warning): Don't declare.
1809 * utils.c (warning): Renamed and rewritten as...
1810 (vwarning): New function.
1811 (error): Renamed and rewritten as...
1812 (verror): New function.
1813 (internal_error): Renamed and rewritten as...
1814 (internal_verror): New function.
1815
bb974a24
GB
18162014-08-07 Gary Benson <gbenson@redhat.com>
1817
1818 * configure.ac (AC_CHECK_HEADERS): Remove errno.h.
1819 * configure: Regenerate.
1820 * config.in: Likewise.
1821 * server.h: Do not include errno.h.
1822 * event-loop.c: Likewise.
1823 * hostio-errno.c: Likewise.
1824 * linux-low.c: Likewise.
1825 * remote-utils.c: Likewise.
1826 * spu-low.c: Likewise.
1827 * utils.c: Likewise.
1828 * gdbreplay.c: Unconditionally include errno.h.
1829
6d3d12eb
GB
18302014-08-07 Gary Benson <gbenson@redhat.com>
1831
1832 * server.h: Do not include string.h.
1833 * event-loop.c: Likewise.
1834 * linux-low.c: Likewise.
1835 * regcache.c: Likewise.
1836 * remote-utils.c: Likewise.
1837 * spu-low.c: Likewise.
1838 * utils.c: Likewise.
1839
dccbb609
GB
18402014-08-07 Gary Benson <gbenson@redhat.com>
1841
1842 * server.h: Do not include gdb_assert.h.
1843
e76df0d0
GB
18442014-08-07 Gary Benson <gbenson@redhat.com>
1845
1846 * server.h: Do not include common-utils.h.
1847
4cb9c816
GB
18482014-08-07 Gary Benson <gbenson@redhat.com>
1849
1850 * server.h: Do not include ptid.h.
1851 * notif.h: Likewise.
1852
3995eeee
GB
18532014-08-07 Gary Benson <gbenson@redhat.com>
1854
1855 * server.h: Do not include gdb_locale.h.
1856
cb9f1a9b
GB
18572014-08-07 Gary Benson <gbenson@redhat.com>
1858
1859 * server.h: Do not include gdb/signals.h.
1860 * win32-low.c: Likewise.
1861
a5fceff8
GB
18622014-08-07 Gary Benson <gbenson@redhat.com>
1863
1864 * server.h: Do not include pathmax.h.
1865
b9391142
GB
18662014-08-07 Gary Benson <gbenson@redhat.com>
1867
1868 * server.h: Do not include libiberty.h.
1869 * linux-bfin-low.c: Likewise.
1870
0e443c87
GB
18712014-08-07 Gary Benson <gbenson@redhat.com>
1872
1873 * server.h: Do not include ansidecl.h.
1874
8ebb3f56
GB
18752014-08-07 Gary Benson <gbenson@redhat.com>
1876
1877 * linux-x86-low.c: Do not include stddef.h.
1878 * lynx-ppc-low.c: Likewise.
1879 * tracepoint.c: Likewise.
1880
8980bdf6
GB
18812014-08-07 Gary Benson <gbenson@redhat.com>
1882
1883 * server.h: Do not include stdarg.h.
1884 * nto-low.c: Likewise.
1885
d7096f71
GB
18862014-08-07 Gary Benson <gbenson@redhat.com>
1887
1888 * server.h: Do not include stdlib.h.
1889 * inferiors.c: Likewise.
1890 * linux-low.c: Likewise.
1891 * regcache.c: Likewise.
1892 * spu-low.c: Likewise.
1893 * tracepoint.c: Likewise.
1894 * utils.c: Likewise.
1895
d02f550d
GB
18962014-08-07 Gary Benson <gbenson@redhat.com>
1897
1898 * server.h: Do not include stdio.h.
1899 * linux-low.c: Likewise.
1900 * remote-utils.c: Likewise.
1901 * spu-low.c: Likewise.
1902 * utils.c: Likewise.
1903 * wincecompat.c: Likewise.
1904
87f6c4e3
GB
19052014-08-06 Gary Benson <gbenson@redhat.com>
1906
1907 * regcache.c (init_register_cache): Move conditionals inside if.
1908
7089dca4
GB
19092014-08-06 Gary Benson <gbenson@redhat.com>
1910
1911 * linux-low.c (linux_supports_non_stop): Use target_is_async_p.
1912
462f517e
GB
19132014-07-31 Gary Benson <gbenson@redhat.com>
1914
1915 * ax.h: Do not include server.h.
1916 * gdbthread.h: Likewise.
1917 * lynx-low.h: Likewise.
1918 * notif.h: Likewise.
1919
976411d6
GB
19202014-07-30 Gary Benson <gbenson@redhat.com>
1921
1922 * server.h: Include common-defs.h.
1923 Do not include config.h or build-gnulib-gdbserver/config.h.
1924
d41f6d8e
GB
19252014-07-30 Gary Benson <gbenson@redhat.com>
1926
1927 * hostio-errno.c: Move server.h to top of includes list.
1928 * inferiors.c: Likewise.
1929 * linux-x86-low.c: Likewise.
1930 * notif.c: Include server.h.
1931
314c6a35
TT
19322014-07-24 Tom Tromey <tromey@redhat.com>
1933 Gary Benson <gbenson@redhat.com>
1934
1935 * server.h (CORE_ADDR): Now unsigned.
1936
69ff6be5
PA
19372014-07-16 Pedro Alves <palves@redhat.com>
1938
1939 * linux-low.c (linux_kill_one_lwp): Use kill_lwp, not kill.
1940
ce9e3fe7
PA
19412014-07-15 Pedro Alves <palves@redhat.com>
1942
1943 * linux-low.c (linux_kill_one_lwp): Save errno and work with saved
1944 copy.
1945
e76126e8
PA
19462014-07-11 Pedro Alves <palves@redhat.com>
1947
1948 * linux-low.c (kill_wait_lwp): New function, based on
1949 kill_one_lwp_callback, but use my_waitpid directly.
1950 (kill_one_lwp_callback, linux_kill): Use it.
1951
8e9db26e
PA
19522014-06-23 Pedro Alves <palves@redhat.com>
1953
1954 * linux-x86-low.c (x86_linux_prepare_to_resume): Clear DR_CONTROL
1955 before setting DR0..DR3.
1956
698b3e08
GB
19572014-06-20 Gary Benson <gbenson@redhat.com>
1958
1959 * configure.ac (AC_REPLACE_FUNCS) <vasprintf, vsnprintf>: Removed.
1960 * configure: Regenerated.
1961 * config.in: Likewise.
1962
125f8a3d
GB
19632014-06-20 Gary Benson <gbenson@redhat.com>
1964
1965 * Makefile.in (SFILES): Update locations for files moved
1966 from common to nat.
1967 (object file files): Reordered.
1968
42995dbd
GB
19692014-06-20 Gary Benson <gbenson@redhat.com>
1970
1971 * i386-low.h (i386_dr_low_can_set_addr): Removed.
1972 (i386_dr_low_set_addr): Likewise.
1973 (i386_dr_low_get_addr): Likewise.
1974 (i386_dr_low_can_set_control): Likewise.
1975 (i386_dr_low_set_control): Likewise.
1976 (i386_dr_low_get_control): Likewise.
1977 (i386_dr_low_get_status): Likewise.
1978 (i386_get_debug_register_length): Likewise.
1979 * linux-x86-low.c (i386_dr_low_set_addr):
1980 Changed signature. Made static.
1981 (i386_dr_low_get_addr): Likewise.
1982 (i386_dr_low_set_control): Likewise.
1983 (i386_dr_low_get_control): Likewise.
1984 (i386_dr_low_get_status): Likewise.
1985 (i386_dr_low): New global variable.
1986 * win32-i386-low.c (i386_dr_low_set_addr):
1987 Changed signature. Made static.
1988 (i386_dr_low_get_addr): Likewise.
1989 (i386_dr_low_set_control): Likewise.
1990 (i386_dr_low_get_control): Likewise.
1991 (i386_dr_low_get_status): Likewise.
1992 (i386_dr_low): New global variable.
1993
e1d2394b
MS
19942014-06-20 Marcus Shawcroft <marcus.shawcroft@arm.com>
1995
1996 * configure.ac: Invoke. AC_CHECK_TOOL(AR, ar).
1997 * Makefile.in (AR, AR_FLAGS): Define.
1998 * configure: Regenerate.
1999
3a8ee006
GB
20002014-06-19 Gary Benson <gbenson@redhat.com>
2001
2002 * Makefile.in (i386-dregs.o): New rule.
2003 * configure.srv: Add i386-dregs.o to all targets using i386-low.o.
2004 * i386-low.c (target.h): Remove include.
2005 (TARGET_HAS_DR_LEN_8): Now in i386-dregs.c.
2006 (DR_CONTROL_SHIFT): Likewise.
2007 (DR_CONTROL_SIZE): Likewise.
2008 (DR_RW_EXECUTE): Likewise.
2009 (DR_RW_WRITE): Likewise.
2010 (DR_RW_READ): Likewise.
2011 (DR_RW_IORW): Likewise.
2012 (DR_LEN_1): Likewise.
2013 (DR_LEN_2): Likewise.
2014 (DR_LEN_4): Likewise.
2015 (DR_LEN_8): Likewise.
2016 (DR_LOCAL_ENABLE_SHIFT): Likewise.
2017 (DR_GLOBAL_ENABLE_SHIFT): Likewise.
2018 (DR_ENABLE_SIZE): Likewise.
2019 (DR_LOCAL_SLOWDOWN): Likewise.
2020 (DR_GLOBAL_SLOWDOWN): Likewise.
2021 (DR_CONTROL_RESERVED): Likewise.
2022 (I386_DR_CONTROL_MASK): Likewise.
2023 (I386_DR_VACANT): Likewise.
2024 (I386_DR_LOCAL_ENABLE): Likewise.
2025 (I386_DR_GLOBAL_ENABLE): Likewise.
2026 (I386_DR_DISABLE): Likewise.
2027 (I386_DR_SET_RW_LEN): Likewise.
2028 (I386_DR_GET_RW_LEN): Likewise.
2029 (I386_DR_WATCH_HIT): Likewise.
2030 (i386_wp_op_t): Likewise.
2031 (i386_show_dr): Likewise.
2032 (i386_length_and_rw_bits): Likewise.
2033 (i386_insert_aligned_watchpoint): Likewise.
2034 (i386_remove_aligned_watchpoint): Likewise.
2035 (i386_handle_nonaligned_watchpoint): Likewise.
2036 i386_update_inferior_debug_regs(): Likewise.
2037 (i386_dr_insert_watchpoint): Likewise.
2038 (i386_dr_remove_watchpoint): Likewise.
2039 (i386_dr_region_ok_for_watchpoint): Likewise.
2040 (i386_dr_stopped_data_address): Likewise.
2041 (i386_dr_stopped_by_watchpoint): Likewise.
2042
8f26655c
GB
20432014-06-19 Gary Benson <gbenson@redhat.com>
2044
2045 * i386-low.c (i386_dr_show): Renamed to
2046 i386_show_dr and made static. All uses updated.
2047 (i386_dr_length_and_rw_bits): Renamed to
2048 i386_length_and_rw_bits and made static.
2049 All uses updated.
2050 (i386_dr_insert_aligned_watchpoint): Renamed to
2051 i386_insert_aligned_watchpoint and made static.
2052 All uses updated.
2053 (i386_dr_remove_aligned_watchpoint): Renamed to
2054 i386_remove_aligned_watchpoint and made static.
2055 All uses updated.
2056 (i386_dr_update_inferior_debug_regs): Renamed to
2057 i386_update_inferior_debug_regs and made static.
2058 All uses updated.
2059
b9228891
GB
20602014-06-18 Gary Benson <gbenson@redhat.com>
2061
5171def3
GB
2062 * i386-low.h (i386_dr_low_can_set_addr): New macro.
2063 (i386_dr_low_can_set_control): Likewise.
2064 (i386_get_debug_register_length): Likewise.
2065 * i386-low.c (i386_dr_low_can_set_addr): Now in i386-low.h.
2066 (i386_dr_low_can_set_control): Likewise.
2067 (i386_get_debug_register_length): Likewise.
2068
20692014-06-17 Gary Benson <gbenson@redhat.com>
2070
b9228891
GB
2071 * i386-low.h (i386-dregs.h): New include.
2072 (DR_FIRSTADDR): Now in i386-dregs.h.
2073 (DR_LASTADDR): Likewise.
2074 (DR_NADDR): Likewise.
2075 (DR_STATUS): Likewise.
2076 (DR_CONTROL): Likewise.
2077 (i386_debug_reg_state): Likewise.
2078 (i386_dr_insert_watchpoint): Likewise.
2079 (i386_dr_remove_watchpoint): Likewise.
2080 (i386_dr_region_ok_for_watchpoint): Likewise.
2081 (i386_dr_stopped_data_address): Likewise.
2082 (i386_dr_stopped_by_watchpoint): Likewise.
2083 * i386-low.c (ALL_DEBUG_REGISTERS): Likewise.
2084
4be83cc2
GB
20852014-06-18 Gary Benson <gbenson@redhat.com>
2086
2087 * i386-low.h (i386_low_insert_watchpoint): Renamed to
2088 i386_dr_insert_watchpoint.
2089 (i386_low_remove_watchpoint): Renamed to
2090 i386_dr_remove_watchpoint.
2091 (i386_low_region_ok_for_watchpoint): Renamed to
2092 i386_dr_region_ok_for_watchpoint.
2093 (i386_low_stopped_data_address): Renamed to
2094 i386_dr_stopped_data_address.
2095 (i386_low_stopped_by_watchpoint): Renamed to
2096 i386_dr_stopped_by_watchpoint.
2097 * i386-low.c (i386_show_dr): Renamed to
2098 i386_dr_show and made nonstatic. All uses updated.
2099 (i386_length_and_rw_bits): Renamed to
2100 i386_dr_length_and_rw_bits and made nonstatic.
2101 All uses updated.
2102 (i386_insert_aligned_watchpoint): Renamed to
2103 i386_dr_insert_aligned_watchpoint and made nonstatic.
2104 All uses updated.
2105 (i386_remove_aligned_watchpoint): Renamed to
2106 i386_dr_remove_aligned_watchpoint and made nonstatic.
2107 All uses updated.
2108 (i386_update_inferior_debug_regs): Renamed to
2109 i386_dr_update_inferior_debug_regs and made nonstatic.
2110 All uses updated.
2111 (i386_low_insert_watchpoint): Renamed to
2112 i386_dr_insert_watchpoint. All uses updated.
2113 (i386_low_remove_watchpoint): Renamed to
2114 i386_dr_remove_watchpoint. All uses updated.
2115 (i386_low_region_ok_for_watchpoint): Renamed to
2116 i386_dr_region_ok_for_watchpoint. All uses updated.
2117 (i386_low_stopped_data_address): Renamed to
2118 i386_dr_stopped_data_address. All uses updated.
2119 (i386_low_stopped_by_watchpoint): Renamed to
2120 i386_dr_stopped_by_watchpoint. All uses updated.
2121
131aa0d4
GB
21222014-06-18 Gary Benson <gbenson@redhat.com>
2123
2124 * i386-low.c (i386_dr_low_can_set_addr): New macro.
2125 (i386_dr_low_can_set_control): Likewise.
2126 (i386_insert_aligned_watchpoint): New check.
2127
d9305f7f
GB
21282014-06-18 Gary Benson <gbenson@redhat.com>
2129
2130 * i386-low.c (i386_update_inferior_debug_regs) <inf_state>:
2131 Renamed to state.
2132
e927c9fc
GB
21332014-06-18 Gary Benson <gbenson@redhat.com>
2134
2135 * i386-low.c (i386_length_and_rw_bits): Use internal_error
2136 instead of fatal and error.
2137 (i386_handle_nonaligned_watchpoint): Likewise.
2138
1b6d4134
GB
21392014-06-18 Gary Benson <gbenson@redhat.com>
2140
2141 * i386-low.c (i386_get_debug_register_length): New macro.
2142 (TARGET_HAS_DR_LEN_8): Remove conditional. Use above macro.
2143 (i386_show_dr): Use debug_printf instead of fprintf. Use
2144 phex to format values.
2145
6e62758f
GB
21462014-06-18 Gary Benson <gbenson@redhat.com>
2147
2148 * i386-low.h: Comment changes.
2149 * i386-low.c: Likewise.
2150
fc6e2f03
GB
21512014-06-18 Gary Benson <gbenson@redhat.com>
2152
2153 * i386-low.c: Whitespace changes.
2154
f9d1eeed
TT
21552014-06-12 Tom Tromey <tromey@redhat.com>
2156
2157 * utils.c (freeargv): Remove.
2158
0b04e523
TT
21592014-06-12 Tom Tromey <tromey@redhat.com>
2160
2161 * debug.c (debug_printf): Remove HAVE_GETTIMEOFDAY checks.
2162 * server.c (monitor_show_help): Remove HAVE_GETTIMEOFDAY check.
2163 (parse_debug_format_options): Likewise.
2164 (gdbserver_usage): Likewise.
2165 * Makefile.in (LIBIBERTY_BUILDDIR, LIBIBERTY): New variables.
2166 (SUBDIRS, REQUIRED_SUBDIRS): Add libiberty.
2167 (gdbserver$(EXEEXT), gdbreplay$(EXEEXT)): Depend on and link
2168 against libiberty.
2169 ($(LIBGNU)): Depend on libiberty.
2170 (all-lib): Recurse into all subdirs.
2171 (install-only): Invoke "install" target in subdirs.
2172 (vasprintf.o, vsnprintf.o, safe-ctype.o, lbasename.o): Remove
2173 targets.
2174 * configure: Rebuild.
2175 * configure.ac: Add ACX_CONFIGURE_DIR for libiberty. Don't check
2176 for vasprintf, vsnprintf, or gettimeofday.
2177 * configure.srv: Don't add safe-ctype.o or lbasename.o to
2178 srv_tgtobj.
2179
270c9937
JB
21802014-06-05 Joel Brobecker <brobecker@adacore.com>
2181
2182 * development.sh: Delete.
2183 * Makefile.in (config.status): Adjust dependency on development.sh.
2184 * configure.ac: Adjust development.sh source call.
2185 * configure: Regenerate.
2186
0a261ed8
PA
21872014-06-02 Pedro Alves <palves@redhat.com>
2188
2189 * ax.c (gdb_free_agent_expr): New function.
2190 * ax.h (gdb_free_agent_expr): New declaration.
2191 * mem-break.c (delete_gdb_breakpoint_1): Also clear the commands
2192 list.
2193 (clear_breakpoint_conditions, clear_breakpoint_commands): Make
2194 static.
2195 (clear_breakpoint_conditions_and_commands): New function.
2196 * mem-break.h (clear_breakpoint_conditions): Delete declaration.
2197 (clear_breakpoint_conditions_and_commands): New declaration.
2198
e9dae05e
RR
21992014-05-23 Ramana Radhakrishnan <ramana.radhakrishnan@arm.com>
2200
2201 * linux-aarch64-low.c (asm/ptrace.h): Include.
2202
5876f503
JK
22032014-05-21 Jan Kratochvil <jan.kratochvil@redhat.com>
2204
2205 Fix TLS access for -static -pthread.
2206 * gdbserver/thread-db.c (struct thread_db): Add td_thr_tlsbase_p.
2207 (thread_db_get_tls_address): Call it if LOAD_MODULE is zero.
2208 (thread_db_load_search, try_thread_db_load_1): Initialize it.
2209
802e8e6d
PA
22102014-05-20 Pedro Alves <palves@redhat.com>
2211
2212 * linux-aarch64-low.c (aarch64_insert_point)
2213 (aarch64_remove_point): No longer check whether the type is
2214 supported here. Adjust to new interface.
2215 (the_low_target): Install aarch64_supports_z_point_type as
2216 supports_z_point_type method.
2217 * linux-arm-low.c (raw_bkpt_type_to_arm_hwbp_type): New function.
2218 (arm_linux_hw_point_initialize): Take an enum raw_bkpt_type
2219 instead of a Z packet char. Adjust.
2220 (arm_supports_z_point_type): New function.
2221 (arm_insert_point, arm_remove_point): Adjust to new interface.
2222 (the_low_target): Install arm_supports_z_point_type.
2223 * linux-crisv32-low.c (cris_supports_z_point_type): New function.
2224 (cris_insert_point, cris_remove_point): Adjust to new interface.
2225 Don't check whether the type is supported here.
2226 (the_low_target): Install cris_supports_z_point_type.
2227 * linux-low.c (linux_supports_z_point_type): New function.
2228 (linux_insert_point, linux_remove_point): Adjust to new interface.
2229 * linux-low.h (struct linux_target_ops) <insert_point,
2230 remove_point>: Take an enum raw_bkpt_type instead of a char. Add
2231 raw_breakpoint pointer parameter.
2232 <supports_z_point_type>: New method.
2233 * linux-mips-low.c (mips_supports_z_point_type): New function.
2234 (mips_insert_point, mips_remove_point): Adjust to new interface.
2235 Use mips_supports_z_point_type.
2236 (the_low_target): Install mips_supports_z_point_type.
2237 * linux-ppc-low.c (the_low_target): Install NULL as
2238 supports_z_point_type method.
2239 * linux-s390-low.c (the_low_target): Install NULL as
2240 supports_z_point_type method.
2241 * linux-sparc-low.c (the_low_target): Install NULL as
2242 supports_z_point_type method.
2243 * linux-x86-low.c (x86_supports_z_point_type): New function.
2244 (x86_insert_point): Adjust to new insert_point interface. Use
2245 insert_memory_breakpoint. Adjust to new
2246 i386_low_insert_watchpoint interface.
2247 (x86_remove_point): Adjust to remove_point interface. Use
2248 remove_memory_breakpoint. Adjust to new
2249 i386_low_remove_watchpoint interface.
2250 (the_low_target): Install x86_supports_z_point_type.
2251 * lynx-low.c (lynx_target_ops): Install NULL as
2252 supports_z_point_type callback.
2253 * nto-low.c (nto_supports_z_point_type): New.
2254 (nto_insert_point, nto_remove_point): Adjust to new interface.
2255 (nto_target_ops): Install nto_supports_z_point_type.
2256 * mem-break.c: Adjust intro comment.
2257 (struct raw_breakpoint) <raw_type, size>: New fields.
2258 <inserted>: Update comment.
2259 <shlib_disabled>: Delete field.
2260 (enum bkpt_type) <gdb_breakpoint>: Delete value.
2261 <gdb_breakpoint_Z0, gdb_breakpoint_Z1, gdb_breakpoint_Z2,
2262 gdb_breakpoint_Z3, gdb_breakpoint_Z4>: New values.
2263 (raw_bkpt_type_to_target_hw_bp_type): New function.
2264 (find_enabled_raw_code_breakpoint_at): New function.
2265 (find_raw_breakpoint_at): New type and size parameters. Use them.
2266 (insert_memory_breakpoint): New function, based off
2267 set_raw_breakpoint_at.
2268 (remove_memory_breakpoint): New function.
2269 (set_raw_breakpoint_at): Reimplement.
2270 (set_breakpoint): New, based on set_breakpoint_at.
2271 (set_breakpoint_at): Reimplement.
2272 (delete_raw_breakpoint): Go through the_target->remove_point
2273 instead of assuming memory breakpoints.
2274 (find_gdb_breakpoint_at): Delete.
2275 (Z_packet_to_bkpt_type, Z_packet_to_raw_bkpt_type): New functions.
2276 (find_gdb_breakpoint): New function.
2277 (set_gdb_breakpoint_at): Delete.
2278 (z_type_supported): New function.
2279 (set_gdb_breakpoint_1): New function, loosely based off
2280 set_gdb_breakpoint_at.
2281 (check_gdb_bp_preconditions, set_gdb_breakpoint): New functions.
2282 (delete_gdb_breakpoint_at): Delete.
2283 (delete_gdb_breakpoint_1): New function, loosely based off
2284 delete_gdb_breakpoint_at.
2285 (delete_gdb_breakpoint): New function.
2286 (clear_gdb_breakpoint_conditions): Rename to ...
2287 (clear_breakpoint_conditions): ... this. Don't handle a NULL
2288 breakpoint.
2289 (add_condition_to_breakpoint): Make static.
2290 (add_breakpoint_condition): Take a struct breakpoint pointer
2291 instead of an address. Adjust.
2292 (gdb_condition_true_at_breakpoint): Rename to ...
2293 (gdb_condition_true_at_breakpoint_z_type): ... this, and add
2294 z_type parameter.
2295 (gdb_condition_true_at_breakpoint): Reimplement.
2296 (add_breakpoint_commands): Take a struct breakpoint pointer
2297 instead of an address. Adjust.
2298 (gdb_no_commands_at_breakpoint): Rename to ...
2299 (gdb_no_commands_at_breakpoint_z_type): ... this. Add z_type
2300 parameter. Return true if no breakpoint was found. Change debug
2301 output.
2302 (gdb_no_commands_at_breakpoint): Reimplement.
2303 (run_breakpoint_commands): Rename to ...
2304 (run_breakpoint_commands_z_type): ... this. Add z_type parameter,
2305 and change return type to boolean.
2306 (run_breakpoint_commands): New function.
2307 (gdb_breakpoint_here): Also check for Z1 breakpoints.
2308 (uninsert_raw_breakpoint): Don't try to reinsert a disabled
2309 breakpoint. Go through the_target->remove_point instead of
2310 assuming memory breakpoint.
2311 (uninsert_breakpoints_at, uninsert_all_breakpoints): Uninsert
2312 software and hardware breakpoints.
2313 (reinsert_raw_breakpoint): Go through the_target->insert_point
2314 instead of assuming memory breakpoint.
2315 (reinsert_breakpoints_at, reinsert_all_breakpoints): Reinsert
2316 software and hardware breakpoints.
2317 (check_breakpoints, breakpoint_here, breakpoint_inserted_here):
2318 Check both software and hardware breakpoints.
2319 (validate_inserted_breakpoint): Assert the breakpoint is a
2320 software breakpoint. Set the inserted flag to -1 instead of
2321 setting shlib_disabled.
2322 (delete_disabled_breakpoints): Adjust.
2323 (validate_breakpoints): Only validate software breakpoints.
2324 Adjust to inserted flag change.
2325 (check_mem_read, check_mem_write): Skip breakpoint types other
2326 than software breakpoints. Adjust to inserted flag change.
2327 * mem-break.h (enum raw_bkpt_type): New enum.
2328 (raw_breakpoint, struct process_info): Forward declare.
2329 (Z_packet_to_target_hw_bp_type): Delete declaration.
2330 (raw_bkpt_type_to_target_hw_bp_type, Z_packet_to_raw_bkpt_type)
2331 (set_gdb_breakpoint, delete_gdb_breakpoint)
2332 (clear_breakpoint_conditions): New declarations.
2333 (set_gdb_breakpoint_at, clear_gdb_breakpoint_conditions): Delete.
2334 (breakpoint_inserted_here): Update comment.
2335 (add_breakpoint_condition, add_breakpoint_commands): Replace
2336 address parameter with a breakpoint pointer parameter.
2337 (gdb_breakpoint_here): Update comment.
2338 (delete_gdb_breakpoint_at): Delete.
2339 (insert_memory_breakpoint, remove_memory_breakpoint): Declare.
2340 * server.c (process_point_options): Take a struct breakpoint
2341 pointer instead of an address. Adjust.
2342 (process_serial_event) <Z/z packets>: Use set_gdb_breakpoint and
2343 delete_gdb_breakpoint.
2344 * spu-low.c (spu_target_ops): Install NULL as
2345 supports_z_point_type method.
2346 * target.h: Include mem-break.h.
2347 (struct target_ops) <prepare_to_access_memory>: Update comment.
2348 <supports_z_point_type>: New field.
2349 <insert_point, remove_point>: Take an enum raw_bkpt_type argument
2350 instead of a char. Also take a raw breakpoint pointer.
2351 * win32-arm-low.c (the_low_target): Install NULL as
2352 supports_z_point_type.
2353 * win32-i386-low.c (i386_supports_z_point_type): New function.
2354 (i386_insert_point, i386_remove_point): Adjust to new interface.
2355 (the_low_target): Install i386_supports_z_point_type.
2356 * win32-low.c (win32_supports_z_point_type): New function.
2357 (win32_insert_point, win32_remove_point): Adjust to new interface.
2358 (win32_target_ops): Install win32_supports_z_point_type.
2359 * win32-low.h (struct win32_target_ops):
2360 <supports_z_point_type>: New method.
2361 <insert_point, remove_point>: Take an enum raw_bkpt_type argument
2362 instead of a char. Also take a raw breakpoint pointer.
2363
932539e3
PA
23642014-05-20 Pedro Alves <palves@redhat.com>
2365
2366 * mem-break.h: Include break-common.h.
2367 (Z_PACKET_SW_BP, Z_PACKET_HW_BP, Z_PACKET_WRITE_WP)
2368 (Z_PACKET_READ_WP, Z_PACKET_ACCESS_WP): New defines.
2369 (Z_packet_to_target_hw_bp_type): New declaration.
2370 * mem-break.c (Z_packet_to_target_hw_bp_type): New function.
2371 * i386-low.c (Z_PACKET_HW_BP, Z_PACKET_WRITE_WP, Z_PACKET_READ_WP)
2372 (Z_PACKET_ACCESS_WP): Delete macros.
2373 (Z_packet_to_hw_type): Delete function.
2374 * i386-low.h: Don't include break-common.h here.
2375 (Z_packet_to_hw_type): Delete declaration.
2376 * linux-x86-low.c (x86_insert_point, x86_insert_point): Call
2377 Z_packet_to_target_hw_bp_type instead of Z_packet_to_hw_type.
2378 * win32-i386-low.c (i386_insert_point, i386_remove_point): Call
2379 Z_packet_to_target_hw_bp_type instead of Z_packet_to_hw_type.
2380 * linux-aarch64-low.c: Don't include break-common.h here.
2381 (Z_PACKET_SW_BP, Z_PACKET_HW_BP, Z_PACKET_WRITE_WP)
2382 (Z_PACKET_READ_WP, Z_PACKET_ACCESS_WP): Delete macros.
2383 (Z_packet_to_target_hw_bp_type): Delete function.
2384 * linux-mips-low.c (rsp_bp_type_to_target_hw_bp_type): Delete
2385 function.
2386 (mips_insert_point, mips_remove_point): Use
2387 Z_packet_to_target_hw_bp_type.
2388
4ff0d3d8
PA
23892014-05-20 Pedro Alves <palves@redhat.com>
2390
2391 * linux-aarch64-low.c: Include break-common.h.
2392 (enum target_point_type): Delete.
2393 (Z_packet_to_point_type): Rename to ...
2394 (Z_packet_to_target_hw_bp_type): ... this, and return a
2395 target_hw_bp_type instead.
2396 (aarch64_show_debug_reg_state): Take an enum target_hw_bp_type
2397 instead of an enum target_point_type.
2398 (aarch64_point_encode_ctrl_reg): Likewise. Compute type mask from
2399 breakpoint type.
2400 (aarch64_dr_state_insert_one_point)
2401 (aarch64_dr_state_remove_one_point, aarch64_handle_breakpoint)
2402 (aarch64_handle_aligned_watchpoint)
2403 (aarch64_handle_unaligned_watchpoint, aarch64_handle_watchpoint):
2404 Take an enum target_hw_bp_type instead of an enum
2405 target_point_type.
2406 (aarch64_supports_z_point_type): New function.
2407 (aarch64_insert_point, aarch64_remove_point): Use it. Adjust to
2408 use Z_packet_to_target_hw_bp_type.
2409
786dc519
JB
24102014-05-20 Joel Brobecker <brobecker@adacore.com>
2411
2412 * configure.ac: Only use -Werror by default when DEVELOPMENT
2413 is true.
2414 * configure: Regenerate.
2415
9e0aa64f
JK
24162014-05-19 Jan Kratochvil <jan.kratochvil@redhat.com>
2417
2418 Fix gdbserver qGetTLSAddr for x86_64 -m32.
2419 * linux-x86-low.c (X86_64_USER_REGS): New.
2420 (x86_fill_gregset): Call memset for BUF first in x86_64 -m32 case.
2421
2b577b92
YQ
24222014-04-28 Yao Qi <yao@codesourcery.com>
2423
2424 * Makefile.in (i386-avx512.c): Fix the typo of generated file
2425 name.
2426
94611da2
PA
24272014-04-25 Pedro Alves <palves@redhat.com>
2428
2429 PR server/16255
2430 * linux-low.c (linux_attach_fail_reason_string): New function.
2431 (linux_attach_lwp): Delete.
2432 (linux_attach_lwp_1): Rename to ...
2433 (linux_attach_lwp): ... this. Take a ptid instead of a pid as
2434 argument. Remove "initial" parameter. Return int instead of
2435 void. Don't error or warn here.
2436 (linux_attach): Adjust to call linux_attach_lwp. Call error on
2437 failure to attach to the tgid. Call warning when failing to
2438 attach to an lwp.
2439 * linux-low.h (linux_attach_lwp): Take a ptid instead of a pid as
2440 argument. Remove "initial" parameter. Return int instead of
2441 void. Don't error or warn here.
2442 (linux_attach_fail_reason_string): New declaration.
2443 * thread-db.c (attach_thread): Adjust to linux_attach_lwp's
2444 interface change. Use linux_attach_fail_reason_string.
2445
01f9f808
MS
24462014-04-24 Michael Sturm <michael.sturm@mintel.com>
2447 Walfred Tedeschi <walfred.tedeschi@intel.com>
2448
2449 * Makefile.in: Added rules to handle new files
2450 i386-avx512.c i386-avx512-linux.c amd64-avx512.c
2451 amd64-avx512-linux.c x32-avx512.c x32-avx512-linux.c.
2452 * configure.srv (srv_i386_regobj): Add i386-avx512.o.
2453 (srv_i386_linux_regobj): Add i386-avx512-linux.o.
2454 (srv_amd64_regobj): Add amd64-avx512.o and x32-avx512.o.
2455 (srv_amd64_linux_regobj): Add amd64-avx512-linux.o and
2456 x32-avx512-linux.o.
2457 (srv_i386_32bit_xmlfiles): Add i386/32bit-avx512.xml.
2458 (srv_i386_64bit_xmlfiles): Add i386/64bit-avx512.xml.
2459 (srv_amd64_xmlfiles): Add i386/amd64-avx512.xml and
2460 i386/x32-avx512.xml.
2461 (srv_i386_linux_xmlfiles): Add i386/i386-avx512-linux.xml.
2462 (srv_amd64_linux_xmlfiles): Add i386/amd64-avx512-linux.xml and
2463 i386/x32-avx512-linux.xml.
2464 * i387-fp.c (num_avx512_k_registers): New constant for number
2465 of K registers.
2466 (num_avx512_zmmh_low_registers): New constant for number of
2467 lower ZMM registers (0-15).
2468 (num_avx512_zmmh_high_registers): New constant for number of
2469 higher ZMM registers (16-31).
2470 (num_avx512_ymmh_registers): New contant for number of higher
2471 YMM registers (ymm16-31 added by avx521 on x86_64).
2472 (num_avx512_xmm_registers): New constant for number of higher
2473 XMM registers (xmm16-31 added by AVX512 on x86_64).
2474 (struct i387_xsave): Add space for AVX512 registers.
2475 (i387_cache_to_xsave): Change raw buffer size to 64 characters.
2476 Add code to handle AVX512 registers.
2477 (i387_xsave_to_cache): Add code to handle AVX512 registers.
2478 * linux-x86-low.c (init_registers_amd64_avx512_linux): New
2479 prototypei from generated file.
2480 (tdesc_amd64_avx512_linux): Likewise.
2481 (init_registers_x32_avx512_linux): Likewise.
2482 (tdesc_x32_avx512_linux): Likewise.
2483 (init_registers_i386_avx512_linux): Likewise.
2484 (tdesc_i386_avx512_linux): Likewise.
2485 (x86_64_regmap): Add AVX512 registers.
2486 (x86_linux_read_description): Add code to handle AVX512 XSTATE
2487 mask.
2488 (initialize_low_arch): Add code to initialize AVX512 registers.
2489
51aa91f9
PA
24902014-04-23 Pedro Alves <palves@redhat.com>
2491
2492 * mem-break.c (find_gdb_breakpoint_at): Make static.
2493 * mem-break.h (find_gdb_breakpoint_at): Delete declaration.
2494
a4165e94
PA
24952014-04-23 Pedro Alves <palves@redhat.com>
2496
2497 * i386-low.c: Don't include break-common.h here.
2498 (i386_low_insert_watchpoint, i386_low_remove_watchpoint): Change
2499 prototype to take target_hw_bp_type as argument instead of a Z
2500 packet char.
2501 * i386-low.h: Include break-common.h here.
2502 (Z_packet_to_hw_type): Declare.
2503 (i386_low_insert_watchpoint, i386_low_remove_watchpoint): Change
2504 prototypes.
2505 * linux-x86-low.c (x86_insert_point): Convert the packet number to
2506 a target_hw_bp_type before calling i386_low_insert_watchpoint.
2507 (x86_remove_point): Convert the packet number to a
2508 target_hw_bp_type before calling i386_low_remove_watchpoint.
2509 * win32-i386-low.c (i386_insert_point): Convert the packet number
2510 to a target_hw_bp_type before calling i386_low_insert_watchpoint.
2511 (i386_remove_point): Convert the packet number to a
2512 target_hw_bp_type before calling i386_low_remove_watchpoint.
2513
b8acf843
PA
25142014-04-23 Pedro Alves <palves@redhat.com>
2515
2516 * utils.h (perror_with_name): Add ATTRIBUTE_NORETURN.
2517
d708bcd1
PA
25182014-04-10 Pedro Alves <palves@redhat.com>
2519
2520 * mem-break.c (add_breakpoint_condition, add_breakpoint_commands):
2521 Check if the condition or command is NULL before checking if the
2522 breakpoint is known. On success, return true.
2523 * mem-break.h (add_breakpoint_condition): Document return.
2524 (add_breakpoint_commands): Add describing comment.
2525 * server.c (skip_to_semicolon): New function.
2526 (process_point_options): Use it.
2527
2eec7d5b
PA
25282014-04-09 Pedro Alves <palves@redhat.com>
2529
2530 * linux-low.c (linux_read_loadmap): Pass current_inferior directly
2531 to lwpid_of.
2532
fa96cb38
PA
25332014-02-27 Pedro Alves <palves@redhat.com>
2534
2535 PR 12702
2536 * inferiors.h (A_I_NEXT, ALL_INFERIORS_TYPE, ALL_PROCESSES): New
2537 macros.
2538 * linux-low.c (delete_lwp, handle_extended_wait): Add debug
2539 output.
2540 (last_thread_of_process_p): Take a PID argument instead of a
2541 thread pointer.
2542 (linux_wait_for_lwp): Delete.
2543 (num_lwps, check_zombie_leaders, not_stopped_callback): New
2544 functions.
2545 (linux_low_filter_event): New function, party factored out from
2546 linux_wait_for_event.
2547 (linux_wait_for_event): Rename to ...
2548 (linux_wait_for_event_filtered): ... this. Add new filter ptid
2549 argument. Partly rewrite. Always use waitpid(-1, WNOHANG) and
2550 sigsuspend. Check for zombie leaders.
2551 (linux_wait_for_event): Reimplement as wrapper around
2552 linux_wait_for_event_filtered.
2553 (linux_wait_1): Handle TARGET_WAITKIND_NO_RESUMED. Assume that if
2554 a normal or signal exit is seen, it's the whole process exiting.
2555 (wait_for_sigstop): No longer a for_each_inferior callback.
2556 Rewrite on top of linux_wait_for_event_filtered.
2557 (stop_all_lwps): Call wait_for_sigstop directly.
2558 * server.c (resume, handle_target_event): Handle
2559 TARGET_WAITKIND_NO_RESUMED.
2560
d763de10
JB
25612014-02-26 Joel Brobecker <brobecker@adacore.com>
2562
2563 * win32-low.c (psapi_get_dll_name,
2564 * win32_CreateToolhelp32Snapshot): Delete.
2565 (win32_CreateToolhelp32Snapshot, win32_Module32First)
2566 (win32_Module32Next, load_toolhelp, toolhelp_get_dll_name):
2567 Delete.
2568 (handle_load_dll): Add function description.
2569 Remove code using psapi_get_dll_name and toolhelp_get_dll_name.
2570
850a0f76
JB
25712014-02-26 Joel Brobecker <brobecker@adacore.com>
2572
2573 * win32-low.c (win32_add_one_solib): Add 0x1000 to load_addr.
2574 Add comment.
2575 (win32_add_all_dlls): Remove 0x1000 offset applied to DLL
2576 base address when calling win32_add_one_solib.
2577 (handle_load_dll): Delete local variable load_addr.
2578 Remove 0x1000 offset applied to DLL base address when calling
2579 win32_add_one_solib.
2580 (handle_unload_dll): Add comment.
2581
f25b3fc3
JB
25822014-02-26 Joel Brobecker <brobecker@adacore.com>
2583
2584 * win32-low.c (win32_add_all_dlls): Renames
2585 win32_ensure_ntdll_loaded. Rewrite function documentation.
2586 Adjust implementation to always load all DLLs.
2587 Add 0x1000 offset to DLL base address when calling
2588 win32_add_one_solib.
2589 (child_initialization_done): New static global.
2590 (do_initial_child_stuff): Set child_initialization_done to
2591 zero during child initialization, and 1 after. Replace call
2592 to win32_ensure_ntdll_loaded by call to win32_add_all_dlls.
2593 Add comment.
2594 (match_dll_by_basename, dll_is_loaded_by_basename): Delete.
2595 (handle_unload_dll): Add function documentation.
2596 (get_child_debug_event): Ignore load and unload DLL events
2597 during child initialization.
2598
d86d4aaf
DE
25992014-02-20 Doug Evans <dje@google.com>
2600
3bc32da3 2601 Remove global all_lwps.
d86d4aaf
DE
2602 * inferiors.h (ptid_of): Move here from linux-low.h.
2603 (pid_of, lwpid_of): Ditto.
2604 * linux-aarch64-low.c (debug_reg_change_callback): Update, "entry"
2605 parameter is a struct thread_info * now.
2606 (aarch64_notify_debug_reg_change): Fetch pid from current_inferior
2607 directly. Pass &all_threads to find_inferior instead of &all_lwps.
2608 (aarch64_stopped_data_address): Fetch lwpid from current_inferior
2609 directly.
2610 (aarch64_linux_prepare_to_resume): Fetch ptid from thread.
2611 (aarch64_arch_setup): Fetch lwpid from current_inferior directly.
2612 * linux-arm-low.c (update_registers_callback): Update, "entry"
2613 parameter is a struct thread_info * now.
2614 Fetch lwpid from current_inferior directly.
2615 (arm_insert_point): Pass &all_threads to find_inferior instead of
2616 &all_lwps.
2617 (arm_remove_point): Ditto.
2618 (arm_stopped_by_watchpoint): Fetch lwp from current_inferior.
2619 (arm_prepare_to_resume): Fetch pid from thread.
2620 (arm_read_description): Fetch lwpid from current_inferior directly.
2621 * linux-low.c (all_lwps): Delete.
2622 (delete_lwp): Delete call to remove_inferior.
2623 (handle_extended_wait): Fetch lwpid from thread.
2624 (add_lwp): Don't set lwp->entry.id. Remove call to
2625 add_inferior_to_list.
2626 (linux_attach_lwp_1): Fetch pid from current_inferior directly.
2627 (linux_kill_one_lwp): Fetch ptid,lwpid from thread.
2628 (kill_one_lwp_callback): Ditto.
2629 (linux_kill): Don't dereference NULL pointer.
2630 Fetch ptid,lwpid from thread.
2631 (get_detach_signal): Fetch ptid from thread.
2632 (linux_detach_one_lwp): Fetch ptid,lwpid from thread.
2633 Simplify call to regcache_invalidate_thread.
2634 (delete_lwp_callback): Update, "entry" parameter is a
2635 struct thread_info * now. Fetch pid from thread.
2636 (linux_mourn): Pass &all_threads to find_inferior instead of &all_lwps.
2637 (status_pending_p_callback): Update, "entry" parameter is a
2638 struct thread_info * now. Fetch ptid from thread.
2639 (find_lwp_pid): Update, "entry" parameter is a
2640 struct thread_info * now.
2641 (linux_wait_for_lwp): Fetch pid from thread.
2642 (linux_fast_tracepoint_collecting): Fetch lwpid from thread.
2643 (maybe_move_out_of_jump_pad): Fetch lwpid from current_inferior.
2644 (enqueue_one_deferred_signal): Fetch lwpid from thread.
2645 (dequeue_one_deferred_signal): Ditto.
2646 (cancel_breakpoint): Fetch ptid from current_inferior.
2647 (linux_wait_for_event): Pass &all_threads to find_inferior,
2648 not &all_lwps. Fetch ptid, lwpid from thread.
2649 (count_events_callback): Update, "entry" parameter is a
2650 struct thread_info * now.
2651 (select_singlestep_lwp_callback): Ditto.
2652 (select_event_lwp_callback): Ditto.
2653 (cancel_breakpoints_callback): Ditto.
2654 (linux_cancel_breakpoints): Pass &all_threads to find_inferior,
2655 not &all_lwps.
2656 (select_event_lwp): Ditto. Fetch ptid from event_thread.
2657 (unsuspend_one_lwp): Update, "entry" parameter is a
2658 struct thread_info * now.
2659 (unsuspend_all_lwps): Pass &all_threads to find_inferior,
2660 not &all_lwps.
2661 (linux_stabilize_threads): Ditto. And for for_each_inferior.
2662 Fetch lwpid from thread, not lwp.
2663 (linux_wait_1): Fetch ptid, lwpid from current_inferior.
2664 Pass &all_threads to find_inferior, not &all_lwps.
2665 (send_sigstop): Fetch lwpid from thread, not lwp.
2666 (send_sigstop_callback): Update, "entry" parameter is a
2667 struct thread_info * now.
2668 (suspend_and_send_sigstop_callback): Ditto.
2669 (wait_for_sigstop): Ditto. Fetch ptid, lwpid from thread, lwp.
2670 (stuck_in_jump_pad_callback): Update, "entry" parameter is a
2671 struct thread_info * now.
2672 (move_out_of_jump_pad_callback): Ditto. Fetch ptid, lwpid
2673 from thread, lwp.
2674 (lwp_running): Update, "entry" parameter is a
2675 struct thread_info * now.
2676 (stop_all_lwps): Fetch ptid from thread.
2677 Pass &all_threads to find_inferior, for_each_inferior, not &all_lwps.
2678 (linux_resume_one_lwp): Fetch lwpid from thread.
2679 (linux_set_resume_request): Update, "entry" parameter is a
2680 struct thread_info * now. Fetch pid, lwpid from thread.
2681 (resume_status_pending_p): Update, "entry" parameter is a
2682 struct thread_info * now.
2683 (need_step_over_p): Ditto. Fetch lwpid from thread.
2684 (start_step_over): Fetch lwpid from thread.
2685 (linux_resume_one_thread): Update, "entry" parameter is a
2686 struct thread_info * now. Fetch lwpid from thread.
2687 (linux_resume): Pass &all_threads to find_inferior, not &all_lwps.
2688 (proceed_one_lwp): Update, "entry" parameter is a
2689 struct thread_info * now. Fetch lwpid from thread.
2690 (unsuspend_and_proceed_one_lwp): Update, "entry" parameter is a
2691 struct thread_info * now.
2692 (proceed_all_lwps): Pass &all_threads to find_inferior, not &all_lwps.
2693 (unstop_all_lwps): Ditto. Fetch lwpid from thread.
2694 (regsets_fetch_inferior_registers): Fetch lwpid from current_inferior
2695 directly.
2696 (regsets_store_inferior_registers): Ditto.
2697 (fetch_register, store_register): Ditto.
2698 (linux_read_memory, linux_write_memory): Ditto.
2699 (linux_request_interrupt): Ditto.
2700 (linux_read_auxv): Ditto.
2701 (linux_xfer_siginfo): Ditto.
2702 (linux_qxfer_spu): Ditto.
2703 (linux_qxfer_libraries_svr4): Ditto.
2704 * linux-low.h (ptid_of, pid_of, lwpid_of): Delete,
2705 moved to inferiors.h.
2706 (get_lwp): Delete.
2707 (get_thread_lwp): Update.
2708 (struct lwp_info): Delete member "entry". Simplify comment for
2709 member "thread".
2710 (all_lwps): Delete.
2711 * linux-mips-low.c (mips_read_description): Fetch lwpid from
2712 current_inferior directly.
2713 (update_watch_registers_callback): Update, "entry" parameter is a
2714 struct thread_info * now. Fetch pid from thread.
2715 (mips_linux_prepare_to_resume): Fetch ptid from thread.
2716 (mips_insert_point): Fetch lwpid from current_inferior.
2717 Pass &all_threads to find_inferior, not &all_lwps.
2718 (mips_remove_point): Pass &all_threads to find_inferior, not &all_lwps.
2719 (mips_stopped_by_watchpoint): Fetch lwpid from current_inferior
2720 directly.
2721 (mips_stopped_data_address): Ditto.
2722 * linux-s390-low.c (s390_arch_setup): Fetch pid from current_inferior
2723 directly.
2724 * linux-tile-low.c (tile_arch_setup): Ditto.
2725 * linux-x86-low.c (x86_get_thread_area): Fetch lwpid from thread.
2726 (update_debug_registers_callback): Update, "entry" parameter is a
2727 struct thread_info * now. Fetch pid from thread.
2728 (i386_dr_low_set_addr): Fetch pid from current_inferior directly.
2729 Pass &all_threads to find_inferior, not &all_lwps.
2730 (i386_dr_low_get_addr): Fetch ptid from current_inferior directly.
2731 (i386_dr_low_set_control): Fetch pid from current_inferior directly.
2732 Pass &all_threads to find_inferior, not &all_lwps.
2733 (i386_dr_low_get_control): Fetch ptid from current_inferior directly.
2734 (i386_dr_low_get_status): Ditto.
2735 (x86_linux_prepare_to_resume): Fetch ptid from thread.
2736 (x86_siginfo_fixup): Fetch lwpid from current_inferior directly.
2737 (x86_linux_read_description): Ditto.
2738 * proc-service.c (ps_getpid): Fetch pid from current_inferior directly.
2739
3b8361aa
DE
27402014-02-20 Doug Evans <dje@google.com>
2741
2742 * inferiors.c (get_first_inferior): Fix buglet.
2743
f7667f0d
DE
27442014-02-19 Doug Evans <dje@google.com>
2745
2746 * gdbthread.h (add_thread): Change result type to struct thread_info *.
2747 * inferiors.c (add_thread): Change result type to struct thread_info *.
2748 All callers updated.
2749 (add_lwp): Call add_thread here instead of in callers.
2750 All callers updated.
2751 * linux-low.h (get_lwp_thread): Rewrite.
2752 (struct lwp_info): New member "thread".
2753
b3312d80
DE
27542014-02-19 Doug Evans <dje@google.com>
2755
2756 * linux-low.c (add_lwp): Change result to struct lwp_info *.
2757 All callers updated.
2758
ecc6f45c
DE
27592014-02-19 Doug Evans <dje@google.com>
2760
2761 * inferiors.c (add_thread): Fix whitespace.
2762
649ebbca
DE
27632014-02-19 Doug Evans <dje@google.com>
2764
2765 * dll.c (clear_dlls): Replace accessing list implemention details
2766 with API function.
2767 * gdbthread.h (get_first_thread): Declare.
2768 * inferiors.c (for_each_inferior_with_data): New function.
2769 (get_first_thread): New function.
2770 (find_thread_ptid): Simplify.
2771 (get_first_inferior): New function.
2772 (clear_list): Delete.
2773 (one_inferior_p): New function.
2774 (clear_inferior_list): New function.
2775 (clear_inferiors): Update.
2776 * inferiors.h (for_each_inferior_with_data): Declare.
2777 (clear_inferior_list): Declare.
2778 (one_inferior_p): Declare.
2779 (get_first_inferior): Declare.
2780 * linux-low.c (linux_wait_for_event): Replace accessing list
2781 implemention details with API function.
2782 * server.c (target_running): Ditto.
2783 (accumulate_file_name_length): New function.
2784 (emit_dll_description): New function.
2785 (handle_qxfer_libraries): Replace accessing list implemention
2786 details with API function.
2787 (handle_qxfer_threads_worker): New function.
2788 (handle_qxfer_threads_proper): Replace accessing list implemention
2789 details with API function.
2790 (handle_query): Ditto.
2791 (visit_actioned_threads_callback_ftype): New typedef.
2792 (visit_actioned_threads_data): New struct.
2793 (visit_actioned_threads): Rewrite to be find_inferior callback.
2794 (resume): Call find_inferior.
2795 (handle_status): Replace accessing list implemention
2796 details with API function.
2797 (process_serial_event): Replace accessing list implemention details
2798 with API function.
2799 * target.c (set_desired_inferior): Replace accessing list implemention
2800 details with API function.
2801 * tracepoint.c (same_process_p): New function.
2802 (gdb_agent_about_to_close): Replace accessing list implemention
2803 details with API function.
2804 * win32-low.c (child_delete_thread): Replace accessing list
2805 implemention details with API function.
2806 (match_dll_by_basename): New function.
2807 (dll_is_loaded_by_basename): New function.
2808 (win32_ensure_ntdll_loaded): Replace accessing list implemention
2809 details call to dll_is_loaded_by_basename.
2810
80894984
DE
28112014-02-19 Doug Evans <dje@google.com>
2812
2813 * dll.h (struct dll_info): Add comment.
2814 * gdbthread.h (struct thread_info): Add comment.
2815 (current_ptid): Simplify.
2816 * inferiors.c (add_process): Update.
2817 (remove_process): Update.
2818 * inferiors.h (struct process_info): Rename member "head" to "entry".
2819 * linux-low.c (delete_lwp): Update.
2820 (add_lwp): Update.
2821 (last_thread_of_process_p): Update.
2822 (kill_one_lwp_callback, linux_kill): Update.
2823 (status_pending_p_callback): Update.
2824 (wait_for_sigstop): Update. Simplify read of ptid.
2825 (start_step_over): Update.
2826 * linux-low.h (ptid_of, pid_of, lwpid_of): Update.
2827 (get_lwp_thread): Update.
2828 (struct lwp_info): Rename member "head" to "entry".
2829 * regcache.h (inferior_list_entry): Delete.
2830 * server.c (kill_inferior_callback): Update.
2831 (detach_or_kill_inferior_callback): Update.
2832 (print_started_pid): Update.
2833 (print_attached_pid): Update.
2834 (process_serial_event): Simplify read of ptid.
2835 * thread-db.c (thread_db_create_event): Update.
2836 (thread_db_get_tls_address): Update.
2837 * win32-low.c (current_inferior_ptid): Simplify.
2838
46917d26
TT
28392014-02-19 Tom Tromey <tromey@redhat.com>
2840
2841 * target.h (struct target_ops) <supports_btrace>: Add target_ops
2842 argument.
2843 (target_supports_btrace): Update.
2844
0759a81e
YQ
28452014-02-14 Yao Qi <yao@codesourcery.com>
2846
2847 * Makefile.in (IPA_OBJS): Append rsp-low-ipa.o.
2848 (rsp-low-ipa.o): New target.
2849
a7191e8b
TT
28502014-02-12 Tom Tromey <tromey@redhat.com>
2851
2852 * ax.c (gdb_parse_agent_expr): Use hex2bin, not
2853 convert_ascii_to_int.
2854 * regcache.c (registers_to_string): Likewise.
2855 * remote-utils.c (decode_M_packet): Likewise.
2856 * server.c (process_serial_event): Likewise.
2857
ff0e980e
TT
28582014-02-12 Tom Tromey <tromey@redhat.com>
2859
2860 * server.c (handle_query, handle_v_run): Use hex2bin, not
2861 unhexify.
2862 * tracepoint.c (cmd_qtdpsrc, cmd_qtdv, cmd_qtnotes): Likewise.
2863
e9371aff
TT
28642014-02-12 Tom Tromey <tromey@redhat.com>
2865
2866 * ax.c (gdb_unparse_agent_expr): Use bin2hex, not
2867 convert_int_to_ascii.
2868 * regcache.c (registers_to_string, collect_register_as_string):
2869 Likewise.
2870 * remote-utils.c (look_up_one_symbol, relocate_instruction):
2871 Likewise.
2872 * server.c (process_serial_event): Likewise.
2873 * tracepoint.c (cmd_qtstatus, response_source, response_tsv)
2874 (cmd_qtbuffer, cstr_to_hexstr): Likewise.
2875
971dc0b8
TT
28762014-02-12 Tom Tromey <tromey@redhat.com>
2877
2878 * remote-utils.c (look_up_one_symbol, monitor_output): Use
2879 bin2hex, not hexify.
2880 * tracepoint.c (cmd_qtstatus): Likewise.
2881
0a822afb
TT
28822014-02-12 Tom Tromey <tromey@redhat.com>
2883
2884 * remote-utils.c (monitor_output): Pass explicit length to
2885 hexify.
2886
9c3d6531
TT
28872014-02-12 Tom Tromey <tromey@redhat.com>
2888
2889 * tracepoint.c: Include rsp-low.h.
2890 * server.c: Include rsp-low.h.
2891 * remote-utils.h (convert_ascii_to_int, convert_int_to_ascii)
2892 (unhexify, hexify, remote_escape_output, unpack_varlen_hex): Don't
2893 declare.
2894 * remote-utils.c: Include rsp-low.h.
2895 (fromhex, hexchars, ishex, unhexify, tohex, hexify)
2896 (remote_escape_output, remote_unescape_input, unpack_varlen_hex)
2897 (convert_int_to_ascii, convert_ascii_to_int): Move to
2898 common/rsp-low.c.
2899 * regcache.c: Include rsp-low.h.
2900 * ax.c: Include rsp-low.h.
2901 * Makefile.in (SFILES): Add common/rsp-low.c.
2902 (OBS): Add rsp-low.o.
2903 (rsp-low.o): New target.
2904
01fd3ea5
TT
29052014-02-12 Tom Tromey <tromey@redhat.com>
2906
2907 * utils.h (pulongest, plongest, phex_nz): Don't declare.
2908 Include print-utils.h.
2909 * utils.c (NUMCELLS, CELLSIZE, get_cell, decimal2str, pulongest)
2910 (plongest, thirty_two, phex_nz): Remove.
2911 * Makefile.in (SFILES): Add common/print-utils.c.
2912 (OBS): Add print-utils.o.
2913 (print-utils-ipa.o): New target.
2914 (print-utils.o): New target.
2915 (IPA_OBJS): Add print-utils-ipa.o.
2916
e99dc820
TT
29172014-02-06 Tom Tromey <tromey@redhat.com>
2918
2919 * Makefile.in (SFILES): Fix indentation.
2920
ee1e2d4f
DE
29212014-02-05 Doug Evans <dje@google.com>
2922
2923 * linux-low.c (linux_wait_for_event): Improve comment.
2924 (linux_wait_1): Keep current_inferior in sync with event_child.
2925
f5a02773
DE
29262014-01-22 Doug Evans <dje@google.com>
2927
2928 * gdbthread.h (gdb_id_to_thread): Delete, unused.
2929
87ce2a04
DE
29302014-01-22 Doug Evans <dje@google.com>
2931
2932 * configure.ac (AC_CHECK_FUNCS): Add test for gettimeofday.
2933 * configure: Regenerate.
2934 * config.in: Regenerate.
2935 * Makefile.in (SFILES): Add debug.c.
2936 (OBS): Add debug.o.
2937 * debug.c: New file.
2938 * debug.h: New file.
2939 * linux-aarch64-low.c (*): Update all debugging printfs to use
2940 debug_printf instead of fprintf.
2941 * linux-arm-low.c (*): Ditto.
2942 * linux-cris-low.c (*): Ditto.
2943 * linux-crisv32-low.c (*): Ditto.
2944 * linux-m32r-low.c (*): Ditto.
2945 * linux-sparc-low.c (*): Ditto.
2946 * linux-x86.c (*): Ditto.
2947 * linux-low.c (*): Ditto.
2948 (linux_wait_1): Add calls to debug_enter, debug_exit.
2949 (linux_wait): Remove redundant debugging printf.
2950 (stop_all_lwps): Add calls to debug_enter, debug_exit.
2951 (linux_resume, unstop_all_lwps): Ditto.
2952 * mem-break.c (*): Update all debugging printfs to use
2953 debug_printf instead of fprintf.
2954 * remote-utils.c (*): Ditto.
2955 * thread-db.c (*): Ditto.
2956 * server.c #include <ctype.h>, "gdb_vecs.h".
2957 (debug_threads): Moved to debug.c.
2958 (*): Update all debugging printfs to use debug_printf instead of
2959 fprintf.
2960 (start_inferior): Replace call to fflush with call to debug_flush.
2961 (monitor_show_help): Mention set debug-format.
2962 (parse_debug_format_options): New function.
2963 (handle_monitor_command): Handle "monitor set debug-format".
2964 (gdbserver_usage): Mention --debug-format.
2965 (main): Parse --debug-format.
2966 * server.h (debug_threads): Declaration moved to debug.h.
2967 #include "debug.h".
2968 * tracepoint.c (trace_debug_1) [!IN_PROCESS_AGENT]: Add version of
2969 trace_debug_1 that uses debug_printf.
2970 (tracepoint_look_up_symbols): Update all debugging printfs to use
2971 debug_printf instead of fprintf.
2972
e671835b
BS
29732014-01-20 Baruch Siach <baruch@tkos.co.il>
2974
2975 * linux-xtensa-low.c: Include asm/ptrace.h instead of
2976 sys/ptrace.h.
2977
b5737fa9
PA
29782014-01-17 Pedro Alves <palves@redhat.com>
2979
ea38d2a9 2980 PR build/16445
c7faa97a
PA
2981 * linux-x86-low.c: Don't include elf/common.h if ELFMAG0 is
2982 defined after including gdb_proc_service.h.
b5737fa9 2983
40ed484e
DE
29842014-01-16 Doug Evans <dje@google.com>
2985
2986 * dll.c (UNSPECIFIED_CORE_ADDR): New macro.
2987 (match_dll): Use it.
2988
969c39fb
MM
29892014-01-16 Markus Metzger <markus.t.metzger@intel.com>
2990
2991 * target.h (target_ops) <read_btrace>: Change parameters and
2992 return type to allow error reporting.
2993 * server.c (handle_qxfer_btrace): Support delta reads. Pass
2994 trace reading errors on.
2995 * linux-low.c (linux_low_read_btrace): Pass trace reading
2996 errors on.
2997 (linux_low_disable_btrace): New.
2998
ab7f45ba
DE
29992014-01-15 Doug Evans <dje@google.com>
3000
3001 * inferiors.c (thread_id_to_gdb_id): Delete.
3002 * inferiors.h (thread_id_to_gdb_id): Delete.
3003
66af0f44
EZ
30042014-01-13 Eli Zaretskii <eliz@gnu.org>
3005
3006 * Makefile.in (INCLUDE_CFLAGS): Remove trailing slash from
3007 "-I$(srcdir)/../". Fixes MinGW compilation errors with old GCC
3008 versions.
3009
9939e131
PA
30102014-01-08 Pedro Alves <palves@redhat.com>
3011
3012 * server.c (handle_status): Don't discard previous queued stop
3013 replies or thread's pending status here.
3014 (main) <disconnection>: Do it here instead.
3015
b7ea362b
PA
30162014-01-08 Pedro Alves <palves@redhat.com>
3017
3018 * gdbthread.h (struct thread_info) <status_pending_p>: New field.
3019 * server.c (visit_actioned_threads, handle_pending_status): New
3020 function.
3021 (handle_v_cont): Factor out parts to ...
3022 (resume): ... this new function. If in all-stop, and a thread
3023 being resumed has a pending status, report it without actually
3024 resuming.
3025 (myresume): Adjust to use the new 'resume' function.
3026 (clear_pending_status_callback, set_pending_status_callback)
3027 (find_status_pending_thread_callback): New functions.
3028 (handle_status): Handle the case of multiple threads having
3029 interesting statuses to report. Report threads' real last signal
3030 instead of always reporting GDB_SIGNAL_TRAP. Look for a thread
3031 with an interesting thread to report the status for, instead of
3032 always reporting the status of the first thread.
3033
28498c42
JB
30342014-01-01 Joel Brobecker <brobecker@adacore.com>
3035
3036 * gdbserver.c (gdbserver_version): Set copyright year to 2014.
3037 * gdbreplay.c (gdbreplay_version): Likewise.
3038
f45c82da
YZ
30392013-12-18 Yufeng Zhang <yufeng.zhang@arm.com>
3040
3041 * linux-aarch64-low.c (aarch64_linux_set_debug_regs): Set
3042 iov.iov_len with the real length in use.
3043
379a5e2d
JB
30442013-12-13 Joel Brobecker <brobecker@adacore.com>
3045
3046 * Makefile.in (safe-ctype.o, lbasename.o): New rules.
3047 * configure.srv: Add safe-ctype.o and lbasename.o to srv_tgtobj
3048 for all targets that use win32-low.c.
3049 * win32-low.c (win32_ensure_ntdll_loaded): New function.
3050 (do_initial_child_stuff): Add call to win32_ensure_ntdll_loaded.
3051
4210d83e
PA
30522013-12-13 Pedro Alves <palves@redhat.com>
3053
3054 * target.c (mywait): Set OURSTATUS->KIND to TARGET_WAITKIND_STOPPED
3055 if equal to TARGET_WAITKIND_LOADED.
3056 * win32-low.c (cached_status): New static global.
3057 (win32_wait): Add declaration.
3058 (do_initial_child_stuff): Flush all initial pending debug events
3059 up to the initial breakpoint.
3060 (win32_wait): If CACHED_STATUS was set, return that instead
3061 of doing a real wait. Remove the code resuming the execution
3062 of the inferior after receiving a TARGET_WAITKIND_LOADED event
3063 during the initial phase. Also remove the code changing
3064 OURSTATUS->KIND from TARGET_WAITKIND_LOADED to
3065 TARGET_WAITKIND_STOPPED.
3066
e7f0d979
YQ
30672013-12-11 Yao Qi <yao@codesourcery.com>
3068
3069 * notif.c (handle_notif_ack): Return 0 if no notification
3070 matches.
3071
ebcf782c
DE
30722013-11-20 Doug Evans <dje@google.com>
3073
3074 * linux-low.c (linux_set_resume_request): Fix comment.
3075
20ad9378
DE
30762013-11-20 Doug Evans <dje@google.com>
3077
3078 * linux-low.c (resume_status_pending_p): Tweak comment.
3079
a196ebeb
WT
30802013-11-20 Walfred Tedeschi <walfred.tedeschi@intel.com>
3081
3082 * Makefile.in: Add i386-mpx.c, i386-mpx-linux.c, amd64-mpx.c,
3083 amd64-mpx-linux.c, x32-mpx.c and x32-mpx-linux.c generation.
3084 * configure.srv (srv_i386_regobj): Add i386-mpx.o.
3085 (srv_i386_linux_regobj): Add i386-mpx-linux.o.
3086 (srv_amd64_regobj): Add amd64-mpx.o.
3087 (srv_amd64_linux_regobj): Add amd64-mpx-linux.o.
3088 (srv_i386_32bit_xmlfiles): Add i386/32bit-mpx.xml.
3089 (srv_i386_64bit_xmlfiles): Add i386/64bit-mpx.xml.
3090 * i387-fp.c (num_pl_bnd_register) Added constant.
3091 (num_pl_bnd_cfg_registers) Added constant.
3092 (struct i387_xsave) Added reserved area and MPX fields.
3093 (i387_cache_to_xsave, i387_xsave_to_cache) Add MPX.
3094 * linux-x86-low.c (init_registers_i386_mpx_linux): Declare new
3095 function.
3096 (tdesc_i386_mpx_linux): Add MPX amd64 target.
3097 (init_registers_amd64_mpx_linux): Declare new function.
3098 (tdesc_amd64_mpx_linux): Add MPX amd64 target.
3099 (x86_64_regmap): Add MPX registers.
3100 (x86_linux_read_description): Add MPX case.
3101 (initialize_low_arch): Initialize MPX targets.
3102
0080a2f6
TT
31032013-11-18 Tom Tromey <tromey@redhat.com>
3104
3105 * configure: Rebuild.
3106 * configure.ac: Don't check for stdlib.h.
3107 * gdbreplay.c: Unconditionally include stdlib.h.
3108
2978b111
TT
31092013-11-18 Tom Tromey <tromey@redhat.com>
3110
3111 * config.in: Rebuild.
3112 * configure: Rebuild.
3113 * configure.ac: Don't use AC_HEADER_DIRENT.
3114
a3d08894
TT
31152013-11-18 Tom Tromey <tromey@redhat.com>
3116
3117 * server.h: Don't check HAVE_STRING_H.
3118 * gdbreplay.c: Don't check HAVE_STRING_H.
3119 * configure: Rebuild.
3120
0a5dd17d
TT
31212013-11-18 Tom Tromey <tromey@redhat.com>
3122
3123 * Makefile.in (gdbreplay$(EXEEXT)): Depend on and link against
3124 LIBGNU.
3125
1bd2f0ba
TT
31262013-11-08 Tom Tromey <tromey@redhat.com>
3127
3128 * configure, config.in: Rebuild.
3129 * configure.ac: Remove unused configury.
3130
3266f10b
TT
31312013-11-08 Tom Tromey <tromey@redhat.com>
3132
3133 * acinclude.m4: Include common.m4, codeset.m4.
3134 * configure, config.in: Rebuild.
3135 * configure.ac: Use GDB_AC_COMMON.
3136
6682d959
AA
31372013-11-06 Andreas Arnez <arnez@linux.vnet.ibm.com>
3138
3139 * linux-s390-low.c (HWCAP_S390_TE): New define.
3140 (s390_arch_setup): Consider the TE field in the HWCAP for
3141 determining 'have_regset_tdb'.
3142
fd0a4d76
SDJ
31432013-10-16 Sergio Durigan Junior <sergiodj@redhat.com>
3144
3145 PR gdb/16014
3146 * tracepoint.c (download_tracepoint_1): Remove unnecessary double
3147 call to sizeof.
3148
1a3d890b
PA
31492013-10-02 Pedro Alves <palves@redhat.com>
3150
3151 * server.c (process_serial_event): Don't output "GDBserver
3152 exiting" if GDB is connected through stdio.
3153 * target.c (mywait): Likewise, be silent if GDB is connected
3154 through stdio.
3155
97ad4581
JB
31562013-10-01 Joel Brobecker <brobecker@adacore.com>
3157
3158 * lynx-low.c (lynx_add_threads_after_attach): New function.
3159 (lynx_attach): Remove call to add_thread. Add call to
3160 lynx_add_threads_after_attach instead.
3161
5b4e221c
MF
31622013-09-28 Mike Frysinger <vapier@gentoo.org>
3163
3164 * configure.ac (AC_CHECK_HEADERS): Add sys/syscall.h
3165 * config.in, configure: Regenerated.
3166
ee47b2f8
YQ
31672013-09-18 Yao Qi <yao@codesourcery.com>
3168
3169 PR server/15959
3170 * server.c (start_inferior): Clear 'resume_info'.
3171
d6707650 31722013-09-16 Jiong Wang <jiwang@tilera.com>
0f63d4db 3173
d6707650
JW
3174 * linux-tile-low.c (tile_regsets): Modify the size field to 64-bit
3175 for each register.
3176
9243dd0e 31772013-09-16 Jiong Wang <jiwang@tilera.com>
0f63d4db 3178
9243dd0e
JW
3179 * configure.srv <tilegx*-*-linux*>: Remove linux-osdata.o from and add
3180 linux-tile-low.o to srv_tgtobj.
3181
c623a6ef
WN
31822013-09-16 Will Newton <will.newton@linaro.org>
3183
3184 * linux-aarch64-low.c (aarch64_linux_set_debug_regs): Zero
3185 out regs.
3186
fb71d39e
PA
31872013-09-06 Pedro Alves <palves@redhat.com>
3188
3189 * Makefile.in (gdb_proc_service_h, regdef_h, regcache_h)
3190 (signals_def, signals_h, ptid_h, ax_h, agent_h, linux_btrace_h)
3191 (linux_osdata_h, vec_h, gdb_vecs_h, host_defs_h, libiberty_h)
3192 (server_h, gdbthread_h, linux_low_h, linux_ptrace_h)
3193 (gdb_thread_db_h, linux_procfs_h, lynx_low_h, nto_low_h)
3194 (mips_linux_watch_h, i386_low_h, win32_low_h): Delete.
3195
8e7e9910
PA
31962013-09-06 Pedro Alves <palves@redhat.com>
3197
3198 * Makefile.in (linux-btrace.o, mips-linux-watch.o): Remove
3199 explicit header dependencies and use $COMPILE/$POSTCOMPILE.
3200
7c3a12ca
PA
32012013-09-06 Pedro Alves <palves@redhat.com>
3202
3203 * linux-amd64-ipa.c: Include tracepoint.h.
3204 * linux-i386-ipa.c: Include tracepoint.h.
3205
8eb3d7b6
RW
32062013-09-06 Ricard Wanderlof <ricardw@axis.com>
3207
3208 * linux-crisv32-low.c (PTRACE_GET_THREAD_AREA): New macro.
3209 (ps_get_thread_area): New function.
3210
eddddb9d
RW
32112013-09-06 Ricard Wanderlof <ricardw@axis.com>
3212
3213 * linux-crisv32-low.c (elf_gregset_t): Delete typedef.
3214 (initialize_low_arch): Call init_registers_crisv32 rather than
3215 init_register_crisv32.
3216
533b0600
PA
32172013-09-05 Pedro Alves <palves@redhat.com>
3218
3219 * server.h (handle_vFile, hostio_last_error_from_errno): Move
3220 to ...
3221 * hostio.h: ... this new file.
3222 * hostio.c, server.c, linux-low.c, nto-low.c, spu-low,
3223 win32-low.c: Include hostio.h.
3224
0ce3d3b5
PA
32252013-09-05 Pedro Alves <palves@redhat.com>
3226
3227 * server.h (gdb_client_data, handler_func, callback_handler_func)
3228 (delete_file_handler, add_file_handler, append_callback_event)
3229 (delete_callback_event, start_event_loop, initialize_event_loop):
3230 Move to event-loop.h and include it.
3231 * event-loop.h: New file.
3232
799cdc37
PA
32332013-09-05 Pedro Alves <palves@redhat.com>
3234
3235 * dll.c, inferiors.c, remote-utils.c, server.c: Include "dll.h".
3236 * server.h (struct dll_info, all_dlls, dlls_changed, clear_dlls)
3237 (loaded_dll, unloaded_dll): Move to ...
3238 * dll.h: ... this new file.
3239 * inferiors.c, remote-utils.c, win32-low.c: Include "dll.h".
3240
6a6bbd9d
PA
32412013-09-05 Pedro Alves <palves@redhat.com>
3242
3243 * server.h (current_process, get_thread_process, all_processes)
3244 (add_inferior_to_list, for_each_inferior, current_inferior)
3245 (remove_inferior, add_process, remove_process, find_process_pid)
3246 (have_started_inferiors_p, have_attached_inferiors_p)
3247 (thread_id_to_gdb_id, thread_to_gdb_id, gdb_id_to_thread_id)
3248 (clear_inferiors, find_inferior, find_inferior_id)
3249 (inferior_target_data, set_inferior_target_data)
3250 (inferior_regcache_data, set_inferior_regcache_data): Move to
3251 inferiors.h, and include it.
3252 * inferiors.h: New file.
3253
f699aaba
PA
32542013-09-05 Pedro Alves <palves@redhat.com>
3255
3256 * server.h (struct emit_ops, current_insn_ptr, emit_error):
3257 Move ...
72f4393d 3258 * ax.h: ... here.
f699aaba 3259
c144c7a0
PA
32602013-09-05 Pedro Alves <palves@redhat.com>
3261
3262 * ax.c, linux-low.c, linux-x86-low.c, server.c: Include
3263 tracepoint.h.
3264 * server.h (IPA_BUFSIZ, initialize_tracepoint, tracing)
3265 (disconnected_tracing, tracepoint_look_up_symbols, stop_tracing
3266 (handle_tracepoint_general_set, handle_tracepoint_query)
3267 (tracepoint_finished_step, tracepoint_was_hit)
3268 (release_while_stepping_state_list, current_traceframe)
3269 (in_readonly_region, traceframe_read_mem)
3270 (fetch_traceframe_registers, traceframe_read_sdata)
3271 (traceframe_read_info, struct fast_tpoint_collect_status)
3272 (fast_tracepoint_collecting, force_unlock_trace_buffer)
3273 (handle_tracepoit_bkpts, initialize_low_tracepoint)
3274 (supply_fast_tracepoint_registers)
3275 (supply_static_tracepoint_registers, set_trampoline_buffer_space)
3276 (ipa_tdesc, claim_trampoline_space)
3277 (have_fast_tracepoint_trampoline_buffer, gdb_agent_about_to_close)
3278 (agent_mem_read, agent_get_trace_state_variable_value)
3279 (agent_set_trace_state_variable_value, agent_tsv_read)
3280 (agent_mem_read_string, get_raw_reg_func_addr)
3281 (get_get_tsv_func_addr, get_set_tsv_func_addr): Move to ...
3282 * tracepoint.h: ... this new file.
3283
ff42e6ab
PA
32842013-09-05 Pedro Alves <palves@redhat.com>
3285
3286 * server.h (perror_with_name, error, fatal, warning, paddress)
3287 (pulongest, plongest, phex_nz, pfildes): Move to utils.h, and
3288 include it.
3289 * utils.h: New file.
3290
541af0f4
PA
32912013-09-05 Pedro Alves <palves@redhat.com>
3292
3293 * server.h (remote_debug, noack_mode, transport_is_reliable)
3294 (gdb_connected, STDIO_CONNECTION_NAME, remote_connection_is_stdio)
3295 (read_ptid, write_ptid, putpkt, putpkt_binary, putpkt_notif)
3296 (getpkt, remote_prepare, remote_open, remote_close, write_ok)
3297 (write_enn, initialize_async_io, enable_async_io)
3298 (disable_async_io, check_remote_input_interrupt_request)
3299 (convert_ascii_to_int, convert_int_to_ascii, new_thread_notify)
3300 (dead_thread_notify, prepare_resume_reply)
3301 (decode_address_to_semicolon, decode_address, decode_m_packet)
3302 (decode_M_packet, decode_X_packet, decode_xfer_write)
3303 (decode_search_memory_packet, unhexify, hexify)
3304 (remote_escape_output, unpack_varlen_hex, clear_symbol_cache)
3305 (look_up_one_symbol, relocate_instruction)
3306 (monitor_output): Move to remote-utils.h, and include it.
3307 * remote-utils.h: New file.
3308
eebdf26b
PA
33092013-09-05 Pedro Alves <palves@redhat.com>
3310
3311 * server.h (_): Delete.
3312
3aafd2ff
PA
33132013-09-02 Pedro Alves <palves@redhat.com>
3314
3315 * tracepoint.c (TRACEFRAME_EOB_MARKER_SIZE): New macro.
3316 (init_trace_buffer): Ensure at least TRACEFRAME_EOB_MARKER_SIZE is
3317 allocated.
3318 (trace_buffer_alloc): Use TRACEFRAME_EOB_MARKER_SIZE.
3319
cee83bcb
PM
33202013-09-02 Pierre Muller <muller@sourceware.org>
3321
3322 * win32-low.c (child_xfer_memory): Check if ReadProcessMemory
3323 or WriteProcessMemory complete successfully and handle
3324 ERROR_PARTIAL_COPY error.
3325
9a13b2fa
PA
33262013-09-02 Pedro Alves <palves@redhat.com>
3327
3328 * server.c (gdb_read_memory): Return -1 on traceframe memory read
3329 error instead of EIO.
3330
602e3198
JK
33312013-08-28 Jan Kratochvil <jan.kratochvil@redhat.com>
3332
3333 PR server/15604
3334 * linux-low.c: Include filestuff.h.
3335 (linux_create_inferior) <pid == 0>: Call close_most_fds.
3336 * lynx-low.c: Include filestuff.h.
3337 (lynx_create_inferior) <pid == 0>: Call close_most_fds.
3338 * server.c: Include filestuff.h.
3339 (main): Call notice_open_fds.
3340 * spu-low.c: Include filestuff.h.
3341 (spu_create_inferior) <pid == 0>: Call close_most_fds.
3342
96d7229d
LM
33432013-08-22 Luis Machado <lgustavo@codesourcery.com>
3344
3345 * Makefile.in: Explain why ../target and ../nat are not
3346 listed as include file search paths.
3347 (linux-waitpid.o): New object file rule.
3348 * configure.srv (srv_native_linux_obj): New variable.
3349 Replace all occurrences of linux native object files with
3350 $srv_native_linux_obj.
3351 * linux-low.c: Include nat/linux-nat.h and nat/linux-waitpid.h.
3352 (HAS_NOMMU): Move defining logic to common/linux-ptrace.c.
3353 (linux_enable_event_reporting): Remove declaration.
3354 (my_waitpid): Moved to common/linux-waitpid.c.
3355 (linux_wait_for_event): Pass ptid when calling
3356 linux_enable_event_reporting.
3357 (linux_supports_tracefork_flag): Remove.
3358 (linux_enable_event_reporting): Likewise.
3359 (linux_tracefork_grandchild): Remove.
3360 (STACK_SIZE): Moved to common/linux-ptrace.c.
3361 (linux_tracefork_child): Remove.
3362 (linux_test_for_tracefork): Remove.
3363 (linux_look_up_symbols): Call linux_supports_traceclone.
3364 (initialize_low): Remove call to linux_test_for_tracefork.
3365 * linux-low.h (PTRACE_TYPE_ARG3): Move to
3366 common/linux-ptrace.h.
3367 (PTRACE_TYPE_ARG4): Likewise.
3368 Include linux-ptrace.h.
3369
32940073
PA
33702013-08-21 Pedro Alves <palves@redhat.com>
3371
3372 * config.in: Renegerate.
3373
33b60d58 33742013-08-19 Luis Machado <lgustavo@codesourcery.com>
a261b8f5 3375
33b60d58
LM
3376 * Makefile.in (INCLUDE_CFLAGS): Include -I$(srcdir)/../.
3377 (SFILES): Remove $(srcdir)/common/target-common.c and
3378 add $(srcdir)/target/waitstatus.c.
3379 (OBS): Remove target-common.o and add waitstatus.o.
3380 (server_h): Remove $(srcdir)/../common/target-common.h and
3381 add $(srcdir)/../target/resume.h, $(srcdir)/../target/wait.h
3382 and $(srcdir)/../target/waitstatus.h.
3383 (target-common.o): Remove.
3384 (waitstatus.o): New target object file.
3385 * target.h: Do not include target-common.h and
3386 include target/resume.h, target/wait.h and
3387 target/waitstatus.h.
3388
b8e1b30e
LM
33892013-08-13 Luis Machado <lgustavo@codesourcery.com>
3390
3391 * linux-arm-low.c: Rename all occurrences of PTRACE_ARG3_TYPE
3392 to PTRACE_TYPE_ARG3.
3393 * linux-low.c: Rename all occurrences of PTRACE_ARG3_TYPE
3394 to PTRACE_TYPE_ARG3 and PTRACE_ARG4_TYPE to
3395 PTRACE_TYPE_ARG4.
3396 * linux-low.h (PTRACE_ARG3_TYPE): Rename to PTRACE_TYPE_ARG3.
3397 (PTRACE_ARG4_TYPE): Rename to PTRACE_TYPE_ARG4.
3398
7a60ad40
YQ
33992013-07-27 Jie Zhang <jie@codesourcery.com>
3400 Daniel Jacobowitz <dan@codesourcery.com>
3401 Yao Qi <yao@codesourcery.com>
3402
3403 * Makefile.in (SFILES): Add common/mips-linux-watch.c.
3404 (mips-linux-watch.o): New rule.
3405 (mips_linux_watch_h): New variable.
3406 * configure.srv <mips*-*-linux*>: Add mips-linux-watch.o to
3407 srv_tgtobj.
3408 * linux-mips-low.c: Include mips-linux-watch.h.
3409 (struct arch_process_info, struct arch_lwp_info): New.
3410 (update_watch_registers_callback): New function.
3411 (mips_linux_new_process, mips_linux_new_thread) New functions.
3412 (mips_linux_prepare_to_resume, mips_insert_point): New
3413 functions.
3414 (mips_remove_point, mips_stopped_by_watchpoint): New
3415 functions.
3416 (rsp_bp_type_to_target_hw_bp_type): New function.
3417 (mips_stopped_data_address): New function.
3418 (the_low_target): Add watchpoint support functions.
3419
de6f69ad
YQ
34202013-07-27 Yao Qi <yao@codesourcery.com>
3421
3422 * i386-low.c: Include break-common.h.
3423 (enum target_hw_bp_type): Remove.
3424
3360c0bf
LM
34252013-07-24 Luis Machado <lgustavo@codesourcery.com>
3426
3427 * Makefile.in (SFILES): /common/target-common.c.
3428 (OBS): Add target-common.o.
3429 (server_h): Add $(srcdir)/../common/target-common.h.
3430 (target-common.o): New target.
3431 * server.c (queue_stop_reply_callback): Free
3432 status string after use.
3433 * target.c (target_waitstatus_to_string): Remove.
3434 * target.h: Include target-common.h.
3435 (resume_kind): Likewise.
3436 (target_waitkind): Likewise.
3437 (target_waitstatus): Likewise.
3438 (TARGET_WNOHANG): Likewise.
3439
bd885420
YQ
34402013-07-04 Yao Qi <yao@codesourcery.com>
3441
3442 * Makefile.in (host_alias): Use @host_noncanonical@.
3443 (target_alias): Use @target_noncanonical@.
3444 * configure.ac: Use ACX_NONCANONICAL_TARGET and
3445 ACX_NONCANONICAL_HOST.
3446 * configure: Regenerated.
3447
3448 Revert:
3449 2013-06-28 Mircea Gherzan <mircea.gherzan@intel.com>
3450
3451 * configure.ac (version_host, version_target): Set and AC_SUBST them.
3452 * configure: Rebuild.
3453 * Makefile.in (version_host, version_target): Get from configure.
3454 (version.c): Use $(version_host) and $(version_target).
3455
17ef446e
PA
34562013-07-03 Pedro Alves <palves@redhat.com>
3457
3458 * Makefile.in (config.status): Depend on development.sh.
3459 * acinclude.m4: Include libmcheck.m4.
3460 * configure: Regenerate.
3461
7a9a7487
MG
34622013-07-02 Mircea Gherzan <mircea.gherzan@intel.com>
3463
3464 * win32-low.c (winapi_DebugActiveProcessStop): Move the WINAPI
3465 attribute inside the parentheses.
3466 (winapi_DebugSetProcessKillOnExit): Ditto.
3467 (winapi_DebugBreakProcess): Ditto.
3468 (winapi_GenerateConsoleCtrlEvent): Ditto.
a261b8f5 3469
49b64de6
MG
34702013-07-02 Mircea Gherzan <mircea.gherzan@intel.com>
3471
3472 * notif.h (notif_event): Add a dummy member to avoid compiler
3473 errors.
3474
d5749ee7
PA
34752013-07-01 Pedro Alves <palves@redhat.com>
3476
3477 * hostio.c (HOSTIO_PATH_MAX): Define.
3478 (require_filename, handle_open, handle_unlink, handle_readlink):
3479 Use it.
3480
d8d2a3ee
PA
34812013-07-01 Pedro Alves <palves@redhat.com>
3482
3483 * server.h: Include "pathmax.h".
3484 * linux-low.c: Don't include sys/param.h.
3485 (linux_pid_exe_is_elf_64_file): Use PATH_MAX instead of
3486 MAXPATHLEN.
3487 * win32-low.c: Don't include sys/param.h.
3488 (win32_create_inferior): Use PATH_MAX instead of MAXPATHLEN.
3489
bc7dea8d
PA
34902013-07-01 Pedro Alves <palves@redhat.com>
3491
3492 * event-loop.c: Don't check HAVE_UNISTD_H before including
3493 <unistd.h>.
3494 * gdbreplay.c: Likewise.
3495 * remote-utils.c: Likewise.
3496 * server.c: Likewise.
3497 * configure.ac: Don't check for unistd.h.
3498 * configure: Regenerate.
3499
d6c2da54
TT
35002013-06-28 Tom Tromey <tromey@redhat.com>
3501
3502 * Makefile.in (version.c): Use version.in, not
3503 common/version.in.
3504
257b6bec
MG
35052013-06-28 Mircea Gherzan <mircea.gherzan@intel.com>
3506
3507 * configure.ac (version_host, version_target): Set and AC_SUBST them.
3508 * configure: Rebuild.
3509 * Makefile.in (version_host, version_target): Get from configure.
3510 (version.c): Use $(version_host) and $(version_target).
3511
86ebe149
DK
35122013-06-10 Dmitry Kozlov <ddk@codesourcery.com>
3513
3514 Fix trace-status to output user name without trailing colon.
3515 * tracepoint.c (cmd_qtstatus): Remove unnecessary colon from user name.
3516
f30aa5af
DK
35172013-06-10 Dmitry Kozlov <ddk@codesourcery.com>
3518
3519 Fix trace-status to output proper start-time and stop-time.
3520 * tracepoint.c (cmd_qtstatus): Modify trace-status output to
3521 output start time and stop time in hex as gdb expects.
3522
28a93511
YQ
35232013-06-26 Pedro Alves <pedro@codesourcery.com>
3524
3525 * tracepoint.c (build_traceframe_info_xml): Output trace state
3526 variables present in the trace buffer.
3527
01208463
TT
35282013-06-24 Tom Tromey <tromey@redhat.com>
3529
3530 * Makefile.in (version.c): Use bfd/version.h, common/version.in,
3531 create-version.sh.
3532 (version.o): Remove.
3533 * gdbreplay.c: Include version.h.
3534 (version, host_name): Don't declare.
3535 * server.h: Include version.h.
3536 (version, host_name): Don't declare.
3537
760256f9
PA
35382013-06-12 Pedro Alves <palves@redhat.com>
3539
3540 * linux-x86-low.c (linux_is_elf64): Delete global.
3541 (x86_siginfo_fixup): Replace reference to `linux_is_elf64' global
3542 with local linux_pid_exe_is_elf_64_file use.
3543
030031ee
PA
35442013-06-11 Pedro Alves <palves@redhat.com>
3545
3546 * linux-low.c (regset_disabled, disable_regset): New functions.
3547 (regsets_fetch_inferior_registers)
3548 (regsets_store_inferior_registers): Use them.
3549 (initialize_regsets_info); Don't allocate the disabled_regsets
3550 array here.
3551 * linux-low.h (struct regsets_info) <disabled_regsets>: Extend
3552 comment.
3553
5da6eb0a
PA
35542013-06-11 Pedro Alves <palves@redhat.com>
3555
3556 * linux-low.c (initialize_regsets_info): Use xcalloc instead of
3557 xmalloc.
3558
7e5aaa09
PA
35592013-06-11 Pedro Alves <palves@redhat.com>
3560
3561 * linux-x86-low.c (initialize_low_arch): Call
3562 init_registers_x32_avx_linux.
3563
d878444c
JK
35642013-06-09 Jan Kratochvil <jan.kratochvil@redhat.com>
3565
3566 Fix compatibility with Android Bionic.
3567 * linux-low.c (linux_qxfer_libraries_svr4): Ignore first entry even if
3568 it is not empty.
3569
3aee8918
PA
35702013-06-07 Pedro Alves <palves@redhat.com>
3571
5f2b57b5 3572 PR server/14823
3aee8918
PA
3573 * Makefile.in (OBS): Add tdesc.o.
3574 (IPA_OBJS): Add tdesc-ipa.o.
3575 (tdesc-ipa.o): New rule.
3576 * ax.c (gdb_eval_agent_expr): Adjust register_size call to new
3577 interface.
3578 * linux-low.c (new_inferior): Delete.
3579 (disabled_regsets, num_regsets): Delete.
3580 (linux_add_process): Adjust to set the new per-process
3581 new_inferior flag.
3582 (linux_detach_one_lwp): Adjust to call regcache_invalidate_thread.
3583 (linux_wait_for_lwp): Adjust. Only call arch_setup if the event
3584 was a stop. When calling arch_setup, switch the current inferior
3585 to the thread that got an event.
3586 (linux_resume_one_lwp): Adjust to call regcache_invalidate_thread.
3587 (regsets_fetch_inferior_registers)
3588 (regsets_store_inferior_registers): New regsets_info parameter.
3589 Adjust to use it.
3590 (linux_register_in_regsets): New regs_info parameter. Adjust to
3591 use it.
3592 (register_addr, fetch_register, store_register): New usrregs_info
3593 parameter. Adjust to use it.
3594 (usr_fetch_inferior_registers, usr_store_inferior_registers): New
3595 parameter regs_info. Adjust to use it.
3596 (linux_fetch_registers): Get the current inferior's regs_info, and
3597 adjust to use it.
3598 (linux_store_registers): Ditto.
3599 [HAVE_LINUX_REGSETS] (initialize_regsets_info): New.
3600 (initialize_low): Don't initialize the target_regsets here. Call
3601 initialize_low_arch.
3602 * linux-low.h (target_regsets): Delete declaration.
3603 (struct regsets_info): New.
3604 (struct usrregs_info): New.
3605 (struct regs_info): New.
3606 (struct process_info_private) <new_inferior>: New field.
3607 (struct linux_target_ops): Delete the num_regs, regmap, and
3608 regset_bitmap fields. New field regs_info.
3609 [HAVE_LINUX_REGSETS] (initialize_regsets_info): Declare.
3610 * i387-fp.c (num_xmm_registers): Delete.
3611 (i387_cache_to_fsave, i387_fsave_to_cache): Adjust find_regno
3612 calls to new interface.
3613 (i387_cache_to_fxsave, i387_cache_to_xsave, i387_fxsave_to_cache)
3614 (i387_xsave_to_cache): Adjust find_regno calls to new interface.
3615 Infer the number of xmm registers from the regcache's target
3616 description.
3617 * i387-fp.h (num_xmm_registers): Delete.
3618 * inferiors.c (add_thread): Don't install the thread's regcache
3619 here.
3620 * proc-service.c (gregset_info): Fetch the current inferior's
3621 regs_info. Adjust to use it.
3622 * regcache.c: Include tdesc.h.
3623 (register_bytes, reg_defs, num_registers)
3624 (gdbserver_expedite_regs): Delete.
3625 (get_thread_regcache): If the thread doesn't have a regcache yet,
3626 create one, instead of aborting gdbserver.
3627 (regcache_invalidate_one): Rename to ...
3628 (regcache_invalidate_thread): ... this.
3629 (regcache_invalidate_one): New.
3630 (regcache_invalidate): Only invalidate registers of the current
3631 process.
3632 (init_register_cache): Add target_desc parameter, and use it.
3633 (new_register_cache): Ditto. Assert the target description has a
3634 non zero registers_size.
3635 (regcache_cpy): Add assertions. Adjust.
3636 (realloc_register_cache, set_register_cache): Delete.
3637 (registers_to_string, registers_from_string): Adjust.
3638 (find_register_by_name, find_regno, find_register_by_number)
3639 (register_cache_size): Add target_desc parameter, and use it.
3640 (free_register_cache_thread, free_register_cache_thread_one)
3641 (regcache_release, register_cache_size): New.
3642 (register_size): Add target_desc parameter, and use it.
3643 (register_data, supply_register, supply_register_zeroed)
3644 (supply_regblock, supply_register_by_name, collect_register)
3645 (collect_register_as_string, collect_register_by_name): Adjust.
3646 * regcache.h (struct target_desc): Forward declare.
3647 (struct regcache) <tdesc>: New field.
3648 (init_register_cache, new_register_cache): Add target_desc
3649 parameter.
3650 (regcache_invalidate_thread): Declare.
3651 (regcache_invalidate_one): Delete declaration.
3652 (regcache_release): Declare.
3653 (find_register_by_number, register_cache_size, register_size)
3654 (find_regno): Add target_desc parameter.
3655 (gdbserver_expedite_regs, gdbserver_xmltarget): Delete
3656 declarations.
3657 * remote-utils.c: Include tdesc.h.
3658 (outreg, prepare_resume_reply): Adjust.
3659 * server.c: Include tdesc.h.
3660 (gdbserver_xmltarget): Delete declaration.
3661 (get_features_xml, process_serial_event): Adjust.
3662 * server.h [IN_PROCESS_AGENT] (struct target_desc): Forward
3663 declare.
3664 (struct process_info) <tdesc>: New field.
3665 (ipa_tdesc): Declare.
3666 * tdesc.c: New file.
3667 * tdesc.h: New file.
3668 * tracepoint.c: Include tdesc.h.
3669 [IN_PROCESS_AGENT] (ipa_tdesc): Define.
3670 (get_context_regcache): Adjust to pass ipa_tdesc down.
3671 (do_action_at_tracepoint): Adjust to get the register cache size
3672 from the context regcache's description.
3673 (traceframe_walk_blocks): Adjust to get the register cache size
3674 from the current trace frame's description.
3675 (traceframe_get_pc): Adjust to get current trace frame's
3676 description and pass it down.
3677 (gdb_collect): Adjust to get the register cache size from the
3678 IPA's description.
3679 * linux-amd64-ipa.c (tdesc_amd64_linux): Declare.
3680 (gdbserver_xmltarget): Delete.
3681 (initialize_low_tracepoint): Set the ipa's target description.
3682 * linux-i386-ipa.c (tdesc_i386_linux): Declare.
3683 (initialize_low_tracepoint): Set the ipa's target description.
3684 * linux-x86-low.c: Include tdesc.h.
3685 [__x86_64__] (is_64bit_tdesc): New.
3686 (ps_get_thread_area, x86_get_thread_area): Use it.
3687 (i386_cannot_store_register): Rename to ...
3688 (x86_cannot_store_register): ... this. Use is_64bit_tdesc.
3689 (i386_cannot_fetch_register): Rename to ...
3690 (x86_cannot_fetch_register): ... this. Use is_64bit_tdesc.
3691 (x86_fill_gregset, x86_store_gregset): Adjust register_size calls
3692 to new interface.
3693 (target_regsets): Rename to ...
3694 (x86_regsets): ... this.
3695 (x86_get_pc, x86_set_pc): Adjust register_size calls to new
3696 interface.
3697 (x86_siginfo_fixup): Use is_64bit_tdesc.
3698 [__x86_64__] (tdesc_amd64_linux, tdesc_amd64_avx_linux)
3699 (tdesc_x32_avx_linux, tdesc_x32_linux)
3700 (tdesc_i386_linux, tdesc_i386_mmx_linux, tdesc_i386_avx_linux):
3701 Declare.
3702 (x86_linux_update_xmltarget): Delete.
3703 (I386_LINUX_XSAVE_XCR0_OFFSET): Define.
3704 (have_ptrace_getfpxregs, have_ptrace_getregset): New.
3705 (AMD64_LINUX_USER64_CS): New.
3706 (x86_linux_read_description): New, based on
3707 x86_linux_update_xmltarget.
3708 (same_process_callback): New.
3709 (x86_arch_setup_process_callback): New.
3710 (x86_linux_update_xmltarget): New.
3711 (x86_regsets_info): New.
3712 (amd64_linux_regs_info): New.
3713 (i386_linux_usrregs_info): New.
3714 (i386_linux_regs_info): New.
3715 (x86_linux_regs_info): New.
3716 (x86_arch_setup): Reimplement.
3717 (x86_install_fast_tracepoint_jump_pad): Use is_64bit_tdesc.
3718 (x86_emit_ops): Ditto.
3719 (the_low_target): Adjust. Install x86_linux_regs_info,
3720 x86_cannot_fetch_register, and x86_cannot_store_register.
3721 (initialize_low_arch): New.
3722 * linux-ia64-low.c (tdesc_ia64): Declare.
3723 (ia64_fetch_register): Adjust.
3724 (ia64_usrregs_info, regs_info): New globals.
3725 (ia64_regs_info): New function.
3726 (the_low_target): Adjust.
3727 (initialize_low_arch): New function.
3728 * linux-sparc-low.c (tdesc_sparc64): Declare.
3729 (sparc_fill_gregset_to_stack, sparc_store_gregset_from_stack):
3730 Adjust.
3731 (sparc_arch_setup): New function.
3732 (sparc_regsets_info, sparc_usrregs_info, regs_info): New globals.
3733 (the_low_target): Adjust.
3734 (initialize_low_arch): New function.
3735 * linux-ppc-low.c (tdesc_powerpc_32l, tdesc_powerpc_altivec32l)
3736 (tdesc_powerpc_cell32l, tdesc_powerpc_vsx32l)
3737 (tdesc_powerpc_isa205_32l, tdesc_powerpc_isa205_altivec32l)
3738 (tdesc_powerpc_isa205_vsx32l, tdesc_powerpc_e500l)
3739 (tdesc_powerpc_64l, tdesc_powerpc_altivec64l)
3740 (tdesc_powerpc_cell64l, tdesc_powerpc_vsx64l)
3741 (tdesc_powerpc_isa205_64l, tdesc_powerpc_isa205_altivec64l)
3742 (tdesc_powerpc_isa205_vsx64l): Declare.
3743 (ppc_cannot_store_register, ppc_collect_ptrace_register)
3744 (ppc_supply_ptrace_register, parse_spufs_run, ppc_get_pc)
3745 (ppc_set_pc, ppc_get_hwcap): Adjust.
3746 (ppc_usrregs_info): Forward declare.
3747 (!__powerpc64__) ppc_regmap_adjusted: New global.
3748 (ppc_arch_setup): Adjust to the current process'es target
3749 description.
3750 (ppc_fill_vsxregset, ppc_store_vsxregset, ppc_fill_vrregset)
3751 (ppc_store_vrregset, ppc_fill_evrregset, ppc_store_evrregse)
3752 (ppc_store_evrregset): Adjust.
3753 (target_regsets): Rename to ...
3754 (ppc_regsets): ... this, and make static.
3755 (ppc_usrregs_info, ppc_regsets_info, regs_info): New globals.
3756 (ppc_regs_info): New function.
3757 (the_low_target): Adjust.
3758 (initialize_low_arch): New function.
3759 * linux-s390-low.c (tdesc_s390_linux32, tdesc_s390_linux32v1)
3760 (tdesc_s390_linux32v2, tdesc_s390_linux64, tdesc_s390_linux64v1)
3761 (tdesc_s390_linux64v2, tdesc_s390x_linux64, tdesc_s390x_linux64v1)
3762 (tdesc_s390x_linux64v2): Declare.
3763 (s390_collect_ptrace_register, s390_supply_ptrace_register)
3764 (s390_fill_gregset, s390_store_last_break): Adjust.
3765 (target_regsets): Rename to ...
3766 (s390_regsets): ... this, and make static.
3767 (s390_get_pc, s390_set_pc): Adjust.
3768 (s390_get_hwcap): New target_desc parameter, and use it.
3769 [__s390x__] (have_hwcap_s390_high_gprs): New global.
3770 (s390_arch_setup): Adjust to set the current process'es target
3771 description. Don't adjust the regmap.
3772 (s390_usrregs_info, s390_regsets_info, regs_info): New globals.
3773 [__s390x__] (s390_usrregs_info_3264, s390_regsets_info_3264)
3774 (regs_info_3264): New globals.
3775 (s390_regs_info): New function.
3776 (the_low_target): Adjust.
3777 (initialize_low_arch): New function.
3778 * linux-mips-low.c (tdesc_mips_linux, tdesc_mips_dsp_linux)
3779 (tdesc_mips64_linux, tdesc_mips64_dsp_linux): Declare.
3780 [__mips64] (init_registers_mips_linux)
3781 (init_registers_mips_dsp_linux): Delete defines.
3782 [__mips64] (tdesc_mips_linux, tdesc_mips_dsp_linux): New defines.
3783 (have_dsp): New global.
3784 (mips_read_description): New, based on mips_arch_setup.
3785 (mips_arch_setup): Reimplement.
3786 (get_usrregs_info): New function.
3787 (mips_cannot_fetch_register, mips_cannot_store_register)
3788 (mips_get_pc, mips_set_pc, mips_fill_gregset, mips_store_gregset)
3789 (mips_fill_fpregset, mips_store_fpregset): Adjust.
3790 (target_regsets): Rename to ...
3791 (mips_regsets): ... this, and make static.
3792 (mips_regsets_info, mips_dsp_usrregs_info, mips_usrregs_info)
3793 (dsp_regs_info, regs_info): New globals.
3794 (mips_regs_info): New function.
3795 (the_low_target): Adjust.
3796 (initialize_low_arch): New function.
3797 * linux-arm-low.c (tdesc_arm, tdesc_arm_with_iwmmxt)
3798 (tdesc_arm_with_vfpv2, tdesc_arm_with_vfpv3, tdesc_arm_with_neon):
3799 Declare.
3800 (arm_fill_vfpregset, arm_store_vfpregset): Adjust.
3801 (arm_read_description): New, with bits factored from
3802 arm_arch_setup.
3803 (arm_arch_setup): Reimplement.
3804 (target_regsets): Rename to ...
3805 (arm_regsets): ... this, and make static.
3806 (arm_regsets_info, arm_usrregs_info, regs_info): New globals.
3807 (arm_regs_info): New function.
3808 (the_low_target): Adjust.
3809 (initialize_low_arch): New function.
3810 * linux-m68k-low.c (tdesc_m68k): Declare.
3811 (target_regsets): Rename to ...
3812 (m68k_regsets): ... this, and make static.
3813 (m68k_regsets_info, m68k_usrregs_info, regs_info): New globals.
3814 (m68k_regs_info): New function.
3815 (m68k_arch_setup): New function.
3816 (the_low_target): Adjust.
3817 (initialize_low_arch): New function.
3818 * linux-sh-low.c (tdesc_sharch): Declare.
3819 (target_regsets): Rename to ...
3820 (sh_regsets): ... this, and make static.
3821 (sh_regsets_info, sh_usrregs_info, regs_info): New globals.
3822 (sh_regs_info, sh_arch_setup): New functions.
3823 (the_low_target): Adjust.
3824 (initialize_low_arch): New function.
3825 * linux-bfin-low.c (tdesc_bfin): Declare.
3826 (bfin_arch_setup): New function.
3827 (bfin_usrregs_info, regs_info): New globals.
3828 (bfin_regs_info): New function.
3829 (the_low_target): Adjust.
3830 (initialize_low_arch): New function.
3831 * linux-cris-low.c (tdesc_cris): Declare.
3832 (cris_arch_setup): New function.
3833 (cris_usrregs_info, regs_info): New globals.
3834 (cris_regs_info): New function.
3835 (the_low_target): Adjust.
3836 (initialize_low_arch): New function.
3837 * linux-cris-low.c (tdesc_crisv32): Declare.
3838 (cris_arch_setup): New function.
3839 (cris_regsets_info, cris_usrregs_info, regs_info): New globals.
3840 (cris_regs_info): New function.
3841 (the_low_target): Adjust.
3842 (initialize_low_arch): New function.
3843 * linux-m32r-low.c (tdesc_m32r): Declare.
3844 (m32r_arch_setup): New function.
3845 (m32r_usrregs_info, regs_info): New globals.
3846 (m32r_regs_info): Adjust.
3847 (initialize_low_arch): New function.
3848 * linux-tic6x-low.c (tdesc_tic6x_c64xp_linux)
3849 (tdesc_tic6x_c64x_linux, tdesc_tic6x_c62x_linux): Declare.
3850 (tic6x_usrregs_info): Forward declare.
3851 (tic6x_read_description): New function, based on ...
3852 (tic6x_arch_setup): ... this. Reimplement.
3853 (target_regsets): Rename to ...
3854 (tic6x_regsets): ... this, and make static.
3855 (tic6x_regsets_info, tic6x_usrregs_info, regs_info): New globals.
3856 (tic6x_regs_info): New function.
3857 (the_low_target): Adjust.
3858 (initialize_low_arch): New function.
3859 * linux-xtensa-low.c (tdesc_xtensa): Declare.
3860 (xtensa_fill_gregset, xtensa_store_gregset): Adjust.
3861 (target_regsets): Rename to ...
3862 (xtensa_regsets): ... this, and make static.
3863 (xtensa_regsets_info, xtensa_usrregs_info, regs_info): New
3864 globals.
3865 (xtensa_arch_setup, xtensa_regs_info): New functions.
3866 (the_low_target): Adjust.
3867 (initialize_low_arch): New function.
3868 * linux-nios2-low.c (tdesc_nios2_linux): Declare.
3869 (nios2_arch_setup): Set the current process'es tdesc.
3870 (target_regsets): Rename to ...
3871 (nios2_regsets): ... this.
3872 (nios2_regsets_info, nios2_usrregs_info, regs_info): New globals.
3873 (nios2_regs_info): New function.
3874 (the_low_target): Adjust.
3875 (initialize_low_arch): New function.
a261b8f5
PA
3876 * linux-aarch64-low.c (tdesc_aarch64): Declare.
3877 (aarch64_arch_setup): Set the current process'es tdesc.
3878 (target_regsets): Rename to ...
3879 (aarch64_regsets): ... this.
3880 (aarch64_regsets_info, aarch64_usrregs_info, regs_info): New globals.
3881 (aarch64_regs_info): New function.
3882 (the_low_target): Adjust.
3883 (initialize_low_arch): New function.
3aee8918
PA
3884 * linux-tile-low.c (tdesc_tilegx, tdesc_tilegx32): Declare
3885 globals.
3886 (target_regsets): Rename to ...
3887 (tile_regsets): ... this.
3888 (tile_regsets_info, tile_usrregs_info, regs_info): New globals.
3889 (tile_regs_info): New function.
3890 (tile_arch_setup): Set the current process'es tdesc.
3891 (the_low_target): Adjust.
3892 (initialize_low_arch): New function.
3893 * spu-low.c (tdesc_spu): Declare.
3894 (spu_create_inferior, spu_attach): Set the new process'es tdesc.
3895 * win32-arm-low.c (tdesc_arm): Declare.
3896 (arm_arch_setup): New function.
3897 (the_low_target): Install arm_arch_setup instead of
3898 init_registers_arm.
3899 * win32-i386-low.c (tdesc_i386, tdesc_amd64): Declare.
3900 (init_windows_x86): Rename to ...
3901 (i386_arch_setup): ... this. Set `win32_tdesc'.
3902 (the_low_target): Adjust.
3903 * win32-low.c (win32_tdesc): New global.
3904 (child_add_thread): Don't create the thread cache here.
3905 (do_initial_child_stuff): Set the new process'es tdesc.
3906 * win32-low.h (struct target_desc): Forward declare.
3907 (win32_tdesc): Declare.
3908 * lynx-i386-low.c (tdesc_i386): Declare global.
3909 (lynx_i386_arch_setup): Set `lynx_tdesc'.
3910 * lynx-low.c (lynx_tdesc): New global.
3911 (lynx_add_process): Set the new process'es tdesc.
3912 * lynx-low.h (struct target_desc): Forward declare.
3913 (lynx_tdesc): Declare global.
3914 * lynx-ppc-low.c (tdesc_powerpc_32): Declare global.
3915 (lynx_ppc_arch_setup): Set `lynx_tdesc'.
3916 * nto-low.c (nto_tdesc): New global.
3917 (do_attach): Set the new process'es tdesc.
3918 * nto-low.h (struct target_desc): Forward declare.
3919 (nto_tdesc): Declare.
3920 * nto-x86-low.c (tdesc_i386): Declare.
3921 (nto_x86_arch_setup): Set `nto_tdesc'.
3922
b1fbec62
GB
39232013-06-04 Gary Benson <gbenson@redhat.com>
3924
3925 * server.c (handle_query): Add "augmented-libraries-svr4-read+"
3926 to qSupported response when appropriate.
3927 (handle_qxfer_libraries_svr4): Allow qXfer:libraries-svr4:read
3928 with nonzero-length annex.
3929 * linux-low.c (linux_qxfer_libraries_svr4): Parse and handle
3930 arguments supplied in annex.
3931
d1ec4ce7
DE
39322013-05-31 Doug Evans <dje@google.com>
3933
ac44adcb 3934 PR server/15594
d1ec4ce7
DE
3935 * linux-x86-low.c (ps_get_thread_area): Properly extend address to
3936 64 bits in 64-cross-32 environment.
3937
9b25f2d3
PA
39382013-05-28 Pedro Alves <palves@redhat.com>
3939
3940 * Makefile.in (clean): Remove reference to aarch64-without-fpu.c.
3941 (aarch64-without-fpu.c): Delete rule.
3942 * configure.srv (aarch64*-*-linux*): Remove references to
3943 aarch64-without-fpu.o and aarch64-without-fpu.xml.
3944 * linux-aarch64-low.c (init_registers_aarch64_without_fpu): Remove
3945 declaration.
3946
6740dc9c
PA
39472013-05-24 Pedro Alves <palves@redhat.com>
3948
3949 * server.c (handle_v_cont) <vCont;r>: Use unpack_varlen_hex
3950 instead of strchr/decode_address. Error if the range isn't split
3951 with a ','. Don't assume there's be a ':' in the action.
3952
c2d6af84
PA
39532013-05-23 Yao Qi <yao@codesourcery.com>
3954 Pedro Alves <palves@redhat.com>
3955
3956 * linux-low.c (lwp_in_step_range): New function.
3957 (linux_wait_1): If the thread was range stepping and stopped
3958 outside the stepping range, report the stop to GDB. Otherwise,
3959 continue stepping. Add range stepping debug output.
3960 (linux_set_resume_request): Copy the step range from the resume
3961 request to the lwp.
3962 (linux_supports_range_stepping): New.
3963 (linux_target_ops) <supports_range_stepping>: Set to
3964 linux_supports_range_stepping.
3965 * linux-low.h (struct linux_target_ops)
3966 <supports_range_stepping>: New field.
3967 (struct lwp_info) <step_range_start, step_range_end>: New fields.
3968 * linux-x86-low.c (x86_supports_range_stepping): New.
3969 (the_low_target) <supports_range_stepping>: Set to
3970 x86_supports_range_stepping.
3971 * server.c (handle_v_cont): Handle 'r' action.
3972 (handle_v_requests): Append ";r" if the target supports range
3973 stepping.
3974 * target.h (struct thread_resume) <step_range_start,
3975 step_range_end>: New fields.
3976 (struct target_ops) <supports_range_stepping>:
3977 New field.
3978 (target_supports_range_stepping): New macro.
3979
58794e1a
JB
39802013-05-17 Joel Brobecker <brobecker@adacore.com>
3981
3982 * lynx-low.c (lynx_resume): Fix null_ptid/minus_one_ptid
3983 confusion in comment.
3984
d631c5a7
JB
39852013-05-17 Joel Brobecker <brobecker@adacore.com>
3986
3987 * lynx-low.c (struct process_info_private): New type.
3988 (lynx_add_process): New function.
3989 (lynx_create_inferior, lynx_attach): Replace calls to
3990 add_process by calls to lynx_add_process.
3991 (lynx_resume): If PTID is null, then try using
3992 current_process()->private->last_wait_event_ptid.
3993 Add comments.
3994 (lynx_clear_inferiors): Delete. The contents of that function
3995 has been inlined in lynx_mourn;
3996 (lynx_wait_1): Save the ptid in the process's private data.
3997 (lynx_mourn): Free the process' private data. Replace call
3998 to lynx_clear_inferiors by call to clear_inferiors.
3999
96f7a20f
YQ
40002013-05-17 Yao Qi <yao@codesourcery.com>
4001
4002 * i386-low.c (i386_length_and_rw_bits): Move the comment to
4003 the right place.
4004
db0dfaa0
LM
40052013-05-16 Luis Machado <lgustavo@codesourcery.com>
4006
4007 * linux-low.c: Move definition checks upwards for PT_TEXT_ADDR,
4008 PT_DATA_ADDR and PT_TEXT_END_ADDR. Update comments.
4009 (linux_read_offsets): Remove PT_TEXT_ADDR, PT_DATA_ADDR and
4010 PT_TEXT_END_ADDR guards. Update comments.
4011 (linux_target_op) <read_offsets>: Conditionally define to
4012 linux_read_offsets if the target is UCLIBC and if it defines
4013 PT_TEXT_ADDR, PT_DATA_ADDR and PT_TEXT_END_ADDR.
4014
68f5f838
SL
40152013-05-06 Sandra Loosemore <sandra@codesourcery.com>
4016 Andrew Jenner <andrew@codesourcery.com>
4017
4018 * Makefile.in (SFILES): Add linux-nios2-low.c.
4019 (clean): Add action to delete nios2-linux.c.
4020 (nios2-linux.c): New rule.
4021 * configure.srv: Add nios2*-*-linux*.
4022 * linux-nios2-low.c: New.
4023
1ebff1fd
HAQ
40242013-05-03 Hafiz Abid Qadeer <abidh@codesourcery.com>
4025
4026 * tracepoint.c (cmd_qtinit): Call 'stop_tracing'.
4027
f6150862
HZ
40282013-04-25 Hui Zhu <hui@codesourcery.com>
4029
4030 PR gdb/15186
f6150862
HZ
4031 * ax.c (ax_printf): Add fflush.
4032
614c279d
TT
40332013-04-22 Tom Tromey <tromey@redhat.com>
4034
4035 * Makefile.in (SFILES): Add filestuff.c.
4036 (OBS): Add filestuff.o.
4037 (filestuff.o): New target.
4038 * config.in, configure: Rebuild.
4039 * configure.ac: Check for fdwalk, pipe2.
4040
7d4e5717
PA
40412013-04-17 Pedro Alves <palves@redhat.com>
4042
4043 * configure.ac (USE_THREAD_DB): Delete variable.
4044 (if test "$srv_linux_thread_db" = "yes"): AC_DEFINE USE_THREAD_DB.
4045 Don't AC_SUBST USE_THREAD_DB.
4046 * Makefile.in (INTERNAL_CFLAGS): Remove @USE_THREAD_DB@.
4047 * config.in, configure: Regenerate.
4048
d5c93e41
PA
40492013-04-16 Pedro Alves <palves@redhat.com>
4050
4051 * linux-low.h (struct lwp_info) <thread_known>: Move under
4052 the USE_THREAD_DB #ifdef.
4053
04f5fe89
PA
40542013-04-16 Pedro Alves <palves@redhat.com>
4055
4056 * Makefile.in (INTERNAL_CFLAGS): Add @USE_THREAD_DB@.
4057 (linux-low.o): Delete rule.
4058 * linux-low.h: Always include "gdb_thread_db.h" instead of
4059 conditionally including thread_db.h.
4060 (struct lwp_info) <th>: Guard with #ifdef USE_THREAD_DB instead of
4061 HAVE_THREAD_DB_H.
4062
480b27bf
JK
40632013-04-07 Jan Kratochvil <jan.kratochvil@redhat.com>
4064
4065 * Makefile.in (install-only): Fix make install regression.
4066
43662968
JK
40672013-04-05 Jan Kratochvil <jan.kratochvil@redhat.com>
4068
4069 Convert man pages to texinfo, new gdbinit.5 texinfo page.
4070 * Makefile.in (install-only): Remove $(man1dir) and gdbserver.1
4071 installation.
4072 * gdbserver.1: Remove.
4073
3e74e146
PA
40742013-03-22 Pedro Alves <palves@redhat.com>
4075
4076 * linux-low.c (handle_extended_wait): Don't call
4077 linux_enable_event_reporting.
4078
a8347a2a
TT
40792013-03-15 Tony Theodore <tonyt@logyst.com>
4080
4081 PR build/9098:
4082 * Makefile.in (SHELL): Use @SHELL@.
4083
eeb56fa7
SDJ
40842013-03-14 Sergio Durigan Junior <sergiodj@redhat.com>
4085
4086 * tracepoint.c (cmd_qtv): Initialize `val' with zero, silencing
4087 compiler warning.
4088
4fa7e2ff
JB
40892013-03-13 Joel Brobecker <brobecker@adacore.com>
4090
4091 * linux-low.c (linux_target_ops) [!HAVE_LINUX_BTRACE]:
4092 Remove extraneous NULL element.
4093
8ddb1965
YQ
40942013-03-13 Yao Qi <yao@codesourcery.com>
4095
4096 * tracepoint.c (traceframe_read_tsv): Look for the last matched
4097 'V' block in trace frame.
4098
9accd112
MM
40992013-03-11 Markus Metzger <markus.t.metzger@intel.com>
4100
4101 * target.h (struct target_ops): Add btrace ops.
4102 (target_supports_btrace): New macro.
4103 (target_enable_btrace): New macro.
4104 (target_disable_btrace): New macro.
4105 (target_read_btrace): New macro.
4106 * gdbthread.h (struct thread_info): Add btrace field.
4107 * server.c: Include btrace-common.h.
4108 (handle_btrace_general_set): New function.
4109 (handle_btrace_enable): New function.
4110 (handle_btrace_disable): New function.
4111 (handle_general_set): Call handle_btrace_general_set.
4112 (handle_qxfer_btrace): New function.
4113 (struct qxfer qxfer_packets[]): Add btrace entry.
4114 * inferiors.c (remove_thread): Disable btrace.
4115 * linux-low: Include linux-btrace.h.
4116 (linux_low_enable_btrace): New function.
4117 (linux_low_read_btrace): New function.
4118 (linux_target_ops): Add btrace ops.
4119 * configure.srv (i[34567]86-*-linux*): Add linux-btrace.o.
4120 Add srv_linux_btrace=yes.
4121 (x86_64-*-linux*): Add linux-btrace.o.
4122 Add srv_linux_btrace=yes.
4123 * configure.ac: Define HAVE_LINUX_BTRACE.
4124 * config.in: Regenerated.
4125 * configure: Regenerated.
4126
5cc22e4c
MM
41272013-03-11 Markus Metzger <markus.t.metzger@intel.com>
4128
4129 * server.c (handle_qxfer): Preserve error message if -3 is
4130 returned.
4131 (qxfer): Document the -3 return value.
4132
7c97f91e
MM
41332013-03-11 Markus Metzger <markus.t.metzger@intel.com>
4134
4135 * Makefile.in (SFILES): Add $(srcdir)/common/linux-btrace.c.
4136 (linux_btrace_h): New variable.
4137 (linux-btrace.o): New rule.
4138
be9a119c 41392013-03-08 Stan Shebs <stan@codesourcery.com>
f6f899bf
HAQ
4140 Hafiz Abid Qadeer <abidh@codesourcery.com>
4141
4142 * tracepoint.c (trace_buffer_size): New global.
4143 (DEFAULT_TRACE_BUFFER_SIZE): New define.
4144 (init_trace_buffer): Change to one-argument function. Allocate
4145 trace buffer memory.
4146 (handle_tracepoint_general_set): Call cmd_bigqtbuffer_size to
4147 handle QTBuffer:size packet.
4148 (cmd_bigqtbuffer_size): New function.
4149 (initialize_tracepoint): Call init_trace_buffer with
4150 DEFAULT_TRACE_BUFFER_SIZE.
4151 * server.c (handle_query): Add QTBuffer:size in the
4152 supported packets.
4153
e64f7499
YQ
41542013-03-07 Yao Qi <yao@codesourcery.com>
4155
4156 * tracepoint.c (cur_action, cur_step_action): Make them unsigned.
4157 (cmd_qtfp): Initialize cur_action and cur_step_action 0 instead
4158 of -1.
4159 (cmd_qtsp): Adjust condition. Do post increment.
4160 Set cur_action and cur_step_action back to 0.
4161
f0ae6fc3
PA
41622013-03-07 Jeremy Bennett <jeremy.bennett@embecosm.com>
4163
4164 PR server/15236
4165 * linux-low.c (linux_write_memory): Return early success if LEN is
4166 zero.
4167
b5b0b0af
CV
41682013-03-05 Corinna Vinschen <vinschen@redhat.de>
4169
334ad4a8 4170 * configure.srv: Add x86_64-*-cygwin* as target.
b5b0b0af 4171
589bc927
TT
41722013-02-28 Tom Tromey <tromey@redhat.com>
4173
4174 * configure.ac: Invoke AC_SYS_LARGEFILE.
4175 * configure, config.in: Rebuild.
4176
dfe07582
CV
41772013-02-28 Corinna Vinschen <vinschen@redhat.com>
4178
4179 * win32-low.c: Throughout, fix format strings and casts of
4180 printf-like functions to avoid type related warnings on all
4181 platforms.
4182 (get_child_debug_event): Print dwDebugEventCode as hex since
4183 that's how it's usually documented.
4184
736cd585
YQ
41852013-02-28 Yao Qi <yao@codesourcery.com>
4186
4187 * tracepoint.c (cmd_qtbuffer): Call phex_nz instead of
4188 pulongest.
4189
e1f58301
JW
41902013-02-27 Jiong Wang <jiwang@tilera.com>
4191
4192 * Makefile.in (clean): Remove reg-tilegx.c, reg-tilegx32.c.
4193 (reg-tilegx32.c): New rule.
4194 * configure.srv (tilegx-*-linux*): Add reg-tilegx32.o to srv_regobj.
4195 * linux-tile-low.c (tile_arch_setup): New function. Invoke
4196 different register info initializer according to elf class.
4197 (init_registers_tilgx32): New function. The tilegx32 register info
4198 initializer.
4199 (tile_fill_gregset): Use "uint_reg_t" to represent register size.
4200 (tile_store_gregset): Likewise.
4201
d171ca78
YQ
42022013-02-27 Yao Qi <yao@codesourcery.com>
4203
4204 * server.c (process_point_options): Print debug message when
4205 debug_threads is true.
4206
282bbdf3
YQ
42072013-02-26 Yao Qi <yao@codesourcery.com>
4208
4209 * tracepoint.c (cmd_qtbuffer): Don't set '\0' in OWN_BUF.
4210
aca22551
PA
42112013-02-19 Pedro Alves <palves@redhat.com>
4212 Kai Tietz <ktietz@redhat.com>
4213
4214 PR gdb/15161
4215
4216 * server.c (handle_query) <CRC check>: Use unpack_varlen_hex
4217 instead of strtoul to extract address from packet.
4218 (process_serial_event) <'z'>: Likewise.
4219
4f3cee1c
YQ
42202013-02-18 Yao Qi <yao@codesourcery.com>
4221
4222 * linux-bfin-low.c (the_low_target): Use NULL instead of 0.
4223
8e1d55a3
PA
42242013-02-14 Pedro Alves <palves@redhat.com>
4225
4226 Plug memory leak.
4227
4228 * tracepoint.c (cmd_qtnotes): Free TRACING_USER_NAME,
4229 TRACING_NOTES and TRACING_STOP_NOTE before clobbering.
4230
458820da
PA
42312013-02-14 Pedro Alves <palves@redhat.com>
4232
4233 * tracepoint.c (cmd_qtdpsrc): Use savestring.
4234
baea0dae
PA
42352013-02-14 Pedro Alves <palves@redhat.com>
4236
4237 * tracepoint.c (save_string): Delete.
4238 (add_tracepoint_action): Use savestring instead of save_string.
4239
0b1afbb3
PA
42402013-02-12 Pedro Alves <palves@redhat.com>
4241
4242 * linux-xtensa-low.c: Ditto.
4243 * xtensa-xtregs.c: Ditto.
4244
8a4ac37e
PA
42452013-02-12 Sanimir Agovic <sanimir.agovic@intel.com>
4246
4247 * thread-db.c (thread_db_get_tls_address): NULL pointer check
4248 thread_db.
4249
148de6bb
MS
42502013-02-07 Marcus Shawcroft <marcus.shawcroft@arm.com>
4251
4252 * linux-aarch64-low.c (aarch64_arch_setup): Clamp
4253 aarch64_num_wp_regs and aarch64_num_bp_regs to
4254 AARCH64_HWP_MAX_NUM and AARCH64_HBP_MAX_NUM respectively.
4255
55fac6e0
MS
42562013-02-07 Marcus Shawcroft <marcus.shawcroft@arm.com>
4257
4258 * linux-aarch64-low.c (ps_get_thread_area): Replace
4259 PTRACE_GET_THREAD_AREA with PTRACE_GETREGSET.
4260
176eb98c
MS
42612013-02-04 Jim MacArthur <jim.macarthur@arm.com>
4262 Marcus Shawcroft <marcus.shawcroft@arm.com>
4263 Nigel Stephens <nigel.stephens@arm.com>
4264 Yufeng Zhang <yufeng.zhang@arm.com>
4265
4266 * Makefile.in (clean): Remove aarch64.c and aarch64-without-fpu.c.
4267 (aarch64.c, aarch64-without-fpu.c): New targets.
4268 * configure.srv (aarch64*-*-linux*): New.
4269 * linux-aarch64-low.c: New file.
4270
56f7af9c
MS
42712013-02-04 Marcus Shawcroft <marcus.shawcroft@arm.com>
4272
43aaf8b6 4273 * linux-low.c (handle_extended_wait, linux_create_inferior)
56f7af9c
MS
4274 (linux_attach_lwp_1, linux_kill_one_lwp, linux_attach_one_lwp)
4275 (dequeue_one_deferred_signal, linux_resume_one_thread)
4276 (fetch_register, linux_write_memory, linux_enable_event_reporting)
4277 (linux_tracefork_grandchild, linux_test_for_tracefork)
4278 (linux_read_offsets, linux_xfer_siginfo, linux_xfer_siginfo): Add
4279 PTRACE_ARG3_TYPE and PTRACE_ARG4_TYPE cast to ptrace arguments
4280 where the argument is 0.
4281
60f662b0
YQ
42822013-01-25 Yao Qi <yao@codesourcery.com>
4283
4284 * event-loop.c: Include "queue.h".
4285 (gdb_event_p): New typedef.
4286 (struct gdb_event) <next_event>: Remove.
4287 (event_queue): Change to QUEUE(gdb_event_p).
4288 (async_queue_event): Remove.
4289 (gdb_event_xfree): New.
4290 (initialize_event_loop): New.
4291 (process_event): Use API from QUEUE.
4292 (wait_for_event): Likewise.
4293 * server.c (main): Call initialize_event_loop.
4294 * server.h (initialize_event_loop): Declare.
4295
5ae4861a
YQ
42962013-01-18 Yao Qi <yao@codesourcery.com>
4297
4298 * ax.h (struct eval_agent_expr_context): New.
4299 (gdb_eval_agent_expr): Update declaration.
4300 * ax.c (gdb_eval_agent_expr): Remove argument REGCACHE and
4301 TFRAME. Add new argument CTX.
4302 * server.h (struct eval_agent_expr_context): Declare.
4303 (agent_mem_read, agent_tsv_read): Update declaration.
4304 (agent_mem_read_string): Likewise.
4305 * tracepoint.c (eval_tracepoint_agent_expr): Remove.
4306 (add_traceframe_block): Add new argument TPOINT.
4307 Increase TPOINT->traceframe_usage.
4308 (do_action_at_tracepoint): Call gdb_eval_agent_expr instead of
4309 eval_tracepoint_agent_expr.
4310 (condition_true_at_tracepoint): Likewise.
4311 (agent_mem_read): Remove argument TFRAME. Add argument CTX.
4312 (agent_mem_read_string, agent_tsv_read): Likewise.
4313
85e00e85
YQ
43142013-01-16 Yao Qi <yao@codesourcery.com>
4315
4316 * linux-low.c (linux_resume_one_lwp): Don't check
4317 'lwp->bp_reinsert != 0'.
4318
4039cf45
JB
43192013-01-07 Joel Brobecker <brobecker@adacore.com>
4320 Pedro Alves <palves@redhat.com>
4321
4322 * lynx-low.c (ptrace_request_to_str): Define a temporary
4323 macro and use it to simplify this function's implementation.
4324
9044dee2
JB
43252013-01-07 Joel Brobecker <brobecker@adacore.com>
4326
4327 * lynx-low.c (lynx_resume): Call perror_with_name if lynx_ptrace
4328 sets errno.
4329
e6352c8f
JB
43302013-01-07 Joel Brobecker <brobecker@adacore.com>
4331
4332 * configure.srv (i[34567]86-*-lynxos*): Set srv_xmlfiles.
4333
50681a27
JB
43342013-01-07 Joel Brobecker <brobecker@adacore.com>
4335
4336 * configure.srv (powerpc-*-lynxos*): Set srv_xmlfiles.
4337
3f6e77ef
JB
43382013-01-07 Joel Brobecker <brobecker@adacore.com>
4339
4340 * lynx-low.c (lynx_resume): Use the resume_info parameter
4341 to determine the ptid for the lynx_ptrace call, unless
4342 it is equal to minus_one_ptid, in which case we use the
4343 ptid of the current_inferior.
4344 (lynx_wait_1): After having received a thread create/exit
4345 event, resume the inferior's execution using the signaling
4346 thread's ptid, rather than the old ptid.
4347
7fda33ae
JB
43482013-01-07 Joel Brobecker <brobecker@adacore.com>
4349
4350 * lynx-low.c (lynx_resume): Delete variable ret.
4351
b9786c74
JB
43522013-01-01 Joel Brobecker <brobecker@adacore.com>
4353
4354 * gdbreplay.c (gdbreplay_version): Update copyright year.
4355 * server.c (gdbserver_version): Likewise.
4356
8b93d60f
JB
43572012-12-17 Joel Brobecker <brobecker@adacore.com>
4358
4359 * lynx-low.c (lynx_wait_1): Add debug trace before adding
4360 new thread.
4361
037335a7
JB
43622012-12-17 Joel Brobecker <brobecker@adacore.com>
4363
4364 * lynx-low.c (ptrace_request_to_str): Add handling for
4365 PTRACE_GETTRACESIG.
4366
52d4cbd8
JB
43672012-12-17 Joel Brobecker <brobecker@adacore.com>
4368
4369 * lynx-low.c (lynx_attach): Delete variable new_process.
4370
ab8f6ca9
JB
43712012-12-17 Joel Brobecker <brobecker@adacore.com>
4372
4373 * lynx-low.c (lynx_create_inferior): Delete variable
4374 new_process.
4375
78cbc024
JB
43762012-12-17 Joel Brobecker <brobecker@adacore.com>
4377
4378 * lynx-low.c (ptrace_request_to_str): Do not handle
4379 PTRACE_GETTHREADLIST if this macro does not exist.
4380
14a00470
YQ
43812012-12-15 Yao Qi <yao@codesourcery.com>
4382
4383 * Makefile.in (OBS): Add notif.o.
4384 * notif.c, notif.h: New.
4385 * server.c: Include "notif.h".
4386 (struct vstop_notif) <next>: Remove.
4387 <base>: New field.
4388 (queue_stop_reply): Update.
4389 (push_event, send_next_stop_reply): Remove.
4390 (discard_queued_stop_replies): Update.
4391 (notif_stop): New variable.
4392 (handle_v_stopped): Remove.
4393 (handle_v_requests): Don't call handle_v_stopped. Call
4394 handle_ack_notif instead.
4395 (queue_stop_reply_callback): Call notif_event_enque instead
4396 of queue_stop_reply.
4397 (handle_status): Don't call send_next_stop_reply, call
4398 notif_write_event instead.
4399 (kill_inferior_callback): Likewise.
4400 (detach_or_kill_inferior_callback): Likewise.
4401 (main): Call initialize_notif.
4402 (process_serial_event): Call QUEUE_is_empty.
4403 (handle_target_event): Call notif_push instead of push event.
4404 * server.h (push_event): Remove declaration.
4405
61c125b9
TT
44062012-12-10 Tom Tromey <tromey@redhat.com>
4407
4408 * Makefile.in (DEPMODE, DEPDIR, depcomp, COMPILE.pre)
4409 (COMPILE.post, COMPILE, POSTCOMPILE, IPAGENT_COMPILE): New
4410 macros.
4411 (.c.o): Rewrite.
4412 (ax-ipa.o, tracepoint-ipa.o, utils-ipa.o, format-ipa.o)
4413 (common-utils-ipa.o, remote-utils-ipa.o, regcache-ipa.o)
4414 (i386-linux-ipa.o, linux-i386-ipa.o, linux-amd64-ipa.o)
4415 (amd64-linux-ipa.o, ax.o): Rewrite.
4416 (event-loop.o, hostio.o, hostio-errno.o, inferiors.o, mem-break.o)
4417 (proc-service.o, regcache.o, remote-utils.o, server.o, target.o)
4418 (thread-db.o, tracepoint.o, utils.o, gdbreplay.o, dll.o): Remove.
4419 (signals.o, linux-procfs.o, linux-ptrace.o, common-utils.o, vec.o)
4420 (gdb_vecs.o, xml-utils.o, linux-osdata.o, ptid.o, buffer.o)
4421 (format.o, agent.o, vasprintf.o, vsnprintf.o): Rewrite.
4422 (i386-low.o, i387-fp.o, linux-low.o, linux-arm-low.o)
4423 (linux-bfin-low.o, linux-cris-low.o, linux-crisv32-low.o)
4424 (linux-ia64-low.o, linux-m32r-low.o, linux-mips-low.o)
4425 (linux-ppc-low.o, linux-s390-low.o, linux-sh-low.o)
4426 (linux-tic6x-low.o, linux-x86-low.o, linux-xtensa-low.o)
4427 (linux-tile-low.o, lynx-low.o, lynx-ppc-low.o, nto-low.o)
4428 (nto-x86-low.o, linux-low.o, win32-low.o, win32-arm-low.o)
4429 (win32-i386-low.o, spu-low.o, reg-arm.o, arm-with-iwmmxt.o)
4430 (arm-with-vfpv2.o, arm-with-vfpv3.o, arm-with-neon.o, reg-bfin.o)
4431 (reg-cris.o, reg-crisv32.o, i386.o, i386-linux.o, i386-avx.o)
4432 (i386-avx-linux.o, i386-mmx.o, i386-mmx-linux.o, reg-ia64.o)
4433 (reg-m32r.o, reg-m68k.o, reg-cf.o, mips-linux.o, mips-dsp-linux.o)
4434 (mips64-linux.o, mips64-dsp-linux.o, powerpc-32.o, powerpc-32l.o)
4435 (powerpc-altivec32l.o, powerpc-cell32l.o, powerpc-vsx32l.o)
4436 (powerpc-isa205-32l.o, powerpc-isa205-altivec32l.o)
4437 (powerpc-isa205-vsx32l.o, powerpc-e500l.o, powerpc-64l.o)
4438 (powerpc-altivec64l.o, powerpc-cell64l.o, powerpc-vsx64l.o)
4439 (powerpc-isa205-64l.o, powerpc-isa205-altivec64l.o)
4440 (powerpc-isa205-vsx64l.o, s390-linux32.o, s390-linux32v1.o)
4441 (s390-linux32v2.o, s390-linux64.o, s390-linux64v1.o)
4442 (s390-linux64v2.o, s390x-linux64.o, s390x-linux64v1.o)
4443 (s390x-linux64v2.o, tic6x-c64xp-linux.o, tic6x-c64x-linux.o)
4444 (tic6x-c62x-linux.o, reg-sh.o, reg-sparc64.o, reg-spu.o, amd64.o)
4445 (amd64-linux.o, amd64-avx.o, amd64-avx-linux.o, x32.o)
4446 (x32-linux.o, x32-avx.o, x32-avx-linux.o, reg-xtensa.o)
4447 (reg-tilegx.o): Remove.
4448 (all_object_files): New macro.
4449 Include .deps files.
4450 * aclocal.m4, configure: Rebuild.
4451 * acinclude.m4: Include depstand.m4, lead-dot.m4.
4452 * configure.ac: Invoke ZW_CREATE_DEPDIR,
4453 ZW_PROG_COMPILER_DEPENDENCIES. Compute GMAKE condition.
4454
e90e9ad9
TT
44552012-12-05 Tom Tromey <tromey@redhat.com>
4456
4457 PR gdb/14917:
4458 * server.h (current_insn_ptr, emit_error): Declare 'extern'.
4459
02d403bf 44602012-11-28 Markus Metzger <markus.t.metzger@intel.com>
945bf713
MM
4461
4462 * configure.ac: Check for linux/perf_event.h.
4463 * config.in: Regenerated.
4464 * configure: Regenerated.
4465
0270a750
PA
44662012-11-26 Maxime Villard <rustyBSD@gmx.fr>
4467
4468 * hostio.c (handle_readlink): Decrease buffer size
4469 parameter passed to readlink by one byte.
4470
8c29b58e
YQ
44712012-11-26 Yao Qi <yao@codesourcery.com>
4472
4473 * configure.ac (build_warnings): Append '-Wempty-body'.
4474 * configure: Regenerated.
4475 * linux-low.c (linux_create_inferior): Use braces for empty 'if'
4476 body.
4477
8bdce1ff
PM
44782012-11-15 Pierre Muller <muller@sourceware.org>
4479
4480 * configure.ac (AC_CHECK_HEADERS): Add wait.h header.
4481 * config.in: Regenerate.
4482 * configure: Regenerate.
4483 * linux-low.c: Use "gdb_stat.h" header instead of <sys/stat.h> header.
4484 Use "gdb_wait.h" header instead of <sys/wait.h> header.
4485 * lynx-low.c: Use "gdb_wait.h" header instead of <sys/wait.h> header.
4486 * remote-utils.c: Use "gdb_stat.h" header instead of <sys/stat.h>
4487 header.
4488 * server.c: Remove HAVE_WAIT_H conditional. Use "gdb_wait.h" header
4489 instead of <sys/wait.h> header.
4490 * spu-low.c: Use "gdb_wait.h" header instead of <sys/wait.h> header.
4491
02d403bf 44922012-11-13 Markus Metzger <markus.t.metzger@intel.com>
3ba6ad0f
MM
4493
4494 * Makefile.in: (INTERNAL_CFLAGS): Add -DGDBSERVER
4495 (various make rules): Remove -DGDBSERVER
4496
fbd5db48
YQ
44972012-11-09 Yao Qi <yao@codesourcery.com>
4498
4499 * spu-low.c (current_ptid): Move it to ..
4500 * gdbthread.h: ... here. New.
4501 * remote-utils.c (read_ptid): Use macro 'current_ptid'.
4502 * server.c (myresume, process_serial_event): Likewise.
4503 * thread-db.c (thread_db_find_new_threads): Likewise.
4504 * tracepoint.c (run_inferior_command): Likewise.
4505
b3dc46ff
AB
45062012-10-01 Andrew Burgess <aburgess@broadcom.com>
4507
4508 * server.c (handle_search_memory_1): Include access length in
4509 warning message.
4510
07c04788
HPN
45112012-09-05 Michael Brandt <michael.brandt@axis.com>
4512
4513 * linux-crisv32-low.c: Fix compile errors.
4514
918d227b
YQ
45152012-09-04 Yao Qi <yao@codesourcery.com>
4516
4517 * tracepoint.c (cmd_qtsv): Adjust debug message.
4518 Don't check CUR_TPOINT.
4519
18c1b81a
YQ
45202012-08-28 Yao Qi <yao@codesourcery.com>
4521
4522 * ax.c, tracepoint.c: Replace ATTR_FORMAT with ATTRIBUTE_PRINTF.
4523 * server.h: Include 'libiberty.h' and 'ansidecl.h'.
4524 (ATTR_NORETURN, ATTR_FORMAT, ATTR_MALLOC): Remove.
4525 Remove declarations of xmalloc, xreallloc, xstrdup and
4526 freeargv.
4527 * Makefile.in (libiberty_h): New.
4528 (server_h): Append dependencies 'libiberty.h' and 'ansidecl.h'.
4529 (linux-bfin-low.o): Append dependency 'libiberty.h'.
4530
dc82f37b
YQ
45312012-08-23 Yao Qi <yao@codesourcery.com>
4532
4533 * server.h: Remove declaration of 'xsnprintf'.
4534
406b1477
KS
45352012-08-22 Keith Seitz <keiths@redhat.com>
4536
4537 * server.h: Include build-gnulib-gbserver/config.h.
4538 * gdbreplay.c: Likewise.
4539
e6712ff1
DE
45402012-08-08 Doug Evans <dje@google.com>
4541
4542 * Makefile.in (SFILES): Add gdb_vecs.c.
4543 (OBS): Add gdb_vecs.o.
4544 (gdb_vecs_h, host_defs_h): New variables.
4545 (thread-db.o): Add $(gdb_vecs_h) dependency.
4546 (gdb_vecs.o): New rule.
4547 * thread-db.c: #include "gdb_vecs.h".
4548 (thread_db_load_search): Use a vector to iterate over path elements.
4549 Handle text appearing after "$pdir".
4550
4551 * configure.ac: Add check for strstr.
4552 * config.in: Regenerate.
4553 * configure: Regenerate.
4554
7c3270ae
UW
45552012-08-02 Ulrich Weigand <ulrich.weigand@linaro.org>
4556
4557 * hostio.c (handle_pread): If pread fails, fall back to attempting
4558 lseek/read.
4559 (handle_pwrite): Likewise for pwrite.
4560
b62e2b27
UW
45612012-08-01 Ulrich Weigand <ulrich.weigand@linaro.org>
4562
4563 * linux-arm-low.c (arm_linux_hw_point_initialize): Distinguish
4564 between unsupported TYPE and unimplementable ADDR/LEN combination.
4565 (arm_insert_point): Act on new return value.
4566
78a99e91
PA
45672012-07-31 Pedro Alves <palves@redhat.com>
4568
4569 * server.c (process_point_options): Only skip tokens if we find
4570 one that is unrecognized. Don't treat 'X' specially while
4571 skipping unrecognized tokens.
4572
fcf303ab
UW
45732012-07-30 Ulrich Weigand <ulrich.weigand@linaro.org>
4574
4575 * linux-arm-low.c (arm_linux_hw_point_initialize): Do not attempt
4576 to 4-byte-align HW breakpoint addresses for Thumb.
4577
7255706c
YQ
45782012-07-27 Yao Qi <yao@codesourcery.com>
4579
4580 PR remote/14161.
4581
4582 * server.h: Declare gdb_agent_about_to_close.
4583 * target.c (kill_inferior): Include "agent.h".
4584 New. Send command 'kill'.
4585 * target.h (kill_inferior): Removed macro.
4586 * tracepoint.c (gdb_agent_about_to_close): New.
4587 (gdb_agent_helper_thread): Handle command 'close'.
4588 Wait endlessly until the inferior stops.
4589 Install gdb_agent_remove_socket to atexit hook.
4590 (agent_socket_name): New static variable.
4591 (gdb_agent_socket_init): Replace local variable 'name' with
4592 'agent_socket_name'.
4593 (gdb_agent_remove_socket): New.
4594
5a3f286f
YQ
45952012-07-27 Yao Qi <yao@codesourcery.com>
4596
4597 * server.c (process_point_options): Stop at 'X' when parsing.
4598
961bd387
ME
45992012-07-19 Michael Eager <eager@eagercon.com>
4600
a261b8f5 4601 * i386-low.c (Z_packet_to_hw_type): Add Z_PACKET_HW_BP, translate
961bd387
ME
4602 to hw_execute.
4603 * linux-x86-low.c (x86_insert_point, x86_remove_point):
4604 Call i386_low_insert_watchpoint, i386_low_remove_watchpoint to add/del
4605 hardware breakpoint.
4606
aa7c7447
JK
46072012-07-07 Jan Kratochvil <jan.kratochvil@redhat.com>
4608
4609 * gdbserver/linux-low.c (initialize_low): Call
4610 linux_ptrace_init_warnings.
4611
7f216e7c
DE
46122012-07-02 Doug Evans <dje@google.com>
4613
4614 * mem-break.c (gdb_no_commands_at_breakpoint): Fix cast from
4615 pointer to int.
4616
d3ce09f5
SS
46172012-07-02 Stan Shebs <stan@codesourcery.com>
4618
4619 * Makefile.in (WARN_CFLAGS_NO_FORMAT): Define.
4620 (ax.o): Add it to build rule.
4621 (ax-ipa.o): Ditto.
4622 (OBS): Add format.o.
4623 (IPA_OBS): Add format.o.
4624 * server.c (handle_query): Claim support for breakpoint commands.
4625 (process_point_options): Add command case.
4626 (process_serial_event): Leave running if there are printfs in
4627 effect.
4628 * mem-break.h (any_persistent_commands): Declare.
4629 (add_breakpoint_commands): Declare.
4630 (gdb_no_commands_at_breakpoint): Declare.
4631 (run_breakpoint_commands): Declare.
4632 * mem-break.c (struct point_command_list): New struct.
4633 (struct breakpoint): New field command_list.
4634 (any_persistent_commands): New function.
4635 (add_commands_to_breakpoint): New function.
4636 (add_breakpoint_commands): New function.
4637 (gdb_no_commands_at_breakpoint): New function.
4638 (run_breakpoint_commands): New function.
4639 * linux-low.c (linux_wait_1): Test for and run breakpoint commands
4640 locally.
4641 * ax.c: Include format.h.
4642 (ax_printf): New function.
4643 (gdb_eval_agent_expr): Add printf opcode.
4644
2f8f6aed
YQ
46452012-06-13 Yao Qi <yao@codesourcery.com>
4646
4647 * server.c (start_inferior): Remove duplicated writes to fields
4648 'last_resume_kind' and 'last_status' of 'current_inferior'.
4649
0c9070b3
YQ
46502012-06-12 Yao Qi <yao@codesourcery.com>
4651 Pedro Alves <palves@redhat.com>
4652
4653 * linux-low.c (linux_set_resume_request): Simplify predicate. Add
4654 comment.
4655 * server.c (handle_v_cont): Extend comment.
4656
c52daf70
YQ
46572012-06-11 Yao Qi <yao@codesourcery.com>
4658
4659 * linux-low.c (linux_attach): Add 'static'.
4660
d38bbb0a
YQ
46612012-06-06 Yao Qi <yao@codesourcery.com>
4662
4663 * ax.c (gdb_eval_agent_expr): Print `top' in hex.
4664
89dc0afd
JK
46652012-06-01 Jan Kratochvil <jan.kratochvil@redhat.com>
4666
4667 Fix gcc -flto compilation warning.
4668 * server.c (main): Make variable multi_mode and attach volatile.
4669
75f62ce7
TJB
46702012-05-30 Thiago Jung Bauermann <thiago.bauermann@linaro.org>
4671
4672 * linux-low.c (get_r_debug): Disable code using DT_MIPS_RLD_MAP
4673 if the platform doesn't know about it.
4674
65f479b6
PA
46752012-05-30 Jeff Kenton <jkenton@tilera.com>
4676
4677 * Makefile.in (SFILES): Add linux-tile-low.c.
4678 (linux-tile-low.o, reg-tilegx.o, reg-tilegx.c): New rules.
4679 * configure.srv: Handle tilegx-*-linux*.
4680 * linux-tile-low.c: New file.
4681
0c5bf5a9
JK
46822012-05-28 Jan Kratochvil <jan.kratochvil@redhat.com>
4683
4684 * linux-low.c (linux_qxfer_libraries_svr4): Return -1 if R_DEBUG is -1.
4685
a493e3e2
PA
46862012-05-24 Pedro Alves <palves@redhat.com>
4687
4688 PR gdb/7205
4689
43aaf8b6 4690 Replace TARGET_SIGNAL_ with GDB_SIGNAL_ throughout.
a493e3e2 4691
2ea28649
PA
46922012-05-24 Pedro Alves <palves@redhat.com>
4693
4694 PR gdb/7205
4695
4696 Replace target_signal with gdb_signal throughout.
4697
8d409d16
MR
46982012-05-22 Maciej W. Rozycki <macro@codesourcery.com>
4699
4700 * linux-low.c (linux_store_registers): Avoid the copying sequence
4701 when no data has been retrieved by ptrace.
4702
23512c01
MGD
47032012-05-22 Will Deacon <will.deacon@arm.com>
4704
4705 * linux-low (__UCLIBC__ && !(__UCLIBC_HAS_MMU__ || __ARCH_HAS_MMU__)):
4706 Include asm/ptrace.h.
4707 (PT_TEXT_ADDR, PT_DATA_ADDR, PT_TEXT_END_ADDR): Define only if not
4708 already defined.
4709
4934b29e
MR
47102012-05-21 Maciej W. Rozycki <macro@codesourcery.com>
4711
4712 * linux-low.c (linux_store_registers): Don't re-retrieve data
4713 with ptrace that has already been obtained from /proc. Always
4714 copy any data retrieved with ptrace to the buffer supplied.
4715
bde24c0a
PA
47162012-05-11 Yao Qi <yao@codesourcery.com>
4717 Pedro Alves <palves@redhat.com>
4718
4719 * linux-low.c (enum stopping_threads_kind): New.
4720 (stopping_threads): Change type to `enum stopping_threads_kind'.
4721 (handle_extended_wait): If stopping and suspending threads, leave
4722 the new_lwp suspended too.
4723 (linux_wait_for_event): Adjust.
4724 (stop_all_lwps): Set `stopping_threads' to
4725 STOPPING_AND_SUSPENDING_THREADS or STOPPING_THREADS depending on
4726 whether we're suspending threads or just stopping them. Assert no
4727 recursion happens.
4728
623b6bdf
YQ
47292012-04-29 Yao Qi <yao@codesourcery.com>
4730
4731 * server.h: Move some code to ...
4732 * gdbthread.h: ... here. New.
4733 * Makefile.in (inferiors.o, regcache.o): Depends on gdbthread.h
4734 (remote-utils.o, server.o, target.o tracepoint.o): Likewise.
4735 (nto-low.o, win32-low.o): Likewise.
4736 * inferiors.c, linux-low.h, nto-low.c: Include gdbthread.h.
4737 * regcache.c, remote-utils.c, server.c: Likewise.
4738 * target.c, tracepoint.c, win32-low.c: Likewise.
4739
f15f9948
TJB
47402012-04-24 Thiago Jung Bauermann <thiago.bauermann@linaro.org>
4741
4742 * linux-low.h (PTRACE_ARG3_TYPE): Move macro from linux-low.c.
4743 (PTRACE_ARG4_TYPE): Likewise.
4744 (PTRACE_XFER_TYPE): Likewise.
4745 * linux-arm-low.c (arm_prepare_to_resume): Cast third argument of
4746 ptrace to PTRACE_ARG3_TYPE.
4747 * linux-low.c (PTRACE_ARG3_TYPE): Move macro to linux-low.h.
4748 (PTRACE_ARG4_TYPE): Likewise.
4749 (PTRACE_XFER_TYPE): Likewise.
4750 (linux_detach_one_lwp): Cast fourth argument of
4751 ptrace to long then PTRACE_ARG4_TYPE.
4752 (regsets_fetch_inferior_registers): Cast third argument of
4753 ptrace to long then PTRACE_ARG3_TYPE.
4754 (regsets_store_inferior_registers): Likewise.
4755
38ea300a
PA
47562012-04-20 Pedro Alves <palves@redhat.com>
4757
4758 * configure: Regenerate.
4759
c971b7fa
PA
47602012-04-19 Pedro Alves <palves@redhat.com>
4761
43aaf8b6 4762 * Makefile.in (GNULIB_BUILDDIR): New.
c971b7fa 4763 (LIBGNU, INCGNU, GNULIB_H): Adjust.
43aaf8b6
PA
4764 (SUBDIRS, CLEANDIRS, REQUIRED_SUBDIRS): New.
4765 (all, install-only, uninstall, clean-info, all-lib, clean): No
4766 longer pass GNULIB_FLAGS_TO_PASS. Use subdir_do.
4767 (maintainer-clean realclean distclean): Use subdir_do.
4768 (subdir_do): New.
4769 (gnulib/import/Makefile): Adjust. Replace gnulib/import with
c971b7fa 4770 $(GNULIB_BUILDDIR). Don't pass argument to config.status.
43aaf8b6
PA
4771 * acinclude.m4: Include acx_configure_dir.m4.
4772 * configure.ac: Remove gl_EARLY, gl_INIT, and AM_INIT_AUTOMAKE
4773 calls. Call AC_PROG_RANLIB. Configure gnulib using
4774 ACX_CONFIGURE_DIR.
4775 (GNULIB): New.
4776 (GNULIB_STDINT_H): Adjust.
4777 (AC_OUTPUT): Don't output gnulib/Makefile anymore.
4778 * gdbreplay.c: Include build-gnulib/config.h.
4779 * server.h: Likewise.
4780 * aclocal.m4: Regenerate.
4781 * config.in: Regenerate.
4782 * configure: Regenerate.
c971b7fa 4783
809277f8
PA
47842012-04-19 Pedro Alves <palves@redhat.com>
4785
4786 * Makefile.in (LIBGNU, INCGNU): Adjust.
4787 (GNULIB_FLAGS_TO_PASS, GNULIB_H): Adjust.
4788 (all, install-only, uninstall, clean-info, all-lib, clean)
4789 (maintainer-clean, Makefile, gnulib/Makefile): Adjust.
4790 * configure.ac: Adjust AC_OUTPUT output.
4791 * aclocal.m4: Regenerate.
4792 * configure: Regenerate.
4793
fd9bb8b8
PA
47942012-04-19 Pedro Alves <palves@redhat.com>
4795
4796 * Makefile.in (generated_files): New.
4797 (server_h): Remove the explicit dependency on config.h, and depend
4798 on $generated_files.
4799
1c298c66
PA
48002012-04-19 Pedro Alves <palves@redhat.com>
4801
4802 * Makefile.in (INCGNU): Add -Ignulib.
4803
57c4b50b
PA
48042012-04-19 Pedro Alves <palves@redhat.com>
4805
4806 * Makefile.in (GNULIB_INCLUDE_DIR): Rename to ...
4807 (INCGNU): ... this, and spell out -I here.
4808 (GNULIB_LIB): Rename to ...
4809 (LIBGNU): ... this.
4810 (INCLUDE_CFLAGS, gdbserver$(EXEEXT), $(GNULIB_LIB) rule): Adjust.
4811
1030e047
PA
48122012-04-19 Pedro Alves <palves@redhat.com>
4813
4814 * config.in: Regenerate.
4815
447d4319
PA
48162012-04-19 Pedro Alves <palves@redhat.com>
4817
4818 * configure.ac: Remove AC_CHECK_DECLS check for memmem.
4819 * server.h (memmem): Remove declaration.
4820 * config.in: Regenerate.
4821 * configure: Regenerate.
4822
aad9eab9
YQ
48232012-04-19 Yao Qi <yao@codesourcery.com>
4824
4825 * Makefile.in (SFILES): Add common/vec.c.
4826 (OBS): Add vec.o.
4827 (vec.o): New rule.
4828
3e10640f
YQ
48292012-04-19 Yao Qi <yao@codesourcery.com>
4830
4831 * remote-utils.c (prepare_resume_reply): Replace with macro
4832 target_core_of_thread.
4833 * server.c (handle_qxfer_threads_proper): Likewise.
4834 * target.h (traget_core_of_thread): New macro.
4835
71622373
PA
48362012-04-18 Pedro Alves <palves@redhat.com>
4837
4838 * aclocal.m4: Regenerate.
4839 * configure: Regenerate.
4840
80d26939
YQ
48412012-04-16 Yao Qi <yao@codesourcery.com>
4842
4843 * tracepoint.c (cmd_qtstart): Download tracepoints even when they are
4844 duplicated on address.
4845
42476b70
YQ
48462012-04-16 Yao Qi <yao@codesourcery.com>
4847
4848 * tracepoint.c (COPY_FIELD_TO_BUF): New macro.
4849 (struct tracepoint_action_ops) <send>: New field.
4850 (m_tracepoint_action_send, r_tracepoint_action_send): New.
4851 (agent_expr_send, x_tracepoint_action_send): New.
4852 (l_tracepoint_action_send): New.
4853 (cmd_qtdp): Download and install tracepoint
4854 according to `use_agent'.
4855 (run_inferior_command): Add one more parameter `len'.
4856 Update callers.
4857 (tracepoint_send_agent): New.
4858 (cmd_qtdp, cmd_qtstart): Call tracepoint_send_agent.
4859
7bc83639
YQ
48602012-04-16 Yao Qi <yao@codesourcery.com>
4861
4862 * tracepoint.c (download_tracepoints): Moved to ...
4863 (cmd_qtstart): ... here.
4864
5f18041e
YQ
48652012-04-14 Yao Qi <yao@codesourcery.com>
4866
4867 * tracepoint.c: Include inttypes.h.
4868 (struct collect_memory_action): Use sized types.
4869 (struct tracepoint): Likewise.
4870 (cmd_qtdp, stop_tracing): Update print specifiers.
4871 (cmd_qtp, response_tracepoint): Likewise.
4872 (collect_data_at_tracepoint): Likewise.
4873 (collect_data_at_step): Likewise.
4874
55a8c076
YQ
48752012-04-14 Yao Qi <yao@codesourcery.com>
4876
4877 Import gnulib module inttypes.
4878 * aclocal.m4, config.in, configure: Regenerated.
4879
dc750257
YQ
48802012-04-14 Yao Qi <yao@codesourcery.com>
4881
4882 * Makefile.in (maintainer-clean, realclean, distclean): Remove
4883 Makefile and config.status at last.
4884
0ab5faf9
YQ
48852012-04-13 Yao Qi <yao@codesourcery.com>
4886
4887 * tracepoint.c: Include stdint.h unconditionally.
4888
18f5fd81
TJB
48892012-04-13 Thiago Jung Bauermann <thiago.bauermann@linaro.org>
4890
4891 * acinclude.m4 (GDBSERVER_HAVE_THREAD_DB_TYPE): New macro based
4892 on BFD_HAVE_SYS_PROCFS_TYPE.
4893 * configure.ac: Look for lwpid_t and psaddr_t in libthread_db.h.
4894 * configure: Regenerate.
4895 * config.in: Likewise.
4896
4d47af5c
L
48972012-04-13 H.J. Lu <hongjiu.lu@intel.com>
4898
4899 * Makefile.in (clean): Also remove x32.c x32-linux.c
4900 x32-avx.c x32-avx-linux.c.
4901 (x32.o): New target.
4902 (x32.c): Likewise.
4903 (x32-linux.o): Likewise.
4904 (x32-linux.c): Likewise.
4905 (x32-avx.o): Likewise.
4906 (x32-avx.c): Likewise.
4907 (x32-avx-linux.o): Likewise.
4908 (x32-avx-linux.c): Likewise.
4909
4910 * configure.srv (srv_amd64_regobj): Add x32.o x32-avx.o.
4911 (srv_amd64_linux_regobj): Add x32-linux.o x32-avx-linux.o.
4912 (srv_i386_64bit_xmlfiles): Add i386/x32-core.xml.
4913 (srv_amd64_xmlfiles): Add i386/x32.xml i386/x32-avx.xml.
4914 (srv_amd64_linux_xmlfiles): Add i386/x32-linux.xml
4915 i386/x32-avx-linux.xml.
4916
4917 * linux-x86-low.c (init_registers_x32_linux): New prototype.
4918 (init_registers_x32_avx_linux): Likwise.
4919 (x86_linux_update_xmltarget): Call init_registers_x32_linux
4920 or init_registers_x32_avx_linux if linux_is_elf64 is false.
4921
ecedbe58
PA
49222012-04-13 Pedro Alves <palves@redhat.com>
4923
4924 * Makefile.in (GNULIB_FLAGS_TO_PASS): New.
4925 (FLAGS_TO_PASS): Don't change or set $top_srcdir, $srcdir and VPATH.
4926 (all, uninstall, clean-info, all-lib, clean, maintainer-clean)
4927 (realclean, distclean): Explicitly pass $GNULIB_FLAGS_TO_PASS to
4928 the sub-make.
4929
c92b5177
L
49302012-04-12 H.J. Lu <hongjiu.lu@intel.com>
4931
4932 * linux-x86-low.c (compat_x32_clock_t): New.
4933 (compat_x32_siginfo_t): Likewise.
4934 (compat_x32_siginfo_from_siginfo): Likewise.
4935 (siginfo_from_compat_x32_siginfo): Likewise.
4936 (linux_is_elf64): Likewise.
4937 (x86_siginfo_fixup): Call compat_x32_siginfo_from_siginfo
4938 and siginfo_from_compat_x32_siginfo for x32.
4939 (x86_arch_setup): Set linux_is_elf64.
4940
214d508e
L
49412012-04-12 H.J. Lu <hongjiu.lu@intel.com>
4942
4943 PR gdb/13969
4944 * linux-low.c (linux_pid_exe_is_elf_64_file): Also return the
4945 e_machine field.
4946 (linux_qxfer_libraries_svr4): Update call to elf_64_file_p.
4947 * linux-low.h (linux_pid_exe_is_elf_64_file): Updated.
4948 * linux-x86-low.c (x86_arch_setup): Check if GDBserver is
4949 compatible with process.
4950
c9a1864a
YQ
49512012-04-12 Yao Qi <yao@codesourcery.com>
4952
4953 * Makefile.in: Define abs_top_srcdir and abs_srcdir.
4954 (INCLUDE_CFLAGS): Append GNULIB_INCLUDE_DIR.
4955 (install-only, install-info, clean): Handle sub dir gnulib.
4956 (all-lib, am--refresh): New targets.
4957 (memmem.o): Remove target.
4958 * configure.ac: Remove AC_CONFIG_LIBOBJ_DIR.
4959 Invoke gl_EARLY. Invoke AC_CHECK_PROGS for make.
4960 (AC_REPLACE_FUNCS): Remove memmem.
4961 Invoke gl_INIT and AM_INIT_AUTOMAKE.
4962 (AC_OUTPUT): Generate Makefile in gnulib/.
4963 * aclocal.m4, config.in, configure: Regenerated.
4964
367ba2c2
MR
49652012-04-10 Maciej W. Rozycki <macro@codesourcery.com>
4966
4967 * linux-low.c (get_r_debug): Handle DT_MIPS_RLD_MAP.
4968
9d236627
PA
49692012-04-05 Pedro Alves <palves@redhat.com>
4970
4971 -Werror=strict-aliasing
4972
4973 * spu-low.c (parse_spufs_run): Avoid dereferencing type-punned
4974 pointer.
4975
111217b3
PA
49762012-04-04 Pedro Alves <palves@redhat.com>
4977
4978 * linux-sparc-low.c (sparc_fill_gregset_to_stack)
4979 (sparc_store_gregset_from_stack, sparc_store_gregset)
4980 (sparc_breakpoint_at): Fix formatting.
4981
8365dcf5
TJB
49822012-03-30 Thiago Jung Bauermann <thiago.bauermann@linaro.org>
4983
4984 * configure.ac: Check whether Elf32_auxv_t and Elf64_auxv_t
4985 are available.
4986 * linux-low.c [HAVE_ELF32_AUXV_T] (Elf32_auxv_t): Add typedef.
4987 [HAVE_ELF64_AUXV_T] (Elf64_auxv_t): Likewise.
4988 * config.in: Regenerate.
4989 * configure: Likewise.
4990
689cc2ae
PA
49912012-03-29 Pedro Alves <palves@redhat.com>
4992
4993 * linux-low.c (regsets_store_inferior_registers) [__sparc__]:
4994 Correct ptrace arguments.
4995
c14dfd32
PA
49962012-03-28 Pedro Alves <palves@redhat.com>
4997
4998 * linux-ia64-low.c (ia64_regmap): Map IA64_EC_REGNUM to PT_AR_EC.
4999 (IA64_GR0_REGNUM, IA64_FR0_REGNUM)
5000 (IA64_FR1_REGNUM): New defines.
5001 (ia64_fetch_register): New.
5002 (the_low_target): Install it.
5003 * linux-low.h (struct linux_target_ops) <fetch_register>: New
5004 field.
5005 * linux-low.c (linux_fetch_registers): Try the
5006 the_low_target.fetch_register hook first.
5007
5008 * linux-arm-low.c (the_low_target): Adjust.
5009 * linux-bfin-low.c (the_low_target): Adjust.
5010 * linux-cris-low.c (the_low_target): Adjust.
5011 * linux-crisv32-low.c (the_low_target): Adjust.
5012 * linux-m32r-low.c (the_low_target): Adjust.
5013 * linux-m68k-low.c (the_low_target): Adjust.
5014 * linux-mips-low.c (the_low_target): Adjust.
5015 * linux-ppc-low.c (the_low_target): Adjust.
5016 * linux-s390-low.c (the_low_target): Adjust.
5017 * linux-sh-low.c (the_low_target): Adjust.
5018 * linux-sparc-low.c (the_low_target): Adjust.
5019 * linux-tic6x-low.c (the_low_target): Adjust.
5020 * linux-x86-low.c (the_low_target): Adjust.
5021 * linux-xtensa-low.c (the_low_target): Adjust.
5022
63c88e13
PA
50232012-03-26 Pedro Alves <palves@redhat.com>
5024
5025 * server.c (handle_qxfer_libraries): Don't bail early if
5026 the_target->qxfer_libraries_svr4 is not NULL.
5027
fb723180
PA
50282012-03-26 Pedro Alves <palves@redhat.com>
5029
5030 * linux-low.c (linux_qxfer_libraries_svr4): Fix pasto in comment.
5031
0afae3cf
PA
50322012-03-23 Pedro Alves <palves@redhat.com>
5033
5034 * linux-low.c (linux_qxfer_libraries_svr4): Terminate the
5035 "library-list-svr4" element's start tag when the the DSO list is
5036 empty.
5037
485f1ee4
PA
50382012-03-23 Pedro Alves <palves@redhat.com>
5039
5040 * linux-low.c (read_one_ptr): Read the inferior's pointer through
5041 a variable whose type size is the same as the inferior's pointer
5042 size.
5043
a5362b9a
TS
50442012-03-21 Thomas Schwinge <thomas@codesourcery.com>
5045
5046 * linux-arm-low.c (arm_stopped_by_watchpoint): Use siginfo_t instead of
5047 struct siginfo.
5048 * linux-low.c (siginfo_fixup, linux_xfer_siginfo): Likewise.
5049 * linux-x86-low.c (x86_siginfo_fixup): Likewise.
5050 * linux-low.h: Include <signal.h>.
5051 (struct siginfo): Remove forward declaration.
5052 (struct linux_target_ops) <siginfo_fixup>: Use siginfo_t instead of
5053 struct siginfo.
5054
d226c142
MF
50552012-03-21 Mike Frysinger <vapier@gentoo.org>
5056
5057 * .gitignore: Ignore more files.
5058
122f36ef
PA
50592012-03-19 Pedro Alves <palves@redhat.com>
5060 Jan Kratochvil <jan.kratochvil@redhat.com>
5061
5062 * server.c (cont_thread, general_thread): Add describing comments.
5063 (start_inferior): Clear `cont_thread'.
5064 (handle_v_cont): Don't set `cont_thread' if resuming all threads
5065 of a process.
5066
fc3e5175
YQ
50672012-03-15 Yao Qi <yao@codesourcery.com>
5068
5069 * tracepoint.c (install_tracepoint): Move duplicated tracepoint
5070 handling to ...
5071 (cmd_qtdp): ... here.
5072
8d0d92cd
YQ
50732012-03-15 Yao Qi <yao@codesourcery.com>
5074
5075 * tracepoint.c (struct tracepoint_action_ops): New.
5076 (struct tracepoint_action) [!IN_PROCESS_AGENT] <ops>: New field.
5077 (m_tracepoint_action_download): New.
5078 (r_tracepoint_action_download): New.
5079 (x_tracepoint_action_download): New.
5080 (l_tracepoint_action_download): New.
5081 (add_tracepoint_action): Install `action->ops' according type.
5082 (download_tracepoint_1): Move code `download' function pointer
5083 of various tracepoint_action_ops.
5084
87b0bb13
JK
50852012-03-13 Jan Kratochvil <jan.kratochvil@redhat.com>
5086
5087 * linux-low.c (linux_attach_lwp_1): New variable buffer. Call
5088 linux_ptrace_attach_warnings.
5089
5f572dec
JK
50902012-03-13 Jan Kratochvil <jan.kratochvil@redhat.com>
5091
5092 * Makefile.in (linux-ptrace.o): New.
5093 * configure.srv (arm*-*-linux*, bfin-*-*linux*, crisv32-*-linux*)
5094 (cris-*-linux*, i[34567]86-*-linux*, ia64-*-linux*, m32r*-*-linux*)
5095 (m68*-*-linux*, m68*-*-uclinux*, mips*-*-linux*, powerpc*-*-linux*)
5096 (s390*-*-linux*, sh*-*-linux*, sparc*-*-linux*, tic6x-*-uclinux)
5097 (x86_64-*-linux*, xtensa*-*-linux*): Add linux-ptrace.o to SRV_TGTOBJ
5098 of these targets.
5099 * linux-low.c (linux_attach_lwp_1): Remove redundent else clause.
5100
f4647387
YQ
51012012-03-08 Yao Qi <yao@codesourcery.com>
5102 Pedro Alves <palves@redhat.com>
5103
5104 Fix PR server/13392.
5105 * linux-x86-low.c (amd64_install_fast_tracepoint_jump_pad): Check
5106 offset of JMP insn.
5107 * tracepoint.c (remove_tracepoint): New.
5108 (cmd_qtdp): Call remove_tracepoint when failed to install.
5109
9b224c5e
PA
51102012-03-07 Pedro Alves <palves@redhat.com>
5111
5112 * linux-low.c (get_detach_signal): New.
5113 (linux_detach_one_lwp): Get rid of a pending SIGSTOP with SIGCONT.
5114 Pass on pending signals to PTRACE_DETACH. Check the result of the
5115 ptrace call.
5116 * server.c (program_signals, program_signals_p): New.
5117 (handle_general_set): Handle QProgramSignals.
5118 * server.h (program_signals, program_signals_p): Declare.
5119
e237a7e2
JK
51202012-03-05 Pedro Alves <palves@redhat.com>
5121 Jan Kratochvil <jan.kratochvil@redhat.com>
5122
5123 * linux-low.c (get_dynamic): Don't warn when PT_PHDR isn't found.
5124 New comment why.
5125
5808517f
YQ
51262012-03-03 Yao Qi <yao@codesourcery.com>
5127
5128 * tracepoint.c (tracepoint_look_up_symbols): Update call to
5129 agent_look_up_symbols.
5130
58b4daa5
YQ
51312012-03-03 Yao Qi <yao@codesourcery.com>
5132
5133 * Makefile.in (linux-low.o): Keep dependence on agent.h.
5134 (linux-x86-low.o): Likewise.
5135 * server.h: Remove in_process_agent_loaded.
5136 * tracepoint.c (in_process_agent_loaded): Removed. Moved it
5137 common/agent.c.
5138 Update callers.
5139
8ffcbaaf
YQ
51402012-03-03 Yao Qi <yao@codesourcery.com>
5141
5142 * tracepoint.c (gdb_agent_capability): New global.
5143 (in_process_agent_loaded_ust): Renamed to
5144 `in_process_agent_supports_ust'.
5145 Update callers.
5146 (in_process_agent_supports_ust): Call agent_capability_check.
5147 (clear_installed_tracepoints): Assert that agent supports
5148 agent.
5149
d1feda86
YQ
51502012-03-03 Yao Qi <yao@codesourcery.com>
5151
5152 * linux-low.c (linux_supports_agent): New.
5153 (linux_target_ops): Initialize field `supports_agent' with
5154 linux_supports_agent.
5155 * target.h (struct target_ops) <supports_agent>: New.
5156 (target_supports_agent): New macro.
5157 * server.c (handle_general_set): Handle packet 'QAgent'.
5158 (handle_query): Send `QAgent+'.
5159 * Makefile.in (server.o): Depends on agent.h.
5160
2fa291ac
YQ
51612012-03-03 Yao Qi <yao@codesourcery.com>
5162
5163 * Makefile.in (OBS): Add agent.o.
5164 Add new rule for agent.o.
5165 Track dependence of tracepoint.c on agent.h.
5166 * tracepoint.c (run_inferior_command_1):
5167 (run_inferior_command): Call agent_run_command.
5168 (gdb_ust_connect_sync_socket): Deleted. Move it to
5169 common/agent.c.
5170 (resume_thread, stop_thread): Likewise.
5171 (gdb_ust_socket_init): Renamed to ...
5172 (gdb_agent_socket_init): ... New.
5173 (gdb_ust_thread): Renamed to ...
5174 (gdb_agent_helper_thread): ... New.
5175 (gdb_ust_init): Move some code to ...
5176 (gdb_agent_init): ... here. New.
5177 [HAVE_UST]: Call gdb_ust_init.
5178 (initialize_tracepoint_ftlib): Call gdb_agent_init.
5179 * configure.ac: Add `sys/un.h' to AC_CHECK_HEADERS.
5180 * config.in, configure: Regenerated.
5181
05044653
PA
51822012-03-02 Pedro Alves <palves@redhat.com>
5183
5184 * inferiors.c (add_pid_to_list, pull_pid_from_list): Delete.
5185 * linux-low.c (struct simple_pid_list): New.
5186 (stopped_pids): New a struct simple_pid_list pointer.
5187 (add_to_pid_list, pull_pid_from_list): New.
5188 (handle_extended_wait): Don't assume the first signal new children
5189 report is SIGSTOP. Adjust call to pull_pid_from_list.
5190 (linux_wait_for_lwp): Adjust.
5191
8d00225b
YQ
51922012-03-02 Yao Qi <yao@codesourcery.com>
5193
5194 * tracepoint.c (do_action_at_tracepoint): Write `stop_pc' in
5195 debug log.
5196
19560ba5
YQ
51972012-03-02 Yao Qi <yao@codesourcery.com>
5198
5199 * tracepoint.c (collect_ust_data_at_tracepoint): Remove parameters
5200 `stop_pc' and `tpoint'. Update caller.
5201
1faeff08
MR
52022012-03-01 Maciej W. Rozycki <macro@codesourcery.com>
5203
5204 * linux-low.h (linux_target_ops): Add regset_bitmap member.
5205 * linux-low.c (use_linux_regsets): New macro.
5206 [!HAVE_LINUX_REGSETS] (regsets_fetch_inferior_registers): Likewise.
5207 [!HAVE_LINUX_REGSETS] (regsets_store_inferior_registers): Likewise.
5208 (linux_register_in_regsets): New function.
5209 (usr_fetch_inferior_registers): Skip registers covered by
5210 regsets.
5211 (usr_store_inferior_registers): Likewise.
5212 (usr_fetch_inferior_registers): New macro.
5213 (usr_store_inferior_registers): Likewise.
5214 (linux_fetch_registers): Handle mixed regset/non-regset targets.
5215 (linux_store_registers): Likewise.
5216 * linux-mips-low.c (init_registers_mips_dsp_linux): New
5217 prototype.
5218 (init_registers_mips64_dsp_linux): Likewise.
5219 (init_registers_mips_linux): New macro.
5220 (init_registers_mips_dsp_linux): Likewise.
5221 (mips_dsp_num_regs): Likewise.
5222 (DSP_BASE, DSP_CONTROL): New fallback macros.
5223 (mips_base_regs): New macro.
5224 (mips_regmap): Use it. Fix the size.
5225 (mips_dsp_regmap): New variable.
5226 (mips_dsp_regset_bitmap): Likewise.
5227 (mips_arch_setup): New function.
5228 (mips_cannot_fetch_register): Use the_low_target.regmap rather
5229 than mips_regmap.
5230 (mips_cannot_store_register): Likewise.
5231 (the_low_target): Update .arch_setup, .num_regs and .regmap
5232 initializers. Add .regset_bitmap initializer.
5233 * linux-arm-low.c (the_low_target): Add .regset_bitmap
5234 initializer.
5235 * linux-bfin-low.c (the_low_target): Likewise.
5236 * linux-cris-low.c (the_low_target): Likewise.
5237 * linux-crisv32-low.c (the_low_target): Likewise.
5238 * linux-ia64-low.c (the_low_target): Likewise.
5239 * linux-m32r-low.c (the_low_target): Likewise.
5240 * linux-m68k-low.c (the_low_target): Likewise.
5241 * linux-ppc-low.c (the_low_target): Likewise.
5242 * linux-s390-low.c (the_low_target): Likewise.
5243 * linux-sh-low.c (the_low_target): Likewise.
5244 * linux-sparc-low.c (the_low_target): Likewise.
5245 * linux-tic6x-low.c (the_low_target): Likewise.
5246 * linux-x86-low.c (the_low_target): Likewise.
5247 * linux-xtensa-low.c (the_low_target): Likewise.
5248 * configure.srv <mips*-*-linux*>: Add mips-dsp-linux.o and
5249 mips64-dsp-linux.o to srv_regobj. Add mips-dsp-linux.xml,
5250 mips64-dsp-linux.xml, mips-dsp.xml and mips64-dsp.xml to
5251 srv_xmlfiles.
5252 * Makefile.in (mips-dsp-linux.o, mips-dsp-linux.c): New targets.
5253 (mips64-dsp-linux.o, mips64-dsp-linux.c): Likewise.
5254
c03e6ccc
YQ
52552012-02-29 Yao Qi <yao@codesourcery.com>
5256 Pedro Alves <palves@redhat.com>
5257
5258 * linux-low.c: (linux_wait_1): Call unsuspend_all_lwps when
5259 `step_over_finished' is true.
5260
644cebc9
PA
52612012-02-27 Pedro Alves <palves@redhat.com>
5262
5263 * linux-low.c (pid_is_stopped): Delete, moved to common/.
5264 (linux_attach_lwp_1): Adjust to use linux_proc_pid_is_stopped.
5265
c14d7ab2
PA
52662012-02-27 Pedro Alves <palves@redhat.com>
5267
5268 PR server/9684
5269 * linux-low.c (pid_is_stopped): New.
5270 (linux_attach_lwp_1): Handle attaching to 'T (stopped)' processes.
5271
412c89dd
LM
52722012-02-25 Luis Machado <lgustavo@codesourcery.com>
5273
5274 * mem-break.c (clear_gdb_breakpoint_conditions): Fix de-allocation
5275 of conditions.
5276
b745defe
MR
52772012-02-24 Maciej W. Rozycki <macro@codesourcery.com>
5278
5279 * linux-mips-low.c (mips_regmap): Correct the index of $f9.
5280
9f3a5c85
LM
52812012-02-24 Luis Machado <lgustavo@codesourcery>
5282
5283 * server.c (handle_query): Advertise support for target-side
5284 breakpoint condition evaluation.
5285 (process_point_options): New function.
5286 (process_serial_event): When inserting a breakpoint, check for
5287 a target-side condition that should be evaluated.
5288
5289 * mem-break.c: Include regcache.h and ax.h.
5290 (point_cond_list_t): New data structure.
5291 (breakpoint) <cond_list>: New field.
5292 (find_gdb_breakpoint_at): Make non-static.
5293 (delete_gdb_breakpoint_at): Clear any target-side
5294 conditions.
5295 (clear_gdb_breakpoint_conditions): New function.
5296 (add_condition_to_breakpoint): Likewise.
5297 (add_breakpoint_condition): Likewise.
5298 (gdb_condition_true_at_breakpoint): Likewise.
5299 (gdb_breakpoint_here): Return result directly instead
5300 of going through a local variable.
5301
5302 * mem-break.h (find_gdb_breakpoint_at): New prototype.
5303 (clear_gdb_breakpoint_conditions): Likewise.
5304 (add_breakpoint_condition): Likewise.
5305 (gdb_condition_true_at_breakpoint): Likewise.
5306
5307 * linux-low.c (linux_wait_1): Evaluate target-side breakpoint condition.
5308 (need_step_over_p): Take target-side breakpoint condition into
5309 consideration.
5310
5e1dc496
LM
53112012-02-24 Luis Machado <lgustavo@codesourcery>
5312
5313 * server.h: Include tracepoint.h.
5314 (agent_mem_read, agent_get_trace_state_variable_value,
5315 agent_set_trace_state_variable_value,
5316 agent_tsv_read, agent_mem_read_string, get_get_tsv_func_addr,
5317 get_set_tsv_func_addr): New prototypes.
5318
5319 * ax.h: New include file.
5320 * ax.c: New source file.
5321
5322 * tracepoint.c: Include ax.h.
5323 (gdb_agent_op, gdb_agent_op_names, gdb_agent_op_sizes,
5324 agent_expr, eval_result_type): Move to ax.h.
5325 (parse_agent_expr): Rename to ...
5326 (gdb_parse_agent_expr): ... this, make it non-static and move
5327 to ax.h.
5328 (unparse_agent_expr) Rename to ...
5329 (gdb_unparse_agent_expr): ... this, make it non-static and move
5330 to ax.h.
5331 (eval_agent_expr): Rename to ...
5332 (eval_tracepoint_agent_expr): ... this.
5333 (agent_mem_read, agent_mem_read_string, agent_tsv_read): Remove
5334 forward declarations.
5335 (add_tracepoint_action): Call gdb_parse_agent_expr (...).
5336 (agent_get_trace_state_variable_value): New function.
5337 (agent_set_trace_state_variable_value): New function.
5338 (cmd_qtdp): Call gdb_parse_agent_expr (...).
5339 (response_tracepoint): Call gdb_unparse_agent_expr (...).
5340 (do_action_at_tracepoint): Call eval_tracepoint_agent_expr (...).
5341 (condition_true_at_tracepoint): Likewise.
5342 (parse_agent_expr): Rename to ...
5343 (gdb_parse_agent_expr): ... this and move to ax.c.
5344 (unparse_agent_expr): Rename to ...
5345 (gdb_unparse_agent_expr): ... this and move to ax.c.
5346 (gdb_agent_op_name): Move to ax.c.
5347 (eval_agent_expr): Rename to ...
5348 (gdb_eval_agent_expr): ... this, use regcache passed as parameter
5349 and move to ax.c.
5350 (eval_tracepoint_agent_expr): New function.
5351 (agent_mem_read, agent_mem_read_string, agent_tsv_read): Make
43aaf8b6 5352 non-static.
5e1dc496
LM
5353 (current_insn_ptr, emit_error, struct bytecode_address): Move to
5354 ax.c.
5355 (emit_prologue, emit_epilogue, emit_add, emit_sub, emit_mul, emit_lsh,
5356 emit_rsh_signed, emit_rsh_unsigned, emit_ext, emit_log_not,
5357 emit_bit_and, emit_bit_or, emit_bit_xor, emit_bit_not, emit_equal,
5358 emit_less_signed, emit_less_unsigned, emit_ref, emit_if_goto,
5359 emit_goto, write_goto_address, emit_const, emit_reg, emit_pop,
5360 emit_stack, emit_zero_ext, emit_swap, emit_stack_adjust,
5361 emit_int_call_1, emit_void_call_2, emit_eq_goto, emit_ne_goto,
5362 emit_lt_goto, emit_ge_goto, emit_gt_goto, emit_le_goto): Move to ax.c.
5363 (get_get_tsv_func_addr, get_set_tsv_func_addr): New functions.
5364 (compile_bytecodes): Remove forward declaration.
5365 (is_goto_target): Move to ax.c.
5366 (compile_bytecodes): Move to ax.c and call
5367 agent_get_trace_state_variable_value (...) and
5368 agent_set_trace_state_variable_value (...).
5369
5370 * Makefile.in: Update ax.c and IPA dependencies.
5371
277e4e52
PA
53722012-02-24 Pedro Alves <palves@redhat.com>
5373
5374 * tracepoint.c (cmd_bigqtbuffer): Rename as ...
5375 (cmd_bigqtbuffer_circular): ... this. Only handle
5376 'QTBuffer:circular:'.
5377 (handle_tracepoint_general_set): Adjust.
5378
bf4c19f7
YQ
53792012-02-16 Yao Qi <yao@codesourcery.com>
5380
5381 * inferiors.c: Move code to ...
5382 * dll.c: .... here. New.
5383 * server.h: Declare clear_dlls.
5384 * Makefile.in (SFILES): Add dll.c.
5385 (OBS): Add dll.o
5386 (dll.o): New rule.
5387
d73f2619
YQ
53882012-02-11 Yao Qi <yao@codesourcery.com>
5389
5390 * server.c: (handle_monitor_command): Add a new parameter
5391 `own_buf'.
5392 (handle_query): Update caller.
5393
f8255c2a
JB
53942012-02-09 Joel Brobecker <brobecker@adacore.com>
5395
5396 * configure.ac: Add readlink to AC_CHECK_FUNCS list.
5397 * configure, config.in: Regenerate.
5398 * hostio.c: Provide an alternate implementation if HAVE_READLINK
5399 is not defined.
5400
da84f473
PA
54012012-02-02 Pedro Alves <palves@redhat.com>
5402
5403 Try SIGKILL first, then PTRACE_KILL.
5404 * linux-low.c (linux_kill_one_lwp): New.
5405 (linux_kill_one_lwp): Rename to ...
5406 (kill_one_lwp_callback): ... this. Use the new
5407 linux_kill_one_lwp.
5408
e886a173
PA
54092012-02-02 Pedro Alves <palves@redhat.com>
5410
5411 * tracepoint.c (cmd_qtminftpilen): Return 0 if there's no current
5412 inferior.
5413
be07f1a2
PA
54142012-01-27 Pedro Alves <palves@redhat.com>
5415
5416 * linux-low.c (linux_child_pid_to_exec_file): Delete.
5417 (elf_64_file_p): Make static.
5418 (linux_pid_exe_is_elf_64_file): New.
5419 * linux-low.h (linux_child_pid_to_exec_file, elf_64_file_p):
5420 Delete declarations.
5421 (linux_pid_exe_is_elf_64_file): Declare.
5422 * linux-x86-low.c (x86_arch_setup): Use
5423 linux_pid_exe_is_elf_64_file.
5424
d8301ad1
JK
54252012-01-25 Jan Kratochvil <jan.kratochvil@redhat.com>
5426
5427 * linux-low.c (linux_wait_for_event_1): Rename to ...
5428 (linux_wait_for_event): ... here and merge it with former
5429 linux_wait_for_event - new variable wait_ptid, use it.
5430 (linux_wait_for_event): Remove - merge it to linux_wait_for_event_1.
5431
01b17894
PA
54322012-01-23 Pedro Alves <palves@redhat.com>
5433
5434 * server.c (main): Avoid yet another case of infinite loop while
5435 detaching/killing after a longjmp.
5436
e825046f
JK
54372012-01-20 Jan Kratochvil <jan.kratochvil@redhat.com>
5438
5439 Code cleanup.
5440 * linux-low.c (linux_wait_for_event_1): Use ptid_is_pid.
5441
b9e7b9c3
UW
54422012-01-20 Ulrich Weigand <ulrich.weigand@linaro.org>
5443
5444 * hostio.c (handle_readlink): New function.
5445 (handle_vFile): Call it to handle "vFile:readlink" packets.
5446
901f9912
UW
54472012-01-20 Pedro Alves <palves@redhat.com>
5448 Ulrich Weigand <ulrich.weigand@linaro.org>
5449
5450 * server.c (handle_v_requests): Only support vAttach and vRun to
5451 start multiple processes when in extended protocol mode.
5452
fc1ab1a0
PA
54532012-01-17 Pedro Alves <palves@redhat.com>
5454
5455 * tracepoint.c (initialize_tracepoint): Use mmap instead of
5456 memalign plus mprotect to allocate the scratch buffer.
5457
7d5d4e98
PA
54582012-01-13 Pedro Alves <palves@redhat.com>
5459
5460 * server.c (attach_inferior): Clear `cont_thread'.
5461
f128d5e9
PA
54622012-01-13 Pedro Alves <palves@redhat.com>
5463
5464 * server.c (main): Avoid infinite loop while detaching/killing
5465 after a longjmp.
5466
06db92f0
DE
54672012-01-09 Doug Evans <dje@google.com>
5468
5469 * server.c (start_inferior): Set last_ptid in --wrapper case.
5470
32d92999
YQ
54712012-01-06 Yao Qi <yao@codesourcery.com>
5472
5473 * tracepoint.c [IN_PROCESS_AGENT] (debug_threads): Macro
5474 defined.
5475 [IN_PROCESS_AGENT] (debug_agent): New global variable.
5476
5e0a92a9
YQ
54772012-01-04 Yao Qi <yao@codesourcery.com>
5478
5479 * tracepoint.c (cmd_qtdp): Print debug message
5480 for static tracepoint.
5481
ae639e8c
YQ
54822012-01-04 Yao Qi <yao@codesourcery.com>
5483
5484 * tracepoint.c (trace_vdebug): Differentiate debug message
5485 between gdbserver and IPA.
5486
f72429c5
YQ
54872012-01-03 Yao Qi <yao@codesourcery.com>
5488
5489 * tracepoint.c (tracepoint_was_hit): Don't collect for
5490 static tracepoint.
5491
12c3e59c
JB
54922012-01-02 Joel Brobecker <brobecker@adacore.com>
5493
5494 * terminal.h: Reformat copyright header.
5495
67827812
JB
54962012-01-02 Joel Brobecker <brobecker@adacore.com>
5497
5498 * server.c (gdbserver_version): Update copyright year.
5499 * gdbreplay.c (gdbreplay_version): Likewise.
5500
3e52c33d
JK
55012011-12-18 Jan Kratochvil <jan.kratochvil@redhat.com>
5502
5503 * linux-low.c (linux_create_inferior): Put empty if clause for write.
5504
5505 Revert:
5506 2011-12-18 Hui Zhu <teawater@gmail.com>
5507 * linux-low.c (linux_create_inferior): Save return value to ret.
5508
66f1260e
HZ
55092011-12-18 Hui Zhu <teawater@gmail.com>
5510
5511 * linux-low.c (linux_create_inferior): Save return value to ret.
5512
e77616d7
DE
55132011-12-16 Doug Evans <dje@google.com>
5514
e7b06c57
DE
5515 * linux-low.c (linux_create_inferior): If stdio connection,
5516 redirect stdin from /dev/null, stdout to stderr.
5517 * remote-utils.c (remote_is_stdio): New static global.
5518 (remote_connection_is_stdio): New function.
5519 (remote_prepare): Handle stdio connection.
5520 (remote_open): Ditto.
5521 (remote_close): Don't close stdin for stdio connections.
5522 (read_prim,write_prim): New functions. Replace all calls to
5523 read/write to these.
5524 * server.c (main): Watch for "-" argument. Move call to
5525 remote_prepare before start_inferior.
5526 * server.h (STDIO_CONNECTION_NAME): New macro.
5527 (remote_connection_is_stdio): Declare.
5528
e77616d7
DE
5529 * remote-utils.c (prepare_resume_reply): Remove extraneous \n
5530 in debugging output.
5531
82067193
YQ
55322011-12-15 Yao Qi <yao@codesourcery.com>
5533
5534 * tracepoint.c: Include sys/syscall.h.
5535 (gdb_ust_thread): Remove preprocessor conditional.
5536
82bfbe7e
PA
55372011-12-14 Pedro Alves <pedro@codesourcery.com>
5538
5539 * linux-low.c (linux_detach_one_lwp): Call
5540 the_low_target.prepare_to_resume before detaching.
5541
712c6575
YQ
55422011-12-14 Yao Qi <yao@codesourcery.com>
5543
5544 * tracepoint.c (gdb_ust_thread): Don't ignore return value
5545 of write.
5546
d54d1edf
YQ
55472011-12-14 Yao Qi <yao@codesourcery.com>
5548
5549 * i386-low.c (i386_low_stopped_data_address): Initialize local
5550 variable `control'.
5551
6210a125
PA
55522011-12-13 Pedro Alves <pedro@codesourcery.com>
5553
5554 PR remote/13492
5555
5556 * i386-low.c (i386_low_stopped_data_address): Avoid fetching
5557 DR_CONTROL unless necessary. Extend comments.
5558 * linux-x86-low.c (x86_linux_prepare_to_resume): Don't write to
5559 DR0-3 if not used. If any watchpoint was set, clear DR_STATUS.
5560
2ece8244
YQ
55612011-12-13 Yao Qi <yao@codesourcery.com>
5562
5563 * tracepoint.c (trace_buffer_alloc): Replace magic numbers with
5564 macros.
5565 (upload_fast_traceframes, upload_fast_traceframes): Likewise.
5566
784867a5
JK
55672011-12-08 Jan Kratochvil <jan.kratochvil@redhat.com>
5568
5569 * linux-low.c (linux_kill): Skip PTRACE_KILL if LWP does not exist.
5570 Print new debug message for such case.
5571
6bf36717
JK
55722011-12-06 Jan Kratochvil <jan.kratochvil@redhat.com>
5573
5574 Fix overlapping memcpy.
5575 * mem-break.c (set_raw_breakpoint_at): New variable buf. Use it for
5576 the read_inferior_memory transfer.
5577 (delete_fast_tracepoint_jump): New variable buf. Use it for the
5578 write_inferior_memory transfer.
5579 (set_fast_tracepoint_jump): New variable buf. Use it for the
5580 read_inferior_memory and write_inferior_memory transfers.
5581 (uninsert_fast_tracepoint_jumps_at, reinsert_fast_tracepoint_jumps_at)
5582 (delete_raw_breakpoint, uninsert_raw_breakpoint): New variable buf.
5583 Use it for the write_inferior_memory transfer.
5584 (check_mem_read, check_mem_write): New gdb_asserts for overlapping
5585 buffers.
5586
50275556
MR
55872011-12-06 Maciej W. Rozycki <macro@codesourcery.com>
5588
5589 * linux-low.c (fetch_register, store_register): Make code
5590 consistent, fix formatting.
5591
7325beb4
MR
55922011-12-06 Maciej W. Rozycki <macro@codesourcery.com>
5593
5594 * linux-low.c (usr_store_inferior_registers): Factor out code
5595 to handle individual registers into...
5596 (store_register): ... this new function.
5597
c642a434
UW
55982011-12-06 Ulrich Weigand <uweigand@de.ibm.com>
5599
5600 * Makefile.in (s390-linux32v1.o, s390-linux32v1.c): New rules.
5601 (s390-linux32v2.o, s390-linux32v2.c): Likewise.
5602 (s390-linux64v1.o, s390-linux64v1.c): Likewise.
5603 (s390-linux64v2.o, s390-linux64v2.c): Likewise.
5604 (s390x-linux64v1.o, s390x-linux64v1.c): Likewise.
5605 (s390x-linux64v2.o, s390x-linux64v2.c): Likewise.
5606 * configure.srv [s390*-*-linux*] (srv_regobj): Add new objects.
5607 (srv_xmlfiles): Add new XML files.
5608
5609 * linux-s390-low.c: Include "elf/common.h", <sys/ptrace.h>,
5610 and <sys/uio.h>.
5611 (PTRACE_GETREGSET, PTRACE_SETREGSET): Define if undefined.
5612 (init_registers_s390_linux32v1): Add prototype.
5613 (init_registers_s390_linux32v2): Likewise.
5614 (init_registers_s390_linux64v1): Likewise.
5615 (init_registers_s390_linux64v2): Likewise.
5616 (init_registers_s390x_linux64v1): Likewise.
5617 (init_registers_s390x_linux64v2): Likewise.
5618 (s390_num_regs): Increment to 52.
5619 (s390_regmap): Add orig_r2 register.
5620 (s390_num_regs_3264): Increment to 68.
5621 (s390_regmap_3264): Add orig_r2 register.
5622 (s390_collect_ptrace_register): Handle orig_r2 register.
5623 (s390_supply_ptrace_register): Likewise.
5624 (s390_fill_last_break): New function.
5625 (s390_store_last_break): Likewise.
5626 (s390_fill_system_call): New function.
5627 (s390_store_system_call): Likewise.
5628 (target_regsets): Handle NT_S390_LAST_BREAK and NT_S390_SYSTEM_CALL
5629 register sets.
5630 (s390_check_regset): New function.
5631 (s390_arch_setup): Check for presence of NT_S390_LAST_BREAK and
5632 NT_S390_SYSTEM_CALL regsets and use appropriate description.
5633 Update target_regsets for available register sets.
5634
2268b414
JK
56352011-12-02 Paul Pluzhnikov <ppluzhnikov@google.com>
5636 Jan Kratochvil <jan.kratochvil@redhat.com>
5637
5638 * linux-low.c (get_phdr_phnum_from_proc_auxv, get_dynamic, get_r_debug)
5639 (read_one_ptr, struct link_map_offsets, linux_qxfer_libraries_svr4):
5640 New.
5641 (struct linux_target_ops): Install linux_qxfer_libraries_svr4.
5642 * linux-low.h (struct process_info_private): New member r_debug.
5643 * server.c (handle_qxfer_libraries): Call
5644 the_target->qxfer_libraries_svr4.
5645 (handle_qxfer_libraries_svr4): New function.
5646 (qxfer_packets): New entry "libraries-svr4".
5647 (handle_query): Check QXFER_LIBRARIES_SVR4 and report libraries-svr4.
5648 * target.h (struct target_ops): New member qxfer_libraries_svr4.
5649 * remote.c (remote_xfer_partial): Call add_packet_config_cmd for
5650 PACKET_qXfer_libraries_svr4.
5651
d6db1fab
UW
56522011-11-30 Ulrich Weigand <uweigand@de.ibm.com>
5653
5654 * linux-s390-low.c (s390_collect_ptrace_register): Fully convert
5655 PSW address/mask between 8-byte and 16-byte formats.
5656 (s390_supply_ptrace_register): Likewise.
5657 (s390_get_pc, s390_set_pc): 4-byte PSW address always includes
5658 basic addressing mode bit.
5659
242f5f1c
SS
56602011-11-24 Stan Shebs <stan@codesourcery.com>
5661
5662 * tracepoint.c (cmd_qtstatus): Use plongest instead of %llx.
5663
f196051f
SS
56642011-11-17 Stan Shebs <stan@codesourcery.com>
5665
5666 * tracepoint.c (struct tracepoint): New field traceframe_usage.
5667 (tracing_start_time): New global.
5668 (tracing_stop_time): New global.
5669 (tracing_user_name): New global.
5670 (tracing_notes): New global.
5671 (tracing_stop_note): New global.
5672 (cmd_qtstart): Set traceframe_usage, start_time.
5673 (stop_tracing): Set stop_time.
5674 (cmd_qtstatus): Report additional status.
5675 (cmd_qtp): New function.
5676 (handle_tracepoint_query): Call it.
5677 (cmd_qtnotes): New function.
5678 (handle_tracepoint_general_set): Call it.
5679 (get_timestamp): Rename from tsv_get_timestamp.
5680
405f8e94
SS
56812011-11-14 Stan Shebs <stan@codesourcery.com>
5682 Kwok Cheung Yeung <kcy@codesourcery.com>
5683
5684 * linux-x86-low.c (small_jump_insn): New.
5685 (i386_install_fast_tracepoint_jump_pad): Add arguments for
5686 trampoline and error message, build a trampoline and issue a small
5687 jump instruction to it.
5688 (x86_install_fast_tracepoint_jump_pad): Add arguments for
5689 trampoline and error message.
5690 (x86_get_min_fast_tracepoint_insn_len): New.
5691 (the_low_target): Add call to x86_get_min_fast_tracepoint_insn_len.
5692 * linux-low.h (struct linux_target_ops): Add arguments to
5693 install_fast_tracepoint_jump_pad operation, add new operation.
5694 * linux-low.c (linux_install_fast_tracepoint_jump_pad): Add
5695 arguments.
5696 (linux_get_min_fast_tracepoint_insn_len): New function.
5697 (linux_target_op): Add new operation.
5698 * tracepoint.c (gdb_trampoline_buffer): New IPA variable.
5699 (gdb_trampoline_buffer_end): Ditto.
5700 (gdb_trampoline_buffer_error): Ditto.
5701 (struct ipa_sym_addresses): Add fields for new IPA variables.
5702 (symbol_list): Add entries for new IPA variables.
5703 (struct tracepoint): Add fields to hold the address range of the
5704 trampoline used by the tracepoint.
5705 (trampoline_buffer_head): New static variable.
5706 (trampoline_buffer_tail): Ditto.
5707 (claim_trampoline_space): New function.
5708 (have_fast_tracepoint_trampoline_buffer): New function.
5709 (clone_fast_tracepoint): Fill in trampoline fields of tracepoint
5710 structure.
5711 (install_fast_tracepoint): Ditto, also add error buffer argument.
5712 (cmd_qtminftpilen): New function.
5713 (handle_tracepoint_query): Add response to qTMinFTPILen packet.
5714 (fast_tracepoint_from_trampoline_address): New function.
5715 (fast_tracepoint_collecting): Handle trampoline as part of jump
5716 pad space.
5717 (set_trampoline_buffer_space): New function.
5718 (initialize_tracepoint): Initialize new IPA variables.
5719 * target.h (struct target_ops): Add arguments to
5720 install_fast_tracepoint_jump_pad operation, add new
5721 get_min_fast_tracepoint_insn_len operation.
5722 (target_get_min_fast_tracepoint_insn_len): New.
5723 (install_fast_tracepoint_jump_pad): Add arguments.
5724 * server.h (IPA_BUFSIZ): Define.
5725 * linux-i386-ipa.c: Include extra header files.
5726 (initialize_fast_tracepoint_trampoline_buffer): New function.
5727 (initialize_low_tracepoint): Call it.
5728 * server.h (set_trampoline_buffer_space): Declare.
5729 (claim_trampoline_space): Ditto.
5730 (have_fast_tracepoint_trampoline_buffer): Ditto.
5731
1e4d1764
YQ
57322011-11-14 Yao Qi <yao@codesourcery.com>
5733
5734 * server.c (handle_query): Handle InstallInTrace for qSupported.
5735 * tracepoint.c (add_tracepoint): Sort list.
5736 (install_tracepoint, download_tracepoint): New.
5737 (cmd_qtdp): Call them to install and download tracepoints.
5738 (sort_tracepoints): Removed.
5739 (cmd_qtstart): Update.
5740
5c73ff4e
YQ
57412011-11-14 Yao Qi <yao@codesourcery.com>
5742
5743 * mem-break.c (inc_ref_fast_tracepoint_jump): New.
5744 * mem-break.h: Declare.
5745 * tracepoint.c (cmd_qtstart): Move some code to ...
5746 (clone_fast_tracepoint, install_fast_tracepoint): ... here.
5747 New.
5748 (download_tracepoints): Move some code to ...
5749 (download_tracepoint_1): ... here. New.
5750
86a30030
YQ
57512011-11-08 Yao Qi <yao@codesourcery.com>
5752
5753 * remote-utils.c (relocate_instruction): A comment fix.
5754
8d26e50c
JB
57552011-11-07 Joel Brobecker <brobecker@adacore.com>
5756
5757 * win32-i386-low.c (dr_status_mirror, dr_control_mirror): Delete.
5758 (i386_dr_low_get_control, i386_dr_low_get_status): Use
5759 dr_status_mirror and dr_control_mirror from debug_reg_state.
5760 (i386_dr_low_get_status): Use debug_reg_state.dr_status_mirror
5761 (i386_initial_stuff): Remove use of deleted globals.
5762 (i386_get_thread_context, i386_set_thread_context,
5763 i386_thread_added): Use dr_status_mirror and dr_control_mirror
5764 from debug_reg_state.
5765
a59306a3
YQ
57662011-11-05 Yao Qi <yao@codesourcery.com>
5767
5768 * tracepoint.c (gdb_collect): Loop over tracepoints of same
5769 address as TPOINT's.
5770
3065dfb6
SS
57712011-11-02 Stan Shebs <stan@codesourcery.com>
5772
5773 * tracepoint.c (agent_mem_read_string): New function.
5774 (eval_agent_expr): Call it for tracenz.
5775 * server.c (handle_query): Report support for tracenz.
5776
fd0d8c7c
YQ
57772011-11-02 Yao Qi <yao@codesourcery.com>
5778
5779 * tracepoint.c (cmd_qtstart): Remove unused local variables.
5780
609086b1
YQ
57812011-11-02 Yao Qi <yao@codesourcery.com>
5782
5783 * target.h: Fix a typo in comment.
5784
b9fd1791
PA
57852011-10-31 Pedro Alves <pedro@codesourcery.com>
5786
5787 * mem-break.c (check_mem_write): Add `myaddr' parameter. Don't
5788 clobber the breakpoints' shadows with fast tracepoint jumps.
5789 * mem-break.h (check_mem_write): Add `myaddr' parameter.
5790 * target.c (write_inferior_memory): Also pass MYADDR down to
5791 check_mem_write.
5792
03583c20
UW
57932011-10-07 Ulrich Weigand <ulrich.weigand@linaro.org>
5794
5795 * configure.ac: Check support for personality routine.
5796 * configure: Regenerate.
5797 * config.in: Likewise.
5798 * linux-low.c: Include <sys/personality.h>.
5799 Define ADDR_NO_RANDOMIZE if necessary.
5800 (linux_create_inferior): Disable address space randomization when
5801 forking inferior, if requested.
5802 (linux_supports_disable_randomization): New function.
5803 (linux_target_ops): Install it.
5804 * server.h (disable_randomization): Declare.
5805 * server.c (disable_randomization): New global variable.
5806 (handle_general_set): Handle QDisableRandomization.
5807 (handle_query): Likewise for qSupported.
5808 (main): Support --disable-randomization and --no-disable-randomization
5809 command line arguments.
5810 * target.h (struct target_ops): Add supports_disable_randomization.
5811 (target_supports_disable_randomization): New macro.
5812
723b724b
MF
58132011-09-29 Mike Frysinger <vapier@gentoo.org>
5814
5815 * linux-low.c (target_loadseg): Add defined PTRACE_GETFDPIC to the
5816 ifdef check.
5817 [PT_GETDSBT] (target_loadmap): Wrap in a defined PT_GETDSBT check.
5818 [!PT_GETDSBT] (target_loadmap): New definition.
5819 (LINUX_LOADMAP, LINUX_LOADMAP_EXEC, LINUX_LOADMAP_INTERP): Define.
5820 (linux_read_loadmap): Change PTRACE_GETDSBT_EXEC to
5821 LINUX_LOADMAP_EXEC, PTRACE_GETDSBT_INTERP to LINUX_LOADMAP_INTERP,
5822 and PT_GETDSBT to LINUX_LOADMAP.
5823 [!PT_GETDSBT] (linux_read_loadmap): Define to NULL.
5824 (linux_target_ops): Delete unnecessary ifdef PT_GETDSBT check.
5825
55329a5c 58262011-09-21 Ulrich Weigand <ulrich.weigand@linaro.org>
71487fd7
UW
5827
5828 * linux-arm-low.c (struct arm_linux_hwbp_cap): Remove.
5829 (arm_linux_hwbp_cap): New static variable.
5830 (arm_linux_get_hwbp_cap): Replace by ...
5831 (arm_linux_init_hwbp_cap): ... this new function.
5832 (arm_linux_get_hw_breakpoint_count): Use arm_linux_hwbp_cap.
5833 (arm_linux_get_hw_watchpoint_count): Likewise.
5834 (arm_linux_get_hw_watchpoint_max_length): Likewise.
5835 (arm_arch_setup): Call arm_linux_init_hwbp_cap.
5836 (arm_prepare_to_resume): Use perror_with_name instead of error.
5837
55329a5c 58382011-09-21 Ulrich Weigand <ulrich.weigand@linaro.org>
09b4ad9f
UW
5839
5840 * linux-arm-low.c: Include <signal.h>.
5841 (PTRACE_GETHBPREGS, PTRACE_SETHBPREGS): Define if necessary.
5842 (struct arm_linux_hwbp_cap): New data type.
5843 (arm_hwbp_type, arm_hwbp_control_t): New typedefs.
5844 (struct arm_linux_hw_breakpoint): New data type.
5845 (MAX_BPTS, MAX_WPTS): Define.
5846 (struct arch_process_info, struct arch_lwp_info): New data types.
5847 (arm_linux_get_hwbp_cap): New function.
5848 (arm_linux_get_hw_breakpoint_count): Likewise.
5849 (arm_linux_get_hw_watchpoint_count): Likewise.
5850 (arm_linux_get_hw_watchpoint_max_length): Likewise.
5851 (arm_hwbp_control_initialize): Likewise.
5852 (arm_hwbp_control_is_enabled): Likewise.
5853 (arm_hwbp_control_is_initialized): Likewise.
5854 (arm_hwbp_control_disable): Likewise.
5855 (arm_linux_hw_breakpoint_equal): Likewise.
5856 (arm_linux_hw_point_initialize): Likewise.
5857 (struct update_registers_data): New data structure.
5858 (update_registers_callback: New function.
5859 (arm_insert_point): Likewise.
5860 (arm_remove_point): Likewise.
5861 (arm_stopped_by_watchpoint): Likewise.
5862 (arm_stopped_data_address): Likewise.
5863 (arm_new_process): Likewise.
5864 (arm_new_thread): Likewise.
5865 (arm_prepare_to_resume): Likewise.
5866 (the_low_target): Register arm_insert_point, arm_remove_point,
5867 arm_stopped_by_watchpoint, arm_stopped_data_address, arm_new_process,
5868 arm_new_thread, and arm_prepare_to_resume.
5869
6b9801d4
SS
58702011-09-15 Stan Shebs <stan@codesourcery.com>
5871
5872 * server.h (struct emit_ops): Add compare-goto fields.
5873 * tracepoint.c (gdb_agent_op_sizes): New table.
5874 (emit_eq_goto): New function.
5875 (emit_ne_goto): New function.
5876 (emit_lt_goto): New function.
5877 (emit_le_goto): New function.
5878 (emit_gt_goto): New function.
5879 (emit_ge_goto): New function.
5880 (is_goto_target): New function.
5881 (compile_bytecodes): Recognize special cases of compare-goto
5882 combinations and call specialized emitters for them.
5883 * linux-x86-low.c (amd64_emit_eq_goto): New function.
5884 (amd64_emit_ne_goto): New function.
5885 (amd64_emit_lt_goto): New function.
5886 (amd64_emit_le_goto): New function.
5887 (amd64_emit_gt_goto): New function.
5888 (amd64_emit_ge_goto): New function.
5889 (amd64_emit_ops): Add the new functions.
5890 (i386_emit_eq_goto): New function.
5891 (i386_emit_ne_goto): New function.
5892 (i386_emit_lt_goto): New function.
5893 (i386_emit_le_goto): New function.
5894 (i386_emit_gt_goto): New function.
5895 (i386_emit_ge_goto): New function.
5896 (i386_emit_ops): Add the new functions.
5897
bf15cbda
SS
58982011-09-08 Stan Shebs <stan@codesourcery.com>
5899
5900 * linux-x86-low.c (i386_emit_prologue): Save %ebx.
5901 (i386_emit_epilogue): Restore %ebx.
5902
943ca1dd
JZ
59032011-08-31 Jie Zhang <jzhang918@gmail.com>
5904
5905 * server.c (step_thread): Remove definition.
5906 (process_serial_event): Don't handle Hs.
5907 * server.h (step_thread): Remove declaration.
5908 * target.c (set_desired_inferior): Remove use of step_thread.
5909
e3deef73
LM
59102011-08-24 Luis Machado <lgustavo@codesourcery.com>
5911
5912 * linux-low.c: Include linux-procfs.h.
5913 (linux_attach_lwp_1): Update comments.
5914 (linux_attach): Scan for existing threads when attaching to a
5915 process that is the tgid.
5916 * Makefile.in: Update dependencies.
5917
13da1c97
LM
59182011-08-24 Luis Machado <lgustavo@codesourcery.com>
5919
5920 * configure.srv: Add linux-procfs.o dependencies.
5921
881127c9
YQ
59222011-08-14 Yao Qi <yao@codesourcery.com>
5923
5924 * target.h (struct target_ops): Fix indent.
5925 * win32-low.c (win32_target_ops): Fix comment.
5926
58dbd541
YQ
59272011-08-14 Andrew Jenner <andrew@codesourcery.com>
5928 Yao Qi <yao@codesourcery.com>
5929
5930 * Makefile.in (clean): Remove tic6x-*.c files.
5931 (linux-tic6x-low.o, tic6x-c62x-linux.o, tic6x-c64x-linux.o): New rules.
5932 (tic6x-c64xp-linux.o, tic6x-c62x-linux.c, tic6x-c64x-linux.c): Likewise.
5933 (tic6x-c64xp-linux.c): Likewise.
5934 * configure.srv: Add support for tic6x-*-uclinux.
5935 * linux-tic6x-low.c: New.
5936 * linux-low.c (PT_TEXT_ADDR, PT_DATA_ADDR, PT_TEXT_END_ADDR): Define.
5937
78d85199
YQ
59382011-08-14 Andrew Stubbs <ams@codesourcery.com>
5939 Yao Qi <yao@codesourcery.com>
5940
5941 * target.h (struct target_ops): Add read_loadmap.
5942 * linux-low.c (struct target_loadseg): New type.
5943 (struct target_loadmap): New type.
5944 (linux_read_loadmap): New function.
5945 (linux_target_ops): Add linux_read_loadmap.
5946 * server.c (handle_query): Support qXfer:fdpic:read packet.
43aaf8b6
PA
5947 * win32-low.c (win32_target_ops): Initialize field `read_loadmap'
5948 to NULL.
78d85199 5949
a959a88d
EZ
59502011-08-05 Eli Zaretskii <eliz@gnu.org>
5951
5952 * win32-low.c: Include <stdint.h>.
5953
1ced966e
PA
59542011-07-22 Pedro Alves <pedro@codesourcery.com>
5955
5956 * i386-low.c (i386_insert_aligned_watchpoint): Don't pass the info
5957 to the inferior here.
5958 (i386_remove_aligned_watchpoint): Ditto.
5959 (i386_handle_nonaligned_watchpoint): Return immediate on fail to
5960 fit part of the watchpoint in the debug registers.
5961 (i386_update_inferior_debug_regs): New.
5962 (i386_low_insert_watchpoint): Work on a local mirror of the debug
5963 registers, and only update the inferior on success.
5964 (i386_low_remove_watchpoint): Ditto.
5965
d26e3629
KY
59662011-07-22 Kwok Cheung Yeung <kcy@codesourcery.com>
5967
5968 * linux-low.c (compare_ints, unique, list_threads, show_process,
5969 linux_core_of_thread): Delete.
5970 (linux_target_ops): Change linux_core_of_thread to
5971 linux_common_core_of_thread.
5972 (linux_qxfer_osdata): Defer to linux_common_xfer_osdata.
5973 * utils.c (malloc_failure): Change type of argument.
5974 (xmalloc, xrealloc, xcalloc, xsnprintf): Delete.
5975 * Makefile.in (SFILES): Add common/common-utils.c, common/xml-utils.c,
5976 common/linux-osdata.c, common/ptid.c and common/buffer.c.
5977 (OBS): Add xml-utils.o, common-utils.o, ptid.o and buffer.o.
5978 (IPA_OBJS): Add common-utils-ipa.o.
5979 (ptid_h, linux_osdata_h): New macros.
5980 (server_h): Add common/common-utils.h, common/xml-utils.h,
5981 common/buffer.h, common/gdb_assert.h, common/gdb_locale.h and
5982 common/ptid.h.
5983 (common-utils-ipa.o, common-utils.o, xml-utils.o, linux-osdata.o,
5984 ptid.o, buffer.o): New rules.
5985 (linux-low.o): Add common/linux-osdata.h as a dependency.
5986 * configure.srv (srv_tgtobj): Add linux-osdata.o to Linux targets.
5987 * configure.ac: Add AC_HEADER_DIRENT check.
5988 * config.in: Regenerate.
5989 * configure: Regenerate.
5990 * remote-utils.c (xml_escape_text): Delete.
5991 (buffer_grow, buffer_free, buffer_init, buffer_finish,
5992 buffer_xml_printf): Move to common/buffer.c.
5993 * server.c (main): Remove call to initialize_inferiors.
5994 * server.h (struct ptid, ptid_t, minus_one_ptid, null_ptid,
5995 ptid_build, pid_to_ptid, ptid_get_pid, ptid_get_lwp, ptid_get_tid,
5996 ptid_equal, ptid_is_pid, initialize_inferiors, xml_escape_text,
5997 internal_error, gdb_assert, gdb_assert_fail): Delete.
5998 (struct buffer, buffer_grow, buffer_free, buffer_init, buffer_finish,
5999 buffer_xml_printf, buffer_grow_str, buffer_grow_str0): Move to
6000 common/buffer.h.
6001 * inferiors.c (null_ptid, minus_one_ptid, ptid_build, pid_to_ptid,
6002 ptid_get_pid, ptid_get_lwp, ptid_get_tid, ptid_equal, ptid_is_pid,
6003 initialize_inferiors): Delete.
6004
2275a1a7
PA
60052011-07-20 Pedro Alves <pedro@codesourcery.com>
6006
6007 * tracepoint.c (tracepoint_look_up_symbols): Return upon the first
6008 symbol error.
6009
0a5b1e09
PA
60102011-05-31 Pedro Alves <pedro@codesourcery.com>
6011
6012 * linux-x86-low.c (i386_dr_low_get_addr): Fix off by one in
6013 assertion.
6014 * win32-i386-low.c (i386_dr_low_get_addr): Ditto.
6015
6938fd34
YQ
60162011-05-26 Yao Qi <yao@codesourcery.com>
6017
6018 * Makefile.in (thread-db.o): Track dependence to
6019 common/gdb_thread_db.h.
6020 * thread-db.c: include gdb_thread_db.h from right place.
6021
b481f9e0
TT
60222011-05-16 Adrian Cornish <gnu@bluedreamer.com>
6023
6024 * linux-i386-ipa.c (supply_static_tracepoint_registers): Pass
6025 __FILE__ and __LINE__ to internal_error.
6026
98a5dd13
DE
60272011-05-13 Doug Evans <dje@google.com>
6028
6029 * thread-db.c (try_thread_db_load_from_sdir): New function.
6030 (try_thread_db_load_from_dir): New function.
6031 (thread_db_load_search): Handle $sdir, ignore $pdir.
6032 Remove trying of system directories if search of
6033 libthread-db-search-path fails, that is now done via $sdir.
6034
d248b706
KY
60352011-05-12 Kwok Cheung Yeung <kcy@codesourcery.com>
6036
6037 * server.c (handle_query): Add EnableDisableTracepoints to the list
6038 of supported features.
43aaf8b6 6039 * tracepoint.c (clear_installed_tracepoints): Uninstall disabled
d248b706 6040 tracepoints.
43aaf8b6
PA
6041 (cmd_qtenable_disable): New.
6042 (cmd_qtstart): Install tracepoints even if disabled.
6043 (handle_tracepoint_general_set): Add call to cmd_qtenable_disable on
6044 receiving a QTEnable or QTDisable packet.
6045 (gdb_collect): Skip data collection if fast tracepoint is disabled.
6046 (ust_marker_to_static_tracepoint): Do not ignore disabled static
6047 tracepoints.
6048 (gdb_probe): Skip data collection if static tracepoint is disabled.
d248b706 6049
84e578fb
DE
60502011-05-10 Doug Evans <dje@google.com>
6051
6052 * thread-db.c (thread_db_handle_monitor_command): Handle elided path.
6053
71f55dd8
DE
60542011-05-04 Doug Evans <dje@google.com>
6055
6056 * linux-low.c (linux_join): Skip process lookup.
6057 * spu-low.c (spu_join): Ditto.
6058 * server.c (join_inferiors_callback): Delete.
6059 (process_serial_event): For 'D' packet (detach) call join_inferior
6060 directly.
6061
4d393d60
JM
60622011-05-04 Joseph Myers <joseph@codesourcery.com>
6063
6064 * README: Don't mention xscale*-*-linux*.
6065 * configure.srv (xscale*-*-linux*): Don't handle target.
6066
b00ad6ff
NF
60672011-04-27 Nathan Froyd <froydnj@codesourcery.com>
6068
6069 * linux-x86-low.c (amd64_emit_const): Call memcpy instead of
6070 casting pointers.
6071 (amd64_emit_reg, amd64_emit_int_call_1, amd64_emit_void_call_2):
6072 (i386_emit_const, i386_emit_reg, i386_emit_int_call_1):
6073 (i386_emit_void_call_2): Likewise.
6074
af96c192
YQ
60752011-04-26 Yao Qi <yao@codesourcery.com>
6076
43aaf8b6
PA
6077 * linux-low.c: Move common macros to linux-ptrace.h.
6078 Include linux-ptrace.h.
af96c192
YQ
6079 * Makefile.in (linux_ptrace_h): New.
6080 (linux-low.o): Depends on linux-ptrace.h.
6081
03f2bd59
JK
60822011-04-24 Jan Kratochvil <jan.kratochvil@redhat.com>
6083
6084 * remote-utils.c (handle_accept_event): Close LISTEN_DESC only if
6085 RUN_ONCE. Comment for the LISTEN_DESC delete_file_handler call.
6086 (remote_prepare): New function with most of the TCP code from ...
6087 (remote_open): ... here. Detect PORT here unconditionally. Move also
6088 setting transport_is_reliable.
6089 * server.c (run_once): New variable.
6090 (gdbserver_usage): Document it.
6091 (main): Set run_once for `--once'. Call remote_prepare. Exit after
6092 the first run if RUN_ONCE.
6093 * server.h (run_once, remote_prepare): New declarations.
6094
7a9dd1b2
TT
60952011-04-19 Tom Tromey <tromey@redhat.com>
6096
6097 * win32-low.c (handle_load_dll): Remove duplicate "the".
6098
81239425
PM
60992011-04-07 Pierre Muller <muller@ics.u-strasbg.fr>
6100
6101 Remove support for old Cygwin 1.5 versions.
6102 * win32-low.c (win32_create_inferior): Use new cygwin_path_list
6103 function to avoid warning.
6104 (win32_add_one_solib): Use cygwin_conv_path function to avoid
6105 warning.
6106
9e0627f1
PM
61072011-03-18 Pierre Muller <muller@ics.u-strasbg.fr>
6108
6109 * gdbserver/server.h (Macro _): Define it if not available.
6110
588eebee
MS
61112011-03-14 Michael Snyder <msnyder@vmware.com>
6112
348af9f7 6113 * hostio.c (handle_close): Remove unnecessary null test.
588eebee 6114
43f70d4c
JB
61152011-03-10 Joel Brobecker <brobecker@adacore.com>
6116
6117 * Makefile.in (maintainer-clean realclean distclean): Remove
6118 "make ... subdir_do" command.
6119
348af9f7
MS
61202011-03-10 Michael Snyder <msnyder@vmware.com>
6121
6122 * tracepoint.c (tracepoint_finish_step): Fix loop variable.
6123
6124 * server.c (handle_v_run): Free alloced buffer on early return.
6125
e637a4f5
YQ
61262011-03-09 Yao Qi <yao@codesourcery.com>
6127
6128 Revert:
6129 2011-03-04 Yao Qi <yao@codesourcery.com>
6130
6131 * Makefile.in: Remove GNU make feature --directory.
6132
6133 2011-03-05 Yao Qi <yao@codesourcery.com>
6134
6135 * Makefile.in (CLEANDIRS, REQUIRED_SUBDIRS): New variable.
6136 (subdir_do): New make target. Copied from gdb/Makefile.
6137 (maintainer-clean, realclean, distclean, clean): Call corresponding
6138 make targets in common/Makefile.
6139
6140 2011-02-11 Yao Qi <yao@codesourcery.com>
6141
6142 * configure.ac: Call AC_PROG_RANLIB.
6143 * Makefile.in: Remove signals.o from OBS. Link libcommon.a.
6144 * configure: Regenerate.
6145
e6edda56
JK
61462011-03-07 Jan Kratochvil <jan.kratochvil@redhat.com>
6147
6148 * remote-utils.c (putpkt_binary_1): Calculate BUF2 size dynamically.
6149
e5141119
JB
61502011-03-06 Yao Qi <yao@codesourcery.com>
6151
6152 * Makefile.in (REQUIRED_SUBDIRS): Remove $(LIBCOMMON_DIR).
6153
64794aa4
JB
61542011-03-05 Yao Qi <yao@codesourcery.com>
6155
6156 * Makefile.in (CLEANDIRS, REQUIRED_SUBDIRS): New variable.
6157 (subdir_do): New make target. Copied from gdb/Makefile.
6158 (maintainer-clean, realclean, distclean, clean): Call corresponding
6159 make targets in common/Makefile.
6160
7a762829
YQ
61612011-03-04 Yao Qi <yao@codesourcery.com>
6162
6163 * Makefile.in: Remove GNU make feature --directory.
6164
348af9f7
MS
61652011-03-04 Michael Snyder <msnyder@vmware.com>
6166
6167 * server.c (queue_stop_reply): Call xmalloc not malloc.
6168
61692011-03-02 Michael Snyder <msnyder@vmware.com>
6170
6171 * linux-arm-low.c (arm_arch_setup): Replace malloc with xmalloc.
6172
9f72fee2
MS
61732011-02-28 Michael Snyder <msnyder@vmware.com>
6174
588eebee
MS
6175 * tracepoint.c (cmd_qtv): Discard unused value 'packet'.
6176 (cmd_qtframe): Ditto.
6177 (cmd_qtbuffer): Ditto.
6178 (cmd_bigqtbuffer): Ditto.
6179
9f72fee2
MS
6180 * utils.c (decimal2str): Initialize 'width' to nine, then
6181 don't mess with it.
6182
8040bd49
UW
61832011-02-28 Ulrich Weigand <uweigand@de.ibm.com>
6184
6185 * hostio.c (require_data): Free *data, not data.
6186
7e52cbd0
JK
61872011-02-28 Jan Kratochvil <jan.kratochvil@redhat.com>
6188
6189 * hostio.c (require_data): Use free, not xfree.
6190
9130f83e
MS
61912011-02-27 Michael Snyder <msnyder@vmware.com>
6192
4b812f4e
MS
6193 * server.c (handle_query): Discard unused value.
6194
9130f83e
MS
6195 * hostio.c (require_data): Free malloc memory before returning
6196 error.
6197
69d37113
MS
61982011-02-26 Michael Snyder <msnyder@vmware.com>
6199
6200 * linux-low.c (list_threads): Call closedir for dirent.
6201
35f5825a
MS
62022011-02-27 Michael Snyder <msnyder@vmware.com>
6203
2a589cef
MS
6204 * i386-low.c (i386-length_and_rw_bits): Comment the fact that
6205 a case statement falls through.
6206
0adea5f7
MS
6207 * linux-low.c (linux_xfer_siginfo): Fix fencepost error.
6208
35f5825a
MS
6209 * linux-amd64-ipa.c (gdb_agent_get_raw_reg): Fix fencepost error
6210 in comparison.
6211
238f1c74
MS
62122011-02-26 Michael Snyder <msnyder@vmware.com>
6213
6214 * utils.c (decimal2str): Eliminate dead code and dead param.
6215 (pulongest): Drop dead param from call to decimal2str.
6216 (plongest): Ditto.
6217
633ff500
JB
62182011-02-24 Joel Brobecker <brobecker@adacore.com>
6219
6220 Revert the following patch (not approved yet):
6221 2011-02-21 Hui Zhu <teawater@gmail.com>
6222 * tracepoint.c (tp_printf): New function.
6223 (eval_agent_expr): Handle gdb_agent_op_printf.
6224
f9c6ff72
HZ
62252011-02-21 Hui Zhu <teawater@gmail.com>
6226
6227 * tracepoint.c (tp_printf): New function.
6228 (eval_agent_expr): Handle gdb_agent_op_printf.
6229
94d5e490
TT
62302011-02-18 Tom Tromey <tromey@redhat.com>
6231
6232 * Makefile.in (tracepoint-ipa.o): Depend on ax.def.
6233 (tracepoint.o): Likewise.
6234 * tracepoint.c (enum gdb_agent_op): Use ax.def.
6235 (gdb_agent_op_names): Likewise.
6236
c7f96d2b
TT
62372011-02-18 Tom Tromey <tromey@redhat.com>
6238
6239 * tracepoint.c (enum gdb_agent_op) <gdb_agent_op_pick,
6240 gdb_agent_op_rot>: New constants.
6241 (gdb_agent_op_names): Add pick and roll.
6242 (eval_agent_expr) <gdb_agent_op_pick, gdb_agent_op_rot>: New
6243 cases.
6244
0feedb2c
JK
62452011-02-15 Jan Kratochvil <jan.kratochvil@redhat.com>
6246
6247 * aclocal.m4: Regenerated with aclocal-1.11.1.
6248
b3b9301e
PA
62492011-02-14 Pedro Alves <pedro@codesourcery.com>
6250
6251 * server.c (handle_qxfer_traceframe_info): New.
6252 (qxfer_packets): Register "traceframe-info".
6253 (handle_query): Report support for qXfer:traceframe-info:read+.
6254 * tracepoint.c (match_blocktype): New.
6255 (traceframe_find_block_type): Rename to ...
6256 (traceframe_walk_blocks): ... this. Add callback filter argument,
6257 and use it.
6258 (traceframe_find_block_type): New, reimplemented on top of
6259 traceframe_walk_blocks.
6260 (build_traceframe_info_xml): New.
6261 (traceframe_read_info): New.
6262 * server.h (traceframe_read_info): Declare.
6263
4f3e6fb7
YQ
62642011-02-11 Yao Qi <yao@codesourcery.com>
6265
6266 * configure.ac: Call AC_PROG_RANLIB.
6267 * Makefile.in: Remove signals.o from OBS. Link libcommon.a.
6268 * configure: Regenerate.
6269
764880b7
PA
62702011-02-07 Pedro Alves <pedro@codesourcery.com>
6271
6272 * server.c (gdb_read_memory): Change return semantics to allow
6273 partial transfers.
6274 (handle_search_memory_1): Adjust.
6275 (process_serial_event) <'m' packet>: Handle partial transfers.
6276 * tracepoint.c (traceframe_read_mem): Handle partial transfers.
6277
1c79eb8a
PA
62782011-01-28 Pedro Alves <pedro@codesourcery.com>
6279
6280 * regcache.c (init_register_cache): Initialize
6281 regcache->register_status.
6282 (free_register_cache): Release regcache->register_status.
6283 (regcache_cpy): Copy register_status.
6284 (registers_to_string): Print 'x's for unavailable registers.
6285 (supply_register): Mark the register's status valid or
6286 unavailable, depending on whether a buffer was passed in or not.
6287 (supply_register_zeroed): New.
6288 (supply_regblock): Mark the registers' status valid or
6289 unavailable, depending on whether a buffer was passed in or not.
6290 * regcache.h (REG_UNAVAILABLE, REG_VALID): New defines.
6291 (struct regcache): New `register_status' field.
6292 (supply_register_zeroed): Declare.
6293 * i387-fp.c (i387_xsave_to_cache): Zero out registers using
6294 supply_register_zeroed, rather than passing a NULL buffer to
6295 supply_register.
6296 * tracepoint.c (fetch_traceframe_registers): Update comment.
6297
85724a0e
PA
62982011-01-28 Pedro Alves <pedro@codesourcery.com>
6299
6300 * i387-fp.c (i387_xsave_to_cache): Make passing NULL as register
6301 buffer explicit.
6302
d08aafef
PA
63032011-01-25 Pedro Alves <pedro@codesourcery.com>
6304
6305 * server.h (decode_xfer_write): Change prototype.
6306 * remote-utils.c (decode_xfer_write): Remove `annex' parameter,
6307 and don't extract the annex here.
6308 * server.c (decode_xfer_read): Remove `annex' parameter,
6309 and don't extract the annex here.
6310 (decode_xfer): New.
6311 (struct qxfer): New.
6312 (handle_qxfer_auxv, handle_qxfer_features, handle_qxfer_libraries)
6313 (handle_qxfer_osdata, handle_qxfer_siginfo, handle_qxfer_spu)
6314 (handle_qxfer_statictrace): New functions, abstracted out from
6315 handle_query, and made to use the struct qxfer interface.
6316 (handle_threads_qxfer_proper): Rename to ...
6317 (handle_qxfer_threads_proper): ... this.
6318 (handle_threads_qxfer): Rename to ...
6319 (handle_qxfer_threads): ... this. Adjust.
6320 (qxfer_packets): New array.
6321 (handle_qxfer): New function.
6322 (handle_query): Use handle_qxfer.
6323
493e2a69
MS
63242011-01-05 Michael Snyder <msnyder@msnyder-server.eng.vmware.com>
6325
6326 * gdbreplay.c: Shorten lines of >= 80 columns.
6327 * linux-low.c: Ditto.
6328 * linux-ppc-low.c: Ditto.
6329 * linux-s390-low.c: Ditto.
6330 * linux-sparc-low.c: Ditto.
6331 * linux-x86-low.c: Ditto.
6332 * linux-xtensa-low.c: Ditto.
6333 * mem-break.c: Ditto.
6334 * nto-low.c: Ditto.
6335 * regcache.h: Ditto.
6336 * remote-utils.c: Ditto.
6337 * server.c: Ditto.
6338 * server.h: Ditto.
6339 * thread-db.c: Ditto.
6340 * tracepoint.c: Ditto.
6341 * utils.c: Ditto.
6342 * win32-low.h: Ditto.
6343
44944448
JB
63442011-01-05 Joel Brobecker <brobecker@adacore.com>
6345
6346 * gdbserver/configure.ac, gdbserver/gdbserver.1: Copyright year
6347 update.
6348
71ce852c
JB
63492011-01-01 Joel Brobecker <brobecker@adacore.com>
6350
6351 * server.c (gdbserver_version): Update copyright year in version
6352 output.
6353 * gdbreplay.c (gdbreplay_version): Ditto.
6354
eb826dc6
MF
63552010-12-29 Jie Zhang <jie.zhang@analog.com>
6356
6357 * configure.srv (bfin-*-*linux*): Handle Blackfin/Linux targets.
6358 * linux-bfin-low.c: New file.
6359 * linux-low.c: Define PT_TEXT_ADDR, PT_TEXT_END_ADDR, and
6360 PT_DATA_ADDR for BFIN targets.
6361 * Makefile.in (SFILES): Add linux-bfin-low.c.
6362 (clean): Remove reg-bfin.c.
6363 (linux-bfin-low.o, reg-bfin.o, reg-bfin.c): New targets.
6364 * README: Mention supported Blackfin targets.
6365
39ab222a
MF
63662010-12-23 Mike Frysinger <vapier@gentoo.org>
6367
6368 * .gitignore: New file.
6369
a1f2ce7d
MF
63702010-11-16 Mike Frysinger <vapier@gentoo.org>
6371
6372 * linux-low.c (linux_tracefork_child): Add char* cast to arg.
6373
f474844c
JZ
63742010-10-22 Jie Zhang <jie@codesourcery.com>
6375
6376 * Makefile.in: Add FLAGS_TO_PASS variable.
6377 (install): Remove dependency of install-only and recursively
6378 invoke make for install-only.
6379
f1048712
DE
63802010-10-04 Doug Evans <dje@google.com>
6381
6382 * Makefile.in (uninstall): Use $(DESTDIR).
6383
b53a1623
PA
63842010-09-24 Pedro Alves <pedro@codesourcery.com>
6385
e6ee044d
PA
6386 PR gdb/11842
6387
b53a1623
PA
6388 * linux-x86-low.c (compat_siginfo_from_siginfo)
6389 (siginfo_from_compat_siginfo): Also copy si_pid and si_uid when
6390 si_code is < 0. Check for si_code == SI_TIMER before checking for
6391 si_code < 0.
6392
fa1bd1e4
JB
63932010-09-13 Joel Brobecker <brobecker@adacore.com>
6394
6395 * lynx-i386-low.c: New file.
6396 * configure.srv: Add handling of i[34567]86-*-lynxos* targets.
6397
47fac8f8
JB
63982010-09-13 Joel Brobecker <brobecker@adacore.com>
6399
6400 * lynx-low.c (ptrace_request_to_str): Remove handling for
6401 request values that have been removed in LynxOS 5.x.
6402
1adfc54d
JB
64032010-09-13 Joel Brobecker <brobecker@adacore.com>
6404
6405 * lynx-low.c, lynx-ppc-loc.c: Include <sys/ptrace.h> instead of
6406 <ptrace.h>
6407
c2a66c29
NS
64082010-09-09 Nathan Sidwell <nathan@codesourcery.com>
6409
6410 * configure.ac: Add --enable-inprocess-agent option.
6411 * configure: Rebuilt.
6412
32fcada3
YQ
64132010-09-06 Yao Qi <yao@codesourcery.com>
6414
6415 * linux-low.c (linux_kill): Remove unused variable.
6416 (linux_stabilize_threads): Likewise.
6417 * server.c (start_inferior): Likewise.
6418 (queue_stop_reply_callback): Likewise.
6419 * tracepoint.c (do_action_at_tracepoint): Likewise.
6420
0cccb683
YQ
64212010-09-06 Yao Qi <yao@codesourcery.com>
6422
6423 * linux-low.c (maybe_move_out_of_jump_pad): Restore current_inferior
6424 on return.
6425
423ec54c
JK
64262010-09-06 Jan Kratochvil <jan.kratochvil@redhat.com>
6427
6428 * target.c (mywait) <TARGET_WAITKIND_EXITED>: Fix to use INTEGER.
6429
12ac6819
PA
64302010-09-06 Pedro Alves <pedro@codesourcery.com>
6431
6432 * Makefile.in (install-only): Replace $IPA_DEPFILES with
6433 "$(IPA_DEPFILES)".
6434
8ed54b31
JB
64352010-09-01 Joel Brobecker <brobecker@adacore.com>
6436
6437 * gdbserver/lynx-low.c, gdbserver/lynx-low.h,
6438 gdbserver/lynx-ppc-low.c: New files.
6439 * Makefile.in (lynx_low_h): New variable.
6440 (lynx-low.o, lynx-ppc-low.o): New rules.
6441 * configure.ac: On LynxOS, link with -lnetinet.
6442 * configure.srv: Add handling of powerpc-*-lynxos* targets.
6443 * configure: regenerate.
6444
bb0116a4
JB
64452010-09-01 Joel Brobecker <brobecker@adacore.com>
6446
6447 * Makefile.in (vasprintf.o, vsnprintf.o): New rules.
6448 * configure.ac: Add check for vasprintf and vsnprintf.
6449 * configure, config.in: Regenerate.
6450 * server.h (vasprintf, vsnprintf): Add conditional declarations.
6451
a778ab81 64522010-09-01 Joel Brobecker <brobecker@adacore.com>
6453
6454 * gdbreplay.c: Move include of alloca.h up, next to include of
6455 malloc.h.
6456 * server.h: Add include of malloc.h.
6457 * mem-break.c: Remove include of malloc.h.
6458 * server.c, tracepoint.c, utils.c, win32-low.c: Likewise.
6459
8b034a19 64602010-09-01 Joel Brobecker <brobecker@adacore.com>
6461
6462 * Makefile.in (memmem.o): Build with -Wno-error.
6463
64642010-09-01 Joel Brobecker <brobecker@adacore.com>
6465
6466 * utils.c (xsnprintf): Make non-static.
6467 * server.h: Add xsnprintf declaration.
6468 * linux-low.c, nto-low.c, target.c, thread-db.c, tracepoint.c:
6469 replace calls to snprintf by calls to xsnprintf throughout.
6470
64712010-09-01 Joel Brobecker <brobecker@adacore.com>
6472
6473 * configure.ac: Add configure check for alloca.
6474 * configure, config.in: Regenerate.
6475 * server.h: Include alloca.h if it exists.
6476 * gdbreplay.c: Include alloca.h if it exists.
6477
1a981360
PA
64782010-08-28 Pedro Alves <pedro@codesourcery.com>
6479
6480 * linux-low.c (__SIGRTMIN): Define if not already defined.
6481 (linux_create_inferior): Check for __ANDROID__ rather than
6482 __SIGRTMIN.
6483 (enqueue_one_deferred_signal): Don't requeue non-RT signals that
6484 are already deferred.
6485 (linux_wait_1): Check for __ANDROID__ rather than __SIGRTMIN.
6486 (linux_resume_one_thread): Don't queue a SIGSTOP if the lwp is
6487 stopped and already has a pending signal to report.
6488 (proceed_one_lwp): : Don't queue a SIGSTOP if the lwp already has
6489 a pending signal to report or is moving out of a jump pad.
6490 (linux_init_signals): Check for __ANDROID__ rather than
6491 __SIGRTMIN.
6492
b4d51a55
PA
64932010-08-28 Pedro Alves <pedro@codesourcery.com>
6494
6495 * linux-low.c (linux_stabilize_threads): Wrap debug output in a
6496 debug_threads check. Avoid a linear search when not doing debug
6497 output.
6498
ec48365d
PA
64992010-08-27 Pedro Alves <pedro@codesourcery.com>
6500
6501 * event-loop.c (event_handle_func): Adjust to use gdb_fildes_t.
6502 (struct gdb_event) <fd>: Change type to gdb_fildes_t.
6503 (struct file_handler) <fd>: Change type to gdb_fildes_t.
6504 (process_event): Change local fd's type to gdb_fildes_t.
6505 (create_file_handler): Adjust prototype.
6506 (delete_file_handler): Adjust prototype.
6507 (handle_file_event): Adjust prototype. Use pfildes.
6508 (create_file_event): Adjsut prototype.
6509 * remote-utils.c (remote_desc, listen_desc): Change type to
6510 gdb_fildes_t.
6511 * server.h: New gdb_fildes_t typedef.
6512 [USE_WIN32API]: Include winsock2.h.
6513 (delete_file_handler, add_file_handler): Adjust prototypes.
6514 (pfildes): Declare.
6515 * utils.c (pfildes): New.
6516
854d88f0
PA
65172010-08-27 Pedro Alves <pedro@codesourcery.com>
6518
6519 * configure.ac (build_warnings): Add -Wno-char-subscripts.
6520 * configure: Regenerate.
6521
0146f85b
PA
65222010-08-27 Pedro Alves <pedro@codesourcery.com>
6523
6524 * linux-low.c (linux_unprepare_to_access_memory): Rename to ...
6525 (linux_done_accessing_memory): ... this.
6526 (linux_target_ops): Adjust.
6527 * linux-x86-low.c (x86_insert_point, x86_remove_point): Adjust.
6528 * nto-low.c (nto_target_ops): Adjust comment.
6529 * server.c (gdb_read_memory, gdb_write_memory): Adjust.
6530 * spu-low.c (spu_target_ops): Adjust comment.
6531 * target.h (target_ops): Rename unprepare_to_access_memory field
6532 to done_accessing_memory.
6533 (unprepare_to_access_memory): Rename to ...
6534 (done_accessing_memory): ... this.
6535
90d74c30
PA
65362010-08-26 Pedro Alves <pedro@codesourcery.com>
6537
6538 * linux-low.c (linux_prepare_to_access_memory): New.
6539 (linux_unprepare_to_access_memory): New.
6540 (linux_target_ops): Install them.
6541 * server.c (read_memory): Rename to ...
6542 (gdb_read_memory): ... this. Use
6543 prepare_to_access_memory/prepare_to_access_memory.
6544 (write_memory): Rename to ...
6545 (gdb_write_memory): ... this. Use
6546 prepare_to_access_memory/prepare_to_access_memory.
6547 (handle_search_memory_1): Adjust.
6548 (process_serial_event): Adjust.
6549 * target.h (struct target_ops): New fields
6550 prepare_to_access_memory and unprepare_to_access_memory.
6551 (prepare_to_access_memory, unprepare_to_access_memory): New.
6552 * linux-x86-low.c (x86_insert_point, x86_remove_point): Use
6553 prepare_to_access_memory/prepare_to_access_memory.
6554 * nto-low.c (nto_target_ops): Adjust.
6555 * spu-low.c (spu_target_ops): Adjust.
6556 * win32-low.c (win32_target_ops): Adjust.
6557
fd467969
PA
65582010-08-26 Pedro Alves <pedro@codesourcery.com>
6559
6560 * Makefile.in (WARN_CFLAGS): Get it from configure.
6561 (WERROR_CFLAGS): New.
6562 (INTERNAL_CFLAGS): Add WERROR_CFLAGS.
6563 * configure.ac: Introduce --enable-werror, which adds -Werror to
6564 the compiler command line. Enabled by default. Disable with
6565 --disable-werror. Add -Wdeclaration-after-statement
6566 Wpointer-arith and -Wformat-nonliteral to warning flags.
6567 * configure: Regenerate.
6568
331e2f5f
PA
65692010-08-26 Pedro Alves <pedro@codesourcery.com>
6570
6571 * mem-break.c [HAVE_MALLOC_H]: Include malloc.h.
6572
e581f2b4
PA
65732010-08-26 Pedro Alves <pedro@codesourcery.com>
6574
6575 * gdbreplay.c (remote_error): New.
6576 (gdbchar): New.
6577 (expect): Use gdbchar. Check for error reading from GDB.
6578 Clarify sync error output.
6579 (play): Check for errors writing to GDB.
6580 * linux-low.c (sigchld_handler): Really ignore `write' errors.
6581 * remote-utils.c (getpkt): Check for errors writing to the remote
6582 descriptor.
6583
3c11dd79
PA
65842010-08-25 Pedro Alves <pedro@codesourcery.com>
6585
6586 * linux-low.c (linux_wait_1): Move non-debugging code out of
6587 `debug_threads' control.
6588
d20a8ad9
PA
65892010-08-25 Pedro Alves <pedro@codesourcery.com>
6590
6591 * linux-low.c (linux_wait_1): Don't set last_status here.
6592 * server.c (push_event, queue_stop_reply_callback): Assert we're
6593 not pushing a TARGET_WAITKIND_IGNORE event.
6594 (start_inferior, start_inferior, attach_inferior, handle_v_cont)
6595 (myresume, handle_target_event): Set the thread's last_resume_kind
6596 and last_status from the target returned status.
6597
964e4306
PA
65982010-08-25 Pedro Alves <pedro@codesourcery.com>
6599
6600 PR threads/10729
6601
6602 * linux-x86-low.c (update_debug_registers_callback): New.
6603 (i386_dr_low_set_addr): Use it.
6604 (i386_dr_low_get_addr): New.
6605 (i386_dr_low_set_control): Use update_debug_registers_callback.
6606 (i386_dr_low_get_control): New.
6607 (i386_dr_low_get_status): Adjust.
6608 * linux-low.c (linux_stop_lwp): New.
6609 * linux-low.h (linux_stop_lwp): Declare.
6610
6611 * i386-low.c (I386_DR_GET_RW_LEN): Take the dr7 contents as
6612 argument instead of a i386_debug_reg_state.
6613 (I386_DR_WATCH_HIT): Take the dr6 contents as argument instead of
6614 a i386_debug_reg_state.
6615 (i386_insert_aligned_watchpoint): Adjust.
6616 (i386_remove_aligned_watchpoint): Adjust.
6617 (i386_low_stopped_data_address): Read the debug registers from the
6618 inferior instead of from the mirrors.
6619 * i386-low.h (struct i386_debug_reg_state): Extend comment.
6620 (i386_dr_low_get_addr): Declare.
6621 (i386_dr_low_get_control): Declare.
6622 (i386_dr_low_get_status): Change prototype.
6623
6624 * win32-i386-low.c (dr_status_mirror, dr_control_mirror): New globals.
6625 (i386_dr_low_get_addr): New.
6626 (i386_dr_low_get_control): New.
6627 (i386_dr_low_get_status): Adjust prototype. Return
6628 dr_status_mirror.
6629 (i386_initial_stuff): Clear dr_status_mirror and
6630 dr_control_mirror.
6631 (i386_get_thread_context): Adjust.
6632 (i386_set_thread_context): Adjust.
6633 (i386_thread_added): Adjust.
6634
5f21a75b
PA
66352010-08-24 Pedro Alves <pedro@codesourcery.com>
6636
6637 * linux-low.h (linux_thread_area): Delete declaration.
6638
3e4c1235
TS
66392010-08-11 Thomas Schwinge <thomas@codesourcery.com>
6640
6641 * linux-low.c (linux_wait_1): Correctly return the ptid of the child
6642 after its termination.
6643
1971b033
PA
66442010-08-09 Pedro Alves <pedro@codesourcery.com>
6645
6646 * linux-low.c (gdb_wants_lwp_stopped): Delete.
6647 (gdb_wants_all_stopped): Delete.
6648 (linux_wait_1): Don't call them.
6649 * server.c (handle_v_cont): Tag all threads as want-stopped.
6650 (gdb_wants_thread_stopped): Fix comments. Tag the thread that
6651 stopped as "client-wants-stopped".
6652
310444ac
PA
66532010-07-31 Pedro Alves <pedro@codesourcery.com>
6654
6655 * Makefile.in (signals_h): New.
6656 (server_h): Depend on it.
6657 (server.o): Don't depend on $(signals_def).
6658 (signals.o): Depend on $(signals_def).
6659
a19cae16
JK
66602010-07-31 Jan Kratochvil <jan.kratochvil@redhat.com>
6661
6662 * Makefile.in (signals_def): New.
6663 (server_h): Append include/gdb/signals.h and signals_def.
6664 (server.o): Append signals_def.
6665
30d50328
JK
66662010-07-25 Jan Kratochvil <jan.kratochvil@redhat.com>
6667
6668 * server.c (handle_target_event): Use target_signal_to_host for
6669 resume_info.sig initialization.
6670 * target.h (struct thread_resume) <sig>: New comment.
6671
5c3216e2
OS
66722010-07-20 Ozkan Sezer <sezeroz@gmail.com>
6673
c6f46ca0
OS
6674 * server.c (handle_query): strcpy() the returned string from paddress()
6675 instead of sprintf().
5c3216e2
OS
6676 * utils.c (paddress): Return phex_nz().
6677
6bd31874
JB
66782010-07-07 Joel Brobecker <brobecker@adacore.com>
6679
6680 * server.c (handle_v_cont): Call mourn_inferior if process
6681 just exited.
6682 (myresume): Likewise.
6683
0fb4aa4b
PA
66842010-07-01 Pedro Alves <pedro@codesourcery.com>
6685
6686 Static tracepoints, and integration with UST.
6687
6688 * configure.ac: Handle --with-ust. substitute ustlibs and ustinc.
6689 * mem-break.c (uninsert_all_breakpoints)
6690 (reinsert_all_breakpoints): New.
6691 * mem-break.h (reinsert_all_breakpoints, uninsert_all_breakpoints):
6692 * tracepoint.c (ust_loaded, helper_thread_id, cmd_buf): New.
6693 (gdb_agent_ust_loaded, helper_thread_id)
6694 (gdb_agent_helper_thread_id): New macros.
6695 (struct ipa_sym_addresses): Add addr_ust_loaded,
6696 addr_helper_thread_id, addr_cmd_buf.
6697 (symbol_list): Add ust_loaded, helper_thread_id, cmd_buf.
6698 (in_process_agent_loaded_ust): New.
6699 (write_e_ust_not_loaded): New.
6700 (maybe_write_ipa_ust_not_loaded): New.
6701 (struct collect_static_trace_data_action): New.
6702 (enum tracepoint_type) <static_tracepoint>: New.
6703 (struct tracepoint) <handle>: Mention static tracepoints.
6704 (struct static_tracepoint_ctx): New.
6705 (CMD_BUF_SIZE): New.
6706 (add_tracepoint_action): Handle static tracepoint actions.
6707 (unprobe_marker_at): New.
6708 (clear_installed_tracepoints): Handle static tracepoints.
6709 (cmd_qtdp): Handle static tracepoints.
6710 (probe_marker_at): New.
6711 (cmd_qtstart): Handle static tracepoints.
6712 (response_tracepoint): Handle static tracepoints.
6713 (cmd_qtfstm, cmd_qtsstm, cmd_qtstmat): New.
6714 (handle_tracepoint_query): Handle qTfSTM, qTsSTM and qTSTMat.
6715 (get_context_regcache): Handle static tracepoints.
6716 (do_action_at_tracepoint): Handle static tracepoint actions.
6717 (traceframe_find_block_type): Handle static trace data blocks.
6718 (traceframe_read_sdata): New.
6719 (download_tracepoints): Download static tracepoint actions.
6720 [HAVE_UST] Include ust/ust.h, dlfcn.h, sys/socket.h, and sys/un.h.
6721 (GDB_PROBE_NAME): New.
6722 (ust_ops): New.
6723 (GET_UST_SYM): New.
6724 (USTF): New.
6725 (dlsym_ust): New.
6726 (ust_marker_to_static_tracepoint): New.
6727 (gdb_probe): New.
6728 (collect_ust_data_at_tracepoint): New.
6729 (gdb_ust_probe): New.
6730 (UNIX_PATH_MAX, SOCK_DIR): New.
6731 (gdb_ust_connect_sync_socket): New.
6732 (resume_thread, stop_thread): New.
6733 (run_inferior_command): New.
6734 (init_named_socket): New.
6735 (gdb_ust_socket_init): New.
6736 (cstr_to_hexstr): New.
6737 (next_st): New.
6738 (first_marker, next_marker): New.
6739 (response_ust_marker): New.
6740 (cmd_qtfstm, cmd_qtsstm): New.
6741 (unprobe_marker_at, probe_marker_at): New.
6742 (cmd_qtstmat, gdb_ust_thread): New.
6743 (gdb_ust_init): New.
6744 (initialize_tracepoint_ftlib): Call gdb_ust_init.
6745 * linux-amd64-ipa.c [HAVE_UST]: Include ust/processor.h
6746 (ST_REGENTRY): New.
6747 (x86_64_st_collect_regmap): New.
6748 (X86_64_NUM_ST_COLLECT_GREGS): New.
6749 (AMD64_RIP_REGNUM): New.
6750 (supply_static_tracepoint_registers): New.
6751 * linux-i386-ipa.c [HAVE_UST]: Include ust/processor.h
6752 (ST_REGENTRY): New.
6753 (i386_st_collect_regmap): New.
6754 (i386_NUM_ST_COLLECT_GREGS): New.
6755 (supply_static_tracepoint_registers): New.
6756 * server.c (handle_query): Handle qXfer:statictrace:read.
6757 <qSupported>: Report support for StaticTracepoints, and
6758 qXfer:statictrace:read features.
6759 * server.h (traceframe_read_sdata)
6760 (supply_static_tracepoint_registers): Declare.
6761 * remote-utils.c (convert_int_to_ascii, hexchars, ishex, tohex)
6762 (unpack_varlen_hex): Include in IPA build.
6763 * Makefile.in (ustlibs, ustinc): New.
6764 (IPA_OBJS): Add remote-utils-ipa.o.
6765 ($(IPA_LIB)): Link -ldl and -lpthread.
6766 (UST_CFLAGS): New.
6767 (IPAGENT_CFLAGS): Add UST_CFLAGS.
6768 * config.in, configure: Regenerate.
6769
9e4344e5
PA
67702010-06-20 Ian Lance Taylor <iant@google.com>
6771 Pedro Alves <pedro@codesourcery.com>
6772
6773 * linux-x86-low.c (always_true): Delete.
6774 (EMIT_ASM, EMIT_ASM32): Use an uncondition asm jmp instead of
6775 trying to fool the compiler with always_true.
6776
c6beb2cb
PA
67772010-06-20 Pedro Alves <pedro@codesourcery.com>
6778
6779 * tracepoint.c (condition_true_at_tracepoint): Don't run compiled
6780 conditions in gdbserver.
6781
d2ed6730
UW
67822010-06-19 Ulrich Weigand <uweigand@de.ibm.com>
6783
6784 * spu-low.c (spu_read_memory): Wrap around local store limit.
6785 (spu_write_memory): Likewise.
6786
4e29fb54
PA
67872010-06-15 Pedro Alves <pedro@codesourcery.com>
6788
6789 * linux-x86-low.c (amd64_emit_const, amd64_emit_void_call_2)
6790 (i386_emit_const, i386_emit_void_call_2): Replace int64_t uses with
6791 LONGEST uses.
6792 * server.h (struct emit_ops): Replace int64_t uses with LONGEST
6793 uses.
6794 * tracepoint.c (emit_const, emit_void_call_2): Replace int64_t
6795 uses with LONGEST uses.
6796
6a271cae
PA
67972010-06-14 Stan Shebs <stan@codesourcery.com>
6798 Pedro Alves <pedro@codesourcery.com>
6799
6800 Bytecode compiler.
6801
6802 * linux-x86-low.c: Include limits.h.
6803 (add_insns): New.
6804 (always_true): New.
6805 (EMIT_ASM): New.
6806 (EMIT_ASM32): New.
6807 (amd64_emit_prologue, amd64_emit_epilogue, amd64_emit_add)
6808 (amd64_emit_sub, amd64_emit_mul, amd64_emit_lsh)
6809 (amd64_emit_rsh_signed, amd64_emit_rsh_unsigned, amd64_emit_ext,
6810 (amd64_emit_log_not, amd64_emit_bit_and, amd64_emit_bit_or)
6811 (amd64_emit_bit_xor, amd64_emit_bit_not, amd64_emit_equal,
6812 (amd64_emit_less_signed, amd64_emit_less_unsigned, amd64_emit_ref,
6813 (amd64_emit_if_goto, amd64_emit_goto, amd64_write_goto_address)
6814 (amd64_emit_const, amd64_emit_call, amd64_emit_reg)
6815 (amd64_emit_pop, amd64_emit_stack_flush, amd64_emit_zero_ext)
6816 (amd64_emit_swap, amd64_emit_stack_adjust, amd64_emit_int_call_1)
6817 (amd64_emit_void_call_2): New.
6818 (amd64_emit_ops): New.
6819 (i386_emit_prologue, i386_emit_epilogue, i386_emit_add)
6820 (i386_emit_sub,i386_emit_mul, i386_emit_lsh, i386_emit_rsh_signed)
6821 (i386_emit_rsh_unsigned, i386_emit_ext, i386_emit_log_not)
6822 (i386_emit_bit_and, i386_emit_bit_or, i386_emit_bit_xor)
6823 (i386_emit_bit_not, i386_emit_equal, i386_emit_less_signed)
6824 (i386_emit_less_unsigned, i386_emit_ref, i386_emit_if_goto)
6825 (i386_emit_goto, i386_write_goto_address, i386_emit_const)
6826 (i386_emit_call, i386_emit_reg, i386_emit_pop)
6827 (i386_emit_stack_flush, i386_emit_zero_ext, i386_emit_swap)
6828 (i386_emit_stack_adjust, i386_emit_int_call_1)
6829 (i386_emit_void_call_2): New.
6830 (i386_emit_ops): New.
6831 (x86_emit_ops): New.
6832 (the_low_target): Install x86_emit_ops.
6833 * server.h (struct emit_ops): New.
6834 (get_raw_reg_func_addr): Declare.
6835 (current_insn_ptr, emit_error): Declare.
6836 * tracepoint.c (get_raw_reg, get_trace_state_variable_value)
6837 (set_trace_state_variable_value): New defines.
6838 (struct ipa_sym_addresses): New fields addr_get_raw_reg,
6839 addr_get_trace_state_variable_value and
6840 addr_set_trace_state_variable_value.
6841 (symbol_list): New fields for get_raw_reg,
6842 get_trace_state_variable_value and set_trace_state_variable_value.
6843 (condfn): New typedef.
6844 (struct tracepoint): New field `compiled_cond'.
6845 (do_action_at_tracepoint): Clear compiled_cond.
6846 (get_trace_state_variable_value, set_trace_state_variable_value):
6847 Export in the IPA.
6848 (condition_true_at_tracepoint): If there's a compiled condition,
6849 run that.
6850 (current_insn_ptr, emit_error): New globals.
6851 (struct bytecode_address): New.
6852 (get_raw_reg_func_addr): New.
6853 (emit_prologue, emit_epilogue, emit_add, emit_sub, emit_mul)
6854 (emit_lsh, emit_rsh_signed, emit_rsh_unsigned, emit_ext)
6855 (emit_log_not, emit_bit_and, emit_bit_or, emit_bit_xor)
6856 (emit_bit_not, emit_equal, emit_less_signed, emit_less_unsigned)
6857 (emit_ref, emit_if_goto, emit_goto, write_goto_address, emit_const)
6858 (emit_reg, emit_pop, emit_stack_flush, emit_zero_ext, emit_swap)
6859 (emit_stack_adjust, emit_int_call_1, emit_void_call_2): New.
6860 (compile_tracepoint_condition, compile_bytecodes): New.
6861 * target.h (emit_ops): Forward declare.
6862 (struct target_ops): New field emit_ops.
6863 (target_emit_ops): New.
6864 * linux-amd64-ipa.c (gdb_agent_get_raw_reg): New.
6865 * linux-i386-ipa.c (gdb_agent_get_raw_reg): New.
6866 * linux-low.c (linux_emit_ops): New.
6867 (linux_target_ops): Install it.
6868 * linux-low.h (struct linux_target_ops): New field emit_ops.
6869
92b72907
UW
68702010-06-14 Ulrich Weigand <uweigand@de.ibm.com>
6871
6872 * linux-ppc-low.c (ppc_arch_setup): Use private regcache to test MSR.
6873 * linux-s390-low.c (ppc_arch_setup): Use private regcache to test PSW.
6874
fa593d66
PA
68752010-06-01 Pedro Alves <pedro@codesourcery.com>
6876 Stan Shebs <stan@codesourcery.com>
6877
6878 * Makefile.in (IPA_DEPFILES, extra_libraries): New.
6879 (all): Depend on $(extra_libraries).
6880 (install-only): Install the IPA.
6881 (IPA_OBJS, IPA_LIB): New.
6882 (clean): Remove the IPA lib.
6883 (IPAGENT_CFLAGS): New.
6884 (tracepoint-ipa.o, utils-ipa.o, remote-utils-ipa.o)
6885 (regcache-ipa.o, i386-linux-ipa.o, linux-i386-ipa.o)
6886 (linux-amd64-ipa.o, amd64-linux-ipa.o): New rules.
6887 * linux-amd64-ipa.c, linux-i386-ipa.c: New files.
6888 * configure.ac: Check for atomic builtins support in the compiler.
6889 (IPA_DEPFILES, extra_libraries): Define.
6890 * configure.srv (ipa_obj): Add description.
6891 (ipa_i386_linux_regobj, ipa_amd64_linux_regobj): Define.
6892 (i[34567]86-*-linux*): Set ipa_obj.
6893 (x86_64-*-linux*): Set ipa_obj.
6894 * linux-low.c (stabilizing_threads): New.
6895 (supports_fast_tracepoints): New.
6896 (linux_detach): Stabilize threads before detaching.
6897 (handle_tracepoints): Handle internal tracing breakpoints. Assert
6898 the lwp is either not stabilizing, or is moving out of a jump pad.
6899 (linux_fast_tracepoint_collecting): New.
6900 (maybe_move_out_of_jump_pad): New.
6901 (enqueue_one_deferred_signal): New.
6902 (dequeue_one_deferred_signal): New.
6903 (linux_wait_for_event_1): If moving out of a jump pad, defer
6904 pending signals to later.
6905 (linux_stabilize_threads): New.
6906 (linux_wait_1): Check if threads need moving out of jump pads, and
6907 do it if so.
6908 (stuck_in_jump_pad_callback): New.
6909 (move_out_of_jump_pad_callback): New.
6910 (lwp_running): New.
6911 (linux_resume_one_lwp): Handle moving out of jump pads.
6912 (linux_set_resume_request): Dequeue deferred signals.
6913 (need_step_over_p): Also step over fast tracepoint jumps.
6914 (start_step_over): Also uninsert fast tracepoint jumps.
6915 (finish_step_over): Also reinsert fast tracepoint jumps.
6916 (linux_install_fast_tracepoint_jump): New.
6917 (linux_target_ops): Install linux_stabilize_threads and
6918 linux_install_fast_tracepoint_jump_pad.
6919 * linux-low.h (linux_target_ops) <get_thread_area,
6920 install_fast_tracepoint_jump_pad>: New fields.
6921 (struct lwp_info) <collecting_fast_tracepoint,
6922 pending_signals_to_report, exit_jump_pad_bkpt>: New fields.
6923 (linux_get_thread_area): Declare.
6924 * linux-x86-low.c (jump_insn): New.
6925 (x86_get_thread_area): New.
6926 (append_insns): New.
6927 (push_opcode): New.
6928 (amd64_install_fast_tracepoint_jump_pad): New.
6929 (i386_install_fast_tracepoint_jump_pad): New.
6930 (x86_install_fast_tracepoint_jump_pad): New.
6931 (the_low_target): Install x86_get_thread_area and
6932 x86_install_fast_tracepoint_jump_pad.
6933 * mem-break.c (set_raw_breakpoint_at): Use read_inferior_memory.
6934 (struct fast_tracepoint_jump): New.
6935 (fast_tracepoint_jump_insn): New.
6936 (fast_tracepoint_jump_shadow): New.
6937 (find_fast_tracepoint_jump_at): New.
6938 (fast_tracepoint_jump_here): New.
6939 (delete_fast_tracepoint_jump): New.
6940 (set_fast_tracepoint_jump): New.
6941 (uninsert_fast_tracepoint_jumps_at): New.
6942 (reinsert_fast_tracepoint_jumps_at): New.
6943 (set_breakpoint_at): Use write_inferior_memory.
6944 (uninsert_raw_breakpoint): Use write_inferior_memory.
6945 (check_mem_read): Mask out fast tracepoint jumps.
6946 (check_mem_write): Mask out fast tracepoint jumps.
6947 * mem-break.h (struct fast_tracepoint_jump): Forward declare.
6948 (set_fast_tracepoint_jump): Declare.
6949 (delete_fast_tracepoint_jump)
6950 (fast_tracepoint_jump_here, uninsert_fast_tracepoint_jumps_at)
6951 (reinsert_fast_tracepoint_jumps_at): Declare.
6952 * regcache.c: Don't compile many functions when building the
6953 in-process agent library.
6954 (init_register_cache) [IN_PROCESS_AGENT]: Don't allow allocating
6955 the register buffer in the heap.
6956 (free_register_cache): If the register buffer isn't owned by the
6957 regcache, don't free it.
6958 (set_register_cache) [IN_PROCESS_AGENT]: Don't re-alocate
6959 pre-existing register caches.
6960 * remote-utils.c (convert_int_to_ascii): Constify `from' parameter
6961 type.
6962 (convert_ascii_to_int): : Constify `from' parameter type.
6963 (decode_M_packet, decode_X_packet): Replace the `to' parameter by
6964 a `to_p' pointer to pointer parameter. If TO_P is NULL, malloc
6965 the needed buffer in-place.
6966 (relocate_instruction): New.
6967 * server.c (handle_query) <qSymbols>: If the target supports
6968 tracepoints, give it a chance of looking up symbols. Report
6969 support for fast tracepoints.
6970 (handle_status): Stabilize threads.
6971 (process_serial_event): Adjust.
6972 * server.h (struct fast_tracepoint_jump): Forward declare.
6973 (struct process_info) <fast_tracepoint_jumps>: New field.
6974 (convert_ascii_to_int, convert_int_to_ascii): Adjust.
6975 (decode_X_packet, decode_M_packet): Adjust.
6976 (relocate_instruction): Declare.
6977 (in_process_agent_loaded): Declare.
6978 (tracepoint_look_up_symbols): Declare.
6979 (struct fast_tpoint_collect_status): Declare.
6980 (fast_tracepoint_collecting): Declare.
6981 (force_unlock_trace_buffer): Declare.
6982 (handle_tracepoint_bkpts): Declare.
6983 (initialize_low_tracepoint)
6984 (supply_fast_tracepoint_registers) [IN_PROCESS_AGENT]: Declare.
6985 * target.h (struct target_ops) <stabilize_threads,
6986 install_fast_tracepoint_jump_pad>: New fields.
6987 (stabilize_threads, install_fast_tracepoint_jump_pad): New.
6988 * tracepoint.c [HAVE_MALLOC_H]: Include malloc.h.
6989 [HAVE_STDINT_H]: Include stdint.h.
6990 (trace_debug_1): Rename to ...
6991 (trace_vdebug): ... this.
6992 (trace_debug): Rename to ...
6993 (trace_debug_1): ... this. Add `level' parameter.
6994 (trace_debug): New.
6995 (ATTR_USED, ATTR_NOINLINE): New.
6996 (IP_AGENT_EXPORT): New.
6997 (gdb_tp_heap_buffer, gdb_jump_pad_buffer, gdb_jump_pad_buffer_end)
6998 (collecting, gdb_collect, stop_tracing, flush_trace_buffer)
6999 (about_to_request_buffer_space, trace_buffer_is_full)
7000 (stopping_tracepoint, expr_eval_result, error_tracepoint)
7001 (tracepoints, tracing, trace_buffer_ctrl, trace_buffer_ctrl_curr)
7002 (trace_buffer_lo, trace_buffer_hi, traceframe_read_count)
7003 (traceframe_write_count, traceframes_created)
7004 (trace_state_variables)
7005 New renaming defines.
7006 (struct ipa_sym_addresses): New.
7007 (STRINGIZE_1, STRINGIZE, IPA_SYM): New.
7008 (symbol_list): New.
7009 (ipa_sym_addrs): New.
7010 (all_tracepoint_symbols_looked_up): New.
7011 (in_process_agent_loaded): New.
7012 (write_e_ipa_not_loaded): New.
7013 (maybe_write_ipa_not_loaded): New.
7014 (tracepoint_look_up_symbols): New.
7015 (debug_threads) [IN_PROCESS_AGENT]: New.
7016 (read_inferior_memory) [IN_PROCESS_AGENT]: New.
7017 (UNKNOWN_SIDE_EFFECTS): New.
7018 (stop_tracing): New.
7019 (flush_trace_buffer): New.
7020 (stop_tracing_bkpt): New.
7021 (flush_trace_buffer_bkpt): New.
7022 (read_inferior_integer): New.
7023 (read_inferior_uinteger): New.
7024 (read_inferior_data_pointer): New.
7025 (write_inferior_data_pointer): New.
7026 (write_inferior_integer): New.
7027 (write_inferior_uinteger): New.
7028 (struct collect_static_trace_data_action): Delete.
7029 (enum tracepoint_type): New.
7030 (struct tracepoint) <type>: New field `type'.
43aaf8b6
PA
7031 <actions_str, step_actions, step_actions_str>: Only include in
7032 GDBserver.
fa593d66
PA
7033 <orig_size, obj_addr_on_target, adjusted_insn_addr>
7034 <adjusted_insn_addr_end, jump_pad, jump_pad_end>: New fields.
7035 (tracepoints): Use IP_AGENT_EXPORT.
7036 (last_tracepoint): Don't include in the IPA.
7037 (stopping_tracepoint): Use IP_AGENT_EXPORT.
7038 (trace_buffer_is_full): Use IP_AGENT_EXPORT.
7039 (alloced_trace_state_variables): New.
7040 (trace_state_variables): Use IP_AGENT_EXPORT.
7041 (traceframe_t): Delete unused variable.
7042 (circular_trace_buffer): Don't include in the IPA.
7043 (trace_buffer_start): Delete.
7044 (struct trace_buffer_control): New.
7045 (trace_buffer_free): Delete.
7046 (struct ipa_trace_buffer_control): New.
7047 (GDBSERVER_FLUSH_COUNT_MASK, GDBSERVER_FLUSH_COUNT_MASK_PREV)
7048 (GDBSERVER_FLUSH_COUNT_MASK_CURR, GDBSERVER_UPDATED_FLUSH_COUNT_BIT):
7049 New.
7050 (trace_buffer_ctrl): New.
7051 (TRACE_BUFFER_CTRL_CURR): New.
7052 (trace_buffer_start, trace_buffer_free, trace_buffer_end_free):
7053 Reimplement as macros.
7054 (trace_buffer_wrap): Delete.
7055 (traceframe_write_count, traceframe_read_count)
7056 (traceframes_created, tracing): Use IP_AGENT_EXPORT.
7057 (struct tracepoint_hit_ctx) <type>: New field.
7058 (struct fast_tracepoint_ctx): New.
7059 (memory_barrier): New.
7060 (cmpxchg): New.
7061 (record_tracepoint_error): Update atomically in the IPA.
7062 (clear_inferior_trace_buffer): New.
7063 (about_to_request_buffer_space): New.
7064 (trace_buffer_alloc): Handle GDBserver and inferior simulatenous
7065 updating the same buffer.
7066 (add_tracepoint): Default the tracepoint's type to trap
7067 tracepoint, and orig_size to -1.
7068 (get_trace_state_variable) [IN_PROCESS_AGENT]: Handle allocated
7069 internal variables.
7070 (create_trace_state_variable): New parameter `gdb'. Handle it.
7071 (clear_installed_tracepoints): Clear fast tracepoint jumps.
7072 (cmd_qtdp): Handle fast tracepoints.
7073 (cmd_qtdv): Adjust.
7074 (max_jump_pad_size): New.
7075 (gdb_jump_pad_head): New.
7076 (get_jump_space_head): New.
7077 (claim_jump_space): New.
7078 (sort_tracepoints): New.
7079 (MAX_JUMP_SIZE): New.
7080 (cmd_qtstart): Handle fast tracepoints. Sync tracepoints with the
7081 IPA.
7082 (stop_tracing) [IN_PROCESS_AGENT]: Don't include the tdisconnected
7083 support. Upload fast traceframes, and delete internal IPA
7084 breakpoints.
7085 (stop_tracing_handler): New.
7086 (flush_trace_buffer_handler): New.
7087 (cmd_qtstop): Upload fast tracepoints.
7088 (response_tracepoint): Handle fast tracepoints.
7089 (tracepoint_finished_step): Upload fast traceframes. Set the
7090 tracepoint hit context's tracepoint type.
7091 (handle_tracepoint_bkpts): New.
7092 (tracepoint_was_hit): Set the tracepoint hit context's tracepoint
7093 type. Add comment about fast tracepoints.
7094 (collect_data_at_tracepoint) [IN_PROCESS_AGENT]: Don't access the
7095 non-existing action_str field.
7096 (get_context_regcache): Handle fast tracepoints.
7097 (do_action_at_tracepoint) [!IN_PROCESS_AGENT]: Don't write the PC
7098 to the regcache.
7099 (fast_tracepoint_from_jump_pad_address): New.
7100 (fast_tracepoint_from_ipa_tpoint_address): New.
7101 (collecting_t): New.
7102 (force_unlock_trace_buffer): New.
7103 (fast_tracepoint_collecting): New.
7104 (collecting): New.
7105 (gdb_collect): New.
7106 (write_inferior_data_ptr): New.
7107 (target_tp_heap): New.
7108 (target_malloc): New.
7109 (download_agent_expr): New.
7110 (UALIGN): New.
7111 (download_tracepoints): New.
7112 (download_trace_state_variables): New.
7113 (upload_fast_traceframes): New.
7114 (IPA_FIRST_TRACEFRAME): New.
7115 (IPA_NEXT_TRACEFRAME_1): New.
7116 (IPA_NEXT_TRACEFRAME): New.
7117 [IN_PROCESS_AGENT]: Include sys/mman.h and fcntl.h.
7118 [IN_PROCESS_AGENT] (gdb_tp_heap_buffer, gdb_jump_pad_buffer)
7119 (gdb_jump_pad_buffer_end): New.
7120 [IN_PROCESS_AGENT] (initialize_tracepoint_ftlib): New.
7121 (initialize_tracepoint): Adjust.
7122 [IN_PROCESS_AGENT]: Allocate the IPA heap, and jump pad scratch
7123 buffer. Initialize the low module.
7124 * utils.c (PREFIX, TOOLNAME): New.
7125 (malloc_failure): Use PREFIX.
7126 (error): In the IPA, an error causes an exit.
7127 (fatal, warning): Use PREFIX.
7128 (internal_error): Use TOOLNAME.
7129 (NUMCELLS): Increase to 10.
7130 * configure, config.in: Regenerate.
7131
d149dd1d
PA
71322010-06-01 Pedro Alves <pedro@codesourcery.com>
7133
7134 * server.c (handle_query) <qSupported>: Do two passes over the
7135 qSupported string to avoid nesting strtok.
7136
f6528abd
JK
71372010-05-28 Jan Kratochvil <jan.kratochvil@redhat.com>
7138
7139 * Makefile.in (SFILES): Add $(srcdir)/proc-service.list.
7140 (CDEPS): New.
7141 * configure.ac (RDYNAMIC): New AC_MSG_CHECKING wrapping. Test also
7142 -Wl,--dynamic-list.
7143 * configure: Regenerate.
7144 * proc-service.list: New.
7145
ca2a87a0
JK
71462010-05-28 Jan Kratochvil <jan.kratochvil@redhat.com>
7147
7148 * linux-low.c (linux_core_of_thread): Fix crash on invalid CONTENT.
7149 New comment.
7150
363a6e9f
OS
71512010-05-26 Ozkan Sezer <sezeroz@gmail.com>
7152
7153 * gdbreplay.c (remote_open): Check error return from socket() call by
7154 its equality to -1 not by it being negative.
7155 * remote-utils.c (remote_open): Likewise.
7156
d23b6cb1
PA
71572010-05-23 Pedro Alves <pedro@codesourcery.com>
7158
7159 * config.h: Regenerate.
7160
28d3cf85
MK
71612010-05-19 Maxim Kuvyrkov <maxim@codesourcery.com>
7162
7163 * linux-m68k-low.c (ps_get_thread_area): Don't define if kernel
7164 doesn't provide PTRACE_GET_THREAD_AREA.
7165
fea36a59
MK
71662010-05-19 Maxim Kuvyrkov <maxim@codesourcery.com>
7167
7168 * linux-m68k-low.c: Include <asm/ptrace.h>
7169 (ps_get_thread_area): Implement.
7170
24b066ba
DE
71712010-05-03 Doug Evans <dje@google.com>
7172
7173 * event-loop.c (struct callback_event): New struct.
7174 (callback_list): New global.
7175 (append_callback_event, delete_callback_event): New functions.
7176 (process_callback): New function.
7177 (start_event_loop): Call it.
7178 * remote-utils.c (NOT_SCHEDULED): Define.
7179 (readchar_buf, readchar_bufcnt, readchar_bufp): New static globals,
7180 moved out of readchar.
7181 (readchar): Rewrite. Call reschedule before returning.
7182 (reset_readchar): New function.
7183 (remote_close): Call it.
7184 (process_remaining, reschedule): New functions.
7185 * server.h (callback_handler_func): New typedef.
7186 (append_callback_event, delete_callback_event): Declare.
7187
9836d6ea
PA
71882010-05-03 Pedro Alves <pedro@codesourcery.com>
7189
7190 * proc-service.c (ps_pglobal_lookup): Use
7191 thread_db_look_up_one_symbol.
7192 * remote-utils.c (look_up_one_symbol): Add new `may_ask_gdb'
7193 parameter. Use it instead of all_symbols_looked_up.
7194 * server.h (struct process_info) <all_symbols_looked_up>: Delete
7195 field.
7196 (all_symbols_looked_up): Don't declare.
7197 (look_up_one_symbol): Add new `may_ask_gdb' parameter.
7198 * thread-db.c (struct thread_db) <all_symbols_looked_up>: New
7199 field.
7200 (thread_db_look_up_symbols): Adjust call to look_up_one_symbol.
7201 Set all_symbols_looked_up here.
7202 (thread_db_look_up_one_symbol): New.
7203 (thread_db_get_tls_address): Adjust.
7204 (thread_db_load_search, try_thread_db_load_1): Always allocate the
7205 thread_db object on the heap, and tentatively set it in the
7206 process structure.
7207 (thread_db_init): Don't set all_symbols_looked_up here.
7208 * linux-low.h (thread_db_look_up_one_symbol): Declare.
7209
7984d532
PA
72102010-05-03 Pedro Alves <pedro@codesourcery.com>
7211
7212 * linux-low.c (linux_kill, linux_detach): Adjust.
7213 (status_pending_p_callback): Remove redundant statement. Check
7214 for !TARGET_WAITIKIND_IGNORE, instead of
7215 TARGET_WAITKIND_STOPPED.
7216 (handle_tracepoints): Make sure LWP is locked. Adjust.
7217 (linux_wait_for_event_1): Adjust.
7218 (linux_cancel_breakpoints): New.
7219 (unsuspend_one_lwp): New.
7220 (unsuspend_all_lwps): New.
7221 (linux_wait_1): If finishing a step-over, unsuspend all lwps.
7222 (send_sigstop_callback): Change return type to int, add new
7223 `except' parameter and handle it.
7224 (suspend_and_send_sigstop_callback): New.
7225 (stop_all_lwps): Add new `suspend' and `expect' parameters, and
7226 pass them down. If SUSPEND, also increment the lwp's suspend
7227 count.
7228 (linux_resume_one_lwp): Add notice about resuming a suspended LWP.
7229 (need_step_over_p): Don't consider suspended LWPs.
7230 (start_step_over): Adjust.
7231 (proceed_one_lwp): Change return type to int, add new `except'
7232 parameter and handle it.
7233 (unsuspend_and_proceed_one_lwp): New.
7234 (proceed_all_lwps): Use find_inferior instead of
7235 for_each_inferior.
7236 (unstop_all_lwps): Add `unsuspend' parameter. If UNSUSPEND, them
7237 also decrement the suspend count of LWPs. Pass `except' down,
7238 instead of hacking its suspend count.
7239 (linux_pause_all): Add `freeze' parameter. Adjust.
7240 (linux_unpause_all): New.
7241 (linux_target_ops): Install linux_unpause_all.
7242 * server.c (handle_status): Adjust.
7243 * target.h (struct target_ops): New fields `unpause_all' and
7244 `cancel_breakpoints'. Add new parameter to `pause_all'.
7245 (pause_all): Add new `freeze' parameter.
7246 (unpause_all): New.
7247 (cancel_breakpoints): New.
7248 * tracepoint.c (clear_installed_tracepoints): Pause threads, and
7249 cancel breakpoints.
7250 (cmd_qtstart): Pause threads.
7251 (stop_tracing): Pause threads, and cancel breakpoints.
7252 * win32-low.c (win32_target_ops): Adjust.
7253
e471f25b
PA
72542010-05-03 Pedro Alves <pedro@codesourcery.com>
7255
7256 * linux-low.c (linux_wait_for_event_1): Move passing the signal to
7257 the inferior right away from here...
7258 (linux_wait_1): ... to here, and adjust to check the thread's
7259 last_resume_kind instead of the lwp's step or stop_expected flags.
7260
1915ef4f
PA
72612010-05-02 Pedro Alves <pedro@codesourcery.com>
7262
7263 * README: Use consistent `GDB' and `GDBserver' spellings.
7264
f9e39928
PA
72652010-05-02 Pedro Alves <pedro@codesourcery.com>
7266
7267 * linux-low.c (linux_kill_one_lwp): Assume the lwp is stopped.
7268 (linux_kill): Stop all lwps here. Don't delete the main lwp here.
7269 (linux_detach_one_lwp): Assume the lwp is stopped.
7270 (any_thread_of): Delete.
7271 (linux_detach): Stop all lwps here. Don't blindly delete all
7272 breakpoints.
7273 (delete_lwp_callback): New.
7274 (linux_mourn): Delete all lwps of the process that is gone.
7275 (linux_wait_1): Don't delete the last lwp of the process here.
7276 * mem-break.h (mark_breakpoints_out): Declare.
7277 * mem-break.c (mark_breakpoints_out): New.
7278 (free_all_breakpoints): Use it.
7279 * server.c (handle_target_event): If the process is gone, mark
7280 breakpoints out.
7281 * thread-db.c (struct thread_db) <create_bp>: New field.
7282 (thread_db_enable_reporting): Fix prototype. Store a thread event
7283 breakpoint reference in the thread_db struct.
7284 (thread_db_load_search): Clear the thread_db object.
7285 (try_thread_db_load_1): Ditto.
7286 (switch_to_process): New.
7287 (disable_thread_event_reporting): Use it.
7288 (remove_thread_event_breakpoints): New.
7289 (thread_db_detach, thread_db_mourn): Use it.
7290
1e7fc18c
PA
72912010-05-01 Pedro Alves <pedro@codesourcery.com>
7292
7293 * linux-low.c (linux_enable_event_reporting): New.
7294 (linux_wait_for_event_1, handle_extended_wait): Use it.
7295
02fc4de7
PA
72962010-04-30 Pedro Alves <pedro@codesourcery.com>
7297
7298 * linux-low.c (linux_kill_one_lwp, linux_kill)
7299 (linux_detach_one_lwp): Adjust to send_sigstop interface change.
7300 (send_sigstop): Take an lwp_info as parameter instead. Queue a
7301 SIGSTOP even if the LWP is stopped.
7302 (send_sigstop_callback): New.
7303 (stop_all_lwps): Use send_sigstop_callback instead.
7304 (linux_resume_one_thread): Adjust.
7305 (proceed_one_lwp): Still proceed an LWP that the client has
7306 requested to stop, if we haven't reported it as stopped yet. Make
7307 sure that LWPs the client want stopped, have a pending SIGSTOP.
7308
bc3b5632
DE
73092010-04-26 Doug Evans <dje@google.com>
7310
ae1ada35
DE
7311 * server.c (handle_general_set): Make static.
7312
bc3b5632
DE
7313 * remote-utils.c (putpkt_binary_1): Call readchar instead of read.
7314 Print received char after testing for error/eof instead of before.
7315 (input_interrupt): Tweak comment.
7316
65730243
DE
73172010-04-23 Doug Evans <dje@google.com>
7318
7319 * server.c (start_inferior): Print inferior argv if --debug.
7320
a8ae7dc0
AR
73212010-04-21 Aleksandar Ristovski <aristovski@qnx.com>
7322
7323 * Makefile.in (nto_low_h nto-low.o nto-x86-low.o): New dependency lists.
7324 * nto-x86-low.c: Include server.h
7325
1c07cc19
PM
73262010-04-20 Pierre Muller <muller@ics.u-strasbg.fr>
7327
7328 * win32-i386-low.c: Use __x86_64__ macro instead of __x86_64 to
7329 be consistent with other sources of this directory.
7330 (init_registers_amd64): Correct name of source file of this function
7331 in the comment.
7332
e0a61e09
PM
73332010-04-19 Pierre Muller <muller@ics.u-strasbg.fr>
7334
7335 * configure.srv (x86_64-*-mingw*): New configuration for Windows
7336 64-bit executables.
7337
54709339
PM
73382010-04-19 Pierre Muller <muller@ics.u-strasbg.fr>
7339
7340 * win32-i386-low.c: Add 64-bit support.
7341 (CONTEXT_EXTENDED_REGISTERS): Set macro to zero if not exisiting.
7342 (init_registers_amd64): Declare.
7343 (mappings): Add 64-bit version of array.
7344 (init_windows_x86): New function.
7345 (the_low_target): Change init_arch field to init_windows_x86.
7346
e8f0053d
PM
73472010-04-19 Pierre Muller <muller@ics.u-strasbg.fr>
7348
7349 * win32-low.c: Adapt to support also 64-bit architecture.
7350 (child_xfer_memory): Use uintptr_t type for local variable `addr'.
7351 (get_image_name): Use SIZE_T type for local variable `done'.
7352 (psapi_get_dll_name): Use LPVOID type for parameter `BaseAddress'.
7353 (toolhelp_get_dll_name): Idem.
7354 (handle_load_dll): Use CORE_ADDR type for local variable `load_addr'.
7355 Use uintptr_t typecast to avoid warning.
7356 (handle_unload_dll): Use uintptr_t typecast to avoid warning.
7357 (handle_exception): Use phex_nz to avoid warning.
7358 (win32_wait): Remove unused local variable `process'.
7359
c481e77e
PM
73602010-04-19 Pierre Muller <muller@ics.u-strasbg.fr>
7361
7362 * configure.srv (srv_amd64_regobj): Replace `x86-64-avx.o' by
7363 `amd64-avx.o'.
7364
12ea4b69
PM
73652010-04-17 Pierre Muller <muller@ics.u-strasbg.fr>
7366
7367 * configure.ac: Use `ws2_32' library for srv_mingw.
7368 * configure: Regenerate.
7369 * gdbreplay.c: Include winsock2.h instead of winsock.h.
7370 * remote-utils.c: Likewise.
7371
f6d1620c
L
73722010-04-17 H.J. Lu <hongjiu.lu@intel.com>
7373
7374 * linux-x86-low.c (xmltarget_amd64_linux_no_xml): Define only
7375 if __x86_64__ is defined.
7376
8e642873
PM
73772010-04-16 Pierre Muller <muller@ics.u-strasbg.fr>
7378
7379 * configure: Regenerate.
7380
711e434b
PM
73812010-04-16 Pierre Muller <muller@ics.u-strasbg.fr>
7382
7383 * server.c (handle_query): Handle 'qGetTIBAddr' query.
7384 * target.h (target_ops): New get_tib_address field.
7385 * win32-low.h (win32_thread_info): Add thread_local_base field.
7386 * win32-low.c (child_add_thread): Add tlb argument.
7387 Set thread_local_base field to TLB.
7388 (get_child_debug_event): Adapt to child_add_thread change.
7389 (win32_get_tib_address): New function.
7390 (win32_target_ops): Set get_tib_address field to
7391 win32_get_tib_address.
7392 * linux-low.c (linux_target_ops): Set get_tib_address field to NULL.
7393
505106cd
PA
73942010-04-12 Pedro Alves <pedro@codesourcery.com>
7395
505106cd
PA
7396 * linux-low.c (linux_mourn): Also remove the process.
7397 * server.c (handle_target_event): Don't remove the process here.
7398 * nto-low.c (nto_mourn): New.
7399 (nto_target_ops): Install it.
7400 * spu-low.c (spu_mourn): New.
7401 (spu_target_ops): Install it.
7402 * win32-low.c (win32_mourn): New.
7403 (win32_target_ops): Install it.
7404
e8470a06
PA
74052010-04-12 Pedro Alves <pedro@codesourcery.com>
7406
7407 * server.h (buffer_xml_printf): Remove redundant `;'.
7408
45ba0d02
PA
74092010-04-12 Pedro Alves <pedro@codesourcery.com>
7410
7411 * regcache.c (set_register_cache): Invalidate regcaches before
7412 changing the register cache layout.
7413 (regcache_invalidate_one): Allow a NULL regcache.
7414 * linux-x86-low.c (x86_linux_update_xmltarget): Invalidate
7415 regcaches before changing the register cache layout or the target
7416 regsets.
7417
59e04013
L
74182010-04-12 H.J. Lu <hongjiu.lu@intel.com>
7419
7420 * linux-x86-low.c (x86_linux_update_xmltarget): Avoid unused
7421 variable warning on Linux/x86-64.
7422
8336d594
PA
74232010-04-11 Pedro Alves <pedro@codesourcery.com>
7424
7425 GDBserver disconnected tracing support.
7426
7427 * linux-low.c (linux_remove_process): Delete.
7428 (add_lwp): Don't set last_resume_kind here.
7429 (linux_kill): Use `mourn'.
7430 (linux_detach): Use `thread_db_detach', and `mourn'.
7431 (linux_mourn): New.
7432 (linux_attach_lwp_1): Adjust comment.
7433 (linux_attach): last_resume_kind moved the thread_info; adjust.
7434 (status_pending_p_callback): Adjust.
7435 (linux_wait_for_event_1): Adjust.
7436 (count_events_callback, select_singlestep_lwp_callback)
7437 (select_event_lwp_callback, cancel_breakpoints_callback)
7438 (db_wants_lwp_stopped, linux_wait_1, need_step_over_p)
7439 (proceed_one_lwp): Adjust.
7440 (linux_async): Add debug output.
7441 (linux_thread_stopped): New.
7442 (linux_pause_all): New.
7443 (linux_target_ops): Install linux_mourn, linux_thread_stopped and
7444 linux_pause_all.
7445 * linux-low.h (struct lwp_info): Delete last_resume_kind field.
7446 (thread_db_free): Delete declaration.
7447 (thread_db_detach, thread_db_mourn): Declare.
7448 * thread-db.c (thread_db_init): Use thread_db_mourn.
7449 (thread_db_free): Delete, split in two.
7450 (disable_thread_event_reporting): New.
7451 (thread_db_detach): New.
7452 (thread_db_mourn): New.
7453
7454 * server.h (struct thread_info) <last_resume_kind>: New field.
7455 <attached>: Add comment.
7456 <gdb_detached>: New field.
7457 (handler_func): Change return type to int.
7458 (handle_serial_event, handle_target_event): Ditto.
7459 (gdb_connected): Declare.
7460 (tracing): Delete.
7461 (disconnected_tracing): Declare.
7462 (stop_tracing): Declare.
7463
7464 * server.c (handle_query) <qSupported>: Report support for
7465 disconnected tracing.
7466 (queue_stop_reply_callback): Account for running threads.
7467 (gdb_wants_thread_stopped): New.
7468 (gdb_wants_all_threads_stopped): New.
7469 (gdb_reattached_process): New.
7470 (handle_status): Clear the `gdb_detached' flag of all processes.
7471 In all-stop, stop all threads.
7472 (main): Be sure to leave tfind mode. Handle disconnected tracing.
7473 (process_serial_event): If the remote connection breaks, or if an
7474 exit was forced with "monitor exit", force an event loop exit.
7475 Handle disconnected tracing on detach.
7476 (handle_serial_event): Adjust.
7477 (handle_target_event): If GDB isn't connected, forward events back
7478 to the inferior, unless the last process exited, in which case,
7479 exit gdbserver. Adjust interface.
7480
7481 * remote-utils.c (remote_open): Don't block in accept. Instead
7482 register an event loop source on the listen socket file
7483 descriptor. Refactor bits into ...
7484 (listen_desc): ... this new global.
7485 (gdb_connected): ... this new function.
7486 (enable_async_notification): ... this new function.
7487 (handle_accept_event): ... this new function.
7488 (remote_close): Clear remote_desc.
7489
7490 * inferiors.c (add_thread): Set the new thread's last_resume_kind.
7491
7492 * target.h (struct target_ops) <mourn, thread_stopped, pause_all>:
7493 New fields.
7494 (mourn_inferior): Define.
7495 (target_process_qsupported): Avoid the dangling else problem.
7496 (thread_stopped): Define.
7497 (pause_all): Define.
7498 (target_waitstatus_to_string): Declare.
7499 * target.c (target_waitstatus_to_string): New.
7500
7501 * tracepoint.c (tracing): Make extern.
7502 (disconnected_tracing): New.
7503 (stop_tracing): Make extern. Handle tracing stops due to GDB
7504 disconnecting.
7505 (cmd_qtdisconnected): New.
7506 (cmd_qtstatus): Report disconnected tracing status in trace reply.
7507 (handle_tracepoint_general_set): Handle QTDisconnected.
7508
7509 * event-loop.c (event_handler_func): Change return type to int.
7510 (process_event): Bail out if the event handler wants the event
7511 loop to stop.
7512 (handle_file_event): Ditto.
7513 (start_event_loop): Bail out if the event handler wants the event
7514 loop to stop.
7515
7516 * nto-low.c (nto_target_ops): Adjust.
7517 * spu-low.c (spu_wait): Don't remove the process here.
7518 (spu_target_ops): Adjust.
7519 * win32-low.c (win32_wait): Don't remove the process here.
7520 (win32_target_ops): Adjust.
7521
5d267c4c
PA
75222010-04-11 Pedro Alves <pedro@codesourcery.com>
7523
7524 * regcache.c (realloc_register_cache): Invalidate inferior's
7525 regcache before recreating it.
7526
623ccd72
PA
75272010-04-09 Pedro Alves <pedro@codesourcery.com>
7528
7529 * tracepoint.c (cmd_qtstatus): Report trace buffer circularity.
7530
219f2f23
PA
75312010-04-09 Stan Shebs <stan@codesourcery.com>
7532 Pedro Alves <pedro@codesourcery.com>
7533
7534 * server.h (LONGEST): New.
7535 (struct thread_info) <while_stepping>: New field.
7536 (unpack_varlen_hex, xrealloc, pulongest, plongest, phex_nz):
7537 Declare.
7538 (initialize_tracepoint, handle_tracepoint_general_set)
7539 (handle_tracepoint_query, tracepoint_finished_step)
7540 (tracepoint_was_hit, release_while_stepping_state_list):
7541 (current_traceframe): Declare.
7542 * server.c (handle_general_set): Handle tracepoint packets.
7543 (read_memory): New.
7544 (write_memory): New.
7545 (handle_search_memory_1): Use read_memory.
7546 (handle_query): Report support for conditional tracepoints, trace
7547 state variables, and tracepoint sources. Handle tracepoint
7548 queries.
7549 (main): Initialize the tracepoints module.
7550 (process_serial_event): Handle traceframe reads/writes.
7551
7552 * linux-low.c (handle_tracepoints): New.
7553 (linux_wait_1): Call it.
7554 (linux_resume_one_lwp): Handle while-stepping.
7555 (linux_supports_tracepoints, linux_read_pc, linux_write_pc): New.
7556 (linux_target_ops): Install them.
7557 * linux-low.h (struct linux_target_ops) <supports_tracepoints>:
7558 New field.
7559 * linux-x86-low.c (x86_supports_tracepoints): New.
7560 (the_low_target). Install it.
7561
7562 * mem-break.h (delete_breakpoint): Declare.
7563 * mem-break.c (delete_breakpoint): Make external.
7564
7565 * target.h (struct target_ops): Add `supports_tracepoints',
7566 `read_pc', and `write_pc' fields.
7567 (target_supports_tracepoints): Define.
7568 * utils.c (xrealloc, decimal2str, pulongest, plongest, thirty_two)
7569 (phex_nz): New.
7570
7571 * regcache.h (struct regcache) <registers_owned>: New field.
7572 (init_register_cache, regcache_cpy): Declare.
7573 (regcache_read_pc, regcache_write_pc): Declare.
7574 (register_cache_size): Declare.
7575 (supply_regblock): Declare.
7576 * regcache.c (init_register_cache): New.
7577 (new_register_cache): Use it.
7578 (regcache_cpy): New.
7579 (register_cache_size): New.
7580 (supply_regblock): New.
7581 (regcache_read_pc, regcache_write_pc): New.
889bf7c5 7582
219f2f23
PA
7583 * tracepoint.c: New.
7584
7585 * Makefile.in (OBS): Add tracepoint.o.
7586 (tracepoint.o): New rule.
7587
3a13a53b
L
75882010-04-08 H.J. Lu <hongjiu.lu@intel.com>
7589
7590 * Makefile.in (clean): Also remove i386-mmx.c i386-mmx-linux.c.
7591 (i386-mmx.o): New.
7592 (i386-mmx.c): Likewise.
7593 (i386-mmx-linux.o): Likewise.
7594 (i386-mmx-linux.c): Likewise.
7595
7596 * configure.srv (srv_i386_regobj): Add i386-mmx.o.
7597 (srv_i386_linux_regobj): Add i386-mmx-linux.o.
7598 (srv_i386_xmlfiles): Add i386/i386-mmx.xml.
7599 (srv_i386_linux_xmlfiles): Add i386/i386-mmx-linux.xml.
7600
7601 * linux-x86-low.c (init_registers_i386_mmx_linux): New.
7602 (x86_linux_update_xmltarget): Call init_registers_i386_mmx_linux
7603 and return if ptrace PTRACE_GETFPXREGS failed in 32bit.
7604
1570b33e
L
76052010-04-07 H.J. Lu <hongjiu.lu@intel.com>
7606
7607 * Makefile.in (clean): Updated.
7608 (i386-avx.o): New.
7609 (i386-avx.c): Likewise.
7610 (i386-avx-linux.o): Likewise.
7611 (i386-avx-linux.c): Likewise.
7612 (amd64-avx.o): Likewise.
7613 (amd64-avx.c): Likewise.
7614 (amd64-avx-linux.o): Likewise.
7615 (amd64-avx-linux.c): Likewise.
7616
7617 * configure.srv (srv_i386_regobj): Add i386-avx.o.
7618 (srv_i386_linux_regobj): Add i386-avx-linux.o.
7619 (srv_amd64_regobj): Add amd64-avx.o.
7620 (srv_amd64_linux_regobj): Add amd64-avx-linux.o.
7621 (srv_i386_32bit_xmlfiles): Add i386/32bit-avx.xml.
7622 (srv_i386_64bit_xmlfiles): Add i386/64bit-avx.xml.
7623 (srv_i386_xmlfiles): Add i386/i386-avx.xml.
7624 (srv_amd64_xmlfiles): Add i386/amd64-avx.xml.
7625 (srv_i386_linux_xmlfiles): Add i386/i386-avx-linux.xml.
7626 (srv_amd64_linux_xmlfiles): Add i386/amd64-avx-linux.xml.
7627
7628 * i387-fp.c: Include "i386-xstate.h".
7629 (i387_xsave): New.
7630 (i387_cache_to_xsave): Likewise.
7631 (i387_xsave_to_cache): Likewise.
7632 (x86_xcr0): Likewise.
7633
7634 * i387-fp.h (i387_cache_to_xsave): Likewise.
7635 (i387_xsave_to_cache): Likewise.
7636 (x86_xcr0): Likewise.
7637
7638 * linux-arm-low.c (target_regsets): Initialize nt_type to 0.
7639 * linux-crisv32-low.c (target_regsets): Likewise.
7640 * linux-m68k-low.c (target_regsets): Likewise.
7641 * linux-mips-low.c (target_regsets): Likewise.
7642 * linux-ppc-low.c (target_regsets): Likewise.
7643 * linux-s390-low.c (target_regsets): Likewise.
7644 * linux-sh-low.c (target_regsets): Likewise.
7645 * linux-sparc-low.c (target_regsets): Likewise.
7646 * linux-xtensa-low.c (target_regsets): Likewise.
7647
7648 * linux-low.c: Include <sys/uio.h>.
7649 (regsets_fetch_inferior_registers): Support nt_type.
7650 (regsets_store_inferior_registers): Likewise.
7651 (linux_process_qsupported): New.
7652 (linux_target_ops): Add linux_process_qsupported.
7653
7654 * linux-low.h (regset_info): Add nt_type.
7655 (linux_target_ops): Add process_qsupported.
7656
7657 * linux-x86-low.c: Include "i386-xstate.h", "elf/common.h"
7658 and <sys/uio.h>.
7659 (init_registers_i386_avx_linux): New.
7660 (init_registers_amd64_avx_linux): Likewise.
7661 (xmltarget_i386_linux_no_xml): Likewise.
7662 (xmltarget_amd64_linux_no_xml): Likewise.
7663 (PTRACE_GETREGSET): Likewise.
7664 (PTRACE_SETREGSET): Likewise.
7665 (x86_fill_xstateregset): Likewise.
7666 (x86_store_xstateregset): Likewise.
7667 (use_xml): Likewise.
7668 (x86_linux_update_xmltarget): Likewise.
7669 (x86_linux_process_qsupported): Likewise.
7670 (target_regsets): Add NT_X86_XSTATE entry and Initialize nt_type.
7671 (x86_arch_setup): Don't call init_registers_amd64_linux nor
7672 init_registers_i386_linux here. Call
7673 x86_linux_update_xmltarget.
7674 (the_low_target): Add x86_linux_process_qsupported.
7675
7676 * server.c (handle_query): Call target_process_qsupported.
7677
7678 * target.h (target_ops): Add process_qsupported.
7679 (target_process_qsupported): New.
7680
fc7238bb
PA
76812010-04-03 Pedro Alves <pedro@codesourcery.com>
7682
7683 * inferiors.c (add_thread): Set last_status kind to
7684 TARGET_WAITKIND_IGNORE.
7685 * linux-low.c (cancel_breakpoint): Remove unnecessary regcache
7686 fetch. Use ptid_of. Avoid unnecessary get_lwp_thread calls.
7687 (linux_wait_1): Move `thread' local definition to block that uses
7688 it. Don't NULL initialize `event_child'.
7689 (linux_resume_one_thread): Avoid unnecessary get_lwp_thread calls.
7690 Alway set the thread's last_status to TARGET_WAITKIND_IGNORE.
7691 * linux-x86-low.c (x86_breakpoint_at): Read raw memory.
7692
bdabb078
PA
76932010-04-01 Pedro Alves <pedro@codesourcery.com>
7694
7695 * linux-low.c (get_stop_pc): Don't adjust the PC if stopped with
7696 an extended waitstatus, or by a watchpoint.
7697 (cancel_breakpoints_callback): Don't cancel a breakpoint if the
7698 thread was stepping or has been stopped by a watchpoint.
7699
d3bbe7a0
PA
77002010-04-01 Pedro Alves <pedro@codesourcery.com>
7701
7702 * mem-break.c (struct raw_breakpoint): New field shlib_disabled.
7703 (set_gdb_breakpoint_at): If GDB is inserting a breakpoint on top
7704 of another, then delete the previous, and validate all
7705 breakpoints.
7706 (validate_inserted_breakpoint): New.
7707 (delete_disabled_breakpoints): New.
7708 (validate_breakpoints): New.
7709 (check_mem_read): Validate breakpoints before trusting their
7710 shadow. Delete disabled breakpoints.
7711 (check_mem_write): Validate breakpoints before trusting they
7712 should be inserted. Delete disabled breakpoints.
7713 * mem-break.h (validate_breakpoints):
7714 * server.c (handle_query): Validate breakpoints when we see a
7715 qSymbol query.
7716
8b07ae33
PA
77172010-04-01 Pedro Alves <pedro@codesourcery.com>
7718
7719 * linux-low.c (linux_wait_1): Avoid setting need_step_over is
7720 there's a GDB breakpoint at stop_pc. Always report a trap to GDB
7721 if we could tell there's a GDB breakpoint at stop_pc.
7722 (need_step_over_p): Don't do a step over if we find a GDB
7723 breakpoint at the resume PC.
7724
7725 * mem-break.c (struct raw_breakpoint): New.
7726 (enum bkpt_type): New type `gdb_breakpoint'.
7727 (struct breakpoint): Delete the `PC', `old_data' and `inserted'
7728 fields. New field `raw'.
7729 (find_raw_breakpoint_at): New.
7730 (set_raw_breakpoint_at): Handle refcounting. Create a raw
7731 breakpoint instead.
7732 (set_breakpoint_at): Adjust.
7733 (delete_raw_breakpoint): New.
7734 (release_breakpoint): New.
7735 (delete_breakpoint): Rename to...
7736 (delete_breakpoint_1): ... this. Add proc parameter. Use
7737 release_breakpoint. Return ENOENT.
7738 (delete_breakpoint): Reimplement.
7739 (find_breakpoint_at): Delete.
7740 (find_gdb_breakpoint_at): New.
7741 (delete_breakpoint_at): Delete.
7742 (set_gdb_breakpoint_at): New.
7743 (delete_gdb_breakpoint_at): New.
7744 (gdb_breakpoint_here): New.
7745 (set_reinsert_breakpoint): Use release_breakpoint.
7746 (uninsert_breakpoint): Rename to ...
7747 (uninsert_raw_breakpoint): ... this.
7748 (uninsert_breakpoints_at): Adjust to handle raw breakpoints.
7749 (reinsert_raw_breakpoint): Change parameter type to
7750 raw_breakpoint.
7751 (reinsert_breakpoints_at): Adjust to handle raw breakpoints
7752 instead.
7753 (check_breakpoints): Adjust. Use release_breakpoint.
7754 (breakpoint_here): Rewrite using find_raw_breakpoint_at.
7755 (breakpoint_inserted_here): Ditto.
7756 (check_mem_read): Adjust to iterate over raw breakpoints instead.
7757 Don't trust the breakpoint's shadow if it is not inserted.
7758 (check_mem_write): Adjust to iterate over raw breakpoints instead.
7759 (delete_all_breakpoints): Adjust.
7760 (free_all_breakpoints): Mark all breakpoints as uninserted, and
7761 use delete_breakpoint_1.
7762
7763 * mem-break.h (breakpoints_supported): Delete declaration.
7764 (set_gdb_breakpoint_at): Declare.
7765 (gdb_breakpoint_here): Declare.
7766 (delete_breakpoint_at): Delete.
7767 (delete_gdb_breakpoint_at): Declare.
7768
7769 * server.h (struct raw_breakpoint): Forward declare.
7770 (struct process_info): New field `raw_breakpoints'.
7771
7772 * linux-x86-low.c (x86_insert_point, x86_remote_point): Handle Z0
7773 breakpoints.
7774
6bf5e0ba
PA
77752010-03-24 Pedro Alves <pedro@codesourcery.com>
7776
7777 * linux-low.c (status_pending_p_callback): Fix comment.
7778 (linux_wait_for_event_1): Move most of the internal breakpoint
7779 handling from here...
7780 (linux_wait_1): ... to here.
7781 (count_events_callback): New.
7782 (select_singlestep_lwp_callback): New.
7783 (select_event_lwp_callback): New.
7784 (cancel_breakpoints_callback): New.
7785 (select_event_lwp): New.
7786 (linux_wait_1): Simplify internal breakpoint handling. Give equal
7787 priority to all LWPs that have had events that should be reported
7788 to the client. Cancel breakpoints when about to reporting the
7789 event to the client, not while stopping lwps. No longer cancel
7790 finished single-steps here.
7791 (cancel_finished_single_step): Delete.
7792 (cancel_finished_single_steps): Delete.
7793
414a389f
PA
77942010-03-24 Pedro Alves <pedro@codesourcery.com>
7795
7796 * mem-break.c (enum bkpt_type): New.
7797 (struct breakpoint): New field `type'.
7798 (set_breakpoint_at): Change return type to struct breakpoint
7799 pointer. Set type to `other_breakpoint' by default.
7800 (delete_breakpoint): Rewrite, supporting more than one breakpoint
7801 in the breakpoint list.
7802 (delete_reinsert_breakpoints): Only delete reinsert breakpoints.
7803 (reinsert_breakpoint): Rename to ...
7804 (reinsert_raw_breakpoint): ... this.
7805 (reinsert_breakpoints_at): Adjust.
7806 * mem-break.h (struct breakpoint): Declare.
7807 (set_breakpoint_at): Change return type to struct breakpoint
7808 pointer.
7809
2280c721
PA
78102010-03-24 Pedro Alves <pedro@codesourcery.com>
7811
7812 * server.c (handle_query): Assign, not compare.
7813
d50171e4
PA
78142010-03-24 Pedro Alves <pedro@codesourcery.com>
7815
7816 Teach linux gdbserver to step-over-breakpoints.
7817
7818 * linux-low.c (can_hardware_single_step): New.
7819 (supports_breakpoints): New.
7820 (handle_extended_wait): If stopping threads, read the stop pc of
7821 the new cloned LWP.
7822 (get_pc): New.
7823 (get_stop_pc): Add `lwp' parameter. Handle it. Bail out if the
7824 low target doesn't support retrieving the PC.
7825 (add_lwp): Set last_resume_kind to resume_continue.
7826 (linux_attach_lwp_1): Adjust comments. Always set stop_expected.
7827 (linux_attach): Don't clear stop_expected. Set the lwp's
7828 last_resume_kind to resume_stop.
7829 (linux_detach_one_lwp): Don't check for removed breakpoints.
7830 (check_removed_breakpoint): Delete.
7831 (status_pending_p): Rename to ...
7832 (status_pending_p_callback): ... this. Don't check for removed
7833 breakpoints. Don't consider threads that are stopped from GDB's
7834 perspective.
7835 (linux_wait_for_lwp): Always read the stop_pc here.
7836 (cancel_breakpoint): New.
7837 (step_over_bkpt): New global.
7838 (linux_wait_for_event_1): Implement stepping over breakpoints.
7839 (gdb_wants_lwp_stopped): New.
7840 (gdb_wants_all_stopped): New.
7841 (linux_wait_1): Tag threads as gdb-wants-stopped. Cancel finished
7842 single-step traps here. Store the thread's last reported target
7843 wait status.
7844 (send_sigstop): Don't clear stop_expected. Always set it,
7845 instead.
7846 (mark_lwp_dead): Remove reference to pending_is_breakpoint.
7847 (cancel_finished_single_step): New.
7848 (cancel_finished_single_steps): New.
7849 (wait_for_sigstop): Don't cancel finished single-step traps here.
7850 (linux_resume_one_lwp): Don't check for removed breakpoints.
7851 Don't set `step' on non-hardware step archs.
7852 (linux_set_resume_request): Ignore resume_stop requests if already
7853 stopping or stopped. Set the lwp's last_resume_kind.
7854 (resume_status_pending_p): Don't check for removed breakpoints.
7855 (need_step_over_p): New.
7856 (start_step_over): New.
7857 (finish_step_over): New.
7858 (linux_resume_one_thread): Always queue a sigstop for resume_stop
7859 requests. Clear the thread's last reported target waitstatus.
7860 Don't use the `suspended' flag. Don't consider pending breakpoints.
7861 (linux_resume): Start a step-over if necessary.
7862 (proceed_one_lwp): New.
7863 (proceed_all_lwps): New.
7864 (unstop_all_lwps): New.
7865 * linux-low.h (struct lwp_info): Rewrite comment for the
7866 `suspended' flag. Add the `stop_pc' field. Delete the
7867 `pending_stop_pc' field. Tweak the `stepping' flag's comment.
7868 Add `'last_resume_kind' and `need_step_over' fields.
7869 * inferiors.c (struct thread_info): Delete, moved elsewhere.
7870 * mem-break.c (struct breakpoint): Delete `reinserting' flag.
7871 Delete `breakpoint_to_reinsert' field. New flag `inserted'.
7872 (set_raw_breakpoint_at): New.
7873 (set_breakpoint_at): Rewrite to use it.
7874 (reinsert_breakpoint_handler): Delete.
7875 (set_reinsert_breakpoint): New.
7876 (reinsert_breakpoint_by_bp): Delete.
7877 (delete_reinsert_breakpoints): New.
7878 (uninsert_breakpoint): Rewrite.
7879 (uninsert_breakpoints_at): New.
7880 (reinsert_breakpoint): Rewrite.
7881 (reinsert_breakpoints_at): New.
7882 (check_breakpoints): Rewrite.
7883 (breakpoint_here): New.
7884 (breakpoint_inserted_here): New.
7885 (check_mem_read): Adjust.
7886 * mem-break.h (breakpoints_supported, breakpoint_here)
7887 (breakpoint_inserted_here, set_reinsert_breakpoint): Declare.
7888 (reinsert_breakpoint_by_bp): Delete declaration.
7889 (delete_reinsert_breakpoints): Declare.
7890 (reinsert_breakpoint): Delete declaration.
7891 (reinsert_breakpoints_at): Declare.
7892 (uninsert_breakpoint): Delete declaration.
7893 (uninsert_breakpoints_at): Declare.
7894 (check_breakpoints): Adjust prototype.
7895 * server.h: Adjust include order.
7896 (struct thread_info): Declare here. Add a `last_status' field.
7897
30ba68cb
MS
78982010-03-23 Michael Snyder <msnyder@vmware.com>
7899
7900 * server.c (crc32): New function.
7901 (handle_query): Add handling for 'qCRC:' request.
7902
b9a881c2
PA
79032010-03-23 Pedro Alves <pedro@codesourcery.com>
7904
7905 * linux-x86-low.c (x86_linux_prepare_to_resume): Clear DR6 if the
7906 lwp had been stopped by a watchpoint.
7907
e92d13d5
PA
79082010-03-16 Pedro Alves <pedro@codesourcery.com>
7909
7910 * server.h (internal_error): Declare.
7911 (gdb_assert, ASSERT_FUNCTION, gdb_assert_fail): Define.
7912 * utils.c (internal_error): New function.
7913
64daa791
AS
79142010-03-15 Andreas Schwab <schwab@redhat.com>
7915
7916 * configure.srv: Fix typo setting srv_regobj.
7917
f52cd8cd
PA
79182010-03-15 Pedro Alves <pedro@codesourcery.com>
7919
7920 * linux-low.c (fetch_register): Avoid passing a non string literal
7921 format to `error'.
7922 (usr_store_inferior_registers): Ditto.
7923
93ae6fdc
PA
79242010-03-14 Pedro Alves <pedro@codesourcery.com>
7925
7926 * linux-low.c (linux_write_memory): Bail out early if peeking
7927 memory failed.
7928
c3adc08c
PA
79292010-03-14 Pedro Alves <pedro@codesourcery.com>
7930
7931 * linux-low.h (struct lwp_info): New fields
7932 `stopped_by_watchpoint' and `stopped_data_address'.
7933 * linux-low.c (linux_wait_for_lwp): Check for watchpoint triggers
7934 here, and cache them in the lwp object.
7935 (wait_for_sigstop): Check stopped_by_watchpoint lwp field
7936 directly.
7937 (linux_resume_one_lwp): Clear the lwp's stopped_by_watchpoint
7938 field.
7939 (linux_stopped_by_watchpoint): Rewrite.
7940 (linux_stopped_data_address): Rewrite.
7941
bce522a2
PA
79422010-03-06 Simo Melenius <simo.melenius@iki.fi>
7943
7944 * linux-low.c (linux_wait_for_lwp): Fetch the regcache after
7945 switching the current inferior, not before.
7946
90884b2b
L
79472010-03-01 H.J. Lu <hongjiu.lu@intel.com>
7948
7949 * Makefile.in (clean): Replace reg-i386.c, reg-x86-64.c,
7950 reg-i386-linux.c and reg-x86-64-linux.c with i386.c, amd64.c,
7951 i386-linux.c and amd64-linux.c.
7952 (reg-i386.o): Removed.
7953 (reg-i386.c): Likewise.
7954 (reg-i386-linux.o): Likewise.
7955 (reg-i386-linux.c): Likewise.
7956 (reg-x86-64.o): Likewise.
7957 (reg-x86-64.c): Likewise.
7958 (reg-x86-64-linux.o): Likewise.
7959 (reg-x86-64-linux.c): Likewise.
7960 (i386.o): New.
7961 (i386.c): Likewise.
7962 (i386-linux.o): Likewise.
7963 (i386-linux.c): Likewise.
7964 (amd64.o): Likewise.
7965 (amd64.c): Likewise.
7966 (amd64-linux.o): Likewise.
7967 (amd64-linux.c): Likewise.
7968
7969 * configure.srv (srv_i386_regobj): New.
7970 (srv_i386_linux_regobj): Likewise.
7971 (srv_amd64_regobj): Likewise.
7972 (srv_amd64_linux_regobj): Likewise.
7973 (srv_i386_32bit_xmlfiles): Likewise.
7974 (srv_i386_64bit_xmlfiles): Likewise.
7975 (srv_i386_xmlfiles): Likewise.
7976 (srv_amd64_xmlfiles): Likewise.
7977 (srv_i386_linux_xmlfiles): Likewise.
7978 (srv_amd64_linux_xmlfiles): Likewise.
7979 (i[34567]86-*-cygwin*): Set srv_regobj to $srv_i386_regobj. Set
7980 srv_xmlfiles to $srv_i386_xmlfiles.
7981 (i[34567]86-*-mingw32ce*): Likewise.
7982 (i[34567]86-*-mingw*): Likewise.
7983 (i[34567]86-*-nto*): Likewise.
7984 (i[34567]86-*-linux*): Set srv_regobj to $srv_i386_linux_regobj
7985 and $srv_amd64_linux_regobj. Set srv_xmlfiles to
7986 $srv_i386_linux_xmlfiles and $srv_amd64_linux_xmlfiles.
7987 (x86_64-*-linux*): Likewise.
7988
7989 * linux-x86-low.c (init_registers_x86_64_linux): Removed.
7990 (init_registers_amd64_linux): New.
7991 (x86_arch_setup): Replace init_registers_x86_64_linux with
7992 init_registers_amd64_linux.
7993
193f13e6
MK
79942010-02-23 Maxim Kuvyrkov <maxim@codesourcery.com>
7995
7996 * configure.ac: Check for libdl. If it is not available link against
7997 static libthread_db.
7998 * configure: Regenerate.
7999
85d721b8
PA
80002010-02-22 Pedro Alves <pedro@codesourcery.com>
8001
8002 PR9605
8003
8004 * i386-low.c (i386_length_and_rw_bits): Throw a fatal error if
8005 handing a read watchpoint.
8006 (i386_low_insert_watchpoint): Read watchpoints aren't supported.
8007
6076632b
DE
80082010-02-12 Doug Evans <dje@google.com>
8009
8010 * linux-low.c (linux_supports_tracefork_flag): Document.
8011 (linux_look_up_symbols): Add comment.
8012
3327ccf7
L
80132010-02-03 H.J. Lu <hongjiu.lu@intel.com>
8014
8015 * regcache.c (supply_register): Clear regcache if buf is NULL.
8016
0718675c 80172010-02-02 Nicolas Roche <roche@sourceware.org>
3327ccf7 8018 Joel Brobecker <brobecker@adacore.com>
0718675c
JB
8019
8020 * inferiors.c (find_inferior): Add function documentation.
8021 (unloaded_dll): Handle the case where the unloaded dll has not
8022 been previously registered in the dll list.
8023
177321bd
DJ
80242010-02-01 Daniel Jacobowitz <dan@codesourcery.com>
8025
8026 * linux-arm-low.c (thumb_breakpoint_len): Delete.
8027 (thumb2_breakpoint): New.
8028 (arm_breakpoint_at): Check for Thumb-2 breakpoints.
8029
2b009048
DJ
80302010-01-29 Daniel Jacobowitz <dan@codesourcery.com>
8031
8032 * linux-low.c (get_stop_pc): Check for SIGTRAP.
8033 (linux_wait_for_event_1): Handle SIGILL and SIGSEGV as possible
8034 breakpoints.
8035
3be029c7
PA
80362010-01-21 Pedro Alves <pedro@codesourcery.com>
8037
8038 * linux-ppc-low.c (ppc_arch_setup): Adjust to regcache changes.
8039
18f5de3b
JK
80402010-01-21 Jan Kratochvil <jan.kratochvil@redhat.com>
8041
8042 * linux-s390-low.c (s390_collect_ptrace_register)
8043 (s390_supply_ptrace_register): Adjust it for the new regcache parameter.
8044
3743bb4f
DE
80452010-01-21 Doug Evans <dje@google.com>
8046
14ce3065
DE
8047 * linux-low.c (PTRACE_ARG3_TYPE): Change from long to void*.
8048 (PTRACE_ARG4_TYPE): New macro.
8049 (handle_extended_wait): Cast ptrace arg4 to PTRACE_ARG4_TYPE.
8050 (linux_wait_for_event_1, linux_resume_one_lwp): Ditto.
8051 (fetch_register): Cast to uintptr_t before casting to PTRACE_ARG3_TYPE.
8052 (usr_store_inferior_registers): Ditto.
8053 (linux_read_memory, linux_write_memory): Ditto.
8054 (linux_test_for_tracefork): Ditto.
8055
3743bb4f
DE
8056 * linux-arm-low.c: Remove redundant include of gdb_proc_service.h.
8057 Only include elf.h if gdb_proc_service.h didn't include linux/elf.h.
8058
8b315be5
PA
80592010-01-21 Pedro Alves <pedro@codesourcery.com>
8060
8061 * proc-service.c (ps_lgetregs): Don't refetch registers from the
8062 target.
8063
85492558
PA
80642010-01-21 Pedro Alves <pedro@codesourcery.com>
8065
8066 * spu-low.c (spu_fetch_registers, spu_store_registers): Change
8067 prototype to take a regcache. Adjust.
8068
442ea881
PA
80692010-01-20 Pedro Alves <pedro@codesourcery.com>
8070
8071 * regcache.h (struct thread_info): Forward declare.
8072 (struct regcache): New.
8073 (new_register_cache): Adjust prototype.
8074 (get_thread_regcache): Declare.
8075 (free_register_cache): Adjust prototype.
8076 (registers_to_string, registers_from_string): Ditto.
8077 (supply_register, supply_register_by_name, collect_register)
8078 (collect_register_as_string, collect_register_by_name): Ditto.
8079 * regcache.c (struct inferior_regcache_data): Delete.
8080 (get_regcache): Rename to ...
8081 (get_thread_regcache): ... this. Adjust. Switch inferior before
8082 fetching registers.
8083 (regcache_invalidate_one): Adjust.
8084 (regcache_invalidate): Fix prototype.
8085 (new_register_cache): Return the new register cache.
8086 (free_register_cache): Change prototype.
8087 (realloc_register_cache): Adjust.
8088 (registers_to_string): Change prototype to take a regcache. Adjust.
8089 (registers_from_string): Ditto.
8090 (register_data): Ditto.
8091 (supply_register): Ditto.
8092 (supply_register_by_name): Ditto.
8093 (collect_register): Ditto.
8094 (collect_register_as_string): Ditto.
8095 (collect_register_by_name): Ditto.
8096 * server.c (process_serial_event): Adjust.
8097 * linux-low.h (regset_fill_func, regset_store_func): Change
8098 prototype.
8099 (get_pc, set_pc, collect_ptrace_register, supply_ptrace_register):
8100 Change prototype.
8101 * linux-low.c (get_stop_pc): Adjust.
8102 (check_removed_breakpoint): Adjust.
8103 (linux_wait_for_event): Adjust.
8104 (linux_resume_one_lwp): Adjust.
8105 (fetch_register): Add regcache parameter. Adjust.
8106 (usr_store_inferior_registers): Ditto.
8107 (regsets_fetch_inferior_registers): Ditto.
8108 (regsets_store_inferior_registers): Ditto.
8109 (linux_fetch_registers, linux_store_registers): Ditto.
8110 * i387-fp.c (i387_cache_to_fsave): Change prototype to take a
8111 regcache. Adjust.
43aaf8b6
PA
8112 (i387_fsave_to_cache, i387_cache_to_fxsave, i387_fxsave_to_cache):
8113 Ditto.
442ea881
PA
8114 * i387-fp.h (i387_cache_to_fsave, i387_fsave_to_cache): Change
8115 prototype to take a regcache.
8116 (i387_cache_to_fxsave, i387_fxsave_to_cache): Ditto.
8117 * remote-utils.c (convert_ascii_to_int, outreg)
8118 (prepare_resume_reply): Change prototype to take a regcache.
8119 Adjust.
8120 * target.h (struct target_ops) <fetch_registers, store_registers>:
8121 Change prototype to take a regcache.
8122 (fetch_inferior_registers, store_inferior_registers): Change
8123 prototype to take a regcache. Adjust.
8124 * proc-service.c (ps_lgetregs): Adjust.
8125 * linux-x86-low.c (x86_fill_gregset, x86_store_gregset)
8126 (x86_fill_fpregset, x86_store_fpregset, x86_fill_fpxregset)
8127 (x86_store_fpxregset, x86_get_pc, x86_set_pc): Change prototype to
8128 take a regcache. Adjust.
8129 * linux-arm-low.c (arm_fill_gregset, arm_store_gregset)
8130 (arm_fill_wmmxregset, arm_store_wmmxregset, arm_fill_vfpregset)
8131 (arm_store_vfpregset, arm_get_pc, arm_set_pc):
8132 (arm_breakpoint_at): Change prototype to take a regcache. Adjust.
8133 * linux-cris-low.c (cris_get_pc, cris_set_pc)
8134 (cris_cannot_fetch_register):
8135 (cris_breakpoint_at): Change prototype to take a regcache.
8136 Adjust.
8137 * linux-crisv32-low.c (cris_get_pc, cris_set_pc,
8138 cris_reinsert_addr, cris_write_data_breakpoint): Change prototype
8139 to take a regcache. Adjust.
8140 (cris_breakpoint_at, cris_insert_point, cris_remove_point):
8141 Adjust.
8142 * linux-m32r-low.c (m32r_get_pc, m32r_set_pc): Change prototype to
8143 take a regcache. Adjust.
8144 * linux-m68k-low.c (m68k_fill_gregset, m68k_store_gregset)
8145 (m68k_fill_fpregset, m68k_store_fpregset, m68k_get_pc,
8146 (m68k_set_pc): Change prototype to take a regcache. Adjust.
8147 * linux-mips-low.c (mips_get_pc):
8148 (mips_set_pc): Change prototype to take a regcache. Adjust.
8149 (mips_reinsert_addr): Adjust.
8150 (mips_collect_register): Change prototype to take a regcache.
8151 Adjust.
8152 (mips_supply_register):
8153 (mips_collect_register_32bit, mips_supply_register_32bit)
8154 (mips_fill_gregset, mips_store_gregset, mips_fill_fpregset)
8155 (mips_store_fpregset): Ditto.
43aaf8b6
PA
8156 * linux-ppc-low.c (ppc_supply_ptrace_register)
8157 (ppc_supply_ptrace_register): Ditto.
442ea881
PA
8158 (parse_spufs_run): Adjust.
8159 (ppc_get_pc, ppc_set_pc, ppc_fill_gregset, ppc_fill_vsxregset)
8160 (ppc_store_vsxregset, ppc_fill_vrregset, ppc_store_vrregset)
8161 (ppc_fill_evrregset, ppc_store_evrregset): Change prototype to
8162 take a regcache. Adjust.
8163 * linux-s390-low.c (s390_collect_ptrace_register)
8164 (s390_supply_ptrace_register, s390_fill_gregset, s390_get_pc)
8165 (s390_set_pc): Change prototype to take a regcache. Adjust.
8166 (s390_arch_setup): Adjust.
8167 * linux-sh-low.c (sh_get_pc, sh_breakpoint_at)
8168 (sh_fill_gregset): Change prototype to take a regcache. Adjust.
8169 * linux-sparc-low.c (sparc_fill_gregset_to_stack)
8170 (sparc_fill_gregset, sparc_store_gregset_from_stack)
8171 (sparc_store_gregset, sparc_get_pc): Change prototype to take a
8172 regcache. Adjust.
8173 (sparc_breakpoint_at): Adjust.
8174 * linux-xtensa-low.c (xtensa_fill_gregset):
8175 (xtensa_store_gregset):
8176 (xtensa_fill_xtregset, xtensa_store_xtregset, xtensa_get_pc)
8177 (xtensa_set_pc): Change prototype to take a regcache. Adjust.
8178 * nto-low.c (nto_fetch_registers, nto_store_registers): Change
8179 prototype to take a regcache. Adjust.
8180 * win32-arm-low.c (arm_fetch_inferior_register)
8181 (arm_store_inferior_register): Change prototype to take a
8182 regcache. Adjust.
8183 * win32-i386-low.c (i386_fetch_inferior_register)
8184 (i386_store_inferior_register): Change prototype to take a
8185 regcache. Adjust.
8186 * win32-low.c (child_fetch_inferior_registers)
8187 (child_store_inferior_registers): Change prototype to take a
8188 regcache. Adjust.
8189 (win32_wait): Adjust.
8190 (win32_fetch_inferior_registers): Change prototype to take a
8191 regcache. Adjust.
8192 (win32_store_inferior_registers): Adjust.
8193 * win32-low.h (struct win32_target_ops) <fetch_inferior_register,
8194 store_inferior_register>: Change prototype to take a regcache.
8195
60c3d7b0
DE
81962010-01-20 Doug Evans <dje@google.com>
8197
8198 * linux-low.c (linux_create_inferior): Wrap use of __SIGRTMIN in
8199 #ifdef.
8200 (linux_wait_for_event1, linux_init_signals): Ditto.
ec8ebe72 8201 (W_STOPCODE): Provide definition if missing.
60c3d7b0 8202
dc146f7c
VP
82032010-01-13 Vladimir Prus <vladimir@codesourcery.com>
8204
8205 * linux-low.c (linux_core_of_thread): New.
8206 (compare_ints, show_process, list_threads): New.
8207 (linux_qxfer_osdata): Report threads and cores.
8208 (linux_target_op): Register linux_core_of_thread.
8209 * remote-utils.c (prepare_resume_reply): Report the core.
8210 (buffer_xml_printf): Support %d specifier.
8211 * server.c (handle_threads_qxfer_proper, handle_threads_qxfer):
8212 New.
8213 (handle_query): Handle qXfer:threads. Announce availability
8214 thereof.
8215 * target.h (struct target_ops): New field core_of_thread.
8216
7803799a
UW
82172010-01-04 Ulrich Weigand <uweigand@de.ibm.com>
8218
8219 * Makefile.in (clean): Remove new generated files.
8220 (reg-s390.o, reg-s390.c): Remove rules.
8221 (reg-s390x.o, reg-s390x.c): Likewise.
8222 (s390-linux32.o, s390-linux32.c): Add rules.
8223 (s390-linux64.o, s390-linux64.c): Likewise.
8224 (s390x-linux64.o, s390x-linux64.c): Likewise.
8225 * configure.srv (s390*-*-linux*): Update srv_regobj and srv_xmlfiles.
8226 * linux-s390-low.c: Include <elf.h>.
8227 (HWCAP_S390_HIGH_GPRS): Define if undefined.
8228 (init_registers_s390): Remove prototype.
8229 (init_registers_s390x): Likewise.
8230 (init_registers_s390_linux32): Add prototype.
8231 (init_registers_s390_linux64): Likewise.
8232 (init_registers_s390x_linux64): Likewise.
8233 (s390_num_regs_3264): New define.
8234 (s390_regmap_3264): New global variable.
8235 (s390_cannot_fetch_register): Remove obsolete check.
8236 (s390_cannot_store_register): Likewise.
8237 (s390_collect_ptrace_register): Handle upper/lower register halves.
8238 (s390_supply_ptrace_register): Likewise.
8239 (s390_fill_gregset): Update to register number changes.
8240 (s390_get_hwcap): New routine.
8241 (s390_arch_setup): Detect 32-bit process running on 64-bit system.
8242 Install appropriate regmap and register set.
8243
6e7ffa39
JB
82442010-01-01 Joel Brobecker <brobecker@adacore.com>
8245
8246 * server.c (gdbserver_version): Update copyright year to 2010.
8247 * gdbreplay.c (gdbreplay_version): Likewise.
8248
957f3f49
DE
82492009-12-28 Doug Evans <dje@google.com>
8250
8251 * linux-low.c: Delete inclusion of ansidecl.h, elf/common.h,
8252 elf/external.h. Include <elf.h> instead but only if necessary.
8253
ca5c370d
PA
82542009-12-28 Pedro Alves <pedro@codesourcery.com>
8255
8256 * linux-low.c (linux_remove_process): Remove `detaching'
8257 parameter. Don't release/detach from thread_db here.
8258 (linux_kill): Release/detach from thread_db here, ...
8259 (linux_detach): ... and here, before actually detaching.
8260 (linux_wait_1): ... and here, when a process exits.
8261 * thread-db.c (any_thread_of): New.
8262 (thread_db_free): Switch the current inferior to a thread of the
8263 passed in process.
8264
4ee62156
DE
82652009-12-21 Doug Evans <dje@google.com>
8266
d90e6a88
DE
8267 * linux-x86-low.c: Delete outdated comment about Elf32_Phdr.
8268
c5f62d5f
DE
8269 * linux-low.c (kill_lwp): Use __NR_tkill instead of SYS_tkill.
8270 Move definition of tkill_failed to ifdef __NR_tkill to avoid gcc
8271 warning ifndef __NR_tkill. Move setting of errno there too.
8272 Delete unnecessary resetting of errno after syscall.
8273 Minor comment changes to match gdb/linux-nat.c:kill_lwp.
8274
10e86dd7
DE
8275 * configure.ac: Check for dladdr.
8276 * config.in: Regenerate.
8277 * configure: Regenerate.
8278 * thread-db.c (dladdr_to_soname): Only define ifdef HAVE_DLADDR.
8279 (try_thread_db_load): Update.
8280
4ee62156
DE
8281 * linux-low.c (my_waitpid): Delete unnecessary prototype.
8282
00f515da
DE
82832009-12-18 Doug Evans <dje@google.com>
8284
e9464885
DE
8285 * event-loop.c: Include unistd.h if it exists.
8286
07d4f67e
DE
8287 * linux-low.c (my_waitpid): Move definition away from being in
8288 between linux_tracefork_child/linux_test_for_tracefork.
8289
00f515da
DE
8290 * gdb_proc_service.h (psaddr_t): Fix type.
8291 * thread-db.c (thread_db_info.td_thr_tls_get_addr_p): Fix
8292 signature to match glibc.
8293
1de1badb
DE
82942009-12-16 Doug Evans <dje@google.com>
8295
8296 * linux-low.c (linux_read_memory): Fix argument to read.
8297
aeeb81d1
PA
82982009-11-26 Pedro Alves <pedro@codesourcery.com>
8299
8300 * win32-low.c (get_child_debug_event): On EXIT_THREAD_DEBUG_EVENT
8301 events, don't leave current_inferior pointing at null.
8302
10357975
PA
83032009-11-26 Pedro Alves <pedro@codesourcery.com>
8304
8305 * win32-low.c (LOG): Delete.
8306 (OUTMSG): Output to stderr.
8307 (OUTMSG2): Conditionalize on `debug_threads' variable, instead of
8308 on compile time LOG macro.
8309 (win32_wait): Fix debug output.
8310
cf6e3471
PA
83112009-11-26 Pedro Alves <pedro@codesourcery.com>
8312
8313 * win32-low.c (win32_add_one_solib): If the dll name is
8314 "ntdll.dll", prepend the system directory to the dll path.
8315
0c85e18e
MK
83162009-11-17 Daniel Jacobowitz <dan@codesourcery.com>
8317
8318 * m68k-tdep.c (m68k_gdbarch_init): Reuse previous initialization.
8319
9ac544ce 83202009-11-17 Nathan Sidwell <nathan@codesourcery.com>
889bf7c5 8321 Vladimir Prus <vladimir@codesourcery.com>
9ac544ce
MK
8322
8323 * Makefile.in (reg-cf.o, reg-cf.c): New targets.
8324 * configure.ac: Check for __mcoldfire__ and set
8325 gdb_cv_m68k_is_coldfire.
8326 * configure.srv: Use gdb_cv_m68k_is_coldfire to select between
8327 reg-cf.o and reg-m68k.o.
8328 * configure: Regenerated.
8329
fd7dd3e6
PA
83302009-11-16 Pedro Alves <pedro@codesourcery.com>
8331
8332 * linux-low.c (linux_remove_process): Add `detaching' parameter.
8333 Pass it to thread_db_free.
8334 (linux_kill, linux_detach, linux_wait_1): Adjust to pass the
8335 proper `detaching' argument to linux_remove_process.
8336 * linux-low.h (thread_db_free): Add `detaching' parameter.
8337 * thread-db.c (thread_db_init): Pass false as `detaching' argument
8338 to thread_db_free.
8339 (thread_db_free): Add `detaching' parameter. Only
8340 call td_ta_clear_event if detaching from process.
8341
75aa492e
MK
83422009-11-12 Maxim Kuvyrkov <maxim@codesourcery.com>
8343
8344 * thread-db.c (thread_db_free): Fix typo.
8345
21e1bee4
PP
83462009-11-11 Paul Pluzhnikov <ppluzhnikov@google.com>
8347
8348 PR gdb/10838
8349 * thread-db.c (thread_db_free): Call td_ta_clear_event.
8350
8838b45e
NS
83512009-11-03 Nathan Sidwell <nathan@codesourcery.com>
8352
8353 * configure.ac (i[34567]86-*): Check if we're targetting x86-64
8354 with an i686 compiler.
8355 * configure.srv (i[34567]86-*-linux*): Pull in x86-64 handling if
8356 needed.
8357 * configure: Rebuilt.
8358
8a35fb51
SL
83592009-10-29 Sandra Loosemore <sandra@codesourcery.com>
8360
8361 PR gdb/10783
8362
8363 * server.c (handle_search_memory_1): Correct read_addr initialization
8364 in loop for searching subsequent chunks.
8365
96f15937
PP
83662009-10-29 Paul Pluzhnikov <ppluzhnikov@google.com>
8367
8368 * configure.ac: New --with-libthread-db option.
8369 * thread-db.c: Allow direct dependence on libthread_db.
8370 (thread_db_free): Adjust.
8371 * config.in: Regenerate.
8372 * configure: Likewise.
889bf7c5 8373
5f7d1694
PP
83742009-10-28 Paul Pluzhnikov <ppluzhnikov@google.com>
8375
8376 PR gdb/10757
8377 * thread-db.c (attach_thread): New function.
8378 (maybe_attach_thread): Return success/failure.
8379 (find_new_threads_callback): Adjust.
889bf7c5
PA
8380 (thread_db_find_new_threads): Loop until no new threads.
8381
88e3b899
PA
83822009-10-13 Pedro Alves <pedro@codesourcery.com>
8383
8384 * proc-service.c (ps_lgetregs): Formatting.
8385
cdbfd419
PP
83862009-10-08 Paul Pluzhnikov <ppluzhnikov@google.com>
8387
8388 * acinclude.m4: (SRV_CHECK_THREAD_DB, SRV_CHECK_TLS_GET_ADDR): Remove.
8389 * configure.ac: Adjust.
8390 * linux-low.h (struct process_info_private): Move members to struct
8391 thread_db.
8392 (thread_db_free, thread_db_handle_monitor_command): New prototype.
8393 * linux-low.c (linux_remove_process): Adjust.
8394 (linux_wait_for_event_1, linux_look_up_symbols): Likewise.
8395 * server.c (handle_query): Move code ...
8396 (handle_monitor_command): ... here. New function.
8397 * target.h (struct target_ops): New member.
8398 * thread-db.c (struct thread_db): New.
8399 (libthread_db_search_path): New variable.
8400 (thread_db_create_event, thread_db_enable_reporting)
8401 (find_one_thread, maybe_attach_thread, find_new_threads_callback)
8402 (thread_db_find_new_threads, (thread_db_get_tls_address): Adjust.
8403 (try_thread_db_load_1, dladdr_to_soname): New functions.
8404 (try_thread_db_load, thread_db_load_search): New functions.
8405 (thread_db_init): Search for libthread_db.
8406 (thread_db_free): New function.
8407 (thread_db_handle_monitor_command): Likewise.
8408 * config.in: Regenerate.
8409 * configure: Regenerate.
889bf7c5 8410
4168d2d6
UW
84112009-09-27 Ulrich Weigand <uweigand@de.ibm.com>
8412
8413 * spu-low.c (spu_kill): Wait for inferior to terminate.
8414 Call clear_inferiors.
8415 (spu_detach): Call clear_inferiors.
8416
81ecdfbb
RW
84172009-08-22 Ralf Wildenhues <Ralf.Wildenhues@gmx.de>
8418
8419 * aclocal.m4: Regenerate.
8420 * config.in: Likewise.
8421 * configure: Likewise.
8422
0b9ff2c0
UW
84232009-07-31 Ulrich Weigand <uweigand@de.ibm.com>
8424
8425 * linux-ppc-low.c (INSTR_SC, NR_spu_run): Define.
8426 (parse_spufs_run): New function.
8427 (ppc_get_pc, ppc_set_pc): Detect and handle SPU PC.
8428 (ppc_breakpoint_at): Handle SPU breakpoints.
8429
efcbbd14
UW
84302009-07-31 Ulrich Weigand <uweigand@de.ibm.com>
8431
8432 * linux-low.c: Include <sys/stat.h> and <sys/vfs.h>.
8433 (SPUFS_MAGIC): Define.
8434 (spu_enumerate_spu_ids): New function.
8435 (linux_qxfer_spu): New function.
8436 (linux_target_ops): Install linux_qxfer_spu.
8437
f4d9bade
UW
84382009-07-31 Ulrich Weigand <uweigand@de.ibm.com>
8439
8440 * configure.srv (powerpc*-*-linux*): Add powerpc-cell32l.o
8441 and powerpc-cell64l.o to srv_regobj. Add rs6000/powerpc-cell32l.xml
8442 and rs6000/powerpc-cell64l.xml to srv_xmlfiles.
8443 * Makefile.in (powerpc-cell32l.o, powerpc-cell32l.c): New rules.
8444 (powerpc-cell64l.o, powerpc-cell64l.c): Likewise.
8445 (clean): Handle powerpc-cell32l.c and powerpc-cell64l.c.
8446 * linux-ppc-low.c (PPC_FEATURE_CELL): Define.
8447 (init_registers_powerpc_cell32l): Add prototype.
8448 (init_registers_powerpc_cell64l): Likewise.
8449 (ppc_arch_setup): Detect Cell/B.E. architecture.
8450
96e946ca
RW
84512009-07-30 Ralf Wildenhues <Ralf.Wildenhues@gmx.de>
8452
8453 * Makefile.in (datarootdir): New variable.
8454
58d6951d
DJ
84552009-07-28 Daniel Jacobowitz <dan@codesourcery.com>
8456
8457 * linux-low.c (linux_write_memory): Update debugging output.
8458 * Makefile.in (clean): Add new descriptions.
8459 (arm-with-vfpv2.o, arm-with-vfpv2.c, arm-with-vfpv3.o)
8460 (arm-with-vfpv3.c, arm-with-neon.o, arm-with-neon.c): New rules.
8461 * configure.srv: Add new files for arm*-*-linux*.
8462 * linux-arm-low.c: Add new declarations.
8463 (PTRACE_GETVFPREGS, PTRACE_SETVFPREGS): Define if undefined.
8464 (arm_hwcap, HWCAP_VFP, HWCAP_IWMMXT, HWCAP_NEON, HWCAP_VFPv3)
8465 (HWCAP_VFPv3D16): New.
8466 (arm_fill_wmmxregset, arm_store_wmmxregset): Check HWCAP_IWMMXT
8467 instead of __IWMMXT__.
8468 (arm_fill_vfpregset, arm_store_vfpregset, arm_get_hwcap)
8469 (arm_arch_setup): New.
8470 (target_regsets): Remove #ifdef. Add VFP regset.
8471 (the_low_target): Use arm_arch_setup.
8472
12b42a12
DJ
84732009-07-28 Daniel Jacobowitz <dan@codesourcery.com>
8474
8475 * linux-low.c (linux_kill_one_lwp): Adjust kernel workaround to skip
8476 the main thread again.
8477
ac8c974e
AR
84782009-07-06 Aleksandar Ristovski <aristovski@qnx.com>
8479
8480 Adding Neutrino gdbserver.
8481 * configure: Regenerated.
8482 * configure.ac: Add case for srv_qnx and set LIBS accordingly.
8483 * configure.srv (i[34567]86-*-nto*): New target.
8484 * nto-low.c, nto-low.h, nto-x86-low.c: New files.
8485 * remote-utils.c [__QNX__]: Include sys/iomgr.h
8486 (nto_comctrl) [__QNX__]: New function.
8487 (enable_async_io, disable_async_io) [__QNX__]: Call nto_comctrl.
8488
4424e0c3 84892009-07-05 Danny Backx <dannybackx@users.sourceforge.net>
7437790a
PA
8490
8491 * configure.srv (i[34567]86-*-mingw32ce*): Add i386-low.o to
8492 srv_tgtobj.
8493
912cf4ba
PA
84942009-07-04 Danny Backx <dannybackx@users.sourceforge.net>
8495 Pedro Alves <pedro@codesourcery.com>
8496
8497 * win32-i386-low.c (i386_get_thread_context): Handle systems that
8498 don't support CONTEXT_EXTENDED_REGISTERS.
8499 (i386_win32_breakpoint, i386_win32_breakpoint_len): New.
8500 (the_low_target): Install them.
8501 * win32-low.c (get_child_debug_event): Handle WaitForDebugEvent
8502 failing with ERROR_PIPE_NOT_CONNECTED.
8503
aa5ca48f
DE
85042009-06-30 Doug Evans <dje@google.com>
8505 Pierre Muller <muller@ics.u-strasbg.fr>
8506
8507 Add h/w watchpoint support to x86-linux, win32-i386.
8508 * Makefile.in (SFILES): Add i386-low.c
8509 (i386_low_h): Define.
8510 (i386-low.o): Add dependencies.
8511 (linux-x86-low.o): Add i386-low.h dependency.
8512 (win32-i386-low.o): Ditto.
8513 * i386-low.c: New file.
8514 * i386-low.h: New file.
8515 * configure.srv (i[34567]86-*-cygwin*): Add i386-low.o to srv_tgtobj.
8516 (i[34567]86-*-linux*, i[34567]86-*-mingw*, x86_64-*-linux*): Ditto.
8517 * linux-low.c (linux_add_process): Initialize arch_private.
8518 (linux_remove_process): Free arch_private.
8519 (add_lwp): Initialize arch_private.
8520 (delete_lwp): Free arch_private.
8521 (linux_resume_one_lwp): Call the_low_target.prepare_to_resume if
8522 provided.
8523 * linux-low.h (process_info_private): New member arch_private.
8524 (lwp_info): New member arch_private.
8525 (linux_target_ops): New members new_process, new_thread,
8526 prepare_to_resume.
8527 (ptid_of): New macro.
8528 * linux-x86-low.c: Include stddef.h, i386-low.h.
8529 (arch_process_info): New struct.
8530 (arch_lwp_info): New struct.
8531 (x86_linux_dr_get, x86_linux_dr_set): New functions.
8532 (i386_dr_low_set_addr, i386_dr_low_set_control): New functions.
8533 (i386_dr_low_get_status): New function.
8534 (x86_insert_point, x86_remove_point): New functions.
8535 (x86_stopped_by_watchpoint): New function.
8536 (x86_stopped_data_address): New function.
8537 (x86_linux_new_process, x86_linux_new_thread): New functions.
8538 (x86_linux_prepare_to_resume): New function.
8539 (the_low_target): Add entries for insert_point, remove_point,
8540 stopped_by_watchpoint, stopped_data_address, new_process, new_thread,
8541 prepare_to_resume.
8542 * server.c (debug_hw_points): New global.
8543 (monitor_show_help): Document set debug-hw-points.
8544 (handle_query): Process "set debug-hw-points".
8545 * server.h (debug_hw_points): Declare.
8546 (paddress): Declare.
8547 * utils.c (NUMCELLS, CELLSIZE): New macros.
8548 (get_sell, xsnprintf, paddress): New functions.
8549 * win32-arm-low.c (the_low_target): Add entries for insert_point,
8550 remove_point, stopped_by_watchpoint, stopped_data_address.
8551 * win32-i386-low.c: Include i386-low.h.
8552 (debug_reg_state): Replaces dr.
8553 (i386_dr_low_set_addr, i386_dr_low_set_control): New functions.
8554 (i386_dr_low_get_status): New function.
8555 (i386_insert_point, i386_remove_point): New functions.
8556 (i386_stopped_by_watchpoint): New function.
8557 (i386_stopped_data_address): New function.
8558 (i386_initial_stuff): Update.
8559 (get_thread_context,set_thread_context,i386_thread_added): Update.
8560 (the_low_target): Add entries for insert_point,
8561 remove_point, stopped_by_watchpoint, stopped_data_address.
8562 * win32-low.c (win32_insert_watchpoint): New function.
8563 (win32_remove_watchpoint): New function.
8564 (win32_stopped_by_watchpoint): New function.
8565 (win32_stopped_data_address): New function.
8566 (win32_target_ops): Add entries for insert_watchpoint,
8567 remove_watchpoint, stopped_by_watchpoint, stopped_data_address.
8568 * win32-low.h (win32_target_ops): New members insert_point,
8569 remove_point, stopped_by_watchpoint, stopped_data_address.
8570
d993e290
PA
85712009-06-25 Pedro Alves <pedro@codesourcery.com>
8572
8573 * server.c (process_serial_event): Re-return unsupported, not
8574 error, if the type isn't recognized. Re-allow supporting only
8575 insert or remove packets. Also call require_running for
8576 breakpoints. Add missing break statement to default case. Tidy.
8577 * target.h (struct target_ops): Rename insert_watchpoint to
8578 insert_point, and remove_watchpoint to remove_point.
8579
8580 * linux-low.h (struct linux_target_ops): Likewise.
8581 * linux-low.c (linux_insert_watchpoint): Rename to ...
8582 (linux_insert_point): ... this. Adjust.
8583 (linux_remove_watchpoint): Rename to ...
8584 (linux_remove_point): ... this. Adjust.
8585 (linux_target_ops): Adjust.
8586 * linux-crisv32-low.c (cris_insert_watchpoint): Rename to ...
8587 (cris_insert_point): ... this.
8588 (cris_remove_watchpoint): Rename to ...
8589 (cris_remove_point): ... this.
8590 (the_low_target): Adjust.
8591
0f54c268
PM
85922009-06-24 Pierre Muller <muller@ics.u-strasbg.fr>
8593
8594 * server.c (handle_v_kill): Pass signal_pid to
8595 kill_inferior if multi_process is zero.
8596
c6314022
AR
85972009-06-23 Aleksandar Ristovski <aristovski@qnx.com>
8598
8599 * server.c (process_serial_event): Add support for Z0 and Z1 packet.
8600 * target.h (target_ops): Comment for *_watchpoint to make it clear
8601 the functions can get types '0' and '1'.
8602
4463ce24
AR
86032009-06-22 Aleksandar Ristovski <aristovski@qnx.com>
8604
8605 * linux-low.c (usr_fetch_inferior_registers): Remove check for regno 0.
8606 * proc-service.c (ps_lgetregs): Pass -1 to fetch all registers.
8607 * regcache.c (get_regcache): Likewise.
8608 * spu-low.c (spu_fetch_registers): Remove 0 to -1 conversion.
8609 * win32-low.c (child_fetch_inferior_registers): Remove check for
8610 regno 0.
8611
cf8fd78b
PA
86122009-06-19 Aleksandar Ristovski <aristovski@qnx.com>
8613 Pedro Alves <pedro@codesourcery.com>
8614
8615 * target.h (struct target_ops) <supports_multi_process>: New
8616 callback.
8617 (target_supports_multi_process): New.
8618 * server.c (handle_query): Even if GDB reports support, only
8619 enable multi-process if the target also supports it. Report
8620 multi-process support only if the target backend supports it.
8621 * linux-low.c (linux_supports_multi_process): New function.
8622 (linux_target_ops): Install it as target_supports_multi_process
8623 callback.
8624
47c0c975
DE
86252009-05-24 Doug Evans <dje@google.com>
8626
e09875d4
DE
8627 Global renaming of find_thread_pid to find_thread_ptid.
8628 * server.h (find_thread_ptid): Renamed from find_thread_pid.
8629 * inferiors.c (find_thread_ptid): Renamed from find_thread_pid.
8630 All callers updated.
8631
e27d73f6
DE
8632 * linux-low.c (handle_extended_wait): Use linux_resume_one_lwp
8633 to resume the newly created thread, don't call ptrace (PTRACE_CONT)
8634 directly.
8635
47c0c975
DE
8636 * linux-low.c (get_stop_pc): Print pc if debug_threads.
8637 (check_removed_breakpoint, linux_wait_for_lwp): Ditto.
8638 (linux_resume_one_lwp): Ditto.
8639
2acc282a
DE
86402009-05-23 Doug Evans <dje@google.com>
8641
8642 * linux-low.c (linux_resume_one_lwp): Change type of first arg
8643 from struct inferior_list_entry * to struct lwp_info *.
8644 All callers updated.
8645
9f1036c1
DE
86462009-05-13 Doug Evans <dje@google.com>
8647
8648 * linux-x86-low.c: Don't include assert.h.
8649 (x86_siginfo_fixup): Use fatal, not assert.
8650 (x86_arch_setup): Fix comment.
8651
d0722149
DE
86522009-05-12 Doug Evans <dje@google.com>
8653
8654 Biarch support for i386/amd64 gdbserver.
8655 * Makefile.in (SFILES): Remove linux-i386-low.c, linux-x86-64-low.c.
8656 Add linux-x86-low.c.
8657 (linux-i386-low.o, linux-x86-64-low.o): Delete.
8658 (linux-x86-low.o): Add.
8659 * linux-x86-64-low.c: Delete.
8660 * linux-i386-low.c: Delete.
8661 * linux-x86-low.c: New file.
8662 * configure.srv (i?86-linux srv_tgtobj): Replace linux-i386-low.o with
8663 linux-x86-low.o.
8664 (x86_64-linux srv_tgtobj): Replace linux-x86-64-low.o with
8665 linux-x86-low.o.
8666 (x86_64-linux srv_regobj): Add reg-i386-linux.o.
8667 * linux-low.c: Include ansidecl.h, elf/common.h, elf/external.h.
8668 (linux_child_pid_to_exec_file): New function.
8669 (elf_64_header_p, elf_64_file_p): New functions.
8670 (siginfo_fixup): New function.
8671 (linux_xfer_siginfo): New local inf_siginfo. Call siginfo_fixup to
8672 give target a chance to convert layout.
8673 * linux-low.h (linux_target_ops): New member siginfo_fixup.
8674 (linux_child_pid_to_exec_file, elf_64_file_p): Declare.
8675
fdeb2a12
DE
86762009-05-07 Doug Evans <dje@google.com>
8677
8678 * linux-low.c (regsets_fetch_inferior_registers): Fix memory leak.
8679 (regsets_store_inferior_registers): Ditto.
8680
a6dbe5df
PA
86812009-05-06 Pedro Alves <pedro@codesourcery.com>
8682
8683 PR server/10048
8684
8685 * linux-low.c (must_set_ptrace_flags): Delete.
8686 (linux_create_inferior): Set `lwp->must_set_ptrace_flags' instead
8687 of the global.
8688 (linux_attach_lwp_1): Don't set PTRACE_SETOPTIONS here. Set
8689 `lwp->must_set_ptrace_flags' instead.
ba42693b 8690 (linux_wait_for_event_1): Set ptrace options here.
a6dbe5df
PA
8691 (linux_wait_1): ... not here.
8692
5091eb23
DE
86932009-04-30 Doug Evans <dje@google.com>
8694
9f767825
DE
8695 * inferiors.c (started_inferior_callback): New function.
8696 (attached_inferior_callback): New function.
8697 (have_started_inferiors_p, have_attached_inferiors_p): New functions.
8698 * server.c (print_started_pid, print_attached_pid): New functions.
8699 (detach_or_kill_for_exit): New function.
8700 (main): Call it instead of for_each_inferior (kill_inferior_callback).
8701 * server.h (have_started_inferiors_p): Declare.
8702 (have_attached_inferiors_p): Declare.
8703
5091eb23
DE
8704 * inferiors.c (remove_process): Fix memory leak, free process.
8705 * linux-low.c (linux_remove_process): New function.
8706 (linux_kill): Call it instead of remove_process.
8707 (linux_detach, linux_wait_1): Ditto.
8708
155c8968
PA
87092009-04-19 Danny Backx <dannybackx@users.sourceforge.net>
8710
8711 * configure.srv: Add x86 Windows CE target.
8712
7fe519cb
UW
87132009-04-03 Ulrich Weigand <uweigand@de.ibm.com>
8714
8715 * inferiors.c (get_thread_process): Make global.
8716 * server.h (get_thread_process): Add prototype.
8717 * thread-db.c (find_one_thread): Use get_thread_process
8718 instead of current_process.
8719 (thread_db_get_tls_address): Do not crash if called when
8720 thread layer is not yet initialized.
8721
5472f405
UW
87222009-04-03 Ulrich Weigand <uweigand@de.ibm.com>
8723
8724 * remote-utils.c (prepare_resume_reply): Null-terminate packet.
8725 * spu-low.c (current_tid): Rename to ...
8726 (current_ptid): ... this.
8727 (fetch_ppc_register, fetch_ppc_memory, store_ppc_memory,
8728 spu_proc_xfer_spu, spu_resume, spu_request_interrupt): Use
8729 ptid_get_lwp (current_ptid) instead of current_tid.
8730 (spu_kill, spu_detach, spu_join, spu_wait): Use pid argument
8731 instead of current_tid. Use find_process_pid to verify pid
8732 argument is valid. Pass proper argument to remove_process.
8733 (spu_thread_alive): Compare current_ptid instead of current_tid.
8734 (spu_resume): Likewise.
8735
55ac2b99
PA
87362009-04-02 Pedro Alves <pedro@codesourcery.com>
8737
8738 * linux-low.c (usr_store_inferior_registers): Declare local `pid'
8739 variable.
8740
95954743
PA
87412009-04-01 Pedro Alves <pedro@codesourcery.com>
8742
8743 Implement the multiprocess extensions, and add linux multiprocess
8744 support.
8745
8746 * server.h (ULONGEST): Declare.
8747 (struct ptid, ptid_t): New.
8748 (minus_one_ptid, null_ptid): Declare.
8749 (ptid_build, pid_to_ptid, ptid_get_pid, ptid_get_lwp)
8750 (ptid_get_tid, ptid_equal, ptid_is_pid): Declare.
8751 (struct inferior_list_entry): Change `id' type from unsigned from
8752 to ptid_t.
8753 (struct sym_cache, struct breakpoint, struct
8754 process_info_private): Forward declare.
8755 (struct process_info): Declare.
8756 (current_process): Declare.
8757 (all_processes): Declare.
8758 (initialize_inferiors): Declare.
8759 (add_thread): Adjust to use ptid_t.
8760 (thread_id_to_gdb_id, thread_to_gdb_id, gdb_id_to_thread_id): Ditto.
8761 (add_process, remove_process, find_thread_pid): Declare.
8762 (find_inferior_id): Adjust to use ptid_t.
8763 (cont_thread, general_thread, step_thread): Change type to ptid_t.
8764 (multi_process): Declare.
8765 (push_event): Adjust to use ptid_t.
8766 (read_ptid, write_ptid): Declare.
8767 (prepare_resume_reply): Adjust to use ptid_t.
8768 (clear_symbol_cache): Declare.
8769 * inferiors.c (all_processes): New.
8770 (null_ptid, minus_one_ptid): New.
8771 (ptid_build, pid_to_ptid, ptid_get_pid, ptid_get_lwp)
8772 (ptid_get_tid, ptid_equal, ptid_is_pid): New.
8773 (add_thread): Change unsigned long to ptid. Remove gdb_id
8774 parameter. Adjust.
8775 (thread_id_to_gdb_id, thread_to_gdb_id): Change unsigned long to ptid.
8776 (gdb_id_to_thread): Rename to ...
8777 (find_thread_pid): ... this. Change unsigned long to ptid.
8778 (gdb_id_to_thread_id, find_inferior_id): Change unsigned long to ptid.
8779 (loaded_dll, pull_pid_from_list): Adjust.
8780 (add_process, remove_process, find_process_pid)
8781 (get_thread_process, current_process, initialize_inferiors): New.
8782 * target.h (struct thread_resume) <thread>: Change type to ptid_t.
8783 (struct target_waitstatus) <related_pid>: Ditto.
8784 (struct target_ops) <kill, detach>: Add `pid' argument. Change
8785 return type to int.
8786 (struct target_ops) <join>: Add `pid' argument.
8787 (struct target_ops) <thread_alive>: Change pid's type to ptid_t.
8788 (struct target_ops) <wait>: Add `ptid' field. Change return type
8789 to ptid.
8790 (kill_inferior, detach_inferior, join_inferior): Add `pid' argument.
8791 (mywait): Add `ptid' argument. Change return type to ptid_t.
8792 (target_pid_to_str): Declare.
8793 * target.c (set_desired_inferior): Adjust to use ptids.
8794 (mywait): Add new `ptid' argument. Adjust.
8795 (target_pid_to_str): New.
8796 * mem-break.h (free_all_breakpoints): Declare.
8797 * mem-break.c (breakpoints): Delelete.
8798 (set_breakpoint_at, delete_breakpoint, find_breakpoint_at)
8799 (check_mem_read, check_mem_write, delete_all_breakpoints): Adjust
8800 to use per-process breakpoint list.
8801 (free_all_breakpoints): New.
8802 * remote-utils.c (struct sym_cache) <name>: Drop `const'.
8803 (symbol_cache, all_symbols_looked_up): Delete.
8804 (hexchars): New.
8805 (ishex, unpack_varlen_hex, write_ptid, hex_or_minus_one,
8806 read_ptid): New.
8807 (prepare_resume_reply): Change ptid argument's type from unsigned
8808 long to ptid_t. Adjust. Implement W;process and X;process.
8809 (free_sym_cache, clear_symbol_cache): New.
8810 (look_up_one_symbol): Adjust to per-process symbol cache. *
8811 * server.c (cont_thread, general_thread, step_thread): Change type
8812 to ptid_t.
8813 (attached): Delete.
8814 (multi_process): New.
8815 (last_ptid): Change type to ptid_t.
8816 (struct vstop_notif) <ptid>: Change type to ptid_t.
8817 (queue_stop_reply, push_event): Change `ptid' argument's type to
8818 ptid_t.
8819 (discard_queued_stop_replies): Add `pid' argument.
8820 (start_inferior): Adjust to use ptids. Adjust to mywait interface
8821 changes. Don't reference the `attached' global.
8822 (attach_inferior): Adjust to mywait interface changes.
8823 (handle_query): Adjust to use ptids. Parse GDB's qSupported
8824 features. Handle and report "multiprocess+". Handle
8825 "qAttached:PID".
8826 (handle_v_cont): Adjust to use ptids. Adjust to mywait interface
8827 changes.
8828 (handle_v_kill): New.
8829 (handle_v_stopped): Adjust to use target_pid_to_str.
8830 (handle_v_requests): Allow multiple attaches and runs when
8831 multiprocess extensions are in effect. Handle "vKill".
8832 (myresume): Adjust to use ptids.
8833 (queue_stop_reply_callback): Add `arg' parameter. Handle it.
8834 (handle_status): Adjust to discard_queued_stop_replies interface
8835 change.
8836 (first_thread_of, kill_inferior_callback)
8837 (detach_or_kill_inferior_callback, join_inferiors_callback): New.
8838 (main): Call initialize_inferiors. Adjust to use ptids, killing
8839 and detaching from all inferiors. Handle multiprocess packet
8840 variants.
8841 * linux-low.h: Include gdb_proc_service.h.
8842 (struct process_info_private): New.
8843 (struct linux_target_ops) <pid_of>: Use ptid_get_pid.
8844 <lwpid_of>: Use ptid_get_lwp.
8845 (get_lwp_thread): Adjust.
8846 (struct lwp_info): Add `dead' member.
8847 (find_lwp_pid): Declare.
8848 * linux-low.c (thread_db_active): Delete.
8849 (new_inferior): Adjust comment.
8850 (inferior_pid): Delete.
8851 (linux_add_process): New.
8852 (handle_extended_wait): Adjust.
8853 (add_lwp): Change unsigned long to ptid.
8854 (linux_create_inferior): Add process to processes table. Adjust
8855 to use ptids. Don't set new_inferior here.
8856 (linux_attach_lwp): Rename to ...
8857 (linux_attach_lwp_1): ... this. Add `initial' argument. Handle
8858 it. Adjust to use ptids.
8859 (linux_attach_lwp): New.
8860 (linux_attach): Add process to processes table. Don't set
8861 new_inferior here.
8862 (struct counter): New.
8863 (second_thread_of_pid_p, last_thread_of_process_p): New.
8864 (linux_kill_one_lwp): Add `args' parameter. Handle it. Adjust to
8865 multiple processes.
8866 (linux_kill): Add `pid' argument. Handle it. Adjust to multiple
8867 processes. Remove process from process table.
8868 (linux_detach_one_lwp): Add `args' parameter. Handle it. Adjust
8869 to multiple processes.
8870 (any_thread_of): New.
8871 (linux_detach): Add `pid' argument, and handle it. Remove process
8872 from processes table.
8873 (linux_join): Add `pid' argument. Handle it.
8874 (linux_thread_alive): Change unsighed long argument to ptid_t.
8875 Consider dead lwps as not being alive.
8876 (status_pending_p): Rename `dummy' argument to `arg'. Filter out
8877 threads we're not interested in.
8878 (same_lwp, find_lwp_pid): New.
8879 (linux_wait_for_lwp): Change `pid' argument's type from int to
8880 ptid_t. Adjust.
8881 (linux_wait_for_event): Rename to ...
8882 (linux_wait_for_event_1): ... this. Change `pid' argument's type
8883 from int to ptid_t. Adjust.
8884 (linux_wait_for_event): New.
8885 (linux_wait_1): Add `ptid' argument. Change return type to
8886 ptid_t. Adjust. Use last_thread_of_process_p. Remove processes
8887 that exit from the process table.
8888 (linux_wait): Add `ptid' argument. Change return type to ptid_t.
8889 Adjust.
8890 (mark_lwp_dead): New.
8891 (wait_for_sigstop): Adjust to use ptids. If a process exits while
8892 stopping all threads, mark its main lwp as dead.
8893 (linux_set_resume_request, linux_resume_one_thread): Adjust to use
8894 ptids.
8895 (fetch_register, usr_store_inferior_registers)
8896 (regsets_fetch_inferior_registers)
8897 (regsets_store_inferior_registers, linux_read_memory)
8898 (linux_write_memory): Inline `inferior_pid'.
8899 (linux_look_up_symbols): Adjust to use per-process
8900 `thread_db_active'.
8901 (linux_request_interrupt): Adjust to use ptids.
8902 (linux_read_auxv): Inline `inferior_pid'.
8903 (initialize_low): Don't reference thread_db_active.
8904 * gdb_proc_service.h (struct ps_prochandle) <pid>: Remove.
8905 * proc-service.c (ps_lgetregs): Use find_lwp_pid.
8906 (ps_getpid): Return the pid of the current inferior.
8907 * thread-db.c (proc_handle, thread_agent): Delete.
8908 (thread_db_create_event, thread_db_enable_reporting): Adjust to
8909 per-process data.
8910 (find_one_thread): Change argument type to ptid_t. Adjust to
8911 per-process data.
8912 (maybe_attach_thread): Adjust to per-process data and ptids.
8913 (thread_db_find_new_threads): Ditto.
8914 (thread_db_init): Ditto.
8915 * spu-low.c (spu_create_inferior, spu_attach): Add process to
8916 processes table. Adjust to use ptids.
8917 (spu_kill, spu_detach): Adjust interface. Remove process from
8918 processes table.
8919 (spu_join, spu_thread_alive): Adjust interface.
8920 (spu_wait): Adjust interface. Remove process from processes
8921 table. Adjust to use ptids.
8922 * win32-low.c (current_inferior_tid): Delete.
8923 (current_inferior_ptid): New.
8924 (debug_event_ptid): New.
8925 (thread_rec): Take a ptid. Adjust.
8926 (child_add_thread): Add `pid' argument. Adjust to use ptids.
8927 (child_delete_thread): Ditto.
8928 (do_initial_child_stuff): Add `attached' argument. Add process to
8929 processes table.
8930 (child_fetch_inferior_registers, child_store_inferior_registers):
8931 Adjust.
8932 (win32_create_inferior): Pass 0 to do_initial_child_stuff.
8933 (win32_attach): Pass 1 to do_initial_child_stuff.
8934 (win32_kill): Adjust interface. Remove process from processes
8935 table.
8936 (win32_detach): Ditto.
8937 (win32_join): Adjust interface.
8938 (win32_thread_alive): Take a ptid.
8939 (win32_resume): Adjust to use ptids.
8940 (get_child_debug_event): Ditto.
8941 (win32_wait): Adjust interface. Remove exiting process from
8942 processes table.
8943
bd99dc85
PA
89442009-04-01 Pedro Alves <pedro@codesourcery.com>
8945
8946 Non-stop mode support.
8947
8948 * server.h (non_stop): Declare.
8949 (gdb_client_data, handler_func): Declare.
8950 (delete_file_handler, add_file_handler, start_event_loop):
8951 Declare.
8952 (handle_serial_event, handle_target_event, push_event)
8953 (putpkt_notif): Declare.
8954 * target.h (enum resume_kind): New.
8955 (struct thread_resume): Replace `step' field by `kind' field.
8956 (TARGET_WNOHANG): Define.
8957 (struct target_ops) <wait>: Add `options' argument.
8958 <supports_non_stop, async, start_non_stop>: New fields.
8959 (target_supports_non_stop, target_async): New.
8960 (start_non_stop): Declare.
8961 (mywait): Add `options' argument.
8962 * target.c (mywait): Add `options' argument. Print child exit
8963 notifications here.
8964 (start_non_stop): New.
8965 * server.c (non_stop, own_buf, mem_buf): New globals.
8966 (struct vstop_notif): New.
8967 (notif_queue): New global.
8968 (queue_stop_reply, push_event, discard_queued_stop_replies)
8969 (send_next_stop_reply): New.
8970 (start_inferior): Adjust to use resume_kind. Adjust to mywait
8971 interface changes.
8972 (attach_inferior): In non-stop mode, don't wait for the target
8973 here.
8974 (handle_general_set): Handle QNonStop.
8975 (handle_query): When handling qC, return the current general
8976 thread, instead of the first thread of the list.
8977 (handle_query): If the backend supports non-stop mode, include
8978 QNonStop+ in the qSupported query response.
8979 (handle_v_cont): Adjust to use resume_kind. Handle resume_stop
8980 and non-stop mode.
8981 (handle_v_attach, handle_v_run): Handle non-stop mode.
8982 (handle_v_stopped): New.
8983 (handle_v_requests): Report support for vCont;t. Handle vStopped.
8984 (myresume): Adjust to use resume_kind. Handle non-stop.
8985 (queue_stop_reply_callback): New.
8986 (handle_status): Handle non-stop mode.
8987 (main): Clear non_stop flag on reconnection. Use the event-loop.
8988 Refactor serial protocol handling from here ...
8989 (process_serial_event): ... to this new function. When GDB
8990 selects any thread, select one here. In non-stop mode, wait until
8991 GDB acks all pending events before exiting.
8992 (handle_serial_event, handle_target_event): New.
8993 * remote-utils.c (remote_open): Install remote_desc in the event
8994 loop.
8995 (remote_close): Remove remote_desc from the event loop.
8996 (putpkt_binary): Rename to...
8997 (putpkt_binary_1): ... this. Add `is_notic' argument. Handle it.
8998 (putpkt_binary): New as wrapper around putpkt_binary_1.
8999 (putpkt_notif): New.
9000 (prepare_resume_reply): In non-stop mode, don't change the
9001 general_thread.
9002 * event-loop.c: New.
9003 * Makefile.in (OBJ): Add event-loop.o.
9004 (event-loop.o): New rule.
9005
9006 * linux-low.h (pid_of): Moved here.
9007 (lwpid_of): New.
9008 (get_lwp_thread): Use lwpid_of.
9009 (struct lwp_info): Delete `lwpid' field. Add `suspended' field.
9010 * linux-low.c (pid_of): Delete.
9011 (inferior_pid): Use lwpid_of.
9012 (linux_event_pipe): New.
9013 (target_is_async_p): New.
9014 (delete_lwp): New.
9015 (handle_extended_wait): Use lwpid_of.
9016 (add_lwp): Don't set lwpid field.
9017 (linux_attach_lwp): Adjust debug output. Use lwpid_of.
9018 (linux_kill_one_lwp): If killing a running lwp, stop it first.
9019 Use lwpid_of. Adjust to linux_wait_for_event interface changes.
9020 (linux_detach_one_lwp): If detaching from a running lwp, stop it
9021 first. Adjust to linux_wait_for_event interface changes. Use
9022 lwpid_of.
9023 (linux_detach): Don't delete the main lwp here.
9024 (linux_join): Use my_waitpid. Avoid signal_pid. Use lwpid_of.
9025 (status_pending_p): Don't consider explicitly suspended lwps.
9026 (linux_wait_for_lwp): Take an integer pid instead of a lwp_info
9027 pointer. Add OPTIONS argument. Change return type to int. Use
9028 my_waitpid instead of sleeping. Handle WNOHANG. Use lwpid_of.
9029 (linux_wait_for_event): Take an integer pid instead of a lwp_info
9030 pointer. Add status pointer argument. Return a pid instead of a
9031 status. Use lwpid_of. Adjust to linux_wait_for_lwp interface
9032 changes. In non-stop mode, don't switch to a random thread.
9033 (linux_wait): Rename to...
9034 (linux_wait_1): ... this. Add target_options argument, and handle
9035 it. Adjust to use resume_kind. Use lwpid_of. In non-stop mode,
9036 don't handle the continue thread. Handle TARGET_WNOHANG. Merge
9037 clean exit and signal exit code. Don't stop all threads in
9038 non-stop mode. In all-stop mode, only stop all threads when
9039 reporting a stop to GDB. Handle explicit thread stop requests.
9040 (async_file_flush, async_file_mark): New.
9041 (linux_wait): New.
9042 (send_sigstop): Use lwpid_of.
9043 (wait_for_sigstop): Use lwpid_of. Adjust to linux_wait_for_event
9044 interface changes. In non-stop mode, don't switch to a random
9045 thread.
9046 (linux_resume_one_lwp): Use lwpid_of.
9047 (linux_continue_one_thread, linux_queue_one_thread): Merge into ...
9048 (linux_resume_one_thread): ... this. Handle resume_stop. In
9049 non-stop mode, don't look for pending flag in all threads.
9050 (resume_status_pending_p): Don't consider explicitly suspended
9051 threads.
9052 (my_waitpid): Reimplement. Emulate __WALL.
9053 (linux_request_interrupt, linux_read_offsets, linux_xfer_siginfo):
9054 Use lwpid_of.
9055 (sigchld_handler, linux_supports_non_stop, linux_async)
9056 (linux_start_non_stop): New.
9057 (linux_target_ops): Register linux_supports_non_stop, linux_async
9058 and linux_start_non_stop.
9059 (initialize_low): Install SIGCHLD handler.
9060 * thread-db.c (thread_db_create_event, find_one_thread)
9061 (thread_db_get_tls_address): Use lwpid_of.
9062 * win32-low.c (win32_detach): Adjust to use resume_kind.
9063 (win32_wait): Add `options' argument.
9064 * spu-low.c (spu_resume): Adjust to use resume_kind.
9065 (spu_wait): Add `options' argument.
9066
5b1c542e
PA
90672009-04-01 Pedro Alves <pedro@codesourcery.com>
9068
9069 Decouple target code from remote protocol.
9070
9071 * target.h (enum target_waitkind): New.
9072 (struct target_waitstatus): New.
9073 (struct target_ops) <wait>: Return an unsigned long. Take a
9074 target_waitstatus pointer instead of a char pointer.
9075 (mywait): Likewise.
9076 * target.c (mywait): Change prototype to return an unsigned long.
9077 Take a target_waitstatus pointer instead of a char pointer. Adjust.
9078 * server.h (thread_from_wait, old_thread_from_wait): Delete
9079 declarations.
9080 (prepare_resume_reply): Change prototype to take a
9081 target_waitstatus.
9082 * server.c (thread_from_wait, old_thread_from_wait): Delete.
9083 (last_status, last_ptid): New.
9084 (start_inferior): Remove "statusptr" argument. Adjust. Return a
9085 pid instead of a signal.
9086 (attach_inferior): Remove "status" and "signal" parameters.
9087 Adjust.
9088 (handle_query): For qGetTLSAddr, parse the thread id with strtol,
9089 not as an address.
9090 (handle_v_cont, handle_v_attach, handle_v_run, handle_v_kill)
9091 (handle_v_requests, myresume): Remove "status" and "signal"
9092 parameters. Adjust.
9093 (handle_status): New.
9094 (main): Delete local `status'. Adjust.
9095 * remote-utils.c: Include target.h.
9096 (prepare_resume_reply): Change prototype to take a
9097 target_waitstatus. Adjust.
9098
9099 * linux-low.c (linux_wait): Adjust to new target_ops->wait
9100 interface.
9101 * spu-low.c (spu_wait): Adjust.
9102 * win32-low.c (enum target_waitkind, struct target_waitstatus):
9103 Delete.
9104 (win32_wait): Adjust.
9105
2bd7c093
PA
91062009-04-01 Pedro Alves <pedro@codesourcery.com>
9107
9108 * target.h (struct thread_resume): Delete leave_stopped member.
9109 (struct target_ops): Add a `n' argument to the `resume' callback.
9110 * server.c (start_inferior): Adjust.
9111 (handle_v_cont, myresume): Adjust.
9112 * linux-low.c (check_removed_breakpoint): Adjust to resume
9113 interface change, and to removed leave_stopped field.
9114 (resume_ptr): Delete.
9115 (struct thread_resume_array): New.
9116 (linux_set_resume_request): Add new `arg' parameter. Adjust to
9117 resume interface change.
9118 (linux_continue_one_thread, linux_queue_one_thread)
9119 (resume_status_pending_p): Check if the resume field is NULL
9120 instead of checking the leave_stopped member.
9121 (linux_resume): Adjust to the target resume interface change.
9122 * spu-low.c (spu_resume): Adjust to the target resume interface
9123 change.
9124 * win32-low.c (win32_detach, win32_resume): Ditto.
9125
c35fafde
PA
91262009-04-01 Pedro Alves <pedro@codesourcery.com>
9127
9128 * linux-low.c (linux_wait_for_event): Don't clear the `stepping'
9129 flag.
9130 (wait_for_sigstop): Don't leave a finished single-step SIGTRAP
9131 pending.
9132 (linux_continue_one_thread): Only preserve the stepping flag if
9133 there's a pending breakpoint.
9134
0a59d50b
PA
91352009-03-31 Pedro Alves <pedro@codesourcery.com>
9136
9137 * server.c (main): After the inferior having exited, call
9138 remote_close before exiting gdbserver.
9139
f04c6d38
TJB
91402009-03-25 Thiago Jung Bauermann <bauerman@br.ibm.com>
9141
9142 Fix size of FPSCR in Power 7 processors.
9143 * linux-ppc-low.c (PPC_FEATURE_ARCH_2_05): Remove #define.
9144 (PPC_FEATURE_HAS_DFP): New #define.
9145 (ppc_arch_setup): Check for DFP feature instead of ISA 2.05 to decide on
9146 size of the FPSCR.
9147
78e5cee6
PA
91482009-03-23 Pedro Alves <pedro@codesourcery.com>
9149
9150 * server.c (handle_query) Whitespace and formatting.
9151
1b3f6016
PA
91522009-03-22 Pedro Alves <pedro@codesourcery.com>
9153
9154 * i387-fp.c, linux-arm-low.c, linux-cris-low.c,
9155 linux-crisv32-low.c, linux-i386-low.c, linux-low.c,
9156 linux-mips-low.c, linux-s390-low.c, linux-sparc-low.c,
9157 linux-x86-64-low.c, linux-xtensa-low.c, proc-service.c,
9158 regcache.c, remote-utils.c, server.c, spu-low.c, target.h,
9159 thread-db.c, win32-low.c, xtensa-xtregs.c, gdbreplay.c,
9160 Makefile.in, configure.ac: Fix whitespace throughout.
9161 * configure: Regenerate.
9162
a07b2135
PA
91632009-03-22 Pedro Alves <pedro@codesourcery.com>
9164
9165 * inferiors.c (find_inferior): Make it safe for the callback
9166 function to delete the currently iterated inferior.
9167
67cc2626
PA
91682009-03-22 Pedro Alves <pedro@codesourcery.com>
9169
9170 * Makefile.in (linuw_low_h): Move higher.
9171 (thread-db.o): Depend on $(linux_low_h).
9172
54a0b537
PA
91732009-03-17 Pedro Alves <pedro@codesourcery.com>
9174
9175 Rename "process" to "lwp" throughout.
9176
9177 * linux-low.c (all_processes): Rename to...
9178 (all_lwps): ... this.
9179 (inferior_pid, handle_extended_wait, get_stop_pc): Adjust.
9180 (add_process): Rename to ...
9181 (add_lwp): ... this. Adjust.
9182 (linux_create_inferior): Adjust.
9183 (linux_attach_lwp): Adjust.
9184 (linux_attach): Adjust.
9185 (linux_kill_one_process): Rename to ...
9186 (linux_kill_one_lwp): ... this. Adjust.
9187 (linux_kill): Adjust.
9188 (linux_detach_one_process): Rename to ...
9189 (linux_detach_one_lwp): ... this. Adjust.
9190 (linux_detach): Adjust.
9191 (check_removed_breakpoint): Adjust.
9192 (status_pending_p): Adjust.
9193 (linux_wait_for_process): Rename to ...
9194 (linux_wait_for_lwp): ... this. Adjust.
9195 (linux_wait_for_event): Adjust.
9196 (send_sigstop): Adjust.
9197 (wait_for_sigstop): Adjust.
9198 (stop_all_processes): Rename to ...
9199 (stop_all_lwps): ... this.
9200 (linux_resume_one_process): Rename to ...
9201 (linux_resume_one_lwp): ... this. Adjust.
9202 (linux_set_resume_request, linux_continue_one_thread)
9203 (linux_queue_one_thread, resume_status_pending_p)
9204 (usr_store_inferior_registers, regsets_store_inferior_registers)
9205 (linux_request_interrupt, linux_read_offsets, linux_xfer_siginfo):
9206 Adjust.
9207 * linux-low.h (get_process): Rename to ...
9208 (get_lwp): ... this. Adjust.
9209 (get_thread_process): Rename to ...
9210 (get_thread_lwp): ... this. Adjust.
9211 (get_process_thread): Rename to ...
9212 (get_lwp_thread): ... this. Adjust.
9213 (struct process_info): Rename to ...
9214 (struct lwp_info): ... this.
9215 (all_processes): Rename to ...
9216 (all_lwps): ... this.
9217 * proc-service.c (ps_lgetregs): Adjust.
9218 * thread-db.c (thread_db_create_event, find_one_thread)
9219 (maybe_attach_thread, thread_db_get_tls_address): Adjust.
9220
0b16c5cf
PA
92212009-03-14 Pedro Alves <pedro@codesourcery.com>
9222
9223 * server.c (handle_query): Handle "qAttached".
9224
32de4b9d
NS
92252009-03-13 Nathan Sidwell <nathan@codesourcery.com>
9226
9227 * Makefile.in, hostio-errno.c, errno.c, xtensa-xtregs.c: Change to
9228 GPLv3, update license URL.
9229
2aecd87f
DE
92302009-03-01 Doug Evans <dje@google.com>
9231
93efd302 9232 * Makefile.in (INCLUDE_CFLAGS): Add -I$(srcdir)/../common.
2aecd87f
DE
9233 (server_h): Add gdb_signals.h.
9234 (signals.o): Update.
9235 * server.h (target_signal_from_host,target_signal_to_host_p)
9236 (target_signal_to_host,target_signal_to_name): Moved to gdb_signals.h.
9237
86b1f9c5
PM
92382009-02-14 Pierre Muller <muller@ics.u-strasbg.fr>
9239
9240 * remote-utils.c (getpkt): Also generate remote-debug
9241 information if noack_mode is set.
9242
4aa995e1
PA
92432009-02-06 Pedro Alves <pedro@codesourcery.com>
9244
9245 * server.c (handle_query): Report qXfer:siginfo:read and
9246 qXfer:siginfo:write as supported and handle them.
9247 * target.h (struct target_ops) <qxfer_siginfo>: New field.
9248 * linux-low.c (linux_xfer_siginfo): New.
9249 (linux_target_ops): Set it.
9250
62709adf
PA
92512009-01-26 Pedro Alves <pedro@codesourcery.com>
9252
9253 * server.c (gdbserver_usage): Mention --remote-debug.
9254 (main): Accept '--remote-debug' switch.
9255
aef93bd7
DE
92562009-01-18 Doug Evans <dje@google.com>
9257
9258 * regcache.c (new_register_cache): No need to check result of xcalloc.
9259 * server.c (handle_search_memory): Back out calls to xmalloc,
9260 result is checked and error is returned to user upon failure.
9261 (handle_query): Ditto. Add more checks for result of malloc.
9262 (handle_v_cont): Check result of malloc, report error back to
9263 user upon failure.
9264 (handle_v_run): Ditto. Call freeargv.
9265 * server.h (freeargv): Declare.
9266 * utils.c (freeargv): New fn.
9267
54363045
DE
92682009-01-15 Doug Evans <dje@google.com>
9269
f626972c
DE
9270 * gdbreplay.c (perror_with_name): Make arg const char *.
9271 * server.h (target_signal_to_name): Make return type const char *.
0842e787 9272 * thread-db.c (thread_db_err_str): Make return type const char *.
f626972c 9273 * utils.c (perror_with_name): Make arg const char *.
54363045 9274
18aae699
PA
92752009-01-14 Pedro Alves <pedro@codesourcery.com>
9276
9277 * win32-low.c (get_child_debug_event): Issue a final DBG_CONTINUE
9278 when handling a EXIT_PROCESS_DEBUG_EVENT.
9279
ff703abe
JB
92802009-01-06 Joel Brobecker <brobecker@adacore.com>
9281
9282 * gdbreplay.c (gdbreplay_version): Update copyright year.
9283 * server.c (gdbserver_version): Likewise.
9284
f21cc1a2 92852009-01-05 Doug Evans <dje@google.com>
0e21c1ec
DE
9286
9287 * linux-low.c (linux_attach_lwp): Add some comments/fixmes.
f21cc1a2 9288 (handle_extended_wait): Improve comment.
0e21c1ec 9289
bca929d3
DE
92902008-12-13 Doug Evans <dje@google.com>
9291
9292 * utils.c (xmalloc,xcalloc,xstrdup): New fns.
9293 * server.h (ATTR_MALLOC): New macro.
9294 (xmalloc,xcalloc,xstrdup): Declare.
9295 * hostio.c: Replace malloc,calloc,strdup with xmalloc,xcalloc,xstrdup.
9296 * inferiors.c: Ditto.
9297 * linux-low.c: Ditto.
9298 * mem-break.c: Ditto.
9299 * regcache.c: Ditto.
9300 * remote-utils.c: Ditto.
9301 * server.c: Ditto.
9302 * target.c: Ditto.
9303 * win32-low.c: Ditto.
9304
97438e3f
DE
93052008-12-12 Doug Evans <dje@google.com>
9306
896c7fbb
DE
9307 * linux-low.c (linux_wait_for_process): Don't clobber current_inferior
9308 in debugging printf.
9309
97438e3f
DE
9310 * linux-low.c (handle_extended_wait): Simplify, use my_waitpid.
9311
e3b886f8
DE
93122008-12-09 Doug Evans <dje@google.com>
9313
9314 * linux-low.h (struct process_info): Delete member tid, unused.
9315 * thread-db.c (find_one_thread): Update.
9316 (maybe_attach_thread): Update.
9317
07e059b5
VP
93182008-12-02 Pedro Alves <pedro@codesourcery.com>
9319
889bf7c5
PA
9320 * target.h (struct target_ops): Add qxfer_osdata member.
9321 * linux-low.c: Include ctype.h and pwd.h and sys/types.h
9322 and dirent.h.
9323 (linux_qxfer_osdata): New functions.
9324 (linux_target_ops): Register linux_qxfer_osdata as qxfer_osdata
9325 callback.
9326 * server.c (handle_query): Handle "qXfer:osdata:read:".
9327 * remote-utils.c (buffer_grow, buffer_free, buffer_init, buffer_finish)
9328 (buffer_xml_printf): New functions.
9329 * server.h (struct buffer): New.
9330 (buffer_grow_str, buffer_grow_str0): New macros.
9331 (buffer_grow, buffer_free, buffer_init, buffer_finish)
9332 (buffer_xml_printf): Declare.
07e059b5 9333
4cab47ab
DE
93342008-11-24 Doug Evans <dje@google.com>
9335
9336 * Makefile.in (VERSION,DIST,LINT,LINTFLAGS): Delete, unused.
9337
f142445f
DJ
93382008-11-24 Daniel Jacobowitz <dan@codesourcery.com>
9339
9340 * server.c (handle_v_run): Always use the supplied argument list.
9341
d0107bb6 93422008-11-19 Bob Wilson <bob.wilson@acm.org>
889bf7c5 9343
d0107bb6
BW
9344 * xtensa-xtregs.c (XTENSA_ELF_XTREG_SIZE): Change to 4.
9345 (xtensa_regmap_table): Add entry for scompare1.
889bf7c5 9346
2c4ad781
TJB
93472008-11-18 Thiago Jung Bauermann <bauerman@br.ibm.com>
9348
9349 * Makefile.in (powerpc-isa205-32l.o, powerpc-isa205-32l.c,
9350 powerpc-isa205-altivec32l.o, powerpc-isa205-altivec32l.c,
9351 powerpc-isa205-vsx32l.o, powerpc-isa205-vsx32l.c,
9352 powerpc-isa205-64l.o, powerpc-isa205-64l.c,
9353 powerpc-isa205-altivec64l.o, powerpc-isa205-altivec64l.c,
9354 powerpc-isa205-vsx64l.o, powerpc-isa205-vsx64l.c): New targets.
9355 * configure.srv (powerpc*-*-linux*): Add ISA 2.05 object files and
9356 XML target descriptions.
9357 * linux-ppc-low.c (ppc_arch_setup): Init registers with 64-bit FPSCR
9358 when inferior is running on an ISA 2.05 or later processor. Add
9359 special case to return offset for full 64-bit slot of FPSCR when
9360 in 32-bits.
9361
dfb64f85
DJ
93622008-11-14 Daniel Gutson <dgutson@codesourcery.com>
9363
9364 * Makefile.in (SFILES, clean): Added sparc64 files.
9365 (reg-sparc64.o, reg-sparc64.c): New.
9366 * configure.srv (sparc*-*-linux*): New configuration.
9367 * linux-low.c (regsets_fetch_inferior_registers): Swap ptrace
9368 syscall arguments for SPARC.
9369 (regsets_store_inferior_registers): Likewise.
9370 * linux-sparc-low.c: New file.
9371
66b6e1dd
DE
93722008-10-21 Doug Evans <dje@google.com>
9373
9374 * Makefile.in (BFD_DIR,BFD,BFD_SRC,BFD_CFLAGS): Delete.
9375 (READLINE_DIR,READLINE_DEP): Delete.
9376 (INTERNAL_CFLAGS): Update.
9377 (LINTFLAGS): Update.
9378
9b710a42
PA
93792008-10-10 Pedro Alves <pedro@codesourcery.com>
9380
9381 * server.c (handle_v_run): If GDB didn't specify an argv, use the
9382 whole argv from the last run, not just argv[0].
9383
5822d809
PA
93842008-09-08 Pedro Alves <pedro@codesourcery.com>
9385
9386 * regcache.c (new_register_cache): Return NULL if the register
9387 cache size isn't known yet.
9388 (free_register_cache): Avoid dereferencing a NULL regcache.
9389
74aac56f
DJ
93902008-09-04 Daniel Jacobowitz <dan@codesourcery.com>
9391
9392 * configure.srv: Merge MIPS and MIPS64.
9393
400b20f5
MR
93942008-08-24 Maciej W. Rozycki <macro@linux-mips.org>
9395
9396 * Makefile.in (uninstall): Apply $(EXEEXT) too.
9397
677c5bb1
LM
93982008-08-18 Luis Machado <luisgpm@br.ibm.com>
9399
9400 * Makefile.in: Add required vsx dependencies.
9401
9402 * linux-ppc-low: Define PPC_FEATURE_HAS_VSX.
9403 Declare init_registers_powerpc_vsx32l.
9404 Declare init_registers_powerpc_vsx64l.
9405 Define PTRACE_GETVSXREGS and PTRACE_SETVSXREGS.
9406 (ppc_arch_setup): Check for VSX in hwcap.
9407 (ppc_fill_vsxregset): New function.
9408 (ppc_store_vsxregset): New function.
9409 Add new VSX entry in regset_info target_regsets.
9410
9411 * configure.srv: Add new VSX dependencies.
9412
a6f3e723
SL
94132008-08-12 Pedro Alves <pedro@codesourcery.com>
9414
9415 * remote-utils.c (noack_mode, transport_is_reliable): New globals.
9416 (remote_open): Set or clear transport_is_reliable.
9417 (putpkt_binary): Don't expect acks in noack mode.
9418 (getpkt): Don't send ack/nac in noack mode.
9419 * server.c (handle_general_set): Handle QStartNoAckMode.
9420 (handle_query): If connected by tcp pass QStartNoAckMode+ in
9421 qSupported.
9422 (main): Reset noack_mode on every connection.
9423 * server.h (noack_mode): Declare.
9424
a417dc56
RW
94252008-08-07 Ralf Wildenhues <Ralf.Wildenhues@gmx.de>
9426
9427 * Makefile.in (GDBREPLAY_OBS): New variable.
9428 (gdbreplay$(EXEEXT)): Use it to avoid unportable $^.
9429
3221518c
UW
94302008-08-05 Ulrich Weigand <uweigand@de.ibm.com>
9431 Daniel Jacobowitz <dan@codesourcery.com>
9432
9433 * linux-low.c (linux_resume_one_process): Ignore ESRCH.
9434 (usr_store_inferior_registers): Likewise.
9435 (regsets_store_inferior_registers): Likewise.
9436
ec56be1b
PA
94372008-07-31 Rolf Jansen <rj@surtec.com>
9438 Pedro Alves <pedro@codesourcery.com>
9439
9440 * configure.ac: Check for memmem declaration.
9441 * server.c [HAVE_MALLOC_H]: Include malloc.h.
9442 (disable_packet_vCont, disable_packet_Tthread, disable_packet_qC)
9443 (disable_packet_qfThreadInfo): Unconditionally compile.
9444 * server.h [!HAVE_DECL_MEMMEM]: Declare memmem.
9445 * configure, config.in: Regenerate.
9446
2fe5e3ff
DE
94472008-07-28 Doug Kwan <dougkwan@google.com>
9448
9449 * linux-low.c (sys/dir.h, sys/user.h): Remove includes.
9450 (linux_write_memory): Remove declaration of errno.
9451
836acd6d
UW
94522008-07-12 Ulrich Weigand <uweigand@de.ibm.com>
9453
9454 * linux-low.c (handle_extended_wait): Do not use "status"
9455 variable uninitialized.
9456
aeba519e
PA
94572008-07-07 Pedro Alves <pedro@codesourcery.com>
9458
9459 * server.c (handle_v_attach): Inhibit reporting dll changes.
9460
db42f210
PA
94612008-06-27 Pedro Alves <pedro@codesourcery.com>
9462
9463 * remote-utils.c (prepare_resume_reply): If requested, don't
9464 output "thread:TID" in the T stop reply.
9465
9466 * server.c (disable_packet_vCont, disable_packet_Tthread)
9467 (disable_packet_qC, disable_packet_qfThreadInfo): New globals.
9468 (handle_query): If requested, disable support for qC, qfThreadInfo
9469 and qsThreadInfo.
9470 (handle_v_requests): If requested, disable support for vCont.
9471 (gdbserver_show_disableable): New.
9472 (main): Handle --disable-packet and --disable-packet=LIST.
9473
9474 * server.h (disable_packet_vCont, disable_packet_Tthread)
9475 (disable_packet_qC, disable_packet_qfThreadInfo): Declare.
9476
8e4c5421
CD
94772008-06-20 Carlos O'Donell <carlos@codesourcery.com>
9478
9479 * server.c (gdbserver_usage): Mention --version.
9480
6e23a804
DJ
94812008-06-06 Daniel Jacobowitz <dan@codesourcery.com>
9482
9483 * Makefile.in (gdbreplay.o): New rule.
9484
90aa6a40
JM
94852008-06-06 Joseph Myers <joseph@codesourcery.com>
9486
9487 * gdbreplay.c (gdbreplay_version): Say gdbreplay in version
9488 message, not gdbserver.
9489
c16158bc 94902008-06-05 Vladimir Prus <vladimir@codesourcery.com>
889bf7c5
PA
9491 Nathan Sidwell <nathan@codesourcery.com>
9492 Joseph Myers <joseph@codesourcery.com>
c16158bc
JM
9493
9494 * acinclude.m4: Include ../../config/acx.m4.
9495 * configure.ac: Use ACX_PKGVERSION and ACX_BUGURL.
9496 * configure, config.in: Regenerate.
9497 * Makefile.in (gdbreplay$(EXEEXT)): Add version.o.
9498 * server.c (gdbserver_version): Print PKGVERSION.
9499 (gdbsrever_usage): Add stream parameter. Print REPORT_BUGS_TO.
9500 (main): Adjust gdbserver_usage calls.
9501 * gdbreplay.c (version, host_name): Add declarations.
9502 (gdbreplay_version, gdbreplay_usage): New.
9503 (main): Accept --version and --help options.
9504
aeb75bf5
DJ
95052008-06-04 Daniel Jacobowitz <dan@codesourcery.com>
9506
9507 * linux-arm-low.c (thumb_breakpoint, thumb_breakpoint_len): New.
9508 (arm_breakpoint_at): Handle Thumb.
9509 (the_low_target): Add comment.
9510
76b233dd
UW
95112008-05-29 Ulrich Weigand <uweigand@de.ibm.com>
9512
9513 * linux-ppc-low.c (ppc_collect_ptrace_register): Clear buffer.
9514
08388c79
DE
95152008-05-09 Doug Evans <dje@google.com>
9516
a3c83fae
DE
9517 * server.h (decode_search_memory_packet): Declare.
9518 * remote-utils.c (decode_search_memory_packet): New fn.
9519 * server.c (handle_search_memory_1): New fn.
08388c79
DE
9520 (handle_search_memory): New fn.
9521 (handle_query): Process qSearch:memory packets.
9522
bb9c3d36
UW
95232008-05-08 Ulrich Weigand <uweigand@de.ibm.com>
9524
9525 * regcache.c (registers_length): Remove.
9526 (set_register_cache): Verify that PBUFSIZ is large enough to hold a
9527 full register packet.
9528 * regcache.h (registers_length): Remove prototype.
9529 * server.h (PBUFSIZ): Define to 16384.
9530
7284e1be
UW
95312008-05-03 Ulrich Weigand <uweigand@de.ibm.com>
9532
9533 * configure.srv (powerpc*-*-linux*): Set srv_regobj to
9534 powerpc-32l.o, powerpc-altivec32l.o, powerpc-e500l.o,
9535 powerpc-64l.o, and powerpc-altivec64l.o.
9536 Remove rs6000/powerpc-32.xml, rs6000/powerpc-64.xml, and
9537 rs6000/powerpc-e500.xml; add rs6000/powerpc-32l.xml,
9538 rs6000/powerpc-altivec32l.xml, rs6000/powerpc-e500l.xml,
9539 rs6000/powerpc-64l.xml, rs6000/powerpc-altivec64l.xml,
9540 rs6000/power-linux.xml, and rs6000/power64-linux.xml
9541 to srv_xmlfiles.
9542
9543 * Makefile.in (reg-ppc.o, reg-ppc.c): Remove, replace by ...
9544 (powerpc-32l.o, powerpc-32l.c): ... these new rules.
9545 (powerpc-32.o, powerpc-32.c): Remove, replace by ...
9546 (powerpc-altivec32l.o, powerpc-altivec32l.c): ... these new rules.
9547 (powerpc-e500.o, powerpc-e500.c): Remove, replace by ...
9548 (powerpc-e500l.o, powerpc-e500l.c): ... these new rules.
9549 (reg-ppc64.o, reg-ppc64.c): Remove, replace by ...
9550 (powerpc-64l.o, powerpc-64l.c): ... these new rules.
9551 (powerpc-64.o, powerpc-64.c): Remove, replace by ...
9552 (powerpc-altivec64l.o, powerpc-altivec64l.c): ... these new rules.
9553 (clean): Update.
9554
9555 * linux-ppc-low.c (init_registers_ppc): Remove, replace by ...
9556 (init_registers_powerpc_32l): ... this new prototype.
9557 (init_registers_powerpc_32): Remove, replace by ...
9558 (init_registers_powerpc_altivec32l): ... this new prototype.
9559 (init_registers_powerpc_e500): Remove, replace by ...
9560 (init_registers_powerpc_e500l): ... this new prototype.
9561 (init_registers_ppc64): Remove, replace by ...
9562 (init_registers_powerpc_64l): ... this new prototype.
9563 (init_registers_powerpc_64): Remove, replace by ...
9564 (init_registers_powerpc_altivec64l): ... this new prototype.
9565 (ppc_num_regs): Set to 73.
9566 (PT_ORIG_R3, PT_TRAP): Define if necessary.
9567 (ppc_regmap, ppc_regmap_e500): Add values for orig_r3 and trap.
9568 (ppc_cannot_store_register): Handle orig_r3 and trap.
9569 (ppc_arch_setup): Update init_registers_... calls.
9570 (ppc_fill_gregset): Handle orig_r3 and trap.
9571
9572 * inferiors.c (clear_inferiors): Reset current_inferior.
9573
fdc59709
PB
95742008-04-23 Paolo Bonzini <bonzini@gnu.org>
9575
889bf7c5
PA
9576 * acinclude.m4: Add override.m4.
9577 * configure: Regenerate.
fdc59709 9578
c9b2f845
UW
95792008-04-21 Ulrich Weigand <uweigand@de.ibm.com>
9580
9581 * linux-ppc-low.c (ppc_arch_setup): Reset ppc_hwcap after the
9582 initial call to init_register_ppc64.
9583
550512b8
UW
95842008-04-21 Ulrich Weigand <uweigand@de.ibm.com>
9585
43aaf8b6
PA
9586 * configure.srv (powerpc64-*-linux*, powerpc-*-linux*): Merge into
9587 single powerpc*-*-linux* case.
550512b8
UW
9588 (s390-*-linux*, s390x-*-linux*): Merge into single s390*-*-linux* case.
9589
b6430ec3
UW
95902008-04-17 Ulrich Weigand <uweigand@de.ibm.com>
9591
9592 * configure.srv [powerpc64-*-linux*]: Remove powerpc-e500.o from
889bf7c5 9593 srv_regobj. Remove rs6000/powerpc-e500.xml and rs6000/power-spe.xml
b6430ec3
UW
9594 from reg_xmlfiles.
9595 * linux-ppc-low.c: Include <elf.h>.
9596 (PPC_FEATURE_HAS_ALTIVEC, PPC_FEATURE_HAS_SPE): Define.
9597 (ppc_hwcap): New global variable.
9598 (ppc_regmap): Remove __SPE__ #ifdef sections.
9599 (ppc_regmap_e500): New global variable.
9600 (ppc_cannot_store_register): Update __SPE__ special case.
9601 (ppc_get_hwcap): New function.
9602 (ppc_arch_setup): Use it to determine whether inferior supports
9603 AltiVec or SPE registers. Set the_low_target.regmap if appropriate.
9604 (ppc_fill_vrregset, ppc_store_vrregset): Define unconditionally.
9605 Do not access registers if target does not support AltiVec.
9606 (ppc_fill_evrregset, ppc_store_evrregset): Define unconditionally.
9607 Do not access registers if target does not support SPE.
9608 (target_regsets): Unconditionally include AltiVec and SPE regsets.
9609
52fa2412
UW
96102008-04-17 Daniel Jacobowitz <dan@codesourcery.com>
9611
9612 * linux-low.c (disabled_regsets, num_regsets): New.
9613 (use_regsets_p): Delete.
9614 (linux_wait_for_process): Clear disabled_regsets.
9615 (regsets_fetch_inferior_registers): Check and set it.
9616 (regsets_store_inferior_registers): Likewise.
9617 (linux_fetch_registers, linux_store_registers): Do not use
9618 use_regsets_p.
9619 (initialize_low): Allocate disabled_regsets.
9620
e28b3332
DJ
96212008-04-14 Daniel Jacobowitz <dan@codesourcery.com>
9622
9623 * Makefile.in (LIBOBJS): New.
9624 (OBS): Use LIBOBJS.
9625 (memmem.o): New rule.
9626 * configure.ac: Use AC_CONFIG_LIBOBJ_DIR and check for memmem.
9627 * configure: Regenerated.
9628
4536995d
UW
96292008-04-04 Ulrich Weigand <uweigand@de.ibm.com>
9630
9631 * server.c (handle_query): Never return "unsupported" for
9632 qXfer:features:read queries.
9633
221c031f
UW
96342008-03-27 Ulrich Weigand <uweigand@de.ibm.com>
9635
9636 * server.c (get_features_xml): Fix inverted condition.
9637 (handle_query): Always support qXfer:feature:read.
9638
ccd213ac
DJ
96392008-03-10 Daniel Jacobowitz <dan@codesourcery.com>
9640
9641 * server.c (wrapper_argv): New.
9642 (start_inferior): Handle wrapper_argv. If set, expect an extra
9643 trap.
9644 (gdbserver_usage): Document --wrapper.
9645 (main): Parse --wrapper.
9646
6fe305f7
UW
96472008-02-28 Ulrich Weigand <uweigand@de.ibm.com>
9648
9649 * configure.srv [powerpc64-*-linux*]: Add all files mentioned for
9650 powerpc-*-linux* to srv_regobj and reg_xmlfiles.
9651 * linux-ppc-low.c (ppc_get_pc): Support bi-arch operation.
9652 (ppc_set_pc): Likewise.
9653 (ppc_arch_setup): New function.
9654 (ppc_fill_gregset): Call ppc_collect_ptrace_register instead
9655 of collect_register.
889bf7c5 9656 (the_low_target): Use ppc_arch_setup as arch_setup initializer.
6fe305f7 9657
5b0a002e
UW
96582008-02-28 Ulrich Weigand <uweigand@de.ibm.com>
9659
9660 * configure.srv [powerpc64-*-linux*]: Use linux-ppc-low.o
9661 instead of linux-ppc64-low.o.
9662 * linux-ppc64-low.c: Remove file.
9663 * Makefile.in (SFILES): Remove linux-ppc64-low.c.
9664 (linux-ppc64-low.o): Remove rule.
9665
9666 * linux-ppc-low.c (init_registers_ppc64): Add prototype.
9667 (init_registers_powerpc_64): Likewise.
9668 (ppc_regmap): Conditionally define depending on __powerpc64__.
9669 (ppc_cannot_store_register): Do not special-case "fpscr" when
9670 compiled on __powerpc64__.
9671 (ppc_collect_ptrace_register): New function.
9672 (ppc_supply_ptrace_register): New function.
9673 (ppc_breakpoint): Change type to "unsigned int".
9674 (ppc_breakpoint_at): Change type of "insn" to "unsigned int".
9675 (the_low_target): Conditionally provide initializers for the
889bf7c5 9676 arch_setup member depending on __powerpc64__. Install
5b0a002e
UW
9677 collect_ptrace_register and supply_ptrace_register members.
9678
9b4b61c8
UW
96792008-02-28 Ulrich Weigand <uweigand@de.ibm.com>
9680
9681 * regcache.h (gdbserver_xmltarget): Add extern declaration.
9682 * server.c (gdbserver_xmltarget): Define.
9683 (get_features_xml): Use it to replace "target.xml" and arch_string.
9684
9685 * configure.srv: Remove srv_xmltarget. Add XML files that were
9686 mentioned there to srv_xmlfiles instead. Remove conditional tests
9687 on gdb_cv_arm_iwmmxt, gdb_cv_ppc_altivec, gdb_cv_ppc_spe; set
9688 srv_xmlfiles and srv_regobj to include all possible choices.
9689 * configure.ac (srv_xmltarget): Remove.
9690 (srv_xmlfiles): Do not add "target.xml".
9691 (gdb_cv_arm_iwmmxt, gdb_cv_ppc_altivec, gdb_cv_ppc_spe): Remove
9692 checks for supplementary target information.
9693 * configure: Regenerate.
9694 * Makefile.in (XML_TARGET): Remove.
9695 (target.xml): Remove rule.
9696 (clean): Do not clean up target.xml.
9697 (.PRECIOUS): Do not mention target.xml.
9698
9699 * target.h (struct target_ops): Remove arch_string member.
9700 * linux-low.c (linux_arch_string): Remove.
9701 (linux_target_ops): Remove arch_string initializer.
9702 * linux-low.h (struct linux_target_ops): Remove arch_string member.
9703 * linux-i386-low.c (the_low_target): Remove arch_string initializer.
9704 * linux-x86-64-low.c (the_low_target): Remove arch_string initializer.
9705 * spu-low.c (spu_arch_string): Remove.
9706 (spu_target_ops): Remove arch_string initializer.
9707 * win32-low.c (win32_arch_string): Remove.
9708 (win32_target_ops): Remove arch_string initializer.
9709 * win32-low.h (struct win32_target_ops): Remove arch_string member.
9710 * win32-arm-low.c (the_low_target): Remove arch_string initializer.
9711 * win32-i368-low.c (the_low_target): Remove arch_string initializer.
9712
ee1a7ae4
UW
97132008-02-27 Ulrich Weigand <uweigand@de.ibm.com>
9714
9715 * linux-low.h (struct linux_target_ops): Replace left_pad_xfer field
9716 by collect_ptrace_register and supply_ptrace_register hooks.
9717 * linux-low.c (fetch_register): Use supply_ptrace_register callback
9718 instead of checking for the_low_target.left_pad_xfer.
9719 (usr_store_inferior_registers): Use collect_ptrace_register callback
9720 instead of checking for the_low_target.left_pad_xfer.
9721
9722 * linux-s390-low.c (s390_collect_ptrace_register): New function.
9723 (s390_supply_ptrace_register): Likewise.
9724 (s390_fill_gregset): Call s390_collect_ptrace_register.
9725 (the_low_target): Update.
9726
9727 * linux-ppc64-low.c (ppc_collect_ptrace_register): New function.
9728 (ppc_supply_ptrace_register): Likewise.
9729 (the_low_target): Update.
9730
9731 * linux-i386-low.c (the_low_target): Update.
9732 * linux-x86-64-low.c (the_low_target): Update.
9733
d61ddec4
UW
97342008-02-27 Ulrich Weigand <uweigand@de.ibm.com>
9735
9736 * configure.srv [s390x-*-linux*]: Set srv_regobj to include both
9737 reg-s390.o and reg-s390x.o.
9738
9739 * linux-low.c (new_inferior): New global variable.
9740 (linux_create_inferior, linux_attach): Set it.
9741 (linux_wait_for_process): Call the_low_target.arch_setup after the
9742 target has stopped for the first time.
9743 (initialize_low): Do not call the_low_target.arch_setup.
9744
9745 * linux-s390-low.c (s390_get_pc): Support bi-arch operation.
9746 (s390_set_pc): Likewise.
9747 (s390_arch_setup): New function.
9748 (the_low_target): Use s390_arch_setup as arch_setup routine.
9749
9750 * regcache.c (realloc_register_cache): New function.
9751 (set_register_cache): Call it for each existing regcache.
9752
d05b4ac3
UW
97532008-02-27 Ulrich Weigand <uweigand@de.ibm.com>
9754
9755 * server.h (init_registers): Remove prototype.
9756
9757 * linux-low.h (struct linux_target_ops): Add arch_setup field.
9758 * linux-low.c (initialize_low): Call the_low_target.arch_setup ()
9759 instead of init_registers ().
9760 * linux-arm-low.c (init_registers_arm): Add prototype.
9761 (init_registers_arm_with_iwmmxt): Likewise.
9762 (the_low_target): Add initializer for arch_setup field.
9763 * linux-cris-low.c (init_registers_cris): Add prototype.
9764 (the_low_target): Add initializer for arch_setup field.
9765 * linux-crisv32-low.c (init_registers_crisv32): Add prototype.
9766 (the_low_target): Add initializer for arch_setup field.
9767 * linux-i386-low.c (init_registers_i386_linux): Add prototype.
9768 (the_low_target): Add initializer for arch_setup field.
9769 * linux-ia64-low.c (init_registers_ia64): Add prototype.
9770 (the_low_target): Add initializer for arch_setup field.
9771 * linux-m32r-low.c (init_registers_m32r): Add prototype.
9772 (the_low_target): Add initializer for arch_setup field.
9773 * linux-m68k-low.c (init_registers_m68k): Add prototype.
9774 (the_low_target): Add initializer for arch_setup field.
9775 * linux-mips-low.c (init_registers_mips_linux): Add prototype.
9776 (init_registers_mips64_linux): Likewise.
9777 (the_low_target): Add initializer for arch_setup field.
9778 * linux-ppc-low.c (init_registers_ppc): Add prototype.
9779 (init_registers_powerpc_32, init_registers_powerpc_e500): Likewise.
9780 (the_low_target): Add initializer for arch_setup field.
9781 * linux-ppc64-low.c (init_registers_ppc64): Add prototype.
9782 (init_registers_powerpc_64): Likewise.
9783 (the_low_target): Add initializer for arch_setup field.
9784 * linux-s390-low.c (init_registers_s390): Add prototype.
9785 (init_registers_s390x): Likewise.
9786 (the_low_target): Add initializer for arch_setup field.
9787 * linux-sh-low.c (init_registers_sh): Add prototype.
9788 (the_low_target): Add initializer for arch_setup field.
9789 * linux-x86-64-low.c (init_registers_x86_64_linux): Add prototype.
9790 (the_low_target): Add initializer for arch_setup field.
9791 * linux-xtensa-low.c (init_registers_xtensa): Add prototype.
9792 (the_low_target): Add initializer for arch_setup field.
9793
9794 * win32-low.h (struct win32_target_ops): Add arch_setup field.
9795 * win32-low.c (initialize_low): Call the_low_target.arch_setup ()
9796 instead of init_registers ().
9797 * win32-arm-low.c (init_registers_arm): Add prototype.
9798 (the_low_target): Add initializer for arch_setup field.
9799 * win32-i386-low.c (init_registers_i386): Add prototype.
9800 (the_low_target): Add initializer for arch_setup field.
9801
9802 * spu-low.c (init_registers_spu): Add prototype.
9803 (initialize_low): Call initialie_registers_spu () instead of
9804 initialize_registers ().
9805
fd96d250
PA
98062008-02-19 Pedro Alves <pedro@codesourcery.com>
9807
9808 * server.c (handle_v_requests): When handling the vRun and vAttach
9809 packets, if already debugging a process, don't kill it. Return an
9810 error instead.
9811
d41b6bb4
DJ
98122008-02-17 Daniel Jacobowitz <dan@codesourcery.com>
9813
9814 * server.c (handle_query): Correct length check.
9815
5ac588cf
PA
98162008-02-14 Pedro Alves <pedro_alves@portugalmail.pt>
9817
9818 * win32-low.c (do_initial_child_stuff): Add process handle
9819 parameter. Set current_process_handle and current_process_id from the
9820 parameters. Clear globals.
9821 (win32_create_inferior): Don't set current_process_handle and
9822 current_process_id here. Instead pass them on the call to
9823 do_initial_child_stuff.
9824 (win32_attach): Likewise.
9825 (win32_clear_inferiors): New.
9826 (win32_kill): Don't close the current process handle or the
9827 current thread handle here. Instead call win32_clear_inferiors.
9828 (win32_detach): Don't open a new handle to the process. Call
9829 win32_clear_inferiors.
9830 (win32_join): Don't rely on current_process_handle; open a new
9831 handle using the process id.
9832 (win32_wait): Call win32_clear_inferiors when the inferior process
9833 has exited.
9834
ecd7ecbc
DJ
98352008-02-14 Daniel Jacobowitz <dan@codesourcery.com>
9836
9837 * server.c (monitor_show_help): Add "exit".
9838
1525d545
MG
98392008-02-11 Maxim Grigoriev <maxim2405@gmail.com>
9840
ecd7ecbc 9841 * Makefile.in (SFILES): Add linux-xtensa-low.c.
1525d545
MG
9842 (clean): Add reg-xtensa.c.
9843 (linux-xtensa-low.o, reg-xtensa.o, reg-xtensa.c): New dependencies.
ecd7ecbc
DJ
9844 * configure.srv (xtensa*-*-linux*) New target.
9845 * linux-xtensa-low.c: New.
9846 * xtensa-xtregs.c: New.
1525d545 9847
59a016f0
PA
98482008-02-01 Pedro Alves <pedro_alves@portugalmail.pt>
9849
9850 * hostio.c: Don't include errno.h.
9851 (errno_to_fileio_errno): Move to hostio-errno.
9852 * hostio.c: (hostio_error): Remove the error parameter. Defer the
9853 error number outputting to the target->hostio_last_error callback.
9854 (hostio_packet_error): Use FILEIO_EINVAL directly.
9855 (handle_open, handle_pread, hostio_error, handle_unlink): Update
9856 calls to hostio_error.
9857 * hostio-errno.c: New.
9858 * server.h (hostio_last_error_from_errno): Declare.
9859 * target.h (target_ops): Add hostio_last_error member.
9860 * linux-low.c (linux_target_op): Register hostio_last_error_from_errno
9861 as hostio_last_error handler.
889bf7c5 9862 * spu-low.c (spu_target_ops): Likewise.
59a016f0
PA
9863 * win32-low.c [_WIN32_WCE] (win32_error_to_fileio_error)
9864 (wince_hostio_last_error): New functions.
9865 (win32_target_ops) [_WIN32_WCE]: Register wince_hostio_last_error
9866 as hostio_last_error handler.
9867 (win32_target_ops) [!_WIN32_WCE]: Register
9868 hostio_last_error_from_errno as hostio_last_error handler.
9869 * Makefile.in (SFILES): Add hostio.c and hostio-errno.c.
9870 (hostio-errno.o): New rule.
9871 * configure.ac (GDBSERVER_DEPFILES): Add $srv_hostio_err_objs.
9872 * configure.srv (srv_hostio_err_objs): New variable. Default to
9873 hostio-errno.o.
9874 (arm*-*-mingw32ce*): Set srv_hostio_err_objs to "".
9875 * configure: Regenerate.
9876
2d717e4f
DJ
98772008-01-29 Daniel Jacobowitz <dan@codesourcery.com>
9878
9879 * linux-low.c (linux_attach_lwp): Do not _exit after errors.
9880 (linux_kill, linux_detach): Clean up the process list.
9881 * remote-utils.c (remote_open): Improve port number parsing.
9882 (putpkt_binary, input_interrupt): Only send interrupts if the target
9883 is running.
9884 * server.c (extended_protocol): Make static.
9885 (attached): Define earlier.
9886 (exit_requested, response_needed, program_argv): New variables.
9887 (target_running): New.
9888 (start_inferior): Clear attached here.
9889 (attach_inferior): Set attached here.
9890 (require_running): Define.
9891 (handle_query): Use require_running and target_running. Implement
9892 "monitor exit".
9893 (handle_v_attach, handle_v_run): New.
9894 (handle_v_requests): Use require_running. Handle vAttach and vRun.
9895 (gdbserver_usage): Update.
9896 (main): Redo argument parsing. Handle --debug and --multi. Handle
9897 --attach along with other options or after the port. Save
9898 program_argv. Support no initial program. Resynchronize
9899 communication with GDB after an error. Handle "monitor exit".
9900 Use require_running and target_running. Always allow the extended
9901 protocol. Do not error out for Hc0 or Hc-1. Do not automatically
9902 restart in extended mode.
9903 * README: Refer to the GDB manual. Update --attach usage.
9904
7407e2de
AS
99052007-12-20 Andreas Schwab <schwab@suse.de>
9906
9907 * linux-low.c (STACK_SIZE): Define.
9908 (linux_tracefork_child): Use it. Use __clone2 on ia64.
9909 (linux_test_for_tracefork): Likewise.
9910
b65d95c5
DJ
99112007-12-18 Daniel Jacobowitz <dan@codesourcery.com>
9912
9913 * linux-low.c (linux_wait_for_event): Update messages. Do not
9914 reinsert auto-delete breakpoints.
9915 * mem-break.c (struct breakpoint): Change return type of handler to
9916 int.
9917 (set_breakpoint_at): Update handler type.
9918 (reinsert_breakpoint_handler): Return 1 instead of calling
9919 delete_breakpoint.
9920 (reinsert_breakpoint_by_bp): Check for the original breakpoint before
9921 setting a new one.
9922 (check_breakpoints): Delete auto-delete breakpoints and return 2.
9923 * mem-break.h (set_breakpoint_at): Update handler type.
9924 * thread-db.c (thread_db_create_event, thread_db_create_event): Update.
9925 * win32-low.c (auto_delete_breakpoint): New.
9926 (get_child_debug_event): Use it.
9927
4e799345
DJ
99282007-12-16 Daniel Jacobowitz <dan@codesourcery.com>
9929
9930 * configure.ac: Check for pread and pwrite.
9931 * hostio.c (handle_pread): Fall back to lseek and read.
9932 (handle_pwrite): Fall back to lseek and write.
9933 * config.in, configure: Regenerated.
9934
27524b67
DJ
99352007-12-07 Daniel Jacobowitz <dan@codesourcery.com>
9936
9937 * server.c (myresume): Add own_buf argument.
9938 (main): Update calls.
9939
a20d5e98
DJ
99402007-12-06 Daniel Jacobowitz <dan@codesourcery.com>
9941
9942 * linux-low.c (linux_wait, linux_resume): Do not handle async I/O.
9943 * remote-utils.c (remote_open): Do not call disable_async_io.
9944 (block_async_io): Delete.
9945 (unblock_async_io): Make static.
9946 (initialize_async_io): New.
9947 * server.c (handle_v_cont): Handle async I/O here.
9948 (myresume): Likewise. Move other common resume tasks here...
9949 (main): ... from here. Call initialize_async_io. Disable async
9950 I/O before the main loop.
9951 * server.h (initialize_async_io): Declare.
9952 (block_async_io, unblock_async_io): Delete prototypes.
9953 * spu-low.c (spu_resume, spu_wait): Do not handle async I/O here.
9954
b79d787e
DJ
99552007-12-06 Mick Davis <mickd@goanna.iinet.net.au>
9956
9957 * remote-utils.c (readchar): Allow binary data in received messages.
9958
d97903b2
PA
99592007-12-03 Pedro Alves <pedro_alves@portugalmail.pt>
9960
9961 * win32-low.c (attaching): New global.
9962 (win32_create_inferior): Clear the `attaching' global.
9963 (win32_attach): Set the `attaching' global.
9964 (get_child_debug_event) [_WIN32_WCE]: Stop the inferior when
9965 attaching. Only set a breakpoint at the entry point if not
9966 attaching.
9967
311de423
PA
99682007-12-03 Pedro Alves <pedro_alves@portugalmail.pt>
9969
9970 * server.c (main): Don't report dll events on the initial
9971 connection on attaches.
9972
6c2d16d2
PA
99732007-12-03 Pedro Alves <pedro_alves@portugalmail.pt>
9974
9975 * server.c (main): Relax numerical bases supported for the pid of
9976 the --attach command line argument.
9977
5ca906e6
PA
99782007-12-03 Pedro Alves <pedro_alves@portugalmail.pt>
9979
9980 * win32-low.c (win32_attach): Call OpenProcess before
9981 DebugActiveProcess, not after. Add last error output to error
9982 call.
9983
9c6c8194
PA
99842007-12-03 Pedro Alves <pedro_alves@portugalmail.pt>
9985
9986 * win32-low.c (win32_get_thread_context)
9987 (win32_set_thread_context): New functions.
9988 (thread_rec): Use win32_get_thread_context.
9989 (continue_one_thread, win32_resume): Use win32_set_thread_context.
9990 * win32-low.h (win32_thread_info) [_WIN32_WCE]: Add `base_context'
9991 field.
9992
4d5d1aaa
PA
99932007-12-03 Leo Zayas
9994 Pedro Alves <pedro_alves@portugalmail.pt>
9995
9996 * win32-low.c (soft_interrupt_requested, faked_breakpoint): New
9997 global variables.
9998 (child_add_thread): Minor cleanup.
9999 (child_continue): Resume artificially suspended threads before
10000 calling ContinueDebugEvent.
10001 (suspend_one_thread): New.
10002 (fake_breakpoint_event): New.
10003 (get_child_debug_event): Change return type to int. Check here if
10004 gdb sent an interrupt request. If a soft interrupt was requested,
10005 fake a breakpoint event. Return 0 if there is no event to handle,
10006 and 1 otherwise.
10007 (win32_wait): Don't check here if gdb sent an interrupt request.
10008 Ensure there is a valid event to handle.
10009 (win32_request_interrupt): Add soft interruption method as last
10010 resort.
10011
c436e841
PA
100122007-12-03 Leo Zayas
10013 Pedro Alves <pedro_alves@portugalmail.pt>
10014
10015 * win32-low.h (win32_thread_info): Add descriptions to the
10016 structure members. Replace `suspend_count' counter by a
10017 `suspended' flag.
10018 * win32-low.c (thread_rec): Update condition of when to get the
10019 context from the inferior. Rely on ContextFlags being set if it
10020 has already been retrieved. Only suspend the inferior thread if
10021 we haven't already. Warn if that fails.
10022 (continue_one_thread): s/suspend_count/suspended/. Only call
10023 ResumeThread once. Warn if that fails.
10024
e7b5fa67
PA
100252007-12-02 Pedro Alves <pedro_alves@portugalmail.pt>
10026
10027 * win32-low.c (win32_wait): Don't read from the inferior when it
10028 has already exited.
10029
a385171d
PA
100302007-12-02 Pedro Alves <pedro_alves@portugalmail.pt>
10031
10032 * Makefile.in (win32_low_h): New variable.
10033 (win32-low.o): Add dependency on $(win32_low_h).
10034 (win32-arm-low.o, win32-i386-low.o): New rules.
10035
f80c84b3
DJ
100362007-11-30 Daniel Jacobowitz <dan@codesourcery.com>
10037
10038 * hostio.c: Correct copyright year.
10039
a6b151f1
DJ
100402007-11-30 Daniel Jacobowitz <dan@codesourcery.com>
10041
10042 * Makefile.in (OBS): Add hostio.o.
10043 (hostio.o): New rule.
10044 * server.h (handle_vFile): Declare.
10045 * hostio.c: New file.
10046 * server.c (handle_v_requests): Take packet_len and new_packet_len
10047 for binary packets. Call handle_vFile.
10048 (main): Update call to handle_v_requests.
10049
f9387fc3
DJ
100502007-11-05 Daniel Jacobowitz <dan@codesourcery.com>
10051
10052 * linux-low.c: Include <sched.h>.
10053
51c2684e
DJ
100542007-11-01 Daniel Jacobowitz <dan@codesourcery.com>
10055
10056 * linux-low.c (linux_tracefork_grandchild): New.
10057 (linux_tracefork_child): Use clone.
10058 (linux_test_for_tracefork): Use clone; allocate and free a stack.
10059
75f83163
JB
100602007-10-31 Joel Brobecker <brobecker@adacore.com>
10061
10062 * Makefile.in: Use $(SHELL) instead of "sh" to call regdat.sh.
10063
da5898ce
DJ
100642007-10-24 Daniel Jacobowitz <dan@codesourcery.com>
10065
10066 * linux-low.c (handle_extended_wait): Handle unexpected signals.
10067
24a09b5f
DJ
100682007-10-23 Daniel Jacobowitz <dan@codesourcery.com>
10069
10070 * inferiors.c (change_inferior_id): Delete.
10071 (add_pid_to_list, pull_pid_from_list): New.
10072 * linux-low.c (PTRACE_SETOPTIONS, PTRACE_GETEVENTMSG)
10073 (PTRACE_O_TRACESYSGOOD, PTRACE_O_TRACEFORK, PTRACE_O_TRACEVFORK)
10074 (PTRACE_O_TRACECLONE, PTRACE_O_TRACEEXEC, PTRACE_O_TRACEVFORKDONE)
10075 (PTRACE_O_TRACEEXIT, PTRACE_EVENT_FORK, PTRACE_EVENT_VFORK)
10076 (PTRACE_EVENT_CLONE, PTRACE_EVENT_EXEC, PTRACE_EVENT_VFORK_DONE)
10077 (PTRACE_EVENT_EXIT, __WALL): Provide default definitions.
10078 (stopped_pids, thread_db_active, must_set_ptrace_flags): New variables.
10079 (using_threads): Always set to 1.
10080 (handle_extended_wait): New.
10081 (add_process): Do not set TID.
10082 (linux_create_inferior): Set must_set_ptrace_flags.
10083 (linux_attach_lwp): Remove TID argument. Do not check using_threads.
10084 Use PTRACE_SETOPTIONS. Call new_thread_notify. Update all callers.
10085 (linux_thread_alive): Rename TID argument to LWPID.
10086 (linux_wait_for_process): Handle unknown processes. Do not use TID.
10087 (linux_wait_for_event): Do not use TID or check using_threads. Update
10088 call to dead_thread_notify. Call handle_extended_wait.
10089 (linux_create_inferior): Use PTRACE_SETOPTIONS.
10090 (send_sigstop): Delete sigstop_sent.
10091 (wait_for_sigstop): Avoid TID.
10092 (linux_supports_tracefork_flag, linux_tracefork_child, my_waitpid)
10093 (linux_test_for_tracefork): New.
10094 (linux_lookup_signals): Use thread_db_active and
10095 linux_supports_tracefork_flag.
10096 (initialize_low): Use thread_db_active and linux_test_for_tracefork.
10097 * linux-low.h (get_process_thread): Avoid TID.
10098 (struct process_ifo): Move thread_known and tid to the end. Remove
10099 sigstop_sent.
10100 (linux_attach_lwp, thread_db_init): Update prototypes.
10101 * server.h (change_inferior_id): Delete prototype.
10102 (add_pid_to_list, pull_pid_from_list): New prototypes.
10103 * thread-db.c (thread_db_use_events): New.
10104 (find_first_thread): Rename to...
10105 (find_one_thread): ...this. Update callers and messages. Do not
10106 call fatal. Check thread_db_use_events. Do not call
10107 change_inferior_id or new_thread_notify.
10108 (maybe_attach_thread): Update. Do not call new_thread_notify.
10109 (thread_db_init): Set thread_db_use_events. Check use_events.
10110 * utils.c (fatal, warning): Correct message prefix.
10111
30ed0a8f
DJ
101122007-10-15 Daniel Jacobowitz <dan@codesourcery.com>
10113
10114 * Makefile.in (clean): Remove new files.
10115 (powerpc-32.o, powerpc-32.c, powerpc-e500.o, powerpc-e500.c)
10116 (powerpc-64.o, powerpc-64.c): New rules.
10117 * configure.srv: Use alternate register sets for powerpc64-*-linux*
10118 with AltiVec, powerpc-*-linux* with AltiVec, and powerpc-*-linux*
10119 with SPE.
10120 * linux-ppc-low.c (ppc_regmap): Do not fetch the FP registers for
10121 SPE targets.
10122 (ppc_cannot_store_register): Do not check for FPSCR for SPE targets.
10123 (PTRACE_GETVRREGS, PTRACE_SETVRREGS, SIZEOF_VRREGS, ppc_fill_vrregset)
10124 (ppc_store_vrregset, PTRACE_GETEVRREGS, PTRACE_SETEVRREGS)
10125 (struct gdb_evrregset_t, ppc_fill_evrregset, ppc_store_evrregset): New.
10126 (target_regsets): Add AltiVec and SPE register sets.
10127 * configure.ac: Check for AltiVec and SPE.
10128 * linux-ppc64-low.c (PTRACE_GETVRREGS, PTRACE_SETVRREGS, SIZEOF_VRREGS)
10129 (ppc_fill_vrregset, ppc_store_vrregset): New.
10130 (target_regsets): Add AltiVec register set.
10131 * configure: Regenerated.
10132
fd462a61
DJ
101332007-09-19 Daniel Jacobowitz <dan@codesourcery.com>
10134
10135 * linux-low.c (O_LARGEFILE): Define.
10136 (linux_read_memory): Use /proc/PID/mem.
10137 * configure.ac: Use AC_GNU_SOURCE. Check for pread64.
10138 * configure, config.in: Regenerated.
10139
69f223ed
DJ
101402007-09-04 Daniel Jacobowitz <dan@codesourcery.com>
10141
10142 * linux-low.c (linux_wait_for_event): Do not pass signals while
10143 single-stepping.
10144
aec18585
PA
101452007-09-03 Pedro Alves <pedro_alves@portugalmail.pt>
10146
10147 * win32-low.c (create_process): New.
10148 (win32_create_inferior): Use create_process instead of
10149 CreateProcess. If create_process failed retry appending an ".exe"
10150 suffix. Store the GetLastError result immediatelly after
10151 create_process calls and use it on the call to error.
10152
34d86ddd
PA
101532007-09-03 Pedro Alves <pedro_alves@portugalmail.pt>
10154
10155 * win32-low.c (handle_load_dll): Don't use toolhelp when waiting.
10156
5a0e3bd0
JB
101572007-08-23 Joel Brobecker <brobecker@adacore.com>
10158
10159 * configure.ac: Switch license to GPLv3.
10160
f88c79e6
MS
101612007-08-01 Michael Snyder <msnyder@access-company.com>
10162
10163 * remote-utils.c (putpkt_binary): Memory leak, free buf2.
10164
6b3d9b83
PA
101652007-07-31 Pedro Alves <pedro_alves@portugalmail.pt>
10166
10167 * win32-low.c (winapi_CloseToolhelp32Snapshot) [_WIN32_WCE]: New
10168 typedef.
10169 (win32_CloseToolhelp32Snapshot) [_WIN32_WCE]: New global var.
10170 (load_toolhelp) [_WIN32_WCE]: Load TOOLHELP.DLL. Get
10171 CloseToolhelp32Snapshot.
10172 (toolhelp_get_dll_name) [_WIN32_WCE]: Close the snapshot with
10173 CloseToolhelp32Snapshot.
10174
c588c53c
MS
101752007-07-27 Michael Snyder <michael.snyder@access-company.com>
10176
10177 * server.c (main): Check for inferior exit before main loop.
10178
aa0403d9
PA
101792007-07-18 Pedro Alves <pedro_alves@portugalmail.pt>
10180
10181 * remote-utils.c (remote_open): Set SO_KEEPALIVE on remote_desc
10182 instead of on tmp_desc.
10183
255e7678
DJ
101842007-07-17 Pedro Alves <pedro_alves@portugalmail.pt>
10185 Daniel Jacobowitz <dan@codesourcery.com>
10186
10187 * inferiors.c (all_dlls, dlls_changed, get_dll): New.
10188 (add_thread): Minor cleanups.
10189 (clear_inferiors): Move lower in the file. Clear the DLL
10190 list.
10191 (free_one_dll, match_dll, loaded_dll, unloaded_dll, clear_list): New.
10192 * remote-utils.c (prepare_resume_reply): Check dlls_changed.
10193 (xml_escape_text): New.
10194 * server.c (handle_query): Handle qXfer:libraries:read. Report it
10195 for qSupported.
10196 (handle_v_cont): Report errors.
10197 (gdbserver_version): Update.
10198 (main): Correct size of own_buf. Do not report initial DLL events.
10199 * server.h (struct dll_info, all_dlls, dlls_changed, loaded_dll)
10200 (unloaded_dll, xml_escape_text): New.
10201 * win32-low.c (enum target_waitkind): Update comments.
10202 (win32_add_one_solib, get_image_name, winapi_EnumProcessModules)
10203 (winapi_GetModuleInformation, winapi_GetModuleFileNameExA)
10204 (win32_EnumProcessModules, win32_GetModuleInformation)
10205 (win32_GetModuleFileNameExA, load_psapi, psapi_get_dll_name)
10206 (winapi_CreateToolhelp32Snapshot, winapi_Module32First)
10207 (winapi_Module32Next, win32_CreateToolhelp32Snapshot)
10208 (win32_Module32First, win32_Module32Next, load_toolhelp)
10209 (toolhelp_get_dll_name, handle_load_dll, handle_unload_dll): New.
10210 (get_child_debug_event): Handle DLL events.
10211 (win32_wait): Likewise.
10212
0d37add9
DJ
102132007-07-12 Daniel Jacobowitz <dan@codesourcery.com>
10214
10215 * configure.srv: Set srv_linux_regsets for sh*-*-linux*.
10216 * linux-sh-low.c (sh_fill_gregset, target_regsets): New.
10217
45e2715e
PA
102182007-07-08 Pedro Alves <pedro_alves@portugalmail.pt>
10219
10220 * win32-low.c (handle_output_debug_string): Ignore event if not
10221 waiting.
10222
c5674cf1
PA
102232007-07-08 Pedro Alves <pedro_alves@portugalmail.pt>
10224
10225 * win32-arm-low.c (arm_wince_breakpoint): Fix typo.
10226
2bbe3cc1
DJ
102272007-07-03 Daniel Jacobowitz <dan@codesourcery.com>
10228
10229 * remote-utils.c (look_up_one_symbol): Handle 'm' packets.
10230
ae13219e
DJ
102312007-07-02 Daniel Jacobowitz <dan@codesourcery.com>
10232
10233 * inferiors.c (change_inferior_id): Add comment.
10234 * linux-low.c (check_removed_breakpoint): Add an early
10235 prototype. Improve debug output.
10236 (linux_attach): Doc update.
10237 (linux_detach_one_process, linux_detach): Clean up before releasing
10238 each process.
10239 (send_sigstop, wait_for_sigstop): Improve comments and debug output.
10240 * linux-low.h (struct process_info): Doc improvement.
10241 * mem-break.c (delete_all_breakpoints): New.
10242 * mem-break.h (delete_all_breakpoints): New prototype.
10243 * thread-db.c (find_first_thread): New.
10244 (thread_db_create_event): Call it instead of
10245 thread_db_find_new_threads. Clean up unused variables.
10246 (maybe_attach_thread): Remove first thread handling.
10247 (thread_db_find_new_threads): Use find_first_thread.
10248 (thread_db_get_tls_address): Likewise.
10249
4105de34
DJ
102502007-06-27 Daniel Jacobowitz <dan@codesourcery.com>
10251
10252 * thread-db.c (thread_db_find_new_threads): Add prototype.
10253 (thread_db_create_event): Check for the main thread before adding
10254 a new thread.
10255 (maybe_attach_thread): Only enable event reporting if TID == 0.
10256 (thread_db_get_tls_address): Check for new threads.
10257
2b876972
DJ
102582007-06-20 Daniel Jacobowitz <dan@codesourcery.com>
10259
10260 * linux-low.c (linux_create_inferior): Try execv before execvp.
10261 * spu-low.c (spu_create_inferior): Likewise.
10262
7a245884
DJ
102632007-06-13 Mike Frysinger <vapier@gentoo.org>
10264
10265 * linux-low.c (linux_create_inferior): Change execv to execvp.
10266 * spu-low.c (spu_create_inferior): Likewies.
10267
117ce543
DJ
102682007-06-13 Daniel Jacobowitz <dan@codesourcery.com>
10269
10270 * Makefile.in (clean): Clean new files instead of deleted ones.
10271 (reg-mips.o, reg-mips.c, reg-mips64.o, reg-mips64.c): Delete.
10272 (mips-linux.o, mips-linux.c, mips64-linux.o, mips64-linux.c): New
10273 rules.
10274 * configure.srv: Specify XML files and new regformats for MIPS and
10275 MIPS64 GNU/Linux.
10276 * linux-mips-low.c (mips_num_regs): Set to only used registers.
10277 (mips_regmap): Do not fetch $0. Remove unused registers. Add
10278 an entry for the restart register.
10279 (mips_cannot_fetch_register, mips_cannot_store_register)
10280 (mips_reinsert_addr, mips_fill_fpregset, mips_store_fpregset): Update
10281 register names to match the XML descriptions.
10282 (mips_fill_gregset, mips_store_gregset): Likewise. Handle the
10283 restart register instead of $0.
10284
0e7f50da
UW
102852007-06-12 Ulrich Weigand <uweigand@de.ibm.com>
10286 Markus Deuling <deuling@de.ibm.com>
10287
10288 * remote-utils.c (decode_xfer_write): New function.
10289 * server.h (decode_xfer_write): Add prototype.
10290 * server.c (handle_query): Add PACKET_LEN argument. Support
10291 qXfer:spu:read and qXfer:spu:write packets.
10292 (main): Pass packet_len to handle_query.
10293 * spu-low.c (spu_target_ops): Add spu_proc_xfer_spu.
10294 * target.h (target_ops): Add qxfer_spu.
10295
374c1d38
UW
102962007-06-12 Ulrich Weigand <uweigand@de.ibm.com>
10297
10298 * spu-low.c (spu_proc_xfer_spu): Do not return failure when
10299 accessing non-seekable spufs files.
10300
bb63802a
UW
103012007-05-16 Markus Deuling <deuling@de.ibm.com>
10302
889bf7c5 10303 * server.c (handle_query): Add reply for qC packet.
bb63802a 10304
7390519e
PA
103052007-05-10 Pedro Alves <pedro_alves@portugalmail.pt>
10306 Leo Zayas <lerele@champenstudios@com>
10307
10308 * server.h (check_remote_input_interrupt_request): New function.
10309 * remote_utils.c (INVALID_DESCRIPTOR): New define.
10310 (remote_desc): Initialize with INVALID_DESCRIPTOR.
10311 (input_interrupt): Expose on USE_WIN32API too. Fix whitespace.
10312 (check_remote_input_interrupt_request): New function.
10313 * server.h (check_remote_input_interrupt_request): Declare.
3ecf0694 10314 * win32-low.c (winapi_DebugBreakProcess,
7390519e
PA
10315 winapi_GenerateConsoleCtrlEvent): New typedefs.
10316 (get_child_debug_event): Lower Win32 debug event polling from 1 sec
10317 to 250 ms.
10318 (win32_wait): Check for remote interrupt request
10319 with check_remote_input_interrupt_request.
10320 (win32_request_interrupt): New function.
10321 (win32_target_op): Set request_interrupt to win32_request_interrupt.
10322
34b34921
PA
103232007-05-10 Pedro Alves <pedro_alves@portugalmail.pt>
10324
10325 * win32-low.c (debug_registers_changed,
10326 debug_registers_used, CONTEXT_EXTENDED_REGISTERS,
10327 CONTEXT_FLOATING_POINT, CONTEXT_DEBUG_REGISTERS,
10328 CONTEXT_DEBUGGER, CONTEXT_DEBUGGER_DR): Delete.
10329 (thread_rec): Get context using the low target.
10330 (child_add_thread): Call thread_added on the low target,
10331 which does the same thing.
10332 (regptr): Delete.
10333 (do_initial_child_stuff): Remove debug registers references.
10334 Set context using the low target. Resume threads after
10335 setting the contexts.
10336 (child_continue): Remove dead variable. Remove debug
10337 registers references.
10338 (child_fetch_inferior_registers): Go through the low target.
10339 (do_child_store_inferior_registers): Remove.
10340 (child_store_inferior_registers): Go through the low target.
10341 (win32_resume): Remove debug registers references.
10342 Set context using the low target.
10343 (handle_exception): Change return type to void. Don't record
10344 context here. Set status to TARGET_WAITKIND_SPURIOUS on a
10345 first chance exception.
889bf7c5 10346 (get_child_debug_event): Change return type to void. Remove
34b34921
PA
10347 goto loop. Always return after waiting for debug event.
10348 (win32_wait): Convert to switch statement. Handle spurious
10349 events.
10350
10351 * win32-i386-low.c (debug_registers_changed,
10352 debug_registers_used): New.
10353 (initial_stuff): Rename to ...
10354 (i386_initial_stuff): ... this. Clear debug registers
10355 state variables.
10356 (store_debug_registers): Delete.
10357 (i386_get_thread_context): New.
10358 (load_debug_registers): Delete.
10359 (i386_set_thread_context): New.
10360 (i386_thread_added): New.
10361 (single_step): Rename to ...
10362 (i386_single_step): ... this.
10363 (do_fetch_inferior_registers): Rename to ...
10364 (i386_fetch_inferior_register): ... this.
10365 (i386_store_inferior_register): New.
10366 (the_low_target): Adapt to new interface.
10367
10368 * win32-arm-low.c (CONTEXT_FLOATING_POINT): Define.
10369 (arm_get_thread_context): New.
10370 (arm_set_thread_context): New.
10371 (regptr): New.
10372 (do_fetch_inferior_registers): Rename to ...
10373 (arm_fetch_inferior_register): ... this.
10374 (arm_store_inferior_register): New.
10375 (arm_wince_breakpoint): Reimplement as unsigned long.
10376 (arm_wince_breakpoint_len): Define.
10377 (the_low_target): Adapt to new interface.
10378
10379 * win32-low.h (target_ops): Remove regmap, store_debug_registers and
10380 load_debug_registers. Add get_thread_context, set_thread_context,
10381 thread_added and store_inferior_register. Rename
10382 fetch_inferior_registers to fetch_inferior_register.
10383 (regptr): Remove declaration.
10384
dd6953e1
PA
103852007-05-10 Pedro Alves <pedro_alves@portugalmail.pt>
10386
10387 * linux-low.c (linux_detach): Change return type to int. Return 0.
10388 * spu-low.c (spu_detach): Likewise.
10389
444d6139
PA
103902007-05-10 Pedro Alves <pedro_alves@portugalmail.pt>
10391
10392 * target.h (target_ops): Change return type of detach to int.
10393 Add join.
10394 (join_inferior): New.
10395 * server.c (main): Don't skip detach support on mingw32.
10396 If the inferior doesn't support detaching return error.
10397 Call join_inferior instead of using waitpid.
10398 * linux-low.c (linux_join): New.
10399 (linux_target_op): Add linux_join.
10400 * spu-low.c (spu_join): New.
10401 (spu_target_ops): Add spu_join.
10402 * win32-low.c (win32_detach): Adapt to new interface.
10403 Reopen current_process_handle before detaching. Issue a child
10404 resume before detaching.
10405 (win32_join): New.
10406 (win32_target_op): Add win32_join.
10407
1d5315fe
PA
104082007-05-10 Pedro Alves <pedro_alves@portugalmail.pt>
10409
10410 * win32-low.c (win32-attach): Fix return value.
10411 * target.h (target_ops): Describe ATTACH return values.
10412
bf914831
PA
104132007-05-10 Pedro Alves <pedro_alves@portugalmail.pt>
10414
10415 * win32-low.c (GETPROCADDRESS): Define.
10416 (winapi_DebugActiveProcessStop): Add WINAPI. typedef as pointer.
10417 (winapi_DebugSetProcessKillOnExit): Likewise.
10418 (win32_create_inferior): Force usage of ansi CreateProcessA.
10419 (win32_attach): Use GETPROCADDRESS.
10420 (win32_detach): Likewise.
10421
f72f3e60
PA
104222007-05-10 Pedro Alves <pedro_alves@portugalmail.pt>
10423
10424 * win32-low.c (win32_wait): Don't use WSTOPSIG.
10425
ed50f18f
PA
104262007-03-30 Pedro Alves <pedro_alves@portugalmail.pt>
10427
10428 * win32-low.c: Commit leftover changes from 2007-03-29.
10429
0c2ead7e
DJ
104302007-03-30 Daniel Jacobowitz <dan@codesourcery.com>
10431
10432 * i387-fp.c (struct i387_fsave, struct i387_fxsave): Make 16-bit
10433 fields short instead of int. Add explicit padding.
10434 (i387_cache_to_fsave): Remove unnecessary casts.
10435 (i387_fsave_to_cache): Doc fix.
10436 (i387_cache_to_fxsave): Remove unnecessary casts and masking.
10437
73725ff3
DJ
104382007-03-30 Daniel Jacobowitz <dan@codesourcery.com>
10439
10440 * i387-fp.c (i387_cache_to_fxsave): Reinitialize val2 before use.
10441 (i387_fxsave_to_cache): Check fp->ftag while building ftag value.
10442
d99f33d8
PA
104432007-03-29 Pedro Alves <pedro_alves@portugalmail.pt>
10444
10445 * configure.srv (arm*-*-mingw32ce*): Move near the other
10446 arm targets.
10447
68070c10
PA
104482007-03-29 Pedro Alves <pedro_alves@portugalmail.pt>
10449
2482afc6 10450 * configure.ac: Add errno checking.
68070c10
PA
10451 (AC_CHECK_HEADERS): Add errno.h, fcntl.h, signal.h,
10452 sys/file.h and malloc.h.
10453 (AC_CHECK_DECLS): Add perror.
10454 (srv_mingwce): Handle.
2482afc6 10455 * configure.srv (i[34567]86-*-cygwin*): Add
68070c10
PA
10456 win32-i386-low.o to srv_tgtobj.
10457 (i[34567]86-*-mingw*): Likewise.
10458 (arm*-*-mingw32ce*): Add case.
10459 * gdbreplay.c [HAVE_SYS_FILE_H, HAVE_SIGNAL_H,
10460 HAVE_FCNTL_H, HAVE_ERRNO_H, HAVE_MALLOC_H]: Check.
10461 [__MINGW32CE__] (strerror): New function.
10462 [__MINGW32CE__] (errno): Define to GetLastError.
10463 [__MINGW32CE__] (COUNTOF): New macro.
10464 (remote_open): Remove extra close call.
10465 * mem-break.c (delete_breakpoint_at): New function.
10466 * mem-break.h (delete_breakpoint_at): Declare.
10467 * remote-utils.c [HAVE_SYS_FILE_H, HAVE_SIGNAL_H,
10468 HAVE_FCNTL_H, HAVE_UNISTD_H, HAVE_ERRNO_H]: Check.
10469 [USE_WIN32API] (read, write): Add char* casts.
10470 * server.c [HAVE_UNISTD_H, HAVE_SIGNAL_H]: Check.
10471 * server.h: Include wincecompat.h on Windows CE.
10472 [HAVE_ERRNO_H]: Check.
10473 (perror): Declare if not declared.
10474 * utils.c: Add stdlib.h, errno.h and malloc.h includes.
10475 (perror_with_name): Remove errno declaration.
10476 * wincecompat.h: New.
10477 * wincecompat.c: New.
10478 * win32-low.h: New.
10479 * win32-arm-low.c: New.
10480 * win32-i386-low.c: New.
10481 (win32-low.c): Include mem-break.h and win32-low.h, and winnt.h.
10482 (OUTMSG2): Make it safe.
10483 (_T): New macro.
10484 (COUNTOF): New macro.
10485 (NUM_REGS): Get it from the low target.
10486 (CONTEXT_EXTENDED_REGISTERS, CONTEXT_FLOATING_POINT,
10487 CONTEXT_DEBUG_REGISTERS): Add fallbacks to 0.
10488 (thread_rec): Let low target handle debug registers.
10489 (child_add_thread): Likewise.
10490 (child_init_thread_list): Likewise.
10491 (continue_one_thread): Likewise.
10492 (regptr): New.
10493 (do_child_fetch_inferior_registers): Move to ...
10494 * win32-i386-low.c: ... here, and rename to ...
10495 (do_fetch_inferior_registers): ... this.
889bf7c5 10496 * win32-low.c (child_fetch_inferior_registers):
68070c10
PA
10497 Go through the low target.
10498 (do_child_store_inferior_registers): Use regptr.
10499 (strwinerror): New function.
10500 (win32_create_inferior): Handle Windows CE.
10501 Use strwinerror instead of strerror on Windows error
10502 codes. Add program to the error output.
10503 Don't close the main thread handle on Windows CE.
10504 (win32_attach): Use coredll.dll on Windows CE.
10505 (win32_kill): Close current process and current
10506 thread handles.
10507 (win32_detach): Use coredll.dll on Windows CE.
10508 (win32_resume): Let low target handle debug registers, and
10509 step request.
10510 (handle_exception): Add/Remove initial breakpoint. Avoid
10511 non-existant WSTOPSIG on Windows CE.
10512 (win32_read_inferior_memory): Cast to remove warning.
10513 (win32_arch_string): Go through the low target.
10514 (initialize_low): Call set_breakpoint_data with the low
10515 target's breakpoint.
10516 * win32-low.c (dr, FLAG_TRACE_BIT, FCS_REGNUM,
10517 FOP_REGNUM, mappings): Move to ...
10518 * win32-i386-low.c: ... here.
10519 * win32-low.c (win32_thread_info): Move to ...
10520 * win32-low.h: ... here.
10521 * Makefile.in (SFILES): Add win32-low.c, win32-i386-low.c,
10522 win32-arm-low.c and wincecompat.c.
10523 (all:): Add $EXEEXT.
10524 (install-only:): Likewise.
10525 (gdbserver:): Likewise.
10526 (gdbreplay:): Likewise.
10527 * config.in: Regenerate.
10528 * configure: Regenerate.
10529
41093d81
PA
105302007-03-28 Pedro Alves <pedro_alves@portugalmail.pt>
10531
10532 * win32-low.c: Rename typedef thread_info to
10533 win32_thread_info throughout.
10534
544afa54
PA
105352007-03-28 Pedro Alves <pedro_alves@portugalmail.pt>
10536
10537 * win32-i386-low.c: Rename to ...
10538 * win32-low.c: ... this.
10539 * configure.srv: Replace win32-i386-low.o with win32-low.o.
10540 * Makefile.in: Likewise.
10541
bce7165d
PA
105422007-03-27 Pedro Alves <pedro_alves@portugalmail.pt>
10543
10544 * remote-utils.c (monitor_output): Constify msg parameter.
10545 * server.h (monitor_output): Likewise.
10546 * win32-i386-low.c (handle_output_debug_string): New.
10547 (win32_kill): Handle OUTPUT_DEBUG_STRING_EVENT events using
10548 handle_output_debug_string.
10549 (get_child_debug_event): Likewise.
10550
506c7aa0
DJ
105512007-03-27 Mat Hostetter <mat@lcs.mit.edu>
10552
10553 * server.c (main): Correct strtoul check.
10554
42c81e2a
DJ
105552007-03-27 Jon Ringle <jon@ringle.org>
10556
10557 * linux-low.c: Check __ARCH_HAS_MMU__ also.
10558
9453113a
DJ
105592007-03-27 Brooks Moses <brooks.moses@codesourcery.com>
10560
10561 * Makefile.in: Add dummy "pdf" and "install-pdf" targets.
10562
64a69107
DJ
105632007-02-27 Daniel Jacobowitz <dan@codesourcery.com>
10564
10565 * terminal.h: Check HAVE_SGTTY_H.
10566
105672007-02-27 Mat Hostetter <mat@lcs.mit.edu>
6f8486da
DJ
10568
10569 * remote-utils.c (remote_open): Print out the assigned port number.
10570
c74d0ad8
DJ
105712007-02-26 Daniel Jacobowitz <dan@codesourcery.com>
10572
10573 * remote-utils.c (monitor_output): New function.
10574 * server.c (debug_threads): Define here.
10575 (monitor_show_help): New function.
10576 (handle_query): Handle qRcmd.
10577 (main): Do not handle 'd' packet.
10578 * server.h (debug_threads, remote_debug, monitor_output): Declare.
10579 * linux-low.c, spu-low.c, win32-i386-low.c: Remove definitions
10580 of debug_threads.
10581
de7c3b4a
PA
105822007-02-25 Pedro Alves <pedro_alves@portugalmail.pt>
10583
10584 * Makefile.in (EXEEXT): New.
10585 (clean): Use $(EXEEXT).
10586
ef57601b
PA
105872007-02-25 Pedro Alves <pedro_alves@portugalmail.pt>
10588
10589 * target.h (target_ops): Rename send_signal to request_interrupt,
10590 and remove enum target_signal parameter.
10591 * linux-low.c (linux_request_interrupt): Rename from
10592 linux_send_signal, and always send SIGINT.
10593 * spu-low.c (spu_request_interrupt): Rename from spu_send_signal,
10594 and always send SIGINT.
10595 * remote-utils.c (putpkt_binary): Call request_interrupt, instead
10596 of send_signal.
10597 (input_interrupt): Likewise.
10598
820f2bda
PA
105992007-02-25 Pedro Alves <pedro_alves@portugalmail.pt>
10600
10601 * server.c (get_features_xml): Check if target implemented
10602 arch_string.
10603 * win32-i386-low.c (win32_arch_string): New.
10604 (win32_target_ops): Add win32_arch_string as arch_string member.
10605
ab39bf24
UW
106062007-02-22 Markus Deuling <deuling@de.ibm.com>
10607
10608 * spu-low.c (spu_arch_string): New.
10609 (spu_target_ops): Add spu_arch_string.
10610
61ff6e04
DJ
106112007-02-16 Daniel Jacobowitz <dan@codesourcery.com>
10612
10613 * remote-utils.c: Remove HAVE_TERMINAL_H check.
10614 * configure.ac: Do not check for terminal.h.
10615 * configure, config.in: Regenerated.
10616
fb1e4ffc
DJ
106172007-02-08 Daniel Jacobowitz <dan@codesourcery.com>
10618
10619 * Makefile.in (OBS): Add $(XML_BUILTIN).
10620 (XML_DIR, XML_TARGET, XML_FILES, XML_BUILTIN): New.
10621 (clean): Update.
10622 (target.xml, xml-builtin.c, stamp-xml, arm-with-iwmmxt.o)
10623 (arm-with-iwmmxt.c): New.
10624 * config.in, configure: Regenerate.
10625 * configure.ac: Check for iWMMXt. Handle srv_xmltarget,
10626 srv_xmlbuiltin, and srv_xmlfiles. Define USE_XML.
10627 * configure.srv: Mention srv_xmltarget and srv_xmlfiles.
10628 (arm*-*-linux*): Add iWMMXt and regset support.
10629 * linux-arm-low.c (PTRACE_GETWMMXREGS, PTRACE_SETWMMXREGS): Define.
10630 (arm_fill_gregset, arm_store_gregset, arm_fill_wmmxregset)
10631 (arm_store_wmmxregset, target_regsets): New.
10632 * server.c (get_features_xml): Take annex argument. Check builtin
10633 XML documents.
10634 (handle_query): Handle multiple annexes.
10635
0f48aa01
DJ
106362007-01-29 Daniel Jacobowitz <dan@codesourcery.com>
10637
10638 * remote-utils.c [USE_WIN32API] (read, write): Define.
10639 (putpkt_binary, input_interrupt, readchar, getpkt): Use read and
10640 write.
10641
23181151
DJ
106422007-01-09 Daniel Jacobowitz <dan@codesourcery.com>
10643
10644 * linux-i386-low.c (the_low_target): Set arch_string.
10645 * linux-x86-64-low.c (the_low_target): Likewise.
10646 * linux-low.c (linux_arch_string): New.
10647 (linux_target_ops): Add it.
10648 * linux-low.h (struct linux_target_ops): Add arch_string.
10649 * server.c (write_qxfer_response): Use const void * for DATA.
10650 (get_features_xml): New.
10651 (handle_query): Handle qXfer:features:read. Report it for qSupported.
10652 * target.h (struct target_ops): Add arch_string method.
10653
9d606399
DJ
106542007-01-03 Denis Pilat <denis.pilat@st.com>
10655 Daniel Jacobowitz <dan@codesourcery.com>
10656
10657 * linux-low.c (linux_kill): Handle being called with no threads.
10658 * win32-i386-low.c (win32_kill): Likewise.
10659 (get_child_debug_event): Clear current_process_handle.
10660
106612006-12-30 Denis PILAT <denis.pilat@st.com>
8264bb58
DJ
10662 Daniel Jacobowitz <dan@codesourcery.com>
10663
10664 * remote-utils.c (remote_open): Check the type of specified
10665 serial port devices before opening them.
10666 * server.c (main): Kill the inferior if an error occurs during
10667 the first remote_open.
10668
a5e13d24
DJ
106692006-12-05 Markus Deuling <deuling@de.ibm.com>
10670
10671 * README: Update supported targets.
10672
186947f7
DJ
106732006-11-28 Daniel Jacobowitz <dan@codesourcery.com>
10674
10675 * Makefile.in (clean): Remove reg-mips64.c.
10676 (reg-mips64.c, reg-mips64.o): New rules.
10677 * configure.srv: Handle mips64. Include regset support for mips.
10678 * linux-mips-low.c (union mips_register): New.
10679 (mips_get_pc, mips_set_pc, mips_reinsert_addr): Use it.
10680 (mips_breakpoint, mips_breakpoint_at): Use int.
10681 (mips_collect_register, mips_supply_register)
10682 (mips_collect_register_32bit, mips_supply_register_32bit)
10683 (mips_fill_gregset, mips_store_gregset, mips_fill_fpregset)
10684 (mips_store_fpregset, target_regsets): New.
10685 * thread-db.c (thread_db_get_tls_address): Use uintptr_t.
10686
a13e2c95
UW
106872006-11-22 Ulrich Weigand <uweigand@de.ibm.com>
10688
10689 * configure.srv: Add target "spu*-*-*".
10690 * Makefile.in (clean): Remove reg-spu.c.
10691 (reg-spu.c, reg-spu.o, spu-low.o): Add dependencies.
10692 * spu-low.c: New file.
10693
cb7283db
DJ
106942006-11-16 Daniel Jacobowitz <dan@codesourcery.com>
10695
10696 * configure.ac: Correct td_thr_tls_get_addr test.
10697 * configure: Regenerated.
10698
89be2091
DJ
106992006-11-16 Daniel Jacobowitz <dan@codesourcery.com>
10700
10701 * linux-low.c (linux_wait_for_event): Reformat. Use the
10702 pass_signals array.
10703 * remote-utils.c (decode_address_to_semicolon): New.
10704 * server.c (pass_signals, handle_general_set): New.
10705 (handle_query): Mention QPassSignals for qSupported.
10706 (main): Call handle_general_set.
10707 * server.h (pass_signals, decode_address_to_semicolon): New.
10708
000ef4f0
DJ
107092006-11-06 Daniel Jacobowitz <dan@codesourcery.com>
10710
10711 * server.c (handle_query): Correct error handling for read_auxv.
10712
b7149293
UW
107132005-10-19 Ulrich Weigand <uweigand@de.ibm.com>
10714
10715 * configure.srv [s390-*-linux*, s390x-*-linux*]: Set srv_linux_regsets
10716 and srv_linux_thread_db to yes.
10717 * linux-s390-low.c (s390_fill_gregset): New function.
10718 (target_regsets): Define data structure.
10719
dae5f5cf
DJ
107202006-10-17 Daniel Jacobowitz <dan@codesourcery.com>
10721
10722 * acinclude.m4 (SRV_CHECK_TLS_GET_ADDR): New.
10723 * configure.ac: Use it. Define HAVE_TD_THR_TLS_GET_ADDR.
10724 * config.in, configure: Regenerated.
10725 * inferiors.c (gdb_id_to_thread): New function.
10726 (gdb_id_to_thread_id): Use it.
10727 * linux-low.c (linux_target_ops): Use thread_db_get_tls_address.
10728 * linux-low.h (struct process_info): Add th member.
10729 (thread_db_get_tls_address): New prototype.
10730 * remote-utils.c (decode_address): Make non-static.
10731 * server.c (handle_query): Handle qGetTLSAddr.
10732 * server.h (gdb_id_to_thread, decode_address): New prototypes.
10733 * target.h (struct target_ops): Add get_tls_address.
10734 * thread-db.c (maybe_attach_thread): Save the thread handle.
10735 (thread_db_get_tls_address): New.
10736
32ca6d61
DJ
107372006-09-28 Daniel Jacobowitz <dan@codesourcery.com>
10738
10739 * linux-low.c (PTRACE_GETSIGINFO, PTRACE_SETSIGINFO): Define.
10740 (linux_resume_one_process): Take a siginfo_t *. Update all
10741 callers. Queue it if necessary. Use PTRACE_SETSIGINFO.
10742 (struct pending_signals): Add a siginfo_t.
10743 (linux_wait_for_process): Always set last_status.
10744 (linux_wait_for_event): Use PTRACE_GETSIGINFO.
10745 (linux_queue_one_thread): Use PTRACE_GETSIGINFO.
10746 * linux-low.h (struct process_info): Add last_status.
10747
5ffff7c1
DJ
107482006-09-21 Daniel Jacobowitz <dan@codesourcery.com>
10749
10750 * remote-utils.c (try_rle): New function.
10751 (putpkt_binary): Use it.
10752
8695c747
DJ
107532006-08-19 Daniel Jacobowitz <dan@codesourcery.com>
10754
10755 * Makefile.in (clean): Clean reg-x86-64-linux.c.
10756 (reg-x86-64-linux.o, reg-x86-64-linux.c): New.
10757 * configure.srv (x86_64-*-linux*): Use reg-x86-64-linux.o.
10758 * linux-x86-64-low.c (x86_64_regmap): Include ORIG_RAX.
10759 (x86_64_fill_gregset, x86_64_store_gregset): Skip floating
10760 point registers.
10761
290fadea
RS
107622006-08-08 Richard Sandiford <richard@codesourcery.com>
10763
10764 * server.c (terminal_fd): New variable.
10765 (old_foreground_pgrp): Likewise.
10766 (restore_old_foreground_pgrp): New function.
10767 (start_inferior): Record the terminal file descriptor in terminal_fd
10768 and its original foreground group in old_foreground_pgrp. Register
10769 restore_old_foreground_pgrp with atexit().
10770
9f2e1e63
DJ
107712006-07-26 Daniel Jacobowitz <dan@codesourcery.com>
10772
10773 * server.c (handle_query): Correct qPart to qXfer.
10774
b80864fb
DJ
107752006-07-22 Daniel Jacobowitz <dan@codesourcery.com>
10776
10777 * configure.ac: Check for more headers which are missing on
10778 Windows. Automatically supply -lwsock32 and USE_WIN32API.
10779 * configure.srv: Add Cygwin and mingw32.
10780 * remote-utils.c: Don't include headers unconditionally which
10781 are missing on mingw32. Include <winsock.h> for mingw32.
10782 (remote_open): Adjust for mingw32 support. Flush
10783 standard error after writing to it.
10784 (remote_close, putpkt_binary, input_interrupt, block_async_io)
10785 (unblock_async_io, enable_async_io, disable_async_io)
10786 (readchar, getpkt): Update for Winsock support.
10787 (prepare_resume_reply): Expect a protocol signal number.
10788 * server.c: Disable <sys/wait.h> on mingw32.
10789 (start_inferior): Adjust for mingw32 support. Flush
10790 standard error after writing to it.
10791 (attach_inferior): Likewise. Use protocol signal
10792 numbers.
10793 (main): Skip 'D' packet on mingw32. Use protocol signal numbers
10794 and names.
10795 * win32-i386-low.c: New file.
10796 * Makefile.in (XM_CLIBS): Set.
10797 (gdbserver, gdbreplay): Use $(INTERNAL_CFLAGS).
10798 (win32-i386-low.o): New dependency rule.
10799 * linux-low.c (linux_wait): Use target signal numbers.
10800 * target.h (struct target_ops): Doc fix.
10801 * server.h (target_signal_to_name): New prototype.
10802 * gdbreplay.c: Don't include headers unconditionally which
10803 are missing on mingw32. Include <winsock.h> for mingw32.
10804 (remote_close, remote_open): Adjust for Winsock support.
10805 * configure, config.in: Regenerated.
10806
0876f84a
DJ
108072006-07-12 Daniel Jacobowitz <dan@codesourcery.com>
10808
10809 * server.c (decode_xfer_read, write_qxfer_response): New.
10810 (handle_query): Take a packet length argument. Handle
10811 qXfer:auxv:read instead of qPart:auxv:read. Mention it in
10812 the qSupported response.
10813 (main): Update call to handle_query.
10814
01f9e8fa
DJ
108152006-06-22 Daniel Jacobowitz <dan@codesourcery.com>
10816
10817 * remote-utils.c (remote_escape_output, remote_unescape_input): New.
10818 (putpkt_binary): Renamed from putpkt and adjusted for binary
10819 data.
10820 (putpkt): New wrapper for putpkt_binary.
10821 (readchar): Don't mask off the high bit.
10822 (decode_X_packet): New function.
10823 * server.c (main): Call putpkt_binary if a handler sets the packet
10824 length. Save the length of the incoming packet. Handle 'X'.
10825 * server.h (gdb_byte, remote_escape_output, decode_X_packet): New.
10826
be2a5f71
DJ
108272006-06-21 Daniel Jacobowitz <dan@codesourcery.com>
10828
10829 * server.c (handle_query): Handle qSupported.
10830
ea025f5f
DJ
108312006-05-30 Daniel Jacobowitz <dan@codesourcery.com>
10832
10833 * remote-utils.c (all_symbols_looked_up): New variable.
10834 (look_up_one_symbol): Check it.
10835 * server.h (look_up_one_symbol): New declaration.
10836 * thread-db.c (thread_db_init): Set all_symbols_looked_up.
10837
9308fc88
DJ
108382006-05-30 Daniel Jacobowitz <dan@codesourcery.com>
10839
10840 * Makefile.in (linux-arm-low.o): Update dependencies.
66f338c7 10841 * linux-arm-low.c: Include "gdb_proc_service.h".
9308fc88
DJ
10842 (PTRACE_GET_THREAD_AREA): Define.
10843 (ps_get_thread_area): New function.
10844
52fb6437
NS
108452006-05-09 Nathan Sidwell <nathan@codesourcery.com>
10846
10847 * configure.srv (m68k*-*-uclinux*): New target.
10848 * linux-low.c (linux_create_inferior): Use vfork on mmuless systems.
10849 (linux_resume_one_process): Remove extraneous cast.
10850 (linux_read_offsets): New.
10851 (linux_target_op): Add linux_read_offsets on mmuless systems.
10852 * server.c (handle_query): Add qOffsets logic.
10853 * target.h (struct target_ops): Add read_offsets.
10854
21b0f40c
DJ
108552006-03-15 Daniel Jacobowitz <dan@codesourcery.com>
10856
10857 * linux-mips-low.c: Include <sys/ptrace.h> and "gdb_proc_service.h".
10858 (PTRACE_GET_THREAD_AREA): Define.
10859 (ps_get_thread_area): New function.
10860 * Makefile.in (linux-i386-low.o, linux-mips-low.o)
10861 (linux-x86-64-low.o): Update.
10862
0050a760
DJ
108632006-03-15 Daniel Jacobowitz <dan@codesourcery.com>
10864
10865 * configure.ac: Remove checks for prfpregset_t.
10866 * gdb_proc_service.h: New file.
10867 * linux-i386-low.c, linux-x86-64-low.c, thread-db.c: Use the
10868 new "gdb_proc_service.h".
10869 * proc-service.c: Likewise.
10870 (ps_pglobal_lookup, ps_pdread, ps_pdwrite): Use psaddr_t.
10871 (ps_lgetfpregs, ps_lsetfpregs): Use a void* argument.
10872 * Makefile.in (gdb_proc_service_h): Updated.
10873 * configure, config.in: Regenerated.
10874
b92a518e
DJ
108752006-03-03 Daniel Jacobowitz <dan@codesourcery.com>
10876
10877 * remote-utils.c (prepare_resume_reply): Move declaration
10878 of gdb_id_from_wait to the top of the block.
10879
545587ee
DJ
108802006-02-15 Daniel Jacobowitz <dan@codesourcery.com>
10881
10882 * linux-low.c (regsets_store_inferior_registers): Read the regset
10883 from the target before filling it.
10884
9db87ebd
DJ
108852006-02-08 Daniel Jacobowitz <dan@codesourcery.com>
10886
10887 * server.c (attach_inferior): Return SIGTRAP for a successful
10888 attach.
10889
dd24457d
DJ
108902006-02-01 Daniel Jacobowitz <dan@codesourcery.com>
10891
10892 * Makefile.in (OBS): Add version.o.
10893 (STAGESTUFF): Delete.
10894 (version.o): Add dependencies.
10895 (version.c): Replace rule.
10896 (clean): Remove version.c.
10897 * server.c (gdbserver_version): New.
10898 (gdbserver_usage): Use printf.
10899 (main): Handle --version and --help.
10900 * server.h (version, host_name): Add declarations.
10901
6f0f660e
EZ
109022005-12-23 Eli Zaretskii <eliz@gnu.org>
10903
889bf7c5
PA
10904 * linux-arm-low.c:
10905 * linux-arm-low.c:
10906 * inferiors.c:
10907 * i387-fp.h:
10908 * i387-fp.c:
10909 * gdbreplay.c:
10910 * regcache.c:
10911 * proc-service.c:
10912 * mem-break.h:
10913 * mem-break.c:
10914 * linux-x86-64-low.c:
10915 * linux-sh-low.c:
10916 * linux-s390-low.c:
10917 * linux-ppc64-low.c:
10918 * linux-ppc-low.c:
10919 * linux-mips-low.c:
10920 * linux-m68k-low.c:
10921 * linux-m32r-low.c:
10922 * linux-low.h:
10923 * linux-low.c:
10924 * linux-ia64-low.c:
10925 * linux-i386-low.c:
10926 * linux-crisv32-low.c:
10927 * thread-db.c:
10928 * terminal.h:
10929 * target.h:
10930 * target.c:
10931 * server.h:
10932 * server.c:
10933 * remote-utils.c:
10934 * regcache.h:
10935 * utils.c:
10936 * Makefile.in:
10937 * configure.ac:
6f0f660e
EZ
10938 * gdbserver.1: Add (C) after Copyright. Update the FSF
10939 address.
10940
9d1fb177
DJ
109412005-11-13 Daniel Jacobowitz <dan@codesourcery.com>
10942
10943 * linux-arm-low.c (arm_eabi_breakpoint): New variable.
10944 (arm_breakpoint_at): Recognize both breakpoints.
10945 (the_low_target): Use the correct breakpoint instruction.
10946
011a70c2
DJ
109472005-11-02 Daniel Jacobowitz <dan@codesourcery.com>
10948
10949 * configure.srv (x86_64-*-linux*): Turn on thread_db support.
10950 * linux-x86-64-low.c (x86_64_breakpoint, x86_64_breakpoint_len)
10951 (x86_64_get_pc, x86_64_set_pc, x86_64_breakpoint_at): New.
10952 (the_low_target): Update.
10953
7fb85e41
AS
109542005-10-25 Andreas Schwab <schwab@suse.de>
10955
10956 * server.c (main): Allocate mem_buf with PBUFSIZ bytes.
10957
10958 * linux-ia64-low.c (ia64_regmap): Remove NAT registers.
10959 (ia64_num_regs): Reduce to 462.
10960
3db0444b
DJ
109612005-09-17 Daniel Jacobowitz <dan@codesourcery.com>
10962
10963 * acinclude.m4: Correct quoting.
10964 * aclocal.m4: Regenerated.
10965
10966 Suggested by SZOKOVACS Robert <szo@ies.hu>:
10967 * thread-db.c (thread_db_err_str): Handle TD_VERSION.
10968 (thread_db_init): Call thread_db_err_str.
10969 * configure.ac: Check for TD_VERSION.
10970 * config.in, configure: Regenerated.
10971
bee0189a
DJ
109722005-07-31 Kaveh R. Ghazi <ghazi@caip.rutgers.edu>
10973
10974 * server.h (error, fatal, warning): Add ATTR_FORMAT.
10975
e9d25b98
DJ
109762005-07-13 Daniel Jacobowitz <dan@codesourcery.com>
10977
10978 * configure.ac: Define HAVE_LINUX_REGSETS even if PTRACE_GETREGS
10979 is not available. Define HAVE_PTRACE_GETREGS if it is.
10980 * config.in, configure: Regenerated.
10981 * configure.srv: Set srv_linux_regsets for PowerPC and PowerPC64.
10982 * linux-i386-low.c, linux-m68k-low.c: Update to use
10983 HAVE_PTRACE_GETREGS.
10984 * linux-low.c (regsets_fetch_inferior_registers)
10985 (regsets_store_inferior_registers): Only return 0 if we processed
10986 GENERAL_REGS.
10987 * linux-ppc-low.c (ppc_fill_gregset, target_regsets): New.
10988 * linux-ppc64-low.c (ppc_fill_gregset, target_regsets): New.
10989
a06660f7
DJ
109902005-07-13 Daniel Jacobowitz <dan@codesourcery.com>
10991
10992 * inferiors.c (struct thread_info): Add gdb_id.
10993 (add_thread): Add gdb_id argument.
10994 (thread_id_to_gdb_id, thread_to_gdb_id, gdb_id_to_thread_id): New.
10995 * linux-low.c (linux_create_inferior, linux_attach_lwp): Update
10996 calls to add_thread.
10997 * remote-utils.c (prepare_resume_reply: Use thread_to_gdb_id.
10998 * server.c (handle_query): Use thread_to_gdb_id.
10999 (handle_v_cont, main): Use gdb_id_to_thread_id.
11000 * server.h (add_thread): Update prototype.
11001 (thread_id_to_gdb_id, thread_to_gdb_id, gdb_id_to_thread_id): New
11002 prototypes.
11003
5a1f5858
DJ
110042005-07-13 Daniel Jacobowitz <dan@codesourcery.com>
11005
11006 * linux-low.c (fetch_register, usr_store_inferior_registers): Handle
11007 left-padded registers.
11008 * linux-low.h (struct linux_target_ops): Add left_pad_xfer.
11009 * linux-ppc64-low.c (the_low_target): Set left_pad_xfer.
11010
e122f1f5
SE
110112005-07-01 Steve Ellcey <sje@cup.hp.com>
11012
11013 * configure.ac (BFD_NEED_DECLARATION): Replace with AC_CHECK_DECLS.
11014 * configure: Regenerate.
11015 * config.in: Regenerate.
11016 * server.h (NEED_DECLARATION_STRERROR):
11017 Replace with !HAVE_DECL_STRERROR.
11018
d592fa2f
DJ
110192005-06-16 Daniel Jacobowitz <dan@codesourcery.com>
11020
11021 * linux-low.c (linux_wait, linux_send_signal): Don't test
11022 an unsigned long variable for > 0 if it could be MAX_ULONG.
11023 * server.c (myresume): Likewise.
11024 * target.c (set_desired_inferior): Likewise.
11025
ccbd4912
MK
110262005-06-13 Mark Kettenis <kettenis@gnu.org>
11027
11028 * configure.ac: Simplify and improve check for socklen_t.
11029 * configure, config.in: Regenerate.
11030
f450004a
DJ
110312005-06-12 Daniel Jacobowitz <dan@codesourcery.com>
11032
11033 * acconfig.h: Remove.
11034 * configure.ac: Add a test for socklen_t. Use three-argument
11035 AC_DEFINE throughout.
11036 * config.in: Regenerated using autoheader 2.59.
11037 * configure: Regenerated.
11038
11039 * gdbreplay.c (socklen_t): Provide a default.
11040 (remote_open): Use socklen_t.
11041 * remote-utils.c (socklen_t): Provide a default.
11042 (remote_open): Use socklen_t.
11043 (convert_int_to_ascii, convert_ascii_to_int, decode_M_packet): Use
11044 unsigned char.
11045
11046 * i387-fp.c (struct i387_fsave, struct i387_fxsave): Use unsigned
11047 char for buffers.
11048 * linux-low.c (linux_read_memory, linux_write_memory)
11049 (linux_read_auxv): Likewise.
11050 * mem-break.c (breakpoint_data, set_breakpoint_data, check_mem_read)
11051 (check_mem_write): Likewise.
11052 * mem-break.h (set_breakpoint_data, check_mem_read, check_mem_write):
11053 Likewise.
11054 * regcache.c (struct inferior_rgcache_data, registers_to_string)
11055 (registers_from_string, register_data): Likewise.
11056 * server.c (handle_query, main): Likewise.
11057 * server.h (convert_ascii_to_int, convert_int_to_ascii)
11058 (decode_M_packet): Likewise.
11059 * target.c (read_inferior_memory, write_inferior_memory): Likewise.
11060 * target.h (struct target_ops): Update read_memory, write_memory,
11061 and read_auxv.
11062 (read_inferior_memory, write_inferior_memory): Update.
11063 * linux-low.h (struct linux_target_ops): Change type of breakpoint
11064 to unsigned char *.
11065 * linux-arm-low.c, linux-cris-low.c, linux-crisv32-low.c,
11066 linux-i386-low.c, linux-m32r-low.c, linux-m68k-low.c,
11067 linux-mips-low.c, linux-ppc-low.c, linux-ppc64-low.c,
11068 linux-s390-low.c, linux-sh-low.c: Update for changes in
11069 read_inferior_memory and the_low_target->breakpoint.
11070
eee84df1
DJ
110712005-05-28 Daniel Jacobowitz <dan@codesourcery.com>
11072
11073 * Makefile.in (SFILES): Add linux-ppc64-low.c.
11074 (linux-ppc64-low.o, reg-ppc64.c, reg-ppc64.o): New targets.
11075 * configure.srv: Add powerpc64-*-linux*.
11076 * linux-ppc64-low.c: New file.
11077
45b134e5
OF
110782005-05-23 Orjan Friberg <orjanf@axis.com>
11079
11080 * linux-cris-low.c: New file with support for CRIS.
11081 * linux-crisv32-low.c: Ditto for CRISv32.
11082 * Makefile.in (SFILES): Add linux-cris-low.c, linux-crisv32-low.c.
11083 (clean): Add reg-cris.c and reg-crisv32.c.
889bf7c5 11084 Add linux-cris-low.o, linux-crisv32-low.o, reg-cris.o, reg-cris.c,
45b134e5
OF
11085 reg-crisv32.o, and reg-crisv32.c to make rules.
11086 * configure.srv: Add cris-*-linux* and crisv32-*-linux* to list of
11087 recognized targets.
11088
48d93c75
UW
110892005-05-16 Ulrich Weigand <uweigand@de.ibm.com>
11090
11091 * linux-low.c (fetch_register): Ensure buffer size is a multiple
11092 of sizeof (PTRACE_XFER_TYPE).
11093 (usr_store_inferior_registers): Likewise. Zero out excess bytes.
11094
e013ee27
OF
110952005-05-12 Orjan Friberg <orjanf@axis.com>
11096
889bf7c5 11097 * target.h (struct target_ops): Add insert_watchpoint,
e013ee27
OF
11098 remove_watchpoint, stopped_by_watchpoint, stopped_data_address function
11099 pointers for hardware watchpoint support.
11100 * linux-low.h (struct linux_target_ops): Ditto.
11101 * linux-low.c (linux_insert_watchpoint, linux_remove_watchpoint)
11102 (linux_stopped_by_watchpoint, linux_stopped_data_address): New. Add
11103 to linux_target_ops.
11104 * remote-utils.c (prepare_resume_reply): Add watchpoint information to
11105 reply packet.
11106 * server.c (main): Recognize 'Z' and 'z' packets.
11107
b0ded00b
UW
111082005-05-10 Ulrich Weigand <uweigand@de.ibm.com>
11109
11110 * linux-s390-low.c (s390_breakpoint, s390_breakpoint_len): Define.
11111 (s390_get_pc, s390_set_pc, s390_breakpoint_at): New functions.
11112 (the_low_target): Add new members.
11113
8643e2ad
DJ
111142005-05-04 Daniel Jacobowitz <dan@codesourcery.com>
11115
11116 * proc-service.c (ps_lgetregs): Search all_processes instead of
11117 all_threads.
11118
fc620387
DJ
111192005-05-04 Daniel Jacobowitz <dan@codesourcery.com>
11120
11121 * server.c (start_inferior): Change return type to int.
11122 (attach_inferior): Change sigptr to int *.
11123 (handle_v_cont, handle_v_requests): Change signal to int *.
11124 (main): Change signal to int.
11125
111262005-04-15 Kei Sakamoto <sakamoto.kei@renesas.com>
7cfbc4a0
KI
11127
11128 * Makefile.in: Add linux-m32r-low.o, reg-m32r.c and reg-m32r.o.
11129 * configure.srv: Add m32r*-*-linux*.
11130 * linux-m32r-low.c: New file.
11131
e0e76420
DJ
111322005-03-04 Daniel Jacobowitz <dan@codesourcery.com>
11133
11134 * Makefile.in (stamp-h): Set CONFIG_HEADERS explicitly.
11135
a1928bad
DJ
111362005-03-03 Daniel Jacobowitz <dan@codesourcery.com>
11137
11138 * inferiors.c (change_inferior_id, add_thread, find_inferior_id):
11139 Take unsigned long arguments for PIDs.
11140 * linux-low.c (add_process, linux_attach_lwp, linux_attach)
11141 (linux_thread_alive, linux_wait_for_event, kill_lwp, send_sigstop)
11142 (wait_for_sigstop, linux_resume_one_process)
11143 (regsets_fetch_inferior_registers, linux_send_signal)
11144 (linux_read_auxv): Likewise. Update the types of variables holding
11145 PIDs. Update format string specifiers.
11146 * linux-low.h (struct process_info, linux_attach_lwp): Likewise.
11147 * remote-utils.c (prepare_resume_reply): Likewise.
11148 * server.c (cont_thread, general_thread, step_thread)
11149 (thread_from_wait, old_thread_from_wait, signal_pid): Change type to
11150 unsigned long.
11151 (handle_query): Update format specifiers.
11152 (handle_v_cont, main): Use strtoul for thread IDs.
11153 * server.h (struct inferior_list_entry): Use unsigned long for ID.
11154 (add_thread, find_inferior_id, change_inferior_id, cont_thread)
11155 (general_thread, step_thread, thread_from_wait)
11156 (old_thread_from_wait): Update.
11157 * target.h (struct thread_resume): Use unsigned long for THREAD.
11158 (struct target_ops): Use unsigned long for arguments to attach and
11159 thread_alive.
11160
dcdb98d2
DJ
111612005-02-24 Daniel Jacobowitz <dan@codesourcery.com>
11162
11163 * acinclude.m4: Include bfd/bfd.m4 directly.
11164 * configure.ac: Use AC_ARG_PROGRAM. Suggested by Aron Griffis
11165 <agriffis@toolchain.org>.
11166 * aclocal.m4, configure: Regenerated.
11167
bec39cab
AC
111682005-01-07 Andrew Cagney <cagney@gnu.org>
11169
11170 * configure.ac: Rename configure.in, require autoconf 2.59.
11171 * configure: Re-generate.
11172
434c4c77
DJ
111732004-12-08 Daniel Jacobowitz <dan@debian.org>
11174
11175 * acinclude.m4 (SRV_CHECK_THREAD_DB): Add ps_get_thread_area. Reset
11176 LIBS when finished.
11177 * aclocal.m4: Regenerated.
11178 * configure: Regenerated.
11179
db1d3e1b
AS
111802004-11-21 Andreas Schwab <schwab@suse.de>
11181
11182 * linux-m68k-low.c (m68k_num_gregs): Define.
11183 (m68k_fill_gregset, m68k_store_gregset, m68k_fill_fpregset)
11184 (m68k_store_fpregset, target_regsets) [HAVE_LINUX_REGSETS]: New.
11185 (m68k_breakpoint, m68k_breakpoint_len, m68k_get_pc, m68k_set_pc)
11186 (m68k_breakpoint_at): New. Add to the_low_target.
11187
11188 * configure.srv (m68*-*-linux*): Set srv_linux_regsets and
11189 srv_linux_thread_db to yes.
11190
43360365
JB
111912004-10-20 Joel Brobecker <brobecker@gnat.com>
11192
11193 * linux-x86-64-low.c (ARCH_SET_GS): Add definition if missing.
11194 (ARCH_SET_FS): Likewise.
11195 (ARCH_GET_FS): Likewise.
11196 (ARCH_GET_GS): Likewise.
11197
fd500816
DJ
111982004-10-16 Daniel Jacobowitz <dan@debian.org>
11199
11200 * linux-i386-low.c (ps_get_thread_area): New.
11201 * linux-x86-64-low.c (ps_get_thread_area): New.
11202 * linux-low.c: Include <sys/syscall.h>.
11203 (linux_kill_one_process): Don't kill the first thread here.
11204 (linux_kill): Kill the first thread here.
11205 (kill_lwp): New function.
11206 (send_sigstop, linux_send_signal): Use it.
11207 * proc-service.c: Clean up #ifdefs.
11208 (fpregset_info): Delete.
11209 (ps_lgetregs): Update and enable implementation.
11210 (ps_lsetregs, ps_lgetfpregs, ps_lsetfpregs): Remove disabled
11211 implementations.
11212 * remote-utils.c (struct sym_cache, symbol_cache): New.
11213 (input_interrupt): Print a clearer message.
11214 (async_io_enabled): New variable.
11215 (enable_async_io, disable_async_io): Use it. Update comments.
11216 (look_up_one_symbol): Use the symbol cache.
11217 * thread-db.c (thread_db_look_up_symbols): New function.
11218 (thread_db_init): Update comments. Call thread_db_look_up_symbols.
11219
f6de3c42
DJ
112202004-10-16 Daniel Jacobowitz <dan@debian.org>
11221
11222 * configure.in: Test for -rdynamic.
11223 * configure: Regenerated.
11224 * Makefile (INTERNAL_LDFLAGS): New.
11225 (gdbserver, gdbreplay): Use it.
11226
2c0fc042
AC
112272004-09-02 Andrew Cagney <cagney@gnu.org>
11228
11229 * Makefile.in (TAGS): Replace TM_FILE with DEPRECATED_TM_FILE.
11230
075b3282
DJ
112312004-03-23 Daniel Jacobowitz <drow@mvista.com>
11232
11233 * linux-low.c (linux_wait): Clear all_processes list also.
11234
fa6a77dc
DJ
112352004-03-12 Daniel Jacobowitz <drow@mvista.com>
11236
11237 * linux-low.c: Include <errno.h>. Remove extern declaration of
11238 errno.
11239
6d782a97
DJ
112402004-03-12 Daniel Jacobowitz <drow@mvista.com>
11241
11242 * gdbreplay.c, server.h, utils.c: Update copyright years.
11243
3a7fb99b
DJ
112442004-03-04 Nathan J. Williams <nathanw@wasabisystems.com>
11245
11246 * server.c (main): Print child status or termination signal from
11247 variable 'signal', not 'sig'.
11248
c3e735a6
DJ
112492004-03-04 Nathan J. Williams <nathanw@wasabisystems.com>
11250
11251 * linux-low.c (linux_read_memory): Change return type to
11252 int. Check for and return error from ptrace().
11253 * target.c (read_inferior_memory): Change return type to int. Pass
11254 back return status from the_target->read_memory().
11255 * target.h (struct target_ops): Adapt *read_memory() prototype.
11256 Update comment.
11257 (read_inferior_memory): Adapt prototype.
11258 * server.c (main): Return an error packet if
11259 read_inferior_memory() returns an error.
11260
a59d1c82
DJ
112612004-03-04 Daniel Jacobowitz <drow@mvista.com>
11262
11263 * Makefile.in (distclean): Remove config.h, stamp-h, and config.log.
11264 Unify with other clean targets.
11265
dc3f8883
DJ
112662004-02-29 Daniel Jacobowitz <drow@mvista.com>
11267
11268 * server.c (handle_v_cont): Call set_desired_inferior.
11269
89a208da
DJ
112702004-02-29 Daniel Jacobowitz <drow@mvista.com>
11271
11272 * remote-utils.c (prepare_resume_reply): Always supply "thread:".
11273
62ea82f5
DJ
112742004-02-29 Daniel Jacobowitz <drow@mvista.com>
11275
11276 * linux-low.c (linux_wait): Unblock async I/O.
11277 (linux_resume): Block and enable async I/O.
11278 * remote-utils.c (block_async_io, unblock_async_io): New functions.
11279 * server.h (block_async_io, unblock_async_io): Add prototypes.
11280
6910d122
DJ
112812004-02-29 Daniel Jacobowitz <drow@mvista.com>
11282
11283 * remote-utils.c (remote_open): Print a status notice after
11284 opening a TCP port.
11285 * server.c (attach_inferior): Print a status notice after
11286 attaching.
11287
112882004-02-29 Daniel Jacobowitz <drow@mvista.com>
d677d77d
DJ
11289
11290 * linux-arm-low.c (arm_get_pc): Print out stop PC in debug mode.
11291
c89dc5d4
DJ
112922004-02-26 Daniel Jacobowitz <drow@mvista.com>
11293
11294 * remote-utils.c (write_enn): Use "E01" instead of "ENN" for the
11295 error packet.
11296 * server.c, target.h: Update copyright years.
11297
4b8dad4a
RM
112982004-02-25 Roland McGrath <roland@redhat.com>
11299
11300 * target.h (struct target_ops): New member `read_auxv'.
11301 * server.c (handle_query): Handle qPart:auxv:read: query using that.
11302 * linux-low.c (linux_read_auxv): New function.
11303 (linux_target_ops): Initialize `read_auxv' member to that.
11304
d7446758
JB
113052004-02-17 Ulrich Weigand <Ulrich.Weigand@de.ibm.com>
11306
11307 Committed by Jim Blandy <jimb@redhat.com>.
11308
11309 * linux-s390-low.c (s390_num_regs): Update.
4b8dad4a 11310 (s390_regmap): Remove control registers. Use __s390x__ predefine
d7446758
JB
11311 instead of GPR_SIZE to distiguish s390 and s390x targets.
11312
5544ad89
DJ
113132004-01-31 Daniel Jacobowitz <drow@mvista.com>
11314
11315 * linux-low.c: Update copyright year.
11316 (check_removed_breakpoint): Clear pending_is_breakpoint.
11317 (linux_set_resume_request, linux_queue_one_thread)
11318 (resume_status_pending_p): New functions.
11319 (linux_continue_one_thread): Use process->resume.
11320 (linux_resume): Only resume threads if there are no pending events.
11321 * linux-low.h (struct process_info): Add resume request
11322 pointer.
11323
2a68b70e
DJ
113242004-01-30 Daniel Jacobowitz <drow@mvista.com>
11325
11326 * regcache.c (new_register_cache): Clear the allocated register
11327 buffer. Suggested by Atsushi Nemoto <anemo@mba.ocn.ne.jp>.
11328
64386c31
DJ
113292003-10-13 Daniel Jacobowitz <drow@mvista.com>
11330
11331 * linux-low.c (linux_resume): Take a struct thread_resume *
11332 argument.
11333 (linux_wait): Update call.
11334 (resume_ptr): New static variable.
11335 (linux_continue_one_thread): Renamed from
11336 linux_continue_one_process. Use resume_ptr.
11337 (linux_resume): Use linux_continue_one_thread.
11338 * server.c (handle_v_cont, handle_v_requests): New functions.
11339 (myresume): New function.
11340 (main): Handle 'v' case.
11341 * target.h (struct thread_resume): New type.
11342 (struct target_ops): Change argument of "resume" to struct
11343 thread_resume *.
11344 (myresume): Delete macro.
11345
c938e9b0
L
113462003-08-08 H.J. Lu <hongjiu.lu@intel.com>
11347
11348 * Makefile.in (install-only): Create dest dir. Support DESTDIR.
11349 (uninstall): Support DESTDIR.
11350
7f313d07
BC
11351Mon Jul 21 20:09:34 UTC 2003 Brendan Conoboy <blc@redhat.com>
11352
11353 * configure.srv: Add xscale*linux copy of arm*linux entry.
11354
3b2fc2ea
DJ
113552003-07-24 Daniel Jacobowitz <drow@mvista.com>
11356
11357 * linux-arm-low.c (arm_reinsert_addr): New function.
11358 (the_low_target): Add arm_reinsert_addr.
11359
1c0a559e
MK
113602003-07-08 Mark Kettenis <kettenis@gnu.org>
11361
11362 * mem-break.c: Remove whitespace at end of file.
11363
43d5792c
DJ
113642003-06-28 Daniel Jacobowitz <drow@mvista.com>
11365
11366 * configure.in: Check whether we need to prototype strerror.
11367 * server.h: Optionally prototype strerror.
11368 * gdbreplay.c (perror_with_name): Use strerror.
11369 * linux-low.c (linux_attach_lwp): Use strerror.
11370 * utils.c (perror_with_name): Use strerror.
11371 * config.in, configure: Regenerated.
11372
c8a86edf
DJ
113732003-06-28 Daniel Jacobowitz <drow@mvista.com>
11374
11375 * linux-sh-low.c (sh_regmap): Fix FP register offsets, reported by
11376 SUGIOKA Toshinobu <sugioka@itonet.co.jp>.
11377
73d37363
DJ
113782003-06-20 Daniel Jacobowitz <drow@mvista.com>
11379
11380 * Makefile.in (SFILES): Update.
11381 * low-hppabsd.c, low-lynx.c, low-nbsd.c, low-sim.c, low-sparc.c,
11382 low-sun3.c: Remove files.
11383
6ad8ae5c
DJ
113842003-06-17 Daniel Jacobowitz <drow@mvista.com>
11385
11386 * linux-low.c: Move comment to linux_thread_alive where it belonged.
11387 (linux_detach_one_process, linux_detach): New functions.
11388 (linux_target_ops): Add linux_detach.
11389 * server.c (main): Handle 'D' packet.
11390 * target.h (struct target_ops): Add "detach" member.
11391 (detach_inferior): Define.
11392
1581182a
MK
113932003-06-13 Mark Kettenis <kettenis@gnu.org>
11394
11395 From Kelley Cook <kelleycook@wideopenwest.com>:
11396 * configure.srv: Accept i[34567]86 variants.
11397
e5379b03
DJ
113982003-06-05 Daniel Jacobowitz <drow@mvista.com>
11399
11400 * linux-low.c (linux_wait_for_event): Correct comment typos.
11401 (linux_resume_one_process): Call check_removed_breakpoint.
11402 (linux_send_signal): New function.
11403 (linux_target_ops): Add linux_send_signal.
11404 * remote-utils.c (putpkt, input_interrupt): Use send_signal instead
11405 of kill.
11406 * target.h (struct target_ops): Add send_signal.
11407
2ff29de4
JB
114082003-05-29 Jim Blandy <jimb@redhat.com>
11409
11410 * linux-low.c (usr_store_inferior_registers): Transfer buf in
11411 PTRACE_XFER_TYPE-sized chunks, not int-sized chunks. Otherwise,
11412 if 'int' is smaller than PTRACE_XFER_TYPE, you end up throwing
11413 away part of the register's value.
11414
254787d4
DJ
114152003-03-26 Daniel Jacobowitz <drow@mvista.com>
11416
11417 * linux-low.c (linux_create_inferior): Use __SIGRTMIN.
11418 (linux_wait_for_event, linux_init_signals): Likewise.
11419
94e10508
DJ
114202003-03-17 Daniel Jacobowitz <drow@mvista.com>
11421
11422 * configure.in: Check for stdlib.h.
11423 * configure: Regenerated.
11424 * config.in: Regenerated.
11425
4c0711e0
DJ
114262003-01-04 Andreas Schwab <schwab@suse.de>
11427
11428 * linux-m68k-low.c (m68k_num_regs): Define to 29 instead of 31.
11429
ef66e766
AC
114302003-01-02 Andrew Cagney <ac131313@redhat.com>
11431
11432 * Makefile.in: Remove obsolete code.
11433
a1358604
DJ
114342002-11-20 Daniel Jacobowitz <drow@mvista.com>
11435
11436 * linux-s390-low.c (s390_regmap): Check GPR_SIZE instead of
11437 defined(PT_FPR0_HI).
11438
23ce3b1c
DJ
114392002-11-17 Stuart Hughes <seh@zee2.com>
11440
11441 * linux-arm-low.c (arm_num_regs): Increase.
11442 (arm_regmap): Include status register.
11443
114442002-11-17 Daniel Jacobowitz <drow@mvista.com>
11445
11446 * linux-low.c (register_addr): Remove incorrect -1 check.
11447
a9fa9f7d
DJ
114482002-08-29 Daniel Jacobowitz <drow@mvista.com>
11449
11450 * linux-low.c (linux_create_inferior): Call setpgid. Return
11451 the new PID.
11452 (unstopped_p, linux_signal_pid): Remove.
11453 (linux_target_ops): Remove linux_signal_pid.
11454 * remote-utils.c (putpkt, input_interrupt): Use signal_pid
11455 global instead of target method.
11456 * target.h (struct target_ops): Remove signal_pid. Update comment
11457 for create_inferior.
11458 * server.c (signal_pid): New variable.
11459 (create_inferior): Set signal_pid. Block SIGTTOU and SIGTTIN in
4b8dad4a 11460 gdbserver. Set the child to be the foreground process group.
a9fa9f7d
DJ
11461 (attach_inferior): Set signal_pid.
11462
17574093
DJ
114632002-08-23 Daniel Jacobowitz <drow@mvista.com>
11464
11465 * ChangeLog: New file, with entries from gdb/ChangeLog after GDB 5.2.
11466
114672002-08-20 Jim Blandy <jimb@redhat.com>
11468
11469 * Makefile.in (LDFLAGS): Allow the configure script to establish a
11470 default for this.
11471
114722002-08-01 Andrew Cagney <cagney@redhat.com>
11473
11474 * Makefile.in: Make chill references obsolete.
11475
114762002-07-24 Kevin Buettner <kevinb@redhat.com>
11477
11478 * configure.in (unistd.h): Add to AC_CHECK_HEADERS list.
11479 * configure: Regenerate.
11480 * config.in: Regenerate.
11481
114822002-07-09 David O'Brien <obrien@FreeBSD.org>
11483
11484 * gdbreplay.c (stdlib.h, unistd.h): Conditionaly include.
11485 (perror_with_name, remote_close, remote_open, expect, play): Static.
11486
114872002-07-04 Michal Ludvig <mludvig@suse.cz>
11488
4b8dad4a 11489 * linux-x86-64-low.c (x86_64_regmap): Make it an array of
17574093
DJ
11490 byte offsets instead of an array of indexes.
11491 (x86_64_store_gregset, x86_64_store_fpregset): Parameter made const.
11492
114932002-06-13 Daniel Jacobowitz <drow@mvista.com>
11494
11495 * regcache.c: Add comment.
11496
114972002-06-11 Daniel Jacobowitz <drow@mvista.com>
11498
11499 * thread-db.c: New file.
11500 * proc-service.c: New file.
11501 * acinclude.m4: New file.
11502 * Makefile.in: Add GDBSERVER_LIBS, gdb_proc_service_h,
11503 proc-service.o, and thread-db.o.
11504 (linux-low.o): Add USE_THREAD_DB.
11505 * acconfig.h: Add HAVE_PRGREGSET_T, HAVE_PRFPREGSET_T,
11506 HAVE_LWPID_T, HAVE_PSADDR_T, and PRFPREGSET_T_BROKEN.
11507 * aclocal.m4: Regenerated.
11508 * config.in: Regenerated.
11509 * configure: Regenerated.
11510 * configure.in: Check for proc_service.h, sys/procfs.h,
11511 thread_db.h, and linux/elf.h headrs.
11512 Check for lwpid_t, psaddr_t, prgregset_t, prfpregset_t, and
11513 PRFPREGSET_T_BROKEN. Introduce srv_thread_depfiles and USE_THREAD_DB.
11514 Check for -lthread_db and thread support.
11515 * configure.srv: Enable thread_db support for ARM, i386, MIPS,
11516 PowerPC, and SuperH.
11517 * i387-fp.c: Constify arguments.
11518 * i387-fp.h: Likewise.
11519 * inferiors.c: (struct thread_info): Renamed from
11520 `struct inferior_info'. Remove PID member. Use generic inferior
11521 list header. All uses updated.
11522 (inferiors, signal_pid): Removed.
11523 (all_threads): New variable.
11524 (get_thread): Define.
11525 (add_inferior_to_list): New function.
11526 (for_each_inferior): New function.
11527 (change_inferior_id): New function.
11528 (add_inferior): Removed.
11529 (remove_inferior): New function.
11530 (add_thread): New function.
11531 (free_one_thread): New function.
11532 (remove_thread): New function.
11533 (clear_inferiors): Use for_each_inferior and free_one_thread.
11534 (find_inferior): New function.
11535 (find_inferior_id): New function.
11536 (inferior_target_data): Update argument type.
11537 (set_inferior_target_data): Likewise.
11538 (inferior_regcache_data): Likewise.
11539 (set_inferior_regcache_data): Likewise.
11540 * linux-low.c (linux_bp_reinsert): Remove.
11541 (all_processes, stopping_threads, using_thrads)
11542 (struct pending_signals, debug_threads, pid_of): New.
11543 (inferior_pid): Replace with macro.
11544 (struct inferior_linux_data): Remove.
11545 (get_stop_pc, add_process): New functions.
11546 (linux_create_inferior): Restore SIGRTMIN+1 before calling exec.
11547 Use add_process and add_thread.
11548 (linux_attach_lwp): New function, based on old linux_attach. Use
11549 add_process and add_thread. Set stop_expected for new threads.
11550 (linux_attach): New function.
11551 (linux_kill_one_process): New function.
11552 (linux_kill): Kill all LWPs.
11553 (linux_thread_alive): Use find_inferior_id.
11554 (check_removed_breakpoints, status_pending_p): New functions.
11555 (linux_wait_for_process): Renamed from linux_wait_for_one_inferior.
11556 Update. Use WNOHANG. Wait for cloned processes also. Update process
11557 struct for the found process.
11558 (linux_wait_for_event): New function.
11559 (linux_wait): Use it. Support LWPs.
11560 (send_sigstop, wait_for_sigstop, stop_all_processes)
11561 (linux_resume_one_process, linux_continue_one_process): New functions.
11562 (linux_resume): Support LWPs.
11563 (REGISTER_RAW_SIZE): Remove.
11564 (fetch_register): Use register_size instead. Call supply_register.
11565 (usr_store_inferior_registers): Likewise. Call collect_register.
11566 Fix recursive case.
11567 (regsets_fetch_inferior_registers): Improve error message.
11568 (regsets_store_inferior_registers): Add debugging.
11569 (linux_look_up_symbols): Call thread_db_init if USE_THREAD_DB.
11570 (unstopped_p, linux_signal_pid): New functions.
11571 (linux_target_ops): Add linux_signal_pid.
11572 (linux_init_signals): New function.
11573 (initialize_low): Call it. Initialize using_threads.
11574 * regcache.c (inferior_regcache_data): Add valid
11575 flag.
11576 (get_regcache): Fetch registers lazily. Add fetch argument
11577 and update all callers.
11578 (regcache_invalidate_one, regcache_invalidate): New
11579 functions.
11580 (new_register_cache): Renamed from create_register_cache.
11581 Return the new regcache.
11582 (free_register_cache): Change argument to a void *.
11583 (registers_to_string, registers_from_string): Call get_regcache
11584 with fetch flag set.
11585 (register_data): Make static. Pass fetch flag to get_regcache.
11586 (supply_register): Call get_regcache with fetch flag clear.
11587 (collect_register): Call get_regcache with fetch flag set.
11588 (collect_register_as_string): New function.
11589 * regcache.h: Update.
11590 * remote-utils.c (putpkt): Flush after debug output and use
11591 stderr.
11592 Handle input interrupts while waiting for an ACK.
11593 (input_interrupt): Use signal_pid method.
11594 (getpkt): Flush after debug output and use stderr.
11595 (outreg): Use collect_register_as_string.
11596 (new_thread_notify, dead_thread_notify): New functions.
11597 (prepare_resume_reply): Check using_threads. Set thread_from_wait
11598 and general_thread.
11599 (look_up_one_symbol): Flush after debug output.
11600 * server.c (step_thread, server_waiting): New variables.
11601 (start_inferior): Don't use signal_pid. Update call to mywait.
11602 (attach_inferior): Update call to mywait.
11603 (handle_query): Handle qfThreadInfo and qsThreadInfo.
11604 (main): Don't fetch/store registers explicitly. Use
11605 set_desired_inferior. Support proposed ``Hs'' packet. Update
11606 calls to mywait.
11607 * server.h: Update.
11608 (struct inferior_list, struct_inferior_list_entry): New.
11609 * target.c (set_desired_inferior): New.
11610 (write_inferior_memory): Constify.
11611 (mywait): New function.
11612 * target.h: Update.
11613 (struct target_ops): New signal_pid method.
11614 (mywait): Removed macro, added prototype.
11615
11616 * linux-low.h (regset_func): Removed.
11617 (regset_fill_func, regset_store_func): New.
11618 (enum regset_type): New.
11619 (struct regset_info): Add type field. Use new operation types.
11620 (struct linux_target_ops): stop_pc renamed to get_pc.
11621 Add decr_pc_after_break and breakpoint_at.
11622 (get_process, get_thread_proess, get_process_thread)
11623 (strut process_info, all_processes, linux_attach_lwp)
11624 (thread_db_init): New.
11625
11626 * linux-arm-low.c (arm_get_pc, arm_set_pc,
11627 arm_breakpoint, arm_breakpoint_len, arm_breakpoint_at): New.
11628 (the_low_target): Add new members.
11629 * linux-i386-low.c (i386_store_gregset, i386_store_fpregset)
11630 (i386_store_fpxregset): Constify.
11631 (target_regsets): Add new kind identifier.
11632 (i386_get_pc): Renamed from i386_stop_pc. Simplify.
11633 (i386_set_pc): Add debugging.
11634 (i386_breakpoint_at): New function.
11635 (the_low_target): Add new members.
11636 * linux-mips-low.c (mips_get_pc, mips_set_pc)
11637 (mips_breakpoint, mips_breakpoint_len, mips_reinsert_addr)
11638 (mips_breakpoint_at): New.
11639 (the_low_target): Add new members.
11640 * linux-ppc-low.c (ppc_get_pc, ppc_set_pc)
11641 (ppc_breakpoint, ppc_breakpoint_len, ppc_breakpoint_at): New.
11642 (the_low_target): Add new members.
11643 * linux-sh-low.c (sh_get_pc, sh_set_pc)
11644 (sh_breakpoint, sh_breakpoint_len, sh_breakpoint_at): New.
11645 (the_low_target): Add new members.
11646 * linux-x86-64-low.c (target_regsets): Add new kind
11647 identifier.
11648
116492002-05-15 Daniel Jacobowitz <drow@mvista.com>
11650
11651 From Martin Pool <mbp@samba.org>:
11652 * server.c (gdbserver_usage): New function.
11653 (main): Call it.
11654
116552002-05-14 Daniel Jacobowitz <drow@mvista.com>
11656
11657 * mem-break.c (reinsert_breakpoint_by_bp): Correct typo
11658 stop_at -> stop_pc.
11659
116602002-05-04 Andrew Cagney <ac131313@redhat.com>
11661
11662 * Makefile.in: Remove obsolete code.
11663
116642002-04-24 Michal Ludvig <mludvig@suse.cz>
11665
11666 * linux-low.c (regsets_fetch_inferior_registers),
11667 (regsets_store_inferior_registers): Removed cast to int from
11668 ptrace() calls.
11669 * regcache.h: Added declaration of struct inferior_info.
11670
116712002-04-20 Daniel Jacobowitz <drow@mvista.com>
11672
11673 * inferiors.c (struct inferior_info): Add regcache_data.
11674 (add_inferior): Call create_register_cache.
11675 (clear_inferiors): Call free_register_cache.
11676 (inferior_regcache_data, set_inferior_regcache_data): New functions.
11677 * regcache.c (struct inferior_regcache_data): New.
11678 (registers): Remove.
11679 (get_regcache): New function.
11680 (create_register_cache, free_register_cache): New functions.
11681 (set_register_cache): Don't initialize the register cache here.
11682 (registers_to_string, registers_from_string, register_data): Call
11683 get_regcache.
11684 * regcache.h: Add prototypes.
11685 * server.h: Likewise.
11686
116872002-04-20 Daniel Jacobowitz <drow@mvista.com>
11688
11689 * mem-break.c: New file.
11690 * mem-break.h: New file.
11691 * Makefile.in: Add mem-break.o rule; update server.h
11692 dependencies.
11693 * inferiors.c (struct inferior_info): Add target_data
11694 member.
11695 (clear_inferiors): Free target_data member if set.
11696 (inferior_target_data, set_inferior_target_data): New functions.
11697 * linux-i386-low.c (i386_breakpoint, i386_breakpoint_len)
11698 (i386_stop_pc, i386_set_pc): New. Add to the_low_target.
11699 * linux-low.c (linux_bp_reinsert): New variable.
11700 (struct inferior_linux_data): New.
11701 (linux_create_inferior): Use set_inferior_target_data.
11702 (linux_attach): Likewise. Call add_inferior.
11703 (linux_wait_for_one_inferior): New function.
11704 (linux_wait): Call it.
11705 (linux_write_memory): Add const.
11706 (initialize_low): Call set_breakpoint_data.
11707 * linux-low.h (struct linux_target_ops): Add breakpoint
11708 handling members.
11709 * server.c (attach_inferior): Remove extra add_inferior
11710 call.
11711 * server.h: Include mem-break.h. Update inferior.c
11712 prototypes.
11713 * target.c (read_inferior_memory)
11714 (write_inferior_memory): New functions.
11715 * target.h (read_inferior_memory)
11716 (write_inferior_memory): Change macros to prototypes.
11717 (struct target_ops): Update comments. Add const to write_memory
11718 definition.
11719
117202002-04-11 Daniel Jacobowitz <drow@mvista.com>
11721
11722 * linux-low.c (usr_store_inferior_registers): Support
11723 registers which are allowed to fail to store.
11724 * linux-low.h (linux_target_ops): Likewise.
11725 * linux-ppc-low.c (ppc_regmap): Support FPSCR.
11726 (ppc_cannot_store_register): FPSCR may not be storable.
11727
117282002-04-09 Daniel Jacobowitz <drow@mvista.com>
11729
11730 * server.h: Include <string.h> if HAVE_STRING_H.
11731 * ChangeLog: Correct paths in last ChangeLog entry.
11732
117332002-04-09 Daniel Jacobowitz <drow@mvista.com>
11734
11735 * linux-low.h: Remove obsolete prototypes.
11736 (struct linux_target_ops): New.
11737 (extern the_low_target): New.
11738 * linux-low.c (num_regs, regmap): Remove declarations.
11739 (register_addr): Use the_low_target explicitly.
11740 (fetch_register): Likewise.
11741 (usr_fetch_inferior_registers): Likewise.
11742 (usr_store_inferior_registers): Likewise.
11743 * linux-arm-low.c (num_regs): Remove.
11744 (arm_num_regs): Define.
11745 (arm_regmap): Renamed from regmap, made static.
11746 (arm_cannot_fetch_register): Renamed from cannot_fetch_register,
11747 made static.
11748 (arm_cannot_store_register): Renamed from cannot_store_register,
11749 made static.
11750 (the_low_target): New.
11751 * linux-i386-low.c (num_regs): Remove.
11752 (i386_num_regs): Define.
11753 (i386_regmap): Renamed from regmap, made static.
11754 (i386_cannot_fetch_register): Renamed from cannot_fetch_register,
11755 made static.
11756 (i386_cannot_store_register): Renamed from cannot_store_register,
11757 made static.
11758 (the_low_target): New.
11759 * linux-ia64-low.c (num_regs): Remove.
11760 (ia64_num_regs): Define.
11761 (ia64_regmap): Renamed from regmap, made static.
11762 (ia64_cannot_fetch_register): Renamed from cannot_fetch_register,
11763 made static.
11764 (ia64_cannot_store_register): Renamed from cannot_store_register,
11765 made static.
11766 (the_low_target): New.
11767 * linux-m68k-low.c (num_regs): Remove.
11768 (m68k_num_regs): Define.
11769 (m68k_regmap): Renamed from regmap, made static.
11770 (m68k_cannot_fetch_register): Renamed from cannot_fetch_register,
11771 made static.
11772 (m68k_cannot_store_register): Renamed from cannot_store_register,
11773 made static.
11774 (the_low_target): New.
11775 * linux-mips-low.c (num_regs): Remove.
11776 (mips_num_regs): Define.
11777 (mips_regmap): Renamed from regmap, made static.
11778 (mips_cannot_fetch_register): Renamed from cannot_fetch_register,
11779 made static.
11780 (mips_cannot_store_register): Renamed from cannot_store_register,
11781 made static.
11782 (the_low_target): New.
11783 * linux-ppc-low.c (num_regs): Remove.
11784 (ppc_num_regs): Define.
11785 (ppc_regmap): Renamed from regmap, made static.
11786 (ppc_cannot_fetch_register): Renamed from cannot_fetch_register,
11787 made static.
11788 (ppc_cannot_store_register): Renamed from cannot_store_register,
11789 made static.
11790 (the_low_target): New.
11791 * linux-s390-low.c (num_regs): Remove.
11792 (s390_num_regs): Define.
11793 (s390_regmap): Renamed from regmap, made static.
11794 (s390_cannot_fetch_register): Renamed from cannot_fetch_register,
11795 made static.
11796 (s390_cannot_store_register): Renamed from cannot_store_register,
11797 made static.
11798 (the_low_target): New.
11799 * linux-sh-low.c (num_regs): Remove.
11800 (sh_num_regs): Define.
11801 (sh_regmap): Renamed from regmap, made static.
11802 (sh_cannot_fetch_register): Renamed from cannot_fetch_register,
11803 made static.
11804 (sh_cannot_store_register): Renamed from cannot_store_register,
11805 made static.
11806 (the_low_target): New.
11807 * linux-x86-64-low.c (x86_64_regmap): Renamed from regmap.
11808 (the_low_target): New.
11809
118102002-04-09 Daniel Jacobowitz <drow@mvista.com>
11811
11812 * Makefile.in: Add stamp-h target.
11813 * configure.in: Create stamp-h.
11814 * configure: Regenerated.
11815
118162002-04-09 Daniel Jacobowitz <drow@mvista.com>
11817
11818 * inferiors.c: New file.
11819 * target.c: New file.
11820 * target.h: New file.
11821 * Makefile.in: Add target.o and inferiors.o. Update
11822 dependencies.
11823 * linux-low.c (inferior_pid): New static variable,
11824 moved from server.c.
11825 (linux_create_inferior): Renamed from create_inferior.
11826 Call add_inferior. Return 0 on success instead of a PID.
11827 (linux_attach): Renamed from myattach.
11828 (linux_kill): Renamed from kill_inferior. Call clear_inferiors ().
11829 (linux_thread_alive): Renamed from mythread_alive.
11830 (linux_wait): Renamed from mywait. Call clear_inferiors () if the
11831 child dies.
11832 (linux_resume): Renamed from myresume. Add missing ``return 0''.
11833 (regsets_store_inferior_registers): Correct error message.
11834 Add missing ``return 0''.
11835 (linux_fetch_registers): Renamed from fetch_inferior_registers.
11836 (linux_store_registers): Renamed from store_inferior_registers.
11837 (linux_read_memory): Renamed from read_inferior_memory.
11838 (linux_write_memory): Renamed from write_inferior_memory.
11839 (linux_target_ops): New structure.
11840 (initialize_low): Call set_target_ops ().
11841 * remote-utils.c (unhexify): New function.
11842 (hexify): New function.
11843 (input_interrupt): Send signals to ``signal_pid''.
11844 * server.c (inferior_pid): Remove.
11845 (start_inferior): Update create_inferior call.
11846 (attach_inferior): Call add_inferior.
11847 (handle_query): New function.
11848 (main): Call handle_query for `q' packets.
11849 * server.h: Include "target.h". Remove obsolete prototypes.
11850 Add prototypes for "inferiors.c", "target.c", hexify, and unhexify.
11851
118522002-04-09 Daniel Jacobowitz <drow@mvista.com>
11853
11854 * Makefile.in: Add WARN_CFLAGS. Update configury
11855 dependencies.
11856 * configure.in: Check for <string.h>
11857 * configure: Regenerate.
11858 * config.in: Regenerate.
11859 * gdbreplay.c: Include needed system headers.
11860 (remote_open): Remove strchr prototype.
11861 * linux-low.h: Correct #ifdef to HAVE_LINUX_USRREGS.
11862 * regcache.c (supply_register): Change buf argument to const void *.
11863 (supply_register_by_name): Likewise.
11864 (collect_register): Change buf argument to void *.
11865 (collect_register_by_name): Likewise.
11866 * regcache.h: Add missing prototypes.
11867 * remote-utils.c: Include <arpa/inet.h> for inet_ntoa.
11868 * server.c (handle_query): New function.
11869 (attached): New static variable, moved out of main.
11870 (main): Quiet longjmp clobber warnings.
11871 * server.h: Add ATTR_NORETURN and ATTR_FORMAT. Update prototypes.
11872 * utils.c (error): Remove NORETURN.
11873 (fatal): Likewise.
This page took 1.678571 seconds and 4 git commands to generate.