]> git.ipfire.org Git - thirdparty/binutils-gdb.git/blame - gdb/gdbserver/ChangeLog
Make aarch64_linux_prepare_to_resume the same on GDB and GDBserver
[thirdparty/binutils-gdb.git] / gdb / gdbserver / ChangeLog
CommitLineData
f6011a1c
YQ
12015-08-25 Yao Qi <yao.qi@linaro.org>
2
3 * linux-aarch64-low.c (aarch64_linux_prepare_to_resume): Use
4 lwp_arch_private_info and ptid_of_lwp.
5
88e2cf7e
YQ
62015-08-25 Yao Qi <yao.qi@linaro.org>
7
8 * linux-aarch64-low.c (aarch64_get_debug_reg_state): Add argument pid.
9 Find proc_info by find_process_pid. All callers updated.
10
5e35436e
YQ
112015-08-25 Yao Qi <yao.qi@linaro.org>
12
13 * linux-aarch64-low.c (struct arch64_dr_update_callback_param):
14 Remove.
15 (debug_reg_change_callback): Remove.
16 (aarch64_notify_debug_reg_change): Remove.
17
4a8a7965
YQ
182015-08-25 Yao Qi <yao.qi@linaro.org>
19
20 * linux-aarch64-low.c (aarch64_notify_debug_reg_change):
21 Call current_lwp_ptid.
22
32a271ee
YQ
232015-08-25 Yao Qi <yao.qi@linaro.org>
24
25 * linux-aarch64-low.c (debug_reg_change_callback): Use
26 debug_printf.
27
0d51c8d7
YQ
282015-08-25 Yao Qi <yao.qi@linaro.org>
29
30 * linux-aarch64-low.c (debug_reg_change_callback): Use phex.
31
31a43dd5
YQ
322015-08-25 Yao Qi <yao.qi@linaro.org>
33
34 * linux-aarch64-low.c (debug_reg_change_callback): Remove comments.
35
8ee52567
YQ
362015-08-25 Yao Qi <yao.qi@linaro.org>
37
38 * linux-aarch64-low.c (debug_reg_change_callback): Re-indent
39 the code.
40
ff3f0f45
YQ
412015-08-25 Yao Qi <yao.qi@linaro.org>
42
43 * linux-aarch64-low.c (aarch64_dr_update_callback_param) <pid>:
44 Remove.
45 (debug_reg_change_callback): Remove argument entry and add argument
46 lwp. Remove local variable thread. Don't print thread id in the
47 debugging output. Don't check whether pid of thread equals to pid.
48 (aarch64_notify_debug_reg_change): Don't set param.pid. Call
49 iterate_over_lwps instead find_inferior.
50
3d40fbb5
PA
512015-08-24 Pedro Alves <palves@redhat.com>
52
53 * inferiors.c (get_first_process): New function.
54 * inferiors.h (get_first_process): New declaration.
55 * remote-utils.c (read_ptid): Default to the first process in the
56 list, instead of to the current thread's process.
57
438e1e42
PA
582015-08-24 Pedro Alves <palves@redhat.com>
59
60 * debug.c: Include gdb_sys_time.h instead of sys/time.h.
61 * event-loop.c: Likewise.
62 * remote-utils.c: Likewise.
63 * tracepoint.c: Likewise.
64
a8c6d4fc
PA
652015-08-24 Pedro Alves <palves@redhat.com>
66
67 * spu-low.c (spu_request_interrupt): Use lwpid_of instead of
68 ptid_get_lwp.
69
99b0bb12
PA
702015-08-21 Pedro Alves <palves@redhat.com>
71
72 * ax.c (gdb_eval_agent_expr): Return expr_eval_unhandled_opcode
73 instead of literal 1.
74
f8904751
PA
752015-08-21 Pedro Alves <palves@redhat.com>
76
77 * tdesc.c (default_description): Explicitly zero-initialize.
78
465a859e
PA
792015-08-21 Pedro Alves <palves@redhat.com>
80
81 PR gdb/18749
82 * inferiors.c (remove_thread): Discard any pending stop reply for
83 this thread.
84 * server.c (remove_all_on_match_pid): Rename to ...
85 (remove_all_on_match_ptid): ... this. Work with a filter ptid
86 instead of a pid.
87 (discard_queued_stop_replies): Change parameter to a ptid. Now
88 extern.
89 (handle_v_kill, kill_inferior_callback, captured_main)
90 (process_serial_event): Adjust.
91 * server.h (discard_queued_stop_replies): Declare.
92
f0db101d
PA
932015-08-21 Pedro Alves <palves@redhat.com>
94
95 * linux-low.c (wait_for_sigstop): Always switch to no thread
96 selected if the previously current thread dies.
97 * lynx-low.c (lynx_request_interrupt): Use the first thread's
98 process instead of the current thread's.
99 * remote-utils.c (input_interrupt): Don't check if there's no
100 current thread.
101 * server.c (gdb_read_memory, gdb_write_memory): If setting the
102 current thread to the general thread fails, error out.
103 (handle_qxfer_auxv, handle_qxfer_libraries)
104 (handle_qxfer_libraries_svr4, handle_qxfer_siginfo)
105 (handle_qxfer_spu, handle_qxfer_statictrace, handle_qxfer_fdpic)
106 (handle_query): Check if there's a thread selected instead of
107 checking whether there's any thread in the thread list.
108 (handle_qxfer_threads, handle_qxfer_btrace)
109 (handle_qxfer_btrace_conf): Don't error out early if there's no
110 thread in the thread list.
111 (handle_v_cont, myresume): Don't set the current thread to the
112 continue thread.
113 (process_serial_event) <Hg handling>: Also set thread_id if the
114 previous general thread is still alive.
115 (process_serial_event) <g/G handling>: If setting the current
116 thread to the general thread fails, error out.
117 * spu-low.c (spu_resume, spu_request_interrupt): Use the first
118 thread's lwp instead of the current thread's.
119 * target.c (set_desired_thread): If the desired thread was not
120 found, leave the current thread pointing to NULL. Return an int
121 (boolean) indicating success.
122 * target.h (set_desired_thread): Change return type to int.
123
40045d91
MF
1242015-08-20 Max Filippov <jcmvbkbc@gmail.com>
125
126 * configure.srv (xtensa*-*-linux*): Add srv_linux_thread_db=yes.
127 * linux-xtensa-low.c (arch/xtensa.h gdb_proc_service.h): New
128 #includes.
129 (ps_get_thread_area): New function.
130
45face3b
GB
1312015-08-19 Gary Benson <gbenson@redhat.com>
132
133 * hostio.c (handle_pread): Do not attempt to read more data
134 than hostio_reply_with_data can fit in a packet.
135
16d5f642
JB
1362015-08-18 Joel Brobecker <brobecker@adacore.com>
137
138 * linux-aarch32-low.c (NT_ARM_VFP): Define if not already defined.
139
a738da3a
MF
1402015-08-14 Matthew Fortune <matthew.fortune@imgtec.com>
141
142 * linux-low.c (get_r_debug): Handle DT_MIPS_RLD_MAP_REL.
143
33ebda9d
PA
1442015-08-06 Pedro Alves <palves@redhat.com>
145
146 * tracepoint.c (expr_eval_result): Now an int.
147
a44892be
PA
1482015-08-06 Pedro Alves <palves@redhat.com>
149
150 * gdbthread.h (struct regcache): Forward declare.
151 (struct thread_info) <regcache_data>: Now a struct regcache
152 pointer.
153 * inferiors.c (inferior_regcache_data)
154 (set_inferior_regcache_data): Now work with struct regcache
155 pointers.
156 * inferiors.h (struct regcache): Forward declare.
157 (inferior_regcache_data, set_inferior_regcache_data): Now work
158 with struct regcache pointers.
159 * regcache.c (get_thread_regcache, regcache_invalidate_thread)
160 (free_register_cache_thread): Remove struct regcache pointer
161 casts.
162
608a1e46
PA
1632015-08-06 Pedro Alves <palves@redhat.com>
164
165 * server.c (captured_main): On error, print the exception message
166 to stderr, and if run_once is set, throw a quit.
167
f0ce0d3a
PA
1682015-08-06 Pedro Alves <palves@redhat.com>
169
170 * linux-low.c (move_out_of_jump_pad_callback): Temporarily switch
171 the current thread.
172
bf47e248
PA
1732015-08-06 Pedro Alves <palves@redhat.com>
174
175 * linux-low.c (linux_write_memory): Rewrite debug output to avoid
176 reading beyond the passed in buffer length.
177
b6b9ffcc
PL
1782015-08-06 Pierre Langlois <pierre.langlois@arm.com>
179
180 * tracepoint.c (symbol_list) <required>: Remove.
181
863d01bd
PA
1822015-08-06 Pedro Alves <palves@redhat.com>
183
184 * linux-low.c (handle_extended_wait): Set the fork child's suspend
185 count if stopping and suspending threads.
186 (check_stopped_by_breakpoint): If stopped by trace, set the LWP's
187 stop reason to TARGET_STOPPED_BY_SINGLE_STEP.
188 (linux_detach): Complete an ongoing step-over.
189 (lwp_suspended_inc, lwp_suspended_decr): New functions. Use
190 throughout.
191 (resume_stopped_resumed_lwps): Don't resume a suspended thread.
192 (linux_wait_1): If passing a signal to the inferior after
193 finishing a step-over, unsuspend and re-resume all lwps. If we
194 see a single-step event but the thread should be continuing, don't
195 pass the trap to gdb.
196 (stuck_in_jump_pad_callback, move_out_of_jump_pad_callback): Use
197 internal_error instead of gdb_assert.
198 (enqueue_pending_signal): New function.
199 (check_ptrace_stopped_lwp_gone): Add debug output.
200 (start_step_over): Use internal_error instead of gdb_assert.
201 (complete_ongoing_step_over): New function.
202 (linux_resume_one_thread): Don't resume a suspended thread.
203 (proceed_one_lwp): If the LWP is stepping over a breakpoint, reset
204 it stepping.
205
00db26fa
PA
2062015-08-06 Pedro Alves <palves@redhat.com>
207
208 * linux-low.c (add_lwp): Set waitstatus to TARGET_WAITKIND_IGNORE.
209 (linux_thread_alive): Use lwp_is_marked_dead.
210 (extended_event_reported): Delete.
211 (linux_wait_1): Check if waitstatus is TARGET_WAITKIND_IGNORE
212 instead of extended_event_reported.
213 (mark_lwp_dead): Don't set the 'dead' flag. Store the waitstatus
214 as well.
215 (lwp_is_marked_dead): New function.
216 (lwp_running): Use lwp_is_marked_dead.
217 * linux-low.h: Delete 'dead' field, and update 'waitstatus's
218 comment.
219
ad071a30
PA
2202015-08-06 Pedro Alves <palves@redhat.com>
221
222 * linux-low.c (linux_wait_1): Move fork event output out of the
223 !report_to_gdb check. Pass event_child->waitstatus to
224 target_waitstatus_to_string instead of ourstatus.
225
524b57e6
YQ
2262015-08-04 Yao Qi <yao.qi@linaro.org>
227
228 * linux-aarch64-low.c (aarch64_supports_tracepoints): Return 0
229 if current_thread is 32 bit.
230
6085d6f6
YQ
2312015-08-04 Yao Qi <yao.qi@linaro.org>
232
233 * linux-aarch64-low.c (aarch64_supports_z_point_type): Return
234 0 for Z_PACKET_SW_BP if it may be used in multi-arch debugging.
235 * server.c (extended_protocol): Remove "static".
236 * server.h (extended_protocol): Declare it.
237
8a7e4587
YQ
2382015-08-04 Yao Qi <yao.qi@linaro.org>
239
240 * linux-aarch64-low.c (aarch64_get_pc): Get PC register on
241 both aarch64 and aarch32.
242 (aarch64_set_pc): Likewise.
243
3b53ae99
YQ
2442015-08-04 Yao Qi <yao.qi@linaro.org>
245
246 * configure.srv (case aarch64*-*-linux*): Append arm-with-neon.o
247 to srv_regobj and append arm-core.xml arm-vfpv3.xml and
248 arm-with-neon.xml to srv_xmlfiles.
249 * linux-aarch64-low.c: Include linux-aarch32-low.h.
250 (is_64bit_tdesc): New function.
251 (aarch64_linux_read_description): New function.
252 (aarch64_arch_setup): Call aarch64_linux_read_description.
253 (regs_info): Rename to regs_info_aarch64.
254 (aarch64_regs_info): Return right regs_info.
255 (initialize_low_arch): Call initialize_low_arch_aarch32.
256
bd9e6534
YQ
2572015-08-04 Yao Qi <yao.qi@linaro.org>
258
259 * configure.srv (srv_tgtobj): Add linux-aarch32-low.o.
260 * linux-aarch32-low.c: New file.
261 * linux-aarch32-low.h: New file.
262 * linux-arm-low.c (arm_fill_gregset): Move it to
263 linux-aarch32-low.c.
264 (arm_store_gregset): Likewise.
265 (arm_fill_vfpregset): Call arm_fill_vfpregset_num
266 (arm_store_vfpregset): Call arm_store_vfpregset_num.
267 (arm_arch_setup): Check if PTRACE_GETREGSET works.
268 (regs_info): Rename to regs_info_arm.
269 (arm_regs_info): Return regs_info_aarch32 if
270 have_ptrace_getregset is 1 and target description is
271 arm_with_neon or arm_with_vfpv3.
272 (initialize_low_arch): Don't call init_registers_arm_with_neon.
273 Call initialize_low_arch_aarch32 instead.
274
ded48a5e
YQ
2752015-08-04 Yao Qi <yao.qi@linaro.org>
276
277 * linux-x86-low.c (have_ptrace_getregset): Move it to ...
278 * linux-low.c: ... here.
279 * linux-low.h (have_ptrace_getregset): Declare it.
280
96e9210f
PA
2812015-08-04 Pedro Alves <palves@redhat.com>
282
283 * thread-db.c (struct thread_db): Use new typedefs.
284 (try_thread_db_load_1): Define local TDB_DLSYM macro and use it in
285 CHK calls.
286 (disable_thread_event_reporting): Cast result of dlsym to
287 destination function pointer type.
288 (thread_db_mourn): Use td_ta_delete_ftype.
289
af60a1ef
SL
2902015-08-03 Sandra Loosemore <sandra@codesourcery.com>
291
292 * linux-nios2-low.c (NIOS2_BREAKPOINT): Conditionalize for
293 arch variant.
294 (CDX_BREAKPOINT): Define for R2.
295 (nios2_breakpoint_at): Check for CDX_BREAKPOINT when R2.
296 (the_low_target): Add comments.
297
e8b41681
YQ
2982015-07-30 Yao Qi <yao.qi@linaro.org>
299
300 * linux-arm-low.c (arm_hwcap): Remove it.
301 (arm_read_description): New local variable arm_hwcap. Don't
302 set arm_hwcap to zero.
303
89abb039
YQ
3042015-07-30 Yao Qi <yao.qi@linaro.org>
305
306 * linux-arm-low.c (arm_fill_wmmxregset): Don't use arm_hwcap.
307 Use regcache->tdesc instead.
308 (arm_store_wmmxregset): Likewise.
309 (arm_fill_vfpregset): Likewise.
310 (arm_store_vfpregset): Likewise.
311
deca266c
YQ
3122015-07-30 Yao Qi <yao.qi@linaro.org>
313
314 * linux-arm-low.c: Include arch/arm.h.
315 (arm_fill_gregset): Don't use arm_num_regs and arm_regmap.
316 (arm_store_gregset): Likewise.
317
aa58a496
SM
3182015-07-29 Simon Marchi <simon.marchi@ericsson.com>
319
320 * linux-mips-low.c (mips_linux_prepare_to_resume): Add NULL as
321 ptrace's 4th parameter.
322
50904b25
YQ
3232015-07-27 Yao Qi <yao.qi@linaro.org>
324
325 * configure.srv (case aarch64*-*-linux*): Don't set
326 srv_linux_usrregs.
327
5826e159
PA
3282015-07-24 Pedro Alves <palves@redhat.c: Likewise.om>
329
330 * linux-aarch64-low.c: Include nat/gdb_ptrace.h instead of
331 sys/ptrace.h.
332 * linux-arm-low.c: Likewise.
333 * linux-cris-low.c: Likewise.
334 * linux-crisv32-low.c: Likewise.
335 * linux-low.c: Likewise.
336 * linux-m68k-low.c: Likewise.
337 * linux-mips-low.c: Likewise.
338 * linux-nios2-low.c: Likewise.
339 * linux-s390-low.c: Likewise.
340 * linux-sparc-low.c: Likewise.
341 * linux-tic6x-low.c: Likewise.
342 * linux-tile-low.c: Likewise.
343 * linux-x86-low.c: Likewise.
344
54019719
PA
3452015-07-24 Pedro Alves <palves@redhat.com>
346
347 * config.in: Regenerate.
348 * configure: Regenerate.
349
eb7aa561
PA
3502015-07-24 Pedro Alves <palves@redhat.com>
351
352 * acinclude.m4: Include ../ptrace.m4.
353 * configure.ac: Call GDB_AC_PTRACE.
354 * config.in, configure: Regenerate.
355
55d7b841
YQ
3562015-07-24 Yao Qi <yao.qi@linaro.org>
357
358 * linux-low.c (linux_create_inferior): Remove setting to
359 proc->priv->new_inferior.
360 (linux_attach): Likewise.
361 (linux_low_filter_event): Likewise.
362 * linux-low.h (struct process_info_private) <new_inferior>: Remove.
363
c06cbd92
YQ
3642015-07-24 Yao Qi <yao.qi@linaro.org>
365
366 * linux-low.c (linux_arch_setup): New function.
367 (linux_low_filter_event): If proc->tdesc is NULL and
368 proc->attached is true, call the_low_target.arch_setup.
369 Otherwise, keep status pending, and return.
370 (linux_resume_one_lwp_throw): Don't call get_pc if
371 thread->while_stepping isn't NULL. Don't call
372 get_thread_regcache if proc->tdesc is NULL.
373 (need_step_over_p): Return 0 if proc->tdesc is NULL.
374 (linux_target_ops): Install arch_setup.
375 * server.c (start_inferior): Call the_target->arch_setup.
376 * target.h (struct target_ops) <arch_setup>: New field.
377 (target_arch_setup): New marco.
378 * lynx-low.c (lynx_target_ops): Update.
379 * nto-low.c (nto_target_ops): Update.
380 * spu-low.c (spu_target_ops): Update.
381 * win32-low.c (win32_target_ops): Update.
382
5ae3ebba
YQ
3832015-07-24 Yao Qi <yao.qi@linaro.org>
384
385 * linux-low.c (linux_add_process): Don't set
386 proc->priv->new_inferior.
387 (linux_create_inferior): Set proc->priv->new_inferior to 1.
388 (linux_attach): Likewise.
389
eb97750b
YQ
3902015-07-24 Yao Qi <yao.qi@linaro.org>
391
392 * server.c (start_inferior): Code refactor.
393
51aee833
YQ
3942015-07-24 Yao Qi <yao.qi@linaro.org>
395
396 * server.c (process_serial_event): Set general_thread.
397
af1b22f3
YQ
3982015-07-21 Yao Qi <yao.qi@linaro.org>
399
400 * linux-aarch64-low.c (aarch64_arch_setup): Remove code and call
401 aarch64_linux_get_debug_reg_capacity.
402
554717a3
YQ
4032015-07-17 Yao Qi <yao.qi@linaro.org>
404
405 * Makefile.in (aarch64-linux-hw-point.o): New rule.
406 * configure.srv (srv_tgtobj): Append aarch64-linux-hw-point.o.
407 * linux-aarch64-low.c: Include nat/aarch64-linux-hw-point.h.
408 (AARCH64_HBP_MAX_NUM): Move to nat/aarch64-linux-hw-point.h.
409 (AARCH64_HWP_MAX_NUM, AARCH64_HBP_ALIGNMENT): Likewise.
410 (AARCH64_HWP_ALIGNMENT): Likewise.
411 (AARCH64_HWP_MAX_LEN_PER_REG): Likewise.
412 (AARCH64_DEBUG_NUM_SLOTS, AARCH64_DEBUG_ARCH): Likewise.
413 (aarch64_num_bp_regs, aarch64_num_wp_regs): Likewise.
414 (AARCH64_DEBUG_ARCH_V8, DR_MARK_ALL_CHANGED): Likewise.
415 (DR_MARK_N_CHANGED, DR_CLEAR_CHANGED): Likewise.
416 (DR_HAS_CHANGED, DR_N_HAS_CHANGE): Likewise.
417 (struct aarch64_debug_reg_state): Likewise.
418 (struct arch_lwp_info): Likewise.
419 (aarch64_align_watchpoint): Likewise.
420 (DR_CONTROL_ENABLED, DR_CONTROL_LENGTH): Likewise.
421 (aarch64_watchpoint_length): Likewise.
422 (aarch64_point_encode_ctrl_reg): Likewise
423 (aarch64_point_is_aligned): Likewise.
424 (aarch64_align_watchpoint): Likewise.
425 (aarch64_linux_set_debug_regs):
426 (aarch64_dr_state_insert_one_point): Likewise.
427 (aarch64_dr_state_remove_one_point): Likewise.
428 (aarch64_handle_breakpoint): Likewise.
429 (aarch64_handle_aligned_watchpoint): Likewise.
430 (aarch64_handle_unaligned_watchpoint): Likewise.
431 (aarch64_handle_watchpoint): Likewise.
432
c67ca4de
YQ
4332015-07-17 Yao Qi <yao.qi@linaro.org>
434
435 * linux-aarch64-low.c (aarch64_handle_breakpoint): Add argument state
436 and don't aarch64_get_debug_reg_state. All callers update.
437 (aarch64_handle_aligned_watchpoint): Likewise.
438 (aarch64_handle_unaligned_watchpoint): Likewise.
439 (aarch64_handle_watchpoint): Likewise.
440 (aarch64_insert_point): Call aarch64_get_debug_reg_state earlier.
441 (aarch64_remove_point): Likewise.
442
25abf979
YQ
4432015-07-17 Yao Qi <yao.qi@linaro.org>
444
445 * linux-aarch64-low.c (aarch64_show_debug_reg_state): Use
446 debug_printf.
447 (aarch64_handle_unaligned_watchpoint): Likewise.
448
db1ff28b
JK
4492015-07-15 Jan Kratochvil <jan.kratochvil@redhat.com>
450
451 Revert the previous 3 commits:
452 Move gdb_regex* to common/
453 Move linux_find_memory_regions_full & co.
454 gdbserver build-id attribute generator
455
700ca40f
JK
4562015-07-15 Aleksandar Ristovski <aristovski@qnx.com
457 Jan Kratochvil <jan.kratochvil@redhat.com>
458
459 gdbserver build-id attribute generator.
460 * linux-low.c (nat/linux-maps.h, search.h, rsp-low.h): Include.
461 (ElfXX_Ehdr, ElfXX_Phdr, ElfXX_Nhdr): New.
462 (ELFXX_FLD, ELFXX_SIZEOF, ELFXX_ROUNDUP, BUILD_ID_INVALID): New.
463 (find_phdr): New.
464 (get_dynamic): Use find_pdhr to traverse program headers.
465 (struct mapping_entry, mapping_entry_s, free_mapping_entry_vec)
466 (compare_mapping_entry_range, struct find_memory_region_callback_data)
467 (read_build_id, find_memory_region_callback, lrfind_mapping_entry)
468 (get_hex_build_id): New.
469 (linux_qxfer_libraries_svr4): Add optional build-id attribute
470 to reply XML document.
471
9904185c
JK
4722015-07-15 Aleksandar Ristovski <aristovski@qnx.com
473 Jan Kratochvil <jan.kratochvil@redhat.com>
474
475 * target.c: Include target/target-utils.h and fcntl.h.
476 (target_fileio_read_stralloc_1_pread, target_fileio_read_stralloc_1)
477 (target_fileio_read_stralloc): New functions.
478
6e5b4429
JK
4792015-07-15 Jan Kratochvil <jan.kratochvil@redhat.com>
480
481 * Makefile.in (OBS): Add gdb_regex.o.
482 (gdb_regex.o): New.
483 * config.in: Rebuilt.
484 * configure: Rebuilt.
485
ddc98fbf
JK
4862015-07-15 Aleksandar Ristovski <aristovski@qnx.com
487 Jan Kratochvil <jan.kratochvil@redhat.com>
488
489 Create empty nat/linux-maps.[ch] and common/target-utils.[ch].
490 * Makefile.in (OBS): Add target-utils.o.
491 (linux-maps.o, target-utils.o): New.
492 * configure.srv (srv_linux_obj): Add linux-maps.o.
493
e57bb7a0
PL
4942015-07-15 Pierre Langlois <pierre.langlois@arm.com>
495
496 * linux-aarch64-low.c (aarch64_supports_range_stepping): New
497 function, return 1.
498 (the_low_target): Install it.
499
586b02a9
PA
5002015-07-14 Pedro Alves <palves@redhat.com>
501
502 * linux-low.c (kill_wait_lwp): Don't assert if waitpid fails.
503 Instead, ignore ECHILD, and throw an error for other errnos.
504
58c1b36c
PA
5052015-07-10 Pedro Alves <palves@redhat.com>
506
507 * event-loop.c (struct callback_event) <data>: Change type to
508 gdb_client_data instance instead of gdb_client_data pointer.
509 (append_callback_event): Adjust.
510
421530db
PL
5112015-07-10 Pierre Langlois <pierre.langlois@arm.com>
512
513 * linux-aarch64-low.c: Add comments for each linux_target_ops
514 method. Remove comments already covered in target_ops and
515 linux_target_ops definitions.
516 (the_low_target): Add comments for each unimplemented method.
517
c2d65f38
YQ
5182015-07-09 Yao Qi <yao.qi@linaro.org>
519
520 * linux-aarch64-low.c (aarch64_regmap): Remove.
521 (aarch64_usrregs_info): Remove.
522 (regs_info): Set field usrregs to NULL.
523
b20a6524
MM
5242015-07-02 Markus Metzger <markus.t.metzger@intel.com>
525
526 * linux-low.c: Include "rsp-low.h"
527 (linux_low_encode_pt_config, linux_low_encode_raw): New.
528 (linux_low_read_btrace): Support BTRACE_FORMAT_PT.
529 (linux_low_btrace_conf): Support BTRACE_FORMAT_PT.
530 (handle_btrace_enable_pt): New.
531 (handle_btrace_general_set): Support "pt".
532 (handle_btrace_conf_general_set): Support "pt:size".
533
96c97461
PL
5342015-06-29 Pierre Langlois <pierre.langlois@arm.com>
535
536 * linux-aarch64-low.c (aarch64_supports_z_point_type): Enable for
537 Z_PACKET_SW_BP.
538
37d66942
PL
5392015-06-29 Pierre Langlois <pierre.langlois@arm.com>
540
541 * linux-aarch64-low.c: Remove comment about endianness.
542 (aarch64_breakpoint): Change type to gdb_byte[]. Set to "brk #0".
543 (aarch64_breakpoint_at): Change type of insn to gdb_byte[]. Use
544 memcmp.
545
dc06243f
GB
5462015-06-24 Gary Benson <gbenson@redhat.com>
547
548 * linux-i386-ipa.c (stdint.h): Do not include.
549 * lynx-i386-low.c (stdint.h): Likewise.
550 * lynx-ppc-low.c (stdint.h): Likewise.
551 * mem-break.c (stdint.h): Likewise.
552 * thread-db.c (stdint.h): Likewise.
553 * tracepoint.c (stdint.h): Likewise.
554 * win32-low.c (stdint.h): Likewise.
555
124e13d9
SM
5562015-06-18 Simon Marchi <simon.marchi@ericsson.com>
557
558 * server.c (write_qxfer_response): Update call to
559 remote_escape_output.
560
909c2cda
JK
5612015-06-15 Aleksandar Ristovski <aristovski@qnx.com
562 Jan Kratochvil <jan.kratochvil@redhat.com>
563
564 Merge multiple hex conversions.
565 * gdbreplay.c (tohex): Rename to 'fromhex'.
566 (logchar): Use fromhex.
567
24c05f46
JK
5682015-06-10 Jan Kratochvil <jan.kratochvil@redhat.com>
569
570 * server.c (handle_qxfer_libraries): Set `version' attribute for
571 <library-list>.
572
14d2069a
GB
5732015-06-10 Gary Benson <gbenson@redhat.com>
574
575 * target.h (struct target_ops) <multifs_open>: New field.
576 <multifs_unlink>: Likewise.
577 <multifs_readlink>: Likewise.
578 * linux-low.c (nat/linux-namespaces.h): New include.
579 (linux_target_ops): Initialize the_target->multifs_open,
580 the_target->multifs_unlink and the_target->multifs_readlink.
581 * hostio.h (hostio_handle_new_gdb_connection): New declaration.
582 * hostio.c (hostio_fs_pid): New static variable.
583 (hostio_handle_new_gdb_connection): New function.
584 (handle_setfs): Likewise.
585 (handle_open): Use the_target->multifs_open as appropriate.
586 (handle_unlink): Use the_target->multifs_unlink as appropriate.
587 (handle_readlink): Use the_target->multifs_readlink as
588 appropriate.
589 (handle_vFile): Handle vFile:setfs packets.
590 * server.c (handle_query): Call hostio_handle_new_gdb_connection
591 after target_handle_new_gdb_connection.
592
4b8b5e72
GB
5932015-06-10 Gary Benson <gbenson@redhat.com>
594
595 * configure.ac (AC_CHECK_FUNCS): Add setns.
596 * config.in: Regenerate.
597 * configure: Likewise.
598 * Makefile.in (SFILES): Add nat/linux-namespaces.c.
599 (linux-namespaces.o): New rule.
600 * configure.srv (srv_linux_obj): Add linux-namespaces.o.
601
3ac2e371
GB
6022015-06-09 Gary Benson <gbenson@redhat.com>
603
604 * hostio.c (handle_open): Process mode argument with
605 fileio_to_host_mode.
606
ca9b78ce
YQ
6072015-06-01 Yao Qi <yao.qi@linaro.org>
608
609 * linux-s390-low.c (PTRACE_GETREGSET, PTRACE_SETREGSET): Remove.
610 * linux-x86-low.c: Likewise.
611
bfacd19d
DB
6122015-05-28 Don Breazeal <donb@codesourcery.com>
613
614 * linux-low.c (handle_extended_wait): Initialize
615 thread_info.last_resume_kind for new fork children.
616
452003ef
PA
6172015-05-15 Pedro Alves <palves@redhat.com>
618
619 * target.h (target_handle_new_gdb_connection): Rewrite using if
620 wrapped in do/while.
621
1041a03c
JB
6222015-05-14 Joel Brobecker <brobecker@adacore.com>
623
624 * configure.ac: Add prfpregset_t BFD_HAVE_SYS_PROCFS_TYPE check.
625 * configure, config.in: Regenerate.
626 * gdb_proc_service.h [HAVE_PRFPREGSET_T] (prfpregset_t):
627 Declare typedef.
628
c269dbdb
DB
6292015-05-12 Don Breazeal <donb@codesourcery.com>
630
631 * linux-low.c (handle_extended_wait): Handle PTRACE_EVENT_FORK and
632 PTRACE_EVENT_VFORK_DONE.
633 (linux_low_ptrace_options, extended_event_reported): Add vfork
634 events.
635 * remote-utils.c (prepare_resume_reply): New stop reasons "vfork"
636 and "vforkdone" for RSP 'T' Stop Reply Packet.
637 * server.h (report_vfork_events): Declare
638 global variable.
639
3a8a0396
DB
6402015-05-12 Don Breazeal <donb@codesourcery.com>
641
642 * linux-aarch64-low.c (aarch64_linux_new_fork): New function.
643 (the_low_target) <new_fork>: Initialize new member.
644 * linux-arm-low.c (arm_new_fork): New function.
645 (the_low_target) <new_fork>: Initialize new member.
646 * linux-low.c (handle_extended_wait): Call new target function
647 new_fork.
648 * linux-low.h (struct linux_target_ops) <new_fork>: New member.
649 * linux-mips-low.c (mips_add_watchpoint): New function
650 extracted from mips_insert_point.
651 (the_low_target) <new_fork>: Initialize new member.
652 (mips_linux_new_fork): New function.
653 (mips_insert_point): Call mips_add_watchpoint.
654 * linux-x86-low.c (x86_linux_new_fork): New function.
655 (the_low_target) <new_fork>: Initialize new member.
656
de0d863e
DB
6572015-05-12 Don Breazeal <donb@codesourcery.com>
658
659 * linux-low.c (handle_extended_wait): Implement return value,
660 rename argument 'event_child' to 'event_lwp', handle
661 PTRACE_EVENT_FORK, call internal_error for unrecognized event.
662 (linux_low_ptrace_options): New function.
663 (linux_low_filter_event): Call linux_low_ptrace_options,
664 use different argument fo linux_enable_event_reporting,
665 use return value from handle_extended_wait.
666 (extended_event_reported): New function.
667 (linux_wait_1): Call extended_event_reported and set
668 status to report fork events.
669 (linux_write_memory): Add pid to debug message.
670 (reset_lwp_ptrace_options_callback): New function.
671 (linux_handle_new_gdb_connection): New function.
672 (linux_target_ops): Initialize new structure member.
673 * linux-low.h (struct lwp_info) <waitstatus>: New member.
674 * lynx-low.c: Initialize new structure member.
675 * remote-utils.c (prepare_resume_reply): Implement stop reason
676 "fork" for "T" stop message.
677 * server.c (handle_query): Call handle_new_gdb_connection.
678 * server.h (report_fork_events): Declare global flag.
679 * target.h (struct target_ops) <handle_new_gdb_connection>:
680 New member.
681 (target_handle_new_gdb_connection): New macro.
682 * win32-low.c: Initialize new structure member.
683
ddcbc397
DB
6842015-05-12 Don Breazeal <donb@codesourcery.com>
685
686 * mem-break.c (APPEND_TO_LIST): Define macro.
687 (clone_agent_expr): New function.
688 (clone_one_breakpoint): New function.
689 (clone_all_breakpoints): New function.
690 * mem-break.h: Declare new functions.
691
89245bc0
DB
6922015-05-12 Don Breazeal <donb@codesourcery.com>
693
694 * linux-low.c (linux_supports_fork_events): New function.
695 (linux_supports_vfork_events): New function.
696 (linux_target_ops): Initialize new structure members.
697 (initialize_low): Call linux_check_ptrace_features.
698 * lynx-low.c (lynx_target_ops): Initialize new structure
699 members.
700 * server.c (report_fork_events, report_vfork_events):
701 New global flags.
702 (handle_query): Add new features to qSupported packet and
703 response.
704 (captured_main): Initialize new global variables.
705 * target.h (struct target_ops) <supports_fork_events>:
706 New member.
707 <supports_vfork_events>: New member.
708 (target_supports_fork_events): New macro.
709 (target_supports_vfork_events): New macro.
710 * win32-low.c (win32_target_ops): Initialize new structure
711 members.
712
835205d0
GB
7132015-05-12 Gary Benson <gbenson@redhat.com>
714
715 * server.c (handle_qxfer_exec_file): Use current process
716 if annex is empty.
717
21e94bd9
SL
7182015-05-08 Sandra Loosemore <sandra@codesourcery.com>
719
720 * linux-nios2-low.c: Include elf/common.h. Adjust comments.
721 Remove HAVE_PTRACE_GETREGS conditionals.
722 (nios2_regsets): Use PTRACE_GETREGSET and PTRACE_SETREGSET
723 instead of PTRACE_GETREGS and PTRACE_SETREGS.
724
45614f15
YQ
7252015-05-08 Yao Qi <yao.qi@linaro.org>
726
727 * linux-low.c (linux_supports_conditional_breakpoints): New
728 function.
729 (linux_target_ops): Install new target method.
730 * lynx-low.c (lynx_target_ops): Install NULL hook for
731 supports_conditional_breakpoints.
732 * nto-low.c (nto_target_ops): Likewise.
733 * spu-low.c (spu_target_ops): Likewise.
734 * win32-low.c (win32_target_ops): Likewise.
735 * server.c (handle_query): Check
736 target_supports_conditional_breakpoints.
737 * target.h (struct target_ops) <supports_conditional_breakpoints>:
738 New field.
739 (target_supports_conditional_breakpoints): New macro.
740
80ad801e
PA
7412015-05-06 Pedro Alves <palves@redhat.com>
742
743 PR server/18081
744 * server.c (start_inferior): If the process exits, mourn it.
745
819843c7
GB
7462015-04-21 Gary Benson <gbenson@redhat.com>
747
748 * hostio.c (fileio_open_flags_to_host): Factored out to
749 fileio_to_host_openflags in common/fileio.c. Single use
750 updated.
751
a2d5a9d7
MF
7522015-04-17 Max Filippov <jcmvbkbc@gmail.com>
753
754 * linux-xtensa-low.c (xtensa_fill_gregset)
755 (xtensa_store_gregset): Check XCHAL_HAVE_LOOPS instead of
756 XCHAL_HAVE_LOOP.
757
deb44829
MF
7582015-04-17 Max Filippov <jcmvbkbc@gmail.com>
759
760 * linux-xtensa-low.c (xtensa_usrregs_info): Remove.
761 (regs_info): Replace usrregs pointer with NULL.
762
e57f1de3
GB
7632015-04-17 Gary Benson <gbenson@redhat.com>
764
765 * target.h (struct target_ops) <pid_to_exec_file>: New field.
766 * linux-low.c (linux_target_ops): Initialize pid_to_exec_file.
767 * server.c (handle_qxfer_exec_file): New function.
768 (qxfer_packets): Add exec-file entry.
769 (handle_query): Report qXfer:exec-file:read as supported packet.
770
62828379
RN
7712015-04-14 Romain Naour <romain.naour@openwide.fr> (tiny change)
772
773 * linux-low.c (linux_read_offsets): Remove get_thread_lwp.
774
b88bb450
GB
7752015-04-09 Gary Benson <gbenson@redhat.com>
776
777 * hostio-errno.c (errno_to_fileio_error): Remove function.
778 Update caller to use remote_fileio_to_fio_error.
779
c8f4bfdd
YQ
7802015-04-09 Yao Qi <yao.qi@linaro.org>
781
782 * linux-low.c (linux_insert_point): Call
783 insert_memory_breakpoint if TYPE is raw_bkpt_type_sw.
784 (linux_remove_point): Call remove_memory_breakpoint if type is
785 raw_bkpt_type_sw.
786 * linux-x86-low.c (x86_insert_point): Don't call
787 insert_memory_breakpoint.
788 (x86_remove_point): Don't call remove_memory_breakpoint.
789
41f98f02
PA
7902015-04-01 Pedro Alves <palves@redhat.com>
791 Cleber Rosa <crosa@redhat.com>
792
793 * server.c (gdbserver_usage): Reorganize and extend the usage
794 message.
795
2bf6fb9d
PA
7962015-03-24 Pedro Alves <palves@redhat.com>
797
798 * linux-low.c (check_stopped_by_breakpoint): Tweak debug log
799 output. Also dump TRAP_TRACE.
800 (linux_low_filter_event): In debug output, distinguish a
801 resume_stop SIGSTOP from a delayed SIGSTOP.
802
369f6daa
GB
8032015-03-24 Gary Benson <gbenson@redhat.com>
804
805 * linux-x86-low.c (x86_linux_new_thread): Moved to
806 nat/x86-linux.c.
807 (x86_linux_prepare_to_resume): Likewise.
808
8e5d4070
GB
8092015-03-24 Gary Benson <gbenson@redhat.com>
810
811 * Makefile.in (x86-linux-dregs.o): New rule.
812 * configure.srv: Add x86-linux-dregs.o to relevant targets.
813 * linux-x86-low.c: Include nat/x86-linux-dregs.h.
814 (u_debugreg_offset): Moved to nat/x86-linux-dregs.c.
815 (x86_linux_dr_get): Likewise.
816 (x86_linux_dr_set): Likewise.
817 (update_debug_registers_callback): Likewise.
818 (x86_linux_dr_set_addr): Likewise.
819 (x86_linux_dr_get_addr): Likewise.
820 (x86_linux_dr_set_control): Likewise.
821 (x86_linux_dr_get_control): Likewise.
822 (x86_linux_dr_get_status): Likewise.
823 (x86_linux_update_debug_registers): Likewise.
824
2b95d440
GB
8252015-03-24 Gary Benson <gbenson@redhat.com>
826
827 * linux-x86-low.c (x86_linux_update_debug_registers):
828 New function, factored out from...
829 (x86_linux_prepare_to_resume): ...this.
830
14b0bc68
GB
8312015-03-24 Gary Benson <gbenson@redhat.com>
832
833 * linux-x86-low.c (x86_linux_dr_get): Update comments.
834 (x86_linux_dr_set): Likewise.
835 (update_debug_registers_callback): Likewise.
836 (x86_linux_dr_set_addr): Likewise.
837 (x86_linux_dr_get_addr): Likewise.
838 (x86_linux_dr_set_control): Likewise.
839 (x86_linux_dr_get_control): Likewise.
840 (x86_linux_dr_get_status): Likewise.
841 (x86_linux_prepare_to_resume): Likewise.
842
5dfe6ca8
GB
8432015-03-24 Gary Benson <gbenson@redhat.com>
844
845 * linux-x86-low.c (x86_linux_dr_get): Add assertion.
846 Use perror_with_name. Pass string through gettext.
847 (x86_linux_dr_set): Likewise.
848
d33472ad
GB
8492015-03-24 Gary Benson <gbenson@redhat.com>
850
851 * linux-x86-low.c (x86_dr_low_set_addr): Rename to...
852 (x86_linux_dr_set_addr): ...this.
853 (x86_dr_low_get_addr): Rename to...
854 (x86_linux_dr_get_addr): ...this.
855 (x86_dr_low_set_control): Rename to...
856 (x86_linux_dr_set_control): ...this.
857 (x86_dr_low_get_control): Rename to...
858 (x86_linux_dr_get_control): ...this.
859 (x86_dr_low_get_status): Rename to...
860 (x86_linux_dr_get_status): ...this.
861 (x86_dr_low): Update with new function names.
862
4b134ca1
GB
8632015-03-24 Gary Benson <gbenson@redhat.com>
864
865 * Makefile.in (x86-linux.o): New rule.
866 * configure.srv: Add x86-linux.o to relevant targets.
867 * linux-low.c (lwp_set_arch_private_info): New function.
868 (lwp_arch_private_info): Likewise.
869 * linux-x86-low.c: Include nat/x86-linux.h.
870 (arch_lwp_info): Removed structure.
871 (update_debug_registers_callback):
872 Use lwp_set_debug_registers_changed.
873 (x86_linux_prepare_to_resume): Use lwp_debug_registers_changed
874 and lwp_set_debug_registers_changed.
875 (x86_linux_new_thread): Use lwp_set_debug_registers_changed.
876
34c703da
GB
8772015-03-24 Gary Benson <gbenson@redhat.com>
878
879 * linux-low.h (linux_target_ops) <new_thread>: Changed signature.
880 * linux-arm-low.c (arm_new_thread): Likewise.
881 * linux-aarch64-low.c (aarch64_linux_new_thread): Likewise.
882 * linux-mips-low.c (mips_linux_new_thread): Likewise.
883 * linux-x86-low.c (x86_linux_new_thread): Likewise.
884 * linux-low.c (add_lwp): Update the_low_target.new_thread call.
885
cff068da
GB
8862015-03-24 Gary Benson <gbenson@redhat.com>
887
888 * linux-low.c (ptid_of_lwp): New function.
889 (lwp_is_stopped): Likewise.
890 (lwp_stop_reason): Likewise.
891 * linux-x86-low.c (update_debug_registers_callback):
892 Use lwp_is_stopped.
893 (x86_linux_prepare_to_resume): Use ptid_of_lwp and
894 lwp_stop_reason.
895
b2f7c7e8
GB
8962015-03-24 Gary Benson <gbenson@redhat.com>
897
898 * linux-low.h (linux_stop_lwp): Remove declaration.
899
6d4ee8c6
GB
9002015-03-24 Gary Benson <gbenson@redhat.com>
901
902 * linux-low.h: Include nat/linux-nat.h.
903 * linux-low.c (iterate_over_lwps_args): New structure.
904 (iterate_over_lwps_filter): New function.
905 (iterate_over_lwps): Likewise.
906 * linux-x86-low.c (update_debug_registers_callback):
907 Update signature to what iterate_over_lwps expects.
908 Remove PID check that iterate_over_lwps now performs.
909 (x86_dr_low_set_addr): Use iterate_over_lwps.
910 (x86_dr_low_set_control): Likewise.
911
70a0bb6b
GB
9122015-03-24 Gary Benson <gbenson@redhat.com>
913
914 * linux-x86-low.c (x86_debug_reg_state): New function.
915 (x86_linux_prepare_to_resume): Use the above.
916
7b669087
GB
9172015-03-24 Gary Benson <gbenson@redhat.com>
918
919 * linux-low.c (current_lwp_ptid): New function.
920 * linux-x86-low.c: Include nat/linux-nat.h.
921 (x86_dr_low_get_addr): Use current_lwp_ptid.
922 (x86_dr_low_get_control): Likewise.
923 (x86_dr_low_get_status): Likewise.
924
eef49a3d
PA
9252015-03-20 Pedro Alves <palves@redhat.com>
926
927 * tracepoint.c (cmd_qtstatus): Make "str" const.
928
b2333d22
PA
9292015-03-20 Pedro Alves <palves@redhat.com>
930
931 * server.c (handle_general_set): Make "req_str" const.
932
23f238d3
PA
9332015-03-19 Pedro Alves <palves@redhat.com>
934
935 * linux-low.c (linux_resume_one_lwp): Rename to ...
936 (linux_resume_one_lwp_throw): ... this. Don't handle ESRCH here,
937 instead call perror_with_name.
938 (check_ptrace_stopped_lwp_gone): New function.
939 (linux_resume_one_lwp): Reimplement as wrapper around
940 linux_resume_one_lwp_throw that swallows errors if the LWP is
941 gone.
942
91baf43f
PA
9432015-03-19 Pedro Alves <palves@redhat.com>
944
945 * linux-low.c (count_events_callback, select_event_lwp_callback):
946 No longer check whether the thread has resume_stop as last resume
947 kind.
948
8bf3b159
PA
9492015-03-19 Pedro Alves <palves@redhat.com>
950
951 * linux-low.c (count_events_callback, select_event_lwp_callback):
952 Use the lwp's status_pending_p field, not the thread's.
953
b90fc188
PA
9542015-03-19 Pedro Alves <palves@redhat.com>
955
956 * linux-low.c (select_event_lwp_callback): Update comments to
957 no longer mention SIGTRAP.
958
464b0089
GB
9592015-03-18 Gary Benson <gbenson@redhat.com>
960
961 * server.c (handle_query): Do not report vFile:fstat as supported.
962
aa9e327f
GB
9632015-03-11 Gary Benson <gbenson@redhat.com>
964
965 * hostio.c (sys/types.h): New include.
966 (sys/stat.h): Likewise.
967 (common-remote-fileio.h): Likewise.
968 (handle_fstat): New function.
969 (handle_vFile): Handle vFile:fstat packets.
aa9e327f 970
791c0056
GB
9712015-03-11 Gary Benson <gbenson@redhat.com>
972
973 * configure.ac (AC_CHECK_MEMBERS): Add checks for
974 struct stat.st_blocks and struct stat.st_blksize.
975 * configure: Regenerate.
976 * config.in: Likewise.
977 * Makefile.in (SFILES): Add common/common-remote-fileio.c.
978 (OBS): Add common-remote-fileio.o.
979 (common-remote-fileio.o): New rule.
980
9a9df970
PA
9812015-03-09 Pedro Alves <palves@redhat.com>
982
983 * tracepoint.c (gdb_agent_helper_thread): Cast '&sockaddr' to
984 'struct sockaddr' pointer in 'accept' call.
985
9eb1356e
PA
9862015-03-09 Pedro Alves <palves@redhat.com>
987
988 Revert:
989 2015-03-07 Pedro Alves <palves@redhat.com>
990 * gdbreplay.c: No longer include <netinet/in.h>, <sys/socket.h>,
991 or <winsock2.h> here. Instead include "gdb_socket.h".
992 (remote_open): Use union gdb_sockaddr_u.
993 * remote-utils.c: No longer include <netinet/in.h>, <sys/socket.h>
994 or <winsock2.h> here. Instead include "gdb_socket.h".
995 (handle_accept_event, remote_prepare): Use union gdb_sockaddr_u.
996 * tracepoint.c: Include "gdb_socket.h" instead of <sys/socket.h>
997 or <sys/un.h>.
998 (init_named_socket, gdb_agent_helper_thread): Use union
999 gdb_sockaddr_u.
1000
aac331e4
PA
10012015-03-07 Pedro Alves <palves@redhat.com>
1002
1003 * configure.ac (build_warnings): Move
1004 -Wdeclaration-after-statement to the C-specific set.
1005 * configure: Regenerate.
1006
366c75fc
PA
10072015-03-07 Pedro Alves <palves@redhat.com>
1008
1009 * gdbreplay.c: No longer include <netinet/in.h>, <sys/socket.h>,
1010 or <winsock2.h> here. Instead include "gdb_socket.h".
1011 (remote_open): Use union gdb_sockaddr_u.
1012 * remote-utils.c: No longer include <netinet/in.h>, <sys/socket.h>
1013 or <winsock2.h> here. Instead include "gdb_socket.h".
1014 (handle_accept_event, remote_prepare): Use union gdb_sockaddr_u.
1015 * tracepoint.c: Include "gdb_socket.h" instead of <sys/socket.h>
1016 or <sys/un.h>.
1017 (init_named_socket, gdb_agent_helper_thread): Use union
1018 gdb_sockaddr_u.
1019
492d29ea
PA
10202015-03-07 Pedro Alves <palves@redhat.com>
1021
1022 Adjust all callers of TRY_CATCH to use TRY/CATCH/END_CATCH
1023 instead.
1024
60a191ed
YQ
10252015-03-06 Yao Qi <yao.qi@linaro.org>
1026
1027 * linux-aarch64-low.c (aarch64_insert_point): Use
1028 show_debug_regs as a boolean.
1029 (aarch64_remove_point): Likewise.
1030
f5771b1d
PA
10312015-03-05 Pedro Alves <palves@redhat.com>
1032
1033 * lynx-low.c (lynx_target_ops): Install NULL hooks for
1034 stopped_by_sw_breakpoint, supports_stopped_by_sw_breakpoint,
1035 stopped_by_hw_breakpoint, supports_stopped_by_hw_breakpoint.
1036 * nto-low.c (nto_target_ops): Likewise.
1037 * spu-low.c (spu_target_ops): Likewise.
1038 * win32-low.c (win32_target_ops): Likewise.
1039
3e572f71
PA
10402015-03-04 Pedro Alves <palves@redhat.com>
1041
72f4393d 1042 * linux-low.c (check_stopped_by_breakpoint) [USE_SIGTRAP_SIGINFO]:
3e572f71
PA
1043 Decide whether a breakpoint triggered based on the SIGTRAP's
1044 siginfo.si_code.
72f4393d
L
1045 (thread_still_has_status_pending_p) [USE_SIGTRAP_SIGINFO]: Don't check whether a
1046 breakpoint is inserted if relying on SIGTRAP's siginfo.si_code.
3e572f71
PA
1047 (linux_low_filter_event): Check for breakpoints before checking
1048 watchpoints.
1049 (linux_wait_1): Don't re-increment the PC if relying on SIGTRAP's
1050 siginfo.si_code.
72f4393d
L
1051 (linux_stopped_by_sw_breakpoint)
1052 (linux_supports_stopped_by_sw_breakpoint)
1053 (linux_stopped_by_hw_breakpoint)
1054 (linux_supports_stopped_by_hw_breakpoint): New functions.
1055 (linux_target_ops): Install new target methods.
3e572f71 1056
1ec68e26
PA
10572015-03-04 Pedro Alves <palves@redhat.com>
1058
1059 * remote-utils.c (prepare_resume_reply): Report swbreak/hbreak.
1060 * server.c (swbreak_feature, hwbreak_feature): New globals.
1061 (handle_query) <qSupported>: Handle "swbreak+" and "hwbreak+".
1062 (captured_main): Clear swbreak_feature and hwbreak_feature.
1063 * server.h (swbreak_feature, hwbreak_feature): Declare.
1064 * target.h (struct target_ops) <stopped_by_sw_breakpoint,
1065 supports_stopped_by_sw_breakpoint, stopped_by_hw_breakpoint,
1066 supports_stopped_by_hw_breakpoint>: New fields.
1067 (target_supports_stopped_by_sw_breakpoint)
1068 (target_stopped_by_sw_breakpoint)
1069 (target_supports_stopped_by_hw_breakpoint)
1070 (target_stopped_by_hw_breakpoint): Declare.
1071
15c66dd6
PA
10722015-03-04 Pedro Alves <palves@redhat.com>
1073
1074 enum lwp_stop_reason -> enum target_stop_reason
1075 * linux-low.c (check_stopped_by_breakpoint): Adjust.
1076 (thread_still_has_status_pending_p, check_stopped_by_watchpoint)
1077 (linux_wait_1, stuck_in_jump_pad_callback)
1078 (move_out_of_jump_pad_callback, linux_resume_one_lwp)
1079 (linux_stopped_by_watchpoint):
1080 * linux-low.h (enum lwp_stop_reason): Delete.
1081 (struct lwp_info) <stop_reason>: Now an enum target_stop_reason.
1082 * linux-x86-low.c (x86_linux_prepare_to_resume): Adjust.
1083
98fc70d6
YQ
10842015-03-04 Yao Qi <yao.qi@linaro.org>
1085
1086 * Makefile.in (SFILES): Add linux-aarch64-low.c.
1087
dd2ac174
GB
10882015-03-03 Gary Benson <gbenson@redhat.com>
1089
1090 * hostio.c (handle_vFile): Fix prefix lengths.
1091
d68e53f4
MM
10922015-03-03 Markus Metzger <markus.t.metzger@intel.com>
1093
1094 * linux-low.c (linux_low_enable_btrace): Do not overwrite non-zero
1095 ptr_bits.
1096
bf2d68ab
AA
10972015-03-02 Andreas Arnez <arnez@linux.vnet.ibm.com>
1098
1099 * Makefile.in (s390-vx-linux64.c, s390-tevx-linux64.c)
1100 (s390x-vx-linux64.c, s390x-tevx-linux64.c): New rules.
1101 (clean): Add "rm -f" for above C files.
1102 * configure.srv (srv_regobj): Add s390-vx-linux64.o,
1103 s390-tevx-linux64.o, s390x-vx-linux64.o, and s390x-tevx-linux64.o.
1104 (srv_xmlfiles): Add s390-vx-linux64.xml, s390-tevx-linux64.xml,
1105 s390x-vx-linux64.xml, s390x-tevx-linux64.xml, and s390-vx.xml.
1106 * linux-s390-low.c (HWCAP_S390_VX): New macro.
1107 (init_registers_s390_vx_linux64, init_registers_s390_tevx_linux64)
1108 (init_registers_s390x_vx_linux64)
1109 (init_registers_s390x_tevx_linux64)
1110 (tdesc_s390_vx_linux64, tdesc_s390_tevx_linux64)
1111 (tdesc_s390x_vx_linux64, tdesc_s390x_tevx_linux64): New extern
1112 declarations.
1113 (s390_fill_vxrs_low, s390_store_vxrs_low, s390_fill_vxrs_high)
1114 (s390_store_vxrs_high): New functions.
1115 (s390_regsets): Add entries for NT_S390_VXRS_LOW and
1116 NT_S390_VXRS_HIGH.
1117 (s390_arch_setup): Add logic for selecting one of the new target
1118 descriptions. Activate the new vector regsets if applicable.
1119 (initialize_low_arch): Also invoke init_registers_s390_vx_linux64,
1120 init_registers_s390_tevx_linux64, init_registers_s390x_vx_linux64,
1121 and init_registers_s390x_tevx_linux64.
1122
c966a859
PA
11232015-03-01 Pedro Alves <palves@redhat.com>
1124
1125 * linux-i386-ipa.c (gdb_agent_get_raw_reg): Constify 'raw_regs'
1126 parameter.
1127
4180215b
PA
11282015-02-27 Pedro Alves <palves@redhat.com>
1129
1130 * linux-x86-low.c (u_debugreg_offset): New function.
1131 (x86_linux_dr_get, x86_linux_dr_set): Use it.
1132
749bab01
PA
11332015-02-27 Pedro Alves <palves@redhat.com>
1134
1135 * gdb_proc_service.h: Wrap with EXTERN_C_PUSH/EXTERN_C_POP.
1136 [!HAVE_PROC_SERVICE_H] (struct ps_prochandle): Forward declare.
1137 [!HAVE_PROC_SERVICE_H] (ps_pdread, ps_pdwrite, ps_ptread)
1138 ps_ptwrite, ps_lgetregs, ps_lsetregs, ps_lgetfpregs)
1139 (ps_lsetfpregs, ps_getpid)
1140 (ps_get_thread_area, ps_pglobal_lookup, ps_pstop, ps_pcontinue)
1141 (ps_lstop, ps_lcontinue, ps_lgetxregsize, ps_lgetxregs)
1142 (ps_lsetxregs, ps_plog): Declare.
1143
3c14e5a3
PA
11442015-02-27 Pedro Alves <palves@redhat.com>
1145
1146 * linux-amd64-ipa.c (gdb_agent_get_raw_reg): Use
1147 IP_AGENT_EXPORT_FUNC.
1148 * linux-i386-ipa.c (gdb_agent_get_raw_reg): Use
1149 IP_AGENT_EXPORT_FUNC.
1150 * tracepoint.c (ATTR_USED, ATTR_NOINLINE, ATTR_CONSTRUCTOR)
1151 (IP_AGENT_EXPORT): Delete.
1152 (gdb_tp_heap_buffer, gdb_jump_pad_buffer, gdb_jump_pad_buffer_end)
1153 (gdb_trampoline_buffer, gdb_trampoline_buffer_end)
1154 (gdb_trampoline_buffer_error, collecting, gdb_collect)
1155 (stop_tracing, flush_trace_buffer, about_to_request_buffer_space)
1156 (trace_buffer_is_full, stopping_tracepoint, expr_eval_result)
1157 (error_tracepoint, tracepoints, tracing, trace_buffer_ctrl)
1158 (trace_buffer_ctrl_curr, trace_buffer_lo, trace_buffer_hi)
1159 (traceframe_read_count, traceframe_write_count)
1160 (traceframes_created, trace_state_variables, get_raw_reg)
1161 (get_trace_state_variable_value, set_trace_state_variable_value)
1162 (ust_loaded, helper_thread_id, cmd_buf): Use
1163 IPA_SYM_EXPORTED_NAME.
1164 (stop_tracing, flush_trace_buffer): Use IP_AGENT_EXPORT_FUNC.
1165 (tracepoints) Use IP_AGENT_EXPORT_VAR.
1166 (stopping_tracepoint, trace_buffer_is_full, expr_eval_result): Use
1167 IP_AGENT_EXPORT_VAR and wrap in EXTERN_C_PUSH/EXTERN_C_POP.
1168 (last_tracepoint): Move into !IN_PROCESS_AGENT block.
1169 (error_tracepoint): Use IP_AGENT_EXPORT_VAR and wrap in
1170 EXTERN_C_PUSH/EXTERN_C_POP.
1171 (trace_state_variables): Use IP_AGENT_EXPORT_VAR.
1172 (trace_buffer_lo, trace_buffer_hi): Use IP_AGENT_EXPORT_VAR and
1173 wrap in EXTERN_C_PUSH/EXTERN_C_POP.
1174 (trace_buffer_ctrl, trace_buffer_ctrl_curr)
1175 (traceframe_write_count, traceframe_read_count)
1176 (traceframes_created, tracing): Use IP_AGENT_EXPORT_VAR.
1177 (about_to_request_buffer_space, get_trace_state_variable_value)
1178 (set_trace_state_variable_value): Use IP_AGENT_EXPORT_FUNC.
1179 (collecting): Use IP_AGENT_EXPORT_VAR and wrap in
1180 EXTERN_C_PUSH/EXTERN_C_POP.
1181 (gdb_collect): Use IP_AGENT_EXPORT_FUNC.
1182 (ust_loaded, cmd_buf): Use IP_AGENT_EXPORT_VAR.
1183 (helper_thread_id, gdb_agent_capability): Use IP_AGENT_EXPORT_VAR
1184 and wrap in EXTERN_C_PUSH/EXTERN_C_POP.
1185 (gdb_tp_heap_buffer, gdb_jump_pad_buffer, gdb_jump_pad_buffer_end)
1186 (gdb_trampoline_buffer, gdb_trampoline_buffer_end)
1187 (gdb_trampoline_buffer_error): Use IP_AGENT_EXPORT_VAR.
1188 * tracepoint.h (ATTR_USED, ATTR_NOINLINE, EXPORTED_SYMBOL):
1189 Define.
1190 (IP_AGENT_EXPORT_FUNC, IP_AGENT_EXPORT_VAR)
1191 (IP_AGENT_EXPORT_VAR_DECL): Define.
1192 (tracing): Declare.
1193 (gdb_agent_get_raw_reg): Declare.
1194
fe978cb0
PA
11952015-02-27 Tom Tromey <tromey@redhat.com>
1196 Pedro Alves <palves@redhat.com>
1197
1198 Rename symbols whose names are reserved C++ keywords throughout.
1199
3bc3d82a
PA
12002015-02-27 Pedro Alves <palves@redhat.com>
1201
1202 * Makefile.in (COMPILER): New, get it from autoconf.
1203 (CXX): Get from autoconf instead.
1204 (COMPILE.pre): Use COMPILER.
1205 (CC-LD): Rename to ...
1206 (CC_LD): ... this. Use COMPILER.
1207 (gdbserver$(EXEEXT), gdbreplay$(EXEEXT), $(IPA_LIB)): Adjust.
1208 (CXX_FOR_TARGET): Default to g++ instead of gcc.
1209 * acinclude.m4: Include build-with-cxx.m4.
1210 * configure.ac: Call AC_PROG_CXX and GDB_AC_BUILD_WITH_CXX.
1211 Disable -Werror by default if building in C++ mode.
1212 (build_warnings): Add -Wno-sign-compare, -Wno-write-strings and
1213 -Wno-narrowing in C++ mode. Run supported-warning-flags tests with
1214 the C++ compiler. Save/restore CXXFLAGS too.
1215 * configure: Regenerate.
1216
07697489
PA
12172015-02-27 Pedro Alves <palves@redhat.com>
1218
1219 * acinclude.m4: Include libiberty.m4.
1220 * configure.ac: Call libiberty_INIT.
1221 * config.in, configure: Regenerate.
1222
9beb7c4e
PA
12232015-02-26 Pedro Alves <palves@redhat.com>
1224
1225 * linux-low.c (linux_wait_1): When incrementing the PC past a
1226 program breakpoint always use the_low_target.breakpoint_len as
1227 increment, rather than the maximum between that and
1228 the_low_target.decr_pc_after_break.
1229
8090aef2
PA
12302015-02-23 Pedro Alves <palves@redhat.com>
1231
1232 * linux-low.c (check_stopped_by_breakpoint): Don't check if the
1233 thread was doing a step-over; always adjust the PC if
1234 we stepped over a permanent breakpoint.
1235 (linux_wait_1): If we stepped over breakpoint that was on top of a
1236 permanent breakpoint, manually advance the PC past it.
1237
bc9540e8
PA
12382015-02-23 Pedro Alves <palves@redhat.com>
1239
1240 * linux-x86-low.c (REGSIZE): Define in both 32-bit and 64-bit
1241 modes.
1242 (x86_fill_gregset, x86_store_gregset): Use it when handling
1243 $orig_eax.
1244
2db9a427
PA
12452015-02-20 Pedro Alves <palves@redhat.com>
1246
1247 * thread-db.c: Include "nat/linux-procfs.h".
1248 (thread_db_init): Skip listing new threads if the kernel supports
1249 PTRACE_EVENT_CLONE and /proc/PID/task/ is accessible.
1250
afa8d396
PA
12512015-02-20 Pedro Alves <palves@redhat.com>
1252
1253 * linux-low.c (status_pending_p_callback): Use ptid_match.
1254
c9587f88
AT
12552015-02-19 Antoine Tremblay <antoine.tremblay@ericsson.com>
1256
1257 PR breakpoints/16812
1258 * linux-low.c (wstatus_maybe_breakpoint): Remove.
1259 (linux_low_filter_event): Update wstatus_maybe_breakpoint name.
1260 (linux_wait_1): Report SIGTRAP,SIGILL,SIGSEGV.
1261
b05ec7a5
AT
12622015-02-10 Antoine Tremblay <antoine.tremblay@ericsson.com>
1263
1264 PR breakpoints/15956
1265 * tracepoint.c (cmd_qtinit): Add check for current_thread.
1266
d33501a5
MM
12672015-02-09 Markus Metzger <markus.t.metzger@intel.com>
1268
1269 * linux-low.c (linux_low_btrace_conf): Print size.
1270 * server.c (handle_btrace_conf_general_set): New.
1271 (hanle_general_set): Call handle_btrace_conf_general_set.
1272 (handle_query): Report Qbtrace-conf:bts:size as supported.
1273
f4abbc16
MM
12742015-02-09 Markus Metzger <markus.t.metzger@intel.com>
1275
1276 * linux-low.c (linux_low_enable_btrace): Update parameters.
1277 (linux_low_btrace_conf): New.
1278 (linux_target_ops)<to_btrace_conf>: Initialize.
1279 * server.c (current_btrace_conf): New.
1280 (handle_btrace_enable): Rename to ...
1281 (handle_btrace_enable_bts): ... this. Pass &current_btrace_conf
1282 to target_enable_btrace. Update comment. Update users.
1283 (handle_qxfer_btrace_conf): New.
1284 (qxfer_packets): Add btrace-conf entry.
1285 (handle_query): Report qXfer:btrace-conf:read as supported packet.
1286 * target.h (target_ops)<enable_btrace>: Update parameters and comment.
1287 (target_ops)<read_btrace_conf>: New.
1288 (target_enable_btrace): Update parameters.
1289 (target_read_btrace_conf): New.
1290
043c3577
MM
12912015-02-09 Markus Metzger <markus.t.metzger@intel.com>
1292
1293 * server.c (handle_btrace_general_set): Remove call to
1294 target_supports_btrace.
1295 (supported_btrace_packets): New.
1296 (handle_query): Call supported_btrace_packets.
1297 * target.h: include btrace-common.h.
1298 (btrace_target_info): Removed.
1299 (supports_btrace, target_supports_btrace): Update parameters.
1300
734b0e4b
MM
13012015-02-09 Markus Metzger <markus.t.metzger@intel.com>
1302
1303 * Makefile.in (SFILES): Add common/btrace-common.c.
1304 (OBS): Add common/btrace-common.o.
1305 (btrace-common.o): Add build rules.
1306 * linux-low: Include btrace-common.h.
1307 (linux_low_read_btrace): Use struct btrace_data. Call
1308 btrace_data_init and btrace_data_fini.
1309
d6c146e9
PA
13102015-02-06 Pedro Alves <palves@redhat.com>
1311
1312 * thread-db.c (find_new_threads_callback): Add debug output.
1313
20ba1ce6
PA
13142015-02-04 Pedro Alves <palves@redhat.com>
1315
1316 * linux-low.c (handle_extended_wait): Don't resume LWPs here.
1317 (resume_stopped_resumed_lwps): New function.
1318 (linux_wait_for_event_filtered): Use it.
1319
8cc73a39
SDJ
13202015-01-15 Sergio Durigan Junior <sergiodj@redhat.com>
1321
1322 * Makefile.in (SFILES): Add linux-personality.c.
1323 (linux-personality.o): New rule.
1324 * configure.srv (srv_linux_obj): Add linux-personality.o to the
1325 list of objects to be built.
1326 * linux-low.c: Include nat/linux-personality.h.
1327 (linux_create_inferior): Remove code to disable address space
1328 randomization (moved to ../nat/linux-personality.c). Create
1329 cleanup to disable address space randomization.
1330
fb23d554
SDJ
13312015-01-15 Sergio Durigan Junior <sergiodj@redhat.com>
1332
1333 * Makefile.in (posix-strerror.o): New rule.
1334 (mingw-strerror.o): Likewise.
1335 * configure: Regenerated.
1336 * configure.ac: Source file ../common/common.host. Initialize new
1337 variable srv_host_obs. Add srv_host_obs to GDBSERVER_DEPFILES.
1338
cdf43629
YQ
13392015-01-14 Yao Qi <yao@codesourcery.com>
1340
1341 * Makefile.in (SFILES): Add nat/ppc-linux.c.
1342 (ppc-linux.o): New rule.
1343 * configure.srv (powerpc*-*-linux*): Add ppc-linux.o.
1344 * configure.ac: AC_CHECK_FUNCS(getauxval).
1345 * config.in: Re-generated.
1346 * configure: Re-generated.
1347 * linux-ppc-low.c (ppc_arch_setup) [__powerpc64__]: Call
1348 ppc64_64bit_inferior_p
1349
514c5338
YQ
13502015-01-14 Yao Qi <yao@codesourcery.com>
1351
1352 * linux-ppc-low.c: Include "nat/ppc-linux.h".
1353 (PPC_FEATURE_HAS_VSX): Move to nat/ppc-linux.h.
1354 (PPC_FEATURE_HAS_ALTIVEC, PPC_FEATURE_HAS_SPE): Likewise.
1355 (PT_ORIG_R3, PT_TRAP): Likewise.
1356 (PTRACE_GETVSXREGS, PTRACE_SETVSXREGS): Likewise.
1357 (PTRACE_GETVRREGS, PTRACE_SETVRREGS): Likewise.
1358 (PTRACE_GETEVRREGS, PTRACE_SETEVRREGS): Likewise.
1359
3368c1e5
JB
13602015-01-10 Joel Brobecker <brobecker@adacore.com>
1361
1362 * i387-fp.c (i387_cache_to_xsave): In look over
1363 num_avx512_zmmh_high_registers, replace use of struct i387_xsave
1364 zmmh_low_space field by use of zmmh_high_space.
1365
582511be
PA
13662015-01-09 Pedro Alves <palves@redhat.com>
1367
1368 * linux-low.c (step_over_bkpt): Move higher up in the file.
1369 (handle_extended_wait): Don't store the stop_pc here.
1370 (get_stop_pc): Adjust comments and rename to ...
1371 (check_stopped_by_breakpoint): ... this. Record whether the LWP
1372 stopped for a software breakpoint or hardware breakpoint.
1373 (thread_still_has_status_pending_p): New function.
1374 (status_pending_p_callback): Use
1375 thread_still_has_status_pending_p. If the event is no longer
1376 interesting, resume the LWP.
1377 (handle_tracepoints): Add assert.
1378 (maybe_move_out_of_jump_pad): Remove cancel_breakpoints call.
1379 (wstatus_maybe_breakpoint): New function.
1380 (cancel_breakpoint): Delete function.
1381 (check_stopped_by_watchpoint): New function, factored out from
1382 linux_low_filter_event.
1383 (lp_status_maybe_breakpoint): Delete function.
1384 (linux_low_filter_event): Remove filter_ptid argument.
1385 Leave thread group exits pending here. Store the LWP's stop PC.
1386 Always leave events pending.
1387 (linux_wait_for_event_filtered): Pull all events out of the
1388 kernel, and leave them all pending.
1389 (count_events_callback, select_event_lwp_callback): Consider all
1390 events.
1391 (cancel_breakpoints_callback, linux_cancel_breakpoints): Delete.
1392 (select_event_lwp): Only give preference to the stepping LWP in
1393 all-stop mode. Adjust comments.
1394 (ignore_event): New function.
1395 (linux_wait_1): Delete 'retry' label. Use ignore_event. Remove
1396 references to cancel_breakpoints. Adjust to renames. Also give
1397 equal priority to all LWPs that have had events in non-stop mode.
1398 If reporting a software breakpoint event, unadjust the LWP's PC.
1399 (linux_wait): If linux_wait_1 returned an ignored event, retry.
1400 (stuck_in_jump_pad_callback, move_out_of_jump_pad_callback):
1401 Adjust.
1402 (linux_resume_one_lwp): Store the LWP's PC. Adjust.
1403 (resume_status_pending_p): Use thread_still_has_status_pending_p.
1404 (linux_stopped_by_watchpoint): Adjust.
1405 (linux_target_ops): Remove reference to linux_cancel_breakpoints.
1406 * linux-low.h (enum lwp_stop_reason): New.
1407 (struct lwp_info) <stop_pc>: Adjust comment.
1408 <stopped_by_watchpoint>: Delete field.
1409 <stop_reason>: New field.
1410 * linux-x86-low.c (x86_linux_prepare_to_resume): Adjust.
1411 * mem-break.c (software_breakpoint_inserted_here)
1412 (hardware_breakpoint_inserted_here): New function.
1413 * mem-break.h (software_breakpoint_inserted_here)
1414 (hardware_breakpoint_inserted_here): Declare.
1415 * target.h (struct target_ops) <cancel_breakpoints>: Remove field.
1416 (cancel_breakpoints): Delete.
1417 * tracepoint.c (clear_installed_tracepoints, stop_tracing)
1418 (upload_fast_traceframes): Remove references to
1419 cancel_breakpoints.
1420
a33e3959
PA
14212015-01-09 Pedro Alves <palves@redhat.com>
1422
1423 * thread-db.c (find_new_threads_callback): Ignore thread if the
1424 kernel thread ID is -1.
1425
8784d563
PA
14262015-01-09 Pedro Alves <palves@redhat.com>
1427
1428 * linux-low.c (linux_attach_fail_reason_string): Move to
1429 nat/linux-ptrace.c, and rename.
1430 (linux_attach_lwp): Update comment.
1431 (attach_proc_task_lwp_callback): New function.
1432 (linux_attach): Adjust to rename and use
1433 linux_proc_attach_tgid_threads.
1434 (linux_attach_fail_reason_string): Delete declaration.
1435
76f2b779
JB
14362015-01-01 Joel Brobecker <brobecker@adacore.com>
1437
1438 * gdbreplay.c (gdbreplay_version): Update copyright year to 2015.
1439 * server.c (gdbserver_version): Likewise.
1440
fafcc06a
SDJ
14412014-12-29 Sergio Durigan Junior <sergiodj@redhat.com>
1442
1443 * remote-utils.c: Include ctype.h.
1444 (input_interrupt): Explicitly handle the case when the char
1445 received is the NUL byte. Improve the printing of non-ASCII
1446 characters.
1447
beed38b8
JB
14482014-12-16 Joel Brobecker <brobecker@adacore.com>
1449
1450 * linux-low.c (linux_low_filter_event): Update call to
1451 linux_enable_event_reporting following the addition of
1452 a new parameter to that function.
1453
bf330350
CU
14542014-12-16 Catalin Udma <catalin.udma@freescale.com>
1455
1456 PR server/17457
1457 * linux-aarch64-low.c (AARCH64_FPSR_REGNO): New define.
1458 (AARCH64_FPCR_REGNO): Likewise.
1459 (AARCH64_NUM_REGS): Update to include fpsr/fpcr registers.
1460 (aarch64_fill_fpregset): Add missing fpsr/fpcr registers.
1461 (aarch64_store_fpregset): Likewise.
1462
5227d625
JB
14632014-12-15 Joel Brobecker <brobecker@adacore.com>
1464
1465 * lynx-low.c (lynx_resume): Use PTRACE_SINGLESTEP_ONE if N == 1.
1466 Remove FIXME comment about assumption about N.
1467
f93b65a0
JB
14682014-12-13 Joel Brobecker <brobecker@adacore.com>
1469
1470 * configure.ac: If large-file support is disabled in GDBserver,
1471 pass --disable-largefile to ACX_CONFIGURE_DIR call for "gnulib".
1472 * configure: Regenerate.
1473
e5a9158d
AA
14742014-12-12 Andreas Arnez <arnez@linux.vnet.ibm.com>
1475
1476 * linux-low.c (regsets_fetch_inferior_registers): Suppress the
1477 warning upon ENODATA from ptrace.
1478 * linux-s390-low.c (s390_store_tdb): New.
1479 (s390_regsets): Add regset for NT_S390_TDB.
1480
feea5f36
AA
14812014-12-12 Andreas Arnez <arnez@linux.vnet.ibm.com>
1482
1483 * linux-low.c (regsets_store_inferior_registers): Skip regsets
1484 without a fill_function.
1485 * linux-s390-low.c (s390_fill_last_break): Remove.
1486 (s390_regsets): Set fill_function to NULL for NT_S390_LAST_BREAK.
1487 (s390_arch_setup): Use regset's size instead of fill_function for
1488 loop end condition.
1489
098dbe61
AA
14902014-12-12 Andreas Arnez <arnez@linux.vnet.ibm.com>
1491
1492 * linux-low.c (regsets_fetch_inferior_registers): Do not invoke
1493 the regset's store function when ptrace returned an error.
1494 * regcache.c (get_thread_regcache): Invalidate register cache
1495 before fetching inferior's registers.
1496
28eef672
AA
14972014-12-12 Andreas Arnez <arnez@linux.vnet.ibm.com>
1498
1499 * linux-low.c (regsets_fetch_inferior_registers): Rephrase
1500 while-loop as for-loop.
1501 (regsets_store_inferior_registers): Likewise.
1502
bdca27a2
YQ
15032014-11-28 Yao Qi <yao@codesourcery.com>
1504
1505 * configure.ac(AC_CHECK_FUNCS): Remove readlink.
1506 * config.in, configure: Re-generate.
1507 * hostio.c (handle_unlink): Remove code checking HAVE_READLINK
1508 is defined.
1509
9c232dda
YQ
15102014-11-21 Yao Qi <yao@codesourcery.com>
1511
1512 * configure.ac: Don't invoke AC_FUNC_ALLOCA.
1513 (AC_CHECK_HEADERS): Remove malloc.h.
1514 * configure: Re-generated.
1515 * config.in: Re-generated.
1516 * server.h: Don't include alloca.h and malloc.h.
1517 * gdbreplay.c: Don't check HAVE_ALLOCA_H is defined.
1518 Don't include malloc.h.
1519
43968415
JB
15202014-11-17 Joel Brobecker <brobecker@adacore.com>
1521
1522 * lynx-low.c (lynx_write_memory): Put lynx_read_memory and
1523 corresponding ERRNO check in same block.
1524
40e91bc7
PA
15252014-11-12 Pedro Alves <palves@redhat.com>
1526
1527 * server.c (cont_thread): Update comment.
1528 (start_inferior, attach_inferior): No longer clear cont_thread.
1529 (handle_v_cont): No longer set cont_thread.
1530 (captured_main): Clear cont_thread each time a GDB connects.
1531
c2c118cf
PA
15322014-11-12 Pedro Alves <palves@redhat.com>
1533
1534 * linux-low.c (linux_wait_1): Don't force a wait for the Hc
1535 thread, and don't resume all threads if the Hc thread has exited.
1536
78708b7c
PA
15372014-11-12 Pedro Alves <palves@redhat.com>
1538
1539 * linux-low.c (linux_request_interrupt): Always send a SIGINT to
1540 the process group instead of to a specific LWP.
1541
a2abc7de
PA
15422014-10-15 Pedro Alves <palves@redhat.com>
1543
1544 PR server/17487
1545 * win32-arm-low.c (arm_set_thread_context): Remove current_event
1546 parameter.
1547 (arm_set_thread_context): Delete.
1548 (the_low_target): Adjust.
1549 * win32-i386-low.c (debug_registers_changed)
1550 (debug_registers_used): Delete.
1551 (update_debug_registers_callback): New function.
1552 (x86_dr_low_set_addr, x86_dr_low_set_control): Mark all threads as
1553 needing to update their debug registers.
1554 (win32_get_current_dr): New function.
1555 (x86_dr_low_get_addr, x86_dr_low_get_control)
1556 (x86_dr_low_get_status): Fetch the debug register from the thread
1557 record's context.
1558 (i386_initial_stuff): Adjust.
1559 (i386_get_thread_context): Remove current_event parameter. Don't
1560 clear debug_registers_changed nor copy DR values to
1561 debug_reg_state.
1562 (i386_set_thread_context): Delete.
1563 (i386_prepare_to_resume): New function.
1564 (i386_thread_added): Mark the thread as needing to update irs
1565 debug registers.
1566 (the_low_target): Remove i386_set_thread_context and install
1567 i386_prepare_to_resume.
1568 * win32-low.c (win32_get_thread_context): Adjust.
1569 (win32_set_thread_context): Use SetThreadContext
1570 directly.
1571 (win32_prepare_to_resume): New function.
1572 (win32_require_context): New function, factored out from ...
1573 (thread_rec): ... this.
1574 (continue_one_thread): Call win32_prepare_to_resume on each thread
1575 we're about to continue.
1576 (win32_resume): Call win32_prepare_to_resume on the event thread.
1577 * win32-low.h (struct win32_thread_info)
1578 <debug_registers_changed>: New field.
1579 (struct win32_target_ops): Change prototype of set_thread_context,
1580 delete set_thread_context and add prepare_to_resume.
1581 (win32_require_context): New declaration.
1582
a442d071
GB
15832014-10-08 Gary Benson <gbenson@redhat.com>
1584
1585 * server.h: Do not include common-exceptions.h.
1586
6f1947e8
GB
15872014-10-08 Gary Benson <gbenson@redhat.com>
1588
1589 * server.h: Do not include cleanups.h.
1590
63b434a4
JH
15912014-09-30 James Hogan <james.hogan@imgtec.com>
1592
1593 * Makefile.in (clean): Add rm -f commands for mips-dsp-linux.c and
1594 mips64-dsp-linux.c.
1595
c4d9ceb6
YQ
15962014-09-23 Yao Qi <yao@codesourcery.com>
1597
1598 * linux-low.c (lp_status_maybe_breakpoint): New function.
1599 (linux_low_filter_event): Call lp_status_maybe_breakpoint.
1600 (count_events_callback): Likewise.
1601 (select_event_lwp_callback): Likewise.
1602 (cancel_breakpoints_callback): Likewise.
1603
89a5711c
DB
16042014-09-19 Don Breazeal <donb@codesourcery.com>
1605
1606 * linux-low.c (handle_extended_wait): Call
1607 linux_ptrace_get_extended_event.
1608 (get_stop_pc, get_detach_signal, linux_low_filter_event): Call
1609 linux_is_extended_waitstatus.
1610
bffc0964
JB
16112014-09-16 Joel Brobecker <brobecker@adacore.com>
1612
1613 * Makefile.in (CPPFLAGS): Define.
1614 (INTERNAL_CFLAGS_BASE): Add ${CPPFLAGS}.
1615 (IPAGENT_CFLAGS): Remove ${CPPFLAGS}.
1616
0bfdf32f
GB
16172014-09-16 Gary Benson <gbenson@redhat.com>
1618
1619 * inferiors.h (current_inferior): Renamed as...
1620 (current_thread): New variable. All uses updated.
1621 * linux-low.c (get_pc): Renamed saved_inferior as saved_thread.
1622 (maybe_move_out_of_jump_pad): Likewise.
1623 (cancel_breakpoint): Likewise.
1624 (linux_low_filter_event): Likewise.
1625 (wait_for_sigstop): Likewise.
1626 (linux_resume_one_lwp): Likewise.
1627 (need_step_over_p): Likewise.
1628 (start_step_over): Likewise.
1629 (linux_stabilize_threads): Renamed save_inferior as saved_thread.
1630 * linux-x86-low.c (x86_linux_update_xmltarget): Likewise.
1631 * proc-service.c (ps_lgetregs): Renamed reg_inferior as reg_thread
1632 and save_inferior as saved_thread.
1633 * regcache.c (get_thread_regcache): Renamed saved_inferior as
1634 saved_thread.
1635 (regcache_invalidate_thread): Likewise.
1636 * remote-utils.c (prepare_resume_reply): Likewise.
1637 * thread-db.c (thread_db_get_tls_address): Likewise.
1638 (disable_thread_event_reporting): Likewise.
1639 (remove_thread_event_breakpoints): Likewise.
1640 * tracepoint.c (gdb_agent_about_to_close): Renamed save_inferior
1641 as saved_thread.
1642 * target.h (set_desired_inferior): Renamed as...
1643 (set_desired_thread): New declaration. All uses updated.
1644 * server.c (myresume): Updated comment to reference thread instead
1645 of inferior.
1646 (handle_serial_event): Likewise.
1647 (handle_target_event): Likewise.
1648
361c8ade
GB
16492014-09-12 Tom Tromey <tromey@redhat.com>
1650 Gary Benson <gbenson@redhat.com>
1651
1652 * regcache.h: Include common-regcache.h.
1653 (regcache_read_pc): Don't declare.
1654 * regcache.c (get_thread_regcache_for_ptid): New function.
1655
bd9269f7
GB
16562014-09-11 Tom Tromey <tromey@redhat.com>
1657 Gary Benson <gbenson@redhat.com>
1658
1659 * symbol.c: New file.
1660 * Makefile.in (SFILES): Add symbol.c.
1661 (OBS): Add symbol.o.
1662
f8c1d06b
GB
16632014-09-11 Gary Benson <gbenson@redhat.com>
1664
1665 * target.c (target_stop_ptid, target_continue_ptid): New
1666 functions.
1667
721ec300
GB
16682014-09-11 Tom Tromey <tromey@redhat.com>
1669 Gary Benson <gbenson@redhat.com>
1670
1671 * target.h: Include target/target.h.
1672 * target.c (target_read_memory, target_read_uint32)
1673 (target_write_memory): New functions.
1674
c5e92cca
GB
16752014-09-11 Gary Benson <gbenson@redhat.com>
1676
1677 * server.h (debug_hw_points): Don't declare.
1678 * server.c (debug_hw_points): Don't define. Replace all uses
1679 with show_debug_regs.
1680 * linux-aarch64-low.c (debug_hw_points): Don't define. Replace
1681 all uses with show_debug_regs.
1682
2e4bb98a
EBM
16832014-09-08 Edjunior Barbosa Machado <emachado@linux.vnet.ibm.com>
1684
1685 * linux-ppc-low.c (ppc_collect_ptrace_register): Adjust routine to take
1686 endianness into account.
1687 (ppc_supply_ptrace_register): Likewise.
1688
ac740bc7
JH
16892014-09-03 James Hogan <james.hogan@imgtec.com>
1690
1691 * linux-mips-low.c (mips_read_description): Reset errno to 0 prior
1692 to reading DSP_CONTROL with PTRACE_PEEKUSER ptrace call.
1693
97ea6506
GB
16942014-09-03 Gary Benson <gbenson@redhat.com>
1695
1696 * linux-x86-low.c (x86_linux_prepare_to_resume): Use
1697 ALL_DEBUG_ADDRESS_REGISTERS.
1698
df7e5265
GB
16992014-09-02 Gary Benson <gbenson@redhat.com>
1700
1701 * i386-low.h: Renamed as...
1702 * x86-low.h: New file. All type, function and variable name
1703 prefixes changed from "i386_" to "x86_". All references updated.
1704 * i386-low.c: Renamed as...
1705 * x86-low.c: New file. All type, function and variable name
1706 prefixes changed from "i386_" to "x86_". All references updated.
1707
ed859da7
GB
17082014-09-02 Gary Benson <gbenson@redhat.com>
1709
1710 * linux-x86-low.c (x86_linux_new_process): Use XCNEW.
1711 (x86_linux_new_thread): Likewise.
1712
860789c7
GB
17132014-08-29 Gary Benson <gbenson@redhat.com>
1714
1715 * server.h (setjmp.h): Do not include.
1716 (toplevel): Do not declare.
1717 (common-exceptions.h): Include.
1718 (cleanups.h): Likewise.
1719 * server.c (toplevel): Do not define.
1720 (exit_code): New static global.
1721 (detach_or_kill_for_exit_cleanup): New function.
1722 (main): New function. Original main renamed to...
1723 (captured_main): New function.
1724 * utils.c (verror) [!IN_PROCESS_AGENT]: Use throw_verror.
1725
ff55e1b5
GB
17262014-08-29 Gary Benson <gbenson@redhat.com>
1727
1728 * Makefile.in (SFILES): Add common/common-exceptions.c.
1729 (OBS): Add common-exceptions.o.
1730 (common-exceptions.o): New rule.
1731 * utils.c (prepare_to_throw_exception): New function.
1732
e9bcb658
GB
17332014-08-29 Gary Benson <gbenson@redhat.com>
1734
1735 * config.in: Regenerate.
1736 * configure: Likewise.
1737
e3180625
GB
17382014-08-29 Gary Benson <gbenson@redhat.com>
1739
1740 * Makefile.in (SFILES): Add common/cleanups.c.
1741 (OBS): cleanups.o.
1742 (cleanups.o): New rule.
1743
e3d6ba5d
GB
17442014-08-29 Gary Benson <gbenson@redhat.com>
1745
1746 * utils.c (internal_vwarning): New function.
1747
7096e886
GB
17482014-08-28 Gary Benson <gbenson@redhat.com>
1749
1750 * utils.h (fatal): Remove declaration.
1751 * utils.c (fatal): Remove function.
1752
14ce3192
GB
17532014-08-28 Gary Benson <gbenson@redhat.com>
1754
1755 * tracepoint.c (gdb_agent_init): Replace fatal with
1756 perror_with_name.
1757 (initialize_tracepoint): Likewise.
1758
50278d59
GB
17592014-08-28 Gary Benson <gbenson@redhat.com>
1760
1761 * remote-utils.c (remote_prepare): Replace fatal with error.
1762
aa96c426
GB
17632014-08-28 Gary Benson <gbenson@redhat.com>
1764
1765 * linux-low.c (linux_async): Replace fatal with warning.
1766 Tidy up and return.
1767 (linux_start_non_stop): Return -1 if linux_async failed.
1768
f7160e97
GB
17692014-08-28 Gary Benson <gbenson@redhat.com>
1770
1771 * linux-x86-low.c (i386_dr_low_set_addr): Replace check with
1772 gdb_assert.
1773 (i386_dr_low_get_addr): Remove vague comment.
1774 * win32-i386-low.c (i386_dr_low_set_addr): Replace check with
1775 gdb_assert.
1776
38e08fca
GB
17772014-08-28 Gary Benson <gbenson@redhat.com>
1778
1779 * inferiors.c (get_thread_process): Replace check with gdb_assert.
1780 * linux-low.c (linux_wait_for_event_filtered): Replace fatal with
1781 internal_error.
1782 (linux_resume_one_lwp): Likewise.
1783 * linux-x86-low.c (x86_siginfo_fixup): Replace checks with
1784 gdb_assert.
1785 * mem-break.c (raw_bkpt_type_to_target_hw_bp_type): Replace fatal
1786 with internal_error.
1787 * regcache.c (get_thread_regcache): Replace check with gdb_assert.
1788 (init_register_cache): Replace fatal with gdb_assert_not_reached.
1789 (find_register_by_name): Replace fatal with internal_error.
1790 (find_regno): Likewise.
1791 * tdesc.c (init_target_desc): Replace check with gdb_assert.
1792 * thread-db.c (thread_db_create_event): Likewise.
1793 (thread_db_load_search): Likewise.
1794 (try_thread_db_load_1): Likewise.
1795 * tracepoint.c (get_jump_space_head): Replace fatal with
1796 internal_error.
1797 (claim_trampoline_space): Likewise.
1798 (have_fast_tracepoint_trampoline_buffer): Likewise.
1799 (cmd_qtstart): Likewise.
1800 (stop_tracing): Likewise.
1801 (fast_tracepoint_collecting): Likewise.
1802 (target_malloc): Likewise.
1803 (download_tracepoint): Likewise.
1804 (download_trace_state_variables): Replace check with gdb_assert.
1805 (upload_fast_traceframes): Replace fatal with internal_error.
1806
34abf635
GB
18072014-08-19 Tom Tromey <tromey@redhat.com>
1808 Gary Benson <gbenson@redhat.com>
1809
1810 * Makefile.in (SFILES): Add common/common-debug.c.
1811 (OBS): Add common-debug.o.
1812 (common-debug.o): New rule.
1813 * debug.h (debug_printf): Don't declare.
1814 * debug.c (debug_printf): Renamed and rewritten as...
1815 (debug_vprintf): New function.
1816
f6e94d78
GB
18172014-08-19 Gary Benson <gbenson@redhat.com>
1818
1819 * utils.h: Do not include print-utils.h.
1820
9239eeab
GB
18212014-08-19 Tom Tromey <tromey@redhat.com>
1822 Gary Benson <gbenson@redhat.com>
1823
1824 * server.h: Add static assertion.
1825 (gdb_byte, CORE_ADDR, LONGEST, ULONGEST): Remove.
1826
ef87c8bb
GB
18272014-08-19 Tom Tromey <tromey@redhat.com>
1828 Gary Benson <gbenson@redhat.com>
1829
1830 * Makefile.in (SFILES): Add common/errors.c.
1831 (OBS): Add errors.o.
1832 (IPA_OBS): Add errors-ipa.o.
1833 (errors.o): New rule.
1834 (errors-ipa.o): Likewise.
1835 * utils.h (perror_with_name, error, warning): Don't declare.
1836 * utils.c (warning): Renamed and rewritten as...
1837 (vwarning): New function.
1838 (error): Renamed and rewritten as...
1839 (verror): New function.
1840 (internal_error): Renamed and rewritten as...
1841 (internal_verror): New function.
1842
bb974a24
GB
18432014-08-07 Gary Benson <gbenson@redhat.com>
1844
1845 * configure.ac (AC_CHECK_HEADERS): Remove errno.h.
1846 * configure: Regenerate.
1847 * config.in: Likewise.
1848 * server.h: Do not include errno.h.
1849 * event-loop.c: Likewise.
1850 * hostio-errno.c: Likewise.
1851 * linux-low.c: Likewise.
1852 * remote-utils.c: Likewise.
1853 * spu-low.c: Likewise.
1854 * utils.c: Likewise.
1855 * gdbreplay.c: Unconditionally include errno.h.
1856
6d3d12eb
GB
18572014-08-07 Gary Benson <gbenson@redhat.com>
1858
1859 * server.h: Do not include string.h.
1860 * event-loop.c: Likewise.
1861 * linux-low.c: Likewise.
1862 * regcache.c: Likewise.
1863 * remote-utils.c: Likewise.
1864 * spu-low.c: Likewise.
1865 * utils.c: Likewise.
1866
dccbb609
GB
18672014-08-07 Gary Benson <gbenson@redhat.com>
1868
1869 * server.h: Do not include gdb_assert.h.
1870
e76df0d0
GB
18712014-08-07 Gary Benson <gbenson@redhat.com>
1872
1873 * server.h: Do not include common-utils.h.
1874
4cb9c816
GB
18752014-08-07 Gary Benson <gbenson@redhat.com>
1876
1877 * server.h: Do not include ptid.h.
1878 * notif.h: Likewise.
1879
3995eeee
GB
18802014-08-07 Gary Benson <gbenson@redhat.com>
1881
1882 * server.h: Do not include gdb_locale.h.
1883
cb9f1a9b
GB
18842014-08-07 Gary Benson <gbenson@redhat.com>
1885
1886 * server.h: Do not include gdb/signals.h.
1887 * win32-low.c: Likewise.
1888
a5fceff8
GB
18892014-08-07 Gary Benson <gbenson@redhat.com>
1890
1891 * server.h: Do not include pathmax.h.
1892
b9391142
GB
18932014-08-07 Gary Benson <gbenson@redhat.com>
1894
1895 * server.h: Do not include libiberty.h.
1896 * linux-bfin-low.c: Likewise.
1897
0e443c87
GB
18982014-08-07 Gary Benson <gbenson@redhat.com>
1899
1900 * server.h: Do not include ansidecl.h.
1901
8ebb3f56
GB
19022014-08-07 Gary Benson <gbenson@redhat.com>
1903
1904 * linux-x86-low.c: Do not include stddef.h.
1905 * lynx-ppc-low.c: Likewise.
1906 * tracepoint.c: Likewise.
1907
8980bdf6
GB
19082014-08-07 Gary Benson <gbenson@redhat.com>
1909
1910 * server.h: Do not include stdarg.h.
1911 * nto-low.c: Likewise.
1912
d7096f71
GB
19132014-08-07 Gary Benson <gbenson@redhat.com>
1914
1915 * server.h: Do not include stdlib.h.
1916 * inferiors.c: Likewise.
1917 * linux-low.c: Likewise.
1918 * regcache.c: Likewise.
1919 * spu-low.c: Likewise.
1920 * tracepoint.c: Likewise.
1921 * utils.c: Likewise.
1922
d02f550d
GB
19232014-08-07 Gary Benson <gbenson@redhat.com>
1924
1925 * server.h: Do not include stdio.h.
1926 * linux-low.c: Likewise.
1927 * remote-utils.c: Likewise.
1928 * spu-low.c: Likewise.
1929 * utils.c: Likewise.
1930 * wincecompat.c: Likewise.
1931
87f6c4e3
GB
19322014-08-06 Gary Benson <gbenson@redhat.com>
1933
1934 * regcache.c (init_register_cache): Move conditionals inside if.
1935
7089dca4
GB
19362014-08-06 Gary Benson <gbenson@redhat.com>
1937
1938 * linux-low.c (linux_supports_non_stop): Use target_is_async_p.
1939
462f517e
GB
19402014-07-31 Gary Benson <gbenson@redhat.com>
1941
1942 * ax.h: Do not include server.h.
1943 * gdbthread.h: Likewise.
1944 * lynx-low.h: Likewise.
1945 * notif.h: Likewise.
1946
976411d6
GB
19472014-07-30 Gary Benson <gbenson@redhat.com>
1948
1949 * server.h: Include common-defs.h.
1950 Do not include config.h or build-gnulib-gdbserver/config.h.
1951
d41f6d8e
GB
19522014-07-30 Gary Benson <gbenson@redhat.com>
1953
1954 * hostio-errno.c: Move server.h to top of includes list.
1955 * inferiors.c: Likewise.
1956 * linux-x86-low.c: Likewise.
1957 * notif.c: Include server.h.
1958
314c6a35
TT
19592014-07-24 Tom Tromey <tromey@redhat.com>
1960 Gary Benson <gbenson@redhat.com>
1961
1962 * server.h (CORE_ADDR): Now unsigned.
1963
69ff6be5
PA
19642014-07-16 Pedro Alves <palves@redhat.com>
1965
1966 * linux-low.c (linux_kill_one_lwp): Use kill_lwp, not kill.
1967
ce9e3fe7
PA
19682014-07-15 Pedro Alves <palves@redhat.com>
1969
1970 * linux-low.c (linux_kill_one_lwp): Save errno and work with saved
1971 copy.
1972
e76126e8
PA
19732014-07-11 Pedro Alves <palves@redhat.com>
1974
1975 * linux-low.c (kill_wait_lwp): New function, based on
1976 kill_one_lwp_callback, but use my_waitpid directly.
1977 (kill_one_lwp_callback, linux_kill): Use it.
1978
8e9db26e
PA
19792014-06-23 Pedro Alves <palves@redhat.com>
1980
1981 * linux-x86-low.c (x86_linux_prepare_to_resume): Clear DR_CONTROL
1982 before setting DR0..DR3.
1983
698b3e08
GB
19842014-06-20 Gary Benson <gbenson@redhat.com>
1985
1986 * configure.ac (AC_REPLACE_FUNCS) <vasprintf, vsnprintf>: Removed.
1987 * configure: Regenerated.
1988 * config.in: Likewise.
1989
125f8a3d
GB
19902014-06-20 Gary Benson <gbenson@redhat.com>
1991
1992 * Makefile.in (SFILES): Update locations for files moved
1993 from common to nat.
1994 (object file files): Reordered.
1995
42995dbd
GB
19962014-06-20 Gary Benson <gbenson@redhat.com>
1997
1998 * i386-low.h (i386_dr_low_can_set_addr): Removed.
1999 (i386_dr_low_set_addr): Likewise.
2000 (i386_dr_low_get_addr): Likewise.
2001 (i386_dr_low_can_set_control): Likewise.
2002 (i386_dr_low_set_control): Likewise.
2003 (i386_dr_low_get_control): Likewise.
2004 (i386_dr_low_get_status): Likewise.
2005 (i386_get_debug_register_length): Likewise.
2006 * linux-x86-low.c (i386_dr_low_set_addr):
2007 Changed signature. Made static.
2008 (i386_dr_low_get_addr): Likewise.
2009 (i386_dr_low_set_control): Likewise.
2010 (i386_dr_low_get_control): Likewise.
2011 (i386_dr_low_get_status): Likewise.
2012 (i386_dr_low): New global variable.
2013 * win32-i386-low.c (i386_dr_low_set_addr):
2014 Changed signature. Made static.
2015 (i386_dr_low_get_addr): Likewise.
2016 (i386_dr_low_set_control): Likewise.
2017 (i386_dr_low_get_control): Likewise.
2018 (i386_dr_low_get_status): Likewise.
2019 (i386_dr_low): New global variable.
2020
e1d2394b
MS
20212014-06-20 Marcus Shawcroft <marcus.shawcroft@arm.com>
2022
2023 * configure.ac: Invoke. AC_CHECK_TOOL(AR, ar).
2024 * Makefile.in (AR, AR_FLAGS): Define.
2025 * configure: Regenerate.
2026
3a8ee006
GB
20272014-06-19 Gary Benson <gbenson@redhat.com>
2028
2029 * Makefile.in (i386-dregs.o): New rule.
2030 * configure.srv: Add i386-dregs.o to all targets using i386-low.o.
2031 * i386-low.c (target.h): Remove include.
2032 (TARGET_HAS_DR_LEN_8): Now in i386-dregs.c.
2033 (DR_CONTROL_SHIFT): Likewise.
2034 (DR_CONTROL_SIZE): Likewise.
2035 (DR_RW_EXECUTE): Likewise.
2036 (DR_RW_WRITE): Likewise.
2037 (DR_RW_READ): Likewise.
2038 (DR_RW_IORW): Likewise.
2039 (DR_LEN_1): Likewise.
2040 (DR_LEN_2): Likewise.
2041 (DR_LEN_4): Likewise.
2042 (DR_LEN_8): Likewise.
2043 (DR_LOCAL_ENABLE_SHIFT): Likewise.
2044 (DR_GLOBAL_ENABLE_SHIFT): Likewise.
2045 (DR_ENABLE_SIZE): Likewise.
2046 (DR_LOCAL_SLOWDOWN): Likewise.
2047 (DR_GLOBAL_SLOWDOWN): Likewise.
2048 (DR_CONTROL_RESERVED): Likewise.
2049 (I386_DR_CONTROL_MASK): Likewise.
2050 (I386_DR_VACANT): Likewise.
2051 (I386_DR_LOCAL_ENABLE): Likewise.
2052 (I386_DR_GLOBAL_ENABLE): Likewise.
2053 (I386_DR_DISABLE): Likewise.
2054 (I386_DR_SET_RW_LEN): Likewise.
2055 (I386_DR_GET_RW_LEN): Likewise.
2056 (I386_DR_WATCH_HIT): Likewise.
2057 (i386_wp_op_t): Likewise.
2058 (i386_show_dr): Likewise.
2059 (i386_length_and_rw_bits): Likewise.
2060 (i386_insert_aligned_watchpoint): Likewise.
2061 (i386_remove_aligned_watchpoint): Likewise.
2062 (i386_handle_nonaligned_watchpoint): Likewise.
2063 i386_update_inferior_debug_regs(): Likewise.
2064 (i386_dr_insert_watchpoint): Likewise.
2065 (i386_dr_remove_watchpoint): Likewise.
2066 (i386_dr_region_ok_for_watchpoint): Likewise.
2067 (i386_dr_stopped_data_address): Likewise.
2068 (i386_dr_stopped_by_watchpoint): Likewise.
2069
8f26655c
GB
20702014-06-19 Gary Benson <gbenson@redhat.com>
2071
2072 * i386-low.c (i386_dr_show): Renamed to
2073 i386_show_dr and made static. All uses updated.
2074 (i386_dr_length_and_rw_bits): Renamed to
2075 i386_length_and_rw_bits and made static.
2076 All uses updated.
2077 (i386_dr_insert_aligned_watchpoint): Renamed to
2078 i386_insert_aligned_watchpoint and made static.
2079 All uses updated.
2080 (i386_dr_remove_aligned_watchpoint): Renamed to
2081 i386_remove_aligned_watchpoint and made static.
2082 All uses updated.
2083 (i386_dr_update_inferior_debug_regs): Renamed to
2084 i386_update_inferior_debug_regs and made static.
2085 All uses updated.
2086
b9228891
GB
20872014-06-18 Gary Benson <gbenson@redhat.com>
2088
5171def3
GB
2089 * i386-low.h (i386_dr_low_can_set_addr): New macro.
2090 (i386_dr_low_can_set_control): Likewise.
2091 (i386_get_debug_register_length): Likewise.
2092 * i386-low.c (i386_dr_low_can_set_addr): Now in i386-low.h.
2093 (i386_dr_low_can_set_control): Likewise.
2094 (i386_get_debug_register_length): Likewise.
2095
20962014-06-17 Gary Benson <gbenson@redhat.com>
2097
b9228891
GB
2098 * i386-low.h (i386-dregs.h): New include.
2099 (DR_FIRSTADDR): Now in i386-dregs.h.
2100 (DR_LASTADDR): Likewise.
2101 (DR_NADDR): Likewise.
2102 (DR_STATUS): Likewise.
2103 (DR_CONTROL): Likewise.
2104 (i386_debug_reg_state): Likewise.
2105 (i386_dr_insert_watchpoint): Likewise.
2106 (i386_dr_remove_watchpoint): Likewise.
2107 (i386_dr_region_ok_for_watchpoint): Likewise.
2108 (i386_dr_stopped_data_address): Likewise.
2109 (i386_dr_stopped_by_watchpoint): Likewise.
2110 * i386-low.c (ALL_DEBUG_REGISTERS): Likewise.
2111
4be83cc2
GB
21122014-06-18 Gary Benson <gbenson@redhat.com>
2113
2114 * i386-low.h (i386_low_insert_watchpoint): Renamed to
2115 i386_dr_insert_watchpoint.
2116 (i386_low_remove_watchpoint): Renamed to
2117 i386_dr_remove_watchpoint.
2118 (i386_low_region_ok_for_watchpoint): Renamed to
2119 i386_dr_region_ok_for_watchpoint.
2120 (i386_low_stopped_data_address): Renamed to
2121 i386_dr_stopped_data_address.
2122 (i386_low_stopped_by_watchpoint): Renamed to
2123 i386_dr_stopped_by_watchpoint.
2124 * i386-low.c (i386_show_dr): Renamed to
2125 i386_dr_show and made nonstatic. All uses updated.
2126 (i386_length_and_rw_bits): Renamed to
2127 i386_dr_length_and_rw_bits and made nonstatic.
2128 All uses updated.
2129 (i386_insert_aligned_watchpoint): Renamed to
2130 i386_dr_insert_aligned_watchpoint and made nonstatic.
2131 All uses updated.
2132 (i386_remove_aligned_watchpoint): Renamed to
2133 i386_dr_remove_aligned_watchpoint and made nonstatic.
2134 All uses updated.
2135 (i386_update_inferior_debug_regs): Renamed to
2136 i386_dr_update_inferior_debug_regs and made nonstatic.
2137 All uses updated.
2138 (i386_low_insert_watchpoint): Renamed to
2139 i386_dr_insert_watchpoint. All uses updated.
2140 (i386_low_remove_watchpoint): Renamed to
2141 i386_dr_remove_watchpoint. All uses updated.
2142 (i386_low_region_ok_for_watchpoint): Renamed to
2143 i386_dr_region_ok_for_watchpoint. All uses updated.
2144 (i386_low_stopped_data_address): Renamed to
2145 i386_dr_stopped_data_address. All uses updated.
2146 (i386_low_stopped_by_watchpoint): Renamed to
2147 i386_dr_stopped_by_watchpoint. All uses updated.
2148
131aa0d4
GB
21492014-06-18 Gary Benson <gbenson@redhat.com>
2150
2151 * i386-low.c (i386_dr_low_can_set_addr): New macro.
2152 (i386_dr_low_can_set_control): Likewise.
2153 (i386_insert_aligned_watchpoint): New check.
2154
d9305f7f
GB
21552014-06-18 Gary Benson <gbenson@redhat.com>
2156
2157 * i386-low.c (i386_update_inferior_debug_regs) <inf_state>:
2158 Renamed to state.
2159
e927c9fc
GB
21602014-06-18 Gary Benson <gbenson@redhat.com>
2161
2162 * i386-low.c (i386_length_and_rw_bits): Use internal_error
2163 instead of fatal and error.
2164 (i386_handle_nonaligned_watchpoint): Likewise.
2165
1b6d4134
GB
21662014-06-18 Gary Benson <gbenson@redhat.com>
2167
2168 * i386-low.c (i386_get_debug_register_length): New macro.
2169 (TARGET_HAS_DR_LEN_8): Remove conditional. Use above macro.
2170 (i386_show_dr): Use debug_printf instead of fprintf. Use
2171 phex to format values.
2172
6e62758f
GB
21732014-06-18 Gary Benson <gbenson@redhat.com>
2174
2175 * i386-low.h: Comment changes.
2176 * i386-low.c: Likewise.
2177
fc6e2f03
GB
21782014-06-18 Gary Benson <gbenson@redhat.com>
2179
2180 * i386-low.c: Whitespace changes.
2181
f9d1eeed
TT
21822014-06-12 Tom Tromey <tromey@redhat.com>
2183
2184 * utils.c (freeargv): Remove.
2185
0b04e523
TT
21862014-06-12 Tom Tromey <tromey@redhat.com>
2187
2188 * debug.c (debug_printf): Remove HAVE_GETTIMEOFDAY checks.
2189 * server.c (monitor_show_help): Remove HAVE_GETTIMEOFDAY check.
2190 (parse_debug_format_options): Likewise.
2191 (gdbserver_usage): Likewise.
2192 * Makefile.in (LIBIBERTY_BUILDDIR, LIBIBERTY): New variables.
2193 (SUBDIRS, REQUIRED_SUBDIRS): Add libiberty.
2194 (gdbserver$(EXEEXT), gdbreplay$(EXEEXT)): Depend on and link
2195 against libiberty.
2196 ($(LIBGNU)): Depend on libiberty.
2197 (all-lib): Recurse into all subdirs.
2198 (install-only): Invoke "install" target in subdirs.
2199 (vasprintf.o, vsnprintf.o, safe-ctype.o, lbasename.o): Remove
2200 targets.
2201 * configure: Rebuild.
2202 * configure.ac: Add ACX_CONFIGURE_DIR for libiberty. Don't check
2203 for vasprintf, vsnprintf, or gettimeofday.
2204 * configure.srv: Don't add safe-ctype.o or lbasename.o to
2205 srv_tgtobj.
2206
270c9937
JB
22072014-06-05 Joel Brobecker <brobecker@adacore.com>
2208
2209 * development.sh: Delete.
2210 * Makefile.in (config.status): Adjust dependency on development.sh.
2211 * configure.ac: Adjust development.sh source call.
2212 * configure: Regenerate.
2213
0a261ed8
PA
22142014-06-02 Pedro Alves <palves@redhat.com>
2215
2216 * ax.c (gdb_free_agent_expr): New function.
2217 * ax.h (gdb_free_agent_expr): New declaration.
2218 * mem-break.c (delete_gdb_breakpoint_1): Also clear the commands
2219 list.
2220 (clear_breakpoint_conditions, clear_breakpoint_commands): Make
2221 static.
2222 (clear_breakpoint_conditions_and_commands): New function.
2223 * mem-break.h (clear_breakpoint_conditions): Delete declaration.
2224 (clear_breakpoint_conditions_and_commands): New declaration.
2225
e9dae05e
RR
22262014-05-23 Ramana Radhakrishnan <ramana.radhakrishnan@arm.com>
2227
2228 * linux-aarch64-low.c (asm/ptrace.h): Include.
2229
5876f503
JK
22302014-05-21 Jan Kratochvil <jan.kratochvil@redhat.com>
2231
2232 Fix TLS access for -static -pthread.
2233 * gdbserver/thread-db.c (struct thread_db): Add td_thr_tlsbase_p.
2234 (thread_db_get_tls_address): Call it if LOAD_MODULE is zero.
2235 (thread_db_load_search, try_thread_db_load_1): Initialize it.
2236
802e8e6d
PA
22372014-05-20 Pedro Alves <palves@redhat.com>
2238
2239 * linux-aarch64-low.c (aarch64_insert_point)
2240 (aarch64_remove_point): No longer check whether the type is
2241 supported here. Adjust to new interface.
2242 (the_low_target): Install aarch64_supports_z_point_type as
2243 supports_z_point_type method.
2244 * linux-arm-low.c (raw_bkpt_type_to_arm_hwbp_type): New function.
2245 (arm_linux_hw_point_initialize): Take an enum raw_bkpt_type
2246 instead of a Z packet char. Adjust.
2247 (arm_supports_z_point_type): New function.
2248 (arm_insert_point, arm_remove_point): Adjust to new interface.
2249 (the_low_target): Install arm_supports_z_point_type.
2250 * linux-crisv32-low.c (cris_supports_z_point_type): New function.
2251 (cris_insert_point, cris_remove_point): Adjust to new interface.
2252 Don't check whether the type is supported here.
2253 (the_low_target): Install cris_supports_z_point_type.
2254 * linux-low.c (linux_supports_z_point_type): New function.
2255 (linux_insert_point, linux_remove_point): Adjust to new interface.
2256 * linux-low.h (struct linux_target_ops) <insert_point,
2257 remove_point>: Take an enum raw_bkpt_type instead of a char. Add
2258 raw_breakpoint pointer parameter.
2259 <supports_z_point_type>: New method.
2260 * linux-mips-low.c (mips_supports_z_point_type): New function.
2261 (mips_insert_point, mips_remove_point): Adjust to new interface.
2262 Use mips_supports_z_point_type.
2263 (the_low_target): Install mips_supports_z_point_type.
2264 * linux-ppc-low.c (the_low_target): Install NULL as
2265 supports_z_point_type method.
2266 * linux-s390-low.c (the_low_target): Install NULL as
2267 supports_z_point_type method.
2268 * linux-sparc-low.c (the_low_target): Install NULL as
2269 supports_z_point_type method.
2270 * linux-x86-low.c (x86_supports_z_point_type): New function.
2271 (x86_insert_point): Adjust to new insert_point interface. Use
2272 insert_memory_breakpoint. Adjust to new
2273 i386_low_insert_watchpoint interface.
2274 (x86_remove_point): Adjust to remove_point interface. Use
2275 remove_memory_breakpoint. Adjust to new
2276 i386_low_remove_watchpoint interface.
2277 (the_low_target): Install x86_supports_z_point_type.
2278 * lynx-low.c (lynx_target_ops): Install NULL as
2279 supports_z_point_type callback.
2280 * nto-low.c (nto_supports_z_point_type): New.
2281 (nto_insert_point, nto_remove_point): Adjust to new interface.
2282 (nto_target_ops): Install nto_supports_z_point_type.
2283 * mem-break.c: Adjust intro comment.
2284 (struct raw_breakpoint) <raw_type, size>: New fields.
2285 <inserted>: Update comment.
2286 <shlib_disabled>: Delete field.
2287 (enum bkpt_type) <gdb_breakpoint>: Delete value.
2288 <gdb_breakpoint_Z0, gdb_breakpoint_Z1, gdb_breakpoint_Z2,
2289 gdb_breakpoint_Z3, gdb_breakpoint_Z4>: New values.
2290 (raw_bkpt_type_to_target_hw_bp_type): New function.
2291 (find_enabled_raw_code_breakpoint_at): New function.
2292 (find_raw_breakpoint_at): New type and size parameters. Use them.
2293 (insert_memory_breakpoint): New function, based off
2294 set_raw_breakpoint_at.
2295 (remove_memory_breakpoint): New function.
2296 (set_raw_breakpoint_at): Reimplement.
2297 (set_breakpoint): New, based on set_breakpoint_at.
2298 (set_breakpoint_at): Reimplement.
2299 (delete_raw_breakpoint): Go through the_target->remove_point
2300 instead of assuming memory breakpoints.
2301 (find_gdb_breakpoint_at): Delete.
2302 (Z_packet_to_bkpt_type, Z_packet_to_raw_bkpt_type): New functions.
2303 (find_gdb_breakpoint): New function.
2304 (set_gdb_breakpoint_at): Delete.
2305 (z_type_supported): New function.
2306 (set_gdb_breakpoint_1): New function, loosely based off
2307 set_gdb_breakpoint_at.
2308 (check_gdb_bp_preconditions, set_gdb_breakpoint): New functions.
2309 (delete_gdb_breakpoint_at): Delete.
2310 (delete_gdb_breakpoint_1): New function, loosely based off
2311 delete_gdb_breakpoint_at.
2312 (delete_gdb_breakpoint): New function.
2313 (clear_gdb_breakpoint_conditions): Rename to ...
2314 (clear_breakpoint_conditions): ... this. Don't handle a NULL
2315 breakpoint.
2316 (add_condition_to_breakpoint): Make static.
2317 (add_breakpoint_condition): Take a struct breakpoint pointer
2318 instead of an address. Adjust.
2319 (gdb_condition_true_at_breakpoint): Rename to ...
2320 (gdb_condition_true_at_breakpoint_z_type): ... this, and add
2321 z_type parameter.
2322 (gdb_condition_true_at_breakpoint): Reimplement.
2323 (add_breakpoint_commands): Take a struct breakpoint pointer
2324 instead of an address. Adjust.
2325 (gdb_no_commands_at_breakpoint): Rename to ...
2326 (gdb_no_commands_at_breakpoint_z_type): ... this. Add z_type
2327 parameter. Return true if no breakpoint was found. Change debug
2328 output.
2329 (gdb_no_commands_at_breakpoint): Reimplement.
2330 (run_breakpoint_commands): Rename to ...
2331 (run_breakpoint_commands_z_type): ... this. Add z_type parameter,
2332 and change return type to boolean.
2333 (run_breakpoint_commands): New function.
2334 (gdb_breakpoint_here): Also check for Z1 breakpoints.
2335 (uninsert_raw_breakpoint): Don't try to reinsert a disabled
2336 breakpoint. Go through the_target->remove_point instead of
2337 assuming memory breakpoint.
2338 (uninsert_breakpoints_at, uninsert_all_breakpoints): Uninsert
2339 software and hardware breakpoints.
2340 (reinsert_raw_breakpoint): Go through the_target->insert_point
2341 instead of assuming memory breakpoint.
2342 (reinsert_breakpoints_at, reinsert_all_breakpoints): Reinsert
2343 software and hardware breakpoints.
2344 (check_breakpoints, breakpoint_here, breakpoint_inserted_here):
2345 Check both software and hardware breakpoints.
2346 (validate_inserted_breakpoint): Assert the breakpoint is a
2347 software breakpoint. Set the inserted flag to -1 instead of
2348 setting shlib_disabled.
2349 (delete_disabled_breakpoints): Adjust.
2350 (validate_breakpoints): Only validate software breakpoints.
2351 Adjust to inserted flag change.
2352 (check_mem_read, check_mem_write): Skip breakpoint types other
2353 than software breakpoints. Adjust to inserted flag change.
2354 * mem-break.h (enum raw_bkpt_type): New enum.
2355 (raw_breakpoint, struct process_info): Forward declare.
2356 (Z_packet_to_target_hw_bp_type): Delete declaration.
2357 (raw_bkpt_type_to_target_hw_bp_type, Z_packet_to_raw_bkpt_type)
2358 (set_gdb_breakpoint, delete_gdb_breakpoint)
2359 (clear_breakpoint_conditions): New declarations.
2360 (set_gdb_breakpoint_at, clear_gdb_breakpoint_conditions): Delete.
2361 (breakpoint_inserted_here): Update comment.
2362 (add_breakpoint_condition, add_breakpoint_commands): Replace
2363 address parameter with a breakpoint pointer parameter.
2364 (gdb_breakpoint_here): Update comment.
2365 (delete_gdb_breakpoint_at): Delete.
2366 (insert_memory_breakpoint, remove_memory_breakpoint): Declare.
2367 * server.c (process_point_options): Take a struct breakpoint
2368 pointer instead of an address. Adjust.
2369 (process_serial_event) <Z/z packets>: Use set_gdb_breakpoint and
2370 delete_gdb_breakpoint.
2371 * spu-low.c (spu_target_ops): Install NULL as
2372 supports_z_point_type method.
2373 * target.h: Include mem-break.h.
2374 (struct target_ops) <prepare_to_access_memory>: Update comment.
2375 <supports_z_point_type>: New field.
2376 <insert_point, remove_point>: Take an enum raw_bkpt_type argument
2377 instead of a char. Also take a raw breakpoint pointer.
2378 * win32-arm-low.c (the_low_target): Install NULL as
2379 supports_z_point_type.
2380 * win32-i386-low.c (i386_supports_z_point_type): New function.
2381 (i386_insert_point, i386_remove_point): Adjust to new interface.
2382 (the_low_target): Install i386_supports_z_point_type.
2383 * win32-low.c (win32_supports_z_point_type): New function.
2384 (win32_insert_point, win32_remove_point): Adjust to new interface.
2385 (win32_target_ops): Install win32_supports_z_point_type.
2386 * win32-low.h (struct win32_target_ops):
2387 <supports_z_point_type>: New method.
2388 <insert_point, remove_point>: Take an enum raw_bkpt_type argument
2389 instead of a char. Also take a raw breakpoint pointer.
2390
932539e3
PA
23912014-05-20 Pedro Alves <palves@redhat.com>
2392
2393 * mem-break.h: Include break-common.h.
2394 (Z_PACKET_SW_BP, Z_PACKET_HW_BP, Z_PACKET_WRITE_WP)
2395 (Z_PACKET_READ_WP, Z_PACKET_ACCESS_WP): New defines.
2396 (Z_packet_to_target_hw_bp_type): New declaration.
2397 * mem-break.c (Z_packet_to_target_hw_bp_type): New function.
2398 * i386-low.c (Z_PACKET_HW_BP, Z_PACKET_WRITE_WP, Z_PACKET_READ_WP)
2399 (Z_PACKET_ACCESS_WP): Delete macros.
2400 (Z_packet_to_hw_type): Delete function.
2401 * i386-low.h: Don't include break-common.h here.
2402 (Z_packet_to_hw_type): Delete declaration.
2403 * linux-x86-low.c (x86_insert_point, x86_insert_point): Call
2404 Z_packet_to_target_hw_bp_type instead of Z_packet_to_hw_type.
2405 * win32-i386-low.c (i386_insert_point, i386_remove_point): Call
2406 Z_packet_to_target_hw_bp_type instead of Z_packet_to_hw_type.
2407 * linux-aarch64-low.c: Don't include break-common.h here.
2408 (Z_PACKET_SW_BP, Z_PACKET_HW_BP, Z_PACKET_WRITE_WP)
2409 (Z_PACKET_READ_WP, Z_PACKET_ACCESS_WP): Delete macros.
2410 (Z_packet_to_target_hw_bp_type): Delete function.
2411 * linux-mips-low.c (rsp_bp_type_to_target_hw_bp_type): Delete
2412 function.
2413 (mips_insert_point, mips_remove_point): Use
2414 Z_packet_to_target_hw_bp_type.
2415
4ff0d3d8
PA
24162014-05-20 Pedro Alves <palves@redhat.com>
2417
2418 * linux-aarch64-low.c: Include break-common.h.
2419 (enum target_point_type): Delete.
2420 (Z_packet_to_point_type): Rename to ...
2421 (Z_packet_to_target_hw_bp_type): ... this, and return a
2422 target_hw_bp_type instead.
2423 (aarch64_show_debug_reg_state): Take an enum target_hw_bp_type
2424 instead of an enum target_point_type.
2425 (aarch64_point_encode_ctrl_reg): Likewise. Compute type mask from
2426 breakpoint type.
2427 (aarch64_dr_state_insert_one_point)
2428 (aarch64_dr_state_remove_one_point, aarch64_handle_breakpoint)
2429 (aarch64_handle_aligned_watchpoint)
2430 (aarch64_handle_unaligned_watchpoint, aarch64_handle_watchpoint):
2431 Take an enum target_hw_bp_type instead of an enum
2432 target_point_type.
2433 (aarch64_supports_z_point_type): New function.
2434 (aarch64_insert_point, aarch64_remove_point): Use it. Adjust to
2435 use Z_packet_to_target_hw_bp_type.
2436
786dc519
JB
24372014-05-20 Joel Brobecker <brobecker@adacore.com>
2438
2439 * configure.ac: Only use -Werror by default when DEVELOPMENT
2440 is true.
2441 * configure: Regenerate.
2442
9e0aa64f
JK
24432014-05-19 Jan Kratochvil <jan.kratochvil@redhat.com>
2444
2445 Fix gdbserver qGetTLSAddr for x86_64 -m32.
2446 * linux-x86-low.c (X86_64_USER_REGS): New.
2447 (x86_fill_gregset): Call memset for BUF first in x86_64 -m32 case.
2448
2b577b92
YQ
24492014-04-28 Yao Qi <yao@codesourcery.com>
2450
2451 * Makefile.in (i386-avx512.c): Fix the typo of generated file
2452 name.
2453
94611da2
PA
24542014-04-25 Pedro Alves <palves@redhat.com>
2455
2456 PR server/16255
2457 * linux-low.c (linux_attach_fail_reason_string): New function.
2458 (linux_attach_lwp): Delete.
2459 (linux_attach_lwp_1): Rename to ...
2460 (linux_attach_lwp): ... this. Take a ptid instead of a pid as
2461 argument. Remove "initial" parameter. Return int instead of
2462 void. Don't error or warn here.
2463 (linux_attach): Adjust to call linux_attach_lwp. Call error on
2464 failure to attach to the tgid. Call warning when failing to
2465 attach to an lwp.
2466 * linux-low.h (linux_attach_lwp): Take a ptid instead of a pid as
2467 argument. Remove "initial" parameter. Return int instead of
2468 void. Don't error or warn here.
2469 (linux_attach_fail_reason_string): New declaration.
2470 * thread-db.c (attach_thread): Adjust to linux_attach_lwp's
2471 interface change. Use linux_attach_fail_reason_string.
2472
01f9f808
MS
24732014-04-24 Michael Sturm <michael.sturm@mintel.com>
2474 Walfred Tedeschi <walfred.tedeschi@intel.com>
2475
2476 * Makefile.in: Added rules to handle new files
2477 i386-avx512.c i386-avx512-linux.c amd64-avx512.c
2478 amd64-avx512-linux.c x32-avx512.c x32-avx512-linux.c.
2479 * configure.srv (srv_i386_regobj): Add i386-avx512.o.
2480 (srv_i386_linux_regobj): Add i386-avx512-linux.o.
2481 (srv_amd64_regobj): Add amd64-avx512.o and x32-avx512.o.
2482 (srv_amd64_linux_regobj): Add amd64-avx512-linux.o and
2483 x32-avx512-linux.o.
2484 (srv_i386_32bit_xmlfiles): Add i386/32bit-avx512.xml.
2485 (srv_i386_64bit_xmlfiles): Add i386/64bit-avx512.xml.
2486 (srv_amd64_xmlfiles): Add i386/amd64-avx512.xml and
2487 i386/x32-avx512.xml.
2488 (srv_i386_linux_xmlfiles): Add i386/i386-avx512-linux.xml.
2489 (srv_amd64_linux_xmlfiles): Add i386/amd64-avx512-linux.xml and
2490 i386/x32-avx512-linux.xml.
2491 * i387-fp.c (num_avx512_k_registers): New constant for number
2492 of K registers.
2493 (num_avx512_zmmh_low_registers): New constant for number of
2494 lower ZMM registers (0-15).
2495 (num_avx512_zmmh_high_registers): New constant for number of
2496 higher ZMM registers (16-31).
2497 (num_avx512_ymmh_registers): New contant for number of higher
2498 YMM registers (ymm16-31 added by avx521 on x86_64).
2499 (num_avx512_xmm_registers): New constant for number of higher
2500 XMM registers (xmm16-31 added by AVX512 on x86_64).
2501 (struct i387_xsave): Add space for AVX512 registers.
2502 (i387_cache_to_xsave): Change raw buffer size to 64 characters.
2503 Add code to handle AVX512 registers.
2504 (i387_xsave_to_cache): Add code to handle AVX512 registers.
2505 * linux-x86-low.c (init_registers_amd64_avx512_linux): New
2506 prototypei from generated file.
2507 (tdesc_amd64_avx512_linux): Likewise.
2508 (init_registers_x32_avx512_linux): Likewise.
2509 (tdesc_x32_avx512_linux): Likewise.
2510 (init_registers_i386_avx512_linux): Likewise.
2511 (tdesc_i386_avx512_linux): Likewise.
2512 (x86_64_regmap): Add AVX512 registers.
2513 (x86_linux_read_description): Add code to handle AVX512 XSTATE
2514 mask.
2515 (initialize_low_arch): Add code to initialize AVX512 registers.
2516
51aa91f9
PA
25172014-04-23 Pedro Alves <palves@redhat.com>
2518
2519 * mem-break.c (find_gdb_breakpoint_at): Make static.
2520 * mem-break.h (find_gdb_breakpoint_at): Delete declaration.
2521
a4165e94
PA
25222014-04-23 Pedro Alves <palves@redhat.com>
2523
2524 * i386-low.c: Don't include break-common.h here.
2525 (i386_low_insert_watchpoint, i386_low_remove_watchpoint): Change
2526 prototype to take target_hw_bp_type as argument instead of a Z
2527 packet char.
2528 * i386-low.h: Include break-common.h here.
2529 (Z_packet_to_hw_type): Declare.
2530 (i386_low_insert_watchpoint, i386_low_remove_watchpoint): Change
2531 prototypes.
2532 * linux-x86-low.c (x86_insert_point): Convert the packet number to
2533 a target_hw_bp_type before calling i386_low_insert_watchpoint.
2534 (x86_remove_point): Convert the packet number to a
2535 target_hw_bp_type before calling i386_low_remove_watchpoint.
2536 * win32-i386-low.c (i386_insert_point): Convert the packet number
2537 to a target_hw_bp_type before calling i386_low_insert_watchpoint.
2538 (i386_remove_point): Convert the packet number to a
2539 target_hw_bp_type before calling i386_low_remove_watchpoint.
2540
b8acf843
PA
25412014-04-23 Pedro Alves <palves@redhat.com>
2542
2543 * utils.h (perror_with_name): Add ATTRIBUTE_NORETURN.
2544
d708bcd1
PA
25452014-04-10 Pedro Alves <palves@redhat.com>
2546
2547 * mem-break.c (add_breakpoint_condition, add_breakpoint_commands):
2548 Check if the condition or command is NULL before checking if the
2549 breakpoint is known. On success, return true.
2550 * mem-break.h (add_breakpoint_condition): Document return.
2551 (add_breakpoint_commands): Add describing comment.
2552 * server.c (skip_to_semicolon): New function.
2553 (process_point_options): Use it.
2554
2eec7d5b
PA
25552014-04-09 Pedro Alves <palves@redhat.com>
2556
2557 * linux-low.c (linux_read_loadmap): Pass current_inferior directly
2558 to lwpid_of.
2559
fa96cb38
PA
25602014-02-27 Pedro Alves <palves@redhat.com>
2561
2562 PR 12702
2563 * inferiors.h (A_I_NEXT, ALL_INFERIORS_TYPE, ALL_PROCESSES): New
2564 macros.
2565 * linux-low.c (delete_lwp, handle_extended_wait): Add debug
2566 output.
2567 (last_thread_of_process_p): Take a PID argument instead of a
2568 thread pointer.
2569 (linux_wait_for_lwp): Delete.
2570 (num_lwps, check_zombie_leaders, not_stopped_callback): New
2571 functions.
2572 (linux_low_filter_event): New function, party factored out from
2573 linux_wait_for_event.
2574 (linux_wait_for_event): Rename to ...
2575 (linux_wait_for_event_filtered): ... this. Add new filter ptid
2576 argument. Partly rewrite. Always use waitpid(-1, WNOHANG) and
2577 sigsuspend. Check for zombie leaders.
2578 (linux_wait_for_event): Reimplement as wrapper around
2579 linux_wait_for_event_filtered.
2580 (linux_wait_1): Handle TARGET_WAITKIND_NO_RESUMED. Assume that if
2581 a normal or signal exit is seen, it's the whole process exiting.
2582 (wait_for_sigstop): No longer a for_each_inferior callback.
2583 Rewrite on top of linux_wait_for_event_filtered.
2584 (stop_all_lwps): Call wait_for_sigstop directly.
2585 * server.c (resume, handle_target_event): Handle
2586 TARGET_WAITKIND_NO_RESUMED.
2587
d763de10
JB
25882014-02-26 Joel Brobecker <brobecker@adacore.com>
2589
2590 * win32-low.c (psapi_get_dll_name,
2591 * win32_CreateToolhelp32Snapshot): Delete.
2592 (win32_CreateToolhelp32Snapshot, win32_Module32First)
2593 (win32_Module32Next, load_toolhelp, toolhelp_get_dll_name):
2594 Delete.
2595 (handle_load_dll): Add function description.
2596 Remove code using psapi_get_dll_name and toolhelp_get_dll_name.
2597
850a0f76
JB
25982014-02-26 Joel Brobecker <brobecker@adacore.com>
2599
2600 * win32-low.c (win32_add_one_solib): Add 0x1000 to load_addr.
2601 Add comment.
2602 (win32_add_all_dlls): Remove 0x1000 offset applied to DLL
2603 base address when calling win32_add_one_solib.
2604 (handle_load_dll): Delete local variable load_addr.
2605 Remove 0x1000 offset applied to DLL base address when calling
2606 win32_add_one_solib.
2607 (handle_unload_dll): Add comment.
2608
f25b3fc3
JB
26092014-02-26 Joel Brobecker <brobecker@adacore.com>
2610
2611 * win32-low.c (win32_add_all_dlls): Renames
2612 win32_ensure_ntdll_loaded. Rewrite function documentation.
2613 Adjust implementation to always load all DLLs.
2614 Add 0x1000 offset to DLL base address when calling
2615 win32_add_one_solib.
2616 (child_initialization_done): New static global.
2617 (do_initial_child_stuff): Set child_initialization_done to
2618 zero during child initialization, and 1 after. Replace call
2619 to win32_ensure_ntdll_loaded by call to win32_add_all_dlls.
2620 Add comment.
2621 (match_dll_by_basename, dll_is_loaded_by_basename): Delete.
2622 (handle_unload_dll): Add function documentation.
2623 (get_child_debug_event): Ignore load and unload DLL events
2624 during child initialization.
2625
d86d4aaf
DE
26262014-02-20 Doug Evans <dje@google.com>
2627
3bc32da3 2628 Remove global all_lwps.
d86d4aaf
DE
2629 * inferiors.h (ptid_of): Move here from linux-low.h.
2630 (pid_of, lwpid_of): Ditto.
2631 * linux-aarch64-low.c (debug_reg_change_callback): Update, "entry"
2632 parameter is a struct thread_info * now.
2633 (aarch64_notify_debug_reg_change): Fetch pid from current_inferior
2634 directly. Pass &all_threads to find_inferior instead of &all_lwps.
2635 (aarch64_stopped_data_address): Fetch lwpid from current_inferior
2636 directly.
2637 (aarch64_linux_prepare_to_resume): Fetch ptid from thread.
2638 (aarch64_arch_setup): Fetch lwpid from current_inferior directly.
2639 * linux-arm-low.c (update_registers_callback): Update, "entry"
2640 parameter is a struct thread_info * now.
2641 Fetch lwpid from current_inferior directly.
2642 (arm_insert_point): Pass &all_threads to find_inferior instead of
2643 &all_lwps.
2644 (arm_remove_point): Ditto.
2645 (arm_stopped_by_watchpoint): Fetch lwp from current_inferior.
2646 (arm_prepare_to_resume): Fetch pid from thread.
2647 (arm_read_description): Fetch lwpid from current_inferior directly.
2648 * linux-low.c (all_lwps): Delete.
2649 (delete_lwp): Delete call to remove_inferior.
2650 (handle_extended_wait): Fetch lwpid from thread.
2651 (add_lwp): Don't set lwp->entry.id. Remove call to
2652 add_inferior_to_list.
2653 (linux_attach_lwp_1): Fetch pid from current_inferior directly.
2654 (linux_kill_one_lwp): Fetch ptid,lwpid from thread.
2655 (kill_one_lwp_callback): Ditto.
2656 (linux_kill): Don't dereference NULL pointer.
2657 Fetch ptid,lwpid from thread.
2658 (get_detach_signal): Fetch ptid from thread.
2659 (linux_detach_one_lwp): Fetch ptid,lwpid from thread.
2660 Simplify call to regcache_invalidate_thread.
2661 (delete_lwp_callback): Update, "entry" parameter is a
2662 struct thread_info * now. Fetch pid from thread.
2663 (linux_mourn): Pass &all_threads to find_inferior instead of &all_lwps.
2664 (status_pending_p_callback): Update, "entry" parameter is a
2665 struct thread_info * now. Fetch ptid from thread.
2666 (find_lwp_pid): Update, "entry" parameter is a
2667 struct thread_info * now.
2668 (linux_wait_for_lwp): Fetch pid from thread.
2669 (linux_fast_tracepoint_collecting): Fetch lwpid from thread.
2670 (maybe_move_out_of_jump_pad): Fetch lwpid from current_inferior.
2671 (enqueue_one_deferred_signal): Fetch lwpid from thread.
2672 (dequeue_one_deferred_signal): Ditto.
2673 (cancel_breakpoint): Fetch ptid from current_inferior.
2674 (linux_wait_for_event): Pass &all_threads to find_inferior,
2675 not &all_lwps. Fetch ptid, lwpid from thread.
2676 (count_events_callback): Update, "entry" parameter is a
2677 struct thread_info * now.
2678 (select_singlestep_lwp_callback): Ditto.
2679 (select_event_lwp_callback): Ditto.
2680 (cancel_breakpoints_callback): Ditto.
2681 (linux_cancel_breakpoints): Pass &all_threads to find_inferior,
2682 not &all_lwps.
2683 (select_event_lwp): Ditto. Fetch ptid from event_thread.
2684 (unsuspend_one_lwp): Update, "entry" parameter is a
2685 struct thread_info * now.
2686 (unsuspend_all_lwps): Pass &all_threads to find_inferior,
2687 not &all_lwps.
2688 (linux_stabilize_threads): Ditto. And for for_each_inferior.
2689 Fetch lwpid from thread, not lwp.
2690 (linux_wait_1): Fetch ptid, lwpid from current_inferior.
2691 Pass &all_threads to find_inferior, not &all_lwps.
2692 (send_sigstop): Fetch lwpid from thread, not lwp.
2693 (send_sigstop_callback): Update, "entry" parameter is a
2694 struct thread_info * now.
2695 (suspend_and_send_sigstop_callback): Ditto.
2696 (wait_for_sigstop): Ditto. Fetch ptid, lwpid from thread, lwp.
2697 (stuck_in_jump_pad_callback): Update, "entry" parameter is a
2698 struct thread_info * now.
2699 (move_out_of_jump_pad_callback): Ditto. Fetch ptid, lwpid
2700 from thread, lwp.
2701 (lwp_running): Update, "entry" parameter is a
2702 struct thread_info * now.
2703 (stop_all_lwps): Fetch ptid from thread.
2704 Pass &all_threads to find_inferior, for_each_inferior, not &all_lwps.
2705 (linux_resume_one_lwp): Fetch lwpid from thread.
2706 (linux_set_resume_request): Update, "entry" parameter is a
2707 struct thread_info * now. Fetch pid, lwpid from thread.
2708 (resume_status_pending_p): Update, "entry" parameter is a
2709 struct thread_info * now.
2710 (need_step_over_p): Ditto. Fetch lwpid from thread.
2711 (start_step_over): Fetch lwpid from thread.
2712 (linux_resume_one_thread): Update, "entry" parameter is a
2713 struct thread_info * now. Fetch lwpid from thread.
2714 (linux_resume): Pass &all_threads to find_inferior, not &all_lwps.
2715 (proceed_one_lwp): Update, "entry" parameter is a
2716 struct thread_info * now. Fetch lwpid from thread.
2717 (unsuspend_and_proceed_one_lwp): Update, "entry" parameter is a
2718 struct thread_info * now.
2719 (proceed_all_lwps): Pass &all_threads to find_inferior, not &all_lwps.
2720 (unstop_all_lwps): Ditto. Fetch lwpid from thread.
2721 (regsets_fetch_inferior_registers): Fetch lwpid from current_inferior
2722 directly.
2723 (regsets_store_inferior_registers): Ditto.
2724 (fetch_register, store_register): Ditto.
2725 (linux_read_memory, linux_write_memory): Ditto.
2726 (linux_request_interrupt): Ditto.
2727 (linux_read_auxv): Ditto.
2728 (linux_xfer_siginfo): Ditto.
2729 (linux_qxfer_spu): Ditto.
2730 (linux_qxfer_libraries_svr4): Ditto.
2731 * linux-low.h (ptid_of, pid_of, lwpid_of): Delete,
2732 moved to inferiors.h.
2733 (get_lwp): Delete.
2734 (get_thread_lwp): Update.
2735 (struct lwp_info): Delete member "entry". Simplify comment for
2736 member "thread".
2737 (all_lwps): Delete.
2738 * linux-mips-low.c (mips_read_description): Fetch lwpid from
2739 current_inferior directly.
2740 (update_watch_registers_callback): Update, "entry" parameter is a
2741 struct thread_info * now. Fetch pid from thread.
2742 (mips_linux_prepare_to_resume): Fetch ptid from thread.
2743 (mips_insert_point): Fetch lwpid from current_inferior.
2744 Pass &all_threads to find_inferior, not &all_lwps.
2745 (mips_remove_point): Pass &all_threads to find_inferior, not &all_lwps.
2746 (mips_stopped_by_watchpoint): Fetch lwpid from current_inferior
2747 directly.
2748 (mips_stopped_data_address): Ditto.
2749 * linux-s390-low.c (s390_arch_setup): Fetch pid from current_inferior
2750 directly.
2751 * linux-tile-low.c (tile_arch_setup): Ditto.
2752 * linux-x86-low.c (x86_get_thread_area): Fetch lwpid from thread.
2753 (update_debug_registers_callback): Update, "entry" parameter is a
2754 struct thread_info * now. Fetch pid from thread.
2755 (i386_dr_low_set_addr): Fetch pid from current_inferior directly.
2756 Pass &all_threads to find_inferior, not &all_lwps.
2757 (i386_dr_low_get_addr): Fetch ptid from current_inferior directly.
2758 (i386_dr_low_set_control): Fetch pid from current_inferior directly.
2759 Pass &all_threads to find_inferior, not &all_lwps.
2760 (i386_dr_low_get_control): Fetch ptid from current_inferior directly.
2761 (i386_dr_low_get_status): Ditto.
2762 (x86_linux_prepare_to_resume): Fetch ptid from thread.
2763 (x86_siginfo_fixup): Fetch lwpid from current_inferior directly.
2764 (x86_linux_read_description): Ditto.
2765 * proc-service.c (ps_getpid): Fetch pid from current_inferior directly.
2766
3b8361aa
DE
27672014-02-20 Doug Evans <dje@google.com>
2768
2769 * inferiors.c (get_first_inferior): Fix buglet.
2770
f7667f0d
DE
27712014-02-19 Doug Evans <dje@google.com>
2772
2773 * gdbthread.h (add_thread): Change result type to struct thread_info *.
2774 * inferiors.c (add_thread): Change result type to struct thread_info *.
2775 All callers updated.
2776 (add_lwp): Call add_thread here instead of in callers.
2777 All callers updated.
2778 * linux-low.h (get_lwp_thread): Rewrite.
2779 (struct lwp_info): New member "thread".
2780
b3312d80
DE
27812014-02-19 Doug Evans <dje@google.com>
2782
2783 * linux-low.c (add_lwp): Change result to struct lwp_info *.
2784 All callers updated.
2785
ecc6f45c
DE
27862014-02-19 Doug Evans <dje@google.com>
2787
2788 * inferiors.c (add_thread): Fix whitespace.
2789
649ebbca
DE
27902014-02-19 Doug Evans <dje@google.com>
2791
2792 * dll.c (clear_dlls): Replace accessing list implemention details
2793 with API function.
2794 * gdbthread.h (get_first_thread): Declare.
2795 * inferiors.c (for_each_inferior_with_data): New function.
2796 (get_first_thread): New function.
2797 (find_thread_ptid): Simplify.
2798 (get_first_inferior): New function.
2799 (clear_list): Delete.
2800 (one_inferior_p): New function.
2801 (clear_inferior_list): New function.
2802 (clear_inferiors): Update.
2803 * inferiors.h (for_each_inferior_with_data): Declare.
2804 (clear_inferior_list): Declare.
2805 (one_inferior_p): Declare.
2806 (get_first_inferior): Declare.
2807 * linux-low.c (linux_wait_for_event): Replace accessing list
2808 implemention details with API function.
2809 * server.c (target_running): Ditto.
2810 (accumulate_file_name_length): New function.
2811 (emit_dll_description): New function.
2812 (handle_qxfer_libraries): Replace accessing list implemention
2813 details with API function.
2814 (handle_qxfer_threads_worker): New function.
2815 (handle_qxfer_threads_proper): Replace accessing list implemention
2816 details with API function.
2817 (handle_query): Ditto.
2818 (visit_actioned_threads_callback_ftype): New typedef.
2819 (visit_actioned_threads_data): New struct.
2820 (visit_actioned_threads): Rewrite to be find_inferior callback.
2821 (resume): Call find_inferior.
2822 (handle_status): Replace accessing list implemention
2823 details with API function.
2824 (process_serial_event): Replace accessing list implemention details
2825 with API function.
2826 * target.c (set_desired_inferior): Replace accessing list implemention
2827 details with API function.
2828 * tracepoint.c (same_process_p): New function.
2829 (gdb_agent_about_to_close): Replace accessing list implemention
2830 details with API function.
2831 * win32-low.c (child_delete_thread): Replace accessing list
2832 implemention details with API function.
2833 (match_dll_by_basename): New function.
2834 (dll_is_loaded_by_basename): New function.
2835 (win32_ensure_ntdll_loaded): Replace accessing list implemention
2836 details call to dll_is_loaded_by_basename.
2837
80894984
DE
28382014-02-19 Doug Evans <dje@google.com>
2839
2840 * dll.h (struct dll_info): Add comment.
2841 * gdbthread.h (struct thread_info): Add comment.
2842 (current_ptid): Simplify.
2843 * inferiors.c (add_process): Update.
2844 (remove_process): Update.
2845 * inferiors.h (struct process_info): Rename member "head" to "entry".
2846 * linux-low.c (delete_lwp): Update.
2847 (add_lwp): Update.
2848 (last_thread_of_process_p): Update.
2849 (kill_one_lwp_callback, linux_kill): Update.
2850 (status_pending_p_callback): Update.
2851 (wait_for_sigstop): Update. Simplify read of ptid.
2852 (start_step_over): Update.
2853 * linux-low.h (ptid_of, pid_of, lwpid_of): Update.
2854 (get_lwp_thread): Update.
2855 (struct lwp_info): Rename member "head" to "entry".
2856 * regcache.h (inferior_list_entry): Delete.
2857 * server.c (kill_inferior_callback): Update.
2858 (detach_or_kill_inferior_callback): Update.
2859 (print_started_pid): Update.
2860 (print_attached_pid): Update.
2861 (process_serial_event): Simplify read of ptid.
2862 * thread-db.c (thread_db_create_event): Update.
2863 (thread_db_get_tls_address): Update.
2864 * win32-low.c (current_inferior_ptid): Simplify.
2865
46917d26
TT
28662014-02-19 Tom Tromey <tromey@redhat.com>
2867
2868 * target.h (struct target_ops) <supports_btrace>: Add target_ops
2869 argument.
2870 (target_supports_btrace): Update.
2871
0759a81e
YQ
28722014-02-14 Yao Qi <yao@codesourcery.com>
2873
2874 * Makefile.in (IPA_OBJS): Append rsp-low-ipa.o.
2875 (rsp-low-ipa.o): New target.
2876
a7191e8b
TT
28772014-02-12 Tom Tromey <tromey@redhat.com>
2878
2879 * ax.c (gdb_parse_agent_expr): Use hex2bin, not
2880 convert_ascii_to_int.
2881 * regcache.c (registers_to_string): Likewise.
2882 * remote-utils.c (decode_M_packet): Likewise.
2883 * server.c (process_serial_event): Likewise.
2884
ff0e980e
TT
28852014-02-12 Tom Tromey <tromey@redhat.com>
2886
2887 * server.c (handle_query, handle_v_run): Use hex2bin, not
2888 unhexify.
2889 * tracepoint.c (cmd_qtdpsrc, cmd_qtdv, cmd_qtnotes): Likewise.
2890
e9371aff
TT
28912014-02-12 Tom Tromey <tromey@redhat.com>
2892
2893 * ax.c (gdb_unparse_agent_expr): Use bin2hex, not
2894 convert_int_to_ascii.
2895 * regcache.c (registers_to_string, collect_register_as_string):
2896 Likewise.
2897 * remote-utils.c (look_up_one_symbol, relocate_instruction):
2898 Likewise.
2899 * server.c (process_serial_event): Likewise.
2900 * tracepoint.c (cmd_qtstatus, response_source, response_tsv)
2901 (cmd_qtbuffer, cstr_to_hexstr): Likewise.
2902
971dc0b8
TT
29032014-02-12 Tom Tromey <tromey@redhat.com>
2904
2905 * remote-utils.c (look_up_one_symbol, monitor_output): Use
2906 bin2hex, not hexify.
2907 * tracepoint.c (cmd_qtstatus): Likewise.
2908
0a822afb
TT
29092014-02-12 Tom Tromey <tromey@redhat.com>
2910
2911 * remote-utils.c (monitor_output): Pass explicit length to
2912 hexify.
2913
9c3d6531
TT
29142014-02-12 Tom Tromey <tromey@redhat.com>
2915
2916 * tracepoint.c: Include rsp-low.h.
2917 * server.c: Include rsp-low.h.
2918 * remote-utils.h (convert_ascii_to_int, convert_int_to_ascii)
2919 (unhexify, hexify, remote_escape_output, unpack_varlen_hex): Don't
2920 declare.
2921 * remote-utils.c: Include rsp-low.h.
2922 (fromhex, hexchars, ishex, unhexify, tohex, hexify)
2923 (remote_escape_output, remote_unescape_input, unpack_varlen_hex)
2924 (convert_int_to_ascii, convert_ascii_to_int): Move to
2925 common/rsp-low.c.
2926 * regcache.c: Include rsp-low.h.
2927 * ax.c: Include rsp-low.h.
2928 * Makefile.in (SFILES): Add common/rsp-low.c.
2929 (OBS): Add rsp-low.o.
2930 (rsp-low.o): New target.
2931
01fd3ea5
TT
29322014-02-12 Tom Tromey <tromey@redhat.com>
2933
2934 * utils.h (pulongest, plongest, phex_nz): Don't declare.
2935 Include print-utils.h.
2936 * utils.c (NUMCELLS, CELLSIZE, get_cell, decimal2str, pulongest)
2937 (plongest, thirty_two, phex_nz): Remove.
2938 * Makefile.in (SFILES): Add common/print-utils.c.
2939 (OBS): Add print-utils.o.
2940 (print-utils-ipa.o): New target.
2941 (print-utils.o): New target.
2942 (IPA_OBJS): Add print-utils-ipa.o.
2943
e99dc820
TT
29442014-02-06 Tom Tromey <tromey@redhat.com>
2945
2946 * Makefile.in (SFILES): Fix indentation.
2947
ee1e2d4f
DE
29482014-02-05 Doug Evans <dje@google.com>
2949
2950 * linux-low.c (linux_wait_for_event): Improve comment.
2951 (linux_wait_1): Keep current_inferior in sync with event_child.
2952
f5a02773
DE
29532014-01-22 Doug Evans <dje@google.com>
2954
2955 * gdbthread.h (gdb_id_to_thread): Delete, unused.
2956
87ce2a04
DE
29572014-01-22 Doug Evans <dje@google.com>
2958
2959 * configure.ac (AC_CHECK_FUNCS): Add test for gettimeofday.
2960 * configure: Regenerate.
2961 * config.in: Regenerate.
2962 * Makefile.in (SFILES): Add debug.c.
2963 (OBS): Add debug.o.
2964 * debug.c: New file.
2965 * debug.h: New file.
2966 * linux-aarch64-low.c (*): Update all debugging printfs to use
2967 debug_printf instead of fprintf.
2968 * linux-arm-low.c (*): Ditto.
2969 * linux-cris-low.c (*): Ditto.
2970 * linux-crisv32-low.c (*): Ditto.
2971 * linux-m32r-low.c (*): Ditto.
2972 * linux-sparc-low.c (*): Ditto.
2973 * linux-x86.c (*): Ditto.
2974 * linux-low.c (*): Ditto.
2975 (linux_wait_1): Add calls to debug_enter, debug_exit.
2976 (linux_wait): Remove redundant debugging printf.
2977 (stop_all_lwps): Add calls to debug_enter, debug_exit.
2978 (linux_resume, unstop_all_lwps): Ditto.
2979 * mem-break.c (*): Update all debugging printfs to use
2980 debug_printf instead of fprintf.
2981 * remote-utils.c (*): Ditto.
2982 * thread-db.c (*): Ditto.
2983 * server.c #include <ctype.h>, "gdb_vecs.h".
2984 (debug_threads): Moved to debug.c.
2985 (*): Update all debugging printfs to use debug_printf instead of
2986 fprintf.
2987 (start_inferior): Replace call to fflush with call to debug_flush.
2988 (monitor_show_help): Mention set debug-format.
2989 (parse_debug_format_options): New function.
2990 (handle_monitor_command): Handle "monitor set debug-format".
2991 (gdbserver_usage): Mention --debug-format.
2992 (main): Parse --debug-format.
2993 * server.h (debug_threads): Declaration moved to debug.h.
2994 #include "debug.h".
2995 * tracepoint.c (trace_debug_1) [!IN_PROCESS_AGENT]: Add version of
2996 trace_debug_1 that uses debug_printf.
2997 (tracepoint_look_up_symbols): Update all debugging printfs to use
2998 debug_printf instead of fprintf.
2999
e671835b
BS
30002014-01-20 Baruch Siach <baruch@tkos.co.il>
3001
3002 * linux-xtensa-low.c: Include asm/ptrace.h instead of
3003 sys/ptrace.h.
3004
b5737fa9
PA
30052014-01-17 Pedro Alves <palves@redhat.com>
3006
ea38d2a9 3007 PR build/16445
c7faa97a
PA
3008 * linux-x86-low.c: Don't include elf/common.h if ELFMAG0 is
3009 defined after including gdb_proc_service.h.
b5737fa9 3010
40ed484e
DE
30112014-01-16 Doug Evans <dje@google.com>
3012
3013 * dll.c (UNSPECIFIED_CORE_ADDR): New macro.
3014 (match_dll): Use it.
3015
969c39fb
MM
30162014-01-16 Markus Metzger <markus.t.metzger@intel.com>
3017
3018 * target.h (target_ops) <read_btrace>: Change parameters and
3019 return type to allow error reporting.
3020 * server.c (handle_qxfer_btrace): Support delta reads. Pass
3021 trace reading errors on.
3022 * linux-low.c (linux_low_read_btrace): Pass trace reading
3023 errors on.
3024 (linux_low_disable_btrace): New.
3025
ab7f45ba
DE
30262014-01-15 Doug Evans <dje@google.com>
3027
3028 * inferiors.c (thread_id_to_gdb_id): Delete.
3029 * inferiors.h (thread_id_to_gdb_id): Delete.
3030
66af0f44
EZ
30312014-01-13 Eli Zaretskii <eliz@gnu.org>
3032
3033 * Makefile.in (INCLUDE_CFLAGS): Remove trailing slash from
3034 "-I$(srcdir)/../". Fixes MinGW compilation errors with old GCC
3035 versions.
3036
9939e131
PA
30372014-01-08 Pedro Alves <palves@redhat.com>
3038
3039 * server.c (handle_status): Don't discard previous queued stop
3040 replies or thread's pending status here.
3041 (main) <disconnection>: Do it here instead.
3042
b7ea362b
PA
30432014-01-08 Pedro Alves <palves@redhat.com>
3044
3045 * gdbthread.h (struct thread_info) <status_pending_p>: New field.
3046 * server.c (visit_actioned_threads, handle_pending_status): New
3047 function.
3048 (handle_v_cont): Factor out parts to ...
3049 (resume): ... this new function. If in all-stop, and a thread
3050 being resumed has a pending status, report it without actually
3051 resuming.
3052 (myresume): Adjust to use the new 'resume' function.
3053 (clear_pending_status_callback, set_pending_status_callback)
3054 (find_status_pending_thread_callback): New functions.
3055 (handle_status): Handle the case of multiple threads having
3056 interesting statuses to report. Report threads' real last signal
3057 instead of always reporting GDB_SIGNAL_TRAP. Look for a thread
3058 with an interesting thread to report the status for, instead of
3059 always reporting the status of the first thread.
3060
28498c42
JB
30612014-01-01 Joel Brobecker <brobecker@adacore.com>
3062
3063 * gdbserver.c (gdbserver_version): Set copyright year to 2014.
3064 * gdbreplay.c (gdbreplay_version): Likewise.
3065
f45c82da
YZ
30662013-12-18 Yufeng Zhang <yufeng.zhang@arm.com>
3067
3068 * linux-aarch64-low.c (aarch64_linux_set_debug_regs): Set
3069 iov.iov_len with the real length in use.
3070
379a5e2d
JB
30712013-12-13 Joel Brobecker <brobecker@adacore.com>
3072
3073 * Makefile.in (safe-ctype.o, lbasename.o): New rules.
3074 * configure.srv: Add safe-ctype.o and lbasename.o to srv_tgtobj
3075 for all targets that use win32-low.c.
3076 * win32-low.c (win32_ensure_ntdll_loaded): New function.
3077 (do_initial_child_stuff): Add call to win32_ensure_ntdll_loaded.
3078
4210d83e
PA
30792013-12-13 Pedro Alves <palves@redhat.com>
3080
3081 * target.c (mywait): Set OURSTATUS->KIND to TARGET_WAITKIND_STOPPED
3082 if equal to TARGET_WAITKIND_LOADED.
3083 * win32-low.c (cached_status): New static global.
3084 (win32_wait): Add declaration.
3085 (do_initial_child_stuff): Flush all initial pending debug events
3086 up to the initial breakpoint.
3087 (win32_wait): If CACHED_STATUS was set, return that instead
3088 of doing a real wait. Remove the code resuming the execution
3089 of the inferior after receiving a TARGET_WAITKIND_LOADED event
3090 during the initial phase. Also remove the code changing
3091 OURSTATUS->KIND from TARGET_WAITKIND_LOADED to
3092 TARGET_WAITKIND_STOPPED.
3093
e7f0d979
YQ
30942013-12-11 Yao Qi <yao@codesourcery.com>
3095
3096 * notif.c (handle_notif_ack): Return 0 if no notification
3097 matches.
3098
ebcf782c
DE
30992013-11-20 Doug Evans <dje@google.com>
3100
3101 * linux-low.c (linux_set_resume_request): Fix comment.
3102
20ad9378
DE
31032013-11-20 Doug Evans <dje@google.com>
3104
3105 * linux-low.c (resume_status_pending_p): Tweak comment.
3106
a196ebeb
WT
31072013-11-20 Walfred Tedeschi <walfred.tedeschi@intel.com>
3108
3109 * Makefile.in: Add i386-mpx.c, i386-mpx-linux.c, amd64-mpx.c,
3110 amd64-mpx-linux.c, x32-mpx.c and x32-mpx-linux.c generation.
3111 * configure.srv (srv_i386_regobj): Add i386-mpx.o.
3112 (srv_i386_linux_regobj): Add i386-mpx-linux.o.
3113 (srv_amd64_regobj): Add amd64-mpx.o.
3114 (srv_amd64_linux_regobj): Add amd64-mpx-linux.o.
3115 (srv_i386_32bit_xmlfiles): Add i386/32bit-mpx.xml.
3116 (srv_i386_64bit_xmlfiles): Add i386/64bit-mpx.xml.
3117 * i387-fp.c (num_pl_bnd_register) Added constant.
3118 (num_pl_bnd_cfg_registers) Added constant.
3119 (struct i387_xsave) Added reserved area and MPX fields.
3120 (i387_cache_to_xsave, i387_xsave_to_cache) Add MPX.
3121 * linux-x86-low.c (init_registers_i386_mpx_linux): Declare new
3122 function.
3123 (tdesc_i386_mpx_linux): Add MPX amd64 target.
3124 (init_registers_amd64_mpx_linux): Declare new function.
3125 (tdesc_amd64_mpx_linux): Add MPX amd64 target.
3126 (x86_64_regmap): Add MPX registers.
3127 (x86_linux_read_description): Add MPX case.
3128 (initialize_low_arch): Initialize MPX targets.
3129
0080a2f6
TT
31302013-11-18 Tom Tromey <tromey@redhat.com>
3131
3132 * configure: Rebuild.
3133 * configure.ac: Don't check for stdlib.h.
3134 * gdbreplay.c: Unconditionally include stdlib.h.
3135
2978b111
TT
31362013-11-18 Tom Tromey <tromey@redhat.com>
3137
3138 * config.in: Rebuild.
3139 * configure: Rebuild.
3140 * configure.ac: Don't use AC_HEADER_DIRENT.
3141
a3d08894
TT
31422013-11-18 Tom Tromey <tromey@redhat.com>
3143
3144 * server.h: Don't check HAVE_STRING_H.
3145 * gdbreplay.c: Don't check HAVE_STRING_H.
3146 * configure: Rebuild.
3147
0a5dd17d
TT
31482013-11-18 Tom Tromey <tromey@redhat.com>
3149
3150 * Makefile.in (gdbreplay$(EXEEXT)): Depend on and link against
3151 LIBGNU.
3152
1bd2f0ba
TT
31532013-11-08 Tom Tromey <tromey@redhat.com>
3154
3155 * configure, config.in: Rebuild.
3156 * configure.ac: Remove unused configury.
3157
3266f10b
TT
31582013-11-08 Tom Tromey <tromey@redhat.com>
3159
3160 * acinclude.m4: Include common.m4, codeset.m4.
3161 * configure, config.in: Rebuild.
3162 * configure.ac: Use GDB_AC_COMMON.
3163
6682d959
AA
31642013-11-06 Andreas Arnez <arnez@linux.vnet.ibm.com>
3165
3166 * linux-s390-low.c (HWCAP_S390_TE): New define.
3167 (s390_arch_setup): Consider the TE field in the HWCAP for
3168 determining 'have_regset_tdb'.
3169
fd0a4d76
SDJ
31702013-10-16 Sergio Durigan Junior <sergiodj@redhat.com>
3171
3172 PR gdb/16014
3173 * tracepoint.c (download_tracepoint_1): Remove unnecessary double
3174 call to sizeof.
3175
1a3d890b
PA
31762013-10-02 Pedro Alves <palves@redhat.com>
3177
3178 * server.c (process_serial_event): Don't output "GDBserver
3179 exiting" if GDB is connected through stdio.
3180 * target.c (mywait): Likewise, be silent if GDB is connected
3181 through stdio.
3182
97ad4581
JB
31832013-10-01 Joel Brobecker <brobecker@adacore.com>
3184
3185 * lynx-low.c (lynx_add_threads_after_attach): New function.
3186 (lynx_attach): Remove call to add_thread. Add call to
3187 lynx_add_threads_after_attach instead.
3188
5b4e221c
MF
31892013-09-28 Mike Frysinger <vapier@gentoo.org>
3190
3191 * configure.ac (AC_CHECK_HEADERS): Add sys/syscall.h
3192 * config.in, configure: Regenerated.
3193
ee47b2f8
YQ
31942013-09-18 Yao Qi <yao@codesourcery.com>
3195
3196 PR server/15959
3197 * server.c (start_inferior): Clear 'resume_info'.
3198
d6707650 31992013-09-16 Jiong Wang <jiwang@tilera.com>
0f63d4db 3200
d6707650
JW
3201 * linux-tile-low.c (tile_regsets): Modify the size field to 64-bit
3202 for each register.
3203
9243dd0e 32042013-09-16 Jiong Wang <jiwang@tilera.com>
0f63d4db 3205
9243dd0e
JW
3206 * configure.srv <tilegx*-*-linux*>: Remove linux-osdata.o from and add
3207 linux-tile-low.o to srv_tgtobj.
3208
c623a6ef
WN
32092013-09-16 Will Newton <will.newton@linaro.org>
3210
3211 * linux-aarch64-low.c (aarch64_linux_set_debug_regs): Zero
3212 out regs.
3213
fb71d39e
PA
32142013-09-06 Pedro Alves <palves@redhat.com>
3215
3216 * Makefile.in (gdb_proc_service_h, regdef_h, regcache_h)
3217 (signals_def, signals_h, ptid_h, ax_h, agent_h, linux_btrace_h)
3218 (linux_osdata_h, vec_h, gdb_vecs_h, host_defs_h, libiberty_h)
3219 (server_h, gdbthread_h, linux_low_h, linux_ptrace_h)
3220 (gdb_thread_db_h, linux_procfs_h, lynx_low_h, nto_low_h)
3221 (mips_linux_watch_h, i386_low_h, win32_low_h): Delete.
3222
8e7e9910
PA
32232013-09-06 Pedro Alves <palves@redhat.com>
3224
3225 * Makefile.in (linux-btrace.o, mips-linux-watch.o): Remove
3226 explicit header dependencies and use $COMPILE/$POSTCOMPILE.
3227
7c3a12ca
PA
32282013-09-06 Pedro Alves <palves@redhat.com>
3229
3230 * linux-amd64-ipa.c: Include tracepoint.h.
3231 * linux-i386-ipa.c: Include tracepoint.h.
3232
8eb3d7b6
RW
32332013-09-06 Ricard Wanderlof <ricardw@axis.com>
3234
3235 * linux-crisv32-low.c (PTRACE_GET_THREAD_AREA): New macro.
3236 (ps_get_thread_area): New function.
3237
eddddb9d
RW
32382013-09-06 Ricard Wanderlof <ricardw@axis.com>
3239
3240 * linux-crisv32-low.c (elf_gregset_t): Delete typedef.
3241 (initialize_low_arch): Call init_registers_crisv32 rather than
3242 init_register_crisv32.
3243
533b0600
PA
32442013-09-05 Pedro Alves <palves@redhat.com>
3245
3246 * server.h (handle_vFile, hostio_last_error_from_errno): Move
3247 to ...
3248 * hostio.h: ... this new file.
3249 * hostio.c, server.c, linux-low.c, nto-low.c, spu-low,
3250 win32-low.c: Include hostio.h.
3251
0ce3d3b5
PA
32522013-09-05 Pedro Alves <palves@redhat.com>
3253
3254 * server.h (gdb_client_data, handler_func, callback_handler_func)
3255 (delete_file_handler, add_file_handler, append_callback_event)
3256 (delete_callback_event, start_event_loop, initialize_event_loop):
3257 Move to event-loop.h and include it.
3258 * event-loop.h: New file.
3259
799cdc37
PA
32602013-09-05 Pedro Alves <palves@redhat.com>
3261
3262 * dll.c, inferiors.c, remote-utils.c, server.c: Include "dll.h".
3263 * server.h (struct dll_info, all_dlls, dlls_changed, clear_dlls)
3264 (loaded_dll, unloaded_dll): Move to ...
3265 * dll.h: ... this new file.
3266 * inferiors.c, remote-utils.c, win32-low.c: Include "dll.h".
3267
6a6bbd9d
PA
32682013-09-05 Pedro Alves <palves@redhat.com>
3269
3270 * server.h (current_process, get_thread_process, all_processes)
3271 (add_inferior_to_list, for_each_inferior, current_inferior)
3272 (remove_inferior, add_process, remove_process, find_process_pid)
3273 (have_started_inferiors_p, have_attached_inferiors_p)
3274 (thread_id_to_gdb_id, thread_to_gdb_id, gdb_id_to_thread_id)
3275 (clear_inferiors, find_inferior, find_inferior_id)
3276 (inferior_target_data, set_inferior_target_data)
3277 (inferior_regcache_data, set_inferior_regcache_data): Move to
3278 inferiors.h, and include it.
3279 * inferiors.h: New file.
3280
f699aaba
PA
32812013-09-05 Pedro Alves <palves@redhat.com>
3282
3283 * server.h (struct emit_ops, current_insn_ptr, emit_error):
3284 Move ...
72f4393d 3285 * ax.h: ... here.
f699aaba 3286
c144c7a0
PA
32872013-09-05 Pedro Alves <palves@redhat.com>
3288
3289 * ax.c, linux-low.c, linux-x86-low.c, server.c: Include
3290 tracepoint.h.
3291 * server.h (IPA_BUFSIZ, initialize_tracepoint, tracing)
3292 (disconnected_tracing, tracepoint_look_up_symbols, stop_tracing
3293 (handle_tracepoint_general_set, handle_tracepoint_query)
3294 (tracepoint_finished_step, tracepoint_was_hit)
3295 (release_while_stepping_state_list, current_traceframe)
3296 (in_readonly_region, traceframe_read_mem)
3297 (fetch_traceframe_registers, traceframe_read_sdata)
3298 (traceframe_read_info, struct fast_tpoint_collect_status)
3299 (fast_tracepoint_collecting, force_unlock_trace_buffer)
3300 (handle_tracepoit_bkpts, initialize_low_tracepoint)
3301 (supply_fast_tracepoint_registers)
3302 (supply_static_tracepoint_registers, set_trampoline_buffer_space)
3303 (ipa_tdesc, claim_trampoline_space)
3304 (have_fast_tracepoint_trampoline_buffer, gdb_agent_about_to_close)
3305 (agent_mem_read, agent_get_trace_state_variable_value)
3306 (agent_set_trace_state_variable_value, agent_tsv_read)
3307 (agent_mem_read_string, get_raw_reg_func_addr)
3308 (get_get_tsv_func_addr, get_set_tsv_func_addr): Move to ...
3309 * tracepoint.h: ... this new file.
3310
ff42e6ab
PA
33112013-09-05 Pedro Alves <palves@redhat.com>
3312
3313 * server.h (perror_with_name, error, fatal, warning, paddress)
3314 (pulongest, plongest, phex_nz, pfildes): Move to utils.h, and
3315 include it.
3316 * utils.h: New file.
3317
541af0f4
PA
33182013-09-05 Pedro Alves <palves@redhat.com>
3319
3320 * server.h (remote_debug, noack_mode, transport_is_reliable)
3321 (gdb_connected, STDIO_CONNECTION_NAME, remote_connection_is_stdio)
3322 (read_ptid, write_ptid, putpkt, putpkt_binary, putpkt_notif)
3323 (getpkt, remote_prepare, remote_open, remote_close, write_ok)
3324 (write_enn, initialize_async_io, enable_async_io)
3325 (disable_async_io, check_remote_input_interrupt_request)
3326 (convert_ascii_to_int, convert_int_to_ascii, new_thread_notify)
3327 (dead_thread_notify, prepare_resume_reply)
3328 (decode_address_to_semicolon, decode_address, decode_m_packet)
3329 (decode_M_packet, decode_X_packet, decode_xfer_write)
3330 (decode_search_memory_packet, unhexify, hexify)
3331 (remote_escape_output, unpack_varlen_hex, clear_symbol_cache)
3332 (look_up_one_symbol, relocate_instruction)
3333 (monitor_output): Move to remote-utils.h, and include it.
3334 * remote-utils.h: New file.
3335
eebdf26b
PA
33362013-09-05 Pedro Alves <palves@redhat.com>
3337
3338 * server.h (_): Delete.
3339
3aafd2ff
PA
33402013-09-02 Pedro Alves <palves@redhat.com>
3341
3342 * tracepoint.c (TRACEFRAME_EOB_MARKER_SIZE): New macro.
3343 (init_trace_buffer): Ensure at least TRACEFRAME_EOB_MARKER_SIZE is
3344 allocated.
3345 (trace_buffer_alloc): Use TRACEFRAME_EOB_MARKER_SIZE.
3346
cee83bcb
PM
33472013-09-02 Pierre Muller <muller@sourceware.org>
3348
3349 * win32-low.c (child_xfer_memory): Check if ReadProcessMemory
3350 or WriteProcessMemory complete successfully and handle
3351 ERROR_PARTIAL_COPY error.
3352
9a13b2fa
PA
33532013-09-02 Pedro Alves <palves@redhat.com>
3354
3355 * server.c (gdb_read_memory): Return -1 on traceframe memory read
3356 error instead of EIO.
3357
602e3198
JK
33582013-08-28 Jan Kratochvil <jan.kratochvil@redhat.com>
3359
3360 PR server/15604
3361 * linux-low.c: Include filestuff.h.
3362 (linux_create_inferior) <pid == 0>: Call close_most_fds.
3363 * lynx-low.c: Include filestuff.h.
3364 (lynx_create_inferior) <pid == 0>: Call close_most_fds.
3365 * server.c: Include filestuff.h.
3366 (main): Call notice_open_fds.
3367 * spu-low.c: Include filestuff.h.
3368 (spu_create_inferior) <pid == 0>: Call close_most_fds.
3369
96d7229d
LM
33702013-08-22 Luis Machado <lgustavo@codesourcery.com>
3371
3372 * Makefile.in: Explain why ../target and ../nat are not
3373 listed as include file search paths.
3374 (linux-waitpid.o): New object file rule.
3375 * configure.srv (srv_native_linux_obj): New variable.
3376 Replace all occurrences of linux native object files with
3377 $srv_native_linux_obj.
3378 * linux-low.c: Include nat/linux-nat.h and nat/linux-waitpid.h.
3379 (HAS_NOMMU): Move defining logic to common/linux-ptrace.c.
3380 (linux_enable_event_reporting): Remove declaration.
3381 (my_waitpid): Moved to common/linux-waitpid.c.
3382 (linux_wait_for_event): Pass ptid when calling
3383 linux_enable_event_reporting.
3384 (linux_supports_tracefork_flag): Remove.
3385 (linux_enable_event_reporting): Likewise.
3386 (linux_tracefork_grandchild): Remove.
3387 (STACK_SIZE): Moved to common/linux-ptrace.c.
3388 (linux_tracefork_child): Remove.
3389 (linux_test_for_tracefork): Remove.
3390 (linux_look_up_symbols): Call linux_supports_traceclone.
3391 (initialize_low): Remove call to linux_test_for_tracefork.
3392 * linux-low.h (PTRACE_TYPE_ARG3): Move to
3393 common/linux-ptrace.h.
3394 (PTRACE_TYPE_ARG4): Likewise.
3395 Include linux-ptrace.h.
3396
32940073
PA
33972013-08-21 Pedro Alves <palves@redhat.com>
3398
3399 * config.in: Renegerate.
3400
33b60d58 34012013-08-19 Luis Machado <lgustavo@codesourcery.com>
a261b8f5 3402
33b60d58
LM
3403 * Makefile.in (INCLUDE_CFLAGS): Include -I$(srcdir)/../.
3404 (SFILES): Remove $(srcdir)/common/target-common.c and
3405 add $(srcdir)/target/waitstatus.c.
3406 (OBS): Remove target-common.o and add waitstatus.o.
3407 (server_h): Remove $(srcdir)/../common/target-common.h and
3408 add $(srcdir)/../target/resume.h, $(srcdir)/../target/wait.h
3409 and $(srcdir)/../target/waitstatus.h.
3410 (target-common.o): Remove.
3411 (waitstatus.o): New target object file.
3412 * target.h: Do not include target-common.h and
3413 include target/resume.h, target/wait.h and
3414 target/waitstatus.h.
3415
b8e1b30e
LM
34162013-08-13 Luis Machado <lgustavo@codesourcery.com>
3417
3418 * linux-arm-low.c: Rename all occurrences of PTRACE_ARG3_TYPE
3419 to PTRACE_TYPE_ARG3.
3420 * linux-low.c: Rename all occurrences of PTRACE_ARG3_TYPE
3421 to PTRACE_TYPE_ARG3 and PTRACE_ARG4_TYPE to
3422 PTRACE_TYPE_ARG4.
3423 * linux-low.h (PTRACE_ARG3_TYPE): Rename to PTRACE_TYPE_ARG3.
3424 (PTRACE_ARG4_TYPE): Rename to PTRACE_TYPE_ARG4.
3425
7a60ad40
YQ
34262013-07-27 Jie Zhang <jie@codesourcery.com>
3427 Daniel Jacobowitz <dan@codesourcery.com>
3428 Yao Qi <yao@codesourcery.com>
3429
3430 * Makefile.in (SFILES): Add common/mips-linux-watch.c.
3431 (mips-linux-watch.o): New rule.
3432 (mips_linux_watch_h): New variable.
3433 * configure.srv <mips*-*-linux*>: Add mips-linux-watch.o to
3434 srv_tgtobj.
3435 * linux-mips-low.c: Include mips-linux-watch.h.
3436 (struct arch_process_info, struct arch_lwp_info): New.
3437 (update_watch_registers_callback): New function.
3438 (mips_linux_new_process, mips_linux_new_thread) New functions.
3439 (mips_linux_prepare_to_resume, mips_insert_point): New
3440 functions.
3441 (mips_remove_point, mips_stopped_by_watchpoint): New
3442 functions.
3443 (rsp_bp_type_to_target_hw_bp_type): New function.
3444 (mips_stopped_data_address): New function.
3445 (the_low_target): Add watchpoint support functions.
3446
de6f69ad
YQ
34472013-07-27 Yao Qi <yao@codesourcery.com>
3448
3449 * i386-low.c: Include break-common.h.
3450 (enum target_hw_bp_type): Remove.
3451
3360c0bf
LM
34522013-07-24 Luis Machado <lgustavo@codesourcery.com>
3453
3454 * Makefile.in (SFILES): /common/target-common.c.
3455 (OBS): Add target-common.o.
3456 (server_h): Add $(srcdir)/../common/target-common.h.
3457 (target-common.o): New target.
3458 * server.c (queue_stop_reply_callback): Free
3459 status string after use.
3460 * target.c (target_waitstatus_to_string): Remove.
3461 * target.h: Include target-common.h.
3462 (resume_kind): Likewise.
3463 (target_waitkind): Likewise.
3464 (target_waitstatus): Likewise.
3465 (TARGET_WNOHANG): Likewise.
3466
bd885420
YQ
34672013-07-04 Yao Qi <yao@codesourcery.com>
3468
3469 * Makefile.in (host_alias): Use @host_noncanonical@.
3470 (target_alias): Use @target_noncanonical@.
3471 * configure.ac: Use ACX_NONCANONICAL_TARGET and
3472 ACX_NONCANONICAL_HOST.
3473 * configure: Regenerated.
3474
3475 Revert:
3476 2013-06-28 Mircea Gherzan <mircea.gherzan@intel.com>
3477
3478 * configure.ac (version_host, version_target): Set and AC_SUBST them.
3479 * configure: Rebuild.
3480 * Makefile.in (version_host, version_target): Get from configure.
3481 (version.c): Use $(version_host) and $(version_target).
3482
17ef446e
PA
34832013-07-03 Pedro Alves <palves@redhat.com>
3484
3485 * Makefile.in (config.status): Depend on development.sh.
3486 * acinclude.m4: Include libmcheck.m4.
3487 * configure: Regenerate.
3488
7a9a7487
MG
34892013-07-02 Mircea Gherzan <mircea.gherzan@intel.com>
3490
3491 * win32-low.c (winapi_DebugActiveProcessStop): Move the WINAPI
3492 attribute inside the parentheses.
3493 (winapi_DebugSetProcessKillOnExit): Ditto.
3494 (winapi_DebugBreakProcess): Ditto.
3495 (winapi_GenerateConsoleCtrlEvent): Ditto.
a261b8f5 3496
49b64de6
MG
34972013-07-02 Mircea Gherzan <mircea.gherzan@intel.com>
3498
3499 * notif.h (notif_event): Add a dummy member to avoid compiler
3500 errors.
3501
d5749ee7
PA
35022013-07-01 Pedro Alves <palves@redhat.com>
3503
3504 * hostio.c (HOSTIO_PATH_MAX): Define.
3505 (require_filename, handle_open, handle_unlink, handle_readlink):
3506 Use it.
3507
d8d2a3ee
PA
35082013-07-01 Pedro Alves <palves@redhat.com>
3509
3510 * server.h: Include "pathmax.h".
3511 * linux-low.c: Don't include sys/param.h.
3512 (linux_pid_exe_is_elf_64_file): Use PATH_MAX instead of
3513 MAXPATHLEN.
3514 * win32-low.c: Don't include sys/param.h.
3515 (win32_create_inferior): Use PATH_MAX instead of MAXPATHLEN.
3516
bc7dea8d
PA
35172013-07-01 Pedro Alves <palves@redhat.com>
3518
3519 * event-loop.c: Don't check HAVE_UNISTD_H before including
3520 <unistd.h>.
3521 * gdbreplay.c: Likewise.
3522 * remote-utils.c: Likewise.
3523 * server.c: Likewise.
3524 * configure.ac: Don't check for unistd.h.
3525 * configure: Regenerate.
3526
d6c2da54
TT
35272013-06-28 Tom Tromey <tromey@redhat.com>
3528
3529 * Makefile.in (version.c): Use version.in, not
3530 common/version.in.
3531
257b6bec
MG
35322013-06-28 Mircea Gherzan <mircea.gherzan@intel.com>
3533
3534 * configure.ac (version_host, version_target): Set and AC_SUBST them.
3535 * configure: Rebuild.
3536 * Makefile.in (version_host, version_target): Get from configure.
3537 (version.c): Use $(version_host) and $(version_target).
3538
86ebe149
DK
35392013-06-10 Dmitry Kozlov <ddk@codesourcery.com>
3540
3541 Fix trace-status to output user name without trailing colon.
3542 * tracepoint.c (cmd_qtstatus): Remove unnecessary colon from user name.
3543
f30aa5af
DK
35442013-06-10 Dmitry Kozlov <ddk@codesourcery.com>
3545
3546 Fix trace-status to output proper start-time and stop-time.
3547 * tracepoint.c (cmd_qtstatus): Modify trace-status output to
3548 output start time and stop time in hex as gdb expects.
3549
28a93511
YQ
35502013-06-26 Pedro Alves <pedro@codesourcery.com>
3551
3552 * tracepoint.c (build_traceframe_info_xml): Output trace state
3553 variables present in the trace buffer.
3554
01208463
TT
35552013-06-24 Tom Tromey <tromey@redhat.com>
3556
3557 * Makefile.in (version.c): Use bfd/version.h, common/version.in,
3558 create-version.sh.
3559 (version.o): Remove.
3560 * gdbreplay.c: Include version.h.
3561 (version, host_name): Don't declare.
3562 * server.h: Include version.h.
3563 (version, host_name): Don't declare.
3564
760256f9
PA
35652013-06-12 Pedro Alves <palves@redhat.com>
3566
3567 * linux-x86-low.c (linux_is_elf64): Delete global.
3568 (x86_siginfo_fixup): Replace reference to `linux_is_elf64' global
3569 with local linux_pid_exe_is_elf_64_file use.
3570
030031ee
PA
35712013-06-11 Pedro Alves <palves@redhat.com>
3572
3573 * linux-low.c (regset_disabled, disable_regset): New functions.
3574 (regsets_fetch_inferior_registers)
3575 (regsets_store_inferior_registers): Use them.
3576 (initialize_regsets_info); Don't allocate the disabled_regsets
3577 array here.
3578 * linux-low.h (struct regsets_info) <disabled_regsets>: Extend
3579 comment.
3580
5da6eb0a
PA
35812013-06-11 Pedro Alves <palves@redhat.com>
3582
3583 * linux-low.c (initialize_regsets_info): Use xcalloc instead of
3584 xmalloc.
3585
7e5aaa09
PA
35862013-06-11 Pedro Alves <palves@redhat.com>
3587
3588 * linux-x86-low.c (initialize_low_arch): Call
3589 init_registers_x32_avx_linux.
3590
d878444c
JK
35912013-06-09 Jan Kratochvil <jan.kratochvil@redhat.com>
3592
3593 Fix compatibility with Android Bionic.
3594 * linux-low.c (linux_qxfer_libraries_svr4): Ignore first entry even if
3595 it is not empty.
3596
3aee8918
PA
35972013-06-07 Pedro Alves <palves@redhat.com>
3598
5f2b57b5 3599 PR server/14823
3aee8918
PA
3600 * Makefile.in (OBS): Add tdesc.o.
3601 (IPA_OBJS): Add tdesc-ipa.o.
3602 (tdesc-ipa.o): New rule.
3603 * ax.c (gdb_eval_agent_expr): Adjust register_size call to new
3604 interface.
3605 * linux-low.c (new_inferior): Delete.
3606 (disabled_regsets, num_regsets): Delete.
3607 (linux_add_process): Adjust to set the new per-process
3608 new_inferior flag.
3609 (linux_detach_one_lwp): Adjust to call regcache_invalidate_thread.
3610 (linux_wait_for_lwp): Adjust. Only call arch_setup if the event
3611 was a stop. When calling arch_setup, switch the current inferior
3612 to the thread that got an event.
3613 (linux_resume_one_lwp): Adjust to call regcache_invalidate_thread.
3614 (regsets_fetch_inferior_registers)
3615 (regsets_store_inferior_registers): New regsets_info parameter.
3616 Adjust to use it.
3617 (linux_register_in_regsets): New regs_info parameter. Adjust to
3618 use it.
3619 (register_addr, fetch_register, store_register): New usrregs_info
3620 parameter. Adjust to use it.
3621 (usr_fetch_inferior_registers, usr_store_inferior_registers): New
3622 parameter regs_info. Adjust to use it.
3623 (linux_fetch_registers): Get the current inferior's regs_info, and
3624 adjust to use it.
3625 (linux_store_registers): Ditto.
3626 [HAVE_LINUX_REGSETS] (initialize_regsets_info): New.
3627 (initialize_low): Don't initialize the target_regsets here. Call
3628 initialize_low_arch.
3629 * linux-low.h (target_regsets): Delete declaration.
3630 (struct regsets_info): New.
3631 (struct usrregs_info): New.
3632 (struct regs_info): New.
3633 (struct process_info_private) <new_inferior>: New field.
3634 (struct linux_target_ops): Delete the num_regs, regmap, and
3635 regset_bitmap fields. New field regs_info.
3636 [HAVE_LINUX_REGSETS] (initialize_regsets_info): Declare.
3637 * i387-fp.c (num_xmm_registers): Delete.
3638 (i387_cache_to_fsave, i387_fsave_to_cache): Adjust find_regno
3639 calls to new interface.
3640 (i387_cache_to_fxsave, i387_cache_to_xsave, i387_fxsave_to_cache)
3641 (i387_xsave_to_cache): Adjust find_regno calls to new interface.
3642 Infer the number of xmm registers from the regcache's target
3643 description.
3644 * i387-fp.h (num_xmm_registers): Delete.
3645 * inferiors.c (add_thread): Don't install the thread's regcache
3646 here.
3647 * proc-service.c (gregset_info): Fetch the current inferior's
3648 regs_info. Adjust to use it.
3649 * regcache.c: Include tdesc.h.
3650 (register_bytes, reg_defs, num_registers)
3651 (gdbserver_expedite_regs): Delete.
3652 (get_thread_regcache): If the thread doesn't have a regcache yet,
3653 create one, instead of aborting gdbserver.
3654 (regcache_invalidate_one): Rename to ...
3655 (regcache_invalidate_thread): ... this.
3656 (regcache_invalidate_one): New.
3657 (regcache_invalidate): Only invalidate registers of the current
3658 process.
3659 (init_register_cache): Add target_desc parameter, and use it.
3660 (new_register_cache): Ditto. Assert the target description has a
3661 non zero registers_size.
3662 (regcache_cpy): Add assertions. Adjust.
3663 (realloc_register_cache, set_register_cache): Delete.
3664 (registers_to_string, registers_from_string): Adjust.
3665 (find_register_by_name, find_regno, find_register_by_number)
3666 (register_cache_size): Add target_desc parameter, and use it.
3667 (free_register_cache_thread, free_register_cache_thread_one)
3668 (regcache_release, register_cache_size): New.
3669 (register_size): Add target_desc parameter, and use it.
3670 (register_data, supply_register, supply_register_zeroed)
3671 (supply_regblock, supply_register_by_name, collect_register)
3672 (collect_register_as_string, collect_register_by_name): Adjust.
3673 * regcache.h (struct target_desc): Forward declare.
3674 (struct regcache) <tdesc>: New field.
3675 (init_register_cache, new_register_cache): Add target_desc
3676 parameter.
3677 (regcache_invalidate_thread): Declare.
3678 (regcache_invalidate_one): Delete declaration.
3679 (regcache_release): Declare.
3680 (find_register_by_number, register_cache_size, register_size)
3681 (find_regno): Add target_desc parameter.
3682 (gdbserver_expedite_regs, gdbserver_xmltarget): Delete
3683 declarations.
3684 * remote-utils.c: Include tdesc.h.
3685 (outreg, prepare_resume_reply): Adjust.
3686 * server.c: Include tdesc.h.
3687 (gdbserver_xmltarget): Delete declaration.
3688 (get_features_xml, process_serial_event): Adjust.
3689 * server.h [IN_PROCESS_AGENT] (struct target_desc): Forward
3690 declare.
3691 (struct process_info) <tdesc>: New field.
3692 (ipa_tdesc): Declare.
3693 * tdesc.c: New file.
3694 * tdesc.h: New file.
3695 * tracepoint.c: Include tdesc.h.
3696 [IN_PROCESS_AGENT] (ipa_tdesc): Define.
3697 (get_context_regcache): Adjust to pass ipa_tdesc down.
3698 (do_action_at_tracepoint): Adjust to get the register cache size
3699 from the context regcache's description.
3700 (traceframe_walk_blocks): Adjust to get the register cache size
3701 from the current trace frame's description.
3702 (traceframe_get_pc): Adjust to get current trace frame's
3703 description and pass it down.
3704 (gdb_collect): Adjust to get the register cache size from the
3705 IPA's description.
3706 * linux-amd64-ipa.c (tdesc_amd64_linux): Declare.
3707 (gdbserver_xmltarget): Delete.
3708 (initialize_low_tracepoint): Set the ipa's target description.
3709 * linux-i386-ipa.c (tdesc_i386_linux): Declare.
3710 (initialize_low_tracepoint): Set the ipa's target description.
3711 * linux-x86-low.c: Include tdesc.h.
3712 [__x86_64__] (is_64bit_tdesc): New.
3713 (ps_get_thread_area, x86_get_thread_area): Use it.
3714 (i386_cannot_store_register): Rename to ...
3715 (x86_cannot_store_register): ... this. Use is_64bit_tdesc.
3716 (i386_cannot_fetch_register): Rename to ...
3717 (x86_cannot_fetch_register): ... this. Use is_64bit_tdesc.
3718 (x86_fill_gregset, x86_store_gregset): Adjust register_size calls
3719 to new interface.
3720 (target_regsets): Rename to ...
3721 (x86_regsets): ... this.
3722 (x86_get_pc, x86_set_pc): Adjust register_size calls to new
3723 interface.
3724 (x86_siginfo_fixup): Use is_64bit_tdesc.
3725 [__x86_64__] (tdesc_amd64_linux, tdesc_amd64_avx_linux)
3726 (tdesc_x32_avx_linux, tdesc_x32_linux)
3727 (tdesc_i386_linux, tdesc_i386_mmx_linux, tdesc_i386_avx_linux):
3728 Declare.
3729 (x86_linux_update_xmltarget): Delete.
3730 (I386_LINUX_XSAVE_XCR0_OFFSET): Define.
3731 (have_ptrace_getfpxregs, have_ptrace_getregset): New.
3732 (AMD64_LINUX_USER64_CS): New.
3733 (x86_linux_read_description): New, based on
3734 x86_linux_update_xmltarget.
3735 (same_process_callback): New.
3736 (x86_arch_setup_process_callback): New.
3737 (x86_linux_update_xmltarget): New.
3738 (x86_regsets_info): New.
3739 (amd64_linux_regs_info): New.
3740 (i386_linux_usrregs_info): New.
3741 (i386_linux_regs_info): New.
3742 (x86_linux_regs_info): New.
3743 (x86_arch_setup): Reimplement.
3744 (x86_install_fast_tracepoint_jump_pad): Use is_64bit_tdesc.
3745 (x86_emit_ops): Ditto.
3746 (the_low_target): Adjust. Install x86_linux_regs_info,
3747 x86_cannot_fetch_register, and x86_cannot_store_register.
3748 (initialize_low_arch): New.
3749 * linux-ia64-low.c (tdesc_ia64): Declare.
3750 (ia64_fetch_register): Adjust.
3751 (ia64_usrregs_info, regs_info): New globals.
3752 (ia64_regs_info): New function.
3753 (the_low_target): Adjust.
3754 (initialize_low_arch): New function.
3755 * linux-sparc-low.c (tdesc_sparc64): Declare.
3756 (sparc_fill_gregset_to_stack, sparc_store_gregset_from_stack):
3757 Adjust.
3758 (sparc_arch_setup): New function.
3759 (sparc_regsets_info, sparc_usrregs_info, regs_info): New globals.
3760 (the_low_target): Adjust.
3761 (initialize_low_arch): New function.
3762 * linux-ppc-low.c (tdesc_powerpc_32l, tdesc_powerpc_altivec32l)
3763 (tdesc_powerpc_cell32l, tdesc_powerpc_vsx32l)
3764 (tdesc_powerpc_isa205_32l, tdesc_powerpc_isa205_altivec32l)
3765 (tdesc_powerpc_isa205_vsx32l, tdesc_powerpc_e500l)
3766 (tdesc_powerpc_64l, tdesc_powerpc_altivec64l)
3767 (tdesc_powerpc_cell64l, tdesc_powerpc_vsx64l)
3768 (tdesc_powerpc_isa205_64l, tdesc_powerpc_isa205_altivec64l)
3769 (tdesc_powerpc_isa205_vsx64l): Declare.
3770 (ppc_cannot_store_register, ppc_collect_ptrace_register)
3771 (ppc_supply_ptrace_register, parse_spufs_run, ppc_get_pc)
3772 (ppc_set_pc, ppc_get_hwcap): Adjust.
3773 (ppc_usrregs_info): Forward declare.
3774 (!__powerpc64__) ppc_regmap_adjusted: New global.
3775 (ppc_arch_setup): Adjust to the current process'es target
3776 description.
3777 (ppc_fill_vsxregset, ppc_store_vsxregset, ppc_fill_vrregset)
3778 (ppc_store_vrregset, ppc_fill_evrregset, ppc_store_evrregse)
3779 (ppc_store_evrregset): Adjust.
3780 (target_regsets): Rename to ...
3781 (ppc_regsets): ... this, and make static.
3782 (ppc_usrregs_info, ppc_regsets_info, regs_info): New globals.
3783 (ppc_regs_info): New function.
3784 (the_low_target): Adjust.
3785 (initialize_low_arch): New function.
3786 * linux-s390-low.c (tdesc_s390_linux32, tdesc_s390_linux32v1)
3787 (tdesc_s390_linux32v2, tdesc_s390_linux64, tdesc_s390_linux64v1)
3788 (tdesc_s390_linux64v2, tdesc_s390x_linux64, tdesc_s390x_linux64v1)
3789 (tdesc_s390x_linux64v2): Declare.
3790 (s390_collect_ptrace_register, s390_supply_ptrace_register)
3791 (s390_fill_gregset, s390_store_last_break): Adjust.
3792 (target_regsets): Rename to ...
3793 (s390_regsets): ... this, and make static.
3794 (s390_get_pc, s390_set_pc): Adjust.
3795 (s390_get_hwcap): New target_desc parameter, and use it.
3796 [__s390x__] (have_hwcap_s390_high_gprs): New global.
3797 (s390_arch_setup): Adjust to set the current process'es target
3798 description. Don't adjust the regmap.
3799 (s390_usrregs_info, s390_regsets_info, regs_info): New globals.
3800 [__s390x__] (s390_usrregs_info_3264, s390_regsets_info_3264)
3801 (regs_info_3264): New globals.
3802 (s390_regs_info): New function.
3803 (the_low_target): Adjust.
3804 (initialize_low_arch): New function.
3805 * linux-mips-low.c (tdesc_mips_linux, tdesc_mips_dsp_linux)
3806 (tdesc_mips64_linux, tdesc_mips64_dsp_linux): Declare.
3807 [__mips64] (init_registers_mips_linux)
3808 (init_registers_mips_dsp_linux): Delete defines.
3809 [__mips64] (tdesc_mips_linux, tdesc_mips_dsp_linux): New defines.
3810 (have_dsp): New global.
3811 (mips_read_description): New, based on mips_arch_setup.
3812 (mips_arch_setup): Reimplement.
3813 (get_usrregs_info): New function.
3814 (mips_cannot_fetch_register, mips_cannot_store_register)
3815 (mips_get_pc, mips_set_pc, mips_fill_gregset, mips_store_gregset)
3816 (mips_fill_fpregset, mips_store_fpregset): Adjust.
3817 (target_regsets): Rename to ...
3818 (mips_regsets): ... this, and make static.
3819 (mips_regsets_info, mips_dsp_usrregs_info, mips_usrregs_info)
3820 (dsp_regs_info, regs_info): New globals.
3821 (mips_regs_info): New function.
3822 (the_low_target): Adjust.
3823 (initialize_low_arch): New function.
3824 * linux-arm-low.c (tdesc_arm, tdesc_arm_with_iwmmxt)
3825 (tdesc_arm_with_vfpv2, tdesc_arm_with_vfpv3, tdesc_arm_with_neon):
3826 Declare.
3827 (arm_fill_vfpregset, arm_store_vfpregset): Adjust.
3828 (arm_read_description): New, with bits factored from
3829 arm_arch_setup.
3830 (arm_arch_setup): Reimplement.
3831 (target_regsets): Rename to ...
3832 (arm_regsets): ... this, and make static.
3833 (arm_regsets_info, arm_usrregs_info, regs_info): New globals.
3834 (arm_regs_info): New function.
3835 (the_low_target): Adjust.
3836 (initialize_low_arch): New function.
3837 * linux-m68k-low.c (tdesc_m68k): Declare.
3838 (target_regsets): Rename to ...
3839 (m68k_regsets): ... this, and make static.
3840 (m68k_regsets_info, m68k_usrregs_info, regs_info): New globals.
3841 (m68k_regs_info): New function.
3842 (m68k_arch_setup): New function.
3843 (the_low_target): Adjust.
3844 (initialize_low_arch): New function.
3845 * linux-sh-low.c (tdesc_sharch): Declare.
3846 (target_regsets): Rename to ...
3847 (sh_regsets): ... this, and make static.
3848 (sh_regsets_info, sh_usrregs_info, regs_info): New globals.
3849 (sh_regs_info, sh_arch_setup): New functions.
3850 (the_low_target): Adjust.
3851 (initialize_low_arch): New function.
3852 * linux-bfin-low.c (tdesc_bfin): Declare.
3853 (bfin_arch_setup): New function.
3854 (bfin_usrregs_info, regs_info): New globals.
3855 (bfin_regs_info): New function.
3856 (the_low_target): Adjust.
3857 (initialize_low_arch): New function.
3858 * linux-cris-low.c (tdesc_cris): Declare.
3859 (cris_arch_setup): New function.
3860 (cris_usrregs_info, regs_info): New globals.
3861 (cris_regs_info): New function.
3862 (the_low_target): Adjust.
3863 (initialize_low_arch): New function.
3864 * linux-cris-low.c (tdesc_crisv32): Declare.
3865 (cris_arch_setup): New function.
3866 (cris_regsets_info, cris_usrregs_info, regs_info): New globals.
3867 (cris_regs_info): New function.
3868 (the_low_target): Adjust.
3869 (initialize_low_arch): New function.
3870 * linux-m32r-low.c (tdesc_m32r): Declare.
3871 (m32r_arch_setup): New function.
3872 (m32r_usrregs_info, regs_info): New globals.
3873 (m32r_regs_info): Adjust.
3874 (initialize_low_arch): New function.
3875 * linux-tic6x-low.c (tdesc_tic6x_c64xp_linux)
3876 (tdesc_tic6x_c64x_linux, tdesc_tic6x_c62x_linux): Declare.
3877 (tic6x_usrregs_info): Forward declare.
3878 (tic6x_read_description): New function, based on ...
3879 (tic6x_arch_setup): ... this. Reimplement.
3880 (target_regsets): Rename to ...
3881 (tic6x_regsets): ... this, and make static.
3882 (tic6x_regsets_info, tic6x_usrregs_info, regs_info): New globals.
3883 (tic6x_regs_info): New function.
3884 (the_low_target): Adjust.
3885 (initialize_low_arch): New function.
3886 * linux-xtensa-low.c (tdesc_xtensa): Declare.
3887 (xtensa_fill_gregset, xtensa_store_gregset): Adjust.
3888 (target_regsets): Rename to ...
3889 (xtensa_regsets): ... this, and make static.
3890 (xtensa_regsets_info, xtensa_usrregs_info, regs_info): New
3891 globals.
3892 (xtensa_arch_setup, xtensa_regs_info): New functions.
3893 (the_low_target): Adjust.
3894 (initialize_low_arch): New function.
3895 * linux-nios2-low.c (tdesc_nios2_linux): Declare.
3896 (nios2_arch_setup): Set the current process'es tdesc.
3897 (target_regsets): Rename to ...
3898 (nios2_regsets): ... this.
3899 (nios2_regsets_info, nios2_usrregs_info, regs_info): New globals.
3900 (nios2_regs_info): New function.
3901 (the_low_target): Adjust.
3902 (initialize_low_arch): New function.
a261b8f5
PA
3903 * linux-aarch64-low.c (tdesc_aarch64): Declare.
3904 (aarch64_arch_setup): Set the current process'es tdesc.
3905 (target_regsets): Rename to ...
3906 (aarch64_regsets): ... this.
3907 (aarch64_regsets_info, aarch64_usrregs_info, regs_info): New globals.
3908 (aarch64_regs_info): New function.
3909 (the_low_target): Adjust.
3910 (initialize_low_arch): New function.
3aee8918
PA
3911 * linux-tile-low.c (tdesc_tilegx, tdesc_tilegx32): Declare
3912 globals.
3913 (target_regsets): Rename to ...
3914 (tile_regsets): ... this.
3915 (tile_regsets_info, tile_usrregs_info, regs_info): New globals.
3916 (tile_regs_info): New function.
3917 (tile_arch_setup): Set the current process'es tdesc.
3918 (the_low_target): Adjust.
3919 (initialize_low_arch): New function.
3920 * spu-low.c (tdesc_spu): Declare.
3921 (spu_create_inferior, spu_attach): Set the new process'es tdesc.
3922 * win32-arm-low.c (tdesc_arm): Declare.
3923 (arm_arch_setup): New function.
3924 (the_low_target): Install arm_arch_setup instead of
3925 init_registers_arm.
3926 * win32-i386-low.c (tdesc_i386, tdesc_amd64): Declare.
3927 (init_windows_x86): Rename to ...
3928 (i386_arch_setup): ... this. Set `win32_tdesc'.
3929 (the_low_target): Adjust.
3930 * win32-low.c (win32_tdesc): New global.
3931 (child_add_thread): Don't create the thread cache here.
3932 (do_initial_child_stuff): Set the new process'es tdesc.
3933 * win32-low.h (struct target_desc): Forward declare.
3934 (win32_tdesc): Declare.
3935 * lynx-i386-low.c (tdesc_i386): Declare global.
3936 (lynx_i386_arch_setup): Set `lynx_tdesc'.
3937 * lynx-low.c (lynx_tdesc): New global.
3938 (lynx_add_process): Set the new process'es tdesc.
3939 * lynx-low.h (struct target_desc): Forward declare.
3940 (lynx_tdesc): Declare global.
3941 * lynx-ppc-low.c (tdesc_powerpc_32): Declare global.
3942 (lynx_ppc_arch_setup): Set `lynx_tdesc'.
3943 * nto-low.c (nto_tdesc): New global.
3944 (do_attach): Set the new process'es tdesc.
3945 * nto-low.h (struct target_desc): Forward declare.
3946 (nto_tdesc): Declare.
3947 * nto-x86-low.c (tdesc_i386): Declare.
3948 (nto_x86_arch_setup): Set `nto_tdesc'.
3949
b1fbec62
GB
39502013-06-04 Gary Benson <gbenson@redhat.com>
3951
3952 * server.c (handle_query): Add "augmented-libraries-svr4-read+"
3953 to qSupported response when appropriate.
3954 (handle_qxfer_libraries_svr4): Allow qXfer:libraries-svr4:read
3955 with nonzero-length annex.
3956 * linux-low.c (linux_qxfer_libraries_svr4): Parse and handle
3957 arguments supplied in annex.
3958
d1ec4ce7
DE
39592013-05-31 Doug Evans <dje@google.com>
3960
ac44adcb 3961 PR server/15594
d1ec4ce7
DE
3962 * linux-x86-low.c (ps_get_thread_area): Properly extend address to
3963 64 bits in 64-cross-32 environment.
3964
9b25f2d3
PA
39652013-05-28 Pedro Alves <palves@redhat.com>
3966
3967 * Makefile.in (clean): Remove reference to aarch64-without-fpu.c.
3968 (aarch64-without-fpu.c): Delete rule.
3969 * configure.srv (aarch64*-*-linux*): Remove references to
3970 aarch64-without-fpu.o and aarch64-without-fpu.xml.
3971 * linux-aarch64-low.c (init_registers_aarch64_without_fpu): Remove
3972 declaration.
3973
6740dc9c
PA
39742013-05-24 Pedro Alves <palves@redhat.com>
3975
3976 * server.c (handle_v_cont) <vCont;r>: Use unpack_varlen_hex
3977 instead of strchr/decode_address. Error if the range isn't split
3978 with a ','. Don't assume there's be a ':' in the action.
3979
c2d6af84
PA
39802013-05-23 Yao Qi <yao@codesourcery.com>
3981 Pedro Alves <palves@redhat.com>
3982
3983 * linux-low.c (lwp_in_step_range): New function.
3984 (linux_wait_1): If the thread was range stepping and stopped
3985 outside the stepping range, report the stop to GDB. Otherwise,
3986 continue stepping. Add range stepping debug output.
3987 (linux_set_resume_request): Copy the step range from the resume
3988 request to the lwp.
3989 (linux_supports_range_stepping): New.
3990 (linux_target_ops) <supports_range_stepping>: Set to
3991 linux_supports_range_stepping.
3992 * linux-low.h (struct linux_target_ops)
3993 <supports_range_stepping>: New field.
3994 (struct lwp_info) <step_range_start, step_range_end>: New fields.
3995 * linux-x86-low.c (x86_supports_range_stepping): New.
3996 (the_low_target) <supports_range_stepping>: Set to
3997 x86_supports_range_stepping.
3998 * server.c (handle_v_cont): Handle 'r' action.
3999 (handle_v_requests): Append ";r" if the target supports range
4000 stepping.
4001 * target.h (struct thread_resume) <step_range_start,
4002 step_range_end>: New fields.
4003 (struct target_ops) <supports_range_stepping>:
4004 New field.
4005 (target_supports_range_stepping): New macro.
4006
58794e1a
JB
40072013-05-17 Joel Brobecker <brobecker@adacore.com>
4008
4009 * lynx-low.c (lynx_resume): Fix null_ptid/minus_one_ptid
4010 confusion in comment.
4011
d631c5a7
JB
40122013-05-17 Joel Brobecker <brobecker@adacore.com>
4013
4014 * lynx-low.c (struct process_info_private): New type.
4015 (lynx_add_process): New function.
4016 (lynx_create_inferior, lynx_attach): Replace calls to
4017 add_process by calls to lynx_add_process.
4018 (lynx_resume): If PTID is null, then try using
4019 current_process()->private->last_wait_event_ptid.
4020 Add comments.
4021 (lynx_clear_inferiors): Delete. The contents of that function
4022 has been inlined in lynx_mourn;
4023 (lynx_wait_1): Save the ptid in the process's private data.
4024 (lynx_mourn): Free the process' private data. Replace call
4025 to lynx_clear_inferiors by call to clear_inferiors.
4026
96f7a20f
YQ
40272013-05-17 Yao Qi <yao@codesourcery.com>
4028
4029 * i386-low.c (i386_length_and_rw_bits): Move the comment to
4030 the right place.
4031
db0dfaa0
LM
40322013-05-16 Luis Machado <lgustavo@codesourcery.com>
4033
4034 * linux-low.c: Move definition checks upwards for PT_TEXT_ADDR,
4035 PT_DATA_ADDR and PT_TEXT_END_ADDR. Update comments.
4036 (linux_read_offsets): Remove PT_TEXT_ADDR, PT_DATA_ADDR and
4037 PT_TEXT_END_ADDR guards. Update comments.
4038 (linux_target_op) <read_offsets>: Conditionally define to
4039 linux_read_offsets if the target is UCLIBC and if it defines
4040 PT_TEXT_ADDR, PT_DATA_ADDR and PT_TEXT_END_ADDR.
4041
68f5f838
SL
40422013-05-06 Sandra Loosemore <sandra@codesourcery.com>
4043 Andrew Jenner <andrew@codesourcery.com>
4044
4045 * Makefile.in (SFILES): Add linux-nios2-low.c.
4046 (clean): Add action to delete nios2-linux.c.
4047 (nios2-linux.c): New rule.
4048 * configure.srv: Add nios2*-*-linux*.
4049 * linux-nios2-low.c: New.
4050
1ebff1fd
HAQ
40512013-05-03 Hafiz Abid Qadeer <abidh@codesourcery.com>
4052
4053 * tracepoint.c (cmd_qtinit): Call 'stop_tracing'.
4054
f6150862
HZ
40552013-04-25 Hui Zhu <hui@codesourcery.com>
4056
4057 PR gdb/15186
f6150862
HZ
4058 * ax.c (ax_printf): Add fflush.
4059
614c279d
TT
40602013-04-22 Tom Tromey <tromey@redhat.com>
4061
4062 * Makefile.in (SFILES): Add filestuff.c.
4063 (OBS): Add filestuff.o.
4064 (filestuff.o): New target.
4065 * config.in, configure: Rebuild.
4066 * configure.ac: Check for fdwalk, pipe2.
4067
7d4e5717
PA
40682013-04-17 Pedro Alves <palves@redhat.com>
4069
4070 * configure.ac (USE_THREAD_DB): Delete variable.
4071 (if test "$srv_linux_thread_db" = "yes"): AC_DEFINE USE_THREAD_DB.
4072 Don't AC_SUBST USE_THREAD_DB.
4073 * Makefile.in (INTERNAL_CFLAGS): Remove @USE_THREAD_DB@.
4074 * config.in, configure: Regenerate.
4075
d5c93e41
PA
40762013-04-16 Pedro Alves <palves@redhat.com>
4077
4078 * linux-low.h (struct lwp_info) <thread_known>: Move under
4079 the USE_THREAD_DB #ifdef.
4080
04f5fe89
PA
40812013-04-16 Pedro Alves <palves@redhat.com>
4082
4083 * Makefile.in (INTERNAL_CFLAGS): Add @USE_THREAD_DB@.
4084 (linux-low.o): Delete rule.
4085 * linux-low.h: Always include "gdb_thread_db.h" instead of
4086 conditionally including thread_db.h.
4087 (struct lwp_info) <th>: Guard with #ifdef USE_THREAD_DB instead of
4088 HAVE_THREAD_DB_H.
4089
480b27bf
JK
40902013-04-07 Jan Kratochvil <jan.kratochvil@redhat.com>
4091
4092 * Makefile.in (install-only): Fix make install regression.
4093
43662968
JK
40942013-04-05 Jan Kratochvil <jan.kratochvil@redhat.com>
4095
4096 Convert man pages to texinfo, new gdbinit.5 texinfo page.
4097 * Makefile.in (install-only): Remove $(man1dir) and gdbserver.1
4098 installation.
4099 * gdbserver.1: Remove.
4100
3e74e146
PA
41012013-03-22 Pedro Alves <palves@redhat.com>
4102
4103 * linux-low.c (handle_extended_wait): Don't call
4104 linux_enable_event_reporting.
4105
a8347a2a
TT
41062013-03-15 Tony Theodore <tonyt@logyst.com>
4107
4108 PR build/9098:
4109 * Makefile.in (SHELL): Use @SHELL@.
4110
eeb56fa7
SDJ
41112013-03-14 Sergio Durigan Junior <sergiodj@redhat.com>
4112
4113 * tracepoint.c (cmd_qtv): Initialize `val' with zero, silencing
4114 compiler warning.
4115
4fa7e2ff
JB
41162013-03-13 Joel Brobecker <brobecker@adacore.com>
4117
4118 * linux-low.c (linux_target_ops) [!HAVE_LINUX_BTRACE]:
4119 Remove extraneous NULL element.
4120
8ddb1965
YQ
41212013-03-13 Yao Qi <yao@codesourcery.com>
4122
4123 * tracepoint.c (traceframe_read_tsv): Look for the last matched
4124 'V' block in trace frame.
4125
9accd112
MM
41262013-03-11 Markus Metzger <markus.t.metzger@intel.com>
4127
4128 * target.h (struct target_ops): Add btrace ops.
4129 (target_supports_btrace): New macro.
4130 (target_enable_btrace): New macro.
4131 (target_disable_btrace): New macro.
4132 (target_read_btrace): New macro.
4133 * gdbthread.h (struct thread_info): Add btrace field.
4134 * server.c: Include btrace-common.h.
4135 (handle_btrace_general_set): New function.
4136 (handle_btrace_enable): New function.
4137 (handle_btrace_disable): New function.
4138 (handle_general_set): Call handle_btrace_general_set.
4139 (handle_qxfer_btrace): New function.
4140 (struct qxfer qxfer_packets[]): Add btrace entry.
4141 * inferiors.c (remove_thread): Disable btrace.
4142 * linux-low: Include linux-btrace.h.
4143 (linux_low_enable_btrace): New function.
4144 (linux_low_read_btrace): New function.
4145 (linux_target_ops): Add btrace ops.
4146 * configure.srv (i[34567]86-*-linux*): Add linux-btrace.o.
4147 Add srv_linux_btrace=yes.
4148 (x86_64-*-linux*): Add linux-btrace.o.
4149 Add srv_linux_btrace=yes.
4150 * configure.ac: Define HAVE_LINUX_BTRACE.
4151 * config.in: Regenerated.
4152 * configure: Regenerated.
4153
5cc22e4c
MM
41542013-03-11 Markus Metzger <markus.t.metzger@intel.com>
4155
4156 * server.c (handle_qxfer): Preserve error message if -3 is
4157 returned.
4158 (qxfer): Document the -3 return value.
4159
7c97f91e
MM
41602013-03-11 Markus Metzger <markus.t.metzger@intel.com>
4161
4162 * Makefile.in (SFILES): Add $(srcdir)/common/linux-btrace.c.
4163 (linux_btrace_h): New variable.
4164 (linux-btrace.o): New rule.
4165
be9a119c 41662013-03-08 Stan Shebs <stan@codesourcery.com>
f6f899bf
HAQ
4167 Hafiz Abid Qadeer <abidh@codesourcery.com>
4168
4169 * tracepoint.c (trace_buffer_size): New global.
4170 (DEFAULT_TRACE_BUFFER_SIZE): New define.
4171 (init_trace_buffer): Change to one-argument function. Allocate
4172 trace buffer memory.
4173 (handle_tracepoint_general_set): Call cmd_bigqtbuffer_size to
4174 handle QTBuffer:size packet.
4175 (cmd_bigqtbuffer_size): New function.
4176 (initialize_tracepoint): Call init_trace_buffer with
4177 DEFAULT_TRACE_BUFFER_SIZE.
4178 * server.c (handle_query): Add QTBuffer:size in the
4179 supported packets.
4180
e64f7499
YQ
41812013-03-07 Yao Qi <yao@codesourcery.com>
4182
4183 * tracepoint.c (cur_action, cur_step_action): Make them unsigned.
4184 (cmd_qtfp): Initialize cur_action and cur_step_action 0 instead
4185 of -1.
4186 (cmd_qtsp): Adjust condition. Do post increment.
4187 Set cur_action and cur_step_action back to 0.
4188
f0ae6fc3
PA
41892013-03-07 Jeremy Bennett <jeremy.bennett@embecosm.com>
4190
4191 PR server/15236
4192 * linux-low.c (linux_write_memory): Return early success if LEN is
4193 zero.
4194
b5b0b0af
CV
41952013-03-05 Corinna Vinschen <vinschen@redhat.de>
4196
334ad4a8 4197 * configure.srv: Add x86_64-*-cygwin* as target.
b5b0b0af 4198
589bc927
TT
41992013-02-28 Tom Tromey <tromey@redhat.com>
4200
4201 * configure.ac: Invoke AC_SYS_LARGEFILE.
4202 * configure, config.in: Rebuild.
4203
dfe07582
CV
42042013-02-28 Corinna Vinschen <vinschen@redhat.com>
4205
4206 * win32-low.c: Throughout, fix format strings and casts of
4207 printf-like functions to avoid type related warnings on all
4208 platforms.
4209 (get_child_debug_event): Print dwDebugEventCode as hex since
4210 that's how it's usually documented.
4211
736cd585
YQ
42122013-02-28 Yao Qi <yao@codesourcery.com>
4213
4214 * tracepoint.c (cmd_qtbuffer): Call phex_nz instead of
4215 pulongest.
4216
e1f58301
JW
42172013-02-27 Jiong Wang <jiwang@tilera.com>
4218
4219 * Makefile.in (clean): Remove reg-tilegx.c, reg-tilegx32.c.
4220 (reg-tilegx32.c): New rule.
4221 * configure.srv (tilegx-*-linux*): Add reg-tilegx32.o to srv_regobj.
4222 * linux-tile-low.c (tile_arch_setup): New function. Invoke
4223 different register info initializer according to elf class.
4224 (init_registers_tilgx32): New function. The tilegx32 register info
4225 initializer.
4226 (tile_fill_gregset): Use "uint_reg_t" to represent register size.
4227 (tile_store_gregset): Likewise.
4228
d171ca78
YQ
42292013-02-27 Yao Qi <yao@codesourcery.com>
4230
4231 * server.c (process_point_options): Print debug message when
4232 debug_threads is true.
4233
282bbdf3
YQ
42342013-02-26 Yao Qi <yao@codesourcery.com>
4235
4236 * tracepoint.c (cmd_qtbuffer): Don't set '\0' in OWN_BUF.
4237
aca22551
PA
42382013-02-19 Pedro Alves <palves@redhat.com>
4239 Kai Tietz <ktietz@redhat.com>
4240
4241 PR gdb/15161
4242
4243 * server.c (handle_query) <CRC check>: Use unpack_varlen_hex
4244 instead of strtoul to extract address from packet.
4245 (process_serial_event) <'z'>: Likewise.
4246
4f3cee1c
YQ
42472013-02-18 Yao Qi <yao@codesourcery.com>
4248
4249 * linux-bfin-low.c (the_low_target): Use NULL instead of 0.
4250
8e1d55a3
PA
42512013-02-14 Pedro Alves <palves@redhat.com>
4252
4253 Plug memory leak.
4254
4255 * tracepoint.c (cmd_qtnotes): Free TRACING_USER_NAME,
4256 TRACING_NOTES and TRACING_STOP_NOTE before clobbering.
4257
458820da
PA
42582013-02-14 Pedro Alves <palves@redhat.com>
4259
4260 * tracepoint.c (cmd_qtdpsrc): Use savestring.
4261
baea0dae
PA
42622013-02-14 Pedro Alves <palves@redhat.com>
4263
4264 * tracepoint.c (save_string): Delete.
4265 (add_tracepoint_action): Use savestring instead of save_string.
4266
0b1afbb3
PA
42672013-02-12 Pedro Alves <palves@redhat.com>
4268
4269 * linux-xtensa-low.c: Ditto.
4270 * xtensa-xtregs.c: Ditto.
4271
8a4ac37e
PA
42722013-02-12 Sanimir Agovic <sanimir.agovic@intel.com>
4273
4274 * thread-db.c (thread_db_get_tls_address): NULL pointer check
4275 thread_db.
4276
148de6bb
MS
42772013-02-07 Marcus Shawcroft <marcus.shawcroft@arm.com>
4278
4279 * linux-aarch64-low.c (aarch64_arch_setup): Clamp
4280 aarch64_num_wp_regs and aarch64_num_bp_regs to
4281 AARCH64_HWP_MAX_NUM and AARCH64_HBP_MAX_NUM respectively.
4282
55fac6e0
MS
42832013-02-07 Marcus Shawcroft <marcus.shawcroft@arm.com>
4284
4285 * linux-aarch64-low.c (ps_get_thread_area): Replace
4286 PTRACE_GET_THREAD_AREA with PTRACE_GETREGSET.
4287
176eb98c
MS
42882013-02-04 Jim MacArthur <jim.macarthur@arm.com>
4289 Marcus Shawcroft <marcus.shawcroft@arm.com>
4290 Nigel Stephens <nigel.stephens@arm.com>
4291 Yufeng Zhang <yufeng.zhang@arm.com>
4292
4293 * Makefile.in (clean): Remove aarch64.c and aarch64-without-fpu.c.
4294 (aarch64.c, aarch64-without-fpu.c): New targets.
4295 * configure.srv (aarch64*-*-linux*): New.
4296 * linux-aarch64-low.c: New file.
4297
56f7af9c
MS
42982013-02-04 Marcus Shawcroft <marcus.shawcroft@arm.com>
4299
43aaf8b6 4300 * linux-low.c (handle_extended_wait, linux_create_inferior)
56f7af9c
MS
4301 (linux_attach_lwp_1, linux_kill_one_lwp, linux_attach_one_lwp)
4302 (dequeue_one_deferred_signal, linux_resume_one_thread)
4303 (fetch_register, linux_write_memory, linux_enable_event_reporting)
4304 (linux_tracefork_grandchild, linux_test_for_tracefork)
4305 (linux_read_offsets, linux_xfer_siginfo, linux_xfer_siginfo): Add
4306 PTRACE_ARG3_TYPE and PTRACE_ARG4_TYPE cast to ptrace arguments
4307 where the argument is 0.
4308
60f662b0
YQ
43092013-01-25 Yao Qi <yao@codesourcery.com>
4310
4311 * event-loop.c: Include "queue.h".
4312 (gdb_event_p): New typedef.
4313 (struct gdb_event) <next_event>: Remove.
4314 (event_queue): Change to QUEUE(gdb_event_p).
4315 (async_queue_event): Remove.
4316 (gdb_event_xfree): New.
4317 (initialize_event_loop): New.
4318 (process_event): Use API from QUEUE.
4319 (wait_for_event): Likewise.
4320 * server.c (main): Call initialize_event_loop.
4321 * server.h (initialize_event_loop): Declare.
4322
5ae4861a
YQ
43232013-01-18 Yao Qi <yao@codesourcery.com>
4324
4325 * ax.h (struct eval_agent_expr_context): New.
4326 (gdb_eval_agent_expr): Update declaration.
4327 * ax.c (gdb_eval_agent_expr): Remove argument REGCACHE and
4328 TFRAME. Add new argument CTX.
4329 * server.h (struct eval_agent_expr_context): Declare.
4330 (agent_mem_read, agent_tsv_read): Update declaration.
4331 (agent_mem_read_string): Likewise.
4332 * tracepoint.c (eval_tracepoint_agent_expr): Remove.
4333 (add_traceframe_block): Add new argument TPOINT.
4334 Increase TPOINT->traceframe_usage.
4335 (do_action_at_tracepoint): Call gdb_eval_agent_expr instead of
4336 eval_tracepoint_agent_expr.
4337 (condition_true_at_tracepoint): Likewise.
4338 (agent_mem_read): Remove argument TFRAME. Add argument CTX.
4339 (agent_mem_read_string, agent_tsv_read): Likewise.
4340
85e00e85
YQ
43412013-01-16 Yao Qi <yao@codesourcery.com>
4342
4343 * linux-low.c (linux_resume_one_lwp): Don't check
4344 'lwp->bp_reinsert != 0'.
4345
4039cf45
JB
43462013-01-07 Joel Brobecker <brobecker@adacore.com>
4347 Pedro Alves <palves@redhat.com>
4348
4349 * lynx-low.c (ptrace_request_to_str): Define a temporary
4350 macro and use it to simplify this function's implementation.
4351
9044dee2
JB
43522013-01-07 Joel Brobecker <brobecker@adacore.com>
4353
4354 * lynx-low.c (lynx_resume): Call perror_with_name if lynx_ptrace
4355 sets errno.
4356
e6352c8f
JB
43572013-01-07 Joel Brobecker <brobecker@adacore.com>
4358
4359 * configure.srv (i[34567]86-*-lynxos*): Set srv_xmlfiles.
4360
50681a27
JB
43612013-01-07 Joel Brobecker <brobecker@adacore.com>
4362
4363 * configure.srv (powerpc-*-lynxos*): Set srv_xmlfiles.
4364
3f6e77ef
JB
43652013-01-07 Joel Brobecker <brobecker@adacore.com>
4366
4367 * lynx-low.c (lynx_resume): Use the resume_info parameter
4368 to determine the ptid for the lynx_ptrace call, unless
4369 it is equal to minus_one_ptid, in which case we use the
4370 ptid of the current_inferior.
4371 (lynx_wait_1): After having received a thread create/exit
4372 event, resume the inferior's execution using the signaling
4373 thread's ptid, rather than the old ptid.
4374
7fda33ae
JB
43752013-01-07 Joel Brobecker <brobecker@adacore.com>
4376
4377 * lynx-low.c (lynx_resume): Delete variable ret.
4378
b9786c74
JB
43792013-01-01 Joel Brobecker <brobecker@adacore.com>
4380
4381 * gdbreplay.c (gdbreplay_version): Update copyright year.
4382 * server.c (gdbserver_version): Likewise.
4383
8b93d60f
JB
43842012-12-17 Joel Brobecker <brobecker@adacore.com>
4385
4386 * lynx-low.c (lynx_wait_1): Add debug trace before adding
4387 new thread.
4388
037335a7
JB
43892012-12-17 Joel Brobecker <brobecker@adacore.com>
4390
4391 * lynx-low.c (ptrace_request_to_str): Add handling for
4392 PTRACE_GETTRACESIG.
4393
52d4cbd8
JB
43942012-12-17 Joel Brobecker <brobecker@adacore.com>
4395
4396 * lynx-low.c (lynx_attach): Delete variable new_process.
4397
ab8f6ca9
JB
43982012-12-17 Joel Brobecker <brobecker@adacore.com>
4399
4400 * lynx-low.c (lynx_create_inferior): Delete variable
4401 new_process.
4402
78cbc024
JB
44032012-12-17 Joel Brobecker <brobecker@adacore.com>
4404
4405 * lynx-low.c (ptrace_request_to_str): Do not handle
4406 PTRACE_GETTHREADLIST if this macro does not exist.
4407
14a00470
YQ
44082012-12-15 Yao Qi <yao@codesourcery.com>
4409
4410 * Makefile.in (OBS): Add notif.o.
4411 * notif.c, notif.h: New.
4412 * server.c: Include "notif.h".
4413 (struct vstop_notif) <next>: Remove.
4414 <base>: New field.
4415 (queue_stop_reply): Update.
4416 (push_event, send_next_stop_reply): Remove.
4417 (discard_queued_stop_replies): Update.
4418 (notif_stop): New variable.
4419 (handle_v_stopped): Remove.
4420 (handle_v_requests): Don't call handle_v_stopped. Call
4421 handle_ack_notif instead.
4422 (queue_stop_reply_callback): Call notif_event_enque instead
4423 of queue_stop_reply.
4424 (handle_status): Don't call send_next_stop_reply, call
4425 notif_write_event instead.
4426 (kill_inferior_callback): Likewise.
4427 (detach_or_kill_inferior_callback): Likewise.
4428 (main): Call initialize_notif.
4429 (process_serial_event): Call QUEUE_is_empty.
4430 (handle_target_event): Call notif_push instead of push event.
4431 * server.h (push_event): Remove declaration.
4432
61c125b9
TT
44332012-12-10 Tom Tromey <tromey@redhat.com>
4434
4435 * Makefile.in (DEPMODE, DEPDIR, depcomp, COMPILE.pre)
4436 (COMPILE.post, COMPILE, POSTCOMPILE, IPAGENT_COMPILE): New
4437 macros.
4438 (.c.o): Rewrite.
4439 (ax-ipa.o, tracepoint-ipa.o, utils-ipa.o, format-ipa.o)
4440 (common-utils-ipa.o, remote-utils-ipa.o, regcache-ipa.o)
4441 (i386-linux-ipa.o, linux-i386-ipa.o, linux-amd64-ipa.o)
4442 (amd64-linux-ipa.o, ax.o): Rewrite.
4443 (event-loop.o, hostio.o, hostio-errno.o, inferiors.o, mem-break.o)
4444 (proc-service.o, regcache.o, remote-utils.o, server.o, target.o)
4445 (thread-db.o, tracepoint.o, utils.o, gdbreplay.o, dll.o): Remove.
4446 (signals.o, linux-procfs.o, linux-ptrace.o, common-utils.o, vec.o)
4447 (gdb_vecs.o, xml-utils.o, linux-osdata.o, ptid.o, buffer.o)
4448 (format.o, agent.o, vasprintf.o, vsnprintf.o): Rewrite.
4449 (i386-low.o, i387-fp.o, linux-low.o, linux-arm-low.o)
4450 (linux-bfin-low.o, linux-cris-low.o, linux-crisv32-low.o)
4451 (linux-ia64-low.o, linux-m32r-low.o, linux-mips-low.o)
4452 (linux-ppc-low.o, linux-s390-low.o, linux-sh-low.o)
4453 (linux-tic6x-low.o, linux-x86-low.o, linux-xtensa-low.o)
4454 (linux-tile-low.o, lynx-low.o, lynx-ppc-low.o, nto-low.o)
4455 (nto-x86-low.o, linux-low.o, win32-low.o, win32-arm-low.o)
4456 (win32-i386-low.o, spu-low.o, reg-arm.o, arm-with-iwmmxt.o)
4457 (arm-with-vfpv2.o, arm-with-vfpv3.o, arm-with-neon.o, reg-bfin.o)
4458 (reg-cris.o, reg-crisv32.o, i386.o, i386-linux.o, i386-avx.o)
4459 (i386-avx-linux.o, i386-mmx.o, i386-mmx-linux.o, reg-ia64.o)
4460 (reg-m32r.o, reg-m68k.o, reg-cf.o, mips-linux.o, mips-dsp-linux.o)
4461 (mips64-linux.o, mips64-dsp-linux.o, powerpc-32.o, powerpc-32l.o)
4462 (powerpc-altivec32l.o, powerpc-cell32l.o, powerpc-vsx32l.o)
4463 (powerpc-isa205-32l.o, powerpc-isa205-altivec32l.o)
4464 (powerpc-isa205-vsx32l.o, powerpc-e500l.o, powerpc-64l.o)
4465 (powerpc-altivec64l.o, powerpc-cell64l.o, powerpc-vsx64l.o)
4466 (powerpc-isa205-64l.o, powerpc-isa205-altivec64l.o)
4467 (powerpc-isa205-vsx64l.o, s390-linux32.o, s390-linux32v1.o)
4468 (s390-linux32v2.o, s390-linux64.o, s390-linux64v1.o)
4469 (s390-linux64v2.o, s390x-linux64.o, s390x-linux64v1.o)
4470 (s390x-linux64v2.o, tic6x-c64xp-linux.o, tic6x-c64x-linux.o)
4471 (tic6x-c62x-linux.o, reg-sh.o, reg-sparc64.o, reg-spu.o, amd64.o)
4472 (amd64-linux.o, amd64-avx.o, amd64-avx-linux.o, x32.o)
4473 (x32-linux.o, x32-avx.o, x32-avx-linux.o, reg-xtensa.o)
4474 (reg-tilegx.o): Remove.
4475 (all_object_files): New macro.
4476 Include .deps files.
4477 * aclocal.m4, configure: Rebuild.
4478 * acinclude.m4: Include depstand.m4, lead-dot.m4.
4479 * configure.ac: Invoke ZW_CREATE_DEPDIR,
4480 ZW_PROG_COMPILER_DEPENDENCIES. Compute GMAKE condition.
4481
e90e9ad9
TT
44822012-12-05 Tom Tromey <tromey@redhat.com>
4483
4484 PR gdb/14917:
4485 * server.h (current_insn_ptr, emit_error): Declare 'extern'.
4486
02d403bf 44872012-11-28 Markus Metzger <markus.t.metzger@intel.com>
945bf713
MM
4488
4489 * configure.ac: Check for linux/perf_event.h.
4490 * config.in: Regenerated.
4491 * configure: Regenerated.
4492
0270a750
PA
44932012-11-26 Maxime Villard <rustyBSD@gmx.fr>
4494
4495 * hostio.c (handle_readlink): Decrease buffer size
4496 parameter passed to readlink by one byte.
4497
8c29b58e
YQ
44982012-11-26 Yao Qi <yao@codesourcery.com>
4499
4500 * configure.ac (build_warnings): Append '-Wempty-body'.
4501 * configure: Regenerated.
4502 * linux-low.c (linux_create_inferior): Use braces for empty 'if'
4503 body.
4504
8bdce1ff
PM
45052012-11-15 Pierre Muller <muller@sourceware.org>
4506
4507 * configure.ac (AC_CHECK_HEADERS): Add wait.h header.
4508 * config.in: Regenerate.
4509 * configure: Regenerate.
4510 * linux-low.c: Use "gdb_stat.h" header instead of <sys/stat.h> header.
4511 Use "gdb_wait.h" header instead of <sys/wait.h> header.
4512 * lynx-low.c: Use "gdb_wait.h" header instead of <sys/wait.h> header.
4513 * remote-utils.c: Use "gdb_stat.h" header instead of <sys/stat.h>
4514 header.
4515 * server.c: Remove HAVE_WAIT_H conditional. Use "gdb_wait.h" header
4516 instead of <sys/wait.h> header.
4517 * spu-low.c: Use "gdb_wait.h" header instead of <sys/wait.h> header.
4518
02d403bf 45192012-11-13 Markus Metzger <markus.t.metzger@intel.com>
3ba6ad0f
MM
4520
4521 * Makefile.in: (INTERNAL_CFLAGS): Add -DGDBSERVER
4522 (various make rules): Remove -DGDBSERVER
4523
fbd5db48
YQ
45242012-11-09 Yao Qi <yao@codesourcery.com>
4525
4526 * spu-low.c (current_ptid): Move it to ..
4527 * gdbthread.h: ... here. New.
4528 * remote-utils.c (read_ptid): Use macro 'current_ptid'.
4529 * server.c (myresume, process_serial_event): Likewise.
4530 * thread-db.c (thread_db_find_new_threads): Likewise.
4531 * tracepoint.c (run_inferior_command): Likewise.
4532
b3dc46ff
AB
45332012-10-01 Andrew Burgess <aburgess@broadcom.com>
4534
4535 * server.c (handle_search_memory_1): Include access length in
4536 warning message.
4537
07c04788
HPN
45382012-09-05 Michael Brandt <michael.brandt@axis.com>
4539
4540 * linux-crisv32-low.c: Fix compile errors.
4541
918d227b
YQ
45422012-09-04 Yao Qi <yao@codesourcery.com>
4543
4544 * tracepoint.c (cmd_qtsv): Adjust debug message.
4545 Don't check CUR_TPOINT.
4546
18c1b81a
YQ
45472012-08-28 Yao Qi <yao@codesourcery.com>
4548
4549 * ax.c, tracepoint.c: Replace ATTR_FORMAT with ATTRIBUTE_PRINTF.
4550 * server.h: Include 'libiberty.h' and 'ansidecl.h'.
4551 (ATTR_NORETURN, ATTR_FORMAT, ATTR_MALLOC): Remove.
4552 Remove declarations of xmalloc, xreallloc, xstrdup and
4553 freeargv.
4554 * Makefile.in (libiberty_h): New.
4555 (server_h): Append dependencies 'libiberty.h' and 'ansidecl.h'.
4556 (linux-bfin-low.o): Append dependency 'libiberty.h'.
4557
dc82f37b
YQ
45582012-08-23 Yao Qi <yao@codesourcery.com>
4559
4560 * server.h: Remove declaration of 'xsnprintf'.
4561
406b1477
KS
45622012-08-22 Keith Seitz <keiths@redhat.com>
4563
4564 * server.h: Include build-gnulib-gbserver/config.h.
4565 * gdbreplay.c: Likewise.
4566
e6712ff1
DE
45672012-08-08 Doug Evans <dje@google.com>
4568
4569 * Makefile.in (SFILES): Add gdb_vecs.c.
4570 (OBS): Add gdb_vecs.o.
4571 (gdb_vecs_h, host_defs_h): New variables.
4572 (thread-db.o): Add $(gdb_vecs_h) dependency.
4573 (gdb_vecs.o): New rule.
4574 * thread-db.c: #include "gdb_vecs.h".
4575 (thread_db_load_search): Use a vector to iterate over path elements.
4576 Handle text appearing after "$pdir".
4577
4578 * configure.ac: Add check for strstr.
4579 * config.in: Regenerate.
4580 * configure: Regenerate.
4581
7c3270ae
UW
45822012-08-02 Ulrich Weigand <ulrich.weigand@linaro.org>
4583
4584 * hostio.c (handle_pread): If pread fails, fall back to attempting
4585 lseek/read.
4586 (handle_pwrite): Likewise for pwrite.
4587
b62e2b27
UW
45882012-08-01 Ulrich Weigand <ulrich.weigand@linaro.org>
4589
4590 * linux-arm-low.c (arm_linux_hw_point_initialize): Distinguish
4591 between unsupported TYPE and unimplementable ADDR/LEN combination.
4592 (arm_insert_point): Act on new return value.
4593
78a99e91
PA
45942012-07-31 Pedro Alves <palves@redhat.com>
4595
4596 * server.c (process_point_options): Only skip tokens if we find
4597 one that is unrecognized. Don't treat 'X' specially while
4598 skipping unrecognized tokens.
4599
fcf303ab
UW
46002012-07-30 Ulrich Weigand <ulrich.weigand@linaro.org>
4601
4602 * linux-arm-low.c (arm_linux_hw_point_initialize): Do not attempt
4603 to 4-byte-align HW breakpoint addresses for Thumb.
4604
7255706c
YQ
46052012-07-27 Yao Qi <yao@codesourcery.com>
4606
4607 PR remote/14161.
4608
4609 * server.h: Declare gdb_agent_about_to_close.
4610 * target.c (kill_inferior): Include "agent.h".
4611 New. Send command 'kill'.
4612 * target.h (kill_inferior): Removed macro.
4613 * tracepoint.c (gdb_agent_about_to_close): New.
4614 (gdb_agent_helper_thread): Handle command 'close'.
4615 Wait endlessly until the inferior stops.
4616 Install gdb_agent_remove_socket to atexit hook.
4617 (agent_socket_name): New static variable.
4618 (gdb_agent_socket_init): Replace local variable 'name' with
4619 'agent_socket_name'.
4620 (gdb_agent_remove_socket): New.
4621
5a3f286f
YQ
46222012-07-27 Yao Qi <yao@codesourcery.com>
4623
4624 * server.c (process_point_options): Stop at 'X' when parsing.
4625
961bd387
ME
46262012-07-19 Michael Eager <eager@eagercon.com>
4627
a261b8f5 4628 * i386-low.c (Z_packet_to_hw_type): Add Z_PACKET_HW_BP, translate
961bd387
ME
4629 to hw_execute.
4630 * linux-x86-low.c (x86_insert_point, x86_remove_point):
4631 Call i386_low_insert_watchpoint, i386_low_remove_watchpoint to add/del
4632 hardware breakpoint.
4633
aa7c7447
JK
46342012-07-07 Jan Kratochvil <jan.kratochvil@redhat.com>
4635
4636 * gdbserver/linux-low.c (initialize_low): Call
4637 linux_ptrace_init_warnings.
4638
7f216e7c
DE
46392012-07-02 Doug Evans <dje@google.com>
4640
4641 * mem-break.c (gdb_no_commands_at_breakpoint): Fix cast from
4642 pointer to int.
4643
d3ce09f5
SS
46442012-07-02 Stan Shebs <stan@codesourcery.com>
4645
4646 * Makefile.in (WARN_CFLAGS_NO_FORMAT): Define.
4647 (ax.o): Add it to build rule.
4648 (ax-ipa.o): Ditto.
4649 (OBS): Add format.o.
4650 (IPA_OBS): Add format.o.
4651 * server.c (handle_query): Claim support for breakpoint commands.
4652 (process_point_options): Add command case.
4653 (process_serial_event): Leave running if there are printfs in
4654 effect.
4655 * mem-break.h (any_persistent_commands): Declare.
4656 (add_breakpoint_commands): Declare.
4657 (gdb_no_commands_at_breakpoint): Declare.
4658 (run_breakpoint_commands): Declare.
4659 * mem-break.c (struct point_command_list): New struct.
4660 (struct breakpoint): New field command_list.
4661 (any_persistent_commands): New function.
4662 (add_commands_to_breakpoint): New function.
4663 (add_breakpoint_commands): New function.
4664 (gdb_no_commands_at_breakpoint): New function.
4665 (run_breakpoint_commands): New function.
4666 * linux-low.c (linux_wait_1): Test for and run breakpoint commands
4667 locally.
4668 * ax.c: Include format.h.
4669 (ax_printf): New function.
4670 (gdb_eval_agent_expr): Add printf opcode.
4671
2f8f6aed
YQ
46722012-06-13 Yao Qi <yao@codesourcery.com>
4673
4674 * server.c (start_inferior): Remove duplicated writes to fields
4675 'last_resume_kind' and 'last_status' of 'current_inferior'.
4676
0c9070b3
YQ
46772012-06-12 Yao Qi <yao@codesourcery.com>
4678 Pedro Alves <palves@redhat.com>
4679
4680 * linux-low.c (linux_set_resume_request): Simplify predicate. Add
4681 comment.
4682 * server.c (handle_v_cont): Extend comment.
4683
c52daf70
YQ
46842012-06-11 Yao Qi <yao@codesourcery.com>
4685
4686 * linux-low.c (linux_attach): Add 'static'.
4687
d38bbb0a
YQ
46882012-06-06 Yao Qi <yao@codesourcery.com>
4689
4690 * ax.c (gdb_eval_agent_expr): Print `top' in hex.
4691
89dc0afd
JK
46922012-06-01 Jan Kratochvil <jan.kratochvil@redhat.com>
4693
4694 Fix gcc -flto compilation warning.
4695 * server.c (main): Make variable multi_mode and attach volatile.
4696
75f62ce7
TJB
46972012-05-30 Thiago Jung Bauermann <thiago.bauermann@linaro.org>
4698
4699 * linux-low.c (get_r_debug): Disable code using DT_MIPS_RLD_MAP
4700 if the platform doesn't know about it.
4701
65f479b6
PA
47022012-05-30 Jeff Kenton <jkenton@tilera.com>
4703
4704 * Makefile.in (SFILES): Add linux-tile-low.c.
4705 (linux-tile-low.o, reg-tilegx.o, reg-tilegx.c): New rules.
4706 * configure.srv: Handle tilegx-*-linux*.
4707 * linux-tile-low.c: New file.
4708
0c5bf5a9
JK
47092012-05-28 Jan Kratochvil <jan.kratochvil@redhat.com>
4710
4711 * linux-low.c (linux_qxfer_libraries_svr4): Return -1 if R_DEBUG is -1.
4712
a493e3e2
PA
47132012-05-24 Pedro Alves <palves@redhat.com>
4714
4715 PR gdb/7205
4716
43aaf8b6 4717 Replace TARGET_SIGNAL_ with GDB_SIGNAL_ throughout.
a493e3e2 4718
2ea28649
PA
47192012-05-24 Pedro Alves <palves@redhat.com>
4720
4721 PR gdb/7205
4722
4723 Replace target_signal with gdb_signal throughout.
4724
8d409d16
MR
47252012-05-22 Maciej W. Rozycki <macro@codesourcery.com>
4726
4727 * linux-low.c (linux_store_registers): Avoid the copying sequence
4728 when no data has been retrieved by ptrace.
4729
23512c01
MGD
47302012-05-22 Will Deacon <will.deacon@arm.com>
4731
4732 * linux-low (__UCLIBC__ && !(__UCLIBC_HAS_MMU__ || __ARCH_HAS_MMU__)):
4733 Include asm/ptrace.h.
4734 (PT_TEXT_ADDR, PT_DATA_ADDR, PT_TEXT_END_ADDR): Define only if not
4735 already defined.
4736
4934b29e
MR
47372012-05-21 Maciej W. Rozycki <macro@codesourcery.com>
4738
4739 * linux-low.c (linux_store_registers): Don't re-retrieve data
4740 with ptrace that has already been obtained from /proc. Always
4741 copy any data retrieved with ptrace to the buffer supplied.
4742
bde24c0a
PA
47432012-05-11 Yao Qi <yao@codesourcery.com>
4744 Pedro Alves <palves@redhat.com>
4745
4746 * linux-low.c (enum stopping_threads_kind): New.
4747 (stopping_threads): Change type to `enum stopping_threads_kind'.
4748 (handle_extended_wait): If stopping and suspending threads, leave
4749 the new_lwp suspended too.
4750 (linux_wait_for_event): Adjust.
4751 (stop_all_lwps): Set `stopping_threads' to
4752 STOPPING_AND_SUSPENDING_THREADS or STOPPING_THREADS depending on
4753 whether we're suspending threads or just stopping them. Assert no
4754 recursion happens.
4755
623b6bdf
YQ
47562012-04-29 Yao Qi <yao@codesourcery.com>
4757
4758 * server.h: Move some code to ...
4759 * gdbthread.h: ... here. New.
4760 * Makefile.in (inferiors.o, regcache.o): Depends on gdbthread.h
4761 (remote-utils.o, server.o, target.o tracepoint.o): Likewise.
4762 (nto-low.o, win32-low.o): Likewise.
4763 * inferiors.c, linux-low.h, nto-low.c: Include gdbthread.h.
4764 * regcache.c, remote-utils.c, server.c: Likewise.
4765 * target.c, tracepoint.c, win32-low.c: Likewise.
4766
f15f9948
TJB
47672012-04-24 Thiago Jung Bauermann <thiago.bauermann@linaro.org>
4768
4769 * linux-low.h (PTRACE_ARG3_TYPE): Move macro from linux-low.c.
4770 (PTRACE_ARG4_TYPE): Likewise.
4771 (PTRACE_XFER_TYPE): Likewise.
4772 * linux-arm-low.c (arm_prepare_to_resume): Cast third argument of
4773 ptrace to PTRACE_ARG3_TYPE.
4774 * linux-low.c (PTRACE_ARG3_TYPE): Move macro to linux-low.h.
4775 (PTRACE_ARG4_TYPE): Likewise.
4776 (PTRACE_XFER_TYPE): Likewise.
4777 (linux_detach_one_lwp): Cast fourth argument of
4778 ptrace to long then PTRACE_ARG4_TYPE.
4779 (regsets_fetch_inferior_registers): Cast third argument of
4780 ptrace to long then PTRACE_ARG3_TYPE.
4781 (regsets_store_inferior_registers): Likewise.
4782
38ea300a
PA
47832012-04-20 Pedro Alves <palves@redhat.com>
4784
4785 * configure: Regenerate.
4786
c971b7fa
PA
47872012-04-19 Pedro Alves <palves@redhat.com>
4788
43aaf8b6 4789 * Makefile.in (GNULIB_BUILDDIR): New.
c971b7fa 4790 (LIBGNU, INCGNU, GNULIB_H): Adjust.
43aaf8b6
PA
4791 (SUBDIRS, CLEANDIRS, REQUIRED_SUBDIRS): New.
4792 (all, install-only, uninstall, clean-info, all-lib, clean): No
4793 longer pass GNULIB_FLAGS_TO_PASS. Use subdir_do.
4794 (maintainer-clean realclean distclean): Use subdir_do.
4795 (subdir_do): New.
4796 (gnulib/import/Makefile): Adjust. Replace gnulib/import with
c971b7fa 4797 $(GNULIB_BUILDDIR). Don't pass argument to config.status.
43aaf8b6
PA
4798 * acinclude.m4: Include acx_configure_dir.m4.
4799 * configure.ac: Remove gl_EARLY, gl_INIT, and AM_INIT_AUTOMAKE
4800 calls. Call AC_PROG_RANLIB. Configure gnulib using
4801 ACX_CONFIGURE_DIR.
4802 (GNULIB): New.
4803 (GNULIB_STDINT_H): Adjust.
4804 (AC_OUTPUT): Don't output gnulib/Makefile anymore.
4805 * gdbreplay.c: Include build-gnulib/config.h.
4806 * server.h: Likewise.
4807 * aclocal.m4: Regenerate.
4808 * config.in: Regenerate.
4809 * configure: Regenerate.
c971b7fa 4810
809277f8
PA
48112012-04-19 Pedro Alves <palves@redhat.com>
4812
4813 * Makefile.in (LIBGNU, INCGNU): Adjust.
4814 (GNULIB_FLAGS_TO_PASS, GNULIB_H): Adjust.
4815 (all, install-only, uninstall, clean-info, all-lib, clean)
4816 (maintainer-clean, Makefile, gnulib/Makefile): Adjust.
4817 * configure.ac: Adjust AC_OUTPUT output.
4818 * aclocal.m4: Regenerate.
4819 * configure: Regenerate.
4820
fd9bb8b8
PA
48212012-04-19 Pedro Alves <palves@redhat.com>
4822
4823 * Makefile.in (generated_files): New.
4824 (server_h): Remove the explicit dependency on config.h, and depend
4825 on $generated_files.
4826
1c298c66
PA
48272012-04-19 Pedro Alves <palves@redhat.com>
4828
4829 * Makefile.in (INCGNU): Add -Ignulib.
4830
57c4b50b
PA
48312012-04-19 Pedro Alves <palves@redhat.com>
4832
4833 * Makefile.in (GNULIB_INCLUDE_DIR): Rename to ...
4834 (INCGNU): ... this, and spell out -I here.
4835 (GNULIB_LIB): Rename to ...
4836 (LIBGNU): ... this.
4837 (INCLUDE_CFLAGS, gdbserver$(EXEEXT), $(GNULIB_LIB) rule): Adjust.
4838
1030e047
PA
48392012-04-19 Pedro Alves <palves@redhat.com>
4840
4841 * config.in: Regenerate.
4842
447d4319
PA
48432012-04-19 Pedro Alves <palves@redhat.com>
4844
4845 * configure.ac: Remove AC_CHECK_DECLS check for memmem.
4846 * server.h (memmem): Remove declaration.
4847 * config.in: Regenerate.
4848 * configure: Regenerate.
4849
aad9eab9
YQ
48502012-04-19 Yao Qi <yao@codesourcery.com>
4851
4852 * Makefile.in (SFILES): Add common/vec.c.
4853 (OBS): Add vec.o.
4854 (vec.o): New rule.
4855
3e10640f
YQ
48562012-04-19 Yao Qi <yao@codesourcery.com>
4857
4858 * remote-utils.c (prepare_resume_reply): Replace with macro
4859 target_core_of_thread.
4860 * server.c (handle_qxfer_threads_proper): Likewise.
4861 * target.h (traget_core_of_thread): New macro.
4862
71622373
PA
48632012-04-18 Pedro Alves <palves@redhat.com>
4864
4865 * aclocal.m4: Regenerate.
4866 * configure: Regenerate.
4867
80d26939
YQ
48682012-04-16 Yao Qi <yao@codesourcery.com>
4869
4870 * tracepoint.c (cmd_qtstart): Download tracepoints even when they are
4871 duplicated on address.
4872
42476b70
YQ
48732012-04-16 Yao Qi <yao@codesourcery.com>
4874
4875 * tracepoint.c (COPY_FIELD_TO_BUF): New macro.
4876 (struct tracepoint_action_ops) <send>: New field.
4877 (m_tracepoint_action_send, r_tracepoint_action_send): New.
4878 (agent_expr_send, x_tracepoint_action_send): New.
4879 (l_tracepoint_action_send): New.
4880 (cmd_qtdp): Download and install tracepoint
4881 according to `use_agent'.
4882 (run_inferior_command): Add one more parameter `len'.
4883 Update callers.
4884 (tracepoint_send_agent): New.
4885 (cmd_qtdp, cmd_qtstart): Call tracepoint_send_agent.
4886
7bc83639
YQ
48872012-04-16 Yao Qi <yao@codesourcery.com>
4888
4889 * tracepoint.c (download_tracepoints): Moved to ...
4890 (cmd_qtstart): ... here.
4891
5f18041e
YQ
48922012-04-14 Yao Qi <yao@codesourcery.com>
4893
4894 * tracepoint.c: Include inttypes.h.
4895 (struct collect_memory_action): Use sized types.
4896 (struct tracepoint): Likewise.
4897 (cmd_qtdp, stop_tracing): Update print specifiers.
4898 (cmd_qtp, response_tracepoint): Likewise.
4899 (collect_data_at_tracepoint): Likewise.
4900 (collect_data_at_step): Likewise.
4901
55a8c076
YQ
49022012-04-14 Yao Qi <yao@codesourcery.com>
4903
4904 Import gnulib module inttypes.
4905 * aclocal.m4, config.in, configure: Regenerated.
4906
dc750257
YQ
49072012-04-14 Yao Qi <yao@codesourcery.com>
4908
4909 * Makefile.in (maintainer-clean, realclean, distclean): Remove
4910 Makefile and config.status at last.
4911
0ab5faf9
YQ
49122012-04-13 Yao Qi <yao@codesourcery.com>
4913
4914 * tracepoint.c: Include stdint.h unconditionally.
4915
18f5fd81
TJB
49162012-04-13 Thiago Jung Bauermann <thiago.bauermann@linaro.org>
4917
4918 * acinclude.m4 (GDBSERVER_HAVE_THREAD_DB_TYPE): New macro based
4919 on BFD_HAVE_SYS_PROCFS_TYPE.
4920 * configure.ac: Look for lwpid_t and psaddr_t in libthread_db.h.
4921 * configure: Regenerate.
4922 * config.in: Likewise.
4923
4d47af5c
L
49242012-04-13 H.J. Lu <hongjiu.lu@intel.com>
4925
4926 * Makefile.in (clean): Also remove x32.c x32-linux.c
4927 x32-avx.c x32-avx-linux.c.
4928 (x32.o): New target.
4929 (x32.c): Likewise.
4930 (x32-linux.o): Likewise.
4931 (x32-linux.c): Likewise.
4932 (x32-avx.o): Likewise.
4933 (x32-avx.c): Likewise.
4934 (x32-avx-linux.o): Likewise.
4935 (x32-avx-linux.c): Likewise.
4936
4937 * configure.srv (srv_amd64_regobj): Add x32.o x32-avx.o.
4938 (srv_amd64_linux_regobj): Add x32-linux.o x32-avx-linux.o.
4939 (srv_i386_64bit_xmlfiles): Add i386/x32-core.xml.
4940 (srv_amd64_xmlfiles): Add i386/x32.xml i386/x32-avx.xml.
4941 (srv_amd64_linux_xmlfiles): Add i386/x32-linux.xml
4942 i386/x32-avx-linux.xml.
4943
4944 * linux-x86-low.c (init_registers_x32_linux): New prototype.
4945 (init_registers_x32_avx_linux): Likwise.
4946 (x86_linux_update_xmltarget): Call init_registers_x32_linux
4947 or init_registers_x32_avx_linux if linux_is_elf64 is false.
4948
ecedbe58
PA
49492012-04-13 Pedro Alves <palves@redhat.com>
4950
4951 * Makefile.in (GNULIB_FLAGS_TO_PASS): New.
4952 (FLAGS_TO_PASS): Don't change or set $top_srcdir, $srcdir and VPATH.
4953 (all, uninstall, clean-info, all-lib, clean, maintainer-clean)
4954 (realclean, distclean): Explicitly pass $GNULIB_FLAGS_TO_PASS to
4955 the sub-make.
4956
c92b5177
L
49572012-04-12 H.J. Lu <hongjiu.lu@intel.com>
4958
4959 * linux-x86-low.c (compat_x32_clock_t): New.
4960 (compat_x32_siginfo_t): Likewise.
4961 (compat_x32_siginfo_from_siginfo): Likewise.
4962 (siginfo_from_compat_x32_siginfo): Likewise.
4963 (linux_is_elf64): Likewise.
4964 (x86_siginfo_fixup): Call compat_x32_siginfo_from_siginfo
4965 and siginfo_from_compat_x32_siginfo for x32.
4966 (x86_arch_setup): Set linux_is_elf64.
4967
214d508e
L
49682012-04-12 H.J. Lu <hongjiu.lu@intel.com>
4969
4970 PR gdb/13969
4971 * linux-low.c (linux_pid_exe_is_elf_64_file): Also return the
4972 e_machine field.
4973 (linux_qxfer_libraries_svr4): Update call to elf_64_file_p.
4974 * linux-low.h (linux_pid_exe_is_elf_64_file): Updated.
4975 * linux-x86-low.c (x86_arch_setup): Check if GDBserver is
4976 compatible with process.
4977
c9a1864a
YQ
49782012-04-12 Yao Qi <yao@codesourcery.com>
4979
4980 * Makefile.in: Define abs_top_srcdir and abs_srcdir.
4981 (INCLUDE_CFLAGS): Append GNULIB_INCLUDE_DIR.
4982 (install-only, install-info, clean): Handle sub dir gnulib.
4983 (all-lib, am--refresh): New targets.
4984 (memmem.o): Remove target.
4985 * configure.ac: Remove AC_CONFIG_LIBOBJ_DIR.
4986 Invoke gl_EARLY. Invoke AC_CHECK_PROGS for make.
4987 (AC_REPLACE_FUNCS): Remove memmem.
4988 Invoke gl_INIT and AM_INIT_AUTOMAKE.
4989 (AC_OUTPUT): Generate Makefile in gnulib/.
4990 * aclocal.m4, config.in, configure: Regenerated.
4991
367ba2c2
MR
49922012-04-10 Maciej W. Rozycki <macro@codesourcery.com>
4993
4994 * linux-low.c (get_r_debug): Handle DT_MIPS_RLD_MAP.
4995
9d236627
PA
49962012-04-05 Pedro Alves <palves@redhat.com>
4997
4998 -Werror=strict-aliasing
4999
5000 * spu-low.c (parse_spufs_run): Avoid dereferencing type-punned
5001 pointer.
5002
111217b3
PA
50032012-04-04 Pedro Alves <palves@redhat.com>
5004
5005 * linux-sparc-low.c (sparc_fill_gregset_to_stack)
5006 (sparc_store_gregset_from_stack, sparc_store_gregset)
5007 (sparc_breakpoint_at): Fix formatting.
5008
8365dcf5
TJB
50092012-03-30 Thiago Jung Bauermann <thiago.bauermann@linaro.org>
5010
5011 * configure.ac: Check whether Elf32_auxv_t and Elf64_auxv_t
5012 are available.
5013 * linux-low.c [HAVE_ELF32_AUXV_T] (Elf32_auxv_t): Add typedef.
5014 [HAVE_ELF64_AUXV_T] (Elf64_auxv_t): Likewise.
5015 * config.in: Regenerate.
5016 * configure: Likewise.
5017
689cc2ae
PA
50182012-03-29 Pedro Alves <palves@redhat.com>
5019
5020 * linux-low.c (regsets_store_inferior_registers) [__sparc__]:
5021 Correct ptrace arguments.
5022
c14dfd32
PA
50232012-03-28 Pedro Alves <palves@redhat.com>
5024
5025 * linux-ia64-low.c (ia64_regmap): Map IA64_EC_REGNUM to PT_AR_EC.
5026 (IA64_GR0_REGNUM, IA64_FR0_REGNUM)
5027 (IA64_FR1_REGNUM): New defines.
5028 (ia64_fetch_register): New.
5029 (the_low_target): Install it.
5030 * linux-low.h (struct linux_target_ops) <fetch_register>: New
5031 field.
5032 * linux-low.c (linux_fetch_registers): Try the
5033 the_low_target.fetch_register hook first.
5034
5035 * linux-arm-low.c (the_low_target): Adjust.
5036 * linux-bfin-low.c (the_low_target): Adjust.
5037 * linux-cris-low.c (the_low_target): Adjust.
5038 * linux-crisv32-low.c (the_low_target): Adjust.
5039 * linux-m32r-low.c (the_low_target): Adjust.
5040 * linux-m68k-low.c (the_low_target): Adjust.
5041 * linux-mips-low.c (the_low_target): Adjust.
5042 * linux-ppc-low.c (the_low_target): Adjust.
5043 * linux-s390-low.c (the_low_target): Adjust.
5044 * linux-sh-low.c (the_low_target): Adjust.
5045 * linux-sparc-low.c (the_low_target): Adjust.
5046 * linux-tic6x-low.c (the_low_target): Adjust.
5047 * linux-x86-low.c (the_low_target): Adjust.
5048 * linux-xtensa-low.c (the_low_target): Adjust.
5049
63c88e13
PA
50502012-03-26 Pedro Alves <palves@redhat.com>
5051
5052 * server.c (handle_qxfer_libraries): Don't bail early if
5053 the_target->qxfer_libraries_svr4 is not NULL.
5054
fb723180
PA
50552012-03-26 Pedro Alves <palves@redhat.com>
5056
5057 * linux-low.c (linux_qxfer_libraries_svr4): Fix pasto in comment.
5058
0afae3cf
PA
50592012-03-23 Pedro Alves <palves@redhat.com>
5060
5061 * linux-low.c (linux_qxfer_libraries_svr4): Terminate the
5062 "library-list-svr4" element's start tag when the the DSO list is
5063 empty.
5064
485f1ee4
PA
50652012-03-23 Pedro Alves <palves@redhat.com>
5066
5067 * linux-low.c (read_one_ptr): Read the inferior's pointer through
5068 a variable whose type size is the same as the inferior's pointer
5069 size.
5070
a5362b9a
TS
50712012-03-21 Thomas Schwinge <thomas@codesourcery.com>
5072
5073 * linux-arm-low.c (arm_stopped_by_watchpoint): Use siginfo_t instead of
5074 struct siginfo.
5075 * linux-low.c (siginfo_fixup, linux_xfer_siginfo): Likewise.
5076 * linux-x86-low.c (x86_siginfo_fixup): Likewise.
5077 * linux-low.h: Include <signal.h>.
5078 (struct siginfo): Remove forward declaration.
5079 (struct linux_target_ops) <siginfo_fixup>: Use siginfo_t instead of
5080 struct siginfo.
5081
d226c142
MF
50822012-03-21 Mike Frysinger <vapier@gentoo.org>
5083
5084 * .gitignore: Ignore more files.
5085
122f36ef
PA
50862012-03-19 Pedro Alves <palves@redhat.com>
5087 Jan Kratochvil <jan.kratochvil@redhat.com>
5088
5089 * server.c (cont_thread, general_thread): Add describing comments.
5090 (start_inferior): Clear `cont_thread'.
5091 (handle_v_cont): Don't set `cont_thread' if resuming all threads
5092 of a process.
5093
fc3e5175
YQ
50942012-03-15 Yao Qi <yao@codesourcery.com>
5095
5096 * tracepoint.c (install_tracepoint): Move duplicated tracepoint
5097 handling to ...
5098 (cmd_qtdp): ... here.
5099
8d0d92cd
YQ
51002012-03-15 Yao Qi <yao@codesourcery.com>
5101
5102 * tracepoint.c (struct tracepoint_action_ops): New.
5103 (struct tracepoint_action) [!IN_PROCESS_AGENT] <ops>: New field.
5104 (m_tracepoint_action_download): New.
5105 (r_tracepoint_action_download): New.
5106 (x_tracepoint_action_download): New.
5107 (l_tracepoint_action_download): New.
5108 (add_tracepoint_action): Install `action->ops' according type.
5109 (download_tracepoint_1): Move code `download' function pointer
5110 of various tracepoint_action_ops.
5111
87b0bb13
JK
51122012-03-13 Jan Kratochvil <jan.kratochvil@redhat.com>
5113
5114 * linux-low.c (linux_attach_lwp_1): New variable buffer. Call
5115 linux_ptrace_attach_warnings.
5116
5f572dec
JK
51172012-03-13 Jan Kratochvil <jan.kratochvil@redhat.com>
5118
5119 * Makefile.in (linux-ptrace.o): New.
5120 * configure.srv (arm*-*-linux*, bfin-*-*linux*, crisv32-*-linux*)
5121 (cris-*-linux*, i[34567]86-*-linux*, ia64-*-linux*, m32r*-*-linux*)
5122 (m68*-*-linux*, m68*-*-uclinux*, mips*-*-linux*, powerpc*-*-linux*)
5123 (s390*-*-linux*, sh*-*-linux*, sparc*-*-linux*, tic6x-*-uclinux)
5124 (x86_64-*-linux*, xtensa*-*-linux*): Add linux-ptrace.o to SRV_TGTOBJ
5125 of these targets.
5126 * linux-low.c (linux_attach_lwp_1): Remove redundent else clause.
5127
f4647387
YQ
51282012-03-08 Yao Qi <yao@codesourcery.com>
5129 Pedro Alves <palves@redhat.com>
5130
5131 Fix PR server/13392.
5132 * linux-x86-low.c (amd64_install_fast_tracepoint_jump_pad): Check
5133 offset of JMP insn.
5134 * tracepoint.c (remove_tracepoint): New.
5135 (cmd_qtdp): Call remove_tracepoint when failed to install.
5136
9b224c5e
PA
51372012-03-07 Pedro Alves <palves@redhat.com>
5138
5139 * linux-low.c (get_detach_signal): New.
5140 (linux_detach_one_lwp): Get rid of a pending SIGSTOP with SIGCONT.
5141 Pass on pending signals to PTRACE_DETACH. Check the result of the
5142 ptrace call.
5143 * server.c (program_signals, program_signals_p): New.
5144 (handle_general_set): Handle QProgramSignals.
5145 * server.h (program_signals, program_signals_p): Declare.
5146
e237a7e2
JK
51472012-03-05 Pedro Alves <palves@redhat.com>
5148 Jan Kratochvil <jan.kratochvil@redhat.com>
5149
5150 * linux-low.c (get_dynamic): Don't warn when PT_PHDR isn't found.
5151 New comment why.
5152
5808517f
YQ
51532012-03-03 Yao Qi <yao@codesourcery.com>
5154
5155 * tracepoint.c (tracepoint_look_up_symbols): Update call to
5156 agent_look_up_symbols.
5157
58b4daa5
YQ
51582012-03-03 Yao Qi <yao@codesourcery.com>
5159
5160 * Makefile.in (linux-low.o): Keep dependence on agent.h.
5161 (linux-x86-low.o): Likewise.
5162 * server.h: Remove in_process_agent_loaded.
5163 * tracepoint.c (in_process_agent_loaded): Removed. Moved it
5164 common/agent.c.
5165 Update callers.
5166
8ffcbaaf
YQ
51672012-03-03 Yao Qi <yao@codesourcery.com>
5168
5169 * tracepoint.c (gdb_agent_capability): New global.
5170 (in_process_agent_loaded_ust): Renamed to
5171 `in_process_agent_supports_ust'.
5172 Update callers.
5173 (in_process_agent_supports_ust): Call agent_capability_check.
5174 (clear_installed_tracepoints): Assert that agent supports
5175 agent.
5176
d1feda86
YQ
51772012-03-03 Yao Qi <yao@codesourcery.com>
5178
5179 * linux-low.c (linux_supports_agent): New.
5180 (linux_target_ops): Initialize field `supports_agent' with
5181 linux_supports_agent.
5182 * target.h (struct target_ops) <supports_agent>: New.
5183 (target_supports_agent): New macro.
5184 * server.c (handle_general_set): Handle packet 'QAgent'.
5185 (handle_query): Send `QAgent+'.
5186 * Makefile.in (server.o): Depends on agent.h.
5187
2fa291ac
YQ
51882012-03-03 Yao Qi <yao@codesourcery.com>
5189
5190 * Makefile.in (OBS): Add agent.o.
5191 Add new rule for agent.o.
5192 Track dependence of tracepoint.c on agent.h.
5193 * tracepoint.c (run_inferior_command_1):
5194 (run_inferior_command): Call agent_run_command.
5195 (gdb_ust_connect_sync_socket): Deleted. Move it to
5196 common/agent.c.
5197 (resume_thread, stop_thread): Likewise.
5198 (gdb_ust_socket_init): Renamed to ...
5199 (gdb_agent_socket_init): ... New.
5200 (gdb_ust_thread): Renamed to ...
5201 (gdb_agent_helper_thread): ... New.
5202 (gdb_ust_init): Move some code to ...
5203 (gdb_agent_init): ... here. New.
5204 [HAVE_UST]: Call gdb_ust_init.
5205 (initialize_tracepoint_ftlib): Call gdb_agent_init.
5206 * configure.ac: Add `sys/un.h' to AC_CHECK_HEADERS.
5207 * config.in, configure: Regenerated.
5208
05044653
PA
52092012-03-02 Pedro Alves <palves@redhat.com>
5210
5211 * inferiors.c (add_pid_to_list, pull_pid_from_list): Delete.
5212 * linux-low.c (struct simple_pid_list): New.
5213 (stopped_pids): New a struct simple_pid_list pointer.
5214 (add_to_pid_list, pull_pid_from_list): New.
5215 (handle_extended_wait): Don't assume the first signal new children
5216 report is SIGSTOP. Adjust call to pull_pid_from_list.
5217 (linux_wait_for_lwp): Adjust.
5218
8d00225b
YQ
52192012-03-02 Yao Qi <yao@codesourcery.com>
5220
5221 * tracepoint.c (do_action_at_tracepoint): Write `stop_pc' in
5222 debug log.
5223
19560ba5
YQ
52242012-03-02 Yao Qi <yao@codesourcery.com>
5225
5226 * tracepoint.c (collect_ust_data_at_tracepoint): Remove parameters
5227 `stop_pc' and `tpoint'. Update caller.
5228
1faeff08
MR
52292012-03-01 Maciej W. Rozycki <macro@codesourcery.com>
5230
5231 * linux-low.h (linux_target_ops): Add regset_bitmap member.
5232 * linux-low.c (use_linux_regsets): New macro.
5233 [!HAVE_LINUX_REGSETS] (regsets_fetch_inferior_registers): Likewise.
5234 [!HAVE_LINUX_REGSETS] (regsets_store_inferior_registers): Likewise.
5235 (linux_register_in_regsets): New function.
5236 (usr_fetch_inferior_registers): Skip registers covered by
5237 regsets.
5238 (usr_store_inferior_registers): Likewise.
5239 (usr_fetch_inferior_registers): New macro.
5240 (usr_store_inferior_registers): Likewise.
5241 (linux_fetch_registers): Handle mixed regset/non-regset targets.
5242 (linux_store_registers): Likewise.
5243 * linux-mips-low.c (init_registers_mips_dsp_linux): New
5244 prototype.
5245 (init_registers_mips64_dsp_linux): Likewise.
5246 (init_registers_mips_linux): New macro.
5247 (init_registers_mips_dsp_linux): Likewise.
5248 (mips_dsp_num_regs): Likewise.
5249 (DSP_BASE, DSP_CONTROL): New fallback macros.
5250 (mips_base_regs): New macro.
5251 (mips_regmap): Use it. Fix the size.
5252 (mips_dsp_regmap): New variable.
5253 (mips_dsp_regset_bitmap): Likewise.
5254 (mips_arch_setup): New function.
5255 (mips_cannot_fetch_register): Use the_low_target.regmap rather
5256 than mips_regmap.
5257 (mips_cannot_store_register): Likewise.
5258 (the_low_target): Update .arch_setup, .num_regs and .regmap
5259 initializers. Add .regset_bitmap initializer.
5260 * linux-arm-low.c (the_low_target): Add .regset_bitmap
5261 initializer.
5262 * linux-bfin-low.c (the_low_target): Likewise.
5263 * linux-cris-low.c (the_low_target): Likewise.
5264 * linux-crisv32-low.c (the_low_target): Likewise.
5265 * linux-ia64-low.c (the_low_target): Likewise.
5266 * linux-m32r-low.c (the_low_target): Likewise.
5267 * linux-m68k-low.c (the_low_target): Likewise.
5268 * linux-ppc-low.c (the_low_target): Likewise.
5269 * linux-s390-low.c (the_low_target): Likewise.
5270 * linux-sh-low.c (the_low_target): Likewise.
5271 * linux-sparc-low.c (the_low_target): Likewise.
5272 * linux-tic6x-low.c (the_low_target): Likewise.
5273 * linux-x86-low.c (the_low_target): Likewise.
5274 * linux-xtensa-low.c (the_low_target): Likewise.
5275 * configure.srv <mips*-*-linux*>: Add mips-dsp-linux.o and
5276 mips64-dsp-linux.o to srv_regobj. Add mips-dsp-linux.xml,
5277 mips64-dsp-linux.xml, mips-dsp.xml and mips64-dsp.xml to
5278 srv_xmlfiles.
5279 * Makefile.in (mips-dsp-linux.o, mips-dsp-linux.c): New targets.
5280 (mips64-dsp-linux.o, mips64-dsp-linux.c): Likewise.
5281
c03e6ccc
YQ
52822012-02-29 Yao Qi <yao@codesourcery.com>
5283 Pedro Alves <palves@redhat.com>
5284
5285 * linux-low.c: (linux_wait_1): Call unsuspend_all_lwps when
5286 `step_over_finished' is true.
5287
644cebc9
PA
52882012-02-27 Pedro Alves <palves@redhat.com>
5289
5290 * linux-low.c (pid_is_stopped): Delete, moved to common/.
5291 (linux_attach_lwp_1): Adjust to use linux_proc_pid_is_stopped.
5292
c14d7ab2
PA
52932012-02-27 Pedro Alves <palves@redhat.com>
5294
5295 PR server/9684
5296 * linux-low.c (pid_is_stopped): New.
5297 (linux_attach_lwp_1): Handle attaching to 'T (stopped)' processes.
5298
412c89dd
LM
52992012-02-25 Luis Machado <lgustavo@codesourcery.com>
5300
5301 * mem-break.c (clear_gdb_breakpoint_conditions): Fix de-allocation
5302 of conditions.
5303
b745defe
MR
53042012-02-24 Maciej W. Rozycki <macro@codesourcery.com>
5305
5306 * linux-mips-low.c (mips_regmap): Correct the index of $f9.
5307
9f3a5c85
LM
53082012-02-24 Luis Machado <lgustavo@codesourcery>
5309
5310 * server.c (handle_query): Advertise support for target-side
5311 breakpoint condition evaluation.
5312 (process_point_options): New function.
5313 (process_serial_event): When inserting a breakpoint, check for
5314 a target-side condition that should be evaluated.
5315
5316 * mem-break.c: Include regcache.h and ax.h.
5317 (point_cond_list_t): New data structure.
5318 (breakpoint) <cond_list>: New field.
5319 (find_gdb_breakpoint_at): Make non-static.
5320 (delete_gdb_breakpoint_at): Clear any target-side
5321 conditions.
5322 (clear_gdb_breakpoint_conditions): New function.
5323 (add_condition_to_breakpoint): Likewise.
5324 (add_breakpoint_condition): Likewise.
5325 (gdb_condition_true_at_breakpoint): Likewise.
5326 (gdb_breakpoint_here): Return result directly instead
5327 of going through a local variable.
5328
5329 * mem-break.h (find_gdb_breakpoint_at): New prototype.
5330 (clear_gdb_breakpoint_conditions): Likewise.
5331 (add_breakpoint_condition): Likewise.
5332 (gdb_condition_true_at_breakpoint): Likewise.
5333
5334 * linux-low.c (linux_wait_1): Evaluate target-side breakpoint condition.
5335 (need_step_over_p): Take target-side breakpoint condition into
5336 consideration.
5337
5e1dc496
LM
53382012-02-24 Luis Machado <lgustavo@codesourcery>
5339
5340 * server.h: Include tracepoint.h.
5341 (agent_mem_read, agent_get_trace_state_variable_value,
5342 agent_set_trace_state_variable_value,
5343 agent_tsv_read, agent_mem_read_string, get_get_tsv_func_addr,
5344 get_set_tsv_func_addr): New prototypes.
5345
5346 * ax.h: New include file.
5347 * ax.c: New source file.
5348
5349 * tracepoint.c: Include ax.h.
5350 (gdb_agent_op, gdb_agent_op_names, gdb_agent_op_sizes,
5351 agent_expr, eval_result_type): Move to ax.h.
5352 (parse_agent_expr): Rename to ...
5353 (gdb_parse_agent_expr): ... this, make it non-static and move
5354 to ax.h.
5355 (unparse_agent_expr) Rename to ...
5356 (gdb_unparse_agent_expr): ... this, make it non-static and move
5357 to ax.h.
5358 (eval_agent_expr): Rename to ...
5359 (eval_tracepoint_agent_expr): ... this.
5360 (agent_mem_read, agent_mem_read_string, agent_tsv_read): Remove
5361 forward declarations.
5362 (add_tracepoint_action): Call gdb_parse_agent_expr (...).
5363 (agent_get_trace_state_variable_value): New function.
5364 (agent_set_trace_state_variable_value): New function.
5365 (cmd_qtdp): Call gdb_parse_agent_expr (...).
5366 (response_tracepoint): Call gdb_unparse_agent_expr (...).
5367 (do_action_at_tracepoint): Call eval_tracepoint_agent_expr (...).
5368 (condition_true_at_tracepoint): Likewise.
5369 (parse_agent_expr): Rename to ...
5370 (gdb_parse_agent_expr): ... this and move to ax.c.
5371 (unparse_agent_expr): Rename to ...
5372 (gdb_unparse_agent_expr): ... this and move to ax.c.
5373 (gdb_agent_op_name): Move to ax.c.
5374 (eval_agent_expr): Rename to ...
5375 (gdb_eval_agent_expr): ... this, use regcache passed as parameter
5376 and move to ax.c.
5377 (eval_tracepoint_agent_expr): New function.
5378 (agent_mem_read, agent_mem_read_string, agent_tsv_read): Make
43aaf8b6 5379 non-static.
5e1dc496
LM
5380 (current_insn_ptr, emit_error, struct bytecode_address): Move to
5381 ax.c.
5382 (emit_prologue, emit_epilogue, emit_add, emit_sub, emit_mul, emit_lsh,
5383 emit_rsh_signed, emit_rsh_unsigned, emit_ext, emit_log_not,
5384 emit_bit_and, emit_bit_or, emit_bit_xor, emit_bit_not, emit_equal,
5385 emit_less_signed, emit_less_unsigned, emit_ref, emit_if_goto,
5386 emit_goto, write_goto_address, emit_const, emit_reg, emit_pop,
5387 emit_stack, emit_zero_ext, emit_swap, emit_stack_adjust,
5388 emit_int_call_1, emit_void_call_2, emit_eq_goto, emit_ne_goto,
5389 emit_lt_goto, emit_ge_goto, emit_gt_goto, emit_le_goto): Move to ax.c.
5390 (get_get_tsv_func_addr, get_set_tsv_func_addr): New functions.
5391 (compile_bytecodes): Remove forward declaration.
5392 (is_goto_target): Move to ax.c.
5393 (compile_bytecodes): Move to ax.c and call
5394 agent_get_trace_state_variable_value (...) and
5395 agent_set_trace_state_variable_value (...).
5396
5397 * Makefile.in: Update ax.c and IPA dependencies.
5398
277e4e52
PA
53992012-02-24 Pedro Alves <palves@redhat.com>
5400
5401 * tracepoint.c (cmd_bigqtbuffer): Rename as ...
5402 (cmd_bigqtbuffer_circular): ... this. Only handle
5403 'QTBuffer:circular:'.
5404 (handle_tracepoint_general_set): Adjust.
5405
bf4c19f7
YQ
54062012-02-16 Yao Qi <yao@codesourcery.com>
5407
5408 * inferiors.c: Move code to ...
5409 * dll.c: .... here. New.
5410 * server.h: Declare clear_dlls.
5411 * Makefile.in (SFILES): Add dll.c.
5412 (OBS): Add dll.o
5413 (dll.o): New rule.
5414
d73f2619
YQ
54152012-02-11 Yao Qi <yao@codesourcery.com>
5416
5417 * server.c: (handle_monitor_command): Add a new parameter
5418 `own_buf'.
5419 (handle_query): Update caller.
5420
f8255c2a
JB
54212012-02-09 Joel Brobecker <brobecker@adacore.com>
5422
5423 * configure.ac: Add readlink to AC_CHECK_FUNCS list.
5424 * configure, config.in: Regenerate.
5425 * hostio.c: Provide an alternate implementation if HAVE_READLINK
5426 is not defined.
5427
da84f473
PA
54282012-02-02 Pedro Alves <palves@redhat.com>
5429
5430 Try SIGKILL first, then PTRACE_KILL.
5431 * linux-low.c (linux_kill_one_lwp): New.
5432 (linux_kill_one_lwp): Rename to ...
5433 (kill_one_lwp_callback): ... this. Use the new
5434 linux_kill_one_lwp.
5435
e886a173
PA
54362012-02-02 Pedro Alves <palves@redhat.com>
5437
5438 * tracepoint.c (cmd_qtminftpilen): Return 0 if there's no current
5439 inferior.
5440
be07f1a2
PA
54412012-01-27 Pedro Alves <palves@redhat.com>
5442
5443 * linux-low.c (linux_child_pid_to_exec_file): Delete.
5444 (elf_64_file_p): Make static.
5445 (linux_pid_exe_is_elf_64_file): New.
5446 * linux-low.h (linux_child_pid_to_exec_file, elf_64_file_p):
5447 Delete declarations.
5448 (linux_pid_exe_is_elf_64_file): Declare.
5449 * linux-x86-low.c (x86_arch_setup): Use
5450 linux_pid_exe_is_elf_64_file.
5451
d8301ad1
JK
54522012-01-25 Jan Kratochvil <jan.kratochvil@redhat.com>
5453
5454 * linux-low.c (linux_wait_for_event_1): Rename to ...
5455 (linux_wait_for_event): ... here and merge it with former
5456 linux_wait_for_event - new variable wait_ptid, use it.
5457 (linux_wait_for_event): Remove - merge it to linux_wait_for_event_1.
5458
01b17894
PA
54592012-01-23 Pedro Alves <palves@redhat.com>
5460
5461 * server.c (main): Avoid yet another case of infinite loop while
5462 detaching/killing after a longjmp.
5463
e825046f
JK
54642012-01-20 Jan Kratochvil <jan.kratochvil@redhat.com>
5465
5466 Code cleanup.
5467 * linux-low.c (linux_wait_for_event_1): Use ptid_is_pid.
5468
b9e7b9c3
UW
54692012-01-20 Ulrich Weigand <ulrich.weigand@linaro.org>
5470
5471 * hostio.c (handle_readlink): New function.
5472 (handle_vFile): Call it to handle "vFile:readlink" packets.
5473
901f9912
UW
54742012-01-20 Pedro Alves <palves@redhat.com>
5475 Ulrich Weigand <ulrich.weigand@linaro.org>
5476
5477 * server.c (handle_v_requests): Only support vAttach and vRun to
5478 start multiple processes when in extended protocol mode.
5479
fc1ab1a0
PA
54802012-01-17 Pedro Alves <palves@redhat.com>
5481
5482 * tracepoint.c (initialize_tracepoint): Use mmap instead of
5483 memalign plus mprotect to allocate the scratch buffer.
5484
7d5d4e98
PA
54852012-01-13 Pedro Alves <palves@redhat.com>
5486
5487 * server.c (attach_inferior): Clear `cont_thread'.
5488
f128d5e9
PA
54892012-01-13 Pedro Alves <palves@redhat.com>
5490
5491 * server.c (main): Avoid infinite loop while detaching/killing
5492 after a longjmp.
5493
06db92f0
DE
54942012-01-09 Doug Evans <dje@google.com>
5495
5496 * server.c (start_inferior): Set last_ptid in --wrapper case.
5497
32d92999
YQ
54982012-01-06 Yao Qi <yao@codesourcery.com>
5499
5500 * tracepoint.c [IN_PROCESS_AGENT] (debug_threads): Macro
5501 defined.
5502 [IN_PROCESS_AGENT] (debug_agent): New global variable.
5503
5e0a92a9
YQ
55042012-01-04 Yao Qi <yao@codesourcery.com>
5505
5506 * tracepoint.c (cmd_qtdp): Print debug message
5507 for static tracepoint.
5508
ae639e8c
YQ
55092012-01-04 Yao Qi <yao@codesourcery.com>
5510
5511 * tracepoint.c (trace_vdebug): Differentiate debug message
5512 between gdbserver and IPA.
5513
f72429c5
YQ
55142012-01-03 Yao Qi <yao@codesourcery.com>
5515
5516 * tracepoint.c (tracepoint_was_hit): Don't collect for
5517 static tracepoint.
5518
12c3e59c
JB
55192012-01-02 Joel Brobecker <brobecker@adacore.com>
5520
5521 * terminal.h: Reformat copyright header.
5522
67827812
JB
55232012-01-02 Joel Brobecker <brobecker@adacore.com>
5524
5525 * server.c (gdbserver_version): Update copyright year.
5526 * gdbreplay.c (gdbreplay_version): Likewise.
5527
3e52c33d
JK
55282011-12-18 Jan Kratochvil <jan.kratochvil@redhat.com>
5529
5530 * linux-low.c (linux_create_inferior): Put empty if clause for write.
5531
5532 Revert:
5533 2011-12-18 Hui Zhu <teawater@gmail.com>
5534 * linux-low.c (linux_create_inferior): Save return value to ret.
5535
66f1260e
HZ
55362011-12-18 Hui Zhu <teawater@gmail.com>
5537
5538 * linux-low.c (linux_create_inferior): Save return value to ret.
5539
e77616d7
DE
55402011-12-16 Doug Evans <dje@google.com>
5541
e7b06c57
DE
5542 * linux-low.c (linux_create_inferior): If stdio connection,
5543 redirect stdin from /dev/null, stdout to stderr.
5544 * remote-utils.c (remote_is_stdio): New static global.
5545 (remote_connection_is_stdio): New function.
5546 (remote_prepare): Handle stdio connection.
5547 (remote_open): Ditto.
5548 (remote_close): Don't close stdin for stdio connections.
5549 (read_prim,write_prim): New functions. Replace all calls to
5550 read/write to these.
5551 * server.c (main): Watch for "-" argument. Move call to
5552 remote_prepare before start_inferior.
5553 * server.h (STDIO_CONNECTION_NAME): New macro.
5554 (remote_connection_is_stdio): Declare.
5555
e77616d7
DE
5556 * remote-utils.c (prepare_resume_reply): Remove extraneous \n
5557 in debugging output.
5558
82067193
YQ
55592011-12-15 Yao Qi <yao@codesourcery.com>
5560
5561 * tracepoint.c: Include sys/syscall.h.
5562 (gdb_ust_thread): Remove preprocessor conditional.
5563
82bfbe7e
PA
55642011-12-14 Pedro Alves <pedro@codesourcery.com>
5565
5566 * linux-low.c (linux_detach_one_lwp): Call
5567 the_low_target.prepare_to_resume before detaching.
5568
712c6575
YQ
55692011-12-14 Yao Qi <yao@codesourcery.com>
5570
5571 * tracepoint.c (gdb_ust_thread): Don't ignore return value
5572 of write.
5573
d54d1edf
YQ
55742011-12-14 Yao Qi <yao@codesourcery.com>
5575
5576 * i386-low.c (i386_low_stopped_data_address): Initialize local
5577 variable `control'.
5578
6210a125
PA
55792011-12-13 Pedro Alves <pedro@codesourcery.com>
5580
5581 PR remote/13492
5582
5583 * i386-low.c (i386_low_stopped_data_address): Avoid fetching
5584 DR_CONTROL unless necessary. Extend comments.
5585 * linux-x86-low.c (x86_linux_prepare_to_resume): Don't write to
5586 DR0-3 if not used. If any watchpoint was set, clear DR_STATUS.
5587
2ece8244
YQ
55882011-12-13 Yao Qi <yao@codesourcery.com>
5589
5590 * tracepoint.c (trace_buffer_alloc): Replace magic numbers with
5591 macros.
5592 (upload_fast_traceframes, upload_fast_traceframes): Likewise.
5593
784867a5
JK
55942011-12-08 Jan Kratochvil <jan.kratochvil@redhat.com>
5595
5596 * linux-low.c (linux_kill): Skip PTRACE_KILL if LWP does not exist.
5597 Print new debug message for such case.
5598
6bf36717
JK
55992011-12-06 Jan Kratochvil <jan.kratochvil@redhat.com>
5600
5601 Fix overlapping memcpy.
5602 * mem-break.c (set_raw_breakpoint_at): New variable buf. Use it for
5603 the read_inferior_memory transfer.
5604 (delete_fast_tracepoint_jump): New variable buf. Use it for the
5605 write_inferior_memory transfer.
5606 (set_fast_tracepoint_jump): New variable buf. Use it for the
5607 read_inferior_memory and write_inferior_memory transfers.
5608 (uninsert_fast_tracepoint_jumps_at, reinsert_fast_tracepoint_jumps_at)
5609 (delete_raw_breakpoint, uninsert_raw_breakpoint): New variable buf.
5610 Use it for the write_inferior_memory transfer.
5611 (check_mem_read, check_mem_write): New gdb_asserts for overlapping
5612 buffers.
5613
50275556
MR
56142011-12-06 Maciej W. Rozycki <macro@codesourcery.com>
5615
5616 * linux-low.c (fetch_register, store_register): Make code
5617 consistent, fix formatting.
5618
7325beb4
MR
56192011-12-06 Maciej W. Rozycki <macro@codesourcery.com>
5620
5621 * linux-low.c (usr_store_inferior_registers): Factor out code
5622 to handle individual registers into...
5623 (store_register): ... this new function.
5624
c642a434
UW
56252011-12-06 Ulrich Weigand <uweigand@de.ibm.com>
5626
5627 * Makefile.in (s390-linux32v1.o, s390-linux32v1.c): New rules.
5628 (s390-linux32v2.o, s390-linux32v2.c): Likewise.
5629 (s390-linux64v1.o, s390-linux64v1.c): Likewise.
5630 (s390-linux64v2.o, s390-linux64v2.c): Likewise.
5631 (s390x-linux64v1.o, s390x-linux64v1.c): Likewise.
5632 (s390x-linux64v2.o, s390x-linux64v2.c): Likewise.
5633 * configure.srv [s390*-*-linux*] (srv_regobj): Add new objects.
5634 (srv_xmlfiles): Add new XML files.
5635
5636 * linux-s390-low.c: Include "elf/common.h", <sys/ptrace.h>,
5637 and <sys/uio.h>.
5638 (PTRACE_GETREGSET, PTRACE_SETREGSET): Define if undefined.
5639 (init_registers_s390_linux32v1): Add prototype.
5640 (init_registers_s390_linux32v2): Likewise.
5641 (init_registers_s390_linux64v1): Likewise.
5642 (init_registers_s390_linux64v2): Likewise.
5643 (init_registers_s390x_linux64v1): Likewise.
5644 (init_registers_s390x_linux64v2): Likewise.
5645 (s390_num_regs): Increment to 52.
5646 (s390_regmap): Add orig_r2 register.
5647 (s390_num_regs_3264): Increment to 68.
5648 (s390_regmap_3264): Add orig_r2 register.
5649 (s390_collect_ptrace_register): Handle orig_r2 register.
5650 (s390_supply_ptrace_register): Likewise.
5651 (s390_fill_last_break): New function.
5652 (s390_store_last_break): Likewise.
5653 (s390_fill_system_call): New function.
5654 (s390_store_system_call): Likewise.
5655 (target_regsets): Handle NT_S390_LAST_BREAK and NT_S390_SYSTEM_CALL
5656 register sets.
5657 (s390_check_regset): New function.
5658 (s390_arch_setup): Check for presence of NT_S390_LAST_BREAK and
5659 NT_S390_SYSTEM_CALL regsets and use appropriate description.
5660 Update target_regsets for available register sets.
5661
2268b414
JK
56622011-12-02 Paul Pluzhnikov <ppluzhnikov@google.com>
5663 Jan Kratochvil <jan.kratochvil@redhat.com>
5664
5665 * linux-low.c (get_phdr_phnum_from_proc_auxv, get_dynamic, get_r_debug)
5666 (read_one_ptr, struct link_map_offsets, linux_qxfer_libraries_svr4):
5667 New.
5668 (struct linux_target_ops): Install linux_qxfer_libraries_svr4.
5669 * linux-low.h (struct process_info_private): New member r_debug.
5670 * server.c (handle_qxfer_libraries): Call
5671 the_target->qxfer_libraries_svr4.
5672 (handle_qxfer_libraries_svr4): New function.
5673 (qxfer_packets): New entry "libraries-svr4".
5674 (handle_query): Check QXFER_LIBRARIES_SVR4 and report libraries-svr4.
5675 * target.h (struct target_ops): New member qxfer_libraries_svr4.
5676 * remote.c (remote_xfer_partial): Call add_packet_config_cmd for
5677 PACKET_qXfer_libraries_svr4.
5678
d6db1fab
UW
56792011-11-30 Ulrich Weigand <uweigand@de.ibm.com>
5680
5681 * linux-s390-low.c (s390_collect_ptrace_register): Fully convert
5682 PSW address/mask between 8-byte and 16-byte formats.
5683 (s390_supply_ptrace_register): Likewise.
5684 (s390_get_pc, s390_set_pc): 4-byte PSW address always includes
5685 basic addressing mode bit.
5686
242f5f1c
SS
56872011-11-24 Stan Shebs <stan@codesourcery.com>
5688
5689 * tracepoint.c (cmd_qtstatus): Use plongest instead of %llx.
5690
f196051f
SS
56912011-11-17 Stan Shebs <stan@codesourcery.com>
5692
5693 * tracepoint.c (struct tracepoint): New field traceframe_usage.
5694 (tracing_start_time): New global.
5695 (tracing_stop_time): New global.
5696 (tracing_user_name): New global.
5697 (tracing_notes): New global.
5698 (tracing_stop_note): New global.
5699 (cmd_qtstart): Set traceframe_usage, start_time.
5700 (stop_tracing): Set stop_time.
5701 (cmd_qtstatus): Report additional status.
5702 (cmd_qtp): New function.
5703 (handle_tracepoint_query): Call it.
5704 (cmd_qtnotes): New function.
5705 (handle_tracepoint_general_set): Call it.
5706 (get_timestamp): Rename from tsv_get_timestamp.
5707
405f8e94
SS
57082011-11-14 Stan Shebs <stan@codesourcery.com>
5709 Kwok Cheung Yeung <kcy@codesourcery.com>
5710
5711 * linux-x86-low.c (small_jump_insn): New.
5712 (i386_install_fast_tracepoint_jump_pad): Add arguments for
5713 trampoline and error message, build a trampoline and issue a small
5714 jump instruction to it.
5715 (x86_install_fast_tracepoint_jump_pad): Add arguments for
5716 trampoline and error message.
5717 (x86_get_min_fast_tracepoint_insn_len): New.
5718 (the_low_target): Add call to x86_get_min_fast_tracepoint_insn_len.
5719 * linux-low.h (struct linux_target_ops): Add arguments to
5720 install_fast_tracepoint_jump_pad operation, add new operation.
5721 * linux-low.c (linux_install_fast_tracepoint_jump_pad): Add
5722 arguments.
5723 (linux_get_min_fast_tracepoint_insn_len): New function.
5724 (linux_target_op): Add new operation.
5725 * tracepoint.c (gdb_trampoline_buffer): New IPA variable.
5726 (gdb_trampoline_buffer_end): Ditto.
5727 (gdb_trampoline_buffer_error): Ditto.
5728 (struct ipa_sym_addresses): Add fields for new IPA variables.
5729 (symbol_list): Add entries for new IPA variables.
5730 (struct tracepoint): Add fields to hold the address range of the
5731 trampoline used by the tracepoint.
5732 (trampoline_buffer_head): New static variable.
5733 (trampoline_buffer_tail): Ditto.
5734 (claim_trampoline_space): New function.
5735 (have_fast_tracepoint_trampoline_buffer): New function.
5736 (clone_fast_tracepoint): Fill in trampoline fields of tracepoint
5737 structure.
5738 (install_fast_tracepoint): Ditto, also add error buffer argument.
5739 (cmd_qtminftpilen): New function.
5740 (handle_tracepoint_query): Add response to qTMinFTPILen packet.
5741 (fast_tracepoint_from_trampoline_address): New function.
5742 (fast_tracepoint_collecting): Handle trampoline as part of jump
5743 pad space.
5744 (set_trampoline_buffer_space): New function.
5745 (initialize_tracepoint): Initialize new IPA variables.
5746 * target.h (struct target_ops): Add arguments to
5747 install_fast_tracepoint_jump_pad operation, add new
5748 get_min_fast_tracepoint_insn_len operation.
5749 (target_get_min_fast_tracepoint_insn_len): New.
5750 (install_fast_tracepoint_jump_pad): Add arguments.
5751 * server.h (IPA_BUFSIZ): Define.
5752 * linux-i386-ipa.c: Include extra header files.
5753 (initialize_fast_tracepoint_trampoline_buffer): New function.
5754 (initialize_low_tracepoint): Call it.
5755 * server.h (set_trampoline_buffer_space): Declare.
5756 (claim_trampoline_space): Ditto.
5757 (have_fast_tracepoint_trampoline_buffer): Ditto.
5758
1e4d1764
YQ
57592011-11-14 Yao Qi <yao@codesourcery.com>
5760
5761 * server.c (handle_query): Handle InstallInTrace for qSupported.
5762 * tracepoint.c (add_tracepoint): Sort list.
5763 (install_tracepoint, download_tracepoint): New.
5764 (cmd_qtdp): Call them to install and download tracepoints.
5765 (sort_tracepoints): Removed.
5766 (cmd_qtstart): Update.
5767
5c73ff4e
YQ
57682011-11-14 Yao Qi <yao@codesourcery.com>
5769
5770 * mem-break.c (inc_ref_fast_tracepoint_jump): New.
5771 * mem-break.h: Declare.
5772 * tracepoint.c (cmd_qtstart): Move some code to ...
5773 (clone_fast_tracepoint, install_fast_tracepoint): ... here.
5774 New.
5775 (download_tracepoints): Move some code to ...
5776 (download_tracepoint_1): ... here. New.
5777
86a30030
YQ
57782011-11-08 Yao Qi <yao@codesourcery.com>
5779
5780 * remote-utils.c (relocate_instruction): A comment fix.
5781
8d26e50c
JB
57822011-11-07 Joel Brobecker <brobecker@adacore.com>
5783
5784 * win32-i386-low.c (dr_status_mirror, dr_control_mirror): Delete.
5785 (i386_dr_low_get_control, i386_dr_low_get_status): Use
5786 dr_status_mirror and dr_control_mirror from debug_reg_state.
5787 (i386_dr_low_get_status): Use debug_reg_state.dr_status_mirror
5788 (i386_initial_stuff): Remove use of deleted globals.
5789 (i386_get_thread_context, i386_set_thread_context,
5790 i386_thread_added): Use dr_status_mirror and dr_control_mirror
5791 from debug_reg_state.
5792
a59306a3
YQ
57932011-11-05 Yao Qi <yao@codesourcery.com>
5794
5795 * tracepoint.c (gdb_collect): Loop over tracepoints of same
5796 address as TPOINT's.
5797
3065dfb6
SS
57982011-11-02 Stan Shebs <stan@codesourcery.com>
5799
5800 * tracepoint.c (agent_mem_read_string): New function.
5801 (eval_agent_expr): Call it for tracenz.
5802 * server.c (handle_query): Report support for tracenz.
5803
fd0d8c7c
YQ
58042011-11-02 Yao Qi <yao@codesourcery.com>
5805
5806 * tracepoint.c (cmd_qtstart): Remove unused local variables.
5807
609086b1
YQ
58082011-11-02 Yao Qi <yao@codesourcery.com>
5809
5810 * target.h: Fix a typo in comment.
5811
b9fd1791
PA
58122011-10-31 Pedro Alves <pedro@codesourcery.com>
5813
5814 * mem-break.c (check_mem_write): Add `myaddr' parameter. Don't
5815 clobber the breakpoints' shadows with fast tracepoint jumps.
5816 * mem-break.h (check_mem_write): Add `myaddr' parameter.
5817 * target.c (write_inferior_memory): Also pass MYADDR down to
5818 check_mem_write.
5819
03583c20
UW
58202011-10-07 Ulrich Weigand <ulrich.weigand@linaro.org>
5821
5822 * configure.ac: Check support for personality routine.
5823 * configure: Regenerate.
5824 * config.in: Likewise.
5825 * linux-low.c: Include <sys/personality.h>.
5826 Define ADDR_NO_RANDOMIZE if necessary.
5827 (linux_create_inferior): Disable address space randomization when
5828 forking inferior, if requested.
5829 (linux_supports_disable_randomization): New function.
5830 (linux_target_ops): Install it.
5831 * server.h (disable_randomization): Declare.
5832 * server.c (disable_randomization): New global variable.
5833 (handle_general_set): Handle QDisableRandomization.
5834 (handle_query): Likewise for qSupported.
5835 (main): Support --disable-randomization and --no-disable-randomization
5836 command line arguments.
5837 * target.h (struct target_ops): Add supports_disable_randomization.
5838 (target_supports_disable_randomization): New macro.
5839
723b724b
MF
58402011-09-29 Mike Frysinger <vapier@gentoo.org>
5841
5842 * linux-low.c (target_loadseg): Add defined PTRACE_GETFDPIC to the
5843 ifdef check.
5844 [PT_GETDSBT] (target_loadmap): Wrap in a defined PT_GETDSBT check.
5845 [!PT_GETDSBT] (target_loadmap): New definition.
5846 (LINUX_LOADMAP, LINUX_LOADMAP_EXEC, LINUX_LOADMAP_INTERP): Define.
5847 (linux_read_loadmap): Change PTRACE_GETDSBT_EXEC to
5848 LINUX_LOADMAP_EXEC, PTRACE_GETDSBT_INTERP to LINUX_LOADMAP_INTERP,
5849 and PT_GETDSBT to LINUX_LOADMAP.
5850 [!PT_GETDSBT] (linux_read_loadmap): Define to NULL.
5851 (linux_target_ops): Delete unnecessary ifdef PT_GETDSBT check.
5852
55329a5c 58532011-09-21 Ulrich Weigand <ulrich.weigand@linaro.org>
71487fd7
UW
5854
5855 * linux-arm-low.c (struct arm_linux_hwbp_cap): Remove.
5856 (arm_linux_hwbp_cap): New static variable.
5857 (arm_linux_get_hwbp_cap): Replace by ...
5858 (arm_linux_init_hwbp_cap): ... this new function.
5859 (arm_linux_get_hw_breakpoint_count): Use arm_linux_hwbp_cap.
5860 (arm_linux_get_hw_watchpoint_count): Likewise.
5861 (arm_linux_get_hw_watchpoint_max_length): Likewise.
5862 (arm_arch_setup): Call arm_linux_init_hwbp_cap.
5863 (arm_prepare_to_resume): Use perror_with_name instead of error.
5864
55329a5c 58652011-09-21 Ulrich Weigand <ulrich.weigand@linaro.org>
09b4ad9f
UW
5866
5867 * linux-arm-low.c: Include <signal.h>.
5868 (PTRACE_GETHBPREGS, PTRACE_SETHBPREGS): Define if necessary.
5869 (struct arm_linux_hwbp_cap): New data type.
5870 (arm_hwbp_type, arm_hwbp_control_t): New typedefs.
5871 (struct arm_linux_hw_breakpoint): New data type.
5872 (MAX_BPTS, MAX_WPTS): Define.
5873 (struct arch_process_info, struct arch_lwp_info): New data types.
5874 (arm_linux_get_hwbp_cap): New function.
5875 (arm_linux_get_hw_breakpoint_count): Likewise.
5876 (arm_linux_get_hw_watchpoint_count): Likewise.
5877 (arm_linux_get_hw_watchpoint_max_length): Likewise.
5878 (arm_hwbp_control_initialize): Likewise.
5879 (arm_hwbp_control_is_enabled): Likewise.
5880 (arm_hwbp_control_is_initialized): Likewise.
5881 (arm_hwbp_control_disable): Likewise.
5882 (arm_linux_hw_breakpoint_equal): Likewise.
5883 (arm_linux_hw_point_initialize): Likewise.
5884 (struct update_registers_data): New data structure.
5885 (update_registers_callback: New function.
5886 (arm_insert_point): Likewise.
5887 (arm_remove_point): Likewise.
5888 (arm_stopped_by_watchpoint): Likewise.
5889 (arm_stopped_data_address): Likewise.
5890 (arm_new_process): Likewise.
5891 (arm_new_thread): Likewise.
5892 (arm_prepare_to_resume): Likewise.
5893 (the_low_target): Register arm_insert_point, arm_remove_point,
5894 arm_stopped_by_watchpoint, arm_stopped_data_address, arm_new_process,
5895 arm_new_thread, and arm_prepare_to_resume.
5896
6b9801d4
SS
58972011-09-15 Stan Shebs <stan@codesourcery.com>
5898
5899 * server.h (struct emit_ops): Add compare-goto fields.
5900 * tracepoint.c (gdb_agent_op_sizes): New table.
5901 (emit_eq_goto): New function.
5902 (emit_ne_goto): New function.
5903 (emit_lt_goto): New function.
5904 (emit_le_goto): New function.
5905 (emit_gt_goto): New function.
5906 (emit_ge_goto): New function.
5907 (is_goto_target): New function.
5908 (compile_bytecodes): Recognize special cases of compare-goto
5909 combinations and call specialized emitters for them.
5910 * linux-x86-low.c (amd64_emit_eq_goto): New function.
5911 (amd64_emit_ne_goto): New function.
5912 (amd64_emit_lt_goto): New function.
5913 (amd64_emit_le_goto): New function.
5914 (amd64_emit_gt_goto): New function.
5915 (amd64_emit_ge_goto): New function.
5916 (amd64_emit_ops): Add the new functions.
5917 (i386_emit_eq_goto): New function.
5918 (i386_emit_ne_goto): New function.
5919 (i386_emit_lt_goto): New function.
5920 (i386_emit_le_goto): New function.
5921 (i386_emit_gt_goto): New function.
5922 (i386_emit_ge_goto): New function.
5923 (i386_emit_ops): Add the new functions.
5924
bf15cbda
SS
59252011-09-08 Stan Shebs <stan@codesourcery.com>
5926
5927 * linux-x86-low.c (i386_emit_prologue): Save %ebx.
5928 (i386_emit_epilogue): Restore %ebx.
5929
943ca1dd
JZ
59302011-08-31 Jie Zhang <jzhang918@gmail.com>
5931
5932 * server.c (step_thread): Remove definition.
5933 (process_serial_event): Don't handle Hs.
5934 * server.h (step_thread): Remove declaration.
5935 * target.c (set_desired_inferior): Remove use of step_thread.
5936
e3deef73
LM
59372011-08-24 Luis Machado <lgustavo@codesourcery.com>
5938
5939 * linux-low.c: Include linux-procfs.h.
5940 (linux_attach_lwp_1): Update comments.
5941 (linux_attach): Scan for existing threads when attaching to a
5942 process that is the tgid.
5943 * Makefile.in: Update dependencies.
5944
13da1c97
LM
59452011-08-24 Luis Machado <lgustavo@codesourcery.com>
5946
5947 * configure.srv: Add linux-procfs.o dependencies.
5948
881127c9
YQ
59492011-08-14 Yao Qi <yao@codesourcery.com>
5950
5951 * target.h (struct target_ops): Fix indent.
5952 * win32-low.c (win32_target_ops): Fix comment.
5953
58dbd541
YQ
59542011-08-14 Andrew Jenner <andrew@codesourcery.com>
5955 Yao Qi <yao@codesourcery.com>
5956
5957 * Makefile.in (clean): Remove tic6x-*.c files.
5958 (linux-tic6x-low.o, tic6x-c62x-linux.o, tic6x-c64x-linux.o): New rules.
5959 (tic6x-c64xp-linux.o, tic6x-c62x-linux.c, tic6x-c64x-linux.c): Likewise.
5960 (tic6x-c64xp-linux.c): Likewise.
5961 * configure.srv: Add support for tic6x-*-uclinux.
5962 * linux-tic6x-low.c: New.
5963 * linux-low.c (PT_TEXT_ADDR, PT_DATA_ADDR, PT_TEXT_END_ADDR): Define.
5964
78d85199
YQ
59652011-08-14 Andrew Stubbs <ams@codesourcery.com>
5966 Yao Qi <yao@codesourcery.com>
5967
5968 * target.h (struct target_ops): Add read_loadmap.
5969 * linux-low.c (struct target_loadseg): New type.
5970 (struct target_loadmap): New type.
5971 (linux_read_loadmap): New function.
5972 (linux_target_ops): Add linux_read_loadmap.
5973 * server.c (handle_query): Support qXfer:fdpic:read packet.
43aaf8b6
PA
5974 * win32-low.c (win32_target_ops): Initialize field `read_loadmap'
5975 to NULL.
78d85199 5976
a959a88d
EZ
59772011-08-05 Eli Zaretskii <eliz@gnu.org>
5978
5979 * win32-low.c: Include <stdint.h>.
5980
1ced966e
PA
59812011-07-22 Pedro Alves <pedro@codesourcery.com>
5982
5983 * i386-low.c (i386_insert_aligned_watchpoint): Don't pass the info
5984 to the inferior here.
5985 (i386_remove_aligned_watchpoint): Ditto.
5986 (i386_handle_nonaligned_watchpoint): Return immediate on fail to
5987 fit part of the watchpoint in the debug registers.
5988 (i386_update_inferior_debug_regs): New.
5989 (i386_low_insert_watchpoint): Work on a local mirror of the debug
5990 registers, and only update the inferior on success.
5991 (i386_low_remove_watchpoint): Ditto.
5992
d26e3629
KY
59932011-07-22 Kwok Cheung Yeung <kcy@codesourcery.com>
5994
5995 * linux-low.c (compare_ints, unique, list_threads, show_process,
5996 linux_core_of_thread): Delete.
5997 (linux_target_ops): Change linux_core_of_thread to
5998 linux_common_core_of_thread.
5999 (linux_qxfer_osdata): Defer to linux_common_xfer_osdata.
6000 * utils.c (malloc_failure): Change type of argument.
6001 (xmalloc, xrealloc, xcalloc, xsnprintf): Delete.
6002 * Makefile.in (SFILES): Add common/common-utils.c, common/xml-utils.c,
6003 common/linux-osdata.c, common/ptid.c and common/buffer.c.
6004 (OBS): Add xml-utils.o, common-utils.o, ptid.o and buffer.o.
6005 (IPA_OBJS): Add common-utils-ipa.o.
6006 (ptid_h, linux_osdata_h): New macros.
6007 (server_h): Add common/common-utils.h, common/xml-utils.h,
6008 common/buffer.h, common/gdb_assert.h, common/gdb_locale.h and
6009 common/ptid.h.
6010 (common-utils-ipa.o, common-utils.o, xml-utils.o, linux-osdata.o,
6011 ptid.o, buffer.o): New rules.
6012 (linux-low.o): Add common/linux-osdata.h as a dependency.
6013 * configure.srv (srv_tgtobj): Add linux-osdata.o to Linux targets.
6014 * configure.ac: Add AC_HEADER_DIRENT check.
6015 * config.in: Regenerate.
6016 * configure: Regenerate.
6017 * remote-utils.c (xml_escape_text): Delete.
6018 (buffer_grow, buffer_free, buffer_init, buffer_finish,
6019 buffer_xml_printf): Move to common/buffer.c.
6020 * server.c (main): Remove call to initialize_inferiors.
6021 * server.h (struct ptid, ptid_t, minus_one_ptid, null_ptid,
6022 ptid_build, pid_to_ptid, ptid_get_pid, ptid_get_lwp, ptid_get_tid,
6023 ptid_equal, ptid_is_pid, initialize_inferiors, xml_escape_text,
6024 internal_error, gdb_assert, gdb_assert_fail): Delete.
6025 (struct buffer, buffer_grow, buffer_free, buffer_init, buffer_finish,
6026 buffer_xml_printf, buffer_grow_str, buffer_grow_str0): Move to
6027 common/buffer.h.
6028 * inferiors.c (null_ptid, minus_one_ptid, ptid_build, pid_to_ptid,
6029 ptid_get_pid, ptid_get_lwp, ptid_get_tid, ptid_equal, ptid_is_pid,
6030 initialize_inferiors): Delete.
6031
2275a1a7
PA
60322011-07-20 Pedro Alves <pedro@codesourcery.com>
6033
6034 * tracepoint.c (tracepoint_look_up_symbols): Return upon the first
6035 symbol error.
6036
0a5b1e09
PA
60372011-05-31 Pedro Alves <pedro@codesourcery.com>
6038
6039 * linux-x86-low.c (i386_dr_low_get_addr): Fix off by one in
6040 assertion.
6041 * win32-i386-low.c (i386_dr_low_get_addr): Ditto.
6042
6938fd34
YQ
60432011-05-26 Yao Qi <yao@codesourcery.com>
6044
6045 * Makefile.in (thread-db.o): Track dependence to
6046 common/gdb_thread_db.h.
6047 * thread-db.c: include gdb_thread_db.h from right place.
6048
b481f9e0
TT
60492011-05-16 Adrian Cornish <gnu@bluedreamer.com>
6050
6051 * linux-i386-ipa.c (supply_static_tracepoint_registers): Pass
6052 __FILE__ and __LINE__ to internal_error.
6053
98a5dd13
DE
60542011-05-13 Doug Evans <dje@google.com>
6055
6056 * thread-db.c (try_thread_db_load_from_sdir): New function.
6057 (try_thread_db_load_from_dir): New function.
6058 (thread_db_load_search): Handle $sdir, ignore $pdir.
6059 Remove trying of system directories if search of
6060 libthread-db-search-path fails, that is now done via $sdir.
6061
d248b706
KY
60622011-05-12 Kwok Cheung Yeung <kcy@codesourcery.com>
6063
6064 * server.c (handle_query): Add EnableDisableTracepoints to the list
6065 of supported features.
43aaf8b6 6066 * tracepoint.c (clear_installed_tracepoints): Uninstall disabled
d248b706 6067 tracepoints.
43aaf8b6
PA
6068 (cmd_qtenable_disable): New.
6069 (cmd_qtstart): Install tracepoints even if disabled.
6070 (handle_tracepoint_general_set): Add call to cmd_qtenable_disable on
6071 receiving a QTEnable or QTDisable packet.
6072 (gdb_collect): Skip data collection if fast tracepoint is disabled.
6073 (ust_marker_to_static_tracepoint): Do not ignore disabled static
6074 tracepoints.
6075 (gdb_probe): Skip data collection if static tracepoint is disabled.
d248b706 6076
84e578fb
DE
60772011-05-10 Doug Evans <dje@google.com>
6078
6079 * thread-db.c (thread_db_handle_monitor_command): Handle elided path.
6080
71f55dd8
DE
60812011-05-04 Doug Evans <dje@google.com>
6082
6083 * linux-low.c (linux_join): Skip process lookup.
6084 * spu-low.c (spu_join): Ditto.
6085 * server.c (join_inferiors_callback): Delete.
6086 (process_serial_event): For 'D' packet (detach) call join_inferior
6087 directly.
6088
4d393d60
JM
60892011-05-04 Joseph Myers <joseph@codesourcery.com>
6090
6091 * README: Don't mention xscale*-*-linux*.
6092 * configure.srv (xscale*-*-linux*): Don't handle target.
6093
b00ad6ff
NF
60942011-04-27 Nathan Froyd <froydnj@codesourcery.com>
6095
6096 * linux-x86-low.c (amd64_emit_const): Call memcpy instead of
6097 casting pointers.
6098 (amd64_emit_reg, amd64_emit_int_call_1, amd64_emit_void_call_2):
6099 (i386_emit_const, i386_emit_reg, i386_emit_int_call_1):
6100 (i386_emit_void_call_2): Likewise.
6101
af96c192
YQ
61022011-04-26 Yao Qi <yao@codesourcery.com>
6103
43aaf8b6
PA
6104 * linux-low.c: Move common macros to linux-ptrace.h.
6105 Include linux-ptrace.h.
af96c192
YQ
6106 * Makefile.in (linux_ptrace_h): New.
6107 (linux-low.o): Depends on linux-ptrace.h.
6108
03f2bd59
JK
61092011-04-24 Jan Kratochvil <jan.kratochvil@redhat.com>
6110
6111 * remote-utils.c (handle_accept_event): Close LISTEN_DESC only if
6112 RUN_ONCE. Comment for the LISTEN_DESC delete_file_handler call.
6113 (remote_prepare): New function with most of the TCP code from ...
6114 (remote_open): ... here. Detect PORT here unconditionally. Move also
6115 setting transport_is_reliable.
6116 * server.c (run_once): New variable.
6117 (gdbserver_usage): Document it.
6118 (main): Set run_once for `--once'. Call remote_prepare. Exit after
6119 the first run if RUN_ONCE.
6120 * server.h (run_once, remote_prepare): New declarations.
6121
7a9dd1b2
TT
61222011-04-19 Tom Tromey <tromey@redhat.com>
6123
6124 * win32-low.c (handle_load_dll): Remove duplicate "the".
6125
81239425
PM
61262011-04-07 Pierre Muller <muller@ics.u-strasbg.fr>
6127
6128 Remove support for old Cygwin 1.5 versions.
6129 * win32-low.c (win32_create_inferior): Use new cygwin_path_list
6130 function to avoid warning.
6131 (win32_add_one_solib): Use cygwin_conv_path function to avoid
6132 warning.
6133
9e0627f1
PM
61342011-03-18 Pierre Muller <muller@ics.u-strasbg.fr>
6135
6136 * gdbserver/server.h (Macro _): Define it if not available.
6137
588eebee
MS
61382011-03-14 Michael Snyder <msnyder@vmware.com>
6139
348af9f7 6140 * hostio.c (handle_close): Remove unnecessary null test.
588eebee 6141
43f70d4c
JB
61422011-03-10 Joel Brobecker <brobecker@adacore.com>
6143
6144 * Makefile.in (maintainer-clean realclean distclean): Remove
6145 "make ... subdir_do" command.
6146
348af9f7
MS
61472011-03-10 Michael Snyder <msnyder@vmware.com>
6148
6149 * tracepoint.c (tracepoint_finish_step): Fix loop variable.
6150
6151 * server.c (handle_v_run): Free alloced buffer on early return.
6152
e637a4f5
YQ
61532011-03-09 Yao Qi <yao@codesourcery.com>
6154
6155 Revert:
6156 2011-03-04 Yao Qi <yao@codesourcery.com>
6157
6158 * Makefile.in: Remove GNU make feature --directory.
6159
6160 2011-03-05 Yao Qi <yao@codesourcery.com>
6161
6162 * Makefile.in (CLEANDIRS, REQUIRED_SUBDIRS): New variable.
6163 (subdir_do): New make target. Copied from gdb/Makefile.
6164 (maintainer-clean, realclean, distclean, clean): Call corresponding
6165 make targets in common/Makefile.
6166
6167 2011-02-11 Yao Qi <yao@codesourcery.com>
6168
6169 * configure.ac: Call AC_PROG_RANLIB.
6170 * Makefile.in: Remove signals.o from OBS. Link libcommon.a.
6171 * configure: Regenerate.
6172
e6edda56
JK
61732011-03-07 Jan Kratochvil <jan.kratochvil@redhat.com>
6174
6175 * remote-utils.c (putpkt_binary_1): Calculate BUF2 size dynamically.
6176
e5141119
JB
61772011-03-06 Yao Qi <yao@codesourcery.com>
6178
6179 * Makefile.in (REQUIRED_SUBDIRS): Remove $(LIBCOMMON_DIR).
6180
64794aa4
JB
61812011-03-05 Yao Qi <yao@codesourcery.com>
6182
6183 * Makefile.in (CLEANDIRS, REQUIRED_SUBDIRS): New variable.
6184 (subdir_do): New make target. Copied from gdb/Makefile.
6185 (maintainer-clean, realclean, distclean, clean): Call corresponding
6186 make targets in common/Makefile.
6187
7a762829
YQ
61882011-03-04 Yao Qi <yao@codesourcery.com>
6189
6190 * Makefile.in: Remove GNU make feature --directory.
6191
348af9f7
MS
61922011-03-04 Michael Snyder <msnyder@vmware.com>
6193
6194 * server.c (queue_stop_reply): Call xmalloc not malloc.
6195
61962011-03-02 Michael Snyder <msnyder@vmware.com>
6197
6198 * linux-arm-low.c (arm_arch_setup): Replace malloc with xmalloc.
6199
9f72fee2
MS
62002011-02-28 Michael Snyder <msnyder@vmware.com>
6201
588eebee
MS
6202 * tracepoint.c (cmd_qtv): Discard unused value 'packet'.
6203 (cmd_qtframe): Ditto.
6204 (cmd_qtbuffer): Ditto.
6205 (cmd_bigqtbuffer): Ditto.
6206
9f72fee2
MS
6207 * utils.c (decimal2str): Initialize 'width' to nine, then
6208 don't mess with it.
6209
8040bd49
UW
62102011-02-28 Ulrich Weigand <uweigand@de.ibm.com>
6211
6212 * hostio.c (require_data): Free *data, not data.
6213
7e52cbd0
JK
62142011-02-28 Jan Kratochvil <jan.kratochvil@redhat.com>
6215
6216 * hostio.c (require_data): Use free, not xfree.
6217
9130f83e
MS
62182011-02-27 Michael Snyder <msnyder@vmware.com>
6219
4b812f4e
MS
6220 * server.c (handle_query): Discard unused value.
6221
9130f83e
MS
6222 * hostio.c (require_data): Free malloc memory before returning
6223 error.
6224
69d37113
MS
62252011-02-26 Michael Snyder <msnyder@vmware.com>
6226
6227 * linux-low.c (list_threads): Call closedir for dirent.
6228
35f5825a
MS
62292011-02-27 Michael Snyder <msnyder@vmware.com>
6230
2a589cef
MS
6231 * i386-low.c (i386-length_and_rw_bits): Comment the fact that
6232 a case statement falls through.
6233
0adea5f7
MS
6234 * linux-low.c (linux_xfer_siginfo): Fix fencepost error.
6235
35f5825a
MS
6236 * linux-amd64-ipa.c (gdb_agent_get_raw_reg): Fix fencepost error
6237 in comparison.
6238
238f1c74
MS
62392011-02-26 Michael Snyder <msnyder@vmware.com>
6240
6241 * utils.c (decimal2str): Eliminate dead code and dead param.
6242 (pulongest): Drop dead param from call to decimal2str.
6243 (plongest): Ditto.
6244
633ff500
JB
62452011-02-24 Joel Brobecker <brobecker@adacore.com>
6246
6247 Revert the following patch (not approved yet):
6248 2011-02-21 Hui Zhu <teawater@gmail.com>
6249 * tracepoint.c (tp_printf): New function.
6250 (eval_agent_expr): Handle gdb_agent_op_printf.
6251
f9c6ff72
HZ
62522011-02-21 Hui Zhu <teawater@gmail.com>
6253
6254 * tracepoint.c (tp_printf): New function.
6255 (eval_agent_expr): Handle gdb_agent_op_printf.
6256
94d5e490
TT
62572011-02-18 Tom Tromey <tromey@redhat.com>
6258
6259 * Makefile.in (tracepoint-ipa.o): Depend on ax.def.
6260 (tracepoint.o): Likewise.
6261 * tracepoint.c (enum gdb_agent_op): Use ax.def.
6262 (gdb_agent_op_names): Likewise.
6263
c7f96d2b
TT
62642011-02-18 Tom Tromey <tromey@redhat.com>
6265
6266 * tracepoint.c (enum gdb_agent_op) <gdb_agent_op_pick,
6267 gdb_agent_op_rot>: New constants.
6268 (gdb_agent_op_names): Add pick and roll.
6269 (eval_agent_expr) <gdb_agent_op_pick, gdb_agent_op_rot>: New
6270 cases.
6271
0feedb2c
JK
62722011-02-15 Jan Kratochvil <jan.kratochvil@redhat.com>
6273
6274 * aclocal.m4: Regenerated with aclocal-1.11.1.
6275
b3b9301e
PA
62762011-02-14 Pedro Alves <pedro@codesourcery.com>
6277
6278 * server.c (handle_qxfer_traceframe_info): New.
6279 (qxfer_packets): Register "traceframe-info".
6280 (handle_query): Report support for qXfer:traceframe-info:read+.
6281 * tracepoint.c (match_blocktype): New.
6282 (traceframe_find_block_type): Rename to ...
6283 (traceframe_walk_blocks): ... this. Add callback filter argument,
6284 and use it.
6285 (traceframe_find_block_type): New, reimplemented on top of
6286 traceframe_walk_blocks.
6287 (build_traceframe_info_xml): New.
6288 (traceframe_read_info): New.
6289 * server.h (traceframe_read_info): Declare.
6290
4f3e6fb7
YQ
62912011-02-11 Yao Qi <yao@codesourcery.com>
6292
6293 * configure.ac: Call AC_PROG_RANLIB.
6294 * Makefile.in: Remove signals.o from OBS. Link libcommon.a.
6295 * configure: Regenerate.
6296
764880b7
PA
62972011-02-07 Pedro Alves <pedro@codesourcery.com>
6298
6299 * server.c (gdb_read_memory): Change return semantics to allow
6300 partial transfers.
6301 (handle_search_memory_1): Adjust.
6302 (process_serial_event) <'m' packet>: Handle partial transfers.
6303 * tracepoint.c (traceframe_read_mem): Handle partial transfers.
6304
1c79eb8a
PA
63052011-01-28 Pedro Alves <pedro@codesourcery.com>
6306
6307 * regcache.c (init_register_cache): Initialize
6308 regcache->register_status.
6309 (free_register_cache): Release regcache->register_status.
6310 (regcache_cpy): Copy register_status.
6311 (registers_to_string): Print 'x's for unavailable registers.
6312 (supply_register): Mark the register's status valid or
6313 unavailable, depending on whether a buffer was passed in or not.
6314 (supply_register_zeroed): New.
6315 (supply_regblock): Mark the registers' status valid or
6316 unavailable, depending on whether a buffer was passed in or not.
6317 * regcache.h (REG_UNAVAILABLE, REG_VALID): New defines.
6318 (struct regcache): New `register_status' field.
6319 (supply_register_zeroed): Declare.
6320 * i387-fp.c (i387_xsave_to_cache): Zero out registers using
6321 supply_register_zeroed, rather than passing a NULL buffer to
6322 supply_register.
6323 * tracepoint.c (fetch_traceframe_registers): Update comment.
6324
85724a0e
PA
63252011-01-28 Pedro Alves <pedro@codesourcery.com>
6326
6327 * i387-fp.c (i387_xsave_to_cache): Make passing NULL as register
6328 buffer explicit.
6329
d08aafef
PA
63302011-01-25 Pedro Alves <pedro@codesourcery.com>
6331
6332 * server.h (decode_xfer_write): Change prototype.
6333 * remote-utils.c (decode_xfer_write): Remove `annex' parameter,
6334 and don't extract the annex here.
6335 * server.c (decode_xfer_read): Remove `annex' parameter,
6336 and don't extract the annex here.
6337 (decode_xfer): New.
6338 (struct qxfer): New.
6339 (handle_qxfer_auxv, handle_qxfer_features, handle_qxfer_libraries)
6340 (handle_qxfer_osdata, handle_qxfer_siginfo, handle_qxfer_spu)
6341 (handle_qxfer_statictrace): New functions, abstracted out from
6342 handle_query, and made to use the struct qxfer interface.
6343 (handle_threads_qxfer_proper): Rename to ...
6344 (handle_qxfer_threads_proper): ... this.
6345 (handle_threads_qxfer): Rename to ...
6346 (handle_qxfer_threads): ... this. Adjust.
6347 (qxfer_packets): New array.
6348 (handle_qxfer): New function.
6349 (handle_query): Use handle_qxfer.
6350
493e2a69
MS
63512011-01-05 Michael Snyder <msnyder@msnyder-server.eng.vmware.com>
6352
6353 * gdbreplay.c: Shorten lines of >= 80 columns.
6354 * linux-low.c: Ditto.
6355 * linux-ppc-low.c: Ditto.
6356 * linux-s390-low.c: Ditto.
6357 * linux-sparc-low.c: Ditto.
6358 * linux-x86-low.c: Ditto.
6359 * linux-xtensa-low.c: Ditto.
6360 * mem-break.c: Ditto.
6361 * nto-low.c: Ditto.
6362 * regcache.h: Ditto.
6363 * remote-utils.c: Ditto.
6364 * server.c: Ditto.
6365 * server.h: Ditto.
6366 * thread-db.c: Ditto.
6367 * tracepoint.c: Ditto.
6368 * utils.c: Ditto.
6369 * win32-low.h: Ditto.
6370
44944448
JB
63712011-01-05 Joel Brobecker <brobecker@adacore.com>
6372
6373 * gdbserver/configure.ac, gdbserver/gdbserver.1: Copyright year
6374 update.
6375
71ce852c
JB
63762011-01-01 Joel Brobecker <brobecker@adacore.com>
6377
6378 * server.c (gdbserver_version): Update copyright year in version
6379 output.
6380 * gdbreplay.c (gdbreplay_version): Ditto.
6381
eb826dc6
MF
63822010-12-29 Jie Zhang <jie.zhang@analog.com>
6383
6384 * configure.srv (bfin-*-*linux*): Handle Blackfin/Linux targets.
6385 * linux-bfin-low.c: New file.
6386 * linux-low.c: Define PT_TEXT_ADDR, PT_TEXT_END_ADDR, and
6387 PT_DATA_ADDR for BFIN targets.
6388 * Makefile.in (SFILES): Add linux-bfin-low.c.
6389 (clean): Remove reg-bfin.c.
6390 (linux-bfin-low.o, reg-bfin.o, reg-bfin.c): New targets.
6391 * README: Mention supported Blackfin targets.
6392
39ab222a
MF
63932010-12-23 Mike Frysinger <vapier@gentoo.org>
6394
6395 * .gitignore: New file.
6396
a1f2ce7d
MF
63972010-11-16 Mike Frysinger <vapier@gentoo.org>
6398
6399 * linux-low.c (linux_tracefork_child): Add char* cast to arg.
6400
f474844c
JZ
64012010-10-22 Jie Zhang <jie@codesourcery.com>
6402
6403 * Makefile.in: Add FLAGS_TO_PASS variable.
6404 (install): Remove dependency of install-only and recursively
6405 invoke make for install-only.
6406
f1048712
DE
64072010-10-04 Doug Evans <dje@google.com>
6408
6409 * Makefile.in (uninstall): Use $(DESTDIR).
6410
b53a1623
PA
64112010-09-24 Pedro Alves <pedro@codesourcery.com>
6412
e6ee044d
PA
6413 PR gdb/11842
6414
b53a1623
PA
6415 * linux-x86-low.c (compat_siginfo_from_siginfo)
6416 (siginfo_from_compat_siginfo): Also copy si_pid and si_uid when
6417 si_code is < 0. Check for si_code == SI_TIMER before checking for
6418 si_code < 0.
6419
fa1bd1e4
JB
64202010-09-13 Joel Brobecker <brobecker@adacore.com>
6421
6422 * lynx-i386-low.c: New file.
6423 * configure.srv: Add handling of i[34567]86-*-lynxos* targets.
6424
47fac8f8
JB
64252010-09-13 Joel Brobecker <brobecker@adacore.com>
6426
6427 * lynx-low.c (ptrace_request_to_str): Remove handling for
6428 request values that have been removed in LynxOS 5.x.
6429
1adfc54d
JB
64302010-09-13 Joel Brobecker <brobecker@adacore.com>
6431
6432 * lynx-low.c, lynx-ppc-loc.c: Include <sys/ptrace.h> instead of
6433 <ptrace.h>
6434
c2a66c29
NS
64352010-09-09 Nathan Sidwell <nathan@codesourcery.com>
6436
6437 * configure.ac: Add --enable-inprocess-agent option.
6438 * configure: Rebuilt.
6439
32fcada3
YQ
64402010-09-06 Yao Qi <yao@codesourcery.com>
6441
6442 * linux-low.c (linux_kill): Remove unused variable.
6443 (linux_stabilize_threads): Likewise.
6444 * server.c (start_inferior): Likewise.
6445 (queue_stop_reply_callback): Likewise.
6446 * tracepoint.c (do_action_at_tracepoint): Likewise.
6447
0cccb683
YQ
64482010-09-06 Yao Qi <yao@codesourcery.com>
6449
6450 * linux-low.c (maybe_move_out_of_jump_pad): Restore current_inferior
6451 on return.
6452
423ec54c
JK
64532010-09-06 Jan Kratochvil <jan.kratochvil@redhat.com>
6454
6455 * target.c (mywait) <TARGET_WAITKIND_EXITED>: Fix to use INTEGER.
6456
12ac6819
PA
64572010-09-06 Pedro Alves <pedro@codesourcery.com>
6458
6459 * Makefile.in (install-only): Replace $IPA_DEPFILES with
6460 "$(IPA_DEPFILES)".
6461
8ed54b31
JB
64622010-09-01 Joel Brobecker <brobecker@adacore.com>
6463
6464 * gdbserver/lynx-low.c, gdbserver/lynx-low.h,
6465 gdbserver/lynx-ppc-low.c: New files.
6466 * Makefile.in (lynx_low_h): New variable.
6467 (lynx-low.o, lynx-ppc-low.o): New rules.
6468 * configure.ac: On LynxOS, link with -lnetinet.
6469 * configure.srv: Add handling of powerpc-*-lynxos* targets.
6470 * configure: regenerate.
6471
bb0116a4
JB
64722010-09-01 Joel Brobecker <brobecker@adacore.com>
6473
6474 * Makefile.in (vasprintf.o, vsnprintf.o): New rules.
6475 * configure.ac: Add check for vasprintf and vsnprintf.
6476 * configure, config.in: Regenerate.
6477 * server.h (vasprintf, vsnprintf): Add conditional declarations.
6478
a778ab81 64792010-09-01 Joel Brobecker <brobecker@adacore.com>
6480
6481 * gdbreplay.c: Move include of alloca.h up, next to include of
6482 malloc.h.
6483 * server.h: Add include of malloc.h.
6484 * mem-break.c: Remove include of malloc.h.
6485 * server.c, tracepoint.c, utils.c, win32-low.c: Likewise.
6486
8b034a19 64872010-09-01 Joel Brobecker <brobecker@adacore.com>
6488
6489 * Makefile.in (memmem.o): Build with -Wno-error.
6490
64912010-09-01 Joel Brobecker <brobecker@adacore.com>
6492
6493 * utils.c (xsnprintf): Make non-static.
6494 * server.h: Add xsnprintf declaration.
6495 * linux-low.c, nto-low.c, target.c, thread-db.c, tracepoint.c:
6496 replace calls to snprintf by calls to xsnprintf throughout.
6497
64982010-09-01 Joel Brobecker <brobecker@adacore.com>
6499
6500 * configure.ac: Add configure check for alloca.
6501 * configure, config.in: Regenerate.
6502 * server.h: Include alloca.h if it exists.
6503 * gdbreplay.c: Include alloca.h if it exists.
6504
1a981360
PA
65052010-08-28 Pedro Alves <pedro@codesourcery.com>
6506
6507 * linux-low.c (__SIGRTMIN): Define if not already defined.
6508 (linux_create_inferior): Check for __ANDROID__ rather than
6509 __SIGRTMIN.
6510 (enqueue_one_deferred_signal): Don't requeue non-RT signals that
6511 are already deferred.
6512 (linux_wait_1): Check for __ANDROID__ rather than __SIGRTMIN.
6513 (linux_resume_one_thread): Don't queue a SIGSTOP if the lwp is
6514 stopped and already has a pending signal to report.
6515 (proceed_one_lwp): : Don't queue a SIGSTOP if the lwp already has
6516 a pending signal to report or is moving out of a jump pad.
6517 (linux_init_signals): Check for __ANDROID__ rather than
6518 __SIGRTMIN.
6519
b4d51a55
PA
65202010-08-28 Pedro Alves <pedro@codesourcery.com>
6521
6522 * linux-low.c (linux_stabilize_threads): Wrap debug output in a
6523 debug_threads check. Avoid a linear search when not doing debug
6524 output.
6525
ec48365d
PA
65262010-08-27 Pedro Alves <pedro@codesourcery.com>
6527
6528 * event-loop.c (event_handle_func): Adjust to use gdb_fildes_t.
6529 (struct gdb_event) <fd>: Change type to gdb_fildes_t.
6530 (struct file_handler) <fd>: Change type to gdb_fildes_t.
6531 (process_event): Change local fd's type to gdb_fildes_t.
6532 (create_file_handler): Adjust prototype.
6533 (delete_file_handler): Adjust prototype.
6534 (handle_file_event): Adjust prototype. Use pfildes.
6535 (create_file_event): Adjsut prototype.
6536 * remote-utils.c (remote_desc, listen_desc): Change type to
6537 gdb_fildes_t.
6538 * server.h: New gdb_fildes_t typedef.
6539 [USE_WIN32API]: Include winsock2.h.
6540 (delete_file_handler, add_file_handler): Adjust prototypes.
6541 (pfildes): Declare.
6542 * utils.c (pfildes): New.
6543
854d88f0
PA
65442010-08-27 Pedro Alves <pedro@codesourcery.com>
6545
6546 * configure.ac (build_warnings): Add -Wno-char-subscripts.
6547 * configure: Regenerate.
6548
0146f85b
PA
65492010-08-27 Pedro Alves <pedro@codesourcery.com>
6550
6551 * linux-low.c (linux_unprepare_to_access_memory): Rename to ...
6552 (linux_done_accessing_memory): ... this.
6553 (linux_target_ops): Adjust.
6554 * linux-x86-low.c (x86_insert_point, x86_remove_point): Adjust.
6555 * nto-low.c (nto_target_ops): Adjust comment.
6556 * server.c (gdb_read_memory, gdb_write_memory): Adjust.
6557 * spu-low.c (spu_target_ops): Adjust comment.
6558 * target.h (target_ops): Rename unprepare_to_access_memory field
6559 to done_accessing_memory.
6560 (unprepare_to_access_memory): Rename to ...
6561 (done_accessing_memory): ... this.
6562
90d74c30
PA
65632010-08-26 Pedro Alves <pedro@codesourcery.com>
6564
6565 * linux-low.c (linux_prepare_to_access_memory): New.
6566 (linux_unprepare_to_access_memory): New.
6567 (linux_target_ops): Install them.
6568 * server.c (read_memory): Rename to ...
6569 (gdb_read_memory): ... this. Use
6570 prepare_to_access_memory/prepare_to_access_memory.
6571 (write_memory): Rename to ...
6572 (gdb_write_memory): ... this. Use
6573 prepare_to_access_memory/prepare_to_access_memory.
6574 (handle_search_memory_1): Adjust.
6575 (process_serial_event): Adjust.
6576 * target.h (struct target_ops): New fields
6577 prepare_to_access_memory and unprepare_to_access_memory.
6578 (prepare_to_access_memory, unprepare_to_access_memory): New.
6579 * linux-x86-low.c (x86_insert_point, x86_remove_point): Use
6580 prepare_to_access_memory/prepare_to_access_memory.
6581 * nto-low.c (nto_target_ops): Adjust.
6582 * spu-low.c (spu_target_ops): Adjust.
6583 * win32-low.c (win32_target_ops): Adjust.
6584
fd467969
PA
65852010-08-26 Pedro Alves <pedro@codesourcery.com>
6586
6587 * Makefile.in (WARN_CFLAGS): Get it from configure.
6588 (WERROR_CFLAGS): New.
6589 (INTERNAL_CFLAGS): Add WERROR_CFLAGS.
6590 * configure.ac: Introduce --enable-werror, which adds -Werror to
6591 the compiler command line. Enabled by default. Disable with
6592 --disable-werror. Add -Wdeclaration-after-statement
6593 Wpointer-arith and -Wformat-nonliteral to warning flags.
6594 * configure: Regenerate.
6595
331e2f5f
PA
65962010-08-26 Pedro Alves <pedro@codesourcery.com>
6597
6598 * mem-break.c [HAVE_MALLOC_H]: Include malloc.h.
6599
e581f2b4
PA
66002010-08-26 Pedro Alves <pedro@codesourcery.com>
6601
6602 * gdbreplay.c (remote_error): New.
6603 (gdbchar): New.
6604 (expect): Use gdbchar. Check for error reading from GDB.
6605 Clarify sync error output.
6606 (play): Check for errors writing to GDB.
6607 * linux-low.c (sigchld_handler): Really ignore `write' errors.
6608 * remote-utils.c (getpkt): Check for errors writing to the remote
6609 descriptor.
6610
3c11dd79
PA
66112010-08-25 Pedro Alves <pedro@codesourcery.com>
6612
6613 * linux-low.c (linux_wait_1): Move non-debugging code out of
6614 `debug_threads' control.
6615
d20a8ad9
PA
66162010-08-25 Pedro Alves <pedro@codesourcery.com>
6617
6618 * linux-low.c (linux_wait_1): Don't set last_status here.
6619 * server.c (push_event, queue_stop_reply_callback): Assert we're
6620 not pushing a TARGET_WAITKIND_IGNORE event.
6621 (start_inferior, start_inferior, attach_inferior, handle_v_cont)
6622 (myresume, handle_target_event): Set the thread's last_resume_kind
6623 and last_status from the target returned status.
6624
964e4306
PA
66252010-08-25 Pedro Alves <pedro@codesourcery.com>
6626
6627 PR threads/10729
6628
6629 * linux-x86-low.c (update_debug_registers_callback): New.
6630 (i386_dr_low_set_addr): Use it.
6631 (i386_dr_low_get_addr): New.
6632 (i386_dr_low_set_control): Use update_debug_registers_callback.
6633 (i386_dr_low_get_control): New.
6634 (i386_dr_low_get_status): Adjust.
6635 * linux-low.c (linux_stop_lwp): New.
6636 * linux-low.h (linux_stop_lwp): Declare.
6637
6638 * i386-low.c (I386_DR_GET_RW_LEN): Take the dr7 contents as
6639 argument instead of a i386_debug_reg_state.
6640 (I386_DR_WATCH_HIT): Take the dr6 contents as argument instead of
6641 a i386_debug_reg_state.
6642 (i386_insert_aligned_watchpoint): Adjust.
6643 (i386_remove_aligned_watchpoint): Adjust.
6644 (i386_low_stopped_data_address): Read the debug registers from the
6645 inferior instead of from the mirrors.
6646 * i386-low.h (struct i386_debug_reg_state): Extend comment.
6647 (i386_dr_low_get_addr): Declare.
6648 (i386_dr_low_get_control): Declare.
6649 (i386_dr_low_get_status): Change prototype.
6650
6651 * win32-i386-low.c (dr_status_mirror, dr_control_mirror): New globals.
6652 (i386_dr_low_get_addr): New.
6653 (i386_dr_low_get_control): New.
6654 (i386_dr_low_get_status): Adjust prototype. Return
6655 dr_status_mirror.
6656 (i386_initial_stuff): Clear dr_status_mirror and
6657 dr_control_mirror.
6658 (i386_get_thread_context): Adjust.
6659 (i386_set_thread_context): Adjust.
6660 (i386_thread_added): Adjust.
6661
5f21a75b
PA
66622010-08-24 Pedro Alves <pedro@codesourcery.com>
6663
6664 * linux-low.h (linux_thread_area): Delete declaration.
6665
3e4c1235
TS
66662010-08-11 Thomas Schwinge <thomas@codesourcery.com>
6667
6668 * linux-low.c (linux_wait_1): Correctly return the ptid of the child
6669 after its termination.
6670
1971b033
PA
66712010-08-09 Pedro Alves <pedro@codesourcery.com>
6672
6673 * linux-low.c (gdb_wants_lwp_stopped): Delete.
6674 (gdb_wants_all_stopped): Delete.
6675 (linux_wait_1): Don't call them.
6676 * server.c (handle_v_cont): Tag all threads as want-stopped.
6677 (gdb_wants_thread_stopped): Fix comments. Tag the thread that
6678 stopped as "client-wants-stopped".
6679
310444ac
PA
66802010-07-31 Pedro Alves <pedro@codesourcery.com>
6681
6682 * Makefile.in (signals_h): New.
6683 (server_h): Depend on it.
6684 (server.o): Don't depend on $(signals_def).
6685 (signals.o): Depend on $(signals_def).
6686
a19cae16
JK
66872010-07-31 Jan Kratochvil <jan.kratochvil@redhat.com>
6688
6689 * Makefile.in (signals_def): New.
6690 (server_h): Append include/gdb/signals.h and signals_def.
6691 (server.o): Append signals_def.
6692
30d50328
JK
66932010-07-25 Jan Kratochvil <jan.kratochvil@redhat.com>
6694
6695 * server.c (handle_target_event): Use target_signal_to_host for
6696 resume_info.sig initialization.
6697 * target.h (struct thread_resume) <sig>: New comment.
6698
5c3216e2
OS
66992010-07-20 Ozkan Sezer <sezeroz@gmail.com>
6700
c6f46ca0
OS
6701 * server.c (handle_query): strcpy() the returned string from paddress()
6702 instead of sprintf().
5c3216e2
OS
6703 * utils.c (paddress): Return phex_nz().
6704
6bd31874
JB
67052010-07-07 Joel Brobecker <brobecker@adacore.com>
6706
6707 * server.c (handle_v_cont): Call mourn_inferior if process
6708 just exited.
6709 (myresume): Likewise.
6710
0fb4aa4b
PA
67112010-07-01 Pedro Alves <pedro@codesourcery.com>
6712
6713 Static tracepoints, and integration with UST.
6714
6715 * configure.ac: Handle --with-ust. substitute ustlibs and ustinc.
6716 * mem-break.c (uninsert_all_breakpoints)
6717 (reinsert_all_breakpoints): New.
6718 * mem-break.h (reinsert_all_breakpoints, uninsert_all_breakpoints):
6719 * tracepoint.c (ust_loaded, helper_thread_id, cmd_buf): New.
6720 (gdb_agent_ust_loaded, helper_thread_id)
6721 (gdb_agent_helper_thread_id): New macros.
6722 (struct ipa_sym_addresses): Add addr_ust_loaded,
6723 addr_helper_thread_id, addr_cmd_buf.
6724 (symbol_list): Add ust_loaded, helper_thread_id, cmd_buf.
6725 (in_process_agent_loaded_ust): New.
6726 (write_e_ust_not_loaded): New.
6727 (maybe_write_ipa_ust_not_loaded): New.
6728 (struct collect_static_trace_data_action): New.
6729 (enum tracepoint_type) <static_tracepoint>: New.
6730 (struct tracepoint) <handle>: Mention static tracepoints.
6731 (struct static_tracepoint_ctx): New.
6732 (CMD_BUF_SIZE): New.
6733 (add_tracepoint_action): Handle static tracepoint actions.
6734 (unprobe_marker_at): New.
6735 (clear_installed_tracepoints): Handle static tracepoints.
6736 (cmd_qtdp): Handle static tracepoints.
6737 (probe_marker_at): New.
6738 (cmd_qtstart): Handle static tracepoints.
6739 (response_tracepoint): Handle static tracepoints.
6740 (cmd_qtfstm, cmd_qtsstm, cmd_qtstmat): New.
6741 (handle_tracepoint_query): Handle qTfSTM, qTsSTM and qTSTMat.
6742 (get_context_regcache): Handle static tracepoints.
6743 (do_action_at_tracepoint): Handle static tracepoint actions.
6744 (traceframe_find_block_type): Handle static trace data blocks.
6745 (traceframe_read_sdata): New.
6746 (download_tracepoints): Download static tracepoint actions.
6747 [HAVE_UST] Include ust/ust.h, dlfcn.h, sys/socket.h, and sys/un.h.
6748 (GDB_PROBE_NAME): New.
6749 (ust_ops): New.
6750 (GET_UST_SYM): New.
6751 (USTF): New.
6752 (dlsym_ust): New.
6753 (ust_marker_to_static_tracepoint): New.
6754 (gdb_probe): New.
6755 (collect_ust_data_at_tracepoint): New.
6756 (gdb_ust_probe): New.
6757 (UNIX_PATH_MAX, SOCK_DIR): New.
6758 (gdb_ust_connect_sync_socket): New.
6759 (resume_thread, stop_thread): New.
6760 (run_inferior_command): New.
6761 (init_named_socket): New.
6762 (gdb_ust_socket_init): New.
6763 (cstr_to_hexstr): New.
6764 (next_st): New.
6765 (first_marker, next_marker): New.
6766 (response_ust_marker): New.
6767 (cmd_qtfstm, cmd_qtsstm): New.
6768 (unprobe_marker_at, probe_marker_at): New.
6769 (cmd_qtstmat, gdb_ust_thread): New.
6770 (gdb_ust_init): New.
6771 (initialize_tracepoint_ftlib): Call gdb_ust_init.
6772 * linux-amd64-ipa.c [HAVE_UST]: Include ust/processor.h
6773 (ST_REGENTRY): New.
6774 (x86_64_st_collect_regmap): New.
6775 (X86_64_NUM_ST_COLLECT_GREGS): New.
6776 (AMD64_RIP_REGNUM): New.
6777 (supply_static_tracepoint_registers): New.
6778 * linux-i386-ipa.c [HAVE_UST]: Include ust/processor.h
6779 (ST_REGENTRY): New.
6780 (i386_st_collect_regmap): New.
6781 (i386_NUM_ST_COLLECT_GREGS): New.
6782 (supply_static_tracepoint_registers): New.
6783 * server.c (handle_query): Handle qXfer:statictrace:read.
6784 <qSupported>: Report support for StaticTracepoints, and
6785 qXfer:statictrace:read features.
6786 * server.h (traceframe_read_sdata)
6787 (supply_static_tracepoint_registers): Declare.
6788 * remote-utils.c (convert_int_to_ascii, hexchars, ishex, tohex)
6789 (unpack_varlen_hex): Include in IPA build.
6790 * Makefile.in (ustlibs, ustinc): New.
6791 (IPA_OBJS): Add remote-utils-ipa.o.
6792 ($(IPA_LIB)): Link -ldl and -lpthread.
6793 (UST_CFLAGS): New.
6794 (IPAGENT_CFLAGS): Add UST_CFLAGS.
6795 * config.in, configure: Regenerate.
6796
9e4344e5
PA
67972010-06-20 Ian Lance Taylor <iant@google.com>
6798 Pedro Alves <pedro@codesourcery.com>
6799
6800 * linux-x86-low.c (always_true): Delete.
6801 (EMIT_ASM, EMIT_ASM32): Use an uncondition asm jmp instead of
6802 trying to fool the compiler with always_true.
6803
c6beb2cb
PA
68042010-06-20 Pedro Alves <pedro@codesourcery.com>
6805
6806 * tracepoint.c (condition_true_at_tracepoint): Don't run compiled
6807 conditions in gdbserver.
6808
d2ed6730
UW
68092010-06-19 Ulrich Weigand <uweigand@de.ibm.com>
6810
6811 * spu-low.c (spu_read_memory): Wrap around local store limit.
6812 (spu_write_memory): Likewise.
6813
4e29fb54
PA
68142010-06-15 Pedro Alves <pedro@codesourcery.com>
6815
6816 * linux-x86-low.c (amd64_emit_const, amd64_emit_void_call_2)
6817 (i386_emit_const, i386_emit_void_call_2): Replace int64_t uses with
6818 LONGEST uses.
6819 * server.h (struct emit_ops): Replace int64_t uses with LONGEST
6820 uses.
6821 * tracepoint.c (emit_const, emit_void_call_2): Replace int64_t
6822 uses with LONGEST uses.
6823
6a271cae
PA
68242010-06-14 Stan Shebs <stan@codesourcery.com>
6825 Pedro Alves <pedro@codesourcery.com>
6826
6827 Bytecode compiler.
6828
6829 * linux-x86-low.c: Include limits.h.
6830 (add_insns): New.
6831 (always_true): New.
6832 (EMIT_ASM): New.
6833 (EMIT_ASM32): New.
6834 (amd64_emit_prologue, amd64_emit_epilogue, amd64_emit_add)
6835 (amd64_emit_sub, amd64_emit_mul, amd64_emit_lsh)
6836 (amd64_emit_rsh_signed, amd64_emit_rsh_unsigned, amd64_emit_ext,
6837 (amd64_emit_log_not, amd64_emit_bit_and, amd64_emit_bit_or)
6838 (amd64_emit_bit_xor, amd64_emit_bit_not, amd64_emit_equal,
6839 (amd64_emit_less_signed, amd64_emit_less_unsigned, amd64_emit_ref,
6840 (amd64_emit_if_goto, amd64_emit_goto, amd64_write_goto_address)
6841 (amd64_emit_const, amd64_emit_call, amd64_emit_reg)
6842 (amd64_emit_pop, amd64_emit_stack_flush, amd64_emit_zero_ext)
6843 (amd64_emit_swap, amd64_emit_stack_adjust, amd64_emit_int_call_1)
6844 (amd64_emit_void_call_2): New.
6845 (amd64_emit_ops): New.
6846 (i386_emit_prologue, i386_emit_epilogue, i386_emit_add)
6847 (i386_emit_sub,i386_emit_mul, i386_emit_lsh, i386_emit_rsh_signed)
6848 (i386_emit_rsh_unsigned, i386_emit_ext, i386_emit_log_not)
6849 (i386_emit_bit_and, i386_emit_bit_or, i386_emit_bit_xor)
6850 (i386_emit_bit_not, i386_emit_equal, i386_emit_less_signed)
6851 (i386_emit_less_unsigned, i386_emit_ref, i386_emit_if_goto)
6852 (i386_emit_goto, i386_write_goto_address, i386_emit_const)
6853 (i386_emit_call, i386_emit_reg, i386_emit_pop)
6854 (i386_emit_stack_flush, i386_emit_zero_ext, i386_emit_swap)
6855 (i386_emit_stack_adjust, i386_emit_int_call_1)
6856 (i386_emit_void_call_2): New.
6857 (i386_emit_ops): New.
6858 (x86_emit_ops): New.
6859 (the_low_target): Install x86_emit_ops.
6860 * server.h (struct emit_ops): New.
6861 (get_raw_reg_func_addr): Declare.
6862 (current_insn_ptr, emit_error): Declare.
6863 * tracepoint.c (get_raw_reg, get_trace_state_variable_value)
6864 (set_trace_state_variable_value): New defines.
6865 (struct ipa_sym_addresses): New fields addr_get_raw_reg,
6866 addr_get_trace_state_variable_value and
6867 addr_set_trace_state_variable_value.
6868 (symbol_list): New fields for get_raw_reg,
6869 get_trace_state_variable_value and set_trace_state_variable_value.
6870 (condfn): New typedef.
6871 (struct tracepoint): New field `compiled_cond'.
6872 (do_action_at_tracepoint): Clear compiled_cond.
6873 (get_trace_state_variable_value, set_trace_state_variable_value):
6874 Export in the IPA.
6875 (condition_true_at_tracepoint): If there's a compiled condition,
6876 run that.
6877 (current_insn_ptr, emit_error): New globals.
6878 (struct bytecode_address): New.
6879 (get_raw_reg_func_addr): New.
6880 (emit_prologue, emit_epilogue, emit_add, emit_sub, emit_mul)
6881 (emit_lsh, emit_rsh_signed, emit_rsh_unsigned, emit_ext)
6882 (emit_log_not, emit_bit_and, emit_bit_or, emit_bit_xor)
6883 (emit_bit_not, emit_equal, emit_less_signed, emit_less_unsigned)
6884 (emit_ref, emit_if_goto, emit_goto, write_goto_address, emit_const)
6885 (emit_reg, emit_pop, emit_stack_flush, emit_zero_ext, emit_swap)
6886 (emit_stack_adjust, emit_int_call_1, emit_void_call_2): New.
6887 (compile_tracepoint_condition, compile_bytecodes): New.
6888 * target.h (emit_ops): Forward declare.
6889 (struct target_ops): New field emit_ops.
6890 (target_emit_ops): New.
6891 * linux-amd64-ipa.c (gdb_agent_get_raw_reg): New.
6892 * linux-i386-ipa.c (gdb_agent_get_raw_reg): New.
6893 * linux-low.c (linux_emit_ops): New.
6894 (linux_target_ops): Install it.
6895 * linux-low.h (struct linux_target_ops): New field emit_ops.
6896
92b72907
UW
68972010-06-14 Ulrich Weigand <uweigand@de.ibm.com>
6898
6899 * linux-ppc-low.c (ppc_arch_setup): Use private regcache to test MSR.
6900 * linux-s390-low.c (ppc_arch_setup): Use private regcache to test PSW.
6901
fa593d66
PA
69022010-06-01 Pedro Alves <pedro@codesourcery.com>
6903 Stan Shebs <stan@codesourcery.com>
6904
6905 * Makefile.in (IPA_DEPFILES, extra_libraries): New.
6906 (all): Depend on $(extra_libraries).
6907 (install-only): Install the IPA.
6908 (IPA_OBJS, IPA_LIB): New.
6909 (clean): Remove the IPA lib.
6910 (IPAGENT_CFLAGS): New.
6911 (tracepoint-ipa.o, utils-ipa.o, remote-utils-ipa.o)
6912 (regcache-ipa.o, i386-linux-ipa.o, linux-i386-ipa.o)
6913 (linux-amd64-ipa.o, amd64-linux-ipa.o): New rules.
6914 * linux-amd64-ipa.c, linux-i386-ipa.c: New files.
6915 * configure.ac: Check for atomic builtins support in the compiler.
6916 (IPA_DEPFILES, extra_libraries): Define.
6917 * configure.srv (ipa_obj): Add description.
6918 (ipa_i386_linux_regobj, ipa_amd64_linux_regobj): Define.
6919 (i[34567]86-*-linux*): Set ipa_obj.
6920 (x86_64-*-linux*): Set ipa_obj.
6921 * linux-low.c (stabilizing_threads): New.
6922 (supports_fast_tracepoints): New.
6923 (linux_detach): Stabilize threads before detaching.
6924 (handle_tracepoints): Handle internal tracing breakpoints. Assert
6925 the lwp is either not stabilizing, or is moving out of a jump pad.
6926 (linux_fast_tracepoint_collecting): New.
6927 (maybe_move_out_of_jump_pad): New.
6928 (enqueue_one_deferred_signal): New.
6929 (dequeue_one_deferred_signal): New.
6930 (linux_wait_for_event_1): If moving out of a jump pad, defer
6931 pending signals to later.
6932 (linux_stabilize_threads): New.
6933 (linux_wait_1): Check if threads need moving out of jump pads, and
6934 do it if so.
6935 (stuck_in_jump_pad_callback): New.
6936 (move_out_of_jump_pad_callback): New.
6937 (lwp_running): New.
6938 (linux_resume_one_lwp): Handle moving out of jump pads.
6939 (linux_set_resume_request): Dequeue deferred signals.
6940 (need_step_over_p): Also step over fast tracepoint jumps.
6941 (start_step_over): Also uninsert fast tracepoint jumps.
6942 (finish_step_over): Also reinsert fast tracepoint jumps.
6943 (linux_install_fast_tracepoint_jump): New.
6944 (linux_target_ops): Install linux_stabilize_threads and
6945 linux_install_fast_tracepoint_jump_pad.
6946 * linux-low.h (linux_target_ops) <get_thread_area,
6947 install_fast_tracepoint_jump_pad>: New fields.
6948 (struct lwp_info) <collecting_fast_tracepoint,
6949 pending_signals_to_report, exit_jump_pad_bkpt>: New fields.
6950 (linux_get_thread_area): Declare.
6951 * linux-x86-low.c (jump_insn): New.
6952 (x86_get_thread_area): New.
6953 (append_insns): New.
6954 (push_opcode): New.
6955 (amd64_install_fast_tracepoint_jump_pad): New.
6956 (i386_install_fast_tracepoint_jump_pad): New.
6957 (x86_install_fast_tracepoint_jump_pad): New.
6958 (the_low_target): Install x86_get_thread_area and
6959 x86_install_fast_tracepoint_jump_pad.
6960 * mem-break.c (set_raw_breakpoint_at): Use read_inferior_memory.
6961 (struct fast_tracepoint_jump): New.
6962 (fast_tracepoint_jump_insn): New.
6963 (fast_tracepoint_jump_shadow): New.
6964 (find_fast_tracepoint_jump_at): New.
6965 (fast_tracepoint_jump_here): New.
6966 (delete_fast_tracepoint_jump): New.
6967 (set_fast_tracepoint_jump): New.
6968 (uninsert_fast_tracepoint_jumps_at): New.
6969 (reinsert_fast_tracepoint_jumps_at): New.
6970 (set_breakpoint_at): Use write_inferior_memory.
6971 (uninsert_raw_breakpoint): Use write_inferior_memory.
6972 (check_mem_read): Mask out fast tracepoint jumps.
6973 (check_mem_write): Mask out fast tracepoint jumps.
6974 * mem-break.h (struct fast_tracepoint_jump): Forward declare.
6975 (set_fast_tracepoint_jump): Declare.
6976 (delete_fast_tracepoint_jump)
6977 (fast_tracepoint_jump_here, uninsert_fast_tracepoint_jumps_at)
6978 (reinsert_fast_tracepoint_jumps_at): Declare.
6979 * regcache.c: Don't compile many functions when building the
6980 in-process agent library.
6981 (init_register_cache) [IN_PROCESS_AGENT]: Don't allow allocating
6982 the register buffer in the heap.
6983 (free_register_cache): If the register buffer isn't owned by the
6984 regcache, don't free it.
6985 (set_register_cache) [IN_PROCESS_AGENT]: Don't re-alocate
6986 pre-existing register caches.
6987 * remote-utils.c (convert_int_to_ascii): Constify `from' parameter
6988 type.
6989 (convert_ascii_to_int): : Constify `from' parameter type.
6990 (decode_M_packet, decode_X_packet): Replace the `to' parameter by
6991 a `to_p' pointer to pointer parameter. If TO_P is NULL, malloc
6992 the needed buffer in-place.
6993 (relocate_instruction): New.
6994 * server.c (handle_query) <qSymbols>: If the target supports
6995 tracepoints, give it a chance of looking up symbols. Report
6996 support for fast tracepoints.
6997 (handle_status): Stabilize threads.
6998 (process_serial_event): Adjust.
6999 * server.h (struct fast_tracepoint_jump): Forward declare.
7000 (struct process_info) <fast_tracepoint_jumps>: New field.
7001 (convert_ascii_to_int, convert_int_to_ascii): Adjust.
7002 (decode_X_packet, decode_M_packet): Adjust.
7003 (relocate_instruction): Declare.
7004 (in_process_agent_loaded): Declare.
7005 (tracepoint_look_up_symbols): Declare.
7006 (struct fast_tpoint_collect_status): Declare.
7007 (fast_tracepoint_collecting): Declare.
7008 (force_unlock_trace_buffer): Declare.
7009 (handle_tracepoint_bkpts): Declare.
7010 (initialize_low_tracepoint)
7011 (supply_fast_tracepoint_registers) [IN_PROCESS_AGENT]: Declare.
7012 * target.h (struct target_ops) <stabilize_threads,
7013 install_fast_tracepoint_jump_pad>: New fields.
7014 (stabilize_threads, install_fast_tracepoint_jump_pad): New.
7015 * tracepoint.c [HAVE_MALLOC_H]: Include malloc.h.
7016 [HAVE_STDINT_H]: Include stdint.h.
7017 (trace_debug_1): Rename to ...
7018 (trace_vdebug): ... this.
7019 (trace_debug): Rename to ...
7020 (trace_debug_1): ... this. Add `level' parameter.
7021 (trace_debug): New.
7022 (ATTR_USED, ATTR_NOINLINE): New.
7023 (IP_AGENT_EXPORT): New.
7024 (gdb_tp_heap_buffer, gdb_jump_pad_buffer, gdb_jump_pad_buffer_end)
7025 (collecting, gdb_collect, stop_tracing, flush_trace_buffer)
7026 (about_to_request_buffer_space, trace_buffer_is_full)
7027 (stopping_tracepoint, expr_eval_result, error_tracepoint)
7028 (tracepoints, tracing, trace_buffer_ctrl, trace_buffer_ctrl_curr)
7029 (trace_buffer_lo, trace_buffer_hi, traceframe_read_count)
7030 (traceframe_write_count, traceframes_created)
7031 (trace_state_variables)
7032 New renaming defines.
7033 (struct ipa_sym_addresses): New.
7034 (STRINGIZE_1, STRINGIZE, IPA_SYM): New.
7035 (symbol_list): New.
7036 (ipa_sym_addrs): New.
7037 (all_tracepoint_symbols_looked_up): New.
7038 (in_process_agent_loaded): New.
7039 (write_e_ipa_not_loaded): New.
7040 (maybe_write_ipa_not_loaded): New.
7041 (tracepoint_look_up_symbols): New.
7042 (debug_threads) [IN_PROCESS_AGENT]: New.
7043 (read_inferior_memory) [IN_PROCESS_AGENT]: New.
7044 (UNKNOWN_SIDE_EFFECTS): New.
7045 (stop_tracing): New.
7046 (flush_trace_buffer): New.
7047 (stop_tracing_bkpt): New.
7048 (flush_trace_buffer_bkpt): New.
7049 (read_inferior_integer): New.
7050 (read_inferior_uinteger): New.
7051 (read_inferior_data_pointer): New.
7052 (write_inferior_data_pointer): New.
7053 (write_inferior_integer): New.
7054 (write_inferior_uinteger): New.
7055 (struct collect_static_trace_data_action): Delete.
7056 (enum tracepoint_type): New.
7057 (struct tracepoint) <type>: New field `type'.
43aaf8b6
PA
7058 <actions_str, step_actions, step_actions_str>: Only include in
7059 GDBserver.
fa593d66
PA
7060 <orig_size, obj_addr_on_target, adjusted_insn_addr>
7061 <adjusted_insn_addr_end, jump_pad, jump_pad_end>: New fields.
7062 (tracepoints): Use IP_AGENT_EXPORT.
7063 (last_tracepoint): Don't include in the IPA.
7064 (stopping_tracepoint): Use IP_AGENT_EXPORT.
7065 (trace_buffer_is_full): Use IP_AGENT_EXPORT.
7066 (alloced_trace_state_variables): New.
7067 (trace_state_variables): Use IP_AGENT_EXPORT.
7068 (traceframe_t): Delete unused variable.
7069 (circular_trace_buffer): Don't include in the IPA.
7070 (trace_buffer_start): Delete.
7071 (struct trace_buffer_control): New.
7072 (trace_buffer_free): Delete.
7073 (struct ipa_trace_buffer_control): New.
7074 (GDBSERVER_FLUSH_COUNT_MASK, GDBSERVER_FLUSH_COUNT_MASK_PREV)
7075 (GDBSERVER_FLUSH_COUNT_MASK_CURR, GDBSERVER_UPDATED_FLUSH_COUNT_BIT):
7076 New.
7077 (trace_buffer_ctrl): New.
7078 (TRACE_BUFFER_CTRL_CURR): New.
7079 (trace_buffer_start, trace_buffer_free, trace_buffer_end_free):
7080 Reimplement as macros.
7081 (trace_buffer_wrap): Delete.
7082 (traceframe_write_count, traceframe_read_count)
7083 (traceframes_created, tracing): Use IP_AGENT_EXPORT.
7084 (struct tracepoint_hit_ctx) <type>: New field.
7085 (struct fast_tracepoint_ctx): New.
7086 (memory_barrier): New.
7087 (cmpxchg): New.
7088 (record_tracepoint_error): Update atomically in the IPA.
7089 (clear_inferior_trace_buffer): New.
7090 (about_to_request_buffer_space): New.
7091 (trace_buffer_alloc): Handle GDBserver and inferior simulatenous
7092 updating the same buffer.
7093 (add_tracepoint): Default the tracepoint's type to trap
7094 tracepoint, and orig_size to -1.
7095 (get_trace_state_variable) [IN_PROCESS_AGENT]: Handle allocated
7096 internal variables.
7097 (create_trace_state_variable): New parameter `gdb'. Handle it.
7098 (clear_installed_tracepoints): Clear fast tracepoint jumps.
7099 (cmd_qtdp): Handle fast tracepoints.
7100 (cmd_qtdv): Adjust.
7101 (max_jump_pad_size): New.
7102 (gdb_jump_pad_head): New.
7103 (get_jump_space_head): New.
7104 (claim_jump_space): New.
7105 (sort_tracepoints): New.
7106 (MAX_JUMP_SIZE): New.
7107 (cmd_qtstart): Handle fast tracepoints. Sync tracepoints with the
7108 IPA.
7109 (stop_tracing) [IN_PROCESS_AGENT]: Don't include the tdisconnected
7110 support. Upload fast traceframes, and delete internal IPA
7111 breakpoints.
7112 (stop_tracing_handler): New.
7113 (flush_trace_buffer_handler): New.
7114 (cmd_qtstop): Upload fast tracepoints.
7115 (response_tracepoint): Handle fast tracepoints.
7116 (tracepoint_finished_step): Upload fast traceframes. Set the
7117 tracepoint hit context's tracepoint type.
7118 (handle_tracepoint_bkpts): New.
7119 (tracepoint_was_hit): Set the tracepoint hit context's tracepoint
7120 type. Add comment about fast tracepoints.
7121 (collect_data_at_tracepoint) [IN_PROCESS_AGENT]: Don't access the
7122 non-existing action_str field.
7123 (get_context_regcache): Handle fast tracepoints.
7124 (do_action_at_tracepoint) [!IN_PROCESS_AGENT]: Don't write the PC
7125 to the regcache.
7126 (fast_tracepoint_from_jump_pad_address): New.
7127 (fast_tracepoint_from_ipa_tpoint_address): New.
7128 (collecting_t): New.
7129 (force_unlock_trace_buffer): New.
7130 (fast_tracepoint_collecting): New.
7131 (collecting): New.
7132 (gdb_collect): New.
7133 (write_inferior_data_ptr): New.
7134 (target_tp_heap): New.
7135 (target_malloc): New.
7136 (download_agent_expr): New.
7137 (UALIGN): New.
7138 (download_tracepoints): New.
7139 (download_trace_state_variables): New.
7140 (upload_fast_traceframes): New.
7141 (IPA_FIRST_TRACEFRAME): New.
7142 (IPA_NEXT_TRACEFRAME_1): New.
7143 (IPA_NEXT_TRACEFRAME): New.
7144 [IN_PROCESS_AGENT]: Include sys/mman.h and fcntl.h.
7145 [IN_PROCESS_AGENT] (gdb_tp_heap_buffer, gdb_jump_pad_buffer)
7146 (gdb_jump_pad_buffer_end): New.
7147 [IN_PROCESS_AGENT] (initialize_tracepoint_ftlib): New.
7148 (initialize_tracepoint): Adjust.
7149 [IN_PROCESS_AGENT]: Allocate the IPA heap, and jump pad scratch
7150 buffer. Initialize the low module.
7151 * utils.c (PREFIX, TOOLNAME): New.
7152 (malloc_failure): Use PREFIX.
7153 (error): In the IPA, an error causes an exit.
7154 (fatal, warning): Use PREFIX.
7155 (internal_error): Use TOOLNAME.
7156 (NUMCELLS): Increase to 10.
7157 * configure, config.in: Regenerate.
7158
d149dd1d
PA
71592010-06-01 Pedro Alves <pedro@codesourcery.com>
7160
7161 * server.c (handle_query) <qSupported>: Do two passes over the
7162 qSupported string to avoid nesting strtok.
7163
f6528abd
JK
71642010-05-28 Jan Kratochvil <jan.kratochvil@redhat.com>
7165
7166 * Makefile.in (SFILES): Add $(srcdir)/proc-service.list.
7167 (CDEPS): New.
7168 * configure.ac (RDYNAMIC): New AC_MSG_CHECKING wrapping. Test also
7169 -Wl,--dynamic-list.
7170 * configure: Regenerate.
7171 * proc-service.list: New.
7172
ca2a87a0
JK
71732010-05-28 Jan Kratochvil <jan.kratochvil@redhat.com>
7174
7175 * linux-low.c (linux_core_of_thread): Fix crash on invalid CONTENT.
7176 New comment.
7177
363a6e9f
OS
71782010-05-26 Ozkan Sezer <sezeroz@gmail.com>
7179
7180 * gdbreplay.c (remote_open): Check error return from socket() call by
7181 its equality to -1 not by it being negative.
7182 * remote-utils.c (remote_open): Likewise.
7183
d23b6cb1
PA
71842010-05-23 Pedro Alves <pedro@codesourcery.com>
7185
7186 * config.h: Regenerate.
7187
28d3cf85
MK
71882010-05-19 Maxim Kuvyrkov <maxim@codesourcery.com>
7189
7190 * linux-m68k-low.c (ps_get_thread_area): Don't define if kernel
7191 doesn't provide PTRACE_GET_THREAD_AREA.
7192
fea36a59
MK
71932010-05-19 Maxim Kuvyrkov <maxim@codesourcery.com>
7194
7195 * linux-m68k-low.c: Include <asm/ptrace.h>
7196 (ps_get_thread_area): Implement.
7197
24b066ba
DE
71982010-05-03 Doug Evans <dje@google.com>
7199
7200 * event-loop.c (struct callback_event): New struct.
7201 (callback_list): New global.
7202 (append_callback_event, delete_callback_event): New functions.
7203 (process_callback): New function.
7204 (start_event_loop): Call it.
7205 * remote-utils.c (NOT_SCHEDULED): Define.
7206 (readchar_buf, readchar_bufcnt, readchar_bufp): New static globals,
7207 moved out of readchar.
7208 (readchar): Rewrite. Call reschedule before returning.
7209 (reset_readchar): New function.
7210 (remote_close): Call it.
7211 (process_remaining, reschedule): New functions.
7212 * server.h (callback_handler_func): New typedef.
7213 (append_callback_event, delete_callback_event): Declare.
7214
9836d6ea
PA
72152010-05-03 Pedro Alves <pedro@codesourcery.com>
7216
7217 * proc-service.c (ps_pglobal_lookup): Use
7218 thread_db_look_up_one_symbol.
7219 * remote-utils.c (look_up_one_symbol): Add new `may_ask_gdb'
7220 parameter. Use it instead of all_symbols_looked_up.
7221 * server.h (struct process_info) <all_symbols_looked_up>: Delete
7222 field.
7223 (all_symbols_looked_up): Don't declare.
7224 (look_up_one_symbol): Add new `may_ask_gdb' parameter.
7225 * thread-db.c (struct thread_db) <all_symbols_looked_up>: New
7226 field.
7227 (thread_db_look_up_symbols): Adjust call to look_up_one_symbol.
7228 Set all_symbols_looked_up here.
7229 (thread_db_look_up_one_symbol): New.
7230 (thread_db_get_tls_address): Adjust.
7231 (thread_db_load_search, try_thread_db_load_1): Always allocate the
7232 thread_db object on the heap, and tentatively set it in the
7233 process structure.
7234 (thread_db_init): Don't set all_symbols_looked_up here.
7235 * linux-low.h (thread_db_look_up_one_symbol): Declare.
7236
7984d532
PA
72372010-05-03 Pedro Alves <pedro@codesourcery.com>
7238
7239 * linux-low.c (linux_kill, linux_detach): Adjust.
7240 (status_pending_p_callback): Remove redundant statement. Check
7241 for !TARGET_WAITIKIND_IGNORE, instead of
7242 TARGET_WAITKIND_STOPPED.
7243 (handle_tracepoints): Make sure LWP is locked. Adjust.
7244 (linux_wait_for_event_1): Adjust.
7245 (linux_cancel_breakpoints): New.
7246 (unsuspend_one_lwp): New.
7247 (unsuspend_all_lwps): New.
7248 (linux_wait_1): If finishing a step-over, unsuspend all lwps.
7249 (send_sigstop_callback): Change return type to int, add new
7250 `except' parameter and handle it.
7251 (suspend_and_send_sigstop_callback): New.
7252 (stop_all_lwps): Add new `suspend' and `expect' parameters, and
7253 pass them down. If SUSPEND, also increment the lwp's suspend
7254 count.
7255 (linux_resume_one_lwp): Add notice about resuming a suspended LWP.
7256 (need_step_over_p): Don't consider suspended LWPs.
7257 (start_step_over): Adjust.
7258 (proceed_one_lwp): Change return type to int, add new `except'
7259 parameter and handle it.
7260 (unsuspend_and_proceed_one_lwp): New.
7261 (proceed_all_lwps): Use find_inferior instead of
7262 for_each_inferior.
7263 (unstop_all_lwps): Add `unsuspend' parameter. If UNSUSPEND, them
7264 also decrement the suspend count of LWPs. Pass `except' down,
7265 instead of hacking its suspend count.
7266 (linux_pause_all): Add `freeze' parameter. Adjust.
7267 (linux_unpause_all): New.
7268 (linux_target_ops): Install linux_unpause_all.
7269 * server.c (handle_status): Adjust.
7270 * target.h (struct target_ops): New fields `unpause_all' and
7271 `cancel_breakpoints'. Add new parameter to `pause_all'.
7272 (pause_all): Add new `freeze' parameter.
7273 (unpause_all): New.
7274 (cancel_breakpoints): New.
7275 * tracepoint.c (clear_installed_tracepoints): Pause threads, and
7276 cancel breakpoints.
7277 (cmd_qtstart): Pause threads.
7278 (stop_tracing): Pause threads, and cancel breakpoints.
7279 * win32-low.c (win32_target_ops): Adjust.
7280
e471f25b
PA
72812010-05-03 Pedro Alves <pedro@codesourcery.com>
7282
7283 * linux-low.c (linux_wait_for_event_1): Move passing the signal to
7284 the inferior right away from here...
7285 (linux_wait_1): ... to here, and adjust to check the thread's
7286 last_resume_kind instead of the lwp's step or stop_expected flags.
7287
1915ef4f
PA
72882010-05-02 Pedro Alves <pedro@codesourcery.com>
7289
7290 * README: Use consistent `GDB' and `GDBserver' spellings.
7291
f9e39928
PA
72922010-05-02 Pedro Alves <pedro@codesourcery.com>
7293
7294 * linux-low.c (linux_kill_one_lwp): Assume the lwp is stopped.
7295 (linux_kill): Stop all lwps here. Don't delete the main lwp here.
7296 (linux_detach_one_lwp): Assume the lwp is stopped.
7297 (any_thread_of): Delete.
7298 (linux_detach): Stop all lwps here. Don't blindly delete all
7299 breakpoints.
7300 (delete_lwp_callback): New.
7301 (linux_mourn): Delete all lwps of the process that is gone.
7302 (linux_wait_1): Don't delete the last lwp of the process here.
7303 * mem-break.h (mark_breakpoints_out): Declare.
7304 * mem-break.c (mark_breakpoints_out): New.
7305 (free_all_breakpoints): Use it.
7306 * server.c (handle_target_event): If the process is gone, mark
7307 breakpoints out.
7308 * thread-db.c (struct thread_db) <create_bp>: New field.
7309 (thread_db_enable_reporting): Fix prototype. Store a thread event
7310 breakpoint reference in the thread_db struct.
7311 (thread_db_load_search): Clear the thread_db object.
7312 (try_thread_db_load_1): Ditto.
7313 (switch_to_process): New.
7314 (disable_thread_event_reporting): Use it.
7315 (remove_thread_event_breakpoints): New.
7316 (thread_db_detach, thread_db_mourn): Use it.
7317
1e7fc18c
PA
73182010-05-01 Pedro Alves <pedro@codesourcery.com>
7319
7320 * linux-low.c (linux_enable_event_reporting): New.
7321 (linux_wait_for_event_1, handle_extended_wait): Use it.
7322
02fc4de7
PA
73232010-04-30 Pedro Alves <pedro@codesourcery.com>
7324
7325 * linux-low.c (linux_kill_one_lwp, linux_kill)
7326 (linux_detach_one_lwp): Adjust to send_sigstop interface change.
7327 (send_sigstop): Take an lwp_info as parameter instead. Queue a
7328 SIGSTOP even if the LWP is stopped.
7329 (send_sigstop_callback): New.
7330 (stop_all_lwps): Use send_sigstop_callback instead.
7331 (linux_resume_one_thread): Adjust.
7332 (proceed_one_lwp): Still proceed an LWP that the client has
7333 requested to stop, if we haven't reported it as stopped yet. Make
7334 sure that LWPs the client want stopped, have a pending SIGSTOP.
7335
bc3b5632
DE
73362010-04-26 Doug Evans <dje@google.com>
7337
ae1ada35
DE
7338 * server.c (handle_general_set): Make static.
7339
bc3b5632
DE
7340 * remote-utils.c (putpkt_binary_1): Call readchar instead of read.
7341 Print received char after testing for error/eof instead of before.
7342 (input_interrupt): Tweak comment.
7343
65730243
DE
73442010-04-23 Doug Evans <dje@google.com>
7345
7346 * server.c (start_inferior): Print inferior argv if --debug.
7347
a8ae7dc0
AR
73482010-04-21 Aleksandar Ristovski <aristovski@qnx.com>
7349
7350 * Makefile.in (nto_low_h nto-low.o nto-x86-low.o): New dependency lists.
7351 * nto-x86-low.c: Include server.h
7352
1c07cc19
PM
73532010-04-20 Pierre Muller <muller@ics.u-strasbg.fr>
7354
7355 * win32-i386-low.c: Use __x86_64__ macro instead of __x86_64 to
7356 be consistent with other sources of this directory.
7357 (init_registers_amd64): Correct name of source file of this function
7358 in the comment.
7359
e0a61e09
PM
73602010-04-19 Pierre Muller <muller@ics.u-strasbg.fr>
7361
7362 * configure.srv (x86_64-*-mingw*): New configuration for Windows
7363 64-bit executables.
7364
54709339
PM
73652010-04-19 Pierre Muller <muller@ics.u-strasbg.fr>
7366
7367 * win32-i386-low.c: Add 64-bit support.
7368 (CONTEXT_EXTENDED_REGISTERS): Set macro to zero if not exisiting.
7369 (init_registers_amd64): Declare.
7370 (mappings): Add 64-bit version of array.
7371 (init_windows_x86): New function.
7372 (the_low_target): Change init_arch field to init_windows_x86.
7373
e8f0053d
PM
73742010-04-19 Pierre Muller <muller@ics.u-strasbg.fr>
7375
7376 * win32-low.c: Adapt to support also 64-bit architecture.
7377 (child_xfer_memory): Use uintptr_t type for local variable `addr'.
7378 (get_image_name): Use SIZE_T type for local variable `done'.
7379 (psapi_get_dll_name): Use LPVOID type for parameter `BaseAddress'.
7380 (toolhelp_get_dll_name): Idem.
7381 (handle_load_dll): Use CORE_ADDR type for local variable `load_addr'.
7382 Use uintptr_t typecast to avoid warning.
7383 (handle_unload_dll): Use uintptr_t typecast to avoid warning.
7384 (handle_exception): Use phex_nz to avoid warning.
7385 (win32_wait): Remove unused local variable `process'.
7386
c481e77e
PM
73872010-04-19 Pierre Muller <muller@ics.u-strasbg.fr>
7388
7389 * configure.srv (srv_amd64_regobj): Replace `x86-64-avx.o' by
7390 `amd64-avx.o'.
7391
12ea4b69
PM
73922010-04-17 Pierre Muller <muller@ics.u-strasbg.fr>
7393
7394 * configure.ac: Use `ws2_32' library for srv_mingw.
7395 * configure: Regenerate.
7396 * gdbreplay.c: Include winsock2.h instead of winsock.h.
7397 * remote-utils.c: Likewise.
7398
f6d1620c
L
73992010-04-17 H.J. Lu <hongjiu.lu@intel.com>
7400
7401 * linux-x86-low.c (xmltarget_amd64_linux_no_xml): Define only
7402 if __x86_64__ is defined.
7403
8e642873
PM
74042010-04-16 Pierre Muller <muller@ics.u-strasbg.fr>
7405
7406 * configure: Regenerate.
7407
711e434b
PM
74082010-04-16 Pierre Muller <muller@ics.u-strasbg.fr>
7409
7410 * server.c (handle_query): Handle 'qGetTIBAddr' query.
7411 * target.h (target_ops): New get_tib_address field.
7412 * win32-low.h (win32_thread_info): Add thread_local_base field.
7413 * win32-low.c (child_add_thread): Add tlb argument.
7414 Set thread_local_base field to TLB.
7415 (get_child_debug_event): Adapt to child_add_thread change.
7416 (win32_get_tib_address): New function.
7417 (win32_target_ops): Set get_tib_address field to
7418 win32_get_tib_address.
7419 * linux-low.c (linux_target_ops): Set get_tib_address field to NULL.
7420
505106cd
PA
74212010-04-12 Pedro Alves <pedro@codesourcery.com>
7422
505106cd
PA
7423 * linux-low.c (linux_mourn): Also remove the process.
7424 * server.c (handle_target_event): Don't remove the process here.
7425 * nto-low.c (nto_mourn): New.
7426 (nto_target_ops): Install it.
7427 * spu-low.c (spu_mourn): New.
7428 (spu_target_ops): Install it.
7429 * win32-low.c (win32_mourn): New.
7430 (win32_target_ops): Install it.
7431
e8470a06
PA
74322010-04-12 Pedro Alves <pedro@codesourcery.com>
7433
7434 * server.h (buffer_xml_printf): Remove redundant `;'.
7435
45ba0d02
PA
74362010-04-12 Pedro Alves <pedro@codesourcery.com>
7437
7438 * regcache.c (set_register_cache): Invalidate regcaches before
7439 changing the register cache layout.
7440 (regcache_invalidate_one): Allow a NULL regcache.
7441 * linux-x86-low.c (x86_linux_update_xmltarget): Invalidate
7442 regcaches before changing the register cache layout or the target
7443 regsets.
7444
59e04013
L
74452010-04-12 H.J. Lu <hongjiu.lu@intel.com>
7446
7447 * linux-x86-low.c (x86_linux_update_xmltarget): Avoid unused
7448 variable warning on Linux/x86-64.
7449
8336d594
PA
74502010-04-11 Pedro Alves <pedro@codesourcery.com>
7451
7452 GDBserver disconnected tracing support.
7453
7454 * linux-low.c (linux_remove_process): Delete.
7455 (add_lwp): Don't set last_resume_kind here.
7456 (linux_kill): Use `mourn'.
7457 (linux_detach): Use `thread_db_detach', and `mourn'.
7458 (linux_mourn): New.
7459 (linux_attach_lwp_1): Adjust comment.
7460 (linux_attach): last_resume_kind moved the thread_info; adjust.
7461 (status_pending_p_callback): Adjust.
7462 (linux_wait_for_event_1): Adjust.
7463 (count_events_callback, select_singlestep_lwp_callback)
7464 (select_event_lwp_callback, cancel_breakpoints_callback)
7465 (db_wants_lwp_stopped, linux_wait_1, need_step_over_p)
7466 (proceed_one_lwp): Adjust.
7467 (linux_async): Add debug output.
7468 (linux_thread_stopped): New.
7469 (linux_pause_all): New.
7470 (linux_target_ops): Install linux_mourn, linux_thread_stopped and
7471 linux_pause_all.
7472 * linux-low.h (struct lwp_info): Delete last_resume_kind field.
7473 (thread_db_free): Delete declaration.
7474 (thread_db_detach, thread_db_mourn): Declare.
7475 * thread-db.c (thread_db_init): Use thread_db_mourn.
7476 (thread_db_free): Delete, split in two.
7477 (disable_thread_event_reporting): New.
7478 (thread_db_detach): New.
7479 (thread_db_mourn): New.
7480
7481 * server.h (struct thread_info) <last_resume_kind>: New field.
7482 <attached>: Add comment.
7483 <gdb_detached>: New field.
7484 (handler_func): Change return type to int.
7485 (handle_serial_event, handle_target_event): Ditto.
7486 (gdb_connected): Declare.
7487 (tracing): Delete.
7488 (disconnected_tracing): Declare.
7489 (stop_tracing): Declare.
7490
7491 * server.c (handle_query) <qSupported>: Report support for
7492 disconnected tracing.
7493 (queue_stop_reply_callback): Account for running threads.
7494 (gdb_wants_thread_stopped): New.
7495 (gdb_wants_all_threads_stopped): New.
7496 (gdb_reattached_process): New.
7497 (handle_status): Clear the `gdb_detached' flag of all processes.
7498 In all-stop, stop all threads.
7499 (main): Be sure to leave tfind mode. Handle disconnected tracing.
7500 (process_serial_event): If the remote connection breaks, or if an
7501 exit was forced with "monitor exit", force an event loop exit.
7502 Handle disconnected tracing on detach.
7503 (handle_serial_event): Adjust.
7504 (handle_target_event): If GDB isn't connected, forward events back
7505 to the inferior, unless the last process exited, in which case,
7506 exit gdbserver. Adjust interface.
7507
7508 * remote-utils.c (remote_open): Don't block in accept. Instead
7509 register an event loop source on the listen socket file
7510 descriptor. Refactor bits into ...
7511 (listen_desc): ... this new global.
7512 (gdb_connected): ... this new function.
7513 (enable_async_notification): ... this new function.
7514 (handle_accept_event): ... this new function.
7515 (remote_close): Clear remote_desc.
7516
7517 * inferiors.c (add_thread): Set the new thread's last_resume_kind.
7518
7519 * target.h (struct target_ops) <mourn, thread_stopped, pause_all>:
7520 New fields.
7521 (mourn_inferior): Define.
7522 (target_process_qsupported): Avoid the dangling else problem.
7523 (thread_stopped): Define.
7524 (pause_all): Define.
7525 (target_waitstatus_to_string): Declare.
7526 * target.c (target_waitstatus_to_string): New.
7527
7528 * tracepoint.c (tracing): Make extern.
7529 (disconnected_tracing): New.
7530 (stop_tracing): Make extern. Handle tracing stops due to GDB
7531 disconnecting.
7532 (cmd_qtdisconnected): New.
7533 (cmd_qtstatus): Report disconnected tracing status in trace reply.
7534 (handle_tracepoint_general_set): Handle QTDisconnected.
7535
7536 * event-loop.c (event_handler_func): Change return type to int.
7537 (process_event): Bail out if the event handler wants the event
7538 loop to stop.
7539 (handle_file_event): Ditto.
7540 (start_event_loop): Bail out if the event handler wants the event
7541 loop to stop.
7542
7543 * nto-low.c (nto_target_ops): Adjust.
7544 * spu-low.c (spu_wait): Don't remove the process here.
7545 (spu_target_ops): Adjust.
7546 * win32-low.c (win32_wait): Don't remove the process here.
7547 (win32_target_ops): Adjust.
7548
5d267c4c
PA
75492010-04-11 Pedro Alves <pedro@codesourcery.com>
7550
7551 * regcache.c (realloc_register_cache): Invalidate inferior's
7552 regcache before recreating it.
7553
623ccd72
PA
75542010-04-09 Pedro Alves <pedro@codesourcery.com>
7555
7556 * tracepoint.c (cmd_qtstatus): Report trace buffer circularity.
7557
219f2f23
PA
75582010-04-09 Stan Shebs <stan@codesourcery.com>
7559 Pedro Alves <pedro@codesourcery.com>
7560
7561 * server.h (LONGEST): New.
7562 (struct thread_info) <while_stepping>: New field.
7563 (unpack_varlen_hex, xrealloc, pulongest, plongest, phex_nz):
7564 Declare.
7565 (initialize_tracepoint, handle_tracepoint_general_set)
7566 (handle_tracepoint_query, tracepoint_finished_step)
7567 (tracepoint_was_hit, release_while_stepping_state_list):
7568 (current_traceframe): Declare.
7569 * server.c (handle_general_set): Handle tracepoint packets.
7570 (read_memory): New.
7571 (write_memory): New.
7572 (handle_search_memory_1): Use read_memory.
7573 (handle_query): Report support for conditional tracepoints, trace
7574 state variables, and tracepoint sources. Handle tracepoint
7575 queries.
7576 (main): Initialize the tracepoints module.
7577 (process_serial_event): Handle traceframe reads/writes.
7578
7579 * linux-low.c (handle_tracepoints): New.
7580 (linux_wait_1): Call it.
7581 (linux_resume_one_lwp): Handle while-stepping.
7582 (linux_supports_tracepoints, linux_read_pc, linux_write_pc): New.
7583 (linux_target_ops): Install them.
7584 * linux-low.h (struct linux_target_ops) <supports_tracepoints>:
7585 New field.
7586 * linux-x86-low.c (x86_supports_tracepoints): New.
7587 (the_low_target). Install it.
7588
7589 * mem-break.h (delete_breakpoint): Declare.
7590 * mem-break.c (delete_breakpoint): Make external.
7591
7592 * target.h (struct target_ops): Add `supports_tracepoints',
7593 `read_pc', and `write_pc' fields.
7594 (target_supports_tracepoints): Define.
7595 * utils.c (xrealloc, decimal2str, pulongest, plongest, thirty_two)
7596 (phex_nz): New.
7597
7598 * regcache.h (struct regcache) <registers_owned>: New field.
7599 (init_register_cache, regcache_cpy): Declare.
7600 (regcache_read_pc, regcache_write_pc): Declare.
7601 (register_cache_size): Declare.
7602 (supply_regblock): Declare.
7603 * regcache.c (init_register_cache): New.
7604 (new_register_cache): Use it.
7605 (regcache_cpy): New.
7606 (register_cache_size): New.
7607 (supply_regblock): New.
7608 (regcache_read_pc, regcache_write_pc): New.
889bf7c5 7609
219f2f23
PA
7610 * tracepoint.c: New.
7611
7612 * Makefile.in (OBS): Add tracepoint.o.
7613 (tracepoint.o): New rule.
7614
3a13a53b
L
76152010-04-08 H.J. Lu <hongjiu.lu@intel.com>
7616
7617 * Makefile.in (clean): Also remove i386-mmx.c i386-mmx-linux.c.
7618 (i386-mmx.o): New.
7619 (i386-mmx.c): Likewise.
7620 (i386-mmx-linux.o): Likewise.
7621 (i386-mmx-linux.c): Likewise.
7622
7623 * configure.srv (srv_i386_regobj): Add i386-mmx.o.
7624 (srv_i386_linux_regobj): Add i386-mmx-linux.o.
7625 (srv_i386_xmlfiles): Add i386/i386-mmx.xml.
7626 (srv_i386_linux_xmlfiles): Add i386/i386-mmx-linux.xml.
7627
7628 * linux-x86-low.c (init_registers_i386_mmx_linux): New.
7629 (x86_linux_update_xmltarget): Call init_registers_i386_mmx_linux
7630 and return if ptrace PTRACE_GETFPXREGS failed in 32bit.
7631
1570b33e
L
76322010-04-07 H.J. Lu <hongjiu.lu@intel.com>
7633
7634 * Makefile.in (clean): Updated.
7635 (i386-avx.o): New.
7636 (i386-avx.c): Likewise.
7637 (i386-avx-linux.o): Likewise.
7638 (i386-avx-linux.c): Likewise.
7639 (amd64-avx.o): Likewise.
7640 (amd64-avx.c): Likewise.
7641 (amd64-avx-linux.o): Likewise.
7642 (amd64-avx-linux.c): Likewise.
7643
7644 * configure.srv (srv_i386_regobj): Add i386-avx.o.
7645 (srv_i386_linux_regobj): Add i386-avx-linux.o.
7646 (srv_amd64_regobj): Add amd64-avx.o.
7647 (srv_amd64_linux_regobj): Add amd64-avx-linux.o.
7648 (srv_i386_32bit_xmlfiles): Add i386/32bit-avx.xml.
7649 (srv_i386_64bit_xmlfiles): Add i386/64bit-avx.xml.
7650 (srv_i386_xmlfiles): Add i386/i386-avx.xml.
7651 (srv_amd64_xmlfiles): Add i386/amd64-avx.xml.
7652 (srv_i386_linux_xmlfiles): Add i386/i386-avx-linux.xml.
7653 (srv_amd64_linux_xmlfiles): Add i386/amd64-avx-linux.xml.
7654
7655 * i387-fp.c: Include "i386-xstate.h".
7656 (i387_xsave): New.
7657 (i387_cache_to_xsave): Likewise.
7658 (i387_xsave_to_cache): Likewise.
7659 (x86_xcr0): Likewise.
7660
7661 * i387-fp.h (i387_cache_to_xsave): Likewise.
7662 (i387_xsave_to_cache): Likewise.
7663 (x86_xcr0): Likewise.
7664
7665 * linux-arm-low.c (target_regsets): Initialize nt_type to 0.
7666 * linux-crisv32-low.c (target_regsets): Likewise.
7667 * linux-m68k-low.c (target_regsets): Likewise.
7668 * linux-mips-low.c (target_regsets): Likewise.
7669 * linux-ppc-low.c (target_regsets): Likewise.
7670 * linux-s390-low.c (target_regsets): Likewise.
7671 * linux-sh-low.c (target_regsets): Likewise.
7672 * linux-sparc-low.c (target_regsets): Likewise.
7673 * linux-xtensa-low.c (target_regsets): Likewise.
7674
7675 * linux-low.c: Include <sys/uio.h>.
7676 (regsets_fetch_inferior_registers): Support nt_type.
7677 (regsets_store_inferior_registers): Likewise.
7678 (linux_process_qsupported): New.
7679 (linux_target_ops): Add linux_process_qsupported.
7680
7681 * linux-low.h (regset_info): Add nt_type.
7682 (linux_target_ops): Add process_qsupported.
7683
7684 * linux-x86-low.c: Include "i386-xstate.h", "elf/common.h"
7685 and <sys/uio.h>.
7686 (init_registers_i386_avx_linux): New.
7687 (init_registers_amd64_avx_linux): Likewise.
7688 (xmltarget_i386_linux_no_xml): Likewise.
7689 (xmltarget_amd64_linux_no_xml): Likewise.
7690 (PTRACE_GETREGSET): Likewise.
7691 (PTRACE_SETREGSET): Likewise.
7692 (x86_fill_xstateregset): Likewise.
7693 (x86_store_xstateregset): Likewise.
7694 (use_xml): Likewise.
7695 (x86_linux_update_xmltarget): Likewise.
7696 (x86_linux_process_qsupported): Likewise.
7697 (target_regsets): Add NT_X86_XSTATE entry and Initialize nt_type.
7698 (x86_arch_setup): Don't call init_registers_amd64_linux nor
7699 init_registers_i386_linux here. Call
7700 x86_linux_update_xmltarget.
7701 (the_low_target): Add x86_linux_process_qsupported.
7702
7703 * server.c (handle_query): Call target_process_qsupported.
7704
7705 * target.h (target_ops): Add process_qsupported.
7706 (target_process_qsupported): New.
7707
fc7238bb
PA
77082010-04-03 Pedro Alves <pedro@codesourcery.com>
7709
7710 * inferiors.c (add_thread): Set last_status kind to
7711 TARGET_WAITKIND_IGNORE.
7712 * linux-low.c (cancel_breakpoint): Remove unnecessary regcache
7713 fetch. Use ptid_of. Avoid unnecessary get_lwp_thread calls.
7714 (linux_wait_1): Move `thread' local definition to block that uses
7715 it. Don't NULL initialize `event_child'.
7716 (linux_resume_one_thread): Avoid unnecessary get_lwp_thread calls.
7717 Alway set the thread's last_status to TARGET_WAITKIND_IGNORE.
7718 * linux-x86-low.c (x86_breakpoint_at): Read raw memory.
7719
bdabb078
PA
77202010-04-01 Pedro Alves <pedro@codesourcery.com>
7721
7722 * linux-low.c (get_stop_pc): Don't adjust the PC if stopped with
7723 an extended waitstatus, or by a watchpoint.
7724 (cancel_breakpoints_callback): Don't cancel a breakpoint if the
7725 thread was stepping or has been stopped by a watchpoint.
7726
d3bbe7a0
PA
77272010-04-01 Pedro Alves <pedro@codesourcery.com>
7728
7729 * mem-break.c (struct raw_breakpoint): New field shlib_disabled.
7730 (set_gdb_breakpoint_at): If GDB is inserting a breakpoint on top
7731 of another, then delete the previous, and validate all
7732 breakpoints.
7733 (validate_inserted_breakpoint): New.
7734 (delete_disabled_breakpoints): New.
7735 (validate_breakpoints): New.
7736 (check_mem_read): Validate breakpoints before trusting their
7737 shadow. Delete disabled breakpoints.
7738 (check_mem_write): Validate breakpoints before trusting they
7739 should be inserted. Delete disabled breakpoints.
7740 * mem-break.h (validate_breakpoints):
7741 * server.c (handle_query): Validate breakpoints when we see a
7742 qSymbol query.
7743
8b07ae33
PA
77442010-04-01 Pedro Alves <pedro@codesourcery.com>
7745
7746 * linux-low.c (linux_wait_1): Avoid setting need_step_over is
7747 there's a GDB breakpoint at stop_pc. Always report a trap to GDB
7748 if we could tell there's a GDB breakpoint at stop_pc.
7749 (need_step_over_p): Don't do a step over if we find a GDB
7750 breakpoint at the resume PC.
7751
7752 * mem-break.c (struct raw_breakpoint): New.
7753 (enum bkpt_type): New type `gdb_breakpoint'.
7754 (struct breakpoint): Delete the `PC', `old_data' and `inserted'
7755 fields. New field `raw'.
7756 (find_raw_breakpoint_at): New.
7757 (set_raw_breakpoint_at): Handle refcounting. Create a raw
7758 breakpoint instead.
7759 (set_breakpoint_at): Adjust.
7760 (delete_raw_breakpoint): New.
7761 (release_breakpoint): New.
7762 (delete_breakpoint): Rename to...
7763 (delete_breakpoint_1): ... this. Add proc parameter. Use
7764 release_breakpoint. Return ENOENT.
7765 (delete_breakpoint): Reimplement.
7766 (find_breakpoint_at): Delete.
7767 (find_gdb_breakpoint_at): New.
7768 (delete_breakpoint_at): Delete.
7769 (set_gdb_breakpoint_at): New.
7770 (delete_gdb_breakpoint_at): New.
7771 (gdb_breakpoint_here): New.
7772 (set_reinsert_breakpoint): Use release_breakpoint.
7773 (uninsert_breakpoint): Rename to ...
7774 (uninsert_raw_breakpoint): ... this.
7775 (uninsert_breakpoints_at): Adjust to handle raw breakpoints.
7776 (reinsert_raw_breakpoint): Change parameter type to
7777 raw_breakpoint.
7778 (reinsert_breakpoints_at): Adjust to handle raw breakpoints
7779 instead.
7780 (check_breakpoints): Adjust. Use release_breakpoint.
7781 (breakpoint_here): Rewrite using find_raw_breakpoint_at.
7782 (breakpoint_inserted_here): Ditto.
7783 (check_mem_read): Adjust to iterate over raw breakpoints instead.
7784 Don't trust the breakpoint's shadow if it is not inserted.
7785 (check_mem_write): Adjust to iterate over raw breakpoints instead.
7786 (delete_all_breakpoints): Adjust.
7787 (free_all_breakpoints): Mark all breakpoints as uninserted, and
7788 use delete_breakpoint_1.
7789
7790 * mem-break.h (breakpoints_supported): Delete declaration.
7791 (set_gdb_breakpoint_at): Declare.
7792 (gdb_breakpoint_here): Declare.
7793 (delete_breakpoint_at): Delete.
7794 (delete_gdb_breakpoint_at): Declare.
7795
7796 * server.h (struct raw_breakpoint): Forward declare.
7797 (struct process_info): New field `raw_breakpoints'.
7798
7799 * linux-x86-low.c (x86_insert_point, x86_remote_point): Handle Z0
7800 breakpoints.
7801
6bf5e0ba
PA
78022010-03-24 Pedro Alves <pedro@codesourcery.com>
7803
7804 * linux-low.c (status_pending_p_callback): Fix comment.
7805 (linux_wait_for_event_1): Move most of the internal breakpoint
7806 handling from here...
7807 (linux_wait_1): ... to here.
7808 (count_events_callback): New.
7809 (select_singlestep_lwp_callback): New.
7810 (select_event_lwp_callback): New.
7811 (cancel_breakpoints_callback): New.
7812 (select_event_lwp): New.
7813 (linux_wait_1): Simplify internal breakpoint handling. Give equal
7814 priority to all LWPs that have had events that should be reported
7815 to the client. Cancel breakpoints when about to reporting the
7816 event to the client, not while stopping lwps. No longer cancel
7817 finished single-steps here.
7818 (cancel_finished_single_step): Delete.
7819 (cancel_finished_single_steps): Delete.
7820
414a389f
PA
78212010-03-24 Pedro Alves <pedro@codesourcery.com>
7822
7823 * mem-break.c (enum bkpt_type): New.
7824 (struct breakpoint): New field `type'.
7825 (set_breakpoint_at): Change return type to struct breakpoint
7826 pointer. Set type to `other_breakpoint' by default.
7827 (delete_breakpoint): Rewrite, supporting more than one breakpoint
7828 in the breakpoint list.
7829 (delete_reinsert_breakpoints): Only delete reinsert breakpoints.
7830 (reinsert_breakpoint): Rename to ...
7831 (reinsert_raw_breakpoint): ... this.
7832 (reinsert_breakpoints_at): Adjust.
7833 * mem-break.h (struct breakpoint): Declare.
7834 (set_breakpoint_at): Change return type to struct breakpoint
7835 pointer.
7836
2280c721
PA
78372010-03-24 Pedro Alves <pedro@codesourcery.com>
7838
7839 * server.c (handle_query): Assign, not compare.
7840
d50171e4
PA
78412010-03-24 Pedro Alves <pedro@codesourcery.com>
7842
7843 Teach linux gdbserver to step-over-breakpoints.
7844
7845 * linux-low.c (can_hardware_single_step): New.
7846 (supports_breakpoints): New.
7847 (handle_extended_wait): If stopping threads, read the stop pc of
7848 the new cloned LWP.
7849 (get_pc): New.
7850 (get_stop_pc): Add `lwp' parameter. Handle it. Bail out if the
7851 low target doesn't support retrieving the PC.
7852 (add_lwp): Set last_resume_kind to resume_continue.
7853 (linux_attach_lwp_1): Adjust comments. Always set stop_expected.
7854 (linux_attach): Don't clear stop_expected. Set the lwp's
7855 last_resume_kind to resume_stop.
7856 (linux_detach_one_lwp): Don't check for removed breakpoints.
7857 (check_removed_breakpoint): Delete.
7858 (status_pending_p): Rename to ...
7859 (status_pending_p_callback): ... this. Don't check for removed
7860 breakpoints. Don't consider threads that are stopped from GDB's
7861 perspective.
7862 (linux_wait_for_lwp): Always read the stop_pc here.
7863 (cancel_breakpoint): New.
7864 (step_over_bkpt): New global.
7865 (linux_wait_for_event_1): Implement stepping over breakpoints.
7866 (gdb_wants_lwp_stopped): New.
7867 (gdb_wants_all_stopped): New.
7868 (linux_wait_1): Tag threads as gdb-wants-stopped. Cancel finished
7869 single-step traps here. Store the thread's last reported target
7870 wait status.
7871 (send_sigstop): Don't clear stop_expected. Always set it,
7872 instead.
7873 (mark_lwp_dead): Remove reference to pending_is_breakpoint.
7874 (cancel_finished_single_step): New.
7875 (cancel_finished_single_steps): New.
7876 (wait_for_sigstop): Don't cancel finished single-step traps here.
7877 (linux_resume_one_lwp): Don't check for removed breakpoints.
7878 Don't set `step' on non-hardware step archs.
7879 (linux_set_resume_request): Ignore resume_stop requests if already
7880 stopping or stopped. Set the lwp's last_resume_kind.
7881 (resume_status_pending_p): Don't check for removed breakpoints.
7882 (need_step_over_p): New.
7883 (start_step_over): New.
7884 (finish_step_over): New.
7885 (linux_resume_one_thread): Always queue a sigstop for resume_stop
7886 requests. Clear the thread's last reported target waitstatus.
7887 Don't use the `suspended' flag. Don't consider pending breakpoints.
7888 (linux_resume): Start a step-over if necessary.
7889 (proceed_one_lwp): New.
7890 (proceed_all_lwps): New.
7891 (unstop_all_lwps): New.
7892 * linux-low.h (struct lwp_info): Rewrite comment for the
7893 `suspended' flag. Add the `stop_pc' field. Delete the
7894 `pending_stop_pc' field. Tweak the `stepping' flag's comment.
7895 Add `'last_resume_kind' and `need_step_over' fields.
7896 * inferiors.c (struct thread_info): Delete, moved elsewhere.
7897 * mem-break.c (struct breakpoint): Delete `reinserting' flag.
7898 Delete `breakpoint_to_reinsert' field. New flag `inserted'.
7899 (set_raw_breakpoint_at): New.
7900 (set_breakpoint_at): Rewrite to use it.
7901 (reinsert_breakpoint_handler): Delete.
7902 (set_reinsert_breakpoint): New.
7903 (reinsert_breakpoint_by_bp): Delete.
7904 (delete_reinsert_breakpoints): New.
7905 (uninsert_breakpoint): Rewrite.
7906 (uninsert_breakpoints_at): New.
7907 (reinsert_breakpoint): Rewrite.
7908 (reinsert_breakpoints_at): New.
7909 (check_breakpoints): Rewrite.
7910 (breakpoint_here): New.
7911 (breakpoint_inserted_here): New.
7912 (check_mem_read): Adjust.
7913 * mem-break.h (breakpoints_supported, breakpoint_here)
7914 (breakpoint_inserted_here, set_reinsert_breakpoint): Declare.
7915 (reinsert_breakpoint_by_bp): Delete declaration.
7916 (delete_reinsert_breakpoints): Declare.
7917 (reinsert_breakpoint): Delete declaration.
7918 (reinsert_breakpoints_at): Declare.
7919 (uninsert_breakpoint): Delete declaration.
7920 (uninsert_breakpoints_at): Declare.
7921 (check_breakpoints): Adjust prototype.
7922 * server.h: Adjust include order.
7923 (struct thread_info): Declare here. Add a `last_status' field.
7924
30ba68cb
MS
79252010-03-23 Michael Snyder <msnyder@vmware.com>
7926
7927 * server.c (crc32): New function.
7928 (handle_query): Add handling for 'qCRC:' request.
7929
b9a881c2
PA
79302010-03-23 Pedro Alves <pedro@codesourcery.com>
7931
7932 * linux-x86-low.c (x86_linux_prepare_to_resume): Clear DR6 if the
7933 lwp had been stopped by a watchpoint.
7934
e92d13d5
PA
79352010-03-16 Pedro Alves <pedro@codesourcery.com>
7936
7937 * server.h (internal_error): Declare.
7938 (gdb_assert, ASSERT_FUNCTION, gdb_assert_fail): Define.
7939 * utils.c (internal_error): New function.
7940
64daa791
AS
79412010-03-15 Andreas Schwab <schwab@redhat.com>
7942
7943 * configure.srv: Fix typo setting srv_regobj.
7944
f52cd8cd
PA
79452010-03-15 Pedro Alves <pedro@codesourcery.com>
7946
7947 * linux-low.c (fetch_register): Avoid passing a non string literal
7948 format to `error'.
7949 (usr_store_inferior_registers): Ditto.
7950
93ae6fdc
PA
79512010-03-14 Pedro Alves <pedro@codesourcery.com>
7952
7953 * linux-low.c (linux_write_memory): Bail out early if peeking
7954 memory failed.
7955
c3adc08c
PA
79562010-03-14 Pedro Alves <pedro@codesourcery.com>
7957
7958 * linux-low.h (struct lwp_info): New fields
7959 `stopped_by_watchpoint' and `stopped_data_address'.
7960 * linux-low.c (linux_wait_for_lwp): Check for watchpoint triggers
7961 here, and cache them in the lwp object.
7962 (wait_for_sigstop): Check stopped_by_watchpoint lwp field
7963 directly.
7964 (linux_resume_one_lwp): Clear the lwp's stopped_by_watchpoint
7965 field.
7966 (linux_stopped_by_watchpoint): Rewrite.
7967 (linux_stopped_data_address): Rewrite.
7968
bce522a2
PA
79692010-03-06 Simo Melenius <simo.melenius@iki.fi>
7970
7971 * linux-low.c (linux_wait_for_lwp): Fetch the regcache after
7972 switching the current inferior, not before.
7973
90884b2b
L
79742010-03-01 H.J. Lu <hongjiu.lu@intel.com>
7975
7976 * Makefile.in (clean): Replace reg-i386.c, reg-x86-64.c,
7977 reg-i386-linux.c and reg-x86-64-linux.c with i386.c, amd64.c,
7978 i386-linux.c and amd64-linux.c.
7979 (reg-i386.o): Removed.
7980 (reg-i386.c): Likewise.
7981 (reg-i386-linux.o): Likewise.
7982 (reg-i386-linux.c): Likewise.
7983 (reg-x86-64.o): Likewise.
7984 (reg-x86-64.c): Likewise.
7985 (reg-x86-64-linux.o): Likewise.
7986 (reg-x86-64-linux.c): Likewise.
7987 (i386.o): New.
7988 (i386.c): Likewise.
7989 (i386-linux.o): Likewise.
7990 (i386-linux.c): Likewise.
7991 (amd64.o): Likewise.
7992 (amd64.c): Likewise.
7993 (amd64-linux.o): Likewise.
7994 (amd64-linux.c): Likewise.
7995
7996 * configure.srv (srv_i386_regobj): New.
7997 (srv_i386_linux_regobj): Likewise.
7998 (srv_amd64_regobj): Likewise.
7999 (srv_amd64_linux_regobj): Likewise.
8000 (srv_i386_32bit_xmlfiles): Likewise.
8001 (srv_i386_64bit_xmlfiles): Likewise.
8002 (srv_i386_xmlfiles): Likewise.
8003 (srv_amd64_xmlfiles): Likewise.
8004 (srv_i386_linux_xmlfiles): Likewise.
8005 (srv_amd64_linux_xmlfiles): Likewise.
8006 (i[34567]86-*-cygwin*): Set srv_regobj to $srv_i386_regobj. Set
8007 srv_xmlfiles to $srv_i386_xmlfiles.
8008 (i[34567]86-*-mingw32ce*): Likewise.
8009 (i[34567]86-*-mingw*): Likewise.
8010 (i[34567]86-*-nto*): Likewise.
8011 (i[34567]86-*-linux*): Set srv_regobj to $srv_i386_linux_regobj
8012 and $srv_amd64_linux_regobj. Set srv_xmlfiles to
8013 $srv_i386_linux_xmlfiles and $srv_amd64_linux_xmlfiles.
8014 (x86_64-*-linux*): Likewise.
8015
8016 * linux-x86-low.c (init_registers_x86_64_linux): Removed.
8017 (init_registers_amd64_linux): New.
8018 (x86_arch_setup): Replace init_registers_x86_64_linux with
8019 init_registers_amd64_linux.
8020
193f13e6
MK
80212010-02-23 Maxim Kuvyrkov <maxim@codesourcery.com>
8022
8023 * configure.ac: Check for libdl. If it is not available link against
8024 static libthread_db.
8025 * configure: Regenerate.
8026
85d721b8
PA
80272010-02-22 Pedro Alves <pedro@codesourcery.com>
8028
8029 PR9605
8030
8031 * i386-low.c (i386_length_and_rw_bits): Throw a fatal error if
8032 handing a read watchpoint.
8033 (i386_low_insert_watchpoint): Read watchpoints aren't supported.
8034
6076632b
DE
80352010-02-12 Doug Evans <dje@google.com>
8036
8037 * linux-low.c (linux_supports_tracefork_flag): Document.
8038 (linux_look_up_symbols): Add comment.
8039
3327ccf7
L
80402010-02-03 H.J. Lu <hongjiu.lu@intel.com>
8041
8042 * regcache.c (supply_register): Clear regcache if buf is NULL.
8043
0718675c 80442010-02-02 Nicolas Roche <roche@sourceware.org>
3327ccf7 8045 Joel Brobecker <brobecker@adacore.com>
0718675c
JB
8046
8047 * inferiors.c (find_inferior): Add function documentation.
8048 (unloaded_dll): Handle the case where the unloaded dll has not
8049 been previously registered in the dll list.
8050
177321bd
DJ
80512010-02-01 Daniel Jacobowitz <dan@codesourcery.com>
8052
8053 * linux-arm-low.c (thumb_breakpoint_len): Delete.
8054 (thumb2_breakpoint): New.
8055 (arm_breakpoint_at): Check for Thumb-2 breakpoints.
8056
2b009048
DJ
80572010-01-29 Daniel Jacobowitz <dan@codesourcery.com>
8058
8059 * linux-low.c (get_stop_pc): Check for SIGTRAP.
8060 (linux_wait_for_event_1): Handle SIGILL and SIGSEGV as possible
8061 breakpoints.
8062
3be029c7
PA
80632010-01-21 Pedro Alves <pedro@codesourcery.com>
8064
8065 * linux-ppc-low.c (ppc_arch_setup): Adjust to regcache changes.
8066
18f5de3b
JK
80672010-01-21 Jan Kratochvil <jan.kratochvil@redhat.com>
8068
8069 * linux-s390-low.c (s390_collect_ptrace_register)
8070 (s390_supply_ptrace_register): Adjust it for the new regcache parameter.
8071
3743bb4f
DE
80722010-01-21 Doug Evans <dje@google.com>
8073
14ce3065
DE
8074 * linux-low.c (PTRACE_ARG3_TYPE): Change from long to void*.
8075 (PTRACE_ARG4_TYPE): New macro.
8076 (handle_extended_wait): Cast ptrace arg4 to PTRACE_ARG4_TYPE.
8077 (linux_wait_for_event_1, linux_resume_one_lwp): Ditto.
8078 (fetch_register): Cast to uintptr_t before casting to PTRACE_ARG3_TYPE.
8079 (usr_store_inferior_registers): Ditto.
8080 (linux_read_memory, linux_write_memory): Ditto.
8081 (linux_test_for_tracefork): Ditto.
8082
3743bb4f
DE
8083 * linux-arm-low.c: Remove redundant include of gdb_proc_service.h.
8084 Only include elf.h if gdb_proc_service.h didn't include linux/elf.h.
8085
8b315be5
PA
80862010-01-21 Pedro Alves <pedro@codesourcery.com>
8087
8088 * proc-service.c (ps_lgetregs): Don't refetch registers from the
8089 target.
8090
85492558
PA
80912010-01-21 Pedro Alves <pedro@codesourcery.com>
8092
8093 * spu-low.c (spu_fetch_registers, spu_store_registers): Change
8094 prototype to take a regcache. Adjust.
8095
442ea881
PA
80962010-01-20 Pedro Alves <pedro@codesourcery.com>
8097
8098 * regcache.h (struct thread_info): Forward declare.
8099 (struct regcache): New.
8100 (new_register_cache): Adjust prototype.
8101 (get_thread_regcache): Declare.
8102 (free_register_cache): Adjust prototype.
8103 (registers_to_string, registers_from_string): Ditto.
8104 (supply_register, supply_register_by_name, collect_register)
8105 (collect_register_as_string, collect_register_by_name): Ditto.
8106 * regcache.c (struct inferior_regcache_data): Delete.
8107 (get_regcache): Rename to ...
8108 (get_thread_regcache): ... this. Adjust. Switch inferior before
8109 fetching registers.
8110 (regcache_invalidate_one): Adjust.
8111 (regcache_invalidate): Fix prototype.
8112 (new_register_cache): Return the new register cache.
8113 (free_register_cache): Change prototype.
8114 (realloc_register_cache): Adjust.
8115 (registers_to_string): Change prototype to take a regcache. Adjust.
8116 (registers_from_string): Ditto.
8117 (register_data): Ditto.
8118 (supply_register): Ditto.
8119 (supply_register_by_name): Ditto.
8120 (collect_register): Ditto.
8121 (collect_register_as_string): Ditto.
8122 (collect_register_by_name): Ditto.
8123 * server.c (process_serial_event): Adjust.
8124 * linux-low.h (regset_fill_func, regset_store_func): Change
8125 prototype.
8126 (get_pc, set_pc, collect_ptrace_register, supply_ptrace_register):
8127 Change prototype.
8128 * linux-low.c (get_stop_pc): Adjust.
8129 (check_removed_breakpoint): Adjust.
8130 (linux_wait_for_event): Adjust.
8131 (linux_resume_one_lwp): Adjust.
8132 (fetch_register): Add regcache parameter. Adjust.
8133 (usr_store_inferior_registers): Ditto.
8134 (regsets_fetch_inferior_registers): Ditto.
8135 (regsets_store_inferior_registers): Ditto.
8136 (linux_fetch_registers, linux_store_registers): Ditto.
8137 * i387-fp.c (i387_cache_to_fsave): Change prototype to take a
8138 regcache. Adjust.
43aaf8b6
PA
8139 (i387_fsave_to_cache, i387_cache_to_fxsave, i387_fxsave_to_cache):
8140 Ditto.
442ea881
PA
8141 * i387-fp.h (i387_cache_to_fsave, i387_fsave_to_cache): Change
8142 prototype to take a regcache.
8143 (i387_cache_to_fxsave, i387_fxsave_to_cache): Ditto.
8144 * remote-utils.c (convert_ascii_to_int, outreg)
8145 (prepare_resume_reply): Change prototype to take a regcache.
8146 Adjust.
8147 * target.h (struct target_ops) <fetch_registers, store_registers>:
8148 Change prototype to take a regcache.
8149 (fetch_inferior_registers, store_inferior_registers): Change
8150 prototype to take a regcache. Adjust.
8151 * proc-service.c (ps_lgetregs): Adjust.
8152 * linux-x86-low.c (x86_fill_gregset, x86_store_gregset)
8153 (x86_fill_fpregset, x86_store_fpregset, x86_fill_fpxregset)
8154 (x86_store_fpxregset, x86_get_pc, x86_set_pc): Change prototype to
8155 take a regcache. Adjust.
8156 * linux-arm-low.c (arm_fill_gregset, arm_store_gregset)
8157 (arm_fill_wmmxregset, arm_store_wmmxregset, arm_fill_vfpregset)
8158 (arm_store_vfpregset, arm_get_pc, arm_set_pc):
8159 (arm_breakpoint_at): Change prototype to take a regcache. Adjust.
8160 * linux-cris-low.c (cris_get_pc, cris_set_pc)
8161 (cris_cannot_fetch_register):
8162 (cris_breakpoint_at): Change prototype to take a regcache.
8163 Adjust.
8164 * linux-crisv32-low.c (cris_get_pc, cris_set_pc,
8165 cris_reinsert_addr, cris_write_data_breakpoint): Change prototype
8166 to take a regcache. Adjust.
8167 (cris_breakpoint_at, cris_insert_point, cris_remove_point):
8168 Adjust.
8169 * linux-m32r-low.c (m32r_get_pc, m32r_set_pc): Change prototype to
8170 take a regcache. Adjust.
8171 * linux-m68k-low.c (m68k_fill_gregset, m68k_store_gregset)
8172 (m68k_fill_fpregset, m68k_store_fpregset, m68k_get_pc,
8173 (m68k_set_pc): Change prototype to take a regcache. Adjust.
8174 * linux-mips-low.c (mips_get_pc):
8175 (mips_set_pc): Change prototype to take a regcache. Adjust.
8176 (mips_reinsert_addr): Adjust.
8177 (mips_collect_register): Change prototype to take a regcache.
8178 Adjust.
8179 (mips_supply_register):
8180 (mips_collect_register_32bit, mips_supply_register_32bit)
8181 (mips_fill_gregset, mips_store_gregset, mips_fill_fpregset)
8182 (mips_store_fpregset): Ditto.
43aaf8b6
PA
8183 * linux-ppc-low.c (ppc_supply_ptrace_register)
8184 (ppc_supply_ptrace_register): Ditto.
442ea881
PA
8185 (parse_spufs_run): Adjust.
8186 (ppc_get_pc, ppc_set_pc, ppc_fill_gregset, ppc_fill_vsxregset)
8187 (ppc_store_vsxregset, ppc_fill_vrregset, ppc_store_vrregset)
8188 (ppc_fill_evrregset, ppc_store_evrregset): Change prototype to
8189 take a regcache. Adjust.
8190 * linux-s390-low.c (s390_collect_ptrace_register)
8191 (s390_supply_ptrace_register, s390_fill_gregset, s390_get_pc)
8192 (s390_set_pc): Change prototype to take a regcache. Adjust.
8193 (s390_arch_setup): Adjust.
8194 * linux-sh-low.c (sh_get_pc, sh_breakpoint_at)
8195 (sh_fill_gregset): Change prototype to take a regcache. Adjust.
8196 * linux-sparc-low.c (sparc_fill_gregset_to_stack)
8197 (sparc_fill_gregset, sparc_store_gregset_from_stack)
8198 (sparc_store_gregset, sparc_get_pc): Change prototype to take a
8199 regcache. Adjust.
8200 (sparc_breakpoint_at): Adjust.
8201 * linux-xtensa-low.c (xtensa_fill_gregset):
8202 (xtensa_store_gregset):
8203 (xtensa_fill_xtregset, xtensa_store_xtregset, xtensa_get_pc)
8204 (xtensa_set_pc): Change prototype to take a regcache. Adjust.
8205 * nto-low.c (nto_fetch_registers, nto_store_registers): Change
8206 prototype to take a regcache. Adjust.
8207 * win32-arm-low.c (arm_fetch_inferior_register)
8208 (arm_store_inferior_register): Change prototype to take a
8209 regcache. Adjust.
8210 * win32-i386-low.c (i386_fetch_inferior_register)
8211 (i386_store_inferior_register): Change prototype to take a
8212 regcache. Adjust.
8213 * win32-low.c (child_fetch_inferior_registers)
8214 (child_store_inferior_registers): Change prototype to take a
8215 regcache. Adjust.
8216 (win32_wait): Adjust.
8217 (win32_fetch_inferior_registers): Change prototype to take a
8218 regcache. Adjust.
8219 (win32_store_inferior_registers): Adjust.
8220 * win32-low.h (struct win32_target_ops) <fetch_inferior_register,
8221 store_inferior_register>: Change prototype to take a regcache.
8222
60c3d7b0
DE
82232010-01-20 Doug Evans <dje@google.com>
8224
8225 * linux-low.c (linux_create_inferior): Wrap use of __SIGRTMIN in
8226 #ifdef.
8227 (linux_wait_for_event1, linux_init_signals): Ditto.
ec8ebe72 8228 (W_STOPCODE): Provide definition if missing.
60c3d7b0 8229
dc146f7c
VP
82302010-01-13 Vladimir Prus <vladimir@codesourcery.com>
8231
8232 * linux-low.c (linux_core_of_thread): New.
8233 (compare_ints, show_process, list_threads): New.
8234 (linux_qxfer_osdata): Report threads and cores.
8235 (linux_target_op): Register linux_core_of_thread.
8236 * remote-utils.c (prepare_resume_reply): Report the core.
8237 (buffer_xml_printf): Support %d specifier.
8238 * server.c (handle_threads_qxfer_proper, handle_threads_qxfer):
8239 New.
8240 (handle_query): Handle qXfer:threads. Announce availability
8241 thereof.
8242 * target.h (struct target_ops): New field core_of_thread.
8243
7803799a
UW
82442010-01-04 Ulrich Weigand <uweigand@de.ibm.com>
8245
8246 * Makefile.in (clean): Remove new generated files.
8247 (reg-s390.o, reg-s390.c): Remove rules.
8248 (reg-s390x.o, reg-s390x.c): Likewise.
8249 (s390-linux32.o, s390-linux32.c): Add rules.
8250 (s390-linux64.o, s390-linux64.c): Likewise.
8251 (s390x-linux64.o, s390x-linux64.c): Likewise.
8252 * configure.srv (s390*-*-linux*): Update srv_regobj and srv_xmlfiles.
8253 * linux-s390-low.c: Include <elf.h>.
8254 (HWCAP_S390_HIGH_GPRS): Define if undefined.
8255 (init_registers_s390): Remove prototype.
8256 (init_registers_s390x): Likewise.
8257 (init_registers_s390_linux32): Add prototype.
8258 (init_registers_s390_linux64): Likewise.
8259 (init_registers_s390x_linux64): Likewise.
8260 (s390_num_regs_3264): New define.
8261 (s390_regmap_3264): New global variable.
8262 (s390_cannot_fetch_register): Remove obsolete check.
8263 (s390_cannot_store_register): Likewise.
8264 (s390_collect_ptrace_register): Handle upper/lower register halves.
8265 (s390_supply_ptrace_register): Likewise.
8266 (s390_fill_gregset): Update to register number changes.
8267 (s390_get_hwcap): New routine.
8268 (s390_arch_setup): Detect 32-bit process running on 64-bit system.
8269 Install appropriate regmap and register set.
8270
6e7ffa39
JB
82712010-01-01 Joel Brobecker <brobecker@adacore.com>
8272
8273 * server.c (gdbserver_version): Update copyright year to 2010.
8274 * gdbreplay.c (gdbreplay_version): Likewise.
8275
957f3f49
DE
82762009-12-28 Doug Evans <dje@google.com>
8277
8278 * linux-low.c: Delete inclusion of ansidecl.h, elf/common.h,
8279 elf/external.h. Include <elf.h> instead but only if necessary.
8280
ca5c370d
PA
82812009-12-28 Pedro Alves <pedro@codesourcery.com>
8282
8283 * linux-low.c (linux_remove_process): Remove `detaching'
8284 parameter. Don't release/detach from thread_db here.
8285 (linux_kill): Release/detach from thread_db here, ...
8286 (linux_detach): ... and here, before actually detaching.
8287 (linux_wait_1): ... and here, when a process exits.
8288 * thread-db.c (any_thread_of): New.
8289 (thread_db_free): Switch the current inferior to a thread of the
8290 passed in process.
8291
4ee62156
DE
82922009-12-21 Doug Evans <dje@google.com>
8293
d90e6a88
DE
8294 * linux-x86-low.c: Delete outdated comment about Elf32_Phdr.
8295
c5f62d5f
DE
8296 * linux-low.c (kill_lwp): Use __NR_tkill instead of SYS_tkill.
8297 Move definition of tkill_failed to ifdef __NR_tkill to avoid gcc
8298 warning ifndef __NR_tkill. Move setting of errno there too.
8299 Delete unnecessary resetting of errno after syscall.
8300 Minor comment changes to match gdb/linux-nat.c:kill_lwp.
8301
10e86dd7
DE
8302 * configure.ac: Check for dladdr.
8303 * config.in: Regenerate.
8304 * configure: Regenerate.
8305 * thread-db.c (dladdr_to_soname): Only define ifdef HAVE_DLADDR.
8306 (try_thread_db_load): Update.
8307
4ee62156
DE
8308 * linux-low.c (my_waitpid): Delete unnecessary prototype.
8309
00f515da
DE
83102009-12-18 Doug Evans <dje@google.com>
8311
e9464885
DE
8312 * event-loop.c: Include unistd.h if it exists.
8313
07d4f67e
DE
8314 * linux-low.c (my_waitpid): Move definition away from being in
8315 between linux_tracefork_child/linux_test_for_tracefork.
8316
00f515da
DE
8317 * gdb_proc_service.h (psaddr_t): Fix type.
8318 * thread-db.c (thread_db_info.td_thr_tls_get_addr_p): Fix
8319 signature to match glibc.
8320
1de1badb
DE
83212009-12-16 Doug Evans <dje@google.com>
8322
8323 * linux-low.c (linux_read_memory): Fix argument to read.
8324
aeeb81d1
PA
83252009-11-26 Pedro Alves <pedro@codesourcery.com>
8326
8327 * win32-low.c (get_child_debug_event): On EXIT_THREAD_DEBUG_EVENT
8328 events, don't leave current_inferior pointing at null.
8329
10357975
PA
83302009-11-26 Pedro Alves <pedro@codesourcery.com>
8331
8332 * win32-low.c (LOG): Delete.
8333 (OUTMSG): Output to stderr.
8334 (OUTMSG2): Conditionalize on `debug_threads' variable, instead of
8335 on compile time LOG macro.
8336 (win32_wait): Fix debug output.
8337
cf6e3471
PA
83382009-11-26 Pedro Alves <pedro@codesourcery.com>
8339
8340 * win32-low.c (win32_add_one_solib): If the dll name is
8341 "ntdll.dll", prepend the system directory to the dll path.
8342
0c85e18e
MK
83432009-11-17 Daniel Jacobowitz <dan@codesourcery.com>
8344
8345 * m68k-tdep.c (m68k_gdbarch_init): Reuse previous initialization.
8346
9ac544ce 83472009-11-17 Nathan Sidwell <nathan@codesourcery.com>
889bf7c5 8348 Vladimir Prus <vladimir@codesourcery.com>
9ac544ce
MK
8349
8350 * Makefile.in (reg-cf.o, reg-cf.c): New targets.
8351 * configure.ac: Check for __mcoldfire__ and set
8352 gdb_cv_m68k_is_coldfire.
8353 * configure.srv: Use gdb_cv_m68k_is_coldfire to select between
8354 reg-cf.o and reg-m68k.o.
8355 * configure: Regenerated.
8356
fd7dd3e6
PA
83572009-11-16 Pedro Alves <pedro@codesourcery.com>
8358
8359 * linux-low.c (linux_remove_process): Add `detaching' parameter.
8360 Pass it to thread_db_free.
8361 (linux_kill, linux_detach, linux_wait_1): Adjust to pass the
8362 proper `detaching' argument to linux_remove_process.
8363 * linux-low.h (thread_db_free): Add `detaching' parameter.
8364 * thread-db.c (thread_db_init): Pass false as `detaching' argument
8365 to thread_db_free.
8366 (thread_db_free): Add `detaching' parameter. Only
8367 call td_ta_clear_event if detaching from process.
8368
75aa492e
MK
83692009-11-12 Maxim Kuvyrkov <maxim@codesourcery.com>
8370
8371 * thread-db.c (thread_db_free): Fix typo.
8372
21e1bee4
PP
83732009-11-11 Paul Pluzhnikov <ppluzhnikov@google.com>
8374
8375 PR gdb/10838
8376 * thread-db.c (thread_db_free): Call td_ta_clear_event.
8377
8838b45e
NS
83782009-11-03 Nathan Sidwell <nathan@codesourcery.com>
8379
8380 * configure.ac (i[34567]86-*): Check if we're targetting x86-64
8381 with an i686 compiler.
8382 * configure.srv (i[34567]86-*-linux*): Pull in x86-64 handling if
8383 needed.
8384 * configure: Rebuilt.
8385
8a35fb51
SL
83862009-10-29 Sandra Loosemore <sandra@codesourcery.com>
8387
8388 PR gdb/10783
8389
8390 * server.c (handle_search_memory_1): Correct read_addr initialization
8391 in loop for searching subsequent chunks.
8392
96f15937
PP
83932009-10-29 Paul Pluzhnikov <ppluzhnikov@google.com>
8394
8395 * configure.ac: New --with-libthread-db option.
8396 * thread-db.c: Allow direct dependence on libthread_db.
8397 (thread_db_free): Adjust.
8398 * config.in: Regenerate.
8399 * configure: Likewise.
889bf7c5 8400
5f7d1694
PP
84012009-10-28 Paul Pluzhnikov <ppluzhnikov@google.com>
8402
8403 PR gdb/10757
8404 * thread-db.c (attach_thread): New function.
8405 (maybe_attach_thread): Return success/failure.
8406 (find_new_threads_callback): Adjust.
889bf7c5
PA
8407 (thread_db_find_new_threads): Loop until no new threads.
8408
88e3b899
PA
84092009-10-13 Pedro Alves <pedro@codesourcery.com>
8410
8411 * proc-service.c (ps_lgetregs): Formatting.
8412
cdbfd419
PP
84132009-10-08 Paul Pluzhnikov <ppluzhnikov@google.com>
8414
8415 * acinclude.m4: (SRV_CHECK_THREAD_DB, SRV_CHECK_TLS_GET_ADDR): Remove.
8416 * configure.ac: Adjust.
8417 * linux-low.h (struct process_info_private): Move members to struct
8418 thread_db.
8419 (thread_db_free, thread_db_handle_monitor_command): New prototype.
8420 * linux-low.c (linux_remove_process): Adjust.
8421 (linux_wait_for_event_1, linux_look_up_symbols): Likewise.
8422 * server.c (handle_query): Move code ...
8423 (handle_monitor_command): ... here. New function.
8424 * target.h (struct target_ops): New member.
8425 * thread-db.c (struct thread_db): New.
8426 (libthread_db_search_path): New variable.
8427 (thread_db_create_event, thread_db_enable_reporting)
8428 (find_one_thread, maybe_attach_thread, find_new_threads_callback)
8429 (thread_db_find_new_threads, (thread_db_get_tls_address): Adjust.
8430 (try_thread_db_load_1, dladdr_to_soname): New functions.
8431 (try_thread_db_load, thread_db_load_search): New functions.
8432 (thread_db_init): Search for libthread_db.
8433 (thread_db_free): New function.
8434 (thread_db_handle_monitor_command): Likewise.
8435 * config.in: Regenerate.
8436 * configure: Regenerate.
889bf7c5 8437
4168d2d6
UW
84382009-09-27 Ulrich Weigand <uweigand@de.ibm.com>
8439
8440 * spu-low.c (spu_kill): Wait for inferior to terminate.
8441 Call clear_inferiors.
8442 (spu_detach): Call clear_inferiors.
8443
81ecdfbb
RW
84442009-08-22 Ralf Wildenhues <Ralf.Wildenhues@gmx.de>
8445
8446 * aclocal.m4: Regenerate.
8447 * config.in: Likewise.
8448 * configure: Likewise.
8449
0b9ff2c0
UW
84502009-07-31 Ulrich Weigand <uweigand@de.ibm.com>
8451
8452 * linux-ppc-low.c (INSTR_SC, NR_spu_run): Define.
8453 (parse_spufs_run): New function.
8454 (ppc_get_pc, ppc_set_pc): Detect and handle SPU PC.
8455 (ppc_breakpoint_at): Handle SPU breakpoints.
8456
efcbbd14
UW
84572009-07-31 Ulrich Weigand <uweigand@de.ibm.com>
8458
8459 * linux-low.c: Include <sys/stat.h> and <sys/vfs.h>.
8460 (SPUFS_MAGIC): Define.
8461 (spu_enumerate_spu_ids): New function.
8462 (linux_qxfer_spu): New function.
8463 (linux_target_ops): Install linux_qxfer_spu.
8464
f4d9bade
UW
84652009-07-31 Ulrich Weigand <uweigand@de.ibm.com>
8466
8467 * configure.srv (powerpc*-*-linux*): Add powerpc-cell32l.o
8468 and powerpc-cell64l.o to srv_regobj. Add rs6000/powerpc-cell32l.xml
8469 and rs6000/powerpc-cell64l.xml to srv_xmlfiles.
8470 * Makefile.in (powerpc-cell32l.o, powerpc-cell32l.c): New rules.
8471 (powerpc-cell64l.o, powerpc-cell64l.c): Likewise.
8472 (clean): Handle powerpc-cell32l.c and powerpc-cell64l.c.
8473 * linux-ppc-low.c (PPC_FEATURE_CELL): Define.
8474 (init_registers_powerpc_cell32l): Add prototype.
8475 (init_registers_powerpc_cell64l): Likewise.
8476 (ppc_arch_setup): Detect Cell/B.E. architecture.
8477
96e946ca
RW
84782009-07-30 Ralf Wildenhues <Ralf.Wildenhues@gmx.de>
8479
8480 * Makefile.in (datarootdir): New variable.
8481
58d6951d
DJ
84822009-07-28 Daniel Jacobowitz <dan@codesourcery.com>
8483
8484 * linux-low.c (linux_write_memory): Update debugging output.
8485 * Makefile.in (clean): Add new descriptions.
8486 (arm-with-vfpv2.o, arm-with-vfpv2.c, arm-with-vfpv3.o)
8487 (arm-with-vfpv3.c, arm-with-neon.o, arm-with-neon.c): New rules.
8488 * configure.srv: Add new files for arm*-*-linux*.
8489 * linux-arm-low.c: Add new declarations.
8490 (PTRACE_GETVFPREGS, PTRACE_SETVFPREGS): Define if undefined.
8491 (arm_hwcap, HWCAP_VFP, HWCAP_IWMMXT, HWCAP_NEON, HWCAP_VFPv3)
8492 (HWCAP_VFPv3D16): New.
8493 (arm_fill_wmmxregset, arm_store_wmmxregset): Check HWCAP_IWMMXT
8494 instead of __IWMMXT__.
8495 (arm_fill_vfpregset, arm_store_vfpregset, arm_get_hwcap)
8496 (arm_arch_setup): New.
8497 (target_regsets): Remove #ifdef. Add VFP regset.
8498 (the_low_target): Use arm_arch_setup.
8499
12b42a12
DJ
85002009-07-28 Daniel Jacobowitz <dan@codesourcery.com>
8501
8502 * linux-low.c (linux_kill_one_lwp): Adjust kernel workaround to skip
8503 the main thread again.
8504
ac8c974e
AR
85052009-07-06 Aleksandar Ristovski <aristovski@qnx.com>
8506
8507 Adding Neutrino gdbserver.
8508 * configure: Regenerated.
8509 * configure.ac: Add case for srv_qnx and set LIBS accordingly.
8510 * configure.srv (i[34567]86-*-nto*): New target.
8511 * nto-low.c, nto-low.h, nto-x86-low.c: New files.
8512 * remote-utils.c [__QNX__]: Include sys/iomgr.h
8513 (nto_comctrl) [__QNX__]: New function.
8514 (enable_async_io, disable_async_io) [__QNX__]: Call nto_comctrl.
8515
4424e0c3 85162009-07-05 Danny Backx <dannybackx@users.sourceforge.net>
7437790a
PA
8517
8518 * configure.srv (i[34567]86-*-mingw32ce*): Add i386-low.o to
8519 srv_tgtobj.
8520
912cf4ba
PA
85212009-07-04 Danny Backx <dannybackx@users.sourceforge.net>
8522 Pedro Alves <pedro@codesourcery.com>
8523
8524 * win32-i386-low.c (i386_get_thread_context): Handle systems that
8525 don't support CONTEXT_EXTENDED_REGISTERS.
8526 (i386_win32_breakpoint, i386_win32_breakpoint_len): New.
8527 (the_low_target): Install them.
8528 * win32-low.c (get_child_debug_event): Handle WaitForDebugEvent
8529 failing with ERROR_PIPE_NOT_CONNECTED.
8530
aa5ca48f
DE
85312009-06-30 Doug Evans <dje@google.com>
8532 Pierre Muller <muller@ics.u-strasbg.fr>
8533
8534 Add h/w watchpoint support to x86-linux, win32-i386.
8535 * Makefile.in (SFILES): Add i386-low.c
8536 (i386_low_h): Define.
8537 (i386-low.o): Add dependencies.
8538 (linux-x86-low.o): Add i386-low.h dependency.
8539 (win32-i386-low.o): Ditto.
8540 * i386-low.c: New file.
8541 * i386-low.h: New file.
8542 * configure.srv (i[34567]86-*-cygwin*): Add i386-low.o to srv_tgtobj.
8543 (i[34567]86-*-linux*, i[34567]86-*-mingw*, x86_64-*-linux*): Ditto.
8544 * linux-low.c (linux_add_process): Initialize arch_private.
8545 (linux_remove_process): Free arch_private.
8546 (add_lwp): Initialize arch_private.
8547 (delete_lwp): Free arch_private.
8548 (linux_resume_one_lwp): Call the_low_target.prepare_to_resume if
8549 provided.
8550 * linux-low.h (process_info_private): New member arch_private.
8551 (lwp_info): New member arch_private.
8552 (linux_target_ops): New members new_process, new_thread,
8553 prepare_to_resume.
8554 (ptid_of): New macro.
8555 * linux-x86-low.c: Include stddef.h, i386-low.h.
8556 (arch_process_info): New struct.
8557 (arch_lwp_info): New struct.
8558 (x86_linux_dr_get, x86_linux_dr_set): New functions.
8559 (i386_dr_low_set_addr, i386_dr_low_set_control): New functions.
8560 (i386_dr_low_get_status): New function.
8561 (x86_insert_point, x86_remove_point): New functions.
8562 (x86_stopped_by_watchpoint): New function.
8563 (x86_stopped_data_address): New function.
8564 (x86_linux_new_process, x86_linux_new_thread): New functions.
8565 (x86_linux_prepare_to_resume): New function.
8566 (the_low_target): Add entries for insert_point, remove_point,
8567 stopped_by_watchpoint, stopped_data_address, new_process, new_thread,
8568 prepare_to_resume.
8569 * server.c (debug_hw_points): New global.
8570 (monitor_show_help): Document set debug-hw-points.
8571 (handle_query): Process "set debug-hw-points".
8572 * server.h (debug_hw_points): Declare.
8573 (paddress): Declare.
8574 * utils.c (NUMCELLS, CELLSIZE): New macros.
8575 (get_sell, xsnprintf, paddress): New functions.
8576 * win32-arm-low.c (the_low_target): Add entries for insert_point,
8577 remove_point, stopped_by_watchpoint, stopped_data_address.
8578 * win32-i386-low.c: Include i386-low.h.
8579 (debug_reg_state): Replaces dr.
8580 (i386_dr_low_set_addr, i386_dr_low_set_control): New functions.
8581 (i386_dr_low_get_status): New function.
8582 (i386_insert_point, i386_remove_point): New functions.
8583 (i386_stopped_by_watchpoint): New function.
8584 (i386_stopped_data_address): New function.
8585 (i386_initial_stuff): Update.
8586 (get_thread_context,set_thread_context,i386_thread_added): Update.
8587 (the_low_target): Add entries for insert_point,
8588 remove_point, stopped_by_watchpoint, stopped_data_address.
8589 * win32-low.c (win32_insert_watchpoint): New function.
8590 (win32_remove_watchpoint): New function.
8591 (win32_stopped_by_watchpoint): New function.
8592 (win32_stopped_data_address): New function.
8593 (win32_target_ops): Add entries for insert_watchpoint,
8594 remove_watchpoint, stopped_by_watchpoint, stopped_data_address.
8595 * win32-low.h (win32_target_ops): New members insert_point,
8596 remove_point, stopped_by_watchpoint, stopped_data_address.
8597
d993e290
PA
85982009-06-25 Pedro Alves <pedro@codesourcery.com>
8599
8600 * server.c (process_serial_event): Re-return unsupported, not
8601 error, if the type isn't recognized. Re-allow supporting only
8602 insert or remove packets. Also call require_running for
8603 breakpoints. Add missing break statement to default case. Tidy.
8604 * target.h (struct target_ops): Rename insert_watchpoint to
8605 insert_point, and remove_watchpoint to remove_point.
8606
8607 * linux-low.h (struct linux_target_ops): Likewise.
8608 * linux-low.c (linux_insert_watchpoint): Rename to ...
8609 (linux_insert_point): ... this. Adjust.
8610 (linux_remove_watchpoint): Rename to ...
8611 (linux_remove_point): ... this. Adjust.
8612 (linux_target_ops): Adjust.
8613 * linux-crisv32-low.c (cris_insert_watchpoint): Rename to ...
8614 (cris_insert_point): ... this.
8615 (cris_remove_watchpoint): Rename to ...
8616 (cris_remove_point): ... this.
8617 (the_low_target): Adjust.
8618
0f54c268
PM
86192009-06-24 Pierre Muller <muller@ics.u-strasbg.fr>
8620
8621 * server.c (handle_v_kill): Pass signal_pid to
8622 kill_inferior if multi_process is zero.
8623
c6314022
AR
86242009-06-23 Aleksandar Ristovski <aristovski@qnx.com>
8625
8626 * server.c (process_serial_event): Add support for Z0 and Z1 packet.
8627 * target.h (target_ops): Comment for *_watchpoint to make it clear
8628 the functions can get types '0' and '1'.
8629
4463ce24
AR
86302009-06-22 Aleksandar Ristovski <aristovski@qnx.com>
8631
8632 * linux-low.c (usr_fetch_inferior_registers): Remove check for regno 0.
8633 * proc-service.c (ps_lgetregs): Pass -1 to fetch all registers.
8634 * regcache.c (get_regcache): Likewise.
8635 * spu-low.c (spu_fetch_registers): Remove 0 to -1 conversion.
8636 * win32-low.c (child_fetch_inferior_registers): Remove check for
8637 regno 0.
8638
cf8fd78b
PA
86392009-06-19 Aleksandar Ristovski <aristovski@qnx.com>
8640 Pedro Alves <pedro@codesourcery.com>
8641
8642 * target.h (struct target_ops) <supports_multi_process>: New
8643 callback.
8644 (target_supports_multi_process): New.
8645 * server.c (handle_query): Even if GDB reports support, only
8646 enable multi-process if the target also supports it. Report
8647 multi-process support only if the target backend supports it.
8648 * linux-low.c (linux_supports_multi_process): New function.
8649 (linux_target_ops): Install it as target_supports_multi_process
8650 callback.
8651
47c0c975
DE
86522009-05-24 Doug Evans <dje@google.com>
8653
e09875d4
DE
8654 Global renaming of find_thread_pid to find_thread_ptid.
8655 * server.h (find_thread_ptid): Renamed from find_thread_pid.
8656 * inferiors.c (find_thread_ptid): Renamed from find_thread_pid.
8657 All callers updated.
8658
e27d73f6
DE
8659 * linux-low.c (handle_extended_wait): Use linux_resume_one_lwp
8660 to resume the newly created thread, don't call ptrace (PTRACE_CONT)
8661 directly.
8662
47c0c975
DE
8663 * linux-low.c (get_stop_pc): Print pc if debug_threads.
8664 (check_removed_breakpoint, linux_wait_for_lwp): Ditto.
8665 (linux_resume_one_lwp): Ditto.
8666
2acc282a
DE
86672009-05-23 Doug Evans <dje@google.com>
8668
8669 * linux-low.c (linux_resume_one_lwp): Change type of first arg
8670 from struct inferior_list_entry * to struct lwp_info *.
8671 All callers updated.
8672
9f1036c1
DE
86732009-05-13 Doug Evans <dje@google.com>
8674
8675 * linux-x86-low.c: Don't include assert.h.
8676 (x86_siginfo_fixup): Use fatal, not assert.
8677 (x86_arch_setup): Fix comment.
8678
d0722149
DE
86792009-05-12 Doug Evans <dje@google.com>
8680
8681 Biarch support for i386/amd64 gdbserver.
8682 * Makefile.in (SFILES): Remove linux-i386-low.c, linux-x86-64-low.c.
8683 Add linux-x86-low.c.
8684 (linux-i386-low.o, linux-x86-64-low.o): Delete.
8685 (linux-x86-low.o): Add.
8686 * linux-x86-64-low.c: Delete.
8687 * linux-i386-low.c: Delete.
8688 * linux-x86-low.c: New file.
8689 * configure.srv (i?86-linux srv_tgtobj): Replace linux-i386-low.o with
8690 linux-x86-low.o.
8691 (x86_64-linux srv_tgtobj): Replace linux-x86-64-low.o with
8692 linux-x86-low.o.
8693 (x86_64-linux srv_regobj): Add reg-i386-linux.o.
8694 * linux-low.c: Include ansidecl.h, elf/common.h, elf/external.h.
8695 (linux_child_pid_to_exec_file): New function.
8696 (elf_64_header_p, elf_64_file_p): New functions.
8697 (siginfo_fixup): New function.
8698 (linux_xfer_siginfo): New local inf_siginfo. Call siginfo_fixup to
8699 give target a chance to convert layout.
8700 * linux-low.h (linux_target_ops): New member siginfo_fixup.
8701 (linux_child_pid_to_exec_file, elf_64_file_p): Declare.
8702
fdeb2a12
DE
87032009-05-07 Doug Evans <dje@google.com>
8704
8705 * linux-low.c (regsets_fetch_inferior_registers): Fix memory leak.
8706 (regsets_store_inferior_registers): Ditto.
8707
a6dbe5df
PA
87082009-05-06 Pedro Alves <pedro@codesourcery.com>
8709
8710 PR server/10048
8711
8712 * linux-low.c (must_set_ptrace_flags): Delete.
8713 (linux_create_inferior): Set `lwp->must_set_ptrace_flags' instead
8714 of the global.
8715 (linux_attach_lwp_1): Don't set PTRACE_SETOPTIONS here. Set
8716 `lwp->must_set_ptrace_flags' instead.
ba42693b 8717 (linux_wait_for_event_1): Set ptrace options here.
a6dbe5df
PA
8718 (linux_wait_1): ... not here.
8719
5091eb23
DE
87202009-04-30 Doug Evans <dje@google.com>
8721
9f767825
DE
8722 * inferiors.c (started_inferior_callback): New function.
8723 (attached_inferior_callback): New function.
8724 (have_started_inferiors_p, have_attached_inferiors_p): New functions.
8725 * server.c (print_started_pid, print_attached_pid): New functions.
8726 (detach_or_kill_for_exit): New function.
8727 (main): Call it instead of for_each_inferior (kill_inferior_callback).
8728 * server.h (have_started_inferiors_p): Declare.
8729 (have_attached_inferiors_p): Declare.
8730
5091eb23
DE
8731 * inferiors.c (remove_process): Fix memory leak, free process.
8732 * linux-low.c (linux_remove_process): New function.
8733 (linux_kill): Call it instead of remove_process.
8734 (linux_detach, linux_wait_1): Ditto.
8735
155c8968
PA
87362009-04-19 Danny Backx <dannybackx@users.sourceforge.net>
8737
8738 * configure.srv: Add x86 Windows CE target.
8739
7fe519cb
UW
87402009-04-03 Ulrich Weigand <uweigand@de.ibm.com>
8741
8742 * inferiors.c (get_thread_process): Make global.
8743 * server.h (get_thread_process): Add prototype.
8744 * thread-db.c (find_one_thread): Use get_thread_process
8745 instead of current_process.
8746 (thread_db_get_tls_address): Do not crash if called when
8747 thread layer is not yet initialized.
8748
5472f405
UW
87492009-04-03 Ulrich Weigand <uweigand@de.ibm.com>
8750
8751 * remote-utils.c (prepare_resume_reply): Null-terminate packet.
8752 * spu-low.c (current_tid): Rename to ...
8753 (current_ptid): ... this.
8754 (fetch_ppc_register, fetch_ppc_memory, store_ppc_memory,
8755 spu_proc_xfer_spu, spu_resume, spu_request_interrupt): Use
8756 ptid_get_lwp (current_ptid) instead of current_tid.
8757 (spu_kill, spu_detach, spu_join, spu_wait): Use pid argument
8758 instead of current_tid. Use find_process_pid to verify pid
8759 argument is valid. Pass proper argument to remove_process.
8760 (spu_thread_alive): Compare current_ptid instead of current_tid.
8761 (spu_resume): Likewise.
8762
55ac2b99
PA
87632009-04-02 Pedro Alves <pedro@codesourcery.com>
8764
8765 * linux-low.c (usr_store_inferior_registers): Declare local `pid'
8766 variable.
8767
95954743
PA
87682009-04-01 Pedro Alves <pedro@codesourcery.com>
8769
8770 Implement the multiprocess extensions, and add linux multiprocess
8771 support.
8772
8773 * server.h (ULONGEST): Declare.
8774 (struct ptid, ptid_t): New.
8775 (minus_one_ptid, null_ptid): Declare.
8776 (ptid_build, pid_to_ptid, ptid_get_pid, ptid_get_lwp)
8777 (ptid_get_tid, ptid_equal, ptid_is_pid): Declare.
8778 (struct inferior_list_entry): Change `id' type from unsigned from
8779 to ptid_t.
8780 (struct sym_cache, struct breakpoint, struct
8781 process_info_private): Forward declare.
8782 (struct process_info): Declare.
8783 (current_process): Declare.
8784 (all_processes): Declare.
8785 (initialize_inferiors): Declare.
8786 (add_thread): Adjust to use ptid_t.
8787 (thread_id_to_gdb_id, thread_to_gdb_id, gdb_id_to_thread_id): Ditto.
8788 (add_process, remove_process, find_thread_pid): Declare.
8789 (find_inferior_id): Adjust to use ptid_t.
8790 (cont_thread, general_thread, step_thread): Change type to ptid_t.
8791 (multi_process): Declare.
8792 (push_event): Adjust to use ptid_t.
8793 (read_ptid, write_ptid): Declare.
8794 (prepare_resume_reply): Adjust to use ptid_t.
8795 (clear_symbol_cache): Declare.
8796 * inferiors.c (all_processes): New.
8797 (null_ptid, minus_one_ptid): New.
8798 (ptid_build, pid_to_ptid, ptid_get_pid, ptid_get_lwp)
8799 (ptid_get_tid, ptid_equal, ptid_is_pid): New.
8800 (add_thread): Change unsigned long to ptid. Remove gdb_id
8801 parameter. Adjust.
8802 (thread_id_to_gdb_id, thread_to_gdb_id): Change unsigned long to ptid.
8803 (gdb_id_to_thread): Rename to ...
8804 (find_thread_pid): ... this. Change unsigned long to ptid.
8805 (gdb_id_to_thread_id, find_inferior_id): Change unsigned long to ptid.
8806 (loaded_dll, pull_pid_from_list): Adjust.
8807 (add_process, remove_process, find_process_pid)
8808 (get_thread_process, current_process, initialize_inferiors): New.
8809 * target.h (struct thread_resume) <thread>: Change type to ptid_t.
8810 (struct target_waitstatus) <related_pid>: Ditto.
8811 (struct target_ops) <kill, detach>: Add `pid' argument. Change
8812 return type to int.
8813 (struct target_ops) <join>: Add `pid' argument.
8814 (struct target_ops) <thread_alive>: Change pid's type to ptid_t.
8815 (struct target_ops) <wait>: Add `ptid' field. Change return type
8816 to ptid.
8817 (kill_inferior, detach_inferior, join_inferior): Add `pid' argument.
8818 (mywait): Add `ptid' argument. Change return type to ptid_t.
8819 (target_pid_to_str): Declare.
8820 * target.c (set_desired_inferior): Adjust to use ptids.
8821 (mywait): Add new `ptid' argument. Adjust.
8822 (target_pid_to_str): New.
8823 * mem-break.h (free_all_breakpoints): Declare.
8824 * mem-break.c (breakpoints): Delelete.
8825 (set_breakpoint_at, delete_breakpoint, find_breakpoint_at)
8826 (check_mem_read, check_mem_write, delete_all_breakpoints): Adjust
8827 to use per-process breakpoint list.
8828 (free_all_breakpoints): New.
8829 * remote-utils.c (struct sym_cache) <name>: Drop `const'.
8830 (symbol_cache, all_symbols_looked_up): Delete.
8831 (hexchars): New.
8832 (ishex, unpack_varlen_hex, write_ptid, hex_or_minus_one,
8833 read_ptid): New.
8834 (prepare_resume_reply): Change ptid argument's type from unsigned
8835 long to ptid_t. Adjust. Implement W;process and X;process.
8836 (free_sym_cache, clear_symbol_cache): New.
8837 (look_up_one_symbol): Adjust to per-process symbol cache. *
8838 * server.c (cont_thread, general_thread, step_thread): Change type
8839 to ptid_t.
8840 (attached): Delete.
8841 (multi_process): New.
8842 (last_ptid): Change type to ptid_t.
8843 (struct vstop_notif) <ptid>: Change type to ptid_t.
8844 (queue_stop_reply, push_event): Change `ptid' argument's type to
8845 ptid_t.
8846 (discard_queued_stop_replies): Add `pid' argument.
8847 (start_inferior): Adjust to use ptids. Adjust to mywait interface
8848 changes. Don't reference the `attached' global.
8849 (attach_inferior): Adjust to mywait interface changes.
8850 (handle_query): Adjust to use ptids. Parse GDB's qSupported
8851 features. Handle and report "multiprocess+". Handle
8852 "qAttached:PID".
8853 (handle_v_cont): Adjust to use ptids. Adjust to mywait interface
8854 changes.
8855 (handle_v_kill): New.
8856 (handle_v_stopped): Adjust to use target_pid_to_str.
8857 (handle_v_requests): Allow multiple attaches and runs when
8858 multiprocess extensions are in effect. Handle "vKill".
8859 (myresume): Adjust to use ptids.
8860 (queue_stop_reply_callback): Add `arg' parameter. Handle it.
8861 (handle_status): Adjust to discard_queued_stop_replies interface
8862 change.
8863 (first_thread_of, kill_inferior_callback)
8864 (detach_or_kill_inferior_callback, join_inferiors_callback): New.
8865 (main): Call initialize_inferiors. Adjust to use ptids, killing
8866 and detaching from all inferiors. Handle multiprocess packet
8867 variants.
8868 * linux-low.h: Include gdb_proc_service.h.
8869 (struct process_info_private): New.
8870 (struct linux_target_ops) <pid_of>: Use ptid_get_pid.
8871 <lwpid_of>: Use ptid_get_lwp.
8872 (get_lwp_thread): Adjust.
8873 (struct lwp_info): Add `dead' member.
8874 (find_lwp_pid): Declare.
8875 * linux-low.c (thread_db_active): Delete.
8876 (new_inferior): Adjust comment.
8877 (inferior_pid): Delete.
8878 (linux_add_process): New.
8879 (handle_extended_wait): Adjust.
8880 (add_lwp): Change unsigned long to ptid.
8881 (linux_create_inferior): Add process to processes table. Adjust
8882 to use ptids. Don't set new_inferior here.
8883 (linux_attach_lwp): Rename to ...
8884 (linux_attach_lwp_1): ... this. Add `initial' argument. Handle
8885 it. Adjust to use ptids.
8886 (linux_attach_lwp): New.
8887 (linux_attach): Add process to processes table. Don't set
8888 new_inferior here.
8889 (struct counter): New.
8890 (second_thread_of_pid_p, last_thread_of_process_p): New.
8891 (linux_kill_one_lwp): Add `args' parameter. Handle it. Adjust to
8892 multiple processes.
8893 (linux_kill): Add `pid' argument. Handle it. Adjust to multiple
8894 processes. Remove process from process table.
8895 (linux_detach_one_lwp): Add `args' parameter. Handle it. Adjust
8896 to multiple processes.
8897 (any_thread_of): New.
8898 (linux_detach): Add `pid' argument, and handle it. Remove process
8899 from processes table.
8900 (linux_join): Add `pid' argument. Handle it.
8901 (linux_thread_alive): Change unsighed long argument to ptid_t.
8902 Consider dead lwps as not being alive.
8903 (status_pending_p): Rename `dummy' argument to `arg'. Filter out
8904 threads we're not interested in.
8905 (same_lwp, find_lwp_pid): New.
8906 (linux_wait_for_lwp): Change `pid' argument's type from int to
8907 ptid_t. Adjust.
8908 (linux_wait_for_event): Rename to ...
8909 (linux_wait_for_event_1): ... this. Change `pid' argument's type
8910 from int to ptid_t. Adjust.
8911 (linux_wait_for_event): New.
8912 (linux_wait_1): Add `ptid' argument. Change return type to
8913 ptid_t. Adjust. Use last_thread_of_process_p. Remove processes
8914 that exit from the process table.
8915 (linux_wait): Add `ptid' argument. Change return type to ptid_t.
8916 Adjust.
8917 (mark_lwp_dead): New.
8918 (wait_for_sigstop): Adjust to use ptids. If a process exits while
8919 stopping all threads, mark its main lwp as dead.
8920 (linux_set_resume_request, linux_resume_one_thread): Adjust to use
8921 ptids.
8922 (fetch_register, usr_store_inferior_registers)
8923 (regsets_fetch_inferior_registers)
8924 (regsets_store_inferior_registers, linux_read_memory)
8925 (linux_write_memory): Inline `inferior_pid'.
8926 (linux_look_up_symbols): Adjust to use per-process
8927 `thread_db_active'.
8928 (linux_request_interrupt): Adjust to use ptids.
8929 (linux_read_auxv): Inline `inferior_pid'.
8930 (initialize_low): Don't reference thread_db_active.
8931 * gdb_proc_service.h (struct ps_prochandle) <pid>: Remove.
8932 * proc-service.c (ps_lgetregs): Use find_lwp_pid.
8933 (ps_getpid): Return the pid of the current inferior.
8934 * thread-db.c (proc_handle, thread_agent): Delete.
8935 (thread_db_create_event, thread_db_enable_reporting): Adjust to
8936 per-process data.
8937 (find_one_thread): Change argument type to ptid_t. Adjust to
8938 per-process data.
8939 (maybe_attach_thread): Adjust to per-process data and ptids.
8940 (thread_db_find_new_threads): Ditto.
8941 (thread_db_init): Ditto.
8942 * spu-low.c (spu_create_inferior, spu_attach): Add process to
8943 processes table. Adjust to use ptids.
8944 (spu_kill, spu_detach): Adjust interface. Remove process from
8945 processes table.
8946 (spu_join, spu_thread_alive): Adjust interface.
8947 (spu_wait): Adjust interface. Remove process from processes
8948 table. Adjust to use ptids.
8949 * win32-low.c (current_inferior_tid): Delete.
8950 (current_inferior_ptid): New.
8951 (debug_event_ptid): New.
8952 (thread_rec): Take a ptid. Adjust.
8953 (child_add_thread): Add `pid' argument. Adjust to use ptids.
8954 (child_delete_thread): Ditto.
8955 (do_initial_child_stuff): Add `attached' argument. Add process to
8956 processes table.
8957 (child_fetch_inferior_registers, child_store_inferior_registers):
8958 Adjust.
8959 (win32_create_inferior): Pass 0 to do_initial_child_stuff.
8960 (win32_attach): Pass 1 to do_initial_child_stuff.
8961 (win32_kill): Adjust interface. Remove process from processes
8962 table.
8963 (win32_detach): Ditto.
8964 (win32_join): Adjust interface.
8965 (win32_thread_alive): Take a ptid.
8966 (win32_resume): Adjust to use ptids.
8967 (get_child_debug_event): Ditto.
8968 (win32_wait): Adjust interface. Remove exiting process from
8969 processes table.
8970
bd99dc85
PA
89712009-04-01 Pedro Alves <pedro@codesourcery.com>
8972
8973 Non-stop mode support.
8974
8975 * server.h (non_stop): Declare.
8976 (gdb_client_data, handler_func): Declare.
8977 (delete_file_handler, add_file_handler, start_event_loop):
8978 Declare.
8979 (handle_serial_event, handle_target_event, push_event)
8980 (putpkt_notif): Declare.
8981 * target.h (enum resume_kind): New.
8982 (struct thread_resume): Replace `step' field by `kind' field.
8983 (TARGET_WNOHANG): Define.
8984 (struct target_ops) <wait>: Add `options' argument.
8985 <supports_non_stop, async, start_non_stop>: New fields.
8986 (target_supports_non_stop, target_async): New.
8987 (start_non_stop): Declare.
8988 (mywait): Add `options' argument.
8989 * target.c (mywait): Add `options' argument. Print child exit
8990 notifications here.
8991 (start_non_stop): New.
8992 * server.c (non_stop, own_buf, mem_buf): New globals.
8993 (struct vstop_notif): New.
8994 (notif_queue): New global.
8995 (queue_stop_reply, push_event, discard_queued_stop_replies)
8996 (send_next_stop_reply): New.
8997 (start_inferior): Adjust to use resume_kind. Adjust to mywait
8998 interface changes.
8999 (attach_inferior): In non-stop mode, don't wait for the target
9000 here.
9001 (handle_general_set): Handle QNonStop.
9002 (handle_query): When handling qC, return the current general
9003 thread, instead of the first thread of the list.
9004 (handle_query): If the backend supports non-stop mode, include
9005 QNonStop+ in the qSupported query response.
9006 (handle_v_cont): Adjust to use resume_kind. Handle resume_stop
9007 and non-stop mode.
9008 (handle_v_attach, handle_v_run): Handle non-stop mode.
9009 (handle_v_stopped): New.
9010 (handle_v_requests): Report support for vCont;t. Handle vStopped.
9011 (myresume): Adjust to use resume_kind. Handle non-stop.
9012 (queue_stop_reply_callback): New.
9013 (handle_status): Handle non-stop mode.
9014 (main): Clear non_stop flag on reconnection. Use the event-loop.
9015 Refactor serial protocol handling from here ...
9016 (process_serial_event): ... to this new function. When GDB
9017 selects any thread, select one here. In non-stop mode, wait until
9018 GDB acks all pending events before exiting.
9019 (handle_serial_event, handle_target_event): New.
9020 * remote-utils.c (remote_open): Install remote_desc in the event
9021 loop.
9022 (remote_close): Remove remote_desc from the event loop.
9023 (putpkt_binary): Rename to...
9024 (putpkt_binary_1): ... this. Add `is_notic' argument. Handle it.
9025 (putpkt_binary): New as wrapper around putpkt_binary_1.
9026 (putpkt_notif): New.
9027 (prepare_resume_reply): In non-stop mode, don't change the
9028 general_thread.
9029 * event-loop.c: New.
9030 * Makefile.in (OBJ): Add event-loop.o.
9031 (event-loop.o): New rule.
9032
9033 * linux-low.h (pid_of): Moved here.
9034 (lwpid_of): New.
9035 (get_lwp_thread): Use lwpid_of.
9036 (struct lwp_info): Delete `lwpid' field. Add `suspended' field.
9037 * linux-low.c (pid_of): Delete.
9038 (inferior_pid): Use lwpid_of.
9039 (linux_event_pipe): New.
9040 (target_is_async_p): New.
9041 (delete_lwp): New.
9042 (handle_extended_wait): Use lwpid_of.
9043 (add_lwp): Don't set lwpid field.
9044 (linux_attach_lwp): Adjust debug output. Use lwpid_of.
9045 (linux_kill_one_lwp): If killing a running lwp, stop it first.
9046 Use lwpid_of. Adjust to linux_wait_for_event interface changes.
9047 (linux_detach_one_lwp): If detaching from a running lwp, stop it
9048 first. Adjust to linux_wait_for_event interface changes. Use
9049 lwpid_of.
9050 (linux_detach): Don't delete the main lwp here.
9051 (linux_join): Use my_waitpid. Avoid signal_pid. Use lwpid_of.
9052 (status_pending_p): Don't consider explicitly suspended lwps.
9053 (linux_wait_for_lwp): Take an integer pid instead of a lwp_info
9054 pointer. Add OPTIONS argument. Change return type to int. Use
9055 my_waitpid instead of sleeping. Handle WNOHANG. Use lwpid_of.
9056 (linux_wait_for_event): Take an integer pid instead of a lwp_info
9057 pointer. Add status pointer argument. Return a pid instead of a
9058 status. Use lwpid_of. Adjust to linux_wait_for_lwp interface
9059 changes. In non-stop mode, don't switch to a random thread.
9060 (linux_wait): Rename to...
9061 (linux_wait_1): ... this. Add target_options argument, and handle
9062 it. Adjust to use resume_kind. Use lwpid_of. In non-stop mode,
9063 don't handle the continue thread. Handle TARGET_WNOHANG. Merge
9064 clean exit and signal exit code. Don't stop all threads in
9065 non-stop mode. In all-stop mode, only stop all threads when
9066 reporting a stop to GDB. Handle explicit thread stop requests.
9067 (async_file_flush, async_file_mark): New.
9068 (linux_wait): New.
9069 (send_sigstop): Use lwpid_of.
9070 (wait_for_sigstop): Use lwpid_of. Adjust to linux_wait_for_event
9071 interface changes. In non-stop mode, don't switch to a random
9072 thread.
9073 (linux_resume_one_lwp): Use lwpid_of.
9074 (linux_continue_one_thread, linux_queue_one_thread): Merge into ...
9075 (linux_resume_one_thread): ... this. Handle resume_stop. In
9076 non-stop mode, don't look for pending flag in all threads.
9077 (resume_status_pending_p): Don't consider explicitly suspended
9078 threads.
9079 (my_waitpid): Reimplement. Emulate __WALL.
9080 (linux_request_interrupt, linux_read_offsets, linux_xfer_siginfo):
9081 Use lwpid_of.
9082 (sigchld_handler, linux_supports_non_stop, linux_async)
9083 (linux_start_non_stop): New.
9084 (linux_target_ops): Register linux_supports_non_stop, linux_async
9085 and linux_start_non_stop.
9086 (initialize_low): Install SIGCHLD handler.
9087 * thread-db.c (thread_db_create_event, find_one_thread)
9088 (thread_db_get_tls_address): Use lwpid_of.
9089 * win32-low.c (win32_detach): Adjust to use resume_kind.
9090 (win32_wait): Add `options' argument.
9091 * spu-low.c (spu_resume): Adjust to use resume_kind.
9092 (spu_wait): Add `options' argument.
9093
5b1c542e
PA
90942009-04-01 Pedro Alves <pedro@codesourcery.com>
9095
9096 Decouple target code from remote protocol.
9097
9098 * target.h (enum target_waitkind): New.
9099 (struct target_waitstatus): New.
9100 (struct target_ops) <wait>: Return an unsigned long. Take a
9101 target_waitstatus pointer instead of a char pointer.
9102 (mywait): Likewise.
9103 * target.c (mywait): Change prototype to return an unsigned long.
9104 Take a target_waitstatus pointer instead of a char pointer. Adjust.
9105 * server.h (thread_from_wait, old_thread_from_wait): Delete
9106 declarations.
9107 (prepare_resume_reply): Change prototype to take a
9108 target_waitstatus.
9109 * server.c (thread_from_wait, old_thread_from_wait): Delete.
9110 (last_status, last_ptid): New.
9111 (start_inferior): Remove "statusptr" argument. Adjust. Return a
9112 pid instead of a signal.
9113 (attach_inferior): Remove "status" and "signal" parameters.
9114 Adjust.
9115 (handle_query): For qGetTLSAddr, parse the thread id with strtol,
9116 not as an address.
9117 (handle_v_cont, handle_v_attach, handle_v_run, handle_v_kill)
9118 (handle_v_requests, myresume): Remove "status" and "signal"
9119 parameters. Adjust.
9120 (handle_status): New.
9121 (main): Delete local `status'. Adjust.
9122 * remote-utils.c: Include target.h.
9123 (prepare_resume_reply): Change prototype to take a
9124 target_waitstatus. Adjust.
9125
9126 * linux-low.c (linux_wait): Adjust to new target_ops->wait
9127 interface.
9128 * spu-low.c (spu_wait): Adjust.
9129 * win32-low.c (enum target_waitkind, struct target_waitstatus):
9130 Delete.
9131 (win32_wait): Adjust.
9132
2bd7c093
PA
91332009-04-01 Pedro Alves <pedro@codesourcery.com>
9134
9135 * target.h (struct thread_resume): Delete leave_stopped member.
9136 (struct target_ops): Add a `n' argument to the `resume' callback.
9137 * server.c (start_inferior): Adjust.
9138 (handle_v_cont, myresume): Adjust.
9139 * linux-low.c (check_removed_breakpoint): Adjust to resume
9140 interface change, and to removed leave_stopped field.
9141 (resume_ptr): Delete.
9142 (struct thread_resume_array): New.
9143 (linux_set_resume_request): Add new `arg' parameter. Adjust to
9144 resume interface change.
9145 (linux_continue_one_thread, linux_queue_one_thread)
9146 (resume_status_pending_p): Check if the resume field is NULL
9147 instead of checking the leave_stopped member.
9148 (linux_resume): Adjust to the target resume interface change.
9149 * spu-low.c (spu_resume): Adjust to the target resume interface
9150 change.
9151 * win32-low.c (win32_detach, win32_resume): Ditto.
9152
c35fafde
PA
91532009-04-01 Pedro Alves <pedro@codesourcery.com>
9154
9155 * linux-low.c (linux_wait_for_event): Don't clear the `stepping'
9156 flag.
9157 (wait_for_sigstop): Don't leave a finished single-step SIGTRAP
9158 pending.
9159 (linux_continue_one_thread): Only preserve the stepping flag if
9160 there's a pending breakpoint.
9161
0a59d50b
PA
91622009-03-31 Pedro Alves <pedro@codesourcery.com>
9163
9164 * server.c (main): After the inferior having exited, call
9165 remote_close before exiting gdbserver.
9166
f04c6d38
TJB
91672009-03-25 Thiago Jung Bauermann <bauerman@br.ibm.com>
9168
9169 Fix size of FPSCR in Power 7 processors.
9170 * linux-ppc-low.c (PPC_FEATURE_ARCH_2_05): Remove #define.
9171 (PPC_FEATURE_HAS_DFP): New #define.
9172 (ppc_arch_setup): Check for DFP feature instead of ISA 2.05 to decide on
9173 size of the FPSCR.
9174
78e5cee6
PA
91752009-03-23 Pedro Alves <pedro@codesourcery.com>
9176
9177 * server.c (handle_query) Whitespace and formatting.
9178
1b3f6016
PA
91792009-03-22 Pedro Alves <pedro@codesourcery.com>
9180
9181 * i387-fp.c, linux-arm-low.c, linux-cris-low.c,
9182 linux-crisv32-low.c, linux-i386-low.c, linux-low.c,
9183 linux-mips-low.c, linux-s390-low.c, linux-sparc-low.c,
9184 linux-x86-64-low.c, linux-xtensa-low.c, proc-service.c,
9185 regcache.c, remote-utils.c, server.c, spu-low.c, target.h,
9186 thread-db.c, win32-low.c, xtensa-xtregs.c, gdbreplay.c,
9187 Makefile.in, configure.ac: Fix whitespace throughout.
9188 * configure: Regenerate.
9189
a07b2135
PA
91902009-03-22 Pedro Alves <pedro@codesourcery.com>
9191
9192 * inferiors.c (find_inferior): Make it safe for the callback
9193 function to delete the currently iterated inferior.
9194
67cc2626
PA
91952009-03-22 Pedro Alves <pedro@codesourcery.com>
9196
9197 * Makefile.in (linuw_low_h): Move higher.
9198 (thread-db.o): Depend on $(linux_low_h).
9199
54a0b537
PA
92002009-03-17 Pedro Alves <pedro@codesourcery.com>
9201
9202 Rename "process" to "lwp" throughout.
9203
9204 * linux-low.c (all_processes): Rename to...
9205 (all_lwps): ... this.
9206 (inferior_pid, handle_extended_wait, get_stop_pc): Adjust.
9207 (add_process): Rename to ...
9208 (add_lwp): ... this. Adjust.
9209 (linux_create_inferior): Adjust.
9210 (linux_attach_lwp): Adjust.
9211 (linux_attach): Adjust.
9212 (linux_kill_one_process): Rename to ...
9213 (linux_kill_one_lwp): ... this. Adjust.
9214 (linux_kill): Adjust.
9215 (linux_detach_one_process): Rename to ...
9216 (linux_detach_one_lwp): ... this. Adjust.
9217 (linux_detach): Adjust.
9218 (check_removed_breakpoint): Adjust.
9219 (status_pending_p): Adjust.
9220 (linux_wait_for_process): Rename to ...
9221 (linux_wait_for_lwp): ... this. Adjust.
9222 (linux_wait_for_event): Adjust.
9223 (send_sigstop): Adjust.
9224 (wait_for_sigstop): Adjust.
9225 (stop_all_processes): Rename to ...
9226 (stop_all_lwps): ... this.
9227 (linux_resume_one_process): Rename to ...
9228 (linux_resume_one_lwp): ... this. Adjust.
9229 (linux_set_resume_request, linux_continue_one_thread)
9230 (linux_queue_one_thread, resume_status_pending_p)
9231 (usr_store_inferior_registers, regsets_store_inferior_registers)
9232 (linux_request_interrupt, linux_read_offsets, linux_xfer_siginfo):
9233 Adjust.
9234 * linux-low.h (get_process): Rename to ...
9235 (get_lwp): ... this. Adjust.
9236 (get_thread_process): Rename to ...
9237 (get_thread_lwp): ... this. Adjust.
9238 (get_process_thread): Rename to ...
9239 (get_lwp_thread): ... this. Adjust.
9240 (struct process_info): Rename to ...
9241 (struct lwp_info): ... this.
9242 (all_processes): Rename to ...
9243 (all_lwps): ... this.
9244 * proc-service.c (ps_lgetregs): Adjust.
9245 * thread-db.c (thread_db_create_event, find_one_thread)
9246 (maybe_attach_thread, thread_db_get_tls_address): Adjust.
9247
0b16c5cf
PA
92482009-03-14 Pedro Alves <pedro@codesourcery.com>
9249
9250 * server.c (handle_query): Handle "qAttached".
9251
32de4b9d
NS
92522009-03-13 Nathan Sidwell <nathan@codesourcery.com>
9253
9254 * Makefile.in, hostio-errno.c, errno.c, xtensa-xtregs.c: Change to
9255 GPLv3, update license URL.
9256
2aecd87f
DE
92572009-03-01 Doug Evans <dje@google.com>
9258
93efd302 9259 * Makefile.in (INCLUDE_CFLAGS): Add -I$(srcdir)/../common.
2aecd87f
DE
9260 (server_h): Add gdb_signals.h.
9261 (signals.o): Update.
9262 * server.h (target_signal_from_host,target_signal_to_host_p)
9263 (target_signal_to_host,target_signal_to_name): Moved to gdb_signals.h.
9264
86b1f9c5
PM
92652009-02-14 Pierre Muller <muller@ics.u-strasbg.fr>
9266
9267 * remote-utils.c (getpkt): Also generate remote-debug
9268 information if noack_mode is set.
9269
4aa995e1
PA
92702009-02-06 Pedro Alves <pedro@codesourcery.com>
9271
9272 * server.c (handle_query): Report qXfer:siginfo:read and
9273 qXfer:siginfo:write as supported and handle them.
9274 * target.h (struct target_ops) <qxfer_siginfo>: New field.
9275 * linux-low.c (linux_xfer_siginfo): New.
9276 (linux_target_ops): Set it.
9277
62709adf
PA
92782009-01-26 Pedro Alves <pedro@codesourcery.com>
9279
9280 * server.c (gdbserver_usage): Mention --remote-debug.
9281 (main): Accept '--remote-debug' switch.
9282
aef93bd7
DE
92832009-01-18 Doug Evans <dje@google.com>
9284
9285 * regcache.c (new_register_cache): No need to check result of xcalloc.
9286 * server.c (handle_search_memory): Back out calls to xmalloc,
9287 result is checked and error is returned to user upon failure.
9288 (handle_query): Ditto. Add more checks for result of malloc.
9289 (handle_v_cont): Check result of malloc, report error back to
9290 user upon failure.
9291 (handle_v_run): Ditto. Call freeargv.
9292 * server.h (freeargv): Declare.
9293 * utils.c (freeargv): New fn.
9294
54363045
DE
92952009-01-15 Doug Evans <dje@google.com>
9296
f626972c
DE
9297 * gdbreplay.c (perror_with_name): Make arg const char *.
9298 * server.h (target_signal_to_name): Make return type const char *.
0842e787 9299 * thread-db.c (thread_db_err_str): Make return type const char *.
f626972c 9300 * utils.c (perror_with_name): Make arg const char *.
54363045 9301
18aae699
PA
93022009-01-14 Pedro Alves <pedro@codesourcery.com>
9303
9304 * win32-low.c (get_child_debug_event): Issue a final DBG_CONTINUE
9305 when handling a EXIT_PROCESS_DEBUG_EVENT.
9306
ff703abe
JB
93072009-01-06 Joel Brobecker <brobecker@adacore.com>
9308
9309 * gdbreplay.c (gdbreplay_version): Update copyright year.
9310 * server.c (gdbserver_version): Likewise.
9311
f21cc1a2 93122009-01-05 Doug Evans <dje@google.com>
0e21c1ec
DE
9313
9314 * linux-low.c (linux_attach_lwp): Add some comments/fixmes.
f21cc1a2 9315 (handle_extended_wait): Improve comment.
0e21c1ec 9316
bca929d3
DE
93172008-12-13 Doug Evans <dje@google.com>
9318
9319 * utils.c (xmalloc,xcalloc,xstrdup): New fns.
9320 * server.h (ATTR_MALLOC): New macro.
9321 (xmalloc,xcalloc,xstrdup): Declare.
9322 * hostio.c: Replace malloc,calloc,strdup with xmalloc,xcalloc,xstrdup.
9323 * inferiors.c: Ditto.
9324 * linux-low.c: Ditto.
9325 * mem-break.c: Ditto.
9326 * regcache.c: Ditto.
9327 * remote-utils.c: Ditto.
9328 * server.c: Ditto.
9329 * target.c: Ditto.
9330 * win32-low.c: Ditto.
9331
97438e3f
DE
93322008-12-12 Doug Evans <dje@google.com>
9333
896c7fbb
DE
9334 * linux-low.c (linux_wait_for_process): Don't clobber current_inferior
9335 in debugging printf.
9336
97438e3f
DE
9337 * linux-low.c (handle_extended_wait): Simplify, use my_waitpid.
9338
e3b886f8
DE
93392008-12-09 Doug Evans <dje@google.com>
9340
9341 * linux-low.h (struct process_info): Delete member tid, unused.
9342 * thread-db.c (find_one_thread): Update.
9343 (maybe_attach_thread): Update.
9344
07e059b5
VP
93452008-12-02 Pedro Alves <pedro@codesourcery.com>
9346
889bf7c5
PA
9347 * target.h (struct target_ops): Add qxfer_osdata member.
9348 * linux-low.c: Include ctype.h and pwd.h and sys/types.h
9349 and dirent.h.
9350 (linux_qxfer_osdata): New functions.
9351 (linux_target_ops): Register linux_qxfer_osdata as qxfer_osdata
9352 callback.
9353 * server.c (handle_query): Handle "qXfer:osdata:read:".
9354 * remote-utils.c (buffer_grow, buffer_free, buffer_init, buffer_finish)
9355 (buffer_xml_printf): New functions.
9356 * server.h (struct buffer): New.
9357 (buffer_grow_str, buffer_grow_str0): New macros.
9358 (buffer_grow, buffer_free, buffer_init, buffer_finish)
9359 (buffer_xml_printf): Declare.
07e059b5 9360
4cab47ab
DE
93612008-11-24 Doug Evans <dje@google.com>
9362
9363 * Makefile.in (VERSION,DIST,LINT,LINTFLAGS): Delete, unused.
9364
f142445f
DJ
93652008-11-24 Daniel Jacobowitz <dan@codesourcery.com>
9366
9367 * server.c (handle_v_run): Always use the supplied argument list.
9368
d0107bb6 93692008-11-19 Bob Wilson <bob.wilson@acm.org>
889bf7c5 9370
d0107bb6
BW
9371 * xtensa-xtregs.c (XTENSA_ELF_XTREG_SIZE): Change to 4.
9372 (xtensa_regmap_table): Add entry for scompare1.
889bf7c5 9373
2c4ad781
TJB
93742008-11-18 Thiago Jung Bauermann <bauerman@br.ibm.com>
9375
9376 * Makefile.in (powerpc-isa205-32l.o, powerpc-isa205-32l.c,
9377 powerpc-isa205-altivec32l.o, powerpc-isa205-altivec32l.c,
9378 powerpc-isa205-vsx32l.o, powerpc-isa205-vsx32l.c,
9379 powerpc-isa205-64l.o, powerpc-isa205-64l.c,
9380 powerpc-isa205-altivec64l.o, powerpc-isa205-altivec64l.c,
9381 powerpc-isa205-vsx64l.o, powerpc-isa205-vsx64l.c): New targets.
9382 * configure.srv (powerpc*-*-linux*): Add ISA 2.05 object files and
9383 XML target descriptions.
9384 * linux-ppc-low.c (ppc_arch_setup): Init registers with 64-bit FPSCR
9385 when inferior is running on an ISA 2.05 or later processor. Add
9386 special case to return offset for full 64-bit slot of FPSCR when
9387 in 32-bits.
9388
dfb64f85
DJ
93892008-11-14 Daniel Gutson <dgutson@codesourcery.com>
9390
9391 * Makefile.in (SFILES, clean): Added sparc64 files.
9392 (reg-sparc64.o, reg-sparc64.c): New.
9393 * configure.srv (sparc*-*-linux*): New configuration.
9394 * linux-low.c (regsets_fetch_inferior_registers): Swap ptrace
9395 syscall arguments for SPARC.
9396 (regsets_store_inferior_registers): Likewise.
9397 * linux-sparc-low.c: New file.
9398
66b6e1dd
DE
93992008-10-21 Doug Evans <dje@google.com>
9400
9401 * Makefile.in (BFD_DIR,BFD,BFD_SRC,BFD_CFLAGS): Delete.
9402 (READLINE_DIR,READLINE_DEP): Delete.
9403 (INTERNAL_CFLAGS): Update.
9404 (LINTFLAGS): Update.
9405
9b710a42
PA
94062008-10-10 Pedro Alves <pedro@codesourcery.com>
9407
9408 * server.c (handle_v_run): If GDB didn't specify an argv, use the
9409 whole argv from the last run, not just argv[0].
9410
5822d809
PA
94112008-09-08 Pedro Alves <pedro@codesourcery.com>
9412
9413 * regcache.c (new_register_cache): Return NULL if the register
9414 cache size isn't known yet.
9415 (free_register_cache): Avoid dereferencing a NULL regcache.
9416
74aac56f
DJ
94172008-09-04 Daniel Jacobowitz <dan@codesourcery.com>
9418
9419 * configure.srv: Merge MIPS and MIPS64.
9420
400b20f5
MR
94212008-08-24 Maciej W. Rozycki <macro@linux-mips.org>
9422
9423 * Makefile.in (uninstall): Apply $(EXEEXT) too.
9424
677c5bb1
LM
94252008-08-18 Luis Machado <luisgpm@br.ibm.com>
9426
9427 * Makefile.in: Add required vsx dependencies.
9428
9429 * linux-ppc-low: Define PPC_FEATURE_HAS_VSX.
9430 Declare init_registers_powerpc_vsx32l.
9431 Declare init_registers_powerpc_vsx64l.
9432 Define PTRACE_GETVSXREGS and PTRACE_SETVSXREGS.
9433 (ppc_arch_setup): Check for VSX in hwcap.
9434 (ppc_fill_vsxregset): New function.
9435 (ppc_store_vsxregset): New function.
9436 Add new VSX entry in regset_info target_regsets.
9437
9438 * configure.srv: Add new VSX dependencies.
9439
a6f3e723
SL
94402008-08-12 Pedro Alves <pedro@codesourcery.com>
9441
9442 * remote-utils.c (noack_mode, transport_is_reliable): New globals.
9443 (remote_open): Set or clear transport_is_reliable.
9444 (putpkt_binary): Don't expect acks in noack mode.
9445 (getpkt): Don't send ack/nac in noack mode.
9446 * server.c (handle_general_set): Handle QStartNoAckMode.
9447 (handle_query): If connected by tcp pass QStartNoAckMode+ in
9448 qSupported.
9449 (main): Reset noack_mode on every connection.
9450 * server.h (noack_mode): Declare.
9451
a417dc56
RW
94522008-08-07 Ralf Wildenhues <Ralf.Wildenhues@gmx.de>
9453
9454 * Makefile.in (GDBREPLAY_OBS): New variable.
9455 (gdbreplay$(EXEEXT)): Use it to avoid unportable $^.
9456
3221518c
UW
94572008-08-05 Ulrich Weigand <uweigand@de.ibm.com>
9458 Daniel Jacobowitz <dan@codesourcery.com>
9459
9460 * linux-low.c (linux_resume_one_process): Ignore ESRCH.
9461 (usr_store_inferior_registers): Likewise.
9462 (regsets_store_inferior_registers): Likewise.
9463
ec56be1b
PA
94642008-07-31 Rolf Jansen <rj@surtec.com>
9465 Pedro Alves <pedro@codesourcery.com>
9466
9467 * configure.ac: Check for memmem declaration.
9468 * server.c [HAVE_MALLOC_H]: Include malloc.h.
9469 (disable_packet_vCont, disable_packet_Tthread, disable_packet_qC)
9470 (disable_packet_qfThreadInfo): Unconditionally compile.
9471 * server.h [!HAVE_DECL_MEMMEM]: Declare memmem.
9472 * configure, config.in: Regenerate.
9473
2fe5e3ff
DE
94742008-07-28 Doug Kwan <dougkwan@google.com>
9475
9476 * linux-low.c (sys/dir.h, sys/user.h): Remove includes.
9477 (linux_write_memory): Remove declaration of errno.
9478
836acd6d
UW
94792008-07-12 Ulrich Weigand <uweigand@de.ibm.com>
9480
9481 * linux-low.c (handle_extended_wait): Do not use "status"
9482 variable uninitialized.
9483
aeba519e
PA
94842008-07-07 Pedro Alves <pedro@codesourcery.com>
9485
9486 * server.c (handle_v_attach): Inhibit reporting dll changes.
9487
db42f210
PA
94882008-06-27 Pedro Alves <pedro@codesourcery.com>
9489
9490 * remote-utils.c (prepare_resume_reply): If requested, don't
9491 output "thread:TID" in the T stop reply.
9492
9493 * server.c (disable_packet_vCont, disable_packet_Tthread)
9494 (disable_packet_qC, disable_packet_qfThreadInfo): New globals.
9495 (handle_query): If requested, disable support for qC, qfThreadInfo
9496 and qsThreadInfo.
9497 (handle_v_requests): If requested, disable support for vCont.
9498 (gdbserver_show_disableable): New.
9499 (main): Handle --disable-packet and --disable-packet=LIST.
9500
9501 * server.h (disable_packet_vCont, disable_packet_Tthread)
9502 (disable_packet_qC, disable_packet_qfThreadInfo): Declare.
9503
8e4c5421
CD
95042008-06-20 Carlos O'Donell <carlos@codesourcery.com>
9505
9506 * server.c (gdbserver_usage): Mention --version.
9507
6e23a804
DJ
95082008-06-06 Daniel Jacobowitz <dan@codesourcery.com>
9509
9510 * Makefile.in (gdbreplay.o): New rule.
9511
90aa6a40
JM
95122008-06-06 Joseph Myers <joseph@codesourcery.com>
9513
9514 * gdbreplay.c (gdbreplay_version): Say gdbreplay in version
9515 message, not gdbserver.
9516
c16158bc 95172008-06-05 Vladimir Prus <vladimir@codesourcery.com>
889bf7c5
PA
9518 Nathan Sidwell <nathan@codesourcery.com>
9519 Joseph Myers <joseph@codesourcery.com>
c16158bc
JM
9520
9521 * acinclude.m4: Include ../../config/acx.m4.
9522 * configure.ac: Use ACX_PKGVERSION and ACX_BUGURL.
9523 * configure, config.in: Regenerate.
9524 * Makefile.in (gdbreplay$(EXEEXT)): Add version.o.
9525 * server.c (gdbserver_version): Print PKGVERSION.
9526 (gdbsrever_usage): Add stream parameter. Print REPORT_BUGS_TO.
9527 (main): Adjust gdbserver_usage calls.
9528 * gdbreplay.c (version, host_name): Add declarations.
9529 (gdbreplay_version, gdbreplay_usage): New.
9530 (main): Accept --version and --help options.
9531
aeb75bf5
DJ
95322008-06-04 Daniel Jacobowitz <dan@codesourcery.com>
9533
9534 * linux-arm-low.c (thumb_breakpoint, thumb_breakpoint_len): New.
9535 (arm_breakpoint_at): Handle Thumb.
9536 (the_low_target): Add comment.
9537
76b233dd
UW
95382008-05-29 Ulrich Weigand <uweigand@de.ibm.com>
9539
9540 * linux-ppc-low.c (ppc_collect_ptrace_register): Clear buffer.
9541
08388c79
DE
95422008-05-09 Doug Evans <dje@google.com>
9543
a3c83fae
DE
9544 * server.h (decode_search_memory_packet): Declare.
9545 * remote-utils.c (decode_search_memory_packet): New fn.
9546 * server.c (handle_search_memory_1): New fn.
08388c79
DE
9547 (handle_search_memory): New fn.
9548 (handle_query): Process qSearch:memory packets.
9549
bb9c3d36
UW
95502008-05-08 Ulrich Weigand <uweigand@de.ibm.com>
9551
9552 * regcache.c (registers_length): Remove.
9553 (set_register_cache): Verify that PBUFSIZ is large enough to hold a
9554 full register packet.
9555 * regcache.h (registers_length): Remove prototype.
9556 * server.h (PBUFSIZ): Define to 16384.
9557
7284e1be
UW
95582008-05-03 Ulrich Weigand <uweigand@de.ibm.com>
9559
9560 * configure.srv (powerpc*-*-linux*): Set srv_regobj to
9561 powerpc-32l.o, powerpc-altivec32l.o, powerpc-e500l.o,
9562 powerpc-64l.o, and powerpc-altivec64l.o.
9563 Remove rs6000/powerpc-32.xml, rs6000/powerpc-64.xml, and
9564 rs6000/powerpc-e500.xml; add rs6000/powerpc-32l.xml,
9565 rs6000/powerpc-altivec32l.xml, rs6000/powerpc-e500l.xml,
9566 rs6000/powerpc-64l.xml, rs6000/powerpc-altivec64l.xml,
9567 rs6000/power-linux.xml, and rs6000/power64-linux.xml
9568 to srv_xmlfiles.
9569
9570 * Makefile.in (reg-ppc.o, reg-ppc.c): Remove, replace by ...
9571 (powerpc-32l.o, powerpc-32l.c): ... these new rules.
9572 (powerpc-32.o, powerpc-32.c): Remove, replace by ...
9573 (powerpc-altivec32l.o, powerpc-altivec32l.c): ... these new rules.
9574 (powerpc-e500.o, powerpc-e500.c): Remove, replace by ...
9575 (powerpc-e500l.o, powerpc-e500l.c): ... these new rules.
9576 (reg-ppc64.o, reg-ppc64.c): Remove, replace by ...
9577 (powerpc-64l.o, powerpc-64l.c): ... these new rules.
9578 (powerpc-64.o, powerpc-64.c): Remove, replace by ...
9579 (powerpc-altivec64l.o, powerpc-altivec64l.c): ... these new rules.
9580 (clean): Update.
9581
9582 * linux-ppc-low.c (init_registers_ppc): Remove, replace by ...
9583 (init_registers_powerpc_32l): ... this new prototype.
9584 (init_registers_powerpc_32): Remove, replace by ...
9585 (init_registers_powerpc_altivec32l): ... this new prototype.
9586 (init_registers_powerpc_e500): Remove, replace by ...
9587 (init_registers_powerpc_e500l): ... this new prototype.
9588 (init_registers_ppc64): Remove, replace by ...
9589 (init_registers_powerpc_64l): ... this new prototype.
9590 (init_registers_powerpc_64): Remove, replace by ...
9591 (init_registers_powerpc_altivec64l): ... this new prototype.
9592 (ppc_num_regs): Set to 73.
9593 (PT_ORIG_R3, PT_TRAP): Define if necessary.
9594 (ppc_regmap, ppc_regmap_e500): Add values for orig_r3 and trap.
9595 (ppc_cannot_store_register): Handle orig_r3 and trap.
9596 (ppc_arch_setup): Update init_registers_... calls.
9597 (ppc_fill_gregset): Handle orig_r3 and trap.
9598
9599 * inferiors.c (clear_inferiors): Reset current_inferior.
9600
fdc59709
PB
96012008-04-23 Paolo Bonzini <bonzini@gnu.org>
9602
889bf7c5
PA
9603 * acinclude.m4: Add override.m4.
9604 * configure: Regenerate.
fdc59709 9605
c9b2f845
UW
96062008-04-21 Ulrich Weigand <uweigand@de.ibm.com>
9607
9608 * linux-ppc-low.c (ppc_arch_setup): Reset ppc_hwcap after the
9609 initial call to init_register_ppc64.
9610
550512b8
UW
96112008-04-21 Ulrich Weigand <uweigand@de.ibm.com>
9612
43aaf8b6
PA
9613 * configure.srv (powerpc64-*-linux*, powerpc-*-linux*): Merge into
9614 single powerpc*-*-linux* case.
550512b8
UW
9615 (s390-*-linux*, s390x-*-linux*): Merge into single s390*-*-linux* case.
9616
b6430ec3
UW
96172008-04-17 Ulrich Weigand <uweigand@de.ibm.com>
9618
9619 * configure.srv [powerpc64-*-linux*]: Remove powerpc-e500.o from
889bf7c5 9620 srv_regobj. Remove rs6000/powerpc-e500.xml and rs6000/power-spe.xml
b6430ec3
UW
9621 from reg_xmlfiles.
9622 * linux-ppc-low.c: Include <elf.h>.
9623 (PPC_FEATURE_HAS_ALTIVEC, PPC_FEATURE_HAS_SPE): Define.
9624 (ppc_hwcap): New global variable.
9625 (ppc_regmap): Remove __SPE__ #ifdef sections.
9626 (ppc_regmap_e500): New global variable.
9627 (ppc_cannot_store_register): Update __SPE__ special case.
9628 (ppc_get_hwcap): New function.
9629 (ppc_arch_setup): Use it to determine whether inferior supports
9630 AltiVec or SPE registers. Set the_low_target.regmap if appropriate.
9631 (ppc_fill_vrregset, ppc_store_vrregset): Define unconditionally.
9632 Do not access registers if target does not support AltiVec.
9633 (ppc_fill_evrregset, ppc_store_evrregset): Define unconditionally.
9634 Do not access registers if target does not support SPE.
9635 (target_regsets): Unconditionally include AltiVec and SPE regsets.
9636
52fa2412
UW
96372008-04-17 Daniel Jacobowitz <dan@codesourcery.com>
9638
9639 * linux-low.c (disabled_regsets, num_regsets): New.
9640 (use_regsets_p): Delete.
9641 (linux_wait_for_process): Clear disabled_regsets.
9642 (regsets_fetch_inferior_registers): Check and set it.
9643 (regsets_store_inferior_registers): Likewise.
9644 (linux_fetch_registers, linux_store_registers): Do not use
9645 use_regsets_p.
9646 (initialize_low): Allocate disabled_regsets.
9647
e28b3332
DJ
96482008-04-14 Daniel Jacobowitz <dan@codesourcery.com>
9649
9650 * Makefile.in (LIBOBJS): New.
9651 (OBS): Use LIBOBJS.
9652 (memmem.o): New rule.
9653 * configure.ac: Use AC_CONFIG_LIBOBJ_DIR and check for memmem.
9654 * configure: Regenerated.
9655
4536995d
UW
96562008-04-04 Ulrich Weigand <uweigand@de.ibm.com>
9657
9658 * server.c (handle_query): Never return "unsupported" for
9659 qXfer:features:read queries.
9660
221c031f
UW
96612008-03-27 Ulrich Weigand <uweigand@de.ibm.com>
9662
9663 * server.c (get_features_xml): Fix inverted condition.
9664 (handle_query): Always support qXfer:feature:read.
9665
ccd213ac
DJ
96662008-03-10 Daniel Jacobowitz <dan@codesourcery.com>
9667
9668 * server.c (wrapper_argv): New.
9669 (start_inferior): Handle wrapper_argv. If set, expect an extra
9670 trap.
9671 (gdbserver_usage): Document --wrapper.
9672 (main): Parse --wrapper.
9673
6fe305f7
UW
96742008-02-28 Ulrich Weigand <uweigand@de.ibm.com>
9675
9676 * configure.srv [powerpc64-*-linux*]: Add all files mentioned for
9677 powerpc-*-linux* to srv_regobj and reg_xmlfiles.
9678 * linux-ppc-low.c (ppc_get_pc): Support bi-arch operation.
9679 (ppc_set_pc): Likewise.
9680 (ppc_arch_setup): New function.
9681 (ppc_fill_gregset): Call ppc_collect_ptrace_register instead
9682 of collect_register.
889bf7c5 9683 (the_low_target): Use ppc_arch_setup as arch_setup initializer.
6fe305f7 9684
5b0a002e
UW
96852008-02-28 Ulrich Weigand <uweigand@de.ibm.com>
9686
9687 * configure.srv [powerpc64-*-linux*]: Use linux-ppc-low.o
9688 instead of linux-ppc64-low.o.
9689 * linux-ppc64-low.c: Remove file.
9690 * Makefile.in (SFILES): Remove linux-ppc64-low.c.
9691 (linux-ppc64-low.o): Remove rule.
9692
9693 * linux-ppc-low.c (init_registers_ppc64): Add prototype.
9694 (init_registers_powerpc_64): Likewise.
9695 (ppc_regmap): Conditionally define depending on __powerpc64__.
9696 (ppc_cannot_store_register): Do not special-case "fpscr" when
9697 compiled on __powerpc64__.
9698 (ppc_collect_ptrace_register): New function.
9699 (ppc_supply_ptrace_register): New function.
9700 (ppc_breakpoint): Change type to "unsigned int".
9701 (ppc_breakpoint_at): Change type of "insn" to "unsigned int".
9702 (the_low_target): Conditionally provide initializers for the
889bf7c5 9703 arch_setup member depending on __powerpc64__. Install
5b0a002e
UW
9704 collect_ptrace_register and supply_ptrace_register members.
9705
9b4b61c8
UW
97062008-02-28 Ulrich Weigand <uweigand@de.ibm.com>
9707
9708 * regcache.h (gdbserver_xmltarget): Add extern declaration.
9709 * server.c (gdbserver_xmltarget): Define.
9710 (get_features_xml): Use it to replace "target.xml" and arch_string.
9711
9712 * configure.srv: Remove srv_xmltarget. Add XML files that were
9713 mentioned there to srv_xmlfiles instead. Remove conditional tests
9714 on gdb_cv_arm_iwmmxt, gdb_cv_ppc_altivec, gdb_cv_ppc_spe; set
9715 srv_xmlfiles and srv_regobj to include all possible choices.
9716 * configure.ac (srv_xmltarget): Remove.
9717 (srv_xmlfiles): Do not add "target.xml".
9718 (gdb_cv_arm_iwmmxt, gdb_cv_ppc_altivec, gdb_cv_ppc_spe): Remove
9719 checks for supplementary target information.
9720 * configure: Regenerate.
9721 * Makefile.in (XML_TARGET): Remove.
9722 (target.xml): Remove rule.
9723 (clean): Do not clean up target.xml.
9724 (.PRECIOUS): Do not mention target.xml.
9725
9726 * target.h (struct target_ops): Remove arch_string member.
9727 * linux-low.c (linux_arch_string): Remove.
9728 (linux_target_ops): Remove arch_string initializer.
9729 * linux-low.h (struct linux_target_ops): Remove arch_string member.
9730 * linux-i386-low.c (the_low_target): Remove arch_string initializer.
9731 * linux-x86-64-low.c (the_low_target): Remove arch_string initializer.
9732 * spu-low.c (spu_arch_string): Remove.
9733 (spu_target_ops): Remove arch_string initializer.
9734 * win32-low.c (win32_arch_string): Remove.
9735 (win32_target_ops): Remove arch_string initializer.
9736 * win32-low.h (struct win32_target_ops): Remove arch_string member.
9737 * win32-arm-low.c (the_low_target): Remove arch_string initializer.
9738 * win32-i368-low.c (the_low_target): Remove arch_string initializer.
9739
ee1a7ae4
UW
97402008-02-27 Ulrich Weigand <uweigand@de.ibm.com>
9741
9742 * linux-low.h (struct linux_target_ops): Replace left_pad_xfer field
9743 by collect_ptrace_register and supply_ptrace_register hooks.
9744 * linux-low.c (fetch_register): Use supply_ptrace_register callback
9745 instead of checking for the_low_target.left_pad_xfer.
9746 (usr_store_inferior_registers): Use collect_ptrace_register callback
9747 instead of checking for the_low_target.left_pad_xfer.
9748
9749 * linux-s390-low.c (s390_collect_ptrace_register): New function.
9750 (s390_supply_ptrace_register): Likewise.
9751 (s390_fill_gregset): Call s390_collect_ptrace_register.
9752 (the_low_target): Update.
9753
9754 * linux-ppc64-low.c (ppc_collect_ptrace_register): New function.
9755 (ppc_supply_ptrace_register): Likewise.
9756 (the_low_target): Update.
9757
9758 * linux-i386-low.c (the_low_target): Update.
9759 * linux-x86-64-low.c (the_low_target): Update.
9760
d61ddec4
UW
97612008-02-27 Ulrich Weigand <uweigand@de.ibm.com>
9762
9763 * configure.srv [s390x-*-linux*]: Set srv_regobj to include both
9764 reg-s390.o and reg-s390x.o.
9765
9766 * linux-low.c (new_inferior): New global variable.
9767 (linux_create_inferior, linux_attach): Set it.
9768 (linux_wait_for_process): Call the_low_target.arch_setup after the
9769 target has stopped for the first time.
9770 (initialize_low): Do not call the_low_target.arch_setup.
9771
9772 * linux-s390-low.c (s390_get_pc): Support bi-arch operation.
9773 (s390_set_pc): Likewise.
9774 (s390_arch_setup): New function.
9775 (the_low_target): Use s390_arch_setup as arch_setup routine.
9776
9777 * regcache.c (realloc_register_cache): New function.
9778 (set_register_cache): Call it for each existing regcache.
9779
d05b4ac3
UW
97802008-02-27 Ulrich Weigand <uweigand@de.ibm.com>
9781
9782 * server.h (init_registers): Remove prototype.
9783
9784 * linux-low.h (struct linux_target_ops): Add arch_setup field.
9785 * linux-low.c (initialize_low): Call the_low_target.arch_setup ()
9786 instead of init_registers ().
9787 * linux-arm-low.c (init_registers_arm): Add prototype.
9788 (init_registers_arm_with_iwmmxt): Likewise.
9789 (the_low_target): Add initializer for arch_setup field.
9790 * linux-cris-low.c (init_registers_cris): Add prototype.
9791 (the_low_target): Add initializer for arch_setup field.
9792 * linux-crisv32-low.c (init_registers_crisv32): Add prototype.
9793 (the_low_target): Add initializer for arch_setup field.
9794 * linux-i386-low.c (init_registers_i386_linux): Add prototype.
9795 (the_low_target): Add initializer for arch_setup field.
9796 * linux-ia64-low.c (init_registers_ia64): Add prototype.
9797 (the_low_target): Add initializer for arch_setup field.
9798 * linux-m32r-low.c (init_registers_m32r): Add prototype.
9799 (the_low_target): Add initializer for arch_setup field.
9800 * linux-m68k-low.c (init_registers_m68k): Add prototype.
9801 (the_low_target): Add initializer for arch_setup field.
9802 * linux-mips-low.c (init_registers_mips_linux): Add prototype.
9803 (init_registers_mips64_linux): Likewise.
9804 (the_low_target): Add initializer for arch_setup field.
9805 * linux-ppc-low.c (init_registers_ppc): Add prototype.
9806 (init_registers_powerpc_32, init_registers_powerpc_e500): Likewise.
9807 (the_low_target): Add initializer for arch_setup field.
9808 * linux-ppc64-low.c (init_registers_ppc64): Add prototype.
9809 (init_registers_powerpc_64): Likewise.
9810 (the_low_target): Add initializer for arch_setup field.
9811 * linux-s390-low.c (init_registers_s390): Add prototype.
9812 (init_registers_s390x): Likewise.
9813 (the_low_target): Add initializer for arch_setup field.
9814 * linux-sh-low.c (init_registers_sh): Add prototype.
9815 (the_low_target): Add initializer for arch_setup field.
9816 * linux-x86-64-low.c (init_registers_x86_64_linux): Add prototype.
9817 (the_low_target): Add initializer for arch_setup field.
9818 * linux-xtensa-low.c (init_registers_xtensa): Add prototype.
9819 (the_low_target): Add initializer for arch_setup field.
9820
9821 * win32-low.h (struct win32_target_ops): Add arch_setup field.
9822 * win32-low.c (initialize_low): Call the_low_target.arch_setup ()
9823 instead of init_registers ().
9824 * win32-arm-low.c (init_registers_arm): Add prototype.
9825 (the_low_target): Add initializer for arch_setup field.
9826 * win32-i386-low.c (init_registers_i386): Add prototype.
9827 (the_low_target): Add initializer for arch_setup field.
9828
9829 * spu-low.c (init_registers_spu): Add prototype.
9830 (initialize_low): Call initialie_registers_spu () instead of
9831 initialize_registers ().
9832
fd96d250
PA
98332008-02-19 Pedro Alves <pedro@codesourcery.com>
9834
9835 * server.c (handle_v_requests): When handling the vRun and vAttach
9836 packets, if already debugging a process, don't kill it. Return an
9837 error instead.
9838
d41b6bb4
DJ
98392008-02-17 Daniel Jacobowitz <dan@codesourcery.com>
9840
9841 * server.c (handle_query): Correct length check.
9842
5ac588cf
PA
98432008-02-14 Pedro Alves <pedro_alves@portugalmail.pt>
9844
9845 * win32-low.c (do_initial_child_stuff): Add process handle
9846 parameter. Set current_process_handle and current_process_id from the
9847 parameters. Clear globals.
9848 (win32_create_inferior): Don't set current_process_handle and
9849 current_process_id here. Instead pass them on the call to
9850 do_initial_child_stuff.
9851 (win32_attach): Likewise.
9852 (win32_clear_inferiors): New.
9853 (win32_kill): Don't close the current process handle or the
9854 current thread handle here. Instead call win32_clear_inferiors.
9855 (win32_detach): Don't open a new handle to the process. Call
9856 win32_clear_inferiors.
9857 (win32_join): Don't rely on current_process_handle; open a new
9858 handle using the process id.
9859 (win32_wait): Call win32_clear_inferiors when the inferior process
9860 has exited.
9861
ecd7ecbc
DJ
98622008-02-14 Daniel Jacobowitz <dan@codesourcery.com>
9863
9864 * server.c (monitor_show_help): Add "exit".
9865
1525d545
MG
98662008-02-11 Maxim Grigoriev <maxim2405@gmail.com>
9867
ecd7ecbc 9868 * Makefile.in (SFILES): Add linux-xtensa-low.c.
1525d545
MG
9869 (clean): Add reg-xtensa.c.
9870 (linux-xtensa-low.o, reg-xtensa.o, reg-xtensa.c): New dependencies.
ecd7ecbc
DJ
9871 * configure.srv (xtensa*-*-linux*) New target.
9872 * linux-xtensa-low.c: New.
9873 * xtensa-xtregs.c: New.
1525d545 9874
59a016f0
PA
98752008-02-01 Pedro Alves <pedro_alves@portugalmail.pt>
9876
9877 * hostio.c: Don't include errno.h.
9878 (errno_to_fileio_errno): Move to hostio-errno.
9879 * hostio.c: (hostio_error): Remove the error parameter. Defer the
9880 error number outputting to the target->hostio_last_error callback.
9881 (hostio_packet_error): Use FILEIO_EINVAL directly.
9882 (handle_open, handle_pread, hostio_error, handle_unlink): Update
9883 calls to hostio_error.
9884 * hostio-errno.c: New.
9885 * server.h (hostio_last_error_from_errno): Declare.
9886 * target.h (target_ops): Add hostio_last_error member.
9887 * linux-low.c (linux_target_op): Register hostio_last_error_from_errno
9888 as hostio_last_error handler.
889bf7c5 9889 * spu-low.c (spu_target_ops): Likewise.
59a016f0
PA
9890 * win32-low.c [_WIN32_WCE] (win32_error_to_fileio_error)
9891 (wince_hostio_last_error): New functions.
9892 (win32_target_ops) [_WIN32_WCE]: Register wince_hostio_last_error
9893 as hostio_last_error handler.
9894 (win32_target_ops) [!_WIN32_WCE]: Register
9895 hostio_last_error_from_errno as hostio_last_error handler.
9896 * Makefile.in (SFILES): Add hostio.c and hostio-errno.c.
9897 (hostio-errno.o): New rule.
9898 * configure.ac (GDBSERVER_DEPFILES): Add $srv_hostio_err_objs.
9899 * configure.srv (srv_hostio_err_objs): New variable. Default to
9900 hostio-errno.o.
9901 (arm*-*-mingw32ce*): Set srv_hostio_err_objs to "".
9902 * configure: Regenerate.
9903
2d717e4f
DJ
99042008-01-29 Daniel Jacobowitz <dan@codesourcery.com>
9905
9906 * linux-low.c (linux_attach_lwp): Do not _exit after errors.
9907 (linux_kill, linux_detach): Clean up the process list.
9908 * remote-utils.c (remote_open): Improve port number parsing.
9909 (putpkt_binary, input_interrupt): Only send interrupts if the target
9910 is running.
9911 * server.c (extended_protocol): Make static.
9912 (attached): Define earlier.
9913 (exit_requested, response_needed, program_argv): New variables.
9914 (target_running): New.
9915 (start_inferior): Clear attached here.
9916 (attach_inferior): Set attached here.
9917 (require_running): Define.
9918 (handle_query): Use require_running and target_running. Implement
9919 "monitor exit".
9920 (handle_v_attach, handle_v_run): New.
9921 (handle_v_requests): Use require_running. Handle vAttach and vRun.
9922 (gdbserver_usage): Update.
9923 (main): Redo argument parsing. Handle --debug and --multi. Handle
9924 --attach along with other options or after the port. Save
9925 program_argv. Support no initial program. Resynchronize
9926 communication with GDB after an error. Handle "monitor exit".
9927 Use require_running and target_running. Always allow the extended
9928 protocol. Do not error out for Hc0 or Hc-1. Do not automatically
9929 restart in extended mode.
9930 * README: Refer to the GDB manual. Update --attach usage.
9931
7407e2de
AS
99322007-12-20 Andreas Schwab <schwab@suse.de>
9933
9934 * linux-low.c (STACK_SIZE): Define.
9935 (linux_tracefork_child): Use it. Use __clone2 on ia64.
9936 (linux_test_for_tracefork): Likewise.
9937
b65d95c5
DJ
99382007-12-18 Daniel Jacobowitz <dan@codesourcery.com>
9939
9940 * linux-low.c (linux_wait_for_event): Update messages. Do not
9941 reinsert auto-delete breakpoints.
9942 * mem-break.c (struct breakpoint): Change return type of handler to
9943 int.
9944 (set_breakpoint_at): Update handler type.
9945 (reinsert_breakpoint_handler): Return 1 instead of calling
9946 delete_breakpoint.
9947 (reinsert_breakpoint_by_bp): Check for the original breakpoint before
9948 setting a new one.
9949 (check_breakpoints): Delete auto-delete breakpoints and return 2.
9950 * mem-break.h (set_breakpoint_at): Update handler type.
9951 * thread-db.c (thread_db_create_event, thread_db_create_event): Update.
9952 * win32-low.c (auto_delete_breakpoint): New.
9953 (get_child_debug_event): Use it.
9954
4e799345
DJ
99552007-12-16 Daniel Jacobowitz <dan@codesourcery.com>
9956
9957 * configure.ac: Check for pread and pwrite.
9958 * hostio.c (handle_pread): Fall back to lseek and read.
9959 (handle_pwrite): Fall back to lseek and write.
9960 * config.in, configure: Regenerated.
9961
27524b67
DJ
99622007-12-07 Daniel Jacobowitz <dan@codesourcery.com>
9963
9964 * server.c (myresume): Add own_buf argument.
9965 (main): Update calls.
9966
a20d5e98
DJ
99672007-12-06 Daniel Jacobowitz <dan@codesourcery.com>
9968
9969 * linux-low.c (linux_wait, linux_resume): Do not handle async I/O.
9970 * remote-utils.c (remote_open): Do not call disable_async_io.
9971 (block_async_io): Delete.
9972 (unblock_async_io): Make static.
9973 (initialize_async_io): New.
9974 * server.c (handle_v_cont): Handle async I/O here.
9975 (myresume): Likewise. Move other common resume tasks here...
9976 (main): ... from here. Call initialize_async_io. Disable async
9977 I/O before the main loop.
9978 * server.h (initialize_async_io): Declare.
9979 (block_async_io, unblock_async_io): Delete prototypes.
9980 * spu-low.c (spu_resume, spu_wait): Do not handle async I/O here.
9981
b79d787e
DJ
99822007-12-06 Mick Davis <mickd@goanna.iinet.net.au>
9983
9984 * remote-utils.c (readchar): Allow binary data in received messages.
9985
d97903b2
PA
99862007-12-03 Pedro Alves <pedro_alves@portugalmail.pt>
9987
9988 * win32-low.c (attaching): New global.
9989 (win32_create_inferior): Clear the `attaching' global.
9990 (win32_attach): Set the `attaching' global.
9991 (get_child_debug_event) [_WIN32_WCE]: Stop the inferior when
9992 attaching. Only set a breakpoint at the entry point if not
9993 attaching.
9994
311de423
PA
99952007-12-03 Pedro Alves <pedro_alves@portugalmail.pt>
9996
9997 * server.c (main): Don't report dll events on the initial
9998 connection on attaches.
9999
6c2d16d2
PA
100002007-12-03 Pedro Alves <pedro_alves@portugalmail.pt>
10001
10002 * server.c (main): Relax numerical bases supported for the pid of
10003 the --attach command line argument.
10004
5ca906e6
PA
100052007-12-03 Pedro Alves <pedro_alves@portugalmail.pt>
10006
10007 * win32-low.c (win32_attach): Call OpenProcess before
10008 DebugActiveProcess, not after. Add last error output to error
10009 call.
10010
9c6c8194
PA
100112007-12-03 Pedro Alves <pedro_alves@portugalmail.pt>
10012
10013 * win32-low.c (win32_get_thread_context)
10014 (win32_set_thread_context): New functions.
10015 (thread_rec): Use win32_get_thread_context.
10016 (continue_one_thread, win32_resume): Use win32_set_thread_context.
10017 * win32-low.h (win32_thread_info) [_WIN32_WCE]: Add `base_context'
10018 field.
10019
4d5d1aaa
PA
100202007-12-03 Leo Zayas
10021 Pedro Alves <pedro_alves@portugalmail.pt>
10022
10023 * win32-low.c (soft_interrupt_requested, faked_breakpoint): New
10024 global variables.
10025 (child_add_thread): Minor cleanup.
10026 (child_continue): Resume artificially suspended threads before
10027 calling ContinueDebugEvent.
10028 (suspend_one_thread): New.
10029 (fake_breakpoint_event): New.
10030 (get_child_debug_event): Change return type to int. Check here if
10031 gdb sent an interrupt request. If a soft interrupt was requested,
10032 fake a breakpoint event. Return 0 if there is no event to handle,
10033 and 1 otherwise.
10034 (win32_wait): Don't check here if gdb sent an interrupt request.
10035 Ensure there is a valid event to handle.
10036 (win32_request_interrupt): Add soft interruption method as last
10037 resort.
10038
c436e841
PA
100392007-12-03 Leo Zayas
10040 Pedro Alves <pedro_alves@portugalmail.pt>
10041
10042 * win32-low.h (win32_thread_info): Add descriptions to the
10043 structure members. Replace `suspend_count' counter by a
10044 `suspended' flag.
10045 * win32-low.c (thread_rec): Update condition of when to get the
10046 context from the inferior. Rely on ContextFlags being set if it
10047 has already been retrieved. Only suspend the inferior thread if
10048 we haven't already. Warn if that fails.
10049 (continue_one_thread): s/suspend_count/suspended/. Only call
10050 ResumeThread once. Warn if that fails.
10051
e7b5fa67
PA
100522007-12-02 Pedro Alves <pedro_alves@portugalmail.pt>
10053
10054 * win32-low.c (win32_wait): Don't read from the inferior when it
10055 has already exited.
10056
a385171d
PA
100572007-12-02 Pedro Alves <pedro_alves@portugalmail.pt>
10058
10059 * Makefile.in (win32_low_h): New variable.
10060 (win32-low.o): Add dependency on $(win32_low_h).
10061 (win32-arm-low.o, win32-i386-low.o): New rules.
10062
f80c84b3
DJ
100632007-11-30 Daniel Jacobowitz <dan@codesourcery.com>
10064
10065 * hostio.c: Correct copyright year.
10066
a6b151f1
DJ
100672007-11-30 Daniel Jacobowitz <dan@codesourcery.com>
10068
10069 * Makefile.in (OBS): Add hostio.o.
10070 (hostio.o): New rule.
10071 * server.h (handle_vFile): Declare.
10072 * hostio.c: New file.
10073 * server.c (handle_v_requests): Take packet_len and new_packet_len
10074 for binary packets. Call handle_vFile.
10075 (main): Update call to handle_v_requests.
10076
f9387fc3
DJ
100772007-11-05 Daniel Jacobowitz <dan@codesourcery.com>
10078
10079 * linux-low.c: Include <sched.h>.
10080
51c2684e
DJ
100812007-11-01 Daniel Jacobowitz <dan@codesourcery.com>
10082
10083 * linux-low.c (linux_tracefork_grandchild): New.
10084 (linux_tracefork_child): Use clone.
10085 (linux_test_for_tracefork): Use clone; allocate and free a stack.
10086
75f83163
JB
100872007-10-31 Joel Brobecker <brobecker@adacore.com>
10088
10089 * Makefile.in: Use $(SHELL) instead of "sh" to call regdat.sh.
10090
da5898ce
DJ
100912007-10-24 Daniel Jacobowitz <dan@codesourcery.com>
10092
10093 * linux-low.c (handle_extended_wait): Handle unexpected signals.
10094
24a09b5f
DJ
100952007-10-23 Daniel Jacobowitz <dan@codesourcery.com>
10096
10097 * inferiors.c (change_inferior_id): Delete.
10098 (add_pid_to_list, pull_pid_from_list): New.
10099 * linux-low.c (PTRACE_SETOPTIONS, PTRACE_GETEVENTMSG)
10100 (PTRACE_O_TRACESYSGOOD, PTRACE_O_TRACEFORK, PTRACE_O_TRACEVFORK)
10101 (PTRACE_O_TRACECLONE, PTRACE_O_TRACEEXEC, PTRACE_O_TRACEVFORKDONE)
10102 (PTRACE_O_TRACEEXIT, PTRACE_EVENT_FORK, PTRACE_EVENT_VFORK)
10103 (PTRACE_EVENT_CLONE, PTRACE_EVENT_EXEC, PTRACE_EVENT_VFORK_DONE)
10104 (PTRACE_EVENT_EXIT, __WALL): Provide default definitions.
10105 (stopped_pids, thread_db_active, must_set_ptrace_flags): New variables.
10106 (using_threads): Always set to 1.
10107 (handle_extended_wait): New.
10108 (add_process): Do not set TID.
10109 (linux_create_inferior): Set must_set_ptrace_flags.
10110 (linux_attach_lwp): Remove TID argument. Do not check using_threads.
10111 Use PTRACE_SETOPTIONS. Call new_thread_notify. Update all callers.
10112 (linux_thread_alive): Rename TID argument to LWPID.
10113 (linux_wait_for_process): Handle unknown processes. Do not use TID.
10114 (linux_wait_for_event): Do not use TID or check using_threads. Update
10115 call to dead_thread_notify. Call handle_extended_wait.
10116 (linux_create_inferior): Use PTRACE_SETOPTIONS.
10117 (send_sigstop): Delete sigstop_sent.
10118 (wait_for_sigstop): Avoid TID.
10119 (linux_supports_tracefork_flag, linux_tracefork_child, my_waitpid)
10120 (linux_test_for_tracefork): New.
10121 (linux_lookup_signals): Use thread_db_active and
10122 linux_supports_tracefork_flag.
10123 (initialize_low): Use thread_db_active and linux_test_for_tracefork.
10124 * linux-low.h (get_process_thread): Avoid TID.
10125 (struct process_ifo): Move thread_known and tid to the end. Remove
10126 sigstop_sent.
10127 (linux_attach_lwp, thread_db_init): Update prototypes.
10128 * server.h (change_inferior_id): Delete prototype.
10129 (add_pid_to_list, pull_pid_from_list): New prototypes.
10130 * thread-db.c (thread_db_use_events): New.
10131 (find_first_thread): Rename to...
10132 (find_one_thread): ...this. Update callers and messages. Do not
10133 call fatal. Check thread_db_use_events. Do not call
10134 change_inferior_id or new_thread_notify.
10135 (maybe_attach_thread): Update. Do not call new_thread_notify.
10136 (thread_db_init): Set thread_db_use_events. Check use_events.
10137 * utils.c (fatal, warning): Correct message prefix.
10138
30ed0a8f
DJ
101392007-10-15 Daniel Jacobowitz <dan@codesourcery.com>
10140
10141 * Makefile.in (clean): Remove new files.
10142 (powerpc-32.o, powerpc-32.c, powerpc-e500.o, powerpc-e500.c)
10143 (powerpc-64.o, powerpc-64.c): New rules.
10144 * configure.srv: Use alternate register sets for powerpc64-*-linux*
10145 with AltiVec, powerpc-*-linux* with AltiVec, and powerpc-*-linux*
10146 with SPE.
10147 * linux-ppc-low.c (ppc_regmap): Do not fetch the FP registers for
10148 SPE targets.
10149 (ppc_cannot_store_register): Do not check for FPSCR for SPE targets.
10150 (PTRACE_GETVRREGS, PTRACE_SETVRREGS, SIZEOF_VRREGS, ppc_fill_vrregset)
10151 (ppc_store_vrregset, PTRACE_GETEVRREGS, PTRACE_SETEVRREGS)
10152 (struct gdb_evrregset_t, ppc_fill_evrregset, ppc_store_evrregset): New.
10153 (target_regsets): Add AltiVec and SPE register sets.
10154 * configure.ac: Check for AltiVec and SPE.
10155 * linux-ppc64-low.c (PTRACE_GETVRREGS, PTRACE_SETVRREGS, SIZEOF_VRREGS)
10156 (ppc_fill_vrregset, ppc_store_vrregset): New.
10157 (target_regsets): Add AltiVec register set.
10158 * configure: Regenerated.
10159
fd462a61
DJ
101602007-09-19 Daniel Jacobowitz <dan@codesourcery.com>
10161
10162 * linux-low.c (O_LARGEFILE): Define.
10163 (linux_read_memory): Use /proc/PID/mem.
10164 * configure.ac: Use AC_GNU_SOURCE. Check for pread64.
10165 * configure, config.in: Regenerated.
10166
69f223ed
DJ
101672007-09-04 Daniel Jacobowitz <dan@codesourcery.com>
10168
10169 * linux-low.c (linux_wait_for_event): Do not pass signals while
10170 single-stepping.
10171
aec18585
PA
101722007-09-03 Pedro Alves <pedro_alves@portugalmail.pt>
10173
10174 * win32-low.c (create_process): New.
10175 (win32_create_inferior): Use create_process instead of
10176 CreateProcess. If create_process failed retry appending an ".exe"
10177 suffix. Store the GetLastError result immediatelly after
10178 create_process calls and use it on the call to error.
10179
34d86ddd
PA
101802007-09-03 Pedro Alves <pedro_alves@portugalmail.pt>
10181
10182 * win32-low.c (handle_load_dll): Don't use toolhelp when waiting.
10183
5a0e3bd0
JB
101842007-08-23 Joel Brobecker <brobecker@adacore.com>
10185
10186 * configure.ac: Switch license to GPLv3.
10187
f88c79e6
MS
101882007-08-01 Michael Snyder <msnyder@access-company.com>
10189
10190 * remote-utils.c (putpkt_binary): Memory leak, free buf2.
10191
6b3d9b83
PA
101922007-07-31 Pedro Alves <pedro_alves@portugalmail.pt>
10193
10194 * win32-low.c (winapi_CloseToolhelp32Snapshot) [_WIN32_WCE]: New
10195 typedef.
10196 (win32_CloseToolhelp32Snapshot) [_WIN32_WCE]: New global var.
10197 (load_toolhelp) [_WIN32_WCE]: Load TOOLHELP.DLL. Get
10198 CloseToolhelp32Snapshot.
10199 (toolhelp_get_dll_name) [_WIN32_WCE]: Close the snapshot with
10200 CloseToolhelp32Snapshot.
10201
c588c53c
MS
102022007-07-27 Michael Snyder <michael.snyder@access-company.com>
10203
10204 * server.c (main): Check for inferior exit before main loop.
10205
aa0403d9
PA
102062007-07-18 Pedro Alves <pedro_alves@portugalmail.pt>
10207
10208 * remote-utils.c (remote_open): Set SO_KEEPALIVE on remote_desc
10209 instead of on tmp_desc.
10210
255e7678
DJ
102112007-07-17 Pedro Alves <pedro_alves@portugalmail.pt>
10212 Daniel Jacobowitz <dan@codesourcery.com>
10213
10214 * inferiors.c (all_dlls, dlls_changed, get_dll): New.
10215 (add_thread): Minor cleanups.
10216 (clear_inferiors): Move lower in the file. Clear the DLL
10217 list.
10218 (free_one_dll, match_dll, loaded_dll, unloaded_dll, clear_list): New.
10219 * remote-utils.c (prepare_resume_reply): Check dlls_changed.
10220 (xml_escape_text): New.
10221 * server.c (handle_query): Handle qXfer:libraries:read. Report it
10222 for qSupported.
10223 (handle_v_cont): Report errors.
10224 (gdbserver_version): Update.
10225 (main): Correct size of own_buf. Do not report initial DLL events.
10226 * server.h (struct dll_info, all_dlls, dlls_changed, loaded_dll)
10227 (unloaded_dll, xml_escape_text): New.
10228 * win32-low.c (enum target_waitkind): Update comments.
10229 (win32_add_one_solib, get_image_name, winapi_EnumProcessModules)
10230 (winapi_GetModuleInformation, winapi_GetModuleFileNameExA)
10231 (win32_EnumProcessModules, win32_GetModuleInformation)
10232 (win32_GetModuleFileNameExA, load_psapi, psapi_get_dll_name)
10233 (winapi_CreateToolhelp32Snapshot, winapi_Module32First)
10234 (winapi_Module32Next, win32_CreateToolhelp32Snapshot)
10235 (win32_Module32First, win32_Module32Next, load_toolhelp)
10236 (toolhelp_get_dll_name, handle_load_dll, handle_unload_dll): New.
10237 (get_child_debug_event): Handle DLL events.
10238 (win32_wait): Likewise.
10239
0d37add9
DJ
102402007-07-12 Daniel Jacobowitz <dan@codesourcery.com>
10241
10242 * configure.srv: Set srv_linux_regsets for sh*-*-linux*.
10243 * linux-sh-low.c (sh_fill_gregset, target_regsets): New.
10244
45e2715e
PA
102452007-07-08 Pedro Alves <pedro_alves@portugalmail.pt>
10246
10247 * win32-low.c (handle_output_debug_string): Ignore event if not
10248 waiting.
10249
c5674cf1
PA
102502007-07-08 Pedro Alves <pedro_alves@portugalmail.pt>
10251
10252 * win32-arm-low.c (arm_wince_breakpoint): Fix typo.
10253
2bbe3cc1
DJ
102542007-07-03 Daniel Jacobowitz <dan@codesourcery.com>
10255
10256 * remote-utils.c (look_up_one_symbol): Handle 'm' packets.
10257
ae13219e
DJ
102582007-07-02 Daniel Jacobowitz <dan@codesourcery.com>
10259
10260 * inferiors.c (change_inferior_id): Add comment.
10261 * linux-low.c (check_removed_breakpoint): Add an early
10262 prototype. Improve debug output.
10263 (linux_attach): Doc update.
10264 (linux_detach_one_process, linux_detach): Clean up before releasing
10265 each process.
10266 (send_sigstop, wait_for_sigstop): Improve comments and debug output.
10267 * linux-low.h (struct process_info): Doc improvement.
10268 * mem-break.c (delete_all_breakpoints): New.
10269 * mem-break.h (delete_all_breakpoints): New prototype.
10270 * thread-db.c (find_first_thread): New.
10271 (thread_db_create_event): Call it instead of
10272 thread_db_find_new_threads. Clean up unused variables.
10273 (maybe_attach_thread): Remove first thread handling.
10274 (thread_db_find_new_threads): Use find_first_thread.
10275 (thread_db_get_tls_address): Likewise.
10276
4105de34
DJ
102772007-06-27 Daniel Jacobowitz <dan@codesourcery.com>
10278
10279 * thread-db.c (thread_db_find_new_threads): Add prototype.
10280 (thread_db_create_event): Check for the main thread before adding
10281 a new thread.
10282 (maybe_attach_thread): Only enable event reporting if TID == 0.
10283 (thread_db_get_tls_address): Check for new threads.
10284
2b876972
DJ
102852007-06-20 Daniel Jacobowitz <dan@codesourcery.com>
10286
10287 * linux-low.c (linux_create_inferior): Try execv before execvp.
10288 * spu-low.c (spu_create_inferior): Likewise.
10289
7a245884
DJ
102902007-06-13 Mike Frysinger <vapier@gentoo.org>
10291
10292 * linux-low.c (linux_create_inferior): Change execv to execvp.
10293 * spu-low.c (spu_create_inferior): Likewies.
10294
117ce543
DJ
102952007-06-13 Daniel Jacobowitz <dan@codesourcery.com>
10296
10297 * Makefile.in (clean): Clean new files instead of deleted ones.
10298 (reg-mips.o, reg-mips.c, reg-mips64.o, reg-mips64.c): Delete.
10299 (mips-linux.o, mips-linux.c, mips64-linux.o, mips64-linux.c): New
10300 rules.
10301 * configure.srv: Specify XML files and new regformats for MIPS and
10302 MIPS64 GNU/Linux.
10303 * linux-mips-low.c (mips_num_regs): Set to only used registers.
10304 (mips_regmap): Do not fetch $0. Remove unused registers. Add
10305 an entry for the restart register.
10306 (mips_cannot_fetch_register, mips_cannot_store_register)
10307 (mips_reinsert_addr, mips_fill_fpregset, mips_store_fpregset): Update
10308 register names to match the XML descriptions.
10309 (mips_fill_gregset, mips_store_gregset): Likewise. Handle the
10310 restart register instead of $0.
10311
0e7f50da
UW
103122007-06-12 Ulrich Weigand <uweigand@de.ibm.com>
10313 Markus Deuling <deuling@de.ibm.com>
10314
10315 * remote-utils.c (decode_xfer_write): New function.
10316 * server.h (decode_xfer_write): Add prototype.
10317 * server.c (handle_query): Add PACKET_LEN argument. Support
10318 qXfer:spu:read and qXfer:spu:write packets.
10319 (main): Pass packet_len to handle_query.
10320 * spu-low.c (spu_target_ops): Add spu_proc_xfer_spu.
10321 * target.h (target_ops): Add qxfer_spu.
10322
374c1d38
UW
103232007-06-12 Ulrich Weigand <uweigand@de.ibm.com>
10324
10325 * spu-low.c (spu_proc_xfer_spu): Do not return failure when
10326 accessing non-seekable spufs files.
10327
bb63802a
UW
103282007-05-16 Markus Deuling <deuling@de.ibm.com>
10329
889bf7c5 10330 * server.c (handle_query): Add reply for qC packet.
bb63802a 10331
7390519e
PA
103322007-05-10 Pedro Alves <pedro_alves@portugalmail.pt>
10333 Leo Zayas <lerele@champenstudios@com>
10334
10335 * server.h (check_remote_input_interrupt_request): New function.
10336 * remote_utils.c (INVALID_DESCRIPTOR): New define.
10337 (remote_desc): Initialize with INVALID_DESCRIPTOR.
10338 (input_interrupt): Expose on USE_WIN32API too. Fix whitespace.
10339 (check_remote_input_interrupt_request): New function.
10340 * server.h (check_remote_input_interrupt_request): Declare.
3ecf0694 10341 * win32-low.c (winapi_DebugBreakProcess,
7390519e
PA
10342 winapi_GenerateConsoleCtrlEvent): New typedefs.
10343 (get_child_debug_event): Lower Win32 debug event polling from 1 sec
10344 to 250 ms.
10345 (win32_wait): Check for remote interrupt request
10346 with check_remote_input_interrupt_request.
10347 (win32_request_interrupt): New function.
10348 (win32_target_op): Set request_interrupt to win32_request_interrupt.
10349
34b34921
PA
103502007-05-10 Pedro Alves <pedro_alves@portugalmail.pt>
10351
10352 * win32-low.c (debug_registers_changed,
10353 debug_registers_used, CONTEXT_EXTENDED_REGISTERS,
10354 CONTEXT_FLOATING_POINT, CONTEXT_DEBUG_REGISTERS,
10355 CONTEXT_DEBUGGER, CONTEXT_DEBUGGER_DR): Delete.
10356 (thread_rec): Get context using the low target.
10357 (child_add_thread): Call thread_added on the low target,
10358 which does the same thing.
10359 (regptr): Delete.
10360 (do_initial_child_stuff): Remove debug registers references.
10361 Set context using the low target. Resume threads after
10362 setting the contexts.
10363 (child_continue): Remove dead variable. Remove debug
10364 registers references.
10365 (child_fetch_inferior_registers): Go through the low target.
10366 (do_child_store_inferior_registers): Remove.
10367 (child_store_inferior_registers): Go through the low target.
10368 (win32_resume): Remove debug registers references.
10369 Set context using the low target.
10370 (handle_exception): Change return type to void. Don't record
10371 context here. Set status to TARGET_WAITKIND_SPURIOUS on a
10372 first chance exception.
889bf7c5 10373 (get_child_debug_event): Change return type to void. Remove
34b34921
PA
10374 goto loop. Always return after waiting for debug event.
10375 (win32_wait): Convert to switch statement. Handle spurious
10376 events.
10377
10378 * win32-i386-low.c (debug_registers_changed,
10379 debug_registers_used): New.
10380 (initial_stuff): Rename to ...
10381 (i386_initial_stuff): ... this. Clear debug registers
10382 state variables.
10383 (store_debug_registers): Delete.
10384 (i386_get_thread_context): New.
10385 (load_debug_registers): Delete.
10386 (i386_set_thread_context): New.
10387 (i386_thread_added): New.
10388 (single_step): Rename to ...
10389 (i386_single_step): ... this.
10390 (do_fetch_inferior_registers): Rename to ...
10391 (i386_fetch_inferior_register): ... this.
10392 (i386_store_inferior_register): New.
10393 (the_low_target): Adapt to new interface.
10394
10395 * win32-arm-low.c (CONTEXT_FLOATING_POINT): Define.
10396 (arm_get_thread_context): New.
10397 (arm_set_thread_context): New.
10398 (regptr): New.
10399 (do_fetch_inferior_registers): Rename to ...
10400 (arm_fetch_inferior_register): ... this.
10401 (arm_store_inferior_register): New.
10402 (arm_wince_breakpoint): Reimplement as unsigned long.
10403 (arm_wince_breakpoint_len): Define.
10404 (the_low_target): Adapt to new interface.
10405
10406 * win32-low.h (target_ops): Remove regmap, store_debug_registers and
10407 load_debug_registers. Add get_thread_context, set_thread_context,
10408 thread_added and store_inferior_register. Rename
10409 fetch_inferior_registers to fetch_inferior_register.
10410 (regptr): Remove declaration.
10411
dd6953e1
PA
104122007-05-10 Pedro Alves <pedro_alves@portugalmail.pt>
10413
10414 * linux-low.c (linux_detach): Change return type to int. Return 0.
10415 * spu-low.c (spu_detach): Likewise.
10416
444d6139
PA
104172007-05-10 Pedro Alves <pedro_alves@portugalmail.pt>
10418
10419 * target.h (target_ops): Change return type of detach to int.
10420 Add join.
10421 (join_inferior): New.
10422 * server.c (main): Don't skip detach support on mingw32.
10423 If the inferior doesn't support detaching return error.
10424 Call join_inferior instead of using waitpid.
10425 * linux-low.c (linux_join): New.
10426 (linux_target_op): Add linux_join.
10427 * spu-low.c (spu_join): New.
10428 (spu_target_ops): Add spu_join.
10429 * win32-low.c (win32_detach): Adapt to new interface.
10430 Reopen current_process_handle before detaching. Issue a child
10431 resume before detaching.
10432 (win32_join): New.
10433 (win32_target_op): Add win32_join.
10434
1d5315fe
PA
104352007-05-10 Pedro Alves <pedro_alves@portugalmail.pt>
10436
10437 * win32-low.c (win32-attach): Fix return value.
10438 * target.h (target_ops): Describe ATTACH return values.
10439
bf914831
PA
104402007-05-10 Pedro Alves <pedro_alves@portugalmail.pt>
10441
10442 * win32-low.c (GETPROCADDRESS): Define.
10443 (winapi_DebugActiveProcessStop): Add WINAPI. typedef as pointer.
10444 (winapi_DebugSetProcessKillOnExit): Likewise.
10445 (win32_create_inferior): Force usage of ansi CreateProcessA.
10446 (win32_attach): Use GETPROCADDRESS.
10447 (win32_detach): Likewise.
10448
f72f3e60
PA
104492007-05-10 Pedro Alves <pedro_alves@portugalmail.pt>
10450
10451 * win32-low.c (win32_wait): Don't use WSTOPSIG.
10452
ed50f18f
PA
104532007-03-30 Pedro Alves <pedro_alves@portugalmail.pt>
10454
10455 * win32-low.c: Commit leftover changes from 2007-03-29.
10456
0c2ead7e
DJ
104572007-03-30 Daniel Jacobowitz <dan@codesourcery.com>
10458
10459 * i387-fp.c (struct i387_fsave, struct i387_fxsave): Make 16-bit
10460 fields short instead of int. Add explicit padding.
10461 (i387_cache_to_fsave): Remove unnecessary casts.
10462 (i387_fsave_to_cache): Doc fix.
10463 (i387_cache_to_fxsave): Remove unnecessary casts and masking.
10464
73725ff3
DJ
104652007-03-30 Daniel Jacobowitz <dan@codesourcery.com>
10466
10467 * i387-fp.c (i387_cache_to_fxsave): Reinitialize val2 before use.
10468 (i387_fxsave_to_cache): Check fp->ftag while building ftag value.
10469
d99f33d8
PA
104702007-03-29 Pedro Alves <pedro_alves@portugalmail.pt>
10471
10472 * configure.srv (arm*-*-mingw32ce*): Move near the other
10473 arm targets.
10474
68070c10
PA
104752007-03-29 Pedro Alves <pedro_alves@portugalmail.pt>
10476
2482afc6 10477 * configure.ac: Add errno checking.
68070c10
PA
10478 (AC_CHECK_HEADERS): Add errno.h, fcntl.h, signal.h,
10479 sys/file.h and malloc.h.
10480 (AC_CHECK_DECLS): Add perror.
10481 (srv_mingwce): Handle.
2482afc6 10482 * configure.srv (i[34567]86-*-cygwin*): Add
68070c10
PA
10483 win32-i386-low.o to srv_tgtobj.
10484 (i[34567]86-*-mingw*): Likewise.
10485 (arm*-*-mingw32ce*): Add case.
10486 * gdbreplay.c [HAVE_SYS_FILE_H, HAVE_SIGNAL_H,
10487 HAVE_FCNTL_H, HAVE_ERRNO_H, HAVE_MALLOC_H]: Check.
10488 [__MINGW32CE__] (strerror): New function.
10489 [__MINGW32CE__] (errno): Define to GetLastError.
10490 [__MINGW32CE__] (COUNTOF): New macro.
10491 (remote_open): Remove extra close call.
10492 * mem-break.c (delete_breakpoint_at): New function.
10493 * mem-break.h (delete_breakpoint_at): Declare.
10494 * remote-utils.c [HAVE_SYS_FILE_H, HAVE_SIGNAL_H,
10495 HAVE_FCNTL_H, HAVE_UNISTD_H, HAVE_ERRNO_H]: Check.
10496 [USE_WIN32API] (read, write): Add char* casts.
10497 * server.c [HAVE_UNISTD_H, HAVE_SIGNAL_H]: Check.
10498 * server.h: Include wincecompat.h on Windows CE.
10499 [HAVE_ERRNO_H]: Check.
10500 (perror): Declare if not declared.
10501 * utils.c: Add stdlib.h, errno.h and malloc.h includes.
10502 (perror_with_name): Remove errno declaration.
10503 * wincecompat.h: New.
10504 * wincecompat.c: New.
10505 * win32-low.h: New.
10506 * win32-arm-low.c: New.
10507 * win32-i386-low.c: New.
10508 (win32-low.c): Include mem-break.h and win32-low.h, and winnt.h.
10509 (OUTMSG2): Make it safe.
10510 (_T): New macro.
10511 (COUNTOF): New macro.
10512 (NUM_REGS): Get it from the low target.
10513 (CONTEXT_EXTENDED_REGISTERS, CONTEXT_FLOATING_POINT,
10514 CONTEXT_DEBUG_REGISTERS): Add fallbacks to 0.
10515 (thread_rec): Let low target handle debug registers.
10516 (child_add_thread): Likewise.
10517 (child_init_thread_list): Likewise.
10518 (continue_one_thread): Likewise.
10519 (regptr): New.
10520 (do_child_fetch_inferior_registers): Move to ...
10521 * win32-i386-low.c: ... here, and rename to ...
10522 (do_fetch_inferior_registers): ... this.
889bf7c5 10523 * win32-low.c (child_fetch_inferior_registers):
68070c10
PA
10524 Go through the low target.
10525 (do_child_store_inferior_registers): Use regptr.
10526 (strwinerror): New function.
10527 (win32_create_inferior): Handle Windows CE.
10528 Use strwinerror instead of strerror on Windows error
10529 codes. Add program to the error output.
10530 Don't close the main thread handle on Windows CE.
10531 (win32_attach): Use coredll.dll on Windows CE.
10532 (win32_kill): Close current process and current
10533 thread handles.
10534 (win32_detach): Use coredll.dll on Windows CE.
10535 (win32_resume): Let low target handle debug registers, and
10536 step request.
10537 (handle_exception): Add/Remove initial breakpoint. Avoid
10538 non-existant WSTOPSIG on Windows CE.
10539 (win32_read_inferior_memory): Cast to remove warning.
10540 (win32_arch_string): Go through the low target.
10541 (initialize_low): Call set_breakpoint_data with the low
10542 target's breakpoint.
10543 * win32-low.c (dr, FLAG_TRACE_BIT, FCS_REGNUM,
10544 FOP_REGNUM, mappings): Move to ...
10545 * win32-i386-low.c: ... here.
10546 * win32-low.c (win32_thread_info): Move to ...
10547 * win32-low.h: ... here.
10548 * Makefile.in (SFILES): Add win32-low.c, win32-i386-low.c,
10549 win32-arm-low.c and wincecompat.c.
10550 (all:): Add $EXEEXT.
10551 (install-only:): Likewise.
10552 (gdbserver:): Likewise.
10553 (gdbreplay:): Likewise.
10554 * config.in: Regenerate.
10555 * configure: Regenerate.
10556
41093d81
PA
105572007-03-28 Pedro Alves <pedro_alves@portugalmail.pt>
10558
10559 * win32-low.c: Rename typedef thread_info to
10560 win32_thread_info throughout.
10561
544afa54
PA
105622007-03-28 Pedro Alves <pedro_alves@portugalmail.pt>
10563
10564 * win32-i386-low.c: Rename to ...
10565 * win32-low.c: ... this.
10566 * configure.srv: Replace win32-i386-low.o with win32-low.o.
10567 * Makefile.in: Likewise.
10568
bce7165d
PA
105692007-03-27 Pedro Alves <pedro_alves@portugalmail.pt>
10570
10571 * remote-utils.c (monitor_output): Constify msg parameter.
10572 * server.h (monitor_output): Likewise.
10573 * win32-i386-low.c (handle_output_debug_string): New.
10574 (win32_kill): Handle OUTPUT_DEBUG_STRING_EVENT events using
10575 handle_output_debug_string.
10576 (get_child_debug_event): Likewise.
10577
506c7aa0
DJ
105782007-03-27 Mat Hostetter <mat@lcs.mit.edu>
10579
10580 * server.c (main): Correct strtoul check.
10581
42c81e2a
DJ
105822007-03-27 Jon Ringle <jon@ringle.org>
10583
10584 * linux-low.c: Check __ARCH_HAS_MMU__ also.
10585
9453113a
DJ
105862007-03-27 Brooks Moses <brooks.moses@codesourcery.com>
10587
10588 * Makefile.in: Add dummy "pdf" and "install-pdf" targets.
10589
64a69107
DJ
105902007-02-27 Daniel Jacobowitz <dan@codesourcery.com>
10591
10592 * terminal.h: Check HAVE_SGTTY_H.
10593
105942007-02-27 Mat Hostetter <mat@lcs.mit.edu>
6f8486da
DJ
10595
10596 * remote-utils.c (remote_open): Print out the assigned port number.
10597
c74d0ad8
DJ
105982007-02-26 Daniel Jacobowitz <dan@codesourcery.com>
10599
10600 * remote-utils.c (monitor_output): New function.
10601 * server.c (debug_threads): Define here.
10602 (monitor_show_help): New function.
10603 (handle_query): Handle qRcmd.
10604 (main): Do not handle 'd' packet.
10605 * server.h (debug_threads, remote_debug, monitor_output): Declare.
10606 * linux-low.c, spu-low.c, win32-i386-low.c: Remove definitions
10607 of debug_threads.
10608
de7c3b4a
PA
106092007-02-25 Pedro Alves <pedro_alves@portugalmail.pt>
10610
10611 * Makefile.in (EXEEXT): New.
10612 (clean): Use $(EXEEXT).
10613
ef57601b
PA
106142007-02-25 Pedro Alves <pedro_alves@portugalmail.pt>
10615
10616 * target.h (target_ops): Rename send_signal to request_interrupt,
10617 and remove enum target_signal parameter.
10618 * linux-low.c (linux_request_interrupt): Rename from
10619 linux_send_signal, and always send SIGINT.
10620 * spu-low.c (spu_request_interrupt): Rename from spu_send_signal,
10621 and always send SIGINT.
10622 * remote-utils.c (putpkt_binary): Call request_interrupt, instead
10623 of send_signal.
10624 (input_interrupt): Likewise.
10625
820f2bda
PA
106262007-02-25 Pedro Alves <pedro_alves@portugalmail.pt>
10627
10628 * server.c (get_features_xml): Check if target implemented
10629 arch_string.
10630 * win32-i386-low.c (win32_arch_string): New.
10631 (win32_target_ops): Add win32_arch_string as arch_string member.
10632
ab39bf24
UW
106332007-02-22 Markus Deuling <deuling@de.ibm.com>
10634
10635 * spu-low.c (spu_arch_string): New.
10636 (spu_target_ops): Add spu_arch_string.
10637
61ff6e04
DJ
106382007-02-16 Daniel Jacobowitz <dan@codesourcery.com>
10639
10640 * remote-utils.c: Remove HAVE_TERMINAL_H check.
10641 * configure.ac: Do not check for terminal.h.
10642 * configure, config.in: Regenerated.
10643
fb1e4ffc
DJ
106442007-02-08 Daniel Jacobowitz <dan@codesourcery.com>
10645
10646 * Makefile.in (OBS): Add $(XML_BUILTIN).
10647 (XML_DIR, XML_TARGET, XML_FILES, XML_BUILTIN): New.
10648 (clean): Update.
10649 (target.xml, xml-builtin.c, stamp-xml, arm-with-iwmmxt.o)
10650 (arm-with-iwmmxt.c): New.
10651 * config.in, configure: Regenerate.
10652 * configure.ac: Check for iWMMXt. Handle srv_xmltarget,
10653 srv_xmlbuiltin, and srv_xmlfiles. Define USE_XML.
10654 * configure.srv: Mention srv_xmltarget and srv_xmlfiles.
10655 (arm*-*-linux*): Add iWMMXt and regset support.
10656 * linux-arm-low.c (PTRACE_GETWMMXREGS, PTRACE_SETWMMXREGS): Define.
10657 (arm_fill_gregset, arm_store_gregset, arm_fill_wmmxregset)
10658 (arm_store_wmmxregset, target_regsets): New.
10659 * server.c (get_features_xml): Take annex argument. Check builtin
10660 XML documents.
10661 (handle_query): Handle multiple annexes.
10662
0f48aa01
DJ
106632007-01-29 Daniel Jacobowitz <dan@codesourcery.com>
10664
10665 * remote-utils.c [USE_WIN32API] (read, write): Define.
10666 (putpkt_binary, input_interrupt, readchar, getpkt): Use read and
10667 write.
10668
23181151
DJ
106692007-01-09 Daniel Jacobowitz <dan@codesourcery.com>
10670
10671 * linux-i386-low.c (the_low_target): Set arch_string.
10672 * linux-x86-64-low.c (the_low_target): Likewise.
10673 * linux-low.c (linux_arch_string): New.
10674 (linux_target_ops): Add it.
10675 * linux-low.h (struct linux_target_ops): Add arch_string.
10676 * server.c (write_qxfer_response): Use const void * for DATA.
10677 (get_features_xml): New.
10678 (handle_query): Handle qXfer:features:read. Report it for qSupported.
10679 * target.h (struct target_ops): Add arch_string method.
10680
9d606399
DJ
106812007-01-03 Denis Pilat <denis.pilat@st.com>
10682 Daniel Jacobowitz <dan@codesourcery.com>
10683
10684 * linux-low.c (linux_kill): Handle being called with no threads.
10685 * win32-i386-low.c (win32_kill): Likewise.
10686 (get_child_debug_event): Clear current_process_handle.
10687
106882006-12-30 Denis PILAT <denis.pilat@st.com>
8264bb58
DJ
10689 Daniel Jacobowitz <dan@codesourcery.com>
10690
10691 * remote-utils.c (remote_open): Check the type of specified
10692 serial port devices before opening them.
10693 * server.c (main): Kill the inferior if an error occurs during
10694 the first remote_open.
10695
a5e13d24
DJ
106962006-12-05 Markus Deuling <deuling@de.ibm.com>
10697
10698 * README: Update supported targets.
10699
186947f7
DJ
107002006-11-28 Daniel Jacobowitz <dan@codesourcery.com>
10701
10702 * Makefile.in (clean): Remove reg-mips64.c.
10703 (reg-mips64.c, reg-mips64.o): New rules.
10704 * configure.srv: Handle mips64. Include regset support for mips.
10705 * linux-mips-low.c (union mips_register): New.
10706 (mips_get_pc, mips_set_pc, mips_reinsert_addr): Use it.
10707 (mips_breakpoint, mips_breakpoint_at): Use int.
10708 (mips_collect_register, mips_supply_register)
10709 (mips_collect_register_32bit, mips_supply_register_32bit)
10710 (mips_fill_gregset, mips_store_gregset, mips_fill_fpregset)
10711 (mips_store_fpregset, target_regsets): New.
10712 * thread-db.c (thread_db_get_tls_address): Use uintptr_t.
10713
a13e2c95
UW
107142006-11-22 Ulrich Weigand <uweigand@de.ibm.com>
10715
10716 * configure.srv: Add target "spu*-*-*".
10717 * Makefile.in (clean): Remove reg-spu.c.
10718 (reg-spu.c, reg-spu.o, spu-low.o): Add dependencies.
10719 * spu-low.c: New file.
10720
cb7283db
DJ
107212006-11-16 Daniel Jacobowitz <dan@codesourcery.com>
10722
10723 * configure.ac: Correct td_thr_tls_get_addr test.
10724 * configure: Regenerated.
10725
89be2091
DJ
107262006-11-16 Daniel Jacobowitz <dan@codesourcery.com>
10727
10728 * linux-low.c (linux_wait_for_event): Reformat. Use the
10729 pass_signals array.
10730 * remote-utils.c (decode_address_to_semicolon): New.
10731 * server.c (pass_signals, handle_general_set): New.
10732 (handle_query): Mention QPassSignals for qSupported.
10733 (main): Call handle_general_set.
10734 * server.h (pass_signals, decode_address_to_semicolon): New.
10735
000ef4f0
DJ
107362006-11-06 Daniel Jacobowitz <dan@codesourcery.com>
10737
10738 * server.c (handle_query): Correct error handling for read_auxv.
10739
b7149293
UW
107402005-10-19 Ulrich Weigand <uweigand@de.ibm.com>
10741
10742 * configure.srv [s390-*-linux*, s390x-*-linux*]: Set srv_linux_regsets
10743 and srv_linux_thread_db to yes.
10744 * linux-s390-low.c (s390_fill_gregset): New function.
10745 (target_regsets): Define data structure.
10746
dae5f5cf
DJ
107472006-10-17 Daniel Jacobowitz <dan@codesourcery.com>
10748
10749 * acinclude.m4 (SRV_CHECK_TLS_GET_ADDR): New.
10750 * configure.ac: Use it. Define HAVE_TD_THR_TLS_GET_ADDR.
10751 * config.in, configure: Regenerated.
10752 * inferiors.c (gdb_id_to_thread): New function.
10753 (gdb_id_to_thread_id): Use it.
10754 * linux-low.c (linux_target_ops): Use thread_db_get_tls_address.
10755 * linux-low.h (struct process_info): Add th member.
10756 (thread_db_get_tls_address): New prototype.
10757 * remote-utils.c (decode_address): Make non-static.
10758 * server.c (handle_query): Handle qGetTLSAddr.
10759 * server.h (gdb_id_to_thread, decode_address): New prototypes.
10760 * target.h (struct target_ops): Add get_tls_address.
10761 * thread-db.c (maybe_attach_thread): Save the thread handle.
10762 (thread_db_get_tls_address): New.
10763
32ca6d61
DJ
107642006-09-28 Daniel Jacobowitz <dan@codesourcery.com>
10765
10766 * linux-low.c (PTRACE_GETSIGINFO, PTRACE_SETSIGINFO): Define.
10767 (linux_resume_one_process): Take a siginfo_t *. Update all
10768 callers. Queue it if necessary. Use PTRACE_SETSIGINFO.
10769 (struct pending_signals): Add a siginfo_t.
10770 (linux_wait_for_process): Always set last_status.
10771 (linux_wait_for_event): Use PTRACE_GETSIGINFO.
10772 (linux_queue_one_thread): Use PTRACE_GETSIGINFO.
10773 * linux-low.h (struct process_info): Add last_status.
10774
5ffff7c1
DJ
107752006-09-21 Daniel Jacobowitz <dan@codesourcery.com>
10776
10777 * remote-utils.c (try_rle): New function.
10778 (putpkt_binary): Use it.
10779
8695c747
DJ
107802006-08-19 Daniel Jacobowitz <dan@codesourcery.com>
10781
10782 * Makefile.in (clean): Clean reg-x86-64-linux.c.
10783 (reg-x86-64-linux.o, reg-x86-64-linux.c): New.
10784 * configure.srv (x86_64-*-linux*): Use reg-x86-64-linux.o.
10785 * linux-x86-64-low.c (x86_64_regmap): Include ORIG_RAX.
10786 (x86_64_fill_gregset, x86_64_store_gregset): Skip floating
10787 point registers.
10788
290fadea
RS
107892006-08-08 Richard Sandiford <richard@codesourcery.com>
10790
10791 * server.c (terminal_fd): New variable.
10792 (old_foreground_pgrp): Likewise.
10793 (restore_old_foreground_pgrp): New function.
10794 (start_inferior): Record the terminal file descriptor in terminal_fd
10795 and its original foreground group in old_foreground_pgrp. Register
10796 restore_old_foreground_pgrp with atexit().
10797
9f2e1e63
DJ
107982006-07-26 Daniel Jacobowitz <dan@codesourcery.com>
10799
10800 * server.c (handle_query): Correct qPart to qXfer.
10801
b80864fb
DJ
108022006-07-22 Daniel Jacobowitz <dan@codesourcery.com>
10803
10804 * configure.ac: Check for more headers which are missing on
10805 Windows. Automatically supply -lwsock32 and USE_WIN32API.
10806 * configure.srv: Add Cygwin and mingw32.
10807 * remote-utils.c: Don't include headers unconditionally which
10808 are missing on mingw32. Include <winsock.h> for mingw32.
10809 (remote_open): Adjust for mingw32 support. Flush
10810 standard error after writing to it.
10811 (remote_close, putpkt_binary, input_interrupt, block_async_io)
10812 (unblock_async_io, enable_async_io, disable_async_io)
10813 (readchar, getpkt): Update for Winsock support.
10814 (prepare_resume_reply): Expect a protocol signal number.
10815 * server.c: Disable <sys/wait.h> on mingw32.
10816 (start_inferior): Adjust for mingw32 support. Flush
10817 standard error after writing to it.
10818 (attach_inferior): Likewise. Use protocol signal
10819 numbers.
10820 (main): Skip 'D' packet on mingw32. Use protocol signal numbers
10821 and names.
10822 * win32-i386-low.c: New file.
10823 * Makefile.in (XM_CLIBS): Set.
10824 (gdbserver, gdbreplay): Use $(INTERNAL_CFLAGS).
10825 (win32-i386-low.o): New dependency rule.
10826 * linux-low.c (linux_wait): Use target signal numbers.
10827 * target.h (struct target_ops): Doc fix.
10828 * server.h (target_signal_to_name): New prototype.
10829 * gdbreplay.c: Don't include headers unconditionally which
10830 are missing on mingw32. Include <winsock.h> for mingw32.
10831 (remote_close, remote_open): Adjust for Winsock support.
10832 * configure, config.in: Regenerated.
10833
0876f84a
DJ
108342006-07-12 Daniel Jacobowitz <dan@codesourcery.com>
10835
10836 * server.c (decode_xfer_read, write_qxfer_response): New.
10837 (handle_query): Take a packet length argument. Handle
10838 qXfer:auxv:read instead of qPart:auxv:read. Mention it in
10839 the qSupported response.
10840 (main): Update call to handle_query.
10841
01f9e8fa
DJ
108422006-06-22 Daniel Jacobowitz <dan@codesourcery.com>
10843
10844 * remote-utils.c (remote_escape_output, remote_unescape_input): New.
10845 (putpkt_binary): Renamed from putpkt and adjusted for binary
10846 data.
10847 (putpkt): New wrapper for putpkt_binary.
10848 (readchar): Don't mask off the high bit.
10849 (decode_X_packet): New function.
10850 * server.c (main): Call putpkt_binary if a handler sets the packet
10851 length. Save the length of the incoming packet. Handle 'X'.
10852 * server.h (gdb_byte, remote_escape_output, decode_X_packet): New.
10853
be2a5f71
DJ
108542006-06-21 Daniel Jacobowitz <dan@codesourcery.com>
10855
10856 * server.c (handle_query): Handle qSupported.
10857
ea025f5f
DJ
108582006-05-30 Daniel Jacobowitz <dan@codesourcery.com>
10859
10860 * remote-utils.c (all_symbols_looked_up): New variable.
10861 (look_up_one_symbol): Check it.
10862 * server.h (look_up_one_symbol): New declaration.
10863 * thread-db.c (thread_db_init): Set all_symbols_looked_up.
10864
9308fc88
DJ
108652006-05-30 Daniel Jacobowitz <dan@codesourcery.com>
10866
10867 * Makefile.in (linux-arm-low.o): Update dependencies.
66f338c7 10868 * linux-arm-low.c: Include "gdb_proc_service.h".
9308fc88
DJ
10869 (PTRACE_GET_THREAD_AREA): Define.
10870 (ps_get_thread_area): New function.
10871
52fb6437
NS
108722006-05-09 Nathan Sidwell <nathan@codesourcery.com>
10873
10874 * configure.srv (m68k*-*-uclinux*): New target.
10875 * linux-low.c (linux_create_inferior): Use vfork on mmuless systems.
10876 (linux_resume_one_process): Remove extraneous cast.
10877 (linux_read_offsets): New.
10878 (linux_target_op): Add linux_read_offsets on mmuless systems.
10879 * server.c (handle_query): Add qOffsets logic.
10880 * target.h (struct target_ops): Add read_offsets.
10881
21b0f40c
DJ
108822006-03-15 Daniel Jacobowitz <dan@codesourcery.com>
10883
10884 * linux-mips-low.c: Include <sys/ptrace.h> and "gdb_proc_service.h".
10885 (PTRACE_GET_THREAD_AREA): Define.
10886 (ps_get_thread_area): New function.
10887 * Makefile.in (linux-i386-low.o, linux-mips-low.o)
10888 (linux-x86-64-low.o): Update.
10889
0050a760
DJ
108902006-03-15 Daniel Jacobowitz <dan@codesourcery.com>
10891
10892 * configure.ac: Remove checks for prfpregset_t.
10893 * gdb_proc_service.h: New file.
10894 * linux-i386-low.c, linux-x86-64-low.c, thread-db.c: Use the
10895 new "gdb_proc_service.h".
10896 * proc-service.c: Likewise.
10897 (ps_pglobal_lookup, ps_pdread, ps_pdwrite): Use psaddr_t.
10898 (ps_lgetfpregs, ps_lsetfpregs): Use a void* argument.
10899 * Makefile.in (gdb_proc_service_h): Updated.
10900 * configure, config.in: Regenerated.
10901
b92a518e
DJ
109022006-03-03 Daniel Jacobowitz <dan@codesourcery.com>
10903
10904 * remote-utils.c (prepare_resume_reply): Move declaration
10905 of gdb_id_from_wait to the top of the block.
10906
545587ee
DJ
109072006-02-15 Daniel Jacobowitz <dan@codesourcery.com>
10908
10909 * linux-low.c (regsets_store_inferior_registers): Read the regset
10910 from the target before filling it.
10911
9db87ebd
DJ
109122006-02-08 Daniel Jacobowitz <dan@codesourcery.com>
10913
10914 * server.c (attach_inferior): Return SIGTRAP for a successful
10915 attach.
10916
dd24457d
DJ
109172006-02-01 Daniel Jacobowitz <dan@codesourcery.com>
10918
10919 * Makefile.in (OBS): Add version.o.
10920 (STAGESTUFF): Delete.
10921 (version.o): Add dependencies.
10922 (version.c): Replace rule.
10923 (clean): Remove version.c.
10924 * server.c (gdbserver_version): New.
10925 (gdbserver_usage): Use printf.
10926 (main): Handle --version and --help.
10927 * server.h (version, host_name): Add declarations.
10928
6f0f660e
EZ
109292005-12-23 Eli Zaretskii <eliz@gnu.org>
10930
889bf7c5
PA
10931 * linux-arm-low.c:
10932 * linux-arm-low.c:
10933 * inferiors.c:
10934 * i387-fp.h:
10935 * i387-fp.c:
10936 * gdbreplay.c:
10937 * regcache.c:
10938 * proc-service.c:
10939 * mem-break.h:
10940 * mem-break.c:
10941 * linux-x86-64-low.c:
10942 * linux-sh-low.c:
10943 * linux-s390-low.c:
10944 * linux-ppc64-low.c:
10945 * linux-ppc-low.c:
10946 * linux-mips-low.c:
10947 * linux-m68k-low.c:
10948 * linux-m32r-low.c:
10949 * linux-low.h:
10950 * linux-low.c:
10951 * linux-ia64-low.c:
10952 * linux-i386-low.c:
10953 * linux-crisv32-low.c:
10954 * thread-db.c:
10955 * terminal.h:
10956 * target.h:
10957 * target.c:
10958 * server.h:
10959 * server.c:
10960 * remote-utils.c:
10961 * regcache.h:
10962 * utils.c:
10963 * Makefile.in:
10964 * configure.ac:
6f0f660e
EZ
10965 * gdbserver.1: Add (C) after Copyright. Update the FSF
10966 address.
10967
9d1fb177
DJ
109682005-11-13 Daniel Jacobowitz <dan@codesourcery.com>
10969
10970 * linux-arm-low.c (arm_eabi_breakpoint): New variable.
10971 (arm_breakpoint_at): Recognize both breakpoints.
10972 (the_low_target): Use the correct breakpoint instruction.
10973
011a70c2
DJ
109742005-11-02 Daniel Jacobowitz <dan@codesourcery.com>
10975
10976 * configure.srv (x86_64-*-linux*): Turn on thread_db support.
10977 * linux-x86-64-low.c (x86_64_breakpoint, x86_64_breakpoint_len)
10978 (x86_64_get_pc, x86_64_set_pc, x86_64_breakpoint_at): New.
10979 (the_low_target): Update.
10980
7fb85e41
AS
109812005-10-25 Andreas Schwab <schwab@suse.de>
10982
10983 * server.c (main): Allocate mem_buf with PBUFSIZ bytes.
10984
10985 * linux-ia64-low.c (ia64_regmap): Remove NAT registers.
10986 (ia64_num_regs): Reduce to 462.
10987
3db0444b
DJ
109882005-09-17 Daniel Jacobowitz <dan@codesourcery.com>
10989
10990 * acinclude.m4: Correct quoting.
10991 * aclocal.m4: Regenerated.
10992
10993 Suggested by SZOKOVACS Robert <szo@ies.hu>:
10994 * thread-db.c (thread_db_err_str): Handle TD_VERSION.
10995 (thread_db_init): Call thread_db_err_str.
10996 * configure.ac: Check for TD_VERSION.
10997 * config.in, configure: Regenerated.
10998
bee0189a
DJ
109992005-07-31 Kaveh R. Ghazi <ghazi@caip.rutgers.edu>
11000
11001 * server.h (error, fatal, warning): Add ATTR_FORMAT.
11002
e9d25b98
DJ
110032005-07-13 Daniel Jacobowitz <dan@codesourcery.com>
11004
11005 * configure.ac: Define HAVE_LINUX_REGSETS even if PTRACE_GETREGS
11006 is not available. Define HAVE_PTRACE_GETREGS if it is.
11007 * config.in, configure: Regenerated.
11008 * configure.srv: Set srv_linux_regsets for PowerPC and PowerPC64.
11009 * linux-i386-low.c, linux-m68k-low.c: Update to use
11010 HAVE_PTRACE_GETREGS.
11011 * linux-low.c (regsets_fetch_inferior_registers)
11012 (regsets_store_inferior_registers): Only return 0 if we processed
11013 GENERAL_REGS.
11014 * linux-ppc-low.c (ppc_fill_gregset, target_regsets): New.
11015 * linux-ppc64-low.c (ppc_fill_gregset, target_regsets): New.
11016
a06660f7
DJ
110172005-07-13 Daniel Jacobowitz <dan@codesourcery.com>
11018
11019 * inferiors.c (struct thread_info): Add gdb_id.
11020 (add_thread): Add gdb_id argument.
11021 (thread_id_to_gdb_id, thread_to_gdb_id, gdb_id_to_thread_id): New.
11022 * linux-low.c (linux_create_inferior, linux_attach_lwp): Update
11023 calls to add_thread.
11024 * remote-utils.c (prepare_resume_reply: Use thread_to_gdb_id.
11025 * server.c (handle_query): Use thread_to_gdb_id.
11026 (handle_v_cont, main): Use gdb_id_to_thread_id.
11027 * server.h (add_thread): Update prototype.
11028 (thread_id_to_gdb_id, thread_to_gdb_id, gdb_id_to_thread_id): New
11029 prototypes.
11030
5a1f5858
DJ
110312005-07-13 Daniel Jacobowitz <dan@codesourcery.com>
11032
11033 * linux-low.c (fetch_register, usr_store_inferior_registers): Handle
11034 left-padded registers.
11035 * linux-low.h (struct linux_target_ops): Add left_pad_xfer.
11036 * linux-ppc64-low.c (the_low_target): Set left_pad_xfer.
11037
e122f1f5
SE
110382005-07-01 Steve Ellcey <sje@cup.hp.com>
11039
11040 * configure.ac (BFD_NEED_DECLARATION): Replace with AC_CHECK_DECLS.
11041 * configure: Regenerate.
11042 * config.in: Regenerate.
11043 * server.h (NEED_DECLARATION_STRERROR):
11044 Replace with !HAVE_DECL_STRERROR.
11045
d592fa2f
DJ
110462005-06-16 Daniel Jacobowitz <dan@codesourcery.com>
11047
11048 * linux-low.c (linux_wait, linux_send_signal): Don't test
11049 an unsigned long variable for > 0 if it could be MAX_ULONG.
11050 * server.c (myresume): Likewise.
11051 * target.c (set_desired_inferior): Likewise.
11052
ccbd4912
MK
110532005-06-13 Mark Kettenis <kettenis@gnu.org>
11054
11055 * configure.ac: Simplify and improve check for socklen_t.
11056 * configure, config.in: Regenerate.
11057
f450004a
DJ
110582005-06-12 Daniel Jacobowitz <dan@codesourcery.com>
11059
11060 * acconfig.h: Remove.
11061 * configure.ac: Add a test for socklen_t. Use three-argument
11062 AC_DEFINE throughout.
11063 * config.in: Regenerated using autoheader 2.59.
11064 * configure: Regenerated.
11065
11066 * gdbreplay.c (socklen_t): Provide a default.
11067 (remote_open): Use socklen_t.
11068 * remote-utils.c (socklen_t): Provide a default.
11069 (remote_open): Use socklen_t.
11070 (convert_int_to_ascii, convert_ascii_to_int, decode_M_packet): Use
11071 unsigned char.
11072
11073 * i387-fp.c (struct i387_fsave, struct i387_fxsave): Use unsigned
11074 char for buffers.
11075 * linux-low.c (linux_read_memory, linux_write_memory)
11076 (linux_read_auxv): Likewise.
11077 * mem-break.c (breakpoint_data, set_breakpoint_data, check_mem_read)
11078 (check_mem_write): Likewise.
11079 * mem-break.h (set_breakpoint_data, check_mem_read, check_mem_write):
11080 Likewise.
11081 * regcache.c (struct inferior_rgcache_data, registers_to_string)
11082 (registers_from_string, register_data): Likewise.
11083 * server.c (handle_query, main): Likewise.
11084 * server.h (convert_ascii_to_int, convert_int_to_ascii)
11085 (decode_M_packet): Likewise.
11086 * target.c (read_inferior_memory, write_inferior_memory): Likewise.
11087 * target.h (struct target_ops): Update read_memory, write_memory,
11088 and read_auxv.
11089 (read_inferior_memory, write_inferior_memory): Update.
11090 * linux-low.h (struct linux_target_ops): Change type of breakpoint
11091 to unsigned char *.
11092 * linux-arm-low.c, linux-cris-low.c, linux-crisv32-low.c,
11093 linux-i386-low.c, linux-m32r-low.c, linux-m68k-low.c,
11094 linux-mips-low.c, linux-ppc-low.c, linux-ppc64-low.c,
11095 linux-s390-low.c, linux-sh-low.c: Update for changes in
11096 read_inferior_memory and the_low_target->breakpoint.
11097
eee84df1
DJ
110982005-05-28 Daniel Jacobowitz <dan@codesourcery.com>
11099
11100 * Makefile.in (SFILES): Add linux-ppc64-low.c.
11101 (linux-ppc64-low.o, reg-ppc64.c, reg-ppc64.o): New targets.
11102 * configure.srv: Add powerpc64-*-linux*.
11103 * linux-ppc64-low.c: New file.
11104
45b134e5
OF
111052005-05-23 Orjan Friberg <orjanf@axis.com>
11106
11107 * linux-cris-low.c: New file with support for CRIS.
11108 * linux-crisv32-low.c: Ditto for CRISv32.
11109 * Makefile.in (SFILES): Add linux-cris-low.c, linux-crisv32-low.c.
11110 (clean): Add reg-cris.c and reg-crisv32.c.
889bf7c5 11111 Add linux-cris-low.o, linux-crisv32-low.o, reg-cris.o, reg-cris.c,
45b134e5
OF
11112 reg-crisv32.o, and reg-crisv32.c to make rules.
11113 * configure.srv: Add cris-*-linux* and crisv32-*-linux* to list of
11114 recognized targets.
11115
48d93c75
UW
111162005-05-16 Ulrich Weigand <uweigand@de.ibm.com>
11117
11118 * linux-low.c (fetch_register): Ensure buffer size is a multiple
11119 of sizeof (PTRACE_XFER_TYPE).
11120 (usr_store_inferior_registers): Likewise. Zero out excess bytes.
11121
e013ee27
OF
111222005-05-12 Orjan Friberg <orjanf@axis.com>
11123
889bf7c5 11124 * target.h (struct target_ops): Add insert_watchpoint,
e013ee27
OF
11125 remove_watchpoint, stopped_by_watchpoint, stopped_data_address function
11126 pointers for hardware watchpoint support.
11127 * linux-low.h (struct linux_target_ops): Ditto.
11128 * linux-low.c (linux_insert_watchpoint, linux_remove_watchpoint)
11129 (linux_stopped_by_watchpoint, linux_stopped_data_address): New. Add
11130 to linux_target_ops.
11131 * remote-utils.c (prepare_resume_reply): Add watchpoint information to
11132 reply packet.
11133 * server.c (main): Recognize 'Z' and 'z' packets.
11134
b0ded00b
UW
111352005-05-10 Ulrich Weigand <uweigand@de.ibm.com>
11136
11137 * linux-s390-low.c (s390_breakpoint, s390_breakpoint_len): Define.
11138 (s390_get_pc, s390_set_pc, s390_breakpoint_at): New functions.
11139 (the_low_target): Add new members.
11140
8643e2ad
DJ
111412005-05-04 Daniel Jacobowitz <dan@codesourcery.com>
11142
11143 * proc-service.c (ps_lgetregs): Search all_processes instead of
11144 all_threads.
11145
fc620387
DJ
111462005-05-04 Daniel Jacobowitz <dan@codesourcery.com>
11147
11148 * server.c (start_inferior): Change return type to int.
11149 (attach_inferior): Change sigptr to int *.
11150 (handle_v_cont, handle_v_requests): Change signal to int *.
11151 (main): Change signal to int.
11152
111532005-04-15 Kei Sakamoto <sakamoto.kei@renesas.com>
7cfbc4a0
KI
11154
11155 * Makefile.in: Add linux-m32r-low.o, reg-m32r.c and reg-m32r.o.
11156 * configure.srv: Add m32r*-*-linux*.
11157 * linux-m32r-low.c: New file.
11158
e0e76420
DJ
111592005-03-04 Daniel Jacobowitz <dan@codesourcery.com>
11160
11161 * Makefile.in (stamp-h): Set CONFIG_HEADERS explicitly.
11162
a1928bad
DJ
111632005-03-03 Daniel Jacobowitz <dan@codesourcery.com>
11164
11165 * inferiors.c (change_inferior_id, add_thread, find_inferior_id):
11166 Take unsigned long arguments for PIDs.
11167 * linux-low.c (add_process, linux_attach_lwp, linux_attach)
11168 (linux_thread_alive, linux_wait_for_event, kill_lwp, send_sigstop)
11169 (wait_for_sigstop, linux_resume_one_process)
11170 (regsets_fetch_inferior_registers, linux_send_signal)
11171 (linux_read_auxv): Likewise. Update the types of variables holding
11172 PIDs. Update format string specifiers.
11173 * linux-low.h (struct process_info, linux_attach_lwp): Likewise.
11174 * remote-utils.c (prepare_resume_reply): Likewise.
11175 * server.c (cont_thread, general_thread, step_thread)
11176 (thread_from_wait, old_thread_from_wait, signal_pid): Change type to
11177 unsigned long.
11178 (handle_query): Update format specifiers.
11179 (handle_v_cont, main): Use strtoul for thread IDs.
11180 * server.h (struct inferior_list_entry): Use unsigned long for ID.
11181 (add_thread, find_inferior_id, change_inferior_id, cont_thread)
11182 (general_thread, step_thread, thread_from_wait)
11183 (old_thread_from_wait): Update.
11184 * target.h (struct thread_resume): Use unsigned long for THREAD.
11185 (struct target_ops): Use unsigned long for arguments to attach and
11186 thread_alive.
11187
dcdb98d2
DJ
111882005-02-24 Daniel Jacobowitz <dan@codesourcery.com>
11189
11190 * acinclude.m4: Include bfd/bfd.m4 directly.
11191 * configure.ac: Use AC_ARG_PROGRAM. Suggested by Aron Griffis
11192 <agriffis@toolchain.org>.
11193 * aclocal.m4, configure: Regenerated.
11194
bec39cab
AC
111952005-01-07 Andrew Cagney <cagney@gnu.org>
11196
11197 * configure.ac: Rename configure.in, require autoconf 2.59.
11198 * configure: Re-generate.
11199
434c4c77
DJ
112002004-12-08 Daniel Jacobowitz <dan@debian.org>
11201
11202 * acinclude.m4 (SRV_CHECK_THREAD_DB): Add ps_get_thread_area. Reset
11203 LIBS when finished.
11204 * aclocal.m4: Regenerated.
11205 * configure: Regenerated.
11206
db1d3e1b
AS
112072004-11-21 Andreas Schwab <schwab@suse.de>
11208
11209 * linux-m68k-low.c (m68k_num_gregs): Define.
11210 (m68k_fill_gregset, m68k_store_gregset, m68k_fill_fpregset)
11211 (m68k_store_fpregset, target_regsets) [HAVE_LINUX_REGSETS]: New.
11212 (m68k_breakpoint, m68k_breakpoint_len, m68k_get_pc, m68k_set_pc)
11213 (m68k_breakpoint_at): New. Add to the_low_target.
11214
11215 * configure.srv (m68*-*-linux*): Set srv_linux_regsets and
11216 srv_linux_thread_db to yes.
11217
43360365
JB
112182004-10-20 Joel Brobecker <brobecker@gnat.com>
11219
11220 * linux-x86-64-low.c (ARCH_SET_GS): Add definition if missing.
11221 (ARCH_SET_FS): Likewise.
11222 (ARCH_GET_FS): Likewise.
11223 (ARCH_GET_GS): Likewise.
11224
fd500816
DJ
112252004-10-16 Daniel Jacobowitz <dan@debian.org>
11226
11227 * linux-i386-low.c (ps_get_thread_area): New.
11228 * linux-x86-64-low.c (ps_get_thread_area): New.
11229 * linux-low.c: Include <sys/syscall.h>.
11230 (linux_kill_one_process): Don't kill the first thread here.
11231 (linux_kill): Kill the first thread here.
11232 (kill_lwp): New function.
11233 (send_sigstop, linux_send_signal): Use it.
11234 * proc-service.c: Clean up #ifdefs.
11235 (fpregset_info): Delete.
11236 (ps_lgetregs): Update and enable implementation.
11237 (ps_lsetregs, ps_lgetfpregs, ps_lsetfpregs): Remove disabled
11238 implementations.
11239 * remote-utils.c (struct sym_cache, symbol_cache): New.
11240 (input_interrupt): Print a clearer message.
11241 (async_io_enabled): New variable.
11242 (enable_async_io, disable_async_io): Use it. Update comments.
11243 (look_up_one_symbol): Use the symbol cache.
11244 * thread-db.c (thread_db_look_up_symbols): New function.
11245 (thread_db_init): Update comments. Call thread_db_look_up_symbols.
11246
f6de3c42
DJ
112472004-10-16 Daniel Jacobowitz <dan@debian.org>
11248
11249 * configure.in: Test for -rdynamic.
11250 * configure: Regenerated.
11251 * Makefile (INTERNAL_LDFLAGS): New.
11252 (gdbserver, gdbreplay): Use it.
11253
2c0fc042
AC
112542004-09-02 Andrew Cagney <cagney@gnu.org>
11255
11256 * Makefile.in (TAGS): Replace TM_FILE with DEPRECATED_TM_FILE.
11257
075b3282
DJ
112582004-03-23 Daniel Jacobowitz <drow@mvista.com>
11259
11260 * linux-low.c (linux_wait): Clear all_processes list also.
11261
fa6a77dc
DJ
112622004-03-12 Daniel Jacobowitz <drow@mvista.com>
11263
11264 * linux-low.c: Include <errno.h>. Remove extern declaration of
11265 errno.
11266
6d782a97
DJ
112672004-03-12 Daniel Jacobowitz <drow@mvista.com>
11268
11269 * gdbreplay.c, server.h, utils.c: Update copyright years.
11270
3a7fb99b
DJ
112712004-03-04 Nathan J. Williams <nathanw@wasabisystems.com>
11272
11273 * server.c (main): Print child status or termination signal from
11274 variable 'signal', not 'sig'.
11275
c3e735a6
DJ
112762004-03-04 Nathan J. Williams <nathanw@wasabisystems.com>
11277
11278 * linux-low.c (linux_read_memory): Change return type to
11279 int. Check for and return error from ptrace().
11280 * target.c (read_inferior_memory): Change return type to int. Pass
11281 back return status from the_target->read_memory().
11282 * target.h (struct target_ops): Adapt *read_memory() prototype.
11283 Update comment.
11284 (read_inferior_memory): Adapt prototype.
11285 * server.c (main): Return an error packet if
11286 read_inferior_memory() returns an error.
11287
a59d1c82
DJ
112882004-03-04 Daniel Jacobowitz <drow@mvista.com>
11289
11290 * Makefile.in (distclean): Remove config.h, stamp-h, and config.log.
11291 Unify with other clean targets.
11292
dc3f8883
DJ
112932004-02-29 Daniel Jacobowitz <drow@mvista.com>
11294
11295 * server.c (handle_v_cont): Call set_desired_inferior.
11296
89a208da
DJ
112972004-02-29 Daniel Jacobowitz <drow@mvista.com>
11298
11299 * remote-utils.c (prepare_resume_reply): Always supply "thread:".
11300
62ea82f5
DJ
113012004-02-29 Daniel Jacobowitz <drow@mvista.com>
11302
11303 * linux-low.c (linux_wait): Unblock async I/O.
11304 (linux_resume): Block and enable async I/O.
11305 * remote-utils.c (block_async_io, unblock_async_io): New functions.
11306 * server.h (block_async_io, unblock_async_io): Add prototypes.
11307
6910d122
DJ
113082004-02-29 Daniel Jacobowitz <drow@mvista.com>
11309
11310 * remote-utils.c (remote_open): Print a status notice after
11311 opening a TCP port.
11312 * server.c (attach_inferior): Print a status notice after
11313 attaching.
11314
113152004-02-29 Daniel Jacobowitz <drow@mvista.com>
d677d77d
DJ
11316
11317 * linux-arm-low.c (arm_get_pc): Print out stop PC in debug mode.
11318
c89dc5d4
DJ
113192004-02-26 Daniel Jacobowitz <drow@mvista.com>
11320
11321 * remote-utils.c (write_enn): Use "E01" instead of "ENN" for the
11322 error packet.
11323 * server.c, target.h: Update copyright years.
11324
4b8dad4a
RM
113252004-02-25 Roland McGrath <roland@redhat.com>
11326
11327 * target.h (struct target_ops): New member `read_auxv'.
11328 * server.c (handle_query): Handle qPart:auxv:read: query using that.
11329 * linux-low.c (linux_read_auxv): New function.
11330 (linux_target_ops): Initialize `read_auxv' member to that.
11331
d7446758
JB
113322004-02-17 Ulrich Weigand <Ulrich.Weigand@de.ibm.com>
11333
11334 Committed by Jim Blandy <jimb@redhat.com>.
11335
11336 * linux-s390-low.c (s390_num_regs): Update.
4b8dad4a 11337 (s390_regmap): Remove control registers. Use __s390x__ predefine
d7446758
JB
11338 instead of GPR_SIZE to distiguish s390 and s390x targets.
11339
5544ad89
DJ
113402004-01-31 Daniel Jacobowitz <drow@mvista.com>
11341
11342 * linux-low.c: Update copyright year.
11343 (check_removed_breakpoint): Clear pending_is_breakpoint.
11344 (linux_set_resume_request, linux_queue_one_thread)
11345 (resume_status_pending_p): New functions.
11346 (linux_continue_one_thread): Use process->resume.
11347 (linux_resume): Only resume threads if there are no pending events.
11348 * linux-low.h (struct process_info): Add resume request
11349 pointer.
11350
2a68b70e
DJ
113512004-01-30 Daniel Jacobowitz <drow@mvista.com>
11352
11353 * regcache.c (new_register_cache): Clear the allocated register
11354 buffer. Suggested by Atsushi Nemoto <anemo@mba.ocn.ne.jp>.
11355
64386c31
DJ
113562003-10-13 Daniel Jacobowitz <drow@mvista.com>
11357
11358 * linux-low.c (linux_resume): Take a struct thread_resume *
11359 argument.
11360 (linux_wait): Update call.
11361 (resume_ptr): New static variable.
11362 (linux_continue_one_thread): Renamed from
11363 linux_continue_one_process. Use resume_ptr.
11364 (linux_resume): Use linux_continue_one_thread.
11365 * server.c (handle_v_cont, handle_v_requests): New functions.
11366 (myresume): New function.
11367 (main): Handle 'v' case.
11368 * target.h (struct thread_resume): New type.
11369 (struct target_ops): Change argument of "resume" to struct
11370 thread_resume *.
11371 (myresume): Delete macro.
11372
c938e9b0
L
113732003-08-08 H.J. Lu <hongjiu.lu@intel.com>
11374
11375 * Makefile.in (install-only): Create dest dir. Support DESTDIR.
11376 (uninstall): Support DESTDIR.
11377
7f313d07
BC
11378Mon Jul 21 20:09:34 UTC 2003 Brendan Conoboy <blc@redhat.com>
11379
11380 * configure.srv: Add xscale*linux copy of arm*linux entry.
11381
3b2fc2ea
DJ
113822003-07-24 Daniel Jacobowitz <drow@mvista.com>
11383
11384 * linux-arm-low.c (arm_reinsert_addr): New function.
11385 (the_low_target): Add arm_reinsert_addr.
11386
1c0a559e
MK
113872003-07-08 Mark Kettenis <kettenis@gnu.org>
11388
11389 * mem-break.c: Remove whitespace at end of file.
11390
43d5792c
DJ
113912003-06-28 Daniel Jacobowitz <drow@mvista.com>
11392
11393 * configure.in: Check whether we need to prototype strerror.
11394 * server.h: Optionally prototype strerror.
11395 * gdbreplay.c (perror_with_name): Use strerror.
11396 * linux-low.c (linux_attach_lwp): Use strerror.
11397 * utils.c (perror_with_name): Use strerror.
11398 * config.in, configure: Regenerated.
11399
c8a86edf
DJ
114002003-06-28 Daniel Jacobowitz <drow@mvista.com>
11401
11402 * linux-sh-low.c (sh_regmap): Fix FP register offsets, reported by
11403 SUGIOKA Toshinobu <sugioka@itonet.co.jp>.
11404
73d37363
DJ
114052003-06-20 Daniel Jacobowitz <drow@mvista.com>
11406
11407 * Makefile.in (SFILES): Update.
11408 * low-hppabsd.c, low-lynx.c, low-nbsd.c, low-sim.c, low-sparc.c,
11409 low-sun3.c: Remove files.
11410
6ad8ae5c
DJ
114112003-06-17 Daniel Jacobowitz <drow@mvista.com>
11412
11413 * linux-low.c: Move comment to linux_thread_alive where it belonged.
11414 (linux_detach_one_process, linux_detach): New functions.
11415 (linux_target_ops): Add linux_detach.
11416 * server.c (main): Handle 'D' packet.
11417 * target.h (struct target_ops): Add "detach" member.
11418 (detach_inferior): Define.
11419
1581182a
MK
114202003-06-13 Mark Kettenis <kettenis@gnu.org>
11421
11422 From Kelley Cook <kelleycook@wideopenwest.com>:
11423 * configure.srv: Accept i[34567]86 variants.
11424
e5379b03
DJ
114252003-06-05 Daniel Jacobowitz <drow@mvista.com>
11426
11427 * linux-low.c (linux_wait_for_event): Correct comment typos.
11428 (linux_resume_one_process): Call check_removed_breakpoint.
11429 (linux_send_signal): New function.
11430 (linux_target_ops): Add linux_send_signal.
11431 * remote-utils.c (putpkt, input_interrupt): Use send_signal instead
11432 of kill.
11433 * target.h (struct target_ops): Add send_signal.
11434
2ff29de4
JB
114352003-05-29 Jim Blandy <jimb@redhat.com>
11436
11437 * linux-low.c (usr_store_inferior_registers): Transfer buf in
11438 PTRACE_XFER_TYPE-sized chunks, not int-sized chunks. Otherwise,
11439 if 'int' is smaller than PTRACE_XFER_TYPE, you end up throwing
11440 away part of the register's value.
11441
254787d4
DJ
114422003-03-26 Daniel Jacobowitz <drow@mvista.com>
11443
11444 * linux-low.c (linux_create_inferior): Use __SIGRTMIN.
11445 (linux_wait_for_event, linux_init_signals): Likewise.
11446
94e10508
DJ
114472003-03-17 Daniel Jacobowitz <drow@mvista.com>
11448
11449 * configure.in: Check for stdlib.h.
11450 * configure: Regenerated.
11451 * config.in: Regenerated.
11452
4c0711e0
DJ
114532003-01-04 Andreas Schwab <schwab@suse.de>
11454
11455 * linux-m68k-low.c (m68k_num_regs): Define to 29 instead of 31.
11456
ef66e766
AC
114572003-01-02 Andrew Cagney <ac131313@redhat.com>
11458
11459 * Makefile.in: Remove obsolete code.
11460
a1358604
DJ
114612002-11-20 Daniel Jacobowitz <drow@mvista.com>
11462
11463 * linux-s390-low.c (s390_regmap): Check GPR_SIZE instead of
11464 defined(PT_FPR0_HI).
11465
23ce3b1c
DJ
114662002-11-17 Stuart Hughes <seh@zee2.com>
11467
11468 * linux-arm-low.c (arm_num_regs): Increase.
11469 (arm_regmap): Include status register.
11470
114712002-11-17 Daniel Jacobowitz <drow@mvista.com>
11472
11473 * linux-low.c (register_addr): Remove incorrect -1 check.
11474
a9fa9f7d
DJ
114752002-08-29 Daniel Jacobowitz <drow@mvista.com>
11476
11477 * linux-low.c (linux_create_inferior): Call setpgid. Return
11478 the new PID.
11479 (unstopped_p, linux_signal_pid): Remove.
11480 (linux_target_ops): Remove linux_signal_pid.
11481 * remote-utils.c (putpkt, input_interrupt): Use signal_pid
11482 global instead of target method.
11483 * target.h (struct target_ops): Remove signal_pid. Update comment
11484 for create_inferior.
11485 * server.c (signal_pid): New variable.
11486 (create_inferior): Set signal_pid. Block SIGTTOU and SIGTTIN in
4b8dad4a 11487 gdbserver. Set the child to be the foreground process group.
a9fa9f7d
DJ
11488 (attach_inferior): Set signal_pid.
11489
17574093
DJ
114902002-08-23 Daniel Jacobowitz <drow@mvista.com>
11491
11492 * ChangeLog: New file, with entries from gdb/ChangeLog after GDB 5.2.
11493
114942002-08-20 Jim Blandy <jimb@redhat.com>
11495
11496 * Makefile.in (LDFLAGS): Allow the configure script to establish a
11497 default for this.
11498
114992002-08-01 Andrew Cagney <cagney@redhat.com>
11500
11501 * Makefile.in: Make chill references obsolete.
11502
115032002-07-24 Kevin Buettner <kevinb@redhat.com>
11504
11505 * configure.in (unistd.h): Add to AC_CHECK_HEADERS list.
11506 * configure: Regenerate.
11507 * config.in: Regenerate.
11508
115092002-07-09 David O'Brien <obrien@FreeBSD.org>
11510
11511 * gdbreplay.c (stdlib.h, unistd.h): Conditionaly include.
11512 (perror_with_name, remote_close, remote_open, expect, play): Static.
11513
115142002-07-04 Michal Ludvig <mludvig@suse.cz>
11515
4b8dad4a 11516 * linux-x86-64-low.c (x86_64_regmap): Make it an array of
17574093
DJ
11517 byte offsets instead of an array of indexes.
11518 (x86_64_store_gregset, x86_64_store_fpregset): Parameter made const.
11519
115202002-06-13 Daniel Jacobowitz <drow@mvista.com>
11521
11522 * regcache.c: Add comment.
11523
115242002-06-11 Daniel Jacobowitz <drow@mvista.com>
11525
11526 * thread-db.c: New file.
11527 * proc-service.c: New file.
11528 * acinclude.m4: New file.
11529 * Makefile.in: Add GDBSERVER_LIBS, gdb_proc_service_h,
11530 proc-service.o, and thread-db.o.
11531 (linux-low.o): Add USE_THREAD_DB.
11532 * acconfig.h: Add HAVE_PRGREGSET_T, HAVE_PRFPREGSET_T,
11533 HAVE_LWPID_T, HAVE_PSADDR_T, and PRFPREGSET_T_BROKEN.
11534 * aclocal.m4: Regenerated.
11535 * config.in: Regenerated.
11536 * configure: Regenerated.
11537 * configure.in: Check for proc_service.h, sys/procfs.h,
11538 thread_db.h, and linux/elf.h headrs.
11539 Check for lwpid_t, psaddr_t, prgregset_t, prfpregset_t, and
11540 PRFPREGSET_T_BROKEN. Introduce srv_thread_depfiles and USE_THREAD_DB.
11541 Check for -lthread_db and thread support.
11542 * configure.srv: Enable thread_db support for ARM, i386, MIPS,
11543 PowerPC, and SuperH.
11544 * i387-fp.c: Constify arguments.
11545 * i387-fp.h: Likewise.
11546 * inferiors.c: (struct thread_info): Renamed from
11547 `struct inferior_info'. Remove PID member. Use generic inferior
11548 list header. All uses updated.
11549 (inferiors, signal_pid): Removed.
11550 (all_threads): New variable.
11551 (get_thread): Define.
11552 (add_inferior_to_list): New function.
11553 (for_each_inferior): New function.
11554 (change_inferior_id): New function.
11555 (add_inferior): Removed.
11556 (remove_inferior): New function.
11557 (add_thread): New function.
11558 (free_one_thread): New function.
11559 (remove_thread): New function.
11560 (clear_inferiors): Use for_each_inferior and free_one_thread.
11561 (find_inferior): New function.
11562 (find_inferior_id): New function.
11563 (inferior_target_data): Update argument type.
11564 (set_inferior_target_data): Likewise.
11565 (inferior_regcache_data): Likewise.
11566 (set_inferior_regcache_data): Likewise.
11567 * linux-low.c (linux_bp_reinsert): Remove.
11568 (all_processes, stopping_threads, using_thrads)
11569 (struct pending_signals, debug_threads, pid_of): New.
11570 (inferior_pid): Replace with macro.
11571 (struct inferior_linux_data): Remove.
11572 (get_stop_pc, add_process): New functions.
11573 (linux_create_inferior): Restore SIGRTMIN+1 before calling exec.
11574 Use add_process and add_thread.
11575 (linux_attach_lwp): New function, based on old linux_attach. Use
11576 add_process and add_thread. Set stop_expected for new threads.
11577 (linux_attach): New function.
11578 (linux_kill_one_process): New function.
11579 (linux_kill): Kill all LWPs.
11580 (linux_thread_alive): Use find_inferior_id.
11581 (check_removed_breakpoints, status_pending_p): New functions.
11582 (linux_wait_for_process): Renamed from linux_wait_for_one_inferior.
11583 Update. Use WNOHANG. Wait for cloned processes also. Update process
11584 struct for the found process.
11585 (linux_wait_for_event): New function.
11586 (linux_wait): Use it. Support LWPs.
11587 (send_sigstop, wait_for_sigstop, stop_all_processes)
11588 (linux_resume_one_process, linux_continue_one_process): New functions.
11589 (linux_resume): Support LWPs.
11590 (REGISTER_RAW_SIZE): Remove.
11591 (fetch_register): Use register_size instead. Call supply_register.
11592 (usr_store_inferior_registers): Likewise. Call collect_register.
11593 Fix recursive case.
11594 (regsets_fetch_inferior_registers): Improve error message.
11595 (regsets_store_inferior_registers): Add debugging.
11596 (linux_look_up_symbols): Call thread_db_init if USE_THREAD_DB.
11597 (unstopped_p, linux_signal_pid): New functions.
11598 (linux_target_ops): Add linux_signal_pid.
11599 (linux_init_signals): New function.
11600 (initialize_low): Call it. Initialize using_threads.
11601 * regcache.c (inferior_regcache_data): Add valid
11602 flag.
11603 (get_regcache): Fetch registers lazily. Add fetch argument
11604 and update all callers.
11605 (regcache_invalidate_one, regcache_invalidate): New
11606 functions.
11607 (new_register_cache): Renamed from create_register_cache.
11608 Return the new regcache.
11609 (free_register_cache): Change argument to a void *.
11610 (registers_to_string, registers_from_string): Call get_regcache
11611 with fetch flag set.
11612 (register_data): Make static. Pass fetch flag to get_regcache.
11613 (supply_register): Call get_regcache with fetch flag clear.
11614 (collect_register): Call get_regcache with fetch flag set.
11615 (collect_register_as_string): New function.
11616 * regcache.h: Update.
11617 * remote-utils.c (putpkt): Flush after debug output and use
11618 stderr.
11619 Handle input interrupts while waiting for an ACK.
11620 (input_interrupt): Use signal_pid method.
11621 (getpkt): Flush after debug output and use stderr.
11622 (outreg): Use collect_register_as_string.
11623 (new_thread_notify, dead_thread_notify): New functions.
11624 (prepare_resume_reply): Check using_threads. Set thread_from_wait
11625 and general_thread.
11626 (look_up_one_symbol): Flush after debug output.
11627 * server.c (step_thread, server_waiting): New variables.
11628 (start_inferior): Don't use signal_pid. Update call to mywait.
11629 (attach_inferior): Update call to mywait.
11630 (handle_query): Handle qfThreadInfo and qsThreadInfo.
11631 (main): Don't fetch/store registers explicitly. Use
11632 set_desired_inferior. Support proposed ``Hs'' packet. Update
11633 calls to mywait.
11634 * server.h: Update.
11635 (struct inferior_list, struct_inferior_list_entry): New.
11636 * target.c (set_desired_inferior): New.
11637 (write_inferior_memory): Constify.
11638 (mywait): New function.
11639 * target.h: Update.
11640 (struct target_ops): New signal_pid method.
11641 (mywait): Removed macro, added prototype.
11642
11643 * linux-low.h (regset_func): Removed.
11644 (regset_fill_func, regset_store_func): New.
11645 (enum regset_type): New.
11646 (struct regset_info): Add type field. Use new operation types.
11647 (struct linux_target_ops): stop_pc renamed to get_pc.
11648 Add decr_pc_after_break and breakpoint_at.
11649 (get_process, get_thread_proess, get_process_thread)
11650 (strut process_info, all_processes, linux_attach_lwp)
11651 (thread_db_init): New.
11652
11653 * linux-arm-low.c (arm_get_pc, arm_set_pc,
11654 arm_breakpoint, arm_breakpoint_len, arm_breakpoint_at): New.
11655 (the_low_target): Add new members.
11656 * linux-i386-low.c (i386_store_gregset, i386_store_fpregset)
11657 (i386_store_fpxregset): Constify.
11658 (target_regsets): Add new kind identifier.
11659 (i386_get_pc): Renamed from i386_stop_pc. Simplify.
11660 (i386_set_pc): Add debugging.
11661 (i386_breakpoint_at): New function.
11662 (the_low_target): Add new members.
11663 * linux-mips-low.c (mips_get_pc, mips_set_pc)
11664 (mips_breakpoint, mips_breakpoint_len, mips_reinsert_addr)
11665 (mips_breakpoint_at): New.
11666 (the_low_target): Add new members.
11667 * linux-ppc-low.c (ppc_get_pc, ppc_set_pc)
11668 (ppc_breakpoint, ppc_breakpoint_len, ppc_breakpoint_at): New.
11669 (the_low_target): Add new members.
11670 * linux-sh-low.c (sh_get_pc, sh_set_pc)
11671 (sh_breakpoint, sh_breakpoint_len, sh_breakpoint_at): New.
11672 (the_low_target): Add new members.
11673 * linux-x86-64-low.c (target_regsets): Add new kind
11674 identifier.
11675
116762002-05-15 Daniel Jacobowitz <drow@mvista.com>
11677
11678 From Martin Pool <mbp@samba.org>:
11679 * server.c (gdbserver_usage): New function.
11680 (main): Call it.
11681
116822002-05-14 Daniel Jacobowitz <drow@mvista.com>
11683
11684 * mem-break.c (reinsert_breakpoint_by_bp): Correct typo
11685 stop_at -> stop_pc.
11686
116872002-05-04 Andrew Cagney <ac131313@redhat.com>
11688
11689 * Makefile.in: Remove obsolete code.
11690
116912002-04-24 Michal Ludvig <mludvig@suse.cz>
11692
11693 * linux-low.c (regsets_fetch_inferior_registers),
11694 (regsets_store_inferior_registers): Removed cast to int from
11695 ptrace() calls.
11696 * regcache.h: Added declaration of struct inferior_info.
11697
116982002-04-20 Daniel Jacobowitz <drow@mvista.com>
11699
11700 * inferiors.c (struct inferior_info): Add regcache_data.
11701 (add_inferior): Call create_register_cache.
11702 (clear_inferiors): Call free_register_cache.
11703 (inferior_regcache_data, set_inferior_regcache_data): New functions.
11704 * regcache.c (struct inferior_regcache_data): New.
11705 (registers): Remove.
11706 (get_regcache): New function.
11707 (create_register_cache, free_register_cache): New functions.
11708 (set_register_cache): Don't initialize the register cache here.
11709 (registers_to_string, registers_from_string, register_data): Call
11710 get_regcache.
11711 * regcache.h: Add prototypes.
11712 * server.h: Likewise.
11713
117142002-04-20 Daniel Jacobowitz <drow@mvista.com>
11715
11716 * mem-break.c: New file.
11717 * mem-break.h: New file.
11718 * Makefile.in: Add mem-break.o rule; update server.h
11719 dependencies.
11720 * inferiors.c (struct inferior_info): Add target_data
11721 member.
11722 (clear_inferiors): Free target_data member if set.
11723 (inferior_target_data, set_inferior_target_data): New functions.
11724 * linux-i386-low.c (i386_breakpoint, i386_breakpoint_len)
11725 (i386_stop_pc, i386_set_pc): New. Add to the_low_target.
11726 * linux-low.c (linux_bp_reinsert): New variable.
11727 (struct inferior_linux_data): New.
11728 (linux_create_inferior): Use set_inferior_target_data.
11729 (linux_attach): Likewise. Call add_inferior.
11730 (linux_wait_for_one_inferior): New function.
11731 (linux_wait): Call it.
11732 (linux_write_memory): Add const.
11733 (initialize_low): Call set_breakpoint_data.
11734 * linux-low.h (struct linux_target_ops): Add breakpoint
11735 handling members.
11736 * server.c (attach_inferior): Remove extra add_inferior
11737 call.
11738 * server.h: Include mem-break.h. Update inferior.c
11739 prototypes.
11740 * target.c (read_inferior_memory)
11741 (write_inferior_memory): New functions.
11742 * target.h (read_inferior_memory)
11743 (write_inferior_memory): Change macros to prototypes.
11744 (struct target_ops): Update comments. Add const to write_memory
11745 definition.
11746
117472002-04-11 Daniel Jacobowitz <drow@mvista.com>
11748
11749 * linux-low.c (usr_store_inferior_registers): Support
11750 registers which are allowed to fail to store.
11751 * linux-low.h (linux_target_ops): Likewise.
11752 * linux-ppc-low.c (ppc_regmap): Support FPSCR.
11753 (ppc_cannot_store_register): FPSCR may not be storable.
11754
117552002-04-09 Daniel Jacobowitz <drow@mvista.com>
11756
11757 * server.h: Include <string.h> if HAVE_STRING_H.
11758 * ChangeLog: Correct paths in last ChangeLog entry.
11759
117602002-04-09 Daniel Jacobowitz <drow@mvista.com>
11761
11762 * linux-low.h: Remove obsolete prototypes.
11763 (struct linux_target_ops): New.
11764 (extern the_low_target): New.
11765 * linux-low.c (num_regs, regmap): Remove declarations.
11766 (register_addr): Use the_low_target explicitly.
11767 (fetch_register): Likewise.
11768 (usr_fetch_inferior_registers): Likewise.
11769 (usr_store_inferior_registers): Likewise.
11770 * linux-arm-low.c (num_regs): Remove.
11771 (arm_num_regs): Define.
11772 (arm_regmap): Renamed from regmap, made static.
11773 (arm_cannot_fetch_register): Renamed from cannot_fetch_register,
11774 made static.
11775 (arm_cannot_store_register): Renamed from cannot_store_register,
11776 made static.
11777 (the_low_target): New.
11778 * linux-i386-low.c (num_regs): Remove.
11779 (i386_num_regs): Define.
11780 (i386_regmap): Renamed from regmap, made static.
11781 (i386_cannot_fetch_register): Renamed from cannot_fetch_register,
11782 made static.
11783 (i386_cannot_store_register): Renamed from cannot_store_register,
11784 made static.
11785 (the_low_target): New.
11786 * linux-ia64-low.c (num_regs): Remove.
11787 (ia64_num_regs): Define.
11788 (ia64_regmap): Renamed from regmap, made static.
11789 (ia64_cannot_fetch_register): Renamed from cannot_fetch_register,
11790 made static.
11791 (ia64_cannot_store_register): Renamed from cannot_store_register,
11792 made static.
11793 (the_low_target): New.
11794 * linux-m68k-low.c (num_regs): Remove.
11795 (m68k_num_regs): Define.
11796 (m68k_regmap): Renamed from regmap, made static.
11797 (m68k_cannot_fetch_register): Renamed from cannot_fetch_register,
11798 made static.
11799 (m68k_cannot_store_register): Renamed from cannot_store_register,
11800 made static.
11801 (the_low_target): New.
11802 * linux-mips-low.c (num_regs): Remove.
11803 (mips_num_regs): Define.
11804 (mips_regmap): Renamed from regmap, made static.
11805 (mips_cannot_fetch_register): Renamed from cannot_fetch_register,
11806 made static.
11807 (mips_cannot_store_register): Renamed from cannot_store_register,
11808 made static.
11809 (the_low_target): New.
11810 * linux-ppc-low.c (num_regs): Remove.
11811 (ppc_num_regs): Define.
11812 (ppc_regmap): Renamed from regmap, made static.
11813 (ppc_cannot_fetch_register): Renamed from cannot_fetch_register,
11814 made static.
11815 (ppc_cannot_store_register): Renamed from cannot_store_register,
11816 made static.
11817 (the_low_target): New.
11818 * linux-s390-low.c (num_regs): Remove.
11819 (s390_num_regs): Define.
11820 (s390_regmap): Renamed from regmap, made static.
11821 (s390_cannot_fetch_register): Renamed from cannot_fetch_register,
11822 made static.
11823 (s390_cannot_store_register): Renamed from cannot_store_register,
11824 made static.
11825 (the_low_target): New.
11826 * linux-sh-low.c (num_regs): Remove.
11827 (sh_num_regs): Define.
11828 (sh_regmap): Renamed from regmap, made static.
11829 (sh_cannot_fetch_register): Renamed from cannot_fetch_register,
11830 made static.
11831 (sh_cannot_store_register): Renamed from cannot_store_register,
11832 made static.
11833 (the_low_target): New.
11834 * linux-x86-64-low.c (x86_64_regmap): Renamed from regmap.
11835 (the_low_target): New.
11836
118372002-04-09 Daniel Jacobowitz <drow@mvista.com>
11838
11839 * Makefile.in: Add stamp-h target.
11840 * configure.in: Create stamp-h.
11841 * configure: Regenerated.
11842
118432002-04-09 Daniel Jacobowitz <drow@mvista.com>
11844
11845 * inferiors.c: New file.
11846 * target.c: New file.
11847 * target.h: New file.
11848 * Makefile.in: Add target.o and inferiors.o. Update
11849 dependencies.
11850 * linux-low.c (inferior_pid): New static variable,
11851 moved from server.c.
11852 (linux_create_inferior): Renamed from create_inferior.
11853 Call add_inferior. Return 0 on success instead of a PID.
11854 (linux_attach): Renamed from myattach.
11855 (linux_kill): Renamed from kill_inferior. Call clear_inferiors ().
11856 (linux_thread_alive): Renamed from mythread_alive.
11857 (linux_wait): Renamed from mywait. Call clear_inferiors () if the
11858 child dies.
11859 (linux_resume): Renamed from myresume. Add missing ``return 0''.
11860 (regsets_store_inferior_registers): Correct error message.
11861 Add missing ``return 0''.
11862 (linux_fetch_registers): Renamed from fetch_inferior_registers.
11863 (linux_store_registers): Renamed from store_inferior_registers.
11864 (linux_read_memory): Renamed from read_inferior_memory.
11865 (linux_write_memory): Renamed from write_inferior_memory.
11866 (linux_target_ops): New structure.
11867 (initialize_low): Call set_target_ops ().
11868 * remote-utils.c (unhexify): New function.
11869 (hexify): New function.
11870 (input_interrupt): Send signals to ``signal_pid''.
11871 * server.c (inferior_pid): Remove.
11872 (start_inferior): Update create_inferior call.
11873 (attach_inferior): Call add_inferior.
11874 (handle_query): New function.
11875 (main): Call handle_query for `q' packets.
11876 * server.h: Include "target.h". Remove obsolete prototypes.
11877 Add prototypes for "inferiors.c", "target.c", hexify, and unhexify.
11878
118792002-04-09 Daniel Jacobowitz <drow@mvista.com>
11880
11881 * Makefile.in: Add WARN_CFLAGS. Update configury
11882 dependencies.
11883 * configure.in: Check for <string.h>
11884 * configure: Regenerate.
11885 * config.in: Regenerate.
11886 * gdbreplay.c: Include needed system headers.
11887 (remote_open): Remove strchr prototype.
11888 * linux-low.h: Correct #ifdef to HAVE_LINUX_USRREGS.
11889 * regcache.c (supply_register): Change buf argument to const void *.
11890 (supply_register_by_name): Likewise.
11891 (collect_register): Change buf argument to void *.
11892 (collect_register_by_name): Likewise.
11893 * regcache.h: Add missing prototypes.
11894 * remote-utils.c: Include <arpa/inet.h> for inet_ntoa.
11895 * server.c (handle_query): New function.
11896 (attached): New static variable, moved out of main.
11897 (main): Quiet longjmp clobber warnings.
11898 * server.h: Add ATTR_NORETURN and ATTR_FORMAT. Update prototypes.
11899 * utils.c (error): Remove NORETURN.
11900 (fatal): Likewise.